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-yjdtWzFj.js";import{F as ut}from"./FieldsQueryParam-DJxtDR3X.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 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(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;ee[6].code;for(let e=0;eParam Type Description id String ID of the record to view.',ce=b(),I=o("div"),I.textContent="Query parameters",pe=b(),R=o("table"),ue=o("thead"),ue.innerHTML='Param Type Description',Re=b(),M=o("tbody"),O=o("tr"),fe=o("td"),fe.textContent="expand",Oe=b(),be=o("td"),be.innerHTML='String',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;en(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};