{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://json.schemastore.org/aurora-2.0.json","$comment":"https://docs.aurorajs.dev/","additionalProperties":false,"definitions":{"propertyDefinition":{"type":"object","required":["name","type"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of property, in camelCase","minLength":2},"description":{"type":"string","description":"The description of the property","minLength":2},"type":{"type":"string","description":"The type of property","examples":["varchar"],"enum":["array","bigint","blob.long","blob.medium","blob.tiny","blob","boolean","char","date","dateTime","decimal","encrypted","enum","float","id","int","json","jsonb","manyToMany","password","relationship","smallint","text","timestamp","varchar"]},"arrayOptions":{"type":"object","description":"Options to define array property","required":["type"],"properties":{"type":{"type":"string","description":"The type of each array element","enum":["char","date","dateTime","decimal","enum","id","int","timestamp","varchar"]},"length":{"type":"number","description":"Set max length to property","minimum":1},"maxLength":{"type":"number","description":"Set max length to property","minimum":1},"enumOptions":{"type":"array","description":"Values for enum type","items":{"type":"string","minLength":1}}}},"length":{"type":"number","description":"Set max length to property","minimum":1},"maxLength":{"type":"number","description":"Set max length to property","minimum":1},"nullable":{"type":"boolean","description":"Set property to nullable"},"unsigned":{"type":"boolean","description":"Set property as unsigned"},"primaryKey":{"type":"boolean","description":"Set property to primary key"},"index":{"type":"string","description":"Define an index on this property: 'index' for a regular index or 'unique' for a uniqueness constraint","enum":["index","unique"]},"indexFields":{"type":"array","description":"Fields to do composite unique index","items":{"type":"string","minLength":1}},"indexName":{"type":"string","description":"The name of index, if there are various indexes with the same name, they will be grouped","minLength":2},"indexUsing":{"type":"string","description":"Index access method/algorithm used by the database engine (Btree, GIN, HASH, etc.)","enum":["Btree","GIN","HASH","spgist","GiST","BRIN"]},"isI18n":{"type":"boolean","description":"Set property as i18n, this property will be used to translate the entity in the translation table"},"enumOptions":{"type":"array","description":"Values for enum type","items":{"type":"string","minLength":1}},"defaultValue":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array"}],"description":"Default value for property"},"example":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array"}],"description":"Example value for property, this value will be used in swagger documentation"},"decimals":{"type":"array","description":"Total digits of the number and length of the decimal places in the back of the number, example: [10, 2].","items":{"type":"number","minimum":1}},"autoIncrement":{"type":"boolean","description":"Set number property as auto increment"},"readonly":{"type":"boolean","description":"Set property as read only"},"applyTimezone":{"type":"boolean","description":"Apply timezone to date property, by default is true"},"relationship":{"$ref":"#/definitions/relationshipDefinition"},"widget":{"$ref":"#/definitions/widgetDefinition"}}},"additionalApisDefinition":{"type":"object","required":["path","resolverType","httpMethod"],"properties":{"path":{"type":"string","description":"Path to access api","minLength":2,"examples":["auditing/side-effect/rollback","iam/account/check-unique-username"]},"resolverType":{"type":"string","description":"Type of resolver, query or mutation","enum":["query","mutation"],"examples":["query"]},"httpMethod":{"type":"string","description":"Verb of api rest","enum":["get","post","put","delete","patch"],"examples":["post"]}}},"relationshipDefinition":{"type":"object","additionalProperties":false,"description":"Relationship definition for this property","properties":{"type":{"type":"string","description":"The type of relationship","enum":["many-to-many","many-to-one","none","one-to-many","one-to-one"]},"singularName":{"type":"string","description":"Singular name of the property referred to in the relationship, only for one-to-many and many-to-many relationship, example: book","minLength":2},"aggregateName":{"type":"string","description":"Aggregate referring to this relationship, example: LibraryAuthor","minLength":2},"modulePath":{"type":"string","description":"Path to the module that refers to this relationship, example: library/author","minLength":2},"key":{"type":"string","description":"Property key that refers to this relationship, only for many-to-one relationship, example: id","minLength":2},"field":{"type":"string","description":"Field to obtain the relationship data, example: author","minLength":2},"description":{"type":"string","description":"The description of the relationship field","minLength":2},"avoidConstraint":{"type":"boolean","description":"Avoid constraint rules for this relationship"},"packageName":{"type":"string","description":"Path to packageName where is the relationship, example: @aurora-ts/core","minLength":2},"isDenormalized":{"type":"boolean","description":"Set many-to-many relationship as denormalized, creating a field to store the selected ids"},"pivot":{"$ref":"#/definitions/pivotTableDefinition"}}},"widgetDefinition":{"type":"object","additionalProperties":false,"description":"UI widget that will be rendered for this property","properties":{"type":{"type":"string","description":"The type of widget","enum":["async-multiple-search-select","async-search-select","color-picker","grid-elements-manager","grid-select-element","grid-select-multiple-elements","multiple-search-select","multiple-select","search-select","select"]},"className":{"type":"string","description":"CSS class for widget","minLength":2},"detailSort":{"type":"number","description":"Web component order on detail view","minimum":1},"isDetailHidden":{"type":"boolean","description":"Set hidden widget on detail view"},"listSort":{"type":"number","description":"Web component order on list view","minimum":1},"isListHidden":{"type":"boolean","description":"Set hidden widget on list view"},"displayFields":{"type":"array","description":"Fields to display in the grid-select-element widget","items":{"type":"string","minLength":1},"minItems":1},"tab":{"type":"string","description":"Name of the tab where the field will be placed, enabling a tab-based form layout","minLength":1},"group":{"type":"string","description":"Name of the group that groups fields into a section within the form, either inside a tab or standalone","minLength":1},"span":{"type":"integer","description":"Per-property column span override on the form's 12-column grid. Integer 1-12. When omitted, the codegen picks a default by type (and by maxLength for varchar)","minimum":1,"maximum":12}},"if":{"properties":{"type":{"const":"grid-select-element"}},"required":["type"]},"then":{"properties":{"displayFields":{"$ref":"#/definitions/widgetDefinition/properties/displayFields"}},"required":["displayFields"]}},"excludedOperationDefinition":{"type":"array","description":"Operations to be excluded from the module","examples":[["create","update","delete"],["create","update","delete","findById"]],"items":{"enum":["count","create","createBatch","deleteById","delete","findById","find","get","max","min","paginate","getRaw","sum","updateAndIncrement","updateById","update","upsert"]}},"frontDefinition":{"type":"object","additionalProperties":false,"description":"Appearance properties for front application","properties":{"gender":{"type":"string","description":"Grammatical gender to be used in the front application","default":"masculine","enum":["masculine","feminine"]},"iconModule":{"type":"string","description":"Icon library to be used in the front application","default":"@ng-icons/lucide","enum":["@ng-icons/bootstrap-icons","@ng-icons/heroicons","@ng-icons/ionicons","@ng-icons/material-icons","@ng-icons/material-file-icons","@ng-icons/css.gg","@ng-icons/feather-icons","@ng-icons/jam-icons","@ng-icons/octicons","@ng-icons/radix-icons","@ng-icons/tabler-icons","@ng-icons/akar-icons","@ng-icons/iconoir","@ng-icons/cryptocurrency-icons","@ng-icons/simple-icons","@ng-icons/typicons","@ng-icons/dripicons","@ng-icons/ux-aspects","@ng-icons/circum-icons","@ng-icons/remixicon","@ng-icons/font-awesome","@ng-icons/iconsax","@ng-icons/tdesign-icons","@ng-icons/phosphor-icons","@ng-icons/lets-icons","@ng-icons/huge-icons","@ng-icons/devicon","@ng-icons/game-icons","@ng-icons/solar-icons","@ng-icons/svgl","@ng-icons/material-symbols","@ng-icons/mynaui","@ng-icons/boxicons","@ng-icons/mono-icons","@ng-icons/lucide","@ng-icons/coolicons"]},"outlineIcon":{"type":"string","description":"Outline icon to be used in the front application","minLength":2,"examples":["lucideTag","lucideOctagonPause","heroArchiveBoxXMark"]},"solidIcon":{"type":"string","description":"Solid icon to be used in the front application","minLength":2,"examples":["heroAcademicCapSolid","heroArchiveBoxSolid"]},"detailMode":{"type":"string","description":"Detail view mode for the front application, define detail in a dialog or in a separated view","enum":["view","dialog"]},"embedSupport":{"type":"boolean","description":"When true, the module generates embed-mode artifacts (form-embed component, embed columns config, list mode embed). Required when another module references this one via widget.type: grid-elements-manager. Default: false."},"displayField":{"type":"string","description":"Human-readable display label for this aggregate. Accepts either an identifier (a single property name, e.g. 'name', 'email') or an interpolation template with {fieldName} placeholders (e.g. '{code} - {name}', 'Plan: {planId}'). Codegen substitutes placeholders with the corresponding property reference at emit time; segments that are not valid JS identifiers inside braces are emitted as literal text. Defaults to 'name' when unset. Used for list-component delete confirmation toasts and FK column display rendering.","minLength":1}}},"pivotTableDefinition":{"type":"object","additionalProperties":false,"description":"Relationship pivot table definition for this relationship","properties":{"boundedContextName":{"type":"string","description":"The name of the package, singular in kebab-case","minLength":2},"moduleName":{"type":"string","description":"The name of the module, singular in kebab-case","minLength":2},"moduleNames":{"type":"string","description":"The name of the module, plural in kebab-case","minLength":2},"aggregateName":{"type":"string","description":"The name of the aggregateName, singular in PascalCase","minLength":2},"hasOAuth":{"type":"boolean","description":"Enabled authentication for this pivot table","default":false},"hasAuditing":{"type":"boolean","description":"Enabled auditing for pivot table","default":false},"aggregateProperties":{"type":"array","items":{"$ref":"#/definitions/propertyDefinition"}},"excludedFiles":{"type":"array","items":{"type":"string"}},"excludedOperations":{"$ref":"#/definitions/excludedOperationDefinition"}}}},"description":"Aurora module definition: describes a bounded context module with its aggregate, properties, relationships and front configuration","properties":{"version":{"type":"string","description":"Schema version","default":"0.0.1","minLength":2},"boundedContextName":{"type":"string","description":"The name of the package, singular in kebab case","examples":["iam","queue-manager"],"minLength":2},"moduleName":{"type":"string","description":"The name of the module, singular in kebab case","examples":["account","job-registry"],"minLength":2},"moduleNames":{"type":"string","description":"The name of the module, plural in kebab case","examples":["accounts","jobs-registry"],"minLength":2},"aggregateName":{"type":"string","description":"The name of the aggregateName, singular in pascal case, is composed of the boundedContextName plus the moduleName","examples":["IamAccount","QueueManagerJobRegistry"],"minLength":2},"hasOAuth":{"type":"boolean","description":"Enabled authentication for this module","examples":[false],"default":false},"hasTenant":{"type":"boolean","description":"Enabled tenant for this module","examples":[false],"default":false},"hasAuditing":{"type":"boolean","description":"Enabled auditing for this module","examples":[false],"default":false},"description":{"type":"string","description":"Description of the module and its function and interaction with the other modules in the package","minLength":2},"front":{"$ref":"#/definitions/frontDefinition"},"aggregateProperties":{"type":"array","items":{"$ref":"#/definitions/propertyDefinition"}},"additionalApis":{"type":"array","items":{"$ref":"#/definitions/additionalApisDefinition"}},"excludedFiles":{"type":"array","description":"Files to be excluded from the module","examples":["src/@api/iam/account/resolvers/iam-create-accounts.resolver.ts","src/@api/iam/account/resolvers/iam-create-accounts.resolver.spec.ts"],"items":{"type":"string"}},"excludedOperations":{"$ref":"#/definitions/excludedOperationDefinition"}},"required":["boundedContextName","moduleName","moduleNames","aggregateName"],"title":"Aurora Agile Meta Framework","type":"object"}