@api-client/core 0.18.26 → 0.18.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/modeling/Semantics.d.ts +7 -0
- package/build/src/modeling/Semantics.d.ts.map +1 -1
- package/build/src/modeling/Semantics.js +23 -0
- package/build/src/modeling/Semantics.js.map +1 -1
- package/build/src/modeling/templates/meta/blog-publishing-platform.json +1 -1
- package/build/src/modeling/templates/meta/financial-services-platform.json +1 -1
- package/build/src/modeling/templates/meta/index.d.ts +1 -1
- package/build/src/modeling/templates/meta/index.js +1 -1
- package/build/src/modeling/templates/meta/index.js.map +1 -1
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.d.ts.map +1 -1
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js +1 -0
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js.map +1 -1
- package/build/src/modeling/templates/verticals/technology-media/blog-domain.d.ts.map +1 -1
- package/build/src/modeling/templates/verticals/technology-media/blog-domain.js +12 -4
- package/build/src/modeling/templates/verticals/technology-media/blog-domain.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/data/models/example-generator-api.json +6 -6
- package/package.json +1 -1
- package/src/modeling/Semantics.ts +23 -0
- package/src/modeling/templates/meta/blog-publishing-platform.json +1 -1
- package/src/modeling/templates/meta/financial-services-platform.json +1 -1
- package/src/modeling/templates/verticals/business-services/financial-services-domain.ts +1 -0
- package/src/modeling/templates/verticals/technology-media/blog-domain.ts +12 -4
- package/tests/unit/modeling/username_semantic.spec.ts +81 -0
|
@@ -14,6 +14,13 @@ export declare enum SemanticType {
|
|
|
14
14
|
* ensuring it is encrypted and not exposed in API responses.
|
|
15
15
|
*/
|
|
16
16
|
Password = "Semantic#Password",
|
|
17
|
+
/**
|
|
18
|
+
* Annotates the field as the username for user authentication.
|
|
19
|
+
* This identifies which field should be used for login purposes.
|
|
20
|
+
* Can be applied to dedicated username fields or email fields that serve as usernames.
|
|
21
|
+
* The runtime uses this for authentication, password reset, and user lookup operations.
|
|
22
|
+
*/
|
|
23
|
+
Username = "Semantic#Username",
|
|
17
24
|
/**
|
|
18
25
|
* Designates a Data Property as the `createdAt` timestamp of an entity.
|
|
19
26
|
* This is used to track when the entity was first created.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Semantics.d.ts","sourceRoot":"","sources":["../../../src/modeling/Semantics.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD;;;GAGG;AACH,oBAAY,YAAY;IAKtB;;OAEG;IACH,IAAI,kBAAkB;IAMtB;;;;OAIG;IACH,QAAQ,sBAAsB;IAC9B;;;OAGG;IACH,gBAAgB,8BAA8B;IAC9C;;;OAGG;IACH,gBAAgB,8BAA8B;IAC9C;;;;;OAKG;IACH,gBAAgB,8BAA8B;IAC9C;;;;OAIG;IACH,WAAW,yBAAyB;IACpC;;;;;;;OAOG;IACH,gBAAgB,8BAA8B;IAC9C;;;;OAIG;IACH,KAAK,mBAAmB;IACxB;;;;;;OAMG;IACH,QAAQ,sBAAsB;IAC9B;;;;;;;;;OASG;IACH,MAAM,oBAAoB;IAE1B;;;;OAIG;IACH,OAAO,qBAAqB;IAE5B;;;OAGG;IACH,QAAQ,sBAAsB;IAE9B;;;OAGG;IACH,OAAO,qBAAqB;IAE5B;;;;;;OAMG;IACH,QAAQ,sBAAsB;IAE9B;;;;;;OAMG;IACH,IAAI,kBAAkB;IAEtB;;;;;;;;;;;;;;;OAeG;IACH,qBAAqB,mCAAmC;IAExD;;OAEG;IACH,KAAK,mBAAmB;IACxB;;OAEG;IACH,KAAK,mBAAmB;IACxB;;;;;;;OAOG;IACH,QAAQ,sBAAsB;IAC9B;;OAEG;IACH,GAAG,iBAAiB;IACpB;;;;OAIG;IACH,GAAG,iBAAiB;IACpB;;OAEG;IACH,WAAW,yBAAyB;IACpC;;OAEG;IACH,OAAO,qBAAqB;IAC5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
SemanticType["Password"] = "Semantic#Password";
|
|
23
|
+
/**
|
|
24
|
+
* Annotates the field as the username for user authentication.
|
|
25
|
+
* This identifies which field should be used for login purposes.
|
|
26
|
+
* Can be applied to dedicated username fields or email fields that serve as usernames.
|
|
27
|
+
* The runtime uses this for authentication, password reset, and user lookup operations.
|
|
28
|
+
*/
|
|
29
|
+
SemanticType["Username"] = "Semantic#Username";
|
|
23
30
|
/**
|
|
24
31
|
* Designates a Data Property as the `createdAt` timestamp of an entity.
|
|
25
32
|
* This is used to track when the entity was first created.
|
|
@@ -408,6 +415,22 @@ export const DataSemantics = {
|
|
|
408
415
|
],
|
|
409
416
|
},
|
|
410
417
|
},
|
|
418
|
+
[SemanticType.Username]: {
|
|
419
|
+
id: SemanticType.Username,
|
|
420
|
+
displayName: 'Username',
|
|
421
|
+
scope: SemanticScope.Property,
|
|
422
|
+
description: 'User authentication identifier',
|
|
423
|
+
category: SemanticCategory.Identity,
|
|
424
|
+
applicableDataTypes: ['string'],
|
|
425
|
+
hasConfig: false,
|
|
426
|
+
runtime: {
|
|
427
|
+
timing: SemanticTiming.Before,
|
|
428
|
+
operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Read],
|
|
429
|
+
priority: 15, // High priority for authentication
|
|
430
|
+
canDisable: false, // Security semantics cannot be disabled
|
|
431
|
+
timeoutMs: 100, // Fast operation
|
|
432
|
+
},
|
|
433
|
+
},
|
|
411
434
|
[SemanticType.UserRole]: {
|
|
412
435
|
id: SemanticType.UserRole,
|
|
413
436
|
displayName: 'User Role Field',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Semantics.js","sourceRoot":"","sources":["../../../src/modeling/Semantics.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,CAAN,IAAY,YAiNX;AAjND,WAAY,YAAY;IACtB,EAAE;IACF,yBAAyB;IACzB,EAAE;IAEF;;OAEG;IACH,sCAAsB,CAAA;IAEtB,EAAE;IACF,2BAA2B;IAC3B,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B,CAAC,SAAS,CAAC,EAAE,EAAE;QAChC,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,EAAE;QAC9B,CAAC,gBAAgB,CAAC,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 //\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 * 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 * 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 * The runtime automatically populates this field with the request's IP address\n * when creating or updating records, providing audit trail and geolocation capabilities.\n */\n ClientIPAddress = 'Semantic#ClientIPAddress',\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 * Contact information and communication\n */\n Contact = 'Contact Information',\n /**\n * Organization, categorization, and tagging\n */\n Organization = 'Classification & Organization',\n /**\n * Location and geographical data\n */\n Location = 'Location & Geography',\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/query operations\n */\n List = 'List',\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.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 [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.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,YAwNX;AAxND,WAAY,YAAY;IACtB,EAAE;IACF,yBAAyB;IACzB,EAAE;IAEF;;OAEG;IACH,sCAAsB,CAAA;IAEtB,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;;;;;;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;;;;;;OAMG;IACH,8CAA8B,CAAA;IAE9B;;;;;;OAMG;IACH,sCAAsB,CAAA;IAEtB;;;;;;;;;;;;;;;OA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/B,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,EAAE;QAChC,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,EAAE;QAC9B,CAAC,gBAAgB,CAAC,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 //\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 * 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 * The runtime automatically populates this field with the request's IP address\n * when creating or updating records, providing audit trail and geolocation capabilities.\n */\n ClientIPAddress = 'Semantic#ClientIPAddress',\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 * Contact information and communication\n */\n Contact = 'Contact Information',\n /**\n * Organization, categorization, and tagging\n */\n Organization = 'Classification & Organization',\n /**\n * Location and geographical data\n */\n Location = 'Location & Geography',\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/query operations\n */\n List = 'List',\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 [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.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 +1 @@
|
|
|
1
|
-
{ "id": "blog-publishing-platform", "name": "Blog Publishing Platform", "description": "A comprehensive content management and publishing platform for blogs, magazines, and digital publications. Includes content management, user roles, publishing workflow, and social features.", "createdAt": "2025-07-27T21:14:57.328Z", "updatedAt": "2025-07-27T21:14:57.328Z", "version": "1.0.0", "author": "API Now! Core Team", "tags": ["blog", "cms", "publishing", "content", "media", "editorial"], "structure": { "domain": { "name": "Blog Publishing Platform", "description": "A comprehensive content management and publishing platform for blogs, magazines, and digital publications", "totalEntities": 8, "totalProperties": 69, "totalAssociations": 14 }, "namespaces": [{ "name": "ContentManagement", "displayName": "Content Management", "description": "Core content creation, editing, and organization features", "modelCount": 2, "entityCount": 4, "models": [{ "name": "Publications", "displayName": "Publications Management", "description": "Individual blogs, magazines, or publications within the platform", "entityCount": 1, "entities": [{ "name": "publication", "displayName": "Publication", "description": "Individual blog or publication site", "propertyCount": 8, "associationCount": 0, "properties": [{ "name": "id", "displayName": "Publication ID", "description": "Unique identifier for the publication", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "name", "displayName": "Publication Name", "description": "Display name of the publication", "type": "string", "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the publication", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "description", "displayName": "Description", "description": "Publication description and tagline", "type": "string", "semantics": ["Semantic#Description"] }, { "name": "domain", "displayName": "Custom Domain", "description": "Custom domain name for the publication", "type": "string", "semantics": [] }, { "name": "logo_url", "displayName": "Logo URL", "description": "URL to publication logo image", "type": "string", "semantics": ["Semantic#ImageURL"] }, { "name": "status", "displayName": "Publication Status", "description": "Current status of the publication", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["active", "suspended", "archived"], "defaultValue": "active" }, { "name": "created_at", "displayName": "Created At", "description": "When the publication was created", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [], "semantics": [] }] }, { "name": "Content", "displayName": "Content Management", "description": "Posts, pages, and other content types", "entityCount": 3, "entities": [{ "name": "category", "displayName": "Content Category", "description": "Content categorization for organization and navigation", "propertyCount": 5, "associationCount": 2, "properties": [{ "name": "id", "displayName": "Category ID", "description": "Unique identifier for the category", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "name", "displayName": "Category Name", "description": "Display name of the category", "type": "string", "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the category", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "description", "displayName": "Description", "description": "Category description", "type": "string", "semantics": ["Semantic#Description"] }, { "name": "color", "displayName": "Color", "description": "Theme color for the category", "type": "string", "semantics": [] }], "associations": [{ "name": "publication", "displayName": "Publication", "description": "Publication this category belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }, { "name": "parentCategory", "displayName": "Parent Category", "description": "Parent category for hierarchical organization", "required": false, "multiple": false, "targetEntities": ["category"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }, { "name": "Tag", "displayName": "Content Tag", "description": "Tags for flexible content labeling and discovery", "propertyCount": 3, "associationCount": 1, "properties": [{ "name": "id", "displayName": "Tag ID", "description": "Unique identifier for the tag", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "name", "displayName": "Tag Name", "description": "Display name of the tag", "type": "string", "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the tag", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }], "associations": [{ "name": "publication", "displayName": "Publication", "description": "Publication this tag belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }, { "name": "Post", "displayName": "Blog Post", "description": "Individual blog posts and articles", "propertyCount": 16, "associationCount": 4, "properties": [{ "name": "id", "displayName": "Post ID", "description": "Unique identifier for the post", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "title", "displayName": "Post Title", "description": "Title of the blog post", "type": "string", "required": true, "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the post", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "excerpt", "displayName": "Excerpt", "description": "Brief summary or excerpt of the post", "type": "string", "semantics": ["Semantic#Summary"] }, { "name": "content", "displayName": "Content", "description": "Full content of the post in HTML or Markdown", "type": "string", "required": true, "semantics": ["Semantic#HTML"] }, { "name": "content_format", "displayName": "Content Format", "description": "Format of the content (HTML, Markdown, etc.)", "type": "string", "required": true, "semantics": [], "enumValues": ["html", "markdown", "richtext"], "defaultValue": "markdown" }, { "name": "featured_image_url", "displayName": "Featured Image URL", "description": "URL to featured image", "type": "string", "semantics": ["Semantic#ImageURL"] }, { "name": "status", "displayName": "Post Status", "description": "Current publishing status of the post", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["draft", "pending_review", "scheduled", "published", "archived"], "defaultValue": "draft" }, { "name": "published_at", "displayName": "Published At", "description": "When the post was published", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }, { "name": "scheduled_at", "displayName": "Scheduled At", "description": "When the post is scheduled to be published", "type": "datetime", "semantics": [] }, { "name": "view_count", "displayName": "View Count", "description": "Number of times the post has been viewed", "type": "number", "required": true, "semantics": [] }, { "name": "reading_time", "displayName": "Reading Time", "description": "Estimated reading time in minutes", "type": "number", "readOnly": true, "semantics": ["Semantic#Calculated"] }, { "name": "word_count", "displayName": "Word Count", "description": "Number of words in the post content", "type": "number", "readOnly": true, "semantics": ["Semantic#Calculated"] }, { "name": "meta_title", "displayName": "Meta Title", "description": "SEO meta title", "type": "string", "semantics": [] }, { "name": "meta_description", "displayName": "Meta Description", "description": "SEO meta description", "type": "string", "semantics": [] }, { "name": "updated_at", "displayName": "Updated At", "description": "When the post was last updated", "type": "datetime", "readOnly": true, "semantics": ["Semantic#UpdatedTimestamp"] }], "associations": [{ "name": "publication", "displayName": "Publication", "description": "Publication this post belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }, { "name": "categories", "displayName": "Post Categories", "description": "Categories this post belongs to", "required": false, "multiple": true, "targetEntities": ["category"], "semantics": ["Semantic#Categories"], "cardinality": "One-to-Many" }, { "name": "tags", "displayName": "Post Tags", "description": "Tags associated with this post", "required": false, "multiple": true, "targetEntities": ["Tag"], "semantics": ["Semantic#Tags"], "cardinality": "One-to-Many" }, { "name": "author", "displayName": "Post Author", "description": "Author who wrote this post", "required": true, "multiple": false, "targetEntities": ["user"], "semantics": ["Semantic#ResourceOwnerIdentifier"], "cardinality": "One-to-One" }], "semantics": [] }] }] }, { "name": "UserManagement", "displayName": "User Management", "description": "Authors, editors, subscribers, and user roles management", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Users", "displayName": "User Management", "description": "User accounts and authentication", "entityCount": 1, "entities": [{ "name": "user", "displayName": "User Account", "description": "User account for authors, editors, and subscribers", "propertyCount": 13, "associationCount": 0, "properties": [{ "name": "id", "displayName": "User ID", "description": "Unique identifier for the user", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "email", "displayName": "Email Address", "description": "User email address for login and communication", "type": "string", "required": true, "semantics": ["Semantic#Email"] }, { "name": "password", "displayName": "Password", "description": "Encrypted password for authentication", "type": "string", "required": true, "semantics": ["Semantic#Password"] }, { "name": "username", "displayName": "Username", "description": "Unique username for the user", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "display_name", "displayName": "Display Name", "description": "Public display name for the user", "type": "string", "required": true, "semantics": [] }, { "name": "first_name", "displayName": "First Name", "description": "User first name", "type": "string", "semantics": [] }, { "name": "last_name", "displayName": "Last Name", "description": "User last name", "type": "string", "semantics": [] }, { "name": "bio", "displayName": "Biography", "description": "User biography and description", "type": "string", "semantics": ["Semantic#Description"] }, { "name": "avatar_url", "displayName": "Avatar URL", "description": "URL to user profile picture", "type": "string", "semantics": ["Semantic#ImageURL"] }, { "name": "website", "displayName": "Website", "description": "User personal website URL", "type": "string", "semantics": ["Semantic#URL"] }, { "name": "role", "displayName": "User Role", "description": "User role for permission management", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["subscriber", "author", "editor", "admin", "super_admin"], "defaultValue": "subscriber" }, { "name": "emailVerified", "displayName": "Email Verified", "description": "Whether the user has verified their email", "type": "boolean", "required": true, "semantics": [], "defaultValue": "false" }, { "name": "created_at", "displayName": "Created At", "description": "When the user account was created", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [], "semantics": ["Semantic#User"] }] }] }, { "name": "SocialFeatures", "displayName": "Social Features", "description": "Comments, likes, shares, and social interactions", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Comments", "displayName": "Comment System", "description": "Post comments and replies", "entityCount": 1, "entities": [{ "name": "comment", "displayName": "Comment", "description": "User comments on posts", "propertyCount": 7, "associationCount": 3, "properties": [{ "name": "id", "displayName": "Comment ID", "description": "Unique identifier for the comment", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "content", "displayName": "Comment Content", "description": "Content of the comment", "type": "string", "required": true, "semantics": [] }, { "name": "author_name", "displayName": "Author Name", "description": "Name of the comment author (for guest comments)", "type": "string", "semantics": [] }, { "name": "author_email", "displayName": "Author Email", "description": "Email of the comment author (for guest comments)", "type": "string", "required": true, "semantics": ["Semantic#Email"] }, { "name": "status", "displayName": "Comment Status", "description": "Moderation status of the comment", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["pending", "approved", "rejected", "spam"], "defaultValue": "pending" }, { "name": "user_agent", "displayName": "User Agent", "description": "Browser user agent string", "type": "string", "semantics": [] }, { "name": "created_at", "displayName": "Created At", "description": "When the comment was created", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [{ "name": "post", "displayName": "Post", "description": "Post this comment belongs to", "required": true, "multiple": false, "targetEntities": ["Post"], "semantics": [], "cardinality": "One-to-One" }, { "name": "author", "displayName": "Comment Author", "description": "Registered user who wrote this comment", "required": false, "multiple": false, "targetEntities": ["user"], "semantics": ["Semantic#ResourceOwnerIdentifier"], "cardinality": "One-to-One" }, { "name": "parent_comment", "displayName": "Parent Comment", "description": "Parent comment for replies", "required": false, "multiple": false, "targetEntities": ["comment"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }] }] }, { "name": "Analytics", "displayName": "Analytics & Tracking", "description": "Analytics, metrics, and performance tracking", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Analytics", "displayName": "Content Analytics", "description": "Content performance and user engagement metrics", "entityCount": 1, "entities": [{ "name": "page_view", "displayName": "Page View", "description": "Individual page view tracking record", "propertyCount": 7, "associationCount": 2, "properties": [{ "name": "id", "displayName": "Page View ID", "description": "Unique identifier for the page view", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "path", "displayName": "Page Path", "description": "URL path of the viewed page", "type": "string", "required": true, "semantics": [] }, { "name": "referrer", "displayName": "Referrer", "description": "Referring URL", "type": "string", "semantics": ["Semantic#URL"] }, { "name": "ip_address", "displayName": "IP Address", "description": "Visitor IP address", "type": "string", "semantics": ["Semantic#ClientIPAddress"] }, { "name": "user_agent", "displayName": "User Agent", "description": "Browser user agent string", "type": "string", "semantics": [] }, { "name": "session_id", "displayName": "Session ID", "description": "Visitor session identifier", "type": "string", "semantics": [] }, { "name": "viewed_at", "displayName": "Viewed At", "description": "When the page was viewed", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [{ "name": "post", "displayName": "Viewed Post", "description": "Post that was viewed (if applicable)", "required": false, "multiple": false, "targetEntities": ["Post"], "semantics": [], "cardinality": "One-to-One" }, { "name": "publication", "displayName": "Publication", "description": "Publication this page view belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }] }] }, { "name": "MediaManagement", "displayName": "Media Management", "description": "Image, video, and file upload management", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Media", "displayName": "Media Library", "description": "Uploaded files, images, and media assets", "entityCount": 1, "entities": [{ "name": "media_file", "displayName": "Media File", "description": "Uploaded media files (images, videos, documents)", "propertyCount": 10, "associationCount": 2, "properties": [{ "name": "id", "displayName": "Media File ID", "description": "Unique identifier for the media file", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "filename", "displayName": "File Name", "description": "Original filename of the uploaded file", "type": "string", "required": true, "semantics": [] }, { "name": "storage_key", "displayName": "Storage Key", "description": "Unique storage key for the file", "type": "string", "required": true, "unique": true, "semantics": [] }, { "name": "url", "displayName": "File URL", "description": "Public URL to access the file", "type": "string", "required": true, "semantics": ["Semantic#URL"] }, { "name": "mime_type", "displayName": "MIME Type", "description": "MIME type of the file", "type": "string", "required": true, "semantics": [] }, { "name": "file_size", "displayName": "File Size", "description": "File size in bytes", "type": "number", "required": true, "semantics": [] }, { "name": "width", "displayName": "Image Width", "description": "Width in pixels (for images)", "type": "number", "required": true, "semantics": [] }, { "name": "height", "displayName": "Image Height", "description": "Height in pixels (for images)", "type": "number", "required": true, "semantics": [] }, { "name": "alt_text", "displayName": "Alt Text", "description": "Alternative text for accessibility", "type": "string", "semantics": [] }, { "name": "uploaded_at", "displayName": "Uploaded At", "description": "When the file was uploaded", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [{ "name": "uploader", "displayName": "File Uploader", "description": "User who uploaded this file", "required": true, "multiple": false, "targetEntities": ["user"], "semantics": ["Semantic#ResourceOwnerIdentifier"], "cardinality": "One-to-One" }, { "name": "publication", "displayName": "Publication", "description": "Publication this media file belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }] }] }] } }
|
|
1
|
+
{ "id": "blog-publishing-platform", "name": "Blog Publishing Platform", "description": "A comprehensive content management and publishing platform for blogs, magazines, and digital publications. Includes content management, user roles, publishing workflow, and social features.", "createdAt": "2025-07-27T21:14:57.328Z", "updatedAt": "2025-07-27T21:14:57.328Z", "version": "1.0.0", "author": "API Now! Core Team", "tags": ["blog", "cms", "publishing", "content", "media", "editorial"], "structure": { "domain": { "name": "Blog Publishing Platform", "description": "A comprehensive content management and publishing platform for blogs, magazines, and digital publications", "totalEntities": 8, "totalProperties": 70, "totalAssociations": 14 }, "namespaces": [{ "name": "ContentManagement", "displayName": "Content Management", "description": "Core content creation, editing, and organization features", "modelCount": 2, "entityCount": 4, "models": [{ "name": "Publications", "displayName": "Publications Management", "description": "Individual blogs, magazines, or publications within the platform", "entityCount": 1, "entities": [{ "name": "publication", "displayName": "Publication", "description": "Individual blog or publication site", "propertyCount": 8, "associationCount": 0, "properties": [{ "name": "id", "displayName": "Publication ID", "description": "Unique identifier for the publication", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "name", "displayName": "Publication Name", "description": "Display name of the publication", "type": "string", "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the publication", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "description", "displayName": "Description", "description": "Publication description and tagline", "type": "string", "semantics": ["Semantic#Description"] }, { "name": "domain", "displayName": "Custom Domain", "description": "Custom domain name for the publication", "type": "string", "semantics": [] }, { "name": "logo_url", "displayName": "Logo URL", "description": "URL to publication logo image", "type": "string", "semantics": ["Semantic#ImageURL"] }, { "name": "status", "displayName": "Publication Status", "description": "Current status of the publication", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["active", "suspended", "archived"], "defaultValue": "active" }, { "name": "created_at", "displayName": "Created At", "description": "When the publication was created", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [], "semantics": [] }] }, { "name": "Content", "displayName": "Content Management", "description": "Posts, pages, and other content types", "entityCount": 3, "entities": [{ "name": "category", "displayName": "Content Category", "description": "Content categorization for organization and navigation", "propertyCount": 5, "associationCount": 2, "properties": [{ "name": "id", "displayName": "Category ID", "description": "Unique identifier for the category", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "name", "displayName": "Category Name", "description": "Display name of the category", "type": "string", "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the category", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "description", "displayName": "Description", "description": "Category description", "type": "string", "semantics": ["Semantic#Description"] }, { "name": "color", "displayName": "Color", "description": "Theme color for the category", "type": "string", "semantics": [] }], "associations": [{ "name": "publication", "displayName": "Publication", "description": "Publication this category belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }, { "name": "parentCategory", "displayName": "Parent Category", "description": "Parent category for hierarchical organization", "required": false, "multiple": false, "targetEntities": ["category"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }, { "name": "Tag", "displayName": "Content Tag", "description": "Tags for flexible content labeling and discovery", "propertyCount": 3, "associationCount": 1, "properties": [{ "name": "id", "displayName": "Tag ID", "description": "Unique identifier for the tag", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "name", "displayName": "Tag Name", "description": "Display name of the tag", "type": "string", "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the tag", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }], "associations": [{ "name": "publication", "displayName": "Publication", "description": "Publication this tag belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }, { "name": "Post", "displayName": "Blog Post", "description": "Individual blog posts and articles", "propertyCount": 16, "associationCount": 4, "properties": [{ "name": "id", "displayName": "Post ID", "description": "Unique identifier for the post", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "title", "displayName": "Post Title", "description": "Title of the blog post", "type": "string", "required": true, "semantics": ["Semantic#Title"] }, { "name": "slug", "displayName": "URL Slug", "description": "URL-friendly identifier for the post", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "excerpt", "displayName": "Excerpt", "description": "Brief summary or excerpt of the post", "type": "string", "semantics": ["Semantic#Summary"] }, { "name": "content", "displayName": "Content", "description": "Full content of the post in HTML or Markdown", "type": "string", "required": true, "semantics": ["Semantic#HTML"] }, { "name": "content_format", "displayName": "Content Format", "description": "Format of the content (HTML, Markdown, etc.)", "type": "string", "required": true, "semantics": [], "enumValues": ["html", "markdown", "richtext"], "defaultValue": "markdown" }, { "name": "featured_image_url", "displayName": "Featured Image URL", "description": "URL to featured image", "type": "string", "semantics": ["Semantic#ImageURL"] }, { "name": "status", "displayName": "Post Status", "description": "Current publishing status of the post", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["draft", "pending_review", "scheduled", "published", "archived"], "defaultValue": "draft" }, { "name": "published_at", "displayName": "Published At", "description": "When the post was published", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }, { "name": "scheduled_at", "displayName": "Scheduled At", "description": "When the post is scheduled to be published", "type": "datetime", "semantics": [] }, { "name": "view_count", "displayName": "View Count", "description": "Number of times the post has been viewed", "type": "number", "required": true, "semantics": [] }, { "name": "reading_time", "displayName": "Reading Time", "description": "Estimated reading time in minutes", "type": "number", "readOnly": true, "semantics": ["Semantic#Calculated"] }, { "name": "word_count", "displayName": "Word Count", "description": "Number of words in the post content", "type": "number", "readOnly": true, "semantics": ["Semantic#Calculated"] }, { "name": "meta_title", "displayName": "Meta Title", "description": "SEO meta title", "type": "string", "semantics": [] }, { "name": "meta_description", "displayName": "Meta Description", "description": "SEO meta description", "type": "string", "semantics": [] }, { "name": "updated_at", "displayName": "Updated At", "description": "When the post was last updated", "type": "datetime", "readOnly": true, "semantics": ["Semantic#UpdatedTimestamp"] }], "associations": [{ "name": "publication", "displayName": "Publication", "description": "Publication this post belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }, { "name": "categories", "displayName": "Post Categories", "description": "Categories this post belongs to", "required": false, "multiple": true, "targetEntities": ["category"], "semantics": ["Semantic#Categories"], "cardinality": "One-to-Many" }, { "name": "tags", "displayName": "Post Tags", "description": "Tags associated with this post", "required": false, "multiple": true, "targetEntities": ["Tag"], "semantics": ["Semantic#Tags"], "cardinality": "One-to-Many" }, { "name": "author", "displayName": "Post Author", "description": "Author who wrote this post", "required": true, "multiple": false, "targetEntities": ["user"], "semantics": ["Semantic#ResourceOwnerIdentifier"], "cardinality": "One-to-One" }], "semantics": [] }] }] }, { "name": "UserManagement", "displayName": "User Management", "description": "Authors, editors, subscribers, and user roles management", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Users", "displayName": "User Management", "description": "User accounts and authentication", "entityCount": 1, "entities": [{ "name": "user", "displayName": "User Account", "description": "User account for authors, editors, and subscribers", "propertyCount": 14, "associationCount": 0, "properties": [{ "name": "id", "displayName": "User ID", "description": "Unique identifier for the user", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "email", "displayName": "Email Address", "description": "User email address for login and communication", "type": "string", "required": true, "semantics": ["Semantic#Email"] }, { "name": "password", "displayName": "Password", "description": "Encrypted password for authentication", "type": "string", "required": true, "semantics": ["Semantic#Password"] }, { "name": "username", "displayName": "Username", "description": "Unique username for the user", "type": "string", "required": true, "unique": true, "semantics": ["Semantic#PublicUniqueName"] }, { "name": "display_name", "displayName": "Display Name", "description": "Public display name for the user", "type": "string", "required": true, "semantics": [] }, { "name": "first_name", "displayName": "First Name", "description": "User first name", "type": "string", "semantics": [] }, { "name": "last_name", "displayName": "Last Name", "description": "User last name", "type": "string", "semantics": [] }, { "name": "bio", "displayName": "Biography", "description": "User biography and description", "type": "string", "semantics": ["Semantic#Description"] }, { "name": "avatar_url", "displayName": "Avatar URL", "description": "URL to user profile picture", "type": "string", "semantics": ["Semantic#ImageURL"] }, { "name": "website", "displayName": "Website", "description": "User personal website URL", "type": "string", "semantics": ["Semantic#URL"] }, { "name": "role", "displayName": "User Role", "description": "User role for permission management", "type": "string", "required": true, "semantics": ["Semantic#UserRole"], "enumValues": ["subscriber", "author", "editor", "admin", "super_admin"], "defaultValue": "subscriber" }, { "name": "status", "displayName": "User Status", "description": "Current status of the user account", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["active", "inactive", "suspended", "pending_verification"], "defaultValue": "active" }, { "name": "emailVerified", "displayName": "Email Verified", "description": "Whether the user has verified their email", "type": "boolean", "required": true, "semantics": [], "defaultValue": "false" }, { "name": "created_at", "displayName": "Created At", "description": "When the user account was created", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [], "semantics": ["Semantic#User"] }] }] }, { "name": "SocialFeatures", "displayName": "Social Features", "description": "Comments, likes, shares, and social interactions", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Comments", "displayName": "Comment System", "description": "Post comments and replies", "entityCount": 1, "entities": [{ "name": "comment", "displayName": "Comment", "description": "User comments on posts", "propertyCount": 7, "associationCount": 3, "properties": [{ "name": "id", "displayName": "Comment ID", "description": "Unique identifier for the comment", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "content", "displayName": "Comment Content", "description": "Content of the comment", "type": "string", "required": true, "semantics": [] }, { "name": "author_name", "displayName": "Author Name", "description": "Name of the comment author (for guest comments)", "type": "string", "semantics": [] }, { "name": "author_email", "displayName": "Author Email", "description": "Email of the comment author (for guest comments)", "type": "string", "required": true, "semantics": ["Semantic#Email"] }, { "name": "status", "displayName": "Comment Status", "description": "Moderation status of the comment", "type": "string", "required": true, "semantics": ["Semantic#Status"], "enumValues": ["pending", "approved", "rejected", "spam"], "defaultValue": "pending" }, { "name": "user_agent", "displayName": "User Agent", "description": "Browser user agent string", "type": "string", "semantics": [] }, { "name": "created_at", "displayName": "Created At", "description": "When the comment was created", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [{ "name": "post", "displayName": "Post", "description": "Post this comment belongs to", "required": true, "multiple": false, "targetEntities": ["Post"], "semantics": [], "cardinality": "One-to-One" }, { "name": "author", "displayName": "Comment Author", "description": "Registered user who wrote this comment", "required": false, "multiple": false, "targetEntities": ["user"], "semantics": ["Semantic#ResourceOwnerIdentifier"], "cardinality": "One-to-One" }, { "name": "parent_comment", "displayName": "Parent Comment", "description": "Parent comment for replies", "required": false, "multiple": false, "targetEntities": ["comment"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }] }] }, { "name": "Analytics", "displayName": "Analytics & Tracking", "description": "Analytics, metrics, and performance tracking", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Analytics", "displayName": "Content Analytics", "description": "Content performance and user engagement metrics", "entityCount": 1, "entities": [{ "name": "page_view", "displayName": "Page View", "description": "Individual page view tracking record", "propertyCount": 7, "associationCount": 2, "properties": [{ "name": "id", "displayName": "Page View ID", "description": "Unique identifier for the page view", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "path", "displayName": "Page Path", "description": "URL path of the viewed page", "type": "string", "required": true, "semantics": [] }, { "name": "referrer", "displayName": "Referrer", "description": "Referring URL", "type": "string", "semantics": ["Semantic#URL"] }, { "name": "ip_address", "displayName": "IP Address", "description": "Visitor IP address", "type": "string", "semantics": ["Semantic#ClientIPAddress"] }, { "name": "user_agent", "displayName": "User Agent", "description": "Browser user agent string", "type": "string", "semantics": [] }, { "name": "session_id", "displayName": "Session ID", "description": "Visitor session identifier", "type": "string", "semantics": [] }, { "name": "viewed_at", "displayName": "Viewed At", "description": "When the page was viewed", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [{ "name": "post", "displayName": "Viewed Post", "description": "Post that was viewed (if applicable)", "required": false, "multiple": false, "targetEntities": ["Post"], "semantics": [], "cardinality": "One-to-One" }, { "name": "publication", "displayName": "Publication", "description": "Publication this page view belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }] }] }, { "name": "MediaManagement", "displayName": "Media Management", "description": "Image, video, and file upload management", "modelCount": 1, "entityCount": 1, "models": [{ "name": "Media", "displayName": "Media Library", "description": "Uploaded files, images, and media assets", "entityCount": 1, "entities": [{ "name": "media_file", "displayName": "Media File", "description": "Uploaded media files (images, videos, documents)", "propertyCount": 10, "associationCount": 2, "properties": [{ "name": "id", "displayName": "Media File ID", "description": "Unique identifier for the media file", "type": "string", "primary": true, "readOnly": true, "semantics": [] }, { "name": "filename", "displayName": "File Name", "description": "Original filename of the uploaded file", "type": "string", "required": true, "semantics": [] }, { "name": "storage_key", "displayName": "Storage Key", "description": "Unique storage key for the file", "type": "string", "required": true, "unique": true, "semantics": [] }, { "name": "url", "displayName": "File URL", "description": "Public URL to access the file", "type": "string", "required": true, "semantics": ["Semantic#URL"] }, { "name": "mime_type", "displayName": "MIME Type", "description": "MIME type of the file", "type": "string", "required": true, "semantics": [] }, { "name": "file_size", "displayName": "File Size", "description": "File size in bytes", "type": "number", "required": true, "semantics": [] }, { "name": "width", "displayName": "Image Width", "description": "Width in pixels (for images)", "type": "number", "required": true, "semantics": [] }, { "name": "height", "displayName": "Image Height", "description": "Height in pixels (for images)", "type": "number", "required": true, "semantics": [] }, { "name": "alt_text", "displayName": "Alt Text", "description": "Alternative text for accessibility", "type": "string", "semantics": [] }, { "name": "uploaded_at", "displayName": "Uploaded At", "description": "When the file was uploaded", "type": "datetime", "readOnly": true, "semantics": ["Semantic#CreatedTimestamp"] }], "associations": [{ "name": "uploader", "displayName": "File Uploader", "description": "User who uploaded this file", "required": true, "multiple": false, "targetEntities": ["user"], "semantics": ["Semantic#ResourceOwnerIdentifier"], "cardinality": "One-to-One" }, { "name": "publication", "displayName": "Publication", "description": "Publication this media file belongs to", "required": true, "multiple": false, "targetEntities": ["publication"], "semantics": [], "cardinality": "One-to-One" }], "semantics": [] }] }] }] } }
|