@almadar/core 4.9.0 → 5.0.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 +2 -2
- package/dist/builders.js +2 -0
- package/dist/builders.js.map +1 -1
- package/dist/{compose-behaviors-aBzjGsxn.d.ts → compose-behaviors-CB9mqxU3.d.ts} +1 -1
- package/dist/domain-language/index.d.ts +1 -1
- package/dist/domain-language/index.js +4 -0
- package/dist/domain-language/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/{schema-BCEjl1a1.d.ts → schema-CfW0RBck.d.ts} +96 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -3755,11 +3755,13 @@ z.object({
|
|
|
3755
3755
|
path: ["events"]
|
|
3756
3756
|
}
|
|
3757
3757
|
);
|
|
3758
|
+
var TraitScopeSchema = z.enum(["instance", "collection"]);
|
|
3758
3759
|
var TraitSchema = z.object({
|
|
3759
3760
|
name: z.string().min(1),
|
|
3760
3761
|
description: z.string().optional(),
|
|
3761
3762
|
description_visual_prompt: z.string().optional(),
|
|
3762
3763
|
category: TraitCategorySchema.optional(),
|
|
3764
|
+
scope: TraitScopeSchema,
|
|
3763
3765
|
linkedEntity: z.string().optional(),
|
|
3764
3766
|
requiredFields: z.array(RequiredFieldSchema).optional(),
|
|
3765
3767
|
dataEntities: z.array(TraitDataEntitySchema).optional(),
|
|
@@ -5770,6 +5772,7 @@ function convertDomainToSchema(domainText, baseSchema) {
|
|
|
5770
5772
|
const traitRecord = formatBehaviorToSchema(result.data);
|
|
5771
5773
|
const trait = {
|
|
5772
5774
|
name: traitRecord.name,
|
|
5775
|
+
scope: traitRecord.scope ?? "instance",
|
|
5773
5776
|
stateMachine: traitRecord.stateMachine
|
|
5774
5777
|
};
|
|
5775
5778
|
const forEntity = result.data.entityName || void 0;
|
|
@@ -5950,6 +5953,7 @@ function applySectionUpdate(schema, sectionType, sectionId, newDomainText) {
|
|
|
5950
5953
|
const traitRecord = formatBehaviorToSchema(result.data);
|
|
5951
5954
|
const trait = {
|
|
5952
5955
|
name: traitRecord.name,
|
|
5956
|
+
scope: traitRecord.scope ?? "instance",
|
|
5953
5957
|
stateMachine: traitRecord.stateMachine
|
|
5954
5958
|
};
|
|
5955
5959
|
const traitRef = trait.name;
|