@web-ts-toolkit/access-router 0.53.0 → 0.55.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 CHANGED
@@ -17,6 +17,8 @@ ACL-aware Express routers and in-memory data services for Mongoose-backed APIs.
17
17
  [Virtuals](#virtuals-computed-fields) · [Hook admission](#hook-admission-and-reentrant-service-calls) ·
18
18
  [Persistence limits](#persistence-concurrency-and-resource-limits)
19
19
 
20
+ **Private virtual inputs:** [Populated dependencies and runnable example](#private-populated-dependencies)
21
+
20
22
  **Migration:** [Removed overrides](#breaking-release-service-overrides-migration) ·
21
23
  [Server-owned hydration](#breaking-release-server-owned-hydration) ·
22
24
  [Named helpers](#breaking-release-named-helpers-and-default-behavior) ·
@@ -1927,6 +1929,7 @@ Root entrypoint (`@web-ts-toolkit/access-router`):
1927
1929
  - option helpers: `setGlobalOptions`, `setGlobalOption`, `getGlobalOptions`, `getGlobalOption`, `setModelOptions`, `setModelOption`, `getModelOptions`, `getModelOption`, `getModelNames`, `getModelJsonSchema`, `setDefaultModelOptions`, `setDefaultModelOption`, `getDefaultModelOptions`, `getDefaultModelOption`
1928
1930
  - route-policy types: `OperationAccess`, `SubOperationAccess`, `Validation`, `GuardHook`, `RouteVariantAccess`, `ModelRouterOptions`, `DefaultModelRouterOptions`, `DataRouterOptions`, `ExtendedModelRouterOptions`, `ExtendedDefaultModelRouterOptions`, and `ExtendedDataRouterOptions` for typed setters; `PermissionSchema` / `FieldOperationAccess` are separate base-operation field grants. These types are also available from `/advanced`.
1929
1931
  - fetch configuration types (also `/advanced`): `HydrationMode`, `ModelHydrationOptions` — server-owned model/default configuration, never per-call/wire options.
1932
+ - virtual types (also `/advanced`): `ModelVirtualGetter`, `ModelVirtualDescriptor`, `ModelVirtualAccessRecord`, `ModelVirtualLeaf`, `ModelVirtuals`, `ModelVirtualDoc`, `ModelVirtualContext`, `ModelVirtualPopulateDependency`, `ModelVirtualPopulateInputs`. Explicit private target maps type only the fourth getter argument; see [Private populated dependencies](#private-populated-dependencies).
1930
1933
  - trusted service policy types (also `/advanced`): `ServiceAuthorization` (reads), `MutationAuthorization` (update/upsert), `CreateAuthorization`, `InputFieldAuthorization`, `InputFieldPath`, `OutputAuthorization`, `FieldAuthorization`, `RowAuthorization`, `OperationAuthorization`, `RelatedAuthorization`, `OutputFieldPath`. Input paths use persisted types only; output paths also include virtuals. Unknown models have an explicit runtime-validated string fallback; grant arrays may be readonly.
1931
1934
  - named helper/result types (also `/advanced`): `OutputPlanningOptions`, `OutputFieldOptions`, `AllowedOutputFieldOptions`, opaque `DocumentAuthorization`, `ServiceOutputContext`, `ServiceOutputDecorator`, `AuthorizedSingleResult`, `AuthorizedListResult`, `NewArgs`, `NewOptions`. Acquire the service from a router/request; there is no standalone `Service` export or public issuer/execution/prepared API.
1932
1935
 
@@ -2484,8 +2487,12 @@ Only returned field values are committed via document-aware helpers;
2484
2487
  `undefined` omits the field; a throw omits it fail-closed with a structural
2485
2488
  log (no raw values or secret-bearing text). Sibling virtual values are never
2486
2489
  visible regardless of completion order, and mutating getter input cannot change
2487
- response data or lifecycle snapshots. Related documents finalize before parent
2488
- getters run, and embedded children finalize before their parent getter.
2490
+ response data or lifecycle snapshots implicitly. Public related documents finalize
2491
+ before parent getters run, and embedded children finalize before their parent getter.
2492
+ The first getter argument retains that ordinary persisted/local/public-related
2493
+ view. An opted-in getter receives its declaration-scoped **private populated inputs
2494
+ separately in argument four**; see below. A trusted getter may deliberately return
2495
+ a value derived from private inputs, subject to the virtual's output authorization.
2489
2496
 
2490
2497
  Coverage: every document-bearing public model output uses its own model's
2491
2498
  definitions, permissions, selection, and effective access — direct
@@ -2524,9 +2531,8 @@ A create-only getter runs only on create/upsert-create responses; an
2524
2531
  update-only getter only on update/upsert-update responses. On other responses
2525
2532
  the name stays a registered virtual: omitted from output and never entering
2526
2533
  persisted projections, write admission, or sort/filter/distinct handling. A
2527
- read-denied virtual (explicit deny, or document grants fail the rule) never
2528
- runs its getter on any path and fetches nothing for it; a document-dependent
2529
- rule defers to post-fetch evaluation with real grants.
2534
+ known-denied virtual adds no dependency-only fetch and never runs its getter;
2535
+ a document-dependent rule may fetch inputs before real grants deny the getter.
2530
2536
 
2531
2537
  Output-only database/write restrictions: registered virtual names for any
2532
2538
  access (including bare `permissionSchema: true` rules and inapplicable
@@ -2548,7 +2554,9 @@ object or logical branch is retained; a wholly virtual ordinary filter becomes `
2548
2554
 
2549
2555
  Trusted `decorate`/`decorateAll`/tasks boundary: virtuals evaluate before
2550
2556
  `decorate`/`decorateAll`/tasks; internal-only dependency fields are stripped
2551
- before those hooks see the object. Trusted hooks may deliberately construct new
2557
+ before those hooks see the object. Private fourth-argument maps are never implicitly
2558
+ transported there; an authorized getter's deliberate returned value is output.
2559
+ Trusted hooks may deliberately construct new
2552
2560
  output from trusted context; no second authorization pass after those hooks is
2553
2561
  promised.
2554
2562
 
@@ -2559,8 +2567,303 @@ data over per-row database calls. On a 24-row list with 2 getters at
2559
2567
  label via `populate: [{ path: 'addrId', select: ['label'] }]` and a getter
2560
2568
  reading the finalized `doc.addrId` object issued 2 driver reads (batched `$in`)
2561
2569
  with identical output and the same peak bound. Bounds do not collapse N+1
2562
- into 1. Parent getters see only finalized related/embedded outputs and must
2563
- not rely on a related model's stripped private fields.
2570
+ into 1. Argument one contains finalized public related/embedded outputs; it cannot
2571
+ recover stripped related fields. Use an explicit `dependsOnPopulate` declaration
2572
+ and the separate fourth argument when an authorized virtual needs private inputs.
2573
+
2574
+ ### Private populated dependencies
2575
+
2576
+ `dependsOnPopulate: [{ path: 'account', select: ['balance', 'creditLimit'] }]`
2577
+ is trusted **server virtual configuration**, available from the existing root and
2578
+ `/advanced` types. It grants the declaring getter private persisted **input fields**,
2579
+ even when source `account` or target `balance`/`creditLimit` output is denied.
2580
+ The source ref is retained automatically; repeating it in local `dependsOn` is unnecessary.
2581
+
2582
+ - `dependsOn` supplies persisted fields in the current scope through argument one.
2583
+ - Ordinary query `populate` requests public related output under source and target
2584
+ authorization, selection and match rules.
2585
+ - `dependsOnPopulate` supplies one-hop persisted target values **only to that
2586
+ resolved getter's fourth argument**. It neither requests public population nor
2587
+ grants output. HTTP, root, service query and client options cannot declare it.
2588
+
2589
+ #### Runnable private dependency example
2590
+
2591
+ Save as `private-populate-example.mts` and run with Node 22.18+ or compile with
2592
+ TypeScript/NodeNext. Install the package, Express and Mongoose as above. This
2593
+ self-contained example creates/removes a uniquely named database, registers the
2594
+ target **before** the source, and checks all three response shapes. The example
2595
+ tenant is server-owned; real applications derive it from their authenticated actor.
2596
+
2597
+ <!-- doc-example: complete-runtime -->
2598
+
2599
+ ```ts
2600
+ import assert from 'node:assert/strict';
2601
+ import { randomUUID } from 'node:crypto';
2602
+ import { once } from 'node:events';
2603
+ import type { Server } from 'node:http';
2604
+ import express from 'express';
2605
+ import mongoose from 'mongoose';
2606
+ import { createAccessRuntime, type ModelVirtualDescriptor } from '@web-ts-toolkit/access-router';
2607
+
2608
+ interface Account {
2609
+ name: string;
2610
+ balance: number;
2611
+ creditLimit: number;
2612
+ tenantId: string;
2613
+ }
2614
+ interface Order {
2615
+ total: number;
2616
+ account: mongoose.Types.ObjectId | null; // stays a persisted ref, not an Account
2617
+ }
2618
+ interface OrderVirtuals {
2619
+ canPlaceOrder: boolean;
2620
+ }
2621
+
2622
+ async function runPrivatePopulateExample() {
2623
+ const connection = await mongoose
2624
+ .createConnection(process.env.MONGODB_URL ?? 'mongodb://127.0.0.1:27017', {
2625
+ dbName: `private_populate_example_${randomUUID().replaceAll('-', '')}`,
2626
+ })
2627
+ .asPromise();
2628
+ let server: Server | undefined;
2629
+ try {
2630
+ const api = createAccessRuntime();
2631
+ api.setGlobalOptions({ globalPermissions: () => [] });
2632
+ const AccountModel = connection.model<Account>(
2633
+ 'PrivateExampleAccount',
2634
+ new mongoose.Schema<Account>({
2635
+ name: String,
2636
+ balance: { type: Number, select: false },
2637
+ creditLimit: Number,
2638
+ tenantId: String,
2639
+ }),
2640
+ );
2641
+ // Both the actual model instance and its options must exist in this runtime first.
2642
+ const accounts = api.createRouter(AccountModel, {
2643
+ operationAccess: { read: true },
2644
+ baseFilter: { read: () => ({ tenantId: 'shop-a' }) },
2645
+ permissionSchema: { name: true, balance: false, creditLimit: false },
2646
+ stripPermissionsField: true,
2647
+ });
2648
+ const OrderModel = connection.model<Order>(
2649
+ 'PrivateExampleOrder',
2650
+ new mongoose.Schema<Order>({
2651
+ total: Number,
2652
+ account: { type: mongoose.Schema.Types.ObjectId, ref: AccountModel.modelName },
2653
+ }),
2654
+ );
2655
+ // Explicit target map: an ObjectId alone cannot infer its related model.
2656
+ const canPlaceOrder: ModelVirtualDescriptor<Order, boolean, { account: Account }> = {
2657
+ dependsOn: ['total'],
2658
+ dependsOnPopulate: [{ path: 'account', select: ['balance', 'creditLimit'] }],
2659
+ get(doc, _permissions, _context, populated = {}) {
2660
+ const account = populated.account;
2661
+ if (doc.total === undefined || account?.balance === undefined || account.creditLimit === undefined)
2662
+ return undefined;
2663
+ return doc.total <= account.balance + account.creditLimit;
2664
+ },
2665
+ };
2666
+ const orders = api.createRouter<Order, OrderVirtuals>(OrderModel, {
2667
+ basePath: '/orders',
2668
+ operationAccess: { read: true },
2669
+ permissionSchema: { total: false, account: true, canPlaceOrder: true },
2670
+ virtuals: { canPlaceOrder }, // assign the separately typed descriptor normally
2671
+ stripPermissionsField: true,
2672
+ });
2673
+ const account = await AccountModel.create({ name: 'Main', balance: 80, creditLimit: 20, tenantId: 'shop-a' });
2674
+ const order = await OrderModel.create({ total: 90, account: account._id });
2675
+ const app = express();
2676
+ app.use(express.json());
2677
+ app.use(orders.routes);
2678
+ server = app.listen(0, '127.0.0.1');
2679
+ await once(server, 'listening');
2680
+ const address = server.address();
2681
+ assert.ok(address && typeof address !== 'string');
2682
+ const url = `http://127.0.0.1:${address.port}/orders/__query/${order._id}`;
2683
+ async function read(args: object) {
2684
+ const response = await fetch(url, {
2685
+ method: 'POST',
2686
+ headers: { 'content-type': 'application/json' },
2687
+ body: JSON.stringify(args),
2688
+ });
2689
+ assert.equal(response.status, 200);
2690
+ return response.json();
2691
+ }
2692
+ const select = ['account', 'canPlaceOrder', '-_id'];
2693
+ // 1. Public population: fetch name + private inputs, return only the public mask.
2694
+ assert.deepEqual(await read({ select, populate: [{ path: 'account', select: 'name -_id' }] }), {
2695
+ account: { name: 'Main' },
2696
+ canPlaceOrder: true,
2697
+ });
2698
+ // 2. No ordinary population: restore the exact selected/permitted original ID.
2699
+ assert.deepEqual(await read({ select }), { account: String(account._id), canPlaceOrder: true });
2700
+ // 3. Unselected reference: compute privately, omit account entirely.
2701
+ assert.deepEqual(await read({ select: ['canPlaceOrder', '-_id'] }), { canPlaceOrder: true });
2702
+ // Readable-but-unrequested private fields still do not join public output.
2703
+ accounts.setOption('permissionSchema', { name: true, balance: true, creditLimit: true });
2704
+ assert.deepEqual(await read({ select, populate: [{ path: 'account', select: 'name -_id' }] }), {
2705
+ account: { name: 'Main' },
2706
+ canPlaceOrder: true,
2707
+ });
2708
+ // Denying the source field also leaves only the authorized virtual result.
2709
+ orders.permissionSchema('account', false);
2710
+ assert.deepEqual(await read({ select }), { canPlaceOrder: true });
2711
+ // Input-field authority does not bypass the target's base read operation.
2712
+ accounts.setOption('operationAccess.read', false);
2713
+ assert.deepEqual(await read({ select: ['canPlaceOrder', '-_id'] }), {});
2714
+ } finally {
2715
+ if (server)
2716
+ await new Promise<void>((resolve, reject) => server!.close((error) => (error ? reject(error) : resolve())));
2717
+ await connection.dropDatabase();
2718
+ await connection.close();
2719
+ }
2720
+ }
2721
+ runPrivatePopulateExample().catch((error: unknown) => {
2722
+ console.error(error);
2723
+ process.exitCode = 1;
2724
+ });
2725
+ ```
2726
+
2727
+ #### Typing and isolated getter inputs
2728
+
2729
+ `ModelVirtualGetter`, `ModelVirtualDescriptor`, `ModelVirtualAccessRecord` and
2730
+ `ModelVirtualLeaf` accept a third generic `TPopulated`, defaulting to an empty
2731
+ shape. `ModelVirtualPopulateInputs<Source, { account: Account }>` is the fourth
2732
+ argument's type. Known source keys are checked, scalar/array cardinality follows
2733
+ the persisted source field, and unknown cardinality allows both. No target shape
2734
+ is guessed without an annotation; the annotation grants no runtime authority.
2735
+ Neither persisted/write models nor public selected-output models are widened.
2736
+
2737
+ Each mapped key is optional. A scalar is a deeply partial/readonly target or null;
2738
+ an array is a readonly array of partial targets/null slots, or null. Guard missing
2739
+ fields. Native Date/Buffer/BSON scalar types remain native; mutable methods still
2740
+ exist, but every getter, row and repeated array slot receives an isolated copy.
2741
+ The runtime always supplies argument four (`{}` without a declaration). Its type
2742
+ is optional to preserve existing three-argument callbacks **and direct calls**;
2743
+ use `populated = {}` or guard undefined in typed getters.
2744
+
2745
+ Argument one remains the ordinary persisted/local-dependency/finalized-public-related
2746
+ view for every getter. Automatically fetched private-only refs are not added there;
2747
+ an existing local `dependsOn` on that ref keeps its ordinary behavior. Each getter
2748
+ sees only its own resolved declarations and target selections in argument four.
2749
+ Private maps/raw targets are not implicitly attached to response DTOs, contexts,
2750
+ lifecycle snapshots, public permission hooks/metadata, document handles, or ordinary
2751
+ decorate/decorateAll/task inputs. **Only an authorized getter's deliberate return
2752
+ becomes computed output**; this is not a prohibition on returning derived values.
2753
+
2754
+ #### Target authority, selection and reconstruction
2755
+
2756
+ Private targets always use captured base **`read`** admission, including array refs,
2757
+ source lists, writes and templates. The original actor's `operationAccess.read`,
2758
+ `overrideFilter.read` (starting with `{}`) and `baseFilter.read` run under request row
2759
+ authority with their normal exact → default → bare fallback/cache rules. Mandatory
2760
+ source IDs are ANDed afterward, preserving tenant scope. There is no private read-to-list
2761
+ fallback or route-variant gate. `authorization.related` governs only an ordinary
2762
+ requested populate/include; its grants/replacement rows, public `match`, `access`
2763
+ and `select` cannot redefine private inputs. A related policy naming only a
2764
+ dependency-only path is unused/invalid.
2765
+
2766
+ Only selected, applicable, not-definitely-denied virtuals add dependency work;
2767
+ document-dependent authorization may defer until after fetching. Compatible public
2768
+ and private reads share a positive persisted **fetch union**, including internal
2769
+ identity/hook/join requirements. Their original authorization/output masks stay
2770
+ separate and immutable. Even a readable private field is omitted unless originally
2771
+ selected and permitted. Public exclusions and `-_id` remain effective. Different
2772
+ public match/access/row scopes require independent queries.
2773
+
2774
+ The original query includes resolved server defaults. A default populate is ordinary
2775
+ population; explicit `populate: []` suppresses it. Admitted ordinary population keeps
2776
+ its original target projection, match/missing/null/array behavior. Denied ordinary
2777
+ population keeps its existing fallback shape. Without ordinary population, selected
2778
+ and permitted refs restore their exact pre-populate IDs/arrays, including missing
2779
+ target IDs, order, duplicates, nulls, empty arrays and own absence. Unselected,
2780
+ excluded or denied source refs are omitted, including their IDs. Reconstruction
2781
+ runs even when the getter is omitted or fails, before presentation hooks/tasks.
2782
+
2783
+ #### Supported declarations and validation
2784
+
2785
+ - Entries accept **only `{ path, select? }`**: no shorthand string, model, match,
2786
+ access, populate or arbitrary Mongoose options. Duplicate paths within a resolved
2787
+ declaration reject. Different virtuals may declare the same path.
2788
+ - `path` is a top-level, scope-local ObjectId scalar or one-dimensional ObjectId
2789
+ ref array with a static string ref to an actual same-connection, same-runtime,
2790
+ registered ObjectId-identity model. Embedded object/nested/document-array virtuals
2791
+ use their `.sub` scope (declare `account`, not `contacts.account`). Dotted source
2792
+ paths, Map/Mixed/dynamic refs, refPath, function/model-valued refs, virtual populate,
2793
+ discriminator-varying source scopes or discriminator targets, cross-connection
2794
+ targets, non-ObjectId IDs and multidimensional ref arrays reject explicitly.
2795
+ - Target `select` accepts comma/space strings, string arrays, or **1/-1** objects
2796
+ (not Mongo's 1/0). Omitted/undefined/effectively empty (`''`, `[]`, `{}`) means all
2797
+ eligible static persisted fields. Exclusion-only subtracts from that universe;
2798
+ positive paths select eligible descendants, with explicit negatives winning.
2799
+ `_id` is included unless `-_id` (or `{ _id: -1 }`) is declared; association identity
2800
+ is still privately fetched. For example `{ balance: 1, _id: -1 }` supplies only balance.
2801
+ - Static embedded/dotted target fields work. Containers expand to eligible stored
2802
+ leaves; stored target refs remain IDs only. Explicit target virtuals/aliases,
2803
+ unknown/unsafe/control/metadata/version paths, dynamic Map/Mixed paths, ref
2804
+ traversal, `+` tokens, non-string array entries and invalid object values reject,
2805
+ including invalid exclusions. No recursive target virtual computation/private
2806
+ population occurs. Target `requireExplicitSelect` and service defaults do not
2807
+ replace the declaration's selection.
2808
+ - Shared per-access `dependsOnPopulate` inherits independently of `dependsOn`:
2809
+ exact access getter → default getter; a bare getter inherits its shared lists.
2810
+ A leaf's defined list replaces the shared list wholesale, `[]` clears it,
2811
+ undefined inherits, and null rejects. Descriptor arrays/masks and target policies
2812
+ are captured with the getter before asynchronous work; later calls see updates.
2813
+ - Validation is eager and atomic for constructors, bulk and dotted setters. Target
2814
+ model instances **and options must be registered first**, even with
2815
+ `requireRegisteredPopulateModels: false`. For mutually referencing models, register
2816
+ both options before assigning virtuals; self-refs use the proposed source options.
2817
+ Operation capture rechecks schema/target/metadata binding before hooks or writes.
2818
+
2819
+ #### Absence, errors, lifecycle and measured work
2820
+
2821
+ Absent/undefined source refs omit the virtual without invoking it. Present null and
2822
+ empty arrays invoke the getter with null/[] without a target query when read is
2823
+ admitted. Deleted/out-of-scope target rows become scalar null or null array slots;
2824
+ private arrays preserve original order, duplicates and null/missing slots. Missing
2825
+ target fields remain partial inputs; null/false/zero/empty-string stay present and
2826
+ the getter decides what to return.
2827
+
2828
+ Target read denial or terminal false transform/base scope makes dependencies
2829
+ unavailable and omits affected virtuals (even for null/empty source refs). A
2830
+ dependency-only query/hook/cast failure also omits them with structural-only logging.
2831
+ There is no raw fallback, retry or new retryable write error: a successful write
2832
+ stays successful. A failed query that also serves ordinary public population keeps
2833
+ that ordinary error path. Getter undefined/throw omits fail-closed; invalid server
2834
+ configuration is a preflight error, not an unavailable input.
2835
+
2836
+ Support covers direct/root/trusted reads, create/update/both upsert branches, `new`,
2837
+ ordinary populated and legacy/correlated included targets, embedded scopes, and
2838
+ visible dedicated subdocument list/read/create/update/bulkUpdate outputs. Count,
2839
+ distinct, exists, delete identities, include-count and field helpers add no private
2840
+ dependency I/O/getters. `SubPopulate` remains path/select-only. Writes capture
2841
+ post-save/post-afterPersist refs on detached output copies after lifecycle work;
2842
+ hidden mutation rows do not run getters. `new` still ignores `args.select`, uses
2843
+ create access, and loads present default refs under target read authority without saving.
2844
+
2845
+ Private fetches use the receiving output's captured hydration: source read mode for
2846
+ direct reads/populate, fixed lean for include targets, hydrated for dedicated child
2847
+ read/list and ordinary writes/templates, fixed lean for child mutation visibility.
2848
+ Restoration is exact relative to that pre-populate materialized value, not raw BSON
2849
+ parity across modes. Defaults/getters/transforms/init hooks and dotted projection's
2850
+ omitted null containers can differ; see the [hydration caveat](#breaking-release-server-owned-hydration).
2851
+
2852
+ Measured batching: with two compatible target groups, **1 and 24 source rows both
2853
+ issued 1 parent find + 2 target finds**, in lean and hydrated modes. Getter counts
2854
+ were 4 and 96; observed persistence/getter peaks were 1/1 or 2/2 at matching limits.
2855
+ Compatible rows/virtuals/scopes batch and deduplicate fetched IDs, not reconstructed
2856
+ slots or public authorization. Covered raw work can be reused only within its
2857
+ captured request/runtime/family/mode and ID/projection coverage. Different scopes
2858
+ still query separately; ordinary per-parent correlated public queries remain
2859
+ per-parent. This is not a constant-query-count promise for independent includes.
2860
+
2861
+ **Compatibility:** existing bare/descriptor/per-access getters and local `dependsOn`
2862
+ keep their first-argument and three-argument direct-call contract. Opt in by adding
2863
+ the declaration and a separately typed descriptor/default fourth argument; no new
2864
+ router-wide generic, entrypoint, client API or persisted-field migration is required.
2865
+ The deliberate opt-in constraints are eager target registration and strict static
2866
+ reference/target-selection validation; ordinary public populate grammar is unchanged.
2564
2867
 
2565
2868
  ### Hook admission and reentrant service calls
2566
2869
 
package/advanced.d.mts CHANGED
@@ -1,4 +1,4 @@
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 AjvValidationErrorLike, n as AjvValidatorLike, o as AllowedOutputFieldOptions, p as ArkTypeErrorsLike, q as ArkTypeLike, r as ArkTypeProblemLike, s as AuthorizedListResult, t as AuthorizedSingleResult, B as BaseFilterAccess, C as Change, u as Codes, v as CorrelatedCountInclude, w as CorrelatedFilter, x as CorrelatedInclude, y as CorrelatedIncludeArgs, z as CorrelatedListInclude, D as CorrelatedReadByFilterInclude, E as CorrelatedReadByIdInclude, F as CountBody, G as CreateArgs, H as CreateAuthorization, I as CreateOptions, J as CreateQueryInput, K as CustomHeaders, L as DATA_MIDDLEWARE, M as DataBaseFilterHook, N as DataFieldOptions, O as DataFilter, P as DataFindArgs, Q as DataFindOneArgs, R as DataFindOneOptions, S as DataFindOptions, T as DataHook, U as DataHookContext, V as DataIdentifierHook, W as DataListHook, X as DataOverrideFilterHook, Y as DataRequest, Z as DataRequestSchemas, _ as DataRouterOptions, $ as DecorateAccess, a0 as DecorateAllAccess, a1 as DeepFieldPath, a2 as DefaultModelRouterOptions, a3 as Defaults, a4 as DistinctArgs, a5 as DistinctBody, a6 as DocPermissionsAccess, a7 as DocumentAuthorization, a8 as ErrorResult, a9 as ExistsOptions, aa as ExtendedDataRouterOptions, ab as ExtendedDefaultModelRouterOptions, ac as ExtendedModelRouterOptions, ad as FieldAuthorization, ae as FieldOperationAccess, af as Filter, ag as FilterOperator, ah as FindAccess, ai as FindArgs, aj as FindByIdArgs, ak as FindByIdOptions, al as FindOneArgs, am as FindOneOptions, an as FindOptions, ao as GlobalOptions, ap as GlobalPermissionValue, aq as GuardHook, ar as HydrationMode, as as IdentifierHook, at as Include, au as InputFieldAuthorization, av as InputFieldPath, aw as IoTsContextEntryLike, ax as IoTsDecodeErrorLike, ay as IoTsDecoderLike, az as JoiSchemaLike, aA as JoiValidationErrorDetailLike, aB as KeyValueProjection, aC as LegacyInclude, aD as ListQueryInput, aE as ListResult, aF as MIDDLEWARE, aG as MaybePromise, aH as ModelBaseFilterHook, aI as ModelChangeHook, aJ as ModelDeleteHook, aK as ModelDocPermissionsHook, aL as ModelDocument, aM as ModelDocumentHook, aN as ModelHook, aO as ModelHookContext, aP as ModelHydrationOptions, aQ as ModelIdentifierHook, aR as ModelListHook, aS as ModelOverrideFilterHook, aT as ModelRequest, aU as ModelRouterOptions, aV as ModelValidateHook, aW as ModelVirtualAccess, aX as ModelVirtualAccessRecord, aY as ModelVirtualContext, aZ as ModelVirtualDescriptor, a_ as ModelVirtualDoc, a$ as ModelVirtualGetter, b0 as ModelVirtualLeaf, b1 as ModelVirtualRecordAccess, b2 as ModelVirtuals, b3 as MutationAuthorization, b4 as NewArgs, b5 as NewOptions, b6 as OperationAccess, b7 as OperationAuthorization, b8 as OutputAuthorization, b9 as OutputFieldOptions, ba as OutputFieldPath, bb as OutputPlanningOptions, bc as PERMISSIONS, bd as PERMISSION_KEYS, be as PairedRouteAccess, bf as ParentRef, bg as PathValue, bh as PermissionSchema, bi as Populate, bj as PopulateAccess, bk as PopulatePlanningOptions, bl as PrepareAccess, bm as Projection, bn as PublicCreateArgs, bo as PublicCreateOptions, bp as PublicErrorResult, bq as PublicListArgs, br as PublicListOptions, bs as PublicListResult, bt as PublicOutput, bu as PublicReadArgs, bv as PublicReadOptions, bw as PublicServiceResult, bx as PublicSingleResult, by as PublicSubdocumentCreateOptions, bz as PublicSubdocumentListOptions, bA as PublicSubdocumentMutationOptions, bB as PublicSubdocumentReadOptions, bC as PublicUpdateArgs, bD as PublicUpdateOptions, bE as PublicUpsertArgs, bF as PublicUpsertOptions, bG as ReadQueryInput, bH as RelatedAuthorization, bI as Request, bJ as RequestSchemaAdapter, bK as RequestSchemaFailure, bL as RequestSchemaIssue, bM as RequestSchemaLike, bN as RequestSchemaOptions, bO as RequestSchemaResult, bP as RequestSchemaSuccess, bQ as RequestSchemaValidator, bR as RequestSchemas, bS as RootDataListQueryEntry, bT as RootDataOperation, bU as RootDataReadByFilterQueryEntry, bV as RootDataReadByIdQueryEntry, bW as RootModelCountQueryEntry, bX as RootModelCreateQueryEntry, bY as RootModelDeleteQueryEntry, bZ as RootModelDistinctQueryEntry, b_ as RootModelListQueryEntry, b$ as RootModelNewQueryEntry, c0 as RootModelOperation, c1 as RootModelReadByFilterQueryEntry, c2 as RootModelReadByIdQueryEntry, c3 as RootModelSubBulkUpdateQueryEntry, c4 as RootModelSubCreateQueryEntry, c5 as RootModelSubDeleteQueryEntry, c6 as RootModelSubListQueryEntry, c7 as RootModelSubReadQueryEntry, c8 as RootModelSubUpdateQueryEntry, c9 as RootModelUpdateQueryEntry, ca as RootModelUpsertQueryEntry, cb as RootOperationResult, cc as RootQueryEntry, cd as RootRouterOptions, ce as RootSubOperation, cf as RootTarget, cg as RouteBaseAccess, ch as RouteGuardAccess, ci as RouteVariant, cj as RouteVariantAccess, ck as RowAuthorization, cl as SelectAccess, cm as SelectedPopulatedPublicOutput, cn as SelectedPublicOutput, co as ServiceAuthorization, cp as ServiceOutputContext, cq as ServiceOutputDecorator, cr as ServiceResult, cs as SingleResult, ct as Sort, cu as SortOrder, cv as StandardSchemaFailure, cw as StandardSchemaInferOutput, cx as StandardSchemaIssue, cy as StandardSchemaPathSegment, cz as StandardSchemaResult, cA as StandardSchemaSuccess, cB as StandardSchemaV1, cC as StatusCodes, cD as SubListBody, cE as SubOperationAccess, cF as SubPopulate, cG as SubQueryEntry, cH as SubReadBody, cI as SubRouteGuardOptions, cJ as SubdocumentBulkRecord, cK as SubdocumentBulkUpdateInput, cL as SubdocumentCreateAuthorization, cM as SubdocumentCreateInput, cN as SubdocumentCreateOptions, cO as SubdocumentCreateVisibilityAuthorization, cP as SubdocumentDeleteAuthorization, cQ as SubdocumentDeleteOptions, cR as SubdocumentGateAuthorization, cS as SubdocumentId, cT as SubdocumentInputAuthorization, cU as SubdocumentListOptions, cV as SubdocumentModel, cW as SubdocumentMutationAuthorization, cX as SubdocumentName, cY as SubdocumentOutputAuthorization, cZ as SubdocumentParentArgs, c_ as SubdocumentParentOptions, c$ as SubdocumentReadAuthorization, d0 as SubdocumentReadOptions, d1 as SubdocumentRecord, d2 as SubdocumentUpdateOptions, d3 as SubdocumentVirtuals, d4 as SubdocumentVisibilityAuthorization, d5 as SuperstructFailureLike, d6 as SuperstructValidateLike, d7 as Task, d8 as TaskType, d9 as TransformAccess, da as TypedFilter, db as UpdateByIdArgs, dc as UpdateByIdOptions, dd as UpdateOneArgs, de as UpdateOneOptions, df as UpdateQueryInput, dg as UpsertArgs, dh as UpsertOptions, di as UpsertQueryInput, dj as ValibotIssueLike, dk as ValibotPathItemLike, dl as ValibotSafeParseLike, dm as ValibotSafeParseResult, dn as ValidateAccess, dp as ValidateRule, dq as Validation, dr as ValidationError, ds as VineValidationErrorLike, dt as VineValidationMessageLike, du as VineValidatorLike, dv as VirtualSubModel, dw as WithVirtuals, dx as YupSchemaLike, dy as YupValidationErrorLike, dz as defineRequestSchema, dA as fromAjv, dB as fromArkType, dC as fromIoTs, dD as fromJoi, dE as fromStandardSchema, dF as fromSuperstruct, dG as fromValibot, dH as fromVine, dI as fromYup, dJ as fromZod, dK as parseBody, dL as parseBodyWithSchema, dM as parseNestedBodyWithSchema, dN as parsePathParam, dO as parseQuery } from './parsers-ZSrF7SNu.mjs';
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 AjvValidationErrorLike, n as AjvValidatorLike, o as AllowedOutputFieldOptions, p as ArkTypeErrorsLike, q as ArkTypeLike, r as ArkTypeProblemLike, s as AuthorizedListResult, t as AuthorizedSingleResult, B as BaseFilterAccess, C as Change, u as Codes, v as CorrelatedCountInclude, w as CorrelatedFilter, x as CorrelatedInclude, y as CorrelatedIncludeArgs, z as CorrelatedListInclude, D as CorrelatedReadByFilterInclude, E as CorrelatedReadByIdInclude, F as CountBody, G as CreateArgs, H as CreateAuthorization, I as CreateOptions, J as CreateQueryInput, K as CustomHeaders, L as DATA_MIDDLEWARE, M as DataBaseFilterHook, N as DataFieldOptions, O as DataFilter, P as DataFindArgs, Q as DataFindOneArgs, R as DataFindOneOptions, S as DataFindOptions, T as DataHook, U as DataHookContext, V as DataIdentifierHook, W as DataListHook, X as DataOverrideFilterHook, Y as DataRequest, Z as DataRequestSchemas, _ as DataRouterOptions, $ as DecorateAccess, a0 as DecorateAllAccess, a1 as DeepFieldPath, a2 as DefaultModelRouterOptions, a3 as Defaults, a4 as DistinctArgs, a5 as DistinctBody, a6 as DocPermissionsAccess, a7 as DocumentAuthorization, a8 as ErrorResult, a9 as ExistsOptions, aa as ExtendedDataRouterOptions, ab as ExtendedDefaultModelRouterOptions, ac as ExtendedModelRouterOptions, ad as FieldAuthorization, ae as FieldOperationAccess, af as Filter, ag as FilterOperator, ah as FindAccess, ai as FindArgs, aj as FindByIdArgs, ak as FindByIdOptions, al as FindOneArgs, am as FindOneOptions, an as FindOptions, ao as GlobalOptions, ap as GlobalPermissionValue, aq as GuardHook, ar as HydrationMode, as as IdentifierHook, at as Include, au as InputFieldAuthorization, av as InputFieldPath, aw as IoTsContextEntryLike, ax as IoTsDecodeErrorLike, ay as IoTsDecoderLike, az as JoiSchemaLike, aA as JoiValidationErrorDetailLike, aB as KeyValueProjection, aC as LegacyInclude, aD as ListQueryInput, aE as ListResult, aF as MIDDLEWARE, aG as MaybePromise, aH as ModelBaseFilterHook, aI as ModelChangeHook, aJ as ModelDeleteHook, aK as ModelDocPermissionsHook, aL as ModelDocument, aM as ModelDocumentHook, aN as ModelHook, aO as ModelHookContext, aP as ModelHydrationOptions, aQ as ModelIdentifierHook, aR as ModelListHook, aS as ModelOverrideFilterHook, aT as ModelRequest, aU as ModelRouterOptions, aV as ModelValidateHook, aW as ModelVirtualAccess, aX as ModelVirtualAccessRecord, aY as ModelVirtualContext, aZ as ModelVirtualDescriptor, a_ as ModelVirtualDoc, a$ as ModelVirtualGetter, b0 as ModelVirtualLeaf, b1 as ModelVirtualPopulateDependency, b2 as ModelVirtualPopulateInputs, b3 as ModelVirtualRecordAccess, b4 as ModelVirtuals, b5 as MutationAuthorization, b6 as NewArgs, b7 as NewOptions, b8 as OperationAccess, b9 as OperationAuthorization, ba as OutputAuthorization, bb as OutputFieldOptions, bc as OutputFieldPath, bd as OutputPlanningOptions, be as PERMISSIONS, bf as PERMISSION_KEYS, bg as PairedRouteAccess, bh as ParentRef, bi as PathValue, bj as PermissionSchema, bk as Populate, bl as PopulateAccess, bm as PopulatePlanningOptions, bn as PrepareAccess, bo as Projection, bp as PublicCreateArgs, bq as PublicCreateOptions, br as PublicErrorResult, bs as PublicListArgs, bt as PublicListOptions, bu as PublicListResult, bv as PublicOutput, bw as PublicReadArgs, bx as PublicReadOptions, by as PublicServiceResult, bz as PublicSingleResult, bA as PublicSubdocumentCreateOptions, bB as PublicSubdocumentListOptions, bC as PublicSubdocumentMutationOptions, bD as PublicSubdocumentReadOptions, bE as PublicUpdateArgs, bF as PublicUpdateOptions, bG as PublicUpsertArgs, bH as PublicUpsertOptions, bI as ReadQueryInput, bJ as RelatedAuthorization, bK as Request, bL as RequestSchemaAdapter, bM as RequestSchemaFailure, bN as RequestSchemaIssue, bO as RequestSchemaLike, bP as RequestSchemaOptions, bQ as RequestSchemaResult, bR as RequestSchemaSuccess, bS as RequestSchemaValidator, bT as RequestSchemas, bU as RootDataListQueryEntry, bV as RootDataOperation, bW as RootDataReadByFilterQueryEntry, bX as RootDataReadByIdQueryEntry, bY as RootModelCountQueryEntry, bZ as RootModelCreateQueryEntry, b_ as RootModelDeleteQueryEntry, b$ as RootModelDistinctQueryEntry, c0 as RootModelListQueryEntry, c1 as RootModelNewQueryEntry, c2 as RootModelOperation, c3 as RootModelReadByFilterQueryEntry, c4 as RootModelReadByIdQueryEntry, c5 as RootModelSubBulkUpdateQueryEntry, c6 as RootModelSubCreateQueryEntry, c7 as RootModelSubDeleteQueryEntry, c8 as RootModelSubListQueryEntry, c9 as RootModelSubReadQueryEntry, ca as RootModelSubUpdateQueryEntry, cb as RootModelUpdateQueryEntry, cc as RootModelUpsertQueryEntry, cd as RootOperationResult, ce as RootQueryEntry, cf as RootRouterOptions, cg as RootSubOperation, ch as RootTarget, ci as RouteBaseAccess, cj as RouteGuardAccess, ck as RouteVariant, cl as RouteVariantAccess, cm as RowAuthorization, cn as SelectAccess, co as SelectedPopulatedPublicOutput, cp as SelectedPublicOutput, cq as ServiceAuthorization, cr as ServiceOutputContext, cs as ServiceOutputDecorator, ct as ServiceResult, cu as SingleResult, cv as Sort, cw as SortOrder, cx as StandardSchemaFailure, cy as StandardSchemaInferOutput, cz as StandardSchemaIssue, cA as StandardSchemaPathSegment, cB as StandardSchemaResult, cC as StandardSchemaSuccess, cD as StandardSchemaV1, cE as StatusCodes, cF as SubListBody, cG as SubOperationAccess, cH as SubPopulate, cI as SubQueryEntry, cJ as SubReadBody, cK as SubRouteGuardOptions, cL as SubdocumentBulkRecord, cM as SubdocumentBulkUpdateInput, cN as SubdocumentCreateAuthorization, cO as SubdocumentCreateInput, cP as SubdocumentCreateOptions, cQ as SubdocumentCreateVisibilityAuthorization, cR as SubdocumentDeleteAuthorization, cS as SubdocumentDeleteOptions, cT as SubdocumentGateAuthorization, cU as SubdocumentId, cV as SubdocumentInputAuthorization, cW as SubdocumentListOptions, cX as SubdocumentModel, cY as SubdocumentMutationAuthorization, cZ as SubdocumentName, c_ as SubdocumentOutputAuthorization, c$ as SubdocumentParentArgs, d0 as SubdocumentParentOptions, d1 as SubdocumentReadAuthorization, d2 as SubdocumentReadOptions, d3 as SubdocumentRecord, d4 as SubdocumentUpdateOptions, d5 as SubdocumentVirtuals, d6 as SubdocumentVisibilityAuthorization, d7 as SuperstructFailureLike, d8 as SuperstructValidateLike, d9 as Task, da as TaskType, db as TransformAccess, dc as TypedFilter, dd as UpdateByIdArgs, de as UpdateByIdOptions, df as UpdateOneArgs, dg as UpdateOneOptions, dh as UpdateQueryInput, di as UpsertArgs, dj as UpsertOptions, dk as UpsertQueryInput, dl as ValibotIssueLike, dm as ValibotPathItemLike, dn as ValibotSafeParseLike, dp as ValibotSafeParseResult, dq as ValidateAccess, dr as ValidateRule, ds as Validation, dt as ValidationError, du as VineValidationErrorLike, dv as VineValidationMessageLike, dw as VineValidatorLike, dx as VirtualSubModel, dy as WithVirtuals, dz as YupSchemaLike, dA as YupValidationErrorLike, dB as defineRequestSchema, dC as fromAjv, dD as fromArkType, dE as fromIoTs, dF as fromJoi, dG as fromStandardSchema, dH as fromSuperstruct, dI as fromValibot, dJ as fromVine, dK as fromYup, dL as fromZod, dM as parseBody, dN as parseBodyWithSchema, dO as parseNestedBodyWithSchema, dP as parsePathParam, dQ as parseQuery } from './parsers-BrVRL2fg.mjs';
2
2
  import { z } from 'zod';
3
3
  import 'mongoose';
4
4
  import 'express';
package/advanced.d.ts CHANGED
@@ -1,4 +1,4 @@
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 AjvValidationErrorLike, n as AjvValidatorLike, o as AllowedOutputFieldOptions, p as ArkTypeErrorsLike, q as ArkTypeLike, r as ArkTypeProblemLike, s as AuthorizedListResult, t as AuthorizedSingleResult, B as BaseFilterAccess, C as Change, u as Codes, v as CorrelatedCountInclude, w as CorrelatedFilter, x as CorrelatedInclude, y as CorrelatedIncludeArgs, z as CorrelatedListInclude, D as CorrelatedReadByFilterInclude, E as CorrelatedReadByIdInclude, F as CountBody, G as CreateArgs, H as CreateAuthorization, I as CreateOptions, J as CreateQueryInput, K as CustomHeaders, L as DATA_MIDDLEWARE, M as DataBaseFilterHook, N as DataFieldOptions, O as DataFilter, P as DataFindArgs, Q as DataFindOneArgs, R as DataFindOneOptions, S as DataFindOptions, T as DataHook, U as DataHookContext, V as DataIdentifierHook, W as DataListHook, X as DataOverrideFilterHook, Y as DataRequest, Z as DataRequestSchemas, _ as DataRouterOptions, $ as DecorateAccess, a0 as DecorateAllAccess, a1 as DeepFieldPath, a2 as DefaultModelRouterOptions, a3 as Defaults, a4 as DistinctArgs, a5 as DistinctBody, a6 as DocPermissionsAccess, a7 as DocumentAuthorization, a8 as ErrorResult, a9 as ExistsOptions, aa as ExtendedDataRouterOptions, ab as ExtendedDefaultModelRouterOptions, ac as ExtendedModelRouterOptions, ad as FieldAuthorization, ae as FieldOperationAccess, af as Filter, ag as FilterOperator, ah as FindAccess, ai as FindArgs, aj as FindByIdArgs, ak as FindByIdOptions, al as FindOneArgs, am as FindOneOptions, an as FindOptions, ao as GlobalOptions, ap as GlobalPermissionValue, aq as GuardHook, ar as HydrationMode, as as IdentifierHook, at as Include, au as InputFieldAuthorization, av as InputFieldPath, aw as IoTsContextEntryLike, ax as IoTsDecodeErrorLike, ay as IoTsDecoderLike, az as JoiSchemaLike, aA as JoiValidationErrorDetailLike, aB as KeyValueProjection, aC as LegacyInclude, aD as ListQueryInput, aE as ListResult, aF as MIDDLEWARE, aG as MaybePromise, aH as ModelBaseFilterHook, aI as ModelChangeHook, aJ as ModelDeleteHook, aK as ModelDocPermissionsHook, aL as ModelDocument, aM as ModelDocumentHook, aN as ModelHook, aO as ModelHookContext, aP as ModelHydrationOptions, aQ as ModelIdentifierHook, aR as ModelListHook, aS as ModelOverrideFilterHook, aT as ModelRequest, aU as ModelRouterOptions, aV as ModelValidateHook, aW as ModelVirtualAccess, aX as ModelVirtualAccessRecord, aY as ModelVirtualContext, aZ as ModelVirtualDescriptor, a_ as ModelVirtualDoc, a$ as ModelVirtualGetter, b0 as ModelVirtualLeaf, b1 as ModelVirtualRecordAccess, b2 as ModelVirtuals, b3 as MutationAuthorization, b4 as NewArgs, b5 as NewOptions, b6 as OperationAccess, b7 as OperationAuthorization, b8 as OutputAuthorization, b9 as OutputFieldOptions, ba as OutputFieldPath, bb as OutputPlanningOptions, bc as PERMISSIONS, bd as PERMISSION_KEYS, be as PairedRouteAccess, bf as ParentRef, bg as PathValue, bh as PermissionSchema, bi as Populate, bj as PopulateAccess, bk as PopulatePlanningOptions, bl as PrepareAccess, bm as Projection, bn as PublicCreateArgs, bo as PublicCreateOptions, bp as PublicErrorResult, bq as PublicListArgs, br as PublicListOptions, bs as PublicListResult, bt as PublicOutput, bu as PublicReadArgs, bv as PublicReadOptions, bw as PublicServiceResult, bx as PublicSingleResult, by as PublicSubdocumentCreateOptions, bz as PublicSubdocumentListOptions, bA as PublicSubdocumentMutationOptions, bB as PublicSubdocumentReadOptions, bC as PublicUpdateArgs, bD as PublicUpdateOptions, bE as PublicUpsertArgs, bF as PublicUpsertOptions, bG as ReadQueryInput, bH as RelatedAuthorization, bI as Request, bJ as RequestSchemaAdapter, bK as RequestSchemaFailure, bL as RequestSchemaIssue, bM as RequestSchemaLike, bN as RequestSchemaOptions, bO as RequestSchemaResult, bP as RequestSchemaSuccess, bQ as RequestSchemaValidator, bR as RequestSchemas, bS as RootDataListQueryEntry, bT as RootDataOperation, bU as RootDataReadByFilterQueryEntry, bV as RootDataReadByIdQueryEntry, bW as RootModelCountQueryEntry, bX as RootModelCreateQueryEntry, bY as RootModelDeleteQueryEntry, bZ as RootModelDistinctQueryEntry, b_ as RootModelListQueryEntry, b$ as RootModelNewQueryEntry, c0 as RootModelOperation, c1 as RootModelReadByFilterQueryEntry, c2 as RootModelReadByIdQueryEntry, c3 as RootModelSubBulkUpdateQueryEntry, c4 as RootModelSubCreateQueryEntry, c5 as RootModelSubDeleteQueryEntry, c6 as RootModelSubListQueryEntry, c7 as RootModelSubReadQueryEntry, c8 as RootModelSubUpdateQueryEntry, c9 as RootModelUpdateQueryEntry, ca as RootModelUpsertQueryEntry, cb as RootOperationResult, cc as RootQueryEntry, cd as RootRouterOptions, ce as RootSubOperation, cf as RootTarget, cg as RouteBaseAccess, ch as RouteGuardAccess, ci as RouteVariant, cj as RouteVariantAccess, ck as RowAuthorization, cl as SelectAccess, cm as SelectedPopulatedPublicOutput, cn as SelectedPublicOutput, co as ServiceAuthorization, cp as ServiceOutputContext, cq as ServiceOutputDecorator, cr as ServiceResult, cs as SingleResult, ct as Sort, cu as SortOrder, cv as StandardSchemaFailure, cw as StandardSchemaInferOutput, cx as StandardSchemaIssue, cy as StandardSchemaPathSegment, cz as StandardSchemaResult, cA as StandardSchemaSuccess, cB as StandardSchemaV1, cC as StatusCodes, cD as SubListBody, cE as SubOperationAccess, cF as SubPopulate, cG as SubQueryEntry, cH as SubReadBody, cI as SubRouteGuardOptions, cJ as SubdocumentBulkRecord, cK as SubdocumentBulkUpdateInput, cL as SubdocumentCreateAuthorization, cM as SubdocumentCreateInput, cN as SubdocumentCreateOptions, cO as SubdocumentCreateVisibilityAuthorization, cP as SubdocumentDeleteAuthorization, cQ as SubdocumentDeleteOptions, cR as SubdocumentGateAuthorization, cS as SubdocumentId, cT as SubdocumentInputAuthorization, cU as SubdocumentListOptions, cV as SubdocumentModel, cW as SubdocumentMutationAuthorization, cX as SubdocumentName, cY as SubdocumentOutputAuthorization, cZ as SubdocumentParentArgs, c_ as SubdocumentParentOptions, c$ as SubdocumentReadAuthorization, d0 as SubdocumentReadOptions, d1 as SubdocumentRecord, d2 as SubdocumentUpdateOptions, d3 as SubdocumentVirtuals, d4 as SubdocumentVisibilityAuthorization, d5 as SuperstructFailureLike, d6 as SuperstructValidateLike, d7 as Task, d8 as TaskType, d9 as TransformAccess, da as TypedFilter, db as UpdateByIdArgs, dc as UpdateByIdOptions, dd as UpdateOneArgs, de as UpdateOneOptions, df as UpdateQueryInput, dg as UpsertArgs, dh as UpsertOptions, di as UpsertQueryInput, dj as ValibotIssueLike, dk as ValibotPathItemLike, dl as ValibotSafeParseLike, dm as ValibotSafeParseResult, dn as ValidateAccess, dp as ValidateRule, dq as Validation, dr as ValidationError, ds as VineValidationErrorLike, dt as VineValidationMessageLike, du as VineValidatorLike, dv as VirtualSubModel, dw as WithVirtuals, dx as YupSchemaLike, dy as YupValidationErrorLike, dz as defineRequestSchema, dA as fromAjv, dB as fromArkType, dC as fromIoTs, dD as fromJoi, dE as fromStandardSchema, dF as fromSuperstruct, dG as fromValibot, dH as fromVine, dI as fromYup, dJ as fromZod, dK as parseBody, dL as parseBodyWithSchema, dM as parseNestedBodyWithSchema, dN as parsePathParam, dO as parseQuery } from './parsers-ZSrF7SNu.js';
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 AjvValidationErrorLike, n as AjvValidatorLike, o as AllowedOutputFieldOptions, p as ArkTypeErrorsLike, q as ArkTypeLike, r as ArkTypeProblemLike, s as AuthorizedListResult, t as AuthorizedSingleResult, B as BaseFilterAccess, C as Change, u as Codes, v as CorrelatedCountInclude, w as CorrelatedFilter, x as CorrelatedInclude, y as CorrelatedIncludeArgs, z as CorrelatedListInclude, D as CorrelatedReadByFilterInclude, E as CorrelatedReadByIdInclude, F as CountBody, G as CreateArgs, H as CreateAuthorization, I as CreateOptions, J as CreateQueryInput, K as CustomHeaders, L as DATA_MIDDLEWARE, M as DataBaseFilterHook, N as DataFieldOptions, O as DataFilter, P as DataFindArgs, Q as DataFindOneArgs, R as DataFindOneOptions, S as DataFindOptions, T as DataHook, U as DataHookContext, V as DataIdentifierHook, W as DataListHook, X as DataOverrideFilterHook, Y as DataRequest, Z as DataRequestSchemas, _ as DataRouterOptions, $ as DecorateAccess, a0 as DecorateAllAccess, a1 as DeepFieldPath, a2 as DefaultModelRouterOptions, a3 as Defaults, a4 as DistinctArgs, a5 as DistinctBody, a6 as DocPermissionsAccess, a7 as DocumentAuthorization, a8 as ErrorResult, a9 as ExistsOptions, aa as ExtendedDataRouterOptions, ab as ExtendedDefaultModelRouterOptions, ac as ExtendedModelRouterOptions, ad as FieldAuthorization, ae as FieldOperationAccess, af as Filter, ag as FilterOperator, ah as FindAccess, ai as FindArgs, aj as FindByIdArgs, ak as FindByIdOptions, al as FindOneArgs, am as FindOneOptions, an as FindOptions, ao as GlobalOptions, ap as GlobalPermissionValue, aq as GuardHook, ar as HydrationMode, as as IdentifierHook, at as Include, au as InputFieldAuthorization, av as InputFieldPath, aw as IoTsContextEntryLike, ax as IoTsDecodeErrorLike, ay as IoTsDecoderLike, az as JoiSchemaLike, aA as JoiValidationErrorDetailLike, aB as KeyValueProjection, aC as LegacyInclude, aD as ListQueryInput, aE as ListResult, aF as MIDDLEWARE, aG as MaybePromise, aH as ModelBaseFilterHook, aI as ModelChangeHook, aJ as ModelDeleteHook, aK as ModelDocPermissionsHook, aL as ModelDocument, aM as ModelDocumentHook, aN as ModelHook, aO as ModelHookContext, aP as ModelHydrationOptions, aQ as ModelIdentifierHook, aR as ModelListHook, aS as ModelOverrideFilterHook, aT as ModelRequest, aU as ModelRouterOptions, aV as ModelValidateHook, aW as ModelVirtualAccess, aX as ModelVirtualAccessRecord, aY as ModelVirtualContext, aZ as ModelVirtualDescriptor, a_ as ModelVirtualDoc, a$ as ModelVirtualGetter, b0 as ModelVirtualLeaf, b1 as ModelVirtualPopulateDependency, b2 as ModelVirtualPopulateInputs, b3 as ModelVirtualRecordAccess, b4 as ModelVirtuals, b5 as MutationAuthorization, b6 as NewArgs, b7 as NewOptions, b8 as OperationAccess, b9 as OperationAuthorization, ba as OutputAuthorization, bb as OutputFieldOptions, bc as OutputFieldPath, bd as OutputPlanningOptions, be as PERMISSIONS, bf as PERMISSION_KEYS, bg as PairedRouteAccess, bh as ParentRef, bi as PathValue, bj as PermissionSchema, bk as Populate, bl as PopulateAccess, bm as PopulatePlanningOptions, bn as PrepareAccess, bo as Projection, bp as PublicCreateArgs, bq as PublicCreateOptions, br as PublicErrorResult, bs as PublicListArgs, bt as PublicListOptions, bu as PublicListResult, bv as PublicOutput, bw as PublicReadArgs, bx as PublicReadOptions, by as PublicServiceResult, bz as PublicSingleResult, bA as PublicSubdocumentCreateOptions, bB as PublicSubdocumentListOptions, bC as PublicSubdocumentMutationOptions, bD as PublicSubdocumentReadOptions, bE as PublicUpdateArgs, bF as PublicUpdateOptions, bG as PublicUpsertArgs, bH as PublicUpsertOptions, bI as ReadQueryInput, bJ as RelatedAuthorization, bK as Request, bL as RequestSchemaAdapter, bM as RequestSchemaFailure, bN as RequestSchemaIssue, bO as RequestSchemaLike, bP as RequestSchemaOptions, bQ as RequestSchemaResult, bR as RequestSchemaSuccess, bS as RequestSchemaValidator, bT as RequestSchemas, bU as RootDataListQueryEntry, bV as RootDataOperation, bW as RootDataReadByFilterQueryEntry, bX as RootDataReadByIdQueryEntry, bY as RootModelCountQueryEntry, bZ as RootModelCreateQueryEntry, b_ as RootModelDeleteQueryEntry, b$ as RootModelDistinctQueryEntry, c0 as RootModelListQueryEntry, c1 as RootModelNewQueryEntry, c2 as RootModelOperation, c3 as RootModelReadByFilterQueryEntry, c4 as RootModelReadByIdQueryEntry, c5 as RootModelSubBulkUpdateQueryEntry, c6 as RootModelSubCreateQueryEntry, c7 as RootModelSubDeleteQueryEntry, c8 as RootModelSubListQueryEntry, c9 as RootModelSubReadQueryEntry, ca as RootModelSubUpdateQueryEntry, cb as RootModelUpdateQueryEntry, cc as RootModelUpsertQueryEntry, cd as RootOperationResult, ce as RootQueryEntry, cf as RootRouterOptions, cg as RootSubOperation, ch as RootTarget, ci as RouteBaseAccess, cj as RouteGuardAccess, ck as RouteVariant, cl as RouteVariantAccess, cm as RowAuthorization, cn as SelectAccess, co as SelectedPopulatedPublicOutput, cp as SelectedPublicOutput, cq as ServiceAuthorization, cr as ServiceOutputContext, cs as ServiceOutputDecorator, ct as ServiceResult, cu as SingleResult, cv as Sort, cw as SortOrder, cx as StandardSchemaFailure, cy as StandardSchemaInferOutput, cz as StandardSchemaIssue, cA as StandardSchemaPathSegment, cB as StandardSchemaResult, cC as StandardSchemaSuccess, cD as StandardSchemaV1, cE as StatusCodes, cF as SubListBody, cG as SubOperationAccess, cH as SubPopulate, cI as SubQueryEntry, cJ as SubReadBody, cK as SubRouteGuardOptions, cL as SubdocumentBulkRecord, cM as SubdocumentBulkUpdateInput, cN as SubdocumentCreateAuthorization, cO as SubdocumentCreateInput, cP as SubdocumentCreateOptions, cQ as SubdocumentCreateVisibilityAuthorization, cR as SubdocumentDeleteAuthorization, cS as SubdocumentDeleteOptions, cT as SubdocumentGateAuthorization, cU as SubdocumentId, cV as SubdocumentInputAuthorization, cW as SubdocumentListOptions, cX as SubdocumentModel, cY as SubdocumentMutationAuthorization, cZ as SubdocumentName, c_ as SubdocumentOutputAuthorization, c$ as SubdocumentParentArgs, d0 as SubdocumentParentOptions, d1 as SubdocumentReadAuthorization, d2 as SubdocumentReadOptions, d3 as SubdocumentRecord, d4 as SubdocumentUpdateOptions, d5 as SubdocumentVirtuals, d6 as SubdocumentVisibilityAuthorization, d7 as SuperstructFailureLike, d8 as SuperstructValidateLike, d9 as Task, da as TaskType, db as TransformAccess, dc as TypedFilter, dd as UpdateByIdArgs, de as UpdateByIdOptions, df as UpdateOneArgs, dg as UpdateOneOptions, dh as UpdateQueryInput, di as UpsertArgs, dj as UpsertOptions, dk as UpsertQueryInput, dl as ValibotIssueLike, dm as ValibotPathItemLike, dn as ValibotSafeParseLike, dp as ValibotSafeParseResult, dq as ValidateAccess, dr as ValidateRule, ds as Validation, dt as ValidationError, du as VineValidationErrorLike, dv as VineValidationMessageLike, dw as VineValidatorLike, dx as VirtualSubModel, dy as WithVirtuals, dz as YupSchemaLike, dA as YupValidationErrorLike, dB as defineRequestSchema, dC as fromAjv, dD as fromArkType, dE as fromIoTs, dF as fromJoi, dG as fromStandardSchema, dH as fromSuperstruct, dI as fromValibot, dJ as fromVine, dK as fromYup, dL as fromZod, dM as parseBody, dN as parseBodyWithSchema, dO as parseNestedBodyWithSchema, dP as parsePathParam, dQ as parseQuery } from './parsers-BrVRL2fg.js';
2
2
  import { z } from 'zod';
3
3
  import 'mongoose';
4
4
  import 'express';