@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.
- package/dist/builders.d.ts +3 -3
- package/dist/builders.js +7 -0
- package/dist/builders.js.map +1 -1
- package/dist/{effect-DomdqOGT.d.ts → effect-DiHGegt9.d.ts} +120 -17
- package/dist/entityAccess-OjD7XSBO.d.ts +33 -0
- package/dist/factory/index.d.ts +4 -4
- package/dist/factory-runtime/index.d.ts +3 -3
- package/dist/factory-runtime/index.js +7 -0
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/index.d.ts +8 -7
- package/dist/index.js +741 -6
- package/dist/index.js.map +1 -1
- package/dist/mock/index.d.ts +6 -34
- package/dist/mock/index.js +7 -0
- package/dist/mock/index.js.map +1 -1
- package/dist/patterns/component-mapping.json +6 -1
- package/dist/patterns/event-contracts.json +1 -1
- package/dist/patterns/index.d.ts +1482 -7
- package/dist/patterns/index.js +704 -5
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/patterns-registry.json +696 -3
- package/dist/patterns/registry.json +696 -3
- package/dist/{schema-B2h0ZwN5.d.ts → schema-C0QwW3G2.d.ts} +866 -38
- package/dist/{trait-B1oP0din.d.ts → trait-pw49W-zL.d.ts} +121 -1
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.js +8 -0
- package/dist/types/index.js.map +1 -1
- package/dist/{types-ijezwoxO.d.ts → types-1DvdNPye.d.ts} +2 -2
- package/package.json +1 -1
package/dist/mock/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { O as OrbitalSchema } from '../schema-
|
|
2
|
-
|
|
3
|
-
import { a as EntityPersistence, E as EntityField, F as FieldValue, f as EntityRow } from '../effect-
|
|
4
|
-
import '../trait-
|
|
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 {
|
|
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 };
|
package/dist/mock/index.js
CHANGED
|
@@ -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(),
|