1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-02-03 09:57:24 +02:00

updated ui/dist

This commit is contained in:
Gani Georgiev 2023-04-18 06:32:01 +03:00
parent b39d607c8a
commit 0420a00c18
31 changed files with 290 additions and 290 deletions

View File

@ -1,4 +1,4 @@
import{S as ke,i as be,s as ge,e as r,w as g,b as w,c as me,f as k,g as h,h as n,m as _e,x as H,N as re,O as we,k as ve,P as Ce,n as Pe,t as L,a as Y,o as m,d as pe,R as Me,C as Se,p as $e,r as Q,u as je,M as Ae}from"./index-e5007277.js";import{S as Be}from"./SdkTabs-e5fbf56f.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",_,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),_=g(s),f=w(),k(o,"class","tab-item"),Q(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,_),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&H(_,s),C&6&&Q(o,"active",l[1]===l[5].code)},d(v){v&&m(o),i=!1,u()}}}function he(a,l){let o,s,_,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),me(s.$$.fragment),_=w(),k(o,"class","tab-item"),Q(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),_e(s,o,null),n(o,_),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&Q(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&m(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",_,f,i,u,d,v,C,F=a[0].name+"",U,R,q,P,D,j,W,M,K,X,y,A,Z,V,z=a[0].name+"",E,x,I,B,J,S,O,b=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:`
import{S as ke,i as be,s as ge,e as r,w as g,b as w,c as _e,f as k,g as h,h as n,m as me,x as H,N as re,O as we,k as ve,P as Ce,n as Pe,t as L,a as Y,o as _,d as pe,T as Me,C as Se,p as $e,r as Q,u as je,M as Ae}from"./index-7275477a.js";import{S as Be}from"./SdkTabs-3e2121ec.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",m,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),m=g(s),f=w(),k(o,"class","tab-item"),Q(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,m),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&H(m,s),C&6&&Q(o,"active",l[1]===l[5].code)},d(v){v&&_(o),i=!1,u()}}}function he(a,l){let o,s,m,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),_e(s.$$.fragment),m=w(),k(o,"class","tab-item"),Q(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),me(s,o,null),n(o,m),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&Q(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&_(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",m,f,i,u,d,v,C,F=a[0].name+"",U,X,q,P,D,j,W,M,K,R,y,A,Z,V,z=a[0].name+"",E,x,I,B,J,S,O,b=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${a[3]}');
@ -14,7 +14,7 @@ import{S as ke,i as be,s as ge,e as r,w as g,b as w,c as me,f as k,g as h,h as n
...
final result = await pb.collection('${(ne=a[0])==null?void 0:ne.name}').listAuthMethods();
`}});let G=a[2];const oe=e=>e[5].code;for(let e=0;e<G.length;e+=1){let t=de(a,G,e),c=oe(t);ee.set(c,b[e]=fe(c,t))}let N=a[2];const se=e=>e[5].code;for(let e=0;e<N.length;e+=1){let t=ue(a,N,e),c=se(t);le.set(c,p[e]=he(c,t))}return{c(){l=r("h3"),o=g("List auth methods ("),_=g(s),f=g(")"),i=w(),u=r("div"),d=r("p"),v=g("Returns a public list with all allowed "),C=r("strong"),U=g(F),R=g(" authentication methods."),q=w(),me(P.$$.fragment),D=w(),j=r("h6"),j.textContent="API details",W=w(),M=r("div"),K=r("strong"),K.textContent="GET",X=w(),y=r("div"),A=r("p"),Z=g("/api/collections/"),V=r("strong"),E=g(z),x=g("/auth-methods"),I=w(),B=r("div"),B.textContent="Responses",J=w(),S=r("div"),O=r("div");for(let e=0;e<b.length;e+=1)b[e].c();te=w(),T=r("div");for(let e=0;e<p.length;e+=1)p[e].c();k(l,"class","m-b-sm"),k(u,"class","content txt-lg m-b-sm"),k(j,"class","m-b-xs"),k(K,"class","label label-primary"),k(y,"class","content"),k(M,"class","alert alert-info"),k(B,"class","section-title"),k(O,"class","tabs-header compact left"),k(T,"class","tabs-content"),k(S,"class","tabs")},m(e,t){h(e,l,t),n(l,o),n(l,_),n(l,f),h(e,i,t),h(e,u,t),n(u,d),n(d,v),n(d,C),n(C,U),n(d,R),h(e,q,t),_e(P,e,t),h(e,D,t),h(e,j,t),h(e,W,t),h(e,M,t),n(M,K),n(M,X),n(M,y),n(y,A),n(A,Z),n(A,V),n(V,E),n(A,x),h(e,I,t),h(e,B,t),h(e,J,t),h(e,S,t),n(S,O);for(let c=0;c<b.length;c+=1)b[c]&&b[c].m(O,null);n(S,te),n(S,T);for(let c=0;c<p.length;c+=1)p[c]&&p[c].m(T,null);$=!0},p(e,[t]){var ie,ce;(!$||t&1)&&s!==(s=e[0].name+"")&&H(_,s),(!$||t&1)&&F!==(F=e[0].name+"")&&H(U,F);const c={};t&9&&(c.js=`
`}});let G=a[2];const oe=e=>e[5].code;for(let e=0;e<G.length;e+=1){let t=de(a,G,e),c=oe(t);ee.set(c,b[e]=fe(c,t))}let N=a[2];const se=e=>e[5].code;for(let e=0;e<N.length;e+=1){let t=ue(a,N,e),c=se(t);le.set(c,p[e]=he(c,t))}return{c(){l=r("h3"),o=g("List auth methods ("),m=g(s),f=g(")"),i=w(),u=r("div"),d=r("p"),v=g("Returns a public list with all allowed "),C=r("strong"),U=g(F),X=g(" authentication methods."),q=w(),_e(P.$$.fragment),D=w(),j=r("h6"),j.textContent="API details",W=w(),M=r("div"),K=r("strong"),K.textContent="GET",R=w(),y=r("div"),A=r("p"),Z=g("/api/collections/"),V=r("strong"),E=g(z),x=g("/auth-methods"),I=w(),B=r("div"),B.textContent="Responses",J=w(),S=r("div"),O=r("div");for(let e=0;e<b.length;e+=1)b[e].c();te=w(),T=r("div");for(let e=0;e<p.length;e+=1)p[e].c();k(l,"class","m-b-sm"),k(u,"class","content txt-lg m-b-sm"),k(j,"class","m-b-xs"),k(K,"class","label label-primary"),k(y,"class","content"),k(M,"class","alert alert-info"),k(B,"class","section-title"),k(O,"class","tabs-header compact left"),k(T,"class","tabs-content"),k(S,"class","tabs")},m(e,t){h(e,l,t),n(l,o),n(l,m),n(l,f),h(e,i,t),h(e,u,t),n(u,d),n(d,v),n(d,C),n(C,U),n(d,X),h(e,q,t),me(P,e,t),h(e,D,t),h(e,j,t),h(e,W,t),h(e,M,t),n(M,K),n(M,R),n(M,y),n(y,A),n(A,Z),n(A,V),n(V,E),n(A,x),h(e,I,t),h(e,B,t),h(e,J,t),h(e,S,t),n(S,O);for(let c=0;c<b.length;c+=1)b[c]&&b[c].m(O,null);n(S,te),n(S,T);for(let c=0;c<p.length;c+=1)p[c]&&p[c].m(T,null);$=!0},p(e,[t]){var ie,ce;(!$||t&1)&&s!==(s=e[0].name+"")&&H(m,s),(!$||t&1)&&F!==(F=e[0].name+"")&&H(U,F);const c={};t&9&&(c.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
@ -30,7 +30,7 @@ import{S as ke,i as be,s as ge,e as r,w as g,b as w,c as me,f as k,g as h,h as n
...
final result = await pb.collection('${(ce=e[0])==null?void 0:ce.name}').listAuthMethods();
`),P.$set(c),(!$||t&1)&&z!==(z=e[0].name+"")&&H(E,z),t&6&&(G=e[2],b=re(b,t,oe,1,e,G,ee,O,we,fe,null,de)),t&6&&(N=e[2],ve(),p=re(p,t,se,1,e,N,le,T,Ce,he,null,ue),Pe())},i(e){if(!$){L(P.$$.fragment,e);for(let t=0;t<N.length;t+=1)L(p[t]);$=!0}},o(e){Y(P.$$.fragment,e);for(let t=0;t<p.length;t+=1)Y(p[t]);$=!1},d(e){e&&m(l),e&&m(i),e&&m(u),e&&m(q),pe(P,e),e&&m(D),e&&m(j),e&&m(W),e&&m(M),e&&m(I),e&&m(B),e&&m(J),e&&m(S);for(let t=0;t<b.length;t+=1)b[t].d();for(let t=0;t<p.length;t+=1)p[t].d()}}}function Te(a,l,o){let s,{collection:_=new Me}=l,f=200,i=[];const u=d=>o(1,f=d.code);return a.$$set=d=>{"collection"in d&&o(0,_=d.collection)},o(3,s=Se.getApiExampleUrl($e.baseUrl)),o(2,i=[{code:200,body:`
`),P.$set(c),(!$||t&1)&&z!==(z=e[0].name+"")&&H(E,z),t&6&&(G=e[2],b=re(b,t,oe,1,e,G,ee,O,we,fe,null,de)),t&6&&(N=e[2],ve(),p=re(p,t,se,1,e,N,le,T,Ce,he,null,ue),Pe())},i(e){if(!$){L(P.$$.fragment,e);for(let t=0;t<N.length;t+=1)L(p[t]);$=!0}},o(e){Y(P.$$.fragment,e);for(let t=0;t<p.length;t+=1)Y(p[t]);$=!1},d(e){e&&_(l),e&&_(i),e&&_(u),e&&_(q),pe(P,e),e&&_(D),e&&_(j),e&&_(W),e&&_(M),e&&_(I),e&&_(B),e&&_(J),e&&_(S);for(let t=0;t<b.length;t+=1)b[t].d();for(let t=0;t<p.length;t+=1)p[t].d()}}}function Te(a,l,o){let s,{collection:m=new Me}=l,f=200,i=[];const u=d=>o(1,f=d.code);return a.$$set=d=>{"collection"in d&&o(0,m=d.collection)},o(3,s=Se.getApiExampleUrl($e.baseUrl)),o(2,i=[{code:200,body:`
{
"usernamePassword": true,
"emailPassword": true,
@ -61,4 +61,4 @@ import{S as ke,i as be,s as ge,e as r,w as g,b as w,c as me,f as k,g as h,h as n
}
]
}
`}]),[_,f,i,s,u]}class Ke extends ke{constructor(l){super(),be(this,l,Te,Oe,ge,{collection:0})}}export{Ke as default};
`}]),[m,f,i,s,u]}class Ke extends ke{constructor(l){super(),be(this,l,Te,Oe,ge,{collection:0})}}export{Ke as default};

View File

@ -1,4 +1,4 @@
import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as d,h as o,m as ne,x as re,N as qe,O as xe,k as Je,P as Ke,n as Ie,t as U,a as j,o as u,d as ie,R as Qe,C as He,p as We,r as x,u as Ge}from"./index-e5007277.js";import{S as Xe}from"./SdkTabs-e5fbf56f.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){d(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&u(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){d(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&u(s),ie(n)}}}function Ye(r){var Ae,Be;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,A,J,$,F,ce,L,B,de,K,N=r[0].name+"",I,ue,pe,V,Q,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,R,q,S=[],Te=new Map,Ce,H,y=[],Re=new Map,M;g=new Xe({props:{js:`
import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as d,h as o,m as ne,x as re,N as qe,O as xe,k as Je,P as Ke,n as Ie,t as U,a as j,o as u,d as ie,T as Qe,C as He,p as We,r as x,u as Ge}from"./index-7275477a.js";import{S as Xe}from"./SdkTabs-3e2121ec.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){d(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&u(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){d(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&u(s),ie(n)}}}function Ye(r){var Ae,Be;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,A,J,$,F,ce,L,B,de,K,N=r[0].name+"",I,ue,pe,V,Q,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,R,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,P,q,S=[],Te=new Map,Ce,H,y=[],Pe=new Map,M;g=new Xe({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${r[3]}');
@ -24,18 +24,18 @@ import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as
print(pb.authStore.isValid);
print(pb.authStore.token);
print(pb.authStore.model.id);
`}}),P=new Ve({props:{content:"?expand=relField1,relField2.subRelField"}});let z=r[2];const Pe=e=>e[5].code;for(let e=0;e<z.length;e+=1){let t=Fe(r,z,e),c=Pe(t);Te.set(c,S[e]=Le(c,t))}let E=r[2];const Me=e=>e[5].code;for(let e=0;e<E.length;e+=1){let t=Ee(r,E,e),c=Me(t);Re.set(c,y[e]=Ne(c,t))}return{c(){l=a("h3"),s=k("Auth refresh ("),m=k(n),_=k(")"),i=p(),f=a("div"),f.innerHTML=`<p>Returns a new auth response (token and record data) for an
`}}),R=new Ve({props:{content:"?expand=relField1,relField2.subRelField"}});let z=r[2];const Re=e=>e[5].code;for(let e=0;e<z.length;e+=1){let t=Fe(r,z,e),c=Re(t);Te.set(c,S[e]=Le(c,t))}let E=r[2];const Me=e=>e[5].code;for(let e=0;e<E.length;e+=1){let t=Ee(r,E,e),c=Me(t);Pe.set(c,y[e]=Ne(c,t))}return{c(){l=a("h3"),s=k("Auth refresh ("),m=k(n),_=k(")"),i=p(),f=a("div"),f.innerHTML=`<p>Returns a new auth response (token and record data) for an
<strong>already authenticated record</strong>.</p>
<p><em>This method is usually called by users on page/screen reload to ensure that the previously stored
data in <code>pb.authStore</code> is still valid and up-to-date.</em></p>`,v=p(),ae(g.$$.fragment),w=p(),A=a("h6"),A.textContent="API details",J=p(),$=a("div"),F=a("strong"),F.textContent="POST",ce=p(),L=a("div"),B=a("p"),de=k("/api/collections/"),K=a("strong"),I=k(N),ue=k("/auth-refresh"),pe=p(),V=a("p"),V.innerHTML="Requires record <code>Authorization:TOKEN</code> header",Q=p(),D=a("div"),D.textContent="Query parameters",W=p(),T=a("table"),G=a("thead"),G.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr>`,fe=p(),X=a("tbody"),C=a("tr"),Y=a("td"),Y.textContent="expand",he=p(),Z=a("td"),Z.innerHTML='<span class="label">String</span>',be=p(),h=a("td"),me=k(`Auto expand record relations. Ex.:
`),ae(P.$$.fragment),_e=k(`
`),ae(R.$$.fragment),_e=k(`
Supports up to 6-levels depth nested relations expansion. `),ke=a("br"),ve=k(`
The expanded relations will be appended to the record under the
`),ee=a("code"),ee.textContent="expand",ge=k(" property (eg. "),te=a("code"),te.textContent='"expand": {"relField1": {...}, ...}',ye=k(`).
`),Se=a("br"),$e=k(`
Only the relations to which the request user has permissions to `),oe=a("strong"),oe.textContent="view",we=k(" will be expanded."),le=p(),O=a("div"),O.textContent="Responses",se=p(),R=a("div"),q=a("div");for(let e=0;e<S.length;e+=1)S[e].c();Ce=p(),H=a("div");for(let e=0;e<y.length;e+=1)y[e].c();b(l,"class","m-b-sm"),b(f,"class","content txt-lg m-b-sm"),b(A,"class","m-b-xs"),b(F,"class","label label-primary"),b(L,"class","content"),b(V,"class","txt-hint txt-sm txt-right"),b($,"class","alert alert-success"),b(D,"class","section-title"),b(T,"class","table-compact table-border m-b-base"),b(O,"class","section-title"),b(q,"class","tabs-header compact left"),b(H,"class","tabs-content"),b(R,"class","tabs")},m(e,t){d(e,l,t),o(l,s),o(l,m),o(l,_),d(e,i,t),d(e,f,t),d(e,v,t),ne(g,e,t),d(e,w,t),d(e,A,t),d(e,J,t),d(e,$,t),o($,F),o($,ce),o($,L),o(L,B),o(B,de),o(B,K),o(K,I),o(B,ue),o($,pe),o($,V),d(e,Q,t),d(e,D,t),d(e,W,t),d(e,T,t),o(T,G),o(T,fe),o(T,X),o(X,C),o(C,Y),o(C,he),o(C,Z),o(C,be),o(C,h),o(h,me),ne(P,h,null),o(h,_e),o(h,ke),o(h,ve),o(h,ee),o(h,ge),o(h,te),o(h,ye),o(h,Se),o(h,$e),o(h,oe),o(h,we),d(e,le,t),d(e,O,t),d(e,se,t),d(e,R,t),o(R,q);for(let c=0;c<S.length;c+=1)S[c]&&S[c].m(q,null);o(R,Ce),o(R,H);for(let c=0;c<y.length;c+=1)y[c]&&y[c].m(H,null);M=!0},p(e,[t]){var De,Oe;(!M||t&1)&&n!==(n=e[0].name+"")&&re(m,n);const c={};t&9&&(c.js=`
Only the relations to which the request user has permissions to `),oe=a("strong"),oe.textContent="view",we=k(" will be expanded."),le=p(),O=a("div"),O.textContent="Responses",se=p(),P=a("div"),q=a("div");for(let e=0;e<S.length;e+=1)S[e].c();Ce=p(),H=a("div");for(let e=0;e<y.length;e+=1)y[e].c();b(l,"class","m-b-sm"),b(f,"class","content txt-lg m-b-sm"),b(A,"class","m-b-xs"),b(F,"class","label label-primary"),b(L,"class","content"),b(V,"class","txt-hint txt-sm txt-right"),b($,"class","alert alert-success"),b(D,"class","section-title"),b(T,"class","table-compact table-border m-b-base"),b(O,"class","section-title"),b(q,"class","tabs-header compact left"),b(H,"class","tabs-content"),b(P,"class","tabs")},m(e,t){d(e,l,t),o(l,s),o(l,m),o(l,_),d(e,i,t),d(e,f,t),d(e,v,t),ne(g,e,t),d(e,w,t),d(e,A,t),d(e,J,t),d(e,$,t),o($,F),o($,ce),o($,L),o(L,B),o(B,de),o(B,K),o(K,I),o(B,ue),o($,pe),o($,V),d(e,Q,t),d(e,D,t),d(e,W,t),d(e,T,t),o(T,G),o(T,fe),o(T,X),o(X,C),o(C,Y),o(C,he),o(C,Z),o(C,be),o(C,h),o(h,me),ne(R,h,null),o(h,_e),o(h,ke),o(h,ve),o(h,ee),o(h,ge),o(h,te),o(h,ye),o(h,Se),o(h,$e),o(h,oe),o(h,we),d(e,le,t),d(e,O,t),d(e,se,t),d(e,P,t),o(P,q);for(let c=0;c<S.length;c+=1)S[c]&&S[c].m(q,null);o(P,Ce),o(P,H);for(let c=0;c<y.length;c+=1)y[c]&&y[c].m(H,null);M=!0},p(e,[t]){var De,Oe;(!M||t&1)&&n!==(n=e[0].name+"")&&re(m,n);const c={};t&9&&(c.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
@ -61,7 +61,7 @@ import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as
print(pb.authStore.isValid);
print(pb.authStore.token);
print(pb.authStore.model.id);
`),g.$set(c),(!M||t&1)&&N!==(N=e[0].name+"")&&re(I,N),t&6&&(z=e[2],S=qe(S,t,Pe,1,e,z,Te,q,xe,Le,null,Fe)),t&6&&(E=e[2],Je(),y=qe(y,t,Me,1,e,E,Re,H,Ke,Ne,null,Ee),Ie())},i(e){if(!M){U(g.$$.fragment,e),U(P.$$.fragment,e);for(let t=0;t<E.length;t+=1)U(y[t]);M=!0}},o(e){j(g.$$.fragment,e),j(P.$$.fragment,e);for(let t=0;t<y.length;t+=1)j(y[t]);M=!1},d(e){e&&u(l),e&&u(i),e&&u(f),e&&u(v),ie(g,e),e&&u(w),e&&u(A),e&&u(J),e&&u($),e&&u(Q),e&&u(D),e&&u(W),e&&u(T),ie(P),e&&u(le),e&&u(O),e&&u(se),e&&u(R);for(let t=0;t<S.length;t+=1)S[t].d();for(let t=0;t<y.length;t+=1)y[t].d()}}}function Ze(r,l,s){let n,{collection:m=new Qe}=l,_=200,i=[];const f=v=>s(1,_=v.code);return r.$$set=v=>{"collection"in v&&s(0,m=v.collection)},r.$$.update=()=>{r.$$.dirty&1&&s(2,i=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:He.dummyCollectionRecord(m)},null,2)},{code:401,body:`
`),g.$set(c),(!M||t&1)&&N!==(N=e[0].name+"")&&re(I,N),t&6&&(z=e[2],S=qe(S,t,Re,1,e,z,Te,q,xe,Le,null,Fe)),t&6&&(E=e[2],Je(),y=qe(y,t,Me,1,e,E,Pe,H,Ke,Ne,null,Ee),Ie())},i(e){if(!M){U(g.$$.fragment,e),U(R.$$.fragment,e);for(let t=0;t<E.length;t+=1)U(y[t]);M=!0}},o(e){j(g.$$.fragment,e),j(R.$$.fragment,e);for(let t=0;t<y.length;t+=1)j(y[t]);M=!1},d(e){e&&u(l),e&&u(i),e&&u(f),e&&u(v),ie(g,e),e&&u(w),e&&u(A),e&&u(J),e&&u($),e&&u(Q),e&&u(D),e&&u(W),e&&u(T),ie(R),e&&u(le),e&&u(O),e&&u(se),e&&u(P);for(let t=0;t<S.length;t+=1)S[t].d();for(let t=0;t<y.length;t+=1)y[t].d()}}}function Ze(r,l,s){let n,{collection:m=new Qe}=l,_=200,i=[];const f=v=>s(1,_=v.code);return r.$$set=v=>{"collection"in v&&s(0,m=v.collection)},r.$$.update=()=>{r.$$.dirty&1&&s(2,i=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:He.dummyCollectionRecord(m)},null,2)},{code:401,body:`
{
"code": 401,
"message": "The request requires valid record authorization token to be set.",

View File

@ -1,4 +1,4 @@
import{S as je,i as Fe,s as Ve,M as He,e as s,w as g,b as h,c as re,f as p,g as r,h as a,m as ce,x as ue,N as Pe,O as Le,k as Ee,P as Je,n as Ne,t as E,a as J,o as c,d as de,R as ze,C as Re,p as Ie,r as N,u as Ke}from"./index-e5007277.js";import{S as Qe}from"./SdkTabs-e5fbf56f.js";function xe(i,l,o){const n=i.slice();return n[5]=l[o],n}function We(i,l,o){const n=i.slice();return n[5]=l[o],n}function Ue(i,l){let o,n=l[5].code+"",m,k,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=g(n),k=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,k),u||(b=Ke(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&ue(m,n),A&6&&N(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function Be(i,l){let o,n,m,k;return n=new He({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),ce(n,o,null),a(o,m),k=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!k||b&6)&&N(o,"active",l[1]===l[5].code)},i(u){k||(E(n.$$.fragment,u),k=!0)},o(u){J(n.$$.fragment,u),k=!1},d(u){u&&c(o),de(n)}}}function Ge(i){let l,o,n=i[0].name+"",m,k,u,b,_,v,A,D,z,S,j,he,F,M,pe,I,V=i[0].name+"",K,be,Q,P,G,R,X,x,Y,y,Z,fe,ee,$,te,me,ae,ke,f,ge,C,_e,ve,we,le,Oe,oe,Ae,Se,ye,se,$e,ne,W,ie,T,U,O=[],Te=new Map,Ce,B,w=[],qe=new Map,q;v=new Qe({props:{js:`
import{S as je,i as Fe,s as Ve,M as He,e as s,w as g,b as h,c as re,f as p,g as r,h as a,m as ce,x as ue,N as Pe,O as Le,k as Ee,P as Je,n as Ne,t as E,a as J,o as c,d as de,T as ze,C as Re,p as Ie,r as N,u as Ke}from"./index-7275477a.js";import{S as Qe}from"./SdkTabs-3e2121ec.js";function xe(i,l,o){const n=i.slice();return n[5]=l[o],n}function We(i,l,o){const n=i.slice();return n[5]=l[o],n}function Ue(i,l){let o,n=l[5].code+"",m,k,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=g(n),k=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,k),u||(b=Ke(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&ue(m,n),A&6&&N(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function Be(i,l){let o,n,m,k;return n=new He({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),ce(n,o,null),a(o,m),k=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!k||b&6)&&N(o,"active",l[1]===l[5].code)},i(u){k||(E(n.$$.fragment,u),k=!0)},o(u){J(n.$$.fragment,u),k=!1},d(u){u&&c(o),de(n)}}}function Ge(i){let l,o,n=i[0].name+"",m,k,u,b,_,v,A,D,z,S,j,he,F,M,pe,I,V=i[0].name+"",K,be,Q,P,G,R,X,x,Y,y,Z,fe,ee,$,te,me,ae,ke,f,ge,C,_e,ve,we,le,Oe,oe,Ae,Se,ye,se,$e,ne,W,ie,T,U,O=[],Te=new Map,Ce,B,w=[],qe=new Map,q;v=new Qe({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${i[3]}');

View File

@ -1,4 +1,4 @@
import{S as Se,i as ve,s as we,M as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,N as ce,O as ye,k as ge,P as Pe,n as Re,t as tt,a as et,o as c,d as Mt,R as $e,C as de,p as Ce,r as lt,u as Oe}from"./index-e5007277.js";import{S as Ae}from"./SdkTabs-e5fbf56f.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&&lt(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&&lt(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Mt(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Ut,ot,T,at,F,st,M,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,U,dt,Lt,V,D,ut,Bt,ft,Ht,P,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Kt,gt,Qt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,L,K,A=[],xt=new Map,te,Q,v=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Ue;if(t[1])return Me;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:`
import{S as Se,i as ve,s as we,M as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as Tt,x as At,N as ce,O as ye,k as ge,P as Pe,n as $e,t as tt,a as et,o as c,d as Mt,T as Re,C as de,p as Ce,r as lt,u as Oe}from"./index-7275477a.js";import{S as Te}from"./SdkTabs-3e2121ec.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Ae(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(R,C){r(R,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p(R,C){e=R,C&16&&i!==(i=e[8].code+"")&&At(S,i),C&24&&lt(l,"active",e[3]===e[8].code)},d(R){R&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),Tt(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&&lt(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Mt(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,R,C,O,B,Ut,ot,A,at,F,st,M,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,U,dt,Lt,V,D,ut,Bt,ft,Ht,P,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Kt,gt,Qt,Pt,zt,Gt,Xt,$t,Zt,Rt,J,Ct,L,K,T=[],xt=new Map,te,Q,v=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Ue;if(t[1])return Me;if(t[2])return Ae}let q=le(n),$=q&&q(n);A=new Te({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${n[6]}');
@ -36,9 +36,9 @@ import{S as Se,i as ve,s as we,M as ke,e as s,w as f,b as u,c as Ot,f as h,g as
// "logout" the last authenticated account
pb.authStore.clear();
`}});let w=n[1]&&pe(),y=n[1]&&n[2]&&be(),g=n[2]&&me();H=new ke({props:{content:"?expand=relField1,relField2.subRelField"}});let x=n[4];const oe=t=>t[8].code;for(let t=0;t<x.length;t+=1){let a=fe(n,x,t),b=oe(a);xt.set(b,A[t]=he(b,a))}let z=n[4];const ae=t=>t[8].code;for(let t=0;t<z.length;t+=1){let a=ue(n,z,t),b=ae(a);ee.set(b,v[t]=_e(b,a))}return{c(){e=s("h3"),l=f("Auth with password ("),S=f(i),m=f(")"),p=u(),d=s("div"),_=s("p"),$=f(`Returns new auth token and account data by a combination of
`),C=s("strong"),R&&R.c(),O=f(`
and `),B=s("strong"),B.textContent="password",Ut=f("."),ot=u(),Ot(T.$$.fragment),at=u(),F=s("h6"),F.textContent="API details",st=u(),M=s("div"),G=s("strong"),G.textContent="POST",Dt=u(),X=s("div"),N=s("p"),Et=f("/api/collections/"),nt=s("strong"),it=f(Z),Wt=f("/auth-with-password"),rt=u(),I=s("div"),I.textContent="Body Parameters",ct=u(),U=s("table"),dt=s("thead"),dt.innerHTML=`<tr><th>Param</th>
`}});let w=n[1]&&pe(),y=n[1]&&n[2]&&be(),g=n[2]&&me();H=new ke({props:{content:"?expand=relField1,relField2.subRelField"}});let x=n[4];const oe=t=>t[8].code;for(let t=0;t<x.length;t+=1){let a=fe(n,x,t),b=oe(a);xt.set(b,T[t]=he(b,a))}let z=n[4];const ae=t=>t[8].code;for(let t=0;t<z.length;t+=1){let a=ue(n,z,t),b=ae(a);ee.set(b,v[t]=_e(b,a))}return{c(){e=s("h3"),l=f("Auth with password ("),S=f(i),m=f(")"),p=u(),d=s("div"),_=s("p"),R=f(`Returns new auth token and account data by a combination of
`),C=s("strong"),$&&$.c(),O=f(`
and `),B=s("strong"),B.textContent="password",Ut=f("."),ot=u(),Ot(A.$$.fragment),at=u(),F=s("h6"),F.textContent="API details",st=u(),M=s("div"),G=s("strong"),G.textContent="POST",Dt=u(),X=s("div"),N=s("p"),Et=f("/api/collections/"),nt=s("strong"),it=f(Z),Wt=f("/auth-with-password"),rt=u(),I=s("div"),I.textContent="Body Parameters",ct=u(),U=s("table"),dt=s("thead"),dt.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="50%">Description</th></tr>`,Lt=u(),V=s("tbody"),D=s("tr"),ut=s("td"),ut.innerHTML=`<div class="inline-flex"><span class="label label-success">Required</span>
<span>identity</span></div>`,Bt=u(),ft=s("td"),ft.innerHTML='<span class="label">String</span>',Ht=u(),P=s("td"),Yt=f(`The
@ -54,7 +54,7 @@ import{S as Se,i as ve,s as we,M as ke,e as s,w as f,b as u,c as Ot,f as h,g as
The expanded relations will be appended to the record under the
`),gt=s("code"),gt.textContent="expand",Qt=f(" property (eg. "),Pt=s("code"),Pt.textContent='"expand": {"relField1": {...}, ...}',zt=f(`).
`),Gt=s("br"),Xt=f(`
Only the relations to which the request user has permissions to `),Rt=s("strong"),Rt.textContent="view",Zt=f(" will be expanded."),$t=u(),J=s("div"),J.textContent="Responses",Ct=u(),L=s("div"),K=s("div");for(let t=0;t<A.length;t+=1)A[t].c();te=u(),Q=s("div");for(let t=0;t<v.length;t+=1)v[t].c();h(e,"class","m-b-sm"),h(d,"class","content txt-lg m-b-sm"),h(F,"class","m-b-xs"),h(G,"class","label label-primary"),h(X,"class","content"),h(M,"class","alert alert-success"),h(I,"class","section-title"),h(U,"class","table-compact table-border m-b-base"),h(j,"class","section-title"),h(E,"class","table-compact table-border m-b-base"),h(J,"class","section-title"),h(K,"class","tabs-header compact left"),h(Q,"class","tabs-content"),h(L,"class","tabs")},m(t,a){r(t,e,a),o(e,l),o(e,S),o(e,m),r(t,p,a),r(t,d,a),o(d,_),o(_,$),o(_,C),R&&R.m(C,null),o(_,O),o(_,B),o(_,Ut),r(t,ot,a),At(T,t,a),r(t,at,a),r(t,F,a),r(t,st,a),r(t,M,a),o(M,G),o(M,Dt),o(M,X),o(X,N),o(N,Et),o(N,nt),o(nt,it),o(N,Wt),r(t,rt,a),r(t,I,a),r(t,ct,a),r(t,U,a),o(U,dt),o(U,Lt),o(U,V),o(V,D),o(D,ut),o(D,Bt),o(D,ft),o(D,Ht),o(D,P),o(P,Yt),w&&w.m(P,null),o(P,pt),y&&y.m(P,null),o(P,bt),g&&g.m(P,null),o(P,mt),o(V,qt),o(V,ht),r(t,_t,a),r(t,j,a),r(t,kt,a),r(t,E,a),o(E,St),o(E,Ft),o(E,vt),o(vt,W),o(W,wt),o(W,Nt),o(W,yt),o(W,It),o(W,k),o(k,Vt),At(H,k,null),o(k,jt),o(k,Jt),o(k,Kt),o(k,gt),o(k,Qt),o(k,Pt),o(k,zt),o(k,Gt),o(k,Xt),o(k,Rt),o(k,Zt),r(t,$t,a),r(t,J,a),r(t,Ct,a),r(t,L,a),o(L,K);for(let b=0;b<A.length;b+=1)A[b]&&A[b].m(K,null);o(L,te),o(L,Q);for(let b=0;b<v.length;b+=1)v[b]&&v[b].m(Q,null);Y=!0},p(t,[a]){var ie,re;(!Y||a&1)&&i!==(i=t[0].name+"")&&Tt(S,i),q!==(q=le(t))&&(R&&R.d(1),R=q&&q(t),R&&(R.c(),R.m(C,null)));const b={};a&97&&(b.js=`
Only the relations to which the request user has permissions to `),$t=s("strong"),$t.textContent="view",Zt=f(" will be expanded."),Rt=u(),J=s("div"),J.textContent="Responses",Ct=u(),L=s("div"),K=s("div");for(let t=0;t<T.length;t+=1)T[t].c();te=u(),Q=s("div");for(let t=0;t<v.length;t+=1)v[t].c();h(e,"class","m-b-sm"),h(d,"class","content txt-lg m-b-sm"),h(F,"class","m-b-xs"),h(G,"class","label label-primary"),h(X,"class","content"),h(M,"class","alert alert-success"),h(I,"class","section-title"),h(U,"class","table-compact table-border m-b-base"),h(j,"class","section-title"),h(E,"class","table-compact table-border m-b-base"),h(J,"class","section-title"),h(K,"class","tabs-header compact left"),h(Q,"class","tabs-content"),h(L,"class","tabs")},m(t,a){r(t,e,a),o(e,l),o(e,S),o(e,m),r(t,p,a),r(t,d,a),o(d,_),o(_,R),o(_,C),$&&$.m(C,null),o(_,O),o(_,B),o(_,Ut),r(t,ot,a),Tt(A,t,a),r(t,at,a),r(t,F,a),r(t,st,a),r(t,M,a),o(M,G),o(M,Dt),o(M,X),o(X,N),o(N,Et),o(N,nt),o(nt,it),o(N,Wt),r(t,rt,a),r(t,I,a),r(t,ct,a),r(t,U,a),o(U,dt),o(U,Lt),o(U,V),o(V,D),o(D,ut),o(D,Bt),o(D,ft),o(D,Ht),o(D,P),o(P,Yt),w&&w.m(P,null),o(P,pt),y&&y.m(P,null),o(P,bt),g&&g.m(P,null),o(P,mt),o(V,qt),o(V,ht),r(t,_t,a),r(t,j,a),r(t,kt,a),r(t,E,a),o(E,St),o(E,Ft),o(E,vt),o(vt,W),o(W,wt),o(W,Nt),o(W,yt),o(W,It),o(W,k),o(k,Vt),Tt(H,k,null),o(k,jt),o(k,Jt),o(k,Kt),o(k,gt),o(k,Qt),o(k,Pt),o(k,zt),o(k,Gt),o(k,Xt),o(k,$t),o(k,Zt),r(t,Rt,a),r(t,J,a),r(t,Ct,a),r(t,L,a),o(L,K);for(let b=0;b<T.length;b+=1)T[b]&&T[b].m(K,null);o(L,te),o(L,Q);for(let b=0;b<v.length;b+=1)v[b]&&v[b].m(Q,null);Y=!0},p(t,[a]){var ie,re;(!Y||a&1)&&i!==(i=t[0].name+"")&&At(S,i),q!==(q=le(t))&&($&&$.d(1),$=q&&q(t),$&&($.c(),$.m(C,null)));const b={};a&97&&(b.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${t[6]}');
@ -92,7 +92,7 @@ import{S as Se,i as ve,s as we,M as ke,e as s,w as f,b as u,c as Ot,f as h,g as
// "logout" the last authenticated account
pb.authStore.clear();
`),T.$set(b),(!Y||a&1)&&Z!==(Z=t[0].name+"")&&Tt(it,Z),t[1]?w||(w=pe(),w.c(),w.m(P,pt)):w&&(w.d(1),w=null),t[1]&&t[2]?y||(y=be(),y.c(),y.m(P,bt)):y&&(y.d(1),y=null),t[2]?g||(g=me(),g.c(),g.m(P,mt)):g&&(g.d(1),g=null),a&24&&(x=t[4],A=ce(A,a,oe,1,t,x,xt,K,ye,he,null,fe)),a&24&&(z=t[4],ge(),v=ce(v,a,ae,1,t,z,ee,Q,Pe,_e,null,ue),Re())},i(t){if(!Y){tt(T.$$.fragment,t),tt(H.$$.fragment,t);for(let a=0;a<z.length;a+=1)tt(v[a]);Y=!0}},o(t){et(T.$$.fragment,t),et(H.$$.fragment,t);for(let a=0;a<v.length;a+=1)et(v[a]);Y=!1},d(t){t&&c(e),t&&c(p),t&&c(d),R&&R.d(),t&&c(ot),Mt(T,t),t&&c(at),t&&c(F),t&&c(st),t&&c(M),t&&c(rt),t&&c(I),t&&c(ct),t&&c(U),w&&w.d(),y&&y.d(),g&&g.d(),t&&c(_t),t&&c(j),t&&c(kt),t&&c(E),Mt(H),t&&c($t),t&&c(J),t&&c(Ct),t&&c(L);for(let a=0;a<A.length;a+=1)A[a].d();for(let a=0;a<v.length;a+=1)v[a].d()}}}function Ee(n,e,l){let i,S,m,p,{collection:d=new $e}=e,_=200,$=[];const C=O=>l(3,_=O.code);return n.$$set=O=>{"collection"in O&&l(0,d=O.collection)},n.$$.update=()=>{var O,B;n.$$.dirty&1&&l(2,S=(O=d==null?void 0:d.options)==null?void 0:O.allowEmailAuth),n.$$.dirty&1&&l(1,m=(B=d==null?void 0:d.options)==null?void 0:B.allowUsernameAuth),n.$$.dirty&6&&l(5,p=m&&S?"YOUR_USERNAME_OR_EMAIL":m?"YOUR_USERNAME":"YOUR_EMAIL"),n.$$.dirty&1&&l(4,$=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:de.dummyCollectionRecord(d)},null,2)},{code:400,body:`
`),A.$set(b),(!Y||a&1)&&Z!==(Z=t[0].name+"")&&At(it,Z),t[1]?w||(w=pe(),w.c(),w.m(P,pt)):w&&(w.d(1),w=null),t[1]&&t[2]?y||(y=be(),y.c(),y.m(P,bt)):y&&(y.d(1),y=null),t[2]?g||(g=me(),g.c(),g.m(P,mt)):g&&(g.d(1),g=null),a&24&&(x=t[4],T=ce(T,a,oe,1,t,x,xt,K,ye,he,null,fe)),a&24&&(z=t[4],ge(),v=ce(v,a,ae,1,t,z,ee,Q,Pe,_e,null,ue),$e())},i(t){if(!Y){tt(A.$$.fragment,t),tt(H.$$.fragment,t);for(let a=0;a<z.length;a+=1)tt(v[a]);Y=!0}},o(t){et(A.$$.fragment,t),et(H.$$.fragment,t);for(let a=0;a<v.length;a+=1)et(v[a]);Y=!1},d(t){t&&c(e),t&&c(p),t&&c(d),$&&$.d(),t&&c(ot),Mt(A,t),t&&c(at),t&&c(F),t&&c(st),t&&c(M),t&&c(rt),t&&c(I),t&&c(ct),t&&c(U),w&&w.d(),y&&y.d(),g&&g.d(),t&&c(_t),t&&c(j),t&&c(kt),t&&c(E),Mt(H),t&&c(Rt),t&&c(J),t&&c(Ct),t&&c(L);for(let a=0;a<T.length;a+=1)T[a].d();for(let a=0;a<v.length;a+=1)v[a].d()}}}function Ee(n,e,l){let i,S,m,p,{collection:d=new Re}=e,_=200,R=[];const C=O=>l(3,_=O.code);return n.$$set=O=>{"collection"in O&&l(0,d=O.collection)},n.$$.update=()=>{var O,B;n.$$.dirty&1&&l(2,S=(O=d==null?void 0:d.options)==null?void 0:O.allowEmailAuth),n.$$.dirty&1&&l(1,m=(B=d==null?void 0:d.options)==null?void 0:B.allowUsernameAuth),n.$$.dirty&6&&l(5,p=m&&S?"YOUR_USERNAME_OR_EMAIL":m?"YOUR_USERNAME":"YOUR_EMAIL"),n.$$.dirty&1&&l(4,R=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:de.dummyCollectionRecord(d)},null,2)},{code:400,body:`
{
"code": 400,
"message": "Failed to authenticate.",
@ -103,4 +103,4 @@ import{S as Se,i as ve,s as we,M as ke,e as s,w as f,b as u,c as Ot,f as h,g as
}
}
}
`}])},l(6,i=de.getApiExampleUrl(Ce.baseUrl)),[d,m,S,_,$,p,i,C]}class Be extends Se{constructor(e){super(),ve(this,e,Ee,De,we,{collection:0})}}export{Be as default};
`}])},l(6,i=de.getApiExampleUrl(Ce.baseUrl)),[d,m,S,_,R,p,i,C]}class Be extends Se{constructor(e){super(),ve(this,e,Ee,De,we,{collection:0})}}export{Be as default};

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,N as pe,O as Pe,k as Se,P as Oe,n as Re,t as Z,a as x,o as m,d as ge,R as Te,C as Ee,p as ye,r as j,u as Be,M as qe}from"./index-e5007277.js";import{S as Ae}from"./SdkTabs-e5fbf56f.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&m(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,R,L,P,M,te,N,T,le,z,K=o[0].name+"",G,se,J,E,Q,y,V,B,X,S,q,v=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:`
import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,N as pe,O as Pe,k as Se,P as Oe,n as Te,t as Z,a as x,o as m,d as ge,T as Re,C as Ee,p as ye,r as j,u as Be,M as qe}from"./index-7275477a.js";import{S as Ae}from"./SdkTabs-3e2121ec.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&m(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,T,L,P,M,te,N,R,le,z,K=o[0].name+"",G,se,J,E,Q,y,V,B,X,S,q,v=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[3]}');
@ -20,7 +20,7 @@ import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n
'TOKEN',
'YOUR_PASSWORD',
);
`}});let W=o[2];const ie=e=>e[5].code;for(let e=0;e<W.length;e+=1){let t=be(o,W,e),c=ie(t);ae.set(c,v[e]=_e(c,t))}let U=o[2];const ce=e=>e[5].code;for(let e=0;e<U.length;e+=1){let t=ue(o,U,e),c=ce(t);ne.set(c,k[e]=ke(c,t))}return{c(){l=r("h3"),s=g("Confirm email change ("),_=g(a),u=g(")"),i=h(),d=r("div"),p=r("p"),C=g("Confirms "),$=r("strong"),H=g(D),ee=g(" email change request."),F=h(),he(w.$$.fragment),I=h(),R=r("h6"),R.textContent="API details",L=h(),P=r("div"),M=r("strong"),M.textContent="POST",te=h(),N=r("div"),T=r("p"),le=g("/api/collections/"),z=r("strong"),G=g(K),se=g("/confirm-email-change"),J=h(),E=r("div"),E.textContent="Body Parameters",Q=h(),y=r("table"),y.innerHTML=`<thead><tr><th>Param</th>
`}});let W=o[2];const ie=e=>e[5].code;for(let e=0;e<W.length;e+=1){let t=be(o,W,e),c=ie(t);ae.set(c,v[e]=_e(c,t))}let U=o[2];const ce=e=>e[5].code;for(let e=0;e<U.length;e+=1){let t=ue(o,U,e),c=ce(t);ne.set(c,k[e]=ke(c,t))}return{c(){l=r("h3"),s=g("Confirm email change ("),_=g(a),u=g(")"),i=h(),d=r("div"),p=r("p"),C=g("Confirms "),$=r("strong"),H=g(D),ee=g(" email change request."),F=h(),he(w.$$.fragment),I=h(),T=r("h6"),T.textContent="API details",L=h(),P=r("div"),M=r("strong"),M.textContent="POST",te=h(),N=r("div"),R=r("p"),le=g("/api/collections/"),z=r("strong"),G=g(K),se=g("/confirm-email-change"),J=h(),E=r("div"),E.textContent="Body Parameters",Q=h(),y=r("table"),y.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="50%">Description</th></tr></thead>
<tbody><tr><td><div class="inline-flex"><span class="label label-success">Required</span>
@ -30,7 +30,7 @@ import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n
<tr><td><div class="inline-flex"><span class="label label-success">Required</span>
<span>password</span></div></td>
<td><span class="label">String</span></td>
<td>The account password to confirm the email change.</td></tr></tbody>`,V=h(),B=r("div"),B.textContent="Responses",X=h(),S=r("div"),q=r("div");for(let e=0;e<v.length;e+=1)v[e].c();oe=h(),A=r("div");for(let e=0;e<k.length;e+=1)k[e].c();b(l,"class","m-b-sm"),b(d,"class","content txt-lg m-b-sm"),b(R,"class","m-b-xs"),b(M,"class","label label-primary"),b(N,"class","content"),b(P,"class","alert alert-success"),b(E,"class","section-title"),b(y,"class","table-compact table-border m-b-base"),b(B,"class","section-title"),b(q,"class","tabs-header compact left"),b(A,"class","tabs-content"),b(S,"class","tabs")},m(e,t){f(e,l,t),n(l,s),n(l,_),n(l,u),f(e,i,t),f(e,d,t),n(d,p),n(p,C),n(p,$),n($,H),n(p,ee),f(e,F,t),ve(w,e,t),f(e,I,t),f(e,R,t),f(e,L,t),f(e,P,t),n(P,M),n(P,te),n(P,N),n(N,T),n(T,le),n(T,z),n(z,G),n(T,se),f(e,J,t),f(e,E,t),f(e,Q,t),f(e,y,t),f(e,V,t),f(e,B,t),f(e,X,t),f(e,S,t),n(S,q);for(let c=0;c<v.length;c+=1)v[c]&&v[c].m(q,null);n(S,oe),n(S,A);for(let c=0;c<k.length;c+=1)k[c]&&k[c].m(A,null);O=!0},p(e,[t]){var me,de;(!O||t&1)&&a!==(a=e[0].name+"")&&Y(_,a),(!O||t&1)&&D!==(D=e[0].name+"")&&Y(H,D);const c={};t&9&&(c.js=`
<td>The account password to confirm the email change.</td></tr></tbody>`,V=h(),B=r("div"),B.textContent="Responses",X=h(),S=r("div"),q=r("div");for(let e=0;e<v.length;e+=1)v[e].c();oe=h(),A=r("div");for(let e=0;e<k.length;e+=1)k[e].c();b(l,"class","m-b-sm"),b(d,"class","content txt-lg m-b-sm"),b(T,"class","m-b-xs"),b(M,"class","label label-primary"),b(N,"class","content"),b(P,"class","alert alert-success"),b(E,"class","section-title"),b(y,"class","table-compact table-border m-b-base"),b(B,"class","section-title"),b(q,"class","tabs-header compact left"),b(A,"class","tabs-content"),b(S,"class","tabs")},m(e,t){f(e,l,t),n(l,s),n(l,_),n(l,u),f(e,i,t),f(e,d,t),n(d,p),n(p,C),n(p,$),n($,H),n(p,ee),f(e,F,t),ve(w,e,t),f(e,I,t),f(e,T,t),f(e,L,t),f(e,P,t),n(P,M),n(P,te),n(P,N),n(N,R),n(R,le),n(R,z),n(z,G),n(R,se),f(e,J,t),f(e,E,t),f(e,Q,t),f(e,y,t),f(e,V,t),f(e,B,t),f(e,X,t),f(e,S,t),n(S,q);for(let c=0;c<v.length;c+=1)v[c]&&v[c].m(q,null);n(S,oe),n(S,A);for(let c=0;c<k.length;c+=1)k[c]&&k[c].m(A,null);O=!0},p(e,[t]){var me,de;(!O||t&1)&&a!==(a=e[0].name+"")&&Y(_,a),(!O||t&1)&&D!==(D=e[0].name+"")&&Y(H,D);const c={};t&9&&(c.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
@ -52,7 +52,7 @@ import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n
'TOKEN',
'YOUR_PASSWORD',
);
`),w.$set(c),(!O||t&1)&&K!==(K=e[0].name+"")&&Y(G,K),t&6&&(W=e[2],v=pe(v,t,ie,1,e,W,ae,q,Pe,_e,null,be)),t&6&&(U=e[2],Se(),k=pe(k,t,ce,1,e,U,ne,A,Oe,ke,null,ue),Re())},i(e){if(!O){Z(w.$$.fragment,e);for(let t=0;t<U.length;t+=1)Z(k[t]);O=!0}},o(e){x(w.$$.fragment,e);for(let t=0;t<k.length;t+=1)x(k[t]);O=!1},d(e){e&&m(l),e&&m(i),e&&m(d),e&&m(F),ge(w,e),e&&m(I),e&&m(R),e&&m(L),e&&m(P),e&&m(J),e&&m(E),e&&m(Q),e&&m(y),e&&m(V),e&&m(B),e&&m(X),e&&m(S);for(let t=0;t<v.length;t+=1)v[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function De(o,l,s){let a,{collection:_=new Te}=l,u=204,i=[];const d=p=>s(1,u=p.code);return o.$$set=p=>{"collection"in p&&s(0,_=p.collection)},s(3,a=Ee.getApiExampleUrl(ye.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:`
`),w.$set(c),(!O||t&1)&&K!==(K=e[0].name+"")&&Y(G,K),t&6&&(W=e[2],v=pe(v,t,ie,1,e,W,ae,q,Pe,_e,null,be)),t&6&&(U=e[2],Se(),k=pe(k,t,ce,1,e,U,ne,A,Oe,ke,null,ue),Te())},i(e){if(!O){Z(w.$$.fragment,e);for(let t=0;t<U.length;t+=1)Z(k[t]);O=!0}},o(e){x(w.$$.fragment,e);for(let t=0;t<k.length;t+=1)x(k[t]);O=!1},d(e){e&&m(l),e&&m(i),e&&m(d),e&&m(F),ge(w,e),e&&m(I),e&&m(T),e&&m(L),e&&m(P),e&&m(J),e&&m(E),e&&m(Q),e&&m(y),e&&m(V),e&&m(B),e&&m(X),e&&m(S);for(let t=0;t<v.length;t+=1)v[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function De(o,l,s){let a,{collection:_=new Re}=l,u=204,i=[];const d=p=>s(1,u=p.code);return o.$$set=p=>{"collection"in p&&s(0,_=p.collection)},s(3,a=Ee.getApiExampleUrl(ye.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:`
{
"code": 400,
"message": "Failed to authenticate.",

View File

@ -1,4 +1,4 @@
import{S as Se,i as he,s as Re,e as r,w as P,b as v,c as ve,f as b,g as d,h as n,m as we,x as K,N as me,O as Oe,k as Ne,P as Ce,n as We,t as Z,a as x,o as f,d as Pe,R as $e,C as Ee,p as Te,r as U,u as ge,M as Ae}from"./index-e5007277.js";import{S as De}from"./SdkTabs-e5fbf56f.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&f(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,M=o[0].name+"",j,ee,H,R,L,W,z,O,q,te,B,$,se,G,F=o[0].name+"",J,le,Q,E,V,T,X,g,Y,N,A,w=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:`
import{S as Se,i as he,s as Re,e as r,w as P,b as v,c as ve,f as b,g as d,h as n,m as we,x as K,N as me,O as Oe,k as Ne,P as Ce,n as We,t as Z,a as x,o as f,d as Pe,T as $e,C as Ee,p as Te,r as U,u as ge,M as Ae}from"./index-7275477a.js";import{S as De}from"./SdkTabs-3e2121ec.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&f(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,M=o[0].name+"",j,ee,H,R,L,W,z,O,q,te,B,$,se,G,F=o[0].name+"",J,le,Q,E,V,T,X,g,Y,N,A,w=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[3]}');

View File

@ -1,4 +1,4 @@
import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n,m as he,x as D,N as de,O as Te,k as ge,P as ye,n as Be,t as Z,a as x,o as m,d as $e,R as qe,C as Oe,p as Se,r as H,u as Ee,M as Me}from"./index-e5007277.js";import{S as Ne}from"./SdkTabs-e5fbf56f.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=r("button"),_=$(o),u=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(w,C){f(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&D(_,o),C&6&&H(s,"active",l[1]===l[5].code)},d(w){w&&m(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Me({props:{content:l[5].body}}),{key:i,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(a,p){f(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&m(s),$e(o)}}}function Ve(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,K=i[0].name+"",F,ee,I,P,L,B,z,T,A,te,R,q,le,G,U=i[0].name+"",J,se,Q,O,W,S,X,E,Y,g,M,h=[],oe=new Map,ie,N,k=[],ne=new Map,y;P=new Ne({props:{js:`
import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n,m as he,x as H,N as de,O as Te,k as ge,P as ye,n as Be,t as Z,a as x,o as m,d as $e,T as qe,C as Oe,p as Se,r as R,u as Ee,M as Me}from"./index-7275477a.js";import{S as Ne}from"./SdkTabs-3e2121ec.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=r("button"),_=$(o),u=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(w,C){f(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&H(_,o),C&6&&R(s,"active",l[1]===l[5].code)},d(w){w&&m(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Me({props:{content:l[5].body}}),{key:i,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(a,p){f(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&R(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&m(s),$e(o)}}}function Ve(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,K=i[0].name+"",F,ee,I,P,L,B,z,T,A,te,U,q,le,G,j=i[0].name+"",J,se,Q,O,W,S,X,E,Y,g,M,h=[],oe=new Map,ie,N,k=[],ne=new Map,y;P=new Ne({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${i[3]}');
@ -14,13 +14,13 @@ import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n
...
await pb.collection('${(fe=i[0])==null?void 0:fe.name}').confirmVerification('TOKEN');
`}});let j=i[2];const ae=e=>e[5].code;for(let e=0;e<j.length;e+=1){let t=be(i,j,e),c=ae(t);oe.set(c,h[e]=_e(c,t))}let V=i[2];const ce=e=>e[5].code;for(let e=0;e<V.length;e+=1){let t=ue(i,V,e),c=ce(t);ne.set(c,k[e]=ke(c,t))}return{c(){l=r("h3"),s=$("Confirm verification ("),_=$(o),u=$(")"),a=v(),p=r("div"),d=r("p"),w=$("Confirms "),C=r("strong"),F=$(K),ee=$(" account verification request."),I=v(),ve(P.$$.fragment),L=v(),B=r("h6"),B.textContent="API details",z=v(),T=r("div"),A=r("strong"),A.textContent="POST",te=v(),R=r("div"),q=r("p"),le=$("/api/collections/"),G=r("strong"),J=$(U),se=$("/confirm-verification"),Q=v(),O=r("div"),O.textContent="Body Parameters",W=v(),S=r("table"),S.innerHTML=`<thead><tr><th>Param</th>
`}});let D=i[2];const ae=e=>e[5].code;for(let e=0;e<D.length;e+=1){let t=be(i,D,e),c=ae(t);oe.set(c,h[e]=_e(c,t))}let V=i[2];const ce=e=>e[5].code;for(let e=0;e<V.length;e+=1){let t=ue(i,V,e),c=ce(t);ne.set(c,k[e]=ke(c,t))}return{c(){l=r("h3"),s=$("Confirm verification ("),_=$(o),u=$(")"),a=v(),p=r("div"),d=r("p"),w=$("Confirms "),C=r("strong"),F=$(K),ee=$(" account verification request."),I=v(),ve(P.$$.fragment),L=v(),B=r("h6"),B.textContent="API details",z=v(),T=r("div"),A=r("strong"),A.textContent="POST",te=v(),U=r("div"),q=r("p"),le=$("/api/collections/"),G=r("strong"),J=$(j),se=$("/confirm-verification"),Q=v(),O=r("div"),O.textContent="Body Parameters",W=v(),S=r("table"),S.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="50%">Description</th></tr></thead>
<tbody><tr><td><div class="inline-flex"><span class="label label-success">Required</span>
<span>token</span></div></td>
<td><span class="label">String</span></td>
<td>The token from the verification request email.</td></tr></tbody>`,X=v(),E=r("div"),E.textContent="Responses",Y=v(),g=r("div"),M=r("div");for(let e=0;e<h.length;e+=1)h[e].c();ie=v(),N=r("div");for(let e=0;e<k.length;e+=1)k[e].c();b(l,"class","m-b-sm"),b(p,"class","content txt-lg m-b-sm"),b(B,"class","m-b-xs"),b(A,"class","label label-primary"),b(R,"class","content"),b(T,"class","alert alert-success"),b(O,"class","section-title"),b(S,"class","table-compact table-border m-b-base"),b(E,"class","section-title"),b(M,"class","tabs-header compact left"),b(N,"class","tabs-content"),b(g,"class","tabs")},m(e,t){f(e,l,t),n(l,s),n(l,_),n(l,u),f(e,a,t),f(e,p,t),n(p,d),n(d,w),n(d,C),n(C,F),n(d,ee),f(e,I,t),he(P,e,t),f(e,L,t),f(e,B,t),f(e,z,t),f(e,T,t),n(T,A),n(T,te),n(T,R),n(R,q),n(q,le),n(q,G),n(G,J),n(q,se),f(e,Q,t),f(e,O,t),f(e,W,t),f(e,S,t),f(e,X,t),f(e,E,t),f(e,Y,t),f(e,g,t),n(g,M);for(let c=0;c<h.length;c+=1)h[c]&&h[c].m(M,null);n(g,ie),n(g,N);for(let c=0;c<k.length;c+=1)k[c]&&k[c].m(N,null);y=!0},p(e,[t]){var me,pe;(!y||t&1)&&o!==(o=e[0].name+"")&&D(_,o),(!y||t&1)&&K!==(K=e[0].name+"")&&D(F,K);const c={};t&9&&(c.js=`
<td>The token from the verification request email.</td></tr></tbody>`,X=v(),E=r("div"),E.textContent="Responses",Y=v(),g=r("div"),M=r("div");for(let e=0;e<h.length;e+=1)h[e].c();ie=v(),N=r("div");for(let e=0;e<k.length;e+=1)k[e].c();b(l,"class","m-b-sm"),b(p,"class","content txt-lg m-b-sm"),b(B,"class","m-b-xs"),b(A,"class","label label-primary"),b(U,"class","content"),b(T,"class","alert alert-success"),b(O,"class","section-title"),b(S,"class","table-compact table-border m-b-base"),b(E,"class","section-title"),b(M,"class","tabs-header compact left"),b(N,"class","tabs-content"),b(g,"class","tabs")},m(e,t){f(e,l,t),n(l,s),n(l,_),n(l,u),f(e,a,t),f(e,p,t),n(p,d),n(d,w),n(d,C),n(C,F),n(d,ee),f(e,I,t),he(P,e,t),f(e,L,t),f(e,B,t),f(e,z,t),f(e,T,t),n(T,A),n(T,te),n(T,U),n(U,q),n(q,le),n(q,G),n(G,J),n(q,se),f(e,Q,t),f(e,O,t),f(e,W,t),f(e,S,t),f(e,X,t),f(e,E,t),f(e,Y,t),f(e,g,t),n(g,M);for(let c=0;c<h.length;c+=1)h[c]&&h[c].m(M,null);n(g,ie),n(g,N);for(let c=0;c<k.length;c+=1)k[c]&&k[c].m(N,null);y=!0},p(e,[t]){var me,pe;(!y||t&1)&&o!==(o=e[0].name+"")&&H(_,o),(!y||t&1)&&K!==(K=e[0].name+"")&&H(F,K);const c={};t&9&&(c.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
@ -36,7 +36,7 @@ import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n
...
await pb.collection('${(pe=e[0])==null?void 0:pe.name}').confirmVerification('TOKEN');
`),P.$set(c),(!y||t&1)&&U!==(U=e[0].name+"")&&D(J,U),t&6&&(j=e[2],h=de(h,t,ae,1,e,j,oe,M,Te,_e,null,be)),t&6&&(V=e[2],ge(),k=de(k,t,ce,1,e,V,ne,N,ye,ke,null,ue),Be())},i(e){if(!y){Z(P.$$.fragment,e);for(let t=0;t<V.length;t+=1)Z(k[t]);y=!0}},o(e){x(P.$$.fragment,e);for(let t=0;t<k.length;t+=1)x(k[t]);y=!1},d(e){e&&m(l),e&&m(a),e&&m(p),e&&m(I),$e(P,e),e&&m(L),e&&m(B),e&&m(z),e&&m(T),e&&m(Q),e&&m(O),e&&m(W),e&&m(S),e&&m(X),e&&m(E),e&&m(Y),e&&m(g);for(let t=0;t<h.length;t+=1)h[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function Ke(i,l,s){let o,{collection:_=new qe}=l,u=204,a=[];const p=d=>s(1,u=d.code);return i.$$set=d=>{"collection"in d&&s(0,_=d.collection)},s(3,o=Oe.getApiExampleUrl(Se.baseUrl)),s(2,a=[{code:204,body:"null"},{code:400,body:`
`),P.$set(c),(!y||t&1)&&j!==(j=e[0].name+"")&&H(J,j),t&6&&(D=e[2],h=de(h,t,ae,1,e,D,oe,M,Te,_e,null,be)),t&6&&(V=e[2],ge(),k=de(k,t,ce,1,e,V,ne,N,ye,ke,null,ue),Be())},i(e){if(!y){Z(P.$$.fragment,e);for(let t=0;t<V.length;t+=1)Z(k[t]);y=!0}},o(e){x(P.$$.fragment,e);for(let t=0;t<k.length;t+=1)x(k[t]);y=!1},d(e){e&&m(l),e&&m(a),e&&m(p),e&&m(I),$e(P,e),e&&m(L),e&&m(B),e&&m(z),e&&m(T),e&&m(Q),e&&m(O),e&&m(W),e&&m(S),e&&m(X),e&&m(E),e&&m(Y),e&&m(g);for(let t=0;t<h.length;t+=1)h[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function Ke(i,l,s){let o,{collection:_=new qe}=l,u=204,a=[];const p=d=>s(1,u=d.code);return i.$$set=d=>{"collection"in d&&s(0,_=d.collection)},s(3,o=Oe.getApiExampleUrl(Se.baseUrl)),s(2,a=[{code:204,body:"null"},{code:400,body:`
{
"code": 400,
"message": "Failed to authenticate.",
@ -47,4 +47,4 @@ import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n
}
}
}
`}]),[_,u,a,o,p]}class Ue extends we{constructor(l){super(),Ce(this,l,Ke,Ve,Pe,{collection:0})}}export{Ue as default};
`}]),[_,u,a,o,p]}class je extends we{constructor(l){super(),Ce(this,l,Ke,Ve,Pe,{collection:0})}}export{je as default};

View File

@ -1,4 +1,4 @@
import{S as Ht,i as Lt,s as Pt,C as z,M as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,N as Le,O as ht,k as Rt,P as Bt,n as Ft,t as fe,a as pe,o as d,d as Be,R as gt,p as jt,r as ue,u as Dt,y as le}from"./index-e5007277.js";import{S as Nt}from"./SdkTabs-e5fbf56f.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,v,T,w,M,g,D,E,L,I,j,F,S,N,q,C,_;function O(u,$){var ee,Q;return(Q=(ee=u[0])==null?void 0:ee.options)!=null&&Q.requireEmail?Jt:Vt}let K=O(o),P=K(o);return{c(){e=a("tr"),e.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=m(),s=a("tr"),s.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
import{S as Ht,i as Lt,s as Pt,C as z,M as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Be,x,N as Le,O as ht,k as Bt,P as Ft,n as Rt,t as fe,a as pe,o as d,d as Fe,T as gt,p as jt,r as ue,u as Dt,y as le}from"./index-7275477a.js";import{S as Nt}from"./SdkTabs-3e2121ec.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,v,T,w,M,g,D,E,L,I,j,R,S,N,q,C,_;function O(u,$){var ee,Q;return(Q=(ee=u[0])==null?void 0:ee.options)!=null&&Q.requireEmail?Jt:Vt}let K=O(o),P=K(o);return{c(){e=a("tr"),e.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=m(),s=a("tr"),s.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
<span>username</span></div></td>
<td><span class="label">String</span></td>
<td>The username of the auth record.
@ -9,7 +9,7 @@ import{S as Ht,i as Lt,s as Pt,C as z,M as At,e as a,w as k,b as m,c as Pe,f as
<td>Whether to show/hide the auth record email when fetching the record data.</td>`,I=m(),j=a("tr"),j.innerHTML=`<td><div class="inline-flex"><span class="label label-success">Required</span>
<span>password</span></div></td>
<td><span class="label">String</span></td>
<td>Auth record password.</td>`,F=m(),S=a("tr"),S.innerHTML=`<td><div class="inline-flex"><span class="label label-success">Required</span>
<td>Auth record password.</td>`,R=m(),S=a("tr"),S.innerHTML=`<td><div class="inline-flex"><span class="label label-success">Required</span>
<span>passwordConfirm</span></div></td>
<td><span class="label">String</span></td>
<td>Auth record password confirmation.</td>`,N=m(),q=a("tr"),q.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
@ -17,8 +17,8 @@ import{S as Ht,i as Lt,s as Pt,C as z,M as At,e as a,w as k,b as m,c as Pe,f as
<td><span class="label">Boolean</span></td>
<td>Indicates whether the auth record is verified or not.
<br/>
This field can be set only by admins or auth records with &quot;Manage&quot; access.</td>`,C=m(),_=a("tr"),_.innerHTML='<td colspan="3" class="txt-hint">Schema fields</td>',h(f,"class","inline-flex")},m(u,$){r(u,e,$),r(u,l,$),r(u,s,$),r(u,b,$),r(u,p,$),n(p,c),n(c,f),P.m(f,null),n(f,v),n(f,T),n(p,w),n(p,M),n(p,g),n(p,D),r(u,E,$),r(u,L,$),r(u,I,$),r(u,j,$),r(u,F,$),r(u,S,$),r(u,N,$),r(u,q,$),r(u,C,$),r(u,_,$)},p(u,$){K!==(K=O(u))&&(P.d(1),P=K(u),P&&(P.c(),P.m(f,v)))},d(u){u&&d(e),u&&d(l),u&&d(s),u&&d(b),u&&d(p),P.d(),u&&d(E),u&&d(L),u&&d(I),u&&d(j),u&&d(F),u&&d(S),u&&d(N),u&&d(q),u&&d(C),u&&d(_)}}}function Vt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Jt(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Et(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function It(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Ut(o){var p;let e,l=((p=o[12].options)==null?void 0:p.maxSelect)===1?"id":"ids",s,b;return{c(){e=k("Relation record "),s=k(l),b=k(".")},m(c,f){r(c,e,f),r(c,s,f),r(c,b,f)},p(c,f){var v;f&1&&l!==(l=((v=c[12].options)==null?void 0:v.maxSelect)===1?"id":"ids")&&x(s,l)},d(c){c&&d(e),c&&d(s),c&&d(b)}}}function zt(o){let e,l,s,b,p;return{c(){e=k("File object."),l=a("br"),s=k(`
Set to `),b=a("code"),b.textContent="null",p=k(" to delete already uploaded file(s).")},m(c,f){r(c,e,f),r(c,l,f),r(c,s,f),r(c,b,f),r(c,p,f)},p:le,d(c){c&&d(e),c&&d(l),c&&d(s),c&&d(b),c&&d(p)}}}function Kt(o){let e;return{c(){e=k("URL address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Qt(o){let e;return{c(){e=k("Email address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Wt(o){let e;return{c(){e=k("JSON array or object.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Yt(o){let e;return{c(){e=k("Number value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Gt(o){let e;return{c(){e=k("Plain text value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function qt(o,e){let l,s,b,p,c,f=e[12].name+"",v,T,w,M,g=z.getFieldValueType(e[12])+"",D,E,L,I;function j(_,O){return _[12].required?It:Et}let F=j(e),S=F(e);function N(_,O){if(_[12].type==="text")return Gt;if(_[12].type==="number")return Yt;if(_[12].type==="json")return Wt;if(_[12].type==="email")return Qt;if(_[12].type==="url")return Kt;if(_[12].type==="file")return zt;if(_[12].type==="relation")return Ut}let q=N(e),C=q&&q(e);return{key:o,first:null,c(){l=a("tr"),s=a("td"),b=a("div"),S.c(),p=m(),c=a("span"),v=k(f),T=m(),w=a("td"),M=a("span"),D=k(g),E=m(),L=a("td"),C&&C.c(),I=m(),h(b,"class","inline-flex"),h(M,"class","label"),this.first=l},m(_,O){r(_,l,O),n(l,s),n(s,b),S.m(b,null),n(b,p),n(b,c),n(c,v),n(l,T),n(l,w),n(w,M),n(M,D),n(l,E),n(l,L),C&&C.m(L,null),n(l,I)},p(_,O){e=_,F!==(F=j(e))&&(S.d(1),S=F(e),S&&(S.c(),S.m(b,p))),O&1&&f!==(f=e[12].name+"")&&x(v,f),O&1&&g!==(g=z.getFieldValueType(e[12])+"")&&x(D,g),q===(q=N(e))&&C?C.p(e,O):(C&&C.d(1),C=q&&q(e),C&&(C.c(),C.m(L,null)))},d(_){_&&d(l),S.d(),C&&C.d()}}}function Mt(o,e){let l,s=e[7].code+"",b,p,c,f;function v(){return e[6](e[7])}return{key:o,first:null,c(){l=a("button"),b=k(s),p=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(T,w){r(T,l,w),n(l,b),n(l,p),c||(f=Dt(l,"click",v),c=!0)},p(T,w){e=T,w&4&&s!==(s=e[7].code+"")&&x(b,s),w&6&&ue(l,"active",e[1]===e[7].code)},d(T){T&&d(l),c=!1,f()}}}function Ot(o,e){let l,s,b,p;return s=new At({props:{content:e[7].body}}),{key:o,first:null,c(){l=a("div"),Pe(s.$$.fragment),b=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(c,f){r(c,l,f),Re(s,l,null),n(l,b),p=!0},p(c,f){e=c;const v={};f&4&&(v.content=e[7].body),s.$set(v),(!p||f&6)&&ue(l,"active",e[1]===e[7].code)},i(c){p||(fe(s.$$.fragment,c),p=!0)},o(c){pe(s.$$.fragment,c),p=!1},d(c){c&&d(l),Be(s)}}}function Xt(o){var st,it,at,ot,rt,dt,ct,ft;let e,l,s=o[0].name+"",b,p,c,f,v,T,w,M=o[0].name+"",g,D,E,L,I,j,F,S,N,q,C,_,O,K,P,u,$,ee,Q=o[0].name+"",me,Fe,ge,be,ne,_e,W,ke,je,U,ye,De,ve,V=[],Ne=new Map,he,se,we,Y,Ce,Ve,Se,G,$e,Je,Te,Ee,A,Ie,te,Ue,ze,Ke,qe,Qe,Me,We,Ye,Ge,Oe,Xe,Ae,ie,He,X,ae,J=[],Ze=new Map,xe,oe,R=[],et=new Map,Z;S=new Nt({props:{js:`
This field can be set only by admins or auth records with &quot;Manage&quot; access.</td>`,C=m(),_=a("tr"),_.innerHTML='<td colspan="3" class="txt-hint">Schema fields</td>',h(f,"class","inline-flex")},m(u,$){r(u,e,$),r(u,l,$),r(u,s,$),r(u,b,$),r(u,p,$),n(p,c),n(c,f),P.m(f,null),n(f,v),n(f,T),n(p,w),n(p,M),n(p,g),n(p,D),r(u,E,$),r(u,L,$),r(u,I,$),r(u,j,$),r(u,R,$),r(u,S,$),r(u,N,$),r(u,q,$),r(u,C,$),r(u,_,$)},p(u,$){K!==(K=O(u))&&(P.d(1),P=K(u),P&&(P.c(),P.m(f,v)))},d(u){u&&d(e),u&&d(l),u&&d(s),u&&d(b),u&&d(p),P.d(),u&&d(E),u&&d(L),u&&d(I),u&&d(j),u&&d(R),u&&d(S),u&&d(N),u&&d(q),u&&d(C),u&&d(_)}}}function Vt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Jt(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Et(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function It(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Ut(o){var p;let e,l=((p=o[12].options)==null?void 0:p.maxSelect)===1?"id":"ids",s,b;return{c(){e=k("Relation record "),s=k(l),b=k(".")},m(c,f){r(c,e,f),r(c,s,f),r(c,b,f)},p(c,f){var v;f&1&&l!==(l=((v=c[12].options)==null?void 0:v.maxSelect)===1?"id":"ids")&&x(s,l)},d(c){c&&d(e),c&&d(s),c&&d(b)}}}function zt(o){let e,l,s,b,p;return{c(){e=k("File object."),l=a("br"),s=k(`
Set to `),b=a("code"),b.textContent="null",p=k(" to delete already uploaded file(s).")},m(c,f){r(c,e,f),r(c,l,f),r(c,s,f),r(c,b,f),r(c,p,f)},p:le,d(c){c&&d(e),c&&d(l),c&&d(s),c&&d(b),c&&d(p)}}}function Kt(o){let e;return{c(){e=k("URL address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Qt(o){let e;return{c(){e=k("Email address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Wt(o){let e;return{c(){e=k("JSON array or object.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Yt(o){let e;return{c(){e=k("Number value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Gt(o){let e;return{c(){e=k("Plain text value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function qt(o,e){let l,s,b,p,c,f=e[12].name+"",v,T,w,M,g=z.getFieldValueType(e[12])+"",D,E,L,I;function j(_,O){return _[12].required?It:Et}let R=j(e),S=R(e);function N(_,O){if(_[12].type==="text")return Gt;if(_[12].type==="number")return Yt;if(_[12].type==="json")return Wt;if(_[12].type==="email")return Qt;if(_[12].type==="url")return Kt;if(_[12].type==="file")return zt;if(_[12].type==="relation")return Ut}let q=N(e),C=q&&q(e);return{key:o,first:null,c(){l=a("tr"),s=a("td"),b=a("div"),S.c(),p=m(),c=a("span"),v=k(f),T=m(),w=a("td"),M=a("span"),D=k(g),E=m(),L=a("td"),C&&C.c(),I=m(),h(b,"class","inline-flex"),h(M,"class","label"),this.first=l},m(_,O){r(_,l,O),n(l,s),n(s,b),S.m(b,null),n(b,p),n(b,c),n(c,v),n(l,T),n(l,w),n(w,M),n(M,D),n(l,E),n(l,L),C&&C.m(L,null),n(l,I)},p(_,O){e=_,R!==(R=j(e))&&(S.d(1),S=R(e),S&&(S.c(),S.m(b,p))),O&1&&f!==(f=e[12].name+"")&&x(v,f),O&1&&g!==(g=z.getFieldValueType(e[12])+"")&&x(D,g),q===(q=N(e))&&C?C.p(e,O):(C&&C.d(1),C=q&&q(e),C&&(C.c(),C.m(L,null)))},d(_){_&&d(l),S.d(),C&&C.d()}}}function Mt(o,e){let l,s=e[7].code+"",b,p,c,f;function v(){return e[6](e[7])}return{key:o,first:null,c(){l=a("button"),b=k(s),p=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(T,w){r(T,l,w),n(l,b),n(l,p),c||(f=Dt(l,"click",v),c=!0)},p(T,w){e=T,w&4&&s!==(s=e[7].code+"")&&x(b,s),w&6&&ue(l,"active",e[1]===e[7].code)},d(T){T&&d(l),c=!1,f()}}}function Ot(o,e){let l,s,b,p;return s=new At({props:{content:e[7].body}}),{key:o,first:null,c(){l=a("div"),Pe(s.$$.fragment),b=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(c,f){r(c,l,f),Be(s,l,null),n(l,b),p=!0},p(c,f){e=c;const v={};f&4&&(v.content=e[7].body),s.$set(v),(!p||f&6)&&ue(l,"active",e[1]===e[7].code)},i(c){p||(fe(s.$$.fragment,c),p=!0)},o(c){pe(s.$$.fragment,c),p=!1},d(c){c&&d(l),Fe(s)}}}function Xt(o){var st,it,at,ot,rt,dt,ct,ft;let e,l,s=o[0].name+"",b,p,c,f,v,T,w,M=o[0].name+"",g,D,E,L,I,j,R,S,N,q,C,_,O,K,P,u,$,ee,Q=o[0].name+"",me,Re,ge,be,ne,_e,W,ke,je,U,ye,De,ve,V=[],Ne=new Map,he,se,we,Y,Ce,Ve,Se,G,$e,Je,Te,Ee,A,Ie,te,Ue,ze,Ke,qe,Qe,Me,We,Ye,Ge,Oe,Xe,Ae,ie,He,X,ae,J=[],Ze=new Map,xe,oe,B=[],et=new Map,Z;S=new Nt({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[4]}');
@ -46,12 +46,12 @@ final record = await pb.collection('${(ot=o[0])==null?void 0:ot.name}').create(b
`+((rt=o[0])!=null&&rt.isAuth?`
// (optional) send an email verification request
await pb.collection('${(dt=o[0])==null?void 0:dt.name}').requestVerification('test@example.com');
`:"")}});let B=o[5]&&$t(),H=((ct=o[0])==null?void 0:ct.isAuth)&&Tt(o),de=(ft=o[0])==null?void 0:ft.schema;const tt=t=>t[12].name;for(let t=0;t<de.length;t+=1){let i=St(o,de,t),y=tt(i);Ne.set(y,V[t]=qt(y,i))}te=new At({props:{content:"?expand=relField1,relField2.subRelField"}});let ce=o[2];const lt=t=>t[7].code;for(let t=0;t<ce.length;t+=1){let i=Ct(o,ce,t),y=lt(i);Ze.set(y,J[t]=Mt(y,i))}let re=o[2];const nt=t=>t[7].code;for(let t=0;t<re.length;t+=1){let i=wt(o,re,t),y=nt(i);et.set(y,R[t]=Ot(y,i))}return{c(){e=a("h3"),l=k("Create ("),b=k(s),p=k(")"),c=m(),f=a("div"),v=a("p"),T=k("Create a new "),w=a("strong"),g=k(M),D=k(" record."),E=m(),L=a("p"),L.innerHTML=`Body parameters could be sent as <code>application/json</code> or
`:"")}});let F=o[5]&&$t(),H=((ct=o[0])==null?void 0:ct.isAuth)&&Tt(o),de=(ft=o[0])==null?void 0:ft.schema;const tt=t=>t[12].name;for(let t=0;t<de.length;t+=1){let i=St(o,de,t),y=tt(i);Ne.set(y,V[t]=qt(y,i))}te=new At({props:{content:"?expand=relField1,relField2.subRelField"}});let ce=o[2];const lt=t=>t[7].code;for(let t=0;t<ce.length;t+=1){let i=Ct(o,ce,t),y=lt(i);Ze.set(y,J[t]=Mt(y,i))}let re=o[2];const nt=t=>t[7].code;for(let t=0;t<re.length;t+=1){let i=wt(o,re,t),y=nt(i);et.set(y,B[t]=Ot(y,i))}return{c(){e=a("h3"),l=k("Create ("),b=k(s),p=k(")"),c=m(),f=a("div"),v=a("p"),T=k("Create a new "),w=a("strong"),g=k(M),D=k(" record."),E=m(),L=a("p"),L.innerHTML=`Body parameters could be sent as <code>application/json</code> or
<code>multipart/form-data</code>.`,I=m(),j=a("p"),j.innerHTML=`File upload is supported only via <code>multipart/form-data</code>.
<br/>
For more info and examples you could check the detailed
<a href="https://pocketbase.io/docs/files-handling/" target="_blank" rel="noopener noreferrer">Files upload and handling docs
</a>.`,F=m(),Pe(S.$$.fragment),N=m(),q=a("h6"),q.textContent="API details",C=m(),_=a("div"),O=a("strong"),O.textContent="POST",K=m(),P=a("div"),u=a("p"),$=k("/api/collections/"),ee=a("strong"),me=k(Q),Fe=k("/records"),ge=m(),B&&B.c(),be=m(),ne=a("div"),ne.textContent="Body Parameters",_e=m(),W=a("table"),ke=a("thead"),ke.innerHTML=`<tr><th>Param</th>
</a>.`,R=m(),Pe(S.$$.fragment),N=m(),q=a("h6"),q.textContent="API details",C=m(),_=a("div"),O=a("strong"),O.textContent="POST",K=m(),P=a("div"),u=a("p"),$=k("/api/collections/"),ee=a("strong"),me=k(Q),Re=k("/records"),ge=m(),F&&F.c(),be=m(),ne=a("div"),ne.textContent="Body Parameters",_e=m(),W=a("table"),ke=a("thead"),ke.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="50%">Description</th></tr>`,je=m(),U=a("tbody"),ye=a("tr"),ye.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
<span>id</span></div></td>
@ -66,7 +66,7 @@ await pb.collection('${(dt=o[0])==null?void 0:dt.name}').requestVerification('te
The expanded relations will be appended to the record under the
`),qe=a("code"),qe.textContent="expand",Qe=k(" property (eg. "),Me=a("code"),Me.textContent='"expand": {"relField1": {...}, ...}',We=k(`).
`),Ye=a("br"),Ge=k(`
Only the relations to which the request user has permissions to `),Oe=a("strong"),Oe.textContent="view",Xe=k(" will be expanded."),Ae=m(),ie=a("div"),ie.textContent="Responses",He=m(),X=a("div"),ae=a("div");for(let t=0;t<J.length;t+=1)J[t].c();xe=m(),oe=a("div");for(let t=0;t<R.length;t+=1)R[t].c();h(e,"class","m-b-sm"),h(f,"class","content txt-lg m-b-sm"),h(q,"class","m-b-xs"),h(O,"class","label label-primary"),h(P,"class","content"),h(_,"class","alert alert-success"),h(ne,"class","section-title"),h(W,"class","table-compact table-border m-b-base"),h(se,"class","section-title"),h(Y,"class","table-compact table-border m-b-base"),h(ie,"class","section-title"),h(ae,"class","tabs-header compact left"),h(oe,"class","tabs-content"),h(X,"class","tabs")},m(t,i){r(t,e,i),n(e,l),n(e,b),n(e,p),r(t,c,i),r(t,f,i),n(f,v),n(v,T),n(v,w),n(w,g),n(v,D),n(f,E),n(f,L),n(f,I),n(f,j),r(t,F,i),Re(S,t,i),r(t,N,i),r(t,q,i),r(t,C,i),r(t,_,i),n(_,O),n(_,K),n(_,P),n(P,u),n(u,$),n(u,ee),n(ee,me),n(u,Fe),n(_,ge),B&&B.m(_,null),r(t,be,i),r(t,ne,i),r(t,_e,i),r(t,W,i),n(W,ke),n(W,je),n(W,U),n(U,ye),n(U,De),H&&H.m(U,null),n(U,ve);for(let y=0;y<V.length;y+=1)V[y]&&V[y].m(U,null);r(t,he,i),r(t,se,i),r(t,we,i),r(t,Y,i),n(Y,Ce),n(Y,Ve),n(Y,Se),n(Se,G),n(G,$e),n(G,Je),n(G,Te),n(G,Ee),n(G,A),n(A,Ie),Re(te,A,null),n(A,Ue),n(A,ze),n(A,Ke),n(A,qe),n(A,Qe),n(A,Me),n(A,We),n(A,Ye),n(A,Ge),n(A,Oe),n(A,Xe),r(t,Ae,i),r(t,ie,i),r(t,He,i),r(t,X,i),n(X,ae);for(let y=0;y<J.length;y+=1)J[y]&&J[y].m(ae,null);n(X,xe),n(X,oe);for(let y=0;y<R.length;y+=1)R[y]&&R[y].m(oe,null);Z=!0},p(t,[i]){var pt,ut,mt,bt,_t,kt,yt,vt;(!Z||i&1)&&s!==(s=t[0].name+"")&&x(b,s),(!Z||i&1)&&M!==(M=t[0].name+"")&&x(g,M);const y={};i&25&&(y.js=`
Only the relations to which the request user has permissions to `),Oe=a("strong"),Oe.textContent="view",Xe=k(" will be expanded."),Ae=m(),ie=a("div"),ie.textContent="Responses",He=m(),X=a("div"),ae=a("div");for(let t=0;t<J.length;t+=1)J[t].c();xe=m(),oe=a("div");for(let t=0;t<B.length;t+=1)B[t].c();h(e,"class","m-b-sm"),h(f,"class","content txt-lg m-b-sm"),h(q,"class","m-b-xs"),h(O,"class","label label-primary"),h(P,"class","content"),h(_,"class","alert alert-success"),h(ne,"class","section-title"),h(W,"class","table-compact table-border m-b-base"),h(se,"class","section-title"),h(Y,"class","table-compact table-border m-b-base"),h(ie,"class","section-title"),h(ae,"class","tabs-header compact left"),h(oe,"class","tabs-content"),h(X,"class","tabs")},m(t,i){r(t,e,i),n(e,l),n(e,b),n(e,p),r(t,c,i),r(t,f,i),n(f,v),n(v,T),n(v,w),n(w,g),n(v,D),n(f,E),n(f,L),n(f,I),n(f,j),r(t,R,i),Be(S,t,i),r(t,N,i),r(t,q,i),r(t,C,i),r(t,_,i),n(_,O),n(_,K),n(_,P),n(P,u),n(u,$),n(u,ee),n(ee,me),n(u,Re),n(_,ge),F&&F.m(_,null),r(t,be,i),r(t,ne,i),r(t,_e,i),r(t,W,i),n(W,ke),n(W,je),n(W,U),n(U,ye),n(U,De),H&&H.m(U,null),n(U,ve);for(let y=0;y<V.length;y+=1)V[y]&&V[y].m(U,null);r(t,he,i),r(t,se,i),r(t,we,i),r(t,Y,i),n(Y,Ce),n(Y,Ve),n(Y,Se),n(Se,G),n(G,$e),n(G,Je),n(G,Te),n(G,Ee),n(G,A),n(A,Ie),Be(te,A,null),n(A,Ue),n(A,ze),n(A,Ke),n(A,qe),n(A,Qe),n(A,Me),n(A,We),n(A,Ye),n(A,Ge),n(A,Oe),n(A,Xe),r(t,Ae,i),r(t,ie,i),r(t,He,i),r(t,X,i),n(X,ae);for(let y=0;y<J.length;y+=1)J[y]&&J[y].m(ae,null);n(X,xe),n(X,oe);for(let y=0;y<B.length;y+=1)B[y]&&B[y].m(oe,null);Z=!0},p(t,[i]){var pt,ut,mt,bt,_t,kt,yt,vt;(!Z||i&1)&&s!==(s=t[0].name+"")&&x(b,s),(!Z||i&1)&&M!==(M=t[0].name+"")&&x(g,M);const y={};i&25&&(y.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${t[4]}');
@ -94,7 +94,7 @@ final record = await pb.collection('${(bt=t[0])==null?void 0:bt.name}').create(b
`+((_t=t[0])!=null&&_t.isAuth?`
// (optional) send an email verification request
await pb.collection('${(kt=t[0])==null?void 0:kt.name}').requestVerification('test@example.com');
`:"")),S.$set(y),(!Z||i&1)&&Q!==(Q=t[0].name+"")&&x(me,Q),t[5]?B||(B=$t(),B.c(),B.m(_,null)):B&&(B.d(1),B=null),(yt=t[0])!=null&&yt.isAuth?H?H.p(t,i):(H=Tt(t),H.c(),H.m(U,ve)):H&&(H.d(1),H=null),i&1&&(de=(vt=t[0])==null?void 0:vt.schema,V=Le(V,i,tt,1,t,de,Ne,U,ht,qt,null,St)),i&6&&(ce=t[2],J=Le(J,i,lt,1,t,ce,Ze,ae,ht,Mt,null,Ct)),i&6&&(re=t[2],Rt(),R=Le(R,i,nt,1,t,re,et,oe,Bt,Ot,null,wt),Ft())},i(t){if(!Z){fe(S.$$.fragment,t),fe(te.$$.fragment,t);for(let i=0;i<re.length;i+=1)fe(R[i]);Z=!0}},o(t){pe(S.$$.fragment,t),pe(te.$$.fragment,t);for(let i=0;i<R.length;i+=1)pe(R[i]);Z=!1},d(t){t&&d(e),t&&d(c),t&&d(f),t&&d(F),Be(S,t),t&&d(N),t&&d(q),t&&d(C),t&&d(_),B&&B.d(),t&&d(be),t&&d(ne),t&&d(_e),t&&d(W),H&&H.d();for(let i=0;i<V.length;i+=1)V[i].d();t&&d(he),t&&d(se),t&&d(we),t&&d(Y),Be(te),t&&d(Ae),t&&d(ie),t&&d(He),t&&d(X);for(let i=0;i<J.length;i+=1)J[i].d();for(let i=0;i<R.length;i+=1)R[i].d()}}}function Zt(o,e,l){let s,b,{collection:p=new gt}=e,c=200,f=[],v={};const T=w=>l(1,c=w.code);return o.$$set=w=>{"collection"in w&&l(0,p=w.collection)},o.$$.update=()=>{var w,M;o.$$.dirty&1&&l(5,s=(p==null?void 0:p.createRule)===null),o.$$.dirty&1&&l(2,f=[{code:200,body:JSON.stringify(z.dummyCollectionRecord(p),null,2)},{code:400,body:`
`:"")),S.$set(y),(!Z||i&1)&&Q!==(Q=t[0].name+"")&&x(me,Q),t[5]?F||(F=$t(),F.c(),F.m(_,null)):F&&(F.d(1),F=null),(yt=t[0])!=null&&yt.isAuth?H?H.p(t,i):(H=Tt(t),H.c(),H.m(U,ve)):H&&(H.d(1),H=null),i&1&&(de=(vt=t[0])==null?void 0:vt.schema,V=Le(V,i,tt,1,t,de,Ne,U,ht,qt,null,St)),i&6&&(ce=t[2],J=Le(J,i,lt,1,t,ce,Ze,ae,ht,Mt,null,Ct)),i&6&&(re=t[2],Bt(),B=Le(B,i,nt,1,t,re,et,oe,Ft,Ot,null,wt),Rt())},i(t){if(!Z){fe(S.$$.fragment,t),fe(te.$$.fragment,t);for(let i=0;i<re.length;i+=1)fe(B[i]);Z=!0}},o(t){pe(S.$$.fragment,t),pe(te.$$.fragment,t);for(let i=0;i<B.length;i+=1)pe(B[i]);Z=!1},d(t){t&&d(e),t&&d(c),t&&d(f),t&&d(R),Fe(S,t),t&&d(N),t&&d(q),t&&d(C),t&&d(_),F&&F.d(),t&&d(be),t&&d(ne),t&&d(_e),t&&d(W),H&&H.d();for(let i=0;i<V.length;i+=1)V[i].d();t&&d(he),t&&d(se),t&&d(we),t&&d(Y),Fe(te),t&&d(Ae),t&&d(ie),t&&d(He),t&&d(X);for(let i=0;i<J.length;i+=1)J[i].d();for(let i=0;i<B.length;i+=1)B[i].d()}}}function Zt(o,e,l){let s,b,{collection:p=new gt}=e,c=200,f=[],v={};const T=w=>l(1,c=w.code);return o.$$set=w=>{"collection"in w&&l(0,p=w.collection)},o.$$.update=()=>{var w,M;o.$$.dirty&1&&l(5,s=(p==null?void 0:p.createRule)===null),o.$$.dirty&1&&l(2,f=[{code:200,body:JSON.stringify(z.dummyCollectionRecord(p),null,2)},{code:400,body:`
{
"code": 400,
"message": "Failed to create record.",

View File

@ -1,4 +1,4 @@
import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n,m as we,x,N as _e,O as Ee,k as Oe,P as Te,n as Be,t as ee,a as te,o as u,d as ge,R as Ie,C as Me,p as Ae,r as N,u as Se,M as qe}from"./index-e5007277.js";import{S as He}from"./SdkTabs-e5fbf56f.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){f(s,l,a)},d(s){s&&u(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,p;function w(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){f(b,s,g),n(s,v),n(s,i),r||(p=Se(s,"click",w),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&u(s),r=!1,p()}}}function De(o,l){let s,a,v,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,p){f(r,s,p),we(a,s,null),n(s,v),i=!0},p(r,p){l=r,(!i||p&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&u(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",v,i,r,p,w,b,g,q=o[0].name+"",z,le,F,C,K,O,G,y,H,se,L,E,oe,J,U=o[0].name+"",Q,ae,V,ne,W,T,X,B,Y,I,Z,R,M,D=[],ie=new Map,re,A,_=[],ce=new Map,P;C=new He({props:{js:`
import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n,m as we,x,N as _e,O as Ee,k as Te,P as Oe,n as Be,t as ee,a as te,o as u,d as ge,T as Ie,C as Me,p as Ae,r as N,u as Se,M as qe}from"./index-7275477a.js";import{S as He}from"./SdkTabs-3e2121ec.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){f(s,l,a)},d(s){s&&u(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,p;function w(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){f(b,s,g),n(s,v),n(s,i),r||(p=Se(s,"click",w),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&u(s),r=!1,p()}}}function De(o,l){let s,a,v,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,p){f(r,s,p),we(a,s,null),n(s,v),i=!0},p(r,p){l=r,(!i||p&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&u(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",v,i,r,p,w,b,g,q=o[0].name+"",z,le,F,C,K,T,G,y,H,se,L,E,oe,J,U=o[0].name+"",Q,ae,V,ne,W,O,X,B,Y,I,Z,R,M,D=[],ie=new Map,re,A,_=[],ce=new Map,P;C=new He({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[3]}');
@ -14,12 +14,12 @@ import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n
...
await pb.collection('${(pe=o[0])==null?void 0:pe.name}').delete('RECORD_ID');
`}});let k=o[1]&&ve(),j=o[4];const de=e=>e[6].code;for(let e=0;e<j.length;e+=1){let t=he(o,j,e),d=de(t);ie.set(d,D[e]=ye(d,t))}let S=o[4];const fe=e=>e[6].code;for(let e=0;e<S.length;e+=1){let t=ke(o,S,e),d=fe(t);ce.set(d,_[e]=De(d,t))}return{c(){l=c("h3"),s=$("Delete ("),v=$(a),i=$(")"),r=h(),p=c("div"),w=c("p"),b=$("Delete a single "),g=c("strong"),z=$(q),le=$(" record."),F=h(),$e(C.$$.fragment),K=h(),O=c("h6"),O.textContent="API details",G=h(),y=c("div"),H=c("strong"),H.textContent="DELETE",se=h(),L=c("div"),E=c("p"),oe=$("/api/collections/"),J=c("strong"),Q=$(U),ae=$("/records/"),V=c("strong"),V.textContent=":id",ne=h(),k&&k.c(),W=h(),T=c("div"),T.textContent="Path parameters",X=h(),B=c("table"),B.innerHTML=`<thead><tr><th>Param</th>
`}});let k=o[1]&&ve(),j=o[4];const de=e=>e[6].code;for(let e=0;e<j.length;e+=1){let t=he(o,j,e),d=de(t);ie.set(d,D[e]=ye(d,t))}let S=o[4];const fe=e=>e[6].code;for(let e=0;e<S.length;e+=1){let t=ke(o,S,e),d=fe(t);ce.set(d,_[e]=De(d,t))}return{c(){l=c("h3"),s=$("Delete ("),v=$(a),i=$(")"),r=h(),p=c("div"),w=c("p"),b=$("Delete a single "),g=c("strong"),z=$(q),le=$(" record."),F=h(),$e(C.$$.fragment),K=h(),T=c("h6"),T.textContent="API details",G=h(),y=c("div"),H=c("strong"),H.textContent="DELETE",se=h(),L=c("div"),E=c("p"),oe=$("/api/collections/"),J=c("strong"),Q=$(U),ae=$("/records/"),V=c("strong"),V.textContent=":id",ne=h(),k&&k.c(),W=h(),O=c("div"),O.textContent="Path parameters",X=h(),B=c("table"),B.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr></thead>
<tbody><tr><td>id</td>
<td><span class="label">String</span></td>
<td>ID of the record to delete.</td></tr></tbody>`,Y=h(),I=c("div"),I.textContent="Responses",Z=h(),R=c("div"),M=c("div");for(let e=0;e<D.length;e+=1)D[e].c();re=h(),A=c("div");for(let e=0;e<_.length;e+=1)_[e].c();m(l,"class","m-b-sm"),m(p,"class","content txt-lg m-b-sm"),m(O,"class","m-b-xs"),m(H,"class","label label-primary"),m(L,"class","content"),m(y,"class","alert alert-danger"),m(T,"class","section-title"),m(B,"class","table-compact table-border m-b-base"),m(I,"class","section-title"),m(M,"class","tabs-header compact left"),m(A,"class","tabs-content"),m(R,"class","tabs")},m(e,t){f(e,l,t),n(l,s),n(l,v),n(l,i),f(e,r,t),f(e,p,t),n(p,w),n(w,b),n(w,g),n(g,z),n(w,le),f(e,F,t),we(C,e,t),f(e,K,t),f(e,O,t),f(e,G,t),f(e,y,t),n(y,H),n(y,se),n(y,L),n(L,E),n(E,oe),n(E,J),n(J,Q),n(E,ae),n(E,V),n(y,ne),k&&k.m(y,null),f(e,W,t),f(e,T,t),f(e,X,t),f(e,B,t),f(e,Y,t),f(e,I,t),f(e,Z,t),f(e,R,t),n(R,M);for(let d=0;d<D.length;d+=1)D[d]&&D[d].m(M,null);n(R,re),n(R,A);for(let d=0;d<_.length;d+=1)_[d]&&_[d].m(A,null);P=!0},p(e,[t]){var me,be;(!P||t&1)&&a!==(a=e[0].name+"")&&x(v,a),(!P||t&1)&&q!==(q=e[0].name+"")&&x(z,q);const d={};t&9&&(d.js=`
<td>ID of the record to delete.</td></tr></tbody>`,Y=h(),I=c("div"),I.textContent="Responses",Z=h(),R=c("div"),M=c("div");for(let e=0;e<D.length;e+=1)D[e].c();re=h(),A=c("div");for(let e=0;e<_.length;e+=1)_[e].c();m(l,"class","m-b-sm"),m(p,"class","content txt-lg m-b-sm"),m(T,"class","m-b-xs"),m(H,"class","label label-primary"),m(L,"class","content"),m(y,"class","alert alert-danger"),m(O,"class","section-title"),m(B,"class","table-compact table-border m-b-base"),m(I,"class","section-title"),m(M,"class","tabs-header compact left"),m(A,"class","tabs-content"),m(R,"class","tabs")},m(e,t){f(e,l,t),n(l,s),n(l,v),n(l,i),f(e,r,t),f(e,p,t),n(p,w),n(w,b),n(w,g),n(g,z),n(w,le),f(e,F,t),we(C,e,t),f(e,K,t),f(e,T,t),f(e,G,t),f(e,y,t),n(y,H),n(y,se),n(y,L),n(L,E),n(E,oe),n(E,J),n(J,Q),n(E,ae),n(E,V),n(y,ne),k&&k.m(y,null),f(e,W,t),f(e,O,t),f(e,X,t),f(e,B,t),f(e,Y,t),f(e,I,t),f(e,Z,t),f(e,R,t),n(R,M);for(let d=0;d<D.length;d+=1)D[d]&&D[d].m(M,null);n(R,re),n(R,A);for(let d=0;d<_.length;d+=1)_[d]&&_[d].m(A,null);P=!0},p(e,[t]){var me,be;(!P||t&1)&&a!==(a=e[0].name+"")&&x(v,a),(!P||t&1)&&q!==(q=e[0].name+"")&&x(z,q);const d={};t&9&&(d.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
@ -35,7 +35,7 @@ import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n
...
await pb.collection('${(be=e[0])==null?void 0:be.name}').delete('RECORD_ID');
`),C.$set(d),(!P||t&1)&&U!==(U=e[0].name+"")&&x(Q,U),e[1]?k||(k=ve(),k.c(),k.m(y,null)):k&&(k.d(1),k=null),t&20&&(j=e[4],D=_e(D,t,de,1,e,j,ie,M,Ee,ye,null,he)),t&20&&(S=e[4],Oe(),_=_e(_,t,fe,1,e,S,ce,A,Te,De,null,ke),Be())},i(e){if(!P){ee(C.$$.fragment,e);for(let t=0;t<S.length;t+=1)ee(_[t]);P=!0}},o(e){te(C.$$.fragment,e);for(let t=0;t<_.length;t+=1)te(_[t]);P=!1},d(e){e&&u(l),e&&u(r),e&&u(p),e&&u(F),ge(C,e),e&&u(K),e&&u(O),e&&u(G),e&&u(y),k&&k.d(),e&&u(W),e&&u(T),e&&u(X),e&&u(B),e&&u(Y),e&&u(I),e&&u(Z),e&&u(R);for(let t=0;t<D.length;t+=1)D[t].d();for(let t=0;t<_.length;t+=1)_[t].d()}}}function Ue(o,l,s){let a,v,{collection:i=new Ie}=l,r=204,p=[];const w=b=>s(2,r=b.code);return o.$$set=b=>{"collection"in b&&s(0,i=b.collection)},o.$$.update=()=>{o.$$.dirty&1&&s(1,a=(i==null?void 0:i.deleteRule)===null),o.$$.dirty&3&&i!=null&&i.id&&(p.push({code:204,body:`
`),C.$set(d),(!P||t&1)&&U!==(U=e[0].name+"")&&x(Q,U),e[1]?k||(k=ve(),k.c(),k.m(y,null)):k&&(k.d(1),k=null),t&20&&(j=e[4],D=_e(D,t,de,1,e,j,ie,M,Ee,ye,null,he)),t&20&&(S=e[4],Te(),_=_e(_,t,fe,1,e,S,ce,A,Oe,De,null,ke),Be())},i(e){if(!P){ee(C.$$.fragment,e);for(let t=0;t<S.length;t+=1)ee(_[t]);P=!0}},o(e){te(C.$$.fragment,e);for(let t=0;t<_.length;t+=1)te(_[t]);P=!1},d(e){e&&u(l),e&&u(r),e&&u(p),e&&u(F),ge(C,e),e&&u(K),e&&u(T),e&&u(G),e&&u(y),k&&k.d(),e&&u(W),e&&u(O),e&&u(X),e&&u(B),e&&u(Y),e&&u(I),e&&u(Z),e&&u(R);for(let t=0;t<D.length;t+=1)D[t].d();for(let t=0;t<_.length;t+=1)_[t].d()}}}function Ue(o,l,s){let a,v,{collection:i=new Ie}=l,r=204,p=[];const w=b=>s(2,r=b.code);return o.$$set=b=>{"collection"in b&&s(0,i=b.collection)},o.$$.update=()=>{o.$$.dirty&1&&s(1,a=(i==null?void 0:i.deleteRule)===null),o.$$.dirty&3&&i!=null&&i.id&&(p.push({code:204,body:`
null
`}),p.push({code:400,body:`
{

View File

@ -1,14 +1,14 @@
import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o as m,w,h as t,M as $e,c as Zt,m as te,x as Ce,N as He,O as Ze,k as tl,P as el,n as ll,t as Gt,a as Ut,d as ee,Q as sl,R as nl,C as ge,p as ol,r as ke}from"./index-e5007277.js";import{S as il}from"./SdkTabs-e5fbf56f.js";function al(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function rl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function Ie(c){let n,o,a,p,b,d,h,C,x,_,f,et,kt,jt,S,Qt,D,ct,R,lt,le,U,j,se,dt,vt,st,yt,ne,ft,pt,nt,E,zt,Ft,T,ot,Lt,Jt,At,Q,it,Tt,Kt,Pt,L,ut,Rt,oe,mt,ie,H,Ot,at,St,O,bt,ae,z,Et,Vt,Nt,re,N,Wt,J,ht,ce,I,de,B,fe,P,qt,K,_t,pe,xt,ue,$,Mt,rt,Dt,me,Ht,Xt,V,wt,be,It,he,Ct,_e,G,W,Yt,q,gt,A,xe,X,Y,y,Bt,Z,v,tt,k;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format
import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o as m,w,h as t,M as $e,c as Zt,m as te,x as Ce,N as He,O as Ze,k as tl,P as el,n as ll,t as Gt,a as Ut,d as ee,Q as sl,T as nl,C as ge,p as ol,r as ke}from"./index-7275477a.js";import{S as il}from"./SdkTabs-3e2121ec.js";function al(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function rl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function Ie(c){let n,o,a,p,b,d,h,C,x,_,f,et,kt,jt,S,Qt,D,ct,O,lt,le,U,j,se,dt,vt,st,yt,ne,ft,pt,nt,E,zt,Ft,T,ot,Lt,Jt,At,Q,it,Tt,Kt,Pt,L,ut,Ot,oe,mt,ie,H,Rt,at,St,R,bt,ae,z,Et,Vt,Nt,re,N,Wt,J,ht,ce,I,de,B,fe,P,qt,K,_t,pe,xt,ue,$,Mt,rt,Dt,me,Ht,Xt,V,wt,be,It,he,Ct,_e,G,W,Yt,q,gt,A,xe,X,Y,y,Bt,Z,v,tt,k;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format
<code><span class="txt-success">OPERAND</span>
<span class="txt-danger">OPERATOR</span>
<span class="txt-success">OPERAND</span></code>, where:`,o=s(),a=e("ul"),p=e("li"),p.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single
or double quoted), number, null, true, false`,b=s(),d=e("li"),h=e("code"),h.textContent="OPERATOR",C=w(` - is one of:
`),x=e("br"),_=s(),f=e("ul"),et=e("li"),kt=e("code"),kt.textContent="=",jt=s(),S=e("span"),S.textContent="Equal",Qt=s(),D=e("li"),ct=e("code"),ct.textContent="!=",R=s(),lt=e("span"),lt.textContent="NOT equal",le=s(),U=e("li"),j=e("code"),j.textContent=">",se=s(),dt=e("span"),dt.textContent="Greater than",vt=s(),st=e("li"),yt=e("code"),yt.textContent=">=",ne=s(),ft=e("span"),ft.textContent="Greater than or equal",pt=s(),nt=e("li"),E=e("code"),E.textContent="<",zt=s(),Ft=e("span"),Ft.textContent="Less than",T=s(),ot=e("li"),Lt=e("code"),Lt.textContent="<=",Jt=s(),At=e("span"),At.textContent="Less than or equal",Q=s(),it=e("li"),Tt=e("code"),Tt.textContent="~",Kt=s(),Pt=e("span"),Pt.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,L=s(),ut=e("li"),Rt=e("code"),Rt.textContent="!~",oe=s(),mt=e("span"),mt.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,ie=s(),H=e("li"),Ot=e("code"),Ot.textContent="?=",at=s(),St=e("em"),St.textContent="Any/At least one of",O=s(),bt=e("span"),bt.textContent="Equal",ae=s(),z=e("li"),Et=e("code"),Et.textContent="?!=",Vt=s(),Nt=e("em"),Nt.textContent="Any/At least one of",re=s(),N=e("span"),N.textContent="NOT equal",Wt=s(),J=e("li"),ht=e("code"),ht.textContent="?>",ce=s(),I=e("em"),I.textContent="Any/At least one of",de=s(),B=e("span"),B.textContent="Greater than",fe=s(),P=e("li"),qt=e("code"),qt.textContent="?>=",K=s(),_t=e("em"),_t.textContent="Any/At least one of",pe=s(),xt=e("span"),xt.textContent="Greater than or equal",ue=s(),$=e("li"),Mt=e("code"),Mt.textContent="?<",rt=s(),Dt=e("em"),Dt.textContent="Any/At least one of",me=s(),Ht=e("span"),Ht.textContent="Less than",Xt=s(),V=e("li"),wt=e("code"),wt.textContent="?<=",be=s(),It=e("em"),It.textContent="Any/At least one of",he=s(),Ct=e("span"),Ct.textContent="Less than or equal",_e=s(),G=e("li"),W=e("code"),W.textContent="?~",Yt=s(),q=e("em"),q.textContent="Any/At least one of",gt=s(),A=e("span"),A.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
`),x=e("br"),_=s(),f=e("ul"),et=e("li"),kt=e("code"),kt.textContent="=",jt=s(),S=e("span"),S.textContent="Equal",Qt=s(),D=e("li"),ct=e("code"),ct.textContent="!=",O=s(),lt=e("span"),lt.textContent="NOT equal",le=s(),U=e("li"),j=e("code"),j.textContent=">",se=s(),dt=e("span"),dt.textContent="Greater than",vt=s(),st=e("li"),yt=e("code"),yt.textContent=">=",ne=s(),ft=e("span"),ft.textContent="Greater than or equal",pt=s(),nt=e("li"),E=e("code"),E.textContent="<",zt=s(),Ft=e("span"),Ft.textContent="Less than",T=s(),ot=e("li"),Lt=e("code"),Lt.textContent="<=",Jt=s(),At=e("span"),At.textContent="Less than or equal",Q=s(),it=e("li"),Tt=e("code"),Tt.textContent="~",Kt=s(),Pt=e("span"),Pt.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,L=s(),ut=e("li"),Ot=e("code"),Ot.textContent="!~",oe=s(),mt=e("span"),mt.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,ie=s(),H=e("li"),Rt=e("code"),Rt.textContent="?=",at=s(),St=e("em"),St.textContent="Any/At least one of",R=s(),bt=e("span"),bt.textContent="Equal",ae=s(),z=e("li"),Et=e("code"),Et.textContent="?!=",Vt=s(),Nt=e("em"),Nt.textContent="Any/At least one of",re=s(),N=e("span"),N.textContent="NOT equal",Wt=s(),J=e("li"),ht=e("code"),ht.textContent="?>",ce=s(),I=e("em"),I.textContent="Any/At least one of",de=s(),B=e("span"),B.textContent="Greater than",fe=s(),P=e("li"),qt=e("code"),qt.textContent="?>=",K=s(),_t=e("em"),_t.textContent="Any/At least one of",pe=s(),xt=e("span"),xt.textContent="Greater than or equal",ue=s(),$=e("li"),Mt=e("code"),Mt.textContent="?<",rt=s(),Dt=e("em"),Dt.textContent="Any/At least one of",me=s(),Ht=e("span"),Ht.textContent="Less than",Xt=s(),V=e("li"),wt=e("code"),wt.textContent="?<=",be=s(),It=e("em"),It.textContent="Any/At least one of",he=s(),Ct=e("span"),Ct.textContent="Less than or equal",_e=s(),G=e("li"),W=e("code"),W.textContent="?~",Yt=s(),q=e("em"),q.textContent="Any/At least one of",gt=s(),A=e("span"),A.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,xe=s(),X=e("li"),Y=e("code"),Y.textContent="?!~",y=s(),Bt=e("em"),Bt.textContent="Any/At least one of",Z=s(),v=e("span"),v.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,tt=s(),k=e("p"),k.innerHTML=`To group and combine several expressions you could use brackets
<code>(...)</code>, <code>&amp;&amp;</code> (AND) and <code>||</code> (OR) tokens.`,i(h,"class","txt-danger"),i(kt,"class","filter-op svelte-1w7s5nw"),i(S,"class","txt"),i(ct,"class","filter-op svelte-1w7s5nw"),i(lt,"class","txt"),i(j,"class","filter-op svelte-1w7s5nw"),i(dt,"class","txt"),i(yt,"class","filter-op svelte-1w7s5nw"),i(ft,"class","txt"),i(E,"class","filter-op svelte-1w7s5nw"),i(Ft,"class","txt"),i(Lt,"class","filter-op svelte-1w7s5nw"),i(At,"class","txt"),i(Tt,"class","filter-op svelte-1w7s5nw"),i(Pt,"class","txt"),i(Rt,"class","filter-op svelte-1w7s5nw"),i(mt,"class","txt"),i(Ot,"class","filter-op svelte-1w7s5nw"),i(St,"class","txt-hint"),i(bt,"class","txt"),i(Et,"class","filter-op svelte-1w7s5nw"),i(Nt,"class","txt-hint"),i(N,"class","txt"),i(ht,"class","filter-op svelte-1w7s5nw"),i(I,"class","txt-hint"),i(B,"class","txt"),i(qt,"class","filter-op svelte-1w7s5nw"),i(_t,"class","txt-hint"),i(xt,"class","txt"),i(Mt,"class","filter-op svelte-1w7s5nw"),i(Dt,"class","txt-hint"),i(Ht,"class","txt"),i(wt,"class","filter-op svelte-1w7s5nw"),i(It,"class","txt-hint"),i(Ct,"class","txt"),i(W,"class","filter-op svelte-1w7s5nw"),i(q,"class","txt-hint"),i(A,"class","txt"),i(Y,"class","filter-op svelte-1w7s5nw"),i(Bt,"class","txt-hint"),i(v,"class","txt")},m(F,$t){u(F,n,$t),u(F,o,$t),u(F,a,$t),t(a,p),t(a,b),t(a,d),t(d,h),t(d,C),t(d,x),t(d,_),t(d,f),t(f,et),t(et,kt),t(et,jt),t(et,S),t(f,Qt),t(f,D),t(D,ct),t(D,R),t(D,lt),t(f,le),t(f,U),t(U,j),t(U,se),t(U,dt),t(f,vt),t(f,st),t(st,yt),t(st,ne),t(st,ft),t(f,pt),t(f,nt),t(nt,E),t(nt,zt),t(nt,Ft),t(f,T),t(f,ot),t(ot,Lt),t(ot,Jt),t(ot,At),t(f,Q),t(f,it),t(it,Tt),t(it,Kt),t(it,Pt),t(f,L),t(f,ut),t(ut,Rt),t(ut,oe),t(ut,mt),t(f,ie),t(f,H),t(H,Ot),t(H,at),t(H,St),t(H,O),t(H,bt),t(f,ae),t(f,z),t(z,Et),t(z,Vt),t(z,Nt),t(z,re),t(z,N),t(f,Wt),t(f,J),t(J,ht),t(J,ce),t(J,I),t(J,de),t(J,B),t(f,fe),t(f,P),t(P,qt),t(P,K),t(P,_t),t(P,pe),t(P,xt),t(f,ue),t(f,$),t($,Mt),t($,rt),t($,Dt),t($,me),t($,Ht),t(f,Xt),t(f,V),t(V,wt),t(V,be),t(V,It),t(V,he),t(V,Ct),t(f,_e),t(f,G),t(G,W),t(G,Yt),t(G,q),t(G,gt),t(G,A),t(f,xe),t(f,X),t(X,Y),t(X,y),t(X,Bt),t(X,Z),t(X,v),u(F,tt,$t),u(F,k,$t)},d(F){F&&m(n),F&&m(o),F&&m(a),F&&m(tt),F&&m(k)}}}function cl(c){let n,o,a,p,b;function d(_,f){return _[0]?rl:al}let h=d(c),C=h(c),x=c[0]&&Ie();return{c(){n=e("button"),C.c(),o=s(),x&&x.c(),a=Ye(),i(n,"class","btn btn-sm btn-secondary m-t-10")},m(_,f){u(_,n,f),C.m(n,null),u(_,o,f),x&&x.m(_,f),u(_,a,f),p||(b=Xe(n,"click",c[1]),p=!0)},p(_,[f]){h!==(h=d(_))&&(C.d(1),C=h(_),C&&(C.c(),C.m(n,null))),_[0]?x||(x=Ie(),x.c(),x.m(a.parentNode,a)):x&&(x.d(1),x=null)},i:De,o:De,d(_){_&&m(n),C.d(),_&&m(o),x&&x.d(_),_&&m(a),p=!1,b()}}}function dl(c,n,o){let a=!1;function p(){o(0,a=!a)}return[a,p]}class fl extends Ke{constructor(n){super(),Ve(this,n,dl,cl,We,{})}}function Be(c,n,o){const a=c.slice();return a[7]=n[o],a}function Ge(c,n,o){const a=c.slice();return a[7]=n[o],a}function Ue(c,n,o){const a=c.slice();return a[12]=n[o],a[14]=o,a}function je(c){let n;return{c(){n=e("p"),n.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",i(n,"class","txt-hint txt-sm txt-right")},m(o,a){u(o,n,a)},d(o){o&&m(n)}}}function Qe(c){let n,o=c[12]+"",a,p=c[14]<c[4].length-1?", ":"",b;return{c(){n=e("code"),a=w(o),b=w(p)},m(d,h){u(d,n,h),t(n,a),u(d,b,h)},p(d,h){h&16&&o!==(o=d[12]+"")&&Ce(a,o),h&16&&p!==(p=d[14]<d[4].length-1?", ":"")&&Ce(b,p)},d(d){d&&m(n),d&&m(b)}}}function ze(c,n){let o,a=n[7].code+"",p,b,d,h;function C(){return n[6](n[7])}return{key:c,first:null,c(){o=e("div"),p=w(a),b=s(),i(o,"class","tab-item"),ke(o,"active",n[2]===n[7].code),this.first=o},m(x,_){u(x,o,_),t(o,p),t(o,b),d||(h=Xe(o,"click",C),d=!0)},p(x,_){n=x,_&36&&ke(o,"active",n[2]===n[7].code)},d(x){x&&m(o),d=!1,h()}}}function Je(c,n){let o,a,p,b;return a=new $e({props:{content:n[7].body}}),{key:c,first:null,c(){o=e("div"),Zt(a.$$.fragment),p=s(),i(o,"class","tab-item"),ke(o,"active",n[2]===n[7].code),this.first=o},m(d,h){u(d,o,h),te(a,o,null),t(o,p),b=!0},p(d,h){n=d,(!b||h&36)&&ke(o,"active",n[2]===n[7].code)},i(d){b||(Gt(a.$$.fragment,d),b=!0)},o(d){Ut(a.$$.fragment,d),b=!1},d(d){d&&m(o),ee(a)}}}function pl(c){var ye,Fe,Le,Ae,Te,Pe;let n,o,a=c[0].name+"",p,b,d,h,C,x,_,f=c[0].name+"",et,kt,jt,S,Qt,D,ct,R,lt,le,U,j,se,dt,vt=c[0].name+"",st,yt,ne,ft,pt,nt,E,zt,Ft,T,ot,Lt,Jt,At,Q,it,Tt,Kt,Pt,L,ut,Rt,oe,mt,ie,H,Ot,at,St,O,bt,ae,z,Et,Vt,Nt,re,N,Wt,J,ht,ce,I,de,B,fe,P,qt,K,_t,pe,xt,ue,$,Mt,rt,Dt,me,Ht,Xt,V,wt,be,It,he,Ct,_e,G,W,Yt,q,gt,A=[],xe=new Map,X,Y,y=[],Bt=new Map,Z;S=new il({props:{js:`
<code>(...)</code>, <code>&amp;&amp;</code> (AND) and <code>||</code> (OR) tokens.`,i(h,"class","txt-danger"),i(kt,"class","filter-op svelte-1w7s5nw"),i(S,"class","txt"),i(ct,"class","filter-op svelte-1w7s5nw"),i(lt,"class","txt"),i(j,"class","filter-op svelte-1w7s5nw"),i(dt,"class","txt"),i(yt,"class","filter-op svelte-1w7s5nw"),i(ft,"class","txt"),i(E,"class","filter-op svelte-1w7s5nw"),i(Ft,"class","txt"),i(Lt,"class","filter-op svelte-1w7s5nw"),i(At,"class","txt"),i(Tt,"class","filter-op svelte-1w7s5nw"),i(Pt,"class","txt"),i(Ot,"class","filter-op svelte-1w7s5nw"),i(mt,"class","txt"),i(Rt,"class","filter-op svelte-1w7s5nw"),i(St,"class","txt-hint"),i(bt,"class","txt"),i(Et,"class","filter-op svelte-1w7s5nw"),i(Nt,"class","txt-hint"),i(N,"class","txt"),i(ht,"class","filter-op svelte-1w7s5nw"),i(I,"class","txt-hint"),i(B,"class","txt"),i(qt,"class","filter-op svelte-1w7s5nw"),i(_t,"class","txt-hint"),i(xt,"class","txt"),i(Mt,"class","filter-op svelte-1w7s5nw"),i(Dt,"class","txt-hint"),i(Ht,"class","txt"),i(wt,"class","filter-op svelte-1w7s5nw"),i(It,"class","txt-hint"),i(Ct,"class","txt"),i(W,"class","filter-op svelte-1w7s5nw"),i(q,"class","txt-hint"),i(A,"class","txt"),i(Y,"class","filter-op svelte-1w7s5nw"),i(Bt,"class","txt-hint"),i(v,"class","txt")},m(F,$t){u(F,n,$t),u(F,o,$t),u(F,a,$t),t(a,p),t(a,b),t(a,d),t(d,h),t(d,C),t(d,x),t(d,_),t(d,f),t(f,et),t(et,kt),t(et,jt),t(et,S),t(f,Qt),t(f,D),t(D,ct),t(D,O),t(D,lt),t(f,le),t(f,U),t(U,j),t(U,se),t(U,dt),t(f,vt),t(f,st),t(st,yt),t(st,ne),t(st,ft),t(f,pt),t(f,nt),t(nt,E),t(nt,zt),t(nt,Ft),t(f,T),t(f,ot),t(ot,Lt),t(ot,Jt),t(ot,At),t(f,Q),t(f,it),t(it,Tt),t(it,Kt),t(it,Pt),t(f,L),t(f,ut),t(ut,Ot),t(ut,oe),t(ut,mt),t(f,ie),t(f,H),t(H,Rt),t(H,at),t(H,St),t(H,R),t(H,bt),t(f,ae),t(f,z),t(z,Et),t(z,Vt),t(z,Nt),t(z,re),t(z,N),t(f,Wt),t(f,J),t(J,ht),t(J,ce),t(J,I),t(J,de),t(J,B),t(f,fe),t(f,P),t(P,qt),t(P,K),t(P,_t),t(P,pe),t(P,xt),t(f,ue),t(f,$),t($,Mt),t($,rt),t($,Dt),t($,me),t($,Ht),t(f,Xt),t(f,V),t(V,wt),t(V,be),t(V,It),t(V,he),t(V,Ct),t(f,_e),t(f,G),t(G,W),t(G,Yt),t(G,q),t(G,gt),t(G,A),t(f,xe),t(f,X),t(X,Y),t(X,y),t(X,Bt),t(X,Z),t(X,v),u(F,tt,$t),u(F,k,$t)},d(F){F&&m(n),F&&m(o),F&&m(a),F&&m(tt),F&&m(k)}}}function cl(c){let n,o,a,p,b;function d(_,f){return _[0]?rl:al}let h=d(c),C=h(c),x=c[0]&&Ie();return{c(){n=e("button"),C.c(),o=s(),x&&x.c(),a=Ye(),i(n,"class","btn btn-sm btn-secondary m-t-10")},m(_,f){u(_,n,f),C.m(n,null),u(_,o,f),x&&x.m(_,f),u(_,a,f),p||(b=Xe(n,"click",c[1]),p=!0)},p(_,[f]){h!==(h=d(_))&&(C.d(1),C=h(_),C&&(C.c(),C.m(n,null))),_[0]?x||(x=Ie(),x.c(),x.m(a.parentNode,a)):x&&(x.d(1),x=null)},i:De,o:De,d(_){_&&m(n),C.d(),_&&m(o),x&&x.d(_),_&&m(a),p=!1,b()}}}function dl(c,n,o){let a=!1;function p(){o(0,a=!a)}return[a,p]}class fl extends Ke{constructor(n){super(),Ve(this,n,dl,cl,We,{})}}function Be(c,n,o){const a=c.slice();return a[7]=n[o],a}function Ge(c,n,o){const a=c.slice();return a[7]=n[o],a}function Ue(c,n,o){const a=c.slice();return a[12]=n[o],a[14]=o,a}function je(c){let n;return{c(){n=e("p"),n.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",i(n,"class","txt-hint txt-sm txt-right")},m(o,a){u(o,n,a)},d(o){o&&m(n)}}}function Qe(c){let n,o=c[12]+"",a,p=c[14]<c[4].length-1?", ":"",b;return{c(){n=e("code"),a=w(o),b=w(p)},m(d,h){u(d,n,h),t(n,a),u(d,b,h)},p(d,h){h&16&&o!==(o=d[12]+"")&&Ce(a,o),h&16&&p!==(p=d[14]<d[4].length-1?", ":"")&&Ce(b,p)},d(d){d&&m(n),d&&m(b)}}}function ze(c,n){let o,a=n[7].code+"",p,b,d,h;function C(){return n[6](n[7])}return{key:c,first:null,c(){o=e("div"),p=w(a),b=s(),i(o,"class","tab-item"),ke(o,"active",n[2]===n[7].code),this.first=o},m(x,_){u(x,o,_),t(o,p),t(o,b),d||(h=Xe(o,"click",C),d=!0)},p(x,_){n=x,_&36&&ke(o,"active",n[2]===n[7].code)},d(x){x&&m(o),d=!1,h()}}}function Je(c,n){let o,a,p,b;return a=new $e({props:{content:n[7].body}}),{key:c,first:null,c(){o=e("div"),Zt(a.$$.fragment),p=s(),i(o,"class","tab-item"),ke(o,"active",n[2]===n[7].code),this.first=o},m(d,h){u(d,o,h),te(a,o,null),t(o,p),b=!0},p(d,h){n=d,(!b||h&36)&&ke(o,"active",n[2]===n[7].code)},i(d){b||(Gt(a.$$.fragment,d),b=!0)},o(d){Ut(a.$$.fragment,d),b=!1},d(d){d&&m(o),ee(a)}}}function pl(c){var ye,Fe,Le,Ae,Te,Pe;let n,o,a=c[0].name+"",p,b,d,h,C,x,_,f=c[0].name+"",et,kt,jt,S,Qt,D,ct,O,lt,le,U,j,se,dt,vt=c[0].name+"",st,yt,ne,ft,pt,nt,E,zt,Ft,T,ot,Lt,Jt,At,Q,it,Tt,Kt,Pt,L,ut,Ot,oe,mt,ie,H,Rt,at,St,R,bt,ae,z,Et,Vt,Nt,re,N,Wt,J,ht,ce,I,de,B,fe,P,qt,K,_t,pe,xt,ue,$,Mt,rt,Dt,me,Ht,Xt,V,wt,be,It,he,Ct,_e,G,W,Yt,q,gt,A=[],xe=new Map,X,Y,y=[],Bt=new Map,Z;S=new il({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${c[3]}');
@ -58,16 +58,16 @@ import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o
?sort=-created,id
`}});let tt=c[4],k=[];for(let l=0;l<tt.length;l+=1)k[l]=Qe(Ue(c,tt,l));B=new $e({props:{content:`
?filter=(id='abc' && created>'2022-01-01')
`}}),P=new fl({}),rt=new $e({props:{content:"?expand=relField1,relField2.subRelField"}});let F=c[5];const $t=l=>l[7].code;for(let l=0;l<F.length;l+=1){let r=Ge(c,F,l),g=$t(r);xe.set(g,A[l]=ze(g,r))}let we=c[5];const ve=l=>l[7].code;for(let l=0;l<we.length;l+=1){let r=Be(c,we,l),g=ve(r);Bt.set(g,y[l]=Je(g,r))}return{c(){n=e("h3"),o=w("List/Search ("),p=w(a),b=w(")"),d=s(),h=e("div"),C=e("p"),x=w("Fetch a paginated "),_=e("strong"),et=w(f),kt=w(" records list, supporting sorting and filtering."),jt=s(),Zt(S.$$.fragment),Qt=s(),D=e("h6"),D.textContent="API details",ct=s(),R=e("div"),lt=e("strong"),lt.textContent="GET",le=s(),U=e("div"),j=e("p"),se=w("/api/collections/"),dt=e("strong"),st=w(vt),yt=w("/records"),ne=s(),v&&v.c(),ft=s(),pt=e("div"),pt.textContent="Query parameters",nt=s(),E=e("table"),zt=e("thead"),zt.innerHTML=`<tr><th>Param</th>
`}}),P=new fl({}),rt=new $e({props:{content:"?expand=relField1,relField2.subRelField"}});let F=c[5];const $t=l=>l[7].code;for(let l=0;l<F.length;l+=1){let r=Ge(c,F,l),g=$t(r);xe.set(g,A[l]=ze(g,r))}let we=c[5];const ve=l=>l[7].code;for(let l=0;l<we.length;l+=1){let r=Be(c,we,l),g=ve(r);Bt.set(g,y[l]=Je(g,r))}return{c(){n=e("h3"),o=w("List/Search ("),p=w(a),b=w(")"),d=s(),h=e("div"),C=e("p"),x=w("Fetch a paginated "),_=e("strong"),et=w(f),kt=w(" records list, supporting sorting and filtering."),jt=s(),Zt(S.$$.fragment),Qt=s(),D=e("h6"),D.textContent="API details",ct=s(),O=e("div"),lt=e("strong"),lt.textContent="GET",le=s(),U=e("div"),j=e("p"),se=w("/api/collections/"),dt=e("strong"),st=w(vt),yt=w("/records"),ne=s(),v&&v.c(),ft=s(),pt=e("div"),pt.textContent="Query parameters",nt=s(),E=e("table"),zt=e("thead"),zt.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr>`,Ft=s(),T=e("tbody"),ot=e("tr"),ot.innerHTML=`<td>page</td>
<td><span class="label">Number</span></td>
<td>The page (aka. offset) of the paginated list (default to 1).</td>`,Lt=s(),Jt=e("tr"),Jt.innerHTML=`<td>perPage</td>
<td><span class="label">Number</span></td>
<td>Specify the max returned records per page (default to 30).</td>`,At=s(),Q=e("tr"),it=e("td"),it.textContent="sort",Tt=s(),Kt=e("td"),Kt.innerHTML='<span class="label">String</span>',Pt=s(),L=e("td"),ut=w("Specify the records order attribute(s). "),Rt=e("br"),oe=w(`
Add `),mt=e("code"),mt.textContent="-",ie=w(" / "),H=e("code"),H.textContent="+",Ot=w(` (default) in front of the attribute for DESC / ASC order.
<td>Specify the max returned records per page (default to 30).</td>`,At=s(),Q=e("tr"),it=e("td"),it.textContent="sort",Tt=s(),Kt=e("td"),Kt.innerHTML='<span class="label">String</span>',Pt=s(),L=e("td"),ut=w("Specify the records order attribute(s). "),Ot=e("br"),oe=w(`
Add `),mt=e("code"),mt.textContent="-",ie=w(" / "),H=e("code"),H.textContent="+",Rt=w(` (default) in front of the attribute for DESC / ASC order.
Ex.:
`),Zt(at.$$.fragment),St=s(),O=e("p"),bt=e("strong"),bt.textContent="Supported record sort fields:",ae=s(),z=e("br"),Et=s(),Vt=e("code"),Vt.textContent="@random",Nt=w(`,
`),Zt(at.$$.fragment),St=s(),R=e("p"),bt=e("strong"),bt.textContent="Supported record sort fields:",ae=s(),z=e("br"),Et=s(),Vt=e("code"),Vt.textContent="@random",Nt=w(`,
`);for(let l=0;l<k.length;l+=1)k[l].c();re=s(),N=e("tr"),Wt=e("td"),Wt.textContent="filter",J=s(),ht=e("td"),ht.innerHTML='<span class="label">String</span>',ce=s(),I=e("td"),de=w(`Filter the returned records. Ex.:
`),Zt(B.$$.fragment),fe=s(),Zt(P.$$.fragment),qt=s(),K=e("tr"),_t=e("td"),_t.textContent="expand",pe=s(),xt=e("td"),xt.innerHTML='<span class="label">String</span>',ue=s(),$=e("td"),Mt=w(`Auto expand record relations. Ex.:
`),Zt(rt.$$.fragment),Dt=w(`
@ -75,7 +75,7 @@ import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o
The expanded relations will be appended to each individual record under the
`),Xt=e("code"),Xt.textContent="expand",V=w(" property (eg. "),wt=e("code"),wt.textContent='"expand": {"relField1": {...}, ...}',be=w(`).
`),It=e("br"),he=w(`
Only the relations to which the request user has permissions to `),Ct=e("strong"),Ct.textContent="view",_e=w(" will be expanded."),G=s(),W=e("div"),W.textContent="Responses",Yt=s(),q=e("div"),gt=e("div");for(let l=0;l<A.length;l+=1)A[l].c();X=s(),Y=e("div");for(let l=0;l<y.length;l+=1)y[l].c();i(n,"class","m-b-sm"),i(h,"class","content txt-lg m-b-sm"),i(D,"class","m-b-xs"),i(lt,"class","label label-primary"),i(U,"class","content"),i(R,"class","alert alert-info"),i(pt,"class","section-title"),i(E,"class","table-compact table-border m-b-base"),i(W,"class","section-title"),i(gt,"class","tabs-header compact left"),i(Y,"class","tabs-content"),i(q,"class","tabs")},m(l,r){u(l,n,r),t(n,o),t(n,p),t(n,b),u(l,d,r),u(l,h,r),t(h,C),t(C,x),t(C,_),t(_,et),t(C,kt),u(l,jt,r),te(S,l,r),u(l,Qt,r),u(l,D,r),u(l,ct,r),u(l,R,r),t(R,lt),t(R,le),t(R,U),t(U,j),t(j,se),t(j,dt),t(dt,st),t(j,yt),t(R,ne),v&&v.m(R,null),u(l,ft,r),u(l,pt,r),u(l,nt,r),u(l,E,r),t(E,zt),t(E,Ft),t(E,T),t(T,ot),t(T,Lt),t(T,Jt),t(T,At),t(T,Q),t(Q,it),t(Q,Tt),t(Q,Kt),t(Q,Pt),t(Q,L),t(L,ut),t(L,Rt),t(L,oe),t(L,mt),t(L,ie),t(L,H),t(L,Ot),te(at,L,null),t(L,St),t(L,O),t(O,bt),t(O,ae),t(O,z),t(O,Et),t(O,Vt),t(O,Nt);for(let g=0;g<k.length;g+=1)k[g]&&k[g].m(O,null);t(T,re),t(T,N),t(N,Wt),t(N,J),t(N,ht),t(N,ce),t(N,I),t(I,de),te(B,I,null),t(I,fe),te(P,I,null),t(T,qt),t(T,K),t(K,_t),t(K,pe),t(K,xt),t(K,ue),t(K,$),t($,Mt),te(rt,$,null),t($,Dt),t($,me),t($,Ht),t($,Xt),t($,V),t($,wt),t($,be),t($,It),t($,he),t($,Ct),t($,_e),u(l,G,r),u(l,W,r),u(l,Yt,r),u(l,q,r),t(q,gt);for(let g=0;g<A.length;g+=1)A[g]&&A[g].m(gt,null);t(q,X),t(q,Y);for(let g=0;g<y.length;g+=1)y[g]&&y[g].m(Y,null);Z=!0},p(l,[r]){var Re,Oe,Se,Ee,Ne,qe;(!Z||r&1)&&a!==(a=l[0].name+"")&&Ce(p,a),(!Z||r&1)&&f!==(f=l[0].name+"")&&Ce(et,f);const g={};if(r&9&&(g.js=`
Only the relations to which the request user has permissions to `),Ct=e("strong"),Ct.textContent="view",_e=w(" will be expanded."),G=s(),W=e("div"),W.textContent="Responses",Yt=s(),q=e("div"),gt=e("div");for(let l=0;l<A.length;l+=1)A[l].c();X=s(),Y=e("div");for(let l=0;l<y.length;l+=1)y[l].c();i(n,"class","m-b-sm"),i(h,"class","content txt-lg m-b-sm"),i(D,"class","m-b-xs"),i(lt,"class","label label-primary"),i(U,"class","content"),i(O,"class","alert alert-info"),i(pt,"class","section-title"),i(E,"class","table-compact table-border m-b-base"),i(W,"class","section-title"),i(gt,"class","tabs-header compact left"),i(Y,"class","tabs-content"),i(q,"class","tabs")},m(l,r){u(l,n,r),t(n,o),t(n,p),t(n,b),u(l,d,r),u(l,h,r),t(h,C),t(C,x),t(C,_),t(_,et),t(C,kt),u(l,jt,r),te(S,l,r),u(l,Qt,r),u(l,D,r),u(l,ct,r),u(l,O,r),t(O,lt),t(O,le),t(O,U),t(U,j),t(j,se),t(j,dt),t(dt,st),t(j,yt),t(O,ne),v&&v.m(O,null),u(l,ft,r),u(l,pt,r),u(l,nt,r),u(l,E,r),t(E,zt),t(E,Ft),t(E,T),t(T,ot),t(T,Lt),t(T,Jt),t(T,At),t(T,Q),t(Q,it),t(Q,Tt),t(Q,Kt),t(Q,Pt),t(Q,L),t(L,ut),t(L,Ot),t(L,oe),t(L,mt),t(L,ie),t(L,H),t(L,Rt),te(at,L,null),t(L,St),t(L,R),t(R,bt),t(R,ae),t(R,z),t(R,Et),t(R,Vt),t(R,Nt);for(let g=0;g<k.length;g+=1)k[g]&&k[g].m(R,null);t(T,re),t(T,N),t(N,Wt),t(N,J),t(N,ht),t(N,ce),t(N,I),t(I,de),te(B,I,null),t(I,fe),te(P,I,null),t(T,qt),t(T,K),t(K,_t),t(K,pe),t(K,xt),t(K,ue),t(K,$),t($,Mt),te(rt,$,null),t($,Dt),t($,me),t($,Ht),t($,Xt),t($,V),t($,wt),t($,be),t($,It),t($,he),t($,Ct),t($,_e),u(l,G,r),u(l,W,r),u(l,Yt,r),u(l,q,r),t(q,gt);for(let g=0;g<A.length;g+=1)A[g]&&A[g].m(gt,null);t(q,X),t(q,Y);for(let g=0;g<y.length;g+=1)y[g]&&y[g].m(Y,null);Z=!0},p(l,[r]){var Oe,Re,Se,Ee,Ne,qe;(!Z||r&1)&&a!==(a=l[0].name+"")&&Ce(p,a),(!Z||r&1)&&f!==(f=l[0].name+"")&&Ce(et,f);const g={};if(r&9&&(g.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${l[3]}');
@ -83,12 +83,12 @@ import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o
...
// fetch a paginated records list
const resultList = await pb.collection('${(Re=l[0])==null?void 0:Re.name}').getList(1, 50, {
const resultList = await pb.collection('${(Oe=l[0])==null?void 0:Oe.name}').getList(1, 50, {
filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2',
});
// you can also fetch all records at once via getFullList
const records = await pb.collection('${(Oe=l[0])==null?void 0:Oe.name}').getFullList({
const records = await pb.collection('${(Re=l[0])==null?void 0:Re.name}').getFullList({
sort: '-created',
});
@ -120,7 +120,7 @@ import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o
'someField="test"',
expand: 'relField1,relField2.subRelField',
);
`),S.$set(g),(!Z||r&1)&&vt!==(vt=l[0].name+"")&&Ce(st,vt),l[1]?v||(v=je(),v.c(),v.m(R,null)):v&&(v.d(1),v=null),r&16){tt=l[4];let M;for(M=0;M<tt.length;M+=1){const Me=Ue(l,tt,M);k[M]?k[M].p(Me,r):(k[M]=Qe(Me),k[M].c(),k[M].m(O,null))}for(;M<k.length;M+=1)k[M].d(1);k.length=tt.length}r&36&&(F=l[5],A=He(A,r,$t,1,l,F,xe,gt,Ze,ze,null,Ge)),r&36&&(we=l[5],tl(),y=He(y,r,ve,1,l,we,Bt,Y,el,Je,null,Be),ll())},i(l){if(!Z){Gt(S.$$.fragment,l),Gt(at.$$.fragment,l),Gt(B.$$.fragment,l),Gt(P.$$.fragment,l),Gt(rt.$$.fragment,l);for(let r=0;r<we.length;r+=1)Gt(y[r]);Z=!0}},o(l){Ut(S.$$.fragment,l),Ut(at.$$.fragment,l),Ut(B.$$.fragment,l),Ut(P.$$.fragment,l),Ut(rt.$$.fragment,l);for(let r=0;r<y.length;r+=1)Ut(y[r]);Z=!1},d(l){l&&m(n),l&&m(d),l&&m(h),l&&m(jt),ee(S,l),l&&m(Qt),l&&m(D),l&&m(ct),l&&m(R),v&&v.d(),l&&m(ft),l&&m(pt),l&&m(nt),l&&m(E),ee(at),sl(k,l),ee(B),ee(P),ee(rt),l&&m(G),l&&m(W),l&&m(Yt),l&&m(q);for(let r=0;r<A.length;r+=1)A[r].d();for(let r=0;r<y.length;r+=1)y[r].d()}}}function ul(c,n,o){let a,p,b,{collection:d=new nl}=n,h=200,C=[];const x=_=>o(2,h=_.code);return c.$$set=_=>{"collection"in _&&o(0,d=_.collection)},c.$$.update=()=>{c.$$.dirty&1&&o(4,a=ge.getAllCollectionIdentifiers(d)),c.$$.dirty&1&&o(1,p=(d==null?void 0:d.listRule)===null),c.$$.dirty&3&&d!=null&&d.id&&(C.push({code:200,body:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[ge.dummyCollectionRecord(d),ge.dummyCollectionRecord(d)]},null,2)}),C.push({code:400,body:`
`),S.$set(g),(!Z||r&1)&&vt!==(vt=l[0].name+"")&&Ce(st,vt),l[1]?v||(v=je(),v.c(),v.m(O,null)):v&&(v.d(1),v=null),r&16){tt=l[4];let M;for(M=0;M<tt.length;M+=1){const Me=Ue(l,tt,M);k[M]?k[M].p(Me,r):(k[M]=Qe(Me),k[M].c(),k[M].m(R,null))}for(;M<k.length;M+=1)k[M].d(1);k.length=tt.length}r&36&&(F=l[5],A=He(A,r,$t,1,l,F,xe,gt,Ze,ze,null,Ge)),r&36&&(we=l[5],tl(),y=He(y,r,ve,1,l,we,Bt,Y,el,Je,null,Be),ll())},i(l){if(!Z){Gt(S.$$.fragment,l),Gt(at.$$.fragment,l),Gt(B.$$.fragment,l),Gt(P.$$.fragment,l),Gt(rt.$$.fragment,l);for(let r=0;r<we.length;r+=1)Gt(y[r]);Z=!0}},o(l){Ut(S.$$.fragment,l),Ut(at.$$.fragment,l),Ut(B.$$.fragment,l),Ut(P.$$.fragment,l),Ut(rt.$$.fragment,l);for(let r=0;r<y.length;r+=1)Ut(y[r]);Z=!1},d(l){l&&m(n),l&&m(d),l&&m(h),l&&m(jt),ee(S,l),l&&m(Qt),l&&m(D),l&&m(ct),l&&m(O),v&&v.d(),l&&m(ft),l&&m(pt),l&&m(nt),l&&m(E),ee(at),sl(k,l),ee(B),ee(P),ee(rt),l&&m(G),l&&m(W),l&&m(Yt),l&&m(q);for(let r=0;r<A.length;r+=1)A[r].d();for(let r=0;r<y.length;r+=1)y[r].d()}}}function ul(c,n,o){let a,p,b,{collection:d=new nl}=n,h=200,C=[];const x=_=>o(2,h=_.code);return c.$$set=_=>{"collection"in _&&o(0,d=_.collection)},c.$$.update=()=>{c.$$.dirty&1&&o(4,a=ge.getAllCollectionIdentifiers(d)),c.$$.dirty&1&&o(1,p=(d==null?void 0:d.listRule)===null),c.$$.dirty&3&&d!=null&&d.id&&(C.push({code:200,body:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[ge.dummyCollectionRecord(d),ge.dummyCollectionRecord(d)]},null,2)}),C.push({code:400,body:`
{
"code": 400,
"message": "Something went wrong while processing your request. Invalid filter.",

View File

@ -1,4 +1,4 @@
import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s,m as Ee,x as U,N as Pe,O as Oe,k as Le,P as Re,n as We,t as te,a as le,o as u,d as Ie,R as ze,C as De,p as He,r as j,u as Ue,M as je}from"./index-e5007277.js";import{S as Ne}from"./SdkTabs-e5fbf56f.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,p;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){d(g,o,P),s(o,f),s(o,h),c||(p=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&u(o),c=!1,p()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ee(n,o,null),s(o,f),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),n.$set(m),(!h||p&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&u(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,p,m,g,P,L=a[0].name+"",N,oe,se,G,K,y,F,S,J,$,R,ae,W,A,ne,Q,z=a[0].name+"",V,ie,X,ce,re,D,Y,E,Z,I,x,B,ee,C,q,w=[],de=new Map,ue,M,k=[],pe=new Map,T;y=new Ne({props:{js:`
import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s,m as Ee,x as U,N as Pe,O as Oe,k as Le,P as We,n as ze,t as te,a as le,o as u,d as Ie,T as De,C as He,p as Re,r as j,u as Ue,M as je}from"./index-7275477a.js";import{S as Ne}from"./SdkTabs-3e2121ec.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Te(a,l){let o,n=l[5].code+"",f,h,c,p;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){d(g,o,P),s(o,f),s(o,h),c||(p=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&u(o),c=!1,p()}}}function Ce(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ee(n,o,null),s(o,f),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),n.$set(m),(!h||p&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&u(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,p,m,g,P,L=a[0].name+"",N,oe,se,G,K,y,F,S,J,$,W,ae,z,A,ne,Q,D=a[0].name+"",V,ie,X,ce,re,H,Y,E,Z,I,x,B,ee,T,q,w=[],de=new Map,ue,M,k=[],pe=new Map,C;y=new Ne({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${a[3]}');
@ -22,12 +22,12 @@ import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s
final result = await pb.collection('${(ke=a[0])==null?void 0:ke.name}').listExternalAuths(
pb.authStore.model.id,
);
`}});let H=a[2];const fe=e=>e[5].code;for(let e=0;e<H.length;e+=1){let t=Ae(a,H,e),r=fe(t);de.set(r,w[e]=Ce(r,t))}let O=a[2];const me=e=>e[5].code;for(let e=0;e<O.length;e+=1){let t=ye(a,O,e),r=me(t);pe.set(r,k[e]=Te(r,t))}return{c(){l=i("h3"),o=v("List OAuth2 accounts ("),f=v(n),h=v(")"),c=_(),p=i("div"),m=i("p"),g=v("Returns a list with all OAuth2 providers linked to a single "),P=i("strong"),N=v(L),oe=v("."),se=_(),G=i("p"),G.textContent="Only admins and the account owner can access this action.",K=_(),Se(y.$$.fragment),F=_(),S=i("h6"),S.textContent="API details",J=_(),$=i("div"),R=i("strong"),R.textContent="GET",ae=_(),W=i("div"),A=i("p"),ne=v("/api/collections/"),Q=i("strong"),V=v(z),ie=v("/records/"),X=i("strong"),X.textContent=":id",ce=v("/external-auths"),re=_(),D=i("p"),D.innerHTML="Requires <code>Authorization:TOKEN</code> header",Y=_(),E=i("div"),E.textContent="Path Parameters",Z=_(),I=i("table"),I.innerHTML=`<thead><tr><th>Param</th>
`}});let R=a[2];const fe=e=>e[5].code;for(let e=0;e<R.length;e+=1){let t=Ae(a,R,e),r=fe(t);de.set(r,w[e]=Te(r,t))}let O=a[2];const me=e=>e[5].code;for(let e=0;e<O.length;e+=1){let t=ye(a,O,e),r=me(t);pe.set(r,k[e]=Ce(r,t))}return{c(){l=i("h3"),o=v("List OAuth2 accounts ("),f=v(n),h=v(")"),c=_(),p=i("div"),m=i("p"),g=v("Returns a list with all OAuth2 providers linked to a single "),P=i("strong"),N=v(L),oe=v("."),se=_(),G=i("p"),G.textContent="Only admins and the account owner can access this action.",K=_(),Se(y.$$.fragment),F=_(),S=i("h6"),S.textContent="API details",J=_(),$=i("div"),W=i("strong"),W.textContent="GET",ae=_(),z=i("div"),A=i("p"),ne=v("/api/collections/"),Q=i("strong"),V=v(D),ie=v("/records/"),X=i("strong"),X.textContent=":id",ce=v("/external-auths"),re=_(),H=i("p"),H.innerHTML="Requires <code>Authorization:TOKEN</code> header",Y=_(),E=i("div"),E.textContent="Path Parameters",Z=_(),I=i("table"),I.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr></thead>
<tbody><tr><td>id</td>
<td><span class="label">String</span></td>
<td>ID of the auth record.</td></tr></tbody>`,x=_(),B=i("div"),B.textContent="Responses",ee=_(),C=i("div"),q=i("div");for(let e=0;e<w.length;e+=1)w[e].c();ue=_(),M=i("div");for(let e=0;e<k.length;e+=1)k[e].c();b(l,"class","m-b-sm"),b(p,"class","content txt-lg m-b-sm"),b(S,"class","m-b-xs"),b(R,"class","label label-primary"),b(W,"class","content"),b(D,"class","txt-hint txt-sm txt-right"),b($,"class","alert alert-info"),b(E,"class","section-title"),b(I,"class","table-compact table-border m-b-base"),b(B,"class","section-title"),b(q,"class","tabs-header compact left"),b(M,"class","tabs-content"),b(C,"class","tabs")},m(e,t){d(e,l,t),s(l,o),s(l,f),s(l,h),d(e,c,t),d(e,p,t),s(p,m),s(m,g),s(m,P),s(P,N),s(m,oe),s(p,se),s(p,G),d(e,K,t),Ee(y,e,t),d(e,F,t),d(e,S,t),d(e,J,t),d(e,$,t),s($,R),s($,ae),s($,W),s(W,A),s(A,ne),s(A,Q),s(Q,V),s(A,ie),s(A,X),s(A,ce),s($,re),s($,D),d(e,Y,t),d(e,E,t),d(e,Z,t),d(e,I,t),d(e,x,t),d(e,B,t),d(e,ee,t),d(e,C,t),s(C,q);for(let r=0;r<w.length;r+=1)w[r]&&w[r].m(q,null);s(C,ue),s(C,M);for(let r=0;r<k.length;r+=1)k[r]&&k[r].m(M,null);T=!0},p(e,[t]){var ve,we,$e,ge;(!T||t&1)&&n!==(n=e[0].name+"")&&U(f,n),(!T||t&1)&&L!==(L=e[0].name+"")&&U(N,L);const r={};t&9&&(r.js=`
<td>ID of the auth record.</td></tr></tbody>`,x=_(),B=i("div"),B.textContent="Responses",ee=_(),T=i("div"),q=i("div");for(let e=0;e<w.length;e+=1)w[e].c();ue=_(),M=i("div");for(let e=0;e<k.length;e+=1)k[e].c();b(l,"class","m-b-sm"),b(p,"class","content txt-lg m-b-sm"),b(S,"class","m-b-xs"),b(W,"class","label label-primary"),b(z,"class","content"),b(H,"class","txt-hint txt-sm txt-right"),b($,"class","alert alert-info"),b(E,"class","section-title"),b(I,"class","table-compact table-border m-b-base"),b(B,"class","section-title"),b(q,"class","tabs-header compact left"),b(M,"class","tabs-content"),b(T,"class","tabs")},m(e,t){d(e,l,t),s(l,o),s(l,f),s(l,h),d(e,c,t),d(e,p,t),s(p,m),s(m,g),s(m,P),s(P,N),s(m,oe),s(p,se),s(p,G),d(e,K,t),Ee(y,e,t),d(e,F,t),d(e,S,t),d(e,J,t),d(e,$,t),s($,W),s($,ae),s($,z),s(z,A),s(A,ne),s(A,Q),s(Q,V),s(A,ie),s(A,X),s(A,ce),s($,re),s($,H),d(e,Y,t),d(e,E,t),d(e,Z,t),d(e,I,t),d(e,x,t),d(e,B,t),d(e,ee,t),d(e,T,t),s(T,q);for(let r=0;r<w.length;r+=1)w[r]&&w[r].m(q,null);s(T,ue),s(T,M);for(let r=0;r<k.length;r+=1)k[r]&&k[r].m(M,null);C=!0},p(e,[t]){var ve,we,$e,ge;(!C||t&1)&&n!==(n=e[0].name+"")&&U(f,n),(!C||t&1)&&L!==(L=e[0].name+"")&&U(N,L);const r={};t&9&&(r.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
@ -51,7 +51,7 @@ import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s
final result = await pb.collection('${(ge=e[0])==null?void 0:ge.name}').listExternalAuths(
pb.authStore.model.id,
);
`),y.$set(r),(!T||t&1)&&z!==(z=e[0].name+"")&&U(V,z),t&6&&(H=e[2],w=Pe(w,t,fe,1,e,H,de,q,Oe,Ce,null,Ae)),t&6&&(O=e[2],Le(),k=Pe(k,t,me,1,e,O,pe,M,Re,Te,null,ye),We())},i(e){if(!T){te(y.$$.fragment,e);for(let t=0;t<O.length;t+=1)te(k[t]);T=!0}},o(e){le(y.$$.fragment,e);for(let t=0;t<k.length;t+=1)le(k[t]);T=!1},d(e){e&&u(l),e&&u(c),e&&u(p),e&&u(K),Ie(y,e),e&&u(F),e&&u(S),e&&u(J),e&&u($),e&&u(Y),e&&u(E),e&&u(Z),e&&u(I),e&&u(x),e&&u(B),e&&u(ee),e&&u(C);for(let t=0;t<w.length;t+=1)w[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function Ke(a,l,o){let n,{collection:f=new ze}=l,h=200,c=[];const p=m=>o(1,h=m.code);return a.$$set=m=>{"collection"in m&&o(0,f=m.collection)},a.$$.update=()=>{a.$$.dirty&1&&o(2,c=[{code:200,body:`
`),y.$set(r),(!C||t&1)&&D!==(D=e[0].name+"")&&U(V,D),t&6&&(R=e[2],w=Pe(w,t,fe,1,e,R,de,q,Oe,Te,null,Ae)),t&6&&(O=e[2],Le(),k=Pe(k,t,me,1,e,O,pe,M,We,Ce,null,ye),ze())},i(e){if(!C){te(y.$$.fragment,e);for(let t=0;t<O.length;t+=1)te(k[t]);C=!0}},o(e){le(y.$$.fragment,e);for(let t=0;t<k.length;t+=1)le(k[t]);C=!1},d(e){e&&u(l),e&&u(c),e&&u(p),e&&u(K),Ie(y,e),e&&u(F),e&&u(S),e&&u(J),e&&u($),e&&u(Y),e&&u(E),e&&u(Z),e&&u(I),e&&u(x),e&&u(B),e&&u(ee),e&&u(T);for(let t=0;t<w.length;t+=1)w[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function Ke(a,l,o){let n,{collection:f=new De}=l,h=200,c=[];const p=m=>o(1,h=m.code);return a.$$set=m=>{"collection"in m&&o(0,f=m.collection)},a.$$.update=()=>{a.$$.dirty&1&&o(2,c=[{code:200,body:`
[
{
"id": "8171022dc95a4e8",
@ -90,4 +90,4 @@ import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s
"message": "The requested resource wasn't found.",
"data": {}
}
`}])},o(3,n=De.getApiExampleUrl(He.baseUrl)),[f,h,c,n,p]}class Qe extends Be{constructor(l){super(),qe(this,l,Ke,Ge,Me,{collection:0})}}export{Qe as default};
`}])},o(3,n=He.getApiExampleUrl(Re.baseUrl)),[f,h,c,n,p]}class Qe extends Be{constructor(l){super(),qe(this,l,Ke,Ge,Me,{collection:0})}}export{Qe as default};

View File

@ -1,2 +1,2 @@
import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index-e5007277.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password
import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index-7275477a.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password
`),m&&m.c(),t=C(),A(r.$$.fragment),p=C(),A(d.$$.fragment),n=C(),i=c("button"),g=c("span"),g.textContent="Set new password",R=C(),P=c("div"),v=c("a"),v.textContent="Back to login",u(s,"class","m-b-xs"),u(o,"class","content txt-center m-b-sm"),u(g,"class","txt"),u(i,"type","submit"),u(i,"class","btn btn-lg btn-block"),i.disabled=f[2],L(i,"btn-loading",f[2]),u(e,"class","m-b-base"),u(v,"href","/login"),u(v,"class","link-hint"),u(P,"class","content txt-center")},m(a,$){b(a,e,$),_(e,o),_(o,s),_(s,l),m&&m.m(s,null),_(e,t),B(r,e,null),_(e,p),B(d,e,null),_(e,n),_(e,i),_(i,g),b(a,R,$),b(a,P,$),_(P,v),k=!0,F||(j=[h(e,"submit",O(f[4])),Q(U.call(null,v))],F=!0)},p(a,$){a[3]?m?m.p(a,$):(m=y(a),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const z={};$&769&&(z.$$scope={dirty:$,ctx:a}),r.$set(z);const D={};$&770&&(D.$$scope={dirty:$,ctx:a}),d.$set(D),(!k||$&4)&&(i.disabled=a[2]),(!k||$&4)&&L(i,"btn-loading",a[2])},i(a){k||(H(r.$$.fragment,a),H(d.$$.fragment,a),k=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),k=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(P),F=!1,V(j)}}}function se(f){let e,o;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){A(e.$$.fragment)},m(s,l){B(e,s,l),o=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){o||(H(e.$$.fragment,s),o=!0)},o(s){N(e.$$.fragment,s),o=!1},d(s){T(e,s)}}}function le(f,e,o){let s,{params:l}=e,t="",r="",p=!1;async function d(){if(!p){o(2,p=!0);try{await W.admins.confirmPasswordReset(l==null?void 0:l.token,t,r),X("Successfully set a new admin password."),Y("/")}catch(g){W.errorResponseHandler(g)}o(2,p=!1)}}function n(){t=this.value,o(0,t)}function i(){r=this.value,o(1,r)}return f.$$set=g=>{"params"in g&&o(5,l=g.params)},f.$$.update=()=>{f.$$.dirty&32&&o(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,r,p,s,d,l,n,i]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default};

View File

@ -1,2 +1,2 @@
import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index-e5007277.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`<h4 class="m-b-xs">Forgotten admin password</h4>
import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index-7275477a.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`<h4 class="m-b-xs">Forgotten admin password</h4>
<p>Enter the email associated with your account and well send you a recovery link:</p>`,n=g(),H(l.$$.fragment),t=g(),o=_("button"),f=_("i"),m=g(),i=_("span"),i.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(f,"class","ri-mail-send-line"),p(i,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block"),o.disabled=c[1],F(o,"btn-loading",c[1]),p(e,"class","m-b-base")},m(r,$){k(r,e,$),d(e,s),d(e,n),L(l,e,null),d(e,t),d(e,o),d(o,f),d(o,m),d(o,i),a=!0,b||(u=E(e,"submit",I(c[3])),b=!0)},p(r,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:r}),l.$set(q),(!a||$&2)&&(o.disabled=r[1]),(!a||$&2)&&F(o,"btn-loading",r[1])},i(r){a||(w(l.$$.fragment,r),a=!0)},o(r){y(l.$$.fragment,r),a=!1},d(r){r&&v(e),S(l),b=!1,u()}}}function O(c){let e,s,n,l,t,o,f,m,i;return{c(){e=_("div"),s=_("div"),s.innerHTML='<i class="ri-checkbox-circle-line"></i>',n=g(),l=_("div"),t=_("p"),o=h("Check "),f=_("strong"),m=h(c[0]),i=h(" for the recovery link."),p(s,"class","icon"),p(f,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){k(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,o),d(t,f),d(f,m),d(t,i)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&v(e)}}}function Q(c){let e,s,n,l,t,o,f,m;return{c(){e=_("label"),s=h("Email"),l=g(),t=_("input"),p(e,"for",n=c[5]),p(t,"type","email"),p(t,"id",o=c[5]),t.required=!0,t.autofocus=!0},m(i,a){k(i,e,a),d(e,s),k(i,l,a),k(i,t,a),R(t,c[0]),t.focus(),f||(m=E(t,"input",c[4]),f=!0)},p(i,a){a&32&&n!==(n=i[5])&&p(e,"for",n),a&32&&o!==(o=i[5])&&p(t,"id",o),a&1&&t.value!==i[0]&&R(t,i[0])},d(i){i&&v(e),i&&v(l),i&&v(t),f=!1,m()}}}function U(c){let e,s,n,l,t,o,f,m;const i=[O,K],a=[];function b(u,r){return u[2]?0:1}return e=b(c),s=a[e]=i[e](c),{c(){s.c(),n=g(),l=_("div"),t=_("a"),t.textContent="Back to login",p(t,"href","/login"),p(t,"class","link-hint"),p(l,"class","content txt-center")},m(u,r){a[e].m(u,r),k(u,n,r),k(u,l,r),d(l,t),o=!0,f||(m=A(B.call(null,t)),f=!0)},p(u,r){let $=e;e=b(u),e===$?a[e].p(u,r):(N(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(u,r):(s=a[e]=i[e](u),s.c()),w(s,1),s.m(n.parentNode,n))},i(u){o||(w(s),o=!0)},o(u){y(s),o=!1},d(u){a[e].d(u),u&&v(n),u&&v(l),f=!1,m()}}}function V(c){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:c}}}),{c(){H(e.$$.fragment)},m(n,l){L(e,n,l),s=!0},p(n,[l]){const t={};l&71&&(t.$$scope={dirty:l,ctx:n}),e.$set(t)},i(n){s||(w(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){S(e,n)}}}function W(c,e,s){let n="",l=!1,t=!1;async function o(){if(!l){s(1,l=!0);try{await C.admins.requestPasswordReset(n),s(2,t=!0)}catch(m){C.errorResponseHandler(m)}s(1,l=!1)}}function f(){n=this.value,s(0,n)}return[n,l,t,o,f]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default};

View File

@ -1 +1 @@
import{S as o,i,s as r,e as c,f as l,g as u,y as n,o as d,H as f}from"./index-e5007277.js";function m(s){let t;return{c(){t=c("div"),t.textContent="Loading...",l(t,"class","block txt-hint txt-center")},m(e,a){u(e,t,a)},p:n,i:n,o:n,d(e){e&&d(t)}}}function p(s){return f(()=>{window.close()}),[]}class g extends o{constructor(t){super(),i(this,t,p,m,r,{})}}export{g as default};
import{S as o,i,s as r,e as c,f as l,g as u,y as n,o as d,H as f}from"./index-7275477a.js";function m(s){let t;return{c(){t=c("div"),t.textContent="Loading...",l(t,"class","block txt-hint txt-center")},m(e,a){u(e,t,a)},p:n,i:n,o:n,d(e){e&&d(t)}}}function p(s){return f(()=>{window.close()}),[]}class g extends o{constructor(t){super(),i(this,t,p,m,r,{})}}export{g as default};

View File

@ -1,4 +1,4 @@
import{S as z,i as G,s as I,F as J,c as S,m as L,t as v,a as y,d as R,C as M,E as N,g as m,k as W,n as Y,o as b,_ as j,G as A,p as B,q as D,e as _,w as C,b as h,f as d,r as T,h as k,u as P,v as K,y as E,x as O,z as F}from"./index-e5007277.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&H(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=_("form"),t=_("div"),l=_("h5"),s=C(`Type your password to confirm changing your email address
`),p&&p.c(),n=h(),S(o.$$.fragment),c=h(),a=_("button"),i=_("span"),i.textContent="Confirm new email",d(t,"class","content txt-center m-b-base"),d(i,"class","txt"),d(a,"type","submit"),d(a,"class","btn btn-lg btn-block"),a.disabled=r[1],T(a,"btn-loading",r[1])},m(f,w){m(f,e,w),k(e,t),k(t,l),k(l,s),p&&p.m(l,null),k(e,n),L(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||($=P(e,"submit",K(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=H(f),p.c(),p.m(l,null)):p&&(p.d(1),p=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:f}),o.$set(q),(!u||w&2)&&(a.disabled=f[1]),(!u||w&2)&&T(a,"btn-loading",f[1])},i(f){u||(v(o.$$.fragment,f),u=!0)},o(f){y(o.$$.fragment,f),u=!1},d(f){f&&b(e),p&&p.d(),R(o),g=!1,$()}}}function U(r){let e,t,l,s,n;return{c(){e=_("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
import{S as z,i as G,s as I,F as J,c as R,m as S,t as v,a as y,d as L,C as M,E as N,g as _,k as W,n as Y,o as b,R as j,G as A,p as B,q as D,e as m,w as C,b as h,f as d,r as T,h as k,u as P,v as K,y as E,x as O,z as F}from"./index-7275477a.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&H(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),l=m("h5"),s=C(`Type your password to confirm changing your email address
`),p&&p.c(),n=h(),R(o.$$.fragment),c=h(),a=m("button"),i=m("span"),i.textContent="Confirm new email",d(t,"class","content txt-center m-b-base"),d(i,"class","txt"),d(a,"type","submit"),d(a,"class","btn btn-lg btn-block"),a.disabled=r[1],T(a,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,t),k(t,l),k(l,s),p&&p.m(l,null),k(e,n),S(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||($=P(e,"submit",K(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=H(f),p.c(),p.m(l,null)):p&&(p.d(1),p=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:f}),o.$set(q),(!u||w&2)&&(a.disabled=f[1]),(!u||w&2)&&T(a,"btn-loading",f[1])},i(f){u||(v(o.$$.fragment,f),u=!0)},o(f){y(o.$$.fragment,f),u=!1},d(f){f&&b(e),p&&p.d(),L(o),g=!1,$()}}}function U(r){let e,t,l,s,n;return{c(){e=m("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
<div class="content txt-bold"><p>Successfully changed the user email address.</p>
<p>You can now sign in with your new email address.</p></div>`,t=h(),l=_("button"),l.textContent="Close",d(e,"class","alert alert-success"),d(l,"type","button"),d(l,"class","btn btn-transparent btn-block")},m(o,c){m(o,e,c),m(o,t,c),m(o,l,c),s||(n=P(l,"click",r[6]),s=!0)},p:E,i:E,o:E,d(o){o&&b(e),o&&b(t),o&&b(l),s=!1,n()}}}function H(r){let e,t,l;return{c(){e=C("to "),t=_("strong"),l=C(r[3]),d(t,"class","txt-nowrap")},m(s,n){m(s,e,n),m(s,t,n),k(t,l)},p(s,n){n&8&&O(l,s[3])},d(s){s&&b(e),s&&b(t)}}}function V(r){let e,t,l,s,n,o,c,a;return{c(){e=_("label"),t=C("Password"),s=h(),n=_("input"),d(e,"for",l=r[8]),d(n,"type","password"),d(n,"id",o=r[8]),n.required=!0,n.autofocus=!0},m(i,u){m(i,e,u),k(e,t),m(i,s,u),m(i,n,u),F(n,r[0]),n.focus(),c||(a=P(n,"input",r[7]),c=!0)},p(i,u){u&256&&l!==(l=i[8])&&d(e,"for",l),u&256&&o!==(o=i[8])&&d(n,"id",o),u&1&&n.value!==i[0]&&F(n,i[0])},d(i){i&&b(e),i&&b(s),i&&b(n),c=!1,a()}}}function X(r){let e,t,l,s;const n=[U,Q],o=[];function c(a,i){return a[2]?0:1}return e=c(r),t=o[e]=n[e](r),{c(){t.c(),l=N()},m(a,i){o[e].m(a,i),m(a,l,i),s=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(W(),y(o[u],1,1,()=>{o[u]=null}),Y(),t=o[e],t?t.p(a,i):(t=o[e]=n[e](a),t.c()),v(t,1),t.m(l.parentNode,l))},i(a){s||(v(t),s=!0)},o(a){y(t),s=!1},d(a){o[e].d(a),a&&b(l)}}}function Z(r){let e,t;return e=new J({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(l,s){L(e,l,s),t=!0},p(l,[s]){const n={};s&527&&(n.$$scope={dirty:s,ctx:l}),e.$set(n)},i(l){t||(v(e.$$.fragment,l),t=!0)},o(l){y(e.$$.fragment,l),t=!1},d(l){R(e,l)}}}function x(r,e,t){let l,{params:s}=e,n="",o=!1,c=!1;async function a(){if(o)return;t(1,o=!0);const g=new j("../");try{const $=A(s==null?void 0:s.token);await g.collection($.collectionId).confirmEmailChange(s==null?void 0:s.token,n),t(2,c=!0)}catch($){B.errorResponseHandler($)}t(1,o=!1)}const i=()=>window.close();function u(){n=this.value,t(0,n)}return r.$$set=g=>{"params"in g&&t(5,s=g.params)},r.$$.update=()=>{r.$$.dirty&32&&t(3,l=M.getJWTPayload(s==null?void 0:s.token).newEmail||"")},[n,o,c,l,a,s,i,u]}class te extends z{constructor(e){super(),G(this,e,x,Z,I,{params:5})}}export{te as default};
<p>You can now sign in with your new email address.</p></div>`,t=h(),l=m("button"),l.textContent="Close",d(e,"class","alert alert-success"),d(l,"type","button"),d(l,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,t,c),_(o,l,c),s||(n=P(l,"click",r[6]),s=!0)},p:E,i:E,o:E,d(o){o&&b(e),o&&b(t),o&&b(l),s=!1,n()}}}function H(r){let e,t,l;return{c(){e=C("to "),t=m("strong"),l=C(r[3]),d(t,"class","txt-nowrap")},m(s,n){_(s,e,n),_(s,t,n),k(t,l)},p(s,n){n&8&&O(l,s[3])},d(s){s&&b(e),s&&b(t)}}}function V(r){let e,t,l,s,n,o,c,a;return{c(){e=m("label"),t=C("Password"),s=h(),n=m("input"),d(e,"for",l=r[8]),d(n,"type","password"),d(n,"id",o=r[8]),n.required=!0,n.autofocus=!0},m(i,u){_(i,e,u),k(e,t),_(i,s,u),_(i,n,u),F(n,r[0]),n.focus(),c||(a=P(n,"input",r[7]),c=!0)},p(i,u){u&256&&l!==(l=i[8])&&d(e,"for",l),u&256&&o!==(o=i[8])&&d(n,"id",o),u&1&&n.value!==i[0]&&F(n,i[0])},d(i){i&&b(e),i&&b(s),i&&b(n),c=!1,a()}}}function X(r){let e,t,l,s;const n=[U,Q],o=[];function c(a,i){return a[2]?0:1}return e=c(r),t=o[e]=n[e](r),{c(){t.c(),l=N()},m(a,i){o[e].m(a,i),_(a,l,i),s=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(W(),y(o[u],1,1,()=>{o[u]=null}),Y(),t=o[e],t?t.p(a,i):(t=o[e]=n[e](a),t.c()),v(t,1),t.m(l.parentNode,l))},i(a){s||(v(t),s=!0)},o(a){y(t),s=!1},d(a){o[e].d(a),a&&b(l)}}}function Z(r){let e,t;return e=new J({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:r}}}),{c(){R(e.$$.fragment)},m(l,s){S(e,l,s),t=!0},p(l,[s]){const n={};s&527&&(n.$$scope={dirty:s,ctx:l}),e.$set(n)},i(l){t||(v(e.$$.fragment,l),t=!0)},o(l){y(e.$$.fragment,l),t=!1},d(l){L(e,l)}}}function x(r,e,t){let l,{params:s}=e,n="",o=!1,c=!1;async function a(){if(o)return;t(1,o=!0);const g=new j("../");try{const $=A(s==null?void 0:s.token);await g.collection($.collectionId).confirmEmailChange(s==null?void 0:s.token,n),t(2,c=!0)}catch($){B.errorResponseHandler($)}t(1,o=!1)}const i=()=>window.close();function u(){n=this.value,t(0,n)}return r.$$set=g=>{"params"in g&&t(5,s=g.params)},r.$$.update=()=>{r.$$.dirty&32&&t(3,l=M.getJWTPayload(s==null?void 0:s.token).newEmail||"")},[n,o,c,l,a,s,i,u]}class te extends z{constructor(e){super(),G(this,e,x,Z,I,{params:5})}}export{te as default};

View File

@ -1,4 +1,4 @@
import{S as J,i as M,s as W,F as Y,c as H,m as N,t as y,a as q,d as T,C as j,E as A,g as _,k as B,n as D,o as m,_ as K,G as O,p as Q,q as E,e as b,w as R,b as P,f as p,r as G,h as w,u as S,v as U,y as F,x as V,z as h}from"./index-e5007277.js";function X(r){let e,l,s,n,t,o,c,a,i,u,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=R(`Reset your user password
import{S as J,i as M,s as W,F as Y,c as H,m as N,t as y,a as q,d as T,C as j,E as A,g as _,k as B,n as D,o as m,R as K,G as O,p as Q,q as E,e as b,w as R,b as P,f as p,r as G,h as w,u as S,v as U,y as F,x as V,z as h}from"./index-7275477a.js";function X(r){let e,l,s,n,t,o,c,a,i,u,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=R(`Reset your user password
`),d&&d.c(),t=P(),H(o.$$.fragment),c=P(),H(a.$$.fragment),i=P(),u=b("button"),v=b("span"),v.textContent="Set new password",p(l,"class","content txt-center m-b-base"),p(v,"class","txt"),p(u,"type","submit"),p(u,"class","btn btn-lg btn-block"),u.disabled=r[2],G(u,"btn-loading",r[2])},m(f,$){_(f,e,$),w(e,l),w(l,s),w(s,n),d&&d.m(s,null),w(e,t),N(o,e,null),w(e,c),N(a,e,null),w(e,i),w(e,u),w(u,v),k=!0,g||(C=S(e,"submit",U(r[5])),g=!0)},p(f,$){f[4]?d?d.p(f,$):(d=I(f),d.c(),d.m(s,null)):d&&(d.d(1),d=null);const L={};$&3073&&(L.$$scope={dirty:$,ctx:f}),o.$set(L);const z={};$&3074&&(z.$$scope={dirty:$,ctx:f}),a.$set(z),(!k||$&4)&&(u.disabled=f[2]),(!k||$&4)&&G(u,"btn-loading",f[2])},i(f){k||(y(o.$$.fragment,f),y(a.$$.fragment,f),k=!0)},o(f){q(o.$$.fragment,f),q(a.$$.fragment,f),k=!1},d(f){f&&m(e),d&&d.d(),T(o),T(a),g=!1,C()}}}function Z(r){let e,l,s,n,t;return{c(){e=b("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
<div class="content txt-bold"><p>Successfully changed the user password.</p>
<p>You can now sign in with your new password.</p></div>`,l=P(),s=b("button"),s.textContent="Close",p(e,"class","alert alert-success"),p(s,"type","button"),p(s,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,l,c),_(o,s,c),n||(t=S(s,"click",r[7]),n=!0)},p:F,i:F,o:F,d(o){o&&m(e),o&&m(l),o&&m(s),n=!1,t()}}}function I(r){let e,l,s;return{c(){e=R("for "),l=b("strong"),s=R(r[4])},m(n,t){_(n,e,t),_(n,l,t),w(l,s)},p(n,t){t&16&&V(s,n[4])},d(n){n&&m(e),n&&m(l)}}}function x(r){let e,l,s,n,t,o,c,a;return{c(){e=b("label"),l=R("New password"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0,t.autofocus=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[0]),t.focus(),c||(a=S(t,"input",r[8]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&1&&t.value!==i[0]&&h(t,i[0])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function ee(r){let e,l,s,n,t,o,c,a;return{c(){e=b("label"),l=R("New password confirm"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[1]),c||(a=S(t,"input",r[9]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&2&&t.value!==i[1]&&h(t,i[1])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function te(r){let e,l,s,n;const t=[Z,X],o=[];function c(a,i){return a[3]?0:1}return e=c(r),l=o[e]=t[e](r),{c(){l.c(),s=A()},m(a,i){o[e].m(a,i),_(a,s,i),n=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(B(),q(o[u],1,1,()=>{o[u]=null}),D(),l=o[e],l?l.p(a,i):(l=o[e]=t[e](a),l.c()),y(l,1),l.m(s.parentNode,s))},i(a){n||(y(l),n=!0)},o(a){q(l),n=!1},d(a){o[e].d(a),a&&m(s)}}}function se(r){let e,l;return e=new Y({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:r}}}),{c(){H(e.$$.fragment)},m(s,n){N(e,s,n),l=!0},p(s,[n]){const t={};n&2079&&(t.$$scope={dirty:n,ctx:s}),e.$set(t)},i(s){l||(y(e.$$.fragment,s),l=!0)},o(s){q(e.$$.fragment,s),l=!1},d(s){T(e,s)}}}function le(r,e,l){let s,{params:n}=e,t="",o="",c=!1,a=!1;async function i(){if(c)return;l(2,c=!0);const g=new K("../");try{const C=O(n==null?void 0:n.token);await g.collection(C.collectionId).confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,a=!0)}catch(C){Q.errorResponseHandler(C)}l(2,c=!1)}const u=()=>window.close();function v(){t=this.value,l(0,t)}function k(){o=this.value,l(1,o)}return r.$$set=g=>{"params"in g&&l(6,n=g.params)},r.$$.update=()=>{r.$$.dirty&64&&l(4,s=j.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,a,s,i,n,u,v,k]}class oe extends J{constructor(e){super(),M(this,e,le,se,W,{params:6})}}export{oe as default};

View File

@ -1,3 +1,3 @@
import{S as v,i as y,s as w,F as g,c as x,m as C,t as $,a as L,d as P,_ as T,G as H,E as M,g as r,o as a,e as u,b as m,f,u as b,y as p}from"./index-e5007277.js";function S(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-error-warning-line"></i></div>
<div class="content txt-bold"><p>Invalid or expired verification token.</p></div>`,s=m(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-danger"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[4]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function F(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
<div class="content txt-bold"><p>Successfully verified email address.</p></div>`,s=m(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[3]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function I(o){let t;return{c(){t=u("div"),t.innerHTML='<div class="loader loader-lg"><em>Please wait...</em></div>',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function V(o){let t;function s(l,i){return l[1]?I:l[0]?F:S}let e=s(o),n=e(o);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),r(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){n.d(l),l&&a(t)}}}function q(o){let t,s;return t=new g({props:{nobranding:!0,$$slots:{default:[V]},$$scope:{ctx:o}}}),{c(){x(t.$$.fragment)},m(e,n){C(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){L(t.$$.fragment,e),s=!1},d(e){P(t,e)}}}function E(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new T("../");try{const _=H(e==null?void 0:e.token);await d.collection(_.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const c=()=>window.close(),k=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,l,e,c,k]}class N extends v{constructor(t){super(),y(this,t,E,q,w,{params:2})}}export{N as default};
import{S as v,i as y,s as w,F as g,c as x,m as C,t as $,a as L,d as P,R as T,G as H,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-7275477a.js";function S(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-error-warning-line"></i></div>
<div class="content txt-bold"><p>Invalid or expired verification token.</p></div>`,s=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-danger"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[4]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function F(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
<div class="content txt-bold"><p>Successfully verified email address.</p></div>`,s=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[3]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function I(o){let t;return{c(){t=u("div"),t.innerHTML='<div class="loader loader-lg"><em>Please wait...</em></div>',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function R(o){let t;function s(l,i){return l[1]?I:l[0]?F:S}let e=s(o),n=e(o);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),r(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){n.d(l),l&&a(t)}}}function V(o){let t,s;return t=new g({props:{nobranding:!0,$$slots:{default:[R]},$$scope:{ctx:o}}}),{c(){x(t.$$.fragment)},m(e,n){C(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){L(t.$$.fragment,e),s=!1},d(e){P(t,e)}}}function q(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new T("../");try{const m=H(e==null?void 0:e.token);await d.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const c=()=>window.close(),k=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,l,e,c,k]}class G extends v{constructor(t){super(),y(this,t,q,V,w,{params:2})}}export{G as default};

View File

@ -1,4 +1,4 @@
import{S as re,i as ae,s as be,M as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,R as me,p as de}from"./index-e5007277.js";import{S as fe}from"./SdkTabs-e5fbf56f.js";function $e(o){var B,U,W,A,H,L,M,T,q,j,J,N;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:`
import{S as re,i as ae,s as be,M as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,T as me,p as de}from"./index-7275477a.js";import{S as fe}from"./SdkTabs-3e2121ec.js";function $e(o){var B,U,W,T,A,H,L,M,q,j,J,N;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[1]}');
@ -19,9 +19,9 @@ import{S as re,i as ae,s as be,M as ue,C as P,e as u,w as y,b as a,c as te,f as
});
// Unsubscribe
pb.collection('${(A=o[0])==null?void 0:A.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions
pb.collection('${(H=o[0])==null?void 0:H.name}').unsubscribe('*'); // remove all '*' topic subscriptions
pb.collection('${(L=o[0])==null?void 0:L.name}').unsubscribe(); // remove all subscriptions in the collection
pb.collection('${(T=o[0])==null?void 0:T.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions
pb.collection('${(A=o[0])==null?void 0:A.name}').unsubscribe('*'); // remove all '*' topic subscriptions
pb.collection('${(H=o[0])==null?void 0:H.name}').unsubscribe(); // remove all subscriptions in the collection
`,dart:`
import 'package:pocketbase/pocketbase.dart';
@ -32,8 +32,8 @@ import{S as re,i as ae,s as be,M as ue,C as P,e as u,w as y,b as a,c as te,f as
// (Optionally) authenticate
await pb.collection('users').authWithPassword('test@example.com', '123456');
// Subscribe to changes in any ${(M=o[0])==null?void 0:M.name} record
pb.collection('${(T=o[0])==null?void 0:T.name}').subscribe('*', (e) {
// Subscribe to changes in any ${(L=o[0])==null?void 0:L.name} record
pb.collection('${(M=o[0])==null?void 0:M.name}').subscribe('*', (e) {
console.log(e.record);
});

View File

@ -1,4 +1,4 @@
import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as L,N as ve,O as Se,k as Me,P as Re,n as Ae,t as x,a as ee,o as d,d as ye,R as We,C as ze,p as He,r as N,u as Oe,M as Ue}from"./index-e5007277.js";import{S as je}from"./SdkTabs-e5fbf56f.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&d(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&N(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&d(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,G,g,H,le,O,E,se,J,U=o[0].name+"",Q,ae,oe,j,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],ce=new Map,y;P=new je({props:{js:`
import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as L,N as ve,O as Se,k as Me,P as Re,n as Ae,t as x,a as ee,o as d,d as ye,T as We,C as ze,p as He,r as N,u as Oe,M as Ue}from"./index-7275477a.js";import{S as je}from"./SdkTabs-3e2121ec.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&d(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&N(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&d(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,G,g,H,le,O,E,se,J,U=o[0].name+"",Q,ae,oe,j,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],ce=new Map,y;P=new je({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[3]}');

View File

@ -1,4 +1,4 @@
import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n,m as we,x as I,N as me,O as Re,k as ge,P as ye,n as Be,t as Z,a as x,o as f,d as he,R as Ce,C as Se,p as Te,r as L,u as Me,M as Ae}from"./index-e5007277.js";import{S as Ue}from"./SdkTabs-e5fbf56f.js";function ue(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:a,first:null,c(){l=r("button"),_=h(o),u=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(P,l,$),n(l,_),n(l,u),i||(p=Me(l,"click",m),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&f(l),i=!1,p()}}}function ke(a,s){let l,o,_,u;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),we(o,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),o.$set(m),(!u||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){u||(Z(o.$$.fragment,i),u=!0)},o(i){x(o.$$.fragment,i),u=!1},d(i){i&&f(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,u,i,p,m,P,$,D=a[0].name+"",N,ee,z,q,G,B,J,R,H,te,O,C,se,K,E=a[0].name+"",Q,le,V,S,W,T,X,M,Y,g,A,w=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:`
import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n,m as we,x as I,N as ue,O as ge,k as ye,P as Re,n as Be,t as Z,a as x,o as f,d as he,T as Ce,C as Se,p as Te,r as L,u as Me,M as Ae}from"./index-7275477a.js";import{S as Ue}from"./SdkTabs-3e2121ec.js";function me(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,m,i,p;function u(){return s[4](s[5])}return{key:a,first:null,c(){l=r("button"),_=h(o),m=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(P,l,$),n(l,_),n(l,m),i||(p=Me(l,"click",u),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&f(l),i=!1,p()}}}function ke(a,s){let l,o,_,m;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),we(o,l,null),n(l,_),m=!0},p(i,p){s=i;const u={};p&4&&(u.content=s[5].body),o.$set(u),(!m||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){m||(Z(o.$$.fragment,i),m=!0)},o(i){x(o.$$.fragment,i),m=!1},d(i){i&&f(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,m,i,p,u,P,$,D=a[0].name+"",N,ee,z,q,G,B,J,g,H,te,O,C,se,K,E=a[0].name+"",Q,le,V,S,W,T,X,M,Y,y,A,w=[],oe=new Map,ae,U,k=[],ne=new Map,R;q=new Ue({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${a[3]}');
@ -14,13 +14,13 @@ import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n
...
await pb.collection('${(de=a[0])==null?void 0:de.name}').requestPasswordReset('test@example.com');
`}});let F=a[2];const ie=e=>e[5].code;for(let e=0;e<F.length;e+=1){let t=be(a,F,e),c=ie(t);oe.set(c,w[e]=_e(c,t))}let j=a[2];const ce=e=>e[5].code;for(let e=0;e<j.length;e+=1){let t=ue(a,j,e),c=ce(t);ne.set(c,k[e]=ke(c,t))}return{c(){s=r("h3"),l=h("Request password reset ("),_=h(o),u=h(")"),i=v(),p=r("div"),m=r("p"),P=h("Sends "),$=r("strong"),N=h(D),ee=h(" password reset email request."),z=v(),ve(q.$$.fragment),G=v(),B=r("h6"),B.textContent="API details",J=v(),R=r("div"),H=r("strong"),H.textContent="POST",te=v(),O=r("div"),C=r("p"),se=h("/api/collections/"),K=r("strong"),Q=h(E),le=h("/request-password-reset"),V=v(),S=r("div"),S.textContent="Body Parameters",W=v(),T=r("table"),T.innerHTML=`<thead><tr><th>Param</th>
`}});let F=a[2];const ie=e=>e[5].code;for(let e=0;e<F.length;e+=1){let t=be(a,F,e),c=ie(t);oe.set(c,w[e]=_e(c,t))}let j=a[2];const ce=e=>e[5].code;for(let e=0;e<j.length;e+=1){let t=me(a,j,e),c=ce(t);ne.set(c,k[e]=ke(c,t))}return{c(){s=r("h3"),l=h("Request password reset ("),_=h(o),m=h(")"),i=v(),p=r("div"),u=r("p"),P=h("Sends "),$=r("strong"),N=h(D),ee=h(" password reset email request."),z=v(),ve(q.$$.fragment),G=v(),B=r("h6"),B.textContent="API details",J=v(),g=r("div"),H=r("strong"),H.textContent="POST",te=v(),O=r("div"),C=r("p"),se=h("/api/collections/"),K=r("strong"),Q=h(E),le=h("/request-password-reset"),V=v(),S=r("div"),S.textContent="Body Parameters",W=v(),T=r("table"),T.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="50%">Description</th></tr></thead>
<tbody><tr><td><div class="inline-flex"><span class="label label-success">Required</span>
<span>email</span></div></td>
<td><span class="label">String</span></td>
<td>The auth record email address to send the password reset request (if exists).</td></tr></tbody>`,X=v(),M=r("div"),M.textContent="Responses",Y=v(),g=r("div"),A=r("div");for(let e=0;e<w.length;e+=1)w[e].c();ae=v(),U=r("div");for(let e=0;e<k.length;e+=1)k[e].c();b(s,"class","m-b-sm"),b(p,"class","content txt-lg m-b-sm"),b(B,"class","m-b-xs"),b(H,"class","label label-primary"),b(O,"class","content"),b(R,"class","alert alert-success"),b(S,"class","section-title"),b(T,"class","table-compact table-border m-b-base"),b(M,"class","section-title"),b(A,"class","tabs-header compact left"),b(U,"class","tabs-content"),b(g,"class","tabs")},m(e,t){d(e,s,t),n(s,l),n(s,_),n(s,u),d(e,i,t),d(e,p,t),n(p,m),n(m,P),n(m,$),n($,N),n(m,ee),d(e,z,t),we(q,e,t),d(e,G,t),d(e,B,t),d(e,J,t),d(e,R,t),n(R,H),n(R,te),n(R,O),n(O,C),n(C,se),n(C,K),n(K,Q),n(C,le),d(e,V,t),d(e,S,t),d(e,W,t),d(e,T,t),d(e,X,t),d(e,M,t),d(e,Y,t),d(e,g,t),n(g,A);for(let c=0;c<w.length;c+=1)w[c]&&w[c].m(A,null);n(g,ae),n(g,U);for(let c=0;c<k.length;c+=1)k[c]&&k[c].m(U,null);y=!0},p(e,[t]){var fe,pe;(!y||t&1)&&o!==(o=e[0].name+"")&&I(_,o),(!y||t&1)&&D!==(D=e[0].name+"")&&I(N,D);const c={};t&9&&(c.js=`
<td>The auth record email address to send the password reset request (if exists).</td></tr></tbody>`,X=v(),M=r("div"),M.textContent="Responses",Y=v(),y=r("div"),A=r("div");for(let e=0;e<w.length;e+=1)w[e].c();ae=v(),U=r("div");for(let e=0;e<k.length;e+=1)k[e].c();b(s,"class","m-b-sm"),b(p,"class","content txt-lg m-b-sm"),b(B,"class","m-b-xs"),b(H,"class","label label-primary"),b(O,"class","content"),b(g,"class","alert alert-success"),b(S,"class","section-title"),b(T,"class","table-compact table-border m-b-base"),b(M,"class","section-title"),b(A,"class","tabs-header compact left"),b(U,"class","tabs-content"),b(y,"class","tabs")},m(e,t){d(e,s,t),n(s,l),n(s,_),n(s,m),d(e,i,t),d(e,p,t),n(p,u),n(u,P),n(u,$),n($,N),n(u,ee),d(e,z,t),we(q,e,t),d(e,G,t),d(e,B,t),d(e,J,t),d(e,g,t),n(g,H),n(g,te),n(g,O),n(O,C),n(C,se),n(C,K),n(K,Q),n(C,le),d(e,V,t),d(e,S,t),d(e,W,t),d(e,T,t),d(e,X,t),d(e,M,t),d(e,Y,t),d(e,y,t),n(y,A);for(let c=0;c<w.length;c+=1)w[c]&&w[c].m(A,null);n(y,ae),n(y,U);for(let c=0;c<k.length;c+=1)k[c]&&k[c].m(U,null);R=!0},p(e,[t]){var fe,pe;(!R||t&1)&&o!==(o=e[0].name+"")&&I(_,o),(!R||t&1)&&D!==(D=e[0].name+"")&&I(N,D);const c={};t&9&&(c.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
@ -36,7 +36,7 @@ import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n
...
await pb.collection('${(pe=e[0])==null?void 0:pe.name}').requestPasswordReset('test@example.com');
`),q.$set(c),(!y||t&1)&&E!==(E=e[0].name+"")&&I(Q,E),t&6&&(F=e[2],w=me(w,t,ie,1,e,F,oe,A,Re,_e,null,be)),t&6&&(j=e[2],ge(),k=me(k,t,ce,1,e,j,ne,U,ye,ke,null,ue),Be())},i(e){if(!y){Z(q.$$.fragment,e);for(let t=0;t<j.length;t+=1)Z(k[t]);y=!0}},o(e){x(q.$$.fragment,e);for(let t=0;t<k.length;t+=1)x(k[t]);y=!1},d(e){e&&f(s),e&&f(i),e&&f(p),e&&f(z),he(q,e),e&&f(G),e&&f(B),e&&f(J),e&&f(R),e&&f(V),e&&f(S),e&&f(W),e&&f(T),e&&f(X),e&&f(M),e&&f(Y),e&&f(g);for(let t=0;t<w.length;t+=1)w[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function De(a,s,l){let o,{collection:_=new Ce}=s,u=204,i=[];const p=m=>l(1,u=m.code);return a.$$set=m=>{"collection"in m&&l(0,_=m.collection)},l(3,o=Se.getApiExampleUrl(Te.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:`
`),q.$set(c),(!R||t&1)&&E!==(E=e[0].name+"")&&I(Q,E),t&6&&(F=e[2],w=ue(w,t,ie,1,e,F,oe,A,ge,_e,null,be)),t&6&&(j=e[2],ye(),k=ue(k,t,ce,1,e,j,ne,U,Re,ke,null,me),Be())},i(e){if(!R){Z(q.$$.fragment,e);for(let t=0;t<j.length;t+=1)Z(k[t]);R=!0}},o(e){x(q.$$.fragment,e);for(let t=0;t<k.length;t+=1)x(k[t]);R=!1},d(e){e&&f(s),e&&f(i),e&&f(p),e&&f(z),he(q,e),e&&f(G),e&&f(B),e&&f(J),e&&f(g),e&&f(V),e&&f(S),e&&f(W),e&&f(T),e&&f(X),e&&f(M),e&&f(Y),e&&f(y);for(let t=0;t<w.length;t+=1)w[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function De(a,s,l){let o,{collection:_=new Ce}=s,m=204,i=[];const p=u=>l(1,m=u.code);return a.$$set=u=>{"collection"in u&&l(0,_=u.collection)},l(3,o=Se.getApiExampleUrl(Te.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:`
{
"code": 400,
"message": "Failed to authenticate.",
@ -47,4 +47,4 @@ import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n
}
}
}
`}]),[_,u,i,o,p]}class Ee extends Pe{constructor(s){super(),$e(this,s,De,je,qe,{collection:0})}}export{Ee as default};
`}]),[_,m,i,o,p]}class Ee extends Pe{constructor(s){super(),$e(this,s,De,je,qe,{collection:0})}}export{Ee as default};

View File

@ -1,4 +1,4 @@
import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i,m as he,x as F,N as de,O as ge,k as ye,P as Be,n as Ce,t as Z,a as x,o as m,d as $e,R as Se,C as Te,p as Me,r as I,u as Re,M as Ve}from"./index-e5007277.js";import{S as Ae}from"./SdkTabs-e5fbf56f.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),_=$(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(q,s,w),i(s,_),i(s,p),n||(u=Re(s,"click",d),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&m(s),n=!1,u()}}}function ke(a,l){let s,o,_,p;return o=new Ve({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,u){f(n,s,u),he(o,s,null),i(s,_),p=!0},p(n,u){l=n;const d={};u&4&&(d.content=l[5].body),o.$set(d),(!p||u&6)&&I(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&m(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,u,d,q,w,j=a[0].name+"",L,ee,N,P,z,C,G,g,D,te,H,S,le,J,O=a[0].name+"",K,se,Q,T,W,M,X,R,Y,y,V,h=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:`
import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i,m as he,x as F,N as me,O as ge,k as ye,P as Be,n as Ce,t as Z,a as x,o as u,d as $e,T as Se,C as Te,p as Me,r as I,u as Ve,M as Re}from"./index-7275477a.js";import{S as Ae}from"./SdkTabs-3e2121ec.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,d;function m(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),_=$(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(q,s,w),i(s,_),i(s,p),n||(d=Ve(s,"click",m),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&u(s),n=!1,d()}}}function ke(a,l){let s,o,_,p;return o=new Re({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,d){f(n,s,d),he(o,s,null),i(s,_),p=!0},p(n,d){l=n;const m={};d&4&&(m.content=l[5].body),o.$set(m),(!p||d&6)&&I(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&u(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,d,m,q,w,j=a[0].name+"",L,ee,N,P,z,C,G,g,D,te,H,S,le,J,O=a[0].name+"",K,se,Q,T,W,M,X,V,Y,y,R,h=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${a[3]}');
@ -14,20 +14,20 @@ import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i
...
await pb.collection('${(fe=a[0])==null?void 0:fe.name}').requestVerification('test@example.com');
`}});let E=a[2];const ne=e=>e[5].code;for(let e=0;e<E.length;e+=1){let t=be(a,E,e),c=ne(t);oe.set(c,h[e]=_e(c,t))}let U=a[2];const ce=e=>e[5].code;for(let e=0;e<U.length;e+=1){let t=pe(a,U,e),c=ce(t);ie.set(c,k[e]=ke(c,t))}return{c(){l=r("h3"),s=$("Request verification ("),_=$(o),p=$(")"),n=v(),u=r("div"),d=r("p"),q=$("Sends "),w=r("strong"),L=$(j),ee=$(" verification email request."),N=v(),ve(P.$$.fragment),z=v(),C=r("h6"),C.textContent="API details",G=v(),g=r("div"),D=r("strong"),D.textContent="POST",te=v(),H=r("div"),S=r("p"),le=$("/api/collections/"),J=r("strong"),K=$(O),se=$("/request-verification"),Q=v(),T=r("div"),T.textContent="Body Parameters",W=v(),M=r("table"),M.innerHTML=`<thead><tr><th>Param</th>
`}});let E=a[2];const ne=e=>e[5].code;for(let e=0;e<E.length;e+=1){let t=be(a,E,e),c=ne(t);oe.set(c,h[e]=_e(c,t))}let U=a[2];const ce=e=>e[5].code;for(let e=0;e<U.length;e+=1){let t=pe(a,U,e),c=ce(t);ie.set(c,k[e]=ke(c,t))}return{c(){l=r("h3"),s=$("Request verification ("),_=$(o),p=$(")"),n=v(),d=r("div"),m=r("p"),q=$("Sends "),w=r("strong"),L=$(j),ee=$(" verification email request."),N=v(),ve(P.$$.fragment),z=v(),C=r("h6"),C.textContent="API details",G=v(),g=r("div"),D=r("strong"),D.textContent="POST",te=v(),H=r("div"),S=r("p"),le=$("/api/collections/"),J=r("strong"),K=$(O),se=$("/request-verification"),Q=v(),T=r("div"),T.textContent="Body Parameters",W=v(),M=r("table"),M.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="50%">Description</th></tr></thead>
<tbody><tr><td><div class="inline-flex"><span class="label label-success">Required</span>
<span>email</span></div></td>
<td><span class="label">String</span></td>
<td>The auth record email address to send the verification request (if exists).</td></tr></tbody>`,X=v(),R=r("div"),R.textContent="Responses",Y=v(),y=r("div"),V=r("div");for(let e=0;e<h.length;e+=1)h[e].c();ae=v(),A=r("div");for(let e=0;e<k.length;e+=1)k[e].c();b(l,"class","m-b-sm"),b(u,"class","content txt-lg m-b-sm"),b(C,"class","m-b-xs"),b(D,"class","label label-primary"),b(H,"class","content"),b(g,"class","alert alert-success"),b(T,"class","section-title"),b(M,"class","table-compact table-border m-b-base"),b(R,"class","section-title"),b(V,"class","tabs-header compact left"),b(A,"class","tabs-content"),b(y,"class","tabs")},m(e,t){f(e,l,t),i(l,s),i(l,_),i(l,p),f(e,n,t),f(e,u,t),i(u,d),i(d,q),i(d,w),i(w,L),i(d,ee),f(e,N,t),he(P,e,t),f(e,z,t),f(e,C,t),f(e,G,t),f(e,g,t),i(g,D),i(g,te),i(g,H),i(H,S),i(S,le),i(S,J),i(J,K),i(S,se),f(e,Q,t),f(e,T,t),f(e,W,t),f(e,M,t),f(e,X,t),f(e,R,t),f(e,Y,t),f(e,y,t),i(y,V);for(let c=0;c<h.length;c+=1)h[c]&&h[c].m(V,null);i(y,ae),i(y,A);for(let c=0;c<k.length;c+=1)k[c]&&k[c].m(A,null);B=!0},p(e,[t]){var me,ue;(!B||t&1)&&o!==(o=e[0].name+"")&&F(_,o),(!B||t&1)&&j!==(j=e[0].name+"")&&F(L,j);const c={};t&9&&(c.js=`
<td>The auth record email address to send the verification request (if exists).</td></tr></tbody>`,X=v(),V=r("div"),V.textContent="Responses",Y=v(),y=r("div"),R=r("div");for(let e=0;e<h.length;e+=1)h[e].c();ae=v(),A=r("div");for(let e=0;e<k.length;e+=1)k[e].c();b(l,"class","m-b-sm"),b(d,"class","content txt-lg m-b-sm"),b(C,"class","m-b-xs"),b(D,"class","label label-primary"),b(H,"class","content"),b(g,"class","alert alert-success"),b(T,"class","section-title"),b(M,"class","table-compact table-border m-b-base"),b(V,"class","section-title"),b(R,"class","tabs-header compact left"),b(A,"class","tabs-content"),b(y,"class","tabs")},m(e,t){f(e,l,t),i(l,s),i(l,_),i(l,p),f(e,n,t),f(e,d,t),i(d,m),i(m,q),i(m,w),i(w,L),i(m,ee),f(e,N,t),he(P,e,t),f(e,z,t),f(e,C,t),f(e,G,t),f(e,g,t),i(g,D),i(g,te),i(g,H),i(H,S),i(S,le),i(S,J),i(J,K),i(S,se),f(e,Q,t),f(e,T,t),f(e,W,t),f(e,M,t),f(e,X,t),f(e,V,t),f(e,Y,t),f(e,y,t),i(y,R);for(let c=0;c<h.length;c+=1)h[c]&&h[c].m(R,null);i(y,ae),i(y,A);for(let c=0;c<k.length;c+=1)k[c]&&k[c].m(A,null);B=!0},p(e,[t]){var ue,de;(!B||t&1)&&o!==(o=e[0].name+"")&&F(_,o),(!B||t&1)&&j!==(j=e[0].name+"")&&F(L,j);const c={};t&9&&(c.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
...
await pb.collection('${(me=e[0])==null?void 0:me.name}').requestVerification('test@example.com');
await pb.collection('${(ue=e[0])==null?void 0:ue.name}').requestVerification('test@example.com');
`),t&9&&(c.dart=`
import 'package:pocketbase/pocketbase.dart';
@ -35,8 +35,8 @@ import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i
...
await pb.collection('${(ue=e[0])==null?void 0:ue.name}').requestVerification('test@example.com');
`),P.$set(c),(!B||t&1)&&O!==(O=e[0].name+"")&&F(K,O),t&6&&(E=e[2],h=de(h,t,ne,1,e,E,oe,V,ge,_e,null,be)),t&6&&(U=e[2],ye(),k=de(k,t,ce,1,e,U,ie,A,Be,ke,null,pe),Ce())},i(e){if(!B){Z(P.$$.fragment,e);for(let t=0;t<U.length;t+=1)Z(k[t]);B=!0}},o(e){x(P.$$.fragment,e);for(let t=0;t<k.length;t+=1)x(k[t]);B=!1},d(e){e&&m(l),e&&m(n),e&&m(u),e&&m(N),$e(P,e),e&&m(z),e&&m(C),e&&m(G),e&&m(g),e&&m(Q),e&&m(T),e&&m(W),e&&m(M),e&&m(X),e&&m(R),e&&m(Y),e&&m(y);for(let t=0;t<h.length;t+=1)h[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function je(a,l,s){let o,{collection:_=new Se}=l,p=204,n=[];const u=d=>s(1,p=d.code);return a.$$set=d=>{"collection"in d&&s(0,_=d.collection)},s(3,o=Te.getApiExampleUrl(Me.baseUrl)),s(2,n=[{code:204,body:"null"},{code:400,body:`
await pb.collection('${(de=e[0])==null?void 0:de.name}').requestVerification('test@example.com');
`),P.$set(c),(!B||t&1)&&O!==(O=e[0].name+"")&&F(K,O),t&6&&(E=e[2],h=me(h,t,ne,1,e,E,oe,R,ge,_e,null,be)),t&6&&(U=e[2],ye(),k=me(k,t,ce,1,e,U,ie,A,Be,ke,null,pe),Ce())},i(e){if(!B){Z(P.$$.fragment,e);for(let t=0;t<U.length;t+=1)Z(k[t]);B=!0}},o(e){x(P.$$.fragment,e);for(let t=0;t<k.length;t+=1)x(k[t]);B=!1},d(e){e&&u(l),e&&u(n),e&&u(d),e&&u(N),$e(P,e),e&&u(z),e&&u(C),e&&u(G),e&&u(g),e&&u(Q),e&&u(T),e&&u(W),e&&u(M),e&&u(X),e&&u(V),e&&u(Y),e&&u(y);for(let t=0;t<h.length;t+=1)h[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function je(a,l,s){let o,{collection:_=new Se}=l,p=204,n=[];const d=m=>s(1,p=m.code);return a.$$set=m=>{"collection"in m&&s(0,_=m.collection)},s(3,o=Te.getApiExampleUrl(Me.baseUrl)),s(2,n=[{code:204,body:"null"},{code:400,body:`
{
"code": 400,
"message": "Failed to authenticate.",
@ -47,4 +47,4 @@ import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i
}
}
}
`}]),[_,p,n,o,u]}class Oe extends qe{constructor(l){super(),we(this,l,je,Ue,Pe,{collection:0})}}export{Oe as default};
`}]),[_,p,n,o,d]}class Oe extends qe{constructor(l){super(),we(this,l,je,Ue,Pe,{collection:0})}}export{Oe as default};

View File

@ -1 +1 @@
import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,N as C,O as J,k as O,P as Y,n as z,t as N,a as P,o as w,w as E,r as S,u as A,x as R,M as G,c as H,m as L,d as Q}from"./index-e5007277.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function M(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function T(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=j(),h(n,"href",f=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&w(l),Q(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=o[2];const p=t=>t[6].language;for(let t=0;t<f.length;t+=1){let a=K(o,f,t),u=p(a);g.set(u,s[t]=M(u,a))}let d=o[2];const b=t=>t[6].language;for(let t=0;t<d.length;t+=1){let a=D(o,d,t),u=b(a);k.set(u,n[t]=T(u,a))}return{c(){e=v("div"),l=v("div");for(let t=0;t<s.length;t+=1)s[t].c();r=j(),i=v("div");for(let t=0;t<n.length;t+=1)n[t].c();h(l,"class","tabs-header compact left"),h(i,"class","tabs-content"),h(e,"class",c="tabs sdk-tabs "+o[0]+" svelte-1maocj6")},m(t,a){y(t,e,a),m(e,l);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(l,null);m(e,r),m(e,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(i,null);_=!0},p(t,[a]){a&6&&(f=t[2],s=C(s,a,p,1,t,f,g,l,J,M,null,K)),a&6&&(d=t[2],O(),n=C(n,a,b,1,t,d,k,i,Y,T,null,D),z()),(!_||a&1&&c!==(c="tabs sdk-tabs "+t[0]+" svelte-1maocj6"))&&h(e,"class",c)},i(t){if(!_){for(let a=0;a<d.length;a+=1)N(n[a]);_=!0}},o(t){for(let a=0;a<n.length;a+=1)P(n[a]);_=!1},d(t){t&&w(e);for(let a=0;a<s.length;a+=1)s[a].d();for(let a=0;a<n.length;a+=1)n[a].d()}}}const I="pb_sdk_preference";function V(o,e,l){let s,{class:g="m-b-base"}=e,{js:r=""}=e,{dart:i=""}=e,n=localStorage.getItem(I)||"javascript";const k=c=>l(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(I,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S};
import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,N as C,O as J,k as O,P as Y,n as z,t as N,a as P,o as w,w as E,r as S,u as A,x as R,M as G,c as H,m as L,d as Q}from"./index-7275477a.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function M(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function T(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=j(),h(n,"href",f=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&w(l),Q(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=o[2];const p=t=>t[6].language;for(let t=0;t<f.length;t+=1){let a=K(o,f,t),u=p(a);g.set(u,s[t]=M(u,a))}let d=o[2];const b=t=>t[6].language;for(let t=0;t<d.length;t+=1){let a=D(o,d,t),u=b(a);k.set(u,n[t]=T(u,a))}return{c(){e=v("div"),l=v("div");for(let t=0;t<s.length;t+=1)s[t].c();r=j(),i=v("div");for(let t=0;t<n.length;t+=1)n[t].c();h(l,"class","tabs-header compact left"),h(i,"class","tabs-content"),h(e,"class",c="tabs sdk-tabs "+o[0]+" svelte-1maocj6")},m(t,a){y(t,e,a),m(e,l);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(l,null);m(e,r),m(e,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(i,null);_=!0},p(t,[a]){a&6&&(f=t[2],s=C(s,a,p,1,t,f,g,l,J,M,null,K)),a&6&&(d=t[2],O(),n=C(n,a,b,1,t,d,k,i,Y,T,null,D),z()),(!_||a&1&&c!==(c="tabs sdk-tabs "+t[0]+" svelte-1maocj6"))&&h(e,"class",c)},i(t){if(!_){for(let a=0;a<d.length;a+=1)N(n[a]);_=!0}},o(t){for(let a=0;a<n.length;a+=1)P(n[a]);_=!1},d(t){t&&w(e);for(let a=0;a<s.length;a+=1)s[a].d();for(let a=0;a<n.length;a+=1)n[a].d()}}}const I="pb_sdk_preference";function V(o,e,l){let s,{class:g="m-b-base"}=e,{js:r=""}=e,{dart:i=""}=e,n=localStorage.getItem(I)||"javascript";const k=c=>l(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(I,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S};

View File

@ -1,80 +0,0 @@
import{S as qe,i as Me,s as Oe,e as i,w as v,b as h,c as Se,f,g as d,h as s,m as Be,x as j,N as ye,O as De,k as We,P as ze,n as He,t as le,a as oe,o as u,d as Ue,R as Le,C as Re,p as je,r as I,u as Ie,M as Ne}from"./index-e5007277.js";import{S as Ke}from"./SdkTabs-e5fbf56f.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Te(n,l){let o,a=l[5].code+"",_,b,c,p;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&j(_,a),P&6&&I(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Ee(n,l){let o,a,_,b;return a=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),a.$set(m),(!b||p&6)&&I(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&u(o),Ue(a)}}}function Fe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,m,$,P,D=n[0].name+"",N,se,ae,K,F,A,G,E,J,w,W,ne,z,y,ie,Q,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,C,q,g=[],ue=new Map,pe,M,k=[],me=new Map,T;A=new Ke({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${n[3]}');
...
await pb.collection('${(he=n[0])==null?void 0:he.name}').authWithPassword('test@example.com', '123456');
await pb.collection('${(_e=n[0])==null?void 0:_e.name}').unlinkExternalAuth(
pb.authStore.model.id,
'google'
);
`,dart:`
import 'package:pocketbase/pocketbase.dart';
final pb = PocketBase('${n[3]}');
...
await pb.collection('${(ke=n[0])==null?void 0:ke.name}').authWithPassword('test@example.com', '123456');
await pb.collection('${(ve=n[0])==null?void 0:ve.name}').unlinkExternalAuth(
pb.authStore.model.id,
'google',
);
`}});let R=n[2];const fe=e=>e[5].code;for(let e=0;e<R.length;e+=1){let t=Ce(n,R,e),r=fe(t);ue.set(r,g[e]=Te(r,t))}let O=n[2];const be=e=>e[5].code;for(let e=0;e<O.length;e+=1){let t=Ae(n,O,e),r=be(t);me.set(r,k[e]=Ee(r,t))}return{c(){l=i("h3"),o=v("Unlink OAuth2 account ("),_=v(a),b=v(")"),c=h(),p=i("div"),m=i("p"),$=v("Unlink a single external OAuth2 provider from "),P=i("strong"),N=v(D),se=v(" record."),ae=h(),K=i("p"),K.textContent="Only admins and the account owner can access this action.",F=h(),Se(A.$$.fragment),G=h(),E=i("h6"),E.textContent="API details",J=h(),w=i("div"),W=i("strong"),W.textContent="DELETE",ne=h(),z=i("div"),y=i("p"),ie=v("/api/collections/"),Q=i("strong"),V=v(H),ce=v("/records/"),X=i("strong"),X.textContent=":id",re=v("/external-auths/"),Y=i("strong"),Y.textContent=":provider",de=h(),L=i("p"),L.innerHTML="Requires <code>Authorization:TOKEN</code> header",Z=h(),S=i("div"),S.textContent="Path Parameters",x=h(),B=i("table"),B.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr></thead>
<tbody><tr><td>id</td>
<td><span class="label">String</span></td>
<td>ID of the auth record.</td></tr>
<tr><td>provider</td>
<td><span class="label">String</span></td>
<td>The name of the auth provider to unlink, eg. <code>google</code>, <code>twitter</code>,
<code>github</code>, etc.</td></tr></tbody>`,ee=h(),U=i("div"),U.textContent="Responses",te=h(),C=i("div"),q=i("div");for(let e=0;e<g.length;e+=1)g[e].c();pe=h(),M=i("div");for(let e=0;e<k.length;e+=1)k[e].c();f(l,"class","m-b-sm"),f(p,"class","content txt-lg m-b-sm"),f(E,"class","m-b-xs"),f(W,"class","label label-primary"),f(z,"class","content"),f(L,"class","txt-hint txt-sm txt-right"),f(w,"class","alert alert-danger"),f(S,"class","section-title"),f(B,"class","table-compact table-border m-b-base"),f(U,"class","section-title"),f(q,"class","tabs-header compact left"),f(M,"class","tabs-content"),f(C,"class","tabs")},m(e,t){d(e,l,t),s(l,o),s(l,_),s(l,b),d(e,c,t),d(e,p,t),s(p,m),s(m,$),s(m,P),s(P,N),s(m,se),s(p,ae),s(p,K),d(e,F,t),Be(A,e,t),d(e,G,t),d(e,E,t),d(e,J,t),d(e,w,t),s(w,W),s(w,ne),s(w,z),s(z,y),s(y,ie),s(y,Q),s(Q,V),s(y,ce),s(y,X),s(y,re),s(y,Y),s(w,de),s(w,L),d(e,Z,t),d(e,S,t),d(e,x,t),d(e,B,t),d(e,ee,t),d(e,U,t),d(e,te,t),d(e,C,t),s(C,q);for(let r=0;r<g.length;r+=1)g[r]&&g[r].m(q,null);s(C,pe),s(C,M);for(let r=0;r<k.length;r+=1)k[r]&&k[r].m(M,null);T=!0},p(e,[t]){var ge,we,$e,Pe;(!T||t&1)&&a!==(a=e[0].name+"")&&j(_,a),(!T||t&1)&&D!==(D=e[0].name+"")&&j(N,D);const r={};t&9&&(r.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
...
await pb.collection('${(ge=e[0])==null?void 0:ge.name}').authWithPassword('test@example.com', '123456');
await pb.collection('${(we=e[0])==null?void 0:we.name}').unlinkExternalAuth(
pb.authStore.model.id,
'google'
);
`),t&9&&(r.dart=`
import 'package:pocketbase/pocketbase.dart';
final pb = PocketBase('${e[3]}');
...
await pb.collection('${($e=e[0])==null?void 0:$e.name}').authWithPassword('test@example.com', '123456');
await pb.collection('${(Pe=e[0])==null?void 0:Pe.name}').unlinkExternalAuth(
pb.authStore.model.id,
'google',
);
`),A.$set(r),(!T||t&1)&&H!==(H=e[0].name+"")&&j(V,H),t&6&&(R=e[2],g=ye(g,t,fe,1,e,R,ue,q,De,Te,null,Ce)),t&6&&(O=e[2],We(),k=ye(k,t,be,1,e,O,me,M,ze,Ee,null,Ae),He())},i(e){if(!T){le(A.$$.fragment,e);for(let t=0;t<O.length;t+=1)le(k[t]);T=!0}},o(e){oe(A.$$.fragment,e);for(let t=0;t<k.length;t+=1)oe(k[t]);T=!1},d(e){e&&u(l),e&&u(c),e&&u(p),e&&u(F),Ue(A,e),e&&u(G),e&&u(E),e&&u(J),e&&u(w),e&&u(Z),e&&u(S),e&&u(x),e&&u(B),e&&u(ee),e&&u(U),e&&u(te),e&&u(C);for(let t=0;t<g.length;t+=1)g[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function Ge(n,l,o){let a,{collection:_=new Le}=l,b=204,c=[];const p=m=>o(1,b=m.code);return n.$$set=m=>{"collection"in m&&o(0,_=m.collection)},o(3,a=Re.getApiExampleUrl(je.baseUrl)),o(2,c=[{code:204,body:"null"},{code:401,body:`
{
"code": 401,
"message": "The request requires valid record authorization token to be set.",
"data": {}
}
`},{code:403,body:`
{
"code": 403,
"message": "The authorized record model is not allowed to perform this action.",
"data": {}
}
`},{code:404,body:`
{
"code": 404,
"message": "The requested resource wasn't found.",
"data": {}
}
`}]),[_,b,c,a,p]}class Ve extends qe{constructor(l){super(),Me(this,l,Ge,Fe,Oe,{collection:0})}}export{Ve as default};

View File

@ -0,0 +1,80 @@
import{S as qe,i as Me,s as Oe,e as i,w as v,b as h,c as Se,f as m,g as d,h as s,m as Be,x as I,N as Te,O as De,k as We,P as ze,n as He,t as le,a as oe,o as u,d as Ue,T as Le,C as je,p as Ie,r as N,u as Ne,M as Re}from"./index-7275477a.js";import{S as Ke}from"./SdkTabs-3e2121ec.js";function ye(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l){let o,a=l[5].code+"",_,b,c,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ne(o,"click",f),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&I(_,a),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Ee(n,l){let o,a,_,b;return a=new Re({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!b||p&6)&&N(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&u(o),Ue(a)}}}function Fe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,f,$,P,D=n[0].name+"",R,se,ae,K,F,y,G,E,J,w,W,ne,z,T,ie,Q,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,A,q,g=[],ue=new Map,pe,M,k=[],fe=new Map,C;y=new Ke({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${n[3]}');
...
await pb.collection('${(he=n[0])==null?void 0:he.name}').authWithPassword('test@example.com', '123456');
await pb.collection('${(_e=n[0])==null?void 0:_e.name}').unlinkExternalAuth(
pb.authStore.model.id,
'google'
);
`,dart:`
import 'package:pocketbase/pocketbase.dart';
final pb = PocketBase('${n[3]}');
...
await pb.collection('${(ke=n[0])==null?void 0:ke.name}').authWithPassword('test@example.com', '123456');
await pb.collection('${(ve=n[0])==null?void 0:ve.name}').unlinkExternalAuth(
pb.authStore.model.id,
'google',
);
`}});let j=n[2];const me=e=>e[5].code;for(let e=0;e<j.length;e+=1){let t=Ae(n,j,e),r=me(t);ue.set(r,g[e]=Ce(r,t))}let O=n[2];const be=e=>e[5].code;for(let e=0;e<O.length;e+=1){let t=ye(n,O,e),r=be(t);fe.set(r,k[e]=Ee(r,t))}return{c(){l=i("h3"),o=v("Unlink OAuth2 account ("),_=v(a),b=v(")"),c=h(),p=i("div"),f=i("p"),$=v("Unlink a single external OAuth2 provider from "),P=i("strong"),R=v(D),se=v(" record."),ae=h(),K=i("p"),K.textContent="Only admins and the account owner can access this action.",F=h(),Se(y.$$.fragment),G=h(),E=i("h6"),E.textContent="API details",J=h(),w=i("div"),W=i("strong"),W.textContent="DELETE",ne=h(),z=i("div"),T=i("p"),ie=v("/api/collections/"),Q=i("strong"),V=v(H),ce=v("/records/"),X=i("strong"),X.textContent=":id",re=v("/external-auths/"),Y=i("strong"),Y.textContent=":provider",de=h(),L=i("p"),L.innerHTML="Requires <code>Authorization:TOKEN</code> header",Z=h(),S=i("div"),S.textContent="Path Parameters",x=h(),B=i("table"),B.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr></thead>
<tbody><tr><td>id</td>
<td><span class="label">String</span></td>
<td>ID of the auth record.</td></tr>
<tr><td>provider</td>
<td><span class="label">String</span></td>
<td>The name of the auth provider to unlink, eg. <code>google</code>, <code>twitter</code>,
<code>github</code>, etc.</td></tr></tbody>`,ee=h(),U=i("div"),U.textContent="Responses",te=h(),A=i("div"),q=i("div");for(let e=0;e<g.length;e+=1)g[e].c();pe=h(),M=i("div");for(let e=0;e<k.length;e+=1)k[e].c();m(l,"class","m-b-sm"),m(p,"class","content txt-lg m-b-sm"),m(E,"class","m-b-xs"),m(W,"class","label label-primary"),m(z,"class","content"),m(L,"class","txt-hint txt-sm txt-right"),m(w,"class","alert alert-danger"),m(S,"class","section-title"),m(B,"class","table-compact table-border m-b-base"),m(U,"class","section-title"),m(q,"class","tabs-header compact left"),m(M,"class","tabs-content"),m(A,"class","tabs")},m(e,t){d(e,l,t),s(l,o),s(l,_),s(l,b),d(e,c,t),d(e,p,t),s(p,f),s(f,$),s(f,P),s(P,R),s(f,se),s(p,ae),s(p,K),d(e,F,t),Be(y,e,t),d(e,G,t),d(e,E,t),d(e,J,t),d(e,w,t),s(w,W),s(w,ne),s(w,z),s(z,T),s(T,ie),s(T,Q),s(Q,V),s(T,ce),s(T,X),s(T,re),s(T,Y),s(w,de),s(w,L),d(e,Z,t),d(e,S,t),d(e,x,t),d(e,B,t),d(e,ee,t),d(e,U,t),d(e,te,t),d(e,A,t),s(A,q);for(let r=0;r<g.length;r+=1)g[r]&&g[r].m(q,null);s(A,pe),s(A,M);for(let r=0;r<k.length;r+=1)k[r]&&k[r].m(M,null);C=!0},p(e,[t]){var ge,we,$e,Pe;(!C||t&1)&&a!==(a=e[0].name+"")&&I(_,a),(!C||t&1)&&D!==(D=e[0].name+"")&&I(R,D);const r={};t&9&&(r.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
...
await pb.collection('${(ge=e[0])==null?void 0:ge.name}').authWithPassword('test@example.com', '123456');
await pb.collection('${(we=e[0])==null?void 0:we.name}').unlinkExternalAuth(
pb.authStore.model.id,
'google'
);
`),t&9&&(r.dart=`
import 'package:pocketbase/pocketbase.dart';
final pb = PocketBase('${e[3]}');
...
await pb.collection('${($e=e[0])==null?void 0:$e.name}').authWithPassword('test@example.com', '123456');
await pb.collection('${(Pe=e[0])==null?void 0:Pe.name}').unlinkExternalAuth(
pb.authStore.model.id,
'google',
);
`),y.$set(r),(!C||t&1)&&H!==(H=e[0].name+"")&&I(V,H),t&6&&(j=e[2],g=Te(g,t,me,1,e,j,ue,q,De,Ce,null,Ae)),t&6&&(O=e[2],We(),k=Te(k,t,be,1,e,O,fe,M,ze,Ee,null,ye),He())},i(e){if(!C){le(y.$$.fragment,e);for(let t=0;t<O.length;t+=1)le(k[t]);C=!0}},o(e){oe(y.$$.fragment,e);for(let t=0;t<k.length;t+=1)oe(k[t]);C=!1},d(e){e&&u(l),e&&u(c),e&&u(p),e&&u(F),Ue(y,e),e&&u(G),e&&u(E),e&&u(J),e&&u(w),e&&u(Z),e&&u(S),e&&u(x),e&&u(B),e&&u(ee),e&&u(U),e&&u(te),e&&u(A);for(let t=0;t<g.length;t+=1)g[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function Ge(n,l,o){let a,{collection:_=new Le}=l,b=204,c=[];const p=f=>o(1,b=f.code);return n.$$set=f=>{"collection"in f&&o(0,_=f.collection)},o(3,a=je.getApiExampleUrl(Ie.baseUrl)),o(2,c=[{code:204,body:"null"},{code:401,body:`
{
"code": 401,
"message": "The request requires valid record authorization token to be set.",
"data": {}
}
`},{code:403,body:`
{
"code": 403,
"message": "The authorized record model is not allowed to perform this action.",
"data": {}
}
`},{code:404,body:`
{
"code": 404,
"message": "The requested resource wasn't found.",
"data": {}
}
`}]),[_,b,c,a,p]}class Ve extends qe{constructor(l){super(),Me(this,l,Ge,Fe,Oe,{collection:0})}}export{Ve as default};

View File

@ -1,4 +1,4 @@
import{S as Ct,i as St,s as Ot,C as U,M as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as I,N as Pe,O as ut,k as Mt,P as $t,n as Rt,t as fe,a as pe,o,d as Fe,R as qt,p as Dt,r as ce,u as Ht,y as G}from"./index-e5007277.js";import{S as Lt}from"./SdkTabs-e5fbf56f.js";function bt(f,t,l){const s=f.slice();return s[7]=t[l],s}function mt(f,t,l){const s=f.slice();return s[7]=t[l],s}function _t(f,t,l){const s=f.slice();return s[12]=t[l],s}function yt(f){let t;return{c(){t=r("p"),t.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(f){let t,l,s,b,u,d,p,k,C,w,O,H,A,j,M,E,B;return{c(){t=r("tr"),t.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=m(),s=r("tr"),s.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
import{S as Ct,i as St,s as Ot,C as U,M as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as I,N as Pe,O as ut,k as Mt,P as $t,n as qt,t as fe,a as pe,o,d as Fe,T as Dt,p as Ht,r as ce,u as Rt,y as G}from"./index-7275477a.js";import{S as Lt}from"./SdkTabs-3e2121ec.js";function bt(f,t,l){const s=f.slice();return s[7]=t[l],s}function mt(f,t,l){const s=f.slice();return s[7]=t[l],s}function _t(f,t,l){const s=f.slice();return s[12]=t[l],s}function yt(f){let t;return{c(){t=r("p"),t.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(f){let t,l,s,b,u,d,p,k,C,w,O,R,A,j,M,E,B;return{c(){t=r("tr"),t.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=m(),s=r("tr"),s.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
<span>username</span></div></td>
<td><span class="label">String</span></td>
<td>The username of the auth record.</td>`,b=m(),u=r("tr"),u.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
@ -20,7 +20,7 @@ import{S as Ct,i as St,s as Ot,C as U,M as Tt,e as r,w as y,b as m,c as Ae,f as
&quot;Manage&quot; access can skip this field.</td>`,w=m(),O=r("tr"),O.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
<span>password</span></div></td>
<td><span class="label">String</span></td>
<td>New auth record password.</td>`,H=m(),A=r("tr"),A.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
<td>New auth record password.</td>`,R=m(),A=r("tr"),A.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
<span>passwordConfirm</span></div></td>
<td><span class="label">String</span></td>
<td>New auth record password confirmation.</td>`,j=m(),M=r("tr"),M.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
@ -28,8 +28,8 @@ import{S as Ct,i as St,s as Ot,C as U,M as Tt,e as r,w as y,b as m,c as Ae,f as
<td><span class="label">Boolean</span></td>
<td>Indicates whether the auth record is verified or not.
<br/>
This field can be set only by admins or auth records with &quot;Manage&quot; access.</td>`,E=m(),B=r("tr"),B.innerHTML='<td colspan="3" class="txt-hint">Schema fields</td>'},m(c,_){a(c,t,_),a(c,l,_),a(c,s,_),a(c,b,_),a(c,u,_),a(c,d,_),a(c,p,_),a(c,k,_),a(c,C,_),a(c,w,_),a(c,O,_),a(c,H,_),a(c,A,_),a(c,j,_),a(c,M,_),a(c,E,_),a(c,B,_)},d(c){c&&o(t),c&&o(l),c&&o(s),c&&o(b),c&&o(u),c&&o(d),c&&o(p),c&&o(k),c&&o(C),c&&o(w),c&&o(O),c&&o(H),c&&o(A),c&&o(j),c&&o(M),c&&o(E),c&&o(B)}}}function Pt(f){let t;return{c(){t=r("span"),t.textContent="Optional",T(t,"class","label label-warning")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function At(f){let t;return{c(){t=r("span"),t.textContent="Required",T(t,"class","label label-success")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function Bt(f){var u;let t,l=((u=f[12].options)==null?void 0:u.maxSelect)>1?"ids":"id",s,b;return{c(){t=y("User "),s=y(l),b=y(".")},m(d,p){a(d,t,p),a(d,s,p),a(d,b,p)},p(d,p){var k;p&1&&l!==(l=((k=d[12].options)==null?void 0:k.maxSelect)>1?"ids":"id")&&I(s,l)},d(d){d&&o(t),d&&o(s),d&&o(b)}}}function Ft(f){var u;let t,l=((u=f[12].options)==null?void 0:u.maxSelect)>1?"ids":"id",s,b;return{c(){t=y("Relation record "),s=y(l),b=y(".")},m(d,p){a(d,t,p),a(d,s,p),a(d,b,p)},p(d,p){var k;p&1&&l!==(l=((k=d[12].options)==null?void 0:k.maxSelect)>1?"ids":"id")&&I(s,l)},d(d){d&&o(t),d&&o(s),d&&o(b)}}}function Nt(f){let t,l,s,b,u;return{c(){t=y("File object."),l=r("br"),s=y(`
Set to `),b=r("code"),b.textContent="null",u=y(" to delete already uploaded file(s).")},m(d,p){a(d,t,p),a(d,l,p),a(d,s,p),a(d,b,p),a(d,u,p)},p:G,d(d){d&&o(t),d&&o(l),d&&o(s),d&&o(b),d&&o(u)}}}function jt(f){let t;return{c(){t=y("URL address.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Et(f){let t;return{c(){t=y("Email address.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Ut(f){let t;return{c(){t=y("JSON array or object.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function It(f){let t;return{c(){t=y("Number value.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Jt(f){let t;return{c(){t=y("Plain text value.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function ht(f,t){let l,s,b,u,d,p=t[12].name+"",k,C,w,O,H=U.getFieldValueType(t[12])+"",A,j,M,E;function B(h,P){return h[12].required?At:Pt}let c=B(t),_=c(t);function Q(h,P){if(h[12].type==="text")return Jt;if(h[12].type==="number")return It;if(h[12].type==="json")return Ut;if(h[12].type==="email")return Et;if(h[12].type==="url")return jt;if(h[12].type==="file")return Nt;if(h[12].type==="relation")return Ft;if(h[12].type==="user")return Bt}let L=Q(t),S=L&&L(t);return{key:f,first:null,c(){l=r("tr"),s=r("td"),b=r("div"),_.c(),u=m(),d=r("span"),k=y(p),C=m(),w=r("td"),O=r("span"),A=y(H),j=m(),M=r("td"),S&&S.c(),E=m(),T(b,"class","inline-flex"),T(O,"class","label"),this.first=l},m(h,P){a(h,l,P),i(l,s),i(s,b),_.m(b,null),i(b,u),i(b,d),i(d,k),i(l,C),i(l,w),i(w,O),i(O,A),i(l,j),i(l,M),S&&S.m(M,null),i(l,E)},p(h,P){t=h,c!==(c=B(t))&&(_.d(1),_=c(t),_&&(_.c(),_.m(b,u))),P&1&&p!==(p=t[12].name+"")&&I(k,p),P&1&&H!==(H=U.getFieldValueType(t[12])+"")&&I(A,H),L===(L=Q(t))&&S?S.p(t,P):(S&&S.d(1),S=L&&L(t),S&&(S.c(),S.m(M,null)))},d(h){h&&o(l),_.d(),S&&S.d()}}}function vt(f,t){let l,s=t[7].code+"",b,u,d,p;function k(){return t[6](t[7])}return{key:f,first:null,c(){l=r("button"),b=y(s),u=m(),T(l,"class","tab-item"),ce(l,"active",t[1]===t[7].code),this.first=l},m(C,w){a(C,l,w),i(l,b),i(l,u),d||(p=Ht(l,"click",k),d=!0)},p(C,w){t=C,w&4&&s!==(s=t[7].code+"")&&I(b,s),w&6&&ce(l,"active",t[1]===t[7].code)},d(C){C&&o(l),d=!1,p()}}}function wt(f,t){let l,s,b,u;return s=new Tt({props:{content:t[7].body}}),{key:f,first:null,c(){l=r("div"),Ae(s.$$.fragment),b=m(),T(l,"class","tab-item"),ce(l,"active",t[1]===t[7].code),this.first=l},m(d,p){a(d,l,p),Be(s,l,null),i(l,b),u=!0},p(d,p){t=d;const k={};p&4&&(k.content=t[7].body),s.$set(k),(!u||p&6)&&ce(l,"active",t[1]===t[7].code)},i(d){u||(fe(s.$$.fragment,d),u=!0)},o(d){pe(s.$$.fragment,d),u=!1},d(d){d&&o(l),Fe(s)}}}function gt(f){var it,at,ot,dt;let t,l,s=f[0].name+"",b,u,d,p,k,C,w,O=f[0].name+"",H,A,j,M,E,B,c,_,Q,L,S,h,P,Ne,ae,W,je,ue,oe=f[0].name+"",be,Ee,me,Ue,_e,X,ye,Z,ke,ee,he,J,ve,Ie,g,we,F=[],Je=new Map,Te,te,Ce,V,Se,ge,Oe,x,Me,Ve,$e,xe,$,ze,Y,Ke,Qe,We,Re,Ye,qe,Ge,De,Xe,He,le,Le,z,se,N=[],Ze=new Map,et,ne,R=[],tt=new Map,K;_=new Lt({props:{js:`
This field can be set only by admins or auth records with &quot;Manage&quot; access.</td>`,E=m(),B=r("tr"),B.innerHTML='<td colspan="3" class="txt-hint">Schema fields</td>'},m(c,_){a(c,t,_),a(c,l,_),a(c,s,_),a(c,b,_),a(c,u,_),a(c,d,_),a(c,p,_),a(c,k,_),a(c,C,_),a(c,w,_),a(c,O,_),a(c,R,_),a(c,A,_),a(c,j,_),a(c,M,_),a(c,E,_),a(c,B,_)},d(c){c&&o(t),c&&o(l),c&&o(s),c&&o(b),c&&o(u),c&&o(d),c&&o(p),c&&o(k),c&&o(C),c&&o(w),c&&o(O),c&&o(R),c&&o(A),c&&o(j),c&&o(M),c&&o(E),c&&o(B)}}}function Pt(f){let t;return{c(){t=r("span"),t.textContent="Optional",T(t,"class","label label-warning")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function At(f){let t;return{c(){t=r("span"),t.textContent="Required",T(t,"class","label label-success")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function Bt(f){var u;let t,l=((u=f[12].options)==null?void 0:u.maxSelect)>1?"ids":"id",s,b;return{c(){t=y("User "),s=y(l),b=y(".")},m(d,p){a(d,t,p),a(d,s,p),a(d,b,p)},p(d,p){var k;p&1&&l!==(l=((k=d[12].options)==null?void 0:k.maxSelect)>1?"ids":"id")&&I(s,l)},d(d){d&&o(t),d&&o(s),d&&o(b)}}}function Ft(f){var u;let t,l=((u=f[12].options)==null?void 0:u.maxSelect)>1?"ids":"id",s,b;return{c(){t=y("Relation record "),s=y(l),b=y(".")},m(d,p){a(d,t,p),a(d,s,p),a(d,b,p)},p(d,p){var k;p&1&&l!==(l=((k=d[12].options)==null?void 0:k.maxSelect)>1?"ids":"id")&&I(s,l)},d(d){d&&o(t),d&&o(s),d&&o(b)}}}function Nt(f){let t,l,s,b,u;return{c(){t=y("File object."),l=r("br"),s=y(`
Set to `),b=r("code"),b.textContent="null",u=y(" to delete already uploaded file(s).")},m(d,p){a(d,t,p),a(d,l,p),a(d,s,p),a(d,b,p),a(d,u,p)},p:G,d(d){d&&o(t),d&&o(l),d&&o(s),d&&o(b),d&&o(u)}}}function jt(f){let t;return{c(){t=y("URL address.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Et(f){let t;return{c(){t=y("Email address.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Ut(f){let t;return{c(){t=y("JSON array or object.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function It(f){let t;return{c(){t=y("Number value.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Jt(f){let t;return{c(){t=y("Plain text value.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function ht(f,t){let l,s,b,u,d,p=t[12].name+"",k,C,w,O,R=U.getFieldValueType(t[12])+"",A,j,M,E;function B(h,P){return h[12].required?At:Pt}let c=B(t),_=c(t);function Q(h,P){if(h[12].type==="text")return Jt;if(h[12].type==="number")return It;if(h[12].type==="json")return Ut;if(h[12].type==="email")return Et;if(h[12].type==="url")return jt;if(h[12].type==="file")return Nt;if(h[12].type==="relation")return Ft;if(h[12].type==="user")return Bt}let L=Q(t),S=L&&L(t);return{key:f,first:null,c(){l=r("tr"),s=r("td"),b=r("div"),_.c(),u=m(),d=r("span"),k=y(p),C=m(),w=r("td"),O=r("span"),A=y(R),j=m(),M=r("td"),S&&S.c(),E=m(),T(b,"class","inline-flex"),T(O,"class","label"),this.first=l},m(h,P){a(h,l,P),i(l,s),i(s,b),_.m(b,null),i(b,u),i(b,d),i(d,k),i(l,C),i(l,w),i(w,O),i(O,A),i(l,j),i(l,M),S&&S.m(M,null),i(l,E)},p(h,P){t=h,c!==(c=B(t))&&(_.d(1),_=c(t),_&&(_.c(),_.m(b,u))),P&1&&p!==(p=t[12].name+"")&&I(k,p),P&1&&R!==(R=U.getFieldValueType(t[12])+"")&&I(A,R),L===(L=Q(t))&&S?S.p(t,P):(S&&S.d(1),S=L&&L(t),S&&(S.c(),S.m(M,null)))},d(h){h&&o(l),_.d(),S&&S.d()}}}function vt(f,t){let l,s=t[7].code+"",b,u,d,p;function k(){return t[6](t[7])}return{key:f,first:null,c(){l=r("button"),b=y(s),u=m(),T(l,"class","tab-item"),ce(l,"active",t[1]===t[7].code),this.first=l},m(C,w){a(C,l,w),i(l,b),i(l,u),d||(p=Rt(l,"click",k),d=!0)},p(C,w){t=C,w&4&&s!==(s=t[7].code+"")&&I(b,s),w&6&&ce(l,"active",t[1]===t[7].code)},d(C){C&&o(l),d=!1,p()}}}function wt(f,t){let l,s,b,u;return s=new Tt({props:{content:t[7].body}}),{key:f,first:null,c(){l=r("div"),Ae(s.$$.fragment),b=m(),T(l,"class","tab-item"),ce(l,"active",t[1]===t[7].code),this.first=l},m(d,p){a(d,l,p),Be(s,l,null),i(l,b),u=!0},p(d,p){t=d;const k={};p&4&&(k.content=t[7].body),s.$set(k),(!u||p&6)&&ce(l,"active",t[1]===t[7].code)},i(d){u||(fe(s.$$.fragment,d),u=!0)},o(d){pe(s.$$.fragment,d),u=!1},d(d){d&&o(l),Fe(s)}}}function gt(f){var it,at,ot,dt;let t,l,s=f[0].name+"",b,u,d,p,k,C,w,O=f[0].name+"",R,A,j,M,E,B,c,_,Q,L,S,h,P,Ne,ae,W,je,ue,oe=f[0].name+"",be,Ee,me,Ue,_e,X,ye,Z,ke,ee,he,J,ve,Ie,g,we,F=[],Je=new Map,Te,te,Ce,V,Se,ge,Oe,x,Me,Ve,$e,xe,$,ze,Y,Ke,Qe,We,qe,Ye,De,Ge,He,Xe,Re,le,Le,z,se,N=[],Ze=new Map,et,ne,q=[],tt=new Map,K;_=new Lt({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${f[4]}');
@ -51,26 +51,26 @@ final pb = PocketBase('${f[4]}');
final body = <String, dynamic>${JSON.stringify(Object.assign({},f[3],U.dummyCollectionSchemaData(f[0])),null,2)};
final record = await pb.collection('${(at=f[0])==null?void 0:at.name}').update('RECORD_ID', body: body);
`}});let q=f[5]&&yt(),D=((ot=f[0])==null?void 0:ot.isAuth)&&kt(),de=(dt=f[0])==null?void 0:dt.schema;const lt=e=>e[12].name;for(let e=0;e<de.length;e+=1){let n=_t(f,de,e),v=lt(n);Je.set(v,F[e]=ht(v,n))}Y=new Tt({props:{content:"?expand=relField1,relField2.subRelField21"}});let re=f[2];const st=e=>e[7].code;for(let e=0;e<re.length;e+=1){let n=mt(f,re,e),v=st(n);Ze.set(v,N[e]=vt(v,n))}let ie=f[2];const nt=e=>e[7].code;for(let e=0;e<ie.length;e+=1){let n=bt(f,ie,e),v=nt(n);tt.set(v,R[e]=wt(v,n))}return{c(){t=r("h3"),l=y("Update ("),b=y(s),u=y(")"),d=m(),p=r("div"),k=r("p"),C=y("Update a single "),w=r("strong"),H=y(O),A=y(" record."),j=m(),M=r("p"),M.innerHTML=`Body parameters could be sent as <code>application/json</code> or
`}});let D=f[5]&&yt(),H=((ot=f[0])==null?void 0:ot.isAuth)&&kt(),de=(dt=f[0])==null?void 0:dt.schema;const lt=e=>e[12].name;for(let e=0;e<de.length;e+=1){let n=_t(f,de,e),v=lt(n);Je.set(v,F[e]=ht(v,n))}Y=new Tt({props:{content:"?expand=relField1,relField2.subRelField21"}});let re=f[2];const st=e=>e[7].code;for(let e=0;e<re.length;e+=1){let n=mt(f,re,e),v=st(n);Ze.set(v,N[e]=vt(v,n))}let ie=f[2];const nt=e=>e[7].code;for(let e=0;e<ie.length;e+=1){let n=bt(f,ie,e),v=nt(n);tt.set(v,q[e]=wt(v,n))}return{c(){t=r("h3"),l=y("Update ("),b=y(s),u=y(")"),d=m(),p=r("div"),k=r("p"),C=y("Update a single "),w=r("strong"),R=y(O),A=y(" record."),j=m(),M=r("p"),M.innerHTML=`Body parameters could be sent as <code>application/json</code> or
<code>multipart/form-data</code>.`,E=m(),B=r("p"),B.innerHTML=`File upload is supported only via <code>multipart/form-data</code>.
<br/>
For more info and examples you could check the detailed
<a href="https://pocketbase.io/docs/files-handling/" target="_blank" rel="noopener noreferrer">Files upload and handling docs
</a>.`,c=m(),Ae(_.$$.fragment),Q=m(),L=r("h6"),L.textContent="API details",S=m(),h=r("div"),P=r("strong"),P.textContent="PATCH",Ne=m(),ae=r("div"),W=r("p"),je=y("/api/collections/"),ue=r("strong"),be=y(oe),Ee=y("/records/"),me=r("strong"),me.textContent=":id",Ue=m(),q&&q.c(),_e=m(),X=r("div"),X.textContent="Path parameters",ye=m(),Z=r("table"),Z.innerHTML=`<thead><tr><th>Param</th>
</a>.`,c=m(),Ae(_.$$.fragment),Q=m(),L=r("h6"),L.textContent="API details",S=m(),h=r("div"),P=r("strong"),P.textContent="PATCH",Ne=m(),ae=r("div"),W=r("p"),je=y("/api/collections/"),ue=r("strong"),be=y(oe),Ee=y("/records/"),me=r("strong"),me.textContent=":id",Ue=m(),D&&D.c(),_e=m(),X=r("div"),X.textContent="Path parameters",ye=m(),Z=r("table"),Z.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr></thead>
<tbody><tr><td>id</td>
<td><span class="label">String</span></td>
<td>ID of the record to update.</td></tr></tbody>`,ke=m(),ee=r("div"),ee.textContent="Body Parameters",he=m(),J=r("table"),ve=r("thead"),ve.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="50%">Description</th></tr>`,Ie=m(),g=r("tbody"),D&&D.c(),we=m();for(let e=0;e<F.length;e+=1)F[e].c();Te=m(),te=r("div"),te.textContent="Query parameters",Ce=m(),V=r("table"),Se=r("thead"),Se.innerHTML=`<tr><th>Param</th>
<th width="50%">Description</th></tr>`,Ie=m(),g=r("tbody"),H&&H.c(),we=m();for(let e=0;e<F.length;e+=1)F[e].c();Te=m(),te=r("div"),te.textContent="Query parameters",Ce=m(),V=r("table"),Se=r("thead"),Se.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr>`,ge=m(),Oe=r("tbody"),x=r("tr"),Me=r("td"),Me.textContent="expand",Ve=m(),$e=r("td"),$e.innerHTML='<span class="label">String</span>',xe=m(),$=r("td"),ze=y(`Auto expand relations when returning the updated record. Ex.:
`),Ae(Y.$$.fragment),Ke=y(`
Supports up to 6-levels depth nested relations expansion. `),Qe=r("br"),We=y(`
The expanded relations will be appended to the record under the
`),Re=r("code"),Re.textContent="expand",Ye=y(" property (eg. "),qe=r("code"),qe.textContent='"expand": {"relField1": {...}, ...}',Ge=y(`). Only
the relations that the user has permissions to `),De=r("strong"),De.textContent="view",Xe=y(" will be expanded."),He=m(),le=r("div"),le.textContent="Responses",Le=m(),z=r("div"),se=r("div");for(let e=0;e<N.length;e+=1)N[e].c();et=m(),ne=r("div");for(let e=0;e<R.length;e+=1)R[e].c();T(t,"class","m-b-sm"),T(p,"class","content txt-lg m-b-sm"),T(L,"class","m-b-xs"),T(P,"class","label label-primary"),T(ae,"class","content"),T(h,"class","alert alert-warning"),T(X,"class","section-title"),T(Z,"class","table-compact table-border m-b-base"),T(ee,"class","section-title"),T(J,"class","table-compact table-border m-b-base"),T(te,"class","section-title"),T(V,"class","table-compact table-border m-b-lg"),T(le,"class","section-title"),T(se,"class","tabs-header compact left"),T(ne,"class","tabs-content"),T(z,"class","tabs")},m(e,n){a(e,t,n),i(t,l),i(t,b),i(t,u),a(e,d,n),a(e,p,n),i(p,k),i(k,C),i(k,w),i(w,H),i(k,A),i(p,j),i(p,M),i(p,E),i(p,B),a(e,c,n),Be(_,e,n),a(e,Q,n),a(e,L,n),a(e,S,n),a(e,h,n),i(h,P),i(h,Ne),i(h,ae),i(ae,W),i(W,je),i(W,ue),i(ue,be),i(W,Ee),i(W,me),i(h,Ue),q&&q.m(h,null),a(e,_e,n),a(e,X,n),a(e,ye,n),a(e,Z,n),a(e,ke,n),a(e,ee,n),a(e,he,n),a(e,J,n),i(J,ve),i(J,Ie),i(J,g),D&&D.m(g,null),i(g,we);for(let v=0;v<F.length;v+=1)F[v]&&F[v].m(g,null);a(e,Te,n),a(e,te,n),a(e,Ce,n),a(e,V,n),i(V,Se),i(V,ge),i(V,Oe),i(Oe,x),i(x,Me),i(x,Ve),i(x,$e),i(x,xe),i(x,$),i($,ze),Be(Y,$,null),i($,Ke),i($,Qe),i($,We),i($,Re),i($,Ye),i($,qe),i($,Ge),i($,De),i($,Xe),a(e,He,n),a(e,le,n),a(e,Le,n),a(e,z,n),i(z,se);for(let v=0;v<N.length;v+=1)N[v]&&N[v].m(se,null);i(z,et),i(z,ne);for(let v=0;v<R.length;v+=1)R[v]&&R[v].m(ne,null);K=!0},p(e,[n]){var rt,ft,pt,ct;(!K||n&1)&&s!==(s=e[0].name+"")&&I(b,s),(!K||n&1)&&O!==(O=e[0].name+"")&&I(H,O);const v={};n&25&&(v.js=`
`),qe=r("code"),qe.textContent="expand",Ye=y(" property (eg. "),De=r("code"),De.textContent='"expand": {"relField1": {...}, ...}',Ge=y(`). Only
the relations that the user has permissions to `),He=r("strong"),He.textContent="view",Xe=y(" will be expanded."),Re=m(),le=r("div"),le.textContent="Responses",Le=m(),z=r("div"),se=r("div");for(let e=0;e<N.length;e+=1)N[e].c();et=m(),ne=r("div");for(let e=0;e<q.length;e+=1)q[e].c();T(t,"class","m-b-sm"),T(p,"class","content txt-lg m-b-sm"),T(L,"class","m-b-xs"),T(P,"class","label label-primary"),T(ae,"class","content"),T(h,"class","alert alert-warning"),T(X,"class","section-title"),T(Z,"class","table-compact table-border m-b-base"),T(ee,"class","section-title"),T(J,"class","table-compact table-border m-b-base"),T(te,"class","section-title"),T(V,"class","table-compact table-border m-b-lg"),T(le,"class","section-title"),T(se,"class","tabs-header compact left"),T(ne,"class","tabs-content"),T(z,"class","tabs")},m(e,n){a(e,t,n),i(t,l),i(t,b),i(t,u),a(e,d,n),a(e,p,n),i(p,k),i(k,C),i(k,w),i(w,R),i(k,A),i(p,j),i(p,M),i(p,E),i(p,B),a(e,c,n),Be(_,e,n),a(e,Q,n),a(e,L,n),a(e,S,n),a(e,h,n),i(h,P),i(h,Ne),i(h,ae),i(ae,W),i(W,je),i(W,ue),i(ue,be),i(W,Ee),i(W,me),i(h,Ue),D&&D.m(h,null),a(e,_e,n),a(e,X,n),a(e,ye,n),a(e,Z,n),a(e,ke,n),a(e,ee,n),a(e,he,n),a(e,J,n),i(J,ve),i(J,Ie),i(J,g),H&&H.m(g,null),i(g,we);for(let v=0;v<F.length;v+=1)F[v]&&F[v].m(g,null);a(e,Te,n),a(e,te,n),a(e,Ce,n),a(e,V,n),i(V,Se),i(V,ge),i(V,Oe),i(Oe,x),i(x,Me),i(x,Ve),i(x,$e),i(x,xe),i(x,$),i($,ze),Be(Y,$,null),i($,Ke),i($,Qe),i($,We),i($,qe),i($,Ye),i($,De),i($,Ge),i($,He),i($,Xe),a(e,Re,n),a(e,le,n),a(e,Le,n),a(e,z,n),i(z,se);for(let v=0;v<N.length;v+=1)N[v]&&N[v].m(se,null);i(z,et),i(z,ne);for(let v=0;v<q.length;v+=1)q[v]&&q[v].m(ne,null);K=!0},p(e,[n]){var rt,ft,pt,ct;(!K||n&1)&&s!==(s=e[0].name+"")&&I(b,s),(!K||n&1)&&O!==(O=e[0].name+"")&&I(R,O);const v={};n&25&&(v.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[4]}');
@ -92,7 +92,7 @@ final pb = PocketBase('${e[4]}');
final body = <String, dynamic>${JSON.stringify(Object.assign({},e[3],U.dummyCollectionSchemaData(e[0])),null,2)};
final record = await pb.collection('${(ft=e[0])==null?void 0:ft.name}').update('RECORD_ID', body: body);
`),_.$set(v),(!K||n&1)&&oe!==(oe=e[0].name+"")&&I(be,oe),e[5]?q||(q=yt(),q.c(),q.m(h,null)):q&&(q.d(1),q=null),(pt=e[0])!=null&&pt.isAuth?D||(D=kt(),D.c(),D.m(g,we)):D&&(D.d(1),D=null),n&1&&(de=(ct=e[0])==null?void 0:ct.schema,F=Pe(F,n,lt,1,e,de,Je,g,ut,ht,null,_t)),n&6&&(re=e[2],N=Pe(N,n,st,1,e,re,Ze,se,ut,vt,null,mt)),n&6&&(ie=e[2],Mt(),R=Pe(R,n,nt,1,e,ie,tt,ne,$t,wt,null,bt),Rt())},i(e){if(!K){fe(_.$$.fragment,e),fe(Y.$$.fragment,e);for(let n=0;n<ie.length;n+=1)fe(R[n]);K=!0}},o(e){pe(_.$$.fragment,e),pe(Y.$$.fragment,e);for(let n=0;n<R.length;n+=1)pe(R[n]);K=!1},d(e){e&&o(t),e&&o(d),e&&o(p),e&&o(c),Fe(_,e),e&&o(Q),e&&o(L),e&&o(S),e&&o(h),q&&q.d(),e&&o(_e),e&&o(X),e&&o(ye),e&&o(Z),e&&o(ke),e&&o(ee),e&&o(he),e&&o(J),D&&D.d();for(let n=0;n<F.length;n+=1)F[n].d();e&&o(Te),e&&o(te),e&&o(Ce),e&&o(V),Fe(Y),e&&o(He),e&&o(le),e&&o(Le),e&&o(z);for(let n=0;n<N.length;n+=1)N[n].d();for(let n=0;n<R.length;n+=1)R[n].d()}}}function Vt(f,t,l){let s,b,{collection:u=new qt}=t,d=200,p=[],k={};const C=w=>l(1,d=w.code);return f.$$set=w=>{"collection"in w&&l(0,u=w.collection)},f.$$.update=()=>{var w,O;f.$$.dirty&1&&l(5,s=(u==null?void 0:u.updateRule)===null),f.$$.dirty&1&&l(2,p=[{code:200,body:JSON.stringify(U.dummyCollectionRecord(u),null,2)},{code:400,body:`
`),_.$set(v),(!K||n&1)&&oe!==(oe=e[0].name+"")&&I(be,oe),e[5]?D||(D=yt(),D.c(),D.m(h,null)):D&&(D.d(1),D=null),(pt=e[0])!=null&&pt.isAuth?H||(H=kt(),H.c(),H.m(g,we)):H&&(H.d(1),H=null),n&1&&(de=(ct=e[0])==null?void 0:ct.schema,F=Pe(F,n,lt,1,e,de,Je,g,ut,ht,null,_t)),n&6&&(re=e[2],N=Pe(N,n,st,1,e,re,Ze,se,ut,vt,null,mt)),n&6&&(ie=e[2],Mt(),q=Pe(q,n,nt,1,e,ie,tt,ne,$t,wt,null,bt),qt())},i(e){if(!K){fe(_.$$.fragment,e),fe(Y.$$.fragment,e);for(let n=0;n<ie.length;n+=1)fe(q[n]);K=!0}},o(e){pe(_.$$.fragment,e),pe(Y.$$.fragment,e);for(let n=0;n<q.length;n+=1)pe(q[n]);K=!1},d(e){e&&o(t),e&&o(d),e&&o(p),e&&o(c),Fe(_,e),e&&o(Q),e&&o(L),e&&o(S),e&&o(h),D&&D.d(),e&&o(_e),e&&o(X),e&&o(ye),e&&o(Z),e&&o(ke),e&&o(ee),e&&o(he),e&&o(J),H&&H.d();for(let n=0;n<F.length;n+=1)F[n].d();e&&o(Te),e&&o(te),e&&o(Ce),e&&o(V),Fe(Y),e&&o(Re),e&&o(le),e&&o(Le),e&&o(z);for(let n=0;n<N.length;n+=1)N[n].d();for(let n=0;n<q.length;n+=1)q[n].d()}}}function Vt(f,t,l){let s,b,{collection:u=new Dt}=t,d=200,p=[],k={};const C=w=>l(1,d=w.code);return f.$$set=w=>{"collection"in w&&l(0,u=w.collection)},f.$$.update=()=>{var w,O;f.$$.dirty&1&&l(5,s=(u==null?void 0:u.updateRule)===null),f.$$.dirty&1&&l(2,p=[{code:200,body:JSON.stringify(U.dummyCollectionRecord(u),null,2)},{code:400,body:`
{
"code": 400,
"message": "Failed to update record.",
@ -115,4 +115,4 @@ final record = await pb.collection('${(ft=e[0])==null?void 0:ft.name}').update('
"message": "The requested resource wasn't found.",
"data": {}
}
`}]),f.$$.dirty&1&&(u.$isAuth?l(3,k={username:"test_username_update",emailVisibility:!1,password:"87654321",passwordConfirm:"87654321",oldPassword:"12345678"}):l(3,k={}))},l(4,b=U.getApiExampleUrl(Dt.baseUrl)),[u,d,p,k,b,s,C]}class Kt extends Ct{constructor(t){super(),St(this,t,Vt,gt,Ot,{collection:0})}}export{Kt as default};
`}]),f.$$.dirty&1&&(u.$isAuth?l(3,k={username:"test_username_update",emailVisibility:!1,password:"87654321",passwordConfirm:"87654321",oldPassword:"12345678"}):l(3,k={}))},l(4,b=U.getApiExampleUrl(Ht.baseUrl)),[u,d,p,k,b,s,C]}class Kt extends Ct{constructor(t){super(),St(this,t,Vt,gt,Ot,{collection:0})}}export{Kt as default};

View File

@ -1,4 +1,4 @@
import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as r,h as l,m as ke,x as me,N as ze,O as lt,k as st,P as nt,n as ot,t as G,a as J,o as d,d as he,R as it,C as Ge,p as at,r as K,u as rt}from"./index-e5007277.js";import{S as dt}from"./SdkTabs-e5fbf56f.js";function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i,s,n){const a=i.slice();return a[6]=s[n],a}function Qe(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",y,c,f,b;function R(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),y=m(a),c=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,y),l(n,c),f||(b=rt(n,"click",R),f=!0)},p(h,F){s=h,F&20&&K(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,b()}}}function Xe(i,s){let n,a,y,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),y=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(f,b){r(f,n,b),ke(a,n,null),l(n,y),c=!0},p(f,b){s=f,(!c||b&20)&&K(n,"active",s[2]===s[6].code)},i(f){c||(G(a.$$.fragment,f),c=!0)},o(f){J(a.$$.fragment,f),c=!1},d(f){f&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",y,c,f,b,R,h,F,N=i[0].name+"",Q,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,V=i[0].name+"",ee,$e,te,Ce,le,M,se,x,ne,A,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,fe,Se,Be,Me,pe,xe,ue,I,be,P,H,C=[],Ae=new Map,Ie,q,v=[],He=new Map,T;g=new dt({props:{js:`
import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as r,h as l,m as ke,x as me,N as ze,O as lt,k as st,P as nt,n as ot,t as G,a as J,o as d,d as he,T as it,C as Ge,p as at,r as K,u as rt}from"./index-7275477a.js";import{S as dt}from"./SdkTabs-3e2121ec.js";function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i,s,n){const a=i.slice();return a[6]=s[n],a}function Qe(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",y,c,f,b;function F(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),y=m(a),c=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(h,R){r(h,n,R),l(n,y),l(n,c),f||(b=rt(n,"click",F),f=!0)},p(h,R){s=h,R&20&&K(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,b()}}}function Xe(i,s){let n,a,y,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),y=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(f,b){r(f,n,b),ke(a,n,null),l(n,y),c=!0},p(f,b){s=f,(!c||b&20)&&K(n,"active",s[2]===s[6].code)},i(f){c||(G(a.$$.fragment,f),c=!0)},o(f){J(a.$$.fragment,f),c=!1},d(f){f&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",y,c,f,b,F,h,R,N=i[0].name+"",Q,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,V=i[0].name+"",ee,$e,te,Ce,le,M,se,x,ne,A,oe,O,ie,Fe,ae,T,re,Re,de,ge,k,Oe,S,Te,De,Pe,ce,Ee,fe,Se,Be,Me,pe,xe,ue,I,be,D,H,C=[],Ae=new Map,Ie,q,v=[],He=new Map,P;g=new dt({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${i[3]}');
@ -18,20 +18,20 @@ import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as
final record = await pb.collection('${(Ue=i[0])==null?void 0:Ue.name}').getOne('RECORD_ID',
expand: 'relField1,relField2.subRelField',
);
`}});let w=i[1]&&Qe();S=new Ye({props:{content:"?expand=relField1,relField2.subRelField"}});let z=i[4];const qe=e=>e[6].code;for(let e=0;e<z.length;e+=1){let t=Ke(i,z,e),p=qe(t);Ae.set(p,C[e]=We(p,t))}let L=i[4];const Le=e=>e[6].code;for(let e=0;e<L.length;e+=1){let t=Je(i,L,e),p=Le(t);He.set(p,v[e]=Xe(p,t))}return{c(){s=o("h3"),n=m("View ("),y=m(a),c=m(")"),f=u(),b=o("div"),R=o("p"),h=m("Fetch a single "),F=o("strong"),Q=m(N),ve=m(" record."),W=u(),_e(g.$$.fragment),X=u(),B=o("h6"),B.textContent="API details",Y=u(),$=o("div"),U=o("strong"),U.textContent="GET",we=u(),j=o("div"),E=o("p"),ye=m("/api/collections/"),Z=o("strong"),ee=m(V),$e=m("/records/"),te=o("strong"),te.textContent=":id",Ce=u(),w&&w.c(),le=u(),M=o("div"),M.textContent="Path Parameters",se=u(),x=o("table"),x.innerHTML=`<thead><tr><th>Param</th>
`}});let w=i[1]&&Qe();S=new Ye({props:{content:"?expand=relField1,relField2.subRelField"}});let z=i[4];const qe=e=>e[6].code;for(let e=0;e<z.length;e+=1){let t=Ke(i,z,e),p=qe(t);Ae.set(p,C[e]=We(p,t))}let L=i[4];const Le=e=>e[6].code;for(let e=0;e<L.length;e+=1){let t=Je(i,L,e),p=Le(t);He.set(p,v[e]=Xe(p,t))}return{c(){s=o("h3"),n=m("View ("),y=m(a),c=m(")"),f=u(),b=o("div"),F=o("p"),h=m("Fetch a single "),R=o("strong"),Q=m(N),ve=m(" record."),W=u(),_e(g.$$.fragment),X=u(),B=o("h6"),B.textContent="API details",Y=u(),$=o("div"),U=o("strong"),U.textContent="GET",we=u(),j=o("div"),E=o("p"),ye=m("/api/collections/"),Z=o("strong"),ee=m(V),$e=m("/records/"),te=o("strong"),te.textContent=":id",Ce=u(),w&&w.c(),le=u(),M=o("div"),M.textContent="Path Parameters",se=u(),x=o("table"),x.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr></thead>
<tbody><tr><td>id</td>
<td><span class="label">String</span></td>
<td>ID of the record to view.</td></tr></tbody>`,ne=u(),A=o("div"),A.textContent="Query parameters",oe=u(),O=o("table"),ie=o("thead"),ie.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr>`,Re=u(),ae=o("tbody"),D=o("tr"),re=o("td"),re.textContent="expand",Fe=u(),de=o("td"),de.innerHTML='<span class="label">String</span>',ge=u(),k=o("td"),Oe=m(`Auto expand record relations. Ex.:
`),_e(S.$$.fragment),De=m(`
Supports up to 6-levels depth nested relations expansion. `),Pe=o("br"),Te=m(`
<th width="60%">Description</th></tr>`,Fe=u(),ae=o("tbody"),T=o("tr"),re=o("td"),re.textContent="expand",Re=u(),de=o("td"),de.innerHTML='<span class="label">String</span>',ge=u(),k=o("td"),Oe=m(`Auto expand record relations. Ex.:
`),_e(S.$$.fragment),Te=m(`
Supports up to 6-levels depth nested relations expansion. `),De=o("br"),Pe=m(`
The expanded relations will be appended to the record under the
`),ce=o("code"),ce.textContent="expand",Ee=m(" property (eg. "),fe=o("code"),fe.textContent='"expand": {"relField1": {...}, ...}',Se=m(`).
`),Be=o("br"),Me=m(`
Only the relations to which the request user has permissions to `),pe=o("strong"),pe.textContent="view",xe=m(" will be expanded."),ue=u(),I=o("div"),I.textContent="Responses",be=u(),P=o("div"),H=o("div");for(let e=0;e<C.length;e+=1)C[e].c();Ie=u(),q=o("div");for(let e=0;e<v.length;e+=1)v[e].c();_(s,"class","m-b-sm"),_(b,"class","content txt-lg m-b-sm"),_(B,"class","m-b-xs"),_(U,"class","label label-primary"),_(j,"class","content"),_($,"class","alert alert-info"),_(M,"class","section-title"),_(x,"class","table-compact table-border m-b-base"),_(A,"class","section-title"),_(O,"class","table-compact table-border m-b-base"),_(I,"class","section-title"),_(H,"class","tabs-header compact left"),_(q,"class","tabs-content"),_(P,"class","tabs")},m(e,t){r(e,s,t),l(s,n),l(s,y),l(s,c),r(e,f,t),r(e,b,t),l(b,R),l(R,h),l(R,F),l(F,Q),l(R,ve),r(e,W,t),ke(g,e,t),r(e,X,t),r(e,B,t),r(e,Y,t),r(e,$,t),l($,U),l($,we),l($,j),l(j,E),l(E,ye),l(E,Z),l(Z,ee),l(E,$e),l(E,te),l($,Ce),w&&w.m($,null),r(e,le,t),r(e,M,t),r(e,se,t),r(e,x,t),r(e,ne,t),r(e,A,t),r(e,oe,t),r(e,O,t),l(O,ie),l(O,Re),l(O,ae),l(ae,D),l(D,re),l(D,Fe),l(D,de),l(D,ge),l(D,k),l(k,Oe),ke(S,k,null),l(k,De),l(k,Pe),l(k,Te),l(k,ce),l(k,Ee),l(k,fe),l(k,Se),l(k,Be),l(k,Me),l(k,pe),l(k,xe),r(e,ue,t),r(e,I,t),r(e,be,t),r(e,P,t),l(P,H);for(let p=0;p<C.length;p+=1)C[p]&&C[p].m(H,null);l(P,Ie),l(P,q);for(let p=0;p<v.length;p+=1)v[p]&&v[p].m(q,null);T=!0},p(e,[t]){var je,Ve;(!T||t&1)&&a!==(a=e[0].name+"")&&me(y,a),(!T||t&1)&&N!==(N=e[0].name+"")&&me(Q,N);const p={};t&9&&(p.js=`
Only the relations to which the request user has permissions to `),pe=o("strong"),pe.textContent="view",xe=m(" will be expanded."),ue=u(),I=o("div"),I.textContent="Responses",be=u(),D=o("div"),H=o("div");for(let e=0;e<C.length;e+=1)C[e].c();Ie=u(),q=o("div");for(let e=0;e<v.length;e+=1)v[e].c();_(s,"class","m-b-sm"),_(b,"class","content txt-lg m-b-sm"),_(B,"class","m-b-xs"),_(U,"class","label label-primary"),_(j,"class","content"),_($,"class","alert alert-info"),_(M,"class","section-title"),_(x,"class","table-compact table-border m-b-base"),_(A,"class","section-title"),_(O,"class","table-compact table-border m-b-base"),_(I,"class","section-title"),_(H,"class","tabs-header compact left"),_(q,"class","tabs-content"),_(D,"class","tabs")},m(e,t){r(e,s,t),l(s,n),l(s,y),l(s,c),r(e,f,t),r(e,b,t),l(b,F),l(F,h),l(F,R),l(R,Q),l(F,ve),r(e,W,t),ke(g,e,t),r(e,X,t),r(e,B,t),r(e,Y,t),r(e,$,t),l($,U),l($,we),l($,j),l(j,E),l(E,ye),l(E,Z),l(Z,ee),l(E,$e),l(E,te),l($,Ce),w&&w.m($,null),r(e,le,t),r(e,M,t),r(e,se,t),r(e,x,t),r(e,ne,t),r(e,A,t),r(e,oe,t),r(e,O,t),l(O,ie),l(O,Fe),l(O,ae),l(ae,T),l(T,re),l(T,Re),l(T,de),l(T,ge),l(T,k),l(k,Oe),ke(S,k,null),l(k,Te),l(k,De),l(k,Pe),l(k,ce),l(k,Ee),l(k,fe),l(k,Se),l(k,Be),l(k,Me),l(k,pe),l(k,xe),r(e,ue,t),r(e,I,t),r(e,be,t),r(e,D,t),l(D,H);for(let p=0;p<C.length;p+=1)C[p]&&C[p].m(H,null);l(D,Ie),l(D,q);for(let p=0;p<v.length;p+=1)v[p]&&v[p].m(q,null);P=!0},p(e,[t]){var je,Ve;(!P||t&1)&&a!==(a=e[0].name+"")&&me(y,a),(!P||t&1)&&N!==(N=e[0].name+"")&&me(Q,N);const p={};t&9&&(p.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
@ -51,7 +51,7 @@ import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as
final record = await pb.collection('${(Ve=e[0])==null?void 0:Ve.name}').getOne('RECORD_ID',
expand: 'relField1,relField2.subRelField',
);
`),g.$set(p),(!T||t&1)&&V!==(V=e[0].name+"")&&me(ee,V),e[1]?w||(w=Qe(),w.c(),w.m($,null)):w&&(w.d(1),w=null),t&20&&(z=e[4],C=ze(C,t,qe,1,e,z,Ae,H,lt,We,null,Ke)),t&20&&(L=e[4],st(),v=ze(v,t,Le,1,e,L,He,q,nt,Xe,null,Je),ot())},i(e){if(!T){G(g.$$.fragment,e),G(S.$$.fragment,e);for(let t=0;t<L.length;t+=1)G(v[t]);T=!0}},o(e){J(g.$$.fragment,e),J(S.$$.fragment,e);for(let t=0;t<v.length;t+=1)J(v[t]);T=!1},d(e){e&&d(s),e&&d(f),e&&d(b),e&&d(W),he(g,e),e&&d(X),e&&d(B),e&&d(Y),e&&d($),w&&w.d(),e&&d(le),e&&d(M),e&&d(se),e&&d(x),e&&d(ne),e&&d(A),e&&d(oe),e&&d(O),he(S),e&&d(ue),e&&d(I),e&&d(be),e&&d(P);for(let t=0;t<C.length;t+=1)C[t].d();for(let t=0;t<v.length;t+=1)v[t].d()}}}function ft(i,s,n){let a,y,{collection:c=new it}=s,f=200,b=[];const R=h=>n(2,f=h.code);return i.$$set=h=>{"collection"in h&&n(0,c=h.collection)},i.$$.update=()=>{i.$$.dirty&1&&n(1,a=(c==null?void 0:c.viewRule)===null),i.$$.dirty&3&&c!=null&&c.id&&(b.push({code:200,body:JSON.stringify(Ge.dummyCollectionRecord(c),null,2)}),a&&b.push({code:403,body:`
`),g.$set(p),(!P||t&1)&&V!==(V=e[0].name+"")&&me(ee,V),e[1]?w||(w=Qe(),w.c(),w.m($,null)):w&&(w.d(1),w=null),t&20&&(z=e[4],C=ze(C,t,qe,1,e,z,Ae,H,lt,We,null,Ke)),t&20&&(L=e[4],st(),v=ze(v,t,Le,1,e,L,He,q,nt,Xe,null,Je),ot())},i(e){if(!P){G(g.$$.fragment,e),G(S.$$.fragment,e);for(let t=0;t<L.length;t+=1)G(v[t]);P=!0}},o(e){J(g.$$.fragment,e),J(S.$$.fragment,e);for(let t=0;t<v.length;t+=1)J(v[t]);P=!1},d(e){e&&d(s),e&&d(f),e&&d(b),e&&d(W),he(g,e),e&&d(X),e&&d(B),e&&d(Y),e&&d($),w&&w.d(),e&&d(le),e&&d(M),e&&d(se),e&&d(x),e&&d(ne),e&&d(A),e&&d(oe),e&&d(O),he(S),e&&d(ue),e&&d(I),e&&d(be),e&&d(D);for(let t=0;t<C.length;t+=1)C[t].d();for(let t=0;t<v.length;t+=1)v[t].d()}}}function ft(i,s,n){let a,y,{collection:c=new it}=s,f=200,b=[];const F=h=>n(2,f=h.code);return i.$$set=h=>{"collection"in h&&n(0,c=h.collection)},i.$$.update=()=>{i.$$.dirty&1&&n(1,a=(c==null?void 0:c.viewRule)===null),i.$$.dirty&3&&c!=null&&c.id&&(b.push({code:200,body:JSON.stringify(Ge.dummyCollectionRecord(c),null,2)}),a&&b.push({code:403,body:`
{
"code": 403,
"message": "Only admins can access this action.",
@ -63,4 +63,4 @@ import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as
"message": "The requested resource wasn't found.",
"data": {}
}
`}))},n(3,y=Ge.getApiExampleUrl(at.baseUrl)),[c,a,f,y,b,R]}class bt extends Ze{constructor(s){super(),et(this,s,ft,ct,tt,{collection:0})}}export{bt as default};
`}))},n(3,y=Ge.getApiExampleUrl(at.baseUrl)),[c,a,f,y,b,F]}class bt extends Ze{constructor(s){super(),et(this,s,ft,ct,tt,{collection:0})}}export{bt as default};

File diff suppressed because one or more lines are too long

2
ui/dist/index.html vendored
View File

@ -44,7 +44,7 @@
window.Prism = window.Prism || {};
window.Prism.manual = true;
</script>
<script type="module" crossorigin src="./assets/index-e5007277.js"></script>
<script type="module" crossorigin src="./assets/index-7275477a.js"></script>
<link rel="stylesheet" href="./assets/index-7f72de6b.css">
</head>
<body>

14
ui/package-lock.json generated
View File

@ -21,7 +21,7 @@
"chart.js": "^3.7.1",
"chartjs-adapter-luxon": "^1.2.0",
"luxon": "^2.3.2",
"pocketbase": "0.14.0-rc",
"pocketbase": "0.14.0",
"prismjs": "^1.28.0",
"sass": "^1.45.0",
"svelte": "^3.44.0",
@ -978,9 +978,9 @@
}
},
"node_modules/pocketbase": {
"version": "0.14.0-rc",
"resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.14.0-rc.tgz",
"integrity": "sha512-MtEw57eyrAkM8CCHtGgCTv12wbW7S1RhYdP0ucz4DOORFLMlHEBICmLGzk/6+zjfC4URseuL2KsIdKKEuDC38A==",
"version": "0.14.0",
"resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.14.0.tgz",
"integrity": "sha512-4y8kZkGQh4NJkuy/LntUBbFAplz655/5/+XYKetSwj6MYMo3N3zWFno+HxzmL59njsauwGsiNEWggbEETm1+WA==",
"dev": true
},
"node_modules/postcss": {
@ -1883,9 +1883,9 @@
"dev": true
},
"pocketbase": {
"version": "0.14.0-rc",
"resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.14.0-rc.tgz",
"integrity": "sha512-MtEw57eyrAkM8CCHtGgCTv12wbW7S1RhYdP0ucz4DOORFLMlHEBICmLGzk/6+zjfC4URseuL2KsIdKKEuDC38A==",
"version": "0.14.0",
"resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.14.0.tgz",
"integrity": "sha512-4y8kZkGQh4NJkuy/LntUBbFAplz655/5/+XYKetSwj6MYMo3N3zWFno+HxzmL59njsauwGsiNEWggbEETm1+WA==",
"dev": true
},
"postcss": {