@web-ts-toolkit/access-router 0.4.0 → 0.6.0
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/README.md +93 -7
- package/advanced.d.mts +38 -40
- package/advanced.d.ts +38 -40
- package/advanced.js +5 -5
- package/advanced.mjs +5 -4
- package/index.d.mts +81 -4
- package/index.d.ts +81 -4
- package/index.js +1160 -545
- package/index.mjs +990 -385
- package/llms.txt +53 -0
- package/package.json +13 -9
- package/{parsers-CsyGHYQR.d.mts → parsers-Cj4r_G4g.d.mts} +35 -17
- package/{parsers-CsyGHYQR.d.ts → parsers-Cj4r_G4g.d.ts} +35 -17
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@web-ts-toolkit/access-router`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
ACL-aware Express routers and in-memory data services for Mongoose-backed APIs.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -8,19 +8,105 @@ Access-policy Express routers and in-memory data services for Mongoose-backed AP
|
|
|
8
8
|
pnpm add @web-ts-toolkit/access-router express mongoose
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Peer dependencies:
|
|
12
|
+
|
|
13
|
+
- `express >= 5`
|
|
14
|
+
- `mongoose >= 8`
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
- Browse the docs site from `website` to read the full guide alongside the rest of the workspace packages.
|
|
16
|
+
## Highlights
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
- generated model CRUD routers
|
|
19
|
+
- generated in-memory data routers
|
|
20
|
+
- access control, field permissions, and request-time hooks
|
|
21
|
+
- root batch router for grouped operations
|
|
22
|
+
- request validation adapters
|
|
23
|
+
- generated OpenAPI JSON and Swagger UI routes
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
17
26
|
|
|
18
27
|
```ts
|
|
19
28
|
import acl from '@web-ts-toolkit/access-router';
|
|
20
29
|
|
|
21
|
-
|
|
30
|
+
acl.setGlobalOptions({
|
|
31
|
+
globalPermissions(req) {
|
|
32
|
+
return req.headers.user === 'admin' ? ['isAdmin'] : [];
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const fruitRouter = acl.createDataRouter('fruit', {
|
|
22
37
|
basePath: '/fruit',
|
|
23
38
|
idField: 'id',
|
|
39
|
+
operationAccess: { list: true, read: true },
|
|
24
40
|
data: [{ id: 'apple', name: 'Apple', public: true }],
|
|
41
|
+
permissionSchema: {
|
|
42
|
+
id: true,
|
|
43
|
+
name: 'isAdmin',
|
|
44
|
+
public: true,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const userRouter = acl.createRouter('User', {
|
|
49
|
+
basePath: '/users',
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const docsRouter = acl.createOpenApiRouter({
|
|
53
|
+
title: 'Example API',
|
|
54
|
+
version: '1.0.0',
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Main Exports
|
|
59
|
+
|
|
60
|
+
Root entrypoint (`@web-ts-toolkit/access-router`):
|
|
61
|
+
|
|
62
|
+
- default export `acl`
|
|
63
|
+
- `createAccessRuntime()`
|
|
64
|
+
- `createOpenApiRouter(...)`
|
|
65
|
+
- `combineRoutes(...)`
|
|
66
|
+
- `guard(...)`
|
|
67
|
+
- `RootRouter`, `ModelRouter`, `DataRouter`
|
|
68
|
+
- validation adapters such as `fromZod(...)` and `defineRequestSchema(...)`
|
|
69
|
+
|
|
70
|
+
Subpath entrypoints:
|
|
71
|
+
|
|
72
|
+
- `@web-ts-toolkit/access-router/advanced` — runtime context and advanced internals
|
|
73
|
+
- `@web-ts-toolkit/access-router/processors` — field processors
|
|
74
|
+
|
|
75
|
+
### Import styles
|
|
76
|
+
|
|
77
|
+
The package ships both a default export and named exports:
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
// default export (preferred for the runtime API)
|
|
81
|
+
import acl from '@web-ts-toolkit/access-router';
|
|
82
|
+
|
|
83
|
+
// named exports (useful when you only need specific helpers)
|
|
84
|
+
import { createOpenApiRouter, fromZod } from '@web-ts-toolkit/access-router';
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Subpath import example
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import { setGlobalOptions } from '@web-ts-toolkit/access-router';
|
|
91
|
+
import { copyAndDepopulate } from '@web-ts-toolkit/access-router/processors';
|
|
92
|
+
|
|
93
|
+
setGlobalOptions({
|
|
94
|
+
globalPermissions(req) {
|
|
95
|
+
return [];
|
|
96
|
+
},
|
|
25
97
|
});
|
|
98
|
+
|
|
99
|
+
const depopulated = copyAndDepopulate({ items: [{ _id: 'a1', name: 'Apple' }] }, [{ src: 'items', dest: 'items' }]);
|
|
26
100
|
```
|
|
101
|
+
|
|
102
|
+
## Documentation
|
|
103
|
+
|
|
104
|
+
Full package documentation lives in `website/docs/packages/access-router/`.
|
|
105
|
+
|
|
106
|
+
- live docs: https://web-ts-toolkit.pages.dev/docs/packages/access-router
|
|
107
|
+
- overview: `website/docs/packages/access-router/index.mdx`
|
|
108
|
+
- routing: `website/docs/packages/access-router/routing.mdx`
|
|
109
|
+
- configuration: `website/docs/packages/access-router/configuration.mdx`
|
|
110
|
+
- hooks: `website/docs/packages/access-router/hooks.mdx`
|
|
111
|
+
- validation: `website/docs/packages/access-router/validation.mdx`
|
|
112
|
+
- OpenAPI: `website/docs/packages/access-router/openapi.mdx`
|
package/advanced.d.mts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
export { A as AccessRouterBaseRequest, a as AccessRouterFieldKey, b as AccessRouterLogger, c as AccessRouterRequest, d as AccessRouterRequestExtensions, e as AdvancedCreateBody, f as AdvancedListBody, g as AdvancedReadBody, h as AdvancedReadFilterBody, i as AdvancedUpdateBody, j as AdvancedUpsertBody, k as AfterPersistAccess, l as AjvErrorObjectLike, m as AjvValidatorLike, n as ArkTypeErrorsLike, o as ArkTypeLike, p as ArkTypeProblemLike, B as BaseFilterAccess, C as
|
|
1
|
+
export { A as AccessRouterBaseRequest, a as AccessRouterFieldKey, b as AccessRouterLogger, c as AccessRouterRequest, d as AccessRouterRequestExtensions, e as AdvancedCreateBody, f as AdvancedListBody, g as AdvancedReadBody, h as AdvancedReadFilterBody, i as AdvancedUpdateBody, j as AdvancedUpsertBody, k as AfterPersistAccess, l as AjvErrorObjectLike, m as AjvValidatorLike, n as ArkTypeErrorsLike, o as ArkTypeLike, p as ArkTypeProblemLike, B as BaseFilterAccess, C as Change, q as Codes, r as CountBody, s as CreateArgs, t as CreateOptions, u as CreateQueryInput, v as CustomHeaders, D as DataBaseFilterHook, w as DataFilter, x as DataFindArgs, y as DataFindOneArgs, z as DataFindOneOptions, E as DataFindOptions, F as DataHook, G as DataHookContext, H as DataIdentifierHook, I as DataListHook, J as DataOverrideFilterHook, K as DataRequest, L as DataRequestSchemas, M as DataRouterOptions, N as DecorateAccess, O as DecorateAllAccess, P as DeepFieldPath, Q as DefaultModelRouterOptions, R as Defaults, S as DistinctArgs, T as DistinctBody, U as DocPermissionsAccess, V as ErrorResult, W as ExistsOptions, X as ExtendedDataRouterOptions, Y as ExtendedDefaultModelRouterOptions, Z as ExtendedModelRouterOptions, _ as Filter, $ as FilterOperator, a0 as FindAccess, a1 as FindArgs, a2 as FindByIdArgs, a3 as FindByIdOptions, a4 as FindOneArgs, a5 as FindOneOptions, a6 as FindOptions, a7 as GlobalOptions, a8 as GlobalPermissionValue, a9 as GuardHook, aa as IdentifierHook, ab as Include, ac as IoTsContextEntryLike, ad as IoTsDecodeErrorLike, ae as IoTsDecoderLike, af as JoiSchemaLike, ag as JoiValidationErrorDetailLike, ah as KeyValueProjection, ai as ListQueryInput, aj as ListResult, ak as MaybePromise, al as ModelBaseFilterHook, am as ModelChangeHook, an as ModelDeleteHook, ao as ModelDocPermissionsHook, ap as ModelDocument, aq as ModelDocumentHook, ar as ModelHook, as as ModelHookContext, at as ModelIdentifierHook, au as ModelListHook, av as ModelOverrideFilterHook, aw as ModelRequest, ax as ModelRouterOptions, ay as ModelValidateHook, az as PathValue, aA as PermissionSchema, aB as Populate, aC as PopulateAccess, aD as PrepareAccess, aE as Projection, aF as PublicCreateArgs, aG as PublicCreateOptions, aH as PublicListArgs, aI as PublicListOptions, aJ as PublicOutput, aK as PublicReadArgs, aL as PublicReadOptions, aM as PublicUpdateArgs, aN as PublicUpdateOptions, aO as PublicUpsertArgs, aP as PublicUpsertOptions, aQ as ReadQueryInput, aR as Request, aS as RequestSchemaAdapter, aT as RequestSchemaFailure, aU as RequestSchemaIssue, aV as RequestSchemaLike, aW as RequestSchemaOptions, aX as RequestSchemaResult, aY as RequestSchemaSuccess, aZ as RequestSchemaValidator, a_ as RequestSchemas, a$ as RootDataListQueryEntry, b0 as RootDataOperation, b1 as RootDataReadByFilterQueryEntry, b2 as RootDataReadByIdQueryEntry, b3 as RootModelCountQueryEntry, b4 as RootModelCreateQueryEntry, b5 as RootModelDeleteQueryEntry, b6 as RootModelDistinctQueryEntry, b7 as RootModelListQueryEntry, b8 as RootModelNewQueryEntry, b9 as RootModelOperation, ba as RootModelReadByFilterQueryEntry, bb as RootModelReadByIdQueryEntry, bc as RootModelSubBulkUpdateQueryEntry, bd as RootModelSubCreateQueryEntry, be as RootModelSubDeleteQueryEntry, bf as RootModelSubListQueryEntry, bg as RootModelSubReadQueryEntry, bh as RootModelSubUpdateQueryEntry, bi as RootModelUpdateQueryEntry, bj as RootModelUpsertQueryEntry, bk as RootOperationResult, bl as RootQueryEntry, bm as RootRouterOptions, bn as RootSubOperation, bo as RootTarget, bp as RouteGuardAccess, bq as SelectAccess, br as SelectedPopulatedPublicOutput, bs as SelectedPublicOutput, bt as ServiceResult, bu as SingleResult, bv as Sort, bw as SortOrder, bx as StandardSchemaFailure, by as StandardSchemaInferOutput, bz as StandardSchemaIssue, bA as StandardSchemaPathSegment, bB as StandardSchemaResult, bC as StandardSchemaSuccess, bD as StandardSchemaV1, bE as StatusCodes, bF as SubListBody, bG as SubPopulate, bH as SubQueryEntry, bI as SubReadBody, bJ as SuperstructFailureLike, bK as SuperstructValidateLike, bL as Task, bM as TransformAccess, bN as TypedFilter, bO as UpdateByIdArgs, bP as UpdateByIdOptions, bQ as UpdateOneArgs, bR as UpdateOneOptions, bS as UpdateQueryInput, bT as UpsertArgs, bU as UpsertOptions, bV as UpsertQueryInput, bW as ValibotIssueLike, bX as ValibotPathItemLike, bY as ValibotSafeParseLike, bZ as ValibotSafeParseResult, b_ as ValidateAccess, b$ as ValidateRule, c0 as Validation, c1 as ValidationError, c2 as VineValidationErrorLike, c3 as VineValidationMessageLike, c4 as VineValidatorLike, c5 as YupSchemaLike, c6 as YupValidationErrorLike, c7 as defineRequestSchema, c8 as fromAjv, c9 as fromArkType, ca as fromIoTs, cb as fromJoi, cc as fromStandardSchema, cd as fromSuperstruct, ce as fromValibot, cf as fromVine, cg as fromYup, ch as fromZod, ci as parseBody, cj as parseBodyWithSchema, ck as parseNestedBodyWithSchema, cl as parsePathParam, cm as parseQuery } from './parsers-Cj4r_G4g.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import 'mongoose';
|
|
4
|
-
import 'deep-diff';
|
|
5
4
|
import 'express';
|
|
6
5
|
|
|
7
6
|
declare const MIDDLEWARE: unique symbol;
|
|
8
7
|
declare const DATA_MIDDLEWARE: unique symbol;
|
|
9
|
-
declare const CORE: unique symbol;
|
|
10
8
|
declare const PERMISSIONS: unique symbol;
|
|
11
9
|
declare const PERMISSION_KEYS: unique symbol;
|
|
12
10
|
|
|
@@ -77,23 +75,23 @@ declare const listBodySchema: z.ZodObject<{
|
|
|
77
75
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
78
76
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
79
77
|
access: z.ZodOptional<z.ZodEnum<{
|
|
80
|
-
read: "read";
|
|
81
78
|
list: "list";
|
|
79
|
+
read: "read";
|
|
82
80
|
}>>;
|
|
83
81
|
}, z.core.$loose>]>>, z.ZodObject<{
|
|
84
82
|
path: z.ZodString;
|
|
85
83
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
86
84
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
87
85
|
access: z.ZodOptional<z.ZodEnum<{
|
|
88
|
-
read: "read";
|
|
89
86
|
list: "list";
|
|
87
|
+
read: "read";
|
|
90
88
|
}>>;
|
|
91
89
|
}, z.core.$loose>]>>;
|
|
92
90
|
include: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
93
91
|
model: z.ZodString;
|
|
94
92
|
op: z.ZodEnum<{
|
|
95
|
-
read: "read";
|
|
96
93
|
list: "list";
|
|
94
|
+
read: "read";
|
|
97
95
|
count: "count";
|
|
98
96
|
}>;
|
|
99
97
|
path: z.ZodString;
|
|
@@ -105,8 +103,8 @@ declare const listBodySchema: z.ZodObject<{
|
|
|
105
103
|
}, z.core.$loose>, z.ZodArray<z.ZodObject<{
|
|
106
104
|
model: z.ZodString;
|
|
107
105
|
op: z.ZodEnum<{
|
|
108
|
-
read: "read";
|
|
109
106
|
list: "list";
|
|
107
|
+
read: "read";
|
|
110
108
|
count: "count";
|
|
111
109
|
}>;
|
|
112
110
|
path: z.ZodString;
|
|
@@ -152,23 +150,23 @@ declare const readFilterBodySchema: z.ZodObject<{
|
|
|
152
150
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
153
151
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
154
152
|
access: z.ZodOptional<z.ZodEnum<{
|
|
155
|
-
read: "read";
|
|
156
153
|
list: "list";
|
|
154
|
+
read: "read";
|
|
157
155
|
}>>;
|
|
158
156
|
}, z.core.$loose>]>>, z.ZodObject<{
|
|
159
157
|
path: z.ZodString;
|
|
160
158
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
161
159
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
162
160
|
access: z.ZodOptional<z.ZodEnum<{
|
|
163
|
-
read: "read";
|
|
164
161
|
list: "list";
|
|
162
|
+
read: "read";
|
|
165
163
|
}>>;
|
|
166
164
|
}, z.core.$loose>]>>;
|
|
167
165
|
include: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
168
166
|
model: z.ZodString;
|
|
169
167
|
op: z.ZodEnum<{
|
|
170
|
-
read: "read";
|
|
171
168
|
list: "list";
|
|
169
|
+
read: "read";
|
|
172
170
|
count: "count";
|
|
173
171
|
}>;
|
|
174
172
|
path: z.ZodString;
|
|
@@ -180,8 +178,8 @@ declare const readFilterBodySchema: z.ZodObject<{
|
|
|
180
178
|
}, z.core.$loose>, z.ZodArray<z.ZodObject<{
|
|
181
179
|
model: z.ZodString;
|
|
182
180
|
op: z.ZodEnum<{
|
|
183
|
-
read: "read";
|
|
184
181
|
list: "list";
|
|
182
|
+
read: "read";
|
|
185
183
|
count: "count";
|
|
186
184
|
}>;
|
|
187
185
|
path: z.ZodString;
|
|
@@ -214,23 +212,23 @@ declare const readByIdBodySchema: z.ZodObject<{
|
|
|
214
212
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
215
213
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
216
214
|
access: z.ZodOptional<z.ZodEnum<{
|
|
217
|
-
read: "read";
|
|
218
215
|
list: "list";
|
|
216
|
+
read: "read";
|
|
219
217
|
}>>;
|
|
220
218
|
}, z.core.$loose>]>>, z.ZodObject<{
|
|
221
219
|
path: z.ZodString;
|
|
222
220
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
223
221
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
224
222
|
access: z.ZodOptional<z.ZodEnum<{
|
|
225
|
-
read: "read";
|
|
226
223
|
list: "list";
|
|
224
|
+
read: "read";
|
|
227
225
|
}>>;
|
|
228
226
|
}, z.core.$loose>]>>;
|
|
229
227
|
include: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
230
228
|
model: z.ZodString;
|
|
231
229
|
op: z.ZodEnum<{
|
|
232
|
-
read: "read";
|
|
233
230
|
list: "list";
|
|
231
|
+
read: "read";
|
|
234
232
|
count: "count";
|
|
235
233
|
}>;
|
|
236
234
|
path: z.ZodString;
|
|
@@ -242,8 +240,8 @@ declare const readByIdBodySchema: z.ZodObject<{
|
|
|
242
240
|
}, z.core.$loose>, z.ZodArray<z.ZodObject<{
|
|
243
241
|
model: z.ZodString;
|
|
244
242
|
op: z.ZodEnum<{
|
|
245
|
-
read: "read";
|
|
246
243
|
list: "list";
|
|
244
|
+
read: "read";
|
|
247
245
|
count: "count";
|
|
248
246
|
}>;
|
|
249
247
|
path: z.ZodString;
|
|
@@ -277,16 +275,16 @@ declare const advancedCreateBodySchema: z.ZodObject<{
|
|
|
277
275
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
278
276
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
279
277
|
access: z.ZodOptional<z.ZodEnum<{
|
|
280
|
-
read: "read";
|
|
281
278
|
list: "list";
|
|
279
|
+
read: "read";
|
|
282
280
|
}>>;
|
|
283
281
|
}, z.core.$loose>]>>, z.ZodObject<{
|
|
284
282
|
path: z.ZodString;
|
|
285
283
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
286
284
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
287
285
|
access: z.ZodOptional<z.ZodEnum<{
|
|
288
|
-
read: "read";
|
|
289
286
|
list: "list";
|
|
287
|
+
read: "read";
|
|
290
288
|
}>>;
|
|
291
289
|
}, z.core.$loose>]>>;
|
|
292
290
|
tasks: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -313,16 +311,16 @@ declare const advancedUpdateBodySchema: z.ZodObject<{
|
|
|
313
311
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
314
312
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
315
313
|
access: z.ZodOptional<z.ZodEnum<{
|
|
316
|
-
read: "read";
|
|
317
314
|
list: "list";
|
|
315
|
+
read: "read";
|
|
318
316
|
}>>;
|
|
319
317
|
}, z.core.$loose>]>>, z.ZodObject<{
|
|
320
318
|
path: z.ZodString;
|
|
321
319
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
322
320
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
323
321
|
access: z.ZodOptional<z.ZodEnum<{
|
|
324
|
-
read: "read";
|
|
325
322
|
list: "list";
|
|
323
|
+
read: "read";
|
|
326
324
|
}>>;
|
|
327
325
|
}, z.core.$loose>]>>;
|
|
328
326
|
tasks: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -349,16 +347,16 @@ declare const advancedUpsertBodySchema: z.ZodObject<{
|
|
|
349
347
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
350
348
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
351
349
|
access: z.ZodOptional<z.ZodEnum<{
|
|
352
|
-
read: "read";
|
|
353
350
|
list: "list";
|
|
351
|
+
read: "read";
|
|
354
352
|
}>>;
|
|
355
353
|
}, z.core.$loose>]>>, z.ZodObject<{
|
|
356
354
|
path: z.ZodString;
|
|
357
355
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
358
356
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
359
357
|
access: z.ZodOptional<z.ZodEnum<{
|
|
360
|
-
read: "read";
|
|
361
358
|
list: "list";
|
|
359
|
+
read: "read";
|
|
362
360
|
}>>;
|
|
363
361
|
}, z.core.$loose>]>>;
|
|
364
362
|
tasks: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -492,23 +490,23 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
|
|
|
492
490
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
493
491
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
494
492
|
access: z.ZodOptional<z.ZodEnum<{
|
|
495
|
-
read: "read";
|
|
496
493
|
list: "list";
|
|
494
|
+
read: "read";
|
|
497
495
|
}>>;
|
|
498
496
|
}, z.core.$loose>]>>, z.ZodObject<{
|
|
499
497
|
path: z.ZodString;
|
|
500
498
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
501
499
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
502
500
|
access: z.ZodOptional<z.ZodEnum<{
|
|
503
|
-
read: "read";
|
|
504
501
|
list: "list";
|
|
502
|
+
read: "read";
|
|
505
503
|
}>>;
|
|
506
504
|
}, z.core.$loose>]>>;
|
|
507
505
|
include: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
508
506
|
model: z.ZodString;
|
|
509
507
|
op: z.ZodEnum<{
|
|
510
|
-
read: "read";
|
|
511
508
|
list: "list";
|
|
509
|
+
read: "read";
|
|
512
510
|
count: "count";
|
|
513
511
|
}>;
|
|
514
512
|
path: z.ZodString;
|
|
@@ -520,8 +518,8 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
|
|
|
520
518
|
}, z.core.$loose>, z.ZodArray<z.ZodObject<{
|
|
521
519
|
model: z.ZodString;
|
|
522
520
|
op: z.ZodEnum<{
|
|
523
|
-
read: "read";
|
|
524
521
|
list: "list";
|
|
522
|
+
read: "read";
|
|
525
523
|
count: "count";
|
|
526
524
|
}>;
|
|
527
525
|
path: z.ZodString;
|
|
@@ -566,23 +564,23 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
|
|
|
566
564
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
567
565
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
568
566
|
access: z.ZodOptional<z.ZodEnum<{
|
|
569
|
-
read: "read";
|
|
570
567
|
list: "list";
|
|
568
|
+
read: "read";
|
|
571
569
|
}>>;
|
|
572
570
|
}, z.core.$loose>]>>, z.ZodObject<{
|
|
573
571
|
path: z.ZodString;
|
|
574
572
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
575
573
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
576
574
|
access: z.ZodOptional<z.ZodEnum<{
|
|
577
|
-
read: "read";
|
|
578
575
|
list: "list";
|
|
576
|
+
read: "read";
|
|
579
577
|
}>>;
|
|
580
578
|
}, z.core.$loose>]>>;
|
|
581
579
|
include: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
582
580
|
model: z.ZodString;
|
|
583
581
|
op: z.ZodEnum<{
|
|
584
|
-
read: "read";
|
|
585
582
|
list: "list";
|
|
583
|
+
read: "read";
|
|
586
584
|
count: "count";
|
|
587
585
|
}>;
|
|
588
586
|
path: z.ZodString;
|
|
@@ -594,8 +592,8 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
|
|
|
594
592
|
}, z.core.$loose>, z.ZodArray<z.ZodObject<{
|
|
595
593
|
model: z.ZodString;
|
|
596
594
|
op: z.ZodEnum<{
|
|
597
|
-
read: "read";
|
|
598
595
|
list: "list";
|
|
596
|
+
read: "read";
|
|
599
597
|
count: "count";
|
|
600
598
|
}>;
|
|
601
599
|
path: z.ZodString;
|
|
@@ -635,23 +633,23 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
|
|
|
635
633
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
636
634
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
637
635
|
access: z.ZodOptional<z.ZodEnum<{
|
|
638
|
-
read: "read";
|
|
639
636
|
list: "list";
|
|
637
|
+
read: "read";
|
|
640
638
|
}>>;
|
|
641
639
|
}, z.core.$loose>]>>, z.ZodObject<{
|
|
642
640
|
path: z.ZodString;
|
|
643
641
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
644
642
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
645
643
|
access: z.ZodOptional<z.ZodEnum<{
|
|
646
|
-
read: "read";
|
|
647
644
|
list: "list";
|
|
645
|
+
read: "read";
|
|
648
646
|
}>>;
|
|
649
647
|
}, z.core.$loose>]>>;
|
|
650
648
|
include: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
651
649
|
model: z.ZodString;
|
|
652
650
|
op: z.ZodEnum<{
|
|
653
|
-
read: "read";
|
|
654
651
|
list: "list";
|
|
652
|
+
read: "read";
|
|
655
653
|
count: "count";
|
|
656
654
|
}>;
|
|
657
655
|
path: z.ZodString;
|
|
@@ -663,8 +661,8 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
|
|
|
663
661
|
}, z.core.$loose>, z.ZodArray<z.ZodObject<{
|
|
664
662
|
model: z.ZodString;
|
|
665
663
|
op: z.ZodEnum<{
|
|
666
|
-
read: "read";
|
|
667
664
|
list: "list";
|
|
665
|
+
read: "read";
|
|
668
666
|
count: "count";
|
|
669
667
|
}>;
|
|
670
668
|
path: z.ZodString;
|
|
@@ -705,16 +703,16 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
|
|
|
705
703
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
706
704
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
707
705
|
access: z.ZodOptional<z.ZodEnum<{
|
|
708
|
-
read: "read";
|
|
709
706
|
list: "list";
|
|
707
|
+
read: "read";
|
|
710
708
|
}>>;
|
|
711
709
|
}, z.core.$loose>]>>, z.ZodObject<{
|
|
712
710
|
path: z.ZodString;
|
|
713
711
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
714
712
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
715
713
|
access: z.ZodOptional<z.ZodEnum<{
|
|
716
|
-
read: "read";
|
|
717
714
|
list: "list";
|
|
715
|
+
read: "read";
|
|
718
716
|
}>>;
|
|
719
717
|
}, z.core.$loose>]>>;
|
|
720
718
|
tasks: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -746,16 +744,16 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
|
|
|
746
744
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
747
745
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
748
746
|
access: z.ZodOptional<z.ZodEnum<{
|
|
749
|
-
read: "read";
|
|
750
747
|
list: "list";
|
|
748
|
+
read: "read";
|
|
751
749
|
}>>;
|
|
752
750
|
}, z.core.$loose>]>>, z.ZodObject<{
|
|
753
751
|
path: z.ZodString;
|
|
754
752
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
755
753
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
756
754
|
access: z.ZodOptional<z.ZodEnum<{
|
|
757
|
-
read: "read";
|
|
758
755
|
list: "list";
|
|
756
|
+
read: "read";
|
|
759
757
|
}>>;
|
|
760
758
|
}, z.core.$loose>]>>;
|
|
761
759
|
tasks: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -787,16 +785,16 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
|
|
|
787
785
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
788
786
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
789
787
|
access: z.ZodOptional<z.ZodEnum<{
|
|
790
|
-
read: "read";
|
|
791
788
|
list: "list";
|
|
789
|
+
read: "read";
|
|
792
790
|
}>>;
|
|
793
791
|
}, z.core.$loose>]>>, z.ZodObject<{
|
|
794
792
|
path: z.ZodString;
|
|
795
793
|
select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
|
|
796
794
|
match: z.ZodOptional<z.ZodUnknown>;
|
|
797
795
|
access: z.ZodOptional<z.ZodEnum<{
|
|
798
|
-
read: "read";
|
|
799
796
|
list: "list";
|
|
797
|
+
read: "read";
|
|
800
798
|
}>>;
|
|
801
799
|
}, z.core.$loose>]>>;
|
|
802
800
|
tasks: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -938,4 +936,4 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
|
|
|
938
936
|
order: z.ZodOptional<z.ZodNumber>;
|
|
939
937
|
}, z.core.$loose>]>]>>;
|
|
940
938
|
|
|
941
|
-
export {
|
|
939
|
+
export { DATA_MIDDLEWARE, MIDDLEWARE, PERMISSIONS, PERMISSION_KEYS, advancedCreateBodySchema, advancedUpdateBodySchema, advancedUpsertBodySchema, countBodySchema, createBodySchema, createQuerySchema, dataListBodySchema, dataReadByIdBodySchema, dataReadFilterBodySchema, distinctBodySchema, listBodySchema, listQuerySchema, readByIdBodySchema, readFilterBodySchema, readQuerySchema, requestSchemas, rootQuerySchema, subListBodySchema, subMutationBodySchema, subReadBodySchema, updateBodySchema, updateQuerySchema, upsertBodySchema, upsertQuerySchema };
|