synced with master

This commit is contained in:
Gani Georgiev 2023-08-15 12:10:21 +03:00
commit 734f35c504
39 changed files with 396 additions and 391 deletions

View File

@ -1,3 +1,8 @@
## v0.17.5
- Added quotes around the wrapped view query columns introduced with v0.17.4.
## v0.17.4
- Fixed Views record retrieval when numeric id is used ([#3110](https://github.com/pocketbase/pocketbase/issues/3110)).

View File

@ -430,9 +430,9 @@ func (dao *Dao) normalizeViewQueryId(query string) (string, error) {
columns := make([]string, 0, len(rawParsed.columns))
for _, col := range rawParsed.columns {
if col.alias == schema.FieldNameId {
columns = append(columns, fmt.Sprintf("cast(%s as text) %s", col.alias, col.alias))
columns = append(columns, fmt.Sprintf("cast([[%s]] as text) [[%s]]", col.alias, col.alias))
} else {
columns = append(columns, col.alias)
columns = append(columns, "[["+col.alias+"]]")
}
}

View File

@ -440,27 +440,27 @@ func TestSaveCollectionViewWrapping(t *testing.T) {
{
"wrapping - bool field",
"select bool as id, text as txt, url from demo1",
"CREATE VIEW `test_wrapping` AS SELECT * FROM (SELECT cast(id as text) id,txt,url FROM (select bool as id, text as txt, url from demo1))",
"CREATE VIEW `test_wrapping` AS SELECT * FROM (SELECT cast(`id` as text) `id`,`txt`,`url` FROM (select bool as id, text as txt, url from demo1))",
},
{
"wrapping - bool field (different order)",
"select text as txt, url, bool as id from demo1",
"CREATE VIEW `test_wrapping` AS SELECT * FROM (SELECT txt,url,cast(id as text) id FROM (select text as txt, url, bool as id from demo1))",
"CREATE VIEW `test_wrapping` AS SELECT * FROM (SELECT `txt`,`url`,cast(`id` as text) `id` FROM (select text as txt, url, bool as id from demo1))",
},
{
"wrapping - json field",
"select json as id, text, url from demo1",
"CREATE VIEW `test_wrapping` AS SELECT * FROM (SELECT cast(id as text) id,text,url FROM (select json as id, text, url from demo1))",
"CREATE VIEW `test_wrapping` AS SELECT * FROM (SELECT cast(`id` as text) `id`,`text`,`url` FROM (select json as id, text, url from demo1))",
},
{
"wrapping - numeric id",
"select 1 as id",
"CREATE VIEW `test_wrapping` AS SELECT * FROM (SELECT cast(id as text) id FROM (select 1 as id))",
"CREATE VIEW `test_wrapping` AS SELECT * FROM (SELECT cast(`id` as text) `id` FROM (select 1 as id))",
},
{
"wrapping - expresion",
"select ('test') as id",
"CREATE VIEW `test_wrapping` AS SELECT * FROM (SELECT cast(id as text) id FROM (select ('test') as id))",
"CREATE VIEW `test_wrapping` AS SELECT * FROM (SELECT cast(`id` as text) `id` FROM (select ('test') as id))",
},
{
"no wrapping - cast as text",

View File

@ -9,4 +9,4 @@ PB_DOCS_URL = "https://pocketbase.io/docs/"
PB_JS_SDK_URL = "https://github.com/pocketbase/js-sdk"
PB_DART_SDK_URL = "https://github.com/pocketbase/dart-sdk"
PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases"
PB_VERSION = "v0.17.4"
PB_VERSION = "v0.17.5"

View File

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

View File

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

View File

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

File diff suppressed because one or more lines are too long

14
ui/dist/assets/CodeEditor-8fadd9a5.js vendored Normal file

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 Pe,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,O as pe,P as Se,k as we,Q as Oe,n as Re,t as Z,a as x,o as m,d as ge,C as Te,p as Ee,r as j,u as ye,N as Be}from"./index-e82e621c.js";import{S as qe}from"./SdkTabs-dcdfedfb.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=ye(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 Be({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 Ae(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,P,I,R,L,S,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,w,q,v=[],ae=new Map,oe,A,k=[],ne=new Map,O;P=new qe({props:{js:`
import{S as Ce,i as $e,s as Pe,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,P as Se,k as we,Q as Oe,n as Re,t as Z,a as x,o as m,d as ge,C as Te,p as Ee,r as j,u as ye,M as Be}from"./index-3379c20e.js";import{S as qe}from"./SdkTabs-0096fda4.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=ye(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 Be({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 Ae(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,P,I,R,L,S,M,te,N,T,le,Q,K=o[0].name+"",z,se,G,E,J,y,V,B,X,w,q,v=[],ae=new Map,oe,A,k=[],ne=new Map,O;P=new qe({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 Pe,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(P.$$.fragment),I=h(),R=r("h6"),R.textContent="API details",L=h(),S=r("div"),N=r("strong"),N.textContent="POST",te=h(),K=r("div"),T=r("p"),le=g("/api/collections/"),Q=r("strong"),z=g(M),se=g("/confirm-email-change"),G=h(),E=r("div"),E.textContent="Body Parameters",J=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(P.$$.fragment),I=h(),R=r("h6"),R.textContent="API details",L=h(),S=r("div"),M=r("strong"),M.textContent="POST",te=h(),N=r("div"),T=r("p"),le=g("/api/collections/"),Q=r("strong"),z=g(K),se=g("/confirm-email-change"),G=h(),E=r("div"),E.textContent="Body Parameters",J=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 Pe,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(),w=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(N,"class","label label-primary"),b(K,"class","content"),b(S,"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(w,"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(P,e,t),f(e,I,t),f(e,R,t),f(e,L,t),f(e,S,t),n(S,N),n(S,te),n(S,K),n(K,T),n(T,le),n(T,Q),n(Q,z),n(T,se),f(e,G,t),f(e,E,t),f(e,J,t),f(e,y,t),f(e,V,t),f(e,B,t),f(e,X,t),f(e,w,t),n(w,q);for(let c=0;c<v.length;c+=1)v[c]&&v[c].m(q,null);n(w,oe),n(w,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(),w=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(S,"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(w,"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(P,e,t),f(e,I,t),f(e,R,t),f(e,L,t),f(e,S,t),n(S,M),n(S,te),n(S,N),n(N,T),n(T,le),n(T,Q),n(Q,z),n(T,se),f(e,G,t),f(e,E,t),f(e,J,t),f(e,y,t),f(e,V,t),f(e,B,t),f(e,X,t),f(e,w,t),n(w,q);for(let c=0;c<v.length;c+=1)v[c]&&v[c].m(q,null);n(w,oe),n(w,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 Pe,e as r,w as g,b as h,c as he,f as b,g as f,h as n
'TOKEN',
'YOUR_PASSWORD',
);
`),P.$set(c),(!O||t&1)&&M!==(M=e[0].name+"")&&Y(z,M),t&6&&(W=e[2],v=pe(v,t,ie,1,e,W,ae,q,Se,_e,null,be)),t&6&&(U=e[2],we(),k=pe(k,t,ce,1,e,U,ne,A,Oe,ke,null,ue),Re())},i(e){if(!O){Z(P.$$.fragment,e);for(let t=0;t<U.length;t+=1)Z(k[t]);O=!0}},o(e){x(P.$$.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(P,e),e&&m(I),e&&m(R),e&&m(L),e&&m(S),e&&m(G),e&&m(E),e&&m(J),e&&m(y),e&&m(V),e&&m(B),e&&m(X),e&&m(w);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 Ue(o,l,s){let a,{collection:_}=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=Te.getApiExampleUrl(Ee.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:`
`),P.$set(c),(!O||t&1)&&K!==(K=e[0].name+"")&&Y(z,K),t&6&&(W=e[2],v=pe(v,t,ie,1,e,W,ae,q,Se,_e,null,be)),t&6&&(U=e[2],we(),k=pe(k,t,ce,1,e,U,ne,A,Oe,ke,null,ue),Re())},i(e){if(!O){Z(P.$$.fragment,e);for(let t=0;t<U.length;t+=1)Z(k[t]);O=!0}},o(e){x(P.$$.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(P,e),e&&m(I),e&&m(R),e&&m(L),e&&m(S),e&&m(G),e&&m(E),e&&m(J),e&&m(y),e&&m(V),e&&m(B),e&&m(X),e&&m(w);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 Ue(o,l,s){let a,{collection:_}=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=Te.getApiExampleUrl(Ee.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:`
{
"code": 400,
"message": "Failed to authenticate.",
@ -63,4 +63,4 @@ import{S as Ce,i as $e,s as Pe,e as r,w as g,b as h,c as he,f as b,g as f,h as n
}
}
}
`}]),[_,u,i,a,d]}class Ke extends Ce{constructor(l){super(),$e(this,l,Ue,Ae,Pe,{collection:0})}}export{Ke as default};
`}]),[_,u,i,a,d]}class Ne extends Ce{constructor(l){super(),$e(this,l,Ue,Ae,Pe,{collection:0})}}export{Ne as default};

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,O as me,P as Oe,k as Ne,Q as Ce,n as We,t as Z,a as x,o as f,d as Pe,C as $e,p as Ee,r as U,u as Te,N as ge}from"./index-e82e621c.js";import{S as Ae}from"./SdkTabs-dcdfedfb.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=Te(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 ge({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 De(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,q=o[0].name+"",j,ee,H,R,L,W,Q,O,B,te,M,$,se,z,F=o[0].name+"",G,le,J,E,V,T,X,g,Y,N,A,w=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new Ae({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,P as Ne,k as Oe,Q as Ce,n as We,t as Z,a as x,o as f,d as Pe,C as $e,p as Ee,r as U,u as Te,M as ge}from"./index-3379c20e.js";import{S as Ae}from"./SdkTabs-0096fda4.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=Te(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 ge({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 De(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,Q,N,q,te,B,$,se,z,F=o[0].name+"",G,le,J,E,V,T,X,g,Y,O,A,w=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new Ae({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[3]}');
@ -22,7 +22,7 @@ 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
'NEW_PASSWORD',
'NEW_PASSWORD_CONFIRM',
);
`}});let I=o[2];const ie=e=>e[5].code;for(let e=0;e<I.length;e+=1){let t=be(o,I,e),c=ie(t);ae.set(c,w[e]=_e(c,t))}let y=o[2];const ce=e=>e[5].code;for(let e=0;e<y.length;e+=1){let t=ue(o,y,e),c=ce(t);ne.set(c,k[e]=ke(c,t))}return{c(){s=r("h3"),l=P("Confirm password reset ("),_=P(a),u=P(")"),i=v(),p=r("div"),m=r("p"),S=P("Confirms "),h=r("strong"),j=P(q),ee=P(" password reset request and sets a new password."),H=v(),ve(R.$$.fragment),L=v(),W=r("h6"),W.textContent="API details",Q=v(),O=r("div"),B=r("strong"),B.textContent="POST",te=v(),M=r("div"),$=r("p"),se=P("/api/collections/"),z=r("strong"),G=P(F),le=P("/confirm-password-reset"),J=v(),E=r("div"),E.textContent="Body Parameters",V=v(),T=r("table"),T.innerHTML=`<thead><tr><th>Param</th>
`}});let I=o[2];const ie=e=>e[5].code;for(let e=0;e<I.length;e+=1){let t=be(o,I,e),c=ie(t);ae.set(c,w[e]=_e(c,t))}let y=o[2];const ce=e=>e[5].code;for(let e=0;e<y.length;e+=1){let t=ue(o,y,e),c=ce(t);ne.set(c,k[e]=ke(c,t))}return{c(){s=r("h3"),l=P("Confirm password reset ("),_=P(a),u=P(")"),i=v(),p=r("div"),m=r("p"),S=P("Confirms "),h=r("strong"),j=P(M),ee=P(" password reset request and sets a new password."),H=v(),ve(R.$$.fragment),L=v(),W=r("h6"),W.textContent="API details",Q=v(),N=r("div"),q=r("strong"),q.textContent="POST",te=v(),B=r("div"),$=r("p"),se=P("/api/collections/"),z=r("strong"),G=P(F),le=P("/confirm-password-reset"),J=v(),E=r("div"),E.textContent="Body Parameters",V=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>
@ -36,7 +36,7 @@ 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
<tr><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>The new password confirmation.</td></tr></tbody>`,X=v(),g=r("div"),g.textContent="Responses",Y=v(),N=r("div"),A=r("div");for(let e=0;e<w.length;e+=1)w[e].c();oe=v(),D=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(W,"class","m-b-xs"),b(B,"class","label label-primary"),b(M,"class","content"),b(O,"class","alert alert-success"),b(E,"class","section-title"),b(T,"class","table-compact table-border m-b-base"),b(g,"class","section-title"),b(A,"class","tabs-header compact left"),b(D,"class","tabs-content"),b(N,"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,S),n(m,h),n(h,j),n(m,ee),d(e,H,t),we(R,e,t),d(e,L,t),d(e,W,t),d(e,Q,t),d(e,O,t),n(O,B),n(O,te),n(O,M),n(M,$),n($,se),n($,z),n(z,G),n($,le),d(e,J,t),d(e,E,t),d(e,V,t),d(e,T,t),d(e,X,t),d(e,g,t),d(e,Y,t),d(e,N,t),n(N,A);for(let c=0;c<w.length;c+=1)w[c]&&w[c].m(A,null);n(N,oe),n(N,D);for(let c=0;c<k.length;c+=1)k[c]&&k[c].m(D,null);C=!0},p(e,[t]){var fe,pe;(!C||t&1)&&a!==(a=e[0].name+"")&&K(_,a),(!C||t&1)&&q!==(q=e[0].name+"")&&K(j,q);const c={};t&9&&(c.js=`
<td>The new password confirmation.</td></tr></tbody>`,X=v(),g=r("div"),g.textContent="Responses",Y=v(),O=r("div"),A=r("div");for(let e=0;e<w.length;e+=1)w[e].c();oe=v(),D=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(W,"class","m-b-xs"),b(q,"class","label label-primary"),b(B,"class","content"),b(N,"class","alert alert-success"),b(E,"class","section-title"),b(T,"class","table-compact table-border m-b-base"),b(g,"class","section-title"),b(A,"class","tabs-header compact left"),b(D,"class","tabs-content"),b(O,"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,S),n(m,h),n(h,j),n(m,ee),d(e,H,t),we(R,e,t),d(e,L,t),d(e,W,t),d(e,Q,t),d(e,N,t),n(N,q),n(N,te),n(N,B),n(B,$),n($,se),n($,z),n(z,G),n($,le),d(e,J,t),d(e,E,t),d(e,V,t),d(e,T,t),d(e,X,t),d(e,g,t),d(e,Y,t),d(e,O,t),n(O,A);for(let c=0;c<w.length;c+=1)w[c]&&w[c].m(A,null);n(O,oe),n(O,D);for(let c=0;c<k.length;c+=1)k[c]&&k[c].m(D,null);C=!0},p(e,[t]){var fe,pe;(!C||t&1)&&a!==(a=e[0].name+"")&&K(_,a),(!C||t&1)&&M!==(M=e[0].name+"")&&K(j,M);const c={};t&9&&(c.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
@ -60,7 +60,7 @@ 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
'NEW_PASSWORD',
'NEW_PASSWORD_CONFIRM',
);
`),R.$set(c),(!C||t&1)&&F!==(F=e[0].name+"")&&K(G,F),t&6&&(I=e[2],w=me(w,t,ie,1,e,I,ae,A,Oe,_e,null,be)),t&6&&(y=e[2],Ne(),k=me(k,t,ce,1,e,y,ne,D,Ce,ke,null,ue),We())},i(e){if(!C){Z(R.$$.fragment,e);for(let t=0;t<y.length;t+=1)Z(k[t]);C=!0}},o(e){x(R.$$.fragment,e);for(let t=0;t<k.length;t+=1)x(k[t]);C=!1},d(e){e&&f(s),e&&f(i),e&&f(p),e&&f(H),Pe(R,e),e&&f(L),e&&f(W),e&&f(Q),e&&f(O),e&&f(J),e&&f(E),e&&f(V),e&&f(T),e&&f(X),e&&f(g),e&&f(Y),e&&f(N);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 ye(o,s,l){let a,{collection:_}=s,u=204,i=[];const p=m=>l(1,u=m.code);return o.$$set=m=>{"collection"in m&&l(0,_=m.collection)},l(3,a=$e.getApiExampleUrl(Ee.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:`
`),R.$set(c),(!C||t&1)&&F!==(F=e[0].name+"")&&K(G,F),t&6&&(I=e[2],w=me(w,t,ie,1,e,I,ae,A,Ne,_e,null,be)),t&6&&(y=e[2],Oe(),k=me(k,t,ce,1,e,y,ne,D,Ce,ke,null,ue),We())},i(e){if(!C){Z(R.$$.fragment,e);for(let t=0;t<y.length;t+=1)Z(k[t]);C=!0}},o(e){x(R.$$.fragment,e);for(let t=0;t<k.length;t+=1)x(k[t]);C=!1},d(e){e&&f(s),e&&f(i),e&&f(p),e&&f(H),Pe(R,e),e&&f(L),e&&f(W),e&&f(Q),e&&f(N),e&&f(J),e&&f(E),e&&f(V),e&&f(T),e&&f(X),e&&f(g),e&&f(Y),e&&f(O);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 ye(o,s,l){let a,{collection:_}=s,u=204,i=[];const p=m=>l(1,u=m.code);return o.$$set=m=>{"collection"in m&&l(0,_=m.collection)},l(3,a=$e.getApiExampleUrl(Ee.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:`
{
"code": 400,
"message": "Failed to authenticate.",
@ -71,4 +71,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
}
}
}
`}]),[_,u,i,a,p]}class Me extends Se{constructor(s){super(),he(this,s,ye,De,Re,{collection:0})}}export{Me as default};
`}]),[_,u,i,a,p]}class Be extends Se{constructor(s){super(),he(this,s,ye,De,Re,{collection:0})}}export{Be as default};

View File

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

View File

@ -1,4 +1,4 @@
import{S as qt,i as Ot,s as Mt,C as Q,N as Tt,e as a,w as k,b as u,c as be,f as h,g as d,h as n,m as _e,x,O as Be,P as _t,k as Ht,Q as Lt,n as Pt,t as fe,a as pe,o as c,d as ke,p as gt,r as ye,u as Ft,y as ne}from"./index-e82e621c.js";import{S as At}from"./SdkTabs-dcdfedfb.js";import{F as Bt}from"./FieldsQueryParam-22510abf.js";function kt(o,e,l){const s=o.slice();return s[8]=e[l],s}function yt(o,e,l){const s=o.slice();return s[8]=e[l],s}function vt(o,e,l){const s=o.slice();return s[13]=e[l],s}function ht(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){d(l,e,s)},d(l){l&&c(e)}}}function wt(o){let e,l,s,m,b,r,f,v,T,q,$,L,D,E,g,I,j,R,C,N,O,w,_;function M(p,S){var ee,K;return(K=(ee=p[0])==null?void 0:ee.options)!=null&&K.requireEmail?jt:Rt}let z=M(o),F=z(o);return{c(){e=a("tr"),e.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=u(),s=a("tr"),s.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
import{S as qt,i as Mt,s as Ot,C as Q,M as Tt,e as a,w as k,b as u,c as be,f as h,g as d,h as n,m as _e,x,N as Be,P as _t,k as Ht,Q as Lt,n as Pt,t as fe,a as pe,o as c,d as ke,p as gt,r as ye,u as Ft,y as ne}from"./index-3379c20e.js";import{S as At}from"./SdkTabs-0096fda4.js";import{F as Bt}from"./FieldsQueryParam-aebe0d79.js";function kt(o,e,l){const s=o.slice();return s[8]=e[l],s}function yt(o,e,l){const s=o.slice();return s[8]=e[l],s}function vt(o,e,l){const s=o.slice();return s[13]=e[l],s}function ht(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){d(l,e,s)},d(l){l&&c(e)}}}function wt(o){let e,l,s,m,b,r,f,v,T,q,$,L,D,E,g,I,j,R,C,N,M,w,_;function O(p,S){var ee,K;return(K=(ee=p[0])==null?void 0:ee.options)!=null&&K.requireEmail?jt:Rt}let z=O(o),F=z(o);return{c(){e=a("tr"),e.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',l=u(),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.
@ -12,13 +12,13 @@ import{S as qt,i as Ot,s as Mt,C as Q,N as Tt,e as a,w as k,b as u,c as be,f as
<td>Auth record password.</td>`,R=u(),C=a("tr"),C.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=u(),O=a("tr"),O.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
<td>Auth record password confirmation.</td>`,N=u(),M=a("tr"),M.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
<span>verified</span></div></td>
<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>`,w=u(),_=a("tr"),_.innerHTML='<td colspan="3" class="txt-hint">Schema fields</td>',h(f,"class","inline-flex")},m(p,S){d(p,e,S),d(p,l,S),d(p,s,S),d(p,m,S),d(p,b,S),n(b,r),n(r,f),F.m(f,null),n(f,v),n(f,T),n(b,q),n(b,$),n(b,L),n(b,D),d(p,E,S),d(p,g,S),d(p,I,S),d(p,j,S),d(p,R,S),d(p,C,S),d(p,N,S),d(p,O,S),d(p,w,S),d(p,_,S)},p(p,S){z!==(z=M(p))&&(F.d(1),F=z(p),F&&(F.c(),F.m(f,v)))},d(p){p&&c(e),p&&c(l),p&&c(s),p&&c(m),p&&c(b),F.d(),p&&c(E),p&&c(g),p&&c(I),p&&c(j),p&&c(R),p&&c(C),p&&c(N),p&&c(O),p&&c(w),p&&c(_)}}}function Rt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){d(l,e,s)},d(l){l&&c(e)}}}function jt(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){d(l,e,s)},d(l){l&&c(e)}}}function Dt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){d(l,e,s)},d(l){l&&c(e)}}}function Nt(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){d(l,e,s)},d(l){l&&c(e)}}}function Vt(o){var b;let e,l=((b=o[13].options)==null?void 0:b.maxSelect)===1?"id":"ids",s,m;return{c(){e=k("Relation record "),s=k(l),m=k(".")},m(r,f){d(r,e,f),d(r,s,f),d(r,m,f)},p(r,f){var v;f&1&&l!==(l=((v=r[13].options)==null?void 0:v.maxSelect)===1?"id":"ids")&&x(s,l)},d(r){r&&c(e),r&&c(s),r&&c(m)}}}function Jt(o){let e,l,s,m,b;return{c(){e=k("File object."),l=a("br"),s=k(`
Set to `),m=a("code"),m.textContent="null",b=k(" to delete already uploaded file(s).")},m(r,f){d(r,e,f),d(r,l,f),d(r,s,f),d(r,m,f),d(r,b,f)},p:ne,d(r){r&&c(e),r&&c(l),r&&c(s),r&&c(m),r&&c(b)}}}function Et(o){let e;return{c(){e=k("URL address.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function It(o){let e;return{c(){e=k("Email address.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function Ut(o){let e;return{c(){e=k("JSON array or object.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function Qt(o){let e;return{c(){e=k("Number value.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function zt(o){let e;return{c(){e=k("Plain text value.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function $t(o,e){let l,s,m,b,r,f=e[13].name+"",v,T,q,$,L=Q.getFieldValueType(e[13])+"",D,E,g,I;function j(_,M){return _[13].required?Nt:Dt}let R=j(e),C=R(e);function N(_,M){if(_[13].type==="text")return zt;if(_[13].type==="number")return Qt;if(_[13].type==="json")return Ut;if(_[13].type==="email")return It;if(_[13].type==="url")return Et;if(_[13].type==="file")return Jt;if(_[13].type==="relation")return Vt}let O=N(e),w=O&&O(e);return{key:o,first:null,c(){l=a("tr"),s=a("td"),m=a("div"),C.c(),b=u(),r=a("span"),v=k(f),T=u(),q=a("td"),$=a("span"),D=k(L),E=u(),g=a("td"),w&&w.c(),I=u(),h(m,"class","inline-flex"),h($,"class","label"),this.first=l},m(_,M){d(_,l,M),n(l,s),n(s,m),C.m(m,null),n(m,b),n(m,r),n(r,v),n(l,T),n(l,q),n(q,$),n($,D),n(l,E),n(l,g),w&&w.m(g,null),n(l,I)},p(_,M){e=_,R!==(R=j(e))&&(C.d(1),C=R(e),C&&(C.c(),C.m(m,b))),M&1&&f!==(f=e[13].name+"")&&x(v,f),M&1&&L!==(L=Q.getFieldValueType(e[13])+"")&&x(D,L),O===(O=N(e))&&w?w.p(e,M):(w&&w.d(1),w=O&&O(e),w&&(w.c(),w.m(g,null)))},d(_){_&&c(l),C.d(),w&&w.d()}}}function Ct(o,e){let l,s=e[8].code+"",m,b,r,f;function v(){return e[7](e[8])}return{key:o,first:null,c(){l=a("button"),m=k(s),b=u(),h(l,"class","tab-item"),ye(l,"active",e[2]===e[8].code),this.first=l},m(T,q){d(T,l,q),n(l,m),n(l,b),r||(f=Ft(l,"click",v),r=!0)},p(T,q){e=T,q&8&&s!==(s=e[8].code+"")&&x(m,s),q&12&&ye(l,"active",e[2]===e[8].code)},d(T){T&&c(l),r=!1,f()}}}function St(o,e){let l,s,m,b;return s=new Tt({props:{content:e[8].body}}),{key:o,first:null,c(){l=a("div"),be(s.$$.fragment),m=u(),h(l,"class","tab-item"),ye(l,"active",e[2]===e[8].code),this.first=l},m(r,f){d(r,l,f),_e(s,l,null),n(l,m),b=!0},p(r,f){e=r;const v={};f&8&&(v.content=e[8].body),s.$set(v),(!b||f&12)&&ye(l,"active",e[2]===e[8].code)},i(r){b||(fe(s.$$.fragment,r),b=!0)},o(r){pe(s.$$.fragment,r),b=!1},d(r){r&&c(l),ke(s)}}}function Kt(o){var at,ot,rt,dt,ct;let e,l,s=o[0].name+"",m,b,r,f,v,T,q,$=o[0].name+"",L,D,E,g,I,j,R,C,N,O,w,_,M,z,F,p,S,ee,K=o[0].name+"",ve,Re,je,he,se,we,W,$e,De,U,Ce,Ne,Se,V=[],Ve=new Map,Te,ie,qe,Y,Oe,Je,ae,G,Me,Ee,He,Ie,H,Ue,te,Qe,ze,Ke,Le,We,Pe,Ye,Ge,Xe,ge,Ze,xe,le,Fe,oe,Ae,X,re,J=[],et=new Map,tt,de,A=[],lt=new Map,Z;C=new At({props:{js:`
This field can be set only by admins or auth records with &quot;Manage&quot; access.</td>`,w=u(),_=a("tr"),_.innerHTML='<td colspan="3" class="txt-hint">Schema fields</td>',h(f,"class","inline-flex")},m(p,S){d(p,e,S),d(p,l,S),d(p,s,S),d(p,m,S),d(p,b,S),n(b,r),n(r,f),F.m(f,null),n(f,v),n(f,T),n(b,q),n(b,$),n(b,L),n(b,D),d(p,E,S),d(p,g,S),d(p,I,S),d(p,j,S),d(p,R,S),d(p,C,S),d(p,N,S),d(p,M,S),d(p,w,S),d(p,_,S)},p(p,S){z!==(z=O(p))&&(F.d(1),F=z(p),F&&(F.c(),F.m(f,v)))},d(p){p&&c(e),p&&c(l),p&&c(s),p&&c(m),p&&c(b),F.d(),p&&c(E),p&&c(g),p&&c(I),p&&c(j),p&&c(R),p&&c(C),p&&c(N),p&&c(M),p&&c(w),p&&c(_)}}}function Rt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){d(l,e,s)},d(l){l&&c(e)}}}function jt(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){d(l,e,s)},d(l){l&&c(e)}}}function Dt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){d(l,e,s)},d(l){l&&c(e)}}}function Nt(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){d(l,e,s)},d(l){l&&c(e)}}}function Vt(o){var b;let e,l=((b=o[13].options)==null?void 0:b.maxSelect)===1?"id":"ids",s,m;return{c(){e=k("Relation record "),s=k(l),m=k(".")},m(r,f){d(r,e,f),d(r,s,f),d(r,m,f)},p(r,f){var v;f&1&&l!==(l=((v=r[13].options)==null?void 0:v.maxSelect)===1?"id":"ids")&&x(s,l)},d(r){r&&c(e),r&&c(s),r&&c(m)}}}function Jt(o){let e,l,s,m,b;return{c(){e=k("File object."),l=a("br"),s=k(`
Set to `),m=a("code"),m.textContent="null",b=k(" to delete already uploaded file(s).")},m(r,f){d(r,e,f),d(r,l,f),d(r,s,f),d(r,m,f),d(r,b,f)},p:ne,d(r){r&&c(e),r&&c(l),r&&c(s),r&&c(m),r&&c(b)}}}function Et(o){let e;return{c(){e=k("URL address.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function It(o){let e;return{c(){e=k("Email address.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function Ut(o){let e;return{c(){e=k("JSON array or object.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function Qt(o){let e;return{c(){e=k("Number value.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function zt(o){let e;return{c(){e=k("Plain text value.")},m(l,s){d(l,e,s)},p:ne,d(l){l&&c(e)}}}function $t(o,e){let l,s,m,b,r,f=e[13].name+"",v,T,q,$,L=Q.getFieldValueType(e[13])+"",D,E,g,I;function j(_,O){return _[13].required?Nt:Dt}let R=j(e),C=R(e);function N(_,O){if(_[13].type==="text")return zt;if(_[13].type==="number")return Qt;if(_[13].type==="json")return Ut;if(_[13].type==="email")return It;if(_[13].type==="url")return Et;if(_[13].type==="file")return Jt;if(_[13].type==="relation")return Vt}let M=N(e),w=M&&M(e);return{key:o,first:null,c(){l=a("tr"),s=a("td"),m=a("div"),C.c(),b=u(),r=a("span"),v=k(f),T=u(),q=a("td"),$=a("span"),D=k(L),E=u(),g=a("td"),w&&w.c(),I=u(),h(m,"class","inline-flex"),h($,"class","label"),this.first=l},m(_,O){d(_,l,O),n(l,s),n(s,m),C.m(m,null),n(m,b),n(m,r),n(r,v),n(l,T),n(l,q),n(q,$),n($,D),n(l,E),n(l,g),w&&w.m(g,null),n(l,I)},p(_,O){e=_,R!==(R=j(e))&&(C.d(1),C=R(e),C&&(C.c(),C.m(m,b))),O&1&&f!==(f=e[13].name+"")&&x(v,f),O&1&&L!==(L=Q.getFieldValueType(e[13])+"")&&x(D,L),M===(M=N(e))&&w?w.p(e,O):(w&&w.d(1),w=M&&M(e),w&&(w.c(),w.m(g,null)))},d(_){_&&c(l),C.d(),w&&w.d()}}}function Ct(o,e){let l,s=e[8].code+"",m,b,r,f;function v(){return e[7](e[8])}return{key:o,first:null,c(){l=a("button"),m=k(s),b=u(),h(l,"class","tab-item"),ye(l,"active",e[2]===e[8].code),this.first=l},m(T,q){d(T,l,q),n(l,m),n(l,b),r||(f=Ft(l,"click",v),r=!0)},p(T,q){e=T,q&8&&s!==(s=e[8].code+"")&&x(m,s),q&12&&ye(l,"active",e[2]===e[8].code)},d(T){T&&c(l),r=!1,f()}}}function St(o,e){let l,s,m,b;return s=new Tt({props:{content:e[8].body}}),{key:o,first:null,c(){l=a("div"),be(s.$$.fragment),m=u(),h(l,"class","tab-item"),ye(l,"active",e[2]===e[8].code),this.first=l},m(r,f){d(r,l,f),_e(s,l,null),n(l,m),b=!0},p(r,f){e=r;const v={};f&8&&(v.content=e[8].body),s.$set(v),(!b||f&12)&&ye(l,"active",e[2]===e[8].code)},i(r){b||(fe(s.$$.fragment,r),b=!0)},o(r){pe(s.$$.fragment,r),b=!1},d(r){r&&c(l),ke(s)}}}function Kt(o){var at,ot,rt,dt,ct;let e,l,s=o[0].name+"",m,b,r,f,v,T,q,$=o[0].name+"",L,D,E,g,I,j,R,C,N,M,w,_,O,z,F,p,S,ee,K=o[0].name+"",ve,Re,je,he,se,we,W,$e,De,U,Ce,Ne,Se,V=[],Ve=new Map,Te,ie,qe,Y,Me,Je,ae,G,Oe,Ee,He,Ie,H,Ue,te,Qe,ze,Ke,Le,We,Pe,Ye,Ge,Xe,ge,Ze,xe,le,Fe,oe,Ae,X,re,J=[],et=new Map,tt,de,A=[],lt=new Map,Z;C=new At({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[5]}');
@ -51,22 +51,22 @@ await pb.collection('${(dt=o[0])==null?void 0:dt.name}').requestVerification('te
<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>.`,R=u(),be(C.$$.fragment),N=u(),O=a("h6"),O.textContent="API details",w=u(),_=a("div"),M=a("strong"),M.textContent="POST",z=u(),F=a("div"),p=a("p"),S=k("/api/collections/"),ee=a("strong"),ve=k(K),Re=k("/records"),je=u(),B&&B.c(),he=u(),se=a("div"),se.textContent="Body Parameters",we=u(),W=a("table"),$e=a("thead"),$e.innerHTML=`<tr><th>Param</th>
</a>.`,R=u(),be(C.$$.fragment),N=u(),M=a("h6"),M.textContent="API details",w=u(),_=a("div"),O=a("strong"),O.textContent="POST",z=u(),F=a("div"),p=a("p"),S=k("/api/collections/"),ee=a("strong"),ve=k(K),Re=k("/records"),je=u(),B&&B.c(),he=u(),se=a("div"),se.textContent="Body Parameters",we=u(),W=a("table"),$e=a("thead"),$e.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="50%">Description</th></tr>`,De=u(),U=a("tbody"),Ce=a("tr"),Ce.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
<span>id</span></div></td>
<td><span class="label">String</span></td>
<td><strong>15 characters string</strong> to store as record ID.
<br/>
If not set, it will be auto generated.</td>`,Ne=u(),P&&P.c(),Se=u();for(let t=0;t<V.length;t+=1)V[t].c();Te=u(),ie=a("div"),ie.textContent="Query parameters",qe=u(),Y=a("table"),Oe=a("thead"),Oe.innerHTML=`<tr><th>Param</th>
If not set, it will be auto generated.</td>`,Ne=u(),P&&P.c(),Se=u();for(let t=0;t<V.length;t+=1)V[t].c();Te=u(),ie=a("div"),ie.textContent="Query parameters",qe=u(),Y=a("table"),Me=a("thead"),Me.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr>`,Je=u(),ae=a("tbody"),G=a("tr"),Me=a("td"),Me.textContent="expand",Ee=u(),He=a("td"),He.innerHTML='<span class="label">String</span>',Ie=u(),H=a("td"),Ue=k(`Auto expand relations when returning the created record. Ex.:
<th width="60%">Description</th></tr>`,Je=u(),ae=a("tbody"),G=a("tr"),Oe=a("td"),Oe.textContent="expand",Ee=u(),He=a("td"),He.innerHTML='<span class="label">String</span>',Ie=u(),H=a("td"),Ue=k(`Auto expand relations when returning the created record. Ex.:
`),be(te.$$.fragment),Qe=k(`
Supports up to 6-levels depth nested relations expansion. `),ze=a("br"),Ke=k(`
The expanded relations will be appended to the record under the
`),Le=a("code"),Le.textContent="expand",We=k(" property (eg. "),Pe=a("code"),Pe.textContent='"expand": {"relField1": {...}, ...}',Ye=k(`).
`),Ge=a("br"),Xe=k(`
Only the relations to which the request user has permissions to `),ge=a("strong"),ge.textContent="view",Ze=k(" will be expanded."),xe=u(),be(le.$$.fragment),Fe=u(),oe=a("div"),oe.textContent="Responses",Ae=u(),X=a("div"),re=a("div");for(let t=0;t<J.length;t+=1)J[t].c();tt=u(),de=a("div");for(let t=0;t<A.length;t+=1)A[t].c();h(e,"class","m-b-sm"),h(f,"class","content txt-lg m-b-sm"),h(O,"class","m-b-xs"),h(M,"class","label label-primary"),h(F,"class","content"),h(_,"class","alert alert-success"),h(se,"class","section-title"),h(W,"class","table-compact table-border m-b-base"),h(ie,"class","section-title"),h(Y,"class","table-compact table-border m-b-base"),h(oe,"class","section-title"),h(re,"class","tabs-header compact left"),h(de,"class","tabs-content"),h(X,"class","tabs")},m(t,i){d(t,e,i),n(e,l),n(e,m),n(e,b),d(t,r,i),d(t,f,i),n(f,v),n(v,T),n(v,q),n(q,L),n(v,D),n(f,E),n(f,g),n(f,I),n(f,j),d(t,R,i),_e(C,t,i),d(t,N,i),d(t,O,i),d(t,w,i),d(t,_,i),n(_,M),n(_,z),n(_,F),n(F,p),n(p,S),n(p,ee),n(ee,ve),n(p,Re),n(_,je),B&&B.m(_,null),d(t,he,i),d(t,se,i),d(t,we,i),d(t,W,i),n(W,$e),n(W,De),n(W,U),n(U,Ce),n(U,Ne),P&&P.m(U,null),n(U,Se);for(let y=0;y<V.length;y+=1)V[y]&&V[y].m(U,null);d(t,Te,i),d(t,ie,i),d(t,qe,i),d(t,Y,i),n(Y,Oe),n(Y,Je),n(Y,ae),n(ae,G),n(G,Me),n(G,Ee),n(G,He),n(G,Ie),n(G,H),n(H,Ue),_e(te,H,null),n(H,Qe),n(H,ze),n(H,Ke),n(H,Le),n(H,We),n(H,Pe),n(H,Ye),n(H,Ge),n(H,Xe),n(H,ge),n(H,Ze),n(ae,xe),_e(le,ae,null),d(t,Fe,i),d(t,oe,i),d(t,Ae,i),d(t,X,i),n(X,re);for(let y=0;y<J.length;y+=1)J[y]&&J[y].m(re,null);n(X,tt),n(X,de);for(let y=0;y<A.length;y+=1)A[y]&&A[y].m(de,null);Z=!0},p(t,[i]){var ft,pt,ut,mt,bt;(!Z||i&1)&&s!==(s=t[0].name+"")&&x(m,s),(!Z||i&1)&&$!==($=t[0].name+"")&&x(L,$);const y={};i&51&&(y.js=`
Only the relations to which the request user has permissions to `),ge=a("strong"),ge.textContent="view",Ze=k(" will be expanded."),xe=u(),be(le.$$.fragment),Fe=u(),oe=a("div"),oe.textContent="Responses",Ae=u(),X=a("div"),re=a("div");for(let t=0;t<J.length;t+=1)J[t].c();tt=u(),de=a("div");for(let t=0;t<A.length;t+=1)A[t].c();h(e,"class","m-b-sm"),h(f,"class","content txt-lg m-b-sm"),h(M,"class","m-b-xs"),h(O,"class","label label-primary"),h(F,"class","content"),h(_,"class","alert alert-success"),h(se,"class","section-title"),h(W,"class","table-compact table-border m-b-base"),h(ie,"class","section-title"),h(Y,"class","table-compact table-border m-b-base"),h(oe,"class","section-title"),h(re,"class","tabs-header compact left"),h(de,"class","tabs-content"),h(X,"class","tabs")},m(t,i){d(t,e,i),n(e,l),n(e,m),n(e,b),d(t,r,i),d(t,f,i),n(f,v),n(v,T),n(v,q),n(q,L),n(v,D),n(f,E),n(f,g),n(f,I),n(f,j),d(t,R,i),_e(C,t,i),d(t,N,i),d(t,M,i),d(t,w,i),d(t,_,i),n(_,O),n(_,z),n(_,F),n(F,p),n(p,S),n(p,ee),n(ee,ve),n(p,Re),n(_,je),B&&B.m(_,null),d(t,he,i),d(t,se,i),d(t,we,i),d(t,W,i),n(W,$e),n(W,De),n(W,U),n(U,Ce),n(U,Ne),P&&P.m(U,null),n(U,Se);for(let y=0;y<V.length;y+=1)V[y]&&V[y].m(U,null);d(t,Te,i),d(t,ie,i),d(t,qe,i),d(t,Y,i),n(Y,Me),n(Y,Je),n(Y,ae),n(ae,G),n(G,Oe),n(G,Ee),n(G,He),n(G,Ie),n(G,H),n(H,Ue),_e(te,H,null),n(H,Qe),n(H,ze),n(H,Ke),n(H,Le),n(H,We),n(H,Pe),n(H,Ye),n(H,Ge),n(H,Xe),n(H,ge),n(H,Ze),n(ae,xe),_e(le,ae,null),d(t,Fe,i),d(t,oe,i),d(t,Ae,i),d(t,X,i),n(X,re);for(let y=0;y<J.length;y+=1)J[y]&&J[y].m(re,null);n(X,tt),n(X,de);for(let y=0;y<A.length;y+=1)A[y]&&A[y].m(de,null);Z=!0},p(t,[i]){var ft,pt,ut,mt,bt;(!Z||i&1)&&s!==(s=t[0].name+"")&&x(m,s),(!Z||i&1)&&$!==($=t[0].name+"")&&x(L,$);const y={};i&51&&(y.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${t[5]}');
@ -94,7 +94,7 @@ final record = await pb.collection('${(ut=t[0])==null?void 0:ut.name}').create(b
`+(t[1]?`
// (optional) send an email verification request
await pb.collection('${(mt=t[0])==null?void 0:mt.name}').requestVerification('test@example.com');
`:"")),C.$set(y),(!Z||i&1)&&K!==(K=t[0].name+"")&&x(ve,K),t[6]?B||(B=ht(),B.c(),B.m(_,null)):B&&(B.d(1),B=null),t[1]?P?P.p(t,i):(P=wt(t),P.c(),P.m(U,Se)):P&&(P.d(1),P=null),i&1&&(ue=(bt=t[0])==null?void 0:bt.schema,V=Be(V,i,nt,1,t,ue,Ve,U,_t,$t,null,vt)),i&12&&(me=t[3],J=Be(J,i,st,1,t,me,et,re,_t,Ct,null,yt)),i&12&&(ce=t[3],Ht(),A=Be(A,i,it,1,t,ce,lt,de,Lt,St,null,kt),Pt())},i(t){if(!Z){fe(C.$$.fragment,t),fe(te.$$.fragment,t),fe(le.$$.fragment,t);for(let i=0;i<ce.length;i+=1)fe(A[i]);Z=!0}},o(t){pe(C.$$.fragment,t),pe(te.$$.fragment,t),pe(le.$$.fragment,t);for(let i=0;i<A.length;i+=1)pe(A[i]);Z=!1},d(t){t&&c(e),t&&c(r),t&&c(f),t&&c(R),ke(C,t),t&&c(N),t&&c(O),t&&c(w),t&&c(_),B&&B.d(),t&&c(he),t&&c(se),t&&c(we),t&&c(W),P&&P.d();for(let i=0;i<V.length;i+=1)V[i].d();t&&c(Te),t&&c(ie),t&&c(qe),t&&c(Y),ke(te),ke(le),t&&c(Fe),t&&c(oe),t&&c(Ae),t&&c(X);for(let i=0;i<J.length;i+=1)J[i].d();for(let i=0;i<A.length;i+=1)A[i].d()}}}function Wt(o,e,l){let s,m,b,{collection:r}=e,f=200,v=[],T={};const q=$=>l(2,f=$.code);return o.$$set=$=>{"collection"in $&&l(0,r=$.collection)},o.$$.update=()=>{var $,L;o.$$.dirty&1&&l(1,s=r.type==="auth"),o.$$.dirty&1&&l(6,m=(r==null?void 0:r.createRule)===null),o.$$.dirty&1&&l(3,v=[{code:200,body:JSON.stringify(Q.dummyCollectionRecord(r),null,2)},{code:400,body:`
`:"")),C.$set(y),(!Z||i&1)&&K!==(K=t[0].name+"")&&x(ve,K),t[6]?B||(B=ht(),B.c(),B.m(_,null)):B&&(B.d(1),B=null),t[1]?P?P.p(t,i):(P=wt(t),P.c(),P.m(U,Se)):P&&(P.d(1),P=null),i&1&&(ue=(bt=t[0])==null?void 0:bt.schema,V=Be(V,i,nt,1,t,ue,Ve,U,_t,$t,null,vt)),i&12&&(me=t[3],J=Be(J,i,st,1,t,me,et,re,_t,Ct,null,yt)),i&12&&(ce=t[3],Ht(),A=Be(A,i,it,1,t,ce,lt,de,Lt,St,null,kt),Pt())},i(t){if(!Z){fe(C.$$.fragment,t),fe(te.$$.fragment,t),fe(le.$$.fragment,t);for(let i=0;i<ce.length;i+=1)fe(A[i]);Z=!0}},o(t){pe(C.$$.fragment,t),pe(te.$$.fragment,t),pe(le.$$.fragment,t);for(let i=0;i<A.length;i+=1)pe(A[i]);Z=!1},d(t){t&&c(e),t&&c(r),t&&c(f),t&&c(R),ke(C,t),t&&c(N),t&&c(M),t&&c(w),t&&c(_),B&&B.d(),t&&c(he),t&&c(se),t&&c(we),t&&c(W),P&&P.d();for(let i=0;i<V.length;i+=1)V[i].d();t&&c(Te),t&&c(ie),t&&c(qe),t&&c(Y),ke(te),ke(le),t&&c(Fe),t&&c(oe),t&&c(Ae),t&&c(X);for(let i=0;i<J.length;i+=1)J[i].d();for(let i=0;i<A.length;i+=1)A[i].d()}}}function Wt(o,e,l){let s,m,b,{collection:r}=e,f=200,v=[],T={};const q=$=>l(2,f=$.code);return o.$$set=$=>{"collection"in $&&l(0,r=$.collection)},o.$$.update=()=>{var $,L;o.$$.dirty&1&&l(1,s=r.type==="auth"),o.$$.dirty&1&&l(6,m=(r==null?void 0:r.createRule)===null),o.$$.dirty&1&&l(3,v=[{code:200,body:JSON.stringify(Q.dummyCollectionRecord(r),null,2)},{code:400,body:`
{
"code": 400,
"message": "Failed to create record.",
@ -111,4 +111,4 @@ await pb.collection('${(mt=t[0])==null?void 0:mt.name}').requestVerification('te
"message": "You are not allowed to perform this request.",
"data": {}
}
`}]),o.$$.dirty&2&&(s?l(4,T={username:"test_username",email:"test@example.com",emailVisibility:!0,password:"12345678",passwordConfirm:"12345678"}):l(4,T={}))},l(5,b=Q.getApiExampleUrl(gt.baseUrl)),[r,s,f,v,T,b,m,q]}class Zt extends qt{constructor(e){super(),Ot(this,e,Wt,Kt,Mt,{collection:0})}}export{Zt as default};
`}]),o.$$.dirty&2&&(s?l(4,T={username:"test_username",email:"test@example.com",emailVisibility:!0,password:"12345678",passwordConfirm:"12345678"}):l(4,T={}))},l(5,b=Q.getApiExampleUrl(gt.baseUrl)),[r,s,f,v,T,b,m,q]}class Zt extends qt{constructor(e){super(),Mt(this,e,Wt,Kt,Ot,{collection:0})}}export{Zt as default};

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 ge,x,O as _e,P as Ee,k as Oe,Q as Te,n as Be,t as ee,a as te,o as p,d as we,C as Ie,p as Ae,r as N,u as Me,N as Se}from"./index-e82e621c.js";import{S as qe}from"./SdkTabs-dcdfedfb.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&&p(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,u;function g(){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,w){f(b,s,w),n(s,v),n(s,i),r||(u=Me(s,"click",g),r=!0)},p(b,w){l=b,w&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&p(s),r=!1,u()}}}function De(o,l){let s,a,v,i;return a=new Se({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,u){f(r,s,u),ge(a,s,null),n(s,v),i=!0},p(r,u){l=r,(!i||u&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&&p(s),we(a)}}}function He(o){var pe,ue;let l,s,a=o[0].name+"",v,i,r,u,g,b,w,q=o[0].name+"",z,le,F,C,K,O,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,D=[],ie=new Map,re,M,_=[],ce=new Map,P;C=new qe({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 ge,x,N as _e,P as Ee,k as Te,Q as Be,n as Oe,t as ee,a as te,o as p,d as we,C as Ie,p as Me,r as N,u as Ae,M as Se}from"./index-3379c20e.js";import{S as qe}from"./SdkTabs-0096fda4.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&&p(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,u;function g(){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,w){f(b,s,w),n(s,v),n(s,i),r||(u=Ae(s,"click",g),r=!0)},p(b,w){l=b,w&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&p(s),r=!1,u()}}}function De(o,l){let s,a,v,i;return a=new Se({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,u){f(r,s,u),ge(a,s,null),n(s,v),i=!0},p(r,u){l=r,(!i||u&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&&p(s),we(a)}}}function He(o){var pe,ue;let l,s,a=o[0].name+"",v,i,r,u,g,b,w,q=o[0].name+"",z,le,F,C,K,T,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,B,X,O,Y,I,Z,R,M,D=[],ie=new Map,re,A,_=[],ce=new Map,P;C=new qe({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('${(ue=o[0])==null?void 0:ue.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(),u=c("div"),g=c("p"),b=$("Delete a single "),w=c("strong"),z=$(q),le=$(" record."),F=h(),$e(C.$$.fragment),K=h(),O=c("h6"),O.textContent="API details",Q=h(),y=c("div"),H=c("strong"),H.textContent="DELETE",se=h(),L=c("div"),E=c("p"),oe=$("/api/collections/"),G=c("strong"),J=$(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(),u=c("div"),g=c("p"),b=$("Delete a single "),w=c("strong"),z=$(q),le=$(" record."),F=h(),$e(C.$$.fragment),K=h(),T=c("h6"),T.textContent="API details",Q=h(),y=c("div"),H=c("strong"),H.textContent="DELETE",se=h(),L=c("div"),E=c("p"),oe=$("/api/collections/"),G=c("strong"),J=$(U),ae=$("/records/"),V=c("strong"),V.textContent=":id",ne=h(),k&&k.c(),W=h(),B=c("div"),B.textContent="Path parameters",X=h(),O=c("table"),O.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"),A=c("div");for(let e=0;e<D.length;e+=1)D[e].c();re=h(),M=c("div");for(let e=0;e<_.length;e+=1)_[e].c();m(l,"class","m-b-sm"),m(u,"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(A,"class","tabs-header compact left"),m(M,"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,u,t),n(u,g),n(g,b),n(g,w),n(w,z),n(g,le),f(e,F,t),ge(C,e,t),f(e,K,t),f(e,O,t),f(e,Q,t),f(e,y,t),n(y,H),n(y,se),n(y,L),n(L,E),n(E,oe),n(E,G),n(G,J),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,A);for(let d=0;d<D.length;d+=1)D[d]&&D[d].m(A,null);n(R,re),n(R,M);for(let d=0;d<_.length;d+=1)_[d]&&_[d].m(M,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(u,"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(B,"class","section-title"),m(O,"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,u,t),n(u,g),n(g,b),n(g,w),n(w,z),n(g,le),f(e,F,t),ge(C,e,t),f(e,K,t),f(e,T,t),f(e,Q,t),f(e,y,t),n(y,H),n(y,se),n(y,L),n(L,E),n(E,oe),n(E,G),n(G,J),n(E,ae),n(E,V),n(y,ne),k&&k.m(y,null),f(e,W,t),f(e,B,t),f(e,X,t),f(e,O,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(J,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,A,Ee,ye,null,he)),t&20&&(S=e[4],Oe(),_=_e(_,t,fe,1,e,S,ce,M,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&&p(l),e&&p(r),e&&p(u),e&&p(F),we(C,e),e&&p(K),e&&p(O),e&&p(Q),e&&p(y),k&&k.d(),e&&p(W),e&&p(T),e&&p(X),e&&p(B),e&&p(Y),e&&p(I),e&&p(Z),e&&p(R);for(let t=0;t<D.length;t+=1)D[t].d();for(let t=0;t<_.length;t+=1)_[t].d()}}}function Le(o,l,s){let a,v,{collection:i}=l,r=204,u=[];const g=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&&(u.push({code:204,body:`
`),C.$set(d),(!P||t&1)&&U!==(U=e[0].name+"")&&x(J,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,Be,De,null,ke),Oe())},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&&p(l),e&&p(r),e&&p(u),e&&p(F),we(C,e),e&&p(K),e&&p(T),e&&p(Q),e&&p(y),k&&k.d(),e&&p(W),e&&p(B),e&&p(X),e&&p(O),e&&p(Y),e&&p(I),e&&p(Z),e&&p(R);for(let t=0;t<D.length;t+=1)D[t].d();for(let t=0;t<_.length;t+=1)_[t].d()}}}function Le(o,l,s){let a,v,{collection:i}=l,r=204,u=[];const g=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&&(u.push({code:204,body:`
null
`}),u.push({code:400,body:`
{
@ -55,4 +55,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
"message": "The requested resource wasn't found.",
"data": {}
}
`}))},s(3,v=Ie.getApiExampleUrl(Ae.baseUrl)),[i,a,r,v,u,g]}class Ne extends Ce{constructor(l){super(),Re(this,l,Le,He,Pe,{collection:0})}}export{Ne as default};
`}))},s(3,v=Ie.getApiExampleUrl(Me.baseUrl)),[i,a,r,v,u,g]}class Ne extends Ce{constructor(l){super(),Re(this,l,Le,He,Pe,{collection:0})}}export{Ne as default};

View File

@ -1,4 +1,4 @@
import{S as d,i as n,s as i,e as l,g as o,y as s,o as p}from"./index-e82e621c.js";function c(a){let e;return{c(){e=l("tr"),e.innerHTML=`<td id="query-page">fields</td>
import{S as d,i as n,s as i,e as l,g as o,y as s,o as p}from"./index-3379c20e.js";function c(a){let e;return{c(){e=l("tr"),e.innerHTML=`<td id="query-page">fields</td>
<td><span class="label">String</span></td>
<td>Comma separated string of the fields to return in the JSON response
<em>(by default returns all fields)</em>. For example:

View File

@ -1,14 +1,14 @@
import{S as Ye,i as Ze,s as tl,e,b as s,E as ll,f as i,g as u,u as el,y as Ge,o as m,w as x,h as t,N as ve,c as te,m as ee,x as $e,O as Ue,P as sl,k as nl,Q as ol,n as il,t as Bt,a as Gt,d as le,R as al,C as ye,p as rl,r as Fe}from"./index-e82e621c.js";import{S as cl}from"./SdkTabs-dcdfedfb.js";function dl(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 fl(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 je(c){let n,o,a,p,b,d,h,g,w,_,f,Z,Ct,Ut,E,jt,M,at,S,tt,se,G,U,ne,rt,$t,et,kt,oe,ct,dt,lt,N,zt,yt,v,st,vt,Jt,Ft,j,nt,Lt,Kt,At,L,ft,Tt,ie,pt,ae,D,Pt,ot,St,O,ut,re,z,Ot,Qt,Rt,ce,q,Vt,J,mt,de,I,fe,B,pe,P,Et,K,bt,ue,ht,me,$,Nt,it,qt,be,Ht,Wt,Q,_t,he,Mt,_e,wt,we,V,xt,xe,gt,Xt,W,Yt,A,X,R,Dt,ge,Y,F,It;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format
import{S as Ye,i as Ze,s as tl,e,b as s,E as ll,f as i,g as u,u as el,y as Ge,o as m,w as x,h as t,M as ve,c as te,m as ee,x as $e,N as Ue,P as sl,k as nl,Q as ol,n as il,t as Bt,a as Gt,d as le,R as al,C as ye,p as rl,r as Fe}from"./index-3379c20e.js";import{S as cl}from"./SdkTabs-0096fda4.js";function dl(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 fl(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 je(c){let n,o,a,p,b,d,h,g,w,_,f,Z,Ct,Ut,E,jt,H,at,S,tt,se,G,U,ne,rt,$t,et,kt,oe,ct,dt,lt,N,zt,yt,v,st,vt,Jt,Ft,j,nt,Lt,Kt,At,L,ft,Tt,ie,pt,ae,D,Pt,ot,St,R,ut,re,z,Rt,Qt,Ot,ce,q,Vt,J,mt,de,I,fe,B,pe,P,Et,K,bt,ue,ht,me,$,Nt,it,qt,be,Mt,Wt,Q,_t,he,Ht,_e,wt,we,V,xt,xe,gt,Xt,W,Yt,A,X,O,Dt,ge,Y,F,It;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",g=x(` - is one of:
`),w=e("br"),_=s(),f=e("ul"),Z=e("li"),Ct=e("code"),Ct.textContent="=",Ut=s(),E=e("span"),E.textContent="Equal",jt=s(),M=e("li"),at=e("code"),at.textContent="!=",S=s(),tt=e("span"),tt.textContent="NOT equal",se=s(),G=e("li"),U=e("code"),U.textContent=">",ne=s(),rt=e("span"),rt.textContent="Greater than",$t=s(),et=e("li"),kt=e("code"),kt.textContent=">=",oe=s(),ct=e("span"),ct.textContent="Greater than or equal",dt=s(),lt=e("li"),N=e("code"),N.textContent="<",zt=s(),yt=e("span"),yt.textContent="Less than",v=s(),st=e("li"),vt=e("code"),vt.textContent="<=",Jt=s(),Ft=e("span"),Ft.textContent="Less than or equal",j=s(),nt=e("li"),Lt=e("code"),Lt.textContent="~",Kt=s(),At=e("span"),At.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
`),w=e("br"),_=s(),f=e("ul"),Z=e("li"),Ct=e("code"),Ct.textContent="=",Ut=s(),E=e("span"),E.textContent="Equal",jt=s(),H=e("li"),at=e("code"),at.textContent="!=",S=s(),tt=e("span"),tt.textContent="NOT equal",se=s(),G=e("li"),U=e("code"),U.textContent=">",ne=s(),rt=e("span"),rt.textContent="Greater than",$t=s(),et=e("li"),kt=e("code"),kt.textContent=">=",oe=s(),ct=e("span"),ct.textContent="Greater than or equal",dt=s(),lt=e("li"),N=e("code"),N.textContent="<",zt=s(),yt=e("span"),yt.textContent="Less than",v=s(),st=e("li"),vt=e("code"),vt.textContent="<=",Jt=s(),Ft=e("span"),Ft.textContent="Less than or equal",j=s(),nt=e("li"),Lt=e("code"),Lt.textContent="~",Kt=s(),At=e("span"),At.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,L=s(),ft=e("li"),Tt=e("code"),Tt.textContent="!~",ie=s(),pt=e("span"),pt.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,ae=s(),D=e("li"),Pt=e("code"),Pt.textContent="?=",ot=s(),St=e("em"),St.textContent="Any/At least one of",O=s(),ut=e("span"),ut.textContent="Equal",re=s(),z=e("li"),Ot=e("code"),Ot.textContent="?!=",Qt=s(),Rt=e("em"),Rt.textContent="Any/At least one of",ce=s(),q=e("span"),q.textContent="NOT equal",Vt=s(),J=e("li"),mt=e("code"),mt.textContent="?>",de=s(),I=e("em"),I.textContent="Any/At least one of",fe=s(),B=e("span"),B.textContent="Greater than",pe=s(),P=e("li"),Et=e("code"),Et.textContent="?>=",K=s(),bt=e("em"),bt.textContent="Any/At least one of",ue=s(),ht=e("span"),ht.textContent="Greater than or equal",me=s(),$=e("li"),Nt=e("code"),Nt.textContent="?<",it=s(),qt=e("em"),qt.textContent="Any/At least one of",be=s(),Ht=e("span"),Ht.textContent="Less than",Wt=s(),Q=e("li"),_t=e("code"),_t.textContent="?<=",he=s(),Mt=e("em"),Mt.textContent="Any/At least one of",_e=s(),wt=e("span"),wt.textContent="Less than or equal",we=s(),V=e("li"),xt=e("code"),xt.textContent="?~",xe=s(),gt=e("em"),gt.textContent="Any/At least one of",Xt=s(),W=e("span"),W.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,Yt=s(),A=e("li"),X=e("code"),X.textContent="?!~",R=s(),Dt=e("em"),Dt.textContent="Any/At least one of",ge=s(),Y=e("span"),Y.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,ae=s(),D=e("li"),Pt=e("code"),Pt.textContent="?=",ot=s(),St=e("em"),St.textContent="Any/At least one of",R=s(),ut=e("span"),ut.textContent="Equal",re=s(),z=e("li"),Rt=e("code"),Rt.textContent="?!=",Qt=s(),Ot=e("em"),Ot.textContent="Any/At least one of",ce=s(),q=e("span"),q.textContent="NOT equal",Vt=s(),J=e("li"),mt=e("code"),mt.textContent="?>",de=s(),I=e("em"),I.textContent="Any/At least one of",fe=s(),B=e("span"),B.textContent="Greater than",pe=s(),P=e("li"),Et=e("code"),Et.textContent="?>=",K=s(),bt=e("em"),bt.textContent="Any/At least one of",ue=s(),ht=e("span"),ht.textContent="Greater than or equal",me=s(),$=e("li"),Nt=e("code"),Nt.textContent="?<",it=s(),qt=e("em"),qt.textContent="Any/At least one of",be=s(),Mt=e("span"),Mt.textContent="Less than",Wt=s(),Q=e("li"),_t=e("code"),_t.textContent="?<=",he=s(),Ht=e("em"),Ht.textContent="Any/At least one of",_e=s(),wt=e("span"),wt.textContent="Less than or equal",we=s(),V=e("li"),xt=e("code"),xt.textContent="?~",xe=s(),gt=e("em"),gt.textContent="Any/At least one of",Xt=s(),W=e("span"),W.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,Yt=s(),A=e("li"),X=e("code"),X.textContent="?!~",O=s(),Dt=e("em"),Dt.textContent="Any/At least one of",ge=s(),Y=e("span"),Y.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,F=s(),It=e("p"),It.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(Ct,"class","filter-op svelte-1w7s5nw"),i(E,"class","txt"),i(at,"class","filter-op svelte-1w7s5nw"),i(tt,"class","txt"),i(U,"class","filter-op svelte-1w7s5nw"),i(rt,"class","txt"),i(kt,"class","filter-op svelte-1w7s5nw"),i(ct,"class","txt"),i(N,"class","filter-op svelte-1w7s5nw"),i(yt,"class","txt"),i(vt,"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(Pt,"class","filter-op svelte-1w7s5nw"),i(St,"class","txt-hint"),i(ut,"class","txt"),i(Ot,"class","filter-op svelte-1w7s5nw"),i(Rt,"class","txt-hint"),i(q,"class","txt"),i(mt,"class","filter-op svelte-1w7s5nw"),i(I,"class","txt-hint"),i(B,"class","txt"),i(Et,"class","filter-op svelte-1w7s5nw"),i(bt,"class","txt-hint"),i(ht,"class","txt"),i(Nt,"class","filter-op svelte-1w7s5nw"),i(qt,"class","txt-hint"),i(Ht,"class","txt"),i(_t,"class","filter-op svelte-1w7s5nw"),i(Mt,"class","txt-hint"),i(wt,"class","txt"),i(xt,"class","filter-op svelte-1w7s5nw"),i(gt,"class","txt-hint"),i(W,"class","txt"),i(X,"class","filter-op svelte-1w7s5nw"),i(Dt,"class","txt-hint"),i(Y,"class","txt")},m(k,y){u(k,n,y),u(k,o,y),u(k,a,y),t(a,p),t(a,b),t(a,d),t(d,h),t(d,g),t(d,w),t(d,_),t(d,f),t(f,Z),t(Z,Ct),t(Z,Ut),t(Z,E),t(f,jt),t(f,M),t(M,at),t(M,S),t(M,tt),t(f,se),t(f,G),t(G,U),t(G,ne),t(G,rt),t(f,$t),t(f,et),t(et,kt),t(et,oe),t(et,ct),t(f,dt),t(f,lt),t(lt,N),t(lt,zt),t(lt,yt),t(f,v),t(f,st),t(st,vt),t(st,Jt),t(st,Ft),t(f,j),t(f,nt),t(nt,Lt),t(nt,Kt),t(nt,At),t(f,L),t(f,ft),t(ft,Tt),t(ft,ie),t(ft,pt),t(f,ae),t(f,D),t(D,Pt),t(D,ot),t(D,St),t(D,O),t(D,ut),t(f,re),t(f,z),t(z,Ot),t(z,Qt),t(z,Rt),t(z,ce),t(z,q),t(f,Vt),t(f,J),t(J,mt),t(J,de),t(J,I),t(J,fe),t(J,B),t(f,pe),t(f,P),t(P,Et),t(P,K),t(P,bt),t(P,ue),t(P,ht),t(f,me),t(f,$),t($,Nt),t($,it),t($,qt),t($,be),t($,Ht),t(f,Wt),t(f,Q),t(Q,_t),t(Q,he),t(Q,Mt),t(Q,_e),t(Q,wt),t(f,we),t(f,V),t(V,xt),t(V,xe),t(V,gt),t(V,Xt),t(V,W),t(f,Yt),t(f,A),t(A,X),t(A,R),t(A,Dt),t(A,ge),t(A,Y),u(k,F,y),u(k,It,y)},d(k){k&&m(n),k&&m(o),k&&m(a),k&&m(F),k&&m(It)}}}function pl(c){let n,o,a,p,b;function d(_,f){return _[0]?fl:dl}let h=d(c),g=h(c),w=c[0]&&je();return{c(){n=e("button"),g.c(),o=s(),w&&w.c(),a=ll(),i(n,"class","btn btn-sm btn-secondary m-t-10")},m(_,f){u(_,n,f),g.m(n,null),u(_,o,f),w&&w.m(_,f),u(_,a,f),p||(b=el(n,"click",c[1]),p=!0)},p(_,[f]){h!==(h=d(_))&&(g.d(1),g=h(_),g&&(g.c(),g.m(n,null))),_[0]?w||(w=je(),w.c(),w.m(a.parentNode,a)):w&&(w.d(1),w=null)},i:Ge,o:Ge,d(_){_&&m(n),g.d(),_&&m(o),w&&w.d(_),_&&m(a),p=!1,b()}}}function ul(c,n,o){let a=!1;function p(){o(0,a=!a)}return[a,p]}class ml extends Ye{constructor(n){super(),Ze(this,n,ul,pl,tl,{})}}function ze(c,n,o){const a=c.slice();return a[7]=n[o],a}function Je(c,n,o){const a=c.slice();return a[7]=n[o],a}function Ke(c,n,o){const a=c.slice();return a[12]=n[o],a[14]=o,a}function Qe(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 Ve(c){let n,o=c[12]+"",a,p=c[14]<c[4].length-1?", ":"",b;return{c(){n=e("code"),a=x(o),b=x(p)},m(d,h){u(d,n,h),t(n,a),u(d,b,h)},p(d,h){h&16&&o!==(o=d[12]+"")&&$e(a,o),h&16&&p!==(p=d[14]<d[4].length-1?", ":"")&&$e(b,p)},d(d){d&&m(n),d&&m(b)}}}function We(c,n){let o,a=n[7].code+"",p,b,d,h;function g(){return n[6](n[7])}return{key:c,first:null,c(){o=e("button"),p=x(a),b=s(),i(o,"type","button"),i(o,"class","tab-item"),Fe(o,"active",n[2]===n[7].code),this.first=o},m(w,_){u(w,o,_),t(o,p),t(o,b),d||(h=el(o,"click",g),d=!0)},p(w,_){n=w,_&36&&Fe(o,"active",n[2]===n[7].code)},d(w){w&&m(o),d=!1,h()}}}function Xe(c,n){let o,a,p,b;return a=new ve({props:{content:n[7].body}}),{key:c,first:null,c(){o=e("div"),te(a.$$.fragment),p=s(),i(o,"class","tab-item"),Fe(o,"active",n[2]===n[7].code),this.first=o},m(d,h){u(d,o,h),ee(a,o,null),t(o,p),b=!0},p(d,h){n=d,(!b||h&36)&&Fe(o,"active",n[2]===n[7].code)},i(d){b||(Bt(a.$$.fragment,d),b=!0)},o(d){Gt(a.$$.fragment,d),b=!1},d(d){d&&m(o),le(a)}}}function bl(c){var Te,Pe,Se,Oe,Re,Ee;let n,o,a=c[0].name+"",p,b,d,h,g,w,_,f=c[0].name+"",Z,Ct,Ut,E,jt,M,at,S,tt,se,G,U,ne,rt,$t=c[0].name+"",et,kt,oe,ct,dt,lt,N,zt,yt,v,st,vt,Jt,Ft,j,nt,Lt,Kt,At,L,ft,Tt,ie,pt,ae,D,Pt,ot,St,O,ut,re,z,Ot,Qt,Rt,ce,q,Vt,J,mt,de,I,fe,B,pe,P,Et,K,bt,ue,ht,me,$,Nt,it,qt,be,Ht,Wt,Q,_t,he,Mt,_e,wt,we,V,xt,xe,gt,Xt,W,Yt,A,X,R=[],Dt=new Map,ge,Y,F=[],It=new Map,k;E=new cl({props:{js:`
<code>(...)</code>, <code>&amp;&amp;</code> (AND) and <code>||</code> (OR) tokens.`,i(h,"class","txt-danger"),i(Ct,"class","filter-op svelte-1w7s5nw"),i(E,"class","txt"),i(at,"class","filter-op svelte-1w7s5nw"),i(tt,"class","txt"),i(U,"class","filter-op svelte-1w7s5nw"),i(rt,"class","txt"),i(kt,"class","filter-op svelte-1w7s5nw"),i(ct,"class","txt"),i(N,"class","filter-op svelte-1w7s5nw"),i(yt,"class","txt"),i(vt,"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(Pt,"class","filter-op svelte-1w7s5nw"),i(St,"class","txt-hint"),i(ut,"class","txt"),i(Rt,"class","filter-op svelte-1w7s5nw"),i(Ot,"class","txt-hint"),i(q,"class","txt"),i(mt,"class","filter-op svelte-1w7s5nw"),i(I,"class","txt-hint"),i(B,"class","txt"),i(Et,"class","filter-op svelte-1w7s5nw"),i(bt,"class","txt-hint"),i(ht,"class","txt"),i(Nt,"class","filter-op svelte-1w7s5nw"),i(qt,"class","txt-hint"),i(Mt,"class","txt"),i(_t,"class","filter-op svelte-1w7s5nw"),i(Ht,"class","txt-hint"),i(wt,"class","txt"),i(xt,"class","filter-op svelte-1w7s5nw"),i(gt,"class","txt-hint"),i(W,"class","txt"),i(X,"class","filter-op svelte-1w7s5nw"),i(Dt,"class","txt-hint"),i(Y,"class","txt")},m(k,y){u(k,n,y),u(k,o,y),u(k,a,y),t(a,p),t(a,b),t(a,d),t(d,h),t(d,g),t(d,w),t(d,_),t(d,f),t(f,Z),t(Z,Ct),t(Z,Ut),t(Z,E),t(f,jt),t(f,H),t(H,at),t(H,S),t(H,tt),t(f,se),t(f,G),t(G,U),t(G,ne),t(G,rt),t(f,$t),t(f,et),t(et,kt),t(et,oe),t(et,ct),t(f,dt),t(f,lt),t(lt,N),t(lt,zt),t(lt,yt),t(f,v),t(f,st),t(st,vt),t(st,Jt),t(st,Ft),t(f,j),t(f,nt),t(nt,Lt),t(nt,Kt),t(nt,At),t(f,L),t(f,ft),t(ft,Tt),t(ft,ie),t(ft,pt),t(f,ae),t(f,D),t(D,Pt),t(D,ot),t(D,St),t(D,R),t(D,ut),t(f,re),t(f,z),t(z,Rt),t(z,Qt),t(z,Ot),t(z,ce),t(z,q),t(f,Vt),t(f,J),t(J,mt),t(J,de),t(J,I),t(J,fe),t(J,B),t(f,pe),t(f,P),t(P,Et),t(P,K),t(P,bt),t(P,ue),t(P,ht),t(f,me),t(f,$),t($,Nt),t($,it),t($,qt),t($,be),t($,Mt),t(f,Wt),t(f,Q),t(Q,_t),t(Q,he),t(Q,Ht),t(Q,_e),t(Q,wt),t(f,we),t(f,V),t(V,xt),t(V,xe),t(V,gt),t(V,Xt),t(V,W),t(f,Yt),t(f,A),t(A,X),t(A,O),t(A,Dt),t(A,ge),t(A,Y),u(k,F,y),u(k,It,y)},d(k){k&&m(n),k&&m(o),k&&m(a),k&&m(F),k&&m(It)}}}function pl(c){let n,o,a,p,b;function d(_,f){return _[0]?fl:dl}let h=d(c),g=h(c),w=c[0]&&je();return{c(){n=e("button"),g.c(),o=s(),w&&w.c(),a=ll(),i(n,"class","btn btn-sm btn-secondary m-t-10")},m(_,f){u(_,n,f),g.m(n,null),u(_,o,f),w&&w.m(_,f),u(_,a,f),p||(b=el(n,"click",c[1]),p=!0)},p(_,[f]){h!==(h=d(_))&&(g.d(1),g=h(_),g&&(g.c(),g.m(n,null))),_[0]?w||(w=je(),w.c(),w.m(a.parentNode,a)):w&&(w.d(1),w=null)},i:Ge,o:Ge,d(_){_&&m(n),g.d(),_&&m(o),w&&w.d(_),_&&m(a),p=!1,b()}}}function ul(c,n,o){let a=!1;function p(){o(0,a=!a)}return[a,p]}class ml extends Ye{constructor(n){super(),Ze(this,n,ul,pl,tl,{})}}function ze(c,n,o){const a=c.slice();return a[7]=n[o],a}function Je(c,n,o){const a=c.slice();return a[7]=n[o],a}function Ke(c,n,o){const a=c.slice();return a[12]=n[o],a[14]=o,a}function Qe(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 Ve(c){let n,o=c[12]+"",a,p=c[14]<c[4].length-1?", ":"",b;return{c(){n=e("code"),a=x(o),b=x(p)},m(d,h){u(d,n,h),t(n,a),u(d,b,h)},p(d,h){h&16&&o!==(o=d[12]+"")&&$e(a,o),h&16&&p!==(p=d[14]<d[4].length-1?", ":"")&&$e(b,p)},d(d){d&&m(n),d&&m(b)}}}function We(c,n){let o,a=n[7].code+"",p,b,d,h;function g(){return n[6](n[7])}return{key:c,first:null,c(){o=e("button"),p=x(a),b=s(),i(o,"type","button"),i(o,"class","tab-item"),Fe(o,"active",n[2]===n[7].code),this.first=o},m(w,_){u(w,o,_),t(o,p),t(o,b),d||(h=el(o,"click",g),d=!0)},p(w,_){n=w,_&36&&Fe(o,"active",n[2]===n[7].code)},d(w){w&&m(o),d=!1,h()}}}function Xe(c,n){let o,a,p,b;return a=new ve({props:{content:n[7].body}}),{key:c,first:null,c(){o=e("div"),te(a.$$.fragment),p=s(),i(o,"class","tab-item"),Fe(o,"active",n[2]===n[7].code),this.first=o},m(d,h){u(d,o,h),ee(a,o,null),t(o,p),b=!0},p(d,h){n=d,(!b||h&36)&&Fe(o,"active",n[2]===n[7].code)},i(d){b||(Bt(a.$$.fragment,d),b=!0)},o(d){Gt(a.$$.fragment,d),b=!1},d(d){d&&m(o),le(a)}}}function bl(c){var Te,Pe,Se,Re,Oe,Ee;let n,o,a=c[0].name+"",p,b,d,h,g,w,_,f=c[0].name+"",Z,Ct,Ut,E,jt,H,at,S,tt,se,G,U,ne,rt,$t=c[0].name+"",et,kt,oe,ct,dt,lt,N,zt,yt,v,st,vt,Jt,Ft,j,nt,Lt,Kt,At,L,ft,Tt,ie,pt,ae,D,Pt,ot,St,R,ut,re,z,Rt,Qt,Ot,ce,q,Vt,J,mt,de,I,fe,B,pe,P,Et,K,bt,ue,ht,me,$,Nt,it,qt,be,Mt,Wt,Q,_t,he,Ht,_e,wt,we,V,xt,xe,gt,Xt,W,Yt,A,X,O=[],Dt=new Map,ge,Y,F=[],It=new Map,k;E=new cl({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${c[3]}');
@ -37,14 +37,14 @@ import{S as Ye,i as Ze,s as tl,e,b as s,E as ll,f as i,g as u,u as el,y as Ge,o
...
// fetch a paginated records list
final resultList = await pb.collection('${(Oe=c[0])==null?void 0:Oe.name}').getList(
final resultList = await pb.collection('${(Re=c[0])==null?void 0:Re.name}').getList(
page: 1,
perPage: 50,
filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2',
);
// you can also fetch all records at once via getFullList
final records = await pb.collection('${(Re=c[0])==null?void 0:Re.name}').getFullList(
final records = await pb.collection('${(Oe=c[0])==null?void 0:Oe.name}').getFullList(
sort: '-created',
);
@ -58,7 +58,7 @@ import{S as Ye,i as Ze,s as tl,e,b as s,E as ll,f as i,g as u,u as el,y as Ge,o
?sort=-created,id
`}});let Zt=c[4],T=[];for(let l=0;l<Zt.length;l+=1)T[l]=Ve(Ke(c,Zt,l));B=new ve({props:{content:`
?filter=(id='abc' && created>'2022-01-01')
`}}),P=new ml({}),it=new ve({props:{content:"?expand=relField1,relField2.subRelField"}});let ke=c[5];const Le=l=>l[7].code;for(let l=0;l<ke.length;l+=1){let r=Je(c,ke,l),C=Le(r);Dt.set(C,R[l]=We(C,r))}let Ce=c[5];const Ae=l=>l[7].code;for(let l=0;l<Ce.length;l+=1){let r=ze(c,Ce,l),C=Ae(r);It.set(C,F[l]=Xe(C,r))}return{c(){n=e("h3"),o=x("List/Search ("),p=x(a),b=x(")"),d=s(),h=e("div"),g=e("p"),w=x("Fetch a paginated "),_=e("strong"),Z=x(f),Ct=x(" records list, supporting sorting and filtering."),Ut=s(),te(E.$$.fragment),jt=s(),M=e("h6"),M.textContent="API details",at=s(),S=e("div"),tt=e("strong"),tt.textContent="GET",se=s(),G=e("div"),U=e("p"),ne=x("/api/collections/"),rt=e("strong"),et=x($t),kt=x("/records"),oe=s(),y&&y.c(),ct=s(),dt=e("div"),dt.textContent="Query parameters",lt=s(),N=e("table"),zt=e("thead"),zt.innerHTML=`<tr><th>Param</th>
`}}),P=new ml({}),it=new ve({props:{content:"?expand=relField1,relField2.subRelField"}});let ke=c[5];const Le=l=>l[7].code;for(let l=0;l<ke.length;l+=1){let r=Je(c,ke,l),C=Le(r);Dt.set(C,O[l]=We(C,r))}let Ce=c[5];const Ae=l=>l[7].code;for(let l=0;l<Ce.length;l+=1){let r=ze(c,Ce,l),C=Ae(r);It.set(C,F[l]=Xe(C,r))}return{c(){n=e("h3"),o=x("List/Search ("),p=x(a),b=x(")"),d=s(),h=e("div"),g=e("p"),w=x("Fetch a paginated "),_=e("strong"),Z=x(f),Ct=x(" records list, supporting sorting and filtering."),Ut=s(),te(E.$$.fragment),jt=s(),H=e("h6"),H.textContent="API details",at=s(),S=e("div"),tt=e("strong"),tt.textContent="GET",se=s(),G=e("div"),U=e("p"),ne=x("/api/collections/"),rt=e("strong"),et=x($t),kt=x("/records"),oe=s(),y&&y.c(),ct=s(),dt=e("div"),dt.textContent="Query parameters",lt=s(),N=e("table"),zt=e("thead"),zt.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr>`,yt=s(),v=e("tbody"),st=e("tr"),st.innerHTML=`<td>page</td>
<td><span class="label">Number</span></td>
@ -67,14 +67,14 @@ import{S as Ye,i as Ze,s as tl,e,b as s,E as ll,f as i,g as u,u as el,y as Ge,o
<td>Specify the max returned records per page (default to 30).</td>`,Ft=s(),j=e("tr"),nt=e("td"),nt.textContent="sort",Lt=s(),Kt=e("td"),Kt.innerHTML='<span class="label">String</span>',At=s(),L=e("td"),ft=x("Specify the records order attribute(s). "),Tt=e("br"),ie=x(`
Add `),pt=e("code"),pt.textContent="-",ae=x(" / "),D=e("code"),D.textContent="+",Pt=x(` (default) in front of the attribute for DESC / ASC order.
Ex.:
`),te(ot.$$.fragment),St=s(),O=e("p"),ut=e("strong"),ut.textContent="Supported record sort fields:",re=s(),z=e("br"),Ot=s(),Qt=e("code"),Qt.textContent="@random",Rt=x(`,
`),te(ot.$$.fragment),St=s(),R=e("p"),ut=e("strong"),ut.textContent="Supported record sort fields:",re=s(),z=e("br"),Rt=s(),Qt=e("code"),Qt.textContent="@random",Ot=x(`,
`);for(let l=0;l<T.length;l+=1)T[l].c();ce=s(),q=e("tr"),Vt=e("td"),Vt.textContent="filter",J=s(),mt=e("td"),mt.innerHTML='<span class="label">String</span>',de=s(),I=e("td"),fe=x(`Filter the returned records. Ex.:
`),te(B.$$.fragment),pe=s(),te(P.$$.fragment),Et=s(),K=e("tr"),bt=e("td"),bt.textContent="expand",ue=s(),ht=e("td"),ht.innerHTML='<span class="label">String</span>',me=s(),$=e("td"),Nt=x(`Auto expand record relations. Ex.:
`),te(it.$$.fragment),qt=x(`
Supports up to 6-levels depth nested relations expansion. `),be=e("br"),Ht=x(`
Supports up to 6-levels depth nested relations expansion. `),be=e("br"),Mt=x(`
The expanded relations will be appended to each individual record under the
`),Wt=e("code"),Wt.textContent="expand",Q=x(" property (eg. "),_t=e("code"),_t.textContent='"expand": {"relField1": {...}, ...}',he=x(`).
`),Mt=e("br"),_e=x(`
`),Ht=e("br"),_e=x(`
Only the relations to which the request user has permissions to `),wt=e("strong"),wt.textContent="view",we=x(" will be expanded."),V=s(),xt=e("tr"),xt.innerHTML=`<td id="query-page">fields</td>
<td><span class="label">String</span></td>
<td>Comma separated string of the fields to return in the JSON response
@ -89,7 +89,7 @@ import{S as Ye,i as Ze,s as tl,e,b as s,E as ll,f as i,g as u,u as el,y as Ge,o
For optimization purposes, it is set by default for the
<code>getFirstListItem()</code>
and
<code>getFullList()</code> SDKs methods.</td>`,Xt=s(),W=e("div"),W.textContent="Responses",Yt=s(),A=e("div"),X=e("div");for(let l=0;l<R.length;l+=1)R[l].c();ge=s(),Y=e("div");for(let l=0;l<F.length;l+=1)F[l].c();i(n,"class","m-b-sm"),i(h,"class","content txt-lg m-b-sm"),i(M,"class","m-b-xs"),i(tt,"class","label label-primary"),i(G,"class","content"),i(S,"class","alert alert-info"),i(dt,"class","section-title"),i(N,"class","table-compact table-border m-b-base"),i(W,"class","section-title"),i(X,"class","tabs-header compact left"),i(Y,"class","tabs-content"),i(A,"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,g),t(g,w),t(g,_),t(_,Z),t(g,Ct),u(l,Ut,r),ee(E,l,r),u(l,jt,r),u(l,M,r),u(l,at,r),u(l,S,r),t(S,tt),t(S,se),t(S,G),t(G,U),t(U,ne),t(U,rt),t(rt,et),t(U,kt),t(S,oe),y&&y.m(S,null),u(l,ct,r),u(l,dt,r),u(l,lt,r),u(l,N,r),t(N,zt),t(N,yt),t(N,v),t(v,st),t(v,vt),t(v,Jt),t(v,Ft),t(v,j),t(j,nt),t(j,Lt),t(j,Kt),t(j,At),t(j,L),t(L,ft),t(L,Tt),t(L,ie),t(L,pt),t(L,ae),t(L,D),t(L,Pt),ee(ot,L,null),t(L,St),t(L,O),t(O,ut),t(O,re),t(O,z),t(O,Ot),t(O,Qt),t(O,Rt);for(let C=0;C<T.length;C+=1)T[C]&&T[C].m(O,null);t(v,ce),t(v,q),t(q,Vt),t(q,J),t(q,mt),t(q,de),t(q,I),t(I,fe),ee(B,I,null),t(I,pe),ee(P,I,null),t(v,Et),t(v,K),t(K,bt),t(K,ue),t(K,ht),t(K,me),t(K,$),t($,Nt),ee(it,$,null),t($,qt),t($,be),t($,Ht),t($,Wt),t($,Q),t($,_t),t($,he),t($,Mt),t($,_e),t($,wt),t($,we),t(v,V),t(v,xt),t(v,xe),t(v,gt),u(l,Xt,r),u(l,W,r),u(l,Yt,r),u(l,A,r),t(A,X);for(let C=0;C<R.length;C+=1)R[C]&&R[C].m(X,null);t(A,ge),t(A,Y);for(let C=0;C<F.length;C+=1)F[C]&&F[C].m(Y,null);k=!0},p(l,[r]){var Ne,qe,He,Me,De,Ie;(!k||r&1)&&a!==(a=l[0].name+"")&&$e(p,a),(!k||r&1)&&f!==(f=l[0].name+"")&&$e(Z,f);const C={};if(r&9&&(C.js=`
<code>getFullList()</code> SDKs methods.</td>`,Xt=s(),W=e("div"),W.textContent="Responses",Yt=s(),A=e("div"),X=e("div");for(let l=0;l<O.length;l+=1)O[l].c();ge=s(),Y=e("div");for(let l=0;l<F.length;l+=1)F[l].c();i(n,"class","m-b-sm"),i(h,"class","content txt-lg m-b-sm"),i(H,"class","m-b-xs"),i(tt,"class","label label-primary"),i(G,"class","content"),i(S,"class","alert alert-info"),i(dt,"class","section-title"),i(N,"class","table-compact table-border m-b-base"),i(W,"class","section-title"),i(X,"class","tabs-header compact left"),i(Y,"class","tabs-content"),i(A,"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,g),t(g,w),t(g,_),t(_,Z),t(g,Ct),u(l,Ut,r),ee(E,l,r),u(l,jt,r),u(l,H,r),u(l,at,r),u(l,S,r),t(S,tt),t(S,se),t(S,G),t(G,U),t(U,ne),t(U,rt),t(rt,et),t(U,kt),t(S,oe),y&&y.m(S,null),u(l,ct,r),u(l,dt,r),u(l,lt,r),u(l,N,r),t(N,zt),t(N,yt),t(N,v),t(v,st),t(v,vt),t(v,Jt),t(v,Ft),t(v,j),t(j,nt),t(j,Lt),t(j,Kt),t(j,At),t(j,L),t(L,ft),t(L,Tt),t(L,ie),t(L,pt),t(L,ae),t(L,D),t(L,Pt),ee(ot,L,null),t(L,St),t(L,R),t(R,ut),t(R,re),t(R,z),t(R,Rt),t(R,Qt),t(R,Ot);for(let C=0;C<T.length;C+=1)T[C]&&T[C].m(R,null);t(v,ce),t(v,q),t(q,Vt),t(q,J),t(q,mt),t(q,de),t(q,I),t(I,fe),ee(B,I,null),t(I,pe),ee(P,I,null),t(v,Et),t(v,K),t(K,bt),t(K,ue),t(K,ht),t(K,me),t(K,$),t($,Nt),ee(it,$,null),t($,qt),t($,be),t($,Mt),t($,Wt),t($,Q),t($,_t),t($,he),t($,Ht),t($,_e),t($,wt),t($,we),t(v,V),t(v,xt),t(v,xe),t(v,gt),u(l,Xt,r),u(l,W,r),u(l,Yt,r),u(l,A,r),t(A,X);for(let C=0;C<O.length;C+=1)O[C]&&O[C].m(X,null);t(A,ge),t(A,Y);for(let C=0;C<F.length;C+=1)F[C]&&F[C].m(Y,null);k=!0},p(l,[r]){var Ne,qe,Me,He,De,Ie;(!k||r&1)&&a!==(a=l[0].name+"")&&$e(p,a),(!k||r&1)&&f!==(f=l[0].name+"")&&$e(Z,f);const C={};if(r&9&&(C.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${l[3]}');
@ -107,7 +107,7 @@ import{S as Ye,i as Ze,s as tl,e,b as s,E as ll,f as i,g as u,u as el,y as Ge,o
});
// or fetch only the first record that matches the specified filter
const record = await pb.collection('${(He=l[0])==null?void 0:He.name}').getFirstListItem('someField="test"', {
const record = await pb.collection('${(Me=l[0])==null?void 0:Me.name}').getFirstListItem('someField="test"', {
expand: 'relField1,relField2.subRelField',
});
`),r&9&&(C.dart=`
@ -118,7 +118,7 @@ import{S as Ye,i as Ze,s as tl,e,b as s,E as ll,f as i,g as u,u as el,y as Ge,o
...
// fetch a paginated records list
final resultList = await pb.collection('${(Me=l[0])==null?void 0:Me.name}').getList(
final resultList = await pb.collection('${(He=l[0])==null?void 0:He.name}').getList(
page: 1,
perPage: 50,
filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2',
@ -134,7 +134,7 @@ import{S as Ye,i as Ze,s as tl,e,b as s,E as ll,f as i,g as u,u as el,y as Ge,o
'someField="test"',
expand: 'relField1,relField2.subRelField',
);
`),E.$set(C),(!k||r&1)&&$t!==($t=l[0].name+"")&&$e(et,$t),l[1]?y||(y=Qe(),y.c(),y.m(S,null)):y&&(y.d(1),y=null),r&16){Zt=l[4];let H;for(H=0;H<Zt.length;H+=1){const Be=Ke(l,Zt,H);T[H]?T[H].p(Be,r):(T[H]=Ve(Be),T[H].c(),T[H].m(O,null))}for(;H<T.length;H+=1)T[H].d(1);T.length=Zt.length}r&36&&(ke=l[5],R=Ue(R,r,Le,1,l,ke,Dt,X,sl,We,null,Je)),r&36&&(Ce=l[5],nl(),F=Ue(F,r,Ae,1,l,Ce,It,Y,ol,Xe,null,ze),il())},i(l){if(!k){Bt(E.$$.fragment,l),Bt(ot.$$.fragment,l),Bt(B.$$.fragment,l),Bt(P.$$.fragment,l),Bt(it.$$.fragment,l);for(let r=0;r<Ce.length;r+=1)Bt(F[r]);k=!0}},o(l){Gt(E.$$.fragment,l),Gt(ot.$$.fragment,l),Gt(B.$$.fragment,l),Gt(P.$$.fragment,l),Gt(it.$$.fragment,l);for(let r=0;r<F.length;r+=1)Gt(F[r]);k=!1},d(l){l&&m(n),l&&m(d),l&&m(h),l&&m(Ut),le(E,l),l&&m(jt),l&&m(M),l&&m(at),l&&m(S),y&&y.d(),l&&m(ct),l&&m(dt),l&&m(lt),l&&m(N),le(ot),al(T,l),le(B),le(P),le(it),l&&m(Xt),l&&m(W),l&&m(Yt),l&&m(A);for(let r=0;r<R.length;r+=1)R[r].d();for(let r=0;r<F.length;r+=1)F[r].d()}}}function hl(c,n,o){let a,p,b,{collection:d}=n,h=200,g=[];const w=_=>o(2,h=_.code);return c.$$set=_=>{"collection"in _&&o(0,d=_.collection)},c.$$.update=()=>{c.$$.dirty&1&&o(4,a=ye.getAllCollectionIdentifiers(d)),c.$$.dirty&1&&o(1,p=(d==null?void 0:d.listRule)===null),c.$$.dirty&3&&d!=null&&d.id&&(g.push({code:200,body:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[ye.dummyCollectionRecord(d),ye.dummyCollectionRecord(d)]},null,2)}),g.push({code:400,body:`
`),E.$set(C),(!k||r&1)&&$t!==($t=l[0].name+"")&&$e(et,$t),l[1]?y||(y=Qe(),y.c(),y.m(S,null)):y&&(y.d(1),y=null),r&16){Zt=l[4];let M;for(M=0;M<Zt.length;M+=1){const Be=Ke(l,Zt,M);T[M]?T[M].p(Be,r):(T[M]=Ve(Be),T[M].c(),T[M].m(R,null))}for(;M<T.length;M+=1)T[M].d(1);T.length=Zt.length}r&36&&(ke=l[5],O=Ue(O,r,Le,1,l,ke,Dt,X,sl,We,null,Je)),r&36&&(Ce=l[5],nl(),F=Ue(F,r,Ae,1,l,Ce,It,Y,ol,Xe,null,ze),il())},i(l){if(!k){Bt(E.$$.fragment,l),Bt(ot.$$.fragment,l),Bt(B.$$.fragment,l),Bt(P.$$.fragment,l),Bt(it.$$.fragment,l);for(let r=0;r<Ce.length;r+=1)Bt(F[r]);k=!0}},o(l){Gt(E.$$.fragment,l),Gt(ot.$$.fragment,l),Gt(B.$$.fragment,l),Gt(P.$$.fragment,l),Gt(it.$$.fragment,l);for(let r=0;r<F.length;r+=1)Gt(F[r]);k=!1},d(l){l&&m(n),l&&m(d),l&&m(h),l&&m(Ut),le(E,l),l&&m(jt),l&&m(H),l&&m(at),l&&m(S),y&&y.d(),l&&m(ct),l&&m(dt),l&&m(lt),l&&m(N),le(ot),al(T,l),le(B),le(P),le(it),l&&m(Xt),l&&m(W),l&&m(Yt),l&&m(A);for(let r=0;r<O.length;r+=1)O[r].d();for(let r=0;r<F.length;r+=1)F[r].d()}}}function hl(c,n,o){let a,p,b,{collection:d}=n,h=200,g=[];const w=_=>o(2,h=_.code);return c.$$set=_=>{"collection"in _&&o(0,d=_.collection)},c.$$.update=()=>{c.$$.dirty&1&&o(4,a=ye.getAllCollectionIdentifiers(d)),c.$$.dirty&1&&o(1,p=(d==null?void 0:d.listRule)===null),c.$$.dirty&3&&d!=null&&d.id&&(g.push({code:200,body:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[ye.dummyCollectionRecord(d),ye.dummyCollectionRecord(d)]},null,2)}),g.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 ze,i as Qe,s as Re,e as n,w as v,b as f,c as de,f as m,g as r,h as o,m as pe,x as F,O as Me,P as Ue,k as je,Q as Fe,n as Ne,t as N,a as G,o as c,d as ue,C as Ge,p as Ke,r as K,u as Je,N as Ve}from"./index-e82e621c.js";import{S as Xe}from"./SdkTabs-dcdfedfb.js";import{F as Ye}from"./FieldsQueryParam-22510abf.js";function Oe(a,l,s){const i=a.slice();return i[5]=l[s],i}function De(a,l,s){const i=a.slice();return i[5]=l[s],i}function He(a,l){let s,i=l[5].code+"",b,_,d,u;function h(){return l[4](l[5])}return{key:a,first:null,c(){s=n("button"),b=v(i),_=f(),m(s,"class","tab-item"),K(s,"active",l[1]===l[5].code),this.first=s},m(y,P){r(y,s,P),o(s,b),o(s,_),d||(u=Je(s,"click",h),d=!0)},p(y,P){l=y,P&4&&i!==(i=l[5].code+"")&&F(b,i),P&6&&K(s,"active",l[1]===l[5].code)},d(y){y&&c(s),d=!1,u()}}}function We(a,l){let s,i,b,_;return i=new Ve({props:{content:l[5].body}}),{key:a,first:null,c(){s=n("div"),de(i.$$.fragment),b=f(),m(s,"class","tab-item"),K(s,"active",l[1]===l[5].code),this.first=s},m(d,u){r(d,s,u),pe(i,s,null),o(s,b),_=!0},p(d,u){l=d;const h={};u&4&&(h.content=l[5].body),i.$set(h),(!_||u&6)&&K(s,"active",l[1]===l[5].code)},i(d){_||(N(i.$$.fragment,d),_=!0)},o(d){G(i.$$.fragment,d),_=!1},d(d){d&&c(s),ue(i)}}}function Ze(a){var Ce,ge,Se,Ee;let l,s,i=a[0].name+"",b,_,d,u,h,y,P,W=a[0].name+"",J,fe,me,V,X,T,Y,I,Z,w,z,be,Q,A,he,x,R=a[0].name+"",ee,_e,te,ke,ve,U,le,B,se,q,oe,L,ae,C,ie,$e,ne,E,re,M,ce,g,O,$=[],we=new Map,ye,D,k=[],Pe=new Map,S;T=new Xe({props:{js:`
import{S as ze,i as Qe,s as Re,e as n,w as v,b as f,c as de,f as m,g as r,h as o,m as pe,x as F,N as Le,P as Ue,k as je,Q as Fe,n as Ne,t as N,a as G,o as c,d as ue,C as Ge,p as Ke,r as K,u as Je,M as Ve}from"./index-3379c20e.js";import{S as Xe}from"./SdkTabs-0096fda4.js";import{F as Ye}from"./FieldsQueryParam-aebe0d79.js";function De(a,l,s){const i=a.slice();return i[5]=l[s],i}function He(a,l,s){const i=a.slice();return i[5]=l[s],i}function Oe(a,l){let s,i=l[5].code+"",b,_,d,u;function h(){return l[4](l[5])}return{key:a,first:null,c(){s=n("button"),b=v(i),_=f(),m(s,"class","tab-item"),K(s,"active",l[1]===l[5].code),this.first=s},m(y,P){r(y,s,P),o(s,b),o(s,_),d||(u=Je(s,"click",h),d=!0)},p(y,P){l=y,P&4&&i!==(i=l[5].code+"")&&F(b,i),P&6&&K(s,"active",l[1]===l[5].code)},d(y){y&&c(s),d=!1,u()}}}function We(a,l){let s,i,b,_;return i=new Ve({props:{content:l[5].body}}),{key:a,first:null,c(){s=n("div"),de(i.$$.fragment),b=f(),m(s,"class","tab-item"),K(s,"active",l[1]===l[5].code),this.first=s},m(d,u){r(d,s,u),pe(i,s,null),o(s,b),_=!0},p(d,u){l=d;const h={};u&4&&(h.content=l[5].body),i.$set(h),(!_||u&6)&&K(s,"active",l[1]===l[5].code)},i(d){_||(N(i.$$.fragment,d),_=!0)},o(d){G(i.$$.fragment,d),_=!1},d(d){d&&c(s),ue(i)}}}function Ze(a){var Ce,ge,Se,Ee;let l,s,i=a[0].name+"",b,_,d,u,h,y,P,W=a[0].name+"",J,fe,me,V,X,T,Y,I,Z,w,z,be,Q,A,he,x,R=a[0].name+"",ee,_e,te,ke,ve,U,le,B,se,q,oe,M,ae,C,ie,$e,ne,E,re,L,ce,g,D,$=[],we=new Map,ye,H,k=[],Pe=new Map,S;T=new Xe({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${a[3]}');
@ -22,14 +22,14 @@ import{S as ze,i as Qe,s as Re,e as n,w as v,b as f,c as de,f as m,g as r,h as o
final result = await pb.collection('${(Ee=a[0])==null?void 0:Ee.name}').listExternalAuths(
pb.authStore.model.id,
);
`}}),E=new Ye({});let j=a[2];const Te=e=>e[5].code;for(let e=0;e<j.length;e+=1){let t=De(a,j,e),p=Te(t);we.set(p,$[e]=He(p,t))}let H=a[2];const Ae=e=>e[5].code;for(let e=0;e<H.length;e+=1){let t=Oe(a,H,e),p=Ae(t);Pe.set(p,k[e]=We(p,t))}return{c(){l=n("h3"),s=v("List OAuth2 accounts ("),b=v(i),_=v(")"),d=f(),u=n("div"),h=n("p"),y=v("Returns a list with all OAuth2 providers linked to a single "),P=n("strong"),J=v(W),fe=v("."),me=f(),V=n("p"),V.textContent="Only admins and the account owner can access this action.",X=f(),de(T.$$.fragment),Y=f(),I=n("h6"),I.textContent="API details",Z=f(),w=n("div"),z=n("strong"),z.textContent="GET",be=f(),Q=n("div"),A=n("p"),he=v("/api/collections/"),x=n("strong"),ee=v(R),_e=v("/records/"),te=n("strong"),te.textContent=":id",ke=v("/external-auths"),ve=f(),U=n("p"),U.innerHTML="Requires <code>Authorization:TOKEN</code> header",le=f(),B=n("div"),B.textContent="Path Parameters",se=f(),q=n("table"),q.innerHTML=`<thead><tr><th>Param</th>
`}}),E=new Ye({});let j=a[2];const Te=e=>e[5].code;for(let e=0;e<j.length;e+=1){let t=He(a,j,e),p=Te(t);we.set(p,$[e]=Oe(p,t))}let O=a[2];const Ae=e=>e[5].code;for(let e=0;e<O.length;e+=1){let t=De(a,O,e),p=Ae(t);Pe.set(p,k[e]=We(p,t))}return{c(){l=n("h3"),s=v("List OAuth2 accounts ("),b=v(i),_=v(")"),d=f(),u=n("div"),h=n("p"),y=v("Returns a list with all OAuth2 providers linked to a single "),P=n("strong"),J=v(W),fe=v("."),me=f(),V=n("p"),V.textContent="Only admins and the account owner can access this action.",X=f(),de(T.$$.fragment),Y=f(),I=n("h6"),I.textContent="API details",Z=f(),w=n("div"),z=n("strong"),z.textContent="GET",be=f(),Q=n("div"),A=n("p"),he=v("/api/collections/"),x=n("strong"),ee=v(R),_e=v("/records/"),te=n("strong"),te.textContent=":id",ke=v("/external-auths"),ve=f(),U=n("p"),U.innerHTML="Requires <code>Authorization:TOKEN</code> header",le=f(),B=n("div"),B.textContent="Path Parameters",se=f(),q=n("table"),q.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>`,oe=f(),L=n("div"),L.textContent="Query parameters",ae=f(),C=n("table"),ie=n("thead"),ie.innerHTML=`<tr><th>Param</th>
<td>ID of the auth record.</td></tr></tbody>`,oe=f(),M=n("div"),M.textContent="Query parameters",ae=f(),C=n("table"),ie=n("thead"),ie.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="50%">Description</th></tr>`,$e=f(),ne=n("tbody"),de(E.$$.fragment),re=f(),M=n("div"),M.textContent="Responses",ce=f(),g=n("div"),O=n("div");for(let e=0;e<$.length;e+=1)$[e].c();ye=f(),D=n("div");for(let e=0;e<k.length;e+=1)k[e].c();m(l,"class","m-b-sm"),m(u,"class","content txt-lg m-b-sm"),m(I,"class","m-b-xs"),m(z,"class","label label-primary"),m(Q,"class","content"),m(U,"class","txt-hint txt-sm txt-right"),m(w,"class","alert alert-info"),m(B,"class","section-title"),m(q,"class","table-compact table-border m-b-base"),m(L,"class","section-title"),m(C,"class","table-compact table-border m-b-base"),m(M,"class","section-title"),m(O,"class","tabs-header compact left"),m(D,"class","tabs-content"),m(g,"class","tabs")},m(e,t){r(e,l,t),o(l,s),o(l,b),o(l,_),r(e,d,t),r(e,u,t),o(u,h),o(h,y),o(h,P),o(P,J),o(h,fe),o(u,me),o(u,V),r(e,X,t),pe(T,e,t),r(e,Y,t),r(e,I,t),r(e,Z,t),r(e,w,t),o(w,z),o(w,be),o(w,Q),o(Q,A),o(A,he),o(A,x),o(x,ee),o(A,_e),o(A,te),o(A,ke),o(w,ve),o(w,U),r(e,le,t),r(e,B,t),r(e,se,t),r(e,q,t),r(e,oe,t),r(e,L,t),r(e,ae,t),r(e,C,t),o(C,ie),o(C,$e),o(C,ne),pe(E,ne,null),r(e,re,t),r(e,M,t),r(e,ce,t),r(e,g,t),o(g,O);for(let p=0;p<$.length;p+=1)$[p]&&$[p].m(O,null);o(g,ye),o(g,D);for(let p=0;p<k.length;p+=1)k[p]&&k[p].m(D,null);S=!0},p(e,[t]){var Ie,Be,qe,Le;(!S||t&1)&&i!==(i=e[0].name+"")&&F(b,i),(!S||t&1)&&W!==(W=e[0].name+"")&&F(J,W);const p={};t&9&&(p.js=`
<th width="50%">Description</th></tr>`,$e=f(),ne=n("tbody"),de(E.$$.fragment),re=f(),L=n("div"),L.textContent="Responses",ce=f(),g=n("div"),D=n("div");for(let e=0;e<$.length;e+=1)$[e].c();ye=f(),H=n("div");for(let e=0;e<k.length;e+=1)k[e].c();m(l,"class","m-b-sm"),m(u,"class","content txt-lg m-b-sm"),m(I,"class","m-b-xs"),m(z,"class","label label-primary"),m(Q,"class","content"),m(U,"class","txt-hint txt-sm txt-right"),m(w,"class","alert alert-info"),m(B,"class","section-title"),m(q,"class","table-compact table-border m-b-base"),m(M,"class","section-title"),m(C,"class","table-compact table-border m-b-base"),m(L,"class","section-title"),m(D,"class","tabs-header compact left"),m(H,"class","tabs-content"),m(g,"class","tabs")},m(e,t){r(e,l,t),o(l,s),o(l,b),o(l,_),r(e,d,t),r(e,u,t),o(u,h),o(h,y),o(h,P),o(P,J),o(h,fe),o(u,me),o(u,V),r(e,X,t),pe(T,e,t),r(e,Y,t),r(e,I,t),r(e,Z,t),r(e,w,t),o(w,z),o(w,be),o(w,Q),o(Q,A),o(A,he),o(A,x),o(x,ee),o(A,_e),o(A,te),o(A,ke),o(w,ve),o(w,U),r(e,le,t),r(e,B,t),r(e,se,t),r(e,q,t),r(e,oe,t),r(e,M,t),r(e,ae,t),r(e,C,t),o(C,ie),o(C,$e),o(C,ne),pe(E,ne,null),r(e,re,t),r(e,L,t),r(e,ce,t),r(e,g,t),o(g,D);for(let p=0;p<$.length;p+=1)$[p]&&$[p].m(D,null);o(g,ye),o(g,H);for(let p=0;p<k.length;p+=1)k[p]&&k[p].m(H,null);S=!0},p(e,[t]){var Ie,Be,qe,Me;(!S||t&1)&&i!==(i=e[0].name+"")&&F(b,i),(!S||t&1)&&W!==(W=e[0].name+"")&&F(J,W);const p={};t&9&&(p.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
@ -50,10 +50,10 @@ import{S as ze,i as Qe,s as Re,e as n,w as v,b as f,c as de,f as m,g as r,h as o
await pb.collection('${(qe=e[0])==null?void 0:qe.name}').authWithPassword('test@example.com', '123456');
final result = await pb.collection('${(Le=e[0])==null?void 0:Le.name}').listExternalAuths(
final result = await pb.collection('${(Me=e[0])==null?void 0:Me.name}').listExternalAuths(
pb.authStore.model.id,
);
`),T.$set(p),(!S||t&1)&&R!==(R=e[0].name+"")&&F(ee,R),t&6&&(j=e[2],$=Me($,t,Te,1,e,j,we,O,Ue,He,null,De)),t&6&&(H=e[2],je(),k=Me(k,t,Ae,1,e,H,Pe,D,Fe,We,null,Oe),Ne())},i(e){if(!S){N(T.$$.fragment,e),N(E.$$.fragment,e);for(let t=0;t<H.length;t+=1)N(k[t]);S=!0}},o(e){G(T.$$.fragment,e),G(E.$$.fragment,e);for(let t=0;t<k.length;t+=1)G(k[t]);S=!1},d(e){e&&c(l),e&&c(d),e&&c(u),e&&c(X),ue(T,e),e&&c(Y),e&&c(I),e&&c(Z),e&&c(w),e&&c(le),e&&c(B),e&&c(se),e&&c(q),e&&c(oe),e&&c(L),e&&c(ae),e&&c(C),ue(E),e&&c(re),e&&c(M),e&&c(ce),e&&c(g);for(let t=0;t<$.length;t+=1)$[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function xe(a,l,s){let i,{collection:b}=l,_=200,d=[];const u=h=>s(1,_=h.code);return a.$$set=h=>{"collection"in h&&s(0,b=h.collection)},a.$$.update=()=>{a.$$.dirty&1&&s(2,d=[{code:200,body:`
`),T.$set(p),(!S||t&1)&&R!==(R=e[0].name+"")&&F(ee,R),t&6&&(j=e[2],$=Le($,t,Te,1,e,j,we,D,Ue,Oe,null,He)),t&6&&(O=e[2],je(),k=Le(k,t,Ae,1,e,O,Pe,H,Fe,We,null,De),Ne())},i(e){if(!S){N(T.$$.fragment,e),N(E.$$.fragment,e);for(let t=0;t<O.length;t+=1)N(k[t]);S=!0}},o(e){G(T.$$.fragment,e),G(E.$$.fragment,e);for(let t=0;t<k.length;t+=1)G(k[t]);S=!1},d(e){e&&c(l),e&&c(d),e&&c(u),e&&c(X),ue(T,e),e&&c(Y),e&&c(I),e&&c(Z),e&&c(w),e&&c(le),e&&c(B),e&&c(se),e&&c(q),e&&c(oe),e&&c(M),e&&c(ae),e&&c(C),ue(E),e&&c(re),e&&c(L),e&&c(ce),e&&c(g);for(let t=0;t<$.length;t+=1)$[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function xe(a,l,s){let i,{collection:b}=l,_=200,d=[];const u=h=>s(1,_=h.code);return a.$$set=h=>{"collection"in h&&s(0,b=h.collection)},a.$$.update=()=>{a.$$.dirty&1&&s(2,d=[{code:200,body:`
[
{
"id": "8171022dc95a4e8",

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 N,a as T,d as h,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 j,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-e82e621c.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=j(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=j(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,F,P,v,k,R,z,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 N,a as T,d as h,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 j,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-3379c20e.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=j(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=j(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,F,P,v,k,R,z,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",F=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,F,$),b(a,P,$),_(P,v),k=!0,R||(z=[j(e,"submit",O(f[4])),Q(U.call(null,v))],R=!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 D={};$&769&&(D.$$scope={dirty:$,ctx:a}),r.$set(D);const H={};$&770&&(H.$$scope={dirty:$,ctx:a}),d.$set(H),(!k||$&4)&&(i.disabled=a[2]),(!k||$&4)&&L(i,"btn-loading",a[2])},i(a){k||(N(r.$$.fragment,a),N(d.$$.fragment,a),k=!0)},o(a){T(r.$$.fragment,a),T(d.$$.fragment,a),k=!1},d(a){a&&w(e),m&&m.d(),h(r),h(d),a&&w(F),a&&w(P),R=!1,V(z)}}}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||(N(e.$$.fragment,s),o=!0)},o(s){T(e.$$.fragment,s),o=!1},d(s){h(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.error(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 R,m as S,t as w,a as y,d as E,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 H,v as I,w as h,x as J,y as P,z as L}from"./index-e82e621c.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 R,m as S,t as w,a as y,d as E,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 H,v as I,w as h,x as J,y as P,z as L}from"./index-3379c20e.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(),R(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),S(l,e,null),d(e,t),d(e,o),d(o,f),d(o,m),d(o,i),a=!0,b||(u=H(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),E(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),L(t,c[0]),t.focus(),f||(m=H(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]&&L(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(){R(e.$$.fragment)},m(n,l){S(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){E(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.error(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,2 +1,2 @@
import{S as o,i,s as c,e as r,f as l,g as u,y as s,o as d,I as h}from"./index-e82e621c.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML=`<h3 class="m-b-sm">Auth completed.</h3>
import{S as o,i,s as c,e as r,f as l,g as u,y as s,o as d,H as h}from"./index-3379c20e.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML=`<h3 class="m-b-sm">Auth completed.</h3>
<h5>You can go back to the app if this window is not automatically closed.</h5>`,l(t,"class","content txt-hint txt-center p-base")},m(e,a){u(e,t,a)},p:s,i:s,o:s,d(e){e&&d(t)}}}function m(n){return h(()=>{window.close()}),[]}class x extends o{constructor(t){super(),i(this,t,m,f,c,{})}}export{x as default};

View File

@ -1,4 +1,4 @@
import{S as G,i as I,s as J,F as M,c as S,m as L,t as v,a as y,d as z,C as N,E as R,g as _,k as W,n as Y,o as b,G as j,H 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-e82e621c.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(),S(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),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(),z(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>
import{S as G,i as I,s as J,F as M,c as H,m as L,t as v,a as y,d as z,C as N,E as O,g as _,k as R,n as W,o as b,O as Y,G as j,p as A,q as B,e as m,w as C,b as h,f as d,r as T,h as k,u as P,v as D,y as E,x as K,z as F}from"./index-3379c20e.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&S(r);return o=new B({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(),H(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),L(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||($=P(e,"submit",D(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=S(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(),z(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=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=R()},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 M({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){z(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.error($)}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=N.getJWTPayload(s==null?void 0:s.token).newEmail||"")},[n,o,c,l,a,s,i,u]}class te extends G{constructor(e){super(),I(this,e,x,Z,J,{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 S(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&&K(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=O()},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):(R(),y(o[u],1,1,()=>{o[u]=null}),W(),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 M({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:r}}}),{c(){H(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){z(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 Y("../");try{const $=j(s==null?void 0:s.token);await g.collection($.collectionId).confirmEmailChange(s==null?void 0:s.token,n),t(2,c=!0)}catch($){A.error($)}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=N.getJWTPayload(s==null?void 0:s.token).newEmail||"")},[n,o,c,l,a,s,i,u]}class te extends G{constructor(e){super(),I(this,e,x,Z,J,{params:5})}}export{te as default};

View File

@ -0,0 +1,4 @@
import{S as J,i as M,s as O,F as W,c as N,m as T,t as y,a as q,d as H,C as Y,E as j,g as _,k as A,n as B,o as m,O as D,G as K,p as Q,q as E,e as b,w as h,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 R}from"./index-3379c20e.js";function X(r){let e,l,s,n,t,o,c,u,i,a,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}}}),u=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=h(`Reset your user password
`),d&&d.c(),t=P(),N(o.$$.fragment),c=P(),N(u.$$.fragment),i=P(),a=b("button"),v=b("span"),v.textContent="Set new password",p(l,"class","content txt-center m-b-base"),p(v,"class","txt"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block"),a.disabled=r[2],G(a,"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),T(o,e,null),w(e,c),T(u,e,null),w(e,i),w(e,a),w(a,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}),u.$set(z),(!k||$&4)&&(a.disabled=f[2]),(!k||$&4)&&G(a,"btn-loading",f[2])},i(f){k||(y(o.$$.fragment,f),y(u.$$.fragment,f),k=!0)},o(f){q(o.$$.fragment,f),q(u.$$.fragment,f),k=!1},d(f){f&&m(e),d&&d.d(),H(o),H(u),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=h("for "),l=b("strong"),s=h(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,u;return{c(){e=b("label"),l=h("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,a){_(i,e,a),w(e,l),_(i,n,a),_(i,t,a),R(t,r[0]),t.focus(),c||(u=S(t,"input",r[8]),c=!0)},p(i,a){a&1024&&s!==(s=i[10])&&p(e,"for",s),a&1024&&o!==(o=i[10])&&p(t,"id",o),a&1&&t.value!==i[0]&&R(t,i[0])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,u()}}}function ee(r){let e,l,s,n,t,o,c,u;return{c(){e=b("label"),l=h("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,a){_(i,e,a),w(e,l),_(i,n,a),_(i,t,a),R(t,r[1]),c||(u=S(t,"input",r[9]),c=!0)},p(i,a){a&1024&&s!==(s=i[10])&&p(e,"for",s),a&1024&&o!==(o=i[10])&&p(t,"id",o),a&2&&t.value!==i[1]&&R(t,i[1])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,u()}}}function te(r){let e,l,s,n;const t=[Z,X],o=[];function c(u,i){return u[3]?0:1}return e=c(r),l=o[e]=t[e](r),{c(){l.c(),s=j()},m(u,i){o[e].m(u,i),_(u,s,i),n=!0},p(u,i){let a=e;e=c(u),e===a?o[e].p(u,i):(A(),q(o[a],1,1,()=>{o[a]=null}),B(),l=o[e],l?l.p(u,i):(l=o[e]=t[e](u),l.c()),y(l,1),l.m(s.parentNode,s))},i(u){n||(y(l),n=!0)},o(u){q(l),n=!1},d(u){o[e].d(u),u&&m(s)}}}function se(r){let e,l;return e=new W({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:r}}}),{c(){N(e.$$.fragment)},m(s,n){T(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){H(e,s)}}}function le(r,e,l){let s,{params:n}=e,t="",o="",c=!1,u=!1;async function i(){if(c)return;l(2,c=!0);const g=new D("../");try{const C=K(n==null?void 0:n.token);await g.collection(C.collectionId).confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,u=!0)}catch(C){Q.error(C)}l(2,c=!1)}const a=()=>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=Y.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,u,s,i,n,a,v,k]}class oe extends J{constructor(e){super(),M(this,e,le,se,O,{params:6})}}export{oe as default};

View File

@ -1,4 +0,0 @@
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,G as K,H as O,p as Q,q as E,e as b,w as h,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 R}from"./index-e82e621c.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=h(`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=h("for "),l=b("strong"),s=h(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=h("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),R(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]&&R(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=h("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),R(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]&&R(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.error(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 C,c as g,m as x,t as $,a as H,d as L,G as P,H as T,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-e82e621c.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>
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,O 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-3379c20e.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 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 C({props:{nobranding:!0,$$slots:{default:[V]},$$scope:{ctx:o}}}),{c(){g(t.$$.fragment)},m(e,n){x(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){H(t.$$.fragment,e),s=!1},d(e){L(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 P("../");try{const m=T(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 N extends v{constructor(t){super(),y(this,t,E,q,w,{params:2})}}export{N as default};
<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 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 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 N extends v{constructor(t){super(),y(this,t,E,q,w,{params:2})}}export{N as default};

View File

@ -1,4 +1,4 @@
import{S as re,i as ae,s as be,N as pe,C as P,e as p,w as y,b as a,c as te,f as u,g as t,h as I,m as ne,x as ue,t as ie,a as ce,o as n,d as le,p as me}from"./index-e82e621c.js";import{S as de}from"./SdkTabs-dcdfedfb.js";function fe(s){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,c=s[0].name+"",b,d,h,f,_,$,k,l,S,v,C,R,w,g,E,r,D;return l=new de({props:{js:`
import{S as re,i as ae,s as be,M as pe,C as P,e as p,w as y,b as a,c as te,f as u,g as t,h as I,m as ne,x as ue,t as ie,a as ce,o as n,d as le,p as me}from"./index-3379c20e.js";import{S as de}from"./SdkTabs-0096fda4.js";function fe(s){var B,U,W,A,H,L,M,T,q,j,J,N;let i,m,c=s[0].name+"",b,d,h,f,_,$,k,l,S,v,C,R,w,g,E,r,D;return l=new de({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${s[1]}');
@ -34,22 +34,22 @@ import{S as re,i as ae,s as be,N as pe,C as P,e as p,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 ${(T=s[0])==null?void 0:T.name} record
pb.collection('${(q=s[0])==null?void 0:q.name}').subscribe('*', (e) {
// Subscribe to changes in any ${(M=s[0])==null?void 0:M.name} record
pb.collection('${(T=s[0])==null?void 0:T.name}').subscribe('*', (e) {
print(e.action);
print(e.record);
});
// Subscribe to changes only in the specified record
pb.collection('${(M=s[0])==null?void 0:M.name}').subscribe('RECORD_ID', (e) {
pb.collection('${(q=s[0])==null?void 0:q.name}').subscribe('RECORD_ID', (e) {
print(e.action);
print(e.record);
});
// Unsubscribe
pb.collection('${(N=s[0])==null?void 0:N.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions
pb.collection('${(j=s[0])==null?void 0:j.name}').unsubscribe('*'); // remove all '*' topic subscriptions
pb.collection('${(J=s[0])==null?void 0:J.name}').unsubscribe(); // remove all subscriptions in the collection
pb.collection('${(j=s[0])==null?void 0:j.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions
pb.collection('${(J=s[0])==null?void 0:J.name}').unsubscribe('*'); // remove all '*' topic subscriptions
pb.collection('${(N=s[0])==null?void 0:N.name}').unsubscribe(); // remove all subscriptions in the collection
`}}),r=new pe({props:{content:JSON.stringify({action:"create",record:P.dummyCollectionRecord(s[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){i=p("h3"),m=y("Realtime ("),b=y(c),d=y(")"),h=a(),f=p("div"),f.innerHTML=`<p>Subscribe to realtime changes via Server-Sent Events (SSE).</p>
<p>Events are sent for <strong>create</strong>, <strong>update</strong>
and <strong>delete</strong> record operations (see &quot;Event data format&quot; section below).</p>`,_=a(),$=p("div"),$.innerHTML=`<div class="icon"><i class="ri-information-line"></i></div>

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,O as ve,P as Se,k as Me,Q as Re,n as Ae,t as x,a as ee,o as d,d as ye,C as We,p as ze,r as N,u as He,N as Oe}from"./index-e82e621c.js";import{S as Ue}from"./SdkTabs-dcdfedfb.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=He(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 Oe({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 je(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,Q,g,H,le,O,E,se,G,U=o[0].name+"",J,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 Ue({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 N,N as ve,P as Se,k as Me,Q as Re,n as Ae,t as x,a as ee,o as d,d as ye,C as We,p as ze,r as O,u as He,M as Ue}from"./index-3379c20e.js";import{S as je}from"./SdkTabs-0096fda4.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"),O(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,s,q),n(s,_),n(s,b),i||(p=He(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&N(_,a),q&6&&O(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"),O(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)&&O(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,Q,g,H,le,U,E,se,G,j=o[0].name+"",J,ae,oe,D,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]}');
@ -18,13 +18,13 @@ 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
await pb.collection('${(ue=o[0])==null?void 0:ue.name}').authWithPassword('test@example.com', '1234567890');
await pb.collection('${(fe=o[0])==null?void 0:fe.name}').requestEmailChange('new@example.com');
`}});let D=o[2];const re=e=>e[5].code;for(let e=0;e<D.length;e+=1){let t=ge(o,D,e),c=re(t);ne.set(c,v[e]=$e(c,t))}let W=o[2];const me=e=>e[5].code;for(let e=0;e<W.length;e+=1){let t=we(o,W,e),c=me(t);ce.set(c,h[e]=qe(c,t))}return{c(){l=r("h3"),s=w("Request email change ("),_=w(a),b=w(")"),i=k(),p=r("div"),u=r("p"),$=w("Sends "),q=r("strong"),F=w(z),te=w(" email change request."),I=k(),Pe(P.$$.fragment),K=k(),T=r("h6"),T.textContent="API details",Q=k(),g=r("div"),H=r("strong"),H.textContent="POST",le=k(),O=r("div"),E=r("p"),se=w("/api/collections/"),G=r("strong"),J=w(U),ae=w("/request-email-change"),oe=k(),j=r("p"),j.innerHTML="Requires record <code>Authorization:TOKEN</code> header",V=k(),B=r("div"),B.textContent="Body Parameters",X=k(),S=r("table"),S.innerHTML=`<thead><tr><th>Param</th>
`}});let L=o[2];const re=e=>e[5].code;for(let e=0;e<L.length;e+=1){let t=ge(o,L,e),c=re(t);ne.set(c,v[e]=$e(c,t))}let W=o[2];const me=e=>e[5].code;for(let e=0;e<W.length;e+=1){let t=we(o,W,e),c=me(t);ce.set(c,h[e]=qe(c,t))}return{c(){l=r("h3"),s=w("Request email change ("),_=w(a),b=w(")"),i=k(),p=r("div"),u=r("p"),$=w("Sends "),q=r("strong"),F=w(z),te=w(" email change request."),I=k(),Pe(P.$$.fragment),K=k(),T=r("h6"),T.textContent="API details",Q=k(),g=r("div"),H=r("strong"),H.textContent="POST",le=k(),U=r("div"),E=r("p"),se=w("/api/collections/"),G=r("strong"),J=w(j),ae=w("/request-email-change"),oe=k(),D=r("p"),D.innerHTML="Requires record <code>Authorization:TOKEN</code> header",V=k(),B=r("div"),B.textContent="Body Parameters",X=k(),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>newEmail</span></div></td>
<td><span class="label">String</span></td>
<td>The new email address to send the change email request.</td></tr></tbody>`,Y=k(),M=r("div"),M.textContent="Responses",Z=k(),C=r("div"),R=r("div");for(let e=0;e<v.length;e+=1)v[e].c();ie=k(),A=r("div");for(let e=0;e<h.length;e+=1)h[e].c();f(l,"class","m-b-sm"),f(p,"class","content txt-lg m-b-sm"),f(T,"class","m-b-xs"),f(H,"class","label label-primary"),f(O,"class","content"),f(j,"class","txt-hint txt-sm txt-right"),f(g,"class","alert alert-success"),f(B,"class","section-title"),f(S,"class","table-compact table-border m-b-base"),f(M,"class","section-title"),f(R,"class","tabs-header compact left"),f(A,"class","tabs-content"),f(C,"class","tabs")},m(e,t){m(e,l,t),n(l,s),n(l,_),n(l,b),m(e,i,t),m(e,p,t),n(p,u),n(u,$),n(u,q),n(q,F),n(u,te),m(e,I,t),Ce(P,e,t),m(e,K,t),m(e,T,t),m(e,Q,t),m(e,g,t),n(g,H),n(g,le),n(g,O),n(O,E),n(E,se),n(E,G),n(G,J),n(E,ae),n(g,oe),n(g,j),m(e,V,t),m(e,B,t),m(e,X,t),m(e,S,t),m(e,Y,t),m(e,M,t),m(e,Z,t),m(e,C,t),n(C,R);for(let c=0;c<v.length;c+=1)v[c]&&v[c].m(R,null);n(C,ie),n(C,A);for(let c=0;c<h.length;c+=1)h[c]&&h[c].m(A,null);y=!0},p(e,[t]){var be,_e,he,ke;(!y||t&1)&&a!==(a=e[0].name+"")&&L(_,a),(!y||t&1)&&z!==(z=e[0].name+"")&&L(F,z);const c={};t&9&&(c.js=`
<td>The new email address to send the change email request.</td></tr></tbody>`,Y=k(),M=r("div"),M.textContent="Responses",Z=k(),C=r("div"),R=r("div");for(let e=0;e<v.length;e+=1)v[e].c();ie=k(),A=r("div");for(let e=0;e<h.length;e+=1)h[e].c();f(l,"class","m-b-sm"),f(p,"class","content txt-lg m-b-sm"),f(T,"class","m-b-xs"),f(H,"class","label label-primary"),f(U,"class","content"),f(D,"class","txt-hint txt-sm txt-right"),f(g,"class","alert alert-success"),f(B,"class","section-title"),f(S,"class","table-compact table-border m-b-base"),f(M,"class","section-title"),f(R,"class","tabs-header compact left"),f(A,"class","tabs-content"),f(C,"class","tabs")},m(e,t){m(e,l,t),n(l,s),n(l,_),n(l,b),m(e,i,t),m(e,p,t),n(p,u),n(u,$),n(u,q),n(q,F),n(u,te),m(e,I,t),Ce(P,e,t),m(e,K,t),m(e,T,t),m(e,Q,t),m(e,g,t),n(g,H),n(g,le),n(g,U),n(U,E),n(E,se),n(E,G),n(G,J),n(E,ae),n(g,oe),n(g,D),m(e,V,t),m(e,B,t),m(e,X,t),m(e,S,t),m(e,Y,t),m(e,M,t),m(e,Z,t),m(e,C,t),n(C,R);for(let c=0;c<v.length;c+=1)v[c]&&v[c].m(R,null);n(C,ie),n(C,A);for(let c=0;c<h.length;c+=1)h[c]&&h[c].m(A,null);y=!0},p(e,[t]){var be,_e,he,ke;(!y||t&1)&&a!==(a=e[0].name+"")&&N(_,a),(!y||t&1)&&z!==(z=e[0].name+"")&&N(F,z);const c={};t&9&&(c.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
@ -44,7 +44,7 @@ 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
await pb.collection('${(he=e[0])==null?void 0:he.name}').authWithPassword('test@example.com', '1234567890');
await pb.collection('${(ke=e[0])==null?void 0:ke.name}').requestEmailChange('new@example.com');
`),P.$set(c),(!y||t&1)&&U!==(U=e[0].name+"")&&L(J,U),t&6&&(D=e[2],v=ve(v,t,re,1,e,D,ne,R,Se,$e,null,ge)),t&6&&(W=e[2],Me(),h=ve(h,t,me,1,e,W,ce,A,Re,qe,null,we),Ae())},i(e){if(!y){x(P.$$.fragment,e);for(let t=0;t<W.length;t+=1)x(h[t]);y=!0}},o(e){ee(P.$$.fragment,e);for(let t=0;t<h.length;t+=1)ee(h[t]);y=!1},d(e){e&&d(l),e&&d(i),e&&d(p),e&&d(I),ye(P,e),e&&d(K),e&&d(T),e&&d(Q),e&&d(g),e&&d(V),e&&d(B),e&&d(X),e&&d(S),e&&d(Y),e&&d(M),e&&d(Z),e&&d(C);for(let t=0;t<v.length;t+=1)v[t].d();for(let t=0;t<h.length;t+=1)h[t].d()}}}function De(o,l,s){let a,{collection:_}=l,b=204,i=[];const p=u=>s(1,b=u.code);return o.$$set=u=>{"collection"in u&&s(0,_=u.collection)},s(3,a=We.getApiExampleUrl(ze.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:`
`),P.$set(c),(!y||t&1)&&j!==(j=e[0].name+"")&&N(J,j),t&6&&(L=e[2],v=ve(v,t,re,1,e,L,ne,R,Se,$e,null,ge)),t&6&&(W=e[2],Me(),h=ve(h,t,me,1,e,W,ce,A,Re,qe,null,we),Ae())},i(e){if(!y){x(P.$$.fragment,e);for(let t=0;t<W.length;t+=1)x(h[t]);y=!0}},o(e){ee(P.$$.fragment,e);for(let t=0;t<h.length;t+=1)ee(h[t]);y=!1},d(e){e&&d(l),e&&d(i),e&&d(p),e&&d(I),ye(P,e),e&&d(K),e&&d(T),e&&d(Q),e&&d(g),e&&d(V),e&&d(B),e&&d(X),e&&d(S),e&&d(Y),e&&d(M),e&&d(Z),e&&d(C);for(let t=0;t<v.length;t+=1)v[t].d();for(let t=0;t<h.length;t+=1)h[t].d()}}}function Le(o,l,s){let a,{collection:_}=l,b=204,i=[];const p=u=>s(1,b=u.code);return o.$$set=u=>{"collection"in u&&s(0,_=u.collection)},s(3,a=We.getApiExampleUrl(ze.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:`
{
"code": 400,
"message": "Failed to authenticate.",
@ -67,4 +67,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
"message": "The authorized record model is not allowed to perform this action.",
"data": {}
}
`}]),[_,b,i,a,p]}class Fe extends Te{constructor(l){super(),Ee(this,l,De,je,Be,{collection:0})}}export{Fe as default};
`}]),[_,b,i,a,p]}class Fe extends Te{constructor(l){super(),Ee(this,l,Le,De,Be,{collection:0})}}export{Fe as default};

View File

@ -1,4 +1,4 @@
import{S as Pe,i as $e,s as qe,e as r,w,b as v,c as ve,f as b,g as d,h as n,m as he,x as I,O as ue,P as ge,k as ye,Q as Re,n as Be,t as Z,a as x,o as f,d as we,C as Ce,p as Se,r as L,u as Te,N as Me}from"./index-e82e621c.js";import{S as Ae}from"./SdkTabs-dcdfedfb.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"),_=w(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=Te(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 Me({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),he(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),we(o)}}}function Ue(a){var re,de;let s,l,o=a[0].name+"",_,m,i,p,u,P,$,D=a[0].name+"",N,ee,Q,q,z,B,G,g,H,te,O,C,se,J,E=a[0].name+"",K,le,V,S,W,T,X,M,Y,y,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,R;q=new Ae({props:{js:`
import{S as Pe,i as $e,s as qe,e as r,w,b as v,c as ve,f as b,g as d,h as n,m as he,x as L,N as ue,P as ge,k as ye,Q as Re,n as Be,t as Z,a as x,o as f,d as we,C as Ce,p as Se,r as N,u as Te,M as Me}from"./index-3379c20e.js";import{S as Ae}from"./SdkTabs-0096fda4.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"),_=w(o),m=v(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(P,l,$),n(l,_),n(l,m),i||(p=Te(l,"click",u),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&L(_,o),$&6&&N(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 Me({props:{content:s[5].body}}),{key:a,first:null,c(){l=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),he(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)&&N(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),we(o)}}}function Ue(a){var re,de;let s,l,o=a[0].name+"",_,m,i,p,u,P,$,D=a[0].name+"",O,ee,Q,q,z,B,G,g,H,te,E,C,se,J,F=a[0].name+"",K,le,V,S,W,T,X,M,Y,y,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,R;q=new Ae({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,b as v,c as ve,f as b,g as d,h as n,m as
...
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,h[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=w("Request password reset ("),_=w(o),m=w(")"),i=v(),p=r("div"),u=r("p"),P=w("Sends "),$=r("strong"),N=w(D),ee=w(" password reset email request."),Q=v(),ve(q.$$.fragment),z=v(),B=r("h6"),B.textContent="API details",G=v(),g=r("div"),H=r("strong"),H.textContent="POST",te=v(),O=r("div"),C=r("p"),se=w("/api/collections/"),J=r("strong"),K=w(E),le=w("/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 I=a[2];const ie=e=>e[5].code;for(let e=0;e<I.length;e+=1){let t=be(a,I,e),c=ie(t);oe.set(c,h[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=w("Request password reset ("),_=w(o),m=w(")"),i=v(),p=r("div"),u=r("p"),P=w("Sends "),$=r("strong"),O=w(D),ee=w(" password reset email request."),Q=v(),ve(q.$$.fragment),z=v(),B=r("h6"),B.textContent="API details",G=v(),g=r("div"),H=r("strong"),H.textContent="POST",te=v(),E=r("div"),C=r("p"),se=w("/api/collections/"),J=r("strong"),K=w(F),le=w("/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(),y=r("div"),A=r("div");for(let e=0;e<h.length;e+=1)h[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,Q,t),he(q,e,t),d(e,z,t),d(e,B,t),d(e,G,t),d(e,g,t),n(g,H),n(g,te),n(g,O),n(O,C),n(C,se),n(C,J),n(J,K),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<h.length;c+=1)h[c]&&h[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=`
<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<h.length;e+=1)h[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(E,"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($,O),n(u,ee),d(e,Q,t),he(q,e,t),d(e,z,t),d(e,B,t),d(e,G,t),d(e,g,t),n(g,H),n(g,te),n(g,E),n(E,C),n(C,se),n(C,J),n(J,K),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<h.length;c+=1)h[c]&&h[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+"")&&L(_,o),(!R||t&1)&&D!==(D=e[0].name+"")&&L(O,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,b as v,c as ve,f as b,g as d,h as n,m as
...
await pb.collection('${(pe=e[0])==null?void 0:pe.name}').requestPasswordReset('test@example.com');
`),q.$set(c),(!R||t&1)&&E!==(E=e[0].name+"")&&I(K,E),t&6&&(F=e[2],h=ue(h,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(Q),we(q,e),e&&f(z),e&&f(B),e&&f(G),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<h.length;t+=1)h[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function je(a,s,l){let o,{collection:_}=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=Ce.getApiExampleUrl(Se.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:`
`),q.$set(c),(!R||t&1)&&F!==(F=e[0].name+"")&&L(K,F),t&6&&(I=e[2],h=ue(h,t,ie,1,e,I,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(Q),we(q,e),e&&f(z),e&&f(B),e&&f(G),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<h.length;t+=1)h[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function je(a,s,l){let o,{collection:_}=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=Ce.getApiExampleUrl(Se.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,b as v,c as ve,f as b,g as d,h as n,m as
}
}
}
`}]),[_,m,i,o,p]}class Oe extends Pe{constructor(s){super(),$e(this,s,je,Ue,qe,{collection:0})}}export{Oe as default};
`}]),[_,m,i,o,p]}class Ee extends Pe{constructor(s){super(),$e(this,s,je,Ue,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,O as de,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as p,d as $e,C as Se,p as Te,r as I,u as Ve,N as Me}from"./index-e82e621c.js";import{S as Re}from"./SdkTabs-dcdfedfb.js";function me(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+"",_,m,n,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),_=$(o),m=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,m),n||(u=Ve(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&&p(s),n=!1,u()}}}function ke(a,l){let s,o,_,m;return o=new Me({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,_),m=!0},p(n,u){l=n;const d={};u&4&&(d.content=l[5].body),o.$set(d),(!m||u&6)&&I(s,"active",l[1]===l[5].code)},i(n){m||(Z(o.$$.fragment,n),m=!0)},o(n){x(o.$$.fragment,n),m=!1},d(n){n&&p(s),$e(o)}}}function Ae(a){var re,fe;let l,s,o=a[0].name+"",_,m,n,u,d,q,w,j=a[0].name+"",L,ee,N,P,Q,C,z,g,D,te,H,S,le,G,O=a[0].name+"",J,se,K,T,W,V,X,M,Y,y,R,h=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Re({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 I,N as de,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as p,d as $e,C as Se,p as Te,r as L,u as Me,M as Ve}from"./index-3379c20e.js";import{S as Re}from"./SdkTabs-0096fda4.js";function me(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+"",_,m,n,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),_=$(o),m=v(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(q,s,w),i(s,_),i(s,m),n||(u=Me(s,"click",d),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&I(_,o),w&6&&L(s,"active",l[1]===l[5].code)},d(q){q&&p(s),n=!1,u()}}}function ke(a,l){let s,o,_,m;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"),L(s,"active",l[1]===l[5].code),this.first=s},m(n,u){f(n,s,u),he(o,s,null),i(s,_),m=!0},p(n,u){l=n;const d={};u&4&&(d.content=l[5].body),o.$set(d),(!m||u&6)&&L(s,"active",l[1]===l[5].code)},i(n){m||(Z(o.$$.fragment,n),m=!0)},o(n){x(o.$$.fragment,n),m=!1},d(n){n&&p(s),$e(o)}}}function Ae(a){var re,fe;let l,s,o=a[0].name+"",_,m,n,u,d,q,w,j=a[0].name+"",N,ee,O,P,Q,C,z,g,D,te,H,S,le,G,E=a[0].name+"",J,se,K,T,W,M,X,V,Y,y,R,h=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Re({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${a[3]}');
@ -14,13 +14,13 @@ 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=me(a,U,e),c=ce(t);ie.set(c,k[e]=ke(c,t))}return{c(){l=r("h3"),s=$("Request verification ("),_=$(o),m=$(")"),n=v(),u=r("div"),d=r("p"),q=$("Sends "),w=r("strong"),L=$(j),ee=$(" verification email request."),N=v(),ve(P.$$.fragment),Q=v(),C=r("h6"),C.textContent="API details",z=v(),g=r("div"),D=r("strong"),D.textContent="POST",te=v(),H=r("div"),S=r("p"),le=$("/api/collections/"),G=r("strong"),J=$(O),se=$("/request-verification"),K=v(),T=r("div"),T.textContent="Body Parameters",W=v(),V=r("table"),V.innerHTML=`<thead><tr><th>Param</th>
`}});let F=a[2];const ne=e=>e[5].code;for(let e=0;e<F.length;e+=1){let t=be(a,F,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=me(a,U,e),c=ce(t);ie.set(c,k[e]=ke(c,t))}return{c(){l=r("h3"),s=$("Request verification ("),_=$(o),m=$(")"),n=v(),u=r("div"),d=r("p"),q=$("Sends "),w=r("strong"),N=$(j),ee=$(" verification email request."),O=v(),ve(P.$$.fragment),Q=v(),C=r("h6"),C.textContent="API details",z=v(),g=r("div"),D=r("strong"),D.textContent="POST",te=v(),H=r("div"),S=r("p"),le=$("/api/collections/"),G=r("strong"),J=$(E),se=$("/request-verification"),K=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(),M=r("div"),M.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(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(V,"class","table-compact table-border m-b-base"),b(M,"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,m),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,Q,t),f(e,C,t),f(e,z,t),f(e,g,t),i(g,D),i(g,te),i(g,H),i(H,S),i(S,le),i(S,G),i(G,J),i(S,se),f(e,K,t),f(e,T,t),f(e,W,t),f(e,V,t),f(e,X,t),f(e,M,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 pe,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(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(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,m),f(e,n,t),f(e,u,t),i(u,d),i(d,q),i(d,w),i(w,N),i(d,ee),f(e,O,t),he(P,e,t),f(e,Q,t),f(e,C,t),f(e,z,t),f(e,g,t),i(g,D),i(g,te),i(g,H),i(H,S),i(S,le),i(S,G),i(G,J),i(S,se),f(e,K,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 pe,ue;(!B||t&1)&&o!==(o=e[0].name+"")&&I(_,o),(!B||t&1)&&j!==(j=e[0].name+"")&&I(N,j);const c={};t&9&&(c.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
@ -36,7 +36,7 @@ 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(J,O),t&6&&(E=e[2],h=de(h,t,ne,1,e,E,oe,R,ge,_e,null,be)),t&6&&(U=e[2],ye(),k=de(k,t,ce,1,e,U,ie,A,Be,ke,null,me),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&&p(l),e&&p(n),e&&p(u),e&&p(N),$e(P,e),e&&p(Q),e&&p(C),e&&p(z),e&&p(g),e&&p(K),e&&p(T),e&&p(W),e&&p(V),e&&p(X),e&&p(M),e&&p(Y),e&&p(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 Ue(a,l,s){let o,{collection:_}=l,m=204,n=[];const u=d=>s(1,m=d.code);return a.$$set=d=>{"collection"in d&&s(0,_=d.collection)},s(3,o=Se.getApiExampleUrl(Te.baseUrl)),s(2,n=[{code:204,body:"null"},{code:400,body:`
`),P.$set(c),(!B||t&1)&&E!==(E=e[0].name+"")&&I(J,E),t&6&&(F=e[2],h=de(h,t,ne,1,e,F,oe,R,ge,_e,null,be)),t&6&&(U=e[2],ye(),k=de(k,t,ce,1,e,U,ie,A,Be,ke,null,me),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&&p(l),e&&p(n),e&&p(u),e&&p(O),$e(P,e),e&&p(Q),e&&p(C),e&&p(z),e&&p(g),e&&p(K),e&&p(T),e&&p(W),e&&p(M),e&&p(X),e&&p(V),e&&p(Y),e&&p(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 Ue(a,l,s){let o,{collection:_}=l,m=204,n=[];const u=d=>s(1,m=d.code);return a.$$set=d=>{"collection"in d&&s(0,_=d.collection)},s(3,o=Se.getApiExampleUrl(Te.baseUrl)),s(2,n=[{code:204,body:"null"},{code:400,body:`
{
"code": 400,
"message": "Failed to authenticate.",

1
ui/dist/assets/SdkTabs-0096fda4.js vendored Normal file
View File

@ -0,0 +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,P as J,k as Q,Q 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 O}from"./index-3379c20e.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),O(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],Q(),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 +0,0 @@
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,O as C,P as J,k as O,Q,n as Y,t as N,a as P,o as w,w as E,r as S,u as z,x as R,N as A,c as G,m as H,d as L}from"./index-e82e621c.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 T(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=z(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 I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new A({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),G(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),H(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),L(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]=T(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]=I(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,T,null,K)),a&6&&(d=t[2],O(),n=C(n,a,b,1,t,d,k,i,Q,I,null,D),Y()),(!_||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 M="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(M)||"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(M,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,4 +1,4 @@
import{S as qe,i as Oe,s as De,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,O as ye,P as Me,k as We,Q as ze,n as He,t as le,a as oe,o as u,d as Ue,C as Le,p as je,r as N,u as Ie,N as Ne}from"./index-e82e621c.js";import{S as Re}from"./SdkTabs-dcdfedfb.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 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=Ie(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 Ne({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 Ke(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,f,$,P,M=n[0].name+"",R,se,ae,K,Q,A,F,E,G,w,W,ne,z,y,ie,J,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,O,k=[],fe=new Map,T;A=new Re({props:{js:`
import{S as qe,i as Me,s as De,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 ye,P as Oe,k as We,Q as ze,n as He,t as le,a as oe,o as u,d as Ue,C as Le,p as je,r as N,u as Ie,M as Ne}from"./index-3379c20e.js";import{S as Re}from"./SdkTabs-0096fda4.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 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=Ie(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 Ne({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 Ke(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,f,$,P,O=n[0].name+"",R,se,ae,K,Q,A,F,E,G,w,W,ne,z,y,ie,J,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=[],fe=new Map,T;A=new Re({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${n[3]}');
@ -24,7 +24,7 @@ import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f as m,g as d,h as s
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=Ce(n,j,e),r=me(t);ue.set(r,g[e]=Te(r,t))}let D=n[2];const be=e=>e[5].code;for(let e=0;e<D.length;e+=1){let t=Ae(n,D,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(M),se=v(" record."),ae=h(),K=i("p"),K.textContent="Only admins and the account owner can access this action.",Q=h(),Se(A.$$.fragment),F=h(),E=i("h6"),E.textContent="API details",G=h(),w=i("div"),W=i("strong"),W.textContent="DELETE",ne=h(),z=i("div"),y=i("p"),ie=v("/api/collections/"),J=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>
`}});let j=n[2];const me=e=>e[5].code;for(let e=0;e<j.length;e+=1){let t=Ce(n,j,e),r=me(t);ue.set(r,g[e]=Te(r,t))}let D=n[2];const be=e=>e[5].code;for(let e=0;e<D.length;e+=1){let t=Ae(n,D,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(O),se=v(" record."),ae=h(),K=i("p"),K.textContent="Only admins and the account owner can access this action.",Q=h(),Se(A.$$.fragment),F=h(),E=i("h6"),E.textContent="API details",G=h(),w=i("div"),W=i("strong"),W.textContent="DELETE",ne=h(),z=i("div"),y=i("p"),ie=v("/api/collections/"),J=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>
@ -33,7 +33,7 @@ import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f as m,g as d,h as s
<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(),O=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(O,"class","tabs-content"),m(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,f),s(f,$),s(f,P),s(P,R),s(f,se),s(p,ae),s(p,K),d(e,Q,t),Be(A,e,t),d(e,F,t),d(e,E,t),d(e,G,t),d(e,w,t),s(w,W),s(w,ne),s(w,z),s(z,y),s(y,ie),s(y,J),s(J,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,O);for(let r=0;r<k.length;r+=1)k[r]&&k[r].m(O,null);T=!0},p(e,[t]){var ge,we,$e,Pe;(!T||t&1)&&a!==(a=e[0].name+"")&&I(_,a),(!T||t&1)&&M!==(M=e[0].name+"")&&I(R,M);const r={};t&9&&(r.js=`
<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();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(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,f),s(f,$),s(f,P),s(P,R),s(f,se),s(p,ae),s(p,K),d(e,Q,t),Be(A,e,t),d(e,F,t),d(e,E,t),d(e,G,t),d(e,w,t),s(w,W),s(w,ne),s(w,z),s(z,y),s(y,ie),s(y,J),s(J,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+"")&&I(_,a),(!T||t&1)&&O!==(O=e[0].name+"")&&I(R,O);const r={};t&9&&(r.js=`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${e[3]}');
@ -59,7 +59,7 @@ import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f as m,g as d,h as s
pb.authStore.model.id,
'google',
);
`),A.$set(r),(!T||t&1)&&H!==(H=e[0].name+"")&&I(V,H),t&6&&(j=e[2],g=ye(g,t,me,1,e,j,ue,q,Me,Te,null,Ce)),t&6&&(D=e[2],We(),k=ye(k,t,be,1,e,D,fe,O,ze,Ee,null,Ae),He())},i(e){if(!T){le(A.$$.fragment,e);for(let t=0;t<D.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(Q),Ue(A,e),e&&u(F),e&&u(E),e&&u(G),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 Qe(n,l,o){let a,{collection:_}=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=Le.getApiExampleUrl(je.baseUrl)),o(2,c=[{code:204,body:"null"},{code:401,body:`
`),A.$set(r),(!T||t&1)&&H!==(H=e[0].name+"")&&I(V,H),t&6&&(j=e[2],g=ye(g,t,me,1,e,j,ue,q,Oe,Te,null,Ce)),t&6&&(D=e[2],We(),k=ye(k,t,be,1,e,D,fe,M,ze,Ee,null,Ae),He())},i(e){if(!T){le(A.$$.fragment,e);for(let t=0;t<D.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(Q),Ue(A,e),e&&u(F),e&&u(E),e&&u(G),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 Qe(n,l,o){let a,{collection:_}=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=Le.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.",
@ -77,4 +77,4 @@ import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f as m,g as d,h as s
"message": "The requested resource wasn't found.",
"data": {}
}
`}]),[_,b,c,a,p]}class Je extends qe{constructor(l){super(),Oe(this,l,Qe,Ke,De,{collection:0})}}export{Je as default};
`}]),[_,b,c,a,p]}class Je extends qe{constructor(l){super(),Me(this,l,Qe,Ke,De,{collection:0})}}export{Je as default};

View File

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

View File

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

231
ui/dist/assets/index-3379c20e.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
ui/dist/index.html vendored
View File

@ -45,7 +45,7 @@
window.Prism = window.Prism || {};
window.Prism.manual = true;
</script>
<script type="module" crossorigin src="./assets/index-e82e621c.js"></script>
<script type="module" crossorigin src="./assets/index-3379c20e.js"></script>
<link rel="stylesheet" href="./assets/index-f5fbc7a3.css">
</head>
<body>