@web-ts-toolkit/access-router 0.63.0 → 0.65.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 +313 -3
- package/advanced.d.mts +1 -1
- package/advanced.d.ts +1 -1
- package/advanced.js +167 -26
- package/advanced.mjs +167 -26
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.js +1845 -254
- package/index.mjs +1839 -247
- package/llms.txt +3 -2
- package/package.json +3 -3
- package/{parsers-Bdq0jg69.d.mts → parsers-h_oU4bB0.d.mts} +194 -9
- package/{parsers-Bdq0jg69.d.ts → parsers-h_oU4bB0.d.ts} +194 -9
package/README.md
CHANGED
|
@@ -263,6 +263,11 @@ behavior rather than route shape.
|
|
|
263
263
|
**All default to off (snapshot checks enabled).** Six independent server-only
|
|
264
264
|
settings temporarily skip specific comparisons on one registered model:
|
|
265
265
|
|
|
266
|
+
The retained-copy/graph guarantees in this section and the initial-copy section
|
|
267
|
+
below apply with the matching **authorization fast-path flag OFF (or dormant)**.
|
|
268
|
+
The separately opted-in [active trusted path](#experimental-unsafe-readlist-authorization-fast-paths)
|
|
269
|
+
has a deliberately weaker contract; it does not change these original six/two groups.
|
|
270
|
+
|
|
266
271
|
| LIST flag | READ flag | Comparisons skipped |
|
|
267
272
|
| -------------------------------------------- | -------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
268
273
|
| `unsafeSkipListDocumentSnapshotChecks` | `unsafeSkipReadDocumentSnapshotChecks` | Repeated source comparisons for the top-level document stage |
|
|
@@ -415,6 +420,305 @@ Monitor authorization failures, unexpected callback/native behavior and latency/
|
|
|
415
420
|
restore false promptly and revisit/remove this temporary workaround. No release or
|
|
416
421
|
configuration migration automatically enables it.
|
|
417
422
|
|
|
423
|
+
An unshipped output-publication fusion experiment was withdrawn after failing its
|
|
424
|
+
performance-and-regression gate. **No publication-fusion options are available**;
|
|
425
|
+
the six comparison and two initial-copy switches above are unchanged.
|
|
426
|
+
|
|
427
|
+
### Experimental unsafe READ/LIST authorization fast paths
|
|
428
|
+
|
|
429
|
+
`unsafeUseListAuthorizationFastPath?: boolean` and
|
|
430
|
+
`unsafeUseReadAuthorizationFastPath?: boolean` are a **third independent** group,
|
|
431
|
+
both default `false`. This is experimental, performance-first reduced authorization
|
|
432
|
+
bookkeeping, **not** publication fusion, a full ACL bypass, or a security-equivalent
|
|
433
|
+
optimization. Benchmark your workload and review application hooks/data before
|
|
434
|
+
opting in; no universal speedup or v0.51.0 equivalence/performance parity is promised.
|
|
435
|
+
|
|
436
|
+
Only literal server model/default-model boolean `true` requests a fast path. It
|
|
437
|
+
requires **all four matching prerequisites**, without enabling any automatically:
|
|
438
|
+
|
|
439
|
+
| LIST prerequisites | READ prerequisites |
|
|
440
|
+
| -------------------------------------------- | -------------------------------------------- |
|
|
441
|
+
| `unsafeSkipListDocumentSnapshotChecks` | `unsafeSkipReadDocumentSnapshotChecks` |
|
|
442
|
+
| `unsafeSkipListOutputSnapshotChecks` | `unsafeSkipReadOutputSnapshotChecks` |
|
|
443
|
+
| `unsafeSkipListNestedDocumentSnapshotChecks` | `unsafeSkipReadNestedDocumentSnapshotChecks` |
|
|
444
|
+
| `unsafeSkipListInitialOutputSnapshotCopy` | `unsafeSkipReadInitialOutputSnapshotCopy` |
|
|
445
|
+
|
|
446
|
+
| Requested fast flag | All four matching skips true | Effective behavior |
|
|
447
|
+
| ------------------- | ---------------------------- | ----------------------------------------------------- |
|
|
448
|
+
| false/omitted | either | **off**; original flags retain their behavior |
|
|
449
|
+
| true | no | **dormant**; original flags retain their behavior |
|
|
450
|
+
| true | yes | **active**; eligible rows use the weaker trusted path |
|
|
451
|
+
|
|
452
|
+
LIST covers `find`, generated lists and root lists; READ covers `findOne`,
|
|
453
|
+
`findById`, public identifier/filter reads and root reads. **READ-to-list retries
|
|
454
|
+
remain READ-origin**, even with effective `list` field access. Configuration is
|
|
455
|
+
captured at the genuine query origin **before hooks/awaits**. Authenticated
|
|
456
|
+
embedded/populated/included descendants inherit that capture, never live target
|
|
457
|
+
flags; target operation/row/field policy and target grants remain their own.
|
|
458
|
+
Independent calls inside callbacks capture their own settings. Arbitrary parent
|
|
459
|
+
provenance, writes/write-derived output, new/create/update/delete/upsert, dedicated
|
|
460
|
+
subdocument operations and fresh raw-policy helpers cannot select this path.
|
|
461
|
+
|
|
462
|
+
Use `createRouter`, model setters or model-default setters on the owning runtime.
|
|
463
|
+
Explicit model `false` overrides a true default; model `undefined` restores
|
|
464
|
+
inheritance. Effective activation/dormancy and missing-prerequisite transitions
|
|
465
|
+
warn, not every request. Presence in HTTP/root/service per-call/defaults, policy,
|
|
466
|
+
helper, include/populate or `$$sq` **control slots rejects**, even if undefined;
|
|
467
|
+
same-named ordinary persisted business fields remain inert data.
|
|
468
|
+
|
|
469
|
+
#### What active trusted rows actually omit and retain
|
|
470
|
+
|
|
471
|
+
- Ordinary lean projected source and document-hook input are **borrowed**, not
|
|
472
|
+
detached stage snapshots. Ordinary returned grants are shared across field
|
|
473
|
+
decisions, reads and owning embedded children. Diagnostic contexts are shallow;
|
|
474
|
+
`originalDocumentSnapshot` is a historical property name, **not an immutable
|
|
475
|
+
snapshot promise** here. Captured configuration/scope views are reused; native
|
|
476
|
+
configuration and context/grant leaves are not isolated anew per row/callback.
|
|
477
|
+
- Actual operation gates, row filters, ordered field rules, original actor,
|
|
478
|
+
short-circuiting, document hooks, getters and finite hook concurrency remain.
|
|
479
|
+
Modern document hooks run once per root/target regardless of skim/metadata;
|
|
480
|
+
embedded children reuse owner grants. Independent rows/targets do not cache
|
|
481
|
+
grants/decisions by ID. Modern backend policy, target admission and private
|
|
482
|
+
populated inputs remain; this is historical-like bookkeeping, not old skim behavior.
|
|
483
|
+
- Selected output is safely constructed once; metadata and include attachments
|
|
484
|
+
finish before one root context/association. Authenticated target DTO roots can
|
|
485
|
+
be retained directly. Source and produced-attachment lanes remain separate.
|
|
486
|
+
Selection/denied fields, metadata stripping/exposure, dotted paths, population,
|
|
487
|
+
includes and registered virtual semantics still apply to ordinary stable data.
|
|
488
|
+
- Trusted handles retain exact root association and cheap call/stage/request/
|
|
489
|
+
runtime/model/name/scope/access checks, **not snapshot or current-descendant
|
|
490
|
+
identity walks**. Child lookup means **issued-document membership, not current
|
|
491
|
+
reachability**: a removed original child may still be found; a replacement/new
|
|
492
|
+
object receives no child handle. Equal values, IDs, spreads, other rows or forged
|
|
493
|
+
handles establish no authority. The exact root helper remains usable after
|
|
494
|
+
descendant replacement, filtering current values with stale memo/shared grants.
|
|
495
|
+
- Public request/query/filter/pagination/work limits remain. New selected
|
|
496
|
+
materialization/child/registry algorithms share **20,000 visited slots/issued
|
|
497
|
+
roots and depth 100**, safe descriptor writes and controlled cycle errors.
|
|
498
|
+
Encountered-key filtering consumes slots even for denied/protected keys; denied
|
|
499
|
+
values and their descendants remain unread, not recursively validated.
|
|
500
|
+
There is **no full 20,000-node/depth-100 validation guarantee for unvisited
|
|
501
|
+
source/grants/context**. Unknown selected proxies/custom objects/functions/
|
|
502
|
+
symbols/cycles reject with a controlled authorization error; invalid virtual
|
|
503
|
+
returns omit fail-closed rather than publishing partial output.
|
|
504
|
+
- Snapshot native/BSON wire/equality passes are omitted, **not every native
|
|
505
|
+
observation**. Hydrated inputs normalize once; selected native/value fallbacks,
|
|
506
|
+
stable-base/per-getter document views, getter return staging, private populated
|
|
507
|
+
argument-four isolation and JSON serialization can still copy/normalize or run
|
|
508
|
+
native code. Getter argument-one mutation is still not an implicit output write.
|
|
509
|
+
- Selected BSON compatibility first prepares contained/wire-expanded containers
|
|
510
|
+
under the **same remaining slot/depth budget**, then performs one BSON wire copy.
|
|
511
|
+
Ordinary BSON leaves, `Code.scope`, `DBRef` fields/IDs and nested natives remain
|
|
512
|
+
supported; aliases consume work per emitted occurrence. Data-method `toBSON`
|
|
513
|
+
runs once per encountered occurrence (its own computation/allocation is not
|
|
514
|
+
bounded). Accessor state/hooks, chained hook results, custom serializer overrides,
|
|
515
|
+
unknown prototypes and native-as-document scope roots fail closed; BSON-contained
|
|
516
|
+
RegExp values use intrinsic state. String/binary storage is scalar, not a
|
|
517
|
+
per-byte slot budget. Structural-budget exhaustion fails the complete result,
|
|
518
|
+
including when discovered while staging a virtual return; other invalid native
|
|
519
|
+
virtual returns retain fail-closed omission.
|
|
520
|
+
- Shallow-unproven roots (including proxy/accessor/unsafe-root shapes) use compatible
|
|
521
|
+
copied stages before the hook; exotic grants may copy once without rerunning it.
|
|
522
|
+
Copied and trusted rows may coexist in one active call. Supported native/value
|
|
523
|
+
fallbacks copy once under the selected-output budget. **Active configuration is
|
|
524
|
+
not a promise that every row is zero-copy**, nor does a copied row restore all
|
|
525
|
+
former context/configuration isolation. No general deep-clone switch is exposed.
|
|
526
|
+
|
|
527
|
+
**Accepted risk:** source/grant/context mutation across callbacks/awaits, stale
|
|
528
|
+
decisions, descendant replacement and fewer/different native observations or
|
|
529
|
+
exceptions can change permission outcomes, **including denial becoming allowance**.
|
|
530
|
+
Matching benchmark fingerprints do not prove security equivalence. Use trusted,
|
|
531
|
+
stable application code/data and a measured staged rollout; restore false promptly.
|
|
532
|
+
|
|
533
|
+
Rollback affects **new calls only**, not in-flight calls, retries, descendants or
|
|
534
|
+
retained handles. Turning off a new flag does **not** turn off its original four
|
|
535
|
+
skip flags: restore those independently if you want default protections. Retained
|
|
536
|
+
trusted-handle helpers keep the weaker behavior after rollback; fresh raw-policy
|
|
537
|
+
helpers remain strict and known trimmed DTOs retain unresolved-rule fail-closed behavior.
|
|
538
|
+
|
|
539
|
+
#### Runnable LIST/READ prerequisites, rollback and handle warnings
|
|
540
|
+
|
|
541
|
+
Save as `authorization-fast-path-example.mts`; run on Node 22.18+ or compile with
|
|
542
|
+
TypeScript/NodeNext first. Uses only public package imports, Express and Mongoose.
|
|
543
|
+
It creates/drops its own example database (`MONGODB_URL` or local MongoDB), serves
|
|
544
|
+
one loopback request and closes all resources. **The deliberate DTO replacements
|
|
545
|
+
demonstrate lost protection, not recommended application behavior.** LIST defaults
|
|
546
|
+
and READ opt-in below are independent server constants, never request inputs.
|
|
547
|
+
|
|
548
|
+
<!-- doc-example: complete-runtime -->
|
|
549
|
+
|
|
550
|
+
```ts
|
|
551
|
+
import assert from 'node:assert/strict';
|
|
552
|
+
import { randomUUID } from 'node:crypto';
|
|
553
|
+
import { once } from 'node:events';
|
|
554
|
+
import type { Server } from 'node:http';
|
|
555
|
+
import express from 'express';
|
|
556
|
+
import mongoose from 'mongoose';
|
|
557
|
+
import { createAccessRuntime, type DefaultModelRouterOptions } from '@web-ts-toolkit/access-router';
|
|
558
|
+
import type { ModelRequest } from '@web-ts-toolkit/access-router/advanced';
|
|
559
|
+
|
|
560
|
+
type Row = { name?: string; owner?: boolean; secret?: string; contacts?: { email?: string; secret?: string }[] };
|
|
561
|
+
|
|
562
|
+
async function runAuthorizationFastPathExample() {
|
|
563
|
+
const connection = await mongoose
|
|
564
|
+
.createConnection(process.env.MONGODB_URL ?? 'mongodb://127.0.0.1:27017', {
|
|
565
|
+
dbName: `authorization_fast_example_${randomUUID().replaceAll('-', '')}`,
|
|
566
|
+
})
|
|
567
|
+
.asPromise();
|
|
568
|
+
let server: Server | undefined;
|
|
569
|
+
try {
|
|
570
|
+
const api = createAccessRuntime();
|
|
571
|
+
const listDefaults = {
|
|
572
|
+
unsafeSkipListDocumentSnapshotChecks: true,
|
|
573
|
+
unsafeSkipListOutputSnapshotChecks: true,
|
|
574
|
+
unsafeSkipListNestedDocumentSnapshotChecks: true,
|
|
575
|
+
unsafeSkipListInitialOutputSnapshotCopy: true,
|
|
576
|
+
unsafeUseListAuthorizationFastPath: true,
|
|
577
|
+
} satisfies DefaultModelRouterOptions;
|
|
578
|
+
api.setDefaultModelOptions(listDefaults); // no READ flags enabled
|
|
579
|
+
const Model = connection.model<Row>(
|
|
580
|
+
'FastPathExampleRow',
|
|
581
|
+
new mongoose.Schema<Row>({
|
|
582
|
+
name: String,
|
|
583
|
+
owner: Boolean,
|
|
584
|
+
secret: String,
|
|
585
|
+
contacts: [new mongoose.Schema({ email: String, secret: String }, { _id: false })],
|
|
586
|
+
}),
|
|
587
|
+
);
|
|
588
|
+
let documentHooks = 0;
|
|
589
|
+
const router = api.createRouter(Model, {
|
|
590
|
+
operationAccess: { list: true, read: true },
|
|
591
|
+
hydration: { find: 'lean', findOne: 'lean' },
|
|
592
|
+
stripPermissionsField: true,
|
|
593
|
+
unsafeUseListAuthorizationFastPath: false, // explicit false wins over defaults
|
|
594
|
+
alwaysSelectFields: ['owner'],
|
|
595
|
+
docPermissions: (doc) => {
|
|
596
|
+
documentHooks++;
|
|
597
|
+
return { owner: !!doc && typeof doc === 'object' && 'owner' in doc && doc.owner === true };
|
|
598
|
+
},
|
|
599
|
+
permissionSchema: {
|
|
600
|
+
name: 'owner',
|
|
601
|
+
secret: false,
|
|
602
|
+
contacts: { list: true, read: true, sub: { email: true, secret: false } },
|
|
603
|
+
},
|
|
604
|
+
virtuals: { contacts: { sub: {} } }, // registered embedded scope, no getters
|
|
605
|
+
});
|
|
606
|
+
const row = await Model.create({
|
|
607
|
+
name: 'Ada',
|
|
608
|
+
owner: true,
|
|
609
|
+
secret: 'hidden',
|
|
610
|
+
contacts: [{ email: 'ada@example.test', secret: 'hidden' }],
|
|
611
|
+
});
|
|
612
|
+
const selected = { select: ['name', 'contacts', 'secret', '-_id'] };
|
|
613
|
+
|
|
614
|
+
async function verify(req: ModelRequest) {
|
|
615
|
+
const service = router.getService(req);
|
|
616
|
+
const off = await service.find({}, selected);
|
|
617
|
+
assert.ok(off.success);
|
|
618
|
+
off.data[0].contacts![0] = { email: 'replacement' };
|
|
619
|
+
await assert.rejects(
|
|
620
|
+
service.pickAllowedFields(off.data[0], 'list', {
|
|
621
|
+
documentAuthorization: off.contexts[0].documentAuthorization,
|
|
622
|
+
}),
|
|
623
|
+
);
|
|
624
|
+
|
|
625
|
+
router.setOption('unsafeUseListAuthorizationFastPath', undefined); // inherit true
|
|
626
|
+
router.setOption('unsafeSkipListNestedDocumentSnapshotChecks', false); // missing ONE prerequisite
|
|
627
|
+
const dormant = await service.find({}, selected);
|
|
628
|
+
assert.ok(dormant.success);
|
|
629
|
+
dormant.data[0].contacts![0] = { email: 'replacement' };
|
|
630
|
+
await assert.rejects(
|
|
631
|
+
service.pickAllowedFields(dormant.data[0], 'list', {
|
|
632
|
+
documentAuthorization: dormant.contexts[0].documentAuthorization,
|
|
633
|
+
}),
|
|
634
|
+
);
|
|
635
|
+
|
|
636
|
+
router.setOption('unsafeSkipListNestedDocumentSnapshotChecks', undefined); // all FOUR now true
|
|
637
|
+
const active = await service.find({}, selected);
|
|
638
|
+
assert.ok(active.success);
|
|
639
|
+
assert.deepEqual(active.data[0], { name: 'Ada', contacts: [{ email: 'ada@example.test' }] });
|
|
640
|
+
const context = active.contexts[0];
|
|
641
|
+
const originalChild = active.data[0].contacts![0];
|
|
642
|
+
const childHandle = context.getDocumentAuthorization(originalChild);
|
|
643
|
+
assert.ok(childHandle);
|
|
644
|
+
const replacement = { email: 'replacement', secret: 'must be filtered' };
|
|
645
|
+
active.data[0].contacts![0] = replacement;
|
|
646
|
+
router.setOption('unsafeUseListAuthorizationFastPath', false); // rollback NEW calls only
|
|
647
|
+
assert.equal(context.getDocumentAuthorization(originalChild), childHandle); // removed issued member survives
|
|
648
|
+
assert.equal(context.getDocumentAuthorization(replacement), undefined); // membership is not reachability
|
|
649
|
+
assert.deepEqual(
|
|
650
|
+
await service.pickAllowedFields(active.data[0], 'list', {
|
|
651
|
+
documentAuthorization: context.documentAuthorization,
|
|
652
|
+
}),
|
|
653
|
+
{ name: 'Ada', contacts: [{ email: 'replacement' }] },
|
|
654
|
+
);
|
|
655
|
+
const fresh = await service.pickAllowedFields(active.data[0], 'list');
|
|
656
|
+
assert.equal(fresh.name, undefined); // fresh raw helper cannot recover the trimmed owner decision
|
|
657
|
+
|
|
658
|
+
const readOptions = {
|
|
659
|
+
unsafeSkipReadDocumentSnapshotChecks: true,
|
|
660
|
+
unsafeSkipReadOutputSnapshotChecks: true,
|
|
661
|
+
unsafeSkipReadNestedDocumentSnapshotChecks: true,
|
|
662
|
+
unsafeSkipReadInitialOutputSnapshotCopy: true,
|
|
663
|
+
unsafeUseReadAuthorizationFastPath: true,
|
|
664
|
+
} satisfies DefaultModelRouterOptions;
|
|
665
|
+
api.setModelOptions(Model.modelName, readOptions); // does NOT enable LIST
|
|
666
|
+
assert.equal(api.getModelOption(Model.modelName, 'unsafeUseListAuthorizationFastPath'), false);
|
|
667
|
+
const read = await service.findOne({ _id: row._id }, selected);
|
|
668
|
+
assert.ok(read.success);
|
|
669
|
+
read.data.contacts![0] = { email: 'read replacement', secret: 'must be filtered' };
|
|
670
|
+
api.setModelOption(Model.modelName, 'unsafeUseReadAuthorizationFastPath', false);
|
|
671
|
+
assert.deepEqual(
|
|
672
|
+
await service.pickAllowedFields(read.data, 'read', {
|
|
673
|
+
documentAuthorization: read.context.documentAuthorization,
|
|
674
|
+
}),
|
|
675
|
+
{ name: 'Ada', contacts: [{ email: 'read replacement' }] },
|
|
676
|
+
);
|
|
677
|
+
const rolledBack = await service.findOne({ _id: row._id }, selected);
|
|
678
|
+
assert.ok(rolledBack.success);
|
|
679
|
+
rolledBack.data.contacts![0] = { email: 'replacement' };
|
|
680
|
+
await assert.rejects(
|
|
681
|
+
service.pickAllowedFields(rolledBack.data, 'read', {
|
|
682
|
+
documentAuthorization: rolledBack.context.documentAuthorization,
|
|
683
|
+
}),
|
|
684
|
+
);
|
|
685
|
+
assert.equal(documentHooks, 5); // once per query row, never rerun for retained/trimmed helpers
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
const app = express();
|
|
689
|
+
const initialize = api();
|
|
690
|
+
app.use((req, res, next) => initialize(req as ModelRequest, res, next));
|
|
691
|
+
app.get('/verify', async (req, res, next) => {
|
|
692
|
+
try {
|
|
693
|
+
await verify(req as ModelRequest);
|
|
694
|
+
res.json({ ok: true });
|
|
695
|
+
} catch (error) {
|
|
696
|
+
next(error);
|
|
697
|
+
}
|
|
698
|
+
});
|
|
699
|
+
server = app.listen(0, '127.0.0.1');
|
|
700
|
+
await once(server, 'listening');
|
|
701
|
+
const address = server.address();
|
|
702
|
+
assert.ok(address && typeof address !== 'string');
|
|
703
|
+
const response = await fetch(`http://127.0.0.1:${address.port}/verify`);
|
|
704
|
+
assert.equal(response.status, 200);
|
|
705
|
+
assert.deepEqual(await response.json(), { ok: true });
|
|
706
|
+
} finally {
|
|
707
|
+
if (server)
|
|
708
|
+
await new Promise<void>((resolve, reject) => server!.close((error) => (error ? reject(error) : resolve())));
|
|
709
|
+
try {
|
|
710
|
+
await connection.dropDatabase();
|
|
711
|
+
} finally {
|
|
712
|
+
await connection.close();
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
runAuthorizationFastPathExample().catch((error) => {
|
|
717
|
+
console.error(error);
|
|
718
|
+
process.exitCode = 1;
|
|
719
|
+
});
|
|
720
|
+
```
|
|
721
|
+
|
|
418
722
|
### Wire placement and option names
|
|
419
723
|
|
|
420
724
|
| Intent | Basic GET query | Advanced body | Root entry |
|
|
@@ -773,8 +1077,10 @@ undefined documents yield `[]` (pick/trim preserve the nullish value) without ho
|
|
|
773
1077
|
The shared finalizer now consumes retained authorization plans and privately
|
|
774
1078
|
memoizes full document grants and field decisions. For a subsequent same-execution
|
|
775
1079
|
pick, use `{ documentAuthorization }` with the package-issued output context's
|
|
776
|
-
handle, rather than resupplying the raw policy.
|
|
777
|
-
output
|
|
1080
|
+
handle, rather than resupplying the raw policy. Default/copied handles validate the
|
|
1081
|
+
unchanged output graph; active trusted handles validate exact root association and
|
|
1082
|
+
issued membership, not current descendants. All retain request/runtime/model, scope,
|
|
1083
|
+
access and document-stage checks; caller
|
|
778
1084
|
spreads, matching IDs and `_permissions` are not provenance. Raw policy on a known
|
|
779
1085
|
trimmed output retains unconditional request fields and explicit grants, but does
|
|
780
1086
|
not rerun the document hook or recover document-dependent decisions. Metadata
|
|
@@ -786,7 +1092,11 @@ and `new` now consume the captured call policy throughout output finalization.
|
|
|
786
1092
|
Single results expose `context.documentAuthorization`; list/create results expose
|
|
787
1093
|
one `contexts[index]` per row. These opaque handles are non-enumerable context
|
|
788
1094
|
properties, never attached to `data`. `context.getDocumentAuthorization(value)`
|
|
789
|
-
looks up an unchanged registered output in
|
|
1095
|
+
looks up an unchanged registered output in a default/copied result's graph. In the
|
|
1096
|
+
[active trusted path](#experimental-unsafe-readlist-authorization-fast-paths), it
|
|
1097
|
+
instead looks up issued document-root membership: removed original children may
|
|
1098
|
+
remain discoverable, replacements are not issued, and an exact root's helper can
|
|
1099
|
+
filter changed descendants using stale decisions/shared grants after rollback.
|
|
790
1100
|
|
|
791
1101
|
<!-- doc-example: partial -->
|
|
792
1102
|
|
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-h_oU4bB0.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-h_oU4bB0.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import 'mongoose';
|
|
4
4
|
import 'express';
|