@web-ts-toolkit/access-router 0.44.0 → 0.45.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/advanced.mjs CHANGED
@@ -63,6 +63,12 @@ import {
63
63
  import { flattenDeep, isNil, isPlainObject, isString, reduce } from "@web-ts-toolkit/utils";
64
64
  var DEFAULT_LIST_HARD_LIMIT = 1e3;
65
65
 
66
+ // src/helpers/sort-policy.ts
67
+ var fieldPathPattern = /^[A-Za-z_][A-Za-z0-9_$]*(\.[A-Za-z_][A-Za-z0-9_$]*)*$/;
68
+ function isValidFieldPath(field) {
69
+ return typeof field === "string" && fieldPathPattern.test(field);
70
+ }
71
+
66
72
  // src/helpers/index.ts
67
73
  import { forEach, isArray, isEmpty, isObject, isPlainObject as isPlainObject3, isString as isString2 } from "@web-ts-toolkit/utils";
68
74
 
@@ -645,7 +651,9 @@ var defaultRequestComplexity = {
645
651
  maxIncludeCount: 10,
646
652
  maxSubQueryCount: 10,
647
653
  maxBulkConcurrency: 10,
648
- maxHookConcurrency: 10
654
+ maxHookConcurrency: 10,
655
+ maxCorrelatedQueries: 100,
656
+ maxCorrelatedDepth: 5
649
657
  };
650
658
  var normalizePositiveInteger = (value, fallback) => {
651
659
  return Number.isSafeInteger(value) && Number(value) > 0 ? Number(value) : fallback;
@@ -665,6 +673,14 @@ var resolveRequestComplexity = (options) => ({
665
673
  maxHookConcurrency: normalizePositiveInteger(
666
674
  options?.maxHookConcurrency,
667
675
  defaultRequestComplexity.maxHookConcurrency
676
+ ),
677
+ maxCorrelatedQueries: normalizePositiveInteger(
678
+ options?.maxCorrelatedQueries,
679
+ defaultRequestComplexity.maxCorrelatedQueries
680
+ ),
681
+ maxCorrelatedDepth: normalizePositiveInteger(
682
+ options?.maxCorrelatedDepth,
683
+ defaultRequestComplexity.maxCorrelatedDepth
668
684
  )
669
685
  });
670
686
  function validateRequestComplexity(value, options, scope = "request") {
@@ -1173,6 +1189,175 @@ var getGlobalOption = (key, defaultValue) => {
1173
1189
 
1174
1190
  // src/validation/common.ts
1175
1191
  import { z as z2 } from "zod";
1192
+ import { isPlainObject as isPlainObject11 } from "@web-ts-toolkit/utils";
1193
+
1194
+ // src/correlated-includes.ts
1195
+ import { cloneDeep, isArray as isArray5, isPlainObject as isPlainObject10 } from "@web-ts-toolkit/utils";
1196
+ var PARENT_MARKER_KEY = "$parent";
1197
+ var ESCAPE_WRAPPER_KEY = "$escape";
1198
+ var SUBQUERY_PAYLOAD_KEYS = /* @__PURE__ */ new Set(["$$sq", "$$date"]);
1199
+ var MARKER_FORBIDDEN_OPERATOR_KEYS = /* @__PURE__ */ new Set(["$text", "$where", "$comment"]);
1200
+ var LOGICAL_CLAUSE_KEYS = /* @__PURE__ */ new Set(["$and", "$or", "$nor"]);
1201
+ var DANGEROUS_PATH_SEGMENTS = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
1202
+ var FIELD_SEGMENT_PATTERN = /^[A-Za-z_][A-Za-z0-9_$]*$/;
1203
+ var ARRAY_INDEX_SEGMENT_PATTERN = /^(0|[1-9]\d*)$/;
1204
+ var ownKeys = (value) => Object.keys(value);
1205
+ function isParentRefMarker(value) {
1206
+ return isPlainObject10(value) && ownKeys(value).length === 1 && ownKeys(value)[0] === PARENT_MARKER_KEY;
1207
+ }
1208
+ function isEscapedParentRef(value) {
1209
+ return isPlainObject10(value) && ownKeys(value).length === 1 && ownKeys(value)[0] === ESCAPE_WRAPPER_KEY;
1210
+ }
1211
+ function hasMarkerKey(value) {
1212
+ return ownKeys(value).includes(PARENT_MARKER_KEY) || ownKeys(value).includes(ESCAPE_WRAPPER_KEY);
1213
+ }
1214
+ function isValidParentRefPath(path) {
1215
+ if (typeof path !== "string" || path.length === 0) return false;
1216
+ const segments = path.split(".");
1217
+ return segments.every(
1218
+ (segment) => (FIELD_SEGMENT_PATTERN.test(segment) || ARRAY_INDEX_SEGMENT_PATTERN.test(segment)) && !DANGEROUS_PATH_SEGMENTS.has(segment)
1219
+ );
1220
+ }
1221
+ function isValidCorrelatedOutputPath(path) {
1222
+ return typeof path === "string" && path.length > 0 && isValidFieldPath(path) && path !== "_id" && !path.startsWith("$");
1223
+ }
1224
+ function containsParentMarkerShape(value) {
1225
+ const seen = /* @__PURE__ */ new Set();
1226
+ const visit = (current) => {
1227
+ if (isParentRefMarker(current) || isEscapedParentRef(current)) return true;
1228
+ if (isArray5(current)) {
1229
+ if (seen.has(current)) return false;
1230
+ seen.add(current);
1231
+ return current.some(visit);
1232
+ }
1233
+ if (isPlainObject10(current)) {
1234
+ if (seen.has(current)) return false;
1235
+ seen.add(current);
1236
+ if (hasMarkerKey(current)) return true;
1237
+ return Object.values(current).some(visit);
1238
+ }
1239
+ return false;
1240
+ };
1241
+ return visit(value);
1242
+ }
1243
+ function scanTemplateValueNode(value, path, issues) {
1244
+ if (isEscapedParentRef(value)) {
1245
+ const inner = value.$escape;
1246
+ if (!isParentRefMarker(inner) || typeof inner.$parent !== "string" || (inner.$parent?.length ?? 0) === 0) {
1247
+ issues.push({
1248
+ message: 'Invalid $escape payload: expected { "$escape": { "$parent": "<field>" } }',
1249
+ path
1250
+ });
1251
+ }
1252
+ return;
1253
+ }
1254
+ if (isParentRefMarker(value)) {
1255
+ if (!isValidParentRefPath(value.$parent)) {
1256
+ issues.push({
1257
+ message: `Invalid $parent reference path at ${path.length === 0 ? "#" : path.join(".")}`,
1258
+ path
1259
+ });
1260
+ }
1261
+ return;
1262
+ }
1263
+ if (isPlainObject10(value)) {
1264
+ if (hasMarkerKey(value)) {
1265
+ issues.push({
1266
+ message: 'Malformed $parent reference: objects carrying $parent must be exactly { "$parent": "<field>" }',
1267
+ path
1268
+ });
1269
+ return;
1270
+ }
1271
+ scanTemplateObjectEntries(value, path, issues);
1272
+ return;
1273
+ }
1274
+ if (isArray5(value)) {
1275
+ value.forEach((item, index) => scanTemplateValueNode(item, [...path, index], issues));
1276
+ }
1277
+ }
1278
+ function scanTemplateObjectEntries(obj, basePath, issues) {
1279
+ for (const [key, child] of Object.entries(obj)) {
1280
+ const childPath = [...basePath, key];
1281
+ if (key === PARENT_MARKER_KEY) {
1282
+ issues.push({ message: "$parent is never a field name in correlated templates", path: childPath });
1283
+ continue;
1284
+ }
1285
+ if (SUBQUERY_PAYLOAD_KEYS.has(key)) {
1286
+ if (containsParentMarkerShape(child)) {
1287
+ issues.push({
1288
+ message: `Unsupported $parent reference inside ${key}: markers are not resolved in subquery payloads`,
1289
+ path: childPath
1290
+ });
1291
+ }
1292
+ continue;
1293
+ }
1294
+ if (MARKER_FORBIDDEN_OPERATOR_KEYS.has(key)) {
1295
+ if (containsParentMarkerShape(child)) {
1296
+ issues.push({
1297
+ message: `Unsupported $parent reference inside ${key}: markers are not resolved in ${key} values`,
1298
+ path: childPath
1299
+ });
1300
+ }
1301
+ continue;
1302
+ }
1303
+ if (key === "$elemMatch") {
1304
+ if (isParentRefMarker(child) || isEscapedParentRef(child)) {
1305
+ issues.push({
1306
+ message: "Unsupported $parent reference as a direct $elemMatch value",
1307
+ path: childPath
1308
+ });
1309
+ continue;
1310
+ }
1311
+ scanTemplateValueNode(child, childPath, issues);
1312
+ continue;
1313
+ }
1314
+ if (LOGICAL_CLAUSE_KEYS.has(key)) {
1315
+ if (!isArray5(child)) {
1316
+ scanTemplateValueNode(child, childPath, issues);
1317
+ continue;
1318
+ }
1319
+ child.forEach((clause, index) => {
1320
+ const clausePath = [...childPath, index];
1321
+ if (isParentRefMarker(clause) || isEscapedParentRef(clause)) {
1322
+ issues.push({
1323
+ message: `Unsupported $parent reference as a direct ${key} clause: clauses must be filter objects`,
1324
+ path: clausePath
1325
+ });
1326
+ return;
1327
+ }
1328
+ if (isPlainObject10(clause)) {
1329
+ scanTemplateObjectEntries(clause, clausePath, issues);
1330
+ }
1331
+ });
1332
+ continue;
1333
+ }
1334
+ scanTemplateValueNode(child, childPath, issues);
1335
+ }
1336
+ }
1337
+ function validateCorrelatedFilterTemplate(filter) {
1338
+ const issues = [];
1339
+ if (!isPlainObject10(filter)) {
1340
+ issues.push({ message: "Correlated include filter must be an object", path: [] });
1341
+ return issues;
1342
+ }
1343
+ if (isParentRefMarker(filter) || isEscapedParentRef(filter)) {
1344
+ issues.push({ message: "Correlated include filter must not itself be a $parent reference", path: [] });
1345
+ return issues;
1346
+ }
1347
+ scanTemplateObjectEntries(filter, [], issues);
1348
+ return issues;
1349
+ }
1350
+ function findArgsMarkerIssue(value, where) {
1351
+ if (value !== void 0 && containsParentMarkerShape(value)) {
1352
+ return {
1353
+ message: `Unsupported $parent reference in ${where}: references are only supported in filter and id positions`,
1354
+ path: []
1355
+ };
1356
+ }
1357
+ return null;
1358
+ }
1359
+
1360
+ // src/validation/common.ts
1176
1361
  var stringOrStringArray = z2.union([z2.string(), z2.array(z2.string())]);
1177
1362
  var safeIntegerString = (min, message) => z2.string().regex(/^\d+$/, message).refine((value) => Number.isSafeInteger(Number(value)), "Expected a safe integer").refine((value) => Number(value) >= min, message);
1178
1363
  var queryBooleanString = z2.enum(["true", "false"]);
@@ -1233,7 +1418,8 @@ var subPopulateSchema = z2.union([
1233
1418
  select: projectionSchema.optional()
1234
1419
  }).passthrough()
1235
1420
  ]);
1236
- var includeItemSchema = z2.object({
1421
+ var legacyIncludeItemSchema = z2.object({
1422
+ mode: z2.enum(["legacy"]).optional(),
1237
1423
  model: z2.string().min(1),
1238
1424
  op: z2.enum(["list", "read", "count"]),
1239
1425
  path: z2.string().min(1),
@@ -1242,8 +1428,139 @@ var includeItemSchema = z2.object({
1242
1428
  foreignField: z2.string().min(1),
1243
1429
  args: z2.unknown().optional().describe("Forwarded to list/read includes. Count includes ignore pagination fields so counts remain exact."),
1244
1430
  options: z2.unknown().optional()
1245
- }).passthrough();
1246
- var includeSchema = z2.union([includeItemSchema, z2.array(includeItemSchema)]);
1431
+ }).passthrough().superRefine((entry, ctx) => {
1432
+ if (entry.filter !== void 0 && containsParentMarkerShape(entry.filter)) {
1433
+ ctx.addIssue({
1434
+ code: z2.ZodIssueCode.custom,
1435
+ message: 'Legacy includes must not contain $parent markers; use a correlated include (mode: "correlated")',
1436
+ path: ["filter"]
1437
+ });
1438
+ }
1439
+ });
1440
+ var parentRefSchema = z2.object({ $parent: z2.string().min(1) }).strict().superRefine((value, ctx) => {
1441
+ if (!isValidParentRefPath(value.$parent)) {
1442
+ ctx.addIssue({
1443
+ code: z2.ZodIssueCode.custom,
1444
+ message: `Invalid $parent reference path: ${value.$parent}`,
1445
+ path: ["$parent"]
1446
+ });
1447
+ }
1448
+ });
1449
+ var correlatedIdSchema = z2.union([z2.string().min(1), parentRefSchema]);
1450
+ var correlatedFilterSchema = z2.record(z2.string(), z2.unknown()).superRefine((filter, ctx) => {
1451
+ for (const issue of validateCorrelatedFilterTemplate(filter)) {
1452
+ ctx.addIssue({
1453
+ code: z2.ZodIssueCode.custom,
1454
+ message: issue.message,
1455
+ path: issue.path.map(String)
1456
+ });
1457
+ }
1458
+ });
1459
+ var correlatedEmptyOptionsSchema = z2.unknown().refine(
1460
+ (value) => value === void 0 || isPlainObject11(value) && Object.keys(value).length === 0,
1461
+ "Correlated include options must be absent or empty"
1462
+ ).optional();
1463
+ var correlatedPathSchema = z2.string().min(1).superRefine((path, ctx) => {
1464
+ if (!isValidCorrelatedOutputPath(path)) {
1465
+ ctx.addIssue({
1466
+ code: z2.ZodIssueCode.custom,
1467
+ message: `Invalid correlated include output path: ${path}`,
1468
+ path: []
1469
+ });
1470
+ }
1471
+ });
1472
+ var checkArgsMarkers = (select, sort, ctx) => {
1473
+ const selectIssue = findArgsMarkerIssue(select, "args.select");
1474
+ if (selectIssue) {
1475
+ ctx.addIssue({ code: z2.ZodIssueCode.custom, message: selectIssue.message, path: ["select"] });
1476
+ }
1477
+ const sortIssue = findArgsMarkerIssue(sort, "args.sort");
1478
+ if (sortIssue) {
1479
+ ctx.addIssue({ code: z2.ZodIssueCode.custom, message: sortIssue.message, path: ["sort"] });
1480
+ }
1481
+ };
1482
+ var correlatedReadArgsSchema = z2.object({
1483
+ select: projectionSchema.optional(),
1484
+ sort: sortSchema.optional(),
1485
+ include: z2.lazy(() => correlatedNestedIncludeSchema).optional()
1486
+ }).strict().superRefine((args, ctx) => checkArgsMarkers(args.select, args.sort, ctx));
1487
+ var correlatedListArgsSchema = z2.object({
1488
+ select: projectionSchema.optional(),
1489
+ sort: sortSchema.optional(),
1490
+ skip: z2.union([nonNegativeIntegerSchema, nonNegativeIntegerString]).optional(),
1491
+ limit: z2.union([positiveIntegerSchema, positiveIntegerString]).optional(),
1492
+ page: z2.union([nonNegativeIntegerSchema, nonNegativeIntegerString]).optional(),
1493
+ pageSize: z2.union([positiveIntegerSchema, positiveIntegerString]).optional(),
1494
+ include: z2.lazy(() => correlatedNestedIncludeSchema).optional()
1495
+ }).strict().superRefine((args, ctx) => checkArgsMarkers(args.select, args.sort, ctx));
1496
+ var correlatedCountArgsSchema = z2.unknown().refine(
1497
+ (value) => value === void 0 || isPlainObject11(value) && Object.keys(value).length === 0,
1498
+ "Count includes accept no args"
1499
+ ).optional();
1500
+ var correlatedReadByIdSchema = z2.object({
1501
+ mode: z2.literal("correlated"),
1502
+ model: z2.string().min(1),
1503
+ op: z2.literal("read"),
1504
+ path: correlatedPathSchema,
1505
+ id: correlatedIdSchema,
1506
+ args: correlatedReadArgsSchema.optional(),
1507
+ options: correlatedEmptyOptionsSchema
1508
+ }).strict();
1509
+ var correlatedReadByFilterSchema = z2.object({
1510
+ mode: z2.literal("correlated"),
1511
+ model: z2.string().min(1),
1512
+ op: z2.literal("read"),
1513
+ path: correlatedPathSchema,
1514
+ filter: correlatedFilterSchema,
1515
+ args: correlatedReadArgsSchema.optional(),
1516
+ options: correlatedEmptyOptionsSchema
1517
+ }).strict();
1518
+ var correlatedListSchema = z2.object({
1519
+ mode: z2.literal("correlated"),
1520
+ model: z2.string().min(1),
1521
+ op: z2.literal("list"),
1522
+ path: correlatedPathSchema,
1523
+ filter: correlatedFilterSchema,
1524
+ args: correlatedListArgsSchema.optional(),
1525
+ options: correlatedEmptyOptionsSchema
1526
+ }).strict();
1527
+ var correlatedCountSchema = z2.object({
1528
+ mode: z2.literal("correlated"),
1529
+ model: z2.string().min(1),
1530
+ op: z2.literal("count"),
1531
+ path: correlatedPathSchema,
1532
+ filter: correlatedFilterSchema,
1533
+ args: correlatedCountArgsSchema,
1534
+ options: correlatedEmptyOptionsSchema
1535
+ }).strict();
1536
+ var includeItemSchema = z2.union([
1537
+ legacyIncludeItemSchema,
1538
+ correlatedReadByIdSchema,
1539
+ correlatedReadByFilterSchema,
1540
+ correlatedListSchema,
1541
+ correlatedCountSchema
1542
+ ]);
1543
+ var correlatedNestedIncludeSchema = z2.union([includeItemSchema, z2.array(includeItemSchema)]);
1544
+ var rejectDuplicateCorrelatedPaths = (items, ctx) => {
1545
+ const seen = /* @__PURE__ */ new Set();
1546
+ items.forEach((item, index) => {
1547
+ if (isPlainObject11(item) && item.mode === "correlated" && typeof item.path === "string") {
1548
+ if (seen.has(item.path)) {
1549
+ ctx.addIssue({
1550
+ code: z2.ZodIssueCode.custom,
1551
+ message: `Duplicate correlated include output path: ${item.path}`,
1552
+ path: [index, "path"]
1553
+ });
1554
+ } else {
1555
+ seen.add(item.path);
1556
+ }
1557
+ }
1558
+ });
1559
+ };
1560
+ var includeSchema = z2.union([
1561
+ includeItemSchema,
1562
+ z2.array(includeItemSchema).superRefine(rejectDuplicateCorrelatedPaths)
1563
+ ]);
1247
1564
  var fieldsSchema = z2.array(z2.string().min(1));
1248
1565
  var taskSchema = z2.object({
1249
1566
  type: z2.string().min(1),
@@ -1780,7 +2097,7 @@ var listBodySchema = z3.object({
1780
2097
  }).passthrough().superRefine((body, ctx) => rejectKeys(body, ctx, ["query"]));
1781
2098
  var countBodySchema = z3.object({
1782
2099
  filter: objectOrArraySchema.optional()
1783
- }).passthrough().superRefine((body, ctx) => rejectKeys(body, ctx, ["query", "access", "options"]));
2100
+ }).passthrough().superRefine((body, ctx) => rejectKeys(body, ctx, ["query", "access", "options", "include"]));
1784
2101
  var readFilterBodySchema = z3.object({
1785
2102
  filter: objectOrArraySchema.optional(),
1786
2103
  select: projectionSchema.optional(),
package/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import mongoose, { Schema } from 'mongoose';
2
2
  import { Response, NextFunction, RequestHandler, Router } from 'express';
3
- import { a9 as GlobalOptions, S as DefaultModelRouterOptions, aA as ModelRouterOptions, O as DataRouterOptions, _ as ExtendedDefaultModelRouterOptions, $ as ExtendedModelRouterOptions, Z as ExtendedDataRouterOptions, A as AccessRouterBaseRequest, ab as GuardHook, az as ModelRequest, M as DataRequest, cH as DataService, a0 as Filter, aJ as Projection, bE as Sort, aG as Populate, cI as Service, cJ as PublicService, ck as Validation, bv as RootRouterOptions } from './parsers-B5dbVmjm.mjs';
4
- export { cK as AccessRouterPermissionMap, cL as AccessRouterPermissions, c as AccessRouterRequest, d as AccessRouterRequestExtensions, l as AjvErrorObjectLike, n as AjvValidatorLike, o as ArkTypeErrorsLike, p as ArkTypeLike, aa as GlobalPermissionValue, ae as IoTsContextEntryLike, af as IoTsDecodeErrorLike, ag as IoTsDecoderLike, ah as JoiSchemaLike, ai as JoiValidationErrorDetailLike, an as MaybePromise, ao as ModelBaseFilterHook, aq as ModelDeleteHook, ar as ModelDocPermissionsHook, at as ModelDocumentHook, au as ModelHook, aw as ModelIdentifierHook, ax as ModelListHook, ay as ModelOverrideFilterHook, aB as ModelValidateHook, cM as Permissions, a$ as RequestSchemaAdapter, b0 as RequestSchemaFailure, b1 as RequestSchemaIssue, b2 as RequestSchemaLike, b3 as RequestSchemaOptions, b4 as RequestSchemaResult, b5 as RequestSchemaSuccess, b6 as RequestSchemaValidator, by as RouteGuardAccess, bG as StandardSchemaFailure, bH as StandardSchemaInferOutput, bI as StandardSchemaIssue, bJ as StandardSchemaPathSegment, bK as StandardSchemaResult, bL as StandardSchemaSuccess, bM as StandardSchemaV1, c1 as SuperstructFailureLike, c2 as SuperstructValidateLike, ce as ValibotIssueLike, cf as ValibotPathItemLike, cg as ValibotSafeParseLike, ch as ValibotSafeParseResult, cm as VineValidationErrorLike, cn as VineValidationMessageLike, co as VineValidatorLike, cp as YupSchemaLike, cq as YupValidationErrorLike, cr as defineRequestSchema, cs as fromAjv, ct as fromArkType, cu as fromIoTs, cv as fromJoi, cw as fromStandardSchema, cx as fromSuperstruct, cy as fromValibot, cz as fromVine, cA as fromYup, cB as fromZod } from './parsers-B5dbVmjm.mjs';
3
+ import { ag as GlobalOptions, Z as DefaultModelRouterOptions, aI as ModelRouterOptions, V as DataRouterOptions, a5 as ExtendedDefaultModelRouterOptions, a6 as ExtendedModelRouterOptions, a4 as ExtendedDataRouterOptions, A as AccessRouterBaseRequest, ai as GuardHook, aH as ModelRequest, T as DataRequest, cR as DataService, a7 as Filter, aS as Projection, bN as Sort, aP as Populate, cS as Service, cT as PublicService, cu as Validation, bE as RootRouterOptions } from './parsers-DppKW-Fd.mjs';
4
+ export { cU as AccessRouterPermissionMap, cV as AccessRouterPermissions, c as AccessRouterRequest, d as AccessRouterRequestExtensions, l as AjvErrorObjectLike, n as AjvValidatorLike, o as ArkTypeErrorsLike, p as ArkTypeLike, ah as GlobalPermissionValue, al as IoTsContextEntryLike, am as IoTsDecodeErrorLike, an as IoTsDecoderLike, ao as JoiSchemaLike, ap as JoiValidationErrorDetailLike, av as MaybePromise, aw as ModelBaseFilterHook, ay as ModelDeleteHook, az as ModelDocPermissionsHook, aB as ModelDocumentHook, aC as ModelHook, aE as ModelIdentifierHook, aF as ModelListHook, aG as ModelOverrideFilterHook, aJ as ModelValidateHook, cW as Permissions, b8 as RequestSchemaAdapter, b9 as RequestSchemaFailure, ba as RequestSchemaIssue, bb as RequestSchemaLike, bc as RequestSchemaOptions, bd as RequestSchemaResult, be as RequestSchemaSuccess, bf as RequestSchemaValidator, bH as RouteGuardAccess, bP as StandardSchemaFailure, bQ as StandardSchemaInferOutput, bR as StandardSchemaIssue, bS as StandardSchemaPathSegment, bT as StandardSchemaResult, bU as StandardSchemaSuccess, bV as StandardSchemaV1, ca as SuperstructFailureLike, cb as SuperstructValidateLike, co as ValibotIssueLike, cp as ValibotPathItemLike, cq as ValibotSafeParseLike, cr as ValibotSafeParseResult, cw as VineValidationErrorLike, cx as VineValidationMessageLike, cy as VineValidatorLike, cz as YupSchemaLike, cA as YupValidationErrorLike, cB as defineRequestSchema, cC as fromAjv, cD as fromArkType, cE as fromIoTs, cF as fromJoi, cG as fromStandardSchema, cH as fromSuperstruct, cI as fromValibot, cJ as fromVine, cK as fromYup, cL as fromZod } from './parsers-DppKW-Fd.mjs';
5
5
  import JsonRouter from '@web-ts-toolkit/express-json-router';
6
6
  import 'zod';
7
7
 
package/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import mongoose, { Schema } from 'mongoose';
2
2
  import { Response, NextFunction, RequestHandler, Router } from 'express';
3
- import { a9 as GlobalOptions, S as DefaultModelRouterOptions, aA as ModelRouterOptions, O as DataRouterOptions, _ as ExtendedDefaultModelRouterOptions, $ as ExtendedModelRouterOptions, Z as ExtendedDataRouterOptions, A as AccessRouterBaseRequest, ab as GuardHook, az as ModelRequest, M as DataRequest, cH as DataService, a0 as Filter, aJ as Projection, bE as Sort, aG as Populate, cI as Service, cJ as PublicService, ck as Validation, bv as RootRouterOptions } from './parsers-B5dbVmjm.js';
4
- export { cK as AccessRouterPermissionMap, cL as AccessRouterPermissions, c as AccessRouterRequest, d as AccessRouterRequestExtensions, l as AjvErrorObjectLike, n as AjvValidatorLike, o as ArkTypeErrorsLike, p as ArkTypeLike, aa as GlobalPermissionValue, ae as IoTsContextEntryLike, af as IoTsDecodeErrorLike, ag as IoTsDecoderLike, ah as JoiSchemaLike, ai as JoiValidationErrorDetailLike, an as MaybePromise, ao as ModelBaseFilterHook, aq as ModelDeleteHook, ar as ModelDocPermissionsHook, at as ModelDocumentHook, au as ModelHook, aw as ModelIdentifierHook, ax as ModelListHook, ay as ModelOverrideFilterHook, aB as ModelValidateHook, cM as Permissions, a$ as RequestSchemaAdapter, b0 as RequestSchemaFailure, b1 as RequestSchemaIssue, b2 as RequestSchemaLike, b3 as RequestSchemaOptions, b4 as RequestSchemaResult, b5 as RequestSchemaSuccess, b6 as RequestSchemaValidator, by as RouteGuardAccess, bG as StandardSchemaFailure, bH as StandardSchemaInferOutput, bI as StandardSchemaIssue, bJ as StandardSchemaPathSegment, bK as StandardSchemaResult, bL as StandardSchemaSuccess, bM as StandardSchemaV1, c1 as SuperstructFailureLike, c2 as SuperstructValidateLike, ce as ValibotIssueLike, cf as ValibotPathItemLike, cg as ValibotSafeParseLike, ch as ValibotSafeParseResult, cm as VineValidationErrorLike, cn as VineValidationMessageLike, co as VineValidatorLike, cp as YupSchemaLike, cq as YupValidationErrorLike, cr as defineRequestSchema, cs as fromAjv, ct as fromArkType, cu as fromIoTs, cv as fromJoi, cw as fromStandardSchema, cx as fromSuperstruct, cy as fromValibot, cz as fromVine, cA as fromYup, cB as fromZod } from './parsers-B5dbVmjm.js';
3
+ import { ag as GlobalOptions, Z as DefaultModelRouterOptions, aI as ModelRouterOptions, V as DataRouterOptions, a5 as ExtendedDefaultModelRouterOptions, a6 as ExtendedModelRouterOptions, a4 as ExtendedDataRouterOptions, A as AccessRouterBaseRequest, ai as GuardHook, aH as ModelRequest, T as DataRequest, cR as DataService, a7 as Filter, aS as Projection, bN as Sort, aP as Populate, cS as Service, cT as PublicService, cu as Validation, bE as RootRouterOptions } from './parsers-DppKW-Fd.js';
4
+ export { cU as AccessRouterPermissionMap, cV as AccessRouterPermissions, c as AccessRouterRequest, d as AccessRouterRequestExtensions, l as AjvErrorObjectLike, n as AjvValidatorLike, o as ArkTypeErrorsLike, p as ArkTypeLike, ah as GlobalPermissionValue, al as IoTsContextEntryLike, am as IoTsDecodeErrorLike, an as IoTsDecoderLike, ao as JoiSchemaLike, ap as JoiValidationErrorDetailLike, av as MaybePromise, aw as ModelBaseFilterHook, ay as ModelDeleteHook, az as ModelDocPermissionsHook, aB as ModelDocumentHook, aC as ModelHook, aE as ModelIdentifierHook, aF as ModelListHook, aG as ModelOverrideFilterHook, aJ as ModelValidateHook, cW as Permissions, b8 as RequestSchemaAdapter, b9 as RequestSchemaFailure, ba as RequestSchemaIssue, bb as RequestSchemaLike, bc as RequestSchemaOptions, bd as RequestSchemaResult, be as RequestSchemaSuccess, bf as RequestSchemaValidator, bH as RouteGuardAccess, bP as StandardSchemaFailure, bQ as StandardSchemaInferOutput, bR as StandardSchemaIssue, bS as StandardSchemaPathSegment, bT as StandardSchemaResult, bU as StandardSchemaSuccess, bV as StandardSchemaV1, ca as SuperstructFailureLike, cb as SuperstructValidateLike, co as ValibotIssueLike, cp as ValibotPathItemLike, cq as ValibotSafeParseLike, cr as ValibotSafeParseResult, cw as VineValidationErrorLike, cx as VineValidationMessageLike, cy as VineValidatorLike, cz as YupSchemaLike, cA as YupValidationErrorLike, cB as defineRequestSchema, cC as fromAjv, cD as fromArkType, cE as fromIoTs, cF as fromJoi, cG as fromStandardSchema, cH as fromSuperstruct, cI as fromValibot, cJ as fromVine, cK as fromYup, cL as fromZod } from './parsers-DppKW-Fd.js';
5
5
  import JsonRouter from '@web-ts-toolkit/express-json-router';
6
6
  import 'zod';
7
7