@api-client/core 0.18.25 → 0.18.26

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.
Files changed (42) hide show
  1. package/build/src/modeling/Semantics.d.ts +186 -0
  2. package/build/src/modeling/Semantics.d.ts.map +1 -1
  3. package/build/src/modeling/Semantics.js +111 -0
  4. package/build/src/modeling/Semantics.js.map +1 -1
  5. package/build/src/modeling/helpers/Intelisense.d.ts +7 -7
  6. package/build/src/modeling/helpers/Intelisense.d.ts.map +1 -1
  7. package/build/src/modeling/helpers/Intelisense.js.map +1 -1
  8. package/build/src/modeling/templates/meta/blog-publishing-platform.json +1 -1
  9. package/build/src/modeling/templates/meta/financial-services-platform.json +1 -1
  10. package/build/src/modeling/templates/meta/index.d.ts +1 -1
  11. package/build/src/modeling/templates/meta/index.js +1 -1
  12. package/build/src/modeling/templates/meta/index.js.map +1 -1
  13. package/build/src/modeling/templates/meta/iot-smart-home-platform.json +1 -1
  14. package/build/src/modeling/templates/verticals/business-services/financial-services-domain.d.ts.map +1 -1
  15. package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js +248 -63
  16. package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js.map +1 -1
  17. package/build/src/modeling/templates/verticals/technology-media/blog-domain.js +5 -5
  18. package/build/src/modeling/templates/verticals/technology-media/blog-domain.js.map +1 -1
  19. package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.d.ts.map +1 -1
  20. package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.js +2 -0
  21. package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.js.map +1 -1
  22. package/build/src/modeling/validation/postgresql.d.ts.map +1 -1
  23. package/build/src/modeling/validation/postgresql.js +0 -1
  24. package/build/src/modeling/validation/postgresql.js.map +1 -1
  25. package/build/src/runtime/modeling/Semantics.d.ts +84 -0
  26. package/build/src/runtime/modeling/Semantics.d.ts.map +1 -0
  27. package/build/src/runtime/modeling/Semantics.js +124 -0
  28. package/build/src/runtime/modeling/Semantics.js.map +1 -0
  29. package/build/tsconfig.tsbuildinfo +1 -1
  30. package/data/models/example-generator-api.json +12 -12
  31. package/package.json +1 -1
  32. package/src/modeling/Semantics.ts +239 -0
  33. package/src/modeling/helpers/Intelisense.ts +7 -7
  34. package/src/modeling/templates/meta/blog-publishing-platform.json +1 -1
  35. package/src/modeling/templates/meta/financial-services-platform.json +1 -1
  36. package/src/modeling/templates/meta/iot-smart-home-platform.json +1 -1
  37. package/src/modeling/templates/verticals/business-services/financial-services-domain.ts +285 -65
  38. package/src/modeling/templates/verticals/technology-media/blog-domain.ts +5 -5
  39. package/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.ts +2 -0
  40. package/src/modeling/validation/postgresql.ts +0 -1
  41. package/src/runtime/modeling/Semantics.ts +196 -0
  42. package/tests/unit/modeling/client_ip_address_semantic.spec.ts +71 -0
@@ -27,7 +27,7 @@ export declare function addAutoField(entity: DomainEntity, autoField: string): D
27
27
  * @param entity The entity to which the ID field will be added.
28
28
  * @returns The added primary field property.
29
29
  */
30
- export declare function addIdField(entity: DomainEntity, info?: Partial<IThing>): DomainElement;
30
+ export declare function addIdField(entity: DomainEntity, info?: Partial<IThing>): DomainProperty;
31
31
  /**
32
32
  * Adds an email field to the given entity.
33
33
  * If the email field already exists, it returns the existing field.
@@ -35,7 +35,7 @@ export declare function addIdField(entity: DomainEntity, info?: Partial<IThing>)
35
35
  * @param entity The entity to which the email field will be added.
36
36
  * @returns The added email field property.
37
37
  */
38
- export declare function addEmailField(entity: DomainEntity, info?: Partial<IThing>): DomainElement;
38
+ export declare function addEmailField(entity: DomainEntity, info?: Partial<IThing>): DomainProperty;
39
39
  /**
40
40
  * Adds a password field to the given entity.
41
41
  * If the password field already exists, it returns the existing field.
@@ -44,15 +44,15 @@ export declare function addEmailField(entity: DomainEntity, info?: Partial<IThin
44
44
  * @param info Additional information for the password field.
45
45
  * @returns The added password field property.
46
46
  */
47
- export declare function addPasswordField(entity: DomainEntity, info?: Partial<IThing>): DomainElement;
47
+ export declare function addPasswordField(entity: DomainEntity, info?: Partial<IThing>): DomainProperty;
48
48
  /**
49
49
  * Adds a version field to the given entity.
50
50
  * @param entity The entity to which the version field will be added.
51
51
  * The version field is used to track the version of the entity.
52
52
  * @returns The added version field property.
53
53
  */
54
- export declare function addVersionField(entity: DomainEntity, info?: Partial<IThing>): DomainElement;
55
- export declare function addNameField(entity: DomainEntity, info?: Partial<IThing>): DomainElement;
54
+ export declare function addVersionField(entity: DomainEntity, info?: Partial<IThing>): DomainProperty;
55
+ export declare function addNameField(entity: DomainEntity, info?: Partial<IThing>): DomainProperty;
56
56
  /**
57
57
  * Adds a description field to the specified entity.
58
58
  * If a description field already exists, it returns the existing field.
@@ -69,7 +69,7 @@ export declare function addNameField(entity: DomainEntity, info?: Partial<IThing
69
69
  * @param entity The entity to which the description field will be added.
70
70
  * @returns The added description field property.
71
71
  */
72
- export declare function addDescriptionField(entity: DomainEntity, info?: Partial<IThing>): DomainElement;
72
+ export declare function addDescriptionField(entity: DomainEntity, info?: Partial<IThing>): DomainProperty;
73
73
  /**
74
74
  * Adds a status field to the specified entity.
75
75
  * If a status field already exists, it returns the existing field.
@@ -89,7 +89,7 @@ export declare function addDescriptionField(entity: DomainEntity, info?: Partial
89
89
  * @param info Additional information about the field.
90
90
  * @returns The added status field property.
91
91
  */
92
- export declare function addStatusField(entity: DomainEntity, info?: Partial<IThing>): DomainElement;
92
+ export declare function addStatusField(entity: DomainEntity, info?: Partial<IThing>): DomainProperty;
93
93
  /**
94
94
  * Adds an owner field to the specified entity.
95
95
  * If an owner field already exists, it returns the existing field.
@@ -1 +1 @@
1
- {"version":3,"file":"Intelisense.d.ts","sourceRoot":"","sources":["../../../../src/modeling/helpers/Intelisense.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA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IAAI,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,EAC5F,MAAM,CACP,CAAA;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAoB,EAAE,SAAiB,EAAE,MAAM,GAAG,KAAK;IAC/E,OAAO,iBAAiB,CACtB,MAAM,EACN,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAC7E,MAAM,CACP,CAAA;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAoB,EAAE,MAAM,GAAG,KAAK;IAC9D,OAAO,iBAAiB,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,EAAE,MAAM,CAAC,CAAA;AAC5F,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAoB,EAAE,MAAM,GAAG,KAAK;IAC9D,OAAO,iBAAiB,CACtB,MAAM,EACN,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,EAC/F,MAAM,CACP,CAAA;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAoB,EAAE,MAAM,GAAG,KAAK;IAC9D,OAAO,iBAAiB,CACtB,MAAM,EACN,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,QAAQ,CAAC,IAAI,KAAK,UAAU,EAChF,MAAM,CACP,CAAA;AACH,CAAC","sourcesContent":["import type { DomainEntity } from '../DomainEntity.js'\nimport type { DomainElement } from '../DomainElement.js'\nimport type { DomainProperty } from '../DomainProperty.js'\nimport type { DomainAssociation } from '../DomainAssociation.js'\nimport type { IThing } from '../../models/Thing.js'\nimport { SemanticType } from '../Semantics.js'\nimport { createEmailSemantic, DEFAULT_EMAIL_CONFIG } from '../definitions/Email.js'\nimport { createPasswordSemantic, DEFAULT_PASSWORD_CONFIG } from '../definitions/Password.js'\nimport { createPhoneSemantic } from '../definitions/Phone.js'\nimport { createPublicUniqueNameSemantic, DEFAULT_PUBLIC_UNIQUE_NAME_CONFIG } from '../definitions/PublicUniqueName.js'\nimport { createDescriptionSemantic } from '../definitions/Description.js'\nimport { CURRENCY_PRESETS } from '../definitions/Currency.js'\nimport { createStatusSemantic } from '../definitions/Status.js'\nimport { SKU_PRESETS } from '../definitions/SKU.js'\n\n/**\n * Adds a field to the given entity that is automatically generated by the system.\n *\n * @param entity The entity to which the auto field will be added.\n * @param autoField The name of the auto field to add.\n * @returns The added DomainElement representing the auto field.\n * @throws Error if the auto field is not supported.\n */\nexport function addAutoField(entity: DomainEntity, autoField: string): DomainElement {\n switch (autoField) {\n case 'id':\n return addIdField(entity)\n case 'email':\n return addEmailField(entity)\n case 'name':\n return addNameField(entity)\n case 'description':\n return addDescriptionField(entity)\n case 'status':\n return addStatusField(entity)\n case 'version':\n return addVersionField(entity)\n case 'owner':\n return addOwnerField(entity)\n case 'created':\n return addCreatedAtField(entity)\n // case 'created-by':\n // return addCreatedByField(entity)\n case 'updated':\n return addUpdatedAtField(entity)\n case 'updated-by':\n return addUpdatedByField(entity)\n case 'is-deleted':\n return addIsDeletedField(entity)\n case 'deleted':\n return addDeletedAtField(entity)\n case 'first-name':\n return addFirstNameField(entity)\n case 'last-name':\n return addLastNameField(entity)\n case 'phone':\n return addPhoneField(entity)\n case 'avatar-url':\n return addAvatarUrlField(entity)\n case 'public-unique-name':\n return addPublicUniqueNameField(entity)\n case 'price':\n return addPriceField(entity)\n case 'sku':\n return addSkuField(entity)\n case 'quantity':\n return addQuantityField(entity)\n case 'weight':\n return addWeightField(entity)\n case 'images':\n return addImagesField(entity)\n case 'session-id':\n return addSessionIdField(entity)\n case 'expires-at':\n return addExpiresAtField(entity)\n case 'unit-price':\n return addUnitPriceField(entity)\n default:\n throw new Error(`Unsupported auto field: ${autoField}`)\n }\n}\n\n/**\n * Adds the primary field (ID) to the given entity.\n * If the ID field already exists, it returns the existing field.\n * Otherwise, it creates a new ID field with a name based on the entity's name.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'id'\n * - primary: true\n * - readOnly: true\n * - schema.defaultValue: { type: 'function', value: 'uuid-v4' }\n *\n * @param entity The entity to which the ID field will be added.\n * @returns The added primary field property.\n */\nexport function addIdField(entity: DomainEntity, info: Partial<IThing> = {}): DomainElement {\n const existing = findIdField(entity, true)\n if (existing) {\n // If the ID field already exists, return it.\n return existing\n }\n const prop = entity.addProperty({\n info: { name: `id`, ...info },\n primary: true,\n readOnly: true,\n // I don't think we need to index the ID field..\n // index: true,\n type: 'string',\n // @TODO: We should experiment with the random ID generation using the nano library.\n schema: { defaultValue: { type: 'function', value: 'uuid-v4' } },\n })\n return prop\n}\n\n/**\n * Adds an email field to the given entity.\n * If the email field already exists, it returns the existing field.\n * Otherwise, it creates a new email field with a semantic annotation.\n * @param entity The entity to which the email field will be added.\n * @returns The added email field property.\n */\nexport function addEmailField(entity: DomainEntity, info: Partial<IThing> = {}): DomainElement {\n const existing = findEmailField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'email', displayName: 'Email Address', ...info },\n type: 'string',\n required: true,\n index: true,\n })\n prop.addSemantic(createEmailSemantic(DEFAULT_EMAIL_CONFIG))\n return prop\n}\n\n/**\n * Adds a password field to the given entity.\n * If the password field already exists, it returns the existing field.\n * Otherwise, it creates a new password field with a semantic annotation.\n * @param entity The entity to which the password field will be added.\n * @param info Additional information for the password field.\n * @returns The added password field property.\n */\nexport function addPasswordField(entity: DomainEntity, info: Partial<IThing> = {}): DomainElement {\n const existing = findPasswordField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'password', displayName: 'Password', ...info },\n type: 'string',\n required: true,\n })\n prop.addSemantic(createPasswordSemantic(DEFAULT_PASSWORD_CONFIG))\n return prop\n}\n\n/**\n * Adds a version field to the given entity.\n * @param entity The entity to which the version field will be added.\n * The version field is used to track the version of the entity.\n * @returns The added version field property.\n */\nexport function addVersionField(entity: DomainEntity, info: Partial<IThing> = {}): DomainElement {\n const existing = findVersionField(entity, true)\n if (existing) {\n // If the version field already exists, return it.\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'version', displayName: 'Version', ...info },\n readOnly: true,\n index: true,\n type: 'number',\n schema: { defaultValue: { type: 'function', value: 'incremental' }, minimum: 0 },\n })\n prop.addSemantic({\n id: SemanticType.Version,\n })\n return prop\n}\n\nexport function addNameField(entity: DomainEntity, info: Partial<IThing> = {}): DomainElement {\n const existing = findNameField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'name', displayName: 'Name', ...info },\n type: 'string',\n })\n prop.addSemantic({\n id: SemanticType.Title,\n })\n return prop\n}\n\n/**\n * Adds a description field to the specified entity.\n * If a description field already exists, it returns the existing field.\n * Otherwise, it creates a new description field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'description'\n * - info.displayName: 'Description'\n *\n * Set semantics:\n * - `SemanticType.Description`\n *\n * @param entity The entity to which the description field will be added.\n * @returns The added description field property.\n */\nexport function addDescriptionField(entity: DomainEntity, info: Partial<IThing> = {}): DomainElement {\n const existing = findDescriptionField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'description', displayName: 'Description', ...info },\n type: 'string',\n })\n prop.addSemantic(createDescriptionSemantic())\n return prop\n}\n\n/**\n * Adds a status field to the specified entity.\n * If a status field already exists, it returns the existing field.\n * Otherwise, it creates a new status field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'status'\n * - info.displayName: 'Status'\n * - schema.enum: ['Active', 'Draft', 'Archived']\n * - schema.defaultValue: { type: 'literal', value: 'Draft' }\n *\n * Set semantics:\n * - `SemanticType.Status`\n *\n * @param entity The entity to which the status field will be added.\n * @param info Additional information about the field.\n * @returns The added status field property.\n */\nexport function addStatusField(entity: DomainEntity, info: Partial<IThing> = {}): DomainElement {\n const existing = findStatusField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'status', displayName: 'Status', ...info },\n type: 'string',\n schema: {\n enum: ['Active', 'Draft', 'Archived'],\n defaultValue: { type: 'literal', value: 'Draft' },\n },\n })\n prop.addSemantic({\n id: SemanticType.Status,\n })\n return prop\n}\n\n/**\n * Adds an owner field to the specified entity.\n * If an owner field already exists, it returns the existing field.\n * Otherwise, it creates a new owner field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'owner'\n * - info.displayName: 'Owner'\n * - required: true\n *\n * Set semantics:\n * - `SemanticType.ResourceOwnerIdentifier`\n *\n * @param entity The entity to which the owner field will be added.\n * @param info Additional information about the field.\n * @returns The added owner field property.\n */\nexport function addOwnerField(entity: DomainEntity, info: Partial<IThing> = {}): DomainAssociation {\n const existing = findOwnerField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addAssociation(\n {},\n {\n info: { name: 'owner', displayName: 'Owner', ...info },\n required: true,\n }\n )\n prop.addSemantic({\n id: SemanticType.ResourceOwnerIdentifier,\n })\n return prop\n}\n\n// This is owner with different name. Use that one instead.\n// function addCreatedByField(entity: DomainEntity): DomainElement {\n// const existing = findCreatedByField(entity, true)\n// if (existing) {\n// return existing\n// }\n// const prop = entity.addProperty({\n// info: { name: 'created_by', displayName: 'Created By' },\n// type: 'string',\n// readOnly: true,\n// index: true,\n// })\n// prop.addSemantic({\n// id: SemanticType.CreatedTimestamp,\n// })\n// return prop\n// }\n\n/**\n * Adds an updated by field to the specified entity as an association to the User entity.\n * If an updated by field already exists, it returns the existing field.\n * Otherwise, it creates a new updated by field with the specified information.\n *\n * Set properties:\n * - info.name: 'updated_by'\n * - info.displayName: 'Updated By'\n * - required: true\n *\n * Set semantics:\n * - `SemanticType.ResourceOwnerIdentifier`\n *\n * @param entity The entity to which the updated by field will be added.\n * @param info Additional information about the field.\n * @returns The added updated by field property.\n */\nexport function addUpdatedByField(entity: DomainEntity, info: Partial<IThing> = {}): DomainAssociation {\n const existing = findUpdatedByField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addAssociation(\n {},\n {\n info: { name: 'updated_by', displayName: 'Updated By', ...info },\n required: true,\n }\n )\n prop.addSemantic({\n id: SemanticType.ResourceOwnerIdentifier,\n })\n return prop\n}\n\n/**\n * Adds a created at field to the specified entity.\n * If a created at field already exists, it returns the existing field.\n * Otherwise, it creates a new created at field with the specified information.\n *\n * Set properties:\n * - type: 'datetime'\n * - info.name: 'created_at'\n * - info.displayName: 'Created At'\n * - readOnly: true\n * - index: true\n * - schema.defaultValue: { type: 'function', value: 'now' }\n *\n * Set semantics:\n * - `CreatedTimestamp`\n *\n * @param entity The entity to which the created at field will be added.\n * @param info Additional information about the field.\n * @returns The created created at field.\n */\nexport function addCreatedAtField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findCreatedAtField(entity, true)\n if (existing) {\n // If the created_at field already exists, return it.\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'created_at', displayName: 'Created At', ...info },\n readOnly: true,\n index: true,\n type: 'datetime',\n schema: { defaultValue: { type: 'function', value: 'now' } },\n })\n prop.addSemantic({\n id: SemanticType.CreatedTimestamp,\n })\n return prop\n}\n\n/**\n * Adds an updated at field to the specified entity.\n * If an updated at field already exists, it returns the existing field.\n * Otherwise, it creates a new updated at field with the specified information.\n *\n * Set properties:\n * - type: 'datetime'\n * - info.name: 'updated_at'\n * - info.displayName: 'Updated At'\n * - readOnly: true\n * - index: true\n * - schema.defaultValue: { type: 'function', value: 'now' }\n *\n * Set semantics:\n * - `UpdatedTimestamp`\n *\n * @param entity The entity to which the updated at field will be added.\n * @param info Additional information about the field.\n * @returns The created updated at field.\n */\nexport function addUpdatedAtField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findUpdatedAtField(entity, true)\n if (existing) {\n // If the updated_at field already exists, return it.\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'updated_at', displayName: 'Updated At', ...info },\n readOnly: true,\n index: true,\n type: 'datetime',\n schema: { defaultValue: { type: 'function', value: 'now' } },\n })\n prop.addSemantic({\n id: SemanticType.UpdatedTimestamp,\n })\n return prop\n}\n\n/**\n * Adds a deleted at field to the specified entity.\n * If a deleted at field already exists, it returns the existing field.\n * Otherwise, it creates a new deleted at field with the specified information.\n *\n * Set properties:\n * - required: true\n * - type: 'datetime'\n * - info.name: 'deleted_at'\n * - info.displayName: 'Deleted At'\n * - readOnly: true\n * - index: true\n * - schema.defaultValue: { type: 'function', value: 'now' }\n *\n * Set semantics:\n * - `SemanticType.DeletedTimestamp`\n *\n * @param entity The entity to which the deleted_at field will be added.\n * @param info Additional information about the field.\n * @returns The added deleted at field property.\n */\nexport function addDeletedAtField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findDeletedAtField(entity, true)\n if (existing) {\n // If the deleted_at field already exists, return it.\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'deleted_at', displayName: 'Deleted At', ...info },\n readOnly: true,\n index: true,\n type: 'datetime',\n schema: { defaultValue: { type: 'function', value: 'now' } },\n })\n prop.addSemantic({\n id: SemanticType.DeletedTimestamp,\n })\n return prop\n}\n\n/**\n * Adds an is_deleted field to the specified entity.\n * If an is_deleted field already exists, it returns the existing field.\n * Otherwise, it creates a new is_deleted field with the specified information.\n *\n * Set properties:\n * - type: 'boolean'\n * - info.name: 'is_deleted'\n * - info.displayName: 'Is Deleted'\n * - readOnly: true\n * - index: true\n * - schema.defaultValue: { type: 'literal', value: 'false' }\n *\n * Set semantics:\n * - `SemanticType.DeletedFlag`\n *\n * @param entity The entity to which the is_deleted field will be added.\n * @param info Additional information about the field.\n * @returns The added is_deleted field property.\n */\nexport function addIsDeletedField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findIsDeletedField(entity, true)\n if (existing) {\n // If the is_deleted field already exists, return it.\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'is_deleted', displayName: 'Is Deleted', ...info },\n readOnly: true,\n index: true,\n type: 'boolean',\n schema: { defaultValue: { type: 'literal', value: 'false' } },\n })\n prop.addSemantic({\n id: SemanticType.DeletedFlag,\n })\n return prop\n}\n\n/**\n * Adds a first name field to the specified entity.\n * If a first name field already exists, it returns the existing field.\n * Otherwise, it creates a new first name field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'first_name'\n * - info.displayName: 'First Name'\n *\n * @param entity The entity to which the first name field will be added.\n * @param info Additional information about the field.\n * @returns The created first name field.\n */\nexport function addFirstNameField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findFirstNameField(entity)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'first_name', displayName: 'First Name', ...info },\n type: 'string',\n })\n return prop\n}\n\n/**\n * Adds a first name field to the specified entity.\n * If a first name field already exists, it returns the existing field.\n * Otherwise, it creates a new first name field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'first_name'\n * - info.displayName: 'First Name'\n *\n * @param entity The entity to which the first name field will be added.\n * @param info Additional information about the field.\n * @returns The created first name field.\n */\nexport function addLastNameField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findLastNameField(entity)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'last_name', displayName: 'Last Name', ...info },\n type: 'string',\n })\n return prop\n}\n\n/**\n * Adds a phone field to the specified entity.\n * If a phone field already exists, it returns the existing field.\n * Otherwise, it creates a new phone field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'phone'\n * - info.displayName: 'Phone Number'\n * - index: true (to search by phone number)\n *\n * Set semantics:\n * - id: SemanticType.Phone\n *\n * @param entity The entity to which the phone field will be added.\n * @param info Additional information about the field.\n * @returns The created phone field.\n */\nexport function addPhoneField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findPhoneField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'phone', displayName: 'Phone Number', ...info },\n type: 'string',\n index: true,\n })\n prop.addSemantic(\n createPhoneSemantic({\n format: 'international',\n requireCountryCode: true,\n requireVerification: true,\n verificationMethod: 'sms',\n })\n )\n return prop\n}\n\n/**\n * Adds an avatar URL field to the specified entity.\n * If an avatar URL field already exists, it returns the existing field.\n * Otherwise, it creates a new avatar URL field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'avatar_url'\n * - info.displayName: 'Avatar URL'\n *\n * Set semantics:\n * - id: SemanticType.ImageURL\n *\n * @param entity The entity to which the avatar URL field will be added.\n * @param info Additional information about the field.\n * @returns The created avatar URL field.\n */\nexport function addAvatarUrlField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findAvatarUrlField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'avatar_url', displayName: 'Avatar URL', ...info },\n type: 'string',\n })\n prop.addSemantic({ id: SemanticType.ImageURL })\n return prop\n}\n\n/**\n * Adds a public unique name (slug) field to the specified entity.\n * If a public unique name field already exists, it returns the existing field.\n * Otherwise, it creates a new public unique name field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'slug'\n * - info.displayName: 'Public Unique Name'\n * - index: true\n * - required: true\n * - unique: true\n *\n * Set semantics:\n * - id: SemanticType.PublicUniqueName\n *\n * @param entity The entity to which the public unique name field will be added.\n * @param info Additional information about the field.\n * @returns The created public unique name field.\n */\nexport function addPublicUniqueNameField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findPublicUniqueNameField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'slug', displayName: 'Public Unique Name', ...info },\n type: 'string',\n index: true,\n required: true,\n unique: true,\n })\n prop.addSemantic(createPublicUniqueNameSemantic(DEFAULT_PUBLIC_UNIQUE_NAME_CONFIG))\n return prop\n}\n\n/**\n * Adds a SKU field to the specified entity.\n * If a SKU field already exists, it returns the existing field.\n * Otherwise, it creates a new SKU field with semantic annotation.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'sku'\n * - info.displayName: 'SKU'\n * - required: true\n * - unique: true\n *\n * @param entity The entity to which the SKU field will be added.\n * @param info Additional information about the field.\n * @returns The created SKU field.\n */\nexport function addSkuField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findSkuField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'sku', displayName: 'SKU', ...info },\n type: 'string',\n required: true,\n unique: true,\n })\n prop.addSemantic({ ...SKU_PRESETS.PRODUCT_STANDARD })\n return prop\n}\n\n/**\n * Adds a price field to the specified entity with currency semantic.\n * If a price field already exists, it returns the existing field.\n * Otherwise, it creates a new price field with proper currency handling.\n *\n * Set properties:\n * - type: 'number'\n * - info.name: 'price'\n * - info.displayName: 'Price'\n * - required: true\n * - schema.maximum: 0\n *\n * @param entity The entity to which the price field will be added.\n * @param info Additional information about the field.\n * @returns The created price field.\n */\nexport function addPriceField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findPriceField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'price', displayName: 'Price', ...info },\n type: 'number',\n required: true,\n schema: {\n maximum: 0,\n },\n bindings: [\n {\n type: 'web',\n schema: {\n dataType: 'float',\n },\n },\n ],\n })\n prop.addSemantic({ ...CURRENCY_PRESETS.USD_CENTS })\n return prop\n}\n\n/**\n * Adds a quantity field to the specified entity.\n * If a quantity field already exists, it returns the existing field.\n * Otherwise, it creates a new quantity field with validation.\n *\n * Set properties:\n * - type: 'number'\n * - info.name: 'quantity'\n * - info.displayName: 'Quantity'\n * - required: true\n * - schema.minimum: 0\n *\n * @param entity The entity to which the quantity field will be added.\n * @param info Additional information about the field.\n * @returns The created quantity field.\n */\nexport function addQuantityField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findQuantityField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'quantity', displayName: 'Quantity', ...info },\n type: 'number',\n required: true,\n schema: {\n minimum: 0,\n },\n })\n return prop\n}\n\n/**\n * Adds a weight field to the specified entity.\n * If a weight field already exists, it returns the existing field.\n * Otherwise, it creates a new weight field.\n *\n * Set properties:\n * - type: 'number'\n * - info.name: 'weight'\n * - info.displayName: 'Weight'\n *\n * @param entity The entity to which the weight field will be added.\n * @param info Additional information about the field.\n * @returns The created weight field.\n */\nexport function addWeightField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findWeightField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'weight', displayName: 'Weight', ...info },\n type: 'number',\n })\n return prop\n}\n\n/**\n * Adds an images field to the specified entity for multiple image URLs.\n * If an images field already exists, it returns the existing field.\n * Otherwise, it creates a new images field with ImageURL semantic.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'images'\n * - info.displayName: 'Images'\n * - multiple: true\n *\n * @param entity The entity to which the images field will be added.\n * @param info Additional information about the field.\n * @returns The created images field.\n */\nexport function addImagesField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findImagesField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'images', displayName: 'Images', ...info },\n type: 'string',\n multiple: true,\n })\n prop.addSemantic({\n id: SemanticType.ImageURL,\n })\n return prop\n}\n\n/**\n * Adds a status field with custom enum values to the specified entity.\n * This is not a regular enum field, it should represent a record status.\n * If a status field already exists, it returns the existing field.\n * Otherwise, it creates a new status field with provided enum values.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'status'\n * - info.displayName: 'Status'\n * - required: true\n * - schema.enum: provided enum values\n * - schema.defaultValue: first enum value\n *\n * @param entity The entity to which the status field will be added.\n * @param enumValues Array of status values.\n * @param info Additional information about the field.\n * @returns The created status field.\n */\nexport function addCustomStatusField(\n entity: DomainEntity,\n enumValues: string[],\n info: Partial<IThing> = {}\n): DomainProperty {\n const existing = findStatusField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'status', displayName: 'Status', ...info },\n type: 'string',\n required: true,\n schema: {\n enum: enumValues,\n defaultValue: {\n type: 'literal',\n value: enumValues[0],\n },\n },\n })\n prop.addSemantic(createStatusSemantic())\n return prop\n}\n\n/**\n * Adds a boolean field to the specified entity.\n * If the field already exists, it returns the existing field.\n * Otherwise, it creates a new boolean field with default value.\n *\n * Set properties:\n * - type: 'boolean'\n * - required: true\n * - schema.defaultValue: provided default or 'false'\n *\n * @param entity The entity to which the boolean field will be added.\n * @param fieldName Name of the boolean field.\n * @param defaultValue Default boolean value.\n * @param info Additional information about the field.\n * @returns The created boolean field.\n */\nexport function addBooleanField(\n entity: DomainEntity,\n fieldName: string,\n defaultValue = 'false',\n info: Partial<IThing> = {}\n): DomainProperty {\n const existing = findBooleanField(entity, fieldName, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: fieldName, ...info },\n type: 'boolean',\n required: true,\n schema: {\n defaultValue: {\n type: 'literal',\n value: defaultValue,\n },\n },\n })\n return prop\n}\n\n/**\n * Adds a session ID field to the specified entity.\n * If a session ID field already exists, it returns the existing field.\n * Otherwise, it creates a new session ID field.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'sessionId'\n * - info.displayName: 'Session ID'\n *\n * @param entity The entity to which the session ID field will be added.\n * @param info Additional information about the field.\n * @returns The created session ID field.\n */\nexport function addSessionIdField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findSessionIdField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'sessionId', displayName: 'Session ID', ...info },\n type: 'string',\n })\n return prop\n}\n\n/**\n * Adds an expiration datetime field to the specified entity.\n * If an expiration field already exists, it returns the existing field.\n * Otherwise, it creates a new expiration field.\n *\n * Set properties:\n * - type: 'datetime'\n * - info.name: 'expiresAt'\n * - info.displayName: 'Expires At'\n *\n * @param entity The entity to which the expiration field will be added.\n * @param info Additional information about the field.\n * @returns The created expiration field.\n */\nexport function addExpiresAtField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findExpiresAtField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'expiresAt', displayName: 'Expires At', ...info },\n type: 'datetime',\n })\n return prop\n}\n\n/**\n * Adds a unit price field to the specified entity with currency semantic.\n * If a unit price field already exists, it returns the existing field.\n * Otherwise, it creates a new unit price field with proper currency handling.\n *\n * Set properties:\n * - type: 'number'\n * - info.name: 'unitPrice'\n * - info.displayName: 'Unit Price'\n * - required: true\n *\n * @param entity The entity to which the unit price field will be added.\n * @param info Additional information about the field.\n * @returns The created unit price field.\n */\nexport function addUnitPriceField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findUnitPriceField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'unitPrice', displayName: 'Unit Price', ...info },\n type: 'number',\n required: true,\n })\n prop.addSemantic({ ...CURRENCY_PRESETS.USD_CENTS })\n return prop\n}\n\n/**\n * Adds a currency amount field (subtotal, tax, shipping, etc.).\n */\nexport function addCurrencyAmountField(\n entity: DomainEntity,\n fieldName: string,\n displayName: string,\n info: Partial<IThing> = {}\n): DomainProperty {\n const prop = entity.addProperty({\n info: {\n name: fieldName,\n displayName,\n ...info,\n },\n type: 'number',\n required: true,\n })\n prop.addSemantic({ ...CURRENCY_PRESETS.USD_CENTS })\n return prop\n}\n\n/**\n * Finds a field in the given entity that matches the specified predicate.\n * @param entity The entity to search within.\n * @param predicate A function that defines the search criteria.\n * @param direct Whether to search only the direct properties of the entity.\n * @returns The found field property or undefined.\n */\nfunction findPropertyField(\n entity: DomainEntity,\n predicate: (property: DomainProperty) => boolean,\n direct = false\n): DomainProperty | undefined {\n for (const property of entity.properties) {\n if (predicate(property)) {\n return property\n }\n }\n if (direct) {\n return undefined\n }\n for (const parent of entity.listParents()) {\n // we can't call a recursive function here because it would scan vertically through the hierarchy\n // and not horizontally through all parents. We need to check each **direct** parent separately,\n // and then move up.\n for (const property of parent.properties) {\n if (predicate(property)) {\n return property\n }\n }\n }\n return undefined\n}\n\n/**\n * Finds a field in the given entity that matches the specified predicate.\n * @param entity The entity to search within.\n * @param predicate A function that defines the search criteria.\n * @param direct Whether to search only the direct properties of the entity.\n * @returns The found field association or undefined.\n */\nfunction findAssociationField(\n entity: DomainEntity,\n predicate: (property: DomainAssociation) => boolean,\n direct = false\n): DomainAssociation | undefined {\n for (const assoc of entity.associations) {\n if (predicate(assoc)) {\n return assoc\n }\n }\n if (direct) {\n return undefined\n }\n for (const parent of entity.listParents()) {\n // we can't call a recursive function here because it would scan vertically through the hierarchy\n // and not horizontally through all parents. We need to check each **direct** parent separately,\n // and then move up.\n for (const assoc of parent.associations) {\n if (predicate(assoc)) {\n return assoc\n }\n }\n }\n return undefined\n}\n\n/**\n * Searches for the ID field in the given entity.\n * @param entity The entity to search for the ID field.\n * @param direct Whether to search only the direct properties of the entity.\n * @returns The found ID field property or undefined.\n */\nfunction findIdField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n if (!direct) {\n // Find the primary key property in the entity, which can be inherited or defined on the entity itself.\n return entity.primaryKey()\n }\n for (const property of entity.properties) {\n if (property.primary) {\n return property\n }\n }\n}\n\n/**\n * Searches for the email field in the given entity.\n * @param entity The entity to search for the email field.\n * @param direct Whether to search only the direct properties of the entity.\n * @returns The found email field property or undefined.\n */\nfunction findEmailField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.Email), direct)\n}\n\n/**\n * Searches for the password field in the given entity.\n * @param entity The entity to search for the password field.\n * @param direct Whether to search only the direct properties of the entity.\n * @returns The found password field property or undefined.\n */\nfunction findPasswordField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.Password), direct)\n}\n\nfunction findVersionField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => {\n return property.hasSemantic(SemanticType.Version)\n },\n direct\n )\n}\n\nfunction findNameField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.Title), direct)\n}\n\nfunction findDescriptionField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.Description), direct)\n}\n\nfunction findStatusField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.Status), direct)\n}\n\nfunction findOwnerField(entity: DomainEntity, direct = false): DomainAssociation | undefined {\n return findAssociationField(\n entity,\n (association) =>\n association.hasSemantic(SemanticType.ResourceOwnerIdentifier) &&\n ['owner', 'author'].includes(association.info.name || ''),\n direct\n )\n}\n\n// function findCreatedByField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n// return findField(entity, (property) => property.hasSemantic(SemanticType.CreatedTimestamp), direct)\n// }\n\nfunction findUpdatedByField(entity: DomainEntity, direct = false): DomainAssociation | undefined {\n return findAssociationField(\n entity,\n (association) =>\n association.hasSemantic(SemanticType.ResourceOwnerIdentifier) &&\n ['updated_by', 'updatedBy'].includes(association.info.name || ''),\n direct\n )\n}\n\nfunction findCreatedAtField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => {\n return property.hasSemantic(SemanticType.CreatedTimestamp)\n },\n direct\n )\n}\n\nfunction findUpdatedAtField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => {\n return property.hasSemantic(SemanticType.UpdatedTimestamp)\n },\n direct\n )\n}\n\nfunction findDeletedAtField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => {\n return property.hasSemantic(SemanticType.DeletedTimestamp)\n },\n direct\n )\n}\n\nfunction findIsDeletedField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.DeletedFlag), direct)\n}\n\nexport function addRecommendedFields(entity: DomainEntity): DomainElement[] {\n const fields: DomainElement[] = []\n if (!findIdField(entity)) {\n fields.push(addIdField(entity))\n }\n // The version field is not always recommended, so we don't add it by default.\n // if (!findVersionField(entity)) {\n // fields.push(addVersionField(entity))\n // }\n if (!findCreatedAtField(entity)) {\n fields.push(addCreatedAtField(entity))\n }\n // if (!findCreatedByField(entity)) {\n // fields.push(addCreatedByField(entity))\n // }\n if (!findUpdatedAtField(entity)) {\n fields.push(addUpdatedAtField(entity))\n }\n if (!findUpdatedByField(entity)) {\n fields.push(addUpdatedByField(entity))\n }\n if (!findDeletedAtField(entity)) {\n fields.push(addDeletedAtField(entity))\n }\n if (!findIsDeletedField(entity)) {\n fields.push(addIsDeletedField(entity))\n }\n return fields\n}\n\nfunction findFirstNameField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => ['first_name', 'firstName'].includes(property.info.name || ''), direct)\n}\n\nfunction findLastNameField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => ['last_name', 'lastName'].includes(property.info.name || ''), direct)\n}\n\n// Avatar URL has the `SemanticType.ImageURL` semantic, but it can be used for any image URL.\n// It is not a specific semantic, but it is a common field in many entities.\nfunction findAvatarUrlField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => ['avatar_url', 'avatarUrl'].includes(property.info.name || ''), direct)\n}\n\nfunction findPhoneField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.Phone), direct)\n}\n\nfunction findPublicUniqueNameField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.PublicUniqueName), direct)\n}\n\nfunction findSkuField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.SKU), direct)\n}\n\nfunction findPriceField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) =>\n ['price', 'unitPrice', 'totalPrice'].includes(property.info.name || '') &&\n property.hasSemantic(SemanticType.Currency),\n direct\n )\n}\n\nfunction findQuantityField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => ['quantity', 'stock', 'amount'].includes(property.info.name || '') && property.type === 'number',\n direct\n )\n}\n\nfunction findWeightField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.info.name === 'weight' && property.type === 'number', direct)\n}\n\nfunction findImagesField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => property.info.name === 'images' && property.hasSemantic(SemanticType.ImageURL),\n direct\n )\n}\n\nfunction findBooleanField(entity: DomainEntity, fieldName: string, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => property.info.name === fieldName && property.type === 'boolean',\n direct\n )\n}\n\nfunction findSessionIdField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.info.name === 'sessionId', direct)\n}\n\nfunction findUnitPriceField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => property.info.name === 'unitPrice' && property.hasSemantic(SemanticType.Currency),\n direct\n )\n}\n\nfunction findExpiresAtField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => property.info.name === 'expiresAt' && property.type === 'datetime',\n direct\n )\n}\n"]}
1
+ {"version":3,"file":"Intelisense.js","sourceRoot":"","sources":["../../../../src/modeling/helpers/Intelisense.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,O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AAiB,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,EAAE,MAAM,CAAC,CAAA;AAC5F,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAoB,EAAE,MAAM,GAAG,KAAK;IAC9D,OAAO,iBAAiB,CACtB,MAAM,EACN,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,EAC/F,MAAM,CACP,CAAA;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAoB,EAAE,MAAM,GAAG,KAAK;IAC9D,OAAO,iBAAiB,CACtB,MAAM,EACN,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,QAAQ,CAAC,IAAI,KAAK,UAAU,EAChF,MAAM,CACP,CAAA;AACH,CAAC","sourcesContent":["import type { DomainEntity } from '../DomainEntity.js'\nimport type { DomainElement } from '../DomainElement.js'\nimport type { DomainProperty } from '../DomainProperty.js'\nimport type { DomainAssociation } from '../DomainAssociation.js'\nimport type { IThing } from '../../models/Thing.js'\nimport { SemanticType } from '../Semantics.js'\nimport { createEmailSemantic, DEFAULT_EMAIL_CONFIG } from '../definitions/Email.js'\nimport { createPasswordSemantic, DEFAULT_PASSWORD_CONFIG } from '../definitions/Password.js'\nimport { createPhoneSemantic } from '../definitions/Phone.js'\nimport { createPublicUniqueNameSemantic, DEFAULT_PUBLIC_UNIQUE_NAME_CONFIG } from '../definitions/PublicUniqueName.js'\nimport { createDescriptionSemantic } from '../definitions/Description.js'\nimport { CURRENCY_PRESETS } from '../definitions/Currency.js'\nimport { createStatusSemantic } from '../definitions/Status.js'\nimport { SKU_PRESETS } from '../definitions/SKU.js'\n\n/**\n * Adds a field to the given entity that is automatically generated by the system.\n *\n * @param entity The entity to which the auto field will be added.\n * @param autoField The name of the auto field to add.\n * @returns The added DomainElement representing the auto field.\n * @throws Error if the auto field is not supported.\n */\nexport function addAutoField(entity: DomainEntity, autoField: string): DomainElement {\n switch (autoField) {\n case 'id':\n return addIdField(entity)\n case 'email':\n return addEmailField(entity)\n case 'name':\n return addNameField(entity)\n case 'description':\n return addDescriptionField(entity)\n case 'status':\n return addStatusField(entity)\n case 'version':\n return addVersionField(entity)\n case 'owner':\n return addOwnerField(entity)\n case 'created':\n return addCreatedAtField(entity)\n // case 'created-by':\n // return addCreatedByField(entity)\n case 'updated':\n return addUpdatedAtField(entity)\n case 'updated-by':\n return addUpdatedByField(entity)\n case 'is-deleted':\n return addIsDeletedField(entity)\n case 'deleted':\n return addDeletedAtField(entity)\n case 'first-name':\n return addFirstNameField(entity)\n case 'last-name':\n return addLastNameField(entity)\n case 'phone':\n return addPhoneField(entity)\n case 'avatar-url':\n return addAvatarUrlField(entity)\n case 'public-unique-name':\n return addPublicUniqueNameField(entity)\n case 'price':\n return addPriceField(entity)\n case 'sku':\n return addSkuField(entity)\n case 'quantity':\n return addQuantityField(entity)\n case 'weight':\n return addWeightField(entity)\n case 'images':\n return addImagesField(entity)\n case 'session-id':\n return addSessionIdField(entity)\n case 'expires-at':\n return addExpiresAtField(entity)\n case 'unit-price':\n return addUnitPriceField(entity)\n default:\n throw new Error(`Unsupported auto field: ${autoField}`)\n }\n}\n\n/**\n * Adds the primary field (ID) to the given entity.\n * If the ID field already exists, it returns the existing field.\n * Otherwise, it creates a new ID field with a name based on the entity's name.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'id'\n * - primary: true\n * - readOnly: true\n * - schema.defaultValue: { type: 'function', value: 'uuid-v4' }\n *\n * @param entity The entity to which the ID field will be added.\n * @returns The added primary field property.\n */\nexport function addIdField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findIdField(entity, true)\n if (existing) {\n // If the ID field already exists, return it.\n return existing\n }\n const prop = entity.addProperty({\n info: { name: `id`, ...info },\n primary: true,\n readOnly: true,\n // I don't think we need to index the ID field..\n // index: true,\n type: 'string',\n // @TODO: We should experiment with the random ID generation using the nano library.\n schema: { defaultValue: { type: 'function', value: 'uuid-v4' } },\n })\n return prop\n}\n\n/**\n * Adds an email field to the given entity.\n * If the email field already exists, it returns the existing field.\n * Otherwise, it creates a new email field with a semantic annotation.\n * @param entity The entity to which the email field will be added.\n * @returns The added email field property.\n */\nexport function addEmailField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findEmailField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'email', displayName: 'Email Address', ...info },\n type: 'string',\n required: true,\n index: true,\n })\n prop.addSemantic(createEmailSemantic(DEFAULT_EMAIL_CONFIG))\n return prop\n}\n\n/**\n * Adds a password field to the given entity.\n * If the password field already exists, it returns the existing field.\n * Otherwise, it creates a new password field with a semantic annotation.\n * @param entity The entity to which the password field will be added.\n * @param info Additional information for the password field.\n * @returns The added password field property.\n */\nexport function addPasswordField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findPasswordField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'password', displayName: 'Password', ...info },\n type: 'string',\n required: true,\n })\n prop.addSemantic(createPasswordSemantic(DEFAULT_PASSWORD_CONFIG))\n return prop\n}\n\n/**\n * Adds a version field to the given entity.\n * @param entity The entity to which the version field will be added.\n * The version field is used to track the version of the entity.\n * @returns The added version field property.\n */\nexport function addVersionField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findVersionField(entity, true)\n if (existing) {\n // If the version field already exists, return it.\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'version', displayName: 'Version', ...info },\n readOnly: true,\n index: true,\n type: 'number',\n schema: { defaultValue: { type: 'function', value: 'incremental' }, minimum: 0 },\n })\n prop.addSemantic({\n id: SemanticType.Version,\n })\n return prop\n}\n\nexport function addNameField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findNameField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'name', displayName: 'Name', ...info },\n type: 'string',\n })\n prop.addSemantic({\n id: SemanticType.Title,\n })\n return prop\n}\n\n/**\n * Adds a description field to the specified entity.\n * If a description field already exists, it returns the existing field.\n * Otherwise, it creates a new description field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'description'\n * - info.displayName: 'Description'\n *\n * Set semantics:\n * - `SemanticType.Description`\n *\n * @param entity The entity to which the description field will be added.\n * @returns The added description field property.\n */\nexport function addDescriptionField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findDescriptionField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'description', displayName: 'Description', ...info },\n type: 'string',\n })\n prop.addSemantic(createDescriptionSemantic())\n return prop\n}\n\n/**\n * Adds a status field to the specified entity.\n * If a status field already exists, it returns the existing field.\n * Otherwise, it creates a new status field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'status'\n * - info.displayName: 'Status'\n * - schema.enum: ['Active', 'Draft', 'Archived']\n * - schema.defaultValue: { type: 'literal', value: 'Draft' }\n *\n * Set semantics:\n * - `SemanticType.Status`\n *\n * @param entity The entity to which the status field will be added.\n * @param info Additional information about the field.\n * @returns The added status field property.\n */\nexport function addStatusField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findStatusField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'status', displayName: 'Status', ...info },\n type: 'string',\n schema: {\n enum: ['Active', 'Draft', 'Archived'],\n defaultValue: { type: 'literal', value: 'Draft' },\n },\n })\n prop.addSemantic({\n id: SemanticType.Status,\n })\n return prop\n}\n\n/**\n * Adds an owner field to the specified entity.\n * If an owner field already exists, it returns the existing field.\n * Otherwise, it creates a new owner field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'owner'\n * - info.displayName: 'Owner'\n * - required: true\n *\n * Set semantics:\n * - `SemanticType.ResourceOwnerIdentifier`\n *\n * @param entity The entity to which the owner field will be added.\n * @param info Additional information about the field.\n * @returns The added owner field property.\n */\nexport function addOwnerField(entity: DomainEntity, info: Partial<IThing> = {}): DomainAssociation {\n const existing = findOwnerField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addAssociation(\n {},\n {\n info: { name: 'owner', displayName: 'Owner', ...info },\n required: true,\n }\n )\n prop.addSemantic({\n id: SemanticType.ResourceOwnerIdentifier,\n })\n return prop\n}\n\n// This is owner with different name. Use that one instead.\n// function addCreatedByField(entity: DomainEntity): DomainElement {\n// const existing = findCreatedByField(entity, true)\n// if (existing) {\n// return existing\n// }\n// const prop = entity.addProperty({\n// info: { name: 'created_by', displayName: 'Created By' },\n// type: 'string',\n// readOnly: true,\n// index: true,\n// })\n// prop.addSemantic({\n// id: SemanticType.CreatedTimestamp,\n// })\n// return prop\n// }\n\n/**\n * Adds an updated by field to the specified entity as an association to the User entity.\n * If an updated by field already exists, it returns the existing field.\n * Otherwise, it creates a new updated by field with the specified information.\n *\n * Set properties:\n * - info.name: 'updated_by'\n * - info.displayName: 'Updated By'\n * - required: true\n *\n * Set semantics:\n * - `SemanticType.ResourceOwnerIdentifier`\n *\n * @param entity The entity to which the updated by field will be added.\n * @param info Additional information about the field.\n * @returns The added updated by field property.\n */\nexport function addUpdatedByField(entity: DomainEntity, info: Partial<IThing> = {}): DomainAssociation {\n const existing = findUpdatedByField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addAssociation(\n {},\n {\n info: { name: 'updated_by', displayName: 'Updated By', ...info },\n required: true,\n }\n )\n prop.addSemantic({\n id: SemanticType.ResourceOwnerIdentifier,\n })\n return prop\n}\n\n/**\n * Adds a created at field to the specified entity.\n * If a created at field already exists, it returns the existing field.\n * Otherwise, it creates a new created at field with the specified information.\n *\n * Set properties:\n * - type: 'datetime'\n * - info.name: 'created_at'\n * - info.displayName: 'Created At'\n * - readOnly: true\n * - index: true\n * - schema.defaultValue: { type: 'function', value: 'now' }\n *\n * Set semantics:\n * - `CreatedTimestamp`\n *\n * @param entity The entity to which the created at field will be added.\n * @param info Additional information about the field.\n * @returns The created created at field.\n */\nexport function addCreatedAtField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findCreatedAtField(entity, true)\n if (existing) {\n // If the created_at field already exists, return it.\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'created_at', displayName: 'Created At', ...info },\n readOnly: true,\n index: true,\n type: 'datetime',\n schema: { defaultValue: { type: 'function', value: 'now' } },\n })\n prop.addSemantic({\n id: SemanticType.CreatedTimestamp,\n })\n return prop\n}\n\n/**\n * Adds an updated at field to the specified entity.\n * If an updated at field already exists, it returns the existing field.\n * Otherwise, it creates a new updated at field with the specified information.\n *\n * Set properties:\n * - type: 'datetime'\n * - info.name: 'updated_at'\n * - info.displayName: 'Updated At'\n * - readOnly: true\n * - index: true\n * - schema.defaultValue: { type: 'function', value: 'now' }\n *\n * Set semantics:\n * - `UpdatedTimestamp`\n *\n * @param entity The entity to which the updated at field will be added.\n * @param info Additional information about the field.\n * @returns The created updated at field.\n */\nexport function addUpdatedAtField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findUpdatedAtField(entity, true)\n if (existing) {\n // If the updated_at field already exists, return it.\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'updated_at', displayName: 'Updated At', ...info },\n readOnly: true,\n index: true,\n type: 'datetime',\n schema: { defaultValue: { type: 'function', value: 'now' } },\n })\n prop.addSemantic({\n id: SemanticType.UpdatedTimestamp,\n })\n return prop\n}\n\n/**\n * Adds a deleted at field to the specified entity.\n * If a deleted at field already exists, it returns the existing field.\n * Otherwise, it creates a new deleted at field with the specified information.\n *\n * Set properties:\n * - required: true\n * - type: 'datetime'\n * - info.name: 'deleted_at'\n * - info.displayName: 'Deleted At'\n * - readOnly: true\n * - index: true\n * - schema.defaultValue: { type: 'function', value: 'now' }\n *\n * Set semantics:\n * - `SemanticType.DeletedTimestamp`\n *\n * @param entity The entity to which the deleted_at field will be added.\n * @param info Additional information about the field.\n * @returns The added deleted at field property.\n */\nexport function addDeletedAtField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findDeletedAtField(entity, true)\n if (existing) {\n // If the deleted_at field already exists, return it.\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'deleted_at', displayName: 'Deleted At', ...info },\n readOnly: true,\n index: true,\n type: 'datetime',\n schema: { defaultValue: { type: 'function', value: 'now' } },\n })\n prop.addSemantic({\n id: SemanticType.DeletedTimestamp,\n })\n return prop\n}\n\n/**\n * Adds an is_deleted field to the specified entity.\n * If an is_deleted field already exists, it returns the existing field.\n * Otherwise, it creates a new is_deleted field with the specified information.\n *\n * Set properties:\n * - type: 'boolean'\n * - info.name: 'is_deleted'\n * - info.displayName: 'Is Deleted'\n * - readOnly: true\n * - index: true\n * - schema.defaultValue: { type: 'literal', value: 'false' }\n *\n * Set semantics:\n * - `SemanticType.DeletedFlag`\n *\n * @param entity The entity to which the is_deleted field will be added.\n * @param info Additional information about the field.\n * @returns The added is_deleted field property.\n */\nexport function addIsDeletedField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findIsDeletedField(entity, true)\n if (existing) {\n // If the is_deleted field already exists, return it.\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'is_deleted', displayName: 'Is Deleted', ...info },\n readOnly: true,\n index: true,\n type: 'boolean',\n schema: { defaultValue: { type: 'literal', value: 'false' } },\n })\n prop.addSemantic({\n id: SemanticType.DeletedFlag,\n })\n return prop\n}\n\n/**\n * Adds a first name field to the specified entity.\n * If a first name field already exists, it returns the existing field.\n * Otherwise, it creates a new first name field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'first_name'\n * - info.displayName: 'First Name'\n *\n * @param entity The entity to which the first name field will be added.\n * @param info Additional information about the field.\n * @returns The created first name field.\n */\nexport function addFirstNameField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findFirstNameField(entity)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'first_name', displayName: 'First Name', ...info },\n type: 'string',\n })\n return prop\n}\n\n/**\n * Adds a first name field to the specified entity.\n * If a first name field already exists, it returns the existing field.\n * Otherwise, it creates a new first name field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'first_name'\n * - info.displayName: 'First Name'\n *\n * @param entity The entity to which the first name field will be added.\n * @param info Additional information about the field.\n * @returns The created first name field.\n */\nexport function addLastNameField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findLastNameField(entity)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'last_name', displayName: 'Last Name', ...info },\n type: 'string',\n })\n return prop\n}\n\n/**\n * Adds a phone field to the specified entity.\n * If a phone field already exists, it returns the existing field.\n * Otherwise, it creates a new phone field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'phone'\n * - info.displayName: 'Phone Number'\n * - index: true (to search by phone number)\n *\n * Set semantics:\n * - id: SemanticType.Phone\n *\n * @param entity The entity to which the phone field will be added.\n * @param info Additional information about the field.\n * @returns The created phone field.\n */\nexport function addPhoneField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findPhoneField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'phone', displayName: 'Phone Number', ...info },\n type: 'string',\n index: true,\n })\n prop.addSemantic(\n createPhoneSemantic({\n format: 'international',\n requireCountryCode: true,\n requireVerification: true,\n verificationMethod: 'sms',\n })\n )\n return prop\n}\n\n/**\n * Adds an avatar URL field to the specified entity.\n * If an avatar URL field already exists, it returns the existing field.\n * Otherwise, it creates a new avatar URL field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'avatar_url'\n * - info.displayName: 'Avatar URL'\n *\n * Set semantics:\n * - id: SemanticType.ImageURL\n *\n * @param entity The entity to which the avatar URL field will be added.\n * @param info Additional information about the field.\n * @returns The created avatar URL field.\n */\nexport function addAvatarUrlField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findAvatarUrlField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'avatar_url', displayName: 'Avatar URL', ...info },\n type: 'string',\n })\n prop.addSemantic({ id: SemanticType.ImageURL })\n return prop\n}\n\n/**\n * Adds a public unique name (slug) field to the specified entity.\n * If a public unique name field already exists, it returns the existing field.\n * Otherwise, it creates a new public unique name field with the specified information.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'slug'\n * - info.displayName: 'Public Unique Name'\n * - index: true\n * - required: true\n * - unique: true\n *\n * Set semantics:\n * - id: SemanticType.PublicUniqueName\n *\n * @param entity The entity to which the public unique name field will be added.\n * @param info Additional information about the field.\n * @returns The created public unique name field.\n */\nexport function addPublicUniqueNameField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findPublicUniqueNameField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'slug', displayName: 'Public Unique Name', ...info },\n type: 'string',\n index: true,\n required: true,\n unique: true,\n })\n prop.addSemantic(createPublicUniqueNameSemantic(DEFAULT_PUBLIC_UNIQUE_NAME_CONFIG))\n return prop\n}\n\n/**\n * Adds a SKU field to the specified entity.\n * If a SKU field already exists, it returns the existing field.\n * Otherwise, it creates a new SKU field with semantic annotation.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'sku'\n * - info.displayName: 'SKU'\n * - required: true\n * - unique: true\n *\n * @param entity The entity to which the SKU field will be added.\n * @param info Additional information about the field.\n * @returns The created SKU field.\n */\nexport function addSkuField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findSkuField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'sku', displayName: 'SKU', ...info },\n type: 'string',\n required: true,\n unique: true,\n })\n prop.addSemantic({ ...SKU_PRESETS.PRODUCT_STANDARD })\n return prop\n}\n\n/**\n * Adds a price field to the specified entity with currency semantic.\n * If a price field already exists, it returns the existing field.\n * Otherwise, it creates a new price field with proper currency handling.\n *\n * Set properties:\n * - type: 'number'\n * - info.name: 'price'\n * - info.displayName: 'Price'\n * - required: true\n * - schema.maximum: 0\n *\n * @param entity The entity to which the price field will be added.\n * @param info Additional information about the field.\n * @returns The created price field.\n */\nexport function addPriceField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findPriceField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'price', displayName: 'Price', ...info },\n type: 'number',\n required: true,\n schema: {\n maximum: 0,\n },\n bindings: [\n {\n type: 'web',\n schema: {\n dataType: 'float',\n },\n },\n ],\n })\n prop.addSemantic({ ...CURRENCY_PRESETS.USD_CENTS })\n return prop\n}\n\n/**\n * Adds a quantity field to the specified entity.\n * If a quantity field already exists, it returns the existing field.\n * Otherwise, it creates a new quantity field with validation.\n *\n * Set properties:\n * - type: 'number'\n * - info.name: 'quantity'\n * - info.displayName: 'Quantity'\n * - required: true\n * - schema.minimum: 0\n *\n * @param entity The entity to which the quantity field will be added.\n * @param info Additional information about the field.\n * @returns The created quantity field.\n */\nexport function addQuantityField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findQuantityField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'quantity', displayName: 'Quantity', ...info },\n type: 'number',\n required: true,\n schema: {\n minimum: 0,\n },\n })\n return prop\n}\n\n/**\n * Adds a weight field to the specified entity.\n * If a weight field already exists, it returns the existing field.\n * Otherwise, it creates a new weight field.\n *\n * Set properties:\n * - type: 'number'\n * - info.name: 'weight'\n * - info.displayName: 'Weight'\n *\n * @param entity The entity to which the weight field will be added.\n * @param info Additional information about the field.\n * @returns The created weight field.\n */\nexport function addWeightField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findWeightField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'weight', displayName: 'Weight', ...info },\n type: 'number',\n })\n return prop\n}\n\n/**\n * Adds an images field to the specified entity for multiple image URLs.\n * If an images field already exists, it returns the existing field.\n * Otherwise, it creates a new images field with ImageURL semantic.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'images'\n * - info.displayName: 'Images'\n * - multiple: true\n *\n * @param entity The entity to which the images field will be added.\n * @param info Additional information about the field.\n * @returns The created images field.\n */\nexport function addImagesField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findImagesField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'images', displayName: 'Images', ...info },\n type: 'string',\n multiple: true,\n })\n prop.addSemantic({\n id: SemanticType.ImageURL,\n })\n return prop\n}\n\n/**\n * Adds a status field with custom enum values to the specified entity.\n * This is not a regular enum field, it should represent a record status.\n * If a status field already exists, it returns the existing field.\n * Otherwise, it creates a new status field with provided enum values.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'status'\n * - info.displayName: 'Status'\n * - required: true\n * - schema.enum: provided enum values\n * - schema.defaultValue: first enum value\n *\n * @param entity The entity to which the status field will be added.\n * @param enumValues Array of status values.\n * @param info Additional information about the field.\n * @returns The created status field.\n */\nexport function addCustomStatusField(\n entity: DomainEntity,\n enumValues: string[],\n info: Partial<IThing> = {}\n): DomainProperty {\n const existing = findStatusField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'status', displayName: 'Status', ...info },\n type: 'string',\n required: true,\n schema: {\n enum: enumValues,\n defaultValue: {\n type: 'literal',\n value: enumValues[0],\n },\n },\n })\n prop.addSemantic(createStatusSemantic())\n return prop\n}\n\n/**\n * Adds a boolean field to the specified entity.\n * If the field already exists, it returns the existing field.\n * Otherwise, it creates a new boolean field with default value.\n *\n * Set properties:\n * - type: 'boolean'\n * - required: true\n * - schema.defaultValue: provided default or 'false'\n *\n * @param entity The entity to which the boolean field will be added.\n * @param fieldName Name of the boolean field.\n * @param defaultValue Default boolean value.\n * @param info Additional information about the field.\n * @returns The created boolean field.\n */\nexport function addBooleanField(\n entity: DomainEntity,\n fieldName: string,\n defaultValue = 'false',\n info: Partial<IThing> = {}\n): DomainProperty {\n const existing = findBooleanField(entity, fieldName, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: fieldName, ...info },\n type: 'boolean',\n required: true,\n schema: {\n defaultValue: {\n type: 'literal',\n value: defaultValue,\n },\n },\n })\n return prop\n}\n\n/**\n * Adds a session ID field to the specified entity.\n * If a session ID field already exists, it returns the existing field.\n * Otherwise, it creates a new session ID field.\n *\n * Set properties:\n * - type: 'string'\n * - info.name: 'sessionId'\n * - info.displayName: 'Session ID'\n *\n * @param entity The entity to which the session ID field will be added.\n * @param info Additional information about the field.\n * @returns The created session ID field.\n */\nexport function addSessionIdField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findSessionIdField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'sessionId', displayName: 'Session ID', ...info },\n type: 'string',\n })\n return prop\n}\n\n/**\n * Adds an expiration datetime field to the specified entity.\n * If an expiration field already exists, it returns the existing field.\n * Otherwise, it creates a new expiration field.\n *\n * Set properties:\n * - type: 'datetime'\n * - info.name: 'expiresAt'\n * - info.displayName: 'Expires At'\n *\n * @param entity The entity to which the expiration field will be added.\n * @param info Additional information about the field.\n * @returns The created expiration field.\n */\nexport function addExpiresAtField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findExpiresAtField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'expiresAt', displayName: 'Expires At', ...info },\n type: 'datetime',\n })\n return prop\n}\n\n/**\n * Adds a unit price field to the specified entity with currency semantic.\n * If a unit price field already exists, it returns the existing field.\n * Otherwise, it creates a new unit price field with proper currency handling.\n *\n * Set properties:\n * - type: 'number'\n * - info.name: 'unitPrice'\n * - info.displayName: 'Unit Price'\n * - required: true\n *\n * @param entity The entity to which the unit price field will be added.\n * @param info Additional information about the field.\n * @returns The created unit price field.\n */\nexport function addUnitPriceField(entity: DomainEntity, info: Partial<IThing> = {}): DomainProperty {\n const existing = findUnitPriceField(entity, true)\n if (existing) {\n return existing\n }\n const prop = entity.addProperty({\n info: { name: 'unitPrice', displayName: 'Unit Price', ...info },\n type: 'number',\n required: true,\n })\n prop.addSemantic({ ...CURRENCY_PRESETS.USD_CENTS })\n return prop\n}\n\n/**\n * Adds a currency amount field (subtotal, tax, shipping, etc.).\n */\nexport function addCurrencyAmountField(\n entity: DomainEntity,\n fieldName: string,\n displayName: string,\n info: Partial<IThing> = {}\n): DomainProperty {\n const prop = entity.addProperty({\n info: {\n name: fieldName,\n displayName,\n ...info,\n },\n type: 'number',\n required: true,\n })\n prop.addSemantic({ ...CURRENCY_PRESETS.USD_CENTS })\n return prop\n}\n\n/**\n * Finds a field in the given entity that matches the specified predicate.\n * @param entity The entity to search within.\n * @param predicate A function that defines the search criteria.\n * @param direct Whether to search only the direct properties of the entity.\n * @returns The found field property or undefined.\n */\nfunction findPropertyField(\n entity: DomainEntity,\n predicate: (property: DomainProperty) => boolean,\n direct = false\n): DomainProperty | undefined {\n for (const property of entity.properties) {\n if (predicate(property)) {\n return property\n }\n }\n if (direct) {\n return undefined\n }\n for (const parent of entity.listParents()) {\n // we can't call a recursive function here because it would scan vertically through the hierarchy\n // and not horizontally through all parents. We need to check each **direct** parent separately,\n // and then move up.\n for (const property of parent.properties) {\n if (predicate(property)) {\n return property\n }\n }\n }\n return undefined\n}\n\n/**\n * Finds a field in the given entity that matches the specified predicate.\n * @param entity The entity to search within.\n * @param predicate A function that defines the search criteria.\n * @param direct Whether to search only the direct properties of the entity.\n * @returns The found field association or undefined.\n */\nfunction findAssociationField(\n entity: DomainEntity,\n predicate: (property: DomainAssociation) => boolean,\n direct = false\n): DomainAssociation | undefined {\n for (const assoc of entity.associations) {\n if (predicate(assoc)) {\n return assoc\n }\n }\n if (direct) {\n return undefined\n }\n for (const parent of entity.listParents()) {\n // we can't call a recursive function here because it would scan vertically through the hierarchy\n // and not horizontally through all parents. We need to check each **direct** parent separately,\n // and then move up.\n for (const assoc of parent.associations) {\n if (predicate(assoc)) {\n return assoc\n }\n }\n }\n return undefined\n}\n\n/**\n * Searches for the ID field in the given entity.\n * @param entity The entity to search for the ID field.\n * @param direct Whether to search only the direct properties of the entity.\n * @returns The found ID field property or undefined.\n */\nfunction findIdField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n if (!direct) {\n // Find the primary key property in the entity, which can be inherited or defined on the entity itself.\n return entity.primaryKey()\n }\n for (const property of entity.properties) {\n if (property.primary) {\n return property\n }\n }\n}\n\n/**\n * Searches for the email field in the given entity.\n * @param entity The entity to search for the email field.\n * @param direct Whether to search only the direct properties of the entity.\n * @returns The found email field property or undefined.\n */\nfunction findEmailField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.Email), direct)\n}\n\n/**\n * Searches for the password field in the given entity.\n * @param entity The entity to search for the password field.\n * @param direct Whether to search only the direct properties of the entity.\n * @returns The found password field property or undefined.\n */\nfunction findPasswordField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.Password), direct)\n}\n\nfunction findVersionField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => {\n return property.hasSemantic(SemanticType.Version)\n },\n direct\n )\n}\n\nfunction findNameField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.Title), direct)\n}\n\nfunction findDescriptionField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.Description), direct)\n}\n\nfunction findStatusField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.Status), direct)\n}\n\nfunction findOwnerField(entity: DomainEntity, direct = false): DomainAssociation | undefined {\n return findAssociationField(\n entity,\n (association) =>\n association.hasSemantic(SemanticType.ResourceOwnerIdentifier) &&\n ['owner', 'author'].includes(association.info.name || ''),\n direct\n )\n}\n\n// function findCreatedByField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n// return findField(entity, (property) => property.hasSemantic(SemanticType.CreatedTimestamp), direct)\n// }\n\nfunction findUpdatedByField(entity: DomainEntity, direct = false): DomainAssociation | undefined {\n return findAssociationField(\n entity,\n (association) =>\n association.hasSemantic(SemanticType.ResourceOwnerIdentifier) &&\n ['updated_by', 'updatedBy'].includes(association.info.name || ''),\n direct\n )\n}\n\nfunction findCreatedAtField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => {\n return property.hasSemantic(SemanticType.CreatedTimestamp)\n },\n direct\n )\n}\n\nfunction findUpdatedAtField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => {\n return property.hasSemantic(SemanticType.UpdatedTimestamp)\n },\n direct\n )\n}\n\nfunction findDeletedAtField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => {\n return property.hasSemantic(SemanticType.DeletedTimestamp)\n },\n direct\n )\n}\n\nfunction findIsDeletedField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.DeletedFlag), direct)\n}\n\nexport function addRecommendedFields(entity: DomainEntity): DomainElement[] {\n const fields: DomainElement[] = []\n if (!findIdField(entity)) {\n fields.push(addIdField(entity))\n }\n // The version field is not always recommended, so we don't add it by default.\n // if (!findVersionField(entity)) {\n // fields.push(addVersionField(entity))\n // }\n if (!findCreatedAtField(entity)) {\n fields.push(addCreatedAtField(entity))\n }\n // if (!findCreatedByField(entity)) {\n // fields.push(addCreatedByField(entity))\n // }\n if (!findUpdatedAtField(entity)) {\n fields.push(addUpdatedAtField(entity))\n }\n if (!findUpdatedByField(entity)) {\n fields.push(addUpdatedByField(entity))\n }\n if (!findDeletedAtField(entity)) {\n fields.push(addDeletedAtField(entity))\n }\n if (!findIsDeletedField(entity)) {\n fields.push(addIsDeletedField(entity))\n }\n return fields\n}\n\nfunction findFirstNameField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => ['first_name', 'firstName'].includes(property.info.name || ''), direct)\n}\n\nfunction findLastNameField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => ['last_name', 'lastName'].includes(property.info.name || ''), direct)\n}\n\n// Avatar URL has the `SemanticType.ImageURL` semantic, but it can be used for any image URL.\n// It is not a specific semantic, but it is a common field in many entities.\nfunction findAvatarUrlField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => ['avatar_url', 'avatarUrl'].includes(property.info.name || ''), direct)\n}\n\nfunction findPhoneField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.Phone), direct)\n}\n\nfunction findPublicUniqueNameField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.PublicUniqueName), direct)\n}\n\nfunction findSkuField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.SKU), direct)\n}\n\nfunction findPriceField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) =>\n ['price', 'unitPrice', 'totalPrice'].includes(property.info.name || '') &&\n property.hasSemantic(SemanticType.Currency),\n direct\n )\n}\n\nfunction findQuantityField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => ['quantity', 'stock', 'amount'].includes(property.info.name || '') && property.type === 'number',\n direct\n )\n}\n\nfunction findWeightField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.info.name === 'weight' && property.type === 'number', direct)\n}\n\nfunction findImagesField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => property.info.name === 'images' && property.hasSemantic(SemanticType.ImageURL),\n direct\n )\n}\n\nfunction findBooleanField(entity: DomainEntity, fieldName: string, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => property.info.name === fieldName && property.type === 'boolean',\n direct\n )\n}\n\nfunction findSessionIdField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(entity, (property) => property.info.name === 'sessionId', direct)\n}\n\nfunction findUnitPriceField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => property.info.name === 'unitPrice' && property.hasSemantic(SemanticType.Currency),\n direct\n )\n}\n\nfunction findExpiresAtField(entity: DomainEntity, direct = false): DomainProperty | undefined {\n return findPropertyField(\n entity,\n (property) => property.info.name === 'expiresAt' && property.type === 'datetime',\n direct\n )\n}\n"]}
@@ -1 +1 @@
1
- { "id": "blog-publishing-platform", "name": "Blog Publishing Platform", "description": "A comprehensive content management and publishing platform for blogs, magazines, and digital publications. Includes content management, user roles, publishing workflow, and social features.", "createdAt": "2025-07-27T21:14:57.328Z", "updatedAt": "2025-07-27T21:14:57.328Z", "version": "1.0.0", "author": "API Now! Core Team", "tags": ["blog", "cms", "publishing", "content", "media", "editorial"], "structure": { "domain": { "name": "Blog Publishing Platform", "description": "A comprehensive content management and publishing platform for blogs, magazines, and digital publications", "totalEntities": 8, "totalProperties": 68, "totalAssociations": 14 }, "namespaces": [{ "name": "ContentManagement", "displayName": "Content Management", "description": "Core content creation, editing, and organization features", "modelCount": 2, "entityCount": 4, "models": [{ "name": "Publications", "displayName": "Publications Management", "description": "Individual blogs, magazines, or publications within the platform", "entityCount": 1, "entities": [{ "name": "publication", "displayName": "Publication", "description": "Individual blog or publication site", "propertyCount": 8, "associationCount": 0, "properties": [{ "name": "id", "displayName": "Publication ID", "description": "Unique identifier for the publication", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "name", "displayName": "Publication Name", "description": "Display name of the publication", "type": "string", "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the publication", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "description", "displayName": "Description", "description": "Publication description and tagline", "type": "string", "semantics": ["Semantic#Description"] }, { "name": "domain", "displayName": "Custom Domain", "description": "Custom domain name for the publication", "type": "string", "semantics": [] }, { "name": "logo_url", "displayName": "Logo URL", "description": "URL to publication logo image", "type": "string", "semantics": ["Semantic#ImageURL"] }, { "name": "status", "displayName": "Publication Status", "description": "Current status of the publication", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["active", "suspended", "archived"], "defaultValue": "active" }, { "name": "created_at", "displayName": "Created At", "description": "When the publication was created", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [], "semantics": [] }] }, { "name": "Content", "displayName": "Content Management", "description": "Posts, pages, and other content types", "entityCount": 3, "entities": [{ "name": "category", "displayName": "Content Category", "description": "Content categorization for organization and navigation", "propertyCount": 5, "associationCount": 2, "properties": [{ "name": "id", "displayName": "Category ID", "description": "Unique identifier for the category", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "name", "displayName": "Category Name", "description": "Display name of the category", "type": "string", "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the category", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "description", "displayName": "Description", "description": "Category description", "type": "string", "semantics": ["Semantic#Description"] }, { "name": "color", "displayName": "Color", "description": "Theme color for the category", "type": "string", "semantics": [] }], "associations": [{ "name": "publication", "displayName": "Publication", "description": "Publication this category belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }, { "name": "parentCategory", "displayName": "Parent Category", "description": "Parent category for hierarchical organization", "required": false, "multiple": false, "targetEntities": ["category"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }, { "name": "Tag", "displayName": "Content Tag", "description": "Tags for flexible content labeling and discovery", "propertyCount": 3, "associationCount": 1, "properties": [{ "name": "id", "displayName": "Tag ID", "description": "Unique identifier for the tag", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "name", "displayName": "Tag Name", "description": "Display name of the tag", "type": "string", "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the tag", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }], "associations": [{ "name": "publication", "displayName": "Publication", "description": "Publication this tag belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }, { "name": "Post", "displayName": "Blog Post", "description": "Individual blog posts and articles", "propertyCount": 16, "associationCount": 4, "properties": [{ "name": "id", "displayName": "Post ID", "description": "Unique identifier for the post", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "title", "displayName": "Post Title", "description": "Title of the blog post", "type": "string", "required": true, "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the post", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "excerpt", "displayName": "Excerpt", "description": "Brief summary or excerpt of the post", "type": "string", "semantics": ["Semantic#Summary"] }, { "name": "content", "displayName": "Content", "description": "Full content of the post in HTML or Markdown", "type": "string", "required": true, "semantics": ["Semantic#HTML"] }, { "name": "content_format", "displayName": "Content Format", "description": "Format of the content (HTML, Markdown, etc.)", "type": "string", "required": true, "semantics": [], "enumValues": ["html", "markdown", "richtext"], "defaultValue": "markdown" }, { "name": "featured_image_url", "displayName": "Featured Image URL", "description": "URL to featured image", "type": "string", "semantics": ["Semantic#ImageURL"] }, { "name": "status", "displayName": "Post Status", "description": "Current publishing status of the post", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["draft", "pending_review", "scheduled", "published", "archived"], "defaultValue": "draft" }, { "name": "published_at", "displayName": "Published At", "description": "When the post was published", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }, { "name": "scheduled_at", "displayName": "Scheduled At", "description": "When the post is scheduled to be published", "type": "datetime", "semantics": [] }, { "name": "view_count", "displayName": "View Count", "description": "Number of times the post has been viewed", "type": "number", "required": true, "semantics": [] }, { "name": "reading_time", "displayName": "Reading Time", "description": "Estimated reading time in minutes", "type": "number", "readOnly": true, "semantics": ["Semantic#Calculated"] }, { "name": "word_count", "displayName": "Word Count", "description": "Number of words in the post content", "type": "number", "readOnly": true, "semantics": ["Semantic#Calculated"] }, { "name": "meta_title", "displayName": "Meta Title", "description": "SEO meta title", "type": "string", "semantics": [] }, { "name": "meta_description", "displayName": "Meta Description", "description": "SEO meta description", "type": "string", "semantics": [] }, { "name": "updated_at", "displayName": "Updated At", "description": "When the post was last updated", "type": "datetime", "readOnly": true, "semantics": ["Semantic#UpdatedTimestamp"] }], "associations": [{ "name": "publication", "displayName": "Publication", "description": "Publication this post belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }, { "name": "categories", "displayName": "Post Categories", "description": "Categories this post belongs to", "required": false, "multiple": true, "targetEntities": ["category"], "semantics": ["Semantic#Categories"], "cardinality": "One-to-Many" }, { "name": "tags", "displayName": "Post Tags", "description": "Tags associated with this post", "required": false, "multiple": true, "targetEntities": ["Tag"], "semantics": ["Semantic#Tags"], "cardinality": "One-to-Many" }, { "name": "author", "displayName": "Post Author", "description": "Author who wrote this post", "required": true, "multiple": false, "targetEntities": ["user"], "semantics": ["Semantic#ResourceOwnerIdentifier"], "cardinality": "One-to-One" }], "semantics": [] }] }] }, { "name": "UserManagement", "displayName": "User Management", "description": "Authors, editors, subscribers, and user roles management", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Users", "displayName": "User Management", "description": "User accounts and authentication", "entityCount": 1, "entities": [{ "name": "user", "displayName": "User Account", "description": "User account for authors, editors, and subscribers", "propertyCount": 13, "associationCount": 0, "properties": [{ "name": "id", "displayName": "User ID", "description": "Unique identifier for the user", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "email", "displayName": "Email Address", "description": "User email address for login and communication", "type": "string", "required": true, "semantics": ["Semantic#Email"] }, { "name": "password", "displayName": "Password", "description": "Encrypted password for authentication", "type": "string", "required": true, "semantics": ["Semantic#Password"] }, { "name": "username", "displayName": "Username", "description": "Unique username for the user", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "display_name", "displayName": "Display Name", "description": "Public display name for the user", "type": "string", "required": true, "semantics": [] }, { "name": "first_name", "displayName": "First Name", "description": "User first name", "type": "string", "semantics": [] }, { "name": "last_name", "displayName": "Last Name", "description": "User last name", "type": "string", "semantics": [] }, { "name": "bio", "displayName": "Biography", "description": "User biography and description", "type": "string", "semantics": ["Semantic#Description"] }, { "name": "avatar_url", "displayName": "Avatar URL", "description": "URL to user profile picture", "type": "string", "semantics": ["Semantic#ImageURL"] }, { "name": "website", "displayName": "Website", "description": "User personal website URL", "type": "string", "semantics": ["Semantic#URL"] }, { "name": "role", "displayName": "User Role", "description": "User role for permission management", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["subscriber", "author", "editor", "admin", "super_admin"], "defaultValue": "subscriber" }, { "name": "emailVerified", "displayName": "Email Verified", "description": "Whether the user has verified their email", "type": "boolean", "required": true, "semantics": [], "defaultValue": "false" }, { "name": "created_at", "displayName": "Created At", "description": "When the user account was created", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [], "semantics": ["Semantic#User"] }] }] }, { "name": "SocialFeatures", "displayName": "Social Features", "description": "Comments, likes, shares, and social interactions", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Comments", "displayName": "Comment System", "description": "Post comments and replies", "entityCount": 1, "entities": [{ "name": "comment", "displayName": "Comment", "description": "User comments on posts", "propertyCount": 7, "associationCount": 3, "properties": [{ "name": "id", "displayName": "Comment ID", "description": "Unique identifier for the comment", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "content", "displayName": "Comment Content", "description": "Content of the comment", "type": "string", "required": true, "semantics": [] }, { "name": "author_name", "displayName": "Author Name", "description": "Name of the comment author (for guest comments)", "type": "string", "semantics": [] }, { "name": "author_email", "displayName": "Author Email", "description": "Email of the comment author (for guest comments)", "type": "string", "required": true, "semantics": ["Semantic#Email"] }, { "name": "status", "displayName": "Comment Status", "description": "Moderation status of the comment", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["pending", "approved", "rejected", "spam"], "defaultValue": "pending" }, { "name": "user_agent", "displayName": "User Agent", "description": "Browser user agent string", "type": "string", "semantics": [] }, { "name": "created_at", "displayName": "Created At", "description": "When the comment was created", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [{ "name": "post", "displayName": "Post", "description": "Post this comment belongs to", "required": true, "multiple": false, "targetEntities": ["Post"], "semantics": [], "cardinality": "One-to-One" }, { "name": "author", "displayName": "Comment Author", "description": "Registered user who wrote this comment", "required": false, "multiple": false, "targetEntities": ["user"], "semantics": ["Semantic#ResourceOwnerIdentifier"], "cardinality": "One-to-One" }, { "name": "parent_comment", "displayName": "Parent Comment", "description": "Parent comment for replies", "required": false, "multiple": false, "targetEntities": ["comment"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }] }] }, { "name": "Analytics", "displayName": "Analytics & Tracking", "description": "Analytics, metrics, and performance tracking", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Analytics", "displayName": "Content Analytics", "description": "Content performance and user engagement metrics", "entityCount": 1, "entities": [{ "name": "page_view", "displayName": "Page View", "description": "Individual page view tracking record", "propertyCount": 6, "associationCount": 2, "properties": [{ "name": "id", "displayName": "Page View ID", "description": "Unique identifier for the page view", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "path", "displayName": "Page Path", "description": "URL path of the viewed page", "type": "string", "required": true, "semantics": [] }, { "name": "referrer", "displayName": "Referrer", "description": "Referring URL", "type": "string", "semantics": ["Semantic#URL"] }, { "name": "user_agent", "displayName": "User Agent", "description": "Browser user agent string", "type": "string", "semantics": [] }, { "name": "session_id", "displayName": "Session ID", "description": "Visitor session identifier", "type": "string", "semantics": [] }, { "name": "viewed_at", "displayName": "Viewed At", "description": "When the page was viewed", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [{ "name": "post", "displayName": "Viewed Post", "description": "Post that was viewed (if applicable)", "required": false, "multiple": false, "targetEntities": ["Post"], "semantics": [], "cardinality": "One-to-One" }, { "name": "publication", "displayName": "Publication", "description": "Publication this page view belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }] }] }, { "name": "MediaManagement", "displayName": "Media Management", "description": "Image, video, and file upload management", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Media", "displayName": "Media Library", "description": "Uploaded files, images, and media assets", "entityCount": 1, "entities": [{ "name": "media_file", "displayName": "Media File", "description": "Uploaded media files (images, videos, documents)", "propertyCount": 10, "associationCount": 2, "properties": [{ "name": "id", "displayName": "Media File ID", "description": "Unique identifier for the media file", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "filename", "displayName": "File Name", "description": "Original filename of the uploaded file", "type": "string", "required": true, "semantics": [] }, { "name": "storage_key", "displayName": "Storage Key", "description": "Unique storage key for the file", "type": "string", "required": true, "unique": true, "semantics": [] }, { "name": "url", "displayName": "File URL", "description": "Public URL to access the file", "type": "string", "required": true, "semantics": ["Semantic#URL"] }, { "name": "mime_type", "displayName": "MIME Type", "description": "MIME type of the file", "type": "string", "required": true, "semantics": [] }, { "name": "file_size", "displayName": "File Size", "description": "File size in bytes", "type": "number", "required": true, "semantics": [] }, { "name": "width", "displayName": "Image Width", "description": "Width in pixels (for images)", "type": "number", "required": true, "semantics": [] }, { "name": "height", "displayName": "Image Height", "description": "Height in pixels (for images)", "type": "number", "required": true, "semantics": [] }, { "name": "alt_text", "displayName": "Alt Text", "description": "Alternative text for accessibility", "type": "string", "semantics": [] }, { "name": "uploaded_at", "displayName": "Uploaded At", "description": "When the file was uploaded", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [{ "name": "uploader", "displayName": "File Uploader", "description": "User who uploaded this file", "required": true, "multiple": false, "targetEntities": ["user"], "semantics": ["Semantic#ResourceOwnerIdentifier"], "cardinality": "One-to-One" }, { "name": "publication", "displayName": "Publication", "description": "Publication this media file belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }] }] }] } }
1
+ { "id": "blog-publishing-platform", "name": "Blog Publishing Platform", "description": "A comprehensive content management and publishing platform for blogs, magazines, and digital publications. Includes content management, user roles, publishing workflow, and social features.", "createdAt": "2025-07-27T21:14:57.328Z", "updatedAt": "2025-07-27T21:14:57.328Z", "version": "1.0.0", "author": "API Now! Core Team", "tags": ["blog", "cms", "publishing", "content", "media", "editorial"], "structure": { "domain": { "name": "Blog Publishing Platform", "description": "A comprehensive content management and publishing platform for blogs, magazines, and digital publications", "totalEntities": 8, "totalProperties": 69, "totalAssociations": 14 }, "namespaces": [{ "name": "ContentManagement", "displayName": "Content Management", "description": "Core content creation, editing, and organization features", "modelCount": 2, "entityCount": 4, "models": [{ "name": "Publications", "displayName": "Publications Management", "description": "Individual blogs, magazines, or publications within the platform", "entityCount": 1, "entities": [{ "name": "publication", "displayName": "Publication", "description": "Individual blog or publication site", "propertyCount": 8, "associationCount": 0, "properties": [{ "name": "id", "displayName": "Publication ID", "description": "Unique identifier for the publication", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "name", "displayName": "Publication Name", "description": "Display name of the publication", "type": "string", "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the publication", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "description", "displayName": "Description", "description": "Publication description and tagline", "type": "string", "semantics": ["Semantic#Description"] }, { "name": "domain", "displayName": "Custom Domain", "description": "Custom domain name for the publication", "type": "string", "semantics": [] }, { "name": "logo_url", "displayName": "Logo URL", "description": "URL to publication logo image", "type": "string", "semantics": ["Semantic#ImageURL"] }, { "name": "status", "displayName": "Publication Status", "description": "Current status of the publication", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["active", "suspended", "archived"], "defaultValue": "active" }, { "name": "created_at", "displayName": "Created At", "description": "When the publication was created", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [], "semantics": [] }] }, { "name": "Content", "displayName": "Content Management", "description": "Posts, pages, and other content types", "entityCount": 3, "entities": [{ "name": "category", "displayName": "Content Category", "description": "Content categorization for organization and navigation", "propertyCount": 5, "associationCount": 2, "properties": [{ "name": "id", "displayName": "Category ID", "description": "Unique identifier for the category", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "name", "displayName": "Category Name", "description": "Display name of the category", "type": "string", "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the category", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "description", "displayName": "Description", "description": "Category description", "type": "string", "semantics": ["Semantic#Description"] }, { "name": "color", "displayName": "Color", "description": "Theme color for the category", "type": "string", "semantics": [] }], "associations": [{ "name": "publication", "displayName": "Publication", "description": "Publication this category belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }, { "name": "parentCategory", "displayName": "Parent Category", "description": "Parent category for hierarchical organization", "required": false, "multiple": false, "targetEntities": ["category"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }, { "name": "Tag", "displayName": "Content Tag", "description": "Tags for flexible content labeling and discovery", "propertyCount": 3, "associationCount": 1, "properties": [{ "name": "id", "displayName": "Tag ID", "description": "Unique identifier for the tag", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "name", "displayName": "Tag Name", "description": "Display name of the tag", "type": "string", "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the tag", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }], "associations": [{ "name": "publication", "displayName": "Publication", "description": "Publication this tag belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }, { "name": "Post", "displayName": "Blog Post", "description": "Individual blog posts and articles", "propertyCount": 16, "associationCount": 4, "properties": [{ "name": "id", "displayName": "Post ID", "description": "Unique identifier for the post", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "title", "displayName": "Post Title", "description": "Title of the blog post", "type": "string", "required": true, "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the post", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "excerpt", "displayName": "Excerpt", "description": "Brief summary or excerpt of the post", "type": "string", "semantics": ["Semantic#Summary"] }, { "name": "content", "displayName": "Content", "description": "Full content of the post in HTML or Markdown", "type": "string", "required": true, "semantics": ["Semantic#HTML"] }, { "name": "content_format", "displayName": "Content Format", "description": "Format of the content (HTML, Markdown, etc.)", "type": "string", "required": true, "semantics": [], "enumValues": ["html", "markdown", "richtext"], "defaultValue": "markdown" }, { "name": "featured_image_url", "displayName": "Featured Image URL", "description": "URL to featured image", "type": "string", "semantics": ["Semantic#ImageURL"] }, { "name": "status", "displayName": "Post Status", "description": "Current publishing status of the post", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["draft", "pending_review", "scheduled", "published", "archived"], "defaultValue": "draft" }, { "name": "published_at", "displayName": "Published At", "description": "When the post was published", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }, { "name": "scheduled_at", "displayName": "Scheduled At", "description": "When the post is scheduled to be published", "type": "datetime", "semantics": [] }, { "name": "view_count", "displayName": "View Count", "description": "Number of times the post has been viewed", "type": "number", "required": true, "semantics": [] }, { "name": "reading_time", "displayName": "Reading Time", "description": "Estimated reading time in minutes", "type": "number", "readOnly": true, "semantics": ["Semantic#Calculated"] }, { "name": "word_count", "displayName": "Word Count", "description": "Number of words in the post content", "type": "number", "readOnly": true, "semantics": ["Semantic#Calculated"] }, { "name": "meta_title", "displayName": "Meta Title", "description": "SEO meta title", "type": "string", "semantics": [] }, { "name": "meta_description", "displayName": "Meta Description", "description": "SEO meta description", "type": "string", "semantics": [] }, { "name": "updated_at", "displayName": "Updated At", "description": "When the post was last updated", "type": "datetime", "readOnly": true, "semantics": ["Semantic#UpdatedTimestamp"] }], "associations": [{ "name": "publication", "displayName": "Publication", "description": "Publication this post belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }, { "name": "categories", "displayName": "Post Categories", "description": "Categories this post belongs to", "required": false, "multiple": true, "targetEntities": ["category"], "semantics": ["Semantic#Categories"], "cardinality": "One-to-Many" }, { "name": "tags", "displayName": "Post Tags", "description": "Tags associated with this post", "required": false, "multiple": true, "targetEntities": ["Tag"], "semantics": ["Semantic#Tags"], "cardinality": "One-to-Many" }, { "name": "author", "displayName": "Post Author", "description": "Author who wrote this post", "required": true, "multiple": false, "targetEntities": ["user"], "semantics": ["Semantic#ResourceOwnerIdentifier"], "cardinality": "One-to-One" }], "semantics": [] }] }] }, { "name": "UserManagement", "displayName": "User Management", "description": "Authors, editors, subscribers, and user roles management", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Users", "displayName": "User Management", "description": "User accounts and authentication", "entityCount": 1, "entities": [{ "name": "user", "displayName": "User Account", "description": "User account for authors, editors, and subscribers", "propertyCount": 13, "associationCount": 0, "properties": [{ "name": "id", "displayName": "User ID", "description": "Unique identifier for the user", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "email", "displayName": "Email Address", "description": "User email address for login and communication", "type": "string", "required": true, "semantics": ["Semantic#Email"] }, { "name": "password", "displayName": "Password", "description": "Encrypted password for authentication", "type": "string", "required": true, "semantics": ["Semantic#Password"] }, { "name": "username", "displayName": "Username", "description": "Unique username for the user", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "display_name", "displayName": "Display Name", "description": "Public display name for the user", "type": "string", "required": true, "semantics": [] }, { "name": "first_name", "displayName": "First Name", "description": "User first name", "type": "string", "semantics": [] }, { "name": "last_name", "displayName": "Last Name", "description": "User last name", "type": "string", "semantics": [] }, { "name": "bio", "displayName": "Biography", "description": "User biography and description", "type": "string", "semantics": ["Semantic#Description"] }, { "name": "avatar_url", "displayName": "Avatar URL", "description": "URL to user profile picture", "type": "string", "semantics": ["Semantic#ImageURL"] }, { "name": "website", "displayName": "Website", "description": "User personal website URL", "type": "string", "semantics": ["Semantic#URL"] }, { "name": "role", "displayName": "User Role", "description": "User role for permission management", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["subscriber", "author", "editor", "admin", "super_admin"], "defaultValue": "subscriber" }, { "name": "emailVerified", "displayName": "Email Verified", "description": "Whether the user has verified their email", "type": "boolean", "required": true, "semantics": [], "defaultValue": "false" }, { "name": "created_at", "displayName": "Created At", "description": "When the user account was created", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [], "semantics": ["Semantic#User"] }] }] }, { "name": "SocialFeatures", "displayName": "Social Features", "description": "Comments, likes, shares, and social interactions", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Comments", "displayName": "Comment System", "description": "Post comments and replies", "entityCount": 1, "entities": [{ "name": "comment", "displayName": "Comment", "description": "User comments on posts", "propertyCount": 7, "associationCount": 3, "properties": [{ "name": "id", "displayName": "Comment ID", "description": "Unique identifier for the comment", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "content", "displayName": "Comment Content", "description": "Content of the comment", "type": "string", "required": true, "semantics": [] }, { "name": "author_name", "displayName": "Author Name", "description": "Name of the comment author (for guest comments)", "type": "string", "semantics": [] }, { "name": "author_email", "displayName": "Author Email", "description": "Email of the comment author (for guest comments)", "type": "string", "required": true, "semantics": ["Semantic#Email"] }, { "name": "status", "displayName": "Comment Status", "description": "Moderation status of the comment", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["pending", "approved", "rejected", "spam"], "defaultValue": "pending" }, { "name": "user_agent", "displayName": "User Agent", "description": "Browser user agent string", "type": "string", "semantics": [] }, { "name": "created_at", "displayName": "Created At", "description": "When the comment was created", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [{ "name": "post", "displayName": "Post", "description": "Post this comment belongs to", "required": true, "multiple": false, "targetEntities": ["Post"], "semantics": [], "cardinality": "One-to-One" }, { "name": "author", "displayName": "Comment Author", "description": "Registered user who wrote this comment", "required": false, "multiple": false, "targetEntities": ["user"], "semantics": ["Semantic#ResourceOwnerIdentifier"], "cardinality": "One-to-One" }, { "name": "parent_comment", "displayName": "Parent Comment", "description": "Parent comment for replies", "required": false, "multiple": false, "targetEntities": ["comment"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }] }] }, { "name": "Analytics", "displayName": "Analytics & Tracking", "description": "Analytics, metrics, and performance tracking", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Analytics", "displayName": "Content Analytics", "description": "Content performance and user engagement metrics", "entityCount": 1, "entities": [{ "name": "page_view", "displayName": "Page View", "description": "Individual page view tracking record", "propertyCount": 7, "associationCount": 2, "properties": [{ "name": "id", "displayName": "Page View ID", "description": "Unique identifier for the page view", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "path", "displayName": "Page Path", "description": "URL path of the viewed page", "type": "string", "required": true, "semantics": [] }, { "name": "referrer", "displayName": "Referrer", "description": "Referring URL", "type": "string", "semantics": ["Semantic#URL"] }, { "name": "ip_address", "displayName": "IP Address", "description": "Visitor IP address", "type": "string", "semantics": ["Semantic#ClientIPAddress"] }, { "name": "user_agent", "displayName": "User Agent", "description": "Browser user agent string", "type": "string", "semantics": [] }, { "name": "session_id", "displayName": "Session ID", "description": "Visitor session identifier", "type": "string", "semantics": [] }, { "name": "viewed_at", "displayName": "Viewed At", "description": "When the page was viewed", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [{ "name": "post", "displayName": "Viewed Post", "description": "Post that was viewed (if applicable)", "required": false, "multiple": false, "targetEntities": ["Post"], "semantics": [], "cardinality": "One-to-One" }, { "name": "publication", "displayName": "Publication", "description": "Publication this page view belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }] }] }, { "name": "MediaManagement", "displayName": "Media Management", "description": "Image, video, and file upload management", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Media", "displayName": "Media Library", "description": "Uploaded files, images, and media assets", "entityCount": 1, "entities": [{ "name": "media_file", "displayName": "Media File", "description": "Uploaded media files (images, videos, documents)", "propertyCount": 10, "associationCount": 2, "properties": [{ "name": "id", "displayName": "Media File ID", "description": "Unique identifier for the media file", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "filename", "displayName": "File Name", "description": "Original filename of the uploaded file", "type": "string", "required": true, "semantics": [] }, { "name": "storage_key", "displayName": "Storage Key", "description": "Unique storage key for the file", "type": "string", "required": true, "unique": true, "semantics": [] }, { "name": "url", "displayName": "File URL", "description": "Public URL to access the file", "type": "string", "required": true, "semantics": ["Semantic#URL"] }, { "name": "mime_type", "displayName": "MIME Type", "description": "MIME type of the file", "type": "string", "required": true, "semantics": [] }, { "name": "file_size", "displayName": "File Size", "description": "File size in bytes", "type": "number", "required": true, "semantics": [] }, { "name": "width", "displayName": "Image Width", "description": "Width in pixels (for images)", "type": "number", "required": true, "semantics": [] }, { "name": "height", "displayName": "Image Height", "description": "Height in pixels (for images)", "type": "number", "required": true, "semantics": [] }, { "name": "alt_text", "displayName": "Alt Text", "description": "Alternative text for accessibility", "type": "string", "semantics": [] }, { "name": "uploaded_at", "displayName": "Uploaded At", "description": "When the file was uploaded", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [{ "name": "uploader", "displayName": "File Uploader", "description": "User who uploaded this file", "required": true, "multiple": false, "targetEntities": ["user"], "semantics": ["Semantic#ResourceOwnerIdentifier"], "cardinality": "One-to-One" }, { "name": "publication", "displayName": "Publication", "description": "Publication this media file belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }] }] }] } }