const e=e=>{let t={},n=1e3,r=1,i=e.query;if(typeof i==`object`){let{pageSize:e,page:a,...o}=i;typeof e==`string`?n=parseInt(e,10):typeof e==`number`&&(n=e),typeof a==`string`?r=parseInt(a,10):typeof a==`number`&&(r=a),o&&Object.keys(o).length>0&&(t=o)}let a=(r-1)*n;return{filters:t,skip:a,page:r,pageSize:n,getNumberOfPages:e=>Math.ceil(e/n)}};export{e as getFiltersAndPaginationFromBody};
//# sourceMappingURL=getFiltersAndPaginationFromBody.mjs.map