@web-ts-toolkit/access-router 0.55.0 → 0.56.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 +128 -23
- package/advanced.d.mts +1 -1
- package/advanced.d.ts +1 -1
- package/advanced.js +12 -2
- package/advanced.mjs +12 -2
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.js +103 -43
- package/index.mjs +103 -43
- package/llms.txt +3 -2
- package/package.json +3 -3
- package/{parsers-BrVRL2fg.d.mts → parsers-BXKoUKMa.d.mts} +59 -8
- package/{parsers-BrVRL2fg.d.ts → parsers-BXKoUKMa.d.ts} +59 -8
package/README.md
CHANGED
|
@@ -126,7 +126,7 @@ package-managed execution, falling back to `defaultRuntime` outside it.
|
|
|
126
126
|
|
|
127
127
|
| Layer / public type | Where to put it | Scope and examples |
|
|
128
128
|
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
129
|
-
| Runtime/global — `GlobalOptions` | `api.setGlobalOptions({...})`, `api.setGlobalOption(key, value)`; `api.set` is an alias for these forms | That runtime's request grants (`globalPermissions`, `requestPermissionField`), logger, registered-populate policy and `requestComplexity`.
|
|
129
|
+
| Runtime/global — `GlobalOptions` | `api.setGlobalOptions({...})`, `api.setGlobalOption(key, value)`; `api.set` is an alias for these forms | That runtime's request grants (`globalPermissions`, `requestPermissionField`), logger, registered-populate/private-input read policy and `requestComplexity`. |
|
|
130
130
|
| Model defaults — `DefaultModelRouterOptions` | `api.setDefaultModelOptions({...})`, `api.setDefaultModelOption(path, value)` | Shared model starting values such as `listHardLimit`, IDs, route segments, `operationAccess`, `hydration` and metadata posture. Data/root routers do not inherit them. |
|
|
131
131
|
| Model router — `ModelRouterOptions<Model, Virtuals>` | `api.createRouter(Model, {...})`, then `router.setOptions`, `router.setOption` / `router.set` | One registered model's guards, `permissionSchema`, hooks, virtuals, request schemas, `hydration` and method defaults. Routers for the same model/runtime share its stored options. |
|
|
132
132
|
| Data router — `DataRouterOptions<Data>` | `api.createDataRouter(name, {...})`, its setters, or `api.runtime.setDataOptions` / `setDataOption` | Owned in-memory `data`, list/read guards, request-only fields/filters and decorators. No model `defaults` or model authorization policy. Set `idParam` and `idField` explicitly for data identifier routes. |
|
|
@@ -2586,12 +2586,56 @@ The source ref is retained automatically; repeating it in local `dependsOn` is u
|
|
|
2586
2586
|
resolved getter's fourth argument**. It neither requests public population nor
|
|
2587
2587
|
grants output. HTTP, root, service query and client options cannot declare it.
|
|
2588
2588
|
|
|
2589
|
+
#### Runtime private-read mode
|
|
2590
|
+
|
|
2591
|
+
`GlobalOptions.requireReadOperationAccessForPopulateDependencies` defaults to **true**.
|
|
2592
|
+
True requires the original caller's captured target base `operationAccess.read` before
|
|
2593
|
+
private loading. Set **literal boolean false** on the owning runtime to allow declared
|
|
2594
|
+
private computation inputs despite that operation denial:
|
|
2595
|
+
|
|
2596
|
+
<!-- doc-example: partial -->
|
|
2597
|
+
|
|
2598
|
+
```ts
|
|
2599
|
+
import { createAccessRuntime, type GlobalOptions } from '@web-ts-toolkit/access-router';
|
|
2600
|
+
|
|
2601
|
+
const api = createAccessRuntime();
|
|
2602
|
+
api.setGlobalOptions({ requireReadOperationAccessForPopulateDependencies: false });
|
|
2603
|
+
// The exact setter and api.set(key, value)/api.set(options) aliases are also typed.
|
|
2604
|
+
api.setGlobalOption('requireReadOperationAccessForPopulateDependencies', false);
|
|
2605
|
+
const snapshot: GlobalOptions = api.getGlobalOptions();
|
|
2606
|
+
const mode: boolean | undefined = api.getGlobalOption('requireReadOperationAccessForPopulateDependencies');
|
|
2607
|
+
void [snapshot, mode];
|
|
2608
|
+
```
|
|
2609
|
+
|
|
2610
|
+
Missing/undefined or malformed JavaScript values (`'false'`, `0`, null, objects)
|
|
2611
|
+
use the conservative true mode; typed setters accept only boolean/undefined. An
|
|
2612
|
+
omitted property in a shallow object setter preserves the current setting. The
|
|
2613
|
+
flag is captured with source/target configuration and query intent **before the first
|
|
2614
|
+
await**. Nested related/embedded/subdocument output retains that call's mode; later
|
|
2615
|
+
calls see updates. Separate runtimes remain isolated.
|
|
2616
|
+
|
|
2617
|
+
This is **server/runtime configuration**, not a model default, service query option,
|
|
2618
|
+
HTTP/root/client control or persisted capability. Business fields with the same
|
|
2619
|
+
spelling keep ordinary data semantics. It is independent of
|
|
2620
|
+
`requireRegisteredPopulateModels`: private targets still require eager registration
|
|
2621
|
+
and valid static server declarations in either mode.
|
|
2622
|
+
|
|
2623
|
+
False bypasses **only private target-operation read admission**. Source/target
|
|
2624
|
+
`permissionSchema` input-field rules are already bypassed by the declaration;
|
|
2625
|
+
the virtual's own output authorization still governs its result. Target request-mode
|
|
2626
|
+
`baseFilter.read`, `overrideFilter.read` and retained source IDs still constrain every
|
|
2627
|
+
private read. False grants no public target read, field, row, query or write authority.
|
|
2628
|
+
If only the virtual is output-eligible, false mode adds no operation check solely to
|
|
2629
|
+
fetch its private inputs. A potentially visible reference has a separate target-read
|
|
2630
|
+
output check in **both** modes, as [specified below](#target-authority-selection-and-reconstruction).
|
|
2631
|
+
|
|
2589
2632
|
#### Runnable private dependency example
|
|
2590
2633
|
|
|
2591
2634
|
Save as `private-populate-example.mts` and run with Node 22.18+ or compile with
|
|
2592
2635
|
TypeScript/NodeNext. Install the package, Express and Mongoose as above. This
|
|
2593
2636
|
self-contained example creates/removes a uniquely named database, registers the
|
|
2594
|
-
target **before** the source, and checks
|
|
2637
|
+
target **before** the source, and checks population, exact IDs and omission, including
|
|
2638
|
+
false-mode computation with a selected/permitted source and denied target. The example
|
|
2595
2639
|
tenant is server-owned; real applications derive it from their authenticated actor.
|
|
2596
2640
|
|
|
2597
2641
|
<!-- doc-example: complete-runtime -->
|
|
@@ -2708,9 +2752,32 @@ async function runPrivatePopulateExample() {
|
|
|
2708
2752
|
// Denying the source field also leaves only the authorized virtual result.
|
|
2709
2753
|
orders.permissionSchema('account', false);
|
|
2710
2754
|
assert.deepEqual(await read({ select }), { canPlaceOrder: true });
|
|
2711
|
-
//
|
|
2755
|
+
// Default true: input-field authority does not bypass the target's base read operation.
|
|
2712
2756
|
accounts.setOption('operationAccess.read', false);
|
|
2713
2757
|
assert.deepEqual(await read({ select: ['canPlaceOrder', '-_id'] }), {});
|
|
2758
|
+
// Select and permit the source ref: denied target read removes even its ID.
|
|
2759
|
+
orders.permissionSchema('account', true);
|
|
2760
|
+
assert.deepEqual(await read({ select }), {});
|
|
2761
|
+
api.setGlobalOptions({ requireReadOperationAccessForPopulateDependencies: false });
|
|
2762
|
+
assert.deepEqual(await read({ select }), { canPlaceOrder: true });
|
|
2763
|
+
// An ordinary list-populate grant cannot override the additional base-read visibility gate.
|
|
2764
|
+
accounts.setOption('operationAccess.list', true);
|
|
2765
|
+
assert.deepEqual(await read({ select, populate: [{ path: 'account', select: 'name -_id', access: 'list' }] }), {
|
|
2766
|
+
canPlaceOrder: true,
|
|
2767
|
+
});
|
|
2768
|
+
// Strict control: denied target read now prevents private computation too.
|
|
2769
|
+
api.setGlobalOption('requireReadOperationAccessForPopulateDependencies', true);
|
|
2770
|
+
assert.deepEqual(await read({ select }), {});
|
|
2771
|
+
// Allowed-target controls in BOTH modes: original public mask or exact original ID.
|
|
2772
|
+
accounts.setOption('operationAccess.read', true);
|
|
2773
|
+
for (const strict of [true, false]) {
|
|
2774
|
+
api.setGlobalOption('requireReadOperationAccessForPopulateDependencies', strict);
|
|
2775
|
+
assert.deepEqual(await read({ select, populate: [{ path: 'account', select: 'name -_id' }] }), {
|
|
2776
|
+
account: { name: 'Main' },
|
|
2777
|
+
canPlaceOrder: true,
|
|
2778
|
+
});
|
|
2779
|
+
assert.deepEqual(await read({ select }), { account: String(account._id), canPlaceOrder: true });
|
|
2780
|
+
}
|
|
2714
2781
|
} finally {
|
|
2715
2782
|
if (server)
|
|
2716
2783
|
await new Promise<void>((resolve, reject) => server!.close((error) => (error ? reject(error) : resolve())));
|
|
@@ -2753,12 +2820,13 @@ becomes computed output**; this is not a prohibition on returning derived values
|
|
|
2753
2820
|
|
|
2754
2821
|
#### Target authority, selection and reconstruction
|
|
2755
2822
|
|
|
2756
|
-
Private targets
|
|
2757
|
-
source lists, writes and templates. The original actor's `operationAccess.read
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2823
|
+
Private targets use captured base **`read`** row semantics, including array refs,
|
|
2824
|
+
source lists, writes and templates. The original actor's `operationAccess.read` gates
|
|
2825
|
+
private loading in default/true mode; false bypasses only that admission. In either
|
|
2826
|
+
mode, `overrideFilter.read` (starting with `{}`) and `baseFilter.read` use request row
|
|
2827
|
+
authority with their normal exact → default → bare fallback/cache rules (including
|
|
2828
|
+
runtime defaults). Mandatory source IDs are ANDed afterward, preserving tenant scope.
|
|
2829
|
+
There is no private read-to-list fallback or route-variant gate. `authorization.related` governs only an ordinary
|
|
2762
2830
|
requested populate/include; its grants/replacement rows, public `match`, `access`
|
|
2763
2831
|
and `select` cannot redefine private inputs. A related policy naming only a
|
|
2764
2832
|
dependency-only path is unused/invalid.
|
|
@@ -2771,14 +2839,31 @@ separate and immutable. Even a readable private field is omitted unless original
|
|
|
2771
2839
|
selected and permitted. Public exclusions and `-_id` remain effective. Different
|
|
2772
2840
|
public match/access/row scopes require independent queries.
|
|
2773
2841
|
|
|
2842
|
+
**Independent reference visibility, in both modes:** for paths in an **active selected/
|
|
2843
|
+
applicable `dependsOnPopulate` plan**, the captured target base **read** rule and original
|
|
2844
|
+
actor/permissions decide visibility separately from private fetch availability. It uses
|
|
2845
|
+
the same exact/default/bare/runtime-default semantics, not a route variant or an ordinary
|
|
2846
|
+
populate list/custom rule. A public `authorization.related` operation grant cannot
|
|
2847
|
+
override it. Strict private admission is reused for this decision; false mode evaluates
|
|
2848
|
+
the output-only check only after source selection/field authorization makes output eligible.
|
|
2849
|
+
|
|
2850
|
+
| Source field / captured caller target base read / original query | Returned dependency-backed reference in either mode |
|
|
2851
|
+
| -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
2852
|
+
| Source unselected, excluded or denied | Omitted entirely |
|
|
2853
|
+
| Source selected/permitted, target read denied or check failed | Omitted entirely, **including its ID**, with or without ordinary population |
|
|
2854
|
+
| Source selected/permitted, target read allowed, ordinary population requested/admitted | Original requested and authorized populated projection |
|
|
2855
|
+
| Source selected/permitted, target read allowed, no ordinary population | Exact original ID/array of IDs |
|
|
2856
|
+
|
|
2774
2857
|
The original query includes resolved server defaults. A default populate is ordinary
|
|
2775
|
-
population; explicit `populate: []` suppresses it.
|
|
2776
|
-
its original target projection, match/missing/null/array behavior.
|
|
2777
|
-
population
|
|
2778
|
-
|
|
2779
|
-
target
|
|
2780
|
-
|
|
2781
|
-
runs
|
|
2858
|
+
population; explicit `populate: []` suppresses it. Allowed ordinary population retains
|
|
2859
|
+
its original target projection, match/missing/null/array behavior. Without admitted
|
|
2860
|
+
ordinary population, read-allowed refs restore exact pre-populate IDs/arrays, including
|
|
2861
|
+
missing target IDs, order, duplicates, nulls, empty arrays and own absence. Denied/failed
|
|
2862
|
+
target-read visibility always takes precedence over ID restoration, including after
|
|
2863
|
+
private row denial/query failure or getter omission/failure/deferred authorization denial.
|
|
2864
|
+
Cleanup runs before output copying/handles and presentation hooks/tasks. **No active
|
|
2865
|
+
dependency plan means ordinary reference/populate behavior is unchanged**; this is not
|
|
2866
|
+
a new gate on every reference in a model with virtuals.
|
|
2782
2867
|
|
|
2783
2868
|
#### Supported declarations and validation
|
|
2784
2869
|
|
|
@@ -2819,14 +2904,16 @@ runs even when the getter is omitted or fails, before presentation hooks/tasks.
|
|
|
2819
2904
|
#### Absence, errors, lifecycle and measured work
|
|
2820
2905
|
|
|
2821
2906
|
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
|
|
2823
|
-
|
|
2907
|
+
empty arrays invoke the getter with null/[] without a target query when private
|
|
2908
|
+
admission/row policy permits. Deleted/out-of-scope target rows become scalar null or null array slots;
|
|
2824
2909
|
private arrays preserve original order, duplicates and null/missing slots. Missing
|
|
2825
2910
|
target fields remain partial inputs; null/false/zero/empty-string stay present and
|
|
2826
2911
|
the getter decides what to return.
|
|
2827
2912
|
|
|
2828
|
-
|
|
2829
|
-
|
|
2913
|
+
In true mode, target read denial makes dependencies unavailable; in either mode,
|
|
2914
|
+
a terminal false `overrideFilter.read`/`baseFilter.read` does so. Affected virtuals
|
|
2915
|
+
are omitted even for null/empty source refs. In false mode, a denied/failed output-only
|
|
2916
|
+
read check hides the ref without removing otherwise available private computation. A
|
|
2830
2917
|
dependency-only query/hook/cast failure also omits them with structural-only logging.
|
|
2831
2918
|
There is no raw fallback, retry or new retryable write error: a successful write
|
|
2832
2919
|
stays successful. A failed query that also serves ordinary public population keeps
|
|
@@ -2840,7 +2927,8 @@ distinct, exists, delete identities, include-count and field helpers add no priv
|
|
|
2840
2927
|
dependency I/O/getters. `SubPopulate` remains path/select-only. Writes capture
|
|
2841
2928
|
post-save/post-afterPersist refs on detached output copies after lifecycle work;
|
|
2842
2929
|
hidden mutation rows do not run getters. `new` still ignores `args.select`, uses
|
|
2843
|
-
create access, and loads present default refs under
|
|
2930
|
+
create access, and loads present default refs under the captured private-read mode and
|
|
2931
|
+
request read-row scope without saving.
|
|
2844
2932
|
|
|
2845
2933
|
Private fetches use the receiving output's captured hydration: source read mode for
|
|
2846
2934
|
direct reads/populate, fixed lean for include targets, hydrated for dedicated child
|
|
@@ -2854,7 +2942,7 @@ issued 1 parent find + 2 target finds**, in lean and hydrated modes. Getter coun
|
|
|
2854
2942
|
were 4 and 96; observed persistence/getter peaks were 1/1 or 2/2 at matching limits.
|
|
2855
2943
|
Compatible rows/virtuals/scopes batch and deduplicate fetched IDs, not reconstructed
|
|
2856
2944
|
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
|
|
2945
|
+
captured request/runtime/family/private-read mode, hydration and ID/projection coverage. Different scopes
|
|
2858
2946
|
still query separately; ordinary per-parent correlated public queries remain
|
|
2859
2947
|
per-parent. This is not a constant-query-count promise for independent includes.
|
|
2860
2948
|
|
|
@@ -2862,9 +2950,26 @@ per-parent. This is not a constant-query-count promise for independent includes.
|
|
|
2862
2950
|
keep their first-argument and three-argument direct-call contract. Opt in by adding
|
|
2863
2951
|
the declaration and a separately typed descriptor/default fourth argument; no new
|
|
2864
2952
|
router-wide generic, entrypoint, client API or persisted-field migration is required.
|
|
2865
|
-
The
|
|
2953
|
+
The declaration's opt-in constraints are eager target registration and strict static
|
|
2866
2954
|
reference/target-selection validation; ordinary public populate grammar is unchanged.
|
|
2867
2955
|
|
|
2956
|
+
#### Release compatibility: dependency-reference omission
|
|
2957
|
+
|
|
2958
|
+
This release intentionally tightens the earlier private-dependency **D1** contract:
|
|
2959
|
+
for active dependency-backed refs, denied/failed caller target base read now removes
|
|
2960
|
+
the **entire field, including IDs**, even in default/true mode. Earlier denied ordinary
|
|
2961
|
+
population could leave IDs behind; that fallback is superseded in this scope, even
|
|
2962
|
+
without an ordinary populate descriptor and even with public list/custom access or a
|
|
2963
|
+
trusted related-operation grant. No active plan/no feature retains ordinary behavior.
|
|
2964
|
+
|
|
2965
|
+
Consumers must handle absent dependency-backed refs rather than assuming a denied
|
|
2966
|
+
population leaves an ID. Keep the default true for strict private admission, or set
|
|
2967
|
+
false explicitly when the authorized virtual is intended to compute despite target
|
|
2968
|
+
operation denial. False does **not** restore denied IDs or relax row filters. To return
|
|
2969
|
+
references, independently permit the source field and caller-context target base read;
|
|
2970
|
+
ordinary population still applies its original requested/authorized mask. Existing local
|
|
2971
|
+
views, fourth-argument isolation, registration, static-ref and hydration limitations remain.
|
|
2972
|
+
|
|
2868
2973
|
### Hook admission and reentrant service calls
|
|
2869
2974
|
|
|
2870
2975
|
`requestComplexity.maxHookConcurrency` (default `10`) limits **independently
|
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 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-
|
|
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-BXKoUKMa.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 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-
|
|
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-BXKoUKMa.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import 'mongoose';
|
|
4
4
|
import 'express';
|
package/advanced.js
CHANGED
|
@@ -1544,7 +1544,8 @@ function normalizeSelection(select, catalog, label) {
|
|
|
1544
1544
|
includeId: selection.includes("_id")
|
|
1545
1545
|
};
|
|
1546
1546
|
}
|
|
1547
|
-
function captureVirtualPopulateDependencies(runtime, modelName, options) {
|
|
1547
|
+
function captureVirtualPopulateDependencies(runtime, modelName, options, globalOptions = runtime.getGlobalOptions()) {
|
|
1548
|
+
const requireReadOperationAccessForPopulateDependencies = globalOptions.requireReadOperationAccessForPopulateDependencies !== false;
|
|
1548
1549
|
const model = runtime.getModelInstance(modelName);
|
|
1549
1550
|
const targets = /* @__PURE__ */ new Map();
|
|
1550
1551
|
const scopes = [];
|
|
@@ -1593,6 +1594,7 @@ function captureVirtualPopulateDependencies(runtime, modelName, options) {
|
|
|
1593
1594
|
{
|
|
1594
1595
|
catalog,
|
|
1595
1596
|
documentPermissionField,
|
|
1597
|
+
requireReadOperationAccessForPopulateDependencies,
|
|
1596
1598
|
operationAccess: { read: readOption("operationAccess.read") },
|
|
1597
1599
|
baseFilter: { read: readOption("baseFilter.read") },
|
|
1598
1600
|
overrideFilter: { read: readOption("overrideFilter.read") },
|
|
@@ -2021,6 +2023,7 @@ var AccessRuntime = class {
|
|
|
2021
2023
|
requestPermissionField: "_permissions",
|
|
2022
2024
|
globalPermissions: () => ({}),
|
|
2023
2025
|
requireRegisteredPopulateModels: true,
|
|
2026
|
+
requireReadOperationAccessForPopulateDependencies: true,
|
|
2024
2027
|
logger: defaultLogger,
|
|
2025
2028
|
requestComplexity: defaultRequestComplexity
|
|
2026
2029
|
},
|
|
@@ -2193,9 +2196,16 @@ var AccessRuntime = class {
|
|
|
2193
2196
|
}
|
|
2194
2197
|
/** Shallowly replace supplied global values; nested objects such as requestComplexity are not deep-merged. */
|
|
2195
2198
|
setGlobalOptions(options) {
|
|
2196
|
-
|
|
2199
|
+
const next = { ...options };
|
|
2200
|
+
if ("requireReadOperationAccessForPopulateDependencies" in next)
|
|
2201
|
+
next.requireReadOperationAccessForPopulateDependencies = next.requireReadOperationAccessForPopulateDependencies !== false;
|
|
2202
|
+
this.globalOptions.assign(next);
|
|
2197
2203
|
}
|
|
2198
2204
|
setGlobalOption(key, value) {
|
|
2205
|
+
if (key === "requireReadOperationAccessForPopulateDependencies") {
|
|
2206
|
+
this.globalOptions.set("requireReadOperationAccessForPopulateDependencies", value !== false);
|
|
2207
|
+
return;
|
|
2208
|
+
}
|
|
2199
2209
|
this.globalOptions.set(key, value);
|
|
2200
2210
|
}
|
|
2201
2211
|
getGlobalOptions() {
|
package/advanced.mjs
CHANGED
|
@@ -1475,7 +1475,8 @@ function normalizeSelection(select, catalog, label) {
|
|
|
1475
1475
|
includeId: selection.includes("_id")
|
|
1476
1476
|
};
|
|
1477
1477
|
}
|
|
1478
|
-
function captureVirtualPopulateDependencies(runtime, modelName, options) {
|
|
1478
|
+
function captureVirtualPopulateDependencies(runtime, modelName, options, globalOptions = runtime.getGlobalOptions()) {
|
|
1479
|
+
const requireReadOperationAccessForPopulateDependencies = globalOptions.requireReadOperationAccessForPopulateDependencies !== false;
|
|
1479
1480
|
const model = runtime.getModelInstance(modelName);
|
|
1480
1481
|
const targets = /* @__PURE__ */ new Map();
|
|
1481
1482
|
const scopes = [];
|
|
@@ -1524,6 +1525,7 @@ function captureVirtualPopulateDependencies(runtime, modelName, options) {
|
|
|
1524
1525
|
{
|
|
1525
1526
|
catalog,
|
|
1526
1527
|
documentPermissionField,
|
|
1528
|
+
requireReadOperationAccessForPopulateDependencies,
|
|
1527
1529
|
operationAccess: { read: readOption("operationAccess.read") },
|
|
1528
1530
|
baseFilter: { read: readOption("baseFilter.read") },
|
|
1529
1531
|
overrideFilter: { read: readOption("overrideFilter.read") },
|
|
@@ -1952,6 +1954,7 @@ var AccessRuntime = class {
|
|
|
1952
1954
|
requestPermissionField: "_permissions",
|
|
1953
1955
|
globalPermissions: () => ({}),
|
|
1954
1956
|
requireRegisteredPopulateModels: true,
|
|
1957
|
+
requireReadOperationAccessForPopulateDependencies: true,
|
|
1955
1958
|
logger: defaultLogger,
|
|
1956
1959
|
requestComplexity: defaultRequestComplexity
|
|
1957
1960
|
},
|
|
@@ -2124,9 +2127,16 @@ var AccessRuntime = class {
|
|
|
2124
2127
|
}
|
|
2125
2128
|
/** Shallowly replace supplied global values; nested objects such as requestComplexity are not deep-merged. */
|
|
2126
2129
|
setGlobalOptions(options) {
|
|
2127
|
-
|
|
2130
|
+
const next = { ...options };
|
|
2131
|
+
if ("requireReadOperationAccessForPopulateDependencies" in next)
|
|
2132
|
+
next.requireReadOperationAccessForPopulateDependencies = next.requireReadOperationAccessForPopulateDependencies !== false;
|
|
2133
|
+
this.globalOptions.assign(next);
|
|
2128
2134
|
}
|
|
2129
2135
|
setGlobalOption(key, value) {
|
|
2136
|
+
if (key === "requireReadOperationAccessForPopulateDependencies") {
|
|
2137
|
+
this.globalOptions.set("requireReadOperationAccessForPopulateDependencies", value !== false);
|
|
2138
|
+
return;
|
|
2139
|
+
}
|
|
2130
2140
|
this.globalOptions.set(key, value);
|
|
2131
2141
|
}
|
|
2132
2142
|
getGlobalOptions() {
|
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 { A as AccessRouterBaseRequest, aq as GuardHook, aT as ModelRequest, dR as AccessRuntime, _ as DataRouterOptions, Y as DataRequest, dS as DataService, aa as ExtendedDataRouterOptions, af as Filter, bo as Projection, cv as Sort, bk as Populate, aU as ModelRouterOptions, dT as Service, dU as PublicService, b3 as ModelVirtualRecordAccess, aZ as ModelVirtualDescriptor, a$ as ModelVirtualGetter, b0 as ModelVirtualLeaf, ac as ExtendedModelRouterOptions, ds as Validation, cf as RootRouterOptions, dV as OpenApiRouterOptions, dW as OpenApiRegistryOptions, dX as OpenApiRouteDescriptor, dY as OpenApiDocumentOptions, dZ as OpenApiParameter, d_ as OpenApiSchema, d$ as OpenApiResponses, ao as GlobalOptions, a2 as DefaultModelRouterOptions, ab as ExtendedDefaultModelRouterOptions } from './parsers-
|
|
4
|
-
export { e0 as AccessRouterPermissionMap, e1 as AccessRouterPermissions, c as AccessRouterRequest, d as AccessRouterRequestExtensions, l as AjvErrorObjectLike, n as AjvValidatorLike, o as AllowedOutputFieldOptions, p as ArkTypeErrorsLike, q as ArkTypeLike, s as AuthorizedListResult, t as AuthorizedSingleResult, H as CreateAuthorization, N as DataFieldOptions, a7 as DocumentAuthorization, ad as FieldAuthorization, ae as FieldOperationAccess, ap as GlobalPermissionValue, ar as HydrationMode, au as InputFieldAuthorization, av as InputFieldPath, aw as IoTsContextEntryLike, ax as IoTsDecodeErrorLike, ay as IoTsDecoderLike, az as JoiSchemaLike, aA as JoiValidationErrorDetailLike, aG as MaybePromise, aH as ModelBaseFilterHook, aJ as ModelDeleteHook, aK as ModelDocPermissionsHook, aM as ModelDocumentHook, aN as ModelHook, aP as ModelHydrationOptions, aQ as ModelIdentifierHook, aR as ModelListHook, aS as ModelOverrideFilterHook, aV as ModelValidateHook, aW as ModelVirtualAccess, aX as ModelVirtualAccessRecord, aY as ModelVirtualContext, a_ as ModelVirtualDoc, b1 as ModelVirtualPopulateDependency, b2 as ModelVirtualPopulateInputs, b4 as ModelVirtuals, b5 as MutationAuthorization, b6 as NewArgs, b7 as NewOptions, e2 as OpenApiMethod, b8 as OperationAccess, b9 as OperationAuthorization, ba as OutputAuthorization, bb as OutputFieldOptions, bc as OutputFieldPath, bd as OutputPlanningOptions, bg as PairedRouteAccess, bj as PermissionSchema, e3 as Permissions, bm as PopulatePlanningOptions, bA as PublicSubdocumentCreateOptions, bB as PublicSubdocumentListOptions, bC as PublicSubdocumentMutationOptions, bD as PublicSubdocumentReadOptions, bJ as RelatedAuthorization, bL as RequestSchemaAdapter, bM as RequestSchemaFailure, bN as RequestSchemaIssue, bO as RequestSchemaLike, bP as RequestSchemaOptions, bQ as RequestSchemaResult, bR as RequestSchemaSuccess, bS as RequestSchemaValidator, ci as RouteBaseAccess, cj as RouteGuardAccess, ck as RouteVariant, cl as RouteVariantAccess, cm as RowAuthorization, cq as ServiceAuthorization, cr as ServiceOutputContext, cs as ServiceOutputDecorator, cx as StandardSchemaFailure, cy as StandardSchemaInferOutput, cz as StandardSchemaIssue, cA as StandardSchemaPathSegment, cB as StandardSchemaResult, cC as StandardSchemaSuccess, cD as StandardSchemaV1, cG as SubOperationAccess, cK as SubRouteGuardOptions, cN as SubdocumentCreateAuthorization, cP as SubdocumentCreateOptions, cQ as SubdocumentCreateVisibilityAuthorization, cR as SubdocumentDeleteAuthorization, cS as SubdocumentDeleteOptions, cT as SubdocumentGateAuthorization, cV as SubdocumentInputAuthorization, cW as SubdocumentListOptions, cX as SubdocumentModel, cY as SubdocumentMutationAuthorization, cZ as SubdocumentName, c_ as SubdocumentOutputAuthorization, d1 as SubdocumentReadAuthorization, d2 as SubdocumentReadOptions, d4 as SubdocumentUpdateOptions, d5 as SubdocumentVirtuals, d6 as SubdocumentVisibilityAuthorization, d7 as SuperstructFailureLike, d8 as SuperstructValidateLike, dl as ValibotIssueLike, dm as ValibotPathItemLike, dn as ValibotSafeParseLike, dp as ValibotSafeParseResult, du as VineValidationErrorLike, dv as VineValidationMessageLike, dw as VineValidatorLike, dx as VirtualSubModel, dy as WithVirtuals, dz as YupSchemaLike, dA as YupValidationErrorLike, e4 as defaultRuntime, 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 } from './parsers-
|
|
3
|
+
import { A as AccessRouterBaseRequest, aq as GuardHook, aT as ModelRequest, dR as AccessRuntime, _ as DataRouterOptions, Y as DataRequest, dS as DataService, aa as ExtendedDataRouterOptions, af as Filter, bo as Projection, cv as Sort, bk as Populate, aU as ModelRouterOptions, dT as Service, dU as PublicService, b3 as ModelVirtualRecordAccess, aZ as ModelVirtualDescriptor, a$ as ModelVirtualGetter, b0 as ModelVirtualLeaf, ac as ExtendedModelRouterOptions, ds as Validation, cf as RootRouterOptions, dV as OpenApiRouterOptions, dW as OpenApiRegistryOptions, dX as OpenApiRouteDescriptor, dY as OpenApiDocumentOptions, dZ as OpenApiParameter, d_ as OpenApiSchema, d$ as OpenApiResponses, ao as GlobalOptions, a2 as DefaultModelRouterOptions, ab as ExtendedDefaultModelRouterOptions } from './parsers-BXKoUKMa.mjs';
|
|
4
|
+
export { e0 as AccessRouterPermissionMap, e1 as AccessRouterPermissions, c as AccessRouterRequest, d as AccessRouterRequestExtensions, l as AjvErrorObjectLike, n as AjvValidatorLike, o as AllowedOutputFieldOptions, p as ArkTypeErrorsLike, q as ArkTypeLike, s as AuthorizedListResult, t as AuthorizedSingleResult, H as CreateAuthorization, N as DataFieldOptions, a7 as DocumentAuthorization, ad as FieldAuthorization, ae as FieldOperationAccess, ap as GlobalPermissionValue, ar as HydrationMode, au as InputFieldAuthorization, av as InputFieldPath, aw as IoTsContextEntryLike, ax as IoTsDecodeErrorLike, ay as IoTsDecoderLike, az as JoiSchemaLike, aA as JoiValidationErrorDetailLike, aG as MaybePromise, aH as ModelBaseFilterHook, aJ as ModelDeleteHook, aK as ModelDocPermissionsHook, aM as ModelDocumentHook, aN as ModelHook, aP as ModelHydrationOptions, aQ as ModelIdentifierHook, aR as ModelListHook, aS as ModelOverrideFilterHook, aV as ModelValidateHook, aW as ModelVirtualAccess, aX as ModelVirtualAccessRecord, aY as ModelVirtualContext, a_ as ModelVirtualDoc, b1 as ModelVirtualPopulateDependency, b2 as ModelVirtualPopulateInputs, b4 as ModelVirtuals, b5 as MutationAuthorization, b6 as NewArgs, b7 as NewOptions, e2 as OpenApiMethod, b8 as OperationAccess, b9 as OperationAuthorization, ba as OutputAuthorization, bb as OutputFieldOptions, bc as OutputFieldPath, bd as OutputPlanningOptions, bg as PairedRouteAccess, bj as PermissionSchema, e3 as Permissions, bm as PopulatePlanningOptions, bA as PublicSubdocumentCreateOptions, bB as PublicSubdocumentListOptions, bC as PublicSubdocumentMutationOptions, bD as PublicSubdocumentReadOptions, bJ as RelatedAuthorization, bL as RequestSchemaAdapter, bM as RequestSchemaFailure, bN as RequestSchemaIssue, bO as RequestSchemaLike, bP as RequestSchemaOptions, bQ as RequestSchemaResult, bR as RequestSchemaSuccess, bS as RequestSchemaValidator, ci as RouteBaseAccess, cj as RouteGuardAccess, ck as RouteVariant, cl as RouteVariantAccess, cm as RowAuthorization, cq as ServiceAuthorization, cr as ServiceOutputContext, cs as ServiceOutputDecorator, cx as StandardSchemaFailure, cy as StandardSchemaInferOutput, cz as StandardSchemaIssue, cA as StandardSchemaPathSegment, cB as StandardSchemaResult, cC as StandardSchemaSuccess, cD as StandardSchemaV1, cG as SubOperationAccess, cK as SubRouteGuardOptions, cN as SubdocumentCreateAuthorization, cP as SubdocumentCreateOptions, cQ as SubdocumentCreateVisibilityAuthorization, cR as SubdocumentDeleteAuthorization, cS as SubdocumentDeleteOptions, cT as SubdocumentGateAuthorization, cV as SubdocumentInputAuthorization, cW as SubdocumentListOptions, cX as SubdocumentModel, cY as SubdocumentMutationAuthorization, cZ as SubdocumentName, c_ as SubdocumentOutputAuthorization, d1 as SubdocumentReadAuthorization, d2 as SubdocumentReadOptions, d4 as SubdocumentUpdateOptions, d5 as SubdocumentVirtuals, d6 as SubdocumentVisibilityAuthorization, d7 as SuperstructFailureLike, d8 as SuperstructValidateLike, dl as ValibotIssueLike, dm as ValibotPathItemLike, dn as ValibotSafeParseLike, dp as ValibotSafeParseResult, du as VineValidationErrorLike, dv as VineValidationMessageLike, dw as VineValidatorLike, dx as VirtualSubModel, dy as WithVirtuals, dz as YupSchemaLike, dA as YupValidationErrorLike, e4 as defaultRuntime, 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 } from './parsers-BXKoUKMa.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 { A as AccessRouterBaseRequest, aq as GuardHook, aT as ModelRequest, dR as AccessRuntime, _ as DataRouterOptions, Y as DataRequest, dS as DataService, aa as ExtendedDataRouterOptions, af as Filter, bo as Projection, cv as Sort, bk as Populate, aU as ModelRouterOptions, dT as Service, dU as PublicService, b3 as ModelVirtualRecordAccess, aZ as ModelVirtualDescriptor, a$ as ModelVirtualGetter, b0 as ModelVirtualLeaf, ac as ExtendedModelRouterOptions, ds as Validation, cf as RootRouterOptions, dV as OpenApiRouterOptions, dW as OpenApiRegistryOptions, dX as OpenApiRouteDescriptor, dY as OpenApiDocumentOptions, dZ as OpenApiParameter, d_ as OpenApiSchema, d$ as OpenApiResponses, ao as GlobalOptions, a2 as DefaultModelRouterOptions, ab as ExtendedDefaultModelRouterOptions } from './parsers-
|
|
4
|
-
export { e0 as AccessRouterPermissionMap, e1 as AccessRouterPermissions, c as AccessRouterRequest, d as AccessRouterRequestExtensions, l as AjvErrorObjectLike, n as AjvValidatorLike, o as AllowedOutputFieldOptions, p as ArkTypeErrorsLike, q as ArkTypeLike, s as AuthorizedListResult, t as AuthorizedSingleResult, H as CreateAuthorization, N as DataFieldOptions, a7 as DocumentAuthorization, ad as FieldAuthorization, ae as FieldOperationAccess, ap as GlobalPermissionValue, ar as HydrationMode, au as InputFieldAuthorization, av as InputFieldPath, aw as IoTsContextEntryLike, ax as IoTsDecodeErrorLike, ay as IoTsDecoderLike, az as JoiSchemaLike, aA as JoiValidationErrorDetailLike, aG as MaybePromise, aH as ModelBaseFilterHook, aJ as ModelDeleteHook, aK as ModelDocPermissionsHook, aM as ModelDocumentHook, aN as ModelHook, aP as ModelHydrationOptions, aQ as ModelIdentifierHook, aR as ModelListHook, aS as ModelOverrideFilterHook, aV as ModelValidateHook, aW as ModelVirtualAccess, aX as ModelVirtualAccessRecord, aY as ModelVirtualContext, a_ as ModelVirtualDoc, b1 as ModelVirtualPopulateDependency, b2 as ModelVirtualPopulateInputs, b4 as ModelVirtuals, b5 as MutationAuthorization, b6 as NewArgs, b7 as NewOptions, e2 as OpenApiMethod, b8 as OperationAccess, b9 as OperationAuthorization, ba as OutputAuthorization, bb as OutputFieldOptions, bc as OutputFieldPath, bd as OutputPlanningOptions, bg as PairedRouteAccess, bj as PermissionSchema, e3 as Permissions, bm as PopulatePlanningOptions, bA as PublicSubdocumentCreateOptions, bB as PublicSubdocumentListOptions, bC as PublicSubdocumentMutationOptions, bD as PublicSubdocumentReadOptions, bJ as RelatedAuthorization, bL as RequestSchemaAdapter, bM as RequestSchemaFailure, bN as RequestSchemaIssue, bO as RequestSchemaLike, bP as RequestSchemaOptions, bQ as RequestSchemaResult, bR as RequestSchemaSuccess, bS as RequestSchemaValidator, ci as RouteBaseAccess, cj as RouteGuardAccess, ck as RouteVariant, cl as RouteVariantAccess, cm as RowAuthorization, cq as ServiceAuthorization, cr as ServiceOutputContext, cs as ServiceOutputDecorator, cx as StandardSchemaFailure, cy as StandardSchemaInferOutput, cz as StandardSchemaIssue, cA as StandardSchemaPathSegment, cB as StandardSchemaResult, cC as StandardSchemaSuccess, cD as StandardSchemaV1, cG as SubOperationAccess, cK as SubRouteGuardOptions, cN as SubdocumentCreateAuthorization, cP as SubdocumentCreateOptions, cQ as SubdocumentCreateVisibilityAuthorization, cR as SubdocumentDeleteAuthorization, cS as SubdocumentDeleteOptions, cT as SubdocumentGateAuthorization, cV as SubdocumentInputAuthorization, cW as SubdocumentListOptions, cX as SubdocumentModel, cY as SubdocumentMutationAuthorization, cZ as SubdocumentName, c_ as SubdocumentOutputAuthorization, d1 as SubdocumentReadAuthorization, d2 as SubdocumentReadOptions, d4 as SubdocumentUpdateOptions, d5 as SubdocumentVirtuals, d6 as SubdocumentVisibilityAuthorization, d7 as SuperstructFailureLike, d8 as SuperstructValidateLike, dl as ValibotIssueLike, dm as ValibotPathItemLike, dn as ValibotSafeParseLike, dp as ValibotSafeParseResult, du as VineValidationErrorLike, dv as VineValidationMessageLike, dw as VineValidatorLike, dx as VirtualSubModel, dy as WithVirtuals, dz as YupSchemaLike, dA as YupValidationErrorLike, e4 as defaultRuntime, 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 } from './parsers-
|
|
3
|
+
import { A as AccessRouterBaseRequest, aq as GuardHook, aT as ModelRequest, dR as AccessRuntime, _ as DataRouterOptions, Y as DataRequest, dS as DataService, aa as ExtendedDataRouterOptions, af as Filter, bo as Projection, cv as Sort, bk as Populate, aU as ModelRouterOptions, dT as Service, dU as PublicService, b3 as ModelVirtualRecordAccess, aZ as ModelVirtualDescriptor, a$ as ModelVirtualGetter, b0 as ModelVirtualLeaf, ac as ExtendedModelRouterOptions, ds as Validation, cf as RootRouterOptions, dV as OpenApiRouterOptions, dW as OpenApiRegistryOptions, dX as OpenApiRouteDescriptor, dY as OpenApiDocumentOptions, dZ as OpenApiParameter, d_ as OpenApiSchema, d$ as OpenApiResponses, ao as GlobalOptions, a2 as DefaultModelRouterOptions, ab as ExtendedDefaultModelRouterOptions } from './parsers-BXKoUKMa.js';
|
|
4
|
+
export { e0 as AccessRouterPermissionMap, e1 as AccessRouterPermissions, c as AccessRouterRequest, d as AccessRouterRequestExtensions, l as AjvErrorObjectLike, n as AjvValidatorLike, o as AllowedOutputFieldOptions, p as ArkTypeErrorsLike, q as ArkTypeLike, s as AuthorizedListResult, t as AuthorizedSingleResult, H as CreateAuthorization, N as DataFieldOptions, a7 as DocumentAuthorization, ad as FieldAuthorization, ae as FieldOperationAccess, ap as GlobalPermissionValue, ar as HydrationMode, au as InputFieldAuthorization, av as InputFieldPath, aw as IoTsContextEntryLike, ax as IoTsDecodeErrorLike, ay as IoTsDecoderLike, az as JoiSchemaLike, aA as JoiValidationErrorDetailLike, aG as MaybePromise, aH as ModelBaseFilterHook, aJ as ModelDeleteHook, aK as ModelDocPermissionsHook, aM as ModelDocumentHook, aN as ModelHook, aP as ModelHydrationOptions, aQ as ModelIdentifierHook, aR as ModelListHook, aS as ModelOverrideFilterHook, aV as ModelValidateHook, aW as ModelVirtualAccess, aX as ModelVirtualAccessRecord, aY as ModelVirtualContext, a_ as ModelVirtualDoc, b1 as ModelVirtualPopulateDependency, b2 as ModelVirtualPopulateInputs, b4 as ModelVirtuals, b5 as MutationAuthorization, b6 as NewArgs, b7 as NewOptions, e2 as OpenApiMethod, b8 as OperationAccess, b9 as OperationAuthorization, ba as OutputAuthorization, bb as OutputFieldOptions, bc as OutputFieldPath, bd as OutputPlanningOptions, bg as PairedRouteAccess, bj as PermissionSchema, e3 as Permissions, bm as PopulatePlanningOptions, bA as PublicSubdocumentCreateOptions, bB as PublicSubdocumentListOptions, bC as PublicSubdocumentMutationOptions, bD as PublicSubdocumentReadOptions, bJ as RelatedAuthorization, bL as RequestSchemaAdapter, bM as RequestSchemaFailure, bN as RequestSchemaIssue, bO as RequestSchemaLike, bP as RequestSchemaOptions, bQ as RequestSchemaResult, bR as RequestSchemaSuccess, bS as RequestSchemaValidator, ci as RouteBaseAccess, cj as RouteGuardAccess, ck as RouteVariant, cl as RouteVariantAccess, cm as RowAuthorization, cq as ServiceAuthorization, cr as ServiceOutputContext, cs as ServiceOutputDecorator, cx as StandardSchemaFailure, cy as StandardSchemaInferOutput, cz as StandardSchemaIssue, cA as StandardSchemaPathSegment, cB as StandardSchemaResult, cC as StandardSchemaSuccess, cD as StandardSchemaV1, cG as SubOperationAccess, cK as SubRouteGuardOptions, cN as SubdocumentCreateAuthorization, cP as SubdocumentCreateOptions, cQ as SubdocumentCreateVisibilityAuthorization, cR as SubdocumentDeleteAuthorization, cS as SubdocumentDeleteOptions, cT as SubdocumentGateAuthorization, cV as SubdocumentInputAuthorization, cW as SubdocumentListOptions, cX as SubdocumentModel, cY as SubdocumentMutationAuthorization, cZ as SubdocumentName, c_ as SubdocumentOutputAuthorization, d1 as SubdocumentReadAuthorization, d2 as SubdocumentReadOptions, d4 as SubdocumentUpdateOptions, d5 as SubdocumentVirtuals, d6 as SubdocumentVisibilityAuthorization, d7 as SuperstructFailureLike, d8 as SuperstructValidateLike, dl as ValibotIssueLike, dm as ValibotPathItemLike, dn as ValibotSafeParseLike, dp as ValibotSafeParseResult, du as VineValidationErrorLike, dv as VineValidationMessageLike, dw as VineValidatorLike, dx as VirtualSubModel, dy as WithVirtuals, dz as YupSchemaLike, dA as YupValidationErrorLike, e4 as defaultRuntime, 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 } from './parsers-BXKoUKMa.js';
|
|
5
5
|
import JsonRouter from '@web-ts-toolkit/express-json-router';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|