@api-client/core 0.17.3 → 0.17.4

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.
@@ -266,6 +266,11 @@ interface BaseDataSemantic {
266
266
  * The category this semantic belongs to for UI organization.
267
267
  */
268
268
  category: SemanticCategory;
269
+ /**
270
+ * Whether the semantic has a configuration or additional options.
271
+ * This is used to determine if the semantic requires additional setup or configuration.
272
+ */
273
+ hasConfig: boolean;
269
274
  }
270
275
  /**
271
276
  * Represents a semantic that can be applied to an entire Data Entity.
@@ -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;;;;;;OAMG;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;;;;OAIG;IACH,K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C7B,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,YAAY,KAAG,QAAQ,IAAI,gBAC7B,CAAA;AAE3C;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAU,YAAY,KAAG,QAAQ,IAAI,mBAC7B,CAAA;AAE9C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG,gBAAgB,GAAG,mBAAmB,CAAA;AAElF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,YAAY,EAAE,YAAY,CAgS5D,CAAA;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAAC,gBAAgB,EAAE,YAAY,EAAE,CAAC,CAAA;AAClF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,gBAAgB,EAAE,cAAc,EAAE,CAAC,CAAA;AAC/G,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,CAAC,QAAQ,GAAG,MAAM,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,CAAC,CAAA;AACnH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,aAAa,CAAC,WAAW,GAC/B,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,EAAE,CAAC,CAAA;AA+BlD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GAAI,UAAU,gBAAgB,KAAG,YAAY,EAEnF,CAAA;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,EAAE,EAAE,YAAY,CAAA;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC"}
@@ -276,6 +276,7 @@ export const DataSemantics = {
276
276
  scope: SemanticScope.Entity,
277
277
  description: 'System users and accounts',
278
278
  category: SemanticCategory.Identity,
279
+ hasConfig: false,
279
280
  },
280
281
  [SemanticType.Password]: {
281
282
  id: SemanticType.Password,
@@ -284,6 +285,7 @@ export const DataSemantics = {
284
285
  description: 'Secure password field',
285
286
  category: SemanticCategory.Identity,
286
287
  applicableDataTypes: ['string'],
288
+ hasConfig: true,
287
289
  },
288
290
  [SemanticType.UserRole]: {
289
291
  id: SemanticType.UserRole,
@@ -292,6 +294,7 @@ export const DataSemantics = {
292
294
  description: 'User permissions and access level',
293
295
  category: SemanticCategory.Identity,
294
296
  applicableDataTypes: ['string'],
297
+ hasConfig: false,
295
298
  },
296
299
  [SemanticType.ResourceOwnerIdentifier]: {
297
300
  id: SemanticType.ResourceOwnerIdentifier,
@@ -299,6 +302,7 @@ export const DataSemantics = {
299
302
  scope: SemanticScope.Association,
300
303
  description: 'Links record to owner user',
301
304
  category: SemanticCategory.Identity,
305
+ hasConfig: false,
302
306
  },
303
307
  //
304
308
  // Timestamps & Versioning
@@ -310,6 +314,7 @@ export const DataSemantics = {
310
314
  description: 'When record was created',
311
315
  category: SemanticCategory.Lifecycle,
312
316
  applicableDataTypes: ['datetime'],
317
+ hasConfig: false,
313
318
  },
314
319
  [SemanticType.UpdatedTimestamp]: {
315
320
  id: SemanticType.UpdatedTimestamp,
@@ -318,6 +323,7 @@ export const DataSemantics = {
318
323
  description: 'When record was last modified',
319
324
  category: SemanticCategory.Lifecycle,
320
325
  applicableDataTypes: ['datetime'],
326
+ hasConfig: false,
321
327
  },
322
328
  [SemanticType.DeletedTimestamp]: {
323
329
  id: SemanticType.DeletedTimestamp,
@@ -326,6 +332,7 @@ export const DataSemantics = {
326
332
  description: 'When record was marked deleted',
327
333
  category: SemanticCategory.Lifecycle,
328
334
  applicableDataTypes: ['datetime'],
335
+ hasConfig: false,
329
336
  },
330
337
  [SemanticType.DeletedFlag]: {
331
338
  id: SemanticType.DeletedFlag,
@@ -334,6 +341,7 @@ export const DataSemantics = {
334
341
  description: 'Mark record as deleted',
335
342
  category: SemanticCategory.Lifecycle,
336
343
  applicableDataTypes: ['boolean'],
344
+ hasConfig: false,
337
345
  },
338
346
  [SemanticType.Version]: {
339
347
  id: SemanticType.Version,
@@ -342,6 +350,7 @@ export const DataSemantics = {
342
350
  description: 'Auto-incrementing version counter',
343
351
  category: SemanticCategory.Lifecycle,
344
352
  applicableDataTypes: ['number'],
353
+ hasConfig: false,
345
354
  },
346
355
  //
347
356
  // Content & Media
@@ -353,6 +362,7 @@ export const DataSemantics = {
353
362
  description: 'Main title or heading',
354
363
  category: SemanticCategory.Content,
355
364
  applicableDataTypes: ['string'],
365
+ hasConfig: false,
356
366
  },
357
367
  [SemanticType.Description]: {
358
368
  id: SemanticType.Description,
@@ -361,6 +371,7 @@ export const DataSemantics = {
361
371
  description: 'Detailed description text',
362
372
  category: SemanticCategory.Content,
363
373
  applicableDataTypes: ['string'],
374
+ hasConfig: true,
364
375
  },
365
376
  [SemanticType.Summary]: {
366
377
  id: SemanticType.Summary,
@@ -369,6 +380,7 @@ export const DataSemantics = {
369
380
  description: 'Brief summary text',
370
381
  category: SemanticCategory.Content,
371
382
  applicableDataTypes: ['string'],
383
+ hasConfig: true,
372
384
  },
373
385
  [SemanticType.Markdown]: {
374
386
  id: SemanticType.Markdown,
@@ -377,6 +389,7 @@ export const DataSemantics = {
377
389
  description: 'Formatted text content',
378
390
  category: SemanticCategory.Content,
379
391
  applicableDataTypes: ['string'],
392
+ hasConfig: true,
380
393
  },
381
394
  [SemanticType.HTML]: {
382
395
  id: SemanticType.HTML,
@@ -385,6 +398,7 @@ export const DataSemantics = {
385
398
  description: 'Rich HTML content',
386
399
  category: SemanticCategory.Content,
387
400
  applicableDataTypes: ['string'],
401
+ hasConfig: true,
388
402
  },
389
403
  [SemanticType.ImageURL]: {
390
404
  id: SemanticType.ImageURL,
@@ -393,6 +407,7 @@ export const DataSemantics = {
393
407
  description: 'Link to image file',
394
408
  category: SemanticCategory.Content,
395
409
  applicableDataTypes: ['string'],
410
+ hasConfig: false,
396
411
  },
397
412
  [SemanticType.FileURL]: {
398
413
  id: SemanticType.FileURL,
@@ -401,6 +416,7 @@ export const DataSemantics = {
401
416
  description: 'Link to file attachment',
402
417
  category: SemanticCategory.Content,
403
418
  applicableDataTypes: ['string'],
419
+ hasConfig: false,
404
420
  },
405
421
  //
406
422
  // Business Data
@@ -412,6 +428,7 @@ export const DataSemantics = {
412
428
  description: 'Current state of record',
413
429
  category: SemanticCategory.Business,
414
430
  applicableDataTypes: ['string'],
431
+ hasConfig: true,
415
432
  },
416
433
  [SemanticType.Price]: {
417
434
  id: SemanticType.Price,
@@ -420,6 +437,7 @@ export const DataSemantics = {
420
437
  description: 'Monetary value with currency',
421
438
  category: SemanticCategory.Business,
422
439
  applicableDataTypes: ['number', 'string'],
440
+ hasConfig: true,
423
441
  },
424
442
  [SemanticType.SKU]: {
425
443
  id: SemanticType.SKU,
@@ -428,6 +446,7 @@ export const DataSemantics = {
428
446
  description: 'Product identification code',
429
447
  category: SemanticCategory.Business,
430
448
  applicableDataTypes: ['string'],
449
+ hasConfig: true,
431
450
  },
432
451
  //
433
452
  // Contact Information
@@ -439,6 +458,7 @@ export const DataSemantics = {
439
458
  description: 'Email address',
440
459
  category: SemanticCategory.Contact,
441
460
  applicableDataTypes: ['string'],
461
+ hasConfig: true,
442
462
  },
443
463
  [SemanticType.Phone]: {
444
464
  id: SemanticType.Phone,
@@ -447,6 +467,7 @@ export const DataSemantics = {
447
467
  description: 'Phone number',
448
468
  category: SemanticCategory.Contact,
449
469
  applicableDataTypes: ['string'],
470
+ hasConfig: true,
450
471
  },
451
472
  [SemanticType.URL]: {
452
473
  id: SemanticType.URL,
@@ -455,6 +476,7 @@ export const DataSemantics = {
455
476
  description: 'Web address or link',
456
477
  category: SemanticCategory.Contact,
457
478
  applicableDataTypes: ['string'],
479
+ hasConfig: true,
458
480
  },
459
481
  //
460
482
  // Classification & Organization
@@ -466,6 +488,7 @@ export const DataSemantics = {
466
488
  description: 'URL-friendly unique identifier',
467
489
  category: SemanticCategory.Organization,
468
490
  applicableDataTypes: ['string'],
491
+ hasConfig: true,
469
492
  },
470
493
  [SemanticType.Tags]: {
471
494
  id: SemanticType.Tags,
@@ -473,6 +496,7 @@ export const DataSemantics = {
473
496
  scope: SemanticScope.Association,
474
497
  description: 'Enable tagging functionality',
475
498
  category: SemanticCategory.Organization,
499
+ hasConfig: true,
476
500
  },
477
501
  [SemanticType.Categories]: {
478
502
  id: SemanticType.Categories,
@@ -480,6 +504,7 @@ export const DataSemantics = {
480
504
  scope: SemanticScope.Association,
481
505
  description: 'Enable categorization functionality',
482
506
  category: SemanticCategory.Organization,
507
+ hasConfig: true,
483
508
  },
484
509
  //
485
510
  // Location & Geography
@@ -491,6 +516,7 @@ export const DataSemantics = {
491
516
  description: 'Location coordinates',
492
517
  category: SemanticCategory.Location,
493
518
  applicableDataTypes: ['string'],
519
+ hasConfig: true,
494
520
  },
495
521
  //
496
522
  // Computed Values
@@ -502,6 +528,7 @@ export const DataSemantics = {
502
528
  description: 'Auto-calculated field value',
503
529
  category: SemanticCategory.Computed,
504
530
  applicableDataTypes: ['string'],
531
+ hasConfig: true,
505
532
  },
506
533
  [SemanticType.Derived]: {
507
534
  id: SemanticType.Derived,
@@ -510,6 +537,7 @@ export const DataSemantics = {
510
537
  description: 'Value derived from other fields',
511
538
  category: SemanticCategory.Computed,
512
539
  applicableDataTypes: ['string'],
540
+ hasConfig: true,
513
541
  },
514
542
  };
515
543
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Semantics.js","sourceRoot":"","sources":["../../../src/modeling/Semantics.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,CAAN,IAAY,YAuMX;AAvMD,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;;;OAGG;IACH,8DAA8C,CAAA;IAC9C;;;OAGG;IACH,8DAA8C,CAAA;IAC9C;;;;;OAKG;IACH,8DAA8C,CAAA;IAC9C;;;;OAIG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D;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 unique 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 * A URL-friendly text field. The runtime automatically generates a unique, URL-safe string from another field (like a title or name). The user needs to specify which field is used to generate\n * the 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 * Enforces proper decimal handling to avoid floating-point errors.\n */\n Price = 'Semantic#Price',\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 //\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 * 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\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\n [SemanticType.Price]: {\n id: SemanticType.Price,\n displayName: 'Price',\n scope: SemanticScope.Property,\n description: 'Monetary value with currency',\n category: SemanticCategory.Business,\n applicableDataTypes: ['number', 'string'],\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 },\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 },\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 },\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 },\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 },\n [SemanticType.Tags]: {\n id: SemanticType.Tags,\n displayName: 'Tags',\n scope: SemanticScope.Association,\n description: 'Enable tagging functionality',\n category: SemanticCategory.Organization,\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 },\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 },\n\n //\n // Computed Values\n //\n\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'],\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 },\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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C1C,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 unique 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 * A URL-friendly text field. The runtime automatically generates a unique, URL-safe string from another field (like a title or name). The user needs to specify which field is used to generate\n * the 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 * Enforces proper decimal handling to avoid floating-point errors.\n */\n Price = 'Semantic#Price',\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 //\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 * 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\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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: true,\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: true,\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 },\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 },\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 },\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 },\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 },\n [SemanticType.Price]: {\n id: SemanticType.Price,\n displayName: 'Price',\n scope: SemanticScope.Property,\n description: 'Monetary value with currency',\n category: SemanticCategory.Business,\n applicableDataTypes: ['number', 'string'],\n hasConfig: true,\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 },\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 },\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 },\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 },\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 },\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 },\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 },\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 },\n\n //\n // Computed Values\n //\n\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'],\n hasConfig: true,\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 },\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"]}