@declarion/react 0.9.0 → 0.11.1
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/dist-lib/types/schema.d.ts +50 -8
- package/package.json +1 -1
|
@@ -256,6 +256,17 @@ export interface EntityMutations {
|
|
|
256
256
|
delete?: boolean;
|
|
257
257
|
restore?: boolean;
|
|
258
258
|
}
|
|
259
|
+
/** A set of CRUD op flags, each present or absent. The YAML-decoded shape of
|
|
260
|
+
* an entity's `public` opt-out block (deny-by-default authorization, plan
|
|
261
|
+
* 2026-06-17). A flag being true means that op is open to ALL authenticated
|
|
262
|
+
* callers with no grant required. Mirrors engine.OpSet. On the /api/schema
|
|
263
|
+
* wire it always serializes as this object (never a bare bool, even though
|
|
264
|
+
* YAML accepts `public: true`). */
|
|
265
|
+
export interface OpSet {
|
|
266
|
+
read?: boolean;
|
|
267
|
+
write?: boolean;
|
|
268
|
+
delete?: boolean;
|
|
269
|
+
}
|
|
259
270
|
export interface Entity {
|
|
260
271
|
table: string;
|
|
261
272
|
primary_key?: string[];
|
|
@@ -299,14 +310,22 @@ export interface Entity {
|
|
|
299
310
|
* OR `$caller.*` expressions (`$caller.user_id`, `$caller.tenant_id`)
|
|
300
311
|
* resolved at request time. Security boundary, not a UX hint. */
|
|
301
312
|
prefilter?: Record<string, unknown>;
|
|
302
|
-
/** Hard entity-wide access gate
|
|
303
|
-
*
|
|
304
|
-
* user id (chokepoint +
|
|
305
|
-
*
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
*
|
|
309
|
-
|
|
313
|
+
/** Hard entity-wide access tier gate (checked BEFORE the deny-by-default
|
|
314
|
+
* read/write decision). `"self"` restricts every read/write to rows where
|
|
315
|
+
* the field marked `owner: true` matches the caller's user id (chokepoint +
|
|
316
|
+
* with_check). `"tenant_admin"` admits any administrative standing in the
|
|
317
|
+
* active tenant (superadmin / tenant_owner / any role grant). `"superadmin"`
|
|
318
|
+
* admits only the platform-wide god flag. Empty = no tier floor (standard
|
|
319
|
+
* RBAC). The legacy `"platform_admin"` alias was removed (plan 2026-06-17). */
|
|
320
|
+
access?: "self" | "tenant_admin" | "superadmin";
|
|
321
|
+
/** Deny-by-default authorization (plan 2026-06-17). Absent = every op
|
|
322
|
+
* requires its `entity:<code>:<op>` grant. `public.<op>: true` opts that op
|
|
323
|
+
* out of the grant requirement, opening it to all authenticated callers
|
|
324
|
+
* (NOT anonymous). The Entity.Access floor is checked first and is never
|
|
325
|
+
* waived by `public`. Mirrors engine.Entity.Public (*OpSet). The wire form
|
|
326
|
+
* is always the object shape (never a bare bool). Replaces the removed
|
|
327
|
+
* boolean `permissions`. */
|
|
328
|
+
public?: OpSet;
|
|
310
329
|
/**
|
|
311
330
|
* Optional structural tree for placing and grouping actions across all
|
|
312
331
|
* placement slots. Absent = runtime composes a flat list from all actions
|
|
@@ -449,11 +468,34 @@ export interface AuditConfig {
|
|
|
449
468
|
enabled?: boolean;
|
|
450
469
|
lines?: AuditLineDef[];
|
|
451
470
|
}
|
|
471
|
+
/** Resolved per-screen visibility decision (deny-by-default authorization,
|
|
472
|
+
* plan 2026-06-17). Computed by the engine at load - authors write
|
|
473
|
+
* `public` / `required_permission`, never this. `public` and
|
|
474
|
+
* `required_permission` are mutually exclusive; `source` is the audit
|
|
475
|
+
* provenance (authored:public | authored | authored->public |
|
|
476
|
+
* derived:public-entity | derived:entity | derived:screen). Mirrors
|
|
477
|
+
* engine.ScreenVisibility. */
|
|
478
|
+
export interface ScreenVisibility {
|
|
479
|
+
public: boolean;
|
|
480
|
+
required_permission: string;
|
|
481
|
+
source: string;
|
|
482
|
+
}
|
|
452
483
|
export interface Screen {
|
|
453
484
|
type: "list" | "detail" | "custom" | "record_list";
|
|
454
485
|
entity?: string;
|
|
455
486
|
route: string;
|
|
456
487
|
component?: string;
|
|
488
|
+
/** Deny-by-default authorization. CUSTOM (entity-less) screens only: true
|
|
489
|
+
* makes the screen visible to all authenticated callers (data inside still
|
|
490
|
+
* gates per entity). A load error on an entity-bound screen. Mirrors
|
|
491
|
+
* engine.Screen.Public (*bool). */
|
|
492
|
+
public?: boolean;
|
|
493
|
+
/** Overrides the derived visibility rule for this screen (any grant string,
|
|
494
|
+
* typically `screen:<code>` to retarget or to tighten an entity-bound
|
|
495
|
+
* screen below its entity read). REPLACES the derived rule, not ANDs it. */
|
|
496
|
+
required_permission?: string;
|
|
497
|
+
/** Resolved visibility (engine-computed at load; never authored). */
|
|
498
|
+
visibility?: ScreenVisibility;
|
|
457
499
|
display?: {
|
|
458
500
|
name: LocalizedString;
|
|
459
501
|
icon: string;
|