@api-client/core 0.18.55 → 0.18.57

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 (148) hide show
  1. package/build/src/modeling/Semantics.js +1 -1
  2. package/build/src/modeling/Semantics.js.map +1 -1
  3. package/build/src/modeling/helpers/Intelisense.d.ts +1 -0
  4. package/build/src/modeling/helpers/Intelisense.d.ts.map +1 -1
  5. package/build/src/modeling/helpers/Intelisense.js +23 -0
  6. package/build/src/modeling/helpers/Intelisense.js.map +1 -1
  7. package/build/tsconfig.tsbuildinfo +1 -1
  8. package/data/models/example-generator-api.json +15 -15
  9. package/package.json +2 -7
  10. package/src/modeling/Semantics.ts +1 -1
  11. package/src/modeling/helpers/Intelisense.ts +23 -0
  12. package/tests/unit/modeling/helpers/intellisense.spec.ts +46 -0
  13. package/build/src/modeling/templates/index.d.ts +0 -21
  14. package/build/src/modeling/templates/index.d.ts.map +0 -1
  15. package/build/src/modeling/templates/index.js +0 -176
  16. package/build/src/modeling/templates/index.js.map +0 -1
  17. package/build/src/modeling/templates/meta/blog-publishing-platform.json +0 -1
  18. package/build/src/modeling/templates/meta/ecommerce-platform.json +0 -1
  19. package/build/src/modeling/templates/meta/education-management-platform.json +0 -1
  20. package/build/src/modeling/templates/meta/financial-services-platform.json +0 -1
  21. package/build/src/modeling/templates/meta/gaming-platform.json +0 -1
  22. package/build/src/modeling/templates/meta/healthcare-management-platform.json +0 -1
  23. package/build/src/modeling/templates/meta/hospitality-platform.json +0 -1
  24. package/build/src/modeling/templates/meta/index.d.ts +0 -64
  25. package/build/src/modeling/templates/meta/index.d.ts.map +0 -1
  26. package/build/src/modeling/templates/meta/index.js +0 -150
  27. package/build/src/modeling/templates/meta/index.js.map +0 -1
  28. package/build/src/modeling/templates/meta/iot-smart-home-platform.json +0 -1
  29. package/build/src/modeling/templates/meta/legal-services-platform.json +0 -1
  30. package/build/src/modeling/templates/meta/manufacturing-platform.json +0 -1
  31. package/build/src/modeling/templates/meta/non-profit-platform.json +0 -1
  32. package/build/src/modeling/templates/meta/real-estate-management-platform.json +0 -1
  33. package/build/src/modeling/templates/template-registry.d.ts +0 -55
  34. package/build/src/modeling/templates/template-registry.d.ts.map +0 -1
  35. package/build/src/modeling/templates/template-registry.js +0 -111
  36. package/build/src/modeling/templates/template-registry.js.map +0 -1
  37. package/build/src/modeling/templates/types.d.ts +0 -167
  38. package/build/src/modeling/templates/types.d.ts.map +0 -1
  39. package/build/src/modeling/templates/types.js +0 -2
  40. package/build/src/modeling/templates/types.js.map +0 -1
  41. package/build/src/modeling/templates/verticals/business-services/ecommerce-domain.d.ts +0 -39
  42. package/build/src/modeling/templates/verticals/business-services/ecommerce-domain.d.ts.map +0 -1
  43. package/build/src/modeling/templates/verticals/business-services/ecommerce-domain.js +0 -672
  44. package/build/src/modeling/templates/verticals/business-services/ecommerce-domain.js.map +0 -1
  45. package/build/src/modeling/templates/verticals/business-services/financial-services-domain.d.ts +0 -40
  46. package/build/src/modeling/templates/verticals/business-services/financial-services-domain.d.ts.map +0 -1
  47. package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js +0 -942
  48. package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js.map +0 -1
  49. package/build/src/modeling/templates/verticals/business-services/hospitality-domain.d.ts +0 -45
  50. package/build/src/modeling/templates/verticals/business-services/hospitality-domain.d.ts.map +0 -1
  51. package/build/src/modeling/templates/verticals/business-services/hospitality-domain.js +0 -797
  52. package/build/src/modeling/templates/verticals/business-services/hospitality-domain.js.map +0 -1
  53. package/build/src/modeling/templates/verticals/business-services/index.d.ts +0 -21
  54. package/build/src/modeling/templates/verticals/business-services/index.d.ts.map +0 -1
  55. package/build/src/modeling/templates/verticals/business-services/index.js +0 -50
  56. package/build/src/modeling/templates/verticals/business-services/index.js.map +0 -1
  57. package/build/src/modeling/templates/verticals/business-services/legal-services-domain.d.ts +0 -46
  58. package/build/src/modeling/templates/verticals/business-services/legal-services-domain.d.ts.map +0 -1
  59. package/build/src/modeling/templates/verticals/business-services/legal-services-domain.js +0 -837
  60. package/build/src/modeling/templates/verticals/business-services/legal-services-domain.js.map +0 -1
  61. package/build/src/modeling/templates/verticals/education-training/education-domain.d.ts +0 -40
  62. package/build/src/modeling/templates/verticals/education-training/education-domain.d.ts.map +0 -1
  63. package/build/src/modeling/templates/verticals/education-training/education-domain.js +0 -725
  64. package/build/src/modeling/templates/verticals/education-training/education-domain.js.map +0 -1
  65. package/build/src/modeling/templates/verticals/education-training/index.d.ts +0 -18
  66. package/build/src/modeling/templates/verticals/education-training/index.d.ts.map +0 -1
  67. package/build/src/modeling/templates/verticals/education-training/index.js +0 -21
  68. package/build/src/modeling/templates/verticals/education-training/index.js.map +0 -1
  69. package/build/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.d.ts +0 -40
  70. package/build/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.d.ts.map +0 -1
  71. package/build/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.js +0 -859
  72. package/build/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.js.map +0 -1
  73. package/build/src/modeling/templates/verticals/healthcare-life-sciences/index.d.ts +0 -18
  74. package/build/src/modeling/templates/verticals/healthcare-life-sciences/index.d.ts.map +0 -1
  75. package/build/src/modeling/templates/verticals/healthcare-life-sciences/index.js +0 -21
  76. package/build/src/modeling/templates/verticals/healthcare-life-sciences/index.js.map +0 -1
  77. package/build/src/modeling/templates/verticals/index.d.ts +0 -79
  78. package/build/src/modeling/templates/verticals/index.d.ts.map +0 -1
  79. package/build/src/modeling/templates/verticals/index.js +0 -186
  80. package/build/src/modeling/templates/verticals/index.js.map +0 -1
  81. package/build/src/modeling/templates/verticals/manufacturing-logistics/index.d.ts +0 -18
  82. package/build/src/modeling/templates/verticals/manufacturing-logistics/index.d.ts.map +0 -1
  83. package/build/src/modeling/templates/verticals/manufacturing-logistics/index.js +0 -22
  84. package/build/src/modeling/templates/verticals/manufacturing-logistics/index.js.map +0 -1
  85. package/build/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.d.ts +0 -45
  86. package/build/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.d.ts.map +0 -1
  87. package/build/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.js +0 -710
  88. package/build/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.js.map +0 -1
  89. package/build/src/modeling/templates/verticals/public-sector/index.d.ts +0 -18
  90. package/build/src/modeling/templates/verticals/public-sector/index.d.ts.map +0 -1
  91. package/build/src/modeling/templates/verticals/public-sector/index.js +0 -22
  92. package/build/src/modeling/templates/verticals/public-sector/index.js.map +0 -1
  93. package/build/src/modeling/templates/verticals/public-sector/non-profit-domain.d.ts +0 -47
  94. package/build/src/modeling/templates/verticals/public-sector/non-profit-domain.d.ts.map +0 -1
  95. package/build/src/modeling/templates/verticals/public-sector/non-profit-domain.js +0 -864
  96. package/build/src/modeling/templates/verticals/public-sector/non-profit-domain.js.map +0 -1
  97. package/build/src/modeling/templates/verticals/real-estate-construction/index.d.ts +0 -18
  98. package/build/src/modeling/templates/verticals/real-estate-construction/index.d.ts.map +0 -1
  99. package/build/src/modeling/templates/verticals/real-estate-construction/index.js +0 -21
  100. package/build/src/modeling/templates/verticals/real-estate-construction/index.js.map +0 -1
  101. package/build/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.d.ts +0 -40
  102. package/build/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.d.ts.map +0 -1
  103. package/build/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.js +0 -727
  104. package/build/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.js.map +0 -1
  105. package/build/src/modeling/templates/verticals/technology-media/blog-domain.d.ts +0 -40
  106. package/build/src/modeling/templates/verticals/technology-media/blog-domain.d.ts.map +0 -1
  107. package/build/src/modeling/templates/verticals/technology-media/blog-domain.js +0 -629
  108. package/build/src/modeling/templates/verticals/technology-media/blog-domain.js.map +0 -1
  109. package/build/src/modeling/templates/verticals/technology-media/gaming-domain.d.ts +0 -46
  110. package/build/src/modeling/templates/verticals/technology-media/gaming-domain.d.ts.map +0 -1
  111. package/build/src/modeling/templates/verticals/technology-media/gaming-domain.js +0 -1033
  112. package/build/src/modeling/templates/verticals/technology-media/gaming-domain.js.map +0 -1
  113. package/build/src/modeling/templates/verticals/technology-media/index.d.ts +0 -21
  114. package/build/src/modeling/templates/verticals/technology-media/index.d.ts.map +0 -1
  115. package/build/src/modeling/templates/verticals/technology-media/index.js +0 -42
  116. package/build/src/modeling/templates/verticals/technology-media/index.js.map +0 -1
  117. package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.d.ts +0 -47
  118. package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.d.ts.map +0 -1
  119. package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.js +0 -1029
  120. package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.js.map +0 -1
  121. package/src/modeling/templates/meta/blog-publishing-platform.json +0 -1
  122. package/src/modeling/templates/meta/ecommerce-platform.json +0 -1
  123. package/src/modeling/templates/meta/education-management-platform.json +0 -1
  124. package/src/modeling/templates/meta/financial-services-platform.json +0 -1
  125. package/src/modeling/templates/meta/gaming-platform.json +0 -1
  126. package/src/modeling/templates/meta/healthcare-management-platform.json +0 -1
  127. package/src/modeling/templates/meta/hospitality-platform.json +0 -1
  128. package/src/modeling/templates/meta/iot-smart-home-platform.json +0 -1
  129. package/src/modeling/templates/meta/legal-services-platform.json +0 -1
  130. package/src/modeling/templates/meta/manufacturing-platform.json +0 -1
  131. package/src/modeling/templates/meta/non-profit-platform.json +0 -1
  132. package/src/modeling/templates/meta/real-estate-management-platform.json +0 -1
  133. package/src/modeling/templates/readme.md +0 -260
  134. package/src/modeling/templates/template-registry.ts +0 -140
  135. package/src/modeling/templates/types.ts +0 -175
  136. package/src/modeling/templates/verticals/README.md +0 -122
  137. package/src/modeling/templates/verticals/business-services/ecommerce-domain.ts +0 -844
  138. package/src/modeling/templates/verticals/business-services/financial-services-domain.ts +0 -1177
  139. package/src/modeling/templates/verticals/business-services/hospitality-domain.ts +0 -994
  140. package/src/modeling/templates/verticals/business-services/legal-services-domain.ts +0 -1059
  141. package/src/modeling/templates/verticals/education-training/education-domain.ts +0 -922
  142. package/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.ts +0 -1111
  143. package/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.ts +0 -895
  144. package/src/modeling/templates/verticals/public-sector/non-profit-domain.ts +0 -1109
  145. package/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.ts +0 -944
  146. package/src/modeling/templates/verticals/technology-media/blog-domain.ts +0 -796
  147. package/src/modeling/templates/verticals/technology-media/gaming-domain.ts +0 -1290
  148. package/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.ts +0 -1289
@@ -639,7 +639,7 @@ export const DataSemantics = {
639
639
  description: 'Postal or zip code',
640
640
  category: SemanticCategory.Contact,
641
641
  applicableDataTypes: ['string'],
642
- hasConfig: false,
642
+ hasConfig: true,
643
643
  runtime: {
644
644
  timing: SemanticTiming.None,
645
645
  operations: [],
@@ -1 +1 @@
1
- {"version":3,"file":"Semantics.js","sourceRoot":"","sources":["../../../src/modeling/Semantics.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,CAAN,IAAY,YAyPX;AAzPD,WAAY,YAAY;IACtB,EAAE;IACF,yBAAyB;IACzB,EAAE;IAEF;;OAEG;IACH,sCAAsB,CAAA;IACtB;;OAEG;IACH,4CAA4B,CAAA;IAE5B,EAAE;IACF,2BAA2B;IAC3B,EAAE;IAEF;;;;OAIG;IACH,8CAA8B,CAAA;IAC9B;;;;;OAKG;IACH,8CAA8B,CAAA;IAC9B;;;OAGG;IACH,8DAA8C,CAAA;IAC9C;;;OAGG;IACH,8DAA8C,CAAA;IAC9C;;;;;OAKG;IACH,8DAA8C,CAAA;IAC9C;;;;OAIG;IACH,oDAAoC,CAAA;IACpC;;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,QAAQ,CAAC,EAAE,EAAE;QAC/B,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,EAAE;QAC9B,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAAE,EAAE;QACnC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,EAAE;QAC/B,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,EAAE;KAChC,CAAA;IAED,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAChD,yDAAyD;QACzD,IAAI,KAAK,IAAI,QAAQ,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;YACtC,OAAM;QACR,CAAC;QACD,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,QAA0B,EAAkB,EAAE;IACvF,OAAO,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAA;AAC1F,CAAC,CAAA","sourcesContent":["/* eslint-disable no-redeclare */\n/* eslint-disable max-len */\nimport type { DomainPropertyType } from './DataFormat.js'\n\n/**\n * Defines the names for all available data semantics.\n * Using a string enum makes it easy to add or remove semantics in a single place.\n */\nexport enum SemanticType {\n //\n // Entity-Level Semantics\n //\n\n /**\n * Designates a Data Entity that represents users of the system.\n */\n User = 'Semantic#User',\n /**\n * Designates a Data Entity that represents a physical address.\n */\n Address = 'Semantic#Address',\n\n //\n // Property-Level Semantics\n //\n\n /**\n * Annotates the field as the user password.\n * The runtime should treat this field with special care,\n * ensuring it is encrypted and not exposed in API responses.\n */\n Password = 'Semantic#Password',\n /**\n * Annotates the field as the username for user authentication.\n * This identifies which field should be used for login purposes.\n * Can be applied to dedicated username fields or email fields that serve as usernames.\n * The runtime uses this for authentication, password reset, and user lookup operations.\n */\n Username = 'Semantic#Username',\n /**\n * Designates a Data Property as the `createdAt` timestamp of an entity.\n * This is used to track when the entity was first created.\n */\n CreatedTimestamp = 'Semantic#CreatedTimestamp',\n /**\n * Designates a Data Property as the `updatedAt` timestamp of an entity.\n * This is used to track when the entity was last modified.\n */\n UpdatedTimestamp = 'Semantic#UpdatedTimestamp',\n /**\n * Designates a Data Property as the `deletedAt` timestamp of an entity.\n * This is used to track when the entity was soft-deleted.\n * Soft-deletion means the entity is not physically removed from the database,\n * but marked as deleted for logical deletion purposes.\n */\n DeletedTimestamp = 'Semantic#DeletedTimestamp',\n /**\n * Designates a Data Property as a boolean flag indicating whether the entity is deleted.\n * This is used for soft-deletion, where the entity is not physically removed from the database,\n * but marked as deleted.\n */\n DeletedFlag = 'Semantic#DeletedFlag',\n /**\n * Designates a Data Property as a public identifier for a resource (the slug).\n * This is often used in URLs to provide a user-friendly way to access the resource.\n * For example, a blog post might have a public unique name like \"my-first-post\".\n * The runtime automatically generates a URL-safe string from another field (like a title).\n * By default, slugs are generated to be unique, but the configuration allows for duplicates\n * in scenarios where uniqueness is handled by a combination of fields (e.g., year and slug).\n */\n PublicUniqueName = 'Semantic#PublicUniqueName',\n /**\n * A semantic that describes a title of an article, blog post, and so on. This semantic is used with\n * the `PublicUniqueName` to determine which field is responsible for the slug generation. However,\n * we may add more automation related to the `title` property in the future.\n */\n Title = 'Semantic#Title',\n /**\n * A semantic that describes a name of a person or pet. This semantic is used with\n * the `PublicUniqueName` to determine which field is responsible for the slug generation. However,\n * we may add more automation related to the `name` property in the future.\n */\n Name = 'Semantic#Name',\n /**\n * Designates a Data Property as the `role` of a user within the system.\n * This is used to define the user's permissions and access levels.\n * For example, a user with the role of \"admin\" would have elevated permissions\n * compared to a user with the role of \"guest\".\n * Roles are defined on the entity as enums, or as a string property with a controlled vocabulary.\n */\n UserRole = 'Semantic#UserRole',\n /**\n * A text or enum field to represent the state of a record (e.g., `draft`, `published`, `pending_review`, `archived`).\n *\n * Defined behaviors:\n * - State-Based Filtering: Automatically prevents public users from seeing records in a draft state.\n * - State Transitions: In principle, the runtime should prevent the user from skipping some states.\n * For example, when the record is in the `draft` state, it cannot be moved to the `archived` state without publishing it first. However,\n * we do not have enough customer feedback to design this functionality correctly right now, so\n * it serves as a placeholder semantic annotation.\n */\n Status = 'Semantic#Status',\n\n /**\n * Annotates an integer field that automatically increments.\n * The runtime automatically increments this number on every update, providing a simple way\n * to track changes and implement optimistic locking to prevent mid-air collisions.\n */\n Version = 'Semantic#Version',\n\n /**\n * Annotates a field that holds a reference to an image data via an URL.\n * The application + runtime should validate that the input is a well-formed URL.\n */\n ImageURL = 'Semantic#ImageURL',\n\n /**\n * Annotates a field that holds a reference to a file object via an URL. Ity is distinct from the\n * `ImageURL` semantic as it implicitly states that the target is non-image, binary data (an attachment, for example).\n */\n FileURL = 'Semantic#FileURL',\n\n /**\n * Annotates the field as a markdown-interpreted field.\n * When an object is created, the runtime performs additional sanitization to prevent XSS attacks.\n *\n * The annotation describes whether the data should be translated to the HTML output when\n * record is read or the original MD content should be returned.\n */\n Markdown = 'Semantic#Markdown',\n\n /**\n * Annotates the field as containing HTML content.\n * The runtime performs sanitization to prevent XSS attacks and validates HTML structure.\n *\n * The annotation describes whether the data should be rendered as HTML output when\n * record is read or the original HTML content should be returned.\n */\n HTML = 'Semantic#HTML',\n\n /**\n * Annotates a field that holds geospatial coordinate data (latitude/longitude).\n * The runtime automatically generates API capabilities for location-based queries,\n * such as \"find all restaurants within a 5-mile radius.\"\n *\n * The field should contain coordinate data in a standard format:\n * - \"40.7128,-74.0060\" (lat,lon)\n * - \"POINT(-74.0060 40.7128)\" (PostGIS format)\n * - \"40.7128°N, 74.0060°W\" (degree format)\n *\n * Defined behaviors:\n * - Spatial Indexing: The runtime automatically creates spatial indexes for efficient location-based queries\n * - Distance Queries: Enables API endpoints for finding records within specified distances\n * - Coordinate Validation: Validates that the input follows proper coordinate format\n * - PostGIS Integration: When using PostgreSQL, automatically maps to PostGIS geometry types\n */\n GeospatialCoordinates = 'Semantic#GeospatialCoordinates',\n\n /**\n * Annotates a field as an email address with validation and verification options.\n */\n Email = 'Semantic#Email',\n /**\n * Annotates a field as a phone number with validation and formatting options.\n */\n Phone = 'Semantic#Phone',\n /**\n * Annotates a field as a monetary value with currency support and precision control.\n * Can store simple decimal amounts or complex objects with amount and currency.\n *\n * As a semantic, it provides flexibility by annotating a base `number` or `string` type,\n * allowing for different storage strategies (e.g., decimal, integer cents, or a JSON object)\n * while maintaining a consistent API for currency operations.\n */\n Currency = 'Semantic#Currency',\n /**\n * Annotates a field as a URL with validation and allowed protocols.\n */\n URL = 'Semantic#URL',\n /**\n * Annotates a field as a Stock Keeping Unit (SKU).\n * Enforces uniqueness at the database level, critical for product catalogs.\n * Provides automatic validation and formatting for product identification codes.\n */\n SKU = 'Semantic#SKU',\n /**\n * Annotates a field as a long-form description.\n */\n Description = 'Semantic#Description',\n /**\n * Annotates a field as a short summary.\n */\n Summary = 'Semantic#Summary',\n /**\n * Annotates a field as a calculated value based on a formula.\n */\n Calculated = 'Semantic#Calculated',\n /**\n * Annotates a field as derived from other fields.\n */\n Derived = 'Semantic#Derived',\n /**\n * Annotates a field that should automatically receive the client's IP address.\n * when creating or updating records, providing audit trail and geolocation capabilities.\n */\n ClientIPAddress = 'Semantic#ClientIPAddress',\n /**\n * Designates a Data Property as the street address (e.g., \"123 Main St\").\n */\n StreetAddress = 'Semantic#StreetAddress',\n /**\n * This is a single semantic used for any additional lines (Unit, Suite, Apartment, Floor).\n */\n StreetAddressSupplemental = 'Semantic#StreetAddressSupplemental',\n /**\n * Designates a Data Property as the city or locality.\n */\n City = 'Semantic#City',\n /**\n * Designates a Data Property as the postal or zip code.\n */\n PostalCode = 'Semantic#PostalCode',\n /**\n * Designates a Data Property as the country.\n */\n Country = 'Semantic#Country',\n /**\n * Designates a Data Property as the state, province, or region.\n */\n Region = 'Semantic#Region',\n\n //\n // Association-Level Semantics\n //\n\n /**\n * Designates an association that links a resource to a \"User\" entity instance.\n * This is used to indicate ownership of the resource for access control purposes.\n * For example, a blog post might have a resource owner identifier that points to the user who created it.\n *\n * Defined behaviors:\n * - Automatic Ownership: When a new record is created, this field is automatically populated with the ID of the authenticated user. It also creates a foreign relationship to the `User` semantic object.\n * - Scoped Access: The runtime automatically filters list and read operations to show only records where the Owner matches the current user. update and delete operations are similarly restricted.\n */\n ResourceOwnerIdentifier = 'Semantic#ResourceOwnerIdentifier',\n /**\n * Annotates an association as supporting tag functionality.\n * Applied to associations between entities to enable tagging behavior.\n * For example, a Product-Category association with Tags semantic enables product tagging.\n */\n Tags = 'Semantic#Tags',\n /**\n * Annotates an association as supporting category functionality.\n * Applied to associations between entities to enable categorization behavior.\n * For example, a Product-Category association with Categories semantic enables product categorization.\n */\n Categories = 'Semantic#Categories',\n}\n\n/**\n * Defines the scope at which a semantic can be applied.\n */\nexport enum SemanticScope {\n /**\n * The semantic applies to an entire Data Entity.\n * This is used for semantics that provide context or constraints at the entity level.\n */\n Entity = 'Entity',\n /**\n * The semantic applies to a single Data Property.\n * This is used for semantics that provide context or constraints at the property level.\n */\n Property = 'Property',\n /**\n * The semantic applies to an Association between Data Entities.\n * This is used for semantics that provide context or constraints at the association level.\n */\n Association = 'Association',\n}\n\n/**\n * Defines categories for organizing semantics in the UI.\n */\nexport enum SemanticCategory {\n /**\n * User management, authentication, and access control\n */\n Identity = 'Identity & Authentication',\n /**\n * Timestamps, versioning, and record lifecycle\n */\n Lifecycle = 'Timestamps & Versioning',\n /**\n * Text content, media, and rich content types\n */\n Content = 'Content & Media',\n /**\n * Business-specific data like pricing, inventory, status\n */\n Business = 'Business Data',\n /**\n * Organization, categorization, and tagging\n */\n Organization = 'Classification & Organization',\n /**\n * Location and geographical data\n */\n Location = 'Location & Geography',\n /**\n * Contact information and communication\n */\n Contact = 'Contact Information',\n /**\n * Calculated and derived values\n */\n Computed = 'Computed Values',\n}\n\n/**\n * Defines when a semantic should execute in relation to database operations.\n */\nexport enum SemanticTiming {\n /**\n * Execute before the database operation (validation, preprocessing)\n */\n Before = 'Before',\n /**\n * Execute after the database operation (cleanup, notifications, derived values)\n */\n After = 'After',\n /**\n * Execute both before and after the operation\n */\n Both = 'Both',\n /**\n * No automatic execution (manual/on-demand only)\n */\n None = 'None',\n}\n\n/**\n * Defines which database operations can trigger a semantic.\n */\nexport enum SemanticOperation {\n Create = 'Create',\n Read = 'Read',\n Update = 'Update',\n Delete = 'Delete',\n /**\n * Special operation for list operations\n */\n List = 'List',\n /**\n * Special operation for search operations\n */\n Search = 'Search',\n}\n\n/**\n * Defines the execution mode for a semantic.\n */\nexport enum SemanticExecutionMode {\n /**\n * Execute synchronously as part of the main operation\n */\n Synchronous = 'Synchronous',\n /**\n * Execute asynchronously after the main operation\n */\n Asynchronous = 'Asynchronous',\n /**\n * Execute in background/queue (fire and forget)\n */\n Background = 'Background',\n}\n\n/**\n * Defines validation strategies for semantics.\n */\nexport enum SemanticValidationStrategy {\n /**\n * Fail the operation if semantic validation fails\n */\n Strict = 'Strict',\n /**\n * Log warnings but continue operation\n */\n Warning = 'Warning',\n /**\n * Skip validation entirely\n */\n Skip = 'Skip',\n}\n\n/**\n * Defines caching strategies for computed semantics.\n */\nexport enum SemanticCacheStrategy {\n /**\n * No caching - always compute\n */\n None = 'None',\n /**\n * Cache until dependent fields change\n */\n Dependency = 'Dependency',\n /**\n * Cache with TTL expiration\n */\n TimeToLive = 'TimeToLive',\n /**\n * Cache until manually invalidated\n */\n Manual = 'Manual',\n}\n\n/**\n * Configuration for when and how a semantic should execute at runtime.\n */\nexport interface SemanticRuntimeConfig {\n /**\n * When the semantic should execute relative to the database operation.\n */\n timing: SemanticTiming\n /**\n * Which database operations should trigger this semantic.\n */\n operations: SemanticOperation[]\n /**\n * Priority order for execution when multiple semantics apply.\n * Lower numbers execute first. Default is 100.\n */\n priority?: number\n /**\n * Whether this semantic can be disabled at the entity/property level.\n */\n canDisable?: boolean\n /**\n * How the semantic should execute (sync/async/background).\n * Default is Synchronous.\n * @default Synchronous\n */\n executionMode?: SemanticExecutionMode\n /**\n * Validation strategy when semantic processing fails.\n * Default is Strict.\n * @default Strict\n */\n validationStrategy?: SemanticValidationStrategy\n /**\n * Maximum execution time in milliseconds before timeout.\n * Default is 5000ms for sync, 30000ms for async.\n * @default 5000 for sync, 30000 for async\n */\n timeoutMs?: number\n /**\n * Number of retry attempts on failure.\n * Default is 0 (no retries).\n * @default 0\n */\n retryAttempts?: number\n /**\n * Dependencies on other semantics that must execute first.\n * Uses semantic IDs.\n */\n dependencies?: SemanticType[]\n /**\n * Fields that this semantic depends on for computation.\n * Used for cache invalidation and optimization.\n */\n dependentFields?: string[]\n /**\n * Caching strategy for computed/derived values.\n */\n cacheStrategy?: SemanticCacheStrategy\n /**\n * Cache TTL in seconds (only used with TimeToLive strategy).\n */\n cacheTtlSeconds?: number\n /**\n * Whether this semantic should run in transactions.\n * Default is true.\n */\n transactional?: boolean\n /**\n * Rate limiting configuration for expensive operations.\n */\n rateLimit?: SemanticRateLimit\n /**\n * Conditional execution based on data or context.\n */\n conditions?: SemanticCondition[]\n /**\n * Audit and logging configuration.\n */\n audit?: SemanticAudit\n}\n\nexport interface SemanticRateLimit {\n /**\n * Maximum executions per time window.\n */\n maxExecutions: number\n /**\n * Time window in seconds.\n */\n windowSeconds: number\n /**\n * Strategy when rate limit is exceeded.\n */\n strategy: 'queue' | 'drop' | 'error'\n}\n\nexport interface SemanticCondition {\n /**\n * JEXL expression that must evaluate to true for execution.\n * Has access to entity data, user context, and semantic field references.\n *\n * Available context variables:\n * - `entity`: The entity data being processed\n * - `user`: Current user context (if authenticated)\n * - `operation`: The current operation (Create, Update, etc.)\n * - `semantics`: Object with semantic field accessors\n *\n * Semantic field references use dot notation:\n * - `semantics.CreatedTimestamp` - field with CreatedTimestamp semantic\n * - `semantics.Password` - field with Password semantic\n * - `semantics.User` - entity with User semantic (for associations)\n *\n * @example\n * // Only set timestamp if not already provided\n * \"semantics.CreatedTimestamp == null\"\n *\n * @example\n * // Only apply to authenticated users\n * \"user != null && user.authenticated == true\"\n *\n * @example\n * // Only hash password if it's a plain text (not already hashed)\n * \"entity[semantics.Password] != null && !entity[semantics.Password].startsWith('$')\"\n *\n * @example\n * // Only generate slug if title exists\n * \"entity[semantics.Title] != null && entity[semantics.Title].length > 0\"\n */\n expression: string\n /**\n * Description of when this semantic should run.\n */\n description: string\n}\n\nexport interface SemanticAudit {\n /**\n * Whether to log semantic execution.\n */\n logExecution: boolean\n /**\n * Whether to log input/output data.\n */\n logData: boolean\n /**\n * Retention period for audit logs in days.\n */\n retentionDays: number\n}\n\n/**\n * A base interface for all Data Semantics, containing common properties.\n * A semantic is an annotation applied to a Data Entity, Property, or Association\n * to provide additional context or constraints.\n * This interface is extended by more specific semantic types.\n */\ninterface BaseDataSemantic {\n /**\n * A unique identifier for the semantic definition.\n */\n id: SemanticType\n /**\n * A human-readable name for the semantic.\n */\n displayName: string\n /**\n * A description of the semantic's purpose and impact.\n */\n description: string\n /**\n * Specifies whether the semantic applies to an Entity, Property, or Association.\n */\n scope: SemanticScope\n /**\n * The category this semantic belongs to for UI organization.\n */\n category: SemanticCategory\n /**\n * Whether the semantic has a configuration or additional options.\n * This is used to determine if the semantic requires additional setup or configuration.\n */\n hasConfig: boolean\n /**\n * Runtime execution configuration for this semantic.\n */\n runtime: SemanticRuntimeConfig\n}\n\n/**\n * Represents a semantic that can be applied to an entire Data Entity.\n */\nexport interface EntitySemantic extends BaseDataSemantic {\n scope: SemanticScope.Entity\n}\n\n/**\n * Represents a semantic that can be applied to a single property.\n */\nexport interface PropertySemantic extends BaseDataSemantic {\n scope: SemanticScope.Property\n /**\n * Optional array of data types this semantic can be applied to.\n * Enforces constraints, e.g., DeletedTimestamp on a DateTime property.\n */\n applicableDataTypes?: DomainPropertyType[]\n}\n\n/**\n * Represents a semantic that can be applied to an association between entities.\n */\nexport interface AssociationSemantic extends BaseDataSemantic {\n scope: SemanticScope.Association\n}\n\n/**\n * A type guard to check if a semantic is an EntitySemantic.\n */\nexport const isEntitySemantic = (semantic: DataSemantic): semantic is EntitySemantic =>\n semantic.scope === SemanticScope.Entity\n\n/**\n * A type guard to check if a semantic is a PropertySemantic.\n */\nexport const isPropertySemantic = (semantic: DataSemantic): semantic is PropertySemantic =>\n semantic.scope === SemanticScope.Property\n\n/**\n * A type guard to check if a semantic is a AssociationSemantic.\n */\nexport const isAssociationSemantic = (semantic: DataSemantic): semantic is AssociationSemantic =>\n semantic.scope === SemanticScope.Association\n\n/**\n * Union type for any kind of data semantic\n */\nexport type DataSemantic = EntitySemantic | PropertySemantic | AssociationSemantic\n\n/**\n * A map to store the definitions of all available data semantics.\n * This acts as a central registry for the application.\n */\nexport const DataSemantics: Record<SemanticType, DataSemantic> = {\n //\n // Identity & Authentication\n //\n\n [SemanticType.User]: {\n id: SemanticType.User,\n displayName: 'User Entity',\n scope: SemanticScope.Entity,\n description: 'System users and accounts',\n category: SemanticCategory.Identity,\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Password]: {\n id: SemanticType.Password,\n displayName: 'User Password',\n scope: SemanticScope.Property,\n description: 'Secure password field',\n category: SemanticCategory.Identity,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 10, // High priority for security\n canDisable: false, // Security semantics cannot be disabled\n timeoutMs: 2000, // Allow time for hashing\n conditions: [\n {\n expression: 'entity[semantics.Password] != null && entity[semantics.Password].length > 0',\n description: 'Only process when password field has a value',\n },\n ],\n },\n },\n [SemanticType.Username]: {\n id: SemanticType.Username,\n displayName: 'Username',\n scope: SemanticScope.Property,\n description: 'User authentication identifier',\n category: SemanticCategory.Identity,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Read],\n priority: 15, // High priority for authentication\n canDisable: false, // Security semantics cannot be disabled\n timeoutMs: 100, // Fast operation\n },\n },\n [SemanticType.UserRole]: {\n id: SemanticType.UserRole,\n displayName: 'User Role Field',\n scope: SemanticScope.Property,\n description: 'User permissions and access level',\n category: SemanticCategory.Identity,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [\n SemanticOperation.Create,\n SemanticOperation.Read,\n SemanticOperation.Update,\n SemanticOperation.Delete,\n SemanticOperation.List,\n ],\n priority: 20,\n },\n },\n [SemanticType.ResourceOwnerIdentifier]: {\n id: SemanticType.ResourceOwnerIdentifier,\n displayName: 'Resource Owner Identifier',\n scope: SemanticScope.Association,\n description: 'Links record to owner user',\n category: SemanticCategory.Identity,\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [\n SemanticOperation.Create,\n SemanticOperation.Read,\n SemanticOperation.Update,\n SemanticOperation.Delete,\n SemanticOperation.List,\n ],\n priority: 5, // Very high priority for access control\n canDisable: false,\n },\n },\n\n //\n // Timestamps & Versioning\n //\n\n [SemanticType.CreatedTimestamp]: {\n id: SemanticType.CreatedTimestamp,\n displayName: 'Creation Timestamp',\n scope: SemanticScope.Property,\n description: 'When record was created',\n category: SemanticCategory.Lifecycle,\n applicableDataTypes: ['datetime'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create],\n priority: 90,\n timeoutMs: 100, // Very fast operation\n conditions: [\n {\n expression: 'entity[semantics.CreatedTimestamp] == null',\n description: 'Only set timestamp if not already provided',\n },\n ],\n },\n },\n [SemanticType.UpdatedTimestamp]: {\n id: SemanticType.UpdatedTimestamp,\n displayName: 'Update Timestamp',\n scope: SemanticScope.Property,\n description: 'When record was last modified',\n category: SemanticCategory.Lifecycle,\n applicableDataTypes: ['datetime'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Update],\n priority: 90,\n },\n },\n [SemanticType.DeletedTimestamp]: {\n id: SemanticType.DeletedTimestamp,\n displayName: 'Soft Delete Timestamp',\n scope: SemanticScope.Property,\n description: 'When record was marked deleted',\n category: SemanticCategory.Lifecycle,\n applicableDataTypes: ['datetime'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Delete],\n priority: 80,\n },\n },\n [SemanticType.DeletedFlag]: {\n id: SemanticType.DeletedFlag,\n displayName: 'Soft Delete Flag',\n scope: SemanticScope.Property,\n description: 'Mark record as deleted',\n category: SemanticCategory.Lifecycle,\n applicableDataTypes: ['boolean'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Delete, SemanticOperation.Read, SemanticOperation.List],\n priority: 80,\n },\n },\n\n //\n // Contact & Address\n //\n\n [SemanticType.Address]: {\n id: SemanticType.Address,\n displayName: 'Address Entity',\n scope: SemanticScope.Entity,\n description: 'Physical address entity',\n category: SemanticCategory.Contact,\n // For now, the Address won't have configuration, but future-wise:\n // - autoGeocode (boolean): If true, the runtime automatically generates latitude and longitude for the record whenever the address properties change.\n // - validationProvider (enum): Options like None, GoogleMaps, or Loqate. This determines if the API returns an error for non-existent addresses.\n // - strictness (enum): Lax (accept anything) vs. Strict (reject if not deliverable).\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.StreetAddress]: {\n id: SemanticType.StreetAddress,\n displayName: 'Street Address',\n scope: SemanticScope.Property,\n description: 'Street address line',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.StreetAddressSupplemental]: {\n id: SemanticType.StreetAddressSupplemental,\n displayName: 'Street Address Supplemental',\n scope: SemanticScope.Property,\n description: 'Supplemental street address line (e.g., Unit, Suite, Apartment, Floor)',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.City]: {\n id: SemanticType.City,\n displayName: 'City',\n scope: SemanticScope.Property,\n description: 'City or locality',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.PostalCode]: {\n id: SemanticType.PostalCode,\n displayName: 'Postal Code',\n scope: SemanticScope.Property,\n description: 'Postal or zip code',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Country]: {\n id: SemanticType.Country,\n displayName: 'Country',\n scope: SemanticScope.Property,\n description: 'Country name or code',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Region]: {\n id: SemanticType.Region,\n displayName: 'Region',\n scope: SemanticScope.Property,\n description: 'State, province, or region',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n\n [SemanticType.Version]: {\n id: SemanticType.Version,\n displayName: 'Version Number',\n scope: SemanticScope.Property,\n description: 'Auto-incrementing version counter',\n category: SemanticCategory.Lifecycle,\n applicableDataTypes: ['number'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Update],\n priority: 85,\n },\n },\n\n //\n // Content & Media\n //\n\n [SemanticType.Title]: {\n id: SemanticType.Title,\n displayName: 'Record Title',\n scope: SemanticScope.Property,\n description: 'Main title or heading',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Name]: {\n id: SemanticType.Name,\n displayName: 'Name',\n scope: SemanticScope.Property,\n description: 'A person or pet name',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Description]: {\n id: SemanticType.Description,\n displayName: 'Description',\n scope: SemanticScope.Property,\n description: 'Detailed description text',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Summary]: {\n id: SemanticType.Summary,\n displayName: 'Summary',\n scope: SemanticScope.Property,\n description: 'Brief summary text',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Markdown]: {\n id: SemanticType.Markdown,\n displayName: 'Markdown Content',\n scope: SemanticScope.Property,\n description: 'Formatted text content',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 50, // Process before storage\n },\n },\n [SemanticType.HTML]: {\n id: SemanticType.HTML,\n displayName: 'HTML Content',\n scope: SemanticScope.Property,\n description: 'Rich HTML content',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 50, // Process before storage for sanitization\n },\n },\n [SemanticType.ImageURL]: {\n id: SemanticType.ImageURL,\n displayName: 'Image URL',\n scope: SemanticScope.Property,\n description: 'Link to image file',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 60, // Validate URLs before storage\n },\n },\n [SemanticType.FileURL]: {\n id: SemanticType.FileURL,\n displayName: 'File URL',\n scope: SemanticScope.Property,\n description: 'Link to file attachment',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 60, // Validate URLs before storage\n },\n },\n\n //\n // Business Data\n //\n\n [SemanticType.Status]: {\n id: SemanticType.Status,\n displayName: 'Record Status',\n scope: SemanticScope.Property,\n description: 'Current state of record',\n category: SemanticCategory.Business,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Both,\n operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Read, SemanticOperation.List],\n priority: 30, // Validate state transitions before, filter by state after\n },\n },\n [SemanticType.Currency]: {\n id: SemanticType.Currency,\n displayName: 'Currency',\n scope: SemanticScope.Property,\n description: 'Monetary value with currency',\n category: SemanticCategory.Business,\n applicableDataTypes: ['number', 'string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 70, // Validate currency format and precision\n },\n },\n [SemanticType.SKU]: {\n id: SemanticType.SKU,\n displayName: 'SKU',\n scope: SemanticScope.Property,\n description: 'Product identification code',\n category: SemanticCategory.Business,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 25, // High priority for uniqueness validation\n },\n },\n\n //\n // Contact Information\n //\n\n [SemanticType.Email]: {\n id: SemanticType.Email,\n displayName: 'Email',\n scope: SemanticScope.Property,\n description: 'Email address',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 40, // Validate email format\n },\n },\n [SemanticType.Phone]: {\n id: SemanticType.Phone,\n displayName: 'Phone',\n scope: SemanticScope.Property,\n description: 'Phone number',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 40, // Validate phone format\n },\n },\n [SemanticType.URL]: {\n id: SemanticType.URL,\n displayName: 'URL',\n scope: SemanticScope.Property,\n description: 'Web address or link',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 40, // Validate URL format\n },\n },\n [SemanticType.ClientIPAddress]: {\n id: SemanticType.ClientIPAddress,\n displayName: 'Client IP Address',\n scope: SemanticScope.Property,\n description: 'Automatically populated client IP address',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 95, // Low priority, populate after other validations\n timeoutMs: 100, // Very fast operation\n conditions: [\n {\n expression: 'entity[semantics.ClientIPAddress] == null',\n description: 'Only set IP address if not already provided',\n },\n ],\n },\n },\n\n //\n // Classification & Organization\n //\n\n [SemanticType.PublicUniqueName]: {\n id: SemanticType.PublicUniqueName,\n displayName: 'Public Unique Name (Slug)',\n scope: SemanticScope.Property,\n description: 'URL-friendly unique identifier',\n category: SemanticCategory.Organization,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 30, // Generate slug from title, validate uniqueness\n timeoutMs: 1000,\n conditions: [\n {\n expression: 'entity[semantics.PublicUniqueName] == null || entity[semantics.PublicUniqueName].length == 0',\n description: 'Only generate slug if not already provided',\n },\n // Let's not guess which field is marked as slug source in the `PublicUniqueName` configuration.\n // {\n // expression: 'entity[semantics.Title] != null && entity[semantics.Title].length > 0',\n // description: 'Only generate slug if title field exists and has content',\n // },\n ],\n },\n },\n [SemanticType.Tags]: {\n id: SemanticType.Tags,\n displayName: 'Tags',\n scope: SemanticScope.Association,\n description: 'Enable tagging functionality',\n category: SemanticCategory.Organization,\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.After,\n operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Delete],\n priority: 200, // Process after main operation\n },\n },\n [SemanticType.Categories]: {\n id: SemanticType.Categories,\n displayName: 'Categories',\n scope: SemanticScope.Association,\n description: 'Enable categorization functionality',\n category: SemanticCategory.Organization,\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.After,\n operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Delete],\n priority: 200, // Process after main operation\n },\n },\n\n //\n // Location & Geography\n //\n\n [SemanticType.GeospatialCoordinates]: {\n id: SemanticType.GeospatialCoordinates,\n displayName: 'Geospatial Coordinates',\n scope: SemanticScope.Property,\n description: 'Location coordinates',\n category: SemanticCategory.Location,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Both,\n operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Read, SemanticOperation.List],\n priority: 60, // Validate coordinates before, enable spatial queries after\n },\n },\n\n //\n // Computed Values\n //\n\n // Calculated field can be added to any data type as we can compute any value.\n [SemanticType.Calculated]: {\n id: SemanticType.Calculated,\n displayName: 'Calculated',\n scope: SemanticScope.Property,\n description: 'Auto-calculated field value',\n category: SemanticCategory.Computed,\n applicableDataTypes: ['string', 'number', 'boolean', 'date', 'datetime', 'time', 'binary'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Both,\n operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Read],\n priority: 150, // Calculate after other validations, recalculate on read if needed\n },\n },\n [SemanticType.Derived]: {\n id: SemanticType.Derived,\n displayName: 'Derived',\n scope: SemanticScope.Property,\n description: 'Value derived from other fields',\n category: SemanticCategory.Computed,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.After,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 180, // Derive after all other processing\n },\n },\n}\n\n/**\n * Get all semantics that should run for a specific operation and timing\n */\nexport function getSemanticsForOperation(\n semantics: AppliedDataSemantic[],\n operation: SemanticOperation,\n timing: SemanticTiming\n): AppliedDataSemantic[] {\n return semantics\n .filter((semantic) => {\n const definition = DataSemantics[semantic.id]\n if (!definition?.runtime) {\n return false\n }\n\n const { timing: semanticTiming, operations } = definition.runtime\n\n // Check if timing matches\n const timingMatches = semanticTiming === timing || semanticTiming === SemanticTiming.Both\n\n // Check if operation is included\n const operationMatches = operations.includes(operation)\n\n return timingMatches && operationMatches\n })\n .sort((a, b) => {\n // Sort by priority (lower number = higher priority)\n const priorityA = DataSemantics[a.id]?.runtime?.priority ?? 100\n const priorityB = DataSemantics[b.id]?.runtime?.priority ?? 100\n return priorityA - priorityB\n })\n}\n\n/**\n * Check if a specific semantic can be disabled at runtime\n */\nexport function canSemanticBeDisabled(semanticType: SemanticType): boolean {\n const definition = DataSemantics[semanticType]\n return definition?.runtime?.canDisable !== false // Default to true if not specified\n}\n\nexport function getSemanticsByCategory(): Record<SemanticCategory, DataSemantic[]>\nexport function getSemanticsByCategory(scope: SemanticScope.Entity): Record<SemanticCategory, EntitySemantic[]>\nexport function getSemanticsByCategory(scope: SemanticScope.Property): Record<SemanticCategory, PropertySemantic[]>\nexport function getSemanticsByCategory(\n scope: SemanticScope.Association\n): Record<SemanticCategory, AssociationSemantic[]>\n\n/**\n * Helper function to get all semantics grouped by category.\n * Useful for organizing semantics in UI dropdowns and forms.\n *\n * @param scope Optional scope to filter semantics by (Entity, Property, Association)\n */\nexport function getSemanticsByCategory(scope?: SemanticScope): Record<SemanticCategory, DataSemantic[]> {\n const result: Record<SemanticCategory, DataSemantic[]> = {\n [SemanticCategory.Identity]: [],\n [SemanticCategory.Lifecycle]: [],\n [SemanticCategory.Content]: [],\n [SemanticCategory.Business]: [],\n [SemanticCategory.Contact]: [],\n [SemanticCategory.Organization]: [],\n [SemanticCategory.Location]: [],\n [SemanticCategory.Computed]: [],\n }\n\n Object.values(DataSemantics).forEach((semantic) => {\n // If a scope is provided, filter semantics by that scope\n if (scope && semantic.scope !== scope) {\n return\n }\n result[semantic.category].push(semantic)\n })\n\n return result\n}\n\n/**\n * Helper function to get semantics for a specific category.\n * @param category The category to filter by\n * @returns Array of semantics in the specified category\n */\nexport const getSemanticsByCategoryType = (category: SemanticCategory): DataSemantic[] => {\n return Object.values(DataSemantics).filter((semantic) => semantic.category === category)\n}\n\n/**\n * Represents the application of a data semantic to a specific\n * entity or property within a user's data model.\n */\nexport interface AppliedDataSemantic {\n /**\n * The unique identifier of the semantic being applied.\n */\n id: SemanticType\n\n /**\n * Optional configuration or values specific to this application.\n */\n config?: Record<string, unknown>\n}\n"]}
1
+ {"version":3,"file":"Semantics.js","sourceRoot":"","sources":["../../../src/modeling/Semantics.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,CAAN,IAAY,YAyPX;AAzPD,WAAY,YAAY;IACtB,EAAE;IACF,yBAAyB;IACzB,EAAE;IAEF;;OAEG;IACH,sCAAsB,CAAA;IACtB;;OAEG;IACH,4CAA4B,CAAA;IAE5B,EAAE;IACF,2BAA2B;IAC3B,EAAE;IAEF;;;;OAIG;IACH,8CAA8B,CAAA;IAC9B;;;;;OAKG;IACH,8CAA8B,CAAA;IAC9B;;;OAGG;IACH,8DAA8C,CAAA;IAC9C;;;OAGG;IACH,8DAA8C,CAAA;IAC9C;;;;;OAKG;IACH,8DAA8C,CAAA;IAC9C;;;;OAIG;IACH,oDAAoC,CAAA;IACpC;;;;;;;OAOG;IACH,8DAA8C,CAAA;IAC9C;;;;OAIG;IACH,wCAAwB,CAAA;IACxB;;;;OAIG;IACH,sCAAsB,CAAA;IACtB;;;;;;OAMG;IACH,8CAA8B,CAAA;IAC9B;;;;;;;;;OASG;IACH,0CAA0B,CAAA;IAE1B;;;;OAIG;IACH,4CAA4B,CAAA;IAE5B;;;OAGG;IACH,8CAA8B,CAAA;IAE9B;;;OAGG;IACH,4CAA4B,CAAA;IAE5B;;;;;;OAM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,CAAC,QAAQ,EAAE,EAAE;QAChD,yDAAyD;QACzD,IAAI,KAAK,IAAI,QAAQ,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;YACtC,OAAM;QACR,CAAC;QACD,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,QAA0B,EAAkB,EAAE;IACvF,OAAO,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAA;AAC1F,CAAC,CAAA","sourcesContent":["/* eslint-disable no-redeclare */\n/* eslint-disable max-len */\nimport type { DomainPropertyType } from './DataFormat.js'\n\n/**\n * Defines the names for all available data semantics.\n * Using a string enum makes it easy to add or remove semantics in a single place.\n */\nexport enum SemanticType {\n //\n // Entity-Level Semantics\n //\n\n /**\n * Designates a Data Entity that represents users of the system.\n */\n User = 'Semantic#User',\n /**\n * Designates a Data Entity that represents a physical address.\n */\n Address = 'Semantic#Address',\n\n //\n // Property-Level Semantics\n //\n\n /**\n * Annotates the field as the user password.\n * The runtime should treat this field with special care,\n * ensuring it is encrypted and not exposed in API responses.\n */\n Password = 'Semantic#Password',\n /**\n * Annotates the field as the username for user authentication.\n * This identifies which field should be used for login purposes.\n * Can be applied to dedicated username fields or email fields that serve as usernames.\n * The runtime uses this for authentication, password reset, and user lookup operations.\n */\n Username = 'Semantic#Username',\n /**\n * Designates a Data Property as the `createdAt` timestamp of an entity.\n * This is used to track when the entity was first created.\n */\n CreatedTimestamp = 'Semantic#CreatedTimestamp',\n /**\n * Designates a Data Property as the `updatedAt` timestamp of an entity.\n * This is used to track when the entity was last modified.\n */\n UpdatedTimestamp = 'Semantic#UpdatedTimestamp',\n /**\n * Designates a Data Property as the `deletedAt` timestamp of an entity.\n * This is used to track when the entity was soft-deleted.\n * Soft-deletion means the entity is not physically removed from the database,\n * but marked as deleted for logical deletion purposes.\n */\n DeletedTimestamp = 'Semantic#DeletedTimestamp',\n /**\n * Designates a Data Property as a boolean flag indicating whether the entity is deleted.\n * This is used for soft-deletion, where the entity is not physically removed from the database,\n * but marked as deleted.\n */\n DeletedFlag = 'Semantic#DeletedFlag',\n /**\n * Designates a Data Property as a public identifier for a resource (the slug).\n * This is often used in URLs to provide a user-friendly way to access the resource.\n * For example, a blog post might have a public unique name like \"my-first-post\".\n * The runtime automatically generates a URL-safe string from another field (like a title).\n * By default, slugs are generated to be unique, but the configuration allows for duplicates\n * in scenarios where uniqueness is handled by a combination of fields (e.g., year and slug).\n */\n PublicUniqueName = 'Semantic#PublicUniqueName',\n /**\n * A semantic that describes a title of an article, blog post, and so on. This semantic is used with\n * the `PublicUniqueName` to determine which field is responsible for the slug generation. However,\n * we may add more automation related to the `title` property in the future.\n */\n Title = 'Semantic#Title',\n /**\n * A semantic that describes a name of a person or pet. This semantic is used with\n * the `PublicUniqueName` to determine which field is responsible for the slug generation. However,\n * we may add more automation related to the `name` property in the future.\n */\n Name = 'Semantic#Name',\n /**\n * Designates a Data Property as the `role` of a user within the system.\n * This is used to define the user's permissions and access levels.\n * For example, a user with the role of \"admin\" would have elevated permissions\n * compared to a user with the role of \"guest\".\n * Roles are defined on the entity as enums, or as a string property with a controlled vocabulary.\n */\n UserRole = 'Semantic#UserRole',\n /**\n * A text or enum field to represent the state of a record (e.g., `draft`, `published`, `pending_review`, `archived`).\n *\n * Defined behaviors:\n * - State-Based Filtering: Automatically prevents public users from seeing records in a draft state.\n * - State Transitions: In principle, the runtime should prevent the user from skipping some states.\n * For example, when the record is in the `draft` state, it cannot be moved to the `archived` state without publishing it first. However,\n * we do not have enough customer feedback to design this functionality correctly right now, so\n * it serves as a placeholder semantic annotation.\n */\n Status = 'Semantic#Status',\n\n /**\n * Annotates an integer field that automatically increments.\n * The runtime automatically increments this number on every update, providing a simple way\n * to track changes and implement optimistic locking to prevent mid-air collisions.\n */\n Version = 'Semantic#Version',\n\n /**\n * Annotates a field that holds a reference to an image data via an URL.\n * The application + runtime should validate that the input is a well-formed URL.\n */\n ImageURL = 'Semantic#ImageURL',\n\n /**\n * Annotates a field that holds a reference to a file object via an URL. Ity is distinct from the\n * `ImageURL` semantic as it implicitly states that the target is non-image, binary data (an attachment, for example).\n */\n FileURL = 'Semantic#FileURL',\n\n /**\n * Annotates the field as a markdown-interpreted field.\n * When an object is created, the runtime performs additional sanitization to prevent XSS attacks.\n *\n * The annotation describes whether the data should be translated to the HTML output when\n * record is read or the original MD content should be returned.\n */\n Markdown = 'Semantic#Markdown',\n\n /**\n * Annotates the field as containing HTML content.\n * The runtime performs sanitization to prevent XSS attacks and validates HTML structure.\n *\n * The annotation describes whether the data should be rendered as HTML output when\n * record is read or the original HTML content should be returned.\n */\n HTML = 'Semantic#HTML',\n\n /**\n * Annotates a field that holds geospatial coordinate data (latitude/longitude).\n * The runtime automatically generates API capabilities for location-based queries,\n * such as \"find all restaurants within a 5-mile radius.\"\n *\n * The field should contain coordinate data in a standard format:\n * - \"40.7128,-74.0060\" (lat,lon)\n * - \"POINT(-74.0060 40.7128)\" (PostGIS format)\n * - \"40.7128°N, 74.0060°W\" (degree format)\n *\n * Defined behaviors:\n * - Spatial Indexing: The runtime automatically creates spatial indexes for efficient location-based queries\n * - Distance Queries: Enables API endpoints for finding records within specified distances\n * - Coordinate Validation: Validates that the input follows proper coordinate format\n * - PostGIS Integration: When using PostgreSQL, automatically maps to PostGIS geometry types\n */\n GeospatialCoordinates = 'Semantic#GeospatialCoordinates',\n\n /**\n * Annotates a field as an email address with validation and verification options.\n */\n Email = 'Semantic#Email',\n /**\n * Annotates a field as a phone number with validation and formatting options.\n */\n Phone = 'Semantic#Phone',\n /**\n * Annotates a field as a monetary value with currency support and precision control.\n * Can store simple decimal amounts or complex objects with amount and currency.\n *\n * As a semantic, it provides flexibility by annotating a base `number` or `string` type,\n * allowing for different storage strategies (e.g., decimal, integer cents, or a JSON object)\n * while maintaining a consistent API for currency operations.\n */\n Currency = 'Semantic#Currency',\n /**\n * Annotates a field as a URL with validation and allowed protocols.\n */\n URL = 'Semantic#URL',\n /**\n * Annotates a field as a Stock Keeping Unit (SKU).\n * Enforces uniqueness at the database level, critical for product catalogs.\n * Provides automatic validation and formatting for product identification codes.\n */\n SKU = 'Semantic#SKU',\n /**\n * Annotates a field as a long-form description.\n */\n Description = 'Semantic#Description',\n /**\n * Annotates a field as a short summary.\n */\n Summary = 'Semantic#Summary',\n /**\n * Annotates a field as a calculated value based on a formula.\n */\n Calculated = 'Semantic#Calculated',\n /**\n * Annotates a field as derived from other fields.\n */\n Derived = 'Semantic#Derived',\n /**\n * Annotates a field that should automatically receive the client's IP address.\n * when creating or updating records, providing audit trail and geolocation capabilities.\n */\n ClientIPAddress = 'Semantic#ClientIPAddress',\n /**\n * Designates a Data Property as the street address (e.g., \"123 Main St\").\n */\n StreetAddress = 'Semantic#StreetAddress',\n /**\n * This is a single semantic used for any additional lines (Unit, Suite, Apartment, Floor).\n */\n StreetAddressSupplemental = 'Semantic#StreetAddressSupplemental',\n /**\n * Designates a Data Property as the city or locality.\n */\n City = 'Semantic#City',\n /**\n * Designates a Data Property as the postal or zip code.\n */\n PostalCode = 'Semantic#PostalCode',\n /**\n * Designates a Data Property as the country.\n */\n Country = 'Semantic#Country',\n /**\n * Designates a Data Property as the state, province, or region.\n */\n Region = 'Semantic#Region',\n\n //\n // Association-Level Semantics\n //\n\n /**\n * Designates an association that links a resource to a \"User\" entity instance.\n * This is used to indicate ownership of the resource for access control purposes.\n * For example, a blog post might have a resource owner identifier that points to the user who created it.\n *\n * Defined behaviors:\n * - Automatic Ownership: When a new record is created, this field is automatically populated with the ID of the authenticated user. It also creates a foreign relationship to the `User` semantic object.\n * - Scoped Access: The runtime automatically filters list and read operations to show only records where the Owner matches the current user. update and delete operations are similarly restricted.\n */\n ResourceOwnerIdentifier = 'Semantic#ResourceOwnerIdentifier',\n /**\n * Annotates an association as supporting tag functionality.\n * Applied to associations between entities to enable tagging behavior.\n * For example, a Product-Category association with Tags semantic enables product tagging.\n */\n Tags = 'Semantic#Tags',\n /**\n * Annotates an association as supporting category functionality.\n * Applied to associations between entities to enable categorization behavior.\n * For example, a Product-Category association with Categories semantic enables product categorization.\n */\n Categories = 'Semantic#Categories',\n}\n\n/**\n * Defines the scope at which a semantic can be applied.\n */\nexport enum SemanticScope {\n /**\n * The semantic applies to an entire Data Entity.\n * This is used for semantics that provide context or constraints at the entity level.\n */\n Entity = 'Entity',\n /**\n * The semantic applies to a single Data Property.\n * This is used for semantics that provide context or constraints at the property level.\n */\n Property = 'Property',\n /**\n * The semantic applies to an Association between Data Entities.\n * This is used for semantics that provide context or constraints at the association level.\n */\n Association = 'Association',\n}\n\n/**\n * Defines categories for organizing semantics in the UI.\n */\nexport enum SemanticCategory {\n /**\n * User management, authentication, and access control\n */\n Identity = 'Identity & Authentication',\n /**\n * Timestamps, versioning, and record lifecycle\n */\n Lifecycle = 'Timestamps & Versioning',\n /**\n * Text content, media, and rich content types\n */\n Content = 'Content & Media',\n /**\n * Business-specific data like pricing, inventory, status\n */\n Business = 'Business Data',\n /**\n * Organization, categorization, and tagging\n */\n Organization = 'Classification & Organization',\n /**\n * Location and geographical data\n */\n Location = 'Location & Geography',\n /**\n * Contact information and communication\n */\n Contact = 'Contact Information',\n /**\n * Calculated and derived values\n */\n Computed = 'Computed Values',\n}\n\n/**\n * Defines when a semantic should execute in relation to database operations.\n */\nexport enum SemanticTiming {\n /**\n * Execute before the database operation (validation, preprocessing)\n */\n Before = 'Before',\n /**\n * Execute after the database operation (cleanup, notifications, derived values)\n */\n After = 'After',\n /**\n * Execute both before and after the operation\n */\n Both = 'Both',\n /**\n * No automatic execution (manual/on-demand only)\n */\n None = 'None',\n}\n\n/**\n * Defines which database operations can trigger a semantic.\n */\nexport enum SemanticOperation {\n Create = 'Create',\n Read = 'Read',\n Update = 'Update',\n Delete = 'Delete',\n /**\n * Special operation for list operations\n */\n List = 'List',\n /**\n * Special operation for search operations\n */\n Search = 'Search',\n}\n\n/**\n * Defines the execution mode for a semantic.\n */\nexport enum SemanticExecutionMode {\n /**\n * Execute synchronously as part of the main operation\n */\n Synchronous = 'Synchronous',\n /**\n * Execute asynchronously after the main operation\n */\n Asynchronous = 'Asynchronous',\n /**\n * Execute in background/queue (fire and forget)\n */\n Background = 'Background',\n}\n\n/**\n * Defines validation strategies for semantics.\n */\nexport enum SemanticValidationStrategy {\n /**\n * Fail the operation if semantic validation fails\n */\n Strict = 'Strict',\n /**\n * Log warnings but continue operation\n */\n Warning = 'Warning',\n /**\n * Skip validation entirely\n */\n Skip = 'Skip',\n}\n\n/**\n * Defines caching strategies for computed semantics.\n */\nexport enum SemanticCacheStrategy {\n /**\n * No caching - always compute\n */\n None = 'None',\n /**\n * Cache until dependent fields change\n */\n Dependency = 'Dependency',\n /**\n * Cache with TTL expiration\n */\n TimeToLive = 'TimeToLive',\n /**\n * Cache until manually invalidated\n */\n Manual = 'Manual',\n}\n\n/**\n * Configuration for when and how a semantic should execute at runtime.\n */\nexport interface SemanticRuntimeConfig {\n /**\n * When the semantic should execute relative to the database operation.\n */\n timing: SemanticTiming\n /**\n * Which database operations should trigger this semantic.\n */\n operations: SemanticOperation[]\n /**\n * Priority order for execution when multiple semantics apply.\n * Lower numbers execute first. Default is 100.\n */\n priority?: number\n /**\n * Whether this semantic can be disabled at the entity/property level.\n */\n canDisable?: boolean\n /**\n * How the semantic should execute (sync/async/background).\n * Default is Synchronous.\n * @default Synchronous\n */\n executionMode?: SemanticExecutionMode\n /**\n * Validation strategy when semantic processing fails.\n * Default is Strict.\n * @default Strict\n */\n validationStrategy?: SemanticValidationStrategy\n /**\n * Maximum execution time in milliseconds before timeout.\n * Default is 5000ms for sync, 30000ms for async.\n * @default 5000 for sync, 30000 for async\n */\n timeoutMs?: number\n /**\n * Number of retry attempts on failure.\n * Default is 0 (no retries).\n * @default 0\n */\n retryAttempts?: number\n /**\n * Dependencies on other semantics that must execute first.\n * Uses semantic IDs.\n */\n dependencies?: SemanticType[]\n /**\n * Fields that this semantic depends on for computation.\n * Used for cache invalidation and optimization.\n */\n dependentFields?: string[]\n /**\n * Caching strategy for computed/derived values.\n */\n cacheStrategy?: SemanticCacheStrategy\n /**\n * Cache TTL in seconds (only used with TimeToLive strategy).\n */\n cacheTtlSeconds?: number\n /**\n * Whether this semantic should run in transactions.\n * Default is true.\n */\n transactional?: boolean\n /**\n * Rate limiting configuration for expensive operations.\n */\n rateLimit?: SemanticRateLimit\n /**\n * Conditional execution based on data or context.\n */\n conditions?: SemanticCondition[]\n /**\n * Audit and logging configuration.\n */\n audit?: SemanticAudit\n}\n\nexport interface SemanticRateLimit {\n /**\n * Maximum executions per time window.\n */\n maxExecutions: number\n /**\n * Time window in seconds.\n */\n windowSeconds: number\n /**\n * Strategy when rate limit is exceeded.\n */\n strategy: 'queue' | 'drop' | 'error'\n}\n\nexport interface SemanticCondition {\n /**\n * JEXL expression that must evaluate to true for execution.\n * Has access to entity data, user context, and semantic field references.\n *\n * Available context variables:\n * - `entity`: The entity data being processed\n * - `user`: Current user context (if authenticated)\n * - `operation`: The current operation (Create, Update, etc.)\n * - `semantics`: Object with semantic field accessors\n *\n * Semantic field references use dot notation:\n * - `semantics.CreatedTimestamp` - field with CreatedTimestamp semantic\n * - `semantics.Password` - field with Password semantic\n * - `semantics.User` - entity with User semantic (for associations)\n *\n * @example\n * // Only set timestamp if not already provided\n * \"semantics.CreatedTimestamp == null\"\n *\n * @example\n * // Only apply to authenticated users\n * \"user != null && user.authenticated == true\"\n *\n * @example\n * // Only hash password if it's a plain text (not already hashed)\n * \"entity[semantics.Password] != null && !entity[semantics.Password].startsWith('$')\"\n *\n * @example\n * // Only generate slug if title exists\n * \"entity[semantics.Title] != null && entity[semantics.Title].length > 0\"\n */\n expression: string\n /**\n * Description of when this semantic should run.\n */\n description: string\n}\n\nexport interface SemanticAudit {\n /**\n * Whether to log semantic execution.\n */\n logExecution: boolean\n /**\n * Whether to log input/output data.\n */\n logData: boolean\n /**\n * Retention period for audit logs in days.\n */\n retentionDays: number\n}\n\n/**\n * A base interface for all Data Semantics, containing common properties.\n * A semantic is an annotation applied to a Data Entity, Property, or Association\n * to provide additional context or constraints.\n * This interface is extended by more specific semantic types.\n */\ninterface BaseDataSemantic {\n /**\n * A unique identifier for the semantic definition.\n */\n id: SemanticType\n /**\n * A human-readable name for the semantic.\n */\n displayName: string\n /**\n * A description of the semantic's purpose and impact.\n */\n description: string\n /**\n * Specifies whether the semantic applies to an Entity, Property, or Association.\n */\n scope: SemanticScope\n /**\n * The category this semantic belongs to for UI organization.\n */\n category: SemanticCategory\n /**\n * Whether the semantic has a configuration or additional options.\n * This is used to determine if the semantic requires additional setup or configuration.\n */\n hasConfig: boolean\n /**\n * Runtime execution configuration for this semantic.\n */\n runtime: SemanticRuntimeConfig\n}\n\n/**\n * Represents a semantic that can be applied to an entire Data Entity.\n */\nexport interface EntitySemantic extends BaseDataSemantic {\n scope: SemanticScope.Entity\n}\n\n/**\n * Represents a semantic that can be applied to a single property.\n */\nexport interface PropertySemantic extends BaseDataSemantic {\n scope: SemanticScope.Property\n /**\n * Optional array of data types this semantic can be applied to.\n * Enforces constraints, e.g., DeletedTimestamp on a DateTime property.\n */\n applicableDataTypes?: DomainPropertyType[]\n}\n\n/**\n * Represents a semantic that can be applied to an association between entities.\n */\nexport interface AssociationSemantic extends BaseDataSemantic {\n scope: SemanticScope.Association\n}\n\n/**\n * A type guard to check if a semantic is an EntitySemantic.\n */\nexport const isEntitySemantic = (semantic: DataSemantic): semantic is EntitySemantic =>\n semantic.scope === SemanticScope.Entity\n\n/**\n * A type guard to check if a semantic is a PropertySemantic.\n */\nexport const isPropertySemantic = (semantic: DataSemantic): semantic is PropertySemantic =>\n semantic.scope === SemanticScope.Property\n\n/**\n * A type guard to check if a semantic is a AssociationSemantic.\n */\nexport const isAssociationSemantic = (semantic: DataSemantic): semantic is AssociationSemantic =>\n semantic.scope === SemanticScope.Association\n\n/**\n * Union type for any kind of data semantic\n */\nexport type DataSemantic = EntitySemantic | PropertySemantic | AssociationSemantic\n\n/**\n * A map to store the definitions of all available data semantics.\n * This acts as a central registry for the application.\n */\nexport const DataSemantics: Record<SemanticType, DataSemantic> = {\n //\n // Identity & Authentication\n //\n\n [SemanticType.User]: {\n id: SemanticType.User,\n displayName: 'User Entity',\n scope: SemanticScope.Entity,\n description: 'System users and accounts',\n category: SemanticCategory.Identity,\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Password]: {\n id: SemanticType.Password,\n displayName: 'User Password',\n scope: SemanticScope.Property,\n description: 'Secure password field',\n category: SemanticCategory.Identity,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 10, // High priority for security\n canDisable: false, // Security semantics cannot be disabled\n timeoutMs: 2000, // Allow time for hashing\n conditions: [\n {\n expression: 'entity[semantics.Password] != null && entity[semantics.Password].length > 0',\n description: 'Only process when password field has a value',\n },\n ],\n },\n },\n [SemanticType.Username]: {\n id: SemanticType.Username,\n displayName: 'Username',\n scope: SemanticScope.Property,\n description: 'User authentication identifier',\n category: SemanticCategory.Identity,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Read],\n priority: 15, // High priority for authentication\n canDisable: false, // Security semantics cannot be disabled\n timeoutMs: 100, // Fast operation\n },\n },\n [SemanticType.UserRole]: {\n id: SemanticType.UserRole,\n displayName: 'User Role Field',\n scope: SemanticScope.Property,\n description: 'User permissions and access level',\n category: SemanticCategory.Identity,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [\n SemanticOperation.Create,\n SemanticOperation.Read,\n SemanticOperation.Update,\n SemanticOperation.Delete,\n SemanticOperation.List,\n ],\n priority: 20,\n },\n },\n [SemanticType.ResourceOwnerIdentifier]: {\n id: SemanticType.ResourceOwnerIdentifier,\n displayName: 'Resource Owner Identifier',\n scope: SemanticScope.Association,\n description: 'Links record to owner user',\n category: SemanticCategory.Identity,\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [\n SemanticOperation.Create,\n SemanticOperation.Read,\n SemanticOperation.Update,\n SemanticOperation.Delete,\n SemanticOperation.List,\n ],\n priority: 5, // Very high priority for access control\n canDisable: false,\n },\n },\n\n //\n // Timestamps & Versioning\n //\n\n [SemanticType.CreatedTimestamp]: {\n id: SemanticType.CreatedTimestamp,\n displayName: 'Creation Timestamp',\n scope: SemanticScope.Property,\n description: 'When record was created',\n category: SemanticCategory.Lifecycle,\n applicableDataTypes: ['datetime'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create],\n priority: 90,\n timeoutMs: 100, // Very fast operation\n conditions: [\n {\n expression: 'entity[semantics.CreatedTimestamp] == null',\n description: 'Only set timestamp if not already provided',\n },\n ],\n },\n },\n [SemanticType.UpdatedTimestamp]: {\n id: SemanticType.UpdatedTimestamp,\n displayName: 'Update Timestamp',\n scope: SemanticScope.Property,\n description: 'When record was last modified',\n category: SemanticCategory.Lifecycle,\n applicableDataTypes: ['datetime'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Update],\n priority: 90,\n },\n },\n [SemanticType.DeletedTimestamp]: {\n id: SemanticType.DeletedTimestamp,\n displayName: 'Soft Delete Timestamp',\n scope: SemanticScope.Property,\n description: 'When record was marked deleted',\n category: SemanticCategory.Lifecycle,\n applicableDataTypes: ['datetime'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Delete],\n priority: 80,\n },\n },\n [SemanticType.DeletedFlag]: {\n id: SemanticType.DeletedFlag,\n displayName: 'Soft Delete Flag',\n scope: SemanticScope.Property,\n description: 'Mark record as deleted',\n category: SemanticCategory.Lifecycle,\n applicableDataTypes: ['boolean'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Delete, SemanticOperation.Read, SemanticOperation.List],\n priority: 80,\n },\n },\n\n //\n // Contact & Address\n //\n\n [SemanticType.Address]: {\n id: SemanticType.Address,\n displayName: 'Address Entity',\n scope: SemanticScope.Entity,\n description: 'Physical address entity',\n category: SemanticCategory.Contact,\n // For now, the Address won't have configuration, but future-wise:\n // - autoGeocode (boolean): If true, the runtime automatically generates latitude and longitude for the record whenever the address properties change.\n // - validationProvider (enum): Options like None, GoogleMaps, or Loqate. This determines if the API returns an error for non-existent addresses.\n // - strictness (enum): Lax (accept anything) vs. Strict (reject if not deliverable).\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.StreetAddress]: {\n id: SemanticType.StreetAddress,\n displayName: 'Street Address',\n scope: SemanticScope.Property,\n description: 'Street address line',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.StreetAddressSupplemental]: {\n id: SemanticType.StreetAddressSupplemental,\n displayName: 'Street Address Supplemental',\n scope: SemanticScope.Property,\n description: 'Supplemental street address line (e.g., Unit, Suite, Apartment, Floor)',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.City]: {\n id: SemanticType.City,\n displayName: 'City',\n scope: SemanticScope.Property,\n description: 'City or locality',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.PostalCode]: {\n id: SemanticType.PostalCode,\n displayName: 'Postal Code',\n scope: SemanticScope.Property,\n description: 'Postal or zip code',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Country]: {\n id: SemanticType.Country,\n displayName: 'Country',\n scope: SemanticScope.Property,\n description: 'Country name or code',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Region]: {\n id: SemanticType.Region,\n displayName: 'Region',\n scope: SemanticScope.Property,\n description: 'State, province, or region',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n\n [SemanticType.Version]: {\n id: SemanticType.Version,\n displayName: 'Version Number',\n scope: SemanticScope.Property,\n description: 'Auto-incrementing version counter',\n category: SemanticCategory.Lifecycle,\n applicableDataTypes: ['number'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Update],\n priority: 85,\n },\n },\n\n //\n // Content & Media\n //\n\n [SemanticType.Title]: {\n id: SemanticType.Title,\n displayName: 'Record Title',\n scope: SemanticScope.Property,\n description: 'Main title or heading',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Name]: {\n id: SemanticType.Name,\n displayName: 'Name',\n scope: SemanticScope.Property,\n description: 'A person or pet name',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Description]: {\n id: SemanticType.Description,\n displayName: 'Description',\n scope: SemanticScope.Property,\n description: 'Detailed description text',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Summary]: {\n id: SemanticType.Summary,\n displayName: 'Summary',\n scope: SemanticScope.Property,\n description: 'Brief summary text',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.None,\n operations: [],\n },\n },\n [SemanticType.Markdown]: {\n id: SemanticType.Markdown,\n displayName: 'Markdown Content',\n scope: SemanticScope.Property,\n description: 'Formatted text content',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 50, // Process before storage\n },\n },\n [SemanticType.HTML]: {\n id: SemanticType.HTML,\n displayName: 'HTML Content',\n scope: SemanticScope.Property,\n description: 'Rich HTML content',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 50, // Process before storage for sanitization\n },\n },\n [SemanticType.ImageURL]: {\n id: SemanticType.ImageURL,\n displayName: 'Image URL',\n scope: SemanticScope.Property,\n description: 'Link to image file',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 60, // Validate URLs before storage\n },\n },\n [SemanticType.FileURL]: {\n id: SemanticType.FileURL,\n displayName: 'File URL',\n scope: SemanticScope.Property,\n description: 'Link to file attachment',\n category: SemanticCategory.Content,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 60, // Validate URLs before storage\n },\n },\n\n //\n // Business Data\n //\n\n [SemanticType.Status]: {\n id: SemanticType.Status,\n displayName: 'Record Status',\n scope: SemanticScope.Property,\n description: 'Current state of record',\n category: SemanticCategory.Business,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Both,\n operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Read, SemanticOperation.List],\n priority: 30, // Validate state transitions before, filter by state after\n },\n },\n [SemanticType.Currency]: {\n id: SemanticType.Currency,\n displayName: 'Currency',\n scope: SemanticScope.Property,\n description: 'Monetary value with currency',\n category: SemanticCategory.Business,\n applicableDataTypes: ['number', 'string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 70, // Validate currency format and precision\n },\n },\n [SemanticType.SKU]: {\n id: SemanticType.SKU,\n displayName: 'SKU',\n scope: SemanticScope.Property,\n description: 'Product identification code',\n category: SemanticCategory.Business,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 25, // High priority for uniqueness validation\n },\n },\n\n //\n // Contact Information\n //\n\n [SemanticType.Email]: {\n id: SemanticType.Email,\n displayName: 'Email',\n scope: SemanticScope.Property,\n description: 'Email address',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 40, // Validate email format\n },\n },\n [SemanticType.Phone]: {\n id: SemanticType.Phone,\n displayName: 'Phone',\n scope: SemanticScope.Property,\n description: 'Phone number',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 40, // Validate phone format\n },\n },\n [SemanticType.URL]: {\n id: SemanticType.URL,\n displayName: 'URL',\n scope: SemanticScope.Property,\n description: 'Web address or link',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 40, // Validate URL format\n },\n },\n [SemanticType.ClientIPAddress]: {\n id: SemanticType.ClientIPAddress,\n displayName: 'Client IP Address',\n scope: SemanticScope.Property,\n description: 'Automatically populated client IP address',\n category: SemanticCategory.Contact,\n applicableDataTypes: ['string'],\n hasConfig: false,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 95, // Low priority, populate after other validations\n timeoutMs: 100, // Very fast operation\n conditions: [\n {\n expression: 'entity[semantics.ClientIPAddress] == null',\n description: 'Only set IP address if not already provided',\n },\n ],\n },\n },\n\n //\n // Classification & Organization\n //\n\n [SemanticType.PublicUniqueName]: {\n id: SemanticType.PublicUniqueName,\n displayName: 'Public Unique Name (Slug)',\n scope: SemanticScope.Property,\n description: 'URL-friendly unique identifier',\n category: SemanticCategory.Organization,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Before,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 30, // Generate slug from title, validate uniqueness\n timeoutMs: 1000,\n conditions: [\n {\n expression: 'entity[semantics.PublicUniqueName] == null || entity[semantics.PublicUniqueName].length == 0',\n description: 'Only generate slug if not already provided',\n },\n // Let's not guess which field is marked as slug source in the `PublicUniqueName` configuration.\n // {\n // expression: 'entity[semantics.Title] != null && entity[semantics.Title].length > 0',\n // description: 'Only generate slug if title field exists and has content',\n // },\n ],\n },\n },\n [SemanticType.Tags]: {\n id: SemanticType.Tags,\n displayName: 'Tags',\n scope: SemanticScope.Association,\n description: 'Enable tagging functionality',\n category: SemanticCategory.Organization,\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.After,\n operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Delete],\n priority: 200, // Process after main operation\n },\n },\n [SemanticType.Categories]: {\n id: SemanticType.Categories,\n displayName: 'Categories',\n scope: SemanticScope.Association,\n description: 'Enable categorization functionality',\n category: SemanticCategory.Organization,\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.After,\n operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Delete],\n priority: 200, // Process after main operation\n },\n },\n\n //\n // Location & Geography\n //\n\n [SemanticType.GeospatialCoordinates]: {\n id: SemanticType.GeospatialCoordinates,\n displayName: 'Geospatial Coordinates',\n scope: SemanticScope.Property,\n description: 'Location coordinates',\n category: SemanticCategory.Location,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Both,\n operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Read, SemanticOperation.List],\n priority: 60, // Validate coordinates before, enable spatial queries after\n },\n },\n\n //\n // Computed Values\n //\n\n // Calculated field can be added to any data type as we can compute any value.\n [SemanticType.Calculated]: {\n id: SemanticType.Calculated,\n displayName: 'Calculated',\n scope: SemanticScope.Property,\n description: 'Auto-calculated field value',\n category: SemanticCategory.Computed,\n applicableDataTypes: ['string', 'number', 'boolean', 'date', 'datetime', 'time', 'binary'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.Both,\n operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Read],\n priority: 150, // Calculate after other validations, recalculate on read if needed\n },\n },\n [SemanticType.Derived]: {\n id: SemanticType.Derived,\n displayName: 'Derived',\n scope: SemanticScope.Property,\n description: 'Value derived from other fields',\n category: SemanticCategory.Computed,\n applicableDataTypes: ['string'],\n hasConfig: true,\n runtime: {\n timing: SemanticTiming.After,\n operations: [SemanticOperation.Create, SemanticOperation.Update],\n priority: 180, // Derive after all other processing\n },\n },\n}\n\n/**\n * Get all semantics that should run for a specific operation and timing\n */\nexport function getSemanticsForOperation(\n semantics: AppliedDataSemantic[],\n operation: SemanticOperation,\n timing: SemanticTiming\n): AppliedDataSemantic[] {\n return semantics\n .filter((semantic) => {\n const definition = DataSemantics[semantic.id]\n if (!definition?.runtime) {\n return false\n }\n\n const { timing: semanticTiming, operations } = definition.runtime\n\n // Check if timing matches\n const timingMatches = semanticTiming === timing || semanticTiming === SemanticTiming.Both\n\n // Check if operation is included\n const operationMatches = operations.includes(operation)\n\n return timingMatches && operationMatches\n })\n .sort((a, b) => {\n // Sort by priority (lower number = higher priority)\n const priorityA = DataSemantics[a.id]?.runtime?.priority ?? 100\n const priorityB = DataSemantics[b.id]?.runtime?.priority ?? 100\n return priorityA - priorityB\n })\n}\n\n/**\n * Check if a specific semantic can be disabled at runtime\n */\nexport function canSemanticBeDisabled(semanticType: SemanticType): boolean {\n const definition = DataSemantics[semanticType]\n return definition?.runtime?.canDisable !== false // Default to true if not specified\n}\n\nexport function getSemanticsByCategory(): Record<SemanticCategory, DataSemantic[]>\nexport function getSemanticsByCategory(scope: SemanticScope.Entity): Record<SemanticCategory, EntitySemantic[]>\nexport function getSemanticsByCategory(scope: SemanticScope.Property): Record<SemanticCategory, PropertySemantic[]>\nexport function getSemanticsByCategory(\n scope: SemanticScope.Association\n): Record<SemanticCategory, AssociationSemantic[]>\n\n/**\n * Helper function to get all semantics grouped by category.\n * Useful for organizing semantics in UI dropdowns and forms.\n *\n * @param scope Optional scope to filter semantics by (Entity, Property, Association)\n */\nexport function getSemanticsByCategory(scope?: SemanticScope): Record<SemanticCategory, DataSemantic[]> {\n const result: Record<SemanticCategory, DataSemantic[]> = {\n [SemanticCategory.Identity]: [],\n [SemanticCategory.Lifecycle]: [],\n [SemanticCategory.Content]: [],\n [SemanticCategory.Business]: [],\n [SemanticCategory.Contact]: [],\n [SemanticCategory.Organization]: [],\n [SemanticCategory.Location]: [],\n [SemanticCategory.Computed]: [],\n }\n\n Object.values(DataSemantics).forEach((semantic) => {\n // If a scope is provided, filter semantics by that scope\n if (scope && semantic.scope !== scope) {\n return\n }\n result[semantic.category].push(semantic)\n })\n\n return result\n}\n\n/**\n * Helper function to get semantics for a specific category.\n * @param category The category to filter by\n * @returns Array of semantics in the specified category\n */\nexport const getSemanticsByCategoryType = (category: SemanticCategory): DataSemantic[] => {\n return Object.values(DataSemantics).filter((semantic) => semantic.category === category)\n}\n\n/**\n * Represents the application of a data semantic to a specific\n * entity or property within a user's data model.\n */\nexport interface AppliedDataSemantic {\n /**\n * The unique identifier of the semantic being applied.\n */\n id: SemanticType\n\n /**\n * Optional configuration or values specific to this application.\n */\n config?: Record<string, unknown>\n}\n"]}
@@ -473,6 +473,7 @@ export declare function addUnitPriceField(entity: DomainEntity, info?: Partial<I
473
473
  export declare function addCurrencyAmountField(entity: DomainEntity, fieldName: string, displayName: string, info?: Partial<IThing>): DomainProperty;
474
474
  export declare function addRecommendedFields(entity: DomainEntity): DomainElement[];
475
475
  export declare function addStreetAddressField(entity: DomainEntity, info?: Partial<IThing>): DomainProperty;
476
+ export declare function addStreetAddressSupplementalField(entity: DomainEntity, info?: Partial<IThing>): DomainProperty;
476
477
  export declare function addCityField(entity: DomainEntity, info?: Partial<IThing>): DomainProperty;
477
478
  export declare function addPostalCodeField(entity: DomainEntity, info?: Partial<IThing>): DomainProperty;
478
479
  export declare function addCountryField(entity: DomainEntity, info?: Partial<IThing>): DomainProperty;
@@ -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;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAanD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,aAAa,CA2EnF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,GAAE,OAAO,CAAC,MAAM,CAAM,GAAG,cAAc,CAiB3F;AAED;;;;;;GAMG;AACH,w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CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,GAAE,OAAO,CAAC,MAAM,CAAM,GAAG,cAAc,CAWhG;AAMD,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,GAAE,OAAO,CAAC,MAAM,CAAM,GAAG,cAAc,CAU/F"}
@@ -81,6 +81,8 @@ export function addAutoField(entity, autoField) {
81
81
  return addUnitPriceField(entity);
82
82
  case 'street-address':
83
83
  return addStreetAddressField(entity);
84
+ case 'street-address-supplemental':
85
+ return addStreetAddressSupplementalField(entity);
84
86
  case 'city':
85
87
  return addCityField(entity);
86
88
  case 'postal-code':
@@ -1237,6 +1239,27 @@ export function addStreetAddressField(entity, info = {}) {
1237
1239
  function findStreetAddressField(entity, direct = false) {
1238
1240
  return findPropertyField(entity, (property) => property.hasSemantic(SemanticType.StreetAddress), direct);
1239
1241
  }
1242
+ export function addStreetAddressSupplementalField(entity, info = {}) {
1243
+ // we do not look for duplicates here, because the address can have multiple supplements (like line2, line3, etc.)
1244
+ let latest = 0;
1245
+ for (const prop of entity.properties) {
1246
+ if (prop.hasSemantic(SemanticType.StreetAddressSupplemental)) {
1247
+ const match = prop.info.name?.match(/street_address_(\d+)/);
1248
+ if (match) {
1249
+ const num = parseInt(match[1], 10);
1250
+ if (num > latest)
1251
+ latest = num;
1252
+ }
1253
+ }
1254
+ }
1255
+ const prop = entity.addProperty({
1256
+ info: { name: `street_address_${latest + 1}`, displayName: `Street Address ${latest + 1}`, ...info },
1257
+ type: 'string',
1258
+ required: false,
1259
+ });
1260
+ prop.addSemantic({ id: SemanticType.StreetAddressSupplemental });
1261
+ return prop;
1262
+ }
1240
1263
  export function addCityField(entity, info = {}) {
1241
1264
  const existing = findCityField(entity, true);
1242
1265
  if (existing)