@api-client/core 0.17.5 → 0.17.6
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 +8 -4
- package/build/src/modeling/Semantics.d.ts.map +1 -1
- package/build/src/modeling/Semantics.js +8 -4
- package/build/src/modeling/Semantics.js.map +1 -1
- package/build/src/modeling/definitions/Email.d.ts +2 -2
- package/build/src/modeling/definitions/Email.d.ts.map +1 -1
- package/build/src/modeling/definitions/Email.js.map +1 -1
- package/build/src/modeling/definitions/GeospatialCoordinates.d.ts +46 -1
- package/build/src/modeling/definitions/GeospatialCoordinates.d.ts.map +1 -1
- package/build/src/modeling/definitions/GeospatialCoordinates.js.map +1 -1
- package/build/src/modeling/definitions/Phone.d.ts +5 -7
- package/build/src/modeling/definitions/Phone.d.ts.map +1 -1
- package/build/src/modeling/definitions/Phone.js +2 -2
- package/build/src/modeling/definitions/Phone.js.map +1 -1
- package/build/src/modeling/definitions/PublicUniqueName.d.ts +1 -9
- package/build/src/modeling/definitions/PublicUniqueName.d.ts.map +1 -1
- package/build/src/modeling/definitions/PublicUniqueName.js +0 -1
- package/build/src/modeling/definitions/PublicUniqueName.js.map +1 -1
- package/build/src/modeling/definitions/SKU.d.ts +4 -1
- package/build/src/modeling/definitions/SKU.d.ts.map +1 -1
- package/build/src/modeling/definitions/SKU.js.map +1 -1
- package/build/src/modeling/definitions/URL.d.ts +1 -4
- package/build/src/modeling/definitions/URL.d.ts.map +1 -1
- package/build/src/modeling/definitions/URL.js +0 -1
- package/build/src/modeling/definitions/URL.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/data/models/example-generator-api.json +10 -10
- package/package.json +1 -1
- package/src/modeling/Semantics.ts +8 -4
- package/src/modeling/definitions/Email.ts +2 -2
- package/src/modeling/definitions/GeospatialCoordinates.ts +46 -1
- package/src/modeling/definitions/Phone.ts +6 -8
- package/src/modeling/definitions/PublicUniqueName.ts +1 -10
- package/src/modeling/definitions/SKU.ts +4 -1
- package/src/modeling/definitions/URL.ts +1 -5
- package/tests/unit/modeling/definitions/derived.spec.ts +1 -2
- package/tests/unit/modeling/definitions/url.spec.ts +0 -1
- package/tests/unit/modeling/semantic-configs.spec.ts +1 -2
|
@@ -38,11 +38,12 @@ export declare enum SemanticType {
|
|
|
38
38
|
*/
|
|
39
39
|
DeletedFlag = "Semantic#DeletedFlag",
|
|
40
40
|
/**
|
|
41
|
-
* Designates a Data Property as a
|
|
41
|
+
* Designates a Data Property as a public identifier for a resource (the slug).
|
|
42
42
|
* This is often used in URLs to provide a user-friendly way to access the resource.
|
|
43
43
|
* For example, a blog post might have a public unique name like "my-first-post".
|
|
44
|
-
*
|
|
45
|
-
* the
|
|
44
|
+
* The runtime automatically generates a URL-safe string from another field (like a title).
|
|
45
|
+
* By default, slugs are generated to be unique, but the configuration allows for duplicates
|
|
46
|
+
* in scenarios where uniqueness is handled by a combination of fields (e.g., year and slug).
|
|
46
47
|
*/
|
|
47
48
|
PublicUniqueName = "Semantic#PublicUniqueName",
|
|
48
49
|
/**
|
|
@@ -130,7 +131,10 @@ export declare enum SemanticType {
|
|
|
130
131
|
/**
|
|
131
132
|
* Annotates a field as a monetary value with currency support and precision control.
|
|
132
133
|
* Can store simple decimal amounts or complex objects with amount and currency.
|
|
133
|
-
*
|
|
134
|
+
*
|
|
135
|
+
* As a semantic, it provides flexibility by annotating a base `number` or `string` type,
|
|
136
|
+
* allowing for different storage strategies (e.g., decimal, integer cents, or a JSON object)
|
|
137
|
+
* while maintaining a consistent API for currency operations.
|
|
134
138
|
*/
|
|
135
139
|
Currency = "Semantic#Currency",
|
|
136
140
|
/**
|
|
@@ -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,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
|
|
@@ -44,11 +44,12 @@ export var SemanticType;
|
|
|
44
44
|
*/
|
|
45
45
|
SemanticType["DeletedFlag"] = "Semantic#DeletedFlag";
|
|
46
46
|
/**
|
|
47
|
-
* Designates a Data Property as a
|
|
47
|
+
* Designates a Data Property as a public identifier for a resource (the slug).
|
|
48
48
|
* This is often used in URLs to provide a user-friendly way to access the resource.
|
|
49
49
|
* For example, a blog post might have a public unique name like "my-first-post".
|
|
50
|
-
*
|
|
51
|
-
* the
|
|
50
|
+
* The runtime automatically generates a URL-safe string from another field (like a title).
|
|
51
|
+
* By default, slugs are generated to be unique, but the configuration allows for duplicates
|
|
52
|
+
* in scenarios where uniqueness is handled by a combination of fields (e.g., year and slug).
|
|
52
53
|
*/
|
|
53
54
|
SemanticType["PublicUniqueName"] = "Semantic#PublicUniqueName";
|
|
54
55
|
/**
|
|
@@ -136,7 +137,10 @@ export var SemanticType;
|
|
|
136
137
|
/**
|
|
137
138
|
* Annotates a field as a monetary value with currency support and precision control.
|
|
138
139
|
* Can store simple decimal amounts or complex objects with amount and currency.
|
|
139
|
-
*
|
|
140
|
+
*
|
|
141
|
+
* As a semantic, it provides flexibility by annotating a base `number` or `string` type,
|
|
142
|
+
* allowing for different storage strategies (e.g., decimal, integer cents, or a JSON object)
|
|
143
|
+
* while maintaining a consistent API for currency operations.
|
|
140
144
|
*/
|
|
141
145
|
SemanticType["Currency"] = "Semantic#Currency";
|
|
142
146
|
/**
|
|
@@ -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,8DAA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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 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 //\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: false,\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 },\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.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 },\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"]}
|
|
1
|
+
{"version":3,"file":"Semantics.js","sourceRoot":"","sources":["../../../src/modeling/Semant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1C,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 //\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: false,\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 },\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.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 },\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"]}
|
|
@@ -14,9 +14,9 @@ export interface EmailConfig {
|
|
|
14
14
|
*/
|
|
15
15
|
requireVerification?: boolean;
|
|
16
16
|
/**
|
|
17
|
-
* Method to use for verification: 'email'
|
|
17
|
+
* Method to use for verification: 'email' or 'sms'.
|
|
18
18
|
*/
|
|
19
|
-
verificationMethod?: 'email' | 'sms'
|
|
19
|
+
verificationMethod?: 'email' | 'sms';
|
|
20
20
|
/**
|
|
21
21
|
* Whether to allow subaddressing (user+tag@domain.com).
|
|
22
22
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Email.d.ts","sourceRoot":"","sources":["../../../../src/modeling/definitions/Email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"Email.d.ts","sourceRoot":"","sources":["../../../../src/modeling/definitions/Email.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,iB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B,EAAE;IACpF,MAAM,YAAY,GAAG;QACnB,GAAG,oBAAoB;QACvB,GAAG,MAAM;KACV,CAAA;IACD,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpB,YAAY,CAAC,QAAQ,GAAG,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAA;IAChD,CAAC;IAED,OAAO;QACL,EAAE,EAAE,YAAY,CAAC,KAAK;QACtB,MAAM,EAAE,YAAY;KACrB,CAAA;AACH,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,mBAAmB,EAAE,KAAK;IAC1B,kBAAkB,EAAE,OAAO;IAC3B,kBAAkB,EAAE,IAAI;IACxB,kBAAkB,EAAE,IAAI;CACzB,CAAA","sourcesContent":["import type { AppliedDataSemantic } from '../Semantics.js'\nimport { SemanticType } from '../Semantics.js'\n\n/**\n * Configuration options for the Email semantic.\n * Controls validation, allowed domains, and verification.\n */\nexport interface EmailConfig {\n /**\n * List of allowed email domains (e.g., ['example.com']).\n */\n allowedDomains?: string[]\n /**\n * Whether email verification is required.\n */\n requireVerification?: boolean\n /**\n * Method to use for verification: 'email'
|
|
1
|
+
{"version":3,"file":"Email.js","sourceRoot":"","sources":["../../../../src/modeling/definitions/Email.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAuD9C;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAA6B,EAAoC,EAAE;IACjG,OAAO,QAAQ,CAAC,EAAE,KAAK,YAAY,CAAC,KAAK,CAAA;AAC3C,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,SAAsB,EAAE,EAAwB,EAAE;IACpF,MAAM,YAAY,GAAG;QACnB,GAAG,oBAAoB;QACvB,GAAG,MAAM;KACV,CAAA;IACD,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpB,YAAY,CAAC,QAAQ,GAAG,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAA;IAChD,CAAC;IAED,OAAO;QACL,EAAE,EAAE,YAAY,CAAC,KAAK;QACtB,MAAM,EAAE,YAAY;KACrB,CAAA;AACH,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,mBAAmB,EAAE,KAAK;IAC1B,kBAAkB,EAAE,OAAO;IAC3B,kBAAkB,EAAE,IAAI;IACxB,kBAAkB,EAAE,IAAI;CACzB,CAAA","sourcesContent":["import type { AppliedDataSemantic } from '../Semantics.js'\nimport { SemanticType } from '../Semantics.js'\n\n/**\n * Configuration options for the Email semantic.\n * Controls validation, allowed domains, and verification.\n */\nexport interface EmailConfig {\n /**\n * List of allowed email domains (e.g., ['example.com']).\n */\n allowedDomains?: string[]\n /**\n * Whether email verification is required.\n */\n requireVerification?: boolean\n /**\n * Method to use for verification: 'email' or 'sms'.\n */\n verificationMethod?: 'email' | 'sms'\n /**\n * Whether to allow subaddressing (user+tag@domain.com).\n */\n allowSubaddressing?: boolean\n /**\n * Whether to allow internationalized email addresses.\n *\n * - When true (default): Allows email addresses with non-ASCII characters in the domain part,\n * like user@münchen.de or user@café.com\n * - When false: Only allows ASCII characters in the domain part, like user@example.com\n *\n * Why it exists:\n * - Internationalization: Many countries have domain names with native characters (like German umlauts,\n * French accents, etc.)\n * - RFC 6531: The standard for internationalized email addresses\n * - Validation flexibility: Some systems may need to restrict to ASCII-only domains for compatibility reasons\n */\n allowInternational?: boolean\n /**\n * Custom metadata for the email field.\n */\n metadata?: Record<string, unknown>\n /**\n * Index signature to allow additional properties.\n */\n [key: string]: unknown\n}\n\n/**\n * Type-safe configuration for Email semantic.\n */\nexport interface AppliedEmailSemantic extends AppliedDataSemantic {\n id: SemanticType.Email\n config?: EmailConfig\n}\n\n/**\n * Type guard to check if a semantic is an Email semantic.\n */\nexport const isEmailSemantic = (semantic: AppliedDataSemantic): semantic is AppliedEmailSemantic => {\n return semantic.id === SemanticType.Email\n}\n\n/**\n * Helper function to create an Email semantic with configuration.\n */\nexport const createEmailSemantic = (config: EmailConfig = {}): AppliedEmailSemantic => {\n const mergedConfig = {\n ...DEFAULT_EMAIL_CONFIG,\n ...config,\n }\n if (config.metadata) {\n mergedConfig.metadata = { ...config.metadata }\n }\n\n return {\n id: SemanticType.Email,\n config: mergedConfig,\n }\n}\n\n/**\n * Default configuration for Email semantic.\n */\nexport const DEFAULT_EMAIL_CONFIG: EmailConfig = {\n requireVerification: false,\n verificationMethod: 'email',\n allowSubaddressing: true,\n allowInternational: true,\n}\n"]}
|
|
@@ -92,11 +92,15 @@ export interface GeospatialCoordinatesConfig {
|
|
|
92
92
|
/**
|
|
93
93
|
* The spatial reference system (SRS) for the coordinates.
|
|
94
94
|
* Defaults to WGS84 (EPSG:4326) if not specified.
|
|
95
|
+
*
|
|
96
|
+
* Note: If `format` is set to `GeoJSON`, this value is automatically locked to `WGS84`
|
|
97
|
+
* as per the GeoJSON specification (RFC 7946).
|
|
95
98
|
*/
|
|
96
99
|
spatialReferenceSystem?: GeospatialSpatialReferenceSystem;
|
|
97
100
|
/**
|
|
98
101
|
* The default distance unit for spatial queries.
|
|
99
102
|
* Defaults to 'meters' if not specified.
|
|
103
|
+
* Only applicable when `enableDistanceQueries` is true.
|
|
100
104
|
*/
|
|
101
105
|
defaultDistanceUnit?: GeospatialDistanceUnit;
|
|
102
106
|
/**
|
|
@@ -111,7 +115,8 @@ export interface GeospatialCoordinatesConfig {
|
|
|
111
115
|
enableValidation?: boolean;
|
|
112
116
|
/**
|
|
113
117
|
* Custom validation rules for coordinate bounds.
|
|
114
|
-
*
|
|
118
|
+
* Values are in decimal degrees.
|
|
119
|
+
* If not specified, uses standard latitude (-90.0 to 90.0) and longitude (-180.0 to 180.0) bounds.
|
|
115
120
|
*/
|
|
116
121
|
validationBounds?: {
|
|
117
122
|
/**
|
|
@@ -134,41 +139,75 @@ export interface GeospatialCoordinatesConfig {
|
|
|
134
139
|
/**
|
|
135
140
|
* Whether to enable automatic PostGIS integration when using PostgreSQL.
|
|
136
141
|
* Defaults to true if not specified.
|
|
142
|
+
*
|
|
143
|
+
* This is an advanced setting. For UIs targeting non-technical users,
|
|
144
|
+
* it is safe to hide this option and keep it enabled. The backend should
|
|
145
|
+
* gracefully handle cases where the database is not PostgreSQL.
|
|
137
146
|
*/
|
|
138
147
|
enablePostGISIntegration?: boolean;
|
|
139
148
|
/**
|
|
140
149
|
* The PostGIS geometry type to use for storage.
|
|
141
150
|
* Defaults to 'POINT' if not specified.
|
|
151
|
+
* This choice fundamentally defines the shape of the data and the types of queries that can be performed.
|
|
152
|
+
*
|
|
153
|
+
* - **POINT**: For single locations (e.g., a store, a user's location).
|
|
154
|
+
* - **LINESTRING**: For paths or routes (e.g., a delivery route, a hiking trail).
|
|
155
|
+
* - **POLYGON**: For defined areas (e.g., a delivery zone, a sales territory, a city boundary).
|
|
156
|
+
* - **MULTI***: For collections of the above types (e.g., all stores in a chain as a MULTIPOINT).
|
|
142
157
|
*/
|
|
143
158
|
postGISGeometryType?: 'POINT' | 'LINESTRING' | 'POLYGON' | 'MULTIPOINT' | 'MULTILINESTRING' | 'MULTIPOLYGON';
|
|
144
159
|
/**
|
|
145
160
|
* Whether to enable distance-based query endpoints.
|
|
161
|
+
* This is not mutually exclusive with other query types and is useful for all geometry types.
|
|
146
162
|
* Defaults to true if not specified.
|
|
163
|
+
*
|
|
164
|
+
* - For **POINT**: Finds points within a certain radius.
|
|
165
|
+
* - For **POLYGON**: Finds polygons that are within a certain distance of a point
|
|
166
|
+
* (e.g., "find all parks within 5 miles").
|
|
167
|
+
* - For **LINESTRING**: Finds paths/routes within a certain distance of a point
|
|
168
|
+
* (e.g., "find all subway lines near me").
|
|
147
169
|
*/
|
|
148
170
|
enableDistanceQueries?: boolean;
|
|
149
171
|
/**
|
|
150
172
|
* Maximum distance allowed in distance queries (in the default distance unit).
|
|
151
173
|
* Defaults to 100000 (100km) if not specified.
|
|
174
|
+
* Only applicable when `enableDistanceQueries` is true.
|
|
152
175
|
*/
|
|
153
176
|
maxQueryDistance?: number;
|
|
154
177
|
/**
|
|
155
178
|
* Whether to enable bounding box query endpoints.
|
|
179
|
+
* This is not mutually exclusive with other query types.
|
|
156
180
|
* Defaults to true if not specified.
|
|
157
181
|
*/
|
|
158
182
|
enableBoundingBoxQueries?: boolean;
|
|
159
183
|
/**
|
|
160
184
|
* Whether to enable polygon intersection query endpoints.
|
|
185
|
+
* This is not mutually exclusive with other query types.
|
|
161
186
|
* Defaults to false if not specified.
|
|
162
187
|
*/
|
|
163
188
|
enablePolygonQueries?: boolean;
|
|
164
189
|
/**
|
|
165
190
|
* Custom API endpoint prefix for geospatial queries.
|
|
166
191
|
* Defaults to '/nearby' if not specified.
|
|
192
|
+
* Only applicable if `enableDistanceQueries`, `enableBoundingBoxQueries`,
|
|
193
|
+
* or `enablePolygonQueries` is true.
|
|
194
|
+
*
|
|
195
|
+
* The generated endpoints would be:
|
|
196
|
+
* - **Distance Query**: `GET {apiEndpointPrefix}`
|
|
197
|
+
* - **Bounding Box Query**: `GET {apiEndpointPrefix}/bbox`
|
|
198
|
+
* - **Polygon Query**: `POST {apiEndpointPrefix}/polygon`
|
|
167
199
|
*/
|
|
168
200
|
apiEndpointPrefix?: string;
|
|
169
201
|
/**
|
|
170
202
|
* Whether to include elevation data in coordinates (3D coordinates).
|
|
171
203
|
* Defaults to false if not specified.
|
|
204
|
+
* When true, a third value for elevation is expected in the coordinate data.
|
|
205
|
+
*
|
|
206
|
+
* - **LatLon**: `"40.7128,-74.0060,10"` (latitude, longitude, elevation)
|
|
207
|
+
* - **PostGIS/WKT**: `"POINT Z (-74.0060 40.7128 10)"`
|
|
208
|
+
* - **GeoJSON**: `{"type": "Point", "coordinates": [-74.0060, 40.7128, 10]}`
|
|
209
|
+
*
|
|
210
|
+
* The unit for elevation is determined by `defaultDistanceUnit`.
|
|
172
211
|
*/
|
|
173
212
|
includeElevation?: boolean;
|
|
174
213
|
/**
|
|
@@ -179,6 +218,12 @@ export interface GeospatialCoordinatesConfig {
|
|
|
179
218
|
/**
|
|
180
219
|
* Whether to enable reverse geocoding capabilities.
|
|
181
220
|
* Defaults to false if not specified.
|
|
221
|
+
*
|
|
222
|
+
* When enabled, the system can convert geographic coordinates (e.g., `40.7128, -74.0060`)
|
|
223
|
+
* into a human-readable address (e.g., "New York, NY, USA").
|
|
224
|
+
*
|
|
225
|
+
* This often requires integration with an external geocoding service and may have
|
|
226
|
+
* associated costs or usage limits.
|
|
182
227
|
*/
|
|
183
228
|
enableReverseGeocoding?: boolean;
|
|
184
229
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeospatialCoordinates.d.ts","sourceRoot":"","sources":["../../../../src/modeling/definitions/GeospatialCoordinates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C;;GAEG;AACH,oBAAY,0BAA0B;IACpC;;OAEG;IACH,MAAM,YAAY;IAClB;;OAEG;IACH,MAAM,YAAY;IAClB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,GAAG,QAAQ;IACX;;OAEG;IACH,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,oBAAY,sBAAsB;IAChC;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,UAAU,eAAe;IACzB;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,IAAI,SAAS;IACb;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,aAAa,mBAAmB;CACjC;AAED;;GAEG;AACH,oBAAY,gCAAgC;IAC1C;;OAEG;IACH,KAAK,cAAc;IACnB;;OAEG;IACH,WAAW,cAAc;IACzB;;OAEG;IACH,KAAK,cAAc;IACnB;;OAEG;IACH,KAAK,cAAc;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,MAAM,CAAC,EAAE,0BAA0B,CAAA;IAEnC
|
|
1
|
+
{"version":3,"file":"GeospatialCoordinates.d.ts","sourceRoot":"","sources":["../../../../src/modeling/definitions/GeospatialCoordinates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C;;GAEG;AACH,oBAAY,0BAA0B;IACpC;;OAEG;IACH,MAAM,YAAY;IAClB;;OAEG;IACH,MAAM,YAAY;IAClB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,GAAG,QAAQ;IACX;;OAEG;IACH,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,oBAAY,sBAAsB;IAChC;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,UAAU,eAAe;IACzB;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,IAAI,SAAS;IACb;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,aAAa,mBAAmB;CACjC;AAED;;GAEG;AACH,oBAAY,gCAAgC;IAC1C;;OAEG;IACH,KAAK,cAAc;IACnB;;OAEG;IACH,WAAW,cAAc;IACzB;;OAEG;IACH,KAAK,cAAc;IACnB;;OAEG;IACH,KAAK,cAAc;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,MAAM,CAAC,EAAE,0BAA0B,CAAA;IAEnC;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,gCAAgC,CAAA;IAEzD;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,sBAAsB,CAAA;IAE5C;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAE/B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAE1B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AQ,IAAI,oCAEd,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,mCAAmC,GAC9C,SAAQ,2BAAgC,KACvC,oCAgBF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,2BAgBvC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeospatialCoordinates.js","sourceRoot":"","sources":["../../../../src/modeling/definitions/GeospatialCoordinates.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C;;GAEG;AACH,MAAM,CAAN,IAAY,0BAyBX;AAzBD,WAAY,0BAA0B;IACpC;;OAEG;IACH,gDAAkB,CAAA;IAClB;;OAEG;IACH,gDAAkB,CAAA;IAClB;;OAEG;IACH,iDAAmB,CAAA;IACnB;;OAEG;IACH,+CAAiB,CAAA;IACjB;;OAEG;IACH,yCAAW,CAAA;IACX;;OAEG;IACH,iDAAmB,CAAA;AACrB,CAAC,EAzBW,0BAA0B,KAA1B,0BAA0B,QAyBrC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,sBAyBX;AAzBD,WAAY,sBAAsB;IAChC;;OAEG;IACH,2CAAiB,CAAA;IACjB;;OAEG;IACH,mDAAyB,CAAA;IACzB;;OAEG;IACH,yCAAe,CAAA;IACf;;OAEG;IACH,uCAAa,CAAA;IACb;;OAEG;IACH,yCAAe,CAAA;IACf;;OAEG;IACH,0DAAgC,CAAA;AAClC,CAAC,EAzBW,sBAAsB,KAAtB,sBAAsB,QAyBjC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,gCAiBX;AAjBD,WAAY,gCAAgC;IAC1C;;OAEG;IACH,uDAAmB,CAAA;IACnB;;OAEG;IACH,6DAAyB,CAAA;IACzB;;OAEG;IACH,uDAAmB,CAAA;IACnB;;OAEG;IACH,uDAAmB,CAAA;AACrB,CAAC,EAjBW,gCAAgC,KAAhC,gCAAgC,QAiB3C;AA2ID;;GAEG;AACH,MAAM,CA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**\n * Supported coordinate formats for geospatial data.\n */\nexport enum GeospatialCoordinateFormat {\n /**\n * Latitude, Longitude format: \"40.7128,-74.0060\"\n */\n LatLon = 'lat,lon',\n /**\n * Longitude, Latitude format: \"-74.0060,40.7128\"\n */\n LonLat = 'lon,lat',\n /**\n * PostGIS POINT format: \"POINT(-74.0060 40.7128)\"\n */\n PostGIS = 'postgis',\n /**\n * Degree format with cardinal directions: \"40.7128°N, 74.0060°W\"\n */\n Degree = 'degree',\n /**\n * Well-Known Text (WKT) format: \"POINT(-74.0060 40.7128)\"\n */\n WKT = 'wkt',\n /**\n * GeoJSON format: {\"type\": \"Point\", \"coordinates\": [-74.0060, 40.7128]}\n */\n GeoJSON = 'geojson',\n}\n\n/**\n * Supported distance units for spatial queries.\n */\nexport enum GeospatialDistanceUnit {\n /**\n * Meters (SI unit)\n */\n Meters = 'meters',\n /**\n * Kilometers\n */\n Kilometers = 'kilometers',\n /**\n * Miles (imperial)\n */\n Miles = 'miles',\n /**\n * Feet (imperial)\n */\n Feet = 'feet',\n /**\n * Yards (imperial)\n */\n Yards = 'yards',\n /**\n * Nautical miles\n */\n NauticalMiles = 'nautical_miles',\n}\n\n/**\n * Supported spatial reference systems.\n */\nexport enum GeospatialSpatialReferenceSystem {\n /**\n * WGS84 (World Geodetic System 1984) - Most common for GPS coordinates\n */\n WGS84 = 'EPSG:4326',\n /**\n * Web Mercator - Common for web mapping\n */\n WebMercator = 'EPSG:3857',\n /**\n * NAD83 (North American Datum 1983)\n */\n NAD83 = 'EPSG:4269',\n /**\n * NAD27 (North American Datum 1927)\n */\n NAD27 = 'EPSG:4267',\n}\n\n/**\n * Configuration options for the GeospatialCoordinates semantic.\n * These options control how the runtime handles geospatial data and queries.\n */\nexport interface GeospatialCoordinatesConfig {\n /**\n * The coordinate format expected for input/output.\n * Defaults to 'lat,lon' if not specified.\n */\n format?: GeospatialCoordinateFormat\n\n /**\n * The spatial reference system (SRS) for the coordinates.\n * Defaults to WGS84 (EPSG:4326) if not specified.\n */\n spatialReferenceSystem?: GeospatialSpatialReferenceSystem\n\n /**\n * The default distance unit for spatial queries.\n * Defaults to 'meters' if not specified.\n */\n defaultDistanceUnit?: GeospatialDistanceUnit\n\n /**\n * Whether to enable automatic spatial indexing.\n * Defaults to true if not specified.\n */\n enableSpatialIndexing?: boolean\n\n /**\n * Whether to enable automatic coordinate validation.\n * Defaults to true if not specified.\n */\n enableValidation?: boolean\n\n /**\n * Custom validation rules for coordinate bounds.\n * If not specified, uses standard latitude (-90 to 90) and longitude (-180 to 180) bounds.\n */\n validationBounds?: {\n /**\n * Minimum latitude value\n */\n minLatitude?: number\n /**\n * Maximum latitude value\n */\n maxLatitude?: number\n /**\n * Minimum longitude value\n */\n minLongitude?: number\n /**\n * Maximum longitude value\n */\n maxLongitude?: number\n }\n\n /**\n * Whether to enable automatic PostGIS integration when using PostgreSQL.\n * Defaults to true if not specified.\n */\n enablePostGISIntegration?: boolean\n\n /**\n * The PostGIS geometry type to use for storage.\n * Defaults to 'POINT' if not specified.\n */\n postGISGeometryType?: 'POINT' | 'LINESTRING' | 'POLYGON' | 'MULTIPOINT' | 'MULTILINESTRING' | 'MULTIPOLYGON'\n\n /**\n * Whether to enable distance-based query endpoints.\n * Defaults to true if not specified.\n */\n enableDistanceQueries?: boolean\n\n /**\n * Maximum distance allowed in distance queries (in the default distance unit).\n * Defaults to 100000 (100km) if not specified.\n */\n maxQueryDistance?: number\n\n /**\n * Whether to enable bounding box query endpoints.\n * Defaults to true if not specified.\n */\n enableBoundingBoxQueries?: boolean\n\n /**\n * Whether to enable polygon intersection query endpoints.\n * Defaults to false if not specified.\n */\n enablePolygonQueries?: boolean\n\n /**\n * Custom API endpoint prefix for geospatial queries.\n * Defaults to '/nearby' if not specified.\n */\n apiEndpointPrefix?: string\n\n /**\n * Whether to include elevation data in coordinates (3D coordinates).\n * Defaults to false if not specified.\n */\n includeElevation?: boolean\n\n /**\n * Precision for coordinate storage (number of decimal places).\n * Defaults to 6 if not specified.\n */\n coordinatePrecision?: number\n\n /**\n * Whether to enable reverse geocoding capabilities.\n * Defaults to false if not specified.\n */\n enableReverseGeocoding?: boolean\n\n /**\n * Custom metadata for the geospatial field.\n */\n metadata?: Record<string, unknown>\n\n /**\n * Index signature to allow additional properties.\n */\n [key: string]: unknown\n}\n\n/**\n * Type-safe configuration for GeospatialCoordinates semantic.\n */\nexport interface AppliedGeospatialCoordinatesSemantic extends AppliedDataSemantic {\n id: SemanticType.GeospatialCoordinates\n config?: GeospatialCoordinatesConfig\n}\n\n/**\n * Type guard to check if a semantic is a GeospatialCoordinates semantic.\n */\nexport const isGeospatialCoordinatesSemantic = (\n semantic: AppliedDataSemantic\n): semantic is AppliedGeospatialCoordinatesSemantic => {\n return semantic.id === SemanticType.GeospatialCoordinates\n}\n\n/**\n * Helper function to create a GeospatialCoordinates semantic with configuration.\n */\nexport const createGeospatialCoordinatesSemantic = (\n config: GeospatialCoordinatesConfig = {}\n): AppliedGeospatialCoordinatesSemantic => {\n const mergedConfig = {\n ...DEFAULT_GEOSPATIAL_CONFIG,\n ...config,\n }\n if (config.metadata) {\n mergedConfig.metadata = { ...config.metadata }\n }\n if (config.validationBounds) {\n mergedConfig.validationBounds = { ...config.validationBounds }\n }\n\n return {\n id: SemanticType.GeospatialCoordinates,\n config: mergedConfig,\n }\n}\n\n/**\n * Default configuration for GeospatialCoordinates semantic.\n */\nexport const DEFAULT_GEOSPATIAL_CONFIG: GeospatialCoordinatesConfig = {\n format: GeospatialCoordinateFormat.LatLon,\n spatialReferenceSystem: GeospatialSpatialReferenceSystem.WGS84,\n defaultDistanceUnit: GeospatialDistanceUnit.Meters,\n enableSpatialIndexing: true,\n enableValidation: true,\n enablePostGISIntegration: true,\n postGISGeometryType: 'POINT',\n enableDistanceQueries: true,\n maxQueryDistance: 100000,\n enableBoundingBoxQueries: true,\n enablePolygonQueries: false,\n apiEndpointPrefix: '/nearby',\n includeElevation: false,\n coordinatePrecision: 6,\n enableReverseGeocoding: false,\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GeospatialCoordinates.js","sourceRoot":"","sources":["../../../../src/modeling/definitions/GeospatialCoordinates.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C;;GAEG;AACH,MAAM,CAAN,IAAY,0BAyBX;AAzBD,WAAY,0BAA0B;IACpC;;OAEG;IACH,gDAAkB,CAAA;IAClB;;OAEG;IACH,gDAAkB,CAAA;IAClB;;OAEG;IACH,iDAAmB,CAAA;IACnB;;OAEG;IACH,+CAAiB,CAAA;IACjB;;OAEG;IACH,yCAAW,CAAA;IACX;;OAEG;IACH,iDAAmB,CAAA;AACrB,CAAC,EAzBW,0BAA0B,KAA1B,0BAA0B,QAyBrC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,sBAyBX;AAzBD,WAAY,sBAAsB;IAChC;;OAEG;IACH,2CAAiB,CAAA;IACjB;;OAEG;IACH,mDAAyB,CAAA;IACzB;;OAEG;IACH,yCAAe,CAAA;IACf;;OAEG;IACH,uCAAa,CAAA;IACb;;OAEG;IACH,yCAAe,CAAA;IACf;;OAEG;IACH,0DAAgC,CAAA;AAClC,CAAC,EAzBW,sBAAsB,KAAtB,sBAAsB,QAyBjC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,gCAiBX;AAjBD,WAAY,gCAAgC;IAC1C;;OAEG;IACH,uDAAmB,CAAA;IACnB;;OAEG;IACH,6DAAyB,CAAA;IACzB;;OAEG;IACH,uDAAmB,CAAA;IACnB;;OAEG;IACH,uDAAmB,CAAA;AACrB,CAAC,EAjBW,gCAAgC,KAAhC,gCAAgC,QAiB3C;AAwLD;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC7C,QAA6B,EACqB,EAAE;IACpD,OAAO,QAAQ,CAAC,EAAE,KAAK,YAAY,CAAC,qBAAqB,CAAA;AAC3D,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CACjD,SAAsC,EAAE,EACF,EAAE;IACxC,MAAM,YAAY,GAAG;QACnB,GAAG,yBAAyB;QAC5B,GAAG,MAAM;KACV,CAAA;IACD,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpB,YAAY,CAAC,QAAQ,GAAG,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAA;IAChD,CAAC;IACD,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAC5B,YAAY,CAAC,gBAAgB,GAAG,EAAE,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAA;IAChE,CAAC;IAED,OAAO;QACL,EAAE,EAAE,YAAY,CAAC,qBAAqB;QACtC,MAAM,EAAE,YAAY;KACrB,CAAA;AACH,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAgC;IACpE,MAAM,EAAE,0BAA0B,CAAC,MAAM;IACzC,sBAAsB,EAAE,gCAAgC,CAAC,KAAK;IAC9D,mBAAmB,EAAE,sBAAsB,CAAC,MAAM;IAClD,qBAAqB,EAAE,IAAI;IAC3B,gBAAgB,EAAE,IAAI;IACtB,wBAAwB,EAAE,IAAI;IAC9B,mBAAmB,EAAE,OAAO;IAC5B,qBAAqB,EAAE,IAAI;IAC3B,gBAAgB,EAAE,MAAM;IACxB,wBAAwB,EAAE,IAAI;IAC9B,oBAAoB,EAAE,KAAK;IAC3B,iBAAiB,EAAE,SAAS;IAC5B,gBAAgB,EAAE,KAAK;IACvB,mBAAmB,EAAE,CAAC;IACtB,sBAAsB,EAAE,KAAK;CAC9B,CAAA","sourcesContent":["import type { AppliedDataSemantic } from '../Semantics.js'\nimport { SemanticType } from '../Semantics.js'\n\n/**\n * Supported coordinate formats for geospatial data.\n */\nexport enum GeospatialCoordinateFormat {\n /**\n * Latitude, Longitude format: \"40.7128,-74.0060\"\n */\n LatLon = 'lat,lon',\n /**\n * Longitude, Latitude format: \"-74.0060,40.7128\"\n */\n LonLat = 'lon,lat',\n /**\n * PostGIS POINT format: \"POINT(-74.0060 40.7128)\"\n */\n PostGIS = 'postgis',\n /**\n * Degree format with cardinal directions: \"40.7128°N, 74.0060°W\"\n */\n Degree = 'degree',\n /**\n * Well-Known Text (WKT) format: \"POINT(-74.0060 40.7128)\"\n */\n WKT = 'wkt',\n /**\n * GeoJSON format: {\"type\": \"Point\", \"coordinates\": [-74.0060, 40.7128]}\n */\n GeoJSON = 'geojson',\n}\n\n/**\n * Supported distance units for spatial queries.\n */\nexport enum GeospatialDistanceUnit {\n /**\n * Meters (SI unit)\n */\n Meters = 'meters',\n /**\n * Kilometers\n */\n Kilometers = 'kilometers',\n /**\n * Miles (imperial)\n */\n Miles = 'miles',\n /**\n * Feet (imperial)\n */\n Feet = 'feet',\n /**\n * Yards (imperial)\n */\n Yards = 'yards',\n /**\n * Nautical miles\n */\n NauticalMiles = 'nautical_miles',\n}\n\n/**\n * Supported spatial reference systems.\n */\nexport enum GeospatialSpatialReferenceSystem {\n /**\n * WGS84 (World Geodetic System 1984) - Most common for GPS coordinates\n */\n WGS84 = 'EPSG:4326',\n /**\n * Web Mercator - Common for web mapping\n */\n WebMercator = 'EPSG:3857',\n /**\n * NAD83 (North American Datum 1983)\n */\n NAD83 = 'EPSG:4269',\n /**\n * NAD27 (North American Datum 1927)\n */\n NAD27 = 'EPSG:4267',\n}\n\n/**\n * Configuration options for the GeospatialCoordinates semantic.\n * These options control how the runtime handles geospatial data and queries.\n */\nexport interface GeospatialCoordinatesConfig {\n /**\n * The coordinate format expected for input/output.\n * Defaults to 'lat,lon' if not specified.\n */\n format?: GeospatialCoordinateFormat\n\n /**\n * The spatial reference system (SRS) for the coordinates.\n * Defaults to WGS84 (EPSG:4326) if not specified.\n *\n * Note: If `format` is set to `GeoJSON`, this value is automatically locked to `WGS84`\n * as per the GeoJSON specification (RFC 7946).\n */\n spatialReferenceSystem?: GeospatialSpatialReferenceSystem\n\n /**\n * The default distance unit for spatial queries.\n * Defaults to 'meters' if not specified.\n * Only applicable when `enableDistanceQueries` is true.\n */\n defaultDistanceUnit?: GeospatialDistanceUnit\n\n /**\n * Whether to enable automatic spatial indexing.\n * Defaults to true if not specified.\n */\n enableSpatialIndexing?: boolean\n\n /**\n * Whether to enable automatic coordinate validation.\n * Defaults to true if not specified.\n */\n enableValidation?: boolean\n\n /**\n * Custom validation rules for coordinate bounds.\n * Values are in decimal degrees.\n * If not specified, uses standard latitude (-90.0 to 90.0) and longitude (-180.0 to 180.0) bounds.\n */\n validationBounds?: {\n /**\n * Minimum latitude value\n */\n minLatitude?: number\n /**\n * Maximum latitude value\n */\n maxLatitude?: number\n /**\n * Minimum longitude value\n */\n minLongitude?: number\n /**\n * Maximum longitude value\n */\n maxLongitude?: number\n }\n\n /**\n * Whether to enable automatic PostGIS integration when using PostgreSQL.\n * Defaults to true if not specified.\n *\n * This is an advanced setting. For UIs targeting non-technical users,\n * it is safe to hide this option and keep it enabled. The backend should\n * gracefully handle cases where the database is not PostgreSQL.\n */\n enablePostGISIntegration?: boolean\n\n /**\n * The PostGIS geometry type to use for storage.\n * Defaults to 'POINT' if not specified.\n * This choice fundamentally defines the shape of the data and the types of queries that can be performed.\n *\n * - **POINT**: For single locations (e.g., a store, a user's location).\n * - **LINESTRING**: For paths or routes (e.g., a delivery route, a hiking trail).\n * - **POLYGON**: For defined areas (e.g., a delivery zone, a sales territory, a city boundary).\n * - **MULTI***: For collections of the above types (e.g., all stores in a chain as a MULTIPOINT).\n */\n postGISGeometryType?: 'POINT' | 'LINESTRING' | 'POLYGON' | 'MULTIPOINT' | 'MULTILINESTRING' | 'MULTIPOLYGON'\n\n /**\n * Whether to enable distance-based query endpoints.\n * This is not mutually exclusive with other query types and is useful for all geometry types.\n * Defaults to true if not specified.\n *\n * - For **POINT**: Finds points within a certain radius.\n * - For **POLYGON**: Finds polygons that are within a certain distance of a point\n * (e.g., \"find all parks within 5 miles\").\n * - For **LINESTRING**: Finds paths/routes within a certain distance of a point\n * (e.g., \"find all subway lines near me\").\n */\n enableDistanceQueries?: boolean\n\n /**\n * Maximum distance allowed in distance queries (in the default distance unit).\n * Defaults to 100000 (100km) if not specified.\n * Only applicable when `enableDistanceQueries` is true.\n */\n maxQueryDistance?: number\n\n /**\n * Whether to enable bounding box query endpoints.\n * This is not mutually exclusive with other query types.\n * Defaults to true if not specified.\n */\n enableBoundingBoxQueries?: boolean\n\n /**\n * Whether to enable polygon intersection query endpoints.\n * This is not mutually exclusive with other query types.\n * Defaults to false if not specified.\n */\n enablePolygonQueries?: boolean\n\n /**\n * Custom API endpoint prefix for geospatial queries.\n * Defaults to '/nearby' if not specified.\n * Only applicable if `enableDistanceQueries`, `enableBoundingBoxQueries`,\n * or `enablePolygonQueries` is true.\n *\n * The generated endpoints would be:\n * - **Distance Query**: `GET {apiEndpointPrefix}`\n * - **Bounding Box Query**: `GET {apiEndpointPrefix}/bbox`\n * - **Polygon Query**: `POST {apiEndpointPrefix}/polygon`\n */\n apiEndpointPrefix?: string\n\n /**\n * Whether to include elevation data in coordinates (3D coordinates).\n * Defaults to false if not specified.\n * When true, a third value for elevation is expected in the coordinate data.\n *\n * - **LatLon**: `\"40.7128,-74.0060,10\"` (latitude, longitude, elevation)\n * - **PostGIS/WKT**: `\"POINT Z (-74.0060 40.7128 10)\"`\n * - **GeoJSON**: `{\"type\": \"Point\", \"coordinates\": [-74.0060, 40.7128, 10]}`\n *\n * The unit for elevation is determined by `defaultDistanceUnit`.\n */\n includeElevation?: boolean\n\n /**\n * Precision for coordinate storage (number of decimal places).\n * Defaults to 6 if not specified.\n */\n coordinatePrecision?: number\n\n /**\n * Whether to enable reverse geocoding capabilities.\n * Defaults to false if not specified.\n *\n * When enabled, the system can convert geographic coordinates (e.g., `40.7128, -74.0060`)\n * into a human-readable address (e.g., \"New York, NY, USA\").\n *\n * This often requires integration with an external geocoding service and may have\n * associated costs or usage limits.\n */\n enableReverseGeocoding?: boolean\n\n /**\n * Custom metadata for the geospatial field.\n */\n metadata?: Record<string, unknown>\n\n /**\n * Index signature to allow additional properties.\n */\n [key: string]: unknown\n}\n\n/**\n * Type-safe configuration for GeospatialCoordinates semantic.\n */\nexport interface AppliedGeospatialCoordinatesSemantic extends AppliedDataSemantic {\n id: SemanticType.GeospatialCoordinates\n config?: GeospatialCoordinatesConfig\n}\n\n/**\n * Type guard to check if a semantic is a GeospatialCoordinates semantic.\n */\nexport const isGeospatialCoordinatesSemantic = (\n semantic: AppliedDataSemantic\n): semantic is AppliedGeospatialCoordinatesSemantic => {\n return semantic.id === SemanticType.GeospatialCoordinates\n}\n\n/**\n * Helper function to create a GeospatialCoordinates semantic with configuration.\n */\nexport const createGeospatialCoordinatesSemantic = (\n config: GeospatialCoordinatesConfig = {}\n): AppliedGeospatialCoordinatesSemantic => {\n const mergedConfig = {\n ...DEFAULT_GEOSPATIAL_CONFIG,\n ...config,\n }\n if (config.metadata) {\n mergedConfig.metadata = { ...config.metadata }\n }\n if (config.validationBounds) {\n mergedConfig.validationBounds = { ...config.validationBounds }\n }\n\n return {\n id: SemanticType.GeospatialCoordinates,\n config: mergedConfig,\n }\n}\n\n/**\n * Default configuration for GeospatialCoordinates semantic.\n */\nexport const DEFAULT_GEOSPATIAL_CONFIG: GeospatialCoordinatesConfig = {\n format: GeospatialCoordinateFormat.LatLon,\n spatialReferenceSystem: GeospatialSpatialReferenceSystem.WGS84,\n defaultDistanceUnit: GeospatialDistanceUnit.Meters,\n enableSpatialIndexing: true,\n enableValidation: true,\n enablePostGISIntegration: true,\n postGISGeometryType: 'POINT',\n enableDistanceQueries: true,\n maxQueryDistance: 100000,\n enableBoundingBoxQueries: true,\n enablePolygonQueries: false,\n apiEndpointPrefix: '/nearby',\n includeElevation: false,\n coordinatePrecision: 6,\n enableReverseGeocoding: false,\n}\n"]}
|
|
@@ -13,17 +13,16 @@ export interface PhoneConfig {
|
|
|
13
13
|
allowedCountries?: string[];
|
|
14
14
|
/**
|
|
15
15
|
* Whether the phone number must include a country code.
|
|
16
|
-
* Defaults to true for
|
|
16
|
+
* Defaults to true for international format.
|
|
17
17
|
*/
|
|
18
18
|
requireCountryCode?: boolean;
|
|
19
19
|
/**
|
|
20
20
|
* Format for phone number validation and display.
|
|
21
|
-
* - 'E.164': International format with + prefix (e.g., +1234567890)
|
|
22
21
|
* - 'national': Country-specific format without country code
|
|
23
|
-
* - 'international':
|
|
22
|
+
* - 'international': E.164 international format with + prefix (e.g., +1234567890)
|
|
24
23
|
* - 'custom': Use customFormat pattern
|
|
25
24
|
*/
|
|
26
|
-
format?: '
|
|
25
|
+
format?: 'national' | 'international' | 'custom';
|
|
27
26
|
/**
|
|
28
27
|
* Custom format pattern for phone number validation.
|
|
29
28
|
* Only used when format is set to 'custom'.
|
|
@@ -44,9 +43,8 @@ export interface PhoneConfig {
|
|
|
44
43
|
* Method to use for phone verification.
|
|
45
44
|
* - 'sms': Send verification code via SMS
|
|
46
45
|
* - 'call': Make verification call
|
|
47
|
-
* - 'none': No verification required
|
|
48
46
|
*/
|
|
49
|
-
verificationMethod?: 'sms' | 'call'
|
|
47
|
+
verificationMethod?: 'sms' | 'call';
|
|
50
48
|
/**
|
|
51
49
|
* Custom metadata for the phone field.
|
|
52
50
|
*/
|
|
@@ -77,7 +75,7 @@ export declare const isPhoneSemantic: (semantic: AppliedDataSemantic) => semanti
|
|
|
77
75
|
export declare const createPhoneSemantic: (config?: PhoneConfig) => AppliedPhoneSemantic;
|
|
78
76
|
/**
|
|
79
77
|
* Default configuration for Phone semantic.
|
|
80
|
-
* Uses
|
|
78
|
+
* Uses international format with country code required and SMS verification.
|
|
81
79
|
*/
|
|
82
80
|
export declare const DEFAULT_PHONE_CONFIG: PhoneConfig;
|
|
83
81
|
//# sourceMappingURL=Phone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../../src/modeling/definitions/Phone.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,YAAY,E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AO,MAAM,mBAAmB,GAAI,SAAQ,WAAgB,KAAG,oBAa9D,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAMlC,CAAA"}
|
|
@@ -27,11 +27,11 @@ export const createPhoneSemantic = (config = {}) => {
|
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
29
|
* Default configuration for Phone semantic.
|
|
30
|
-
* Uses
|
|
30
|
+
* Uses international format with country code required and SMS verification.
|
|
31
31
|
*/
|
|
32
32
|
export const DEFAULT_PHONE_CONFIG = {
|
|
33
33
|
requireCountryCode: true,
|
|
34
|
-
format: '
|
|
34
|
+
format: 'international',
|
|
35
35
|
allowExtension: false,
|
|
36
36
|
requireVerification: false,
|
|
37
37
|
verificationMethod: 'sms',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Phone.js","sourceRoot":"","sources":["../../../../src/modeling/definitions/Phone.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"Phone.js","sourceRoot":"","sources":["../../../../src/modeling/definitions/Phone.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAyE9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAA6B,EAAoC,EAAE;IACjG,OAAO,QAAQ,CAAC,EAAE,KAAK,YAAY,CAAC,KAAK,CAAA;AAC3C,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,SAAsB,EAAE,EAAwB,EAAE;IACpF,MAAM,YAAY,GAAG;QACnB,GAAG,oBAAoB;QACvB,GAAG,MAAM;KACV,CAAA;IACD,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpB,YAAY,CAAC,QAAQ,GAAG,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAA;IAChD,CAAC;IAED,OAAO;QACL,EAAE,EAAE,YAAY,CAAC,KAAK;QACtB,MAAM,EAAE,YAAY;KACrB,CAAA;AACH,CAAC,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,kBAAkB,EAAE,IAAI;IACxB,MAAM,EAAE,eAAe;IACvB,cAAc,EAAE,KAAK;IACrB,mBAAmB,EAAE,KAAK;IAC1B,kBAAkB,EAAE,KAAK;CAC1B,CAAA","sourcesContent":["import type { AppliedDataSemantic } from '../Semantics.js'\nimport { SemanticType } from '../Semantics.js'\n\n/**\n * Configuration options for the Phone semantic.\n * Controls validation, formatting, and verification of phone numbers.\n */\nexport interface PhoneConfig {\n /**\n * List of allowed country codes (ISO 3166-1 alpha-2 format).\n * If not specified, all countries are allowed.\n * Examples: ['US', 'CA', 'GB', 'DE']\n */\n allowedCountries?: string[]\n\n /**\n * Whether the phone number must include a country code.\n * Defaults to true for international format.\n */\n requireCountryCode?: boolean\n\n /**\n * Format for phone number validation and display.\n * - 'national': Country-specific format without country code\n * - 'international': E.164 international format with + prefix (e.g., +1234567890)\n * - 'custom': Use customFormat pattern\n */\n format?: 'national' | 'international' | 'custom'\n\n /**\n * Custom format pattern for phone number validation.\n * Only used when format is set to 'custom'.\n * Examples: '###-###-####', '(###) ###-####'\n */\n customFormat?: string\n\n /**\n * Whether to allow phone extensions (e.g., +1234567890 ext 123).\n * Defaults to false.\n */\n allowExtension?: boolean\n\n /**\n * Whether phone number verification is required.\n * Defaults to false.\n */\n requireVerification?: boolean\n\n /**\n * Method to use for phone verification.\n * - 'sms': Send verification code via SMS\n * - 'call': Make verification call\n */\n verificationMethod?: 'sms' | 'call'\n\n /**\n * Custom metadata for the phone field.\n */\n metadata?: Record<string, unknown>\n\n /**\n * Index signature to allow additional properties.\n */\n [key: string]: unknown\n}\n\n/**\n * Type-safe configuration for Phone semantic.\n */\nexport interface AppliedPhoneSemantic extends AppliedDataSemantic {\n id: SemanticType.Phone\n config?: PhoneConfig\n}\n\n/**\n * Type guard to check if a semantic is a Phone semantic.\n * @param semantic - The semantic to check\n * @returns True if the semantic is a Phone semantic\n */\nexport const isPhoneSemantic = (semantic: AppliedDataSemantic): semantic is AppliedPhoneSemantic => {\n return semantic.id === SemanticType.Phone\n}\n\n/**\n * Helper function to create a Phone semantic with configuration.\n * @param config - Configuration options for the phone semantic\n * @returns AppliedPhoneSemantic with the specified configuration\n */\nexport const createPhoneSemantic = (config: PhoneConfig = {}): AppliedPhoneSemantic => {\n const mergedConfig = {\n ...DEFAULT_PHONE_CONFIG,\n ...config,\n }\n if (config.metadata) {\n mergedConfig.metadata = { ...config.metadata }\n }\n\n return {\n id: SemanticType.Phone,\n config: mergedConfig,\n }\n}\n\n/**\n * Default configuration for Phone semantic.\n * Uses international format with country code required and SMS verification.\n */\nexport const DEFAULT_PHONE_CONFIG: PhoneConfig = {\n requireCountryCode: true,\n format: 'international',\n allowExtension: false,\n requireVerification: false,\n verificationMethod: 'sms',\n}\n"]}
|
|
@@ -6,7 +6,7 @@ import { SemanticType } from '../Semantics.js';
|
|
|
6
6
|
*/
|
|
7
7
|
export interface PublicUniqueNameConfig {
|
|
8
8
|
/**
|
|
9
|
-
* The source field to generate the slug from
|
|
9
|
+
* The key of the source field to generate the slug from.
|
|
10
10
|
* Default to the field that is annotated with the Title semantic.
|
|
11
11
|
*/
|
|
12
12
|
sourceField?: string;
|
|
@@ -14,10 +14,6 @@ export interface PublicUniqueNameConfig {
|
|
|
14
14
|
* Separator character to use in the slug (default: '-').
|
|
15
15
|
*/
|
|
16
16
|
separator?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Maximum length of the slug (default: 64).
|
|
19
|
-
*/
|
|
20
|
-
maxLength?: number;
|
|
21
17
|
/**
|
|
22
18
|
* Whether the slug is case sensitive (default: false).
|
|
23
19
|
*/
|
|
@@ -26,10 +22,6 @@ export interface PublicUniqueNameConfig {
|
|
|
26
22
|
* Whether to allow Unicode characters in the slug (default: false).
|
|
27
23
|
*/
|
|
28
24
|
allowUnicode?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Name of a custom generator function to use for slug creation.
|
|
31
|
-
*/
|
|
32
|
-
customGenerator?: string;
|
|
33
25
|
/**
|
|
34
26
|
* Whether to allow duplicate slugs (default: false).
|
|
35
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicUniqueName.d.ts","sourceRoot":"","sources":["../../../../src/modeling/definitions/PublicUniqueName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"PublicUniqueName.d.ts","sourceRoot":"","sources":["../../../../src/modeling/definitions/PublicUniqueName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,+BAAgC,SAAQ,mBAAmB;IAC1E,EAAE,EAAE,YAAY,CAAC,gBAAgB,CAAA;IACjC,MAAM,CAAC,EAAE,sBAAsB,CAAA;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,GACrC,UAAU,mBAAmB,KAC5B,QAAQ,IAAI,+BAEd,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,8BAA8B,GACzC,SAAQ,sBAA2B,KAClC,+BAaF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,iCAAiC,EAAE,sBAK/C,CAAA"}
|