import{S as lt,i as nt,s as st,N as tt,O as K,e as o,w as _,b as m,c as W,f as b,g as r,h as l,m as X,x 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,p as dt,r as Z,u as ct}from"./index-09db7a88.js";import{S as pt}from"./SdkTabs-f85ceb47.js";import{F as ut}from"./FieldsQueryParam-8145215c.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 Authorization:TOKEN 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,x,se,$,V,ye,z,T,we,oe,G=a[0].name+"",ae,Ce,ie,Fe,re,B,de,A,ce,I,pe,R,ue,Re,M,O,fe,Oe,me,Pe,h,De,E,Te,Ee,Se,be,xe,_e,Be,Ae,Ie,he,Me,qe,S,ke,q,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();E=new tt({props:{content:"?expand=relField1,relField2.subRelField"}}),S=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=m(),I=o("div"),I.textContent="Query parameters",pe=m(),R=o("table"),ue=o("thead"),ue.innerHTML='Param Type Description',Re=m(),M=o("tbody"),O=o("tr"),fe=o("td"),fe.textContent="expand",Oe=m(),me=o("td"),me.innerHTML='String',Pe=m(),h=o("td"),De=_(`Auto expand record relations. Ex.: `),W(E.$$.fragment),Te=_(` Supports up to 6-levels depth nested relations expansion. `),Ee=o("br"),Se=_(` The expanded relations will be appended to the record under the `),be=o("code"),be.textContent="expand",xe=_(" property (eg. "),_e=o("code"),_e.textContent='"expand": {"relField1": {...}, ...}',Be=_(`). `),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=m(),W(S.$$.fragment),ke=m(),q=o("div"),q.textContent="Responses",ge=m(),P=o("div"),H=o("div");for(let e=0;es(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};