@zenstackhq/server 1.0.0-alpha.99 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/rest/index.d.ts +19 -0
- package/api/rest/index.js +1271 -0
- package/api/rest/index.js.map +1 -0
- package/api/rpc/index.d.ts +2 -0
- package/api/rpc/index.js +166 -0
- package/api/rpc/index.js.map +1 -0
- package/api/utils.d.ts +18 -0
- package/api/utils.js +82 -0
- package/api/utils.js.map +1 -0
- package/express/index.d.ts +1 -0
- package/express/index.js +15 -0
- package/express/index.js.map +1 -1
- package/express/middleware.d.ts +2 -12
- package/express/middleware.js +50 -15
- package/express/middleware.js.map +1 -1
- package/fastify/index.d.ts +1 -0
- package/fastify/index.js +15 -0
- package/fastify/index.js.map +1 -1
- package/fastify/plugin.d.ts +2 -12
- package/fastify/plugin.js +35 -20
- package/fastify/plugin.js.map +1 -1
- package/next/app-route-handler.d.ts +15 -0
- package/next/app-route-handler.js +85 -0
- package/next/app-route-handler.js.map +1 -0
- package/next/index.d.ts +38 -0
- package/next/index.js +18 -0
- package/next/index.js.map +1 -0
- package/next/pages-route-handler.d.ts +9 -0
- package/next/pages-route-handler.js +73 -0
- package/next/pages-route-handler.js.map +1 -0
- package/package.json +17 -7
- package/sveltekit/handler.d.ts +19 -0
- package/sveltekit/handler.js +100 -0
- package/sveltekit/handler.js.map +1 -0
- package/sveltekit/index.d.ts +2 -0
- package/sveltekit/index.js +24 -0
- package/sveltekit/index.js.map +1 -0
- package/types.d.ts +97 -0
- package/types.js +3 -0
- package/types.js.map +1 -0
- package/utils.d.ts +17 -0
- package/utils.js +93 -0
- package/utils.js.map +1 -0
- package/openapi/index.d.ts +0 -46
- package/openapi/index.js +0 -193
- package/openapi/index.js.map +0 -1
- package/openapi/utils.d.ts +0 -4
- package/openapi/utils.js +0 -25
- package/openapi/utils.js.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RequestContext, Response } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Request handler options
|
|
4
|
+
*/
|
|
5
|
+
export type Options = {
|
|
6
|
+
/**
|
|
7
|
+
* The base endpoint of the RESTful API, must be a valid URL
|
|
8
|
+
*/
|
|
9
|
+
endpoint: string;
|
|
10
|
+
/**
|
|
11
|
+
* The default page size for limiting the number of results returned
|
|
12
|
+
* from collection queries, including resource collection, related data
|
|
13
|
+
* of collection types, and relashionship of collection types.
|
|
14
|
+
*
|
|
15
|
+
* Defaults to 100. Set to Infinity to disable pagination.
|
|
16
|
+
*/
|
|
17
|
+
pageSize?: number;
|
|
18
|
+
};
|
|
19
|
+
export default function makeHandler(options: Options): ({ prisma, method, path, query, requestBody, logger, modelMeta, }: RequestContext) => Promise<Response>;
|