@almadar/core 10.46.0 → 10.48.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.
@@ -1,7 +1,8 @@
1
- import { O as OrbitalSchema } from '../schema-B2h0ZwN5.js';
2
- import { S as SExpr } from '../expression-Yf7qvvOs.js';
3
- import { a as EntityPersistence, E as EntityField, F as FieldValue, f as EntityRow } from '../effect-DomdqOGT.js';
4
- import '../trait-B1oP0din.js';
1
+ import { O as OrbitalSchema } from '../schema-C0QwW3G2.js';
2
+ export { E as EntityAccessPolicies, e as entityAccessPolicies, a as entityAccessTable } from '../entityAccess-OjD7XSBO.js';
3
+ import { a as EntityPersistence, E as EntityField, F as FieldValue, f as EntityRow } from '../effect-DiHGegt9.js';
4
+ import '../trait-pw49W-zL.js';
5
+ import '../expression-Yf7qvvOs.js';
5
6
  import 'zod';
6
7
 
7
8
  /**
@@ -84,35 +85,6 @@ declare function identityEntityName(schema: OrbitalSchema): string | undefined;
84
85
  */
85
86
  declare function ownerFieldsFromSchema(schema: OrbitalSchema): string[];
86
87
 
87
- /**
88
- * Entity access policies — the declared `@read`/`@create`/`@update`/`@delete`
89
- * directives, keyed by entity name.
90
- *
91
- * The JS mirror of `orbital-core/src/runtime/entity_access.rs`'s
92
- * `EntityAccessPolicies`/`EntityAccessTable`. Both paths must agree: a
93
- * directive is a per-row predicate (`@entity` = the candidate row, or for
94
- * `@create` the incoming data; `@user` = the viewer), enforced once for
95
- * every trait that touches the entity — the un-bypassable twin of a
96
- * call-site `filter:`, which sibling traits can skip simply by not
97
- * declaring one.
98
- *
99
- * @packageDocumentation
100
- */
101
-
102
- /** An entity's four declared directives. Any may be absent — an absent
103
- * directive means "no restriction" for that operation, exactly like an
104
- * absent fetch `filter:`. */
105
- interface EntityAccessPolicies {
106
- read?: SExpr;
107
- create?: SExpr;
108
- update?: SExpr;
109
- delete?: SExpr;
110
- }
111
- /** Every entity's access policies, keyed by entity name. */
112
- declare function entityAccessTable(schema: OrbitalSchema): Map<string, EntityAccessPolicies>;
113
- /** One entity's access policies, or `undefined` when it declares none. */
114
- declare function entityAccessPolicies(schema: OrbitalSchema, entityName: string): EntityAccessPolicies | undefined;
115
-
116
88
  /**
117
89
  * The one owner of mock-seed value synthesis.
118
90
  *
@@ -175,4 +147,4 @@ declare function sampleRow(entity: SampleEntity, ctx: Omit<SampleContext, 'entit
175
147
  /** `count` rows, 1-based, honoring the runtime-singleton gate. */
176
148
  declare function sampleRows(entity: SampleEntity, count: number, strategy: SampleStrategy): EntityRow[];
177
149
 
178
- export { type EntityAccessPolicies, IMAGE_FIELD_NAMES, type SampleContext, type SampleEntity, type SampleStrategy, entityAccessPolicies, entityAccessTable, identityEntityName, isDeclaredDefaultHonored, ownerFieldsFromSchema, randomAnytimeDate, randomArrayElement, randomBoolean, randomColor, randomEmail, randomFloat, randomInt, randomPassword, randomPastDate, randomPhone, randomRecentDate, randomSentence, randomUrl, randomUuid, randomWords, sampleFieldValue, sampleImageUrl, sampleRow, sampleRowCount, sampleRows, seedRandom, shuffleArray };
150
+ export { IMAGE_FIELD_NAMES, type SampleContext, type SampleEntity, type SampleStrategy, identityEntityName, isDeclaredDefaultHonored, ownerFieldsFromSchema, randomAnytimeDate, randomArrayElement, randomBoolean, randomColor, randomEmail, randomFloat, randomInt, randomPassword, randomPastDate, randomPhone, randomRecentDate, randomSentence, randomUrl, randomUuid, randomWords, sampleFieldValue, sampleImageUrl, sampleRow, sampleRowCount, sampleRows, seedRandom, shuffleArray };
@@ -580,6 +580,13 @@ z.object({
580
580
  create_policy: SExprSchema.optional(),
581
581
  update_policy: SExprSchema.optional(),
582
582
  delete_policy: SExprSchema.optional(),
583
+ // Snake_case for the same cross-language reason as the four policies above.
584
+ access_waivers: z.object({
585
+ read: z.string().optional(),
586
+ create: z.string().optional(),
587
+ update: z.string().optional(),
588
+ delete: z.string().optional()
589
+ }).optional(),
583
590
  collection: z.string().optional(),
584
591
  fields: z.array(EntityFieldSchema).min(1, "At least one field is required"),
585
592
  instances: z.array(z.record(JsonValueSchema)).optional(),