merge v0.23.0-rc changes
@@ -0,0 +1,33 @@
|
||||
import{S as Ce,i as Be,s as Te,Q as Le,T as G,e as c,w as y,b as k,c as ae,f as h,g as u,h as a,m as ne,x as I,U as $e,V as Re,k as Se,W as Ue,n as Qe,t as J,a as N,o as d,d as ie,p as oe,C as je,r as O,u as qe,R as De}from"./index-B-F-pko3.js";import{F as Ee}from"./FieldsQueryParam-CW6KZfgu.js";function ye(n,s,l){const o=n.slice();return o[8]=s[l],o}function Me(n,s,l){const o=n.slice();return o[8]=s[l],o}function Ae(n,s){let l,o=s[8].code+"",p,b,i,f;function m(){return s[6](s[8])}return{key:n,first:null,c(){l=c("button"),p=y(o),b=k(),h(l,"class","tab-item"),O(l,"active",s[1]===s[8].code),this.first=l},m(v,w){u(v,l,w),a(l,p),a(l,b),i||(f=qe(l,"click",m),i=!0)},p(v,w){s=v,w&4&&o!==(o=s[8].code+"")&&I(p,o),w&6&&O(l,"active",s[1]===s[8].code)},d(v){v&&d(l),i=!1,f()}}}function Pe(n,s){let l,o,p,b;return o=new De({props:{content:s[8].body}}),{key:n,first:null,c(){l=c("div"),ae(o.$$.fragment),p=k(),h(l,"class","tab-item"),O(l,"active",s[1]===s[8].code),this.first=l},m(i,f){u(i,l,f),ne(o,l,null),a(l,p),b=!0},p(i,f){s=i;const m={};f&4&&(m.content=s[8].body),o.$set(m),(!b||f&6)&&O(l,"active",s[1]===s[8].code)},i(i){b||(J(o.$$.fragment,i),b=!0)},o(i){N(o.$$.fragment,i),b=!1},d(i){i&&d(l),ie(o)}}}function Fe(n){var ke,ge;let s,l,o=n[0].name+"",p,b,i,f,m,v,w,g=n[0].name+"",V,ce,W,M,z,L,K,A,D,re,E,R,ue,X,F=n[0].name+"",Y,de,Z,S,x,P,ee,fe,te,T,le,U,se,C,Q,$=[],me=new Map,pe,j,_=[],be=new Map,B;M=new Le({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
const result = await pb.collection('${(ke=n[0])==null?void 0:ke.name}').listAuthMethods();
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
final result = await pb.collection('${(ge=n[0])==null?void 0:ge.name}').listAuthMethods();
|
||||
`}}),T=new Ee({});let H=G(n[2]);const he=e=>e[8].code;for(let e=0;e<H.length;e+=1){let t=Me(n,H,e),r=he(t);me.set(r,$[e]=Ae(r,t))}let q=G(n[2]);const _e=e=>e[8].code;for(let e=0;e<q.length;e+=1){let t=ye(n,q,e),r=_e(t);be.set(r,_[e]=Pe(r,t))}return{c(){s=c("h3"),l=y("List auth methods ("),p=y(o),b=y(")"),i=k(),f=c("div"),m=c("p"),v=y("Returns a public list with all allowed "),w=c("strong"),V=y(g),ce=y(" authentication methods."),W=k(),ae(M.$$.fragment),z=k(),L=c("h6"),L.textContent="API details",K=k(),A=c("div"),D=c("strong"),D.textContent="GET",re=k(),E=c("div"),R=c("p"),ue=y("/api/collections/"),X=c("strong"),Y=y(F),de=y("/auth-methods"),Z=k(),S=c("div"),S.textContent="Query parameters",x=k(),P=c("table"),ee=c("thead"),ee.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="50%">Description</th></tr>',fe=k(),te=c("tbody"),ae(T.$$.fragment),le=k(),U=c("div"),U.textContent="Responses",se=k(),C=c("div"),Q=c("div");for(let e=0;e<$.length;e+=1)$[e].c();pe=k(),j=c("div");for(let e=0;e<_.length;e+=1)_[e].c();h(s,"class","m-b-sm"),h(f,"class","content txt-lg m-b-sm"),h(L,"class","m-b-xs"),h(D,"class","label label-primary"),h(E,"class","content"),h(A,"class","alert alert-info"),h(S,"class","section-title"),h(P,"class","table-compact table-border m-b-base"),h(U,"class","section-title"),h(Q,"class","tabs-header compact combined left"),h(j,"class","tabs-content"),h(C,"class","tabs")},m(e,t){u(e,s,t),a(s,l),a(s,p),a(s,b),u(e,i,t),u(e,f,t),a(f,m),a(m,v),a(m,w),a(w,V),a(m,ce),u(e,W,t),ne(M,e,t),u(e,z,t),u(e,L,t),u(e,K,t),u(e,A,t),a(A,D),a(A,re),a(A,E),a(E,R),a(R,ue),a(R,X),a(X,Y),a(R,de),u(e,Z,t),u(e,S,t),u(e,x,t),u(e,P,t),a(P,ee),a(P,fe),a(P,te),ne(T,te,null),u(e,le,t),u(e,U,t),u(e,se,t),u(e,C,t),a(C,Q);for(let r=0;r<$.length;r+=1)$[r]&&$[r].m(Q,null);a(C,pe),a(C,j);for(let r=0;r<_.length;r+=1)_[r]&&_[r].m(j,null);B=!0},p(e,[t]){var ve,we;(!B||t&1)&&o!==(o=e[0].name+"")&&I(p,o),(!B||t&1)&&g!==(g=e[0].name+"")&&I(V,g);const r={};t&9&&(r.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
const result = await pb.collection('${(ve=e[0])==null?void 0:ve.name}').listAuthMethods();
|
||||
`),t&9&&(r.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
final result = await pb.collection('${(we=e[0])==null?void 0:we.name}').listAuthMethods();
|
||||
`),M.$set(r),(!B||t&1)&&F!==(F=e[0].name+"")&&I(Y,F),t&6&&(H=G(e[2]),$=$e($,t,he,1,e,H,me,Q,Re,Ae,null,Me)),t&6&&(q=G(e[2]),Se(),_=$e(_,t,_e,1,e,q,be,j,Ue,Pe,null,ye),Qe())},i(e){if(!B){J(M.$$.fragment,e),J(T.$$.fragment,e);for(let t=0;t<q.length;t+=1)J(_[t]);B=!0}},o(e){N(M.$$.fragment,e),N(T.$$.fragment,e);for(let t=0;t<_.length;t+=1)N(_[t]);B=!1},d(e){e&&(d(s),d(i),d(f),d(W),d(z),d(L),d(K),d(A),d(Z),d(S),d(x),d(P),d(le),d(U),d(se),d(C)),ie(M,e),ie(T);for(let t=0;t<$.length;t+=1)$[t].d();for(let t=0;t<_.length;t+=1)_[t].d()}}}function He(n,s,l){let o,{collection:p}=s,b=200,i=[],f={},m=!1;v();async function v(){l(5,m=!0);try{l(4,f=await oe.collection(p.name).listAuthMethods())}catch(g){oe.error(g)}l(5,m=!1)}const w=g=>l(1,b=g.code);return n.$$set=g=>{"collection"in g&&l(0,p=g.collection)},n.$$.update=()=>{n.$$.dirty&48&&l(2,i=[{code:200,body:m?"...":JSON.stringify(f,null,2)}])},l(3,o=je.getApiExampleUrl(oe.baseURL)),[p,b,i,o,f,m,w]}class Je extends Ce{constructor(s){super(),Be(this,s,He,Fe,Te,{collection:0})}}export{Je as default};
|
||||
@@ -1,64 +0,0 @@
|
||||
import{S as Se,i as ye,s as Ae,O as G,e as c,v as w,b as k,c as se,f as p,g as d,h as a,m as ae,w as U,P as ve,Q as Te,k as je,R as Be,n as Oe,t as W,a as V,o as u,d as ne,C as Fe,A as Qe,q as L,r as Ne,N as qe}from"./index-Bp3jGQ0J.js";import{S as He}from"./SdkTabs-DxNNd6Sw.js";import{F as Ke}from"./FieldsQueryParam-zDO3HzQv.js";function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Pe(n,l,o){const s=n.slice();return s[5]=l[o],s}function $e(n,l){let o,s=l[5].code+"",_,f,i,h;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=c("button"),_=w(s),f=k(),p(o,"class","tab-item"),L(o,"active",l[1]===l[5].code),this.first=o},m(v,C){d(v,o,C),a(o,_),a(o,f),i||(h=Ne(o,"click",m),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&U(_,s),C&6&&L(o,"active",l[1]===l[5].code)},d(v){v&&u(o),i=!1,h()}}}function Me(n,l){let o,s,_,f;return s=new qe({props:{content:l[5].body}}),{key:n,first:null,c(){o=c("div"),se(s.$$.fragment),_=k(),p(o,"class","tab-item"),L(o,"active",l[1]===l[5].code),this.first=o},m(i,h){d(i,o,h),ae(s,o,null),a(o,_),f=!0},p(i,h){l=i;const m={};h&4&&(m.content=l[5].body),s.$set(m),(!f||h&6)&&L(o,"active",l[1]===l[5].code)},i(i){f||(W(s.$$.fragment,i),f=!0)},o(i){V(s.$$.fragment,i),f=!1},d(i){i&&u(o),ne(s)}}}function ze(n){var be,ke;let l,o,s=n[0].name+"",_,f,i,h,m,v,C,q=n[0].name+"",E,ie,I,P,J,T,Y,$,H,ce,K,j,re,R,z=n[0].name+"",X,de,Z,B,x,M,ee,ue,te,A,le,O,oe,S,F,g=[],he=new Map,me,Q,b=[],fe=new Map,y;P=new He({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
const result = await pb.collection('${(be=n[0])==null?void 0:be.name}').listAuthMethods();
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
final result = await pb.collection('${(ke=n[0])==null?void 0:ke.name}').listAuthMethods();
|
||||
`}}),A=new Ke({});let D=G(n[2]);const pe=e=>e[5].code;for(let e=0;e<D.length;e+=1){let t=Pe(n,D,e),r=pe(t);he.set(r,g[e]=$e(r,t))}let N=G(n[2]);const _e=e=>e[5].code;for(let e=0;e<N.length;e+=1){let t=Ce(n,N,e),r=_e(t);fe.set(r,b[e]=Me(r,t))}return{c(){l=c("h3"),o=w("List auth methods ("),_=w(s),f=w(")"),i=k(),h=c("div"),m=c("p"),v=w("Returns a public list with all allowed "),C=c("strong"),E=w(q),ie=w(" authentication methods."),I=k(),se(P.$$.fragment),J=k(),T=c("h6"),T.textContent="API details",Y=k(),$=c("div"),H=c("strong"),H.textContent="GET",ce=k(),K=c("div"),j=c("p"),re=w("/api/collections/"),R=c("strong"),X=w(z),de=w("/auth-methods"),Z=k(),B=c("div"),B.textContent="Query parameters",x=k(),M=c("table"),ee=c("thead"),ee.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="50%">Description</th></tr>',ue=k(),te=c("tbody"),se(A.$$.fragment),le=k(),O=c("div"),O.textContent="Responses",oe=k(),S=c("div"),F=c("div");for(let e=0;e<g.length;e+=1)g[e].c();me=k(),Q=c("div");for(let e=0;e<b.length;e+=1)b[e].c();p(l,"class","m-b-sm"),p(h,"class","content txt-lg m-b-sm"),p(T,"class","m-b-xs"),p(H,"class","label label-primary"),p(K,"class","content"),p($,"class","alert alert-info"),p(B,"class","section-title"),p(M,"class","table-compact table-border m-b-base"),p(O,"class","section-title"),p(F,"class","tabs-header compact combined left"),p(Q,"class","tabs-content"),p(S,"class","tabs")},m(e,t){d(e,l,t),a(l,o),a(l,_),a(l,f),d(e,i,t),d(e,h,t),a(h,m),a(m,v),a(m,C),a(C,E),a(m,ie),d(e,I,t),ae(P,e,t),d(e,J,t),d(e,T,t),d(e,Y,t),d(e,$,t),a($,H),a($,ce),a($,K),a(K,j),a(j,re),a(j,R),a(R,X),a(j,de),d(e,Z,t),d(e,B,t),d(e,x,t),d(e,M,t),a(M,ee),a(M,ue),a(M,te),ae(A,te,null),d(e,le,t),d(e,O,t),d(e,oe,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,me),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 ge,we;(!y||t&1)&&s!==(s=e[0].name+"")&&U(_,s),(!y||t&1)&&q!==(q=e[0].name+"")&&U(E,q);const r={};t&9&&(r.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
const result = await pb.collection('${(ge=e[0])==null?void 0:ge.name}').listAuthMethods();
|
||||
`),t&9&&(r.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
final result = await pb.collection('${(we=e[0])==null?void 0:we.name}').listAuthMethods();
|
||||
`),P.$set(r),(!y||t&1)&&z!==(z=e[0].name+"")&&U(X,z),t&6&&(D=G(e[2]),g=ve(g,t,pe,1,e,D,he,F,Te,$e,null,Pe)),t&6&&(N=G(e[2]),je(),b=ve(b,t,_e,1,e,N,fe,Q,Be,Me,null,Ce),Oe())},i(e){if(!y){W(P.$$.fragment,e),W(A.$$.fragment,e);for(let t=0;t<N.length;t+=1)W(b[t]);y=!0}},o(e){V(P.$$.fragment,e),V(A.$$.fragment,e);for(let t=0;t<b.length;t+=1)V(b[t]);y=!1},d(e){e&&(u(l),u(i),u(h),u(I),u(J),u(T),u(Y),u($),u(Z),u(B),u(x),u(M),u(le),u(O),u(oe),u(S)),ne(P,e),ne(A);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 De(n,l,o){let s,{collection:_}=l,f=200,i=[];const h=m=>o(1,f=m.code);return n.$$set=m=>{"collection"in m&&o(0,_=m.collection)},o(3,s=Fe.getApiExampleUrl(Qe.baseUrl)),o(2,i=[{code:200,body:`
|
||||
{
|
||||
"usernamePassword": true,
|
||||
"emailPassword": true,
|
||||
"authProviders": [
|
||||
{
|
||||
"name": "github",
|
||||
"state": "3Yd8jNkK_6PJG6hPWwBjLqKwse6Ejd",
|
||||
"codeVerifier": "KxFDWz1B3fxscCDJ_9gHQhLuh__ie7",
|
||||
"codeChallenge": "NM1oVexB6Q6QH8uPtOUfK7tq4pmu4Jz6lNDIwoxHZNE=",
|
||||
"codeChallengeMethod": "S256",
|
||||
"authUrl": "https://github.com/login/oauth/authorize?client_id=demo&code_challenge=NM1oVexB6Q6QH8uPtOUfK7tq4pmu4Jz6lNDIwoxHZNE%3D&code_challenge_method=S256&response_type=code&scope=user&state=3Yd8jNkK_6PJG6hPWwBjLqKwse6Ejd&redirect_uri="
|
||||
},
|
||||
{
|
||||
"name": "gitlab",
|
||||
"state": "NeQSbtO5cShr_mk5__3CUukiMnymeb",
|
||||
"codeVerifier": "ahTFHOgua8mkvPAlIBGwCUJbWKR_xi",
|
||||
"codeChallenge": "O-GATkTj4eXDCnfonsqGLCd6njvTixlpCMvy5kjgOOg=",
|
||||
"codeChallengeMethod": "S256",
|
||||
"authUrl": "https://gitlab.com/oauth/authorize?client_id=demo&code_challenge=O-GATkTj4eXDCnfonsqGLCd6njvTixlpCMvy5kjgOOg%3D&code_challenge_method=S256&response_type=code&scope=read_user&state=NeQSbtO5cShr_mk5__3CUukiMnymeb&redirect_uri="
|
||||
},
|
||||
{
|
||||
"name": "google",
|
||||
"state": "zB3ZPifV1TW2GMuvuFkamSXfSNkHPQ",
|
||||
"codeVerifier": "t3CmO5VObGzdXqieakvR_fpjiW0zdO",
|
||||
"codeChallenge": "KChwoQPKYlz2anAdqtgsSTdIo8hdwtc1fh2wHMwW2Yk=",
|
||||
"codeChallengeMethod": "S256",
|
||||
"authUrl": "https://accounts.google.com/o/oauth2/auth?client_id=demo&code_challenge=KChwoQPKYlz2anAdqtgsSTdIo8hdwtc1fh2wHMwW2Yk%3D&code_challenge_method=S256&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&state=zB3ZPifV1TW2GMuvuFkamSXfSNkHPQ&redirect_uri="
|
||||
}
|
||||
]
|
||||
}
|
||||
`}]),[_,f,i,s,h]}class Ve extends Se{constructor(l){super(),ye(this,l,De,ze,Ae,{collection:0})}}export{Ve as default};
|
||||
@@ -1,79 +0,0 @@
|
||||
import{S as je,i as xe,s as Je,N as Ue,O as J,e as s,v as k,b as p,c as K,f as b,g as d,h as o,m as I,w as de,P as Ee,Q as Ke,k as Ie,R as We,n as Ge,t as N,a as V,o as u,d as W,C as Le,A as Xe,q as G,r as Ye}from"./index-Bp3jGQ0J.js";import{S as Ze}from"./SdkTabs-DxNNd6Sw.js";import{F as et}from"./FieldsQueryParam-zDO3HzQv.js";function Ne(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ve(r,l,a){const n=r.slice();return n[5]=l[a],n}function ze(r,l){let a,n=l[5].code+"",m,_,i,h;function g(){return l[4](l[5])}return{key:r,first:null,c(){a=s("button"),m=k(n),_=p(),b(a,"class","tab-item"),G(a,"active",l[1]===l[5].code),this.first=a},m(v,w){d(v,a,w),o(a,m),o(a,_),i||(h=Ye(a,"click",g),i=!0)},p(v,w){l=v,w&4&&n!==(n=l[5].code+"")&&de(m,n),w&6&&G(a,"active",l[1]===l[5].code)},d(v){v&&u(a),i=!1,h()}}}function Qe(r,l){let a,n,m,_;return n=new Ue({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),K(n.$$.fragment),m=p(),b(a,"class","tab-item"),G(a,"active",l[1]===l[5].code),this.first=a},m(i,h){d(i,a,h),I(n,a,null),o(a,m),_=!0},p(i,h){l=i;const g={};h&4&&(g.content=l[5].body),n.$set(g),(!_||h&6)&&G(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),W(n)}}}function tt(r){var De,Fe;let l,a,n=r[0].name+"",m,_,i,h,g,v,w,B,X,S,z,ue,Q,M,pe,Y,U=r[0].name+"",Z,he,fe,j,ee,D,te,T,oe,be,F,C,le,me,ae,_e,f,ke,R,ge,ve,$e,se,ye,ne,Se,we,Te,re,Ce,Pe,A,ie,O,ce,P,H,y=[],Re=new Map,Ae,E,$=[],qe=new Map,q;v=new Ze({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${r[3]}');
|
||||
|
||||
...
|
||||
|
||||
const authData = await pb.collection('${(De=r[0])==null?void 0:De.name}').authRefresh();
|
||||
|
||||
// after the above you can also access the refreshed auth data from the authStore
|
||||
console.log(pb.authStore.isValid);
|
||||
console.log(pb.authStore.token);
|
||||
console.log(pb.authStore.model.id);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${r[3]}');
|
||||
|
||||
...
|
||||
|
||||
final authData = await pb.collection('${(Fe=r[0])==null?void 0:Fe.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);
|
||||
`}}),R=new Ue({props:{content:"?expand=relField1,relField2.subRelField"}}),A=new et({props:{prefix:"record."}});let x=J(r[2]);const Be=e=>e[5].code;for(let e=0;e<x.length;e+=1){let t=Ve(r,x,e),c=Be(t);Re.set(c,y[e]=ze(c,t))}let L=J(r[2]);const Me=e=>e[5].code;for(let e=0;e<L.length;e+=1){let t=Ne(r,L,e),c=Me(t);qe.set(c,$[e]=Qe(c,t))}return{c(){l=s("h3"),a=k("Auth refresh ("),m=k(n),_=k(")"),i=p(),h=s("div"),h.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>`,g=p(),K(v.$$.fragment),w=p(),B=s("h6"),B.textContent="API details",X=p(),S=s("div"),z=s("strong"),z.textContent="POST",ue=p(),Q=s("div"),M=s("p"),pe=k("/api/collections/"),Y=s("strong"),Z=k(U),he=k("/auth-refresh"),fe=p(),j=s("p"),j.innerHTML="Requires record <code>Authorization:TOKEN</code> header",ee=p(),D=s("div"),D.textContent="Query parameters",te=p(),T=s("table"),oe=s("thead"),oe.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',be=p(),F=s("tbody"),C=s("tr"),le=s("td"),le.textContent="expand",me=p(),ae=s("td"),ae.innerHTML='<span class="label">String</span>',_e=p(),f=s("td"),ke=k(`Auto expand record relations. Ex.:
|
||||
`),K(R.$$.fragment),ge=k(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),ve=s("br"),$e=k(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),se=s("code"),se.textContent="expand",ye=k(" property (eg. "),ne=s("code"),ne.textContent='"expand": {"relField1": {...}, ...}',Se=k(`).
|
||||
`),we=s("br"),Te=k(`
|
||||
Only the relations to which the request user has permissions to `),re=s("strong"),re.textContent="view",Ce=k(" will be expanded."),Pe=p(),K(A.$$.fragment),ie=p(),O=s("div"),O.textContent="Responses",ce=p(),P=s("div"),H=s("div");for(let e=0;e<y.length;e+=1)y[e].c();Ae=p(),E=s("div");for(let e=0;e<$.length;e+=1)$[e].c();b(l,"class","m-b-sm"),b(h,"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(O,"class","section-title"),b(H,"class","tabs-header compact combined 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,h,t),d(e,g,t),I(v,e,t),d(e,w,t),d(e,B,t),d(e,X,t),d(e,S,t),o(S,z),o(S,ue),o(S,Q),o(Q,M),o(M,pe),o(M,Y),o(Y,Z),o(M,he),o(S,fe),o(S,j),d(e,ee,t),d(e,D,t),d(e,te,t),d(e,T,t),o(T,oe),o(T,be),o(T,F),o(F,C),o(C,le),o(C,me),o(C,ae),o(C,_e),o(C,f),o(f,ke),I(R,f,null),o(f,ge),o(f,ve),o(f,$e),o(f,se),o(f,ye),o(f,ne),o(f,Se),o(f,we),o(f,Te),o(f,re),o(f,Ce),o(F,Pe),I(A,F,null),d(e,ie,t),d(e,O,t),d(e,ce,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,Ae),o(P,E);for(let c=0;c<$.length;c+=1)$[c]&&$[c].m(E,null);q=!0},p(e,[t]){var Oe,He;(!q||t&1)&&n!==(n=e[0].name+"")&&de(m,n);const c={};t&9&&(c.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
const authData = await pb.collection('${(Oe=e[0])==null?void 0:Oe.name}').authRefresh();
|
||||
|
||||
// after the above you can also access the refreshed auth data from the authStore
|
||||
console.log(pb.authStore.isValid);
|
||||
console.log(pb.authStore.token);
|
||||
console.log(pb.authStore.model.id);
|
||||
`),t&9&&(c.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
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);
|
||||
`),v.$set(c),(!q||t&1)&&U!==(U=e[0].name+"")&&de(Z,U),t&6&&(x=J(e[2]),y=Ee(y,t,Be,1,e,x,Re,H,Ke,ze,null,Ve)),t&6&&(L=J(e[2]),Ie(),$=Ee($,t,Me,1,e,L,qe,E,We,Qe,null,Ne),Ge())},i(e){if(!q){N(v.$$.fragment,e),N(R.$$.fragment,e),N(A.$$.fragment,e);for(let t=0;t<L.length;t+=1)N($[t]);q=!0}},o(e){V(v.$$.fragment,e),V(R.$$.fragment,e),V(A.$$.fragment,e);for(let t=0;t<$.length;t+=1)V($[t]);q=!1},d(e){e&&(u(l),u(i),u(h),u(g),u(w),u(B),u(X),u(S),u(ee),u(D),u(te),u(T),u(ie),u(O),u(ce),u(P)),W(v,e),W(R),W(A);for(let t=0;t<y.length;t+=1)y[t].d();for(let t=0;t<$.length;t+=1)$[t].d()}}}function ot(r,l,a){let n,{collection:m}=l,_=200,i=[];const h=g=>a(1,_=g.code);return r.$$set=g=>{"collection"in g&&a(0,m=g.collection)},r.$$.update=()=>{r.$$.dirty&1&&a(2,i=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:Le.dummyCollectionRecord(m)},null,2)},{code:401,body:`
|
||||
{
|
||||
"code": 401,
|
||||
"message": "The request requires valid record authorization token to be set.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "The authorized record model is not allowed to perform this action.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "Missing auth record context.",
|
||||
"data": {}
|
||||
}
|
||||
`}])},a(3,n=Le.getApiExampleUrl(Xe.baseUrl)),[m,_,i,n,h]}class nt extends je{constructor(l){super(),xe(this,l,ot,tt,Je,{collection:0})}}export{nt as default};
|
||||
@@ -0,0 +1,79 @@
|
||||
import{S as Qe,i as je,s as Je,Q as Ke,R as Ne,T as J,e as s,w as k,b as p,c as K,f as b,g as d,h as o,m as W,x as de,U as Oe,V as We,k as Ie,W as Ge,n as Xe,t as E,a as U,o as u,d as I,C as Ve,p as Ye,r as G,u as Ze}from"./index-B-F-pko3.js";import{F as et}from"./FieldsQueryParam-CW6KZfgu.js";function Ee(r,a,l){const n=r.slice();return n[5]=a[l],n}function Ue(r,a,l){const n=r.slice();return n[5]=a[l],n}function xe(r,a){let l,n=a[5].code+"",m,_,i,h;function g(){return a[4](a[5])}return{key:r,first:null,c(){l=s("button"),m=k(n),_=p(),b(l,"class","tab-item"),G(l,"active",a[1]===a[5].code),this.first=l},m(v,w){d(v,l,w),o(l,m),o(l,_),i||(h=Ze(l,"click",g),i=!0)},p(v,w){a=v,w&4&&n!==(n=a[5].code+"")&&de(m,n),w&6&&G(l,"active",a[1]===a[5].code)},d(v){v&&u(l),i=!1,h()}}}function ze(r,a){let l,n,m,_;return n=new Ne({props:{content:a[5].body}}),{key:r,first:null,c(){l=s("div"),K(n.$$.fragment),m=p(),b(l,"class","tab-item"),G(l,"active",a[1]===a[5].code),this.first=l},m(i,h){d(i,l,h),W(n,l,null),o(l,m),_=!0},p(i,h){a=i;const g={};h&4&&(g.content=a[5].body),n.$set(g),(!_||h&6)&&G(l,"active",a[1]===a[5].code)},i(i){_||(E(n.$$.fragment,i),_=!0)},o(i){U(n.$$.fragment,i),_=!1},d(i){i&&u(l),I(n)}}}function tt(r){var De,Fe;let a,l,n=r[0].name+"",m,_,i,h,g,v,w,M,X,S,x,ue,z,q,pe,Y,N=r[0].name+"",Z,he,fe,Q,ee,D,te,T,oe,be,F,C,ae,me,le,_e,f,ke,P,ge,ve,$e,se,ye,ne,Se,we,Te,re,Ce,Re,A,ie,H,ce,R,L,y=[],Pe=new Map,Ae,O,$=[],Be=new Map,B;v=new Ke({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${r[3]}');
|
||||
|
||||
...
|
||||
|
||||
const authData = await pb.collection('${(De=r[0])==null?void 0:De.name}').authRefresh();
|
||||
|
||||
// after the above you can also access the refreshed auth data from the authStore
|
||||
console.log(pb.authStore.isValid);
|
||||
console.log(pb.authStore.token);
|
||||
console.log(pb.authStore.record.id);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${r[3]}');
|
||||
|
||||
...
|
||||
|
||||
final authData = await pb.collection('${(Fe=r[0])==null?void 0:Fe.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.record.id);
|
||||
`}}),P=new Ne({props:{content:"?expand=relField1,relField2.subRelField"}}),A=new et({props:{prefix:"record."}});let j=J(r[2]);const Me=e=>e[5].code;for(let e=0;e<j.length;e+=1){let t=Ue(r,j,e),c=Me(t);Pe.set(c,y[e]=xe(c,t))}let V=J(r[2]);const qe=e=>e[5].code;for(let e=0;e<V.length;e+=1){let t=Ee(r,V,e),c=qe(t);Be.set(c,$[e]=ze(c,t))}return{c(){a=s("h3"),l=k("Auth refresh ("),m=k(n),_=k(")"),i=p(),h=s("div"),h.innerHTML=`<p>Returns a new auth response (token and record data) for an
|
||||
<strong>already authenticated record</strong>.</p> <p>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.</p>`,g=p(),K(v.$$.fragment),w=p(),M=s("h6"),M.textContent="API details",X=p(),S=s("div"),x=s("strong"),x.textContent="POST",ue=p(),z=s("div"),q=s("p"),pe=k("/api/collections/"),Y=s("strong"),Z=k(N),he=k("/auth-refresh"),fe=p(),Q=s("p"),Q.innerHTML="Requires <code>Authorization:TOKEN</code> header",ee=p(),D=s("div"),D.textContent="Query parameters",te=p(),T=s("table"),oe=s("thead"),oe.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',be=p(),F=s("tbody"),C=s("tr"),ae=s("td"),ae.textContent="expand",me=p(),le=s("td"),le.innerHTML='<span class="label">String</span>',_e=p(),f=s("td"),ke=k(`Auto expand record relations. Ex.:
|
||||
`),K(P.$$.fragment),ge=k(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),ve=s("br"),$e=k(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),se=s("code"),se.textContent="expand",ye=k(" property (eg. "),ne=s("code"),ne.textContent='"expand": {"relField1": {...}, ...}',Se=k(`).
|
||||
`),we=s("br"),Te=k(`
|
||||
Only the relations to which the request user has permissions to `),re=s("strong"),re.textContent="view",Ce=k(" will be expanded."),Re=p(),K(A.$$.fragment),ie=p(),H=s("div"),H.textContent="Responses",ce=p(),R=s("div"),L=s("div");for(let e=0;e<y.length;e+=1)y[e].c();Ae=p(),O=s("div");for(let e=0;e<$.length;e+=1)$[e].c();b(a,"class","m-b-sm"),b(h,"class","content txt-lg m-b-sm"),b(M,"class","m-b-xs"),b(x,"class","label label-primary"),b(z,"class","content"),b(Q,"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(L,"class","tabs-header compact combined left"),b(O,"class","tabs-content"),b(R,"class","tabs")},m(e,t){d(e,a,t),o(a,l),o(a,m),o(a,_),d(e,i,t),d(e,h,t),d(e,g,t),W(v,e,t),d(e,w,t),d(e,M,t),d(e,X,t),d(e,S,t),o(S,x),o(S,ue),o(S,z),o(z,q),o(q,pe),o(q,Y),o(Y,Z),o(q,he),o(S,fe),o(S,Q),d(e,ee,t),d(e,D,t),d(e,te,t),d(e,T,t),o(T,oe),o(T,be),o(T,F),o(F,C),o(C,ae),o(C,me),o(C,le),o(C,_e),o(C,f),o(f,ke),W(P,f,null),o(f,ge),o(f,ve),o(f,$e),o(f,se),o(f,ye),o(f,ne),o(f,Se),o(f,we),o(f,Te),o(f,re),o(f,Ce),o(F,Re),W(A,F,null),d(e,ie,t),d(e,H,t),d(e,ce,t),d(e,R,t),o(R,L);for(let c=0;c<y.length;c+=1)y[c]&&y[c].m(L,null);o(R,Ae),o(R,O);for(let c=0;c<$.length;c+=1)$[c]&&$[c].m(O,null);B=!0},p(e,[t]){var He,Le;(!B||t&1)&&n!==(n=e[0].name+"")&&de(m,n);const c={};t&9&&(c.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
const 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
|
||||
console.log(pb.authStore.isValid);
|
||||
console.log(pb.authStore.token);
|
||||
console.log(pb.authStore.record.id);
|
||||
`),t&9&&(c.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
final authData = await pb.collection('${(Le=e[0])==null?void 0:Le.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.record.id);
|
||||
`),v.$set(c),(!B||t&1)&&N!==(N=e[0].name+"")&&de(Z,N),t&6&&(j=J(e[2]),y=Oe(y,t,Me,1,e,j,Pe,L,We,xe,null,Ue)),t&6&&(V=J(e[2]),Ie(),$=Oe($,t,qe,1,e,V,Be,O,Ge,ze,null,Ee),Xe())},i(e){if(!B){E(v.$$.fragment,e),E(P.$$.fragment,e),E(A.$$.fragment,e);for(let t=0;t<V.length;t+=1)E($[t]);B=!0}},o(e){U(v.$$.fragment,e),U(P.$$.fragment,e),U(A.$$.fragment,e);for(let t=0;t<$.length;t+=1)U($[t]);B=!1},d(e){e&&(u(a),u(i),u(h),u(g),u(w),u(M),u(X),u(S),u(ee),u(D),u(te),u(T),u(ie),u(H),u(ce),u(R)),I(v,e),I(P),I(A);for(let t=0;t<y.length;t+=1)y[t].d();for(let t=0;t<$.length;t+=1)$[t].d()}}}function ot(r,a,l){let n,{collection:m}=a,_=200,i=[];const h=g=>l(1,_=g.code);return r.$$set=g=>{"collection"in g&&l(0,m=g.collection)},r.$$.update=()=>{r.$$.dirty&1&&l(2,i=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:Ve.dummyCollectionRecord(m)},null,2)},{code:401,body:`
|
||||
{
|
||||
"code": 401,
|
||||
"message": "The request requires valid record authorization token to be set.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "The authorized record model is not allowed to perform this action.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "Missing auth record context.",
|
||||
"data": {}
|
||||
}
|
||||
`}])},l(3,n=Ve.getApiExampleUrl(Ye.baseURL)),[m,_,i,n,h]}class st extends Qe{constructor(a){super(),je(this,a,ot,tt,Je,{collection:0})}}export{st as default};
|
||||
@@ -1,4 +1,4 @@
|
||||
import{S as Ee,i as Je,s as Ne,N as Le,O as z,e as o,v as k,b as h,c as I,f as p,g as r,h as a,m as K,w as pe,P as Ue,Q as Qe,k as xe,R as ze,n as Ie,t as L,a as E,o as c,d as G,C as Be,A as Ke,q as X,r as Ge}from"./index-Bp3jGQ0J.js";import{S as Xe}from"./SdkTabs-DxNNd6Sw.js";import{F as Ye}from"./FieldsQueryParam-zDO3HzQv.js";function Fe(s,l,n){const i=s.slice();return i[5]=l[n],i}function He(s,l,n){const i=s.slice();return i[5]=l[n],i}function je(s,l){let n,i=l[5].code+"",f,g,d,m;function _(){return l[4](l[5])}return{key:s,first:null,c(){n=o("button"),f=k(i),g=h(),p(n,"class","tab-item"),X(n,"active",l[1]===l[5].code),this.first=n},m(v,O){r(v,n,O),a(n,f),a(n,g),d||(m=Ge(n,"click",_),d=!0)},p(v,O){l=v,O&4&&i!==(i=l[5].code+"")&&pe(f,i),O&6&&X(n,"active",l[1]===l[5].code)},d(v){v&&c(n),d=!1,m()}}}function Ve(s,l){let n,i,f,g;return i=new Le({props:{content:l[5].body}}),{key:s,first:null,c(){n=o("div"),I(i.$$.fragment),f=h(),p(n,"class","tab-item"),X(n,"active",l[1]===l[5].code),this.first=n},m(d,m){r(d,n,m),K(i,n,null),a(n,f),g=!0},p(d,m){l=d;const _={};m&4&&(_.content=l[5].body),i.$set(_),(!g||m&6)&&X(n,"active",l[1]===l[5].code)},i(d){g||(L(i.$$.fragment,d),g=!0)},o(d){E(i.$$.fragment,d),g=!1},d(d){d&&c(n),G(i)}}}function Ze(s){let l,n,i=s[0].name+"",f,g,d,m,_,v,O,P,Y,A,J,me,N,R,be,Z,Q=s[0].name+"",ee,fe,te,M,ae,W,le,U,ne,S,oe,ge,B,y,se,ke,ie,_e,b,ve,C,we,$e,Oe,re,Ae,ce,Se,ye,Te,de,Ce,qe,q,ue,F,he,T,H,$=[],De=new Map,Pe,j,w=[],Re=new Map,D;v=new Xe({props:{js:`
|
||||
import{S as xe,i as Ee,s as Je,Q as Qe,R as je,T as z,e as o,w as k,b as h,c as I,f as p,g as r,h as a,m as K,x as pe,U as Ue,V as Ne,k as ze,W as Ie,n as Ke,t as j,a as x,o as c,d as G,C as Be,p as Ge,r as X,u as Xe}from"./index-B-F-pko3.js";import{F as Ye}from"./FieldsQueryParam-CW6KZfgu.js";function Fe(s,l,n){const i=s.slice();return i[5]=l[n],i}function Le(s,l,n){const i=s.slice();return i[5]=l[n],i}function He(s,l){let n,i=l[5].code+"",f,g,d,b;function _(){return l[4](l[5])}return{key:s,first:null,c(){n=o("button"),f=k(i),g=h(),p(n,"class","tab-item"),X(n,"active",l[1]===l[5].code),this.first=n},m(v,O){r(v,n,O),a(n,f),a(n,g),d||(b=Xe(n,"click",_),d=!0)},p(v,O){l=v,O&4&&i!==(i=l[5].code+"")&&pe(f,i),O&6&&X(n,"active",l[1]===l[5].code)},d(v){v&&c(n),d=!1,b()}}}function Ve(s,l){let n,i,f,g;return i=new je({props:{content:l[5].body}}),{key:s,first:null,c(){n=o("div"),I(i.$$.fragment),f=h(),p(n,"class","tab-item"),X(n,"active",l[1]===l[5].code),this.first=n},m(d,b){r(d,n,b),K(i,n,null),a(n,f),g=!0},p(d,b){l=d;const _={};b&4&&(_.content=l[5].body),i.$set(_),(!g||b&6)&&X(n,"active",l[1]===l[5].code)},i(d){g||(j(i.$$.fragment,d),g=!0)},o(d){x(i.$$.fragment,d),g=!1},d(d){d&&c(n),G(i)}}}function Ze(s){let l,n,i=s[0].name+"",f,g,d,b,_,v,O,D,Y,A,E,be,J,P,me,Z,Q=s[0].name+"",ee,fe,te,M,ae,W,le,U,ne,y,oe,ge,B,S,se,ke,ie,_e,m,ve,C,we,$e,Oe,re,Ae,ce,ye,Se,Te,de,Ce,qe,q,ue,F,he,T,L,$=[],Re=new Map,De,H,w=[],Pe=new Map,R;v=new Qe({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${s[3]}');
|
||||
@@ -16,9 +16,9 @@ import{S as Ee,i as Je,s as Ne,N as Le,O as z,e as o,v as k,b as h,c as I,f as p
|
||||
// after the above you can also access the auth data from the authStore
|
||||
console.log(pb.authStore.isValid);
|
||||
console.log(pb.authStore.token);
|
||||
console.log(pb.authStore.model.id);
|
||||
console.log(pb.authStore.record.id);
|
||||
|
||||
// "logout" the last authenticated model
|
||||
// "logout"
|
||||
pb.authStore.clear();
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
@@ -41,22 +41,22 @@ import{S as Ee,i as Je,s as Ne,N as Le,O as z,e as o,v as k,b as h,c as I,f as p
|
||||
// after the above you can also access the auth data from the authStore
|
||||
print(pb.authStore.isValid);
|
||||
print(pb.authStore.token);
|
||||
print(pb.authStore.model.id);
|
||||
print(pb.authStore.record.id);
|
||||
|
||||
// "logout" the last authenticated model
|
||||
// "logout"
|
||||
pb.authStore.clear();
|
||||
`}}),C=new Le({props:{content:"?expand=relField1,relField2.subRelField"}}),q=new Ye({props:{prefix:"record."}});let x=z(s[2]);const Me=e=>e[5].code;for(let e=0;e<x.length;e+=1){let t=He(s,x,e),u=Me(t);De.set(u,$[e]=je(u,t))}let V=z(s[2]);const We=e=>e[5].code;for(let e=0;e<V.length;e+=1){let t=Fe(s,V,e),u=We(t);Re.set(u,w[e]=Ve(u,t))}return{c(){l=o("h3"),n=k("Auth with OAuth2 ("),f=k(i),g=k(")"),d=h(),m=o("div"),m.innerHTML=`<p>Authenticate with an OAuth2 provider and returns a new auth token and record data.</p> <p>For more details please check the
|
||||
`}}),C=new je({props:{content:"?expand=relField1,relField2.subRelField"}}),q=new Ye({props:{prefix:"record."}});let N=z(s[2]);const Me=e=>e[5].code;for(let e=0;e<N.length;e+=1){let t=Le(s,N,e),u=Me(t);Re.set(u,$[e]=He(u,t))}let V=z(s[2]);const We=e=>e[5].code;for(let e=0;e<V.length;e+=1){let t=Fe(s,V,e),u=We(t);Pe.set(u,w[e]=Ve(u,t))}return{c(){l=o("h3"),n=k("Auth with OAuth2 ("),f=k(i),g=k(")"),d=h(),b=o("div"),b.innerHTML=`<p>Authenticate with an OAuth2 provider and returns a new auth token and record data.</p> <p>For more details please check the
|
||||
<a href="https://pocketbase.io/docs/authentication/#oauth2-integration" target="_blank" rel="noopener noreferrer">OAuth2 integration documentation
|
||||
</a>.</p>`,_=h(),I(v.$$.fragment),O=h(),P=o("h6"),P.textContent="API details",Y=h(),A=o("div"),J=o("strong"),J.textContent="POST",me=h(),N=o("div"),R=o("p"),be=k("/api/collections/"),Z=o("strong"),ee=k(Q),fe=k("/auth-with-oauth2"),te=h(),M=o("div"),M.textContent="Body Parameters",ae=h(),W=o("table"),W.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>provider</span></div></td> <td><span class="label">String</span></td> <td>The name of the OAuth2 client provider (eg. "google").</td></tr> <tr><td><div class="inline-flex"><span class="label label-success">Required</span> <span>code</span></div></td> <td><span class="label">String</span></td> <td>The authorization code returned from the initial request.</td></tr> <tr><td><div class="inline-flex"><span class="label label-success">Required</span> <span>codeVerifier</span></div></td> <td><span class="label">String</span></td> <td>The code verifier sent with the initial request as part of the code_challenge.</td></tr> <tr><td><div class="inline-flex"><span class="label label-success">Required</span> <span>redirectUrl</span></div></td> <td><span class="label">String</span></td> <td>The redirect url sent with the initial request.</td></tr> <tr><td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>createData</span></div></td> <td><span class="label">Object</span></td> <td><p>Optional data that will be used when creating the auth record on OAuth2 sign-up.</p> <p>The created auth record must comply with the same requirements and validations in the
|
||||
</a>.</p>`,_=h(),I(v.$$.fragment),O=h(),D=o("h6"),D.textContent="API details",Y=h(),A=o("div"),E=o("strong"),E.textContent="POST",be=h(),J=o("div"),P=o("p"),me=k("/api/collections/"),Z=o("strong"),ee=k(Q),fe=k("/auth-with-oauth2"),te=h(),M=o("div"),M.textContent="Body Parameters",ae=h(),W=o("table"),W.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>provider</span></div></td> <td><span class="label">String</span></td> <td>The name of the OAuth2 client provider (eg. "google").</td></tr> <tr><td><div class="inline-flex"><span class="label label-success">Required</span> <span>code</span></div></td> <td><span class="label">String</span></td> <td>The authorization code returned from the initial request.</td></tr> <tr><td><div class="inline-flex"><span class="label label-success">Required</span> <span>codeVerifier</span></div></td> <td><span class="label">String</span></td> <td>The code verifier sent with the initial request as part of the code_challenge.</td></tr> <tr><td><div class="inline-flex"><span class="label label-success">Required</span> <span>redirectURL</span></div></td> <td><span class="label">String</span></td> <td>The redirect url sent with the initial request.</td></tr> <tr><td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>createData</span></div></td> <td><span class="label">Object</span></td> <td><p>Optional data that will be used when creating the auth record on OAuth2 sign-up.</p> <p>The created auth record must comply with the same requirements and validations in the
|
||||
regular <strong>create</strong> action.
|
||||
<br/> <em>The data can only be in <code>json</code>, aka. <code>multipart/form-data</code> and files
|
||||
upload currently are not supported during OAuth2 sign-ups.</em></p></td></tr></tbody>`,le=h(),U=o("div"),U.textContent="Query parameters",ne=h(),S=o("table"),oe=o("thead"),oe.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',ge=h(),B=o("tbody"),y=o("tr"),se=o("td"),se.textContent="expand",ke=h(),ie=o("td"),ie.innerHTML='<span class="label">String</span>',_e=h(),b=o("td"),ve=k(`Auto expand record relations. Ex.:
|
||||
upload currently are not supported during OAuth2 sign-ups.</em></p></td></tr></tbody>`,le=h(),U=o("div"),U.textContent="Query parameters",ne=h(),y=o("table"),oe=o("thead"),oe.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',ge=h(),B=o("tbody"),S=o("tr"),se=o("td"),se.textContent="expand",ke=h(),ie=o("td"),ie.innerHTML='<span class="label">String</span>',_e=h(),m=o("td"),ve=k(`Auto expand record relations. Ex.:
|
||||
`),I(C.$$.fragment),we=k(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),$e=o("br"),Oe=k(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),re=o("code"),re.textContent="expand",Ae=k(" property (eg. "),ce=o("code"),ce.textContent='"expand": {"relField1": {...}, ...}',Se=k(`).
|
||||
`),ye=o("br"),Te=k(`
|
||||
Only the relations to which the request user has permissions to `),de=o("strong"),de.textContent="view",Ce=k(" will be expanded."),qe=h(),I(q.$$.fragment),ue=h(),F=o("div"),F.textContent="Responses",he=h(),T=o("div"),H=o("div");for(let e=0;e<$.length;e+=1)$[e].c();Pe=h(),j=o("div");for(let e=0;e<w.length;e+=1)w[e].c();p(l,"class","m-b-sm"),p(m,"class","content txt-lg m-b-sm"),p(P,"class","m-b-xs"),p(J,"class","label label-primary"),p(N,"class","content"),p(A,"class","alert alert-success"),p(M,"class","section-title"),p(W,"class","table-compact table-border m-b-base"),p(U,"class","section-title"),p(S,"class","table-compact table-border m-b-base"),p(F,"class","section-title"),p(H,"class","tabs-header compact combined left"),p(j,"class","tabs-content"),p(T,"class","tabs")},m(e,t){r(e,l,t),a(l,n),a(l,f),a(l,g),r(e,d,t),r(e,m,t),r(e,_,t),K(v,e,t),r(e,O,t),r(e,P,t),r(e,Y,t),r(e,A,t),a(A,J),a(A,me),a(A,N),a(N,R),a(R,be),a(R,Z),a(Z,ee),a(R,fe),r(e,te,t),r(e,M,t),r(e,ae,t),r(e,W,t),r(e,le,t),r(e,U,t),r(e,ne,t),r(e,S,t),a(S,oe),a(S,ge),a(S,B),a(B,y),a(y,se),a(y,ke),a(y,ie),a(y,_e),a(y,b),a(b,ve),K(C,b,null),a(b,we),a(b,$e),a(b,Oe),a(b,re),a(b,Ae),a(b,ce),a(b,Se),a(b,ye),a(b,Te),a(b,de),a(b,Ce),a(B,qe),K(q,B,null),r(e,ue,t),r(e,F,t),r(e,he,t),r(e,T,t),a(T,H);for(let u=0;u<$.length;u+=1)$[u]&&$[u].m(H,null);a(T,Pe),a(T,j);for(let u=0;u<w.length;u+=1)w[u]&&w[u].m(j,null);D=!0},p(e,[t]){(!D||t&1)&&i!==(i=e[0].name+"")&&pe(f,i);const u={};t&9&&(u.js=`
|
||||
`),re=o("code"),re.textContent="expand",Ae=k(" property (eg. "),ce=o("code"),ce.textContent='"expand": {"relField1": {...}, ...}',ye=k(`).
|
||||
`),Se=o("br"),Te=k(`
|
||||
Only the relations to which the request user has permissions to `),de=o("strong"),de.textContent="view",Ce=k(" will be expanded."),qe=h(),I(q.$$.fragment),ue=h(),F=o("div"),F.textContent="Responses",he=h(),T=o("div"),L=o("div");for(let e=0;e<$.length;e+=1)$[e].c();De=h(),H=o("div");for(let e=0;e<w.length;e+=1)w[e].c();p(l,"class","m-b-sm"),p(b,"class","content txt-lg m-b-sm"),p(D,"class","m-b-xs"),p(E,"class","label label-primary"),p(J,"class","content"),p(A,"class","alert alert-success"),p(M,"class","section-title"),p(W,"class","table-compact table-border m-b-base"),p(U,"class","section-title"),p(y,"class","table-compact table-border m-b-base"),p(F,"class","section-title"),p(L,"class","tabs-header compact combined left"),p(H,"class","tabs-content"),p(T,"class","tabs")},m(e,t){r(e,l,t),a(l,n),a(l,f),a(l,g),r(e,d,t),r(e,b,t),r(e,_,t),K(v,e,t),r(e,O,t),r(e,D,t),r(e,Y,t),r(e,A,t),a(A,E),a(A,be),a(A,J),a(J,P),a(P,me),a(P,Z),a(Z,ee),a(P,fe),r(e,te,t),r(e,M,t),r(e,ae,t),r(e,W,t),r(e,le,t),r(e,U,t),r(e,ne,t),r(e,y,t),a(y,oe),a(y,ge),a(y,B),a(B,S),a(S,se),a(S,ke),a(S,ie),a(S,_e),a(S,m),a(m,ve),K(C,m,null),a(m,we),a(m,$e),a(m,Oe),a(m,re),a(m,Ae),a(m,ce),a(m,ye),a(m,Se),a(m,Te),a(m,de),a(m,Ce),a(B,qe),K(q,B,null),r(e,ue,t),r(e,F,t),r(e,he,t),r(e,T,t),a(T,L);for(let u=0;u<$.length;u+=1)$[u]&&$[u].m(L,null);a(T,De),a(T,H);for(let u=0;u<w.length;u+=1)w[u]&&w[u].m(H,null);R=!0},p(e,[t]){(!R||t&1)&&i!==(i=e[0].name+"")&&pe(f,i);const u={};t&9&&(u.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
@@ -74,9 +74,9 @@ import{S as Ee,i as Je,s as Ne,N as Le,O as z,e as o,v as k,b as h,c as I,f as p
|
||||
// after the above you can also access the auth data from the authStore
|
||||
console.log(pb.authStore.isValid);
|
||||
console.log(pb.authStore.token);
|
||||
console.log(pb.authStore.model.id);
|
||||
console.log(pb.authStore.record.id);
|
||||
|
||||
// "logout" the last authenticated model
|
||||
// "logout"
|
||||
pb.authStore.clear();
|
||||
`),t&9&&(u.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
@@ -99,11 +99,11 @@ import{S as Ee,i as Je,s as Ne,N as Le,O as z,e as o,v as k,b as h,c as I,f as p
|
||||
// after the above you can also access the auth data from the authStore
|
||||
print(pb.authStore.isValid);
|
||||
print(pb.authStore.token);
|
||||
print(pb.authStore.model.id);
|
||||
print(pb.authStore.record.id);
|
||||
|
||||
// "logout" the last authenticated model
|
||||
// "logout"
|
||||
pb.authStore.clear();
|
||||
`),v.$set(u),(!D||t&1)&&Q!==(Q=e[0].name+"")&&pe(ee,Q),t&6&&(x=z(e[2]),$=Ue($,t,Me,1,e,x,De,H,Qe,je,null,He)),t&6&&(V=z(e[2]),xe(),w=Ue(w,t,We,1,e,V,Re,j,ze,Ve,null,Fe),Ie())},i(e){if(!D){L(v.$$.fragment,e),L(C.$$.fragment,e),L(q.$$.fragment,e);for(let t=0;t<V.length;t+=1)L(w[t]);D=!0}},o(e){E(v.$$.fragment,e),E(C.$$.fragment,e),E(q.$$.fragment,e);for(let t=0;t<w.length;t+=1)E(w[t]);D=!1},d(e){e&&(c(l),c(d),c(m),c(_),c(O),c(P),c(Y),c(A),c(te),c(M),c(ae),c(W),c(le),c(U),c(ne),c(S),c(ue),c(F),c(he),c(T)),G(v,e),G(C),G(q);for(let t=0;t<$.length;t+=1)$[t].d();for(let t=0;t<w.length;t+=1)w[t].d()}}}function et(s,l,n){let i,{collection:f}=l,g=200,d=[];const m=_=>n(1,g=_.code);return s.$$set=_=>{"collection"in _&&n(0,f=_.collection)},s.$$.update=()=>{s.$$.dirty&1&&n(2,d=[{code:200,body:JSON.stringify({token:"JWT_AUTH_TOKEN",record:Be.dummyCollectionRecord(f),meta:{id:"abc123",name:"John Doe",username:"john.doe",email:"test@example.com",avatarUrl:"https://example.com/avatar.png",accessToken:"...",refreshToken:"...",rawUser:{}}},null,2)},{code:400,body:`
|
||||
`),v.$set(u),(!R||t&1)&&Q!==(Q=e[0].name+"")&&pe(ee,Q),t&6&&(N=z(e[2]),$=Ue($,t,Me,1,e,N,Re,L,Ne,He,null,Le)),t&6&&(V=z(e[2]),ze(),w=Ue(w,t,We,1,e,V,Pe,H,Ie,Ve,null,Fe),Ke())},i(e){if(!R){j(v.$$.fragment,e),j(C.$$.fragment,e),j(q.$$.fragment,e);for(let t=0;t<V.length;t+=1)j(w[t]);R=!0}},o(e){x(v.$$.fragment,e),x(C.$$.fragment,e),x(q.$$.fragment,e);for(let t=0;t<w.length;t+=1)x(w[t]);R=!1},d(e){e&&(c(l),c(d),c(b),c(_),c(O),c(D),c(Y),c(A),c(te),c(M),c(ae),c(W),c(le),c(U),c(ne),c(y),c(ue),c(F),c(he),c(T)),G(v,e),G(C),G(q);for(let t=0;t<$.length;t+=1)$[t].d();for(let t=0;t<w.length;t+=1)w[t].d()}}}function et(s,l,n){let i,{collection:f}=l,g=200,d=[];const b=_=>n(1,g=_.code);return s.$$set=_=>{"collection"in _&&n(0,f=_.collection)},s.$$.update=()=>{s.$$.dirty&1&&n(2,d=[{code:200,body:JSON.stringify({token:"JWT_AUTH_TOKEN",record:Be.dummyCollectionRecord(f),meta:{id:"abc123",name:"John Doe",username:"john.doe",email:"test@example.com",avatarURL:"https://example.com/avatar.png",accessToken:"...",refreshToken:"...",rawUser:{}}},null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "An error occurred while submitting the form.",
|
||||
@@ -114,4 +114,4 @@ import{S as Ee,i as Je,s as Ne,N as Le,O as z,e as o,v as k,b as h,c as I,f as p
|
||||
}
|
||||
}
|
||||
}
|
||||
`}])},n(3,i=Be.getApiExampleUrl(Ke.baseUrl)),[f,g,d,i,m]}class nt extends Ee{constructor(l){super(),Je(this,l,et,Ze,Ne,{collection:0})}}export{nt as default};
|
||||
`}])},n(3,i=Be.getApiExampleUrl(Ge.baseURL)),[f,g,d,i,b]}class lt extends xe{constructor(l){super(),Ee(this,l,et,Ze,Je,{collection:0})}}export{lt as default};
|
||||
@@ -0,0 +1,129 @@
|
||||
import{S as ee,i as te,s as le,T as U,e as p,b as S,w as V,f as g,g as b,h,x as z,U as G,V as ge,k as Z,W as ke,n as x,t as L,a as J,o as _,C as oe,r as Y,u as ae,R as we,c as K,m as Q,d as X,Q as $e,X as se,p as Oe,Y as ne}from"./index-B-F-pko3.js";function ie(s,t,e){const a=s.slice();return a[4]=t[e],a}function ce(s,t,e){const a=s.slice();return a[4]=t[e],a}function re(s,t){let e,a=t[4].code+"",d,c,r,n;function u(){return t[3](t[4])}return{key:s,first:null,c(){e=p("button"),d=V(a),c=S(),g(e,"class","tab-item"),Y(e,"active",t[1]===t[4].code),this.first=e},m(m,q){b(m,e,q),h(e,d),h(e,c),r||(n=ae(e,"click",u),r=!0)},p(m,q){t=m,q&4&&a!==(a=t[4].code+"")&&z(d,a),q&6&&Y(e,"active",t[1]===t[4].code)},d(m){m&&_(e),r=!1,n()}}}function de(s,t){let e,a,d,c;return a=new we({props:{content:t[4].body}}),{key:s,first:null,c(){e=p("div"),K(a.$$.fragment),d=S(),g(e,"class","tab-item"),Y(e,"active",t[1]===t[4].code),this.first=e},m(r,n){b(r,e,n),Q(a,e,null),h(e,d),c=!0},p(r,n){t=r;const u={};n&4&&(u.content=t[4].body),a.$set(u),(!c||n&6)&&Y(e,"active",t[1]===t[4].code)},i(r){c||(L(a.$$.fragment,r),c=!0)},o(r){J(a.$$.fragment,r),c=!1},d(r){r&&_(e),X(a)}}}function Te(s){let t,e,a,d,c,r,n,u=s[0].name+"",m,q,W,C,B,A,H,R,I,y,T,w=[],$=new Map,E,D,k=[],N=new Map,M,i=U(s[2]);const v=l=>l[4].code;for(let l=0;l<i.length;l+=1){let o=ce(s,i,l),f=v(o);$.set(f,w[l]=re(f,o))}let P=U(s[2]);const j=l=>l[4].code;for(let l=0;l<P.length;l+=1){let o=ie(s,P,l),f=j(o);N.set(f,k[l]=de(f,o))}return{c(){t=p("div"),e=p("strong"),e.textContent="POST",a=S(),d=p("div"),c=p("p"),r=V("/api/collections/"),n=p("strong"),m=V(u),q=V("/auth-with-otp"),W=S(),C=p("div"),C.textContent="Body Parameters",B=S(),A=p("table"),A.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>otpId</span></div></td> <td><span class="label">String</span></td> <td>The id of the OTP request.</td></tr> <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 one-time password.</td></tr></tbody>',H=S(),R=p("div"),R.textContent="Responses",I=S(),y=p("div"),T=p("div");for(let l=0;l<w.length;l+=1)w[l].c();E=S(),D=p("div");for(let l=0;l<k.length;l+=1)k[l].c();g(e,"class","label label-primary"),g(d,"class","content"),g(t,"class","alert alert-success"),g(C,"class","section-title"),g(A,"class","table-compact table-border m-b-base"),g(R,"class","section-title"),g(T,"class","tabs-header compact combined left"),g(D,"class","tabs-content"),g(y,"class","tabs")},m(l,o){b(l,t,o),h(t,e),h(t,a),h(t,d),h(d,c),h(c,r),h(c,n),h(n,m),h(c,q),b(l,W,o),b(l,C,o),b(l,B,o),b(l,A,o),b(l,H,o),b(l,R,o),b(l,I,o),b(l,y,o),h(y,T);for(let f=0;f<w.length;f+=1)w[f]&&w[f].m(T,null);h(y,E),h(y,D);for(let f=0;f<k.length;f+=1)k[f]&&k[f].m(D,null);M=!0},p(l,[o]){(!M||o&1)&&u!==(u=l[0].name+"")&&z(m,u),o&6&&(i=U(l[2]),w=G(w,o,v,1,l,i,$,T,ge,re,null,ce)),o&6&&(P=U(l[2]),Z(),k=G(k,o,j,1,l,P,N,D,ke,de,null,ie),x())},i(l){if(!M){for(let o=0;o<P.length;o+=1)L(k[o]);M=!0}},o(l){for(let o=0;o<k.length;o+=1)J(k[o]);M=!1},d(l){l&&(_(t),_(W),_(C),_(B),_(A),_(H),_(R),_(I),_(y));for(let o=0;o<w.length;o+=1)w[o].d();for(let o=0;o<k.length;o+=1)k[o].d()}}}function Pe(s,t,e){let{collection:a}=t,d=200,c=[];const r=n=>e(1,d=n.code);return s.$$set=n=>{"collection"in n&&e(0,a=n.collection)},s.$$.update=()=>{s.$$.dirty&1&&e(2,c=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:oe.dummyCollectionRecord(a)},null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"otpId": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`}])},[a,d,c,r]}class Se extends ee{constructor(t){super(),te(this,t,Pe,Te,le,{collection:0})}}function ue(s,t,e){const a=s.slice();return a[4]=t[e],a}function he(s,t,e){const a=s.slice();return a[4]=t[e],a}function pe(s,t){let e,a=t[4].code+"",d,c,r,n;function u(){return t[3](t[4])}return{key:s,first:null,c(){e=p("button"),d=V(a),c=S(),g(e,"class","tab-item"),Y(e,"active",t[1]===t[4].code),this.first=e},m(m,q){b(m,e,q),h(e,d),h(e,c),r||(n=ae(e,"click",u),r=!0)},p(m,q){t=m,q&4&&a!==(a=t[4].code+"")&&z(d,a),q&6&&Y(e,"active",t[1]===t[4].code)},d(m){m&&_(e),r=!1,n()}}}function fe(s,t){let e,a,d,c;return a=new we({props:{content:t[4].body}}),{key:s,first:null,c(){e=p("div"),K(a.$$.fragment),d=S(),g(e,"class","tab-item"),Y(e,"active",t[1]===t[4].code),this.first=e},m(r,n){b(r,e,n),Q(a,e,null),h(e,d),c=!0},p(r,n){t=r;const u={};n&4&&(u.content=t[4].body),a.$set(u),(!c||n&6)&&Y(e,"active",t[1]===t[4].code)},i(r){c||(L(a.$$.fragment,r),c=!0)},o(r){J(a.$$.fragment,r),c=!1},d(r){r&&_(e),X(a)}}}function ye(s){let t,e,a,d,c,r,n,u=s[0].name+"",m,q,W,C,B,A,H,R,I,y,T,w=[],$=new Map,E,D,k=[],N=new Map,M,i=U(s[2]);const v=l=>l[4].code;for(let l=0;l<i.length;l+=1){let o=he(s,i,l),f=v(o);$.set(f,w[l]=pe(f,o))}let P=U(s[2]);const j=l=>l[4].code;for(let l=0;l<P.length;l+=1){let o=ue(s,P,l),f=j(o);N.set(f,k[l]=fe(f,o))}return{c(){t=p("div"),e=p("strong"),e.textContent="POST",a=S(),d=p("div"),c=p("p"),r=V("/api/collections/"),n=p("strong"),m=V(u),q=V("/request-otp"),W=S(),C=p("div"),C.textContent="Body Parameters",B=S(),A=p("table"),A.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 OTP request (if exists).</td></tr></tbody>',H=S(),R=p("div"),R.textContent="Responses",I=S(),y=p("div"),T=p("div");for(let l=0;l<w.length;l+=1)w[l].c();E=S(),D=p("div");for(let l=0;l<k.length;l+=1)k[l].c();g(e,"class","label label-primary"),g(d,"class","content"),g(t,"class","alert alert-success"),g(C,"class","section-title"),g(A,"class","table-compact table-border m-b-base"),g(R,"class","section-title"),g(T,"class","tabs-header compact combined left"),g(D,"class","tabs-content"),g(y,"class","tabs")},m(l,o){b(l,t,o),h(t,e),h(t,a),h(t,d),h(d,c),h(c,r),h(c,n),h(n,m),h(c,q),b(l,W,o),b(l,C,o),b(l,B,o),b(l,A,o),b(l,H,o),b(l,R,o),b(l,I,o),b(l,y,o),h(y,T);for(let f=0;f<w.length;f+=1)w[f]&&w[f].m(T,null);h(y,E),h(y,D);for(let f=0;f<k.length;f+=1)k[f]&&k[f].m(D,null);M=!0},p(l,[o]){(!M||o&1)&&u!==(u=l[0].name+"")&&z(m,u),o&6&&(i=U(l[2]),w=G(w,o,v,1,l,i,$,T,ge,pe,null,he)),o&6&&(P=U(l[2]),Z(),k=G(k,o,j,1,l,P,N,D,ke,fe,null,ue),x())},i(l){if(!M){for(let o=0;o<P.length;o+=1)L(k[o]);M=!0}},o(l){for(let o=0;o<k.length;o+=1)J(k[o]);M=!1},d(l){l&&(_(t),_(W),_(C),_(B),_(A),_(H),_(R),_(I),_(y));for(let o=0;o<w.length;o+=1)w[o].d();for(let o=0;o<k.length;o+=1)k[o].d()}}}function qe(s,t,e){let{collection:a}=t,d=200,c=[];const r=n=>e(1,d=n.code);return s.$$set=n=>{"collection"in n&&e(0,a=n.collection)},e(2,c=[{code:200,body:JSON.stringify({otpId:oe.randomString(15)},null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "An error occurred while validating the submitted data.",
|
||||
"data": {
|
||||
"email": {
|
||||
"code": "validation_is_email",
|
||||
"message": "Must be a valid email address."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:429,body:`
|
||||
{
|
||||
"code": 429,
|
||||
"message": "You've send too many OTP requests, please try again later.",
|
||||
"data": {}
|
||||
}
|
||||
`}]),[a,d,c,r]}class Ae extends ee{constructor(t){super(),te(this,t,qe,ye,le,{collection:0})}}function me(s,t,e){const a=s.slice();return a[5]=t[e],a[7]=e,a}function be(s,t,e){const a=s.slice();return a[5]=t[e],a[7]=e,a}function _e(s){let t,e,a,d,c;function r(){return s[4](s[7])}return{c(){t=p("button"),e=p("div"),e.textContent=`${s[5].title}`,a=S(),g(e,"class","txt"),g(t,"class","tab-item"),Y(t,"active",s[1]==s[7])},m(n,u){b(n,t,u),h(t,e),h(t,a),d||(c=ae(t,"click",r),d=!0)},p(n,u){s=n,u&2&&Y(t,"active",s[1]==s[7])},d(n){n&&_(t),d=!1,c()}}}function ve(s){let t,e,a,d;var c=s[5].component;function r(n,u){return{props:{collection:n[0]}}}return c&&(e=ne(c,r(s))),{c(){t=p("div"),e&&K(e.$$.fragment),a=S(),g(t,"class","tab-item"),Y(t,"active",s[1]==s[7])},m(n,u){b(n,t,u),e&&Q(e,t,null),h(t,a),d=!0},p(n,u){if(c!==(c=n[5].component)){if(e){Z();const m=e;J(m.$$.fragment,1,0,()=>{X(m,1)}),x()}c?(e=ne(c,r(n)),K(e.$$.fragment),L(e.$$.fragment,1),Q(e,t,a)):e=null}else if(c){const m={};u&1&&(m.collection=n[0]),e.$set(m)}(!d||u&2)&&Y(t,"active",n[1]==n[7])},i(n){d||(e&&L(e.$$.fragment,n),d=!0)},o(n){e&&J(e.$$.fragment,n),d=!1},d(n){n&&_(t),e&&X(e)}}}function Re(s){var D,k,N,M;let t,e,a=s[0].name+"",d,c,r,n,u,m,q,W,C,B,A,H,R,I;m=new $e({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${s[2]}');
|
||||
|
||||
...
|
||||
|
||||
// send OTP email to the provided auth record
|
||||
const req = await pb.collection('${(D=s[0])==null?void 0:D.name}').requestOtp('test@example.com');
|
||||
|
||||
// ... show a screen/popup to enter the password from the email ...
|
||||
|
||||
// authenticate with the requested OTP id and the email password
|
||||
const authData = await pb.collection('${(k=s[0])==null?void 0:k.name}').authWithOtp(
|
||||
req.otpId,
|
||||
"YOUR_OTP",
|
||||
);
|
||||
|
||||
// after the above you can also access the auth data from the authStore
|
||||
console.log(pb.authStore.isValid);
|
||||
console.log(pb.authStore.token);
|
||||
console.log(pb.authStore.record.id);
|
||||
|
||||
// "logout"
|
||||
pb.authStore.clear();
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${s[2]}');
|
||||
|
||||
...
|
||||
|
||||
// send OTP email to the provided auth record
|
||||
final req = await pb.collection('${(N=s[0])==null?void 0:N.name}').requestOtp('test@example.com');
|
||||
|
||||
// ... show a screen/popup to enter the password from the email ...
|
||||
|
||||
// authenticate with the requested OTP id and the email password
|
||||
final authData = await pb.collection('${(M=s[0])==null?void 0:M.name}').authWithOtp(
|
||||
req.otpId,
|
||||
"YOUR_OTP",
|
||||
);
|
||||
|
||||
// after the above you can also access the auth data from the authStore
|
||||
print(pb.authStore.isValid);
|
||||
print(pb.authStore.token);
|
||||
print(pb.authStore.record.id);
|
||||
|
||||
// "logout"
|
||||
pb.authStore.clear();
|
||||
`}});let y=U(s[3]),T=[];for(let i=0;i<y.length;i+=1)T[i]=_e(be(s,y,i));let w=U(s[3]),$=[];for(let i=0;i<w.length;i+=1)$[i]=ve(me(s,w,i));const E=i=>J($[i],1,1,()=>{$[i]=null});return{c(){t=p("h3"),e=V("Auth with OTP ("),d=V(a),c=V(")"),r=S(),n=p("div"),n.innerHTML="<p>Authenticate with an one-time password (OTP).</p>",u=S(),K(m.$$.fragment),q=S(),W=p("h6"),W.textContent="API details",C=S(),B=p("div"),A=p("div");for(let i=0;i<T.length;i+=1)T[i].c();H=S(),R=p("div");for(let i=0;i<$.length;i+=1)$[i].c();g(t,"class","m-b-sm"),g(n,"class","content txt-lg m-b-sm"),g(W,"class","m-b-xs"),g(A,"class","tabs-header compact"),g(R,"class","tabs-content"),g(B,"class","tabs")},m(i,v){b(i,t,v),h(t,e),h(t,d),h(t,c),b(i,r,v),b(i,n,v),b(i,u,v),Q(m,i,v),b(i,q,v),b(i,W,v),b(i,C,v),b(i,B,v),h(B,A);for(let P=0;P<T.length;P+=1)T[P]&&T[P].m(A,null);h(B,H),h(B,R);for(let P=0;P<$.length;P+=1)$[P]&&$[P].m(R,null);I=!0},p(i,[v]){var j,l,o,f;(!I||v&1)&&a!==(a=i[0].name+"")&&z(d,a);const P={};if(v&5&&(P.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${i[2]}');
|
||||
|
||||
...
|
||||
|
||||
// send OTP email to the provided auth record
|
||||
const req = await pb.collection('${(j=i[0])==null?void 0:j.name}').requestOtp('test@example.com');
|
||||
|
||||
// ... show a screen/popup to enter the password from the email ...
|
||||
|
||||
// authenticate with the requested OTP id and the email password
|
||||
const authData = await pb.collection('${(l=i[0])==null?void 0:l.name}').authWithOtp(
|
||||
req.otpId,
|
||||
"YOUR_OTP",
|
||||
);
|
||||
|
||||
// after the above you can also access the auth data from the authStore
|
||||
console.log(pb.authStore.isValid);
|
||||
console.log(pb.authStore.token);
|
||||
console.log(pb.authStore.record.id);
|
||||
|
||||
// "logout"
|
||||
pb.authStore.clear();
|
||||
`),v&5&&(P.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${i[2]}');
|
||||
|
||||
...
|
||||
|
||||
// send OTP email to the provided auth record
|
||||
final req = await pb.collection('${(o=i[0])==null?void 0:o.name}').requestOtp('test@example.com');
|
||||
|
||||
// ... show a screen/popup to enter the password from the email ...
|
||||
|
||||
// authenticate with the requested OTP id and the email password
|
||||
final authData = await pb.collection('${(f=i[0])==null?void 0:f.name}').authWithOtp(
|
||||
req.otpId,
|
||||
"YOUR_OTP",
|
||||
);
|
||||
|
||||
// after the above you can also access the auth data from the authStore
|
||||
print(pb.authStore.isValid);
|
||||
print(pb.authStore.token);
|
||||
print(pb.authStore.record.id);
|
||||
|
||||
// "logout"
|
||||
pb.authStore.clear();
|
||||
`),m.$set(P),v&10){y=U(i[3]);let O;for(O=0;O<y.length;O+=1){const F=be(i,y,O);T[O]?T[O].p(F,v):(T[O]=_e(F),T[O].c(),T[O].m(A,null))}for(;O<T.length;O+=1)T[O].d(1);T.length=y.length}if(v&11){w=U(i[3]);let O;for(O=0;O<w.length;O+=1){const F=me(i,w,O);$[O]?($[O].p(F,v),L($[O],1)):($[O]=ve(F),$[O].c(),L($[O],1),$[O].m(R,null))}for(Z(),O=w.length;O<$.length;O+=1)E(O);x()}},i(i){if(!I){L(m.$$.fragment,i);for(let v=0;v<w.length;v+=1)L($[v]);I=!0}},o(i){J(m.$$.fragment,i),$=$.filter(Boolean);for(let v=0;v<$.length;v+=1)J($[v]);I=!1},d(i){i&&(_(t),_(r),_(n),_(u),_(q),_(W),_(C),_(B)),X(m,i),se(T,i),se($,i)}}}function Ce(s,t,e){let a,{collection:d}=t;const c=[{title:"OTP Request",component:Ae},{title:"OTP Auth",component:Se}];let r=0;const n=u=>e(1,r=u);return s.$$set=u=>{"collection"in u&&e(0,d=u.collection)},e(2,a=oe.getApiExampleUrl(Oe.baseURL)),[d,r,a,c,n]}class De extends ee{constructor(t){super(),te(this,t,Ce,Re,le,{collection:0})}}export{De as default};
|
||||
@@ -1,98 +0,0 @@
|
||||
import{S as wt,i as yt,s as $t,N as vt,O as oe,e as n,v as p,b as d,c as ne,f as m,g as r,h as t,m as se,w as De,P as pt,Q as Pt,k as Rt,R as At,n as Ct,t as Z,a as x,o as c,d as ie,C as ft,A as Ot,q as re,r as Tt}from"./index-Bp3jGQ0J.js";import{S as Ut}from"./SdkTabs-DxNNd6Sw.js";import{F as Mt}from"./FieldsQueryParam-zDO3HzQv.js";function ht(s,l,a){const i=s.slice();return i[8]=l[a],i}function bt(s,l,a){const i=s.slice();return i[8]=l[a],i}function Dt(s){let l;return{c(){l=p("email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function Et(s){let l;return{c(){l=p("username")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function Wt(s){let l;return{c(){l=p("username/email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function mt(s){let l;return{c(){l=n("strong"),l.textContent="username"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function _t(s){let l;return{c(){l=p("or")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function kt(s){let l;return{c(){l=n("strong"),l.textContent="email"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function gt(s,l){let a,i=l[8].code+"",g,b,f,u;function _(){return l[7](l[8])}return{key:s,first:null,c(){a=n("button"),g=p(i),b=d(),m(a,"class","tab-item"),re(a,"active",l[3]===l[8].code),this.first=a},m(R,A){r(R,a,A),t(a,g),t(a,b),f||(u=Tt(a,"click",_),f=!0)},p(R,A){l=R,A&16&&i!==(i=l[8].code+"")&&De(g,i),A&24&&re(a,"active",l[3]===l[8].code)},d(R){R&&c(a),f=!1,u()}}}function St(s,l){let a,i,g,b;return i=new vt({props:{content:l[8].body}}),{key:s,first:null,c(){a=n("div"),ne(i.$$.fragment),g=d(),m(a,"class","tab-item"),re(a,"active",l[3]===l[8].code),this.first=a},m(f,u){r(f,a,u),se(i,a,null),t(a,g),b=!0},p(f,u){l=f;const _={};u&16&&(_.content=l[8].body),i.$set(_),(!b||u&24)&&re(a,"active",l[3]===l[8].code)},i(f){b||(Z(i.$$.fragment,f),b=!0)},o(f){x(i.$$.fragment,f),b=!1},d(f){f&&c(a),ie(i)}}}function Lt(s){var rt,ct;let l,a,i=s[0].name+"",g,b,f,u,_,R,A,C,q,Ee,ce,T,de,N,ue,U,ee,We,te,I,Le,pe,le=s[0].name+"",fe,qe,he,V,be,M,me,Be,Q,D,_e,Fe,ke,He,$,Ye,ge,Se,ve,Ne,we,ye,j,$e,E,Pe,Ie,J,W,Re,Ve,Ae,Qe,k,je,B,Je,Ke,ze,Ce,Ge,Oe,Xe,Ze,xe,Te,et,tt,F,Ue,K,Me,L,z,O=[],lt=new Map,at,G,S=[],ot=new Map,H;function nt(e,o){if(e[1]&&e[2])return Wt;if(e[1])return Et;if(e[2])return Dt}let Y=nt(s),P=Y&&Y(s);T=new Ut({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${s[6]}');
|
||||
|
||||
...
|
||||
|
||||
const authData = await pb.collection('${(rt=s[0])==null?void 0:rt.name}').authWithPassword(
|
||||
'${s[5]}',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
|
||||
// after the above you can also access the auth data from the authStore
|
||||
console.log(pb.authStore.isValid);
|
||||
console.log(pb.authStore.token);
|
||||
console.log(pb.authStore.model.id);
|
||||
|
||||
// "logout" the last authenticated account
|
||||
pb.authStore.clear();
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${s[6]}');
|
||||
|
||||
...
|
||||
|
||||
final authData = await pb.collection('${(ct=s[0])==null?void 0:ct.name}').authWithPassword(
|
||||
'${s[5]}',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
|
||||
// after the above you can also access the auth data from the authStore
|
||||
print(pb.authStore.isValid);
|
||||
print(pb.authStore.token);
|
||||
print(pb.authStore.model.id);
|
||||
|
||||
// "logout" the last authenticated account
|
||||
pb.authStore.clear();
|
||||
`}});let v=s[1]&&mt(),w=s[1]&&s[2]&&_t(),y=s[2]&&kt();B=new vt({props:{content:"?expand=relField1,relField2.subRelField"}}),F=new Mt({props:{prefix:"record."}});let ae=oe(s[4]);const st=e=>e[8].code;for(let e=0;e<ae.length;e+=1){let o=bt(s,ae,e),h=st(o);lt.set(h,O[e]=gt(h,o))}let X=oe(s[4]);const it=e=>e[8].code;for(let e=0;e<X.length;e+=1){let o=ht(s,X,e),h=it(o);ot.set(h,S[e]=St(h,o))}return{c(){l=n("h3"),a=p("Auth with password ("),g=p(i),b=p(")"),f=d(),u=n("div"),_=n("p"),R=p(`Returns new auth token and account data by a combination of
|
||||
`),A=n("strong"),P&&P.c(),C=p(`
|
||||
and `),q=n("strong"),q.textContent="password",Ee=p("."),ce=d(),ne(T.$$.fragment),de=d(),N=n("h6"),N.textContent="API details",ue=d(),U=n("div"),ee=n("strong"),ee.textContent="POST",We=d(),te=n("div"),I=n("p"),Le=p("/api/collections/"),pe=n("strong"),fe=p(le),qe=p("/auth-with-password"),he=d(),V=n("div"),V.textContent="Body Parameters",be=d(),M=n("table"),me=n("thead"),me.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="50%">Description</th></tr>',Be=d(),Q=n("tbody"),D=n("tr"),_e=n("td"),_e.innerHTML='<div class="inline-flex"><span class="label label-success">Required</span> <span>identity</span></div>',Fe=d(),ke=n("td"),ke.innerHTML='<span class="label">String</span>',He=d(),$=n("td"),Ye=p(`The
|
||||
`),v&&v.c(),ge=d(),w&&w.c(),Se=d(),y&&y.c(),ve=p(`
|
||||
of the record to authenticate.`),Ne=d(),we=n("tr"),we.innerHTML='<td><div class="inline-flex"><span class="label label-success">Required</span> <span>password</span></div></td> <td><span class="label">String</span></td> <td>The auth record password.</td>',ye=d(),j=n("div"),j.textContent="Query parameters",$e=d(),E=n("table"),Pe=n("thead"),Pe.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',Ie=d(),J=n("tbody"),W=n("tr"),Re=n("td"),Re.textContent="expand",Ve=d(),Ae=n("td"),Ae.innerHTML='<span class="label">String</span>',Qe=d(),k=n("td"),je=p(`Auto expand record relations. Ex.:
|
||||
`),ne(B.$$.fragment),Je=p(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Ke=n("br"),ze=p(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),Ce=n("code"),Ce.textContent="expand",Ge=p(" property (eg. "),Oe=n("code"),Oe.textContent='"expand": {"relField1": {...}, ...}',Xe=p(`).
|
||||
`),Ze=n("br"),xe=p(`
|
||||
Only the relations to which the request user has permissions to `),Te=n("strong"),Te.textContent="view",et=p(" will be expanded."),tt=d(),ne(F.$$.fragment),Ue=d(),K=n("div"),K.textContent="Responses",Me=d(),L=n("div"),z=n("div");for(let e=0;e<O.length;e+=1)O[e].c();at=d(),G=n("div");for(let e=0;e<S.length;e+=1)S[e].c();m(l,"class","m-b-sm"),m(u,"class","content txt-lg m-b-sm"),m(N,"class","m-b-xs"),m(ee,"class","label label-primary"),m(te,"class","content"),m(U,"class","alert alert-success"),m(V,"class","section-title"),m(M,"class","table-compact table-border m-b-base"),m(j,"class","section-title"),m(E,"class","table-compact table-border m-b-base"),m(K,"class","section-title"),m(z,"class","tabs-header compact combined left"),m(G,"class","tabs-content"),m(L,"class","tabs")},m(e,o){r(e,l,o),t(l,a),t(l,g),t(l,b),r(e,f,o),r(e,u,o),t(u,_),t(_,R),t(_,A),P&&P.m(A,null),t(_,C),t(_,q),t(_,Ee),r(e,ce,o),se(T,e,o),r(e,de,o),r(e,N,o),r(e,ue,o),r(e,U,o),t(U,ee),t(U,We),t(U,te),t(te,I),t(I,Le),t(I,pe),t(pe,fe),t(I,qe),r(e,he,o),r(e,V,o),r(e,be,o),r(e,M,o),t(M,me),t(M,Be),t(M,Q),t(Q,D),t(D,_e),t(D,Fe),t(D,ke),t(D,He),t(D,$),t($,Ye),v&&v.m($,null),t($,ge),w&&w.m($,null),t($,Se),y&&y.m($,null),t($,ve),t(Q,Ne),t(Q,we),r(e,ye,o),r(e,j,o),r(e,$e,o),r(e,E,o),t(E,Pe),t(E,Ie),t(E,J),t(J,W),t(W,Re),t(W,Ve),t(W,Ae),t(W,Qe),t(W,k),t(k,je),se(B,k,null),t(k,Je),t(k,Ke),t(k,ze),t(k,Ce),t(k,Ge),t(k,Oe),t(k,Xe),t(k,Ze),t(k,xe),t(k,Te),t(k,et),t(J,tt),se(F,J,null),r(e,Ue,o),r(e,K,o),r(e,Me,o),r(e,L,o),t(L,z);for(let h=0;h<O.length;h+=1)O[h]&&O[h].m(z,null);t(L,at),t(L,G);for(let h=0;h<S.length;h+=1)S[h]&&S[h].m(G,null);H=!0},p(e,[o]){var dt,ut;(!H||o&1)&&i!==(i=e[0].name+"")&&De(g,i),Y!==(Y=nt(e))&&(P&&P.d(1),P=Y&&Y(e),P&&(P.c(),P.m(A,null)));const h={};o&97&&(h.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[6]}');
|
||||
|
||||
...
|
||||
|
||||
const authData = await pb.collection('${(dt=e[0])==null?void 0:dt.name}').authWithPassword(
|
||||
'${e[5]}',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
|
||||
// after the above you can also access the auth data from the authStore
|
||||
console.log(pb.authStore.isValid);
|
||||
console.log(pb.authStore.token);
|
||||
console.log(pb.authStore.model.id);
|
||||
|
||||
// "logout" the last authenticated account
|
||||
pb.authStore.clear();
|
||||
`),o&97&&(h.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[6]}');
|
||||
|
||||
...
|
||||
|
||||
final authData = await pb.collection('${(ut=e[0])==null?void 0:ut.name}').authWithPassword(
|
||||
'${e[5]}',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
|
||||
// after the above you can also access the auth data from the authStore
|
||||
print(pb.authStore.isValid);
|
||||
print(pb.authStore.token);
|
||||
print(pb.authStore.model.id);
|
||||
|
||||
// "logout" the last authenticated account
|
||||
pb.authStore.clear();
|
||||
`),T.$set(h),(!H||o&1)&&le!==(le=e[0].name+"")&&De(fe,le),e[1]?v||(v=mt(),v.c(),v.m($,ge)):v&&(v.d(1),v=null),e[1]&&e[2]?w||(w=_t(),w.c(),w.m($,Se)):w&&(w.d(1),w=null),e[2]?y||(y=kt(),y.c(),y.m($,ve)):y&&(y.d(1),y=null),o&24&&(ae=oe(e[4]),O=pt(O,o,st,1,e,ae,lt,z,Pt,gt,null,bt)),o&24&&(X=oe(e[4]),Rt(),S=pt(S,o,it,1,e,X,ot,G,At,St,null,ht),Ct())},i(e){if(!H){Z(T.$$.fragment,e),Z(B.$$.fragment,e),Z(F.$$.fragment,e);for(let o=0;o<X.length;o+=1)Z(S[o]);H=!0}},o(e){x(T.$$.fragment,e),x(B.$$.fragment,e),x(F.$$.fragment,e);for(let o=0;o<S.length;o+=1)x(S[o]);H=!1},d(e){e&&(c(l),c(f),c(u),c(ce),c(de),c(N),c(ue),c(U),c(he),c(V),c(be),c(M),c(ye),c(j),c($e),c(E),c(Ue),c(K),c(Me),c(L)),P&&P.d(),ie(T,e),v&&v.d(),w&&w.d(),y&&y.d(),ie(B),ie(F);for(let o=0;o<O.length;o+=1)O[o].d();for(let o=0;o<S.length;o+=1)S[o].d()}}}function qt(s,l,a){let i,g,b,f,{collection:u}=l,_=200,R=[];const A=C=>a(3,_=C.code);return s.$$set=C=>{"collection"in C&&a(0,u=C.collection)},s.$$.update=()=>{var C,q;s.$$.dirty&1&&a(2,g=(C=u==null?void 0:u.options)==null?void 0:C.allowEmailAuth),s.$$.dirty&1&&a(1,b=(q=u==null?void 0:u.options)==null?void 0:q.allowUsernameAuth),s.$$.dirty&6&&a(5,f=b&&g?"YOUR_USERNAME_OR_EMAIL":b?"YOUR_USERNAME":"YOUR_EMAIL"),s.$$.dirty&1&&a(4,R=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:ft.dummyCollectionRecord(u)},null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"identity": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`}])},a(6,i=ft.getApiExampleUrl(Ot.baseUrl)),[u,b,g,_,R,f,i,A]}class Yt extends wt{constructor(l){super(),yt(this,l,qt,Lt,$t,{collection:0})}}export{Yt as default};
|
||||
@@ -0,0 +1,96 @@
|
||||
import{S as kt,i as gt,s as vt,Q as St,T as L,R as _t,e as s,w as f,b as u,c as ae,f as k,g as c,h as t,m as oe,x as G,U as ct,V as wt,k as yt,W as $t,n as Pt,t as X,a as z,o as d,d as se,X as Rt,C as dt,p as Ct,r as ne,u as Tt}from"./index-B-F-pko3.js";import{F as Ot}from"./FieldsQueryParam-CW6KZfgu.js";function pt(i,o,a){const n=i.slice();return n[7]=o[a],n}function ut(i,o,a){const n=i.slice();return n[7]=o[a],n}function ht(i,o,a){const n=i.slice();return n[12]=o[a],n[14]=a,n}function At(i){let o;return{c(){o=f("or")},m(a,n){c(a,o,n)},d(a){a&&d(o)}}}function bt(i){let o,a,n=i[12]+"",m,b=i[14]>0&&At();return{c(){b&&b.c(),o=u(),a=s("strong"),m=f(n)},m(r,h){b&&b.m(r,h),c(r,o,h),c(r,a,h),t(a,m)},p(r,h){h&2&&n!==(n=r[12]+"")&&G(m,n)},d(r){r&&(d(o),d(a)),b&&b.d(r)}}}function ft(i,o){let a,n=o[7].code+"",m,b,r,h;function g(){return o[6](o[7])}return{key:i,first:null,c(){a=s("button"),m=f(n),b=u(),k(a,"class","tab-item"),ne(a,"active",o[2]===o[7].code),this.first=a},m($,_){c($,a,_),t(a,m),t(a,b),r||(h=Tt(a,"click",g),r=!0)},p($,_){o=$,_&8&&n!==(n=o[7].code+"")&&G(m,n),_&12&&ne(a,"active",o[2]===o[7].code)},d($){$&&d(a),r=!1,h()}}}function mt(i,o){let a,n,m,b;return n=new _t({props:{content:o[7].body}}),{key:i,first:null,c(){a=s("div"),ae(n.$$.fragment),m=u(),k(a,"class","tab-item"),ne(a,"active",o[2]===o[7].code),this.first=a},m(r,h){c(r,a,h),oe(n,a,null),t(a,m),b=!0},p(r,h){o=r;const g={};h&8&&(g.content=o[7].body),n.$set(g),(!b||h&12)&&ne(a,"active",o[2]===o[7].code)},i(r){b||(X(n.$$.fragment,r),b=!0)},o(r){z(n.$$.fragment,r),b=!1},d(r){r&&d(a),se(n)}}}function Dt(i){var ot,st;let o,a,n=i[0].name+"",m,b,r,h,g,$,_,Z=i[1].join("/")+"",ie,De,re,We,ce,R,de,q,pe,C,x,Ue,ee,H,Fe,ue,te=i[0].name+"",he,Me,be,j,fe,T,me,Be,V,O,_e,Le,ke,qe,Y,ge,He,ve,Se,E,we,A,ye,je,N,D,$e,Ve,Pe,Ye,v,Ee,F,Ne,Qe,Ie,Re,Je,Ce,Ke,Xe,ze,Te,Ge,Ze,M,Oe,Q,Ae,W,I,P=[],xe=new Map,et,J,w=[],tt=new Map,U;R=new St({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${i[5]}');
|
||||
|
||||
...
|
||||
|
||||
const authData = await pb.collection('${(ot=i[0])==null?void 0:ot.name}').authWithPassword(
|
||||
'${i[4]}',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
|
||||
// after the above you can also access the auth data from the authStore
|
||||
console.log(pb.authStore.isValid);
|
||||
console.log(pb.authStore.token);
|
||||
console.log(pb.authStore.record.id);
|
||||
|
||||
// "logout"
|
||||
pb.authStore.clear();
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${i[5]}');
|
||||
|
||||
...
|
||||
|
||||
final authData = await pb.collection('${(st=i[0])==null?void 0:st.name}').authWithPassword(
|
||||
'${i[4]}',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
|
||||
// after the above you can also access the auth data from the authStore
|
||||
print(pb.authStore.isValid);
|
||||
print(pb.authStore.token);
|
||||
print(pb.authStore.record.id);
|
||||
|
||||
// "logout"
|
||||
pb.authStore.clear();
|
||||
`}});let B=L(i[1]),S=[];for(let e=0;e<B.length;e+=1)S[e]=bt(ht(i,B,e));F=new _t({props:{content:"?expand=relField1,relField2.subRelField"}}),M=new Ot({props:{prefix:"record."}});let le=L(i[3]);const lt=e=>e[7].code;for(let e=0;e<le.length;e+=1){let l=ut(i,le,e),p=lt(l);xe.set(p,P[e]=ft(p,l))}let K=L(i[3]);const at=e=>e[7].code;for(let e=0;e<K.length;e+=1){let l=pt(i,K,e),p=at(l);tt.set(p,w[e]=mt(p,l))}return{c(){o=s("h3"),a=f("Auth with password ("),m=f(n),b=f(")"),r=u(),h=s("div"),g=s("p"),$=f(`Authenticate with combination of
|
||||
`),_=s("strong"),ie=f(Z),De=f(" and "),re=s("strong"),re.textContent="password",We=f("."),ce=u(),ae(R.$$.fragment),de=u(),q=s("h6"),q.textContent="API details",pe=u(),C=s("div"),x=s("strong"),x.textContent="POST",Ue=u(),ee=s("div"),H=s("p"),Fe=f("/api/collections/"),ue=s("strong"),he=f(te),Me=f("/auth-with-password"),be=u(),j=s("div"),j.textContent="Body Parameters",fe=u(),T=s("table"),me=s("thead"),me.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="50%">Description</th></tr>',Be=u(),V=s("tbody"),O=s("tr"),_e=s("td"),_e.innerHTML='<div class="inline-flex"><span class="label label-success">Required</span> <span>identity</span></div>',Le=u(),ke=s("td"),ke.innerHTML='<span class="label">String</span>',qe=u(),Y=s("td");for(let e=0;e<S.length;e+=1)S[e].c();ge=f(`
|
||||
of the record to authenticate.`),He=u(),ve=s("tr"),ve.innerHTML='<td><div class="inline-flex"><span class="label label-success">Required</span> <span>password</span></div></td> <td><span class="label">String</span></td> <td>The auth record password.</td>',Se=u(),E=s("div"),E.textContent="Query parameters",we=u(),A=s("table"),ye=s("thead"),ye.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',je=u(),N=s("tbody"),D=s("tr"),$e=s("td"),$e.textContent="expand",Ve=u(),Pe=s("td"),Pe.innerHTML='<span class="label">String</span>',Ye=u(),v=s("td"),Ee=f(`Auto expand record relations. Ex.:
|
||||
`),ae(F.$$.fragment),Ne=f(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Qe=s("br"),Ie=f(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),Re=s("code"),Re.textContent="expand",Je=f(" property (eg. "),Ce=s("code"),Ce.textContent='"expand": {"relField1": {...}, ...}',Ke=f(`).
|
||||
`),Xe=s("br"),ze=f(`
|
||||
Only the relations to which the request user has permissions to `),Te=s("strong"),Te.textContent="view",Ge=f(" will be expanded."),Ze=u(),ae(M.$$.fragment),Oe=u(),Q=s("div"),Q.textContent="Responses",Ae=u(),W=s("div"),I=s("div");for(let e=0;e<P.length;e+=1)P[e].c();et=u(),J=s("div");for(let e=0;e<w.length;e+=1)w[e].c();k(o,"class","m-b-sm"),k(h,"class","content txt-lg m-b-sm"),k(q,"class","m-b-xs"),k(x,"class","label label-primary"),k(ee,"class","content"),k(C,"class","alert alert-success"),k(j,"class","section-title"),k(T,"class","table-compact table-border m-b-base"),k(E,"class","section-title"),k(A,"class","table-compact table-border m-b-base"),k(Q,"class","section-title"),k(I,"class","tabs-header compact combined left"),k(J,"class","tabs-content"),k(W,"class","tabs")},m(e,l){c(e,o,l),t(o,a),t(o,m),t(o,b),c(e,r,l),c(e,h,l),t(h,g),t(g,$),t(g,_),t(_,ie),t(g,De),t(g,re),t(g,We),c(e,ce,l),oe(R,e,l),c(e,de,l),c(e,q,l),c(e,pe,l),c(e,C,l),t(C,x),t(C,Ue),t(C,ee),t(ee,H),t(H,Fe),t(H,ue),t(ue,he),t(H,Me),c(e,be,l),c(e,j,l),c(e,fe,l),c(e,T,l),t(T,me),t(T,Be),t(T,V),t(V,O),t(O,_e),t(O,Le),t(O,ke),t(O,qe),t(O,Y);for(let p=0;p<S.length;p+=1)S[p]&&S[p].m(Y,null);t(Y,ge),t(V,He),t(V,ve),c(e,Se,l),c(e,E,l),c(e,we,l),c(e,A,l),t(A,ye),t(A,je),t(A,N),t(N,D),t(D,$e),t(D,Ve),t(D,Pe),t(D,Ye),t(D,v),t(v,Ee),oe(F,v,null),t(v,Ne),t(v,Qe),t(v,Ie),t(v,Re),t(v,Je),t(v,Ce),t(v,Ke),t(v,Xe),t(v,ze),t(v,Te),t(v,Ge),t(N,Ze),oe(M,N,null),c(e,Oe,l),c(e,Q,l),c(e,Ae,l),c(e,W,l),t(W,I);for(let p=0;p<P.length;p+=1)P[p]&&P[p].m(I,null);t(W,et),t(W,J);for(let p=0;p<w.length;p+=1)w[p]&&w[p].m(J,null);U=!0},p(e,[l]){var nt,it;(!U||l&1)&&n!==(n=e[0].name+"")&&G(m,n),(!U||l&2)&&Z!==(Z=e[1].join("/")+"")&&G(ie,Z);const p={};if(l&49&&(p.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[5]}');
|
||||
|
||||
...
|
||||
|
||||
const authData = await pb.collection('${(nt=e[0])==null?void 0:nt.name}').authWithPassword(
|
||||
'${e[4]}',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
|
||||
// after the above you can also access the auth data from the authStore
|
||||
console.log(pb.authStore.isValid);
|
||||
console.log(pb.authStore.token);
|
||||
console.log(pb.authStore.record.id);
|
||||
|
||||
// "logout"
|
||||
pb.authStore.clear();
|
||||
`),l&49&&(p.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[5]}');
|
||||
|
||||
...
|
||||
|
||||
final authData = await pb.collection('${(it=e[0])==null?void 0:it.name}').authWithPassword(
|
||||
'${e[4]}',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
|
||||
// after the above you can also access the auth data from the authStore
|
||||
print(pb.authStore.isValid);
|
||||
print(pb.authStore.token);
|
||||
print(pb.authStore.record.id);
|
||||
|
||||
// "logout"
|
||||
pb.authStore.clear();
|
||||
`),R.$set(p),(!U||l&1)&&te!==(te=e[0].name+"")&&G(he,te),l&2){B=L(e[1]);let y;for(y=0;y<B.length;y+=1){const rt=ht(e,B,y);S[y]?S[y].p(rt,l):(S[y]=bt(rt),S[y].c(),S[y].m(Y,ge))}for(;y<S.length;y+=1)S[y].d(1);S.length=B.length}l&12&&(le=L(e[3]),P=ct(P,l,lt,1,e,le,xe,I,wt,ft,null,ut)),l&12&&(K=L(e[3]),yt(),w=ct(w,l,at,1,e,K,tt,J,$t,mt,null,pt),Pt())},i(e){if(!U){X(R.$$.fragment,e),X(F.$$.fragment,e),X(M.$$.fragment,e);for(let l=0;l<K.length;l+=1)X(w[l]);U=!0}},o(e){z(R.$$.fragment,e),z(F.$$.fragment,e),z(M.$$.fragment,e);for(let l=0;l<w.length;l+=1)z(w[l]);U=!1},d(e){e&&(d(o),d(r),d(h),d(ce),d(de),d(q),d(pe),d(C),d(be),d(j),d(fe),d(T),d(Se),d(E),d(we),d(A),d(Oe),d(Q),d(Ae),d(W)),se(R,e),Rt(S,e),se(F),se(M);for(let l=0;l<P.length;l+=1)P[l].d();for(let l=0;l<w.length;l+=1)w[l].d()}}}function Wt(i,o,a){let n,m,b,{collection:r}=o,h=200,g=[];const $=_=>a(2,h=_.code);return i.$$set=_=>{"collection"in _&&a(0,r=_.collection)},i.$$.update=()=>{var _;i.$$.dirty&1&&a(1,m=((_=r==null?void 0:r.passwordAuth)==null?void 0:_.identityFields)||[]),i.$$.dirty&2&&a(4,b=m.length==0?"NONE":"YOUR_"+m.join("_OR_").toUpperCase()),i.$$.dirty&1&&a(3,g=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:dt.dummyCollectionRecord(r)},null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"identity": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`}])},a(5,n=dt.getApiExampleUrl(Ct.baseURL)),[r,m,h,g,b,n,$]}class Mt extends kt{constructor(o){super(),gt(this,o,Wt,Dt,vt,{collection:0})}}export{Mt as default};
|
||||
@@ -1,57 +0,0 @@
|
||||
import{S as Pe,i as Se,s as Oe,O as Y,e as r,v,b as k,c as Ce,f as b,g as d,h as n,m as $e,w as j,P as _e,Q as ye,k as Re,R as Te,n as Ae,t as ee,a as te,o as m,d as we,C as Ee,A as qe,q as H,r as Be,N as Ue}from"./index-Bp3jGQ0J.js";import{S as De}from"./SdkTabs-DxNNd6Sw.js";function he(o,l,s){const a=o.slice();return a[5]=l[s],a}function ke(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l){let s,a=l[5].code+"",_,u,i,p;function f(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=v(a),u=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(C,$){d(C,s,$),n(s,_),n(s,u),i||(p=Be(s,"click",f),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&j(_,a),$&6&&H(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,p()}}}function ve(o,l){let s,a,_,u;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),Ce(a.$$.fragment),_=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(i,p){d(i,s,p),$e(a,s,null),n(s,_),u=!0},p(i,p){l=i;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(i){u||(ee(a.$$.fragment,i),u=!0)},o(i){te(a.$$.fragment,i),u=!1},d(i){i&&m(s),we(a)}}}function Ne(o){var pe,fe;let l,s,a=o[0].name+"",_,u,i,p,f,C,$,D=o[0].name+"",F,le,se,I,L,w,Q,y,z,P,N,ae,K,R,ne,G,M=o[0].name+"",J,oe,V,T,X,A,Z,E,x,S,q,g=[],ie=new Map,ce,B,h=[],re=new Map,O;w=new De({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(pe=o[0])==null?void 0:pe.name}').confirmEmailChange(
|
||||
'TOKEN',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(fe=o[0])==null?void 0:fe.name}').confirmEmailChange(
|
||||
'TOKEN',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
`}});let W=Y(o[2]);const de=e=>e[5].code;for(let e=0;e<W.length;e+=1){let t=ke(o,W,e),c=de(t);ie.set(c,g[e]=ge(c,t))}let U=Y(o[2]);const me=e=>e[5].code;for(let e=0;e<U.length;e+=1){let t=he(o,U,e),c=me(t);re.set(c,h[e]=ve(c,t))}return{c(){l=r("h3"),s=v("Confirm email change ("),_=v(a),u=v(")"),i=k(),p=r("div"),f=r("p"),C=v("Confirms "),$=r("strong"),F=v(D),le=v(" email change request."),se=k(),I=r("p"),I.textContent=`After this request all previously issued tokens for the specific record will be automatically
|
||||
invalidated.`,L=k(),Ce(w.$$.fragment),Q=k(),y=r("h6"),y.textContent="API details",z=k(),P=r("div"),N=r("strong"),N.textContent="POST",ae=k(),K=r("div"),R=r("p"),ne=v("/api/collections/"),G=r("strong"),J=v(M),oe=v("/confirm-email-change"),V=k(),T=r("div"),T.textContent="Body Parameters",X=k(),A=r("table"),A.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 change email request email.</td></tr> <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>',Z=k(),E=r("div"),E.textContent="Responses",x=k(),S=r("div"),q=r("div");for(let e=0;e<g.length;e+=1)g[e].c();ce=k(),B=r("div");for(let e=0;e<h.length;e+=1)h[e].c();b(l,"class","m-b-sm"),b(p,"class","content txt-lg m-b-sm"),b(y,"class","m-b-xs"),b(N,"class","label label-primary"),b(K,"class","content"),b(P,"class","alert alert-success"),b(T,"class","section-title"),b(A,"class","table-compact table-border m-b-base"),b(E,"class","section-title"),b(q,"class","tabs-header compact combined left"),b(B,"class","tabs-content"),b(S,"class","tabs")},m(e,t){d(e,l,t),n(l,s),n(l,_),n(l,u),d(e,i,t),d(e,p,t),n(p,f),n(f,C),n(f,$),n($,F),n(f,le),n(p,se),n(p,I),d(e,L,t),$e(w,e,t),d(e,Q,t),d(e,y,t),d(e,z,t),d(e,P,t),n(P,N),n(P,ae),n(P,K),n(K,R),n(R,ne),n(R,G),n(G,J),n(R,oe),d(e,V,t),d(e,T,t),d(e,X,t),d(e,A,t),d(e,Z,t),d(e,E,t),d(e,x,t),d(e,S,t),n(S,q);for(let c=0;c<g.length;c+=1)g[c]&&g[c].m(q,null);n(S,ce),n(S,B);for(let c=0;c<h.length;c+=1)h[c]&&h[c].m(B,null);O=!0},p(e,[t]){var ue,be;(!O||t&1)&&a!==(a=e[0].name+"")&&j(_,a),(!O||t&1)&&D!==(D=e[0].name+"")&&j(F,D);const c={};t&9&&(c.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(ue=e[0])==null?void 0:ue.name}').confirmEmailChange(
|
||||
'TOKEN',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
`),t&9&&(c.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(be=e[0])==null?void 0:be.name}').confirmEmailChange(
|
||||
'TOKEN',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
`),w.$set(c),(!O||t&1)&&M!==(M=e[0].name+"")&&j(J,M),t&6&&(W=Y(e[2]),g=_e(g,t,de,1,e,W,ie,q,ye,ge,null,ke)),t&6&&(U=Y(e[2]),Re(),h=_e(h,t,me,1,e,U,re,B,Te,ve,null,he),Ae())},i(e){if(!O){ee(w.$$.fragment,e);for(let t=0;t<U.length;t+=1)ee(h[t]);O=!0}},o(e){te(w.$$.fragment,e);for(let t=0;t<h.length;t+=1)te(h[t]);O=!1},d(e){e&&(m(l),m(i),m(p),m(L),m(Q),m(y),m(z),m(P),m(V),m(T),m(X),m(A),m(Z),m(E),m(x),m(S)),we(w,e);for(let t=0;t<g.length;t+=1)g[t].d();for(let t=0;t<h.length;t+=1)h[t].d()}}}function Ke(o,l,s){let a,{collection:_}=l,u=204,i=[];const p=f=>s(1,u=f.code);return o.$$set=f=>{"collection"in f&&s(0,_=f.collection)},s(3,a=Ee.getApiExampleUrl(qe.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"token": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`}]),[_,u,i,a,p]}class Ye extends Pe{constructor(l){super(),Se(this,l,Ke,Ne,Oe,{collection:0})}}export{Ye as default};
|
||||
@@ -1,85 +0,0 @@
|
||||
import{S as Ne,i as $e,s as Ce,O as K,e as c,v as w,b as k,c as Ae,f as b,g as r,h as n,m as Re,w as U,P as we,Q as Ee,k as ye,R as De,n as Te,t as ee,a as te,o as p,d as Oe,C as qe,A as Be,q as j,r as Me,N as Fe}from"./index-Bp3jGQ0J.js";import{S as Ie}from"./SdkTabs-DxNNd6Sw.js";function Se(o,l,s){const a=o.slice();return a[5]=l[s],a}function Pe(o,l,s){const a=o.slice();return a[5]=l[s],a}function We(o,l){let s,a=l[5].code+"",_,m,i,u;function f(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=w(a),m=k(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(S,P){r(S,s,P),n(s,_),n(s,m),i||(u=Me(s,"click",f),i=!0)},p(S,P){l=S,P&4&&a!==(a=l[5].code+"")&&U(_,a),P&6&&j(s,"active",l[1]===l[5].code)},d(S){S&&p(s),i=!1,u()}}}function ge(o,l){let s,a,_,m;return a=new Fe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),Ae(a.$$.fragment),_=k(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,u){r(i,s,u),Re(a,s,null),n(s,_),m=!0},p(i,u){l=i;const f={};u&4&&(f.content=l[5].body),a.$set(f),(!m||u&6)&&j(s,"active",l[1]===l[5].code)},i(i){m||(ee(a.$$.fragment,i),m=!0)},o(i){te(a.$$.fragment,i),m=!1},d(i){i&&p(s),Oe(a)}}}function Ke(o){var ue,fe,me,be;let l,s,a=o[0].name+"",_,m,i,u,f,S,P,q=o[0].name+"",H,le,se,L,Q,W,z,O,G,g,B,ae,M,N,oe,J,F=o[0].name+"",V,ne,X,$,Y,C,Z,E,x,A,y,v=[],ie=new Map,de,D,h=[],ce=new Map,R;W=new Ie({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
let oldAuth = pb.authStore.model;
|
||||
|
||||
await pb.collection('${(ue=o[0])==null?void 0:ue.name}').confirmPasswordReset(
|
||||
'TOKEN',
|
||||
'NEW_PASSWORD',
|
||||
'NEW_PASSWORD_CONFIRM',
|
||||
);
|
||||
|
||||
// reauthenticate if needed
|
||||
// (after the above call all previously issued tokens are invalidated)
|
||||
await pb.collection('${(fe=o[0])==null?void 0:fe.name}').authWithPassword(oldAuth.email, 'NEW_PASSWORD');
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
final oldAuth = pb.authStore.model;
|
||||
|
||||
await pb.collection('${(me=o[0])==null?void 0:me.name}').confirmPasswordReset(
|
||||
'TOKEN',
|
||||
'NEW_PASSWORD',
|
||||
'NEW_PASSWORD_CONFIRM',
|
||||
);
|
||||
|
||||
// reauthenticate if needed
|
||||
// (after the above call all previously issued tokens are invalidated)
|
||||
await pb.collection('${(be=o[0])==null?void 0:be.name}').authWithPassword(oldAuth.email, 'NEW_PASSWORD');
|
||||
`}});let I=K(o[2]);const re=e=>e[5].code;for(let e=0;e<I.length;e+=1){let t=Pe(o,I,e),d=re(t);ie.set(d,v[e]=We(d,t))}let T=K(o[2]);const pe=e=>e[5].code;for(let e=0;e<T.length;e+=1){let t=Se(o,T,e),d=pe(t);ce.set(d,h[e]=ge(d,t))}return{c(){l=c("h3"),s=w("Confirm password reset ("),_=w(a),m=w(")"),i=k(),u=c("div"),f=c("p"),S=w("Confirms "),P=c("strong"),H=w(q),le=w(" password reset request and sets a new password."),se=k(),L=c("p"),L.textContent=`After this request all previously issued tokens for the specific record will be automatically
|
||||
invalidated.`,Q=k(),Ae(W.$$.fragment),z=k(),O=c("h6"),O.textContent="API details",G=k(),g=c("div"),B=c("strong"),B.textContent="POST",ae=k(),M=c("div"),N=c("p"),oe=w("/api/collections/"),J=c("strong"),V=w(F),ne=w("/confirm-password-reset"),X=k(),$=c("div"),$.textContent="Body Parameters",Y=k(),C=c("table"),C.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 password reset request email.</td></tr> <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 new password to set.</td></tr> <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>',Z=k(),E=c("div"),E.textContent="Responses",x=k(),A=c("div"),y=c("div");for(let e=0;e<v.length;e+=1)v[e].c();de=k(),D=c("div");for(let e=0;e<h.length;e+=1)h[e].c();b(l,"class","m-b-sm"),b(u,"class","content txt-lg m-b-sm"),b(O,"class","m-b-xs"),b(B,"class","label label-primary"),b(M,"class","content"),b(g,"class","alert alert-success"),b($,"class","section-title"),b(C,"class","table-compact table-border m-b-base"),b(E,"class","section-title"),b(y,"class","tabs-header compact combined left"),b(D,"class","tabs-content"),b(A,"class","tabs")},m(e,t){r(e,l,t),n(l,s),n(l,_),n(l,m),r(e,i,t),r(e,u,t),n(u,f),n(f,S),n(f,P),n(P,H),n(f,le),n(u,se),n(u,L),r(e,Q,t),Re(W,e,t),r(e,z,t),r(e,O,t),r(e,G,t),r(e,g,t),n(g,B),n(g,ae),n(g,M),n(M,N),n(N,oe),n(N,J),n(J,V),n(N,ne),r(e,X,t),r(e,$,t),r(e,Y,t),r(e,C,t),r(e,Z,t),r(e,E,t),r(e,x,t),r(e,A,t),n(A,y);for(let d=0;d<v.length;d+=1)v[d]&&v[d].m(y,null);n(A,de),n(A,D);for(let d=0;d<h.length;d+=1)h[d]&&h[d].m(D,null);R=!0},p(e,[t]){var _e,he,ke,ve;(!R||t&1)&&a!==(a=e[0].name+"")&&U(_,a),(!R||t&1)&&q!==(q=e[0].name+"")&&U(H,q);const d={};t&9&&(d.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
let oldAuth = pb.authStore.model;
|
||||
|
||||
await pb.collection('${(_e=e[0])==null?void 0:_e.name}').confirmPasswordReset(
|
||||
'TOKEN',
|
||||
'NEW_PASSWORD',
|
||||
'NEW_PASSWORD_CONFIRM',
|
||||
);
|
||||
|
||||
// reauthenticate if needed
|
||||
// (after the above call all previously issued tokens are invalidated)
|
||||
await pb.collection('${(he=e[0])==null?void 0:he.name}').authWithPassword(oldAuth.email, 'NEW_PASSWORD');
|
||||
`),t&9&&(d.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
final oldAuth = pb.authStore.model;
|
||||
|
||||
await pb.collection('${(ke=e[0])==null?void 0:ke.name}').confirmPasswordReset(
|
||||
'TOKEN',
|
||||
'NEW_PASSWORD',
|
||||
'NEW_PASSWORD_CONFIRM',
|
||||
);
|
||||
|
||||
// reauthenticate if needed
|
||||
// (after the above call all previously issued tokens are invalidated)
|
||||
await pb.collection('${(ve=e[0])==null?void 0:ve.name}').authWithPassword(oldAuth.email, 'NEW_PASSWORD');
|
||||
`),W.$set(d),(!R||t&1)&&F!==(F=e[0].name+"")&&U(V,F),t&6&&(I=K(e[2]),v=we(v,t,re,1,e,I,ie,y,Ee,We,null,Pe)),t&6&&(T=K(e[2]),ye(),h=we(h,t,pe,1,e,T,ce,D,De,ge,null,Se),Te())},i(e){if(!R){ee(W.$$.fragment,e);for(let t=0;t<T.length;t+=1)ee(h[t]);R=!0}},o(e){te(W.$$.fragment,e);for(let t=0;t<h.length;t+=1)te(h[t]);R=!1},d(e){e&&(p(l),p(i),p(u),p(Q),p(z),p(O),p(G),p(g),p(X),p($),p(Y),p(C),p(Z),p(E),p(x),p(A)),Oe(W,e);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 Ue(o,l,s){let a,{collection:_}=l,m=204,i=[];const u=f=>s(1,m=f.code);return o.$$set=f=>{"collection"in f&&s(0,_=f.collection)},s(3,a=qe.getApiExampleUrl(Be.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"token": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`}]),[_,m,i,a,u]}class Le extends Ne{constructor(l){super(),$e(this,l,Ue,Ke,Ce,{collection:0})}}export{Le as default};
|
||||
@@ -1,56 +0,0 @@
|
||||
import{S as Se,i as Te,s as Be,O as D,e as r,v as g,b as k,c as ye,f as h,g as f,h as n,m as Ce,w as H,P as ke,Q as qe,k as Re,R as Oe,n as Ae,t as x,a as ee,o as d,d as Pe,C as Ee,A as Ne,q as F,r as Ve,N as Ke}from"./index-Bp3jGQ0J.js";import{S as Me}from"./SdkTabs-DxNNd6Sw.js";function ve(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 we(o,l){let s,a=l[5].code+"",b,m,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),b=g(a),m=k(),h(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(w,$){f(w,s,$),n(s,b),n(s,m),i||(p=Ve(s,"click",u),i=!0)},p(w,$){l=w,$&4&&a!==(a=l[5].code+"")&&H(b,a),$&6&&F(s,"active",l[1]===l[5].code)},d(w){w&&d(s),i=!1,p()}}}function $e(o,l){let s,a,b,m;return a=new Ke({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),ye(a.$$.fragment),b=k(),h(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(i,p){f(i,s,p),Ce(a,s,null),n(s,b),m=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!m||p&6)&&F(s,"active",l[1]===l[5].code)},i(i){m||(x(a.$$.fragment,i),m=!0)},o(i){ee(a.$$.fragment,i),m=!1},d(i){i&&d(s),Pe(a)}}}function Ue(o){var fe,de,pe,ue;let l,s,a=o[0].name+"",b,m,i,p,u,w,$,V=o[0].name+"",I,te,L,y,Q,T,z,C,K,le,M,B,se,G,U=o[0].name+"",J,ae,W,q,X,R,Y,O,Z,P,A,v=[],oe=new Map,ne,E,_=[],ie=new Map,S;y=new Me({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(fe=o[0])==null?void 0:fe.name}').confirmVerification('TOKEN');
|
||||
|
||||
// optionally refresh the previous authStore state with the latest record changes
|
||||
await pb.collection('${(de=o[0])==null?void 0:de.name}').authRefresh();
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(pe=o[0])==null?void 0:pe.name}').confirmVerification('TOKEN');
|
||||
|
||||
// optionally refresh the previous authStore state with the latest record changes
|
||||
await pb.collection('${(ue=o[0])==null?void 0:ue.name}').authRefresh();
|
||||
`}});let j=D(o[2]);const ce=e=>e[5].code;for(let e=0;e<j.length;e+=1){let t=ge(o,j,e),c=ce(t);oe.set(c,v[e]=we(c,t))}let N=D(o[2]);const re=e=>e[5].code;for(let e=0;e<N.length;e+=1){let t=ve(o,N,e),c=re(t);ie.set(c,_[e]=$e(c,t))}return{c(){l=r("h3"),s=g("Confirm verification ("),b=g(a),m=g(")"),i=k(),p=r("div"),u=r("p"),w=g("Confirms "),$=r("strong"),I=g(V),te=g(" account verification request."),L=k(),ye(y.$$.fragment),Q=k(),T=r("h6"),T.textContent="API details",z=k(),C=r("div"),K=r("strong"),K.textContent="POST",le=k(),M=r("div"),B=r("p"),se=g("/api/collections/"),G=r("strong"),J=g(U),ae=g("/confirm-verification"),W=k(),q=r("div"),q.textContent="Body Parameters",X=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>',Y=k(),O=r("div"),O.textContent="Responses",Z=k(),P=r("div"),A=r("div");for(let e=0;e<v.length;e+=1)v[e].c();ne=k(),E=r("div");for(let e=0;e<_.length;e+=1)_[e].c();h(l,"class","m-b-sm"),h(p,"class","content txt-lg m-b-sm"),h(T,"class","m-b-xs"),h(K,"class","label label-primary"),h(M,"class","content"),h(C,"class","alert alert-success"),h(q,"class","section-title"),h(R,"class","table-compact table-border m-b-base"),h(O,"class","section-title"),h(A,"class","tabs-header compact combined left"),h(E,"class","tabs-content"),h(P,"class","tabs")},m(e,t){f(e,l,t),n(l,s),n(l,b),n(l,m),f(e,i,t),f(e,p,t),n(p,u),n(u,w),n(u,$),n($,I),n(u,te),f(e,L,t),Ce(y,e,t),f(e,Q,t),f(e,T,t),f(e,z,t),f(e,C,t),n(C,K),n(C,le),n(C,M),n(M,B),n(B,se),n(B,G),n(G,J),n(B,ae),f(e,W,t),f(e,q,t),f(e,X,t),f(e,R,t),f(e,Y,t),f(e,O,t),f(e,Z,t),f(e,P,t),n(P,A);for(let c=0;c<v.length;c+=1)v[c]&&v[c].m(A,null);n(P,ne),n(P,E);for(let c=0;c<_.length;c+=1)_[c]&&_[c].m(E,null);S=!0},p(e,[t]){var me,he,be,_e;(!S||t&1)&&a!==(a=e[0].name+"")&&H(b,a),(!S||t&1)&&V!==(V=e[0].name+"")&&H(I,V);const c={};t&9&&(c.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(me=e[0])==null?void 0:me.name}').confirmVerification('TOKEN');
|
||||
|
||||
// optionally refresh the previous authStore state with the latest record changes
|
||||
await pb.collection('${(he=e[0])==null?void 0:he.name}').authRefresh();
|
||||
`),t&9&&(c.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(be=e[0])==null?void 0:be.name}').confirmVerification('TOKEN');
|
||||
|
||||
// optionally refresh the previous authStore state with the latest record changes
|
||||
await pb.collection('${(_e=e[0])==null?void 0:_e.name}').authRefresh();
|
||||
`),y.$set(c),(!S||t&1)&&U!==(U=e[0].name+"")&&H(J,U),t&6&&(j=D(e[2]),v=ke(v,t,ce,1,e,j,oe,A,qe,we,null,ge)),t&6&&(N=D(e[2]),Re(),_=ke(_,t,re,1,e,N,ie,E,Oe,$e,null,ve),Ae())},i(e){if(!S){x(y.$$.fragment,e);for(let t=0;t<N.length;t+=1)x(_[t]);S=!0}},o(e){ee(y.$$.fragment,e);for(let t=0;t<_.length;t+=1)ee(_[t]);S=!1},d(e){e&&(d(l),d(i),d(p),d(L),d(Q),d(T),d(z),d(C),d(W),d(q),d(X),d(R),d(Y),d(O),d(Z),d(P)),Pe(y,e);for(let t=0;t<v.length;t+=1)v[t].d();for(let t=0;t<_.length;t+=1)_[t].d()}}}function je(o,l,s){let a,{collection:b}=l,m=204,i=[];const p=u=>s(1,m=u.code);return o.$$set=u=>{"collection"in u&&s(0,b=u.collection)},s(3,a=Ee.getApiExampleUrl(Ne.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"token": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`}]),[b,m,i,a,p]}class Fe extends Se{constructor(l){super(),Te(this,l,je,Ue,Be,{collection:0})}}export{Fe as default};
|
||||
@@ -0,0 +1,90 @@
|
||||
import{S as $t,i as qt,s as Tt,Q as St,C as ee,T as ue,R as Ct,e as s,w as _,b as p,c as $e,f as w,g as r,h as i,m as qe,x as oe,U as Ve,V as pt,k as Ot,W as Mt,n as Pt,t as ye,a as ve,o as d,d as Te,p as Ft,r as Se,u as Lt,y as we,E as Ht}from"./index-B-F-pko3.js";import{F as Rt}from"./FieldsQueryParam-CW6KZfgu.js";function mt(a,e,t){const l=a.slice();return l[10]=e[t],l}function bt(a,e,t){const l=a.slice();return l[10]=e[t],l}function _t(a,e,t){const l=a.slice();return l[15]=e[t],l}function kt(a){let e;return{c(){e=s("p"),e.innerHTML="Requires superuser <code>Authorization:TOKEN</code> header",w(e,"class","txt-hint txt-sm txt-right")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function ht(a){let e,t,l,u,c,f,b,m,$,h,g,B,S,O,R,M,U,J,T,W,P,q,k,F,te,K,I,re,Y,x,G;function fe(y,C){var V,z,H;return C&1&&(f=null),f==null&&(f=!!((H=(z=(V=y[0])==null?void 0:V.fields)==null?void 0:z.find(xt))!=null&&H.required)),f?Bt:At}let le=fe(a,-1),E=le(a);function X(y,C){var V,z,H;return C&1&&(U=null),U==null&&(U=!!((H=(z=(V=y[0])==null?void 0:V.fields)==null?void 0:z.find(Yt))!=null&&H.required)),U?Vt:jt}let Z=X(a,-1),L=Z(a);return{c(){e=s("tr"),e.innerHTML='<td colspan="3" class="txt-hint txt-bold">Auth specific fields</td>',t=p(),l=s("tr"),u=s("td"),c=s("div"),E.c(),b=p(),m=s("span"),m.textContent="email",$=p(),h=s("td"),h.innerHTML='<span class="label">String</span>',g=p(),B=s("td"),B.textContent="Auth record email address.",S=p(),O=s("tr"),R=s("td"),M=s("div"),L.c(),J=p(),T=s("span"),T.textContent="emailVisibility",W=p(),P=s("td"),P.innerHTML='<span class="label">Boolean</span>',q=p(),k=s("td"),k.textContent="Whether to show/hide the auth record email when fetching the record data.",F=p(),te=s("tr"),te.innerHTML='<td><div class="inline-flex"><span class="label label-success">Required</span> <span>password</span></div></td> <td><span class="label">String</span></td> <td>Auth record password.</td>',K=p(),I=s("tr"),I.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>',re=p(),Y=s("tr"),Y.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 superusers or auth records with "Manage" access.</td>`,x=p(),G=s("tr"),G.innerHTML='<td colspan="3" class="txt-hint txt-bold">Other fields</td>',w(c,"class","inline-flex"),w(M,"class","inline-flex")},m(y,C){r(y,e,C),r(y,t,C),r(y,l,C),i(l,u),i(u,c),E.m(c,null),i(c,b),i(c,m),i(l,$),i(l,h),i(l,g),i(l,B),r(y,S,C),r(y,O,C),i(O,R),i(R,M),L.m(M,null),i(M,J),i(M,T),i(O,W),i(O,P),i(O,q),i(O,k),r(y,F,C),r(y,te,C),r(y,K,C),r(y,I,C),r(y,re,C),r(y,Y,C),r(y,x,C),r(y,G,C)},p(y,C){le!==(le=fe(y,C))&&(E.d(1),E=le(y),E&&(E.c(),E.m(c,b))),Z!==(Z=X(y,C))&&(L.d(1),L=Z(y),L&&(L.c(),L.m(M,J)))},d(y){y&&(d(e),d(t),d(l),d(S),d(O),d(F),d(te),d(K),d(I),d(re),d(Y),d(x),d(G)),E.d(),L.d()}}}function At(a){let e;return{c(){e=s("span"),e.textContent="Optional",w(e,"class","label label-warning")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function Bt(a){let e;return{c(){e=s("span"),e.textContent="Required",w(e,"class","label label-success")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function jt(a){let e;return{c(){e=s("span"),e.textContent="Optional",w(e,"class","label label-warning")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function Vt(a){let e;return{c(){e=s("span"),e.textContent="Required",w(e,"class","label label-success")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function Nt(a){let e;return{c(){e=s("span"),e.textContent="Required",w(e,"class","label label-success")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function Dt(a){let e;return{c(){e=s("span"),e.textContent="Optional",w(e,"class","label label-warning")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function Jt(a){let e,t=a[15].maxSelect===1?"id":"ids",l,u;return{c(){e=_("Relation record "),l=_(t),u=_(".")},m(c,f){r(c,e,f),r(c,l,f),r(c,u,f)},p(c,f){f&64&&t!==(t=c[15].maxSelect===1?"id":"ids")&&oe(l,t)},d(c){c&&(d(e),d(l),d(u))}}}function Et(a){let e,t,l,u,c,f,b,m,$;return{c(){e=_("File object."),t=s("br"),l=_(`
|
||||
Set to empty value (`),u=s("code"),u.textContent="null",c=_(", "),f=s("code"),f.textContent='""',b=_(" or "),m=s("code"),m.textContent="[]",$=_(`) to delete
|
||||
already uploaded file(s).`)},m(h,g){r(h,e,g),r(h,t,g),r(h,l,g),r(h,u,g),r(h,c,g),r(h,f,g),r(h,b,g),r(h,m,g),r(h,$,g)},p:we,d(h){h&&(d(e),d(t),d(l),d(u),d(c),d(f),d(b),d(m),d($))}}}function Ut(a){let e;return{c(){e=_("URL address.")},m(t,l){r(t,e,l)},p:we,d(t){t&&d(e)}}}function It(a){let e;return{c(){e=_("Email address.")},m(t,l){r(t,e,l)},p:we,d(t){t&&d(e)}}}function Qt(a){let e;return{c(){e=_("JSON array or object.")},m(t,l){r(t,e,l)},p:we,d(t){t&&d(e)}}}function Wt(a){let e;return{c(){e=_("Number value.")},m(t,l){r(t,e,l)},p:we,d(t){t&&d(e)}}}function zt(a){let e,t,l=a[15].autogeneratePattern&&yt();return{c(){e=_(`Plain text value.
|
||||
`),l&&l.c(),t=Ht()},m(u,c){r(u,e,c),l&&l.m(u,c),r(u,t,c)},p(u,c){u[15].autogeneratePattern?l||(l=yt(),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null)},d(u){u&&(d(e),d(t)),l&&l.d(u)}}}function yt(a){let e;return{c(){e=_("It is autogenerated if not set.")},m(t,l){r(t,e,l)},d(t){t&&d(e)}}}function vt(a,e){let t,l,u,c,f,b=e[15].name+"",m,$,h,g,B=ee.getFieldValueType(e[15])+"",S,O,R,M;function U(k,F){return!k[15].required||k[15].type=="text"&&k[15].autogeneratePattern?Dt:Nt}let J=U(e),T=J(e);function W(k,F){if(k[15].type==="text")return zt;if(k[15].type==="number")return Wt;if(k[15].type==="json")return Qt;if(k[15].type==="email")return It;if(k[15].type==="url")return Ut;if(k[15].type==="file")return Et;if(k[15].type==="relation")return Jt}let P=W(e),q=P&&P(e);return{key:a,first:null,c(){t=s("tr"),l=s("td"),u=s("div"),T.c(),c=p(),f=s("span"),m=_(b),$=p(),h=s("td"),g=s("span"),S=_(B),O=p(),R=s("td"),q&&q.c(),M=p(),w(u,"class","inline-flex"),w(g,"class","label"),this.first=t},m(k,F){r(k,t,F),i(t,l),i(l,u),T.m(u,null),i(u,c),i(u,f),i(f,m),i(t,$),i(t,h),i(h,g),i(g,S),i(t,O),i(t,R),q&&q.m(R,null),i(t,M)},p(k,F){e=k,J!==(J=U(e))&&(T.d(1),T=J(e),T&&(T.c(),T.m(u,c))),F&64&&b!==(b=e[15].name+"")&&oe(m,b),F&64&&B!==(B=ee.getFieldValueType(e[15])+"")&&oe(S,B),P===(P=W(e))&&q?q.p(e,F):(q&&q.d(1),q=P&&P(e),q&&(q.c(),q.m(R,null)))},d(k){k&&d(t),T.d(),q&&q.d()}}}function wt(a,e){let t,l=e[10].code+"",u,c,f,b;function m(){return e[9](e[10])}return{key:a,first:null,c(){t=s("button"),u=_(l),c=p(),w(t,"class","tab-item"),Se(t,"active",e[2]===e[10].code),this.first=t},m($,h){r($,t,h),i(t,u),i(t,c),f||(b=Lt(t,"click",m),f=!0)},p($,h){e=$,h&8&&l!==(l=e[10].code+"")&&oe(u,l),h&12&&Se(t,"active",e[2]===e[10].code)},d($){$&&d(t),f=!1,b()}}}function gt(a,e){let t,l,u,c;return l=new Ct({props:{content:e[10].body}}),{key:a,first:null,c(){t=s("div"),$e(l.$$.fragment),u=p(),w(t,"class","tab-item"),Se(t,"active",e[2]===e[10].code),this.first=t},m(f,b){r(f,t,b),qe(l,t,null),i(t,u),c=!0},p(f,b){e=f;const m={};b&8&&(m.content=e[10].body),l.$set(m),(!c||b&12)&&Se(t,"active",e[2]===e[10].code)},i(f){c||(ye(l.$$.fragment,f),c=!0)},o(f){ve(l.$$.fragment,f),c=!1},d(f){f&&d(t),Te(l)}}}function Kt(a){var at,st,ot,rt;let e,t,l=a[0].name+"",u,c,f,b,m,$,h,g=a[0].name+"",B,S,O,R,M,U,J,T,W,P,q,k,F,te,K,I,re,Y,x=a[0].name+"",G,fe,le,E,X,Z,L,y,C,V,z,H=[],Ne=new Map,Oe,pe,Me,ne,Pe,De,me,ie,Fe,Je,Le,Ee,A,Ue,de,Ie,Qe,We,He,ze,Re,Ke,Ye,xe,Ae,Ge,Xe,ce,Be,be,je,ae,_e,Q=[],Ze=new Map,et,ke,N=[],tt=new Map,se;T=new St({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${a[5]}');
|
||||
|
||||
...
|
||||
|
||||
// example create data
|
||||
const data = ${JSON.stringify(Object.assign({},a[4],ee.dummyCollectionSchemaData(a[0],!0)),null,4)};
|
||||
|
||||
const record = await pb.collection('${(at=a[0])==null?void 0:at.name}').create(data);
|
||||
`+(a[1]?`
|
||||
// (optional) send an email verification request
|
||||
await pb.collection('${(st=a[0])==null?void 0:st.name}').requestVerification('test@example.com');
|
||||
`:""),dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${a[5]}');
|
||||
|
||||
...
|
||||
|
||||
// example create body
|
||||
final body = <String, dynamic>${JSON.stringify(Object.assign({},a[4],ee.dummyCollectionSchemaData(a[0],!0)),null,2)};
|
||||
|
||||
final record = await pb.collection('${(ot=a[0])==null?void 0:ot.name}').create(body: body);
|
||||
`+(a[1]?`
|
||||
// (optional) send an email verification request
|
||||
await pb.collection('${(rt=a[0])==null?void 0:rt.name}').requestVerification('test@example.com');
|
||||
`:"")}});let D=a[7]&&kt(),j=a[1]&&ht(a),ge=ue(a[6]);const lt=n=>n[15].name;for(let n=0;n<ge.length;n+=1){let o=_t(a,ge,n),v=lt(o);Ne.set(v,H[n]=vt(v,o))}de=new Ct({props:{content:"?expand=relField1,relField2.subRelField"}}),ce=new Rt({});let Ce=ue(a[3]);const nt=n=>n[10].code;for(let n=0;n<Ce.length;n+=1){let o=bt(a,Ce,n),v=nt(o);Ze.set(v,Q[n]=wt(v,o))}let he=ue(a[3]);const it=n=>n[10].code;for(let n=0;n<he.length;n+=1){let o=mt(a,he,n),v=it(o);tt.set(v,N[n]=gt(v,o))}return{c(){e=s("h3"),t=_("Create ("),u=_(l),c=_(")"),f=p(),b=s("div"),m=s("p"),$=_("Create a new "),h=s("strong"),B=_(g),S=_(" record."),O=p(),R=s("p"),R.innerHTML=`Body parameters could be sent as <code>application/json</code> or
|
||||
<code>multipart/form-data</code>.`,M=p(),U=s("p"),U.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>.`,J=p(),$e(T.$$.fragment),W=p(),P=s("h6"),P.textContent="API details",q=p(),k=s("div"),F=s("strong"),F.textContent="POST",te=p(),K=s("div"),I=s("p"),re=_("/api/collections/"),Y=s("strong"),G=_(x),fe=_("/records"),le=p(),D&&D.c(),E=p(),X=s("div"),X.textContent="Body Parameters",Z=p(),L=s("table"),y=s("thead"),y.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="50%">Description</th></tr>',C=p(),V=s("tbody"),j&&j.c(),z=p();for(let n=0;n<H.length;n+=1)H[n].c();Oe=p(),pe=s("div"),pe.textContent="Query parameters",Me=p(),ne=s("table"),Pe=s("thead"),Pe.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',De=p(),me=s("tbody"),ie=s("tr"),Fe=s("td"),Fe.textContent="expand",Je=p(),Le=s("td"),Le.innerHTML='<span class="label">String</span>',Ee=p(),A=s("td"),Ue=_(`Auto expand relations when returning the created record. Ex.:
|
||||
`),$e(de.$$.fragment),Ie=_(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Qe=s("br"),We=_(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),He=s("code"),He.textContent="expand",ze=_(" property (eg. "),Re=s("code"),Re.textContent='"expand": {"relField1": {...}, ...}',Ke=_(`).
|
||||
`),Ye=s("br"),xe=_(`
|
||||
Only the relations to which the request user has permissions to `),Ae=s("strong"),Ae.textContent="view",Ge=_(" will be expanded."),Xe=p(),$e(ce.$$.fragment),Be=p(),be=s("div"),be.textContent="Responses",je=p(),ae=s("div"),_e=s("div");for(let n=0;n<Q.length;n+=1)Q[n].c();et=p(),ke=s("div");for(let n=0;n<N.length;n+=1)N[n].c();w(e,"class","m-b-sm"),w(b,"class","content txt-lg m-b-sm"),w(P,"class","m-b-xs"),w(F,"class","label label-primary"),w(K,"class","content"),w(k,"class","alert alert-success"),w(X,"class","section-title"),w(L,"class","table-compact table-border m-b-base"),w(pe,"class","section-title"),w(ne,"class","table-compact table-border m-b-base"),w(be,"class","section-title"),w(_e,"class","tabs-header compact combined left"),w(ke,"class","tabs-content"),w(ae,"class","tabs")},m(n,o){r(n,e,o),i(e,t),i(e,u),i(e,c),r(n,f,o),r(n,b,o),i(b,m),i(m,$),i(m,h),i(h,B),i(m,S),i(b,O),i(b,R),i(b,M),i(b,U),r(n,J,o),qe(T,n,o),r(n,W,o),r(n,P,o),r(n,q,o),r(n,k,o),i(k,F),i(k,te),i(k,K),i(K,I),i(I,re),i(I,Y),i(Y,G),i(I,fe),i(k,le),D&&D.m(k,null),r(n,E,o),r(n,X,o),r(n,Z,o),r(n,L,o),i(L,y),i(L,C),i(L,V),j&&j.m(V,null),i(V,z);for(let v=0;v<H.length;v+=1)H[v]&&H[v].m(V,null);r(n,Oe,o),r(n,pe,o),r(n,Me,o),r(n,ne,o),i(ne,Pe),i(ne,De),i(ne,me),i(me,ie),i(ie,Fe),i(ie,Je),i(ie,Le),i(ie,Ee),i(ie,A),i(A,Ue),qe(de,A,null),i(A,Ie),i(A,Qe),i(A,We),i(A,He),i(A,ze),i(A,Re),i(A,Ke),i(A,Ye),i(A,xe),i(A,Ae),i(A,Ge),i(me,Xe),qe(ce,me,null),r(n,Be,o),r(n,be,o),r(n,je,o),r(n,ae,o),i(ae,_e);for(let v=0;v<Q.length;v+=1)Q[v]&&Q[v].m(_e,null);i(ae,et),i(ae,ke);for(let v=0;v<N.length;v+=1)N[v]&&N[v].m(ke,null);se=!0},p(n,[o]){var dt,ct,ut,ft;(!se||o&1)&&l!==(l=n[0].name+"")&&oe(u,l),(!se||o&1)&&g!==(g=n[0].name+"")&&oe(B,g);const v={};o&51&&(v.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${n[5]}');
|
||||
|
||||
...
|
||||
|
||||
// example create data
|
||||
const data = ${JSON.stringify(Object.assign({},n[4],ee.dummyCollectionSchemaData(n[0],!0)),null,4)};
|
||||
|
||||
const record = await pb.collection('${(dt=n[0])==null?void 0:dt.name}').create(data);
|
||||
`+(n[1]?`
|
||||
// (optional) send an email verification request
|
||||
await pb.collection('${(ct=n[0])==null?void 0:ct.name}').requestVerification('test@example.com');
|
||||
`:"")),o&51&&(v.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${n[5]}');
|
||||
|
||||
...
|
||||
|
||||
// example create body
|
||||
final body = <String, dynamic>${JSON.stringify(Object.assign({},n[4],ee.dummyCollectionSchemaData(n[0],!0)),null,2)};
|
||||
|
||||
final record = await pb.collection('${(ut=n[0])==null?void 0:ut.name}').create(body: body);
|
||||
`+(n[1]?`
|
||||
// (optional) send an email verification request
|
||||
await pb.collection('${(ft=n[0])==null?void 0:ft.name}').requestVerification('test@example.com');
|
||||
`:"")),T.$set(v),(!se||o&1)&&x!==(x=n[0].name+"")&&oe(G,x),n[7]?D||(D=kt(),D.c(),D.m(k,null)):D&&(D.d(1),D=null),n[1]?j?j.p(n,o):(j=ht(n),j.c(),j.m(V,z)):j&&(j.d(1),j=null),o&64&&(ge=ue(n[6]),H=Ve(H,o,lt,1,n,ge,Ne,V,pt,vt,null,_t)),o&12&&(Ce=ue(n[3]),Q=Ve(Q,o,nt,1,n,Ce,Ze,_e,pt,wt,null,bt)),o&12&&(he=ue(n[3]),Ot(),N=Ve(N,o,it,1,n,he,tt,ke,Mt,gt,null,mt),Pt())},i(n){if(!se){ye(T.$$.fragment,n),ye(de.$$.fragment,n),ye(ce.$$.fragment,n);for(let o=0;o<he.length;o+=1)ye(N[o]);se=!0}},o(n){ve(T.$$.fragment,n),ve(de.$$.fragment,n),ve(ce.$$.fragment,n);for(let o=0;o<N.length;o+=1)ve(N[o]);se=!1},d(n){n&&(d(e),d(f),d(b),d(J),d(W),d(P),d(q),d(k),d(E),d(X),d(Z),d(L),d(Oe),d(pe),d(Me),d(ne),d(Be),d(be),d(je),d(ae)),Te(T,n),D&&D.d(),j&&j.d();for(let o=0;o<H.length;o+=1)H[o].d();Te(de),Te(ce);for(let o=0;o<Q.length;o+=1)Q[o].d();for(let o=0;o<N.length;o+=1)N[o].d()}}}const Yt=a=>a.name=="emailVisibility",xt=a=>a.name=="email";function Gt(a,e,t){let l,u,c,f,b,{collection:m}=e,$=200,h=[],g={};const B=S=>t(2,$=S.code);return a.$$set=S=>{"collection"in S&&t(0,m=S.collection)},a.$$.update=()=>{var S,O,R;a.$$.dirty&1&&t(1,l=m.type==="auth"),a.$$.dirty&1&&t(7,u=(m==null?void 0:m.createRule)===null),a.$$.dirty&2&&t(8,c=l?["password","verified","email","emailVisibility"]:[]),a.$$.dirty&257&&t(6,f=((S=m==null?void 0:m.fields)==null?void 0:S.filter(M=>!M.hidden&&M.type!="autodate"&&!c.includes(M.name)))||[]),a.$$.dirty&1&&t(3,h=[{code:200,body:JSON.stringify(ee.dummyCollectionRecord(m),null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to create record.",
|
||||
"data": {
|
||||
"${(R=(O=m==null?void 0:m.fields)==null?void 0:O[0])==null?void 0:R.name}": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "You are not allowed to perform this request.",
|
||||
"data": {}
|
||||
}
|
||||
`}]),a.$$.dirty&2&&(l?t(4,g={password:"12345678",passwordConfirm:"12345678"}):t(4,g={}))},t(5,b=ee.getApiExampleUrl(Ft.baseURL)),[m,l,$,h,g,b,f,u,c,B]}class el extends $t{constructor(e){super(),qt(this,e,Gt,Kt,Tt,{collection:0})}}export{el as default};
|
||||
@@ -1,92 +0,0 @@
|
||||
import{S as qt,i as Ot,s as Mt,C as Q,O as ne,N as Tt,e as s,v as _,b as f,c as _e,f as v,g as r,h as n,m as he,w as x,P as Be,Q as ht,k as Ht,R as Lt,n as Pt,t as fe,a as ue,o as d,d as ke,A as At,q as ye,r as Ft,x as ae}from"./index-Bp3jGQ0J.js";import{S as Rt}from"./SdkTabs-DxNNd6Sw.js";import{F as Bt}from"./FieldsQueryParam-zDO3HzQv.js";function kt(o,e,t){const a=o.slice();return a[8]=e[t],a}function yt(o,e,t){const a=o.slice();return a[8]=e[t],a}function vt(o,e,t){const a=o.slice();return a[13]=e[t],a}function gt(o){let e;return{c(){e=s("p"),e.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",v(e,"class","txt-hint txt-sm txt-right")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function wt(o){let e,t,a,u,m,c,p,y,S,T,w,H,D,E,P,I,j,B,C,N,q,g,b;function O(h,$){var ee,K;return(K=(ee=h[0])==null?void 0:ee.options)!=null&&K.requireEmail?Dt:jt}let z=O(o),A=z(o);return{c(){e=s("tr"),e.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',t=f(),a=s("tr"),a.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.
|
||||
<br/>
|
||||
If not set, it will be auto generated.</td>`,u=f(),m=s("tr"),c=s("td"),p=s("div"),A.c(),y=f(),S=s("span"),S.textContent="email",T=f(),w=s("td"),w.innerHTML='<span class="label">String</span>',H=f(),D=s("td"),D.textContent="Auth record email address.",E=f(),P=s("tr"),P.innerHTML='<td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>emailVisibility</span></div></td> <td><span class="label">Boolean</span></td> <td>Whether to show/hide the auth record email when fetching the record data.</td>',I=f(),j=s("tr"),j.innerHTML='<td><div class="inline-flex"><span class="label label-success">Required</span> <span>password</span></div></td> <td><span class="label">String</span></td> <td>Auth record password.</td>',B=f(),C=s("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=f(),q=s("tr"),q.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 "Manage" access.</td>`,g=f(),b=s("tr"),b.innerHTML='<td colspan="3" class="txt-hint">Schema fields</td>',v(p,"class","inline-flex")},m(h,$){r(h,e,$),r(h,t,$),r(h,a,$),r(h,u,$),r(h,m,$),n(m,c),n(c,p),A.m(p,null),n(p,y),n(p,S),n(m,T),n(m,w),n(m,H),n(m,D),r(h,E,$),r(h,P,$),r(h,I,$),r(h,j,$),r(h,B,$),r(h,C,$),r(h,N,$),r(h,q,$),r(h,g,$),r(h,b,$)},p(h,$){z!==(z=O(h))&&(A.d(1),A=z(h),A&&(A.c(),A.m(p,y)))},d(h){h&&(d(e),d(t),d(a),d(u),d(m),d(E),d(P),d(I),d(j),d(B),d(C),d(N),d(q),d(g),d(b)),A.d()}}}function jt(o){let e;return{c(){e=s("span"),e.textContent="Optional",v(e,"class","label label-warning")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function Dt(o){let e;return{c(){e=s("span"),e.textContent="Required",v(e,"class","label label-success")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function Nt(o){let e;return{c(){e=s("span"),e.textContent="Optional",v(e,"class","label label-warning")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function Vt(o){let e;return{c(){e=s("span"),e.textContent="Required",v(e,"class","label label-success")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function Jt(o){var m;let e,t=((m=o[13].options)==null?void 0:m.maxSelect)===1?"id":"ids",a,u;return{c(){e=_("Relation record "),a=_(t),u=_(".")},m(c,p){r(c,e,p),r(c,a,p),r(c,u,p)},p(c,p){var y;p&1&&t!==(t=((y=c[13].options)==null?void 0:y.maxSelect)===1?"id":"ids")&&x(a,t)},d(c){c&&(d(e),d(a),d(u))}}}function Et(o){let e,t,a,u,m;return{c(){e=_("File object."),t=s("br"),a=_(`
|
||||
Set to `),u=s("code"),u.textContent="null",m=_(" to delete already uploaded file(s).")},m(c,p){r(c,e,p),r(c,t,p),r(c,a,p),r(c,u,p),r(c,m,p)},p:ae,d(c){c&&(d(e),d(t),d(a),d(u),d(m))}}}function It(o){let e;return{c(){e=_("URL address.")},m(t,a){r(t,e,a)},p:ae,d(t){t&&d(e)}}}function Ut(o){let e;return{c(){e=_("Email address.")},m(t,a){r(t,e,a)},p:ae,d(t){t&&d(e)}}}function Qt(o){let e;return{c(){e=_("JSON array or object.")},m(t,a){r(t,e,a)},p:ae,d(t){t&&d(e)}}}function zt(o){let e;return{c(){e=_("Number value.")},m(t,a){r(t,e,a)},p:ae,d(t){t&&d(e)}}}function Kt(o){let e;return{c(){e=_("Plain text value.")},m(t,a){r(t,e,a)},p:ae,d(t){t&&d(e)}}}function Ct(o,e){let t,a,u,m,c,p=e[13].name+"",y,S,T,w,H=Q.getFieldValueType(e[13])+"",D,E,P,I;function j(b,O){return b[13].required?Vt:Nt}let B=j(e),C=B(e);function N(b,O){if(b[13].type==="text")return Kt;if(b[13].type==="number")return zt;if(b[13].type==="json")return Qt;if(b[13].type==="email")return Ut;if(b[13].type==="url")return It;if(b[13].type==="file")return Et;if(b[13].type==="relation")return Jt}let q=N(e),g=q&&q(e);return{key:o,first:null,c(){t=s("tr"),a=s("td"),u=s("div"),C.c(),m=f(),c=s("span"),y=_(p),S=f(),T=s("td"),w=s("span"),D=_(H),E=f(),P=s("td"),g&&g.c(),I=f(),v(u,"class","inline-flex"),v(w,"class","label"),this.first=t},m(b,O){r(b,t,O),n(t,a),n(a,u),C.m(u,null),n(u,m),n(u,c),n(c,y),n(t,S),n(t,T),n(T,w),n(w,D),n(t,E),n(t,P),g&&g.m(P,null),n(t,I)},p(b,O){e=b,B!==(B=j(e))&&(C.d(1),C=B(e),C&&(C.c(),C.m(u,m))),O&1&&p!==(p=e[13].name+"")&&x(y,p),O&1&&H!==(H=Q.getFieldValueType(e[13])+"")&&x(D,H),q===(q=N(e))&&g?g.p(e,O):(g&&g.d(1),g=q&&q(e),g&&(g.c(),g.m(P,null)))},d(b){b&&d(t),C.d(),g&&g.d()}}}function $t(o,e){let t,a=e[8].code+"",u,m,c,p;function y(){return e[7](e[8])}return{key:o,first:null,c(){t=s("button"),u=_(a),m=f(),v(t,"class","tab-item"),ye(t,"active",e[2]===e[8].code),this.first=t},m(S,T){r(S,t,T),n(t,u),n(t,m),c||(p=Ft(t,"click",y),c=!0)},p(S,T){e=S,T&8&&a!==(a=e[8].code+"")&&x(u,a),T&12&&ye(t,"active",e[2]===e[8].code)},d(S){S&&d(t),c=!1,p()}}}function St(o,e){let t,a,u,m;return a=new Tt({props:{content:e[8].body}}),{key:o,first:null,c(){t=s("div"),_e(a.$$.fragment),u=f(),v(t,"class","tab-item"),ye(t,"active",e[2]===e[8].code),this.first=t},m(c,p){r(c,t,p),he(a,t,null),n(t,u),m=!0},p(c,p){e=c;const y={};p&8&&(y.content=e[8].body),a.$set(y),(!m||p&12)&&ye(t,"active",e[2]===e[8].code)},i(c){m||(fe(a.$$.fragment,c),m=!0)},o(c){ue(a.$$.fragment,c),m=!1},d(c){c&&d(t),ke(a)}}}function Wt(o){var ot,rt,dt,ct,pt;let e,t,a=o[0].name+"",u,m,c,p,y,S,T,w=o[0].name+"",H,D,E,P,I,j,B,C,N,q,g,b,O,z,A,h,$,ee,K=o[0].name+"",ve,je,De,ge,ie,we,W,Ce,Ne,U,$e,Ve,Se,V=[],Je=new Map,Te,se,qe,Y,Oe,Ee,oe,G,Me,Ie,He,Ue,M,Qe,te,ze,Ke,We,Le,Ye,Pe,Ge,Xe,Ze,Ae,xe,et,le,Fe,re,Re,X,de,J=[],tt=new Map,lt,ce,F=[],nt=new Map,Z;C=new Rt({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[5]}');
|
||||
|
||||
...
|
||||
|
||||
// example create data
|
||||
const data = ${JSON.stringify(Object.assign({},o[4],Q.dummyCollectionSchemaData(o[0])),null,4)};
|
||||
|
||||
const record = await pb.collection('${(ot=o[0])==null?void 0:ot.name}').create(data);
|
||||
`+(o[1]?`
|
||||
// (optional) send an email verification request
|
||||
await pb.collection('${(rt=o[0])==null?void 0:rt.name}').requestVerification('test@example.com');
|
||||
`:""),dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${o[5]}');
|
||||
|
||||
...
|
||||
|
||||
// example create body
|
||||
final body = <String, dynamic>${JSON.stringify(Object.assign({},o[4],Q.dummyCollectionSchemaData(o[0])),null,2)};
|
||||
|
||||
final record = await pb.collection('${(dt=o[0])==null?void 0:dt.name}').create(body: body);
|
||||
`+(o[1]?`
|
||||
// (optional) send an email verification request
|
||||
await pb.collection('${(ct=o[0])==null?void 0:ct.name}').requestVerification('test@example.com');
|
||||
`:"")}});let R=o[6]&>(),L=o[1]&&wt(o),me=ne((pt=o[0])==null?void 0:pt.schema);const at=l=>l[13].name;for(let l=0;l<me.length;l+=1){let i=vt(o,me,l),k=at(i);Je.set(k,V[l]=Ct(k,i))}te=new Tt({props:{content:"?expand=relField1,relField2.subRelField"}}),le=new Bt({});let be=ne(o[3]);const it=l=>l[8].code;for(let l=0;l<be.length;l+=1){let i=yt(o,be,l),k=it(i);tt.set(k,J[l]=$t(k,i))}let pe=ne(o[3]);const st=l=>l[8].code;for(let l=0;l<pe.length;l+=1){let i=kt(o,pe,l),k=st(i);nt.set(k,F[l]=St(k,i))}return{c(){e=s("h3"),t=_("Create ("),u=_(a),m=_(")"),c=f(),p=s("div"),y=s("p"),S=_("Create a new "),T=s("strong"),H=_(w),D=_(" record."),E=f(),P=s("p"),P.innerHTML=`Body parameters could be sent as <code>application/json</code> or
|
||||
<code>multipart/form-data</code>.`,I=f(),j=s("p"),j.innerHTML=`File upload is supported only via <code>multipart/form-data</code>.
|
||||
<br/>
|
||||
For more info and examples you could check the detailed
|
||||
<a href="https://pocketbase.io/docs/files-handling/" target="_blank" rel="noopener noreferrer">Files upload and handling docs
|
||||
</a>.`,B=f(),_e(C.$$.fragment),N=f(),q=s("h6"),q.textContent="API details",g=f(),b=s("div"),O=s("strong"),O.textContent="POST",z=f(),A=s("div"),h=s("p"),$=_("/api/collections/"),ee=s("strong"),ve=_(K),je=_("/records"),De=f(),R&&R.c(),ge=f(),ie=s("div"),ie.textContent="Body Parameters",we=f(),W=s("table"),Ce=s("thead"),Ce.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="50%">Description</th></tr>',Ne=f(),U=s("tbody"),$e=s("tr"),$e.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>`,Ve=f(),L&&L.c(),Se=f();for(let l=0;l<V.length;l+=1)V[l].c();Te=f(),se=s("div"),se.textContent="Query parameters",qe=f(),Y=s("table"),Oe=s("thead"),Oe.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',Ee=f(),oe=s("tbody"),G=s("tr"),Me=s("td"),Me.textContent="expand",Ie=f(),He=s("td"),He.innerHTML='<span class="label">String</span>',Ue=f(),M=s("td"),Qe=_(`Auto expand relations when returning the created record. Ex.:
|
||||
`),_e(te.$$.fragment),ze=_(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Ke=s("br"),We=_(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),Le=s("code"),Le.textContent="expand",Ye=_(" property (eg. "),Pe=s("code"),Pe.textContent='"expand": {"relField1": {...}, ...}',Ge=_(`).
|
||||
`),Xe=s("br"),Ze=_(`
|
||||
Only the relations to which the request user has permissions to `),Ae=s("strong"),Ae.textContent="view",xe=_(" will be expanded."),et=f(),_e(le.$$.fragment),Fe=f(),re=s("div"),re.textContent="Responses",Re=f(),X=s("div"),de=s("div");for(let l=0;l<J.length;l+=1)J[l].c();lt=f(),ce=s("div");for(let l=0;l<F.length;l+=1)F[l].c();v(e,"class","m-b-sm"),v(p,"class","content txt-lg m-b-sm"),v(q,"class","m-b-xs"),v(O,"class","label label-primary"),v(A,"class","content"),v(b,"class","alert alert-success"),v(ie,"class","section-title"),v(W,"class","table-compact table-border m-b-base"),v(se,"class","section-title"),v(Y,"class","table-compact table-border m-b-base"),v(re,"class","section-title"),v(de,"class","tabs-header compact combined left"),v(ce,"class","tabs-content"),v(X,"class","tabs")},m(l,i){r(l,e,i),n(e,t),n(e,u),n(e,m),r(l,c,i),r(l,p,i),n(p,y),n(y,S),n(y,T),n(T,H),n(y,D),n(p,E),n(p,P),n(p,I),n(p,j),r(l,B,i),he(C,l,i),r(l,N,i),r(l,q,i),r(l,g,i),r(l,b,i),n(b,O),n(b,z),n(b,A),n(A,h),n(h,$),n(h,ee),n(ee,ve),n(h,je),n(b,De),R&&R.m(b,null),r(l,ge,i),r(l,ie,i),r(l,we,i),r(l,W,i),n(W,Ce),n(W,Ne),n(W,U),n(U,$e),n(U,Ve),L&&L.m(U,null),n(U,Se);for(let k=0;k<V.length;k+=1)V[k]&&V[k].m(U,null);r(l,Te,i),r(l,se,i),r(l,qe,i),r(l,Y,i),n(Y,Oe),n(Y,Ee),n(Y,oe),n(oe,G),n(G,Me),n(G,Ie),n(G,He),n(G,Ue),n(G,M),n(M,Qe),he(te,M,null),n(M,ze),n(M,Ke),n(M,We),n(M,Le),n(M,Ye),n(M,Pe),n(M,Ge),n(M,Xe),n(M,Ze),n(M,Ae),n(M,xe),n(oe,et),he(le,oe,null),r(l,Fe,i),r(l,re,i),r(l,Re,i),r(l,X,i),n(X,de);for(let k=0;k<J.length;k+=1)J[k]&&J[k].m(de,null);n(X,lt),n(X,ce);for(let k=0;k<F.length;k+=1)F[k]&&F[k].m(ce,null);Z=!0},p(l,[i]){var ft,ut,mt,bt,_t;(!Z||i&1)&&a!==(a=l[0].name+"")&&x(u,a),(!Z||i&1)&&w!==(w=l[0].name+"")&&x(H,w);const k={};i&51&&(k.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${l[5]}');
|
||||
|
||||
...
|
||||
|
||||
// example create data
|
||||
const data = ${JSON.stringify(Object.assign({},l[4],Q.dummyCollectionSchemaData(l[0])),null,4)};
|
||||
|
||||
const record = await pb.collection('${(ft=l[0])==null?void 0:ft.name}').create(data);
|
||||
`+(l[1]?`
|
||||
// (optional) send an email verification request
|
||||
await pb.collection('${(ut=l[0])==null?void 0:ut.name}').requestVerification('test@example.com');
|
||||
`:"")),i&51&&(k.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${l[5]}');
|
||||
|
||||
...
|
||||
|
||||
// example create body
|
||||
final body = <String, dynamic>${JSON.stringify(Object.assign({},l[4],Q.dummyCollectionSchemaData(l[0])),null,2)};
|
||||
|
||||
final record = await pb.collection('${(mt=l[0])==null?void 0:mt.name}').create(body: body);
|
||||
`+(l[1]?`
|
||||
// (optional) send an email verification request
|
||||
await pb.collection('${(bt=l[0])==null?void 0:bt.name}').requestVerification('test@example.com');
|
||||
`:"")),C.$set(k),(!Z||i&1)&&K!==(K=l[0].name+"")&&x(ve,K),l[6]?R||(R=gt(),R.c(),R.m(b,null)):R&&(R.d(1),R=null),l[1]?L?L.p(l,i):(L=wt(l),L.c(),L.m(U,Se)):L&&(L.d(1),L=null),i&1&&(me=ne((_t=l[0])==null?void 0:_t.schema),V=Be(V,i,at,1,l,me,Je,U,ht,Ct,null,vt)),i&12&&(be=ne(l[3]),J=Be(J,i,it,1,l,be,tt,de,ht,$t,null,yt)),i&12&&(pe=ne(l[3]),Ht(),F=Be(F,i,st,1,l,pe,nt,ce,Lt,St,null,kt),Pt())},i(l){if(!Z){fe(C.$$.fragment,l),fe(te.$$.fragment,l),fe(le.$$.fragment,l);for(let i=0;i<pe.length;i+=1)fe(F[i]);Z=!0}},o(l){ue(C.$$.fragment,l),ue(te.$$.fragment,l),ue(le.$$.fragment,l);for(let i=0;i<F.length;i+=1)ue(F[i]);Z=!1},d(l){l&&(d(e),d(c),d(p),d(B),d(N),d(q),d(g),d(b),d(ge),d(ie),d(we),d(W),d(Te),d(se),d(qe),d(Y),d(Fe),d(re),d(Re),d(X)),ke(C,l),R&&R.d(),L&&L.d();for(let i=0;i<V.length;i+=1)V[i].d();ke(te),ke(le);for(let i=0;i<J.length;i+=1)J[i].d();for(let i=0;i<F.length;i+=1)F[i].d()}}}function Yt(o,e,t){let a,u,m,{collection:c}=e,p=200,y=[],S={};const T=w=>t(2,p=w.code);return o.$$set=w=>{"collection"in w&&t(0,c=w.collection)},o.$$.update=()=>{var w,H;o.$$.dirty&1&&t(1,a=c.type==="auth"),o.$$.dirty&1&&t(6,u=(c==null?void 0:c.createRule)===null),o.$$.dirty&1&&t(3,y=[{code:200,body:JSON.stringify(Q.dummyCollectionRecord(c),null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to create record.",
|
||||
"data": {
|
||||
"${(H=(w=c==null?void 0:c.schema)==null?void 0:w[0])==null?void 0:H.name}": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "You are not allowed to perform this request.",
|
||||
"data": {}
|
||||
}
|
||||
`}]),o.$$.dirty&2&&(a?t(4,S={username:"test_username",email:"test@example.com",emailVisibility:!0,password:"12345678",passwordConfirm:"12345678"}):t(4,S={}))},t(5,m=Q.getApiExampleUrl(At.baseUrl)),[c,a,p,y,S,m,u,T]}class xt extends qt{constructor(e){super(),Ot(this,e,Yt,Wt,Mt,{collection:0})}}export{xt as default};
|
||||
@@ -0,0 +1,53 @@
|
||||
import{S as Re,i as Ee,s as Pe,Q as Te,T as j,e as c,w as y,b as k,c as De,f as m,g as p,h as i,m as Ce,x as ee,U as he,V as Be,k as Oe,W as Ie,n as Ae,t as te,a as le,o as f,d as we,C as Me,p as qe,r as z,u as Le,R as Se}from"./index-B-F-pko3.js";function ke(a,l,s){const o=a.slice();return o[6]=l[s],o}function ge(a,l,s){const o=a.slice();return o[6]=l[s],o}function ve(a){let l;return{c(){l=c("p"),l.innerHTML="Requires superuser <code>Authorization:TOKEN</code> header",m(l,"class","txt-hint txt-sm txt-right")},m(s,o){p(s,l,o)},d(s){s&&f(l)}}}function ye(a,l){let s,o,h;function r(){return l[5](l[6])}return{key:a,first:null,c(){s=c("button"),s.textContent=`${l[6].code} `,m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(n,d){p(n,s,d),o||(h=Le(s,"click",r),o=!0)},p(n,d){l=n,d&20&&z(s,"active",l[2]===l[6].code)},d(n){n&&f(s),o=!1,h()}}}function $e(a,l){let s,o,h,r;return o=new Se({props:{content:l[6].body}}),{key:a,first:null,c(){s=c("div"),De(o.$$.fragment),h=k(),m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(n,d){p(n,s,d),Ce(o,s,null),i(s,h),r=!0},p(n,d){l=n,(!r||d&20)&&z(s,"active",l[2]===l[6].code)},i(n){r||(te(o.$$.fragment,n),r=!0)},o(n){le(o.$$.fragment,n),r=!1},d(n){n&&f(s),we(o)}}}function Ue(a){var fe,me;let l,s,o=a[0].name+"",h,r,n,d,$,D,F,q=a[0].name+"",K,se,N,C,Q,P,V,g,L,ae,S,E,oe,W,U=a[0].name+"",G,ne,J,ie,X,T,Y,B,Z,O,x,w,I,v=[],ce=new Map,re,A,b=[],de=new Map,R;C=new Te({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${a[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(fe=a[0])==null?void 0:fe.name}').delete('RECORD_ID');
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${a[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(me=a[0])==null?void 0:me.name}').delete('RECORD_ID');
|
||||
`}});let _=a[1]&&ve(),H=j(a[4]);const ue=e=>e[6].code;for(let e=0;e<H.length;e+=1){let t=ge(a,H,e),u=ue(t);ce.set(u,v[e]=ye(u,t))}let M=j(a[4]);const pe=e=>e[6].code;for(let e=0;e<M.length;e+=1){let t=ke(a,M,e),u=pe(t);de.set(u,b[e]=$e(u,t))}return{c(){l=c("h3"),s=y("Delete ("),h=y(o),r=y(")"),n=k(),d=c("div"),$=c("p"),D=y("Delete a single "),F=c("strong"),K=y(q),se=y(" record."),N=k(),De(C.$$.fragment),Q=k(),P=c("h6"),P.textContent="API details",V=k(),g=c("div"),L=c("strong"),L.textContent="DELETE",ae=k(),S=c("div"),E=c("p"),oe=y("/api/collections/"),W=c("strong"),G=y(U),ne=y("/records/"),J=c("strong"),J.textContent=":id",ie=k(),_&&_.c(),X=k(),T=c("div"),T.textContent="Path parameters",Y=k(),B=c("table"),B.innerHTML='<thead><tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr></thead> <tbody><tr><td>id</td> <td><span class="label">String</span></td> <td>ID of the record to delete.</td></tr></tbody>',Z=k(),O=c("div"),O.textContent="Responses",x=k(),w=c("div"),I=c("div");for(let e=0;e<v.length;e+=1)v[e].c();re=k(),A=c("div");for(let e=0;e<b.length;e+=1)b[e].c();m(l,"class","m-b-sm"),m(d,"class","content txt-lg m-b-sm"),m(P,"class","m-b-xs"),m(L,"class","label label-primary"),m(S,"class","content"),m(g,"class","alert alert-danger"),m(T,"class","section-title"),m(B,"class","table-compact table-border m-b-base"),m(O,"class","section-title"),m(I,"class","tabs-header compact combined left"),m(A,"class","tabs-content"),m(w,"class","tabs")},m(e,t){p(e,l,t),i(l,s),i(l,h),i(l,r),p(e,n,t),p(e,d,t),i(d,$),i($,D),i($,F),i(F,K),i($,se),p(e,N,t),Ce(C,e,t),p(e,Q,t),p(e,P,t),p(e,V,t),p(e,g,t),i(g,L),i(g,ae),i(g,S),i(S,E),i(E,oe),i(E,W),i(W,G),i(E,ne),i(E,J),i(g,ie),_&&_.m(g,null),p(e,X,t),p(e,T,t),p(e,Y,t),p(e,B,t),p(e,Z,t),p(e,O,t),p(e,x,t),p(e,w,t),i(w,I);for(let u=0;u<v.length;u+=1)v[u]&&v[u].m(I,null);i(w,re),i(w,A);for(let u=0;u<b.length;u+=1)b[u]&&b[u].m(A,null);R=!0},p(e,[t]){var be,_e;(!R||t&1)&&o!==(o=e[0].name+"")&&ee(h,o),(!R||t&1)&&q!==(q=e[0].name+"")&&ee(K,q);const u={};t&9&&(u.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(be=e[0])==null?void 0:be.name}').delete('RECORD_ID');
|
||||
`),t&9&&(u.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(_e=e[0])==null?void 0:_e.name}').delete('RECORD_ID');
|
||||
`),C.$set(u),(!R||t&1)&&U!==(U=e[0].name+"")&&ee(G,U),e[1]?_||(_=ve(),_.c(),_.m(g,null)):_&&(_.d(1),_=null),t&20&&(H=j(e[4]),v=he(v,t,ue,1,e,H,ce,I,Be,ye,null,ge)),t&20&&(M=j(e[4]),Oe(),b=he(b,t,pe,1,e,M,de,A,Ie,$e,null,ke),Ae())},i(e){if(!R){te(C.$$.fragment,e);for(let t=0;t<M.length;t+=1)te(b[t]);R=!0}},o(e){le(C.$$.fragment,e);for(let t=0;t<b.length;t+=1)le(b[t]);R=!1},d(e){e&&(f(l),f(n),f(d),f(N),f(Q),f(P),f(V),f(g),f(X),f(T),f(Y),f(B),f(Z),f(O),f(x),f(w)),we(C,e),_&&_.d();for(let t=0;t<v.length;t+=1)v[t].d();for(let t=0;t<b.length;t+=1)b[t].d()}}}function He(a,l,s){let o,h,{collection:r}=l,n=204,d=[];const $=D=>s(2,n=D.code);return a.$$set=D=>{"collection"in D&&s(0,r=D.collection)},a.$$.update=()=>{a.$$.dirty&1&&s(1,o=(r==null?void 0:r.deleteRule)===null),a.$$.dirty&3&&r!=null&&r.id&&(d.push({code:204,body:`
|
||||
null
|
||||
`}),d.push({code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to delete record. Make sure that the record is not part of a required relation reference.",
|
||||
"data": {}
|
||||
}
|
||||
`}),o&&d.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only superusers can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),d.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},s(3,h=Me.getApiExampleUrl(qe.baseURL)),[r,o,n,h,d,$]}class ze extends Re{constructor(l){super(),Ee(this,l,He,Ue,Pe,{collection:0})}}export{ze as default};
|
||||
@@ -1,53 +0,0 @@
|
||||
import{S as Re,i as Pe,s as Ee,O as j,e as c,v as y,b as k,c as Ce,f as m,g as p,h as i,m as De,w as ee,P as he,Q as Oe,k as Te,R as Ae,n as Be,t as te,a as le,o as u,d as we,C as Ie,A as qe,q as N,r as Me,N as Se}from"./index-Bp3jGQ0J.js";import{S as He}from"./SdkTabs-DxNNd6Sw.js";function ke(a,l,s){const o=a.slice();return o[6]=l[s],o}function ge(a,l,s){const o=a.slice();return o[6]=l[s],o}function ve(a){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,o){p(s,l,o)},d(s){s&&u(l)}}}function ye(a,l){let s,o,h;function d(){return l[5](l[6])}return{key:a,first:null,c(){s=c("button"),s.textContent=`${l[6].code} `,m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(n,r){p(n,s,r),o||(h=Me(s,"click",d),o=!0)},p(n,r){l=n,r&20&&N(s,"active",l[2]===l[6].code)},d(n){n&&u(s),o=!1,h()}}}function $e(a,l){let s,o,h,d;return o=new Se({props:{content:l[6].body}}),{key:a,first:null,c(){s=c("div"),Ce(o.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(n,r){p(n,s,r),De(o,s,null),i(s,h),d=!0},p(n,r){l=n,(!d||r&20)&&N(s,"active",l[2]===l[6].code)},i(n){d||(te(o.$$.fragment,n),d=!0)},o(n){le(o.$$.fragment,n),d=!1},d(n){n&&u(s),we(o)}}}function Le(a){var ue,me;let l,s,o=a[0].name+"",h,d,n,r,$,C,z,M=a[0].name+"",F,se,K,D,Q,E,G,g,S,ae,H,P,oe,J,L=a[0].name+"",V,ne,W,ie,X,O,Y,T,Z,A,x,w,B,v=[],ce=new Map,de,I,b=[],re=new Map,R;D=new He({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${a[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(ue=a[0])==null?void 0:ue.name}').delete('RECORD_ID');
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${a[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(me=a[0])==null?void 0:me.name}').delete('RECORD_ID');
|
||||
`}});let _=a[1]&&ve(),U=j(a[4]);const fe=e=>e[6].code;for(let e=0;e<U.length;e+=1){let t=ge(a,U,e),f=fe(t);ce.set(f,v[e]=ye(f,t))}let q=j(a[4]);const pe=e=>e[6].code;for(let e=0;e<q.length;e+=1){let t=ke(a,q,e),f=pe(t);re.set(f,b[e]=$e(f,t))}return{c(){l=c("h3"),s=y("Delete ("),h=y(o),d=y(")"),n=k(),r=c("div"),$=c("p"),C=y("Delete a single "),z=c("strong"),F=y(M),se=y(" record."),K=k(),Ce(D.$$.fragment),Q=k(),E=c("h6"),E.textContent="API details",G=k(),g=c("div"),S=c("strong"),S.textContent="DELETE",ae=k(),H=c("div"),P=c("p"),oe=y("/api/collections/"),J=c("strong"),V=y(L),ne=y("/records/"),W=c("strong"),W.textContent=":id",ie=k(),_&&_.c(),X=k(),O=c("div"),O.textContent="Path parameters",Y=k(),T=c("table"),T.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>',Z=k(),A=c("div"),A.textContent="Responses",x=k(),w=c("div"),B=c("div");for(let e=0;e<v.length;e+=1)v[e].c();de=k(),I=c("div");for(let e=0;e<b.length;e+=1)b[e].c();m(l,"class","m-b-sm"),m(r,"class","content txt-lg m-b-sm"),m(E,"class","m-b-xs"),m(S,"class","label label-primary"),m(H,"class","content"),m(g,"class","alert alert-danger"),m(O,"class","section-title"),m(T,"class","table-compact table-border m-b-base"),m(A,"class","section-title"),m(B,"class","tabs-header compact combined left"),m(I,"class","tabs-content"),m(w,"class","tabs")},m(e,t){p(e,l,t),i(l,s),i(l,h),i(l,d),p(e,n,t),p(e,r,t),i(r,$),i($,C),i($,z),i(z,F),i($,se),p(e,K,t),De(D,e,t),p(e,Q,t),p(e,E,t),p(e,G,t),p(e,g,t),i(g,S),i(g,ae),i(g,H),i(H,P),i(P,oe),i(P,J),i(J,V),i(P,ne),i(P,W),i(g,ie),_&&_.m(g,null),p(e,X,t),p(e,O,t),p(e,Y,t),p(e,T,t),p(e,Z,t),p(e,A,t),p(e,x,t),p(e,w,t),i(w,B);for(let f=0;f<v.length;f+=1)v[f]&&v[f].m(B,null);i(w,de),i(w,I);for(let f=0;f<b.length;f+=1)b[f]&&b[f].m(I,null);R=!0},p(e,[t]){var be,_e;(!R||t&1)&&o!==(o=e[0].name+"")&&ee(h,o),(!R||t&1)&&M!==(M=e[0].name+"")&&ee(F,M);const f={};t&9&&(f.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(be=e[0])==null?void 0:be.name}').delete('RECORD_ID');
|
||||
`),t&9&&(f.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(_e=e[0])==null?void 0:_e.name}').delete('RECORD_ID');
|
||||
`),D.$set(f),(!R||t&1)&&L!==(L=e[0].name+"")&&ee(V,L),e[1]?_||(_=ve(),_.c(),_.m(g,null)):_&&(_.d(1),_=null),t&20&&(U=j(e[4]),v=he(v,t,fe,1,e,U,ce,B,Oe,ye,null,ge)),t&20&&(q=j(e[4]),Te(),b=he(b,t,pe,1,e,q,re,I,Ae,$e,null,ke),Be())},i(e){if(!R){te(D.$$.fragment,e);for(let t=0;t<q.length;t+=1)te(b[t]);R=!0}},o(e){le(D.$$.fragment,e);for(let t=0;t<b.length;t+=1)le(b[t]);R=!1},d(e){e&&(u(l),u(n),u(r),u(K),u(Q),u(E),u(G),u(g),u(X),u(O),u(Y),u(T),u(Z),u(A),u(x),u(w)),we(D,e),_&&_.d();for(let t=0;t<v.length;t+=1)v[t].d();for(let t=0;t<b.length;t+=1)b[t].d()}}}function Ue(a,l,s){let o,h,{collection:d}=l,n=204,r=[];const $=C=>s(2,n=C.code);return a.$$set=C=>{"collection"in C&&s(0,d=C.collection)},a.$$.update=()=>{a.$$.dirty&1&&s(1,o=(d==null?void 0:d.deleteRule)===null),a.$$.dirty&3&&d!=null&&d.id&&(r.push({code:204,body:`
|
||||
null
|
||||
`}),r.push({code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to delete record. Make sure that the record is not part of a required relation reference.",
|
||||
"data": {}
|
||||
}
|
||||
`}),o&&r.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),r.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},s(3,h=Ie.getApiExampleUrl(qe.baseUrl)),[d,o,n,h,r,$]}class ze extends Re{constructor(l){super(),Pe(this,l,Ue,Le,Ee,{collection:0})}}export{ze as default};
|
||||
@@ -0,0 +1,120 @@
|
||||
import{S as se,i as oe,s as ie,T as K,e as p,b as y,w as U,f as b,g,h as u,x as J,U as le,V as Re,k as ne,W as Se,n as ae,t as Q,a as V,o as v,r as Y,u as ce,R as Oe,c as x,m as ee,d as te,Q as Me,X as _e,C as Be,p as De,Y as be}from"./index-B-F-pko3.js";function ge(n,e,t){const l=n.slice();return l[4]=e[t],l}function ve(n,e,t){const l=n.slice();return l[4]=e[t],l}function ke(n,e){let t,l=e[4].code+"",d,i,r,a;function m(){return e[3](e[4])}return{key:n,first:null,c(){t=p("button"),d=U(l),i=y(),b(t,"class","tab-item"),Y(t,"active",e[1]===e[4].code),this.first=t},m(k,P){g(k,t,P),u(t,d),u(t,i),r||(a=ce(t,"click",m),r=!0)},p(k,P){e=k,P&4&&l!==(l=e[4].code+"")&&J(d,l),P&6&&Y(t,"active",e[1]===e[4].code)},d(k){k&&v(t),r=!1,a()}}}function $e(n,e){let t,l,d,i;return l=new Oe({props:{content:e[4].body}}),{key:n,first:null,c(){t=p("div"),x(l.$$.fragment),d=y(),b(t,"class","tab-item"),Y(t,"active",e[1]===e[4].code),this.first=t},m(r,a){g(r,t,a),ee(l,t,null),u(t,d),i=!0},p(r,a){e=r;const m={};a&4&&(m.content=e[4].body),l.$set(m),(!i||a&6)&&Y(t,"active",e[1]===e[4].code)},i(r){i||(Q(l.$$.fragment,r),i=!0)},o(r){V(l.$$.fragment,r),i=!1},d(r){r&&v(t),te(l)}}}function Ne(n){let e,t,l,d,i,r,a,m=n[0].name+"",k,P,G,H,F,L,z,B,D,S,N,T=[],O=new Map,A,j,q=[],W=new Map,w,E=K(n[2]);const M=c=>c[4].code;for(let c=0;c<E.length;c+=1){let f=ve(n,E,c),s=M(f);O.set(s,T[c]=ke(s,f))}let _=K(n[2]);const X=c=>c[4].code;for(let c=0;c<_.length;c+=1){let f=ge(n,_,c),s=X(f);W.set(s,q[c]=$e(s,f))}return{c(){e=p("div"),t=p("strong"),t.textContent="POST",l=y(),d=p("div"),i=p("p"),r=U("/api/collections/"),a=p("strong"),k=U(m),P=U("/confirm-email-change"),G=y(),H=p("div"),H.textContent="Body Parameters",F=y(),L=p("table"),L.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 change email request email.</td></tr> <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>',z=y(),B=p("div"),B.textContent="Responses",D=y(),S=p("div"),N=p("div");for(let c=0;c<T.length;c+=1)T[c].c();A=y(),j=p("div");for(let c=0;c<q.length;c+=1)q[c].c();b(t,"class","label label-primary"),b(d,"class","content"),b(e,"class","alert alert-success"),b(H,"class","section-title"),b(L,"class","table-compact table-border m-b-base"),b(B,"class","section-title"),b(N,"class","tabs-header compact combined left"),b(j,"class","tabs-content"),b(S,"class","tabs")},m(c,f){g(c,e,f),u(e,t),u(e,l),u(e,d),u(d,i),u(i,r),u(i,a),u(a,k),u(i,P),g(c,G,f),g(c,H,f),g(c,F,f),g(c,L,f),g(c,z,f),g(c,B,f),g(c,D,f),g(c,S,f),u(S,N);for(let s=0;s<T.length;s+=1)T[s]&&T[s].m(N,null);u(S,A),u(S,j);for(let s=0;s<q.length;s+=1)q[s]&&q[s].m(j,null);w=!0},p(c,[f]){(!w||f&1)&&m!==(m=c[0].name+"")&&J(k,m),f&6&&(E=K(c[2]),T=le(T,f,M,1,c,E,O,N,Re,ke,null,ve)),f&6&&(_=K(c[2]),ne(),q=le(q,f,X,1,c,_,W,j,Se,$e,null,ge),ae())},i(c){if(!w){for(let f=0;f<_.length;f+=1)Q(q[f]);w=!0}},o(c){for(let f=0;f<q.length;f+=1)V(q[f]);w=!1},d(c){c&&(v(e),v(G),v(H),v(F),v(L),v(z),v(B),v(D),v(S));for(let f=0;f<T.length;f+=1)T[f].d();for(let f=0;f<q.length;f+=1)q[f].d()}}}function We(n,e,t){let{collection:l}=e,d=204,i=[];const r=a=>t(1,d=a.code);return n.$$set=a=>{"collection"in a&&t(0,l=a.collection)},t(2,i=[{code:204,body:"null"},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"token": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`}]),[l,d,i,r]}class He extends se{constructor(e){super(),oe(this,e,We,Ne,ie,{collection:0})}}function we(n,e,t){const l=n.slice();return l[4]=e[t],l}function Ce(n,e,t){const l=n.slice();return l[4]=e[t],l}function ye(n,e){let t,l=e[4].code+"",d,i,r,a;function m(){return e[3](e[4])}return{key:n,first:null,c(){t=p("button"),d=U(l),i=y(),b(t,"class","tab-item"),Y(t,"active",e[1]===e[4].code),this.first=t},m(k,P){g(k,t,P),u(t,d),u(t,i),r||(a=ce(t,"click",m),r=!0)},p(k,P){e=k,P&4&&l!==(l=e[4].code+"")&&J(d,l),P&6&&Y(t,"active",e[1]===e[4].code)},d(k){k&&v(t),r=!1,a()}}}function Ee(n,e){let t,l,d,i;return l=new Oe({props:{content:e[4].body}}),{key:n,first:null,c(){t=p("div"),x(l.$$.fragment),d=y(),b(t,"class","tab-item"),Y(t,"active",e[1]===e[4].code),this.first=t},m(r,a){g(r,t,a),ee(l,t,null),u(t,d),i=!0},p(r,a){e=r;const m={};a&4&&(m.content=e[4].body),l.$set(m),(!i||a&6)&&Y(t,"active",e[1]===e[4].code)},i(r){i||(Q(l.$$.fragment,r),i=!0)},o(r){V(l.$$.fragment,r),i=!1},d(r){r&&v(t),te(l)}}}function Le(n){let e,t,l,d,i,r,a,m=n[0].name+"",k,P,G,H,F,L,z,B,D,S,N,T,O,A=[],j=new Map,q,W,w=[],E=new Map,M,_=K(n[2]);const X=s=>s[4].code;for(let s=0;s<_.length;s+=1){let h=Ce(n,_,s),R=X(h);j.set(R,A[s]=ye(R,h))}let c=K(n[2]);const f=s=>s[4].code;for(let s=0;s<c.length;s+=1){let h=we(n,c,s),R=f(h);E.set(R,w[s]=Ee(R,h))}return{c(){e=p("div"),t=p("strong"),t.textContent="POST",l=y(),d=p("div"),i=p("p"),r=U("/api/collections/"),a=p("strong"),k=U(m),P=U("/request-email-change"),G=y(),H=p("p"),H.innerHTML="Requires <code>Authorization:TOKEN</code> header",F=y(),L=p("div"),L.textContent="Body Parameters",z=y(),B=p("table"),B.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>',D=y(),S=p("div"),S.textContent="Responses",N=y(),T=p("div"),O=p("div");for(let s=0;s<A.length;s+=1)A[s].c();q=y(),W=p("div");for(let s=0;s<w.length;s+=1)w[s].c();b(t,"class","label label-primary"),b(d,"class","content"),b(H,"class","txt-hint txt-sm txt-right"),b(e,"class","alert alert-success"),b(L,"class","section-title"),b(B,"class","table-compact table-border m-b-base"),b(S,"class","section-title"),b(O,"class","tabs-header compact combined left"),b(W,"class","tabs-content"),b(T,"class","tabs")},m(s,h){g(s,e,h),u(e,t),u(e,l),u(e,d),u(d,i),u(i,r),u(i,a),u(a,k),u(i,P),u(e,G),u(e,H),g(s,F,h),g(s,L,h),g(s,z,h),g(s,B,h),g(s,D,h),g(s,S,h),g(s,N,h),g(s,T,h),u(T,O);for(let R=0;R<A.length;R+=1)A[R]&&A[R].m(O,null);u(T,q),u(T,W);for(let R=0;R<w.length;R+=1)w[R]&&w[R].m(W,null);M=!0},p(s,[h]){(!M||h&1)&&m!==(m=s[0].name+"")&&J(k,m),h&6&&(_=K(s[2]),A=le(A,h,X,1,s,_,j,O,Re,ye,null,Ce)),h&6&&(c=K(s[2]),ne(),w=le(w,h,f,1,s,c,E,W,Se,Ee,null,we),ae())},i(s){if(!M){for(let h=0;h<c.length;h+=1)Q(w[h]);M=!0}},o(s){for(let h=0;h<w.length;h+=1)V(w[h]);M=!1},d(s){s&&(v(e),v(F),v(L),v(z),v(B),v(D),v(S),v(N),v(T));for(let h=0;h<A.length;h+=1)A[h].d();for(let h=0;h<w.length;h+=1)w[h].d()}}}function Ue(n,e,t){let{collection:l}=e,d=204,i=[];const r=a=>t(1,d=a.code);return n.$$set=a=>{"collection"in a&&t(0,l=a.collection)},t(2,i=[{code:204,body:"null"},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"newEmail": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:401,body:`
|
||||
{
|
||||
"code": 401,
|
||||
"message": "The request requires valid record authorization token to be set.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "The authorized record model is not allowed to perform this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}]),[l,d,i,r]}class Ie extends se{constructor(e){super(),oe(this,e,Ue,Le,ie,{collection:0})}}function Te(n,e,t){const l=n.slice();return l[5]=e[t],l[7]=t,l}function qe(n,e,t){const l=n.slice();return l[5]=e[t],l[7]=t,l}function Pe(n){let e,t,l,d,i;function r(){return n[4](n[7])}return{c(){e=p("button"),t=p("div"),t.textContent=`${n[5].title}`,l=y(),b(t,"class","txt"),b(e,"class","tab-item"),Y(e,"active",n[1]==n[7])},m(a,m){g(a,e,m),u(e,t),u(e,l),d||(i=ce(e,"click",r),d=!0)},p(a,m){n=a,m&2&&Y(e,"active",n[1]==n[7])},d(a){a&&v(e),d=!1,i()}}}function Ae(n){let e,t,l,d;var i=n[5].component;function r(a,m){return{props:{collection:a[0]}}}return i&&(t=be(i,r(n))),{c(){e=p("div"),t&&x(t.$$.fragment),l=y(),b(e,"class","tab-item"),Y(e,"active",n[1]==n[7])},m(a,m){g(a,e,m),t&&ee(t,e,null),u(e,l),d=!0},p(a,m){if(i!==(i=a[5].component)){if(t){ne();const k=t;V(k.$$.fragment,1,0,()=>{te(k,1)}),ae()}i?(t=be(i,r(a)),x(t.$$.fragment),Q(t.$$.fragment,1),ee(t,e,l)):t=null}else if(i){const k={};m&1&&(k.collection=a[0]),t.$set(k)}(!d||m&2)&&Y(e,"active",a[1]==a[7])},i(a){d||(t&&Q(t.$$.fragment,a),d=!0)},o(a){t&&V(t.$$.fragment,a),d=!1},d(a){a&&v(e),t&&te(t)}}}function Ke(n){var c,f,s,h,R,re;let e,t,l=n[0].name+"",d,i,r,a,m,k,P,G=n[0].name+"",H,F,L,z,B,D,S,N,T,O,A,j,q,W;D=new Me({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${n[2]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(c=n[0])==null?void 0:c.name}').authWithPassword('test@example.com', '1234567890');
|
||||
|
||||
await pb.collection('${(f=n[0])==null?void 0:f.name}').requestEmailChange('new@example.com');
|
||||
|
||||
// ---
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
// note: after this call all previously issued auth tokens are invalidated
|
||||
await pb.collection('${(s=n[0])==null?void 0:s.name}').confirmEmailChange(
|
||||
'EMAIL_CHANGE_TOKEN',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${n[2]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(h=n[0])==null?void 0:h.name}').authWithPassword('test@example.com', '1234567890');
|
||||
|
||||
await pb.collection('${(R=n[0])==null?void 0:R.name}').requestEmailChange('new@example.com');
|
||||
|
||||
...
|
||||
|
||||
// ---
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
// note: after this call all previously issued auth tokens are invalidated
|
||||
await pb.collection('${(re=n[0])==null?void 0:re.name}').confirmEmailChange(
|
||||
'EMAIL_CHANGE_TOKEN',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
`}});let w=K(n[3]),E=[];for(let o=0;o<w.length;o+=1)E[o]=Pe(qe(n,w,o));let M=K(n[3]),_=[];for(let o=0;o<M.length;o+=1)_[o]=Ae(Te(n,M,o));const X=o=>V(_[o],1,1,()=>{_[o]=null});return{c(){e=p("h3"),t=U("Email change ("),d=U(l),i=U(")"),r=y(),a=p("div"),m=p("p"),k=U("Sends "),P=p("strong"),H=U(G),F=U(" email change request."),L=y(),z=p("p"),z.textContent=`On successful email change all previously issued auth tokens for the specific record will be
|
||||
automatically invalidated.`,B=y(),x(D.$$.fragment),S=y(),N=p("h6"),N.textContent="API details",T=y(),O=p("div"),A=p("div");for(let o=0;o<E.length;o+=1)E[o].c();j=y(),q=p("div");for(let o=0;o<_.length;o+=1)_[o].c();b(e,"class","m-b-sm"),b(a,"class","content txt-lg m-b-sm"),b(N,"class","m-b-xs"),b(A,"class","tabs-header compact"),b(q,"class","tabs-content"),b(O,"class","tabs")},m(o,C){g(o,e,C),u(e,t),u(e,d),u(e,i),g(o,r,C),g(o,a,C),u(a,m),u(m,k),u(m,P),u(P,H),u(m,F),u(a,L),u(a,z),g(o,B,C),ee(D,o,C),g(o,S,C),g(o,N,C),g(o,T,C),g(o,O,C),u(O,A);for(let I=0;I<E.length;I+=1)E[I]&&E[I].m(A,null);u(O,j),u(O,q);for(let I=0;I<_.length;I+=1)_[I]&&_[I].m(q,null);W=!0},p(o,[C]){var de,ue,fe,me,he,pe;(!W||C&1)&&l!==(l=o[0].name+"")&&J(d,l),(!W||C&1)&&G!==(G=o[0].name+"")&&J(H,G);const I={};if(C&5&&(I.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[2]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(de=o[0])==null?void 0:de.name}').authWithPassword('test@example.com', '1234567890');
|
||||
|
||||
await pb.collection('${(ue=o[0])==null?void 0:ue.name}').requestEmailChange('new@example.com');
|
||||
|
||||
// ---
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
// note: after this call all previously issued auth tokens are invalidated
|
||||
await pb.collection('${(fe=o[0])==null?void 0:fe.name}').confirmEmailChange(
|
||||
'EMAIL_CHANGE_TOKEN',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
`),C&5&&(I.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${o[2]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(me=o[0])==null?void 0:me.name}').authWithPassword('test@example.com', '1234567890');
|
||||
|
||||
await pb.collection('${(he=o[0])==null?void 0:he.name}').requestEmailChange('new@example.com');
|
||||
|
||||
...
|
||||
|
||||
// ---
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
// note: after this call all previously issued auth tokens are invalidated
|
||||
await pb.collection('${(pe=o[0])==null?void 0:pe.name}').confirmEmailChange(
|
||||
'EMAIL_CHANGE_TOKEN',
|
||||
'YOUR_PASSWORD',
|
||||
);
|
||||
`),D.$set(I),C&10){w=K(o[3]);let $;for($=0;$<w.length;$+=1){const Z=qe(o,w,$);E[$]?E[$].p(Z,C):(E[$]=Pe(Z),E[$].c(),E[$].m(A,null))}for(;$<E.length;$+=1)E[$].d(1);E.length=w.length}if(C&11){M=K(o[3]);let $;for($=0;$<M.length;$+=1){const Z=Te(o,M,$);_[$]?(_[$].p(Z,C),Q(_[$],1)):(_[$]=Ae(Z),_[$].c(),Q(_[$],1),_[$].m(q,null))}for(ne(),$=M.length;$<_.length;$+=1)X($);ae()}},i(o){if(!W){Q(D.$$.fragment,o);for(let C=0;C<M.length;C+=1)Q(_[C]);W=!0}},o(o){V(D.$$.fragment,o),_=_.filter(Boolean);for(let C=0;C<_.length;C+=1)V(_[C]);W=!1},d(o){o&&(v(e),v(r),v(a),v(B),v(S),v(N),v(T),v(O)),te(D,o),_e(E,o),_e(_,o)}}}function Ye(n,e,t){let l,{collection:d}=e;const i=[{title:"Request email change",component:Ie},{title:"Confirm email change",component:He}];let r=0;const a=m=>t(1,r=m);return n.$$set=m=>{"collection"in m&&t(0,d=m.collection)},t(2,l=Be.getApiExampleUrl(De.baseURL)),[d,r,l,i,a]}class ze extends se{constructor(e){super(),oe(this,e,Ye,Ke,ie,{collection:0})}}export{ze as default};
|
||||
@@ -1,7 +1,7 @@
|
||||
import{S as J,i as O,s as P,N as Q,e as t,b as c,v as i,c as R,f as j,g as z,h as e,m as A,w as D,t as G,a as K,o as U,d as V}from"./index-Bp3jGQ0J.js";function W(f){let n,o,u,d,k,s,p,w,h,y,r,F,_,S,b,E,C,a,$,L,q,H,M,N,m,T,v,B,x;return r=new Q({props:{content:"?fields=*,"+f[0]+"expand.relField.name"}}),{c(){n=t("tr"),o=t("td"),o.textContent="fields",u=c(),d=t("td"),d.innerHTML='<span class="label">String</span>',k=c(),s=t("td"),p=t("p"),w=i(`Comma separated string of the fields to return in the JSON response
|
||||
import{S as J,i as N,s as O,R as P,e as t,b as c,w as i,c as Q,f as j,g as z,h as e,m as A,x as D,t as G,a as K,o as U,d as V}from"./index-B-F-pko3.js";function W(f){let n,o,u,d,v,s,p,w,h,y,r,F,_,S,b,E,C,a,$,L,q,H,M,R,m,T,k,B,x;return r=new P({props:{content:"?fields=*,"+f[0]+"expand.relField.name"}}),{c(){n=t("tr"),o=t("td"),o.textContent="fields",u=c(),d=t("td"),d.innerHTML='<span class="label">String</span>',v=c(),s=t("td"),p=t("p"),w=i(`Comma separated string of the fields to return in the JSON response
|
||||
`),h=t("em"),h.textContent="(by default returns all fields)",y=i(`. Ex.:
|
||||
`),R(r.$$.fragment),F=c(),_=t("p"),_.innerHTML="<code>*</code> targets all keys from the specific depth level.",S=c(),b=t("p"),b.textContent="In addition, the following field modifiers are also supported:",E=c(),C=t("ul"),a=t("li"),$=t("code"),$.textContent=":excerpt(maxLength, withEllipsis?)",L=c(),q=t("br"),H=i(`
|
||||
`),Q(r.$$.fragment),F=c(),_=t("p"),_.innerHTML="<code>*</code> targets all keys from the specific depth level.",S=c(),b=t("p"),b.textContent="In addition, the following field modifiers are also supported:",E=c(),C=t("ul"),a=t("li"),$=t("code"),$.textContent=":excerpt(maxLength, withEllipsis?)",L=c(),q=t("br"),H=i(`
|
||||
Returns a short plain text version of the field string value.
|
||||
`),M=t("br"),N=i(`
|
||||
`),M=t("br"),R=i(`
|
||||
Ex.:
|
||||
`),m=t("code"),T=i("?fields=*,"),v=i(f[0]),B=i("description:excerpt(200,true)"),j(o,"id","query-page")},m(l,g){z(l,n,g),e(n,o),e(n,u),e(n,d),e(n,k),e(n,s),e(s,p),e(p,w),e(p,h),e(p,y),A(r,p,null),e(s,F),e(s,_),e(s,S),e(s,b),e(s,E),e(s,C),e(C,a),e(a,$),e(a,L),e(a,q),e(a,H),e(a,M),e(a,N),e(a,m),e(m,T),e(m,v),e(m,B),x=!0},p(l,[g]){const I={};g&1&&(I.content="?fields=*,"+l[0]+"expand.relField.name"),r.$set(I),(!x||g&1)&&D(v,l[0])},i(l){x||(G(r.$$.fragment,l),x=!0)},o(l){K(r.$$.fragment,l),x=!1},d(l){l&&U(n),V(r)}}}function X(f,n,o){let{prefix:u=""}=n;return f.$$set=d=>{"prefix"in d&&o(0,u=d.prefix)},[u]}class Z extends J{constructor(n){super(),O(this,n,X,W,P,{prefix:0})}}export{Z as F};
|
||||
`),m=t("code"),T=i("?fields=*,"),k=i(f[0]),B=i("description:excerpt(200,true)"),j(o,"id","query-page")},m(l,g){z(l,n,g),e(n,o),e(n,u),e(n,d),e(n,v),e(n,s),e(s,p),e(p,w),e(p,h),e(p,y),A(r,p,null),e(s,F),e(s,_),e(s,S),e(s,b),e(s,E),e(s,C),e(C,a),e(a,$),e(a,L),e(a,q),e(a,H),e(a,M),e(a,R),e(a,m),e(m,T),e(m,k),e(m,B),x=!0},p(l,[g]){const I={};g&1&&(I.content="?fields=*,"+l[0]+"expand.relField.name"),r.$set(I),(!x||g&1)&&D(k,l[0])},i(l){x||(G(r.$$.fragment,l),x=!0)},o(l){K(r.$$.fragment,l),x=!1},d(l){l&&U(n),V(r)}}}function X(f,n,o){let{prefix:u=""}=n;return f.$$set=d=>{"prefix"in d&&o(0,u=d.prefix)},[u]}class Z extends J{constructor(n){super(),N(this,n,X,W,O,{prefix:0})}}export{Z as F};
|
||||
@@ -1,12 +1,12 @@
|
||||
import{S as Ze,i as tl,s as el,e,b as s,E as sl,f as a,g as u,r as ll,x as Qe,o as m,v as _,h as t,N as Fe,O as se,c as Qt,m as Ut,w as ke,P as Ue,Q as nl,k as ol,R as al,n as il,t as $t,a as Ct,d as jt,T as rl,C as ve,A as cl,q as Le}from"./index-Bp3jGQ0J.js";import{S as dl}from"./SdkTabs-DxNNd6Sw.js";import{F as pl}from"./FieldsQueryParam-zDO3HzQv.js";function fl(d){let n,o,i;return{c(){n=e("span"),n.textContent="Show details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-down-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function ul(d){let n,o,i;return{c(){n=e("span"),n.textContent="Hide details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-up-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function je(d){let n,o,i,f,h,r,b,$,C,g,p,tt,kt,zt,E,Kt,H,rt,R,et,ne,Q,U,oe,ct,yt,lt,vt,ae,dt,pt,st,N,Jt,Ft,y,nt,Lt,Vt,At,j,ot,Tt,Wt,Pt,F,ft,Rt,ie,ut,re,M,Ot,at,St,O,mt,ce,z,Et,Xt,Nt,de,q,Yt,K,ht,pe,I,fe,B,ue,P,qt,J,bt,me,gt,he,x,Dt,it,Ht,be,Mt,Zt,V,_t,ge,It,_e,wt,we,W,G,xe,xt,te,X,ee,L,Y,S,Bt,$e,Z,v,Gt;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format
|
||||
import{S as Ze,i as tl,s as el,e,b as s,E as sl,f as a,g as u,u as ll,y as Ue,o as m,w as _,h as t,Q as nl,R as Fe,T as se,c as Ut,m as Qt,x as ke,U as Qe,V as ol,k as al,W as il,n as rl,t as $t,a as Ct,d as jt,X as cl,C as ve,p as dl,r as Le}from"./index-B-F-pko3.js";import{F as pl}from"./FieldsQueryParam-CW6KZfgu.js";function fl(d){let n,o,i;return{c(){n=e("span"),n.textContent="Show details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-down-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function ul(d){let n,o,i;return{c(){n=e("span"),n.textContent="Hide details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-up-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function je(d){let n,o,i,f,h,r,b,$,C,g,p,tt,kt,zt,S,Kt,H,rt,R,et,ne,U,Q,oe,ct,yt,lt,vt,ae,dt,pt,st,N,Jt,Ft,y,nt,Lt,Vt,At,j,ot,Tt,Wt,Pt,F,ft,Rt,ie,ut,re,M,Ot,at,Et,O,mt,ce,z,St,Xt,Nt,de,q,Yt,K,ht,pe,I,fe,B,ue,P,qt,J,bt,me,gt,he,x,Dt,it,Ht,be,Mt,Zt,V,_t,ge,It,_e,wt,we,W,G,xe,xt,te,X,ee,L,Y,E,Bt,$e,Z,v,Gt;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(),i=e("ul"),f=e("li"),f.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single
|
||||
or double quoted), number, null, true, false`,h=s(),r=e("li"),b=e("code"),b.textContent="OPERATOR",$=_(` - is one of:
|
||||
`),C=e("br"),g=s(),p=e("ul"),tt=e("li"),kt=e("code"),kt.textContent="=",zt=s(),E=e("span"),E.textContent="Equal",Kt=s(),H=e("li"),rt=e("code"),rt.textContent="!=",R=s(),et=e("span"),et.textContent="NOT equal",ne=s(),Q=e("li"),U=e("code"),U.textContent=">",oe=s(),ct=e("span"),ct.textContent="Greater than",yt=s(),lt=e("li"),vt=e("code"),vt.textContent=">=",ae=s(),dt=e("span"),dt.textContent="Greater than or equal",pt=s(),st=e("li"),N=e("code"),N.textContent="<",Jt=s(),Ft=e("span"),Ft.textContent="Less than",y=s(),nt=e("li"),Lt=e("code"),Lt.textContent="<=",Vt=s(),At=e("span"),At.textContent="Less than or equal",j=s(),ot=e("li"),Tt=e("code"),Tt.textContent="~",Wt=s(),Pt=e("span"),Pt.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
`),C=e("br"),g=s(),p=e("ul"),tt=e("li"),kt=e("code"),kt.textContent="=",zt=s(),S=e("span"),S.textContent="Equal",Kt=s(),H=e("li"),rt=e("code"),rt.textContent="!=",R=s(),et=e("span"),et.textContent="NOT equal",ne=s(),U=e("li"),Q=e("code"),Q.textContent=">",oe=s(),ct=e("span"),ct.textContent="Greater than",yt=s(),lt=e("li"),vt=e("code"),vt.textContent=">=",ae=s(),dt=e("span"),dt.textContent="Greater than or equal",pt=s(),st=e("li"),N=e("code"),N.textContent="<",Jt=s(),Ft=e("span"),Ft.textContent="Less than",y=s(),nt=e("li"),Lt=e("code"),Lt.textContent="<=",Vt=s(),At=e("span"),At.textContent="Less than or equal",j=s(),ot=e("li"),Tt=e("code"),Tt.textContent="~",Wt=s(),Pt=e("span"),Pt.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,F=s(),ft=e("li"),Rt=e("code"),Rt.textContent="!~",ie=s(),ut=e("span"),ut.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,re=s(),M=e("li"),Ot=e("code"),Ot.textContent="?=",at=s(),St=e("em"),St.textContent="Any/At least one of",O=s(),mt=e("span"),mt.textContent="Equal",ce=s(),z=e("li"),Et=e("code"),Et.textContent="?!=",Xt=s(),Nt=e("em"),Nt.textContent="Any/At least one of",de=s(),q=e("span"),q.textContent="NOT equal",Yt=s(),K=e("li"),ht=e("code"),ht.textContent="?>",pe=s(),I=e("em"),I.textContent="Any/At least one of",fe=s(),B=e("span"),B.textContent="Greater than",ue=s(),P=e("li"),qt=e("code"),qt.textContent="?>=",J=s(),bt=e("em"),bt.textContent="Any/At least one of",me=s(),gt=e("span"),gt.textContent="Greater than or equal",he=s(),x=e("li"),Dt=e("code"),Dt.textContent="?<",it=s(),Ht=e("em"),Ht.textContent="Any/At least one of",be=s(),Mt=e("span"),Mt.textContent="Less than",Zt=s(),V=e("li"),_t=e("code"),_t.textContent="?<=",ge=s(),It=e("em"),It.textContent="Any/At least one of",_e=s(),wt=e("span"),wt.textContent="Less than or equal",we=s(),W=e("li"),G=e("code"),G.textContent="?~",xe=s(),xt=e("em"),xt.textContent="Any/At least one of",te=s(),X=e("span"),X.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,ee=s(),L=e("li"),Y=e("code"),Y.textContent="?!~",S=s(),Bt=e("em"),Bt.textContent="Any/At least one of",$e=s(),Z=e("span"),Z.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,re=s(),M=e("li"),Ot=e("code"),Ot.textContent="?=",at=s(),Et=e("em"),Et.textContent="Any/At least one of",O=s(),mt=e("span"),mt.textContent="Equal",ce=s(),z=e("li"),St=e("code"),St.textContent="?!=",Xt=s(),Nt=e("em"),Nt.textContent="Any/At least one of",de=s(),q=e("span"),q.textContent="NOT equal",Yt=s(),K=e("li"),ht=e("code"),ht.textContent="?>",pe=s(),I=e("em"),I.textContent="Any/At least one of",fe=s(),B=e("span"),B.textContent="Greater than",ue=s(),P=e("li"),qt=e("code"),qt.textContent="?>=",J=s(),bt=e("em"),bt.textContent="Any/At least one of",me=s(),gt=e("span"),gt.textContent="Greater than or equal",he=s(),x=e("li"),Dt=e("code"),Dt.textContent="?<",it=s(),Ht=e("em"),Ht.textContent="Any/At least one of",be=s(),Mt=e("span"),Mt.textContent="Less than",Zt=s(),V=e("li"),_t=e("code"),_t.textContent="?<=",ge=s(),It=e("em"),It.textContent="Any/At least one of",_e=s(),wt=e("span"),wt.textContent="Less than or equal",we=s(),W=e("li"),G=e("code"),G.textContent="?~",xe=s(),xt=e("em"),xt.textContent="Any/At least one of",te=s(),X=e("span"),X.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,ee=s(),L=e("li"),Y=e("code"),Y.textContent="?!~",E=s(),Bt=e("em"),Bt.textContent="Any/At least one of",$e=s(),Z=e("span"),Z.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,v=s(),Gt=e("p"),Gt.innerHTML=`To group and combine several expressions you could use brackets
|
||||
<code>(...)</code>, <code>&&</code> (AND) and <code>||</code> (OR) tokens.`,a(b,"class","txt-danger"),a(kt,"class","filter-op svelte-1w7s5nw"),a(E,"class","txt"),a(rt,"class","filter-op svelte-1w7s5nw"),a(et,"class","txt"),a(U,"class","filter-op svelte-1w7s5nw"),a(ct,"class","txt"),a(vt,"class","filter-op svelte-1w7s5nw"),a(dt,"class","txt"),a(N,"class","filter-op svelte-1w7s5nw"),a(Ft,"class","txt"),a(Lt,"class","filter-op svelte-1w7s5nw"),a(At,"class","txt"),a(Tt,"class","filter-op svelte-1w7s5nw"),a(Pt,"class","txt"),a(Rt,"class","filter-op svelte-1w7s5nw"),a(ut,"class","txt"),a(Ot,"class","filter-op svelte-1w7s5nw"),a(St,"class","txt-hint"),a(mt,"class","txt"),a(Et,"class","filter-op svelte-1w7s5nw"),a(Nt,"class","txt-hint"),a(q,"class","txt"),a(ht,"class","filter-op svelte-1w7s5nw"),a(I,"class","txt-hint"),a(B,"class","txt"),a(qt,"class","filter-op svelte-1w7s5nw"),a(bt,"class","txt-hint"),a(gt,"class","txt"),a(Dt,"class","filter-op svelte-1w7s5nw"),a(Ht,"class","txt-hint"),a(Mt,"class","txt"),a(_t,"class","filter-op svelte-1w7s5nw"),a(It,"class","txt-hint"),a(wt,"class","txt"),a(G,"class","filter-op svelte-1w7s5nw"),a(xt,"class","txt-hint"),a(X,"class","txt"),a(Y,"class","filter-op svelte-1w7s5nw"),a(Bt,"class","txt-hint"),a(Z,"class","txt")},m(A,k){u(A,n,k),u(A,o,k),u(A,i,k),t(i,f),t(i,h),t(i,r),t(r,b),t(r,$),t(r,C),t(r,g),t(r,p),t(p,tt),t(tt,kt),t(tt,zt),t(tt,E),t(p,Kt),t(p,H),t(H,rt),t(H,R),t(H,et),t(p,ne),t(p,Q),t(Q,U),t(Q,oe),t(Q,ct),t(p,yt),t(p,lt),t(lt,vt),t(lt,ae),t(lt,dt),t(p,pt),t(p,st),t(st,N),t(st,Jt),t(st,Ft),t(p,y),t(p,nt),t(nt,Lt),t(nt,Vt),t(nt,At),t(p,j),t(p,ot),t(ot,Tt),t(ot,Wt),t(ot,Pt),t(p,F),t(p,ft),t(ft,Rt),t(ft,ie),t(ft,ut),t(p,re),t(p,M),t(M,Ot),t(M,at),t(M,St),t(M,O),t(M,mt),t(p,ce),t(p,z),t(z,Et),t(z,Xt),t(z,Nt),t(z,de),t(z,q),t(p,Yt),t(p,K),t(K,ht),t(K,pe),t(K,I),t(K,fe),t(K,B),t(p,ue),t(p,P),t(P,qt),t(P,J),t(P,bt),t(P,me),t(P,gt),t(p,he),t(p,x),t(x,Dt),t(x,it),t(x,Ht),t(x,be),t(x,Mt),t(p,Zt),t(p,V),t(V,_t),t(V,ge),t(V,It),t(V,_e),t(V,wt),t(p,we),t(p,W),t(W,G),t(W,xe),t(W,xt),t(W,te),t(W,X),t(p,ee),t(p,L),t(L,Y),t(L,S),t(L,Bt),t(L,$e),t(L,Z),u(A,v,k),u(A,Gt,k)},d(A){A&&(m(n),m(o),m(i),m(v),m(Gt))}}}function ml(d){let n,o,i,f,h;function r(g,p){return g[0]?ul:fl}let b=r(d),$=b(d),C=d[0]&&je();return{c(){n=e("button"),$.c(),o=s(),C&&C.c(),i=sl(),a(n,"class","btn btn-sm btn-secondary m-t-10")},m(g,p){u(g,n,p),$.m(n,null),u(g,o,p),C&&C.m(g,p),u(g,i,p),f||(h=ll(n,"click",d[1]),f=!0)},p(g,[p]){b!==(b=r(g))&&($.d(1),$=b(g),$&&($.c(),$.m(n,null))),g[0]?C||(C=je(),C.c(),C.m(i.parentNode,i)):C&&(C.d(1),C=null)},i:Qe,o:Qe,d(g){g&&(m(n),m(o),m(i)),$.d(),C&&C.d(g),f=!1,h()}}}function hl(d,n,o){let i=!1;function f(){o(0,i=!i)}return[i,f]}class bl extends Ze{constructor(n){super(),tl(this,n,hl,ml,el,{})}}function ze(d,n,o){const i=d.slice();return i[7]=n[o],i}function Ke(d,n,o){const i=d.slice();return i[7]=n[o],i}function Je(d,n,o){const i=d.slice();return i[12]=n[o],i[14]=o,i}function Ve(d){let n;return{c(){n=e("p"),n.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",a(n,"class","txt-hint txt-sm txt-right")},m(o,i){u(o,n,i)},d(o){o&&m(n)}}}function We(d){let n,o=d[12]+"",i,f=d[14]<d[4].length-1?", ":"",h;return{c(){n=e("code"),i=_(o),h=_(f)},m(r,b){u(r,n,b),t(n,i),u(r,h,b)},p(r,b){b&16&&o!==(o=r[12]+"")&&ke(i,o),b&16&&f!==(f=r[14]<r[4].length-1?", ":"")&&ke(h,f)},d(r){r&&(m(n),m(h))}}}function Xe(d,n){let o,i,f;function h(){return n[6](n[7])}return{key:d,first:null,c(){o=e("button"),o.textContent=`${n[7].code} `,a(o,"type","button"),a(o,"class","tab-item"),Le(o,"active",n[2]===n[7].code),this.first=o},m(r,b){u(r,o,b),i||(f=ll(o,"click",h),i=!0)},p(r,b){n=r,b&36&&Le(o,"active",n[2]===n[7].code)},d(r){r&&m(o),i=!1,f()}}}function Ye(d,n){let o,i,f,h;return i=new Fe({props:{content:n[7].body}}),{key:d,first:null,c(){o=e("div"),Qt(i.$$.fragment),f=s(),a(o,"class","tab-item"),Le(o,"active",n[2]===n[7].code),this.first=o},m(r,b){u(r,o,b),Ut(i,o,null),t(o,f),h=!0},p(r,b){n=r,(!h||b&36)&&Le(o,"active",n[2]===n[7].code)},i(r){h||($t(i.$$.fragment,r),h=!0)},o(r){Ct(i.$$.fragment,r),h=!1},d(r){r&&m(o),jt(i)}}}function gl(d){var Pe,Re,Oe,Se,Ee,Ne;let n,o,i=d[0].name+"",f,h,r,b,$,C,g,p=d[0].name+"",tt,kt,zt,E,Kt,H,rt,R,et,ne,Q,U,oe,ct,yt=d[0].name+"",lt,vt,ae,dt,pt,st,N,Jt,Ft,y,nt,Lt,Vt,At,j,ot,Tt,Wt,Pt,F,ft,Rt,ie,ut,re,M,Ot,at,St,O,mt,ce,z,Et,Xt,Nt,de,q,Yt,K,ht,pe,I,fe,B,ue,P,qt,J,bt,me,gt,he,x,Dt,it,Ht,be,Mt,Zt,V,_t,ge,It,_e,wt,we,W,G,xe,xt,te,X,ee,L,Y,S=[],Bt=new Map,$e,Z,v=[],Gt=new Map,A;E=new dl({props:{js:`
|
||||
<code>(...)</code>, <code>&&</code> (AND) and <code>||</code> (OR) tokens.`,a(b,"class","txt-danger"),a(kt,"class","filter-op svelte-1w7s5nw"),a(S,"class","txt"),a(rt,"class","filter-op svelte-1w7s5nw"),a(et,"class","txt"),a(Q,"class","filter-op svelte-1w7s5nw"),a(ct,"class","txt"),a(vt,"class","filter-op svelte-1w7s5nw"),a(dt,"class","txt"),a(N,"class","filter-op svelte-1w7s5nw"),a(Ft,"class","txt"),a(Lt,"class","filter-op svelte-1w7s5nw"),a(At,"class","txt"),a(Tt,"class","filter-op svelte-1w7s5nw"),a(Pt,"class","txt"),a(Rt,"class","filter-op svelte-1w7s5nw"),a(ut,"class","txt"),a(Ot,"class","filter-op svelte-1w7s5nw"),a(Et,"class","txt-hint"),a(mt,"class","txt"),a(St,"class","filter-op svelte-1w7s5nw"),a(Nt,"class","txt-hint"),a(q,"class","txt"),a(ht,"class","filter-op svelte-1w7s5nw"),a(I,"class","txt-hint"),a(B,"class","txt"),a(qt,"class","filter-op svelte-1w7s5nw"),a(bt,"class","txt-hint"),a(gt,"class","txt"),a(Dt,"class","filter-op svelte-1w7s5nw"),a(Ht,"class","txt-hint"),a(Mt,"class","txt"),a(_t,"class","filter-op svelte-1w7s5nw"),a(It,"class","txt-hint"),a(wt,"class","txt"),a(G,"class","filter-op svelte-1w7s5nw"),a(xt,"class","txt-hint"),a(X,"class","txt"),a(Y,"class","filter-op svelte-1w7s5nw"),a(Bt,"class","txt-hint"),a(Z,"class","txt")},m(A,k){u(A,n,k),u(A,o,k),u(A,i,k),t(i,f),t(i,h),t(i,r),t(r,b),t(r,$),t(r,C),t(r,g),t(r,p),t(p,tt),t(tt,kt),t(tt,zt),t(tt,S),t(p,Kt),t(p,H),t(H,rt),t(H,R),t(H,et),t(p,ne),t(p,U),t(U,Q),t(U,oe),t(U,ct),t(p,yt),t(p,lt),t(lt,vt),t(lt,ae),t(lt,dt),t(p,pt),t(p,st),t(st,N),t(st,Jt),t(st,Ft),t(p,y),t(p,nt),t(nt,Lt),t(nt,Vt),t(nt,At),t(p,j),t(p,ot),t(ot,Tt),t(ot,Wt),t(ot,Pt),t(p,F),t(p,ft),t(ft,Rt),t(ft,ie),t(ft,ut),t(p,re),t(p,M),t(M,Ot),t(M,at),t(M,Et),t(M,O),t(M,mt),t(p,ce),t(p,z),t(z,St),t(z,Xt),t(z,Nt),t(z,de),t(z,q),t(p,Yt),t(p,K),t(K,ht),t(K,pe),t(K,I),t(K,fe),t(K,B),t(p,ue),t(p,P),t(P,qt),t(P,J),t(P,bt),t(P,me),t(P,gt),t(p,he),t(p,x),t(x,Dt),t(x,it),t(x,Ht),t(x,be),t(x,Mt),t(p,Zt),t(p,V),t(V,_t),t(V,ge),t(V,It),t(V,_e),t(V,wt),t(p,we),t(p,W),t(W,G),t(W,xe),t(W,xt),t(W,te),t(W,X),t(p,ee),t(p,L),t(L,Y),t(L,E),t(L,Bt),t(L,$e),t(L,Z),u(A,v,k),u(A,Gt,k)},d(A){A&&(m(n),m(o),m(i),m(v),m(Gt))}}}function ml(d){let n,o,i,f,h;function r(g,p){return g[0]?ul:fl}let b=r(d),$=b(d),C=d[0]&&je();return{c(){n=e("button"),$.c(),o=s(),C&&C.c(),i=sl(),a(n,"class","btn btn-sm btn-secondary m-t-10")},m(g,p){u(g,n,p),$.m(n,null),u(g,o,p),C&&C.m(g,p),u(g,i,p),f||(h=ll(n,"click",d[1]),f=!0)},p(g,[p]){b!==(b=r(g))&&($.d(1),$=b(g),$&&($.c(),$.m(n,null))),g[0]?C||(C=je(),C.c(),C.m(i.parentNode,i)):C&&(C.d(1),C=null)},i:Ue,o:Ue,d(g){g&&(m(n),m(o),m(i)),$.d(),C&&C.d(g),f=!1,h()}}}function hl(d,n,o){let i=!1;function f(){o(0,i=!i)}return[i,f]}class bl extends Ze{constructor(n){super(),tl(this,n,hl,ml,el,{})}}function ze(d,n,o){const i=d.slice();return i[7]=n[o],i}function Ke(d,n,o){const i=d.slice();return i[7]=n[o],i}function Je(d,n,o){const i=d.slice();return i[12]=n[o],i[14]=o,i}function Ve(d){let n;return{c(){n=e("p"),n.innerHTML="Requires superuser <code>Authorization:TOKEN</code> header",a(n,"class","txt-hint txt-sm txt-right")},m(o,i){u(o,n,i)},d(o){o&&m(n)}}}function We(d){let n,o=d[12]+"",i,f=d[14]<d[4].length-1?", ":"",h;return{c(){n=e("code"),i=_(o),h=_(f)},m(r,b){u(r,n,b),t(n,i),u(r,h,b)},p(r,b){b&16&&o!==(o=r[12]+"")&&ke(i,o),b&16&&f!==(f=r[14]<r[4].length-1?", ":"")&&ke(h,f)},d(r){r&&(m(n),m(h))}}}function Xe(d,n){let o,i,f;function h(){return n[6](n[7])}return{key:d,first:null,c(){o=e("button"),o.textContent=`${n[7].code} `,a(o,"type","button"),a(o,"class","tab-item"),Le(o,"active",n[2]===n[7].code),this.first=o},m(r,b){u(r,o,b),i||(f=ll(o,"click",h),i=!0)},p(r,b){n=r,b&36&&Le(o,"active",n[2]===n[7].code)},d(r){r&&m(o),i=!1,f()}}}function Ye(d,n){let o,i,f,h;return i=new Fe({props:{content:n[7].body}}),{key:d,first:null,c(){o=e("div"),Ut(i.$$.fragment),f=s(),a(o,"class","tab-item"),Le(o,"active",n[2]===n[7].code),this.first=o},m(r,b){u(r,o,b),Qt(i,o,null),t(o,f),h=!0},p(r,b){n=r,(!h||b&36)&&Le(o,"active",n[2]===n[7].code)},i(r){h||($t(i.$$.fragment,r),h=!0)},o(r){Ct(i.$$.fragment,r),h=!1},d(r){r&&m(o),jt(i)}}}function gl(d){var Pe,Re,Oe,Ee,Se,Ne;let n,o,i=d[0].name+"",f,h,r,b,$,C,g,p=d[0].name+"",tt,kt,zt,S,Kt,H,rt,R,et,ne,U,Q,oe,ct,yt=d[0].name+"",lt,vt,ae,dt,pt,st,N,Jt,Ft,y,nt,Lt,Vt,At,j,ot,Tt,Wt,Pt,F,ft,Rt,ie,ut,re,M,Ot,at,Et,O,mt,ce,z,St,Xt,Nt,de,q,Yt,K,ht,pe,I,fe,B,ue,P,qt,J,bt,me,gt,he,x,Dt,it,Ht,be,Mt,Zt,V,_t,ge,It,_e,wt,we,W,G,xe,xt,te,X,ee,L,Y,E=[],Bt=new Map,$e,Z,v=[],Gt=new Map,A;S=new nl({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${d[3]}');
|
||||
@@ -35,14 +35,14 @@ import{S as Ze,i as tl,s as el,e,b as s,E as sl,f as a,g as u,r as ll,x as Qe,o
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
final resultList = await pb.collection('${(Se=d[0])==null?void 0:Se.name}').getList(
|
||||
final resultList = await pb.collection('${(Ee=d[0])==null?void 0:Ee.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('${(Ee=d[0])==null?void 0:Ee.name}').getFullList(
|
||||
final records = await pb.collection('${(Se=d[0])==null?void 0:Se.name}').getFullList(
|
||||
sort: '-created',
|
||||
);
|
||||
|
||||
@@ -56,18 +56,18 @@ import{S as Ze,i as tl,s as el,e,b as s,E as sl,f as a,g as u,r as ll,x as Qe,o
|
||||
?sort=-created,id
|
||||
`}});let le=se(d[4]),T=[];for(let l=0;l<le.length;l+=1)T[l]=We(Je(d,le,l));B=new Fe({props:{content:`
|
||||
?filter=(id='abc' && created>'2022-01-01')
|
||||
`}}),P=new bl({}),it=new Fe({props:{content:"?expand=relField1,relField2.subRelField"}}),G=new pl({});let ye=se(d[5]);const Ae=l=>l[7].code;for(let l=0;l<ye.length;l+=1){let c=Ke(d,ye,l),w=Ae(c);Bt.set(w,S[l]=Xe(w,c))}let Ce=se(d[5]);const Te=l=>l[7].code;for(let l=0;l<Ce.length;l+=1){let c=ze(d,Ce,l),w=Te(c);Gt.set(w,v[l]=Ye(w,c))}return{c(){n=e("h3"),o=_("List/Search ("),f=_(i),h=_(")"),r=s(),b=e("div"),$=e("p"),C=_("Fetch a paginated "),g=e("strong"),tt=_(p),kt=_(" records list, supporting sorting and filtering."),zt=s(),Qt(E.$$.fragment),Kt=s(),H=e("h6"),H.textContent="API details",rt=s(),R=e("div"),et=e("strong"),et.textContent="GET",ne=s(),Q=e("div"),U=e("p"),oe=_("/api/collections/"),ct=e("strong"),lt=_(yt),vt=_("/records"),ae=s(),k&&k.c(),dt=s(),pt=e("div"),pt.textContent="Query parameters",st=s(),N=e("table"),Jt=e("thead"),Jt.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',Ft=s(),y=e("tbody"),nt=e("tr"),nt.innerHTML='<td>page</td> <td><span class="label">Number</span></td> <td>The page (aka. offset) of the paginated list (default to 1).</td>',Lt=s(),Vt=e("tr"),Vt.innerHTML='<td>perPage</td> <td><span class="label">Number</span></td> <td>Specify the max returned records per page (default to 30).</td>',At=s(),j=e("tr"),ot=e("td"),ot.textContent="sort",Tt=s(),Wt=e("td"),Wt.innerHTML='<span class="label">String</span>',Pt=s(),F=e("td"),ft=_("Specify the records order attribute(s). "),Rt=e("br"),ie=_(`
|
||||
`}}),P=new bl({}),it=new Fe({props:{content:"?expand=relField1,relField2.subRelField"}}),G=new pl({});let ye=se(d[5]);const Ae=l=>l[7].code;for(let l=0;l<ye.length;l+=1){let c=Ke(d,ye,l),w=Ae(c);Bt.set(w,E[l]=Xe(w,c))}let Ce=se(d[5]);const Te=l=>l[7].code;for(let l=0;l<Ce.length;l+=1){let c=ze(d,Ce,l),w=Te(c);Gt.set(w,v[l]=Ye(w,c))}return{c(){n=e("h3"),o=_("List/Search ("),f=_(i),h=_(")"),r=s(),b=e("div"),$=e("p"),C=_("Fetch a paginated "),g=e("strong"),tt=_(p),kt=_(" records list, supporting sorting and filtering."),zt=s(),Ut(S.$$.fragment),Kt=s(),H=e("h6"),H.textContent="API details",rt=s(),R=e("div"),et=e("strong"),et.textContent="GET",ne=s(),U=e("div"),Q=e("p"),oe=_("/api/collections/"),ct=e("strong"),lt=_(yt),vt=_("/records"),ae=s(),k&&k.c(),dt=s(),pt=e("div"),pt.textContent="Query parameters",st=s(),N=e("table"),Jt=e("thead"),Jt.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',Ft=s(),y=e("tbody"),nt=e("tr"),nt.innerHTML='<td>page</td> <td><span class="label">Number</span></td> <td>The page (aka. offset) of the paginated list (default to 1).</td>',Lt=s(),Vt=e("tr"),Vt.innerHTML='<td>perPage</td> <td><span class="label">Number</span></td> <td>Specify the max returned records per page (default to 30).</td>',At=s(),j=e("tr"),ot=e("td"),ot.textContent="sort",Tt=s(),Wt=e("td"),Wt.innerHTML='<span class="label">String</span>',Pt=s(),F=e("td"),ft=_("Specify the records order attribute(s). "),Rt=e("br"),ie=_(`
|
||||
Add `),ut=e("code"),ut.textContent="-",re=_(" / "),M=e("code"),M.textContent="+",Ot=_(` (default) in front of the attribute for DESC / ASC order.
|
||||
Ex.:
|
||||
`),Qt(at.$$.fragment),St=s(),O=e("p"),mt=e("strong"),mt.textContent="Supported record sort fields:",ce=s(),z=e("br"),Et=s(),Xt=e("code"),Xt.textContent="@random",Nt=_(`,
|
||||
`),Ut(at.$$.fragment),Et=s(),O=e("p"),mt=e("strong"),mt.textContent="Supported record sort fields:",ce=s(),z=e("br"),St=s(),Xt=e("code"),Xt.textContent="@random",Nt=_(`,
|
||||
`);for(let l=0;l<T.length;l+=1)T[l].c();de=s(),q=e("tr"),Yt=e("td"),Yt.textContent="filter",K=s(),ht=e("td"),ht.innerHTML='<span class="label">String</span>',pe=s(),I=e("td"),fe=_(`Filter the returned records. Ex.:
|
||||
`),Qt(B.$$.fragment),ue=s(),Qt(P.$$.fragment),qt=s(),J=e("tr"),bt=e("td"),bt.textContent="expand",me=s(),gt=e("td"),gt.innerHTML='<span class="label">String</span>',he=s(),x=e("td"),Dt=_(`Auto expand record relations. Ex.:
|
||||
`),Qt(it.$$.fragment),Ht=_(`
|
||||
`),Ut(B.$$.fragment),ue=s(),Ut(P.$$.fragment),qt=s(),J=e("tr"),bt=e("td"),bt.textContent="expand",me=s(),gt=e("td"),gt.innerHTML='<span class="label">String</span>',he=s(),x=e("td"),Dt=_(`Auto expand record relations. Ex.:
|
||||
`),Ut(it.$$.fragment),Ht=_(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),be=e("br"),Mt=_(`
|
||||
The expanded relations will be appended to each individual record under the
|
||||
`),Zt=e("code"),Zt.textContent="expand",V=_(" property (eg. "),_t=e("code"),_t.textContent='"expand": {"relField1": {...}, ...}',ge=_(`).
|
||||
`),It=e("br"),_e=_(`
|
||||
Only the relations to which the request user has permissions to `),wt=e("strong"),wt.textContent="view",we=_(" will be expanded."),W=s(),Qt(G.$$.fragment),xe=s(),xt=e("tr"),xt.innerHTML=`<td id="query-page">skipTotal</td> <td><span class="label">Boolean</span></td> <td>If it is set the total counts query will be skipped and the response fields
|
||||
Only the relations to which the request user has permissions to `),wt=e("strong"),wt.textContent="view",we=_(" will be expanded."),W=s(),Ut(G.$$.fragment),xe=s(),xt=e("tr"),xt.innerHTML=`<td id="query-page">skipTotal</td> <td><span class="label">Boolean</span></td> <td>If it is set the total counts query will be skipped and the response fields
|
||||
<code>totalItems</code> and <code>totalPages</code> will have <code>-1</code> value.
|
||||
<br/>
|
||||
This could drastically speed up the search queries when the total counters are not needed or cursor
|
||||
@@ -76,7 +76,7 @@ import{S as Ze,i as tl,s as el,e,b as s,E as sl,f as a,g as u,r as ll,x as Qe,o
|
||||
For optimization purposes, it is set by default for the
|
||||
<code>getFirstListItem()</code>
|
||||
and
|
||||
<code>getFullList()</code> SDKs methods.</td>`,te=s(),X=e("div"),X.textContent="Responses",ee=s(),L=e("div"),Y=e("div");for(let l=0;l<S.length;l+=1)S[l].c();$e=s(),Z=e("div");for(let l=0;l<v.length;l+=1)v[l].c();a(n,"class","m-b-sm"),a(b,"class","content txt-lg m-b-sm"),a(H,"class","m-b-xs"),a(et,"class","label label-primary"),a(Q,"class","content"),a(R,"class","alert alert-info"),a(pt,"class","section-title"),a(N,"class","table-compact table-border m-b-base"),a(X,"class","section-title"),a(Y,"class","tabs-header compact combined left"),a(Z,"class","tabs-content"),a(L,"class","tabs")},m(l,c){u(l,n,c),t(n,o),t(n,f),t(n,h),u(l,r,c),u(l,b,c),t(b,$),t($,C),t($,g),t(g,tt),t($,kt),u(l,zt,c),Ut(E,l,c),u(l,Kt,c),u(l,H,c),u(l,rt,c),u(l,R,c),t(R,et),t(R,ne),t(R,Q),t(Q,U),t(U,oe),t(U,ct),t(ct,lt),t(U,vt),t(R,ae),k&&k.m(R,null),u(l,dt,c),u(l,pt,c),u(l,st,c),u(l,N,c),t(N,Jt),t(N,Ft),t(N,y),t(y,nt),t(y,Lt),t(y,Vt),t(y,At),t(y,j),t(j,ot),t(j,Tt),t(j,Wt),t(j,Pt),t(j,F),t(F,ft),t(F,Rt),t(F,ie),t(F,ut),t(F,re),t(F,M),t(F,Ot),Ut(at,F,null),t(F,St),t(F,O),t(O,mt),t(O,ce),t(O,z),t(O,Et),t(O,Xt),t(O,Nt);for(let w=0;w<T.length;w+=1)T[w]&&T[w].m(O,null);t(y,de),t(y,q),t(q,Yt),t(q,K),t(q,ht),t(q,pe),t(q,I),t(I,fe),Ut(B,I,null),t(I,ue),Ut(P,I,null),t(y,qt),t(y,J),t(J,bt),t(J,me),t(J,gt),t(J,he),t(J,x),t(x,Dt),Ut(it,x,null),t(x,Ht),t(x,be),t(x,Mt),t(x,Zt),t(x,V),t(x,_t),t(x,ge),t(x,It),t(x,_e),t(x,wt),t(x,we),t(y,W),Ut(G,y,null),t(y,xe),t(y,xt),u(l,te,c),u(l,X,c),u(l,ee,c),u(l,L,c),t(L,Y);for(let w=0;w<S.length;w+=1)S[w]&&S[w].m(Y,null);t(L,$e),t(L,Z);for(let w=0;w<v.length;w+=1)v[w]&&v[w].m(Z,null);A=!0},p(l,[c]){var qe,De,He,Me,Ie,Be;(!A||c&1)&&i!==(i=l[0].name+"")&&ke(f,i),(!A||c&1)&&p!==(p=l[0].name+"")&&ke(tt,p);const w={};if(c&9&&(w.js=`
|
||||
<code>getFullList()</code> SDKs methods.</td>`,te=s(),X=e("div"),X.textContent="Responses",ee=s(),L=e("div"),Y=e("div");for(let l=0;l<E.length;l+=1)E[l].c();$e=s(),Z=e("div");for(let l=0;l<v.length;l+=1)v[l].c();a(n,"class","m-b-sm"),a(b,"class","content txt-lg m-b-sm"),a(H,"class","m-b-xs"),a(et,"class","label label-primary"),a(U,"class","content"),a(R,"class","alert alert-info"),a(pt,"class","section-title"),a(N,"class","table-compact table-border m-b-base"),a(X,"class","section-title"),a(Y,"class","tabs-header compact combined left"),a(Z,"class","tabs-content"),a(L,"class","tabs")},m(l,c){u(l,n,c),t(n,o),t(n,f),t(n,h),u(l,r,c),u(l,b,c),t(b,$),t($,C),t($,g),t(g,tt),t($,kt),u(l,zt,c),Qt(S,l,c),u(l,Kt,c),u(l,H,c),u(l,rt,c),u(l,R,c),t(R,et),t(R,ne),t(R,U),t(U,Q),t(Q,oe),t(Q,ct),t(ct,lt),t(Q,vt),t(R,ae),k&&k.m(R,null),u(l,dt,c),u(l,pt,c),u(l,st,c),u(l,N,c),t(N,Jt),t(N,Ft),t(N,y),t(y,nt),t(y,Lt),t(y,Vt),t(y,At),t(y,j),t(j,ot),t(j,Tt),t(j,Wt),t(j,Pt),t(j,F),t(F,ft),t(F,Rt),t(F,ie),t(F,ut),t(F,re),t(F,M),t(F,Ot),Qt(at,F,null),t(F,Et),t(F,O),t(O,mt),t(O,ce),t(O,z),t(O,St),t(O,Xt),t(O,Nt);for(let w=0;w<T.length;w+=1)T[w]&&T[w].m(O,null);t(y,de),t(y,q),t(q,Yt),t(q,K),t(q,ht),t(q,pe),t(q,I),t(I,fe),Qt(B,I,null),t(I,ue),Qt(P,I,null),t(y,qt),t(y,J),t(J,bt),t(J,me),t(J,gt),t(J,he),t(J,x),t(x,Dt),Qt(it,x,null),t(x,Ht),t(x,be),t(x,Mt),t(x,Zt),t(x,V),t(x,_t),t(x,ge),t(x,It),t(x,_e),t(x,wt),t(x,we),t(y,W),Qt(G,y,null),t(y,xe),t(y,xt),u(l,te,c),u(l,X,c),u(l,ee,c),u(l,L,c),t(L,Y);for(let w=0;w<E.length;w+=1)E[w]&&E[w].m(Y,null);t(L,$e),t(L,Z);for(let w=0;w<v.length;w+=1)v[w]&&v[w].m(Z,null);A=!0},p(l,[c]){var qe,De,He,Me,Ie,Be;(!A||c&1)&&i!==(i=l[0].name+"")&&ke(f,i),(!A||c&1)&&p!==(p=l[0].name+"")&&ke(tt,p);const w={};if(c&9&&(w.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${l[3]}');
|
||||
@@ -121,7 +121,7 @@ import{S as Ze,i as tl,s as el,e,b as s,E as sl,f as a,g as u,r as ll,x as Qe,o
|
||||
'someField="test"',
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
);
|
||||
`),E.$set(w),(!A||c&1)&&yt!==(yt=l[0].name+"")&&ke(lt,yt),l[1]?k||(k=Ve(),k.c(),k.m(R,null)):k&&(k.d(1),k=null),c&16){le=se(l[4]);let D;for(D=0;D<le.length;D+=1){const Ge=Je(l,le,D);T[D]?T[D].p(Ge,c):(T[D]=We(Ge),T[D].c(),T[D].m(O,null))}for(;D<T.length;D+=1)T[D].d(1);T.length=le.length}c&36&&(ye=se(l[5]),S=Ue(S,c,Ae,1,l,ye,Bt,Y,nl,Xe,null,Ke)),c&36&&(Ce=se(l[5]),ol(),v=Ue(v,c,Te,1,l,Ce,Gt,Z,al,Ye,null,ze),il())},i(l){if(!A){$t(E.$$.fragment,l),$t(at.$$.fragment,l),$t(B.$$.fragment,l),$t(P.$$.fragment,l),$t(it.$$.fragment,l),$t(G.$$.fragment,l);for(let c=0;c<Ce.length;c+=1)$t(v[c]);A=!0}},o(l){Ct(E.$$.fragment,l),Ct(at.$$.fragment,l),Ct(B.$$.fragment,l),Ct(P.$$.fragment,l),Ct(it.$$.fragment,l),Ct(G.$$.fragment,l);for(let c=0;c<v.length;c+=1)Ct(v[c]);A=!1},d(l){l&&(m(n),m(r),m(b),m(zt),m(Kt),m(H),m(rt),m(R),m(dt),m(pt),m(st),m(N),m(te),m(X),m(ee),m(L)),jt(E,l),k&&k.d(),jt(at),rl(T,l),jt(B),jt(P),jt(it),jt(G);for(let c=0;c<S.length;c+=1)S[c].d();for(let c=0;c<v.length;c+=1)v[c].d()}}}function _l(d,n,o){let i,f,h,{collection:r}=n,b=200,$=[];const C=g=>o(2,b=g.code);return d.$$set=g=>{"collection"in g&&o(0,r=g.collection)},d.$$.update=()=>{d.$$.dirty&1&&o(4,i=ve.getAllCollectionIdentifiers(r)),d.$$.dirty&1&&o(1,f=(r==null?void 0:r.listRule)===null),d.$$.dirty&3&&r!=null&&r.id&&($.push({code:200,body:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[ve.dummyCollectionRecord(r),ve.dummyCollectionRecord(r)]},null,2)}),$.push({code:400,body:`
|
||||
`),S.$set(w),(!A||c&1)&&yt!==(yt=l[0].name+"")&&ke(lt,yt),l[1]?k||(k=Ve(),k.c(),k.m(R,null)):k&&(k.d(1),k=null),c&16){le=se(l[4]);let D;for(D=0;D<le.length;D+=1){const Ge=Je(l,le,D);T[D]?T[D].p(Ge,c):(T[D]=We(Ge),T[D].c(),T[D].m(O,null))}for(;D<T.length;D+=1)T[D].d(1);T.length=le.length}c&36&&(ye=se(l[5]),E=Qe(E,c,Ae,1,l,ye,Bt,Y,ol,Xe,null,Ke)),c&36&&(Ce=se(l[5]),al(),v=Qe(v,c,Te,1,l,Ce,Gt,Z,il,Ye,null,ze),rl())},i(l){if(!A){$t(S.$$.fragment,l),$t(at.$$.fragment,l),$t(B.$$.fragment,l),$t(P.$$.fragment,l),$t(it.$$.fragment,l),$t(G.$$.fragment,l);for(let c=0;c<Ce.length;c+=1)$t(v[c]);A=!0}},o(l){Ct(S.$$.fragment,l),Ct(at.$$.fragment,l),Ct(B.$$.fragment,l),Ct(P.$$.fragment,l),Ct(it.$$.fragment,l),Ct(G.$$.fragment,l);for(let c=0;c<v.length;c+=1)Ct(v[c]);A=!1},d(l){l&&(m(n),m(r),m(b),m(zt),m(Kt),m(H),m(rt),m(R),m(dt),m(pt),m(st),m(N),m(te),m(X),m(ee),m(L)),jt(S,l),k&&k.d(),jt(at),cl(T,l),jt(B),jt(P),jt(it),jt(G);for(let c=0;c<E.length;c+=1)E[c].d();for(let c=0;c<v.length;c+=1)v[c].d()}}}function _l(d,n,o){let i,f,h,{collection:r}=n,b=200,$=[];const C=g=>o(2,b=g.code);return d.$$set=g=>{"collection"in g&&o(0,r=g.collection)},d.$$.update=()=>{d.$$.dirty&1&&o(4,i=ve.getAllCollectionIdentifiers(r)),d.$$.dirty&1&&o(1,f=(r==null?void 0:r.listRule)===null),d.$$.dirty&3&&r!=null&&r.id&&($.push({code:200,body:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[ve.dummyCollectionRecord(r),ve.dummyCollectionRecord(r)]},null,2)}),$.push({code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Something went wrong while processing your request. Invalid filter.",
|
||||
@@ -130,7 +130,7 @@ import{S as Ze,i as tl,s as el,e,b as s,E as sl,f as a,g as u,r as ll,x as Qe,o
|
||||
`}),f&&$.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"message": "Only superusers can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},o(3,h=ve.getApiExampleUrl(cl.baseUrl)),[r,f,b,h,i,$,C]}class Cl extends Ze{constructor(n){super(),tl(this,n,_l,gl,el,{collection:0})}}export{Cl as default};
|
||||
`}))},o(3,h=ve.getApiExampleUrl(dl.baseURL)),[r,f,b,h,i,$,C]}class $l extends Ze{constructor(n){super(),tl(this,n,_l,gl,el,{collection:0})}}export{$l as default};
|
||||
@@ -1,88 +0,0 @@
|
||||
import{S as ze,i as Qe,s as Ue,O as F,e as i,v,b as m,c as pe,f as b,g as c,h as a,m as ue,w as N,P as Oe,Q as je,k as Fe,R as Ne,n as Ge,t as G,a as K,o as d,d as me,C as Ke,A as Je,q as J,r as Ve,N as Xe}from"./index-Bp3jGQ0J.js";import{S as Ye}from"./SdkTabs-DxNNd6Sw.js";import{F as Ze}from"./FieldsQueryParam-zDO3HzQv.js";function De(o,l,s){const n=o.slice();return n[5]=l[s],n}function He(o,l,s){const n=o.slice();return n[5]=l[s],n}function Re(o,l){let s,n=l[5].code+"",f,_,r,u;function h(){return l[4](l[5])}return{key:o,first:null,c(){s=i("button"),f=v(n),_=m(),b(s,"class","tab-item"),J(s,"active",l[1]===l[5].code),this.first=s},m(w,y){c(w,s,y),a(s,f),a(s,_),r||(u=Ve(s,"click",h),r=!0)},p(w,y){l=w,y&4&&n!==(n=l[5].code+"")&&N(f,n),y&6&&J(s,"active",l[1]===l[5].code)},d(w){w&&d(s),r=!1,u()}}}function We(o,l){let s,n,f,_;return n=new Xe({props:{content:l[5].body}}),{key:o,first:null,c(){s=i("div"),pe(n.$$.fragment),f=m(),b(s,"class","tab-item"),J(s,"active",l[1]===l[5].code),this.first=s},m(r,u){c(r,s,u),ue(n,s,null),a(s,f),_=!0},p(r,u){l=r;const h={};u&4&&(h.content=l[5].body),n.$set(h),(!_||u&6)&&J(s,"active",l[1]===l[5].code)},i(r){_||(G(n.$$.fragment,r),_=!0)},o(r){K(n.$$.fragment,r),_=!1},d(r){r&&d(s),me(n)}}}function xe(o){var Te,Se,Ee,Ie;let l,s,n=o[0].name+"",f,_,r,u,h,w,y,R=o[0].name+"",V,be,fe,X,Y,P,Z,I,x,$,W,he,z,A,_e,ee,Q=o[0].name+"",te,ke,le,ve,ge,U,se,q,ae,B,oe,L,ne,C,ie,$e,ce,E,de,M,re,T,O,g=[],we=new Map,ye,D,k=[],Pe=new Map,S;P=new Ye({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(Te=o[0])==null?void 0:Te.name}').authWithPassword('test@example.com', '123456');
|
||||
|
||||
const result = await pb.collection('${(Se=o[0])==null?void 0:Se.name}').listExternalAuths(
|
||||
pb.authStore.model.id
|
||||
);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(Ee=o[0])==null?void 0:Ee.name}').authWithPassword('test@example.com', '123456');
|
||||
|
||||
final result = await pb.collection('${(Ie=o[0])==null?void 0:Ie.name}').listExternalAuths(
|
||||
pb.authStore.model.id,
|
||||
);
|
||||
`}}),E=new Ze({});let j=F(o[2]);const Ae=e=>e[5].code;for(let e=0;e<j.length;e+=1){let t=He(o,j,e),p=Ae(t);we.set(p,g[e]=Re(p,t))}let H=F(o[2]);const Ce=e=>e[5].code;for(let e=0;e<H.length;e+=1){let t=De(o,H,e),p=Ce(t);Pe.set(p,k[e]=We(p,t))}return{c(){l=i("h3"),s=v("List OAuth2 accounts ("),f=v(n),_=v(")"),r=m(),u=i("div"),h=i("p"),w=v("Returns a list with all OAuth2 providers linked to a single "),y=i("strong"),V=v(R),be=v("."),fe=m(),X=i("p"),X.textContent="Only admins and the account owner can access this action.",Y=m(),pe(P.$$.fragment),Z=m(),I=i("h6"),I.textContent="API details",x=m(),$=i("div"),W=i("strong"),W.textContent="GET",he=m(),z=i("div"),A=i("p"),_e=v("/api/collections/"),ee=i("strong"),te=v(Q),ke=v("/records/"),le=i("strong"),le.textContent=":id",ve=v("/external-auths"),ge=m(),U=i("p"),U.innerHTML="Requires <code>Authorization:TOKEN</code> header",se=m(),q=i("div"),q.textContent="Path Parameters",ae=m(),B=i("table"),B.innerHTML='<thead><tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr></thead> <tbody><tr><td>id</td> <td><span class="label">String</span></td> <td>ID of the auth record.</td></tr></tbody>',oe=m(),L=i("div"),L.textContent="Query parameters",ne=m(),C=i("table"),ie=i("thead"),ie.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="50%">Description</th></tr>',$e=m(),ce=i("tbody"),pe(E.$$.fragment),de=m(),M=i("div"),M.textContent="Responses",re=m(),T=i("div"),O=i("div");for(let e=0;e<g.length;e+=1)g[e].c();ye=m(),D=i("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(I,"class","m-b-xs"),b(W,"class","label label-primary"),b(z,"class","content"),b(U,"class","txt-hint txt-sm txt-right"),b($,"class","alert alert-info"),b(q,"class","section-title"),b(B,"class","table-compact table-border m-b-base"),b(L,"class","section-title"),b(C,"class","table-compact table-border m-b-base"),b(M,"class","section-title"),b(O,"class","tabs-header compact combined left"),b(D,"class","tabs-content"),b(T,"class","tabs")},m(e,t){c(e,l,t),a(l,s),a(l,f),a(l,_),c(e,r,t),c(e,u,t),a(u,h),a(h,w),a(h,y),a(y,V),a(h,be),a(u,fe),a(u,X),c(e,Y,t),ue(P,e,t),c(e,Z,t),c(e,I,t),c(e,x,t),c(e,$,t),a($,W),a($,he),a($,z),a(z,A),a(A,_e),a(A,ee),a(ee,te),a(A,ke),a(A,le),a(A,ve),a($,ge),a($,U),c(e,se,t),c(e,q,t),c(e,ae,t),c(e,B,t),c(e,oe,t),c(e,L,t),c(e,ne,t),c(e,C,t),a(C,ie),a(C,$e),a(C,ce),ue(E,ce,null),c(e,de,t),c(e,M,t),c(e,re,t),c(e,T,t),a(T,O);for(let p=0;p<g.length;p+=1)g[p]&&g[p].m(O,null);a(T,ye),a(T,D);for(let p=0;p<k.length;p+=1)k[p]&&k[p].m(D,null);S=!0},p(e,[t]){var qe,Be,Le,Me;(!S||t&1)&&n!==(n=e[0].name+"")&&N(f,n),(!S||t&1)&&R!==(R=e[0].name+"")&&N(V,R);const p={};t&9&&(p.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(qe=e[0])==null?void 0:qe.name}').authWithPassword('test@example.com', '123456');
|
||||
|
||||
const result = await pb.collection('${(Be=e[0])==null?void 0:Be.name}').listExternalAuths(
|
||||
pb.authStore.model.id
|
||||
);
|
||||
`),t&9&&(p.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(Le=e[0])==null?void 0:Le.name}').authWithPassword('test@example.com', '123456');
|
||||
|
||||
final result = await pb.collection('${(Me=e[0])==null?void 0:Me.name}').listExternalAuths(
|
||||
pb.authStore.model.id,
|
||||
);
|
||||
`),P.$set(p),(!S||t&1)&&Q!==(Q=e[0].name+"")&&N(te,Q),t&6&&(j=F(e[2]),g=Oe(g,t,Ae,1,e,j,we,O,je,Re,null,He)),t&6&&(H=F(e[2]),Fe(),k=Oe(k,t,Ce,1,e,H,Pe,D,Ne,We,null,De),Ge())},i(e){if(!S){G(P.$$.fragment,e),G(E.$$.fragment,e);for(let t=0;t<H.length;t+=1)G(k[t]);S=!0}},o(e){K(P.$$.fragment,e),K(E.$$.fragment,e);for(let t=0;t<k.length;t+=1)K(k[t]);S=!1},d(e){e&&(d(l),d(r),d(u),d(Y),d(Z),d(I),d(x),d($),d(se),d(q),d(ae),d(B),d(oe),d(L),d(ne),d(C),d(de),d(M),d(re),d(T)),me(P,e),me(E);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 et(o,l,s){let n,{collection:f}=l,_=200,r=[];const u=h=>s(1,_=h.code);return o.$$set=h=>{"collection"in h&&s(0,f=h.collection)},o.$$.update=()=>{o.$$.dirty&1&&s(2,r=[{code:200,body:`
|
||||
[
|
||||
{
|
||||
"id": "8171022dc95a4e8",
|
||||
"created": "2022-09-01 10:24:18.434",
|
||||
"updated": "2022-09-01 10:24:18.889",
|
||||
"recordId": "e22581b6f1d44ea",
|
||||
"collectionId": "${f.id}",
|
||||
"provider": "google",
|
||||
"providerId": "2da15468800514p",
|
||||
},
|
||||
{
|
||||
"id": "171022dc895a4e8",
|
||||
"created": "2022-09-01 10:24:18.434",
|
||||
"updated": "2022-09-01 10:24:18.889",
|
||||
"recordId": "e22581b6f1d44ea",
|
||||
"collectionId": "${f.id}",
|
||||
"provider": "twitter",
|
||||
"providerId": "720688005140514",
|
||||
}
|
||||
]
|
||||
`},{code:401,body:`
|
||||
{
|
||||
"code": 401,
|
||||
"message": "The request requires valid record authorization token to be set.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "The authorized record model is not allowed to perform this action.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}])},s(3,n=Ke.getApiExampleUrl(Je.baseUrl)),[f,_,r,n,u]}class at extends ze{constructor(l){super(),Qe(this,l,et,xe,Ue,{collection:0})}}export{at as default};
|
||||
@@ -1,2 +0,0 @@
|
||||
import{S as E,i as G,s as I,F as K,c as F,m as R,t as B,a as N,d as T,C as M,p as H,e as _,v as P,b as h,f,q as J,g as b,h as c,r as j,u as O,j as Q,l as U,o as w,z as V,A as L,B as X,D as Y,w as Z,y as q}from"./index-Bp3jGQ0J.js";function W(i){let e,n,s;return{c(){e=P("for "),n=_("strong"),s=P(i[3]),f(n,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,n,t),c(n,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&(w(e),w(n))}}}function x(i){let e,n,s,l,t,u,p,d;return{c(){e=_("label"),n=P("New password"),l=h(),t=_("input"),f(e,"for",s=i[8]),f(t,"type","password"),f(t,"id",u=i[8]),t.required=!0,t.autofocus=!0},m(r,a){b(r,e,a),c(e,n),b(r,l,a),b(r,t,a),q(t,i[0]),t.focus(),p||(d=j(t,"input",i[6]),p=!0)},p(r,a){a&256&&s!==(s=r[8])&&f(e,"for",s),a&256&&u!==(u=r[8])&&f(t,"id",u),a&1&&t.value!==r[0]&&q(t,r[0])},d(r){r&&(w(e),w(l),w(t)),p=!1,d()}}}function ee(i){let e,n,s,l,t,u,p,d;return{c(){e=_("label"),n=P("New password confirm"),l=h(),t=_("input"),f(e,"for",s=i[8]),f(t,"type","password"),f(t,"id",u=i[8]),t.required=!0},m(r,a){b(r,e,a),c(e,n),b(r,l,a),b(r,t,a),q(t,i[1]),p||(d=j(t,"input",i[7]),p=!0)},p(r,a){a&256&&s!==(s=r[8])&&f(e,"for",s),a&256&&u!==(u=r[8])&&f(t,"id",u),a&2&&t.value!==r[1]&&q(t,r[1])},d(r){r&&(w(e),w(l),w(t)),p=!1,d()}}}function te(i){let e,n,s,l,t,u,p,d,r,a,g,S,k,v,C,A,y,m=i[3]&&W(i);return u=new H({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:i}}}),d=new H({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:i}}}),{c(){e=_("form"),n=_("div"),s=_("h4"),l=P(`Reset your admin password
|
||||
`),m&&m.c(),t=h(),F(u.$$.fragment),p=h(),F(d.$$.fragment),r=h(),a=_("button"),g=_("span"),g.textContent="Set new password",S=h(),k=_("div"),v=_("a"),v.textContent="Back to login",f(s,"class","m-b-xs"),f(n,"class","content txt-center m-b-sm"),f(g,"class","txt"),f(a,"type","submit"),f(a,"class","btn btn-lg btn-block"),a.disabled=i[2],J(a,"btn-loading",i[2]),f(e,"class","m-b-base"),f(v,"href","/login"),f(v,"class","link-hint"),f(k,"class","content txt-center")},m(o,$){b(o,e,$),c(e,n),c(n,s),c(s,l),m&&m.m(s,null),c(e,t),R(u,e,null),c(e,p),R(d,e,null),c(e,r),c(e,a),c(a,g),b(o,S,$),b(o,k,$),c(k,v),C=!0,A||(y=[j(e,"submit",O(i[4])),Q(U.call(null,v))],A=!0)},p(o,$){o[3]?m?m.p(o,$):(m=W(o),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const z={};$&769&&(z.$$scope={dirty:$,ctx:o}),u.$set(z);const D={};$&770&&(D.$$scope={dirty:$,ctx:o}),d.$set(D),(!C||$&4)&&(a.disabled=o[2]),(!C||$&4)&&J(a,"btn-loading",o[2])},i(o){C||(B(u.$$.fragment,o),B(d.$$.fragment,o),C=!0)},o(o){N(u.$$.fragment,o),N(d.$$.fragment,o),C=!1},d(o){o&&(w(e),w(S),w(k)),m&&m.d(),T(u),T(d),A=!1,V(y)}}}function se(i){let e,n;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:i}}}),{c(){F(e.$$.fragment)},m(s,l){R(e,s,l),n=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){n||(B(e.$$.fragment,s),n=!0)},o(s){N(e.$$.fragment,s),n=!1},d(s){T(e,s)}}}function le(i,e,n){let s,{params:l}=e,t="",u="",p=!1;async function d(){if(!p){n(2,p=!0);try{await L.admins.confirmPasswordReset(l==null?void 0:l.token,t,u),X("Successfully set a new admin password."),Y("/")}catch(g){L.error(g)}n(2,p=!1)}}function r(){t=this.value,n(0,t)}function a(){u=this.value,n(1,u)}return i.$$set=g=>{"params"in g&&n(5,l=g.params)},i.$$.update=()=>{i.$$.dirty&32&&n(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,u,p,s,d,l,r,a]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{S as H,i as M,s as T,F as j,c as L,m as R,t as w,a as y,d as S,b as v,e as _,f as p,g,h as d,j as B,l as N,k as z,n as D,o as k,A as C,p as G,q as F,r as E,u as I,v as h,w as J,x as P,y as A}from"./index-Bp3jGQ0J.js";function K(u){let e,s,n,l,t,i,c,m,r,a,b,f;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:o})=>({5:o}),({uniqueId:o})=>o?32:0]},$$scope:{ctx:u}}}),{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 we’ll send you a recovery link:</p>',n=v(),L(l.$$.fragment),t=v(),i=_("button"),c=_("i"),m=v(),r=_("span"),r.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(c,"class","ri-mail-send-line"),p(r,"class","txt"),p(i,"type","submit"),p(i,"class","btn btn-lg btn-block"),i.disabled=u[1],F(i,"btn-loading",u[1]),p(e,"class","m-b-base")},m(o,$){g(o,e,$),d(e,s),d(e,n),R(l,e,null),d(e,t),d(e,i),d(i,c),d(i,m),d(i,r),a=!0,b||(f=E(e,"submit",I(u[3])),b=!0)},p(o,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:o}),l.$set(q),(!a||$&2)&&(i.disabled=o[1]),(!a||$&2)&&F(i,"btn-loading",o[1])},i(o){a||(w(l.$$.fragment,o),a=!0)},o(o){y(l.$$.fragment,o),a=!1},d(o){o&&k(e),S(l),b=!1,f()}}}function O(u){let e,s,n,l,t,i,c,m,r;return{c(){e=_("div"),s=_("div"),s.innerHTML='<i class="ri-checkbox-circle-line"></i>',n=v(),l=_("div"),t=_("p"),i=h("Check "),c=_("strong"),m=h(u[0]),r=h(" for the recovery link."),p(s,"class","icon"),p(c,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){g(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,i),d(t,c),d(c,m),d(t,r)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&k(e)}}}function Q(u){let e,s,n,l,t,i,c,m;return{c(){e=_("label"),s=h("Email"),l=v(),t=_("input"),p(e,"for",n=u[5]),p(t,"type","email"),p(t,"id",i=u[5]),t.required=!0,t.autofocus=!0},m(r,a){g(r,e,a),d(e,s),g(r,l,a),g(r,t,a),A(t,u[0]),t.focus(),c||(m=E(t,"input",u[4]),c=!0)},p(r,a){a&32&&n!==(n=r[5])&&p(e,"for",n),a&32&&i!==(i=r[5])&&p(t,"id",i),a&1&&t.value!==r[0]&&A(t,r[0])},d(r){r&&(k(e),k(l),k(t)),c=!1,m()}}}function U(u){let e,s,n,l,t,i,c,m;const r=[O,K],a=[];function b(f,o){return f[2]?0:1}return e=b(u),s=a[e]=r[e](u),{c(){s.c(),n=v(),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(f,o){a[e].m(f,o),g(f,n,o),g(f,l,o),d(l,t),i=!0,c||(m=B(N.call(null,t)),c=!0)},p(f,o){let $=e;e=b(f),e===$?a[e].p(f,o):(z(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(f,o):(s=a[e]=r[e](f),s.c()),w(s,1),s.m(n.parentNode,n))},i(f){i||(w(s),i=!0)},o(f){y(s),i=!1},d(f){f&&(k(n),k(l)),a[e].d(f),c=!1,m()}}}function V(u){let e,s;return e=new j({props:{$$slots:{default:[U]},$$scope:{ctx:u}}}),{c(){L(e.$$.fragment)},m(n,l){R(e,n,l),s=!0},p(n,[l]){const t={};l&71&&(t.$$scope={dirty:l,ctx:n}),e.$set(t)},i(n){s||(w(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){S(e,n)}}}function W(u,e,s){let n="",l=!1,t=!1;async function i(){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 c(){n=this.value,s(0,n)}return[n,l,t,i,c]}class Y extends H{constructor(e){super(),M(this,e,W,V,T,{})}}export{Y as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{S as r,i as c,s as l,e as u,f as p,g as h,y as n,o as d,J as f,K as m,L as g,M as o}from"./index-B-F-pko3.js";function _(s){let t;return{c(){t=u("div"),t.innerHTML='<h3 class="m-b-sm">Auth failed.</h3> <h5>You can close this window and go back to the app to try again.</h5>',p(t,"class","content txt-hint txt-center p-base")},m(e,a){h(e,t,a)},p:n,i:n,o:n,d(e){e&&d(t)}}}function b(s,t,e){let a;return f(s,o,i=>e(0,a=i)),m(o,a="OAuth2 auth failed",a),g(()=>{window.close()}),[]}class v extends r{constructor(t){super(),c(this,t,b,_,l,{})}}export{v as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{S as o,i,s as c,e as r,f as l,g as u,x as a,o as d,I as h}from"./index-Bp3jGQ0J.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML='<h3 class="m-b-sm">Auth failed.</h3> <h5>You can close this window and go back to the app to try again.</h5>',l(t,"class","content txt-hint txt-center p-base")},m(e,s){u(e,t,s)},p:a,i:a,o:a,d(e){e&&d(t)}}}function p(n){return h(()=>{window.close()}),[]}class x extends o{constructor(t){super(),i(this,t,p,f,c,{})}}export{x as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{S as i,i as r,s as u,e as l,f as p,g as h,y as n,o as d,J as m,K as f,L as g,M as o}from"./index-B-F-pko3.js";function _(a){let t;return{c(){t=l("div"),t.innerHTML='<h3 class="m-b-sm">Auth completed.</h3> <h5>You can close this window and go back to the app.</h5>',p(t,"class","content txt-hint txt-center p-base")},m(e,s){h(e,t,s)},p:n,i:n,o:n,d(e){e&&d(t)}}}function b(a,t,e){let s;return m(a,o,c=>e(0,s=c)),f(o,s="OAuth2 auth completed",s),g(()=>{window.close()}),[]}class v extends i{constructor(t){super(),r(this,t,b,_,u,{})}}export{v as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{S as o,i as c,s as i,e as r,f as u,g as l,x as s,o as d,I as h}from"./index-Bp3jGQ0J.js";function p(n){let t;return{c(){t=r("div"),t.innerHTML='<h3 class="m-b-sm">Auth completed.</h3> <h5>You can close this window and go back to the app.</h5>',u(t,"class","content txt-hint txt-center p-base")},m(e,a){l(e,t,a)},p:s,i:s,o:s,d(e){e&&d(t)}}}function f(n){return h(()=>{window.close()}),[]}class x extends o{constructor(t){super(),c(this,t,f,p,i,{})}}export{x as default};
|
||||
@@ -1,2 +1,2 @@
|
||||
import{S as G,i as I,s as J,F as M,c as S,m as A,t as h,a as v,d as L,C as N,E as R,g as _,k as W,n as Y,o as b,G as j,H as z,A as B,p as D,e as m,v as y,b as C,f as p,q as T,h as g,r as P,u as K,x as E,w as O,y as F}from"./index-Bp3jGQ0J.js";function Q(i){let e,t,n,l,s,o,f,a,r,u,k,$,d=i[3]&&H(i);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:c})=>({8:c}),({uniqueId:c})=>c?256:0]},$$scope:{ctx:i}}}),{c(){e=m("form"),t=m("div"),n=m("h5"),l=y(`Type your password to confirm changing your email address
|
||||
`),d&&d.c(),s=C(),S(o.$$.fragment),f=C(),a=m("button"),r=m("span"),r.textContent="Confirm new email",p(t,"class","content txt-center m-b-base"),p(r,"class","txt"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block"),a.disabled=i[1],T(a,"btn-loading",i[1])},m(c,w){_(c,e,w),g(e,t),g(t,n),g(n,l),d&&d.m(n,null),g(e,s),A(o,e,null),g(e,f),g(e,a),g(a,r),u=!0,k||($=P(e,"submit",K(i[4])),k=!0)},p(c,w){c[3]?d?d.p(c,w):(d=H(c),d.c(),d.m(n,null)):d&&(d.d(1),d=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:c}),o.$set(q),(!u||w&2)&&(a.disabled=c[1]),(!u||w&2)&&T(a,"btn-loading",c[1])},i(c){u||(h(o.$$.fragment,c),u=!0)},o(c){v(o.$$.fragment,c),u=!1},d(c){c&&b(e),d&&d.d(),L(o),k=!1,$()}}}function U(i){let e,t,n,l,s;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=C(),n=m("button"),n.textContent="Close",p(e,"class","alert alert-success"),p(n,"type","button"),p(n,"class","btn btn-transparent btn-block")},m(o,f){_(o,e,f),_(o,t,f),_(o,n,f),l||(s=P(n,"click",i[6]),l=!0)},p:E,i:E,o:E,d(o){o&&(b(e),b(t),b(n)),l=!1,s()}}}function H(i){let e,t,n;return{c(){e=y("to "),t=m("strong"),n=y(i[3]),p(t,"class","txt-nowrap")},m(l,s){_(l,e,s),_(l,t,s),g(t,n)},p(l,s){s&8&&O(n,l[3])},d(l){l&&(b(e),b(t))}}}function V(i){let e,t,n,l,s,o,f,a;return{c(){e=m("label"),t=y("Password"),l=C(),s=m("input"),p(e,"for",n=i[8]),p(s,"type","password"),p(s,"id",o=i[8]),s.required=!0,s.autofocus=!0},m(r,u){_(r,e,u),g(e,t),_(r,l,u),_(r,s,u),F(s,i[0]),s.focus(),f||(a=P(s,"input",i[7]),f=!0)},p(r,u){u&256&&n!==(n=r[8])&&p(e,"for",n),u&256&&o!==(o=r[8])&&p(s,"id",o),u&1&&s.value!==r[0]&&F(s,r[0])},d(r){r&&(b(e),b(l),b(s)),f=!1,a()}}}function X(i){let e,t,n,l;const s=[U,Q],o=[];function f(a,r){return a[2]?0:1}return e=f(i),t=o[e]=s[e](i),{c(){t.c(),n=R()},m(a,r){o[e].m(a,r),_(a,n,r),l=!0},p(a,r){let u=e;e=f(a),e===u?o[e].p(a,r):(W(),v(o[u],1,1,()=>{o[u]=null}),Y(),t=o[e],t?t.p(a,r):(t=o[e]=s[e](a),t.c()),h(t,1),t.m(n.parentNode,n))},i(a){l||(h(t),l=!0)},o(a){v(t),l=!1},d(a){a&&b(n),o[e].d(a)}}}function Z(i){let e,t;return e=new M({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:i}}}),{c(){S(e.$$.fragment)},m(n,l){A(e,n,l),t=!0},p(n,[l]){const s={};l&527&&(s.$$scope={dirty:l,ctx:n}),e.$set(s)},i(n){t||(h(e.$$.fragment,n),t=!0)},o(n){v(e.$$.fragment,n),t=!1},d(n){L(e,n)}}}function x(i,e,t){let n,{params:l}=e,s="",o=!1,f=!1;async function a(){if(o)return;t(1,o=!0);const k=new j("../");try{const $=z(l==null?void 0:l.token);await k.collection($.collectionId).confirmEmailChange(l==null?void 0:l.token,s),t(2,f=!0)}catch($){B.error($)}t(1,o=!1)}const r=()=>window.close();function u(){s=this.value,t(0,s)}return i.$$set=k=>{"params"in k&&t(5,l=k.params)},i.$$.update=()=>{i.$$.dirty&32&&t(3,n=N.getJWTPayload(l==null?void 0:l.token).newEmail||"")},[s,o,f,n,a,l,r,u]}class te extends G{constructor(e){super(),I(this,e,x,Z,J,{params:5})}}export{te as default};
|
||||
import{S as G,i as I,s as J,F as M,c as S,m as L,t as h,a as v,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 y,b as C,f as p,r as T,h as g,u as P,v as K,y as E,x as O,z as F}from"./index-B-F-pko3.js";function Q(i){let e,t,n,l,s,o,f,a,r,u,k,$,d=i[3]&&H(i);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:c})=>({8:c}),({uniqueId:c})=>c?256:0]},$$scope:{ctx:i}}}),{c(){e=m("form"),t=m("div"),n=m("h5"),l=y(`Type your password to confirm changing your email address
|
||||
`),d&&d.c(),s=C(),S(o.$$.fragment),f=C(),a=m("button"),r=m("span"),r.textContent="Confirm new email",p(t,"class","content txt-center m-b-base"),p(r,"class","txt"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block"),a.disabled=i[1],T(a,"btn-loading",i[1])},m(c,w){_(c,e,w),g(e,t),g(t,n),g(n,l),d&&d.m(n,null),g(e,s),L(o,e,null),g(e,f),g(e,a),g(a,r),u=!0,k||($=P(e,"submit",K(i[4])),k=!0)},p(c,w){c[3]?d?d.p(c,w):(d=H(c),d.c(),d.m(n,null)):d&&(d.d(1),d=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:c}),o.$set(q),(!u||w&2)&&(a.disabled=c[1]),(!u||w&2)&&T(a,"btn-loading",c[1])},i(c){u||(h(o.$$.fragment,c),u=!0)},o(c){v(o.$$.fragment,c),u=!1},d(c){c&&b(e),d&&d.d(),z(o),k=!1,$()}}}function U(i){let e,t,n,l,s;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=C(),n=m("button"),n.textContent="Close",p(e,"class","alert alert-success"),p(n,"type","button"),p(n,"class","btn btn-transparent btn-block")},m(o,f){_(o,e,f),_(o,t,f),_(o,n,f),l||(s=P(n,"click",i[6]),l=!0)},p:E,i:E,o:E,d(o){o&&(b(e),b(t),b(n)),l=!1,s()}}}function H(i){let e,t,n;return{c(){e=y("to "),t=m("strong"),n=y(i[3]),p(t,"class","txt-nowrap")},m(l,s){_(l,e,s),_(l,t,s),g(t,n)},p(l,s){s&8&&O(n,l[3])},d(l){l&&(b(e),b(t))}}}function V(i){let e,t,n,l,s,o,f,a;return{c(){e=m("label"),t=y("Password"),l=C(),s=m("input"),p(e,"for",n=i[8]),p(s,"type","password"),p(s,"id",o=i[8]),s.required=!0,s.autofocus=!0},m(r,u){_(r,e,u),g(e,t),_(r,l,u),_(r,s,u),F(s,i[0]),s.focus(),f||(a=P(s,"input",i[7]),f=!0)},p(r,u){u&256&&n!==(n=r[8])&&p(e,"for",n),u&256&&o!==(o=r[8])&&p(s,"id",o),u&1&&s.value!==r[0]&&F(s,r[0])},d(r){r&&(b(e),b(l),b(s)),f=!1,a()}}}function X(i){let e,t,n,l;const s=[U,Q],o=[];function f(a,r){return a[2]?0:1}return e=f(i),t=o[e]=s[e](i),{c(){t.c(),n=R()},m(a,r){o[e].m(a,r),_(a,n,r),l=!0},p(a,r){let u=e;e=f(a),e===u?o[e].p(a,r):(W(),v(o[u],1,1,()=>{o[u]=null}),Y(),t=o[e],t?t.p(a,r):(t=o[e]=s[e](a),t.c()),h(t,1),t.m(n.parentNode,n))},i(a){l||(h(t),l=!0)},o(a){v(t),l=!1},d(a){a&&b(n),o[e].d(a)}}}function Z(i){let e,t;return e=new M({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:i}}}),{c(){S(e.$$.fragment)},m(n,l){L(e,n,l),t=!0},p(n,[l]){const s={};l&527&&(s.$$scope={dirty:l,ctx:n}),e.$set(s)},i(n){t||(h(e.$$.fragment,n),t=!0)},o(n){v(e.$$.fragment,n),t=!1},d(n){z(e,n)}}}function x(i,e,t){let n,{params:l}=e,s="",o=!1,f=!1;async function a(){if(o)return;t(1,o=!0);const k=new j("../");try{const $=A(l==null?void 0:l.token);await k.collection($.collectionId).confirmEmailChange(l==null?void 0:l.token,s),t(2,f=!0)}catch($){B.error($)}t(1,o=!1)}const r=()=>window.close();function u(){s=this.value,t(0,s)}return i.$$set=k=>{"params"in k&&t(5,l=k.params)},i.$$.update=()=>{i.$$.dirty&32&&t(3,n=N.getJWTPayload(l==null?void 0:l.token).newEmail||"")},[s,o,f,n,a,l,r,u]}class te extends G{constructor(e){super(),I(this,e,x,Z,J,{params:5})}}export{te as default};
|
||||
@@ -1,2 +1,2 @@
|
||||
import{S as J,i as M,s as W,F as Y,c as H,m as N,t as P,a as y,d as T,C as j,E as z,g as _,k as B,n as D,o as m,G as K,H as O,A as Q,p as E,e as b,v as q,b as C,f as p,q as G,h as w,r as S,u as U,x as F,w as V,y as R}from"./index-Bp3jGQ0J.js";function X(a){let e,l,s,n,t,o,c,r,i,u,v,g,k,h,d=a[4]&&I(a);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:a}}}),r=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:a}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=q(`Reset your user password
|
||||
`),d&&d.c(),t=C(),H(o.$$.fragment),c=C(),H(r.$$.fragment),i=C(),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=a[2],G(u,"btn-loading",a[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(r,e,null),w(e,i),w(e,u),w(u,v),g=!0,k||(h=S(e,"submit",U(a[5])),k=!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 A={};$&3073&&(A.$$scope={dirty:$,ctx:f}),o.$set(A);const L={};$&3074&&(L.$$scope={dirty:$,ctx:f}),r.$set(L),(!g||$&4)&&(u.disabled=f[2]),(!g||$&4)&&G(u,"btn-loading",f[2])},i(f){g||(P(o.$$.fragment,f),P(r.$$.fragment,f),g=!0)},o(f){y(o.$$.fragment,f),y(r.$$.fragment,f),g=!1},d(f){f&&m(e),d&&d.d(),T(o),T(r),k=!1,h()}}}function Z(a){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=C(),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",a[7]),n=!0)},p:F,i:F,o:F,d(o){o&&(m(e),m(l),m(s)),n=!1,t()}}}function I(a){let e,l,s;return{c(){e=q("for "),l=b("strong"),s=q(a[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),m(l))}}}function x(a){let e,l,s,n,t,o,c,r;return{c(){e=b("label"),l=q("New password"),n=C(),t=b("input"),p(e,"for",s=a[10]),p(t,"type","password"),p(t,"id",o=a[10]),t.required=!0,t.autofocus=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),R(t,a[0]),t.focus(),c||(r=S(t,"input",a[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),m(n),m(t)),c=!1,r()}}}function ee(a){let e,l,s,n,t,o,c,r;return{c(){e=b("label"),l=q("New password confirm"),n=C(),t=b("input"),p(e,"for",s=a[10]),p(t,"type","password"),p(t,"id",o=a[10]),t.required=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),R(t,a[1]),c||(r=S(t,"input",a[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),m(n),m(t)),c=!1,r()}}}function te(a){let e,l,s,n;const t=[Z,X],o=[];function c(r,i){return r[3]?0:1}return e=c(a),l=o[e]=t[e](a),{c(){l.c(),s=z()},m(r,i){o[e].m(r,i),_(r,s,i),n=!0},p(r,i){let u=e;e=c(r),e===u?o[e].p(r,i):(B(),y(o[u],1,1,()=>{o[u]=null}),D(),l=o[e],l?l.p(r,i):(l=o[e]=t[e](r),l.c()),P(l,1),l.m(s.parentNode,s))},i(r){n||(P(l),n=!0)},o(r){y(l),n=!1},d(r){r&&m(s),o[e].d(r)}}}function se(a){let e,l;return e=new Y({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:a}}}),{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||(P(e.$$.fragment,s),l=!0)},o(s){y(e.$$.fragment,s),l=!1},d(s){T(e,s)}}}function le(a,e,l){let s,{params:n}=e,t="",o="",c=!1,r=!1;async function i(){if(c)return;l(2,c=!0);const k=new K("../");try{const h=O(n==null?void 0:n.token);await k.collection(h.collectionId).confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,r=!0)}catch(h){Q.error(h)}l(2,c=!1)}const u=()=>window.close();function v(){t=this.value,l(0,t)}function g(){o=this.value,l(1,o)}return a.$$set=k=>{"params"in k&&l(6,n=k.params)},a.$$.update=()=>{a.$$.dirty&64&&l(4,s=j.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,r,s,i,n,u,v,g]}class oe extends J{constructor(e){super(),M(this,e,le,se,W,{params:6})}}export{oe as default};
|
||||
import{S as J,i as M,s as W,F as Y,c as H,m as N,t as P,a as y,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 q,b as C,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-B-F-pko3.js";function X(a){let e,l,s,n,t,o,c,r,i,u,v,g,k,h,d=a[4]&&I(a);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:a}}}),r=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:a}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=q(`Reset your user password
|
||||
`),d&&d.c(),t=C(),H(o.$$.fragment),c=C(),H(r.$$.fragment),i=C(),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=a[2],G(u,"btn-loading",a[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(r,e,null),w(e,i),w(e,u),w(u,v),g=!0,k||(h=S(e,"submit",U(a[5])),k=!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}),r.$set(z),(!g||$&4)&&(u.disabled=f[2]),(!g||$&4)&&G(u,"btn-loading",f[2])},i(f){g||(P(o.$$.fragment,f),P(r.$$.fragment,f),g=!0)},o(f){y(o.$$.fragment,f),y(r.$$.fragment,f),g=!1},d(f){f&&m(e),d&&d.d(),T(o),T(r),k=!1,h()}}}function Z(a){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=C(),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",a[7]),n=!0)},p:F,i:F,o:F,d(o){o&&(m(e),m(l),m(s)),n=!1,t()}}}function I(a){let e,l,s;return{c(){e=q("for "),l=b("strong"),s=q(a[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),m(l))}}}function x(a){let e,l,s,n,t,o,c,r;return{c(){e=b("label"),l=q("New password"),n=C(),t=b("input"),p(e,"for",s=a[10]),p(t,"type","password"),p(t,"id",o=a[10]),t.required=!0,t.autofocus=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),R(t,a[0]),t.focus(),c||(r=S(t,"input",a[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),m(n),m(t)),c=!1,r()}}}function ee(a){let e,l,s,n,t,o,c,r;return{c(){e=b("label"),l=q("New password confirm"),n=C(),t=b("input"),p(e,"for",s=a[10]),p(t,"type","password"),p(t,"id",o=a[10]),t.required=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),R(t,a[1]),c||(r=S(t,"input",a[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),m(n),m(t)),c=!1,r()}}}function te(a){let e,l,s,n;const t=[Z,X],o=[];function c(r,i){return r[3]?0:1}return e=c(a),l=o[e]=t[e](a),{c(){l.c(),s=A()},m(r,i){o[e].m(r,i),_(r,s,i),n=!0},p(r,i){let u=e;e=c(r),e===u?o[e].p(r,i):(B(),y(o[u],1,1,()=>{o[u]=null}),D(),l=o[e],l?l.p(r,i):(l=o[e]=t[e](r),l.c()),P(l,1),l.m(s.parentNode,s))},i(r){n||(P(l),n=!0)},o(r){y(l),n=!1},d(r){r&&m(s),o[e].d(r)}}}function se(a){let e,l;return e=new Y({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:a}}}),{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||(P(e.$$.fragment,s),l=!0)},o(s){y(e.$$.fragment,s),l=!1},d(s){T(e,s)}}}function le(a,e,l){let s,{params:n}=e,t="",o="",c=!1,r=!1;async function i(){if(c)return;l(2,c=!0);const k=new K("../");try{const h=O(n==null?void 0:n.token);await k.collection(h.collectionId).confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,r=!0)}catch(h){Q.error(h)}l(2,c=!1)}const u=()=>window.close();function v(){t=this.value,l(0,t)}function g(){o=this.value,l(1,o)}return a.$$set=k=>{"params"in k&&l(6,n=k.params)},a.$$.update=()=>{a.$$.dirty&64&&l(4,s=j.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,r,s,i,n,u,v,g]}class oe extends J{constructor(e){super(),M(this,e,le,se,W,{params:6})}}export{oe as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{S as v,i as y,s as g,F as w,c as x,m as C,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 f,b as _,f as d,r as b,x as p}from"./index-Bp3jGQ0J.js";function S(c){let t,s,e,n,l;return{c(){t=f("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=f("button"),e.textContent="Close",d(t,"class","alert alert-danger"),d(e,"type","button"),d(e,"class","btn btn-transparent btn-block")},m(i,o){r(i,t,o),r(i,s,o),r(i,e,o),n||(l=b(e,"click",c[4]),n=!0)},p,d(i){i&&(a(t),a(s),a(e)),n=!1,l()}}}function h(c){let t,s,e,n,l;return{c(){t=f("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=f("button"),e.textContent="Close",d(t,"class","alert alert-success"),d(e,"type","button"),d(e,"class","btn btn-transparent btn-block")},m(i,o){r(i,t,o),r(i,s,o),r(i,e,o),n||(l=b(e,"click",c[3]),n=!0)},p,d(i){i&&(a(t),a(s),a(e)),n=!1,l()}}}function F(c){let t;return{c(){t=f("div"),t.innerHTML='<div class="loader loader-lg"><em>Please wait...</em></div>',d(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function I(c){let t;function s(l,i){return l[1]?F:l[0]?h:S}let e=s(c),n=e(c);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){l&&a(t),n.d(l)}}}function V(c){let t,s;return t=new w({props:{nobranding:!0,$$slots:{default:[I]},$$scope:{ctx:c}}}),{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){H(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function q(c,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const u=new P("../");try{const m=T(e==null?void 0:e.token);await u.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const o=()=>window.close(),k=()=>window.close();return c.$$set=u=>{"params"in u&&s(2,e=u.params)},[n,l,e,o,k]}class G extends v{constructor(t){super(),y(this,t,q,V,g,{params:2})}}export{G as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{S as P,i as R,s as L,F as M,c as S,m as V,t as q,a as E,d as F,G as w,H as y,I as N,E as g,g as r,o as a,p as G,e as u,b as v,f,u as k,y as m,r as C,h as j}from"./index-B-F-pko3.js";function z(o){let e,l,n;function t(i,d){return i[4]?K:J}let s=t(o),c=s(o);return{c(){e=u("div"),e.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>',l=v(),c.c(),n=g(),f(e,"class","alert alert-danger")},m(i,d){r(i,e,d),r(i,l,d),c.m(i,d),r(i,n,d)},p(i,d){s===(s=t(i))&&c?c.p(i,d):(c.d(1),c=s(i),c&&(c.c(),c.m(n.parentNode,n)))},d(i){i&&(a(e),a(l),a(n)),c.d(i)}}}function A(o){let e,l,n,t,s;return{c(){e=u("div"),e.innerHTML='<div class="icon"><i class="ri-checkbox-circle-line"></i></div> <div class="content txt-bold"><p>Please check your email for the new verification link.</p></div>',l=v(),n=u("button"),n.textContent="Close",f(e,"class","alert alert-success"),f(n,"type","button"),f(n,"class","btn btn-transparent btn-block")},m(c,i){r(c,e,i),r(c,l,i),r(c,n,i),t||(s=k(n,"click",o[8]),t=!0)},p:m,d(c){c&&(a(e),a(l),a(n)),t=!1,s()}}}function B(o){let e,l,n,t,s;return{c(){e=u("div"),e.innerHTML='<div class="icon"><i class="ri-checkbox-circle-line"></i></div> <div class="content txt-bold"><p>Successfully verified email address.</p></div>',l=v(),n=u("button"),n.textContent="Close",f(e,"class","alert alert-success"),f(n,"type","button"),f(n,"class","btn btn-transparent btn-block")},m(c,i){r(c,e,i),r(c,l,i),r(c,n,i),t||(s=k(n,"click",o[7]),t=!0)},p:m,d(c){c&&(a(e),a(l),a(n)),t=!1,s()}}}function D(o){let e;return{c(){e=u("div"),e.innerHTML='<div class="loader loader-lg"><em>Please wait...</em></div>',f(e,"class","txt-center")},m(l,n){r(l,e,n)},p:m,d(l){l&&a(e)}}}function J(o){let e,l,n;return{c(){e=u("button"),e.textContent="Close",f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(t,s){r(t,e,s),l||(n=k(e,"click",o[9]),l=!0)},p:m,d(t){t&&a(e),l=!1,n()}}}function K(o){let e,l,n,t;return{c(){e=u("button"),l=u("span"),l.textContent="Resend",f(l,"class","txt"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block"),e.disabled=o[3],C(e,"btn-loading",o[3])},m(s,c){r(s,e,c),j(e,l),n||(t=k(e,"click",o[5]),n=!0)},p(s,c){c&8&&(e.disabled=s[3]),c&8&&C(e,"btn-loading",s[3])},d(s){s&&a(e),n=!1,t()}}}function O(o){let e;function l(s,c){return s[1]?D:s[0]?B:s[2]?A:z}let n=l(o),t=n(o);return{c(){t.c(),e=g()},m(s,c){t.m(s,c),r(s,e,c)},p(s,c){n===(n=l(s))&&t?t.p(s,c):(t.d(1),t=n(s),t&&(t.c(),t.m(e.parentNode,e)))},d(s){s&&a(e),t.d(s)}}}function Q(o){let e,l;return e=new M({props:{nobranding:!0,$$slots:{default:[O]},$$scope:{ctx:o}}}),{c(){S(e.$$.fragment)},m(n,t){V(e,n,t),l=!0},p(n,[t]){const s={};t&2079&&(s.$$scope={dirty:t,ctx:n}),e.$set(s)},i(n){l||(q(e.$$.fragment,n),l=!0)},o(n){E(e.$$.fragment,n),l=!1},d(n){F(e,n)}}}function U(o,e,l){let n,{params:t}=e,s=!1,c=!1,i=!1,d=!1;x();async function x(){if(c)return;l(1,c=!0);const b=new w("../");try{const p=y(t==null?void 0:t.token);await b.collection(p.collectionId).confirmVerification(t==null?void 0:t.token),l(0,s=!0)}catch{l(0,s=!1)}l(1,c=!1)}async function T(){const b=y(t==null?void 0:t.token);if(d||!b.collectionId||!b.email)return;l(3,d=!0);const p=new w("../");try{const _=y(t==null?void 0:t.token);await p.collection(_.collectionId).requestVerification(_.email),l(2,i=!0)}catch(_){G.error(_),l(2,i=!1)}l(3,d=!1)}const h=()=>window.close(),H=()=>window.close(),I=()=>window.close();return o.$$set=b=>{"params"in b&&l(6,t=b.params)},o.$$.update=()=>{o.$$.dirty&64&&l(4,n=(t==null?void 0:t.token)&&N(t.token))},[s,c,i,d,n,T,t,h,H,I]}class X extends P{constructor(e){super(),R(this,e,U,Q,L,{params:6})}}export{X as default};
|
||||
@@ -0,0 +1,2 @@
|
||||
import{S as E,i as G,s as I,F as K,c as R,m as B,t as N,a as T,d as j,C as M,q as J,e as _,w as P,b as k,f,r as L,g as b,h as c,u as z,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 q}from"./index-B-F-pko3.js";function y(r){let e,n,s;return{c(){e=P("for "),n=_("strong"),s=P(r[3]),f(n,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,n,t),c(n,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&(w(e),w(n))}}}function x(r){let e,n,s,l,t,i,p,d;return{c(){e=_("label"),n=P("New password"),l=k(),t=_("input"),f(e,"for",s=r[8]),f(t,"type","password"),f(t,"id",i=r[8]),t.required=!0,t.autofocus=!0},m(u,a){b(u,e,a),c(e,n),b(u,l,a),b(u,t,a),q(t,r[0]),t.focus(),p||(d=z(t,"input",r[6]),p=!0)},p(u,a){a&256&&s!==(s=u[8])&&f(e,"for",s),a&256&&i!==(i=u[8])&&f(t,"id",i),a&1&&t.value!==u[0]&&q(t,u[0])},d(u){u&&(w(e),w(l),w(t)),p=!1,d()}}}function ee(r){let e,n,s,l,t,i,p,d;return{c(){e=_("label"),n=P("New password confirm"),l=k(),t=_("input"),f(e,"for",s=r[8]),f(t,"type","password"),f(t,"id",i=r[8]),t.required=!0},m(u,a){b(u,e,a),c(e,n),b(u,l,a),b(u,t,a),q(t,r[1]),p||(d=z(t,"input",r[7]),p=!0)},p(u,a){a&256&&s!==(s=u[8])&&f(e,"for",s),a&256&&i!==(i=u[8])&&f(t,"id",i),a&2&&t.value!==u[1]&&q(t,u[1])},d(u){u&&(w(e),w(l),w(t)),p=!1,d()}}}function te(r){let e,n,s,l,t,i,p,d,u,a,g,S,C,v,h,F,A,m=r[3]&&y(r);return i=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:r}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:r}}}),{c(){e=_("form"),n=_("div"),s=_("h4"),l=P(`Reset your superuser password
|
||||
`),m&&m.c(),t=k(),R(i.$$.fragment),p=k(),R(d.$$.fragment),u=k(),a=_("button"),g=_("span"),g.textContent="Set new password",S=k(),C=_("div"),v=_("a"),v.textContent="Back to login",f(s,"class","m-b-xs"),f(n,"class","content txt-center m-b-sm"),f(g,"class","txt"),f(a,"type","submit"),f(a,"class","btn btn-lg btn-block"),a.disabled=r[2],L(a,"btn-loading",r[2]),f(e,"class","m-b-base"),f(v,"href","/login"),f(v,"class","link-hint"),f(C,"class","content txt-center")},m(o,$){b(o,e,$),c(e,n),c(n,s),c(s,l),m&&m.m(s,null),c(e,t),B(i,e,null),c(e,p),B(d,e,null),c(e,u),c(e,a),c(a,g),b(o,S,$),b(o,C,$),c(C,v),h=!0,F||(A=[z(e,"submit",O(r[4])),Q(U.call(null,v))],F=!0)},p(o,$){o[3]?m?m.p(o,$):(m=y(o),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const D={};$&769&&(D.$$scope={dirty:$,ctx:o}),i.$set(D);const H={};$&770&&(H.$$scope={dirty:$,ctx:o}),d.$set(H),(!h||$&4)&&(a.disabled=o[2]),(!h||$&4)&&L(a,"btn-loading",o[2])},i(o){h||(N(i.$$.fragment,o),N(d.$$.fragment,o),h=!0)},o(o){T(i.$$.fragment,o),T(d.$$.fragment,o),h=!1},d(o){o&&(w(e),w(S),w(C)),m&&m.d(),j(i),j(d),F=!1,V(A)}}}function se(r){let e,n;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:r}}}),{c(){R(e.$$.fragment)},m(s,l){B(e,s,l),n=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){n||(N(e.$$.fragment,s),n=!0)},o(s){T(e.$$.fragment,s),n=!1},d(s){j(e,s)}}}function le(r,e,n){let s,{params:l}=e,t="",i="",p=!1;async function d(){if(!p){n(2,p=!0);try{await W.collection("_superusers").confirmPasswordReset(l==null?void 0:l.token,t,i),X("Successfully set a new superuser password."),Y("/")}catch(g){W.error(g)}n(2,p=!1)}}function u(){t=this.value,n(0,t)}function a(){i=this.value,n(1,i)}return r.$$set=g=>{"params"in g&&n(5,l=g.params)},r.$$.update=()=>{r.$$.dirty&32&&n(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,i,p,s,d,l,u,a]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{S as M,i as T,s as j,F as z,c as L,m as R,t as w,a as y,d as E,b as v,e as m,f as p,g,h as d,j as B,l as N,k as A,n as D,o as k,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 S}from"./index-B-F-pko3.js";function K(u){let e,s,n,l,t,r,c,_,i,a,b,f;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:o})=>({5:o}),({uniqueId:o})=>o?32:0]},$$scope:{ctx:u}}}),{c(){e=m("form"),s=m("div"),s.innerHTML='<h4 class="m-b-xs">Forgotten superuser password</h4> <p>Enter the email associated with your account and we’ll send you a recovery link:</p>',n=v(),L(l.$$.fragment),t=v(),r=m("button"),c=m("i"),_=v(),i=m("span"),i.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(c,"class","ri-mail-send-line"),p(i,"class","txt"),p(r,"type","submit"),p(r,"class","btn btn-lg btn-block"),r.disabled=u[1],F(r,"btn-loading",u[1]),p(e,"class","m-b-base")},m(o,$){g(o,e,$),d(e,s),d(e,n),R(l,e,null),d(e,t),d(e,r),d(r,c),d(r,_),d(r,i),a=!0,b||(f=H(e,"submit",I(u[3])),b=!0)},p(o,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:o}),l.$set(q),(!a||$&2)&&(r.disabled=o[1]),(!a||$&2)&&F(r,"btn-loading",o[1])},i(o){a||(w(l.$$.fragment,o),a=!0)},o(o){y(l.$$.fragment,o),a=!1},d(o){o&&k(e),E(l),b=!1,f()}}}function O(u){let e,s,n,l,t,r,c,_,i;return{c(){e=m("div"),s=m("div"),s.innerHTML='<i class="ri-checkbox-circle-line"></i>',n=v(),l=m("div"),t=m("p"),r=h("Check "),c=m("strong"),_=h(u[0]),i=h(" for the recovery link."),p(s,"class","icon"),p(c,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){g(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,r),d(t,c),d(c,_),d(t,i)},p(a,b){b&1&&J(_,a[0])},i:P,o:P,d(a){a&&k(e)}}}function Q(u){let e,s,n,l,t,r,c,_;return{c(){e=m("label"),s=h("Email"),l=v(),t=m("input"),p(e,"for",n=u[5]),p(t,"type","email"),p(t,"id",r=u[5]),t.required=!0,t.autofocus=!0},m(i,a){g(i,e,a),d(e,s),g(i,l,a),g(i,t,a),S(t,u[0]),t.focus(),c||(_=H(t,"input",u[4]),c=!0)},p(i,a){a&32&&n!==(n=i[5])&&p(e,"for",n),a&32&&r!==(r=i[5])&&p(t,"id",r),a&1&&t.value!==i[0]&&S(t,i[0])},d(i){i&&(k(e),k(l),k(t)),c=!1,_()}}}function U(u){let e,s,n,l,t,r,c,_;const i=[O,K],a=[];function b(f,o){return f[2]?0:1}return e=b(u),s=a[e]=i[e](u),{c(){s.c(),n=v(),l=m("div"),t=m("a"),t.textContent="Back to login",p(t,"href","/login"),p(t,"class","link-hint"),p(l,"class","content txt-center")},m(f,o){a[e].m(f,o),g(f,n,o),g(f,l,o),d(l,t),r=!0,c||(_=B(N.call(null,t)),c=!0)},p(f,o){let $=e;e=b(f),e===$?a[e].p(f,o):(A(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(f,o):(s=a[e]=i[e](f),s.c()),w(s,1),s.m(n.parentNode,n))},i(f){r||(w(s),r=!0)},o(f){y(s),r=!1},d(f){f&&(k(n),k(l)),a[e].d(f),c=!1,_()}}}function V(u){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:u}}}),{c(){L(e.$$.fragment)},m(n,l){R(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(u,e,s){let n="",l=!1,t=!1;async function r(){if(!l){s(1,l=!0);try{await C.collection("_superusers").requestPasswordReset(n),s(2,t=!0)}catch(_){C.error(_)}s(1,l=!1)}}function c(){n=this.value,s(0,n)}return[n,l,t,r,c]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default};
|
||||
@@ -0,0 +1,100 @@
|
||||
import{S as se,i as ne,s as oe,T as U,e as p,b as S,w as D,f as k,g as b,h as u,x as z,U as ee,V as ye,k as te,W as Te,n as le,t as V,a as X,o as v,r as H,u as ae,R as Ee,c as J,m as Z,d as x,Q as Ce,X as fe,C as qe,p as Oe,Y as pe}from"./index-B-F-pko3.js";function me(o,t,e){const n=o.slice();return n[4]=t[e],n}function _e(o,t,e){const n=o.slice();return n[4]=t[e],n}function he(o,t){let e,n=t[4].code+"",d,c,r,a;function f(){return t[3](t[4])}return{key:o,first:null,c(){e=p("button"),d=D(n),c=S(),k(e,"class","tab-item"),H(e,"active",t[1]===t[4].code),this.first=e},m(g,y){b(g,e,y),u(e,d),u(e,c),r||(a=ae(e,"click",f),r=!0)},p(g,y){t=g,y&4&&n!==(n=t[4].code+"")&&z(d,n),y&6&&H(e,"active",t[1]===t[4].code)},d(g){g&&v(e),r=!1,a()}}}function be(o,t){let e,n,d,c;return n=new Ee({props:{content:t[4].body}}),{key:o,first:null,c(){e=p("div"),J(n.$$.fragment),d=S(),k(e,"class","tab-item"),H(e,"active",t[1]===t[4].code),this.first=e},m(r,a){b(r,e,a),Z(n,e,null),u(e,d),c=!0},p(r,a){t=r;const f={};a&4&&(f.content=t[4].body),n.$set(f),(!c||a&6)&&H(e,"active",t[1]===t[4].code)},i(r){c||(V(n.$$.fragment,r),c=!0)},o(r){X(n.$$.fragment,r),c=!1},d(r){r&&v(e),x(n)}}}function We(o){let t,e,n,d,c,r,a,f=o[0].name+"",g,y,I,q,Q,N,L,O,W,T,C,R=[],M=new Map,j,A,h=[],K=new Map,E,P=U(o[2]);const B=l=>l[4].code;for(let l=0;l<P.length;l+=1){let s=_e(o,P,l),_=B(s);M.set(_,R[l]=he(_,s))}let m=U(o[2]);const Y=l=>l[4].code;for(let l=0;l<m.length;l+=1){let s=me(o,m,l),_=Y(s);K.set(_,h[l]=be(_,s))}return{c(){t=p("div"),e=p("strong"),e.textContent="POST",n=S(),d=p("div"),c=p("p"),r=D("/api/collections/"),a=p("strong"),g=D(f),y=D("/confirm-password-reset"),I=S(),q=p("div"),q.textContent="Body Parameters",Q=S(),N=p("table"),N.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 password reset request email.</td></tr> <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 new password to set.</td></tr> <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>',L=S(),O=p("div"),O.textContent="Responses",W=S(),T=p("div"),C=p("div");for(let l=0;l<R.length;l+=1)R[l].c();j=S(),A=p("div");for(let l=0;l<h.length;l+=1)h[l].c();k(e,"class","label label-primary"),k(d,"class","content"),k(t,"class","alert alert-success"),k(q,"class","section-title"),k(N,"class","table-compact table-border m-b-base"),k(O,"class","section-title"),k(C,"class","tabs-header compact combined left"),k(A,"class","tabs-content"),k(T,"class","tabs")},m(l,s){b(l,t,s),u(t,e),u(t,n),u(t,d),u(d,c),u(c,r),u(c,a),u(a,g),u(c,y),b(l,I,s),b(l,q,s),b(l,Q,s),b(l,N,s),b(l,L,s),b(l,O,s),b(l,W,s),b(l,T,s),u(T,C);for(let _=0;_<R.length;_+=1)R[_]&&R[_].m(C,null);u(T,j),u(T,A);for(let _=0;_<h.length;_+=1)h[_]&&h[_].m(A,null);E=!0},p(l,[s]){(!E||s&1)&&f!==(f=l[0].name+"")&&z(g,f),s&6&&(P=U(l[2]),R=ee(R,s,B,1,l,P,M,C,ye,he,null,_e)),s&6&&(m=U(l[2]),te(),h=ee(h,s,Y,1,l,m,K,A,Te,be,null,me),le())},i(l){if(!E){for(let s=0;s<m.length;s+=1)V(h[s]);E=!0}},o(l){for(let s=0;s<h.length;s+=1)X(h[s]);E=!1},d(l){l&&(v(t),v(I),v(q),v(Q),v(N),v(L),v(O),v(W),v(T));for(let s=0;s<R.length;s+=1)R[s].d();for(let s=0;s<h.length;s+=1)h[s].d()}}}function Ne(o,t,e){let{collection:n}=t,d=204,c=[];const r=a=>e(1,d=a.code);return o.$$set=a=>{"collection"in a&&e(0,n=a.collection)},e(2,c=[{code:204,body:"null"},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"token": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`}]),[n,d,c,r]}class Ae extends se{constructor(t){super(),ne(this,t,Ne,We,oe,{collection:0})}}function ve(o,t,e){const n=o.slice();return n[4]=t[e],n}function ke(o,t,e){const n=o.slice();return n[4]=t[e],n}function ge(o,t){let e,n=t[4].code+"",d,c,r,a;function f(){return t[3](t[4])}return{key:o,first:null,c(){e=p("button"),d=D(n),c=S(),k(e,"class","tab-item"),H(e,"active",t[1]===t[4].code),this.first=e},m(g,y){b(g,e,y),u(e,d),u(e,c),r||(a=ae(e,"click",f),r=!0)},p(g,y){t=g,y&4&&n!==(n=t[4].code+"")&&z(d,n),y&6&&H(e,"active",t[1]===t[4].code)},d(g){g&&v(e),r=!1,a()}}}function we(o,t){let e,n,d,c;return n=new Ee({props:{content:t[4].body}}),{key:o,first:null,c(){e=p("div"),J(n.$$.fragment),d=S(),k(e,"class","tab-item"),H(e,"active",t[1]===t[4].code),this.first=e},m(r,a){b(r,e,a),Z(n,e,null),u(e,d),c=!0},p(r,a){t=r;const f={};a&4&&(f.content=t[4].body),n.$set(f),(!c||a&6)&&H(e,"active",t[1]===t[4].code)},i(r){c||(V(n.$$.fragment,r),c=!0)},o(r){X(n.$$.fragment,r),c=!1},d(r){r&&v(e),x(n)}}}function De(o){let t,e,n,d,c,r,a,f=o[0].name+"",g,y,I,q,Q,N,L,O,W,T,C,R=[],M=new Map,j,A,h=[],K=new Map,E,P=U(o[2]);const B=l=>l[4].code;for(let l=0;l<P.length;l+=1){let s=ke(o,P,l),_=B(s);M.set(_,R[l]=ge(_,s))}let m=U(o[2]);const Y=l=>l[4].code;for(let l=0;l<m.length;l+=1){let s=ve(o,m,l),_=Y(s);K.set(_,h[l]=we(_,s))}return{c(){t=p("div"),e=p("strong"),e.textContent="POST",n=S(),d=p("div"),c=p("p"),r=D("/api/collections/"),a=p("strong"),g=D(f),y=D("/request-password-reset"),I=S(),q=p("div"),q.textContent="Body Parameters",Q=S(),N=p("table"),N.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>',L=S(),O=p("div"),O.textContent="Responses",W=S(),T=p("div"),C=p("div");for(let l=0;l<R.length;l+=1)R[l].c();j=S(),A=p("div");for(let l=0;l<h.length;l+=1)h[l].c();k(e,"class","label label-primary"),k(d,"class","content"),k(t,"class","alert alert-success"),k(q,"class","section-title"),k(N,"class","table-compact table-border m-b-base"),k(O,"class","section-title"),k(C,"class","tabs-header compact combined left"),k(A,"class","tabs-content"),k(T,"class","tabs")},m(l,s){b(l,t,s),u(t,e),u(t,n),u(t,d),u(d,c),u(c,r),u(c,a),u(a,g),u(c,y),b(l,I,s),b(l,q,s),b(l,Q,s),b(l,N,s),b(l,L,s),b(l,O,s),b(l,W,s),b(l,T,s),u(T,C);for(let _=0;_<R.length;_+=1)R[_]&&R[_].m(C,null);u(T,j),u(T,A);for(let _=0;_<h.length;_+=1)h[_]&&h[_].m(A,null);E=!0},p(l,[s]){(!E||s&1)&&f!==(f=l[0].name+"")&&z(g,f),s&6&&(P=U(l[2]),R=ee(R,s,B,1,l,P,M,C,ye,ge,null,ke)),s&6&&(m=U(l[2]),te(),h=ee(h,s,Y,1,l,m,K,A,Te,we,null,ve),le())},i(l){if(!E){for(let s=0;s<m.length;s+=1)V(h[s]);E=!0}},o(l){for(let s=0;s<h.length;s+=1)X(h[s]);E=!1},d(l){l&&(v(t),v(I),v(q),v(Q),v(N),v(L),v(O),v(W),v(T));for(let s=0;s<R.length;s+=1)R[s].d();for(let s=0;s<h.length;s+=1)h[s].d()}}}function Me(o,t,e){let{collection:n}=t,d=204,c=[];const r=a=>e(1,d=a.code);return o.$$set=a=>{"collection"in a&&e(0,n=a.collection)},e(2,c=[{code:204,body:"null"},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"email": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`}]),[n,d,c,r]}class Be extends se{constructor(t){super(),ne(this,t,Me,De,oe,{collection:0})}}function $e(o,t,e){const n=o.slice();return n[5]=t[e],n[7]=e,n}function Re(o,t,e){const n=o.slice();return n[5]=t[e],n[7]=e,n}function Pe(o){let t,e,n,d,c;function r(){return o[4](o[7])}return{c(){t=p("button"),e=p("div"),e.textContent=`${o[5].title}`,n=S(),k(e,"class","txt"),k(t,"class","tab-item"),H(t,"active",o[1]==o[7])},m(a,f){b(a,t,f),u(t,e),u(t,n),d||(c=ae(t,"click",r),d=!0)},p(a,f){o=a,f&2&&H(t,"active",o[1]==o[7])},d(a){a&&v(t),d=!1,c()}}}function Se(o){let t,e,n,d;var c=o[5].component;function r(a,f){return{props:{collection:a[0]}}}return c&&(e=pe(c,r(o))),{c(){t=p("div"),e&&J(e.$$.fragment),n=S(),k(t,"class","tab-item"),H(t,"active",o[1]==o[7])},m(a,f){b(a,t,f),e&&Z(e,t,null),u(t,n),d=!0},p(a,f){if(c!==(c=a[5].component)){if(e){te();const g=e;X(g.$$.fragment,1,0,()=>{x(g,1)}),le()}c?(e=pe(c,r(a)),J(e.$$.fragment),V(e.$$.fragment,1),Z(e,t,n)):e=null}else if(c){const g={};f&1&&(g.collection=a[0]),e.$set(g)}(!d||f&2)&&H(t,"active",a[1]==a[7])},i(a){d||(e&&V(e.$$.fragment,a),d=!0)},o(a){e&&X(e.$$.fragment,a),d=!1},d(a){a&&v(t),e&&x(e)}}}function Fe(o){var l,s,_,ie;let t,e,n=o[0].name+"",d,c,r,a,f,g,y,I=o[0].name+"",q,Q,N,L,O,W,T,C,R,M,j,A,h,K;W=new Ce({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[2]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(l=o[0])==null?void 0:l.name}').requestPasswordReset('test@example.com');
|
||||
|
||||
// ---
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
// note: after this call all previously issued auth tokens are invalidated
|
||||
await pb.collection('${(s=o[0])==null?void 0:s.name}').confirmPasswordReset(
|
||||
'RESET_TOKEN',
|
||||
'NEW_PASSWORD',
|
||||
'NEW_PASSWORD_CONFIRM',
|
||||
);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${o[2]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(_=o[0])==null?void 0:_.name}').requestPasswordReset('test@example.com');
|
||||
|
||||
// ---
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
// note: after this call all previously issued auth tokens are invalidated
|
||||
await pb.collection('${(ie=o[0])==null?void 0:ie.name}').confirmPasswordReset(
|
||||
'RESET_TOKEN',
|
||||
'NEW_PASSWORD',
|
||||
'NEW_PASSWORD_CONFIRM',
|
||||
);
|
||||
`}});let E=U(o[3]),P=[];for(let i=0;i<E.length;i+=1)P[i]=Pe(Re(o,E,i));let B=U(o[3]),m=[];for(let i=0;i<B.length;i+=1)m[i]=Se($e(o,B,i));const Y=i=>X(m[i],1,1,()=>{m[i]=null});return{c(){t=p("h3"),e=D("Password reset ("),d=D(n),c=D(")"),r=S(),a=p("div"),f=p("p"),g=D("Sends "),y=p("strong"),q=D(I),Q=D(" password reset email request."),N=S(),L=p("p"),L.textContent=`On successful password reset all previously issued auth tokens for the specific record will be
|
||||
automatically invalidated.`,O=S(),J(W.$$.fragment),T=S(),C=p("h6"),C.textContent="API details",R=S(),M=p("div"),j=p("div");for(let i=0;i<P.length;i+=1)P[i].c();A=S(),h=p("div");for(let i=0;i<m.length;i+=1)m[i].c();k(t,"class","m-b-sm"),k(a,"class","content txt-lg m-b-sm"),k(C,"class","m-b-xs"),k(j,"class","tabs-header compact"),k(h,"class","tabs-content"),k(M,"class","tabs")},m(i,$){b(i,t,$),u(t,e),u(t,d),u(t,c),b(i,r,$),b(i,a,$),u(a,f),u(f,g),u(f,y),u(y,q),u(f,Q),u(a,N),u(a,L),b(i,O,$),Z(W,i,$),b(i,T,$),b(i,C,$),b(i,R,$),b(i,M,$),u(M,j);for(let F=0;F<P.length;F+=1)P[F]&&P[F].m(j,null);u(M,A),u(M,h);for(let F=0;F<m.length;F+=1)m[F]&&m[F].m(h,null);K=!0},p(i,[$]){var ce,re,de,ue;(!K||$&1)&&n!==(n=i[0].name+"")&&z(d,n),(!K||$&1)&&I!==(I=i[0].name+"")&&z(q,I);const F={};if($&5&&(F.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${i[2]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(ce=i[0])==null?void 0:ce.name}').requestPasswordReset('test@example.com');
|
||||
|
||||
// ---
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
// note: after this call all previously issued auth tokens are invalidated
|
||||
await pb.collection('${(re=i[0])==null?void 0:re.name}').confirmPasswordReset(
|
||||
'RESET_TOKEN',
|
||||
'NEW_PASSWORD',
|
||||
'NEW_PASSWORD_CONFIRM',
|
||||
);
|
||||
`),$&5&&(F.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${i[2]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(de=i[0])==null?void 0:de.name}').requestPasswordReset('test@example.com');
|
||||
|
||||
// ---
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
// note: after this call all previously issued auth tokens are invalidated
|
||||
await pb.collection('${(ue=i[0])==null?void 0:ue.name}').confirmPasswordReset(
|
||||
'RESET_TOKEN',
|
||||
'NEW_PASSWORD',
|
||||
'NEW_PASSWORD_CONFIRM',
|
||||
);
|
||||
`),W.$set(F),$&10){E=U(i[3]);let w;for(w=0;w<E.length;w+=1){const G=Re(i,E,w);P[w]?P[w].p(G,$):(P[w]=Pe(G),P[w].c(),P[w].m(j,null))}for(;w<P.length;w+=1)P[w].d(1);P.length=E.length}if($&11){B=U(i[3]);let w;for(w=0;w<B.length;w+=1){const G=$e(i,B,w);m[w]?(m[w].p(G,$),V(m[w],1)):(m[w]=Se(G),m[w].c(),V(m[w],1),m[w].m(h,null))}for(te(),w=B.length;w<m.length;w+=1)Y(w);le()}},i(i){if(!K){V(W.$$.fragment,i);for(let $=0;$<B.length;$+=1)V(m[$]);K=!0}},o(i){X(W.$$.fragment,i),m=m.filter(Boolean);for(let $=0;$<m.length;$+=1)X(m[$]);K=!1},d(i){i&&(v(t),v(r),v(a),v(O),v(T),v(C),v(R),v(M)),x(W,i),fe(P,i),fe(m,i)}}}function Ie(o,t,e){let n,{collection:d}=t;const c=[{title:"Request password reset",component:Be},{title:"Confirm password reset",component:Ae}];let r=0;const a=f=>e(1,r=f);return o.$$set=f=>{"collection"in f&&e(0,d=f.collection)},e(2,n=qe.getApiExampleUrl(Oe.baseURL)),[d,r,n,c,a]}class Ue extends se{constructor(t){super(),ne(this,t,Ie,Fe,oe,{collection:0})}}export{Ue as default};
|
||||
@@ -1,61 +1,61 @@
|
||||
import{S as re,i as ae,s as be,N as pe,C as P,e as p,v as y,b as a,c as se,f as u,g as s,h as I,m as ne,w as ue,t as ie,a as ce,o as n,d as le,A as me}from"./index-Bp3jGQ0J.js";import{S as de}from"./SdkTabs-DxNNd6Sw.js";function he(t){var B,U,A,W,H,L,T,q,M,N,j,J;let i,m,c=t[0].name+"",b,d,k,h,D,f,_,l,C,$,S,g,w,v,E,r,R;return l=new de({props:{js:`
|
||||
import{S as re,i as ae,s as be,Q as pe,R as ue,C as P,e as p,w as y,b as a,c as se,f as u,g as s,h as I,m as ne,x as me,t as ie,a as ce,o as n,d as le,p as de}from"./index-B-F-pko3.js";function he(o){var B,U,W,L,A,H,T,q,M,j,J,N;let i,m,c=o[0].name+"",b,d,k,h,D,f,_,l,C,$,S,g,w,v,E,r,R;return l=new pe({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${t[1]}');
|
||||
const pb = new PocketBase('${o[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
await pb.collection('users').authWithPassword('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any ${(B=t[0])==null?void 0:B.name} record
|
||||
pb.collection('${(U=t[0])==null?void 0:U.name}').subscribe('*', function (e) {
|
||||
// Subscribe to changes in any ${(B=o[0])==null?void 0:B.name} record
|
||||
pb.collection('${(U=o[0])==null?void 0:U.name}').subscribe('*', function (e) {
|
||||
console.log(e.action);
|
||||
console.log(e.record);
|
||||
}, { /* other options like expand, custom headers, etc. */ });
|
||||
}, { /* other options like: filter, expand, custom headers, etc. */ });
|
||||
|
||||
// Subscribe to changes only in the specified record
|
||||
pb.collection('${(A=t[0])==null?void 0:A.name}').subscribe('RECORD_ID', function (e) {
|
||||
pb.collection('${(W=o[0])==null?void 0:W.name}').subscribe('RECORD_ID', function (e) {
|
||||
console.log(e.action);
|
||||
console.log(e.record);
|
||||
}, { /* other options like expand, custom headers, etc. */ });
|
||||
}, { /* other options like: filter, expand, custom headers, etc. */ });
|
||||
|
||||
// Unsubscribe
|
||||
pb.collection('${(W=t[0])==null?void 0:W.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions
|
||||
pb.collection('${(H=t[0])==null?void 0:H.name}').unsubscribe('*'); // remove all '*' topic subscriptions
|
||||
pb.collection('${(L=t[0])==null?void 0:L.name}').unsubscribe(); // remove all subscriptions in the collection
|
||||
pb.collection('${(L=o[0])==null?void 0:L.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions
|
||||
pb.collection('${(A=o[0])==null?void 0:A.name}').unsubscribe('*'); // remove all '*' topic subscriptions
|
||||
pb.collection('${(H=o[0])==null?void 0:H.name}').unsubscribe(); // remove all subscriptions in the collection
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${t[1]}');
|
||||
final pb = PocketBase('${o[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
await pb.collection('users').authWithPassword('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any ${(T=t[0])==null?void 0:T.name} record
|
||||
pb.collection('${(q=t[0])==null?void 0:q.name}').subscribe('*', (e) {
|
||||
// Subscribe to changes in any ${(T=o[0])==null?void 0:T.name} record
|
||||
pb.collection('${(q=o[0])==null?void 0:q.name}').subscribe('*', (e) {
|
||||
print(e.action);
|
||||
print(e.record);
|
||||
}, /* other options like expand, custom headers, etc. */);
|
||||
}, /* other options like: filter, expand, custom headers, etc. */);
|
||||
|
||||
// Subscribe to changes only in the specified record
|
||||
pb.collection('${(M=t[0])==null?void 0:M.name}').subscribe('RECORD_ID', (e) {
|
||||
pb.collection('${(M=o[0])==null?void 0:M.name}').subscribe('RECORD_ID', (e) {
|
||||
print(e.action);
|
||||
print(e.record);
|
||||
}, /* other options like expand, custom headers, etc. */);
|
||||
}, /* other options like: filter, expand, custom headers, etc. */);
|
||||
|
||||
// Unsubscribe
|
||||
pb.collection('${(N=t[0])==null?void 0:N.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions
|
||||
pb.collection('${(j=t[0])==null?void 0:j.name}').unsubscribe('*'); // remove all '*' topic subscriptions
|
||||
pb.collection('${(J=t[0])==null?void 0:J.name}').unsubscribe(); // remove all subscriptions in the collection
|
||||
`}}),r=new pe({props:{content:JSON.stringify({action:"create",record:P.dummyCollectionRecord(t[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){i=p("h3"),m=y("Realtime ("),b=y(c),d=y(")"),k=a(),h=p("div"),h.innerHTML=`<p>Subscribe to realtime changes via Server-Sent Events (SSE).</p> <p>Events are sent for <strong>create</strong>, <strong>update</strong>
|
||||
pb.collection('${(j=o[0])==null?void 0:j.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions
|
||||
pb.collection('${(J=o[0])==null?void 0:J.name}').unsubscribe('*'); // remove all '*' topic subscriptions
|
||||
pb.collection('${(N=o[0])==null?void 0:N.name}').unsubscribe(); // remove all subscriptions in the collection
|
||||
`}}),r=new ue({props:{content:JSON.stringify({action:"create",record:P.dummyCollectionRecord(o[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){i=p("h3"),m=y("Realtime ("),b=y(c),d=y(")"),k=a(),h=p("div"),h.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 "Event data format" section below).</p>`,D=a(),f=p("div"),f.innerHTML=`<div class="icon"><i class="ri-information-line"></i></div> <div class="contet"><p><strong>You could subscribe to a single record or to an entire collection.</strong></p> <p>When you subscribe to a <strong>single record</strong>, the collection's
|
||||
<strong>ViewRule</strong> will be used to determine whether the subscriber has access to receive the
|
||||
event message.</p> <p>When you subscribe to an <strong>entire collection</strong>, the collection's
|
||||
<strong>ListRule</strong> will be used to determine whether the subscriber has access to receive the
|
||||
event message.</p></div>`,_=a(),se(l.$$.fragment),C=a(),$=p("h6"),$.textContent="API details",S=a(),g=p("div"),g.innerHTML='<strong class="label label-primary">SSE</strong> <div class="content"><p>/api/realtime</p></div>',w=a(),v=p("div"),v.textContent="Event data format",E=a(),se(r.$$.fragment),u(i,"class","m-b-sm"),u(h,"class","content txt-lg m-b-sm"),u(f,"class","alert alert-info m-t-10 m-b-sm"),u($,"class","m-b-xs"),u(g,"class","alert"),u(v,"class","section-title")},m(e,o){s(e,i,o),I(i,m),I(i,b),I(i,d),s(e,k,o),s(e,h,o),s(e,D,o),s(e,f,o),s(e,_,o),ne(l,e,o),s(e,C,o),s(e,$,o),s(e,S,o),s(e,g,o),s(e,w,o),s(e,v,o),s(e,E,o),ne(r,e,o),R=!0},p(e,[o]){var Y,z,F,G,K,Q,X,Z,x,ee,oe,te;(!R||o&1)&&c!==(c=e[0].name+"")&&ue(b,c);const O={};o&3&&(O.js=`
|
||||
event message.</p></div>`,_=a(),se(l.$$.fragment),C=a(),$=p("h6"),$.textContent="API details",S=a(),g=p("div"),g.innerHTML='<strong class="label label-primary">SSE</strong> <div class="content"><p>/api/realtime</p></div>',w=a(),v=p("div"),v.textContent="Event data format",E=a(),se(r.$$.fragment),u(i,"class","m-b-sm"),u(h,"class","content txt-lg m-b-sm"),u(f,"class","alert alert-info m-t-10 m-b-sm"),u($,"class","m-b-xs"),u(g,"class","alert"),u(v,"class","section-title")},m(e,t){s(e,i,t),I(i,m),I(i,b),I(i,d),s(e,k,t),s(e,h,t),s(e,D,t),s(e,f,t),s(e,_,t),ne(l,e,t),s(e,C,t),s(e,$,t),s(e,S,t),s(e,g,t),s(e,w,t),s(e,v,t),s(e,E,t),ne(r,e,t),R=!0},p(e,[t]){var V,Y,z,F,G,K,X,Z,x,ee,te,oe;(!R||t&1)&&c!==(c=e[0].name+"")&&me(b,c);const O={};t&3&&(O.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[1]}');
|
||||
@@ -65,23 +65,23 @@ import{S as re,i as ae,s as be,N as pe,C as P,e as p,v as y,b as a,c as se,f as
|
||||
// (Optionally) authenticate
|
||||
await pb.collection('users').authWithPassword('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any ${(Y=e[0])==null?void 0:Y.name} record
|
||||
pb.collection('${(z=e[0])==null?void 0:z.name}').subscribe('*', function (e) {
|
||||
// Subscribe to changes in any ${(V=e[0])==null?void 0:V.name} record
|
||||
pb.collection('${(Y=e[0])==null?void 0:Y.name}').subscribe('*', function (e) {
|
||||
console.log(e.action);
|
||||
console.log(e.record);
|
||||
}, { /* other options like expand, custom headers, etc. */ });
|
||||
}, { /* other options like: filter, expand, custom headers, etc. */ });
|
||||
|
||||
// Subscribe to changes only in the specified record
|
||||
pb.collection('${(F=e[0])==null?void 0:F.name}').subscribe('RECORD_ID', function (e) {
|
||||
pb.collection('${(z=e[0])==null?void 0:z.name}').subscribe('RECORD_ID', function (e) {
|
||||
console.log(e.action);
|
||||
console.log(e.record);
|
||||
}, { /* other options like expand, custom headers, etc. */ });
|
||||
}, { /* other options like: filter, expand, custom headers, etc. */ });
|
||||
|
||||
// Unsubscribe
|
||||
pb.collection('${(G=e[0])==null?void 0:G.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions
|
||||
pb.collection('${(K=e[0])==null?void 0:K.name}').unsubscribe('*'); // remove all '*' topic subscriptions
|
||||
pb.collection('${(Q=e[0])==null?void 0:Q.name}').unsubscribe(); // remove all subscriptions in the collection
|
||||
`),o&3&&(O.dart=`
|
||||
pb.collection('${(F=e[0])==null?void 0:F.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions
|
||||
pb.collection('${(G=e[0])==null?void 0:G.name}').unsubscribe('*'); // remove all '*' topic subscriptions
|
||||
pb.collection('${(K=e[0])==null?void 0:K.name}').unsubscribe(); // remove all subscriptions in the collection
|
||||
`),t&3&&(O.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[1]}');
|
||||
@@ -95,16 +95,16 @@ import{S as re,i as ae,s as be,N as pe,C as P,e as p,v as y,b as a,c as se,f as
|
||||
pb.collection('${(Z=e[0])==null?void 0:Z.name}').subscribe('*', (e) {
|
||||
print(e.action);
|
||||
print(e.record);
|
||||
}, /* other options like expand, custom headers, etc. */);
|
||||
}, /* other options like: filter, expand, custom headers, etc. */);
|
||||
|
||||
// Subscribe to changes only in the specified record
|
||||
pb.collection('${(x=e[0])==null?void 0:x.name}').subscribe('RECORD_ID', (e) {
|
||||
print(e.action);
|
||||
print(e.record);
|
||||
}, /* other options like expand, custom headers, etc. */);
|
||||
}, /* other options like: filter, expand, custom headers, etc. */);
|
||||
|
||||
// Unsubscribe
|
||||
pb.collection('${(ee=e[0])==null?void 0:ee.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions
|
||||
pb.collection('${(oe=e[0])==null?void 0:oe.name}').unsubscribe('*'); // remove all '*' topic subscriptions
|
||||
pb.collection('${(te=e[0])==null?void 0:te.name}').unsubscribe(); // remove all subscriptions in the collection
|
||||
`),l.$set(O);const V={};o&1&&(V.content=JSON.stringify({action:"create",record:P.dummyCollectionRecord(e[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')),r.$set(V)},i(e){R||(ie(l.$$.fragment,e),ie(r.$$.fragment,e),R=!0)},o(e){ce(l.$$.fragment,e),ce(r.$$.fragment,e),R=!1},d(e){e&&(n(i),n(k),n(h),n(D),n(f),n(_),n(C),n($),n(S),n(g),n(w),n(v),n(E)),le(l,e),le(r,e)}}}function fe(t,i,m){let c,{collection:b}=i;return t.$$set=d=>{"collection"in d&&m(0,b=d.collection)},m(1,c=P.getApiExampleUrl(me.baseUrl)),[b,c]}class ve extends re{constructor(i){super(),ae(this,i,fe,he,be,{collection:0})}}export{ve as default};
|
||||
pb.collection('${(te=e[0])==null?void 0:te.name}').unsubscribe('*'); // remove all '*' topic subscriptions
|
||||
pb.collection('${(oe=e[0])==null?void 0:oe.name}').unsubscribe(); // remove all subscriptions in the collection
|
||||
`),l.$set(O);const Q={};t&1&&(Q.content=JSON.stringify({action:"create",record:P.dummyCollectionRecord(e[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')),r.$set(Q)},i(e){R||(ie(l.$$.fragment,e),ie(r.$$.fragment,e),R=!0)},o(e){ce(l.$$.fragment,e),ce(r.$$.fragment,e),R=!1},d(e){e&&(n(i),n(k),n(h),n(D),n(f),n(_),n(C),n($),n(S),n(g),n(w),n(v),n(E)),le(l,e),le(r,e)}}}function fe(o,i,m){let c,{collection:b}=i;return o.$$set=d=>{"collection"in d&&m(0,b=d.collection)},m(1,c=P.getApiExampleUrl(de.baseURL)),[b,c]}class ge extends re{constructor(i){super(),ae(this,i,fe,he,be,{collection:0})}}export{ge as default};
|
||||
@@ -1,64 +0,0 @@
|
||||
import{S as Ee,i as Be,s as Se,O as L,e as r,v,b as k,c as Ce,f as b,g as d,h as n,m as ye,w as N,P as ve,Q as Ae,k as Re,R as Me,n as We,t as ee,a as te,o as m,d as Te,C as ze,A as He,q as F,r as Oe,N as Ue}from"./index-Bp3jGQ0J.js";import{S as je}from"./SdkTabs-DxNNd6Sw.js";function we(o,l,a){const s=o.slice();return s[5]=l[a],s}function $e(o,l,a){const s=o.slice();return s[5]=l[a],s}function qe(o,l){let a,s=l[5].code+"",h,f,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){a=r("button"),h=v(s),f=k(),b(a,"class","tab-item"),F(a,"active",l[1]===l[5].code),this.first=a},m($,q){d($,a,q),n(a,h),n(a,f),i||(p=Oe(a,"click",u),i=!0)},p($,q){l=$,q&4&&s!==(s=l[5].code+"")&&N(h,s),q&6&&F(a,"active",l[1]===l[5].code)},d($){$&&m(a),i=!1,p()}}}function Pe(o,l){let a,s,h,f;return s=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){a=r("div"),Ce(s.$$.fragment),h=k(),b(a,"class","tab-item"),F(a,"active",l[1]===l[5].code),this.first=a},m(i,p){d(i,a,p),ye(s,a,null),n(a,h),f=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),s.$set(u),(!f||p&6)&&F(a,"active",l[1]===l[5].code)},i(i){f||(ee(s.$$.fragment,i),f=!0)},o(i){te(s.$$.fragment,i),f=!1},d(i){i&&m(a),Te(s)}}}function De(o){var pe,ue,be,fe;let l,a,s=o[0].name+"",h,f,i,p,u,$,q,z=o[0].name+"",I,le,K,P,Q,T,G,w,H,ae,O,E,se,J,U=o[0].name+"",V,oe,ne,j,X,B,Y,S,Z,A,x,C,R,g=[],ie=new Map,ce,M,_=[],re=new Map,y;P=new je({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(pe=o[0])==null?void 0:pe.name}').authWithPassword('test@example.com', '1234567890');
|
||||
|
||||
await pb.collection('${(ue=o[0])==null?void 0:ue.name}').requestEmailChange('new@example.com');
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(be=o[0])==null?void 0:be.name}').authWithPassword('test@example.com', '1234567890');
|
||||
|
||||
await pb.collection('${(fe=o[0])==null?void 0:fe.name}').requestEmailChange('new@example.com');
|
||||
`}});let D=L(o[2]);const de=e=>e[5].code;for(let e=0;e<D.length;e+=1){let t=$e(o,D,e),c=de(t);ie.set(c,g[e]=qe(c,t))}let W=L(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);re.set(c,_[e]=Pe(c,t))}return{c(){l=r("h3"),a=v("Request email change ("),h=v(s),f=v(")"),i=k(),p=r("div"),u=r("p"),$=v("Sends "),q=r("strong"),I=v(z),le=v(" email change request."),K=k(),Ce(P.$$.fragment),Q=k(),T=r("h6"),T.textContent="API details",G=k(),w=r("div"),H=r("strong"),H.textContent="POST",ae=k(),O=r("div"),E=r("p"),se=v("/api/collections/"),J=r("strong"),V=v(U),oe=v("/request-email-change"),ne=k(),j=r("p"),j.innerHTML="Requires record <code>Authorization:TOKEN</code> header",X=k(),B=r("div"),B.textContent="Body Parameters",Y=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>',Z=k(),A=r("div"),A.textContent="Responses",x=k(),C=r("div"),R=r("div");for(let e=0;e<g.length;e+=1)g[e].c();ce=k(),M=r("div");for(let e=0;e<_.length;e+=1)_[e].c();b(l,"class","m-b-sm"),b(p,"class","content txt-lg m-b-sm"),b(T,"class","m-b-xs"),b(H,"class","label label-primary"),b(O,"class","content"),b(j,"class","txt-hint txt-sm txt-right"),b(w,"class","alert alert-success"),b(B,"class","section-title"),b(S,"class","table-compact table-border m-b-base"),b(A,"class","section-title"),b(R,"class","tabs-header compact combined left"),b(M,"class","tabs-content"),b(C,"class","tabs")},m(e,t){d(e,l,t),n(l,a),n(l,h),n(l,f),d(e,i,t),d(e,p,t),n(p,u),n(u,$),n(u,q),n(q,I),n(u,le),d(e,K,t),ye(P,e,t),d(e,Q,t),d(e,T,t),d(e,G,t),d(e,w,t),n(w,H),n(w,ae),n(w,O),n(O,E),n(E,se),n(E,J),n(J,V),n(E,oe),n(w,ne),n(w,j),d(e,X,t),d(e,B,t),d(e,Y,t),d(e,S,t),d(e,Z,t),d(e,A,t),d(e,x,t),d(e,C,t),n(C,R);for(let c=0;c<g.length;c+=1)g[c]&&g[c].m(R,null);n(C,ce),n(C,M);for(let c=0;c<_.length;c+=1)_[c]&&_[c].m(M,null);y=!0},p(e,[t]){var he,_e,ke,ge;(!y||t&1)&&s!==(s=e[0].name+"")&&N(h,s),(!y||t&1)&&z!==(z=e[0].name+"")&&N(I,z);const c={};t&9&&(c.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(he=e[0])==null?void 0:he.name}').authWithPassword('test@example.com', '1234567890');
|
||||
|
||||
await pb.collection('${(_e=e[0])==null?void 0:_e.name}').requestEmailChange('new@example.com');
|
||||
`),t&9&&(c.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(ke=e[0])==null?void 0:ke.name}').authWithPassword('test@example.com', '1234567890');
|
||||
|
||||
await pb.collection('${(ge=e[0])==null?void 0:ge.name}').requestEmailChange('new@example.com');
|
||||
`),P.$set(c),(!y||t&1)&&U!==(U=e[0].name+"")&&N(V,U),t&6&&(D=L(e[2]),g=ve(g,t,de,1,e,D,ie,R,Ae,qe,null,$e)),t&6&&(W=L(e[2]),Re(),_=ve(_,t,me,1,e,W,re,M,Me,Pe,null,we),We())},i(e){if(!y){ee(P.$$.fragment,e);for(let t=0;t<W.length;t+=1)ee(_[t]);y=!0}},o(e){te(P.$$.fragment,e);for(let t=0;t<_.length;t+=1)te(_[t]);y=!1},d(e){e&&(m(l),m(i),m(p),m(K),m(Q),m(T),m(G),m(w),m(X),m(B),m(Y),m(S),m(Z),m(A),m(x),m(C)),Te(P,e);for(let t=0;t<g.length;t+=1)g[t].d();for(let t=0;t<_.length;t+=1)_[t].d()}}}function Le(o,l,a){let s,{collection:h}=l,f=204,i=[];const p=u=>a(1,f=u.code);return o.$$set=u=>{"collection"in u&&a(0,h=u.collection)},a(3,s=ze.getApiExampleUrl(He.baseUrl)),a(2,i=[{code:204,body:"null"},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"newEmail": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:401,body:`
|
||||
{
|
||||
"code": 401,
|
||||
"message": "The request requires valid record authorization token to be set.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "The authorized record model is not allowed to perform this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}]),[h,f,i,s,p]}class Ie extends Ee{constructor(l){super(),Be(this,l,Le,De,Se,{collection:0})}}export{Ie as default};
|
||||
@@ -1,44 +0,0 @@
|
||||
import{S as Pe,i as $e,s as qe,O as I,e as r,v as g,b as h,c as ve,f as b,g as d,h as n,m as ge,w as L,P as fe,Q as ye,k as Re,R as Ce,n as Be,t as x,a as ee,o as p,d as we,C as Se,A as Te,q as N,r as Ae,N as Me}from"./index-Bp3jGQ0J.js";import{S as Ue}from"./SdkTabs-DxNNd6Sw.js";function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s,l){const a=o.slice();return a[5]=s[l],a}function ke(o,s){let l,a=s[5].code+"",_,f,i,m;function u(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=g(a),f=h(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(w,P){d(w,l,P),n(l,_),n(l,f),i||(m=Ae(l,"click",u),i=!0)},p(w,P){s=w,P&4&&a!==(a=s[5].code+"")&&L(_,a),P&6&&N(l,"active",s[1]===s[5].code)},d(w){w&&p(l),i=!1,m()}}}function he(o,s){let l,a,_,f;return a=new Me({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=h(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(i,m){d(i,l,m),ge(a,l,null),n(l,_),f=!0},p(i,m){s=i;const u={};m&4&&(u.content=s[5].body),a.$set(u),(!f||m&6)&&N(l,"active",s[1]===s[5].code)},i(i){f||(x(a.$$.fragment,i),f=!0)},o(i){ee(a.$$.fragment,i),f=!1},d(i){i&&p(l),we(a)}}}function je(o){var de,pe;let s,l,a=o[0].name+"",_,f,i,m,u,w,P,D=o[0].name+"",Q,te,z,$,G,C,J,q,H,se,O,B,le,K,E=o[0].name+"",V,ae,W,S,X,T,Y,A,Z,y,M,v=[],oe=new Map,ne,U,k=[],ie=new Map,R;$=new Ue({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(de=o[0])==null?void 0:de.name}').requestPasswordReset('test@example.com');
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(pe=o[0])==null?void 0:pe.name}').requestPasswordReset('test@example.com');
|
||||
`}});let F=I(o[2]);const ce=e=>e[5].code;for(let e=0;e<F.length;e+=1){let t=_e(o,F,e),c=ce(t);oe.set(c,v[e]=ke(c,t))}let j=I(o[2]);const re=e=>e[5].code;for(let e=0;e<j.length;e+=1){let t=be(o,j,e),c=re(t);ie.set(c,k[e]=he(c,t))}return{c(){s=r("h3"),l=g("Request password reset ("),_=g(a),f=g(")"),i=h(),m=r("div"),u=r("p"),w=g("Sends "),P=r("strong"),Q=g(D),te=g(" password reset email request."),z=h(),ve($.$$.fragment),G=h(),C=r("h6"),C.textContent="API details",J=h(),q=r("div"),H=r("strong"),H.textContent="POST",se=h(),O=r("div"),B=r("p"),le=g("/api/collections/"),K=r("strong"),V=g(E),ae=g("/request-password-reset"),W=h(),S=r("div"),S.textContent="Body Parameters",X=h(),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>',Y=h(),A=r("div"),A.textContent="Responses",Z=h(),y=r("div"),M=r("div");for(let e=0;e<v.length;e+=1)v[e].c();ne=h(),U=r("div");for(let e=0;e<k.length;e+=1)k[e].c();b(s,"class","m-b-sm"),b(m,"class","content txt-lg m-b-sm"),b(C,"class","m-b-xs"),b(H,"class","label label-primary"),b(O,"class","content"),b(q,"class","alert alert-success"),b(S,"class","section-title"),b(T,"class","table-compact table-border m-b-base"),b(A,"class","section-title"),b(M,"class","tabs-header compact combined left"),b(U,"class","tabs-content"),b(y,"class","tabs")},m(e,t){d(e,s,t),n(s,l),n(s,_),n(s,f),d(e,i,t),d(e,m,t),n(m,u),n(u,w),n(u,P),n(P,Q),n(u,te),d(e,z,t),ge($,e,t),d(e,G,t),d(e,C,t),d(e,J,t),d(e,q,t),n(q,H),n(q,se),n(q,O),n(O,B),n(B,le),n(B,K),n(K,V),n(B,ae),d(e,W,t),d(e,S,t),d(e,X,t),d(e,T,t),d(e,Y,t),d(e,A,t),d(e,Z,t),d(e,y,t),n(y,M);for(let c=0;c<v.length;c+=1)v[c]&&v[c].m(M,null);n(y,ne),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 me,ue;(!R||t&1)&&a!==(a=e[0].name+"")&&L(_,a),(!R||t&1)&&D!==(D=e[0].name+"")&&L(Q,D);const c={};t&9&&(c.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(me=e[0])==null?void 0:me.name}').requestPasswordReset('test@example.com');
|
||||
`),t&9&&(c.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(ue=e[0])==null?void 0:ue.name}').requestPasswordReset('test@example.com');
|
||||
`),$.$set(c),(!R||t&1)&&E!==(E=e[0].name+"")&&L(V,E),t&6&&(F=I(e[2]),v=fe(v,t,ce,1,e,F,oe,M,ye,ke,null,_e)),t&6&&(j=I(e[2]),Re(),k=fe(k,t,re,1,e,j,ie,U,Ce,he,null,be),Be())},i(e){if(!R){x($.$$.fragment,e);for(let t=0;t<j.length;t+=1)x(k[t]);R=!0}},o(e){ee($.$$.fragment,e);for(let t=0;t<k.length;t+=1)ee(k[t]);R=!1},d(e){e&&(p(s),p(i),p(m),p(z),p(G),p(C),p(J),p(q),p(W),p(S),p(X),p(T),p(Y),p(A),p(Z),p(y)),we($,e);for(let t=0;t<v.length;t+=1)v[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function De(o,s,l){let a,{collection:_}=s,f=204,i=[];const m=u=>l(1,f=u.code);return o.$$set=u=>{"collection"in u&&l(0,_=u.collection)},l(3,a=Se.getApiExampleUrl(Te.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"email": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`}]),[_,f,i,a,m]}class Ee extends Pe{constructor(s){super(),$e(this,s,De,je,qe,{collection:0})}}export{Ee as default};
|
||||
@@ -1,44 +0,0 @@
|
||||
import{S as qe,i as we,s as Pe,O as F,e as r,v as g,b as h,c as ve,f as b,g as d,h as n,m as ge,w as I,P as pe,Q as ye,k as Ce,R as Be,n as Se,t as x,a as ee,o as f,d as $e,C as Te,A as Ae,q as L,r as Re,N as Ve}from"./index-Bp3jGQ0J.js";import{S as Me}from"./SdkTabs-DxNNd6Sw.js";function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l,s){const a=o.slice();return a[5]=l[s],a}function ke(o,l){let s,a=l[5].code+"",_,p,i,m;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),p=h(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m($,q){d($,s,q),n(s,_),n(s,p),i||(m=Re(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&I(_,a),q&6&&L(s,"active",l[1]===l[5].code)},d($){$&&f(s),i=!1,m()}}}function he(o,l){let s,a,_,p;return a=new Ve({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),ve(a.$$.fragment),_=h(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(i,m){d(i,s,m),ge(a,s,null),n(s,_),p=!0},p(i,m){l=i;const u={};m&4&&(u.content=l[5].body),a.$set(u),(!p||m&6)&&L(s,"active",l[1]===l[5].code)},i(i){p||(x(a.$$.fragment,i),p=!0)},o(i){ee(a.$$.fragment,i),p=!1},d(i){i&&f(s),$e(a)}}}function Ue(o){var de,fe;let l,s,a=o[0].name+"",_,p,i,m,u,$,q,j=o[0].name+"",N,te,Q,w,z,B,G,P,D,le,H,S,se,J,O=o[0].name+"",K,ae,W,T,X,A,Y,R,Z,y,V,v=[],oe=new Map,ne,M,k=[],ie=new Map,C;w=new Me({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(de=o[0])==null?void 0:de.name}').requestVerification('test@example.com');
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${o[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(fe=o[0])==null?void 0:fe.name}').requestVerification('test@example.com');
|
||||
`}});let E=F(o[2]);const ce=e=>e[5].code;for(let e=0;e<E.length;e+=1){let t=_e(o,E,e),c=ce(t);oe.set(c,v[e]=ke(c,t))}let U=F(o[2]);const re=e=>e[5].code;for(let e=0;e<U.length;e+=1){let t=be(o,U,e),c=re(t);ie.set(c,k[e]=he(c,t))}return{c(){l=r("h3"),s=g("Request verification ("),_=g(a),p=g(")"),i=h(),m=r("div"),u=r("p"),$=g("Sends "),q=r("strong"),N=g(j),te=g(" verification email request."),Q=h(),ve(w.$$.fragment),z=h(),B=r("h6"),B.textContent="API details",G=h(),P=r("div"),D=r("strong"),D.textContent="POST",le=h(),H=r("div"),S=r("p"),se=g("/api/collections/"),J=r("strong"),K=g(O),ae=g("/request-verification"),W=h(),T=r("div"),T.textContent="Body Parameters",X=h(),A=r("table"),A.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>',Y=h(),R=r("div"),R.textContent="Responses",Z=h(),y=r("div"),V=r("div");for(let e=0;e<v.length;e+=1)v[e].c();ne=h(),M=r("div");for(let e=0;e<k.length;e+=1)k[e].c();b(l,"class","m-b-sm"),b(m,"class","content txt-lg m-b-sm"),b(B,"class","m-b-xs"),b(D,"class","label label-primary"),b(H,"class","content"),b(P,"class","alert alert-success"),b(T,"class","section-title"),b(A,"class","table-compact table-border m-b-base"),b(R,"class","section-title"),b(V,"class","tabs-header compact combined left"),b(M,"class","tabs-content"),b(y,"class","tabs")},m(e,t){d(e,l,t),n(l,s),n(l,_),n(l,p),d(e,i,t),d(e,m,t),n(m,u),n(u,$),n(u,q),n(q,N),n(u,te),d(e,Q,t),ge(w,e,t),d(e,z,t),d(e,B,t),d(e,G,t),d(e,P,t),n(P,D),n(P,le),n(P,H),n(H,S),n(S,se),n(S,J),n(J,K),n(S,ae),d(e,W,t),d(e,T,t),d(e,X,t),d(e,A,t),d(e,Y,t),d(e,R,t),d(e,Z,t),d(e,y,t),n(y,V);for(let c=0;c<v.length;c+=1)v[c]&&v[c].m(V,null);n(y,ne),n(y,M);for(let c=0;c<k.length;c+=1)k[c]&&k[c].m(M,null);C=!0},p(e,[t]){var me,ue;(!C||t&1)&&a!==(a=e[0].name+"")&&I(_,a),(!C||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]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(me=e[0])==null?void 0:me.name}').requestVerification('test@example.com');
|
||||
`),t&9&&(c.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(ue=e[0])==null?void 0:ue.name}').requestVerification('test@example.com');
|
||||
`),w.$set(c),(!C||t&1)&&O!==(O=e[0].name+"")&&I(K,O),t&6&&(E=F(e[2]),v=pe(v,t,ce,1,e,E,oe,V,ye,ke,null,_e)),t&6&&(U=F(e[2]),Ce(),k=pe(k,t,re,1,e,U,ie,M,Be,he,null,be),Se())},i(e){if(!C){x(w.$$.fragment,e);for(let t=0;t<U.length;t+=1)x(k[t]);C=!0}},o(e){ee(w.$$.fragment,e);for(let t=0;t<k.length;t+=1)ee(k[t]);C=!1},d(e){e&&(f(l),f(i),f(m),f(Q),f(z),f(B),f(G),f(P),f(W),f(T),f(X),f(A),f(Y),f(R),f(Z),f(y)),$e(w,e);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 je(o,l,s){let a,{collection:_}=l,p=204,i=[];const m=u=>s(1,p=u.code);return o.$$set=u=>{"collection"in u&&s(0,_=u.collection)},s(3,a=Te.getApiExampleUrl(Ae.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"email": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`}]),[_,p,i,a,m]}class Oe extends qe{constructor(l){super(),we(this,l,je,Ue,Pe,{collection:0})}}export{Oe as default};
|
||||
@@ -1 +0,0 @@
|
||||
import{S as B,i as F,s as J,O as j,e as v,b as S,f as h,g as y,h as m,P as D,Q as O,k as Q,R as Y,n as z,t as N,a as P,o as C,v as w,q as E,r as A,w as T,N as G,c as H,m as L,d as U}from"./index-Bp3jGQ0J.js";function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function R(o,e,l){const s=o.slice();return s[6]=e[l],s}function q(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=w(g),i=S(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),E(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+"")&&T(r,g),f&6&&E(l,"active",e[1]===e[6].language)},d(_){_&&C(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 G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=S(),r=v("div"),i=v("em"),n=v("a"),c=w(k),_=w(" SDK"),p=S(),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"),E(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+"")&&T(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&E(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&&C(l),U(s)}}}function V(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=j(o[2]);const p=t=>t[6].language;for(let t=0;t<f.length;t+=1){let a=R(o,f,t),u=p(a);g.set(u,s[t]=q(u,a))}let d=j(o[2]);const b=t=>t[6].language;for(let t=0;t<d.length;t+=1){let a=K(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=S(),i=v("div");for(let t=0;t<n.length;t+=1)n[t].c();h(l,"class","tabs-header compact combined 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=j(t[2]),s=D(s,a,p,1,t,f,g,l,O,q,null,R)),a&6&&(d=j(t[2]),Q(),n=D(n,a,b,1,t,d,k,i,Y,I,null,K),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&&C(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 W(o,e,l){let s,{class:g="m-b-sm"}=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 Z extends B{constructor(e){super(),F(this,e,W,V,J,{class:0,js:3,dart:4})}}export{Z as S};
|
||||
@@ -1 +0,0 @@
|
||||
.sdk-tabs.svelte-1maocj6 .tabs-header .tab-item.svelte-1maocj6{min-width:100px}
|
||||
@@ -1,72 +0,0 @@
|
||||
import{S as Oe,i as De,s as Me,O as j,e as i,v as g,b as f,c as Be,f as h,g as d,h as a,m as qe,w as I,P as ye,Q as We,k as ze,R as He,n as Le,t as oe,a as ae,o as u,d as Ue,C as Re,A as je,q as N,r as Ie,N as Ne}from"./index-Bp3jGQ0J.js";import{S as Ke}from"./SdkTabs-DxNNd6Sw.js";function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Te(n,l,o){const s=n.slice();return s[5]=l[o],s}function Ee(n,l){let o,s=l[5].code+"",_,b,c,p;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=g(s),b=f(),h(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),a(o,_),a(o,b),c||(p=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&s!==(s=l[5].code+"")&&I(_,s),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Se(n,l){let o,s,_,b;return s=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Be(s.$$.fragment),_=f(),h(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),qe(s,o,null),a(o,_),b=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),s.$set(m),(!b||p&6)&&N(o,"active",l[1]===l[5].code)},i(c){b||(oe(s.$$.fragment,c),b=!0)},o(c){ae(s.$$.fragment,c),b=!1},d(c){c&&u(o),Ue(s)}}}function Qe(n){var _e,ke,ge,ve;let l,o,s=n[0].name+"",_,b,c,p,m,$,P,M=n[0].name+"",K,se,ne,Q,F,y,G,E,J,w,W,ie,z,A,ce,V,H=n[0].name+"",X,re,Y,de,Z,ue,L,x,S,ee,B,te,q,le,C,U,v=[],pe=new Map,me,O,k=[],he=new Map,T;y=new Ke({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(_e=n[0])==null?void 0:_e.name}').authWithPassword('test@example.com', '123456');
|
||||
|
||||
await pb.collection('${(ke=n[0])==null?void 0:ke.name}').unlinkExternalAuth(
|
||||
pb.authStore.model.id,
|
||||
'google'
|
||||
);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(ge=n[0])==null?void 0:ge.name}').authWithPassword('test@example.com', '123456');
|
||||
|
||||
await pb.collection('${(ve=n[0])==null?void 0:ve.name}').unlinkExternalAuth(
|
||||
pb.authStore.model.id,
|
||||
'google',
|
||||
);
|
||||
`}});let R=j(n[2]);const be=e=>e[5].code;for(let e=0;e<R.length;e+=1){let t=Te(n,R,e),r=be(t);pe.set(r,v[e]=Ee(r,t))}let D=j(n[2]);const fe=e=>e[5].code;for(let e=0;e<D.length;e+=1){let t=Ce(n,D,e),r=fe(t);he.set(r,k[e]=Se(r,t))}return{c(){l=i("h3"),o=g("Unlink OAuth2 account ("),_=g(s),b=g(")"),c=f(),p=i("div"),m=i("p"),$=g("Unlink a single external OAuth2 provider from "),P=i("strong"),K=g(M),se=g(" record."),ne=f(),Q=i("p"),Q.textContent="Only admins and the account owner can access this action.",F=f(),Be(y.$$.fragment),G=f(),E=i("h6"),E.textContent="API details",J=f(),w=i("div"),W=i("strong"),W.textContent="DELETE",ie=f(),z=i("div"),A=i("p"),ce=g("/api/collections/"),V=i("strong"),X=g(H),re=g("/records/"),Y=i("strong"),Y.textContent=":id",de=g("/external-auths/"),Z=i("strong"),Z.textContent=":provider",ue=f(),L=i("p"),L.innerHTML="Requires <code>Authorization:TOKEN</code> header",x=f(),S=i("div"),S.textContent="Path Parameters",ee=f(),B=i("table"),B.innerHTML=`<thead><tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr></thead> <tbody><tr><td>id</td> <td><span class="label">String</span></td> <td>ID of the auth record.</td></tr> <tr><td>provider</td> <td><span class="label">String</span></td> <td>The name of the auth provider to unlink, eg. <code>google</code>, <code>twitter</code>,
|
||||
<code>github</code>, etc.</td></tr></tbody>`,te=f(),q=i("div"),q.textContent="Responses",le=f(),C=i("div"),U=i("div");for(let e=0;e<v.length;e+=1)v[e].c();me=f(),O=i("div");for(let e=0;e<k.length;e+=1)k[e].c();h(l,"class","m-b-sm"),h(p,"class","content txt-lg m-b-sm"),h(E,"class","m-b-xs"),h(W,"class","label label-primary"),h(z,"class","content"),h(L,"class","txt-hint txt-sm txt-right"),h(w,"class","alert alert-danger"),h(S,"class","section-title"),h(B,"class","table-compact table-border m-b-base"),h(q,"class","section-title"),h(U,"class","tabs-header compact combined left"),h(O,"class","tabs-content"),h(C,"class","tabs")},m(e,t){d(e,l,t),a(l,o),a(l,_),a(l,b),d(e,c,t),d(e,p,t),a(p,m),a(m,$),a(m,P),a(P,K),a(m,se),a(p,ne),a(p,Q),d(e,F,t),qe(y,e,t),d(e,G,t),d(e,E,t),d(e,J,t),d(e,w,t),a(w,W),a(w,ie),a(w,z),a(z,A),a(A,ce),a(A,V),a(V,X),a(A,re),a(A,Y),a(A,de),a(A,Z),a(w,ue),a(w,L),d(e,x,t),d(e,S,t),d(e,ee,t),d(e,B,t),d(e,te,t),d(e,q,t),d(e,le,t),d(e,C,t),a(C,U);for(let r=0;r<v.length;r+=1)v[r]&&v[r].m(U,null);a(C,me),a(C,O);for(let r=0;r<k.length;r+=1)k[r]&&k[r].m(O,null);T=!0},p(e,[t]){var we,$e,Pe,Ae;(!T||t&1)&&s!==(s=e[0].name+"")&&I(_,s),(!T||t&1)&&M!==(M=e[0].name+"")&&I(K,M);const r={};t&9&&(r.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(we=e[0])==null?void 0:we.name}').authWithPassword('test@example.com', '123456');
|
||||
|
||||
await pb.collection('${($e=e[0])==null?void 0:$e.name}').unlinkExternalAuth(
|
||||
pb.authStore.model.id,
|
||||
'google'
|
||||
);
|
||||
`),t&9&&(r.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(Pe=e[0])==null?void 0:Pe.name}').authWithPassword('test@example.com', '123456');
|
||||
|
||||
await pb.collection('${(Ae=e[0])==null?void 0:Ae.name}').unlinkExternalAuth(
|
||||
pb.authStore.model.id,
|
||||
'google',
|
||||
);
|
||||
`),y.$set(r),(!T||t&1)&&H!==(H=e[0].name+"")&&I(X,H),t&6&&(R=j(e[2]),v=ye(v,t,be,1,e,R,pe,U,We,Ee,null,Te)),t&6&&(D=j(e[2]),ze(),k=ye(k,t,fe,1,e,D,he,O,He,Se,null,Ce),Le())},i(e){if(!T){oe(y.$$.fragment,e);for(let t=0;t<D.length;t+=1)oe(k[t]);T=!0}},o(e){ae(y.$$.fragment,e);for(let t=0;t<k.length;t+=1)ae(k[t]);T=!1},d(e){e&&(u(l),u(c),u(p),u(F),u(G),u(E),u(J),u(w),u(x),u(S),u(ee),u(B),u(te),u(q),u(le),u(C)),Ue(y,e);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 Fe(n,l,o){let s,{collection:_}=l,b=204,c=[];const p=m=>o(1,b=m.code);return n.$$set=m=>{"collection"in m&&o(0,_=m.collection)},o(3,s=Re.getApiExampleUrl(je.baseUrl)),o(2,c=[{code:204,body:"null"},{code:401,body:`
|
||||
{
|
||||
"code": 401,
|
||||
"message": "The request requires valid record authorization token to be set.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "The authorized record model is not allowed to perform this action.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}]),[_,b,c,s,p]}class Ve extends Oe{constructor(l){super(),De(this,l,Fe,Qe,Me,{collection:0})}}export{Ve as default};
|
||||
@@ -0,0 +1,90 @@
|
||||
import{S as Ot,i as St,s as Mt,Q as $t,C as x,T as ie,R as Tt,e as i,w as h,b as f,c as we,f as k,g as o,h as n,m as ve,x as te,U as Ie,V as bt,k as qt,W as Rt,n as Dt,t as he,a as ye,o as r,d as Ce,p as Ht,r as Te,u as Lt,y as de}from"./index-B-F-pko3.js";import{F as Pt}from"./FieldsQueryParam-CW6KZfgu.js";function mt(d,e,t){const a=d.slice();return a[10]=e[t],a}function _t(d,e,t){const a=d.slice();return a[10]=e[t],a}function ht(d,e,t){const a=d.slice();return a[15]=e[t],a}function yt(d){let e;return{c(){e=i("p"),e.innerHTML=`<em>Note that in case of a password change all previously issued tokens for the current record
|
||||
will be automatically invalidated and if you want your user to remain signed in you need to
|
||||
reauthenticate manually after the update call.</em>`},m(t,a){o(t,e,a)},d(t){t&&r(e)}}}function kt(d){let e;return{c(){e=i("p"),e.innerHTML="Requires superuser <code>Authorization:TOKEN</code> header",k(e,"class","txt-hint txt-sm txt-right")},m(t,a){o(t,e,a)},d(t){t&&r(e)}}}function gt(d){let e,t,a,m,p,c,u,b,O,T,M,D,S,E,q,H,I,U,$,R,L,g,w,v;function Q(_,C){var le,z,ne;return C&1&&(b=null),b==null&&(b=!!((ne=(z=(le=_[0])==null?void 0:le.fields)==null?void 0:z.find(Wt))!=null&&ne.required)),b?Bt:Ft}let W=Q(d,-1),F=W(d);return{c(){e=i("tr"),e.innerHTML='<td colspan="3" class="txt-hint txt-bold">Auth specific fields</td>',t=f(),a=i("tr"),a.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>email</span></div></td> <td><span class="label">String</span></td> <td>The auth record email address.
|
||||
<br/>
|
||||
This field can be updated only by superusers or auth records with "Manage" access.
|
||||
<br/>
|
||||
Regular accounts can update their email by calling "Request email change".</td>`,m=f(),p=i("tr"),c=i("td"),u=i("div"),F.c(),O=f(),T=i("span"),T.textContent="emailVisibility",M=f(),D=i("td"),D.innerHTML='<span class="label">Boolean</span>',S=f(),E=i("td"),E.textContent="Whether to show/hide the auth record email when fetching the record data.",q=f(),H=i("tr"),H.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>oldPassword</span></div></td> <td><span class="label">String</span></td> <td>Old auth record password.
|
||||
<br/>
|
||||
This field is required only when changing the record password. Superusers and auth records
|
||||
with "Manage" access can skip this field.</td>`,I=f(),U=i("tr"),U.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>',$=f(),R=i("tr"),R.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>',L=f(),g=i("tr"),g.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 superusers or auth records with "Manage" access.</td>`,w=f(),v=i("tr"),v.innerHTML='<td colspan="3" class="txt-hint txt-bold">Other fields</td>',k(u,"class","inline-flex")},m(_,C){o(_,e,C),o(_,t,C),o(_,a,C),o(_,m,C),o(_,p,C),n(p,c),n(c,u),F.m(u,null),n(u,O),n(u,T),n(p,M),n(p,D),n(p,S),n(p,E),o(_,q,C),o(_,H,C),o(_,I,C),o(_,U,C),o(_,$,C),o(_,R,C),o(_,L,C),o(_,g,C),o(_,w,C),o(_,v,C)},p(_,C){W!==(W=Q(_,C))&&(F.d(1),F=W(_),F&&(F.c(),F.m(u,O)))},d(_){_&&(r(e),r(t),r(a),r(m),r(p),r(q),r(H),r(I),r(U),r($),r(R),r(L),r(g),r(w),r(v)),F.d()}}}function Ft(d){let e;return{c(){e=i("span"),e.textContent="Optional",k(e,"class","label label-warning")},m(t,a){o(t,e,a)},d(t){t&&r(e)}}}function Bt(d){let e;return{c(){e=i("span"),e.textContent="Required",k(e,"class","label label-success")},m(t,a){o(t,e,a)},d(t){t&&r(e)}}}function Nt(d){let e;return{c(){e=i("span"),e.textContent="Optional",k(e,"class","label label-warning")},m(t,a){o(t,e,a)},d(t){t&&r(e)}}}function jt(d){let e;return{c(){e=i("span"),e.textContent="Required",k(e,"class","label label-success")},m(t,a){o(t,e,a)},d(t){t&&r(e)}}}function At(d){let e,t=d[15].maxSelect==1?"id":"ids",a,m;return{c(){e=h("Relation record "),a=h(t),m=h(".")},m(p,c){o(p,e,c),o(p,a,c),o(p,m,c)},p(p,c){c&64&&t!==(t=p[15].maxSelect==1?"id":"ids")&&te(a,t)},d(p){p&&(r(e),r(a),r(m))}}}function Et(d){let e,t,a,m,p;return{c(){e=h("File object."),t=i("br"),a=h(`
|
||||
Set to `),m=i("code"),m.textContent="null",p=h(" to delete already uploaded file(s).")},m(c,u){o(c,e,u),o(c,t,u),o(c,a,u),o(c,m,u),o(c,p,u)},p:de,d(c){c&&(r(e),r(t),r(a),r(m),r(p))}}}function Ut(d){let e;return{c(){e=h("URL address.")},m(t,a){o(t,e,a)},p:de,d(t){t&&r(e)}}}function It(d){let e;return{c(){e=h("Email address.")},m(t,a){o(t,e,a)},p:de,d(t){t&&r(e)}}}function Jt(d){let e;return{c(){e=h("JSON array or object.")},m(t,a){o(t,e,a)},p:de,d(t){t&&r(e)}}}function Vt(d){let e;return{c(){e=h("Number value.")},m(t,a){o(t,e,a)},p:de,d(t){t&&r(e)}}}function xt(d){let e;return{c(){e=h("Plain text value.")},m(t,a){o(t,e,a)},p:de,d(t){t&&r(e)}}}function wt(d,e){let t,a,m,p,c,u=e[15].name+"",b,O,T,M,D=x.getFieldValueType(e[15])+"",S,E,q,H;function I(w,v){return w[15].required?jt:Nt}let U=I(e),$=U(e);function R(w,v){if(w[15].type==="text")return xt;if(w[15].type==="number")return Vt;if(w[15].type==="json")return Jt;if(w[15].type==="email")return It;if(w[15].type==="url")return Ut;if(w[15].type==="file")return Et;if(w[15].type==="relation")return At}let L=R(e),g=L&&L(e);return{key:d,first:null,c(){t=i("tr"),a=i("td"),m=i("div"),$.c(),p=f(),c=i("span"),b=h(u),O=f(),T=i("td"),M=i("span"),S=h(D),E=f(),q=i("td"),g&&g.c(),H=f(),k(m,"class","inline-flex"),k(M,"class","label"),this.first=t},m(w,v){o(w,t,v),n(t,a),n(a,m),$.m(m,null),n(m,p),n(m,c),n(c,b),n(t,O),n(t,T),n(T,M),n(M,S),n(t,E),n(t,q),g&&g.m(q,null),n(t,H)},p(w,v){e=w,U!==(U=I(e))&&($.d(1),$=U(e),$&&($.c(),$.m(m,p))),v&64&&u!==(u=e[15].name+"")&&te(b,u),v&64&&D!==(D=x.getFieldValueType(e[15])+"")&&te(S,D),L===(L=R(e))&&g?g.p(e,v):(g&&g.d(1),g=L&&L(e),g&&(g.c(),g.m(q,null)))},d(w){w&&r(t),$.d(),g&&g.d()}}}function vt(d,e){let t,a=e[10].code+"",m,p,c,u;function b(){return e[9](e[10])}return{key:d,first:null,c(){t=i("button"),m=h(a),p=f(),k(t,"class","tab-item"),Te(t,"active",e[2]===e[10].code),this.first=t},m(O,T){o(O,t,T),n(t,m),n(t,p),c||(u=Lt(t,"click",b),c=!0)},p(O,T){e=O,T&8&&a!==(a=e[10].code+"")&&te(m,a),T&12&&Te(t,"active",e[2]===e[10].code)},d(O){O&&r(t),c=!1,u()}}}function Ct(d,e){let t,a,m,p;return a=new Tt({props:{content:e[10].body}}),{key:d,first:null,c(){t=i("div"),we(a.$$.fragment),m=f(),k(t,"class","tab-item"),Te(t,"active",e[2]===e[10].code),this.first=t},m(c,u){o(c,t,u),ve(a,t,null),n(t,m),p=!0},p(c,u){e=c;const b={};u&8&&(b.content=e[10].body),a.$set(b),(!p||u&12)&&Te(t,"active",e[2]===e[10].code)},i(c){p||(he(a.$$.fragment,c),p=!0)},o(c){ye(a.$$.fragment,c),p=!1},d(c){c&&r(t),Ce(a)}}}function Qt(d){var ct,ut;let e,t,a=d[0].name+"",m,p,c,u,b,O,T,M=d[0].name+"",D,S,E,q,H,I,U,$,R,L,g,w,v,Q,W,F,_,C,le,z=d[0].name+"",ne,Je,Oe,Ve,Se,oe,Me,re,$e,ce,qe,K,Re,xe,Y,De,J=[],Qe=new Map,He,ue,Le,G,Pe,We,pe,X,Fe,ze,Be,Ke,B,Ye,ae,Ge,Xe,Ze,Ne,et,je,tt,Ae,lt,nt,se,Ee,fe,Ue,Z,be,V=[],at=new Map,st,me,N=[],it=new Map,ee,j=d[1]&&yt();R=new $t({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${d[5]}');
|
||||
|
||||
...
|
||||
|
||||
// example update data
|
||||
const data = ${JSON.stringify(Object.assign({},d[4],x.dummyCollectionSchemaData(d[0],!0)),null,4)};
|
||||
|
||||
const record = await pb.collection('${(ct=d[0])==null?void 0:ct.name}').update('RECORD_ID', data);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${d[5]}');
|
||||
|
||||
...
|
||||
|
||||
// example update body
|
||||
final body = <String, dynamic>${JSON.stringify(Object.assign({},d[4],x.dummyCollectionSchemaData(d[0],!0)),null,2)};
|
||||
|
||||
final record = await pb.collection('${(ut=d[0])==null?void 0:ut.name}').update('RECORD_ID', body: body);
|
||||
`}});let A=d[7]&&kt(),P=d[1]&>(d),ke=ie(d[6]);const dt=l=>l[15].name;for(let l=0;l<ke.length;l+=1){let s=ht(d,ke,l),y=dt(s);Qe.set(y,J[l]=wt(y,s))}ae=new Tt({props:{content:"?expand=relField1,relField2.subRelField21"}}),se=new Pt({});let ge=ie(d[3]);const ot=l=>l[10].code;for(let l=0;l<ge.length;l+=1){let s=_t(d,ge,l),y=ot(s);at.set(y,V[l]=vt(y,s))}let _e=ie(d[3]);const rt=l=>l[10].code;for(let l=0;l<_e.length;l+=1){let s=mt(d,_e,l),y=rt(s);it.set(y,N[l]=Ct(y,s))}return{c(){e=i("h3"),t=h("Update ("),m=h(a),p=h(")"),c=f(),u=i("div"),b=i("p"),O=h("Update a single "),T=i("strong"),D=h(M),S=h(" record."),E=f(),q=i("p"),q.innerHTML=`Body parameters could be sent as <code>application/json</code> or
|
||||
<code>multipart/form-data</code>.`,H=f(),I=i("p"),I.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>.`,U=f(),j&&j.c(),$=f(),we(R.$$.fragment),L=f(),g=i("h6"),g.textContent="API details",w=f(),v=i("div"),Q=i("strong"),Q.textContent="PATCH",W=f(),F=i("div"),_=i("p"),C=h("/api/collections/"),le=i("strong"),ne=h(z),Je=h("/records/"),Oe=i("strong"),Oe.textContent=":id",Ve=f(),A&&A.c(),Se=f(),oe=i("div"),oe.textContent="Path parameters",Me=f(),re=i("table"),re.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>',$e=f(),ce=i("div"),ce.textContent="Body Parameters",qe=f(),K=i("table"),Re=i("thead"),Re.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="50%">Description</th></tr>',xe=f(),Y=i("tbody"),P&&P.c(),De=f();for(let l=0;l<J.length;l+=1)J[l].c();He=f(),ue=i("div"),ue.textContent="Query parameters",Le=f(),G=i("table"),Pe=i("thead"),Pe.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',We=f(),pe=i("tbody"),X=i("tr"),Fe=i("td"),Fe.textContent="expand",ze=f(),Be=i("td"),Be.innerHTML='<span class="label">String</span>',Ke=f(),B=i("td"),Ye=h(`Auto expand relations when returning the updated record. Ex.:
|
||||
`),we(ae.$$.fragment),Ge=h(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Xe=i("br"),Ze=h(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),Ne=i("code"),Ne.textContent="expand",et=h(" property (eg. "),je=i("code"),je.textContent='"expand": {"relField1": {...}, ...}',tt=h(`). Only
|
||||
the relations that the user has permissions to `),Ae=i("strong"),Ae.textContent="view",lt=h(" will be expanded."),nt=f(),we(se.$$.fragment),Ee=f(),fe=i("div"),fe.textContent="Responses",Ue=f(),Z=i("div"),be=i("div");for(let l=0;l<V.length;l+=1)V[l].c();st=f(),me=i("div");for(let l=0;l<N.length;l+=1)N[l].c();k(e,"class","m-b-sm"),k(u,"class","content txt-lg m-b-sm"),k(g,"class","m-b-xs"),k(Q,"class","label label-primary"),k(F,"class","content"),k(v,"class","alert alert-warning"),k(oe,"class","section-title"),k(re,"class","table-compact table-border m-b-base"),k(ce,"class","section-title"),k(K,"class","table-compact table-border m-b-base"),k(ue,"class","section-title"),k(G,"class","table-compact table-border m-b-lg"),k(fe,"class","section-title"),k(be,"class","tabs-header compact combined left"),k(me,"class","tabs-content"),k(Z,"class","tabs")},m(l,s){o(l,e,s),n(e,t),n(e,m),n(e,p),o(l,c,s),o(l,u,s),n(u,b),n(b,O),n(b,T),n(T,D),n(b,S),n(u,E),n(u,q),n(u,H),n(u,I),n(u,U),j&&j.m(u,null),o(l,$,s),ve(R,l,s),o(l,L,s),o(l,g,s),o(l,w,s),o(l,v,s),n(v,Q),n(v,W),n(v,F),n(F,_),n(_,C),n(_,le),n(le,ne),n(_,Je),n(_,Oe),n(v,Ve),A&&A.m(v,null),o(l,Se,s),o(l,oe,s),o(l,Me,s),o(l,re,s),o(l,$e,s),o(l,ce,s),o(l,qe,s),o(l,K,s),n(K,Re),n(K,xe),n(K,Y),P&&P.m(Y,null),n(Y,De);for(let y=0;y<J.length;y+=1)J[y]&&J[y].m(Y,null);o(l,He,s),o(l,ue,s),o(l,Le,s),o(l,G,s),n(G,Pe),n(G,We),n(G,pe),n(pe,X),n(X,Fe),n(X,ze),n(X,Be),n(X,Ke),n(X,B),n(B,Ye),ve(ae,B,null),n(B,Ge),n(B,Xe),n(B,Ze),n(B,Ne),n(B,et),n(B,je),n(B,tt),n(B,Ae),n(B,lt),n(pe,nt),ve(se,pe,null),o(l,Ee,s),o(l,fe,s),o(l,Ue,s),o(l,Z,s),n(Z,be);for(let y=0;y<V.length;y+=1)V[y]&&V[y].m(be,null);n(Z,st),n(Z,me);for(let y=0;y<N.length;y+=1)N[y]&&N[y].m(me,null);ee=!0},p(l,[s]){var pt,ft;(!ee||s&1)&&a!==(a=l[0].name+"")&&te(m,a),(!ee||s&1)&&M!==(M=l[0].name+"")&&te(D,M),l[1]?j||(j=yt(),j.c(),j.m(u,null)):j&&(j.d(1),j=null);const y={};s&49&&(y.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${l[5]}');
|
||||
|
||||
...
|
||||
|
||||
// example update data
|
||||
const data = ${JSON.stringify(Object.assign({},l[4],x.dummyCollectionSchemaData(l[0],!0)),null,4)};
|
||||
|
||||
const record = await pb.collection('${(pt=l[0])==null?void 0:pt.name}').update('RECORD_ID', data);
|
||||
`),s&49&&(y.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${l[5]}');
|
||||
|
||||
...
|
||||
|
||||
// example update body
|
||||
final body = <String, dynamic>${JSON.stringify(Object.assign({},l[4],x.dummyCollectionSchemaData(l[0],!0)),null,2)};
|
||||
|
||||
final record = await pb.collection('${(ft=l[0])==null?void 0:ft.name}').update('RECORD_ID', body: body);
|
||||
`),R.$set(y),(!ee||s&1)&&z!==(z=l[0].name+"")&&te(ne,z),l[7]?A||(A=kt(),A.c(),A.m(v,null)):A&&(A.d(1),A=null),l[1]?P?P.p(l,s):(P=gt(l),P.c(),P.m(Y,De)):P&&(P.d(1),P=null),s&64&&(ke=ie(l[6]),J=Ie(J,s,dt,1,l,ke,Qe,Y,bt,wt,null,ht)),s&12&&(ge=ie(l[3]),V=Ie(V,s,ot,1,l,ge,at,be,bt,vt,null,_t)),s&12&&(_e=ie(l[3]),qt(),N=Ie(N,s,rt,1,l,_e,it,me,Rt,Ct,null,mt),Dt())},i(l){if(!ee){he(R.$$.fragment,l),he(ae.$$.fragment,l),he(se.$$.fragment,l);for(let s=0;s<_e.length;s+=1)he(N[s]);ee=!0}},o(l){ye(R.$$.fragment,l),ye(ae.$$.fragment,l),ye(se.$$.fragment,l);for(let s=0;s<N.length;s+=1)ye(N[s]);ee=!1},d(l){l&&(r(e),r(c),r(u),r($),r(L),r(g),r(w),r(v),r(Se),r(oe),r(Me),r(re),r($e),r(ce),r(qe),r(K),r(He),r(ue),r(Le),r(G),r(Ee),r(fe),r(Ue),r(Z)),j&&j.d(),Ce(R,l),A&&A.d(),P&&P.d();for(let s=0;s<J.length;s+=1)J[s].d();Ce(ae),Ce(se);for(let s=0;s<V.length;s+=1)V[s].d();for(let s=0;s<N.length;s+=1)N[s].d()}}}const Wt=d=>d.name=="emailVisibility";function zt(d,e,t){let a,m,p,c,u,{collection:b}=e,O=200,T=[],M={};const D=S=>t(2,O=S.code);return d.$$set=S=>{"collection"in S&&t(0,b=S.collection)},d.$$.update=()=>{var S,E,q;d.$$.dirty&1&&t(1,a=(b==null?void 0:b.type)==="auth"),d.$$.dirty&1&&t(7,m=(b==null?void 0:b.updateRule)===null),d.$$.dirty&2&&t(8,p=a?["id","password","verified","email","emailVisibility"]:["id"]),d.$$.dirty&257&&t(6,c=((S=b==null?void 0:b.fields)==null?void 0:S.filter(H=>!H.hidden&&H.type!="autodate"&&!p.includes(H.name)))||[]),d.$$.dirty&1&&t(3,T=[{code:200,body:JSON.stringify(x.dummyCollectionRecord(b),null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to update record.",
|
||||
"data": {
|
||||
"${(q=(E=b==null?void 0:b.fields)==null?void 0:E[0])==null?void 0:q.name}": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "You are not allowed to perform this request.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}]),d.$$.dirty&2&&(a?t(4,M={password:"87654321",passwordConfirm:"87654321",oldPassword:"12345678"}):t(4,M={}))},t(5,u=x.getApiExampleUrl(Ht.baseURL)),[b,a,O,T,M,u,c,m,p,D]}class Gt extends Ot{constructor(e){super(),St(this,e,zt,Qt,Mt,{collection:0})}}export{Gt as default};
|
||||
@@ -1,90 +0,0 @@
|
||||
import{S as $t,i as Mt,s as qt,C as I,O as Z,N as Ot,e as r,v as b,b as f,c as he,f as v,g as i,h as s,m as ye,w as J,P as Ee,Q as _t,k as Ht,R as Rt,n as Dt,t as ce,a as pe,o as d,d as ke,A as Lt,q as ve,r as Pt,x as ee}from"./index-Bp3jGQ0J.js";import{S as Ft}from"./SdkTabs-DxNNd6Sw.js";import{F as At}from"./FieldsQueryParam-zDO3HzQv.js";function ht(c,e,t){const n=c.slice();return n[8]=e[t],n}function yt(c,e,t){const n=c.slice();return n[8]=e[t],n}function kt(c,e,t){const n=c.slice();return n[13]=e[t],n}function vt(c){let e;return{c(){e=r("p"),e.innerHTML=`<em>Note that in case of a password change all previously issued tokens for the current record
|
||||
will be automatically invalidated and if you want your user to remain signed in you need to
|
||||
reauthenticate manually after the update call.</em>`},m(t,n){i(t,e,n)},d(t){t&&d(e)}}}function gt(c){let e;return{c(){e=r("p"),e.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",v(e,"class","txt-hint txt-sm txt-right")},m(t,n){i(t,e,n)},d(t){t&&d(e)}}}function wt(c){let e,t,n,u,m,o,p,h,w,S,g,$,P,E,M,U,F;return{c(){e=r("tr"),e.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',t=f(),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=f(),m=r("tr"),m.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>email</span></div></td> <td><span class="label">String</span></td> <td>The auth record email address.
|
||||
<br/>
|
||||
This field can be updated only by admins or auth records with "Manage" access.
|
||||
<br/>
|
||||
Regular accounts can update their email by calling "Request email change".</td>`,o=f(),p=r("tr"),p.innerHTML='<td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>emailVisibility</span></div></td> <td><span class="label">Boolean</span></td> <td>Whether to show/hide the auth record email when fetching the record data.</td>',h=f(),w=r("tr"),w.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>oldPassword</span></div></td> <td><span class="label">String</span></td> <td>Old auth record password.
|
||||
<br/>
|
||||
This field is required only when changing the record password. Admins and auth records with
|
||||
"Manage" access can skip this field.</td>`,S=f(),g=r("tr"),g.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>',$=f(),P=r("tr"),P.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>',E=f(),M=r("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 "Manage" access.</td>`,U=f(),F=r("tr"),F.innerHTML='<td colspan="3" class="txt-hint">Schema fields</td>'},m(y,_){i(y,e,_),i(y,t,_),i(y,n,_),i(y,u,_),i(y,m,_),i(y,o,_),i(y,p,_),i(y,h,_),i(y,w,_),i(y,S,_),i(y,g,_),i(y,$,_),i(y,P,_),i(y,E,_),i(y,M,_),i(y,U,_),i(y,F,_)},d(y){y&&(d(e),d(t),d(n),d(u),d(m),d(o),d(p),d(h),d(w),d(S),d(g),d($),d(P),d(E),d(M),d(U),d(F))}}}function Nt(c){let e;return{c(){e=r("span"),e.textContent="Optional",v(e,"class","label label-warning")},m(t,n){i(t,e,n)},d(t){t&&d(e)}}}function Bt(c){let e;return{c(){e=r("span"),e.textContent="Required",v(e,"class","label label-success")},m(t,n){i(t,e,n)},d(t){t&&d(e)}}}function jt(c){var m;let e,t=((m=c[13].options)==null?void 0:m.maxSelect)>1?"ids":"id",n,u;return{c(){e=b("User "),n=b(t),u=b(".")},m(o,p){i(o,e,p),i(o,n,p),i(o,u,p)},p(o,p){var h;p&1&&t!==(t=((h=o[13].options)==null?void 0:h.maxSelect)>1?"ids":"id")&&J(n,t)},d(o){o&&(d(e),d(n),d(u))}}}function Et(c){var m;let e,t=((m=c[13].options)==null?void 0:m.maxSelect)>1?"ids":"id",n,u;return{c(){e=b("Relation record "),n=b(t),u=b(".")},m(o,p){i(o,e,p),i(o,n,p),i(o,u,p)},p(o,p){var h;p&1&&t!==(t=((h=o[13].options)==null?void 0:h.maxSelect)>1?"ids":"id")&&J(n,t)},d(o){o&&(d(e),d(n),d(u))}}}function Ut(c){let e,t,n,u,m;return{c(){e=b("File object."),t=r("br"),n=b(`
|
||||
Set to `),u=r("code"),u.textContent="null",m=b(" to delete already uploaded file(s).")},m(o,p){i(o,e,p),i(o,t,p),i(o,n,p),i(o,u,p),i(o,m,p)},p:ee,d(o){o&&(d(e),d(t),d(n),d(u),d(m))}}}function It(c){let e;return{c(){e=b("URL address.")},m(t,n){i(t,e,n)},p:ee,d(t){t&&d(e)}}}function Jt(c){let e;return{c(){e=b("Email address.")},m(t,n){i(t,e,n)},p:ee,d(t){t&&d(e)}}}function Vt(c){let e;return{c(){e=b("JSON array or object.")},m(t,n){i(t,e,n)},p:ee,d(t){t&&d(e)}}}function Qt(c){let e;return{c(){e=b("Number value.")},m(t,n){i(t,e,n)},p:ee,d(t){t&&d(e)}}}function xt(c){let e;return{c(){e=b("Plain text value.")},m(t,n){i(t,e,n)},p:ee,d(t){t&&d(e)}}}function Tt(c,e){let t,n,u,m,o,p=e[13].name+"",h,w,S,g,$=I.getFieldValueType(e[13])+"",P,E,M,U;function F(C,O){return C[13].required?Bt:Nt}let y=F(e),_=y(e);function A(C,O){if(C[13].type==="text")return xt;if(C[13].type==="number")return Qt;if(C[13].type==="json")return Vt;if(C[13].type==="email")return Jt;if(C[13].type==="url")return It;if(C[13].type==="file")return Ut;if(C[13].type==="relation")return Et;if(C[13].type==="user")return jt}let N=A(e),T=N&&N(e);return{key:c,first:null,c(){t=r("tr"),n=r("td"),u=r("div"),_.c(),m=f(),o=r("span"),h=b(p),w=f(),S=r("td"),g=r("span"),P=b($),E=f(),M=r("td"),T&&T.c(),U=f(),v(u,"class","inline-flex"),v(g,"class","label"),this.first=t},m(C,O){i(C,t,O),s(t,n),s(n,u),_.m(u,null),s(u,m),s(u,o),s(o,h),s(t,w),s(t,S),s(S,g),s(g,P),s(t,E),s(t,M),T&&T.m(M,null),s(t,U)},p(C,O){e=C,y!==(y=F(e))&&(_.d(1),_=y(e),_&&(_.c(),_.m(u,m))),O&1&&p!==(p=e[13].name+"")&&J(h,p),O&1&&$!==($=I.getFieldValueType(e[13])+"")&&J(P,$),N===(N=A(e))&&T?T.p(e,O):(T&&T.d(1),T=N&&N(e),T&&(T.c(),T.m(M,null)))},d(C){C&&d(t),_.d(),T&&T.d()}}}function Ct(c,e){let t,n=e[8].code+"",u,m,o,p;function h(){return e[7](e[8])}return{key:c,first:null,c(){t=r("button"),u=b(n),m=f(),v(t,"class","tab-item"),ve(t,"active",e[1]===e[8].code),this.first=t},m(w,S){i(w,t,S),s(t,u),s(t,m),o||(p=Pt(t,"click",h),o=!0)},p(w,S){e=w,S&4&&n!==(n=e[8].code+"")&&J(u,n),S&6&&ve(t,"active",e[1]===e[8].code)},d(w){w&&d(t),o=!1,p()}}}function St(c,e){let t,n,u,m;return n=new Ot({props:{content:e[8].body}}),{key:c,first:null,c(){t=r("div"),he(n.$$.fragment),u=f(),v(t,"class","tab-item"),ve(t,"active",e[1]===e[8].code),this.first=t},m(o,p){i(o,t,p),ye(n,t,null),s(t,u),m=!0},p(o,p){e=o;const h={};p&4&&(h.content=e[8].body),n.$set(h),(!m||p&6)&&ve(t,"active",e[1]===e[8].code)},i(o){m||(ce(n.$$.fragment,o),m=!0)},o(o){pe(n.$$.fragment,o),m=!1},d(o){o&&d(t),ke(n)}}}function zt(c){var ct,pt,ut;let e,t,n=c[0].name+"",u,m,o,p,h,w,S,g=c[0].name+"",$,P,E,M,U,F,y,_,A,N,T,C,O,ue,Ue,fe,Y,Ie,ge,me=c[0].name+"",we,Je,Te,Ve,Ce,te,Se,le,Oe,ne,$e,V,Me,Qe,Q,qe,B=[],xe=new Map,He,ae,Re,x,De,ze,se,z,Le,Ke,Pe,We,q,Ye,G,Ge,Xe,Ze,Fe,et,Ae,tt,Ne,lt,nt,X,Be,ie,je,K,de,j=[],at=new Map,st,oe,H=[],it=new Map,W,R=c[6]&&vt();A=new Ft({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${c[4]}');
|
||||
|
||||
...
|
||||
|
||||
// example update data
|
||||
const data = ${JSON.stringify(Object.assign({},c[3],I.dummyCollectionSchemaData(c[0])),null,4)};
|
||||
|
||||
const record = await pb.collection('${(ct=c[0])==null?void 0:ct.name}').update('RECORD_ID', data);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${c[4]}');
|
||||
|
||||
...
|
||||
|
||||
// example update body
|
||||
final body = <String, dynamic>${JSON.stringify(Object.assign({},c[3],I.dummyCollectionSchemaData(c[0])),null,2)};
|
||||
|
||||
final record = await pb.collection('${(pt=c[0])==null?void 0:pt.name}').update('RECORD_ID', body: body);
|
||||
`}});let D=c[5]&>(),L=c[6]&&wt(),be=Z((ut=c[0])==null?void 0:ut.schema);const dt=l=>l[13].name;for(let l=0;l<be.length;l+=1){let a=kt(c,be,l),k=dt(a);xe.set(k,B[l]=Tt(k,a))}G=new Ot({props:{content:"?expand=relField1,relField2.subRelField21"}}),X=new At({});let _e=Z(c[2]);const ot=l=>l[8].code;for(let l=0;l<_e.length;l+=1){let a=yt(c,_e,l),k=ot(a);at.set(k,j[l]=Ct(k,a))}let re=Z(c[2]);const rt=l=>l[8].code;for(let l=0;l<re.length;l+=1){let a=ht(c,re,l),k=rt(a);it.set(k,H[l]=St(k,a))}return{c(){e=r("h3"),t=b("Update ("),u=b(n),m=b(")"),o=f(),p=r("div"),h=r("p"),w=b("Update a single "),S=r("strong"),$=b(g),P=b(" record."),E=f(),M=r("p"),M.innerHTML=`Body parameters could be sent as <code>application/json</code> or
|
||||
<code>multipart/form-data</code>.`,U=f(),F=r("p"),F.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>.`,y=f(),R&&R.c(),_=f(),he(A.$$.fragment),N=f(),T=r("h6"),T.textContent="API details",C=f(),O=r("div"),ue=r("strong"),ue.textContent="PATCH",Ue=f(),fe=r("div"),Y=r("p"),Ie=b("/api/collections/"),ge=r("strong"),we=b(me),Je=b("/records/"),Te=r("strong"),Te.textContent=":id",Ve=f(),D&&D.c(),Ce=f(),te=r("div"),te.textContent="Path parameters",Se=f(),le=r("table"),le.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>',Oe=f(),ne=r("div"),ne.textContent="Body Parameters",$e=f(),V=r("table"),Me=r("thead"),Me.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="50%">Description</th></tr>',Qe=f(),Q=r("tbody"),L&&L.c(),qe=f();for(let l=0;l<B.length;l+=1)B[l].c();He=f(),ae=r("div"),ae.textContent="Query parameters",Re=f(),x=r("table"),De=r("thead"),De.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',ze=f(),se=r("tbody"),z=r("tr"),Le=r("td"),Le.textContent="expand",Ke=f(),Pe=r("td"),Pe.innerHTML='<span class="label">String</span>',We=f(),q=r("td"),Ye=b(`Auto expand relations when returning the updated record. Ex.:
|
||||
`),he(G.$$.fragment),Ge=b(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Xe=r("br"),Ze=b(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),Fe=r("code"),Fe.textContent="expand",et=b(" property (eg. "),Ae=r("code"),Ae.textContent='"expand": {"relField1": {...}, ...}',tt=b(`). Only
|
||||
the relations that the user has permissions to `),Ne=r("strong"),Ne.textContent="view",lt=b(" will be expanded."),nt=f(),he(X.$$.fragment),Be=f(),ie=r("div"),ie.textContent="Responses",je=f(),K=r("div"),de=r("div");for(let l=0;l<j.length;l+=1)j[l].c();st=f(),oe=r("div");for(let l=0;l<H.length;l+=1)H[l].c();v(e,"class","m-b-sm"),v(p,"class","content txt-lg m-b-sm"),v(T,"class","m-b-xs"),v(ue,"class","label label-primary"),v(fe,"class","content"),v(O,"class","alert alert-warning"),v(te,"class","section-title"),v(le,"class","table-compact table-border m-b-base"),v(ne,"class","section-title"),v(V,"class","table-compact table-border m-b-base"),v(ae,"class","section-title"),v(x,"class","table-compact table-border m-b-lg"),v(ie,"class","section-title"),v(de,"class","tabs-header compact combined left"),v(oe,"class","tabs-content"),v(K,"class","tabs")},m(l,a){i(l,e,a),s(e,t),s(e,u),s(e,m),i(l,o,a),i(l,p,a),s(p,h),s(h,w),s(h,S),s(S,$),s(h,P),s(p,E),s(p,M),s(p,U),s(p,F),s(p,y),R&&R.m(p,null),i(l,_,a),ye(A,l,a),i(l,N,a),i(l,T,a),i(l,C,a),i(l,O,a),s(O,ue),s(O,Ue),s(O,fe),s(fe,Y),s(Y,Ie),s(Y,ge),s(ge,we),s(Y,Je),s(Y,Te),s(O,Ve),D&&D.m(O,null),i(l,Ce,a),i(l,te,a),i(l,Se,a),i(l,le,a),i(l,Oe,a),i(l,ne,a),i(l,$e,a),i(l,V,a),s(V,Me),s(V,Qe),s(V,Q),L&&L.m(Q,null),s(Q,qe);for(let k=0;k<B.length;k+=1)B[k]&&B[k].m(Q,null);i(l,He,a),i(l,ae,a),i(l,Re,a),i(l,x,a),s(x,De),s(x,ze),s(x,se),s(se,z),s(z,Le),s(z,Ke),s(z,Pe),s(z,We),s(z,q),s(q,Ye),ye(G,q,null),s(q,Ge),s(q,Xe),s(q,Ze),s(q,Fe),s(q,et),s(q,Ae),s(q,tt),s(q,Ne),s(q,lt),s(se,nt),ye(X,se,null),i(l,Be,a),i(l,ie,a),i(l,je,a),i(l,K,a),s(K,de);for(let k=0;k<j.length;k+=1)j[k]&&j[k].m(de,null);s(K,st),s(K,oe);for(let k=0;k<H.length;k+=1)H[k]&&H[k].m(oe,null);W=!0},p(l,[a]){var ft,mt,bt;(!W||a&1)&&n!==(n=l[0].name+"")&&J(u,n),(!W||a&1)&&g!==(g=l[0].name+"")&&J($,g),l[6]?R||(R=vt(),R.c(),R.m(p,null)):R&&(R.d(1),R=null);const k={};a&25&&(k.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${l[4]}');
|
||||
|
||||
...
|
||||
|
||||
// example update data
|
||||
const data = ${JSON.stringify(Object.assign({},l[3],I.dummyCollectionSchemaData(l[0])),null,4)};
|
||||
|
||||
const record = await pb.collection('${(ft=l[0])==null?void 0:ft.name}').update('RECORD_ID', data);
|
||||
`),a&25&&(k.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${l[4]}');
|
||||
|
||||
...
|
||||
|
||||
// example update body
|
||||
final body = <String, dynamic>${JSON.stringify(Object.assign({},l[3],I.dummyCollectionSchemaData(l[0])),null,2)};
|
||||
|
||||
final record = await pb.collection('${(mt=l[0])==null?void 0:mt.name}').update('RECORD_ID', body: body);
|
||||
`),A.$set(k),(!W||a&1)&&me!==(me=l[0].name+"")&&J(we,me),l[5]?D||(D=gt(),D.c(),D.m(O,null)):D&&(D.d(1),D=null),l[6]?L||(L=wt(),L.c(),L.m(Q,qe)):L&&(L.d(1),L=null),a&1&&(be=Z((bt=l[0])==null?void 0:bt.schema),B=Ee(B,a,dt,1,l,be,xe,Q,_t,Tt,null,kt)),a&6&&(_e=Z(l[2]),j=Ee(j,a,ot,1,l,_e,at,de,_t,Ct,null,yt)),a&6&&(re=Z(l[2]),Ht(),H=Ee(H,a,rt,1,l,re,it,oe,Rt,St,null,ht),Dt())},i(l){if(!W){ce(A.$$.fragment,l),ce(G.$$.fragment,l),ce(X.$$.fragment,l);for(let a=0;a<re.length;a+=1)ce(H[a]);W=!0}},o(l){pe(A.$$.fragment,l),pe(G.$$.fragment,l),pe(X.$$.fragment,l);for(let a=0;a<H.length;a+=1)pe(H[a]);W=!1},d(l){l&&(d(e),d(o),d(p),d(_),d(N),d(T),d(C),d(O),d(Ce),d(te),d(Se),d(le),d(Oe),d(ne),d($e),d(V),d(He),d(ae),d(Re),d(x),d(Be),d(ie),d(je),d(K)),R&&R.d(),ke(A,l),D&&D.d(),L&&L.d();for(let a=0;a<B.length;a+=1)B[a].d();ke(G),ke(X);for(let a=0;a<j.length;a+=1)j[a].d();for(let a=0;a<H.length;a+=1)H[a].d()}}}function Kt(c,e,t){let n,u,m,{collection:o}=e,p=200,h=[],w={};const S=g=>t(1,p=g.code);return c.$$set=g=>{"collection"in g&&t(0,o=g.collection)},c.$$.update=()=>{var g,$;c.$$.dirty&1&&t(6,n=(o==null?void 0:o.type)==="auth"),c.$$.dirty&1&&t(5,u=(o==null?void 0:o.updateRule)===null),c.$$.dirty&1&&t(2,h=[{code:200,body:JSON.stringify(I.dummyCollectionRecord(o),null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to update record.",
|
||||
"data": {
|
||||
"${($=(g=o==null?void 0:o.schema)==null?void 0:g[0])==null?void 0:$.name}": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "You are not allowed to perform this request.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}]),c.$$.dirty&1&&(o.type==="auth"?t(3,w={username:"test_username_update",emailVisibility:!1,password:"87654321",passwordConfirm:"87654321",oldPassword:"12345678"}):t(3,w={}))},t(4,m=I.getApiExampleUrl(Lt.baseUrl)),[o,p,h,w,m,u,n,S]}class Xt extends $t{constructor(e){super(),Mt(this,e,Kt,zt,qt,{collection:0})}}export{Xt as default};
|
||||
@@ -0,0 +1,79 @@
|
||||
import{S as le,i as ne,s as ie,T as D,e as m,b as T,w as M,f as v,g as b,h as u,x as Y,U as x,V as ye,k as ee,W as Ce,n as te,t as L,a as j,o as h,r as K,u as oe,R as qe,c as G,m as J,d as Z,Q as Ve,X as fe,C as Ie,p as Pe,Y as ue}from"./index-B-F-pko3.js";function de(s,t,e){const o=s.slice();return o[4]=t[e],o}function me(s,t,e){const o=s.slice();return o[4]=t[e],o}function pe(s,t){let e,o=t[4].code+"",f,c,r,a;function d(){return t[3](t[4])}return{key:s,first:null,c(){e=m("button"),f=M(o),c=T(),v(e,"class","tab-item"),K(e,"active",t[1]===t[4].code),this.first=e},m(g,C){b(g,e,C),u(e,f),u(e,c),r||(a=oe(e,"click",d),r=!0)},p(g,C){t=g,C&4&&o!==(o=t[4].code+"")&&Y(f,o),C&6&&K(e,"active",t[1]===t[4].code)},d(g){g&&h(e),r=!1,a()}}}function _e(s,t){let e,o,f,c;return o=new qe({props:{content:t[4].body}}),{key:s,first:null,c(){e=m("div"),G(o.$$.fragment),f=T(),v(e,"class","tab-item"),K(e,"active",t[1]===t[4].code),this.first=e},m(r,a){b(r,e,a),J(o,e,null),u(e,f),c=!0},p(r,a){t=r;const d={};a&4&&(d.content=t[4].body),o.$set(d),(!c||a&6)&&K(e,"active",t[1]===t[4].code)},i(r){c||(L(o.$$.fragment,r),c=!0)},o(r){j(o.$$.fragment,r),c=!1},d(r){r&&h(e),Z(o)}}}function Re(s){let t,e,o,f,c,r,a,d=s[0].name+"",g,C,F,R,H,A,B,O,N,q,V,$=[],Q=new Map,U,P,p=[],y=new Map,I,_=D(s[2]);const X=l=>l[4].code;for(let l=0;l<_.length;l+=1){let i=me(s,_,l),n=X(i);Q.set(n,$[l]=pe(n,i))}let E=D(s[2]);const W=l=>l[4].code;for(let l=0;l<E.length;l+=1){let i=de(s,E,l),n=W(i);y.set(n,p[l]=_e(n,i))}return{c(){t=m("div"),e=m("strong"),e.textContent="POST",o=T(),f=m("div"),c=m("p"),r=M("/api/collections/"),a=m("strong"),g=M(d),C=M("/confirm-verification"),F=T(),R=m("div"),R.textContent="Body Parameters",H=T(),A=m("table"),A.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>',B=T(),O=m("div"),O.textContent="Responses",N=T(),q=m("div"),V=m("div");for(let l=0;l<$.length;l+=1)$[l].c();U=T(),P=m("div");for(let l=0;l<p.length;l+=1)p[l].c();v(e,"class","label label-primary"),v(f,"class","content"),v(t,"class","alert alert-success"),v(R,"class","section-title"),v(A,"class","table-compact table-border m-b-base"),v(O,"class","section-title"),v(V,"class","tabs-header compact combined left"),v(P,"class","tabs-content"),v(q,"class","tabs")},m(l,i){b(l,t,i),u(t,e),u(t,o),u(t,f),u(f,c),u(c,r),u(c,a),u(a,g),u(c,C),b(l,F,i),b(l,R,i),b(l,H,i),b(l,A,i),b(l,B,i),b(l,O,i),b(l,N,i),b(l,q,i),u(q,V);for(let n=0;n<$.length;n+=1)$[n]&&$[n].m(V,null);u(q,U),u(q,P);for(let n=0;n<p.length;n+=1)p[n]&&p[n].m(P,null);I=!0},p(l,[i]){(!I||i&1)&&d!==(d=l[0].name+"")&&Y(g,d),i&6&&(_=D(l[2]),$=x($,i,X,1,l,_,Q,V,ye,pe,null,me)),i&6&&(E=D(l[2]),ee(),p=x(p,i,W,1,l,E,y,P,Ce,_e,null,de),te())},i(l){if(!I){for(let i=0;i<E.length;i+=1)L(p[i]);I=!0}},o(l){for(let i=0;i<p.length;i+=1)j(p[i]);I=!1},d(l){l&&(h(t),h(F),h(R),h(H),h(A),h(B),h(O),h(N),h(q));for(let i=0;i<$.length;i+=1)$[i].d();for(let i=0;i<p.length;i+=1)p[i].d()}}}function Ae(s,t,e){let{collection:o}=t,f=204,c=[];const r=a=>e(1,f=a.code);return s.$$set=a=>{"collection"in a&&e(0,o=a.collection)},e(2,c=[{code:204,body:"null"},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"token": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`}]),[o,f,c,r]}class Be extends le{constructor(t){super(),ne(this,t,Ae,Re,ie,{collection:0})}}function be(s,t,e){const o=s.slice();return o[4]=t[e],o}function he(s,t,e){const o=s.slice();return o[4]=t[e],o}function ve(s,t){let e,o=t[4].code+"",f,c,r,a;function d(){return t[3](t[4])}return{key:s,first:null,c(){e=m("button"),f=M(o),c=T(),v(e,"class","tab-item"),K(e,"active",t[1]===t[4].code),this.first=e},m(g,C){b(g,e,C),u(e,f),u(e,c),r||(a=oe(e,"click",d),r=!0)},p(g,C){t=g,C&4&&o!==(o=t[4].code+"")&&Y(f,o),C&6&&K(e,"active",t[1]===t[4].code)},d(g){g&&h(e),r=!1,a()}}}function ge(s,t){let e,o,f,c;return o=new qe({props:{content:t[4].body}}),{key:s,first:null,c(){e=m("div"),G(o.$$.fragment),f=T(),v(e,"class","tab-item"),K(e,"active",t[1]===t[4].code),this.first=e},m(r,a){b(r,e,a),J(o,e,null),u(e,f),c=!0},p(r,a){t=r;const d={};a&4&&(d.content=t[4].body),o.$set(d),(!c||a&6)&&K(e,"active",t[1]===t[4].code)},i(r){c||(L(o.$$.fragment,r),c=!0)},o(r){j(o.$$.fragment,r),c=!1},d(r){r&&h(e),Z(o)}}}function Oe(s){let t,e,o,f,c,r,a,d=s[0].name+"",g,C,F,R,H,A,B,O,N,q,V,$=[],Q=new Map,U,P,p=[],y=new Map,I,_=D(s[2]);const X=l=>l[4].code;for(let l=0;l<_.length;l+=1){let i=he(s,_,l),n=X(i);Q.set(n,$[l]=ve(n,i))}let E=D(s[2]);const W=l=>l[4].code;for(let l=0;l<E.length;l+=1){let i=be(s,E,l),n=W(i);y.set(n,p[l]=ge(n,i))}return{c(){t=m("div"),e=m("strong"),e.textContent="POST",o=T(),f=m("div"),c=m("p"),r=M("/api/collections/"),a=m("strong"),g=M(d),C=M("/request-verification"),F=T(),R=m("div"),R.textContent="Body Parameters",H=T(),A=m("table"),A.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>',B=T(),O=m("div"),O.textContent="Responses",N=T(),q=m("div"),V=m("div");for(let l=0;l<$.length;l+=1)$[l].c();U=T(),P=m("div");for(let l=0;l<p.length;l+=1)p[l].c();v(e,"class","label label-primary"),v(f,"class","content"),v(t,"class","alert alert-success"),v(R,"class","section-title"),v(A,"class","table-compact table-border m-b-base"),v(O,"class","section-title"),v(V,"class","tabs-header compact combined left"),v(P,"class","tabs-content"),v(q,"class","tabs")},m(l,i){b(l,t,i),u(t,e),u(t,o),u(t,f),u(f,c),u(c,r),u(c,a),u(a,g),u(c,C),b(l,F,i),b(l,R,i),b(l,H,i),b(l,A,i),b(l,B,i),b(l,O,i),b(l,N,i),b(l,q,i),u(q,V);for(let n=0;n<$.length;n+=1)$[n]&&$[n].m(V,null);u(q,U),u(q,P);for(let n=0;n<p.length;n+=1)p[n]&&p[n].m(P,null);I=!0},p(l,[i]){(!I||i&1)&&d!==(d=l[0].name+"")&&Y(g,d),i&6&&(_=D(l[2]),$=x($,i,X,1,l,_,Q,V,ye,ve,null,he)),i&6&&(E=D(l[2]),ee(),p=x(p,i,W,1,l,E,y,P,Ce,ge,null,be),te())},i(l){if(!I){for(let i=0;i<E.length;i+=1)L(p[i]);I=!0}},o(l){for(let i=0;i<p.length;i+=1)j(p[i]);I=!1},d(l){l&&(h(t),h(F),h(R),h(H),h(A),h(B),h(O),h(N),h(q));for(let i=0;i<$.length;i+=1)$[i].d();for(let i=0;i<p.length;i+=1)p[i].d()}}}function Ee(s,t,e){let{collection:o}=t,f=204,c=[];const r=a=>e(1,f=a.code);return s.$$set=a=>{"collection"in a&&e(0,o=a.collection)},e(2,c=[{code:204,body:"null"},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"email": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`}]),[o,f,c,r]}class Me extends le{constructor(t){super(),ne(this,t,Ee,Oe,ie,{collection:0})}}function ke(s,t,e){const o=s.slice();return o[5]=t[e],o[7]=e,o}function $e(s,t,e){const o=s.slice();return o[5]=t[e],o[7]=e,o}function we(s){let t,e,o,f,c;function r(){return s[4](s[7])}return{c(){t=m("button"),e=m("div"),e.textContent=`${s[5].title}`,o=T(),v(e,"class","txt"),v(t,"class","tab-item"),K(t,"active",s[1]==s[7])},m(a,d){b(a,t,d),u(t,e),u(t,o),f||(c=oe(t,"click",r),f=!0)},p(a,d){s=a,d&2&&K(t,"active",s[1]==s[7])},d(a){a&&h(t),f=!1,c()}}}function Te(s){let t,e,o,f;var c=s[5].component;function r(a,d){return{props:{collection:a[0]}}}return c&&(e=ue(c,r(s))),{c(){t=m("div"),e&&G(e.$$.fragment),o=T(),v(t,"class","tab-item"),K(t,"active",s[1]==s[7])},m(a,d){b(a,t,d),e&&J(e,t,null),u(t,o),f=!0},p(a,d){if(c!==(c=a[5].component)){if(e){ee();const g=e;j(g.$$.fragment,1,0,()=>{Z(g,1)}),te()}c?(e=ue(c,r(a)),G(e.$$.fragment),L(e.$$.fragment,1),J(e,t,o)):e=null}else if(c){const g={};d&1&&(g.collection=a[0]),e.$set(g)}(!f||d&2)&&K(t,"active",a[1]==a[7])},i(a){f||(e&&L(e.$$.fragment,a),f=!0)},o(a){e&&j(e.$$.fragment,a),f=!1},d(a){a&&h(t),e&&Z(e)}}}function Ne(s){var E,W,l,i;let t,e,o=s[0].name+"",f,c,r,a,d,g,C,F=s[0].name+"",R,H,A,B,O,N,q,V,$,Q,U,P;B=new Ve({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${s[2]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(E=s[0])==null?void 0:E.name}').requestVerification('test@example.com');
|
||||
|
||||
// ---
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
await pb.collection('${(W=s[0])==null?void 0:W.name}').confirmVerification('VERIFICATION_TOKEN');
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${s[2]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(l=s[0])==null?void 0:l.name}').requestVerification('test@example.com');
|
||||
|
||||
// ---
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
await pb.collection('${(i=s[0])==null?void 0:i.name}').confirmVerification('VERIFICATION_TOKEN');
|
||||
`}});let p=D(s[3]),y=[];for(let n=0;n<p.length;n+=1)y[n]=we($e(s,p,n));let I=D(s[3]),_=[];for(let n=0;n<I.length;n+=1)_[n]=Te(ke(s,I,n));const X=n=>j(_[n],1,1,()=>{_[n]=null});return{c(){t=m("h3"),e=M("Account verification ("),f=M(o),c=M(")"),r=T(),a=m("div"),d=m("p"),g=M("Sends "),C=m("strong"),R=M(F),H=M(" account verification request."),A=T(),G(B.$$.fragment),O=T(),N=m("h6"),N.textContent="API details",q=T(),V=m("div"),$=m("div");for(let n=0;n<y.length;n+=1)y[n].c();Q=T(),U=m("div");for(let n=0;n<_.length;n+=1)_[n].c();v(t,"class","m-b-sm"),v(a,"class","content txt-lg m-b-sm"),v(N,"class","m-b-xs"),v($,"class","tabs-header compact"),v(U,"class","tabs-content"),v(V,"class","tabs")},m(n,w){b(n,t,w),u(t,e),u(t,f),u(t,c),b(n,r,w),b(n,a,w),u(a,d),u(d,g),u(d,C),u(C,R),u(d,H),b(n,A,w),J(B,n,w),b(n,O,w),b(n,N,w),b(n,q,w),b(n,V,w),u(V,$);for(let S=0;S<y.length;S+=1)y[S]&&y[S].m($,null);u(V,Q),u(V,U);for(let S=0;S<_.length;S+=1)_[S]&&_[S].m(U,null);P=!0},p(n,[w]){var se,ae,ce,re;(!P||w&1)&&o!==(o=n[0].name+"")&&Y(f,o),(!P||w&1)&&F!==(F=n[0].name+"")&&Y(R,F);const S={};if(w&5&&(S.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${n[2]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(se=n[0])==null?void 0:se.name}').requestVerification('test@example.com');
|
||||
|
||||
// ---
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
await pb.collection('${(ae=n[0])==null?void 0:ae.name}').confirmVerification('VERIFICATION_TOKEN');
|
||||
`),w&5&&(S.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${n[2]}');
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${(ce=n[0])==null?void 0:ce.name}').requestVerification('test@example.com');
|
||||
|
||||
// ---
|
||||
// (optional) in your custom confirmation page:
|
||||
// ---
|
||||
|
||||
await pb.collection('${(re=n[0])==null?void 0:re.name}').confirmVerification('VERIFICATION_TOKEN');
|
||||
`),B.$set(S),w&10){p=D(n[3]);let k;for(k=0;k<p.length;k+=1){const z=$e(n,p,k);y[k]?y[k].p(z,w):(y[k]=we(z),y[k].c(),y[k].m($,null))}for(;k<y.length;k+=1)y[k].d(1);y.length=p.length}if(w&11){I=D(n[3]);let k;for(k=0;k<I.length;k+=1){const z=ke(n,I,k);_[k]?(_[k].p(z,w),L(_[k],1)):(_[k]=Te(z),_[k].c(),L(_[k],1),_[k].m(U,null))}for(ee(),k=I.length;k<_.length;k+=1)X(k);te()}},i(n){if(!P){L(B.$$.fragment,n);for(let w=0;w<I.length;w+=1)L(_[w]);P=!0}},o(n){j(B.$$.fragment,n),_=_.filter(Boolean);for(let w=0;w<_.length;w+=1)j(_[w]);P=!1},d(n){n&&(h(t),h(r),h(a),h(A),h(O),h(N),h(q),h(V)),Z(B,n),fe(y,n),fe(_,n)}}}function Se(s,t,e){let o,{collection:f}=t;const c=[{title:"Request verification",component:Me},{title:"Confirm verification",component:Be}];let r=0;const a=d=>e(1,r=d);return s.$$set=d=>{"collection"in d&&e(0,f=d.collection)},e(2,o=Ie.getApiExampleUrl(Pe.baseURL)),[f,r,o,c,a]}class De extends le{constructor(t){super(),ne(this,t,Se,Ne,ie,{collection:0})}}export{De as default};
|
||||
@@ -0,0 +1,59 @@
|
||||
import{S as lt,i as st,s as nt,Q as ot,R as tt,T as K,e as o,w as _,b,c as W,f as m,g as r,h as l,m as X,x as ve,U as Je,V as at,k as it,W as rt,n as dt,t as Q,a as V,o as d,d as Y,C as Ke,p as ct,r as Z,u as pt}from"./index-B-F-pko3.js";import{F as ut}from"./FieldsQueryParam-CW6KZfgu.js";function We(a,s,n){const i=a.slice();return i[6]=s[n],i}function Xe(a,s,n){const i=a.slice();return i[6]=s[n],i}function Ye(a){let s;return{c(){s=o("p"),s.innerHTML="Requires superuser <code>Authorization:TOKEN</code> header",m(s,"class","txt-hint txt-sm txt-right")},m(n,i){r(n,s,i)},d(n){n&&d(s)}}}function Ze(a,s){let n,i,v;function p(){return s[5](s[6])}return{key:a,first:null,c(){n=o("button"),n.textContent=`${s[6].code} `,m(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(c,f){r(c,n,f),i||(v=pt(n,"click",p),i=!0)},p(c,f){s=c,f&20&&Z(n,"active",s[2]===s[6].code)},d(c){c&&d(n),i=!1,v()}}}function et(a,s){let n,i,v,p;return i=new tt({props:{content:s[6].body}}),{key:a,first:null,c(){n=o("div"),W(i.$$.fragment),v=b(),m(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(c,f){r(c,n,f),X(i,n,null),l(n,v),p=!0},p(c,f){s=c,(!p||f&20)&&Z(n,"active",s[2]===s[6].code)},i(c){p||(Q(i.$$.fragment,c),p=!0)},o(c){V(i.$$.fragment,c),p=!1},d(c){c&&d(n),Y(i)}}}function ft(a){var je,Ne;let s,n,i=a[0].name+"",v,p,c,f,w,C,ee,j=a[0].name+"",te,$e,le,F,se,B,ne,$,N,ye,z,P,we,oe,G=a[0].name+"",ae,Ce,ie,Fe,re,S,de,A,ce,I,pe,R,ue,Re,M,O,fe,Oe,be,Te,h,De,E,Pe,Ee,xe,me,Be,_e,Se,Ae,Ie,he,Me,qe,x,ke,q,ge,T,H,y=[],He=new Map,Le,L,k=[],Ue=new Map,D;F=new ot({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${a[3]}');
|
||||
|
||||
...
|
||||
|
||||
const record = await pb.collection('${(je=a[0])==null?void 0:je.name}').getOne('RECORD_ID', {
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
});
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${a[3]}');
|
||||
|
||||
...
|
||||
|
||||
final record = await pb.collection('${(Ne=a[0])==null?void 0:Ne.name}').getOne('RECORD_ID',
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
);
|
||||
`}});let g=a[1]&&Ye();E=new tt({props:{content:"?expand=relField1,relField2.subRelField"}}),x=new ut({});let J=K(a[4]);const Qe=e=>e[6].code;for(let e=0;e<J.length;e+=1){let t=Xe(a,J,e),u=Qe(t);He.set(u,y[e]=Ze(u,t))}let U=K(a[4]);const Ve=e=>e[6].code;for(let e=0;e<U.length;e+=1){let t=We(a,U,e),u=Ve(t);Ue.set(u,k[e]=et(u,t))}return{c(){s=o("h3"),n=_("View ("),v=_(i),p=_(")"),c=b(),f=o("div"),w=o("p"),C=_("Fetch a single "),ee=o("strong"),te=_(j),$e=_(" record."),le=b(),W(F.$$.fragment),se=b(),B=o("h6"),B.textContent="API details",ne=b(),$=o("div"),N=o("strong"),N.textContent="GET",ye=b(),z=o("div"),P=o("p"),we=_("/api/collections/"),oe=o("strong"),ae=_(G),Ce=_("/records/"),ie=o("strong"),ie.textContent=":id",Fe=b(),g&&g.c(),re=b(),S=o("div"),S.textContent="Path Parameters",de=b(),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>',ce=b(),I=o("div"),I.textContent="Query parameters",pe=b(),R=o("table"),ue=o("thead"),ue.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',Re=b(),M=o("tbody"),O=o("tr"),fe=o("td"),fe.textContent="expand",Oe=b(),be=o("td"),be.innerHTML='<span class="label">String</span>',Te=b(),h=o("td"),De=_(`Auto expand record relations. Ex.:
|
||||
`),W(E.$$.fragment),Pe=_(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Ee=o("br"),xe=_(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),me=o("code"),me.textContent="expand",Be=_(" property (eg. "),_e=o("code"),_e.textContent='"expand": {"relField1": {...}, ...}',Se=_(`).
|
||||
`),Ae=o("br"),Ie=_(`
|
||||
Only the relations to which the request user has permissions to `),he=o("strong"),he.textContent="view",Me=_(" will be expanded."),qe=b(),W(x.$$.fragment),ke=b(),q=o("div"),q.textContent="Responses",ge=b(),T=o("div"),H=o("div");for(let e=0;e<y.length;e+=1)y[e].c();Le=b(),L=o("div");for(let e=0;e<k.length;e+=1)k[e].c();m(s,"class","m-b-sm"),m(f,"class","content txt-lg m-b-sm"),m(B,"class","m-b-xs"),m(N,"class","label label-primary"),m(z,"class","content"),m($,"class","alert alert-info"),m(S,"class","section-title"),m(A,"class","table-compact table-border m-b-base"),m(I,"class","section-title"),m(R,"class","table-compact table-border m-b-base"),m(q,"class","section-title"),m(H,"class","tabs-header compact combined left"),m(L,"class","tabs-content"),m(T,"class","tabs")},m(e,t){r(e,s,t),l(s,n),l(s,v),l(s,p),r(e,c,t),r(e,f,t),l(f,w),l(w,C),l(w,ee),l(ee,te),l(w,$e),r(e,le,t),X(F,e,t),r(e,se,t),r(e,B,t),r(e,ne,t),r(e,$,t),l($,N),l($,ye),l($,z),l(z,P),l(P,we),l(P,oe),l(oe,ae),l(P,Ce),l(P,ie),l($,Fe),g&&g.m($,null),r(e,re,t),r(e,S,t),r(e,de,t),r(e,A,t),r(e,ce,t),r(e,I,t),r(e,pe,t),r(e,R,t),l(R,ue),l(R,Re),l(R,M),l(M,O),l(O,fe),l(O,Oe),l(O,be),l(O,Te),l(O,h),l(h,De),X(E,h,null),l(h,Pe),l(h,Ee),l(h,xe),l(h,me),l(h,Be),l(h,_e),l(h,Se),l(h,Ae),l(h,Ie),l(h,he),l(h,Me),l(M,qe),X(x,M,null),r(e,ke,t),r(e,q,t),r(e,ge,t),r(e,T,t),l(T,H);for(let u=0;u<y.length;u+=1)y[u]&&y[u].m(H,null);l(T,Le),l(T,L);for(let u=0;u<k.length;u+=1)k[u]&&k[u].m(L,null);D=!0},p(e,[t]){var ze,Ge;(!D||t&1)&&i!==(i=e[0].name+"")&&ve(v,i),(!D||t&1)&&j!==(j=e[0].name+"")&&ve(te,j);const u={};t&9&&(u.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
const record = await pb.collection('${(ze=e[0])==null?void 0:ze.name}').getOne('RECORD_ID', {
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
});
|
||||
`),t&9&&(u.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
final record = await pb.collection('${(Ge=e[0])==null?void 0:Ge.name}').getOne('RECORD_ID',
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
);
|
||||
`),F.$set(u),(!D||t&1)&&G!==(G=e[0].name+"")&&ve(ae,G),e[1]?g||(g=Ye(),g.c(),g.m($,null)):g&&(g.d(1),g=null),t&20&&(J=K(e[4]),y=Je(y,t,Qe,1,e,J,He,H,at,Ze,null,Xe)),t&20&&(U=K(e[4]),it(),k=Je(k,t,Ve,1,e,U,Ue,L,rt,et,null,We),dt())},i(e){if(!D){Q(F.$$.fragment,e),Q(E.$$.fragment,e),Q(x.$$.fragment,e);for(let t=0;t<U.length;t+=1)Q(k[t]);D=!0}},o(e){V(F.$$.fragment,e),V(E.$$.fragment,e),V(x.$$.fragment,e);for(let t=0;t<k.length;t+=1)V(k[t]);D=!1},d(e){e&&(d(s),d(c),d(f),d(le),d(se),d(B),d(ne),d($),d(re),d(S),d(de),d(A),d(ce),d(I),d(pe),d(R),d(ke),d(q),d(ge),d(T)),Y(F,e),g&&g.d(),Y(E),Y(x);for(let t=0;t<y.length;t+=1)y[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function bt(a,s,n){let i,v,{collection:p}=s,c=200,f=[];const w=C=>n(2,c=C.code);return a.$$set=C=>{"collection"in C&&n(0,p=C.collection)},a.$$.update=()=>{a.$$.dirty&1&&n(1,i=(p==null?void 0:p.viewRule)===null),a.$$.dirty&3&&p!=null&&p.id&&(f.push({code:200,body:JSON.stringify(Ke.dummyCollectionRecord(p),null,2)}),i&&f.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only superusers can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),f.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},n(3,v=Ke.getApiExampleUrl(ct.baseURL)),[p,i,c,v,f,w]}class ht extends lt{constructor(s){super(),st(this,s,bt,ft,nt,{collection:0})}}export{ht as default};
|
||||
@@ -1,59 +0,0 @@
|
||||
import{S as lt,i as nt,s as st,N as tt,O as K,e as o,v as _,b as m,c as W,f as b,g as r,h as l,m as X,w as ve,P as Je,Q as ot,k as at,R as it,n as rt,t as Q,a as U,o as d,d as Y,C as Ke,A as dt,q as Z,r as ct}from"./index-Bp3jGQ0J.js";import{S as pt}from"./SdkTabs-DxNNd6Sw.js";import{F as ut}from"./FieldsQueryParam-zDO3HzQv.js";function We(a,n,s){const i=a.slice();return i[6]=n[s],i}function Xe(a,n,s){const i=a.slice();return i[6]=n[s],i}function Ye(a){let n;return{c(){n=o("p"),n.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",b(n,"class","txt-hint txt-sm txt-right")},m(s,i){r(s,n,i)},d(s){s&&d(n)}}}function Ze(a,n){let s,i,v;function p(){return n[5](n[6])}return{key:a,first:null,c(){s=o("button"),s.textContent=`${n[6].code} `,b(s,"class","tab-item"),Z(s,"active",n[2]===n[6].code),this.first=s},m(c,f){r(c,s,f),i||(v=ct(s,"click",p),i=!0)},p(c,f){n=c,f&20&&Z(s,"active",n[2]===n[6].code)},d(c){c&&d(s),i=!1,v()}}}function et(a,n){let s,i,v,p;return i=new tt({props:{content:n[6].body}}),{key:a,first:null,c(){s=o("div"),W(i.$$.fragment),v=m(),b(s,"class","tab-item"),Z(s,"active",n[2]===n[6].code),this.first=s},m(c,f){r(c,s,f),X(i,s,null),l(s,v),p=!0},p(c,f){n=c,(!p||f&20)&&Z(s,"active",n[2]===n[6].code)},i(c){p||(Q(i.$$.fragment,c),p=!0)},o(c){U(i.$$.fragment,c),p=!1},d(c){c&&d(s),Y(i)}}}function ft(a){var je,Ve;let n,s,i=a[0].name+"",v,p,c,f,w,C,ee,j=a[0].name+"",te,$e,le,F,ne,S,se,$,V,ye,z,T,we,oe,G=a[0].name+"",ae,Ce,ie,Fe,re,B,de,q,ce,x,pe,R,ue,Re,I,O,fe,Oe,me,Pe,h,De,A,Te,Ae,Ee,be,Se,_e,Be,qe,xe,he,Ie,Me,E,ke,M,ge,P,H,y=[],He=new Map,Le,L,k=[],Ne=new Map,D;F=new pt({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${a[3]}');
|
||||
|
||||
...
|
||||
|
||||
const record = await pb.collection('${(je=a[0])==null?void 0:je.name}').getOne('RECORD_ID', {
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
});
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${a[3]}');
|
||||
|
||||
...
|
||||
|
||||
final record = await pb.collection('${(Ve=a[0])==null?void 0:Ve.name}').getOne('RECORD_ID',
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
);
|
||||
`}});let g=a[1]&&Ye();A=new tt({props:{content:"?expand=relField1,relField2.subRelField"}}),E=new ut({});let J=K(a[4]);const Qe=e=>e[6].code;for(let e=0;e<J.length;e+=1){let t=Xe(a,J,e),u=Qe(t);He.set(u,y[e]=Ze(u,t))}let N=K(a[4]);const Ue=e=>e[6].code;for(let e=0;e<N.length;e+=1){let t=We(a,N,e),u=Ue(t);Ne.set(u,k[e]=et(u,t))}return{c(){n=o("h3"),s=_("View ("),v=_(i),p=_(")"),c=m(),f=o("div"),w=o("p"),C=_("Fetch a single "),ee=o("strong"),te=_(j),$e=_(" record."),le=m(),W(F.$$.fragment),ne=m(),S=o("h6"),S.textContent="API details",se=m(),$=o("div"),V=o("strong"),V.textContent="GET",ye=m(),z=o("div"),T=o("p"),we=_("/api/collections/"),oe=o("strong"),ae=_(G),Ce=_("/records/"),ie=o("strong"),ie.textContent=":id",Fe=m(),g&&g.c(),re=m(),B=o("div"),B.textContent="Path Parameters",de=m(),q=o("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 record to view.</td></tr></tbody>',ce=m(),x=o("div"),x.textContent="Query parameters",pe=m(),R=o("table"),ue=o("thead"),ue.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',Re=m(),I=o("tbody"),O=o("tr"),fe=o("td"),fe.textContent="expand",Oe=m(),me=o("td"),me.innerHTML='<span class="label">String</span>',Pe=m(),h=o("td"),De=_(`Auto expand record relations. Ex.:
|
||||
`),W(A.$$.fragment),Te=_(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Ae=o("br"),Ee=_(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),be=o("code"),be.textContent="expand",Se=_(" property (eg. "),_e=o("code"),_e.textContent='"expand": {"relField1": {...}, ...}',Be=_(`).
|
||||
`),qe=o("br"),xe=_(`
|
||||
Only the relations to which the request user has permissions to `),he=o("strong"),he.textContent="view",Ie=_(" will be expanded."),Me=m(),W(E.$$.fragment),ke=m(),M=o("div"),M.textContent="Responses",ge=m(),P=o("div"),H=o("div");for(let e=0;e<y.length;e+=1)y[e].c();Le=m(),L=o("div");for(let e=0;e<k.length;e+=1)k[e].c();b(n,"class","m-b-sm"),b(f,"class","content txt-lg m-b-sm"),b(S,"class","m-b-xs"),b(V,"class","label label-primary"),b(z,"class","content"),b($,"class","alert alert-info"),b(B,"class","section-title"),b(q,"class","table-compact table-border m-b-base"),b(x,"class","section-title"),b(R,"class","table-compact table-border m-b-base"),b(M,"class","section-title"),b(H,"class","tabs-header compact combined left"),b(L,"class","tabs-content"),b(P,"class","tabs")},m(e,t){r(e,n,t),l(n,s),l(n,v),l(n,p),r(e,c,t),r(e,f,t),l(f,w),l(w,C),l(w,ee),l(ee,te),l(w,$e),r(e,le,t),X(F,e,t),r(e,ne,t),r(e,S,t),r(e,se,t),r(e,$,t),l($,V),l($,ye),l($,z),l(z,T),l(T,we),l(T,oe),l(oe,ae),l(T,Ce),l(T,ie),l($,Fe),g&&g.m($,null),r(e,re,t),r(e,B,t),r(e,de,t),r(e,q,t),r(e,ce,t),r(e,x,t),r(e,pe,t),r(e,R,t),l(R,ue),l(R,Re),l(R,I),l(I,O),l(O,fe),l(O,Oe),l(O,me),l(O,Pe),l(O,h),l(h,De),X(A,h,null),l(h,Te),l(h,Ae),l(h,Ee),l(h,be),l(h,Se),l(h,_e),l(h,Be),l(h,qe),l(h,xe),l(h,he),l(h,Ie),l(I,Me),X(E,I,null),r(e,ke,t),r(e,M,t),r(e,ge,t),r(e,P,t),l(P,H);for(let u=0;u<y.length;u+=1)y[u]&&y[u].m(H,null);l(P,Le),l(P,L);for(let u=0;u<k.length;u+=1)k[u]&&k[u].m(L,null);D=!0},p(e,[t]){var ze,Ge;(!D||t&1)&&i!==(i=e[0].name+"")&&ve(v,i),(!D||t&1)&&j!==(j=e[0].name+"")&&ve(te,j);const u={};t&9&&(u.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
const record = await pb.collection('${(ze=e[0])==null?void 0:ze.name}').getOne('RECORD_ID', {
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
});
|
||||
`),t&9&&(u.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${e[3]}');
|
||||
|
||||
...
|
||||
|
||||
final record = await pb.collection('${(Ge=e[0])==null?void 0:Ge.name}').getOne('RECORD_ID',
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
);
|
||||
`),F.$set(u),(!D||t&1)&&G!==(G=e[0].name+"")&&ve(ae,G),e[1]?g||(g=Ye(),g.c(),g.m($,null)):g&&(g.d(1),g=null),t&20&&(J=K(e[4]),y=Je(y,t,Qe,1,e,J,He,H,ot,Ze,null,Xe)),t&20&&(N=K(e[4]),at(),k=Je(k,t,Ue,1,e,N,Ne,L,it,et,null,We),rt())},i(e){if(!D){Q(F.$$.fragment,e),Q(A.$$.fragment,e),Q(E.$$.fragment,e);for(let t=0;t<N.length;t+=1)Q(k[t]);D=!0}},o(e){U(F.$$.fragment,e),U(A.$$.fragment,e),U(E.$$.fragment,e);for(let t=0;t<k.length;t+=1)U(k[t]);D=!1},d(e){e&&(d(n),d(c),d(f),d(le),d(ne),d(S),d(se),d($),d(re),d(B),d(de),d(q),d(ce),d(x),d(pe),d(R),d(ke),d(M),d(ge),d(P)),Y(F,e),g&&g.d(),Y(A),Y(E);for(let t=0;t<y.length;t+=1)y[t].d();for(let t=0;t<k.length;t+=1)k[t].d()}}}function mt(a,n,s){let i,v,{collection:p}=n,c=200,f=[];const w=C=>s(2,c=C.code);return a.$$set=C=>{"collection"in C&&s(0,p=C.collection)},a.$$.update=()=>{a.$$.dirty&1&&s(1,i=(p==null?void 0:p.viewRule)===null),a.$$.dirty&3&&p!=null&&p.id&&(f.push({code:200,body:JSON.stringify(Ke.dummyCollectionRecord(p),null,2)}),i&&f.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),f.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},s(3,v=Ke.getApiExampleUrl(dt.baseUrl)),[p,i,c,v,f,w]}class kt extends lt{constructor(n){super(),nt(this,n,mt,ft,st,{collection:0})}}export{kt as default};
|
||||
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 36 36" fill="none" role="img" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><title>Mary Roebling</title><mask id="mask__beam" maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36"><rect width="36" height="36" fill="#FFFFFF"></rect></mask><g mask="url(#mask__beam)"><rect width="36" height="36" fill="#f0f0d8"></rect><rect x="0" y="0" width="36" height="36" transform="translate(5 -1) rotate(155 18 18) scale(1.2)" fill="#000000" rx="6"></rect><g transform="translate(3 -4) rotate(-5 18 18)"><path d="M15 21c2 1 4 1 6 0" stroke="#FFFFFF" fill="none" stroke-linecap="round"></path><rect x="14" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#FFFFFF"></rect><rect x="20" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#FFFFFF"></rect></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 806 B |
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 36 36" fill="none" role="img" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><title>Nellie Bly</title><mask id="mask__beam" maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36"><rect width="36" height="36" fill="#FFFFFF"></rect></mask><g mask="url(#mask__beam)"><rect width="36" height="36" fill="#a89f1d"></rect><rect x="0" y="0" width="36" height="36" transform="translate(8 8) rotate(118 18 18) scale(1.1)" fill="#fcaf14" rx="6"></rect><g transform="translate(4 4) rotate(-8 18 18)"><path d="M13,20 a1,0.75 0 0,0 10,0" fill="#000000"></path><rect x="11" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#000000"></rect><rect x="23" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#000000"></rect></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 771 B |
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 36 36" fill="none" role="img" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><title>Elizabeth Peratrovich</title><mask id="mask__beam" maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36"><rect width="36" height="36" fill="#FFFFFF"></rect></mask><g mask="url(#mask__beam)"><rect width="36" height="36" fill="#9d007a"></rect><rect x="0" y="0" width="36" height="36" transform="translate(9 -5) rotate(219 18 18) scale(1)" fill="#ff6e49" rx="6"></rect><g transform="translate(4.5 -4) rotate(9 18 18)"><path d="M15 19c2 1 4 1 6 0" stroke="#000000" fill="none" stroke-linecap="round"></path><rect x="10" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#000000"></rect><rect x="24" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#000000"></rect></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 813 B |
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 36 36" fill="none" role="img" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><title>Amelia Boynton</title><mask id="mask__beam" maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36"><rect width="36" height="36" fill="#FFFFFF"></rect></mask><g mask="url(#mask__beam)"><rect width="36" height="36" fill="#029daf"></rect><rect x="0" y="0" width="36" height="36" transform="translate(6 6) rotate(332 18 18) scale(1.2)" fill="#ffc219" rx="6"></rect><g transform="translate(4 3) rotate(-2 18 18)"><path d="M13,21 a1,0.75 0 0,0 10,0" fill="#000000"></path><rect x="12" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#000000"></rect><rect x="22" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#000000"></rect></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 775 B |
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 36 36" fill="none" role="img" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><title>Victoria Woodhull</title><mask id="mask__beam" maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36"><rect width="36" height="36" fill="#FFFFFF"></rect></mask><g mask="url(#mask__beam)"><rect width="36" height="36" fill="#00988d"></rect><rect x="0" y="0" width="36" height="36" transform="translate(-5 9) rotate(189 18 18) scale(1)" fill="#013750" rx="36"></rect><g transform="translate(-5 4.5) rotate(9 18 18)"><path d="M13,19 a1,0.75 0 0,0 10,0" fill="#FFFFFF"></path><rect x="10" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#FFFFFF"></rect><rect x="24" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#FFFFFF"></rect></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 780 B |
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 36 36" fill="none" role="img" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><title>Chien-Shiung</title><mask id="mask__beam" maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36"><rect width="36" height="36" fill="#FFFFFF"></rect></mask><g mask="url(#mask__beam)"><rect width="36" height="36" fill="#ce3762"></rect><rect x="0" y="0" width="36" height="36" transform="translate(4 4) rotate(310 18 18) scale(1.1)" fill="#2f1335" rx="6"></rect><g transform="translate(6 -5) rotate(0 18 18)"><path d="M15 20c2 1 4 1 6 0" stroke="#FFFFFF" fill="none" stroke-linecap="round"></path><rect x="14" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#FFFFFF"></rect><rect x="20" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#FFFFFF"></rect></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 803 B |
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 36 36" fill="none" role="img" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><title>Hetty Green</title><mask id="mask__beam" maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36"><rect width="36" height="36" fill="#FFFFFF"></rect></mask><g mask="url(#mask__beam)"><rect width="36" height="36" fill="#f9ce07"></rect><rect x="0" y="0" width="36" height="36" transform="translate(-1 5) rotate(25 18 18) scale(1.1)" fill="#1f0441" rx="36"></rect><g transform="translate(-1 5) rotate(5 18 18)"><path d="M13,20 a1,0.75 0 0,0 10,0" fill="#FFFFFF"></path><rect x="14" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#FFFFFF"></rect><rect x="20" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#FFFFFF"></rect></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 773 B |
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 36 36" fill="none" role="img" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><title>Elizabeth Peratrovich</title><mask id="mask__beam" maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36"><rect width="36" height="36" fill="#FFFFFF"></rect></mask><g mask="url(#mask__beam)"><rect width="36" height="36" fill="#004853"></rect><rect x="0" y="0" width="36" height="36" transform="translate(9 -5) rotate(219 18 18) scale(1)" fill="#00b9bd" rx="6"></rect><g transform="translate(4.5 -4) rotate(9 18 18)"><path d="M15 19c2 1 4 1 6 0" stroke="#000000" fill="none" stroke-linecap="round"></path><rect x="10" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#000000"></rect><rect x="24" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#000000"></rect></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 813 B |
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 36 36" fill="none" role="img" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><title>Jane Johnston</title><mask id="mask__beam" maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36"><rect width="36" height="36" fill="#FFFFFF"></rect></mask><g mask="url(#mask__beam)"><rect width="36" height="36" fill="#b50d57"></rect><rect x="0" y="0" width="36" height="36" transform="translate(-5 9) rotate(349 18 18) scale(1.1)" fill="#dec790" rx="36"></rect><g transform="translate(-5 4.5) rotate(9 18 18)"><path d="M13,20 a1,0.75 0 0,0 10,0" fill="#000000"></path><rect x="10" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#000000"></rect><rect x="24" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#000000"></rect></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 778 B |
@@ -1 +0,0 @@
|
||||
<svg viewBox="0 0 36 36" fill="none" role="img" xmlns="http://www.w3.org/2000/svg" width="128" height="128"><title>Virginia Apgar</title><mask id="mask__beam" maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36"><rect width="36" height="36" fill="#FFFFFF"></rect></mask><g mask="url(#mask__beam)"><rect width="36" height="36" fill="#3b2d38"></rect><rect x="0" y="0" width="36" height="36" transform="translate(-2 6) rotate(306 18 18) scale(1)" fill="#cfbe27" rx="36"></rect><g transform="translate(-2 6) rotate(6 18 18)"><path d="M13,19 a1,0.75 0 0,0 10,0" fill="#000000"></path><rect x="13" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#000000"></rect><rect x="21" y="14" width="1.5" height="2" rx="1" stroke="none" fill="#000000"></rect></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 775 B |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/_/images/favicon/mstile-150x150.png"/>
|
||||
<TileColor>#ffffff</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
|
Before Width: | Height: | Size: 698 B |
|
Before Width: | Height: | Size: 900 B |
|
Before Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 731 B |
|
After Width: | Height: | Size: 744 B |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "",
|
||||
"short_name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/_/images/favicon/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/_/images/favicon/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
||||
@@ -11,14 +11,8 @@
|
||||
<title>PocketBase</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="./images/favicon/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="./images/favicon/favicon-16x16.png">
|
||||
<link rel="manifest" href="./images/favicon/site.webmanifest">
|
||||
<link rel="mask-icon" href="./images/favicon/safari-pinned-tab.svg" color="#000000">
|
||||
<link rel="shortcut icon" href="./images/favicon/favicon.ico">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-config" content="/images/favicon/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<link rel="shortcut icon" type="image/png" href="./images/favicon/favicon.png">
|
||||
|
||||
<!-- prefetch common tinymce resources to speed up the initial loading times -->
|
||||
<link rel="prefetch" href="./libs/tinymce/skins/content/default/content.min.css" as="style" />
|
||||
@@ -47,8 +41,8 @@
|
||||
window.Prism = window.Prism || {};
|
||||
window.Prism.manual = true;
|
||||
</script>
|
||||
<script type="module" crossorigin src="./assets/index-Bp3jGQ0J.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-DpAp7TiX.css">
|
||||
<script type="module" crossorigin src="./assets/index-B-F-pko3.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-Cwj4Cw5-.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||