import{S as lt,i as st,s as nt,V as at,W as tt,X as K,h as a,z as _,j as b,c as W,k as m,n as r,o as l,m as X,H as ve,Y as Qe,Z as ot,E as it,_ as rt,G as dt,t as U,a as V,v as d,d as Y,J as Ke,p as ct,l as Z,q as pt}from"./index-BgumB6es.js";import{F as ut}from"./FieldsQueryParam-DGI5PYS8.js";function We(o,s,n){const i=o.slice();return i[6]=s[n],i}function Xe(o,s,n){const i=o.slice();return i[6]=s[n],i}function Ye(o){let s;return{c(){s=a("p"),s.innerHTML="Requires superuser Authorization:TOKEN header",m(s,"class","txt-hint txt-sm txt-right")},m(n,i){r(n,s,i)},d(n){n&&d(s)}}}function Ze(o,s){let n,i,v;function p(){return s[5](s[6])}return{key:o,first:null,c(){n=a("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(o,s){let n,i,v,p;return i=new tt({props:{content:s[6].body}}),{key:o,first:null,c(){n=a("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||(U(i.$$.fragment,c),p=!0)},o(c){V(i.$$.fragment,c),p=!1},d(c){c&&d(n),Y(i)}}}function ft(o){var ze,Ge;let s,n,i=o[0].name+"",v,p,c,f,w,C,ee,z=o[0].name+"",te,$e,le,F,se,S,ne,$,G,ye,J,T,we,ae,N=o[0].name+"",oe,Ce,ie,Fe,re,q,de,x,ce,A,pe,R,ue,Re,H,O,fe,Oe,be,De,h,Pe,E,Te,Ee,Be,me,Se,_e,qe,xe,Ae,he,He,Ie,B,ke,I,ge,D,M,y=[],Me=new Map,Le,L,k=[],je=new Map,P;F=new at({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); ... const record = await pb.collection('${(ze=o[0])==null?void 0:ze.name}').getOne('RECORD_ID', { expand: 'relField1,relField2.subRelField', }); `,dart:` import 'package:pocketbase/pocketbase.dart'; final pb = PocketBase('${o[3]}'); ... final record = await pb.collection('${(Ge=o[0])==null?void 0:Ge.name}').getOne('RECORD_ID', expand: 'relField1,relField2.subRelField', ); `}});let g=o[1]&&Ye();E=new tt({props:{content:"?expand=relField1,relField2.subRelField"}}),B=new ut({});let Q=K(o[4]);const Ue=e=>e[6].code;for(let e=0;ee[6].code;for(let e=0;eParam Type Description id String ID of the record to view.',ce=b(),A=a("div"),A.textContent="Query parameters",pe=b(),R=a("table"),ue=a("thead"),ue.innerHTML='Param Type Description',Re=b(),H=a("tbody"),O=a("tr"),fe=a("td"),fe.textContent="expand",Oe=b(),be=a("td"),be.innerHTML='String',De=b(),h=a("td"),Pe=_(`Auto expand record relations. Ex.: `),W(E.$$.fragment),Te=_(` Supports up to 6-levels depth nested relations expansion. `),Ee=a("br"),Be=_(` The expanded relations will be appended to the record under the `),me=a("code"),me.textContent="expand",Se=_(" property (eg. "),_e=a("code"),_e.textContent='"expand": {"relField1": {...}, ...}',qe=_(`). `),xe=a("br"),Ae=_(` Only the relations to which the request user has permissions to `),he=a("strong"),he.textContent="view",He=_(" will be expanded."),Ie=b(),W(B.$$.fragment),ke=b(),I=a("div"),I.textContent="Responses",ge=b(),D=a("div"),M=a("div");for(let e=0;en(2,c=C.code);return o.$$set=C=>{"collection"in C&&n(0,p=C.collection)},o.$$.update=()=>{o.$$.dirty&1&&n(1,i=(p==null?void 0:p.viewRule)===null),o.$$.dirty&3&&p!=null&&p.id&&(f.push({code:200,body:JSON.stringify(Ke.dummyCollectionRecord(p),null,2)}),i&&f.push({code:403,body:` { "status": 403, "message": "Only superusers can access this action.", "data": {} } `}),f.push({code:404,body:` { "status": 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};