@api-client/core 0.18.26 → 0.18.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/modeling/Semantics.d.ts +7 -0
- package/build/src/modeling/Semantics.d.ts.map +1 -1
- package/build/src/modeling/Semantics.js +23 -0
- package/build/src/modeling/Semantics.js.map +1 -1
- package/build/src/modeling/templates/meta/blog-publishing-platform.json +1 -1
- package/build/src/modeling/templates/meta/financial-services-platform.json +1 -1
- package/build/src/modeling/templates/meta/index.d.ts +1 -1
- package/build/src/modeling/templates/meta/index.js +1 -1
- package/build/src/modeling/templates/meta/index.js.map +1 -1
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.d.ts.map +1 -1
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js +1 -0
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js.map +1 -1
- package/build/src/modeling/templates/verticals/technology-media/blog-domain.d.ts.map +1 -1
- package/build/src/modeling/templates/verticals/technology-media/blog-domain.js +12 -4
- package/build/src/modeling/templates/verticals/technology-media/blog-domain.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/data/models/example-generator-api.json +6 -6
- package/package.json +1 -1
- package/src/modeling/Semantics.ts +23 -0
- package/src/modeling/templates/meta/blog-publishing-platform.json +1 -1
- package/src/modeling/templates/meta/financial-services-platform.json +1 -1
- package/src/modeling/templates/verticals/business-services/financial-services-domain.ts +1 -0
- package/src/modeling/templates/verticals/technology-media/blog-domain.ts +12 -4
- package/tests/unit/modeling/username_semantic.spec.ts +81 -0
|
@@ -42068,10 +42068,10 @@
|
|
|
42068
42068
|
"@id": "#194"
|
|
42069
42069
|
},
|
|
42070
42070
|
{
|
|
42071
|
-
"@id": "#
|
|
42071
|
+
"@id": "#197"
|
|
42072
42072
|
},
|
|
42073
42073
|
{
|
|
42074
|
-
"@id": "#
|
|
42074
|
+
"@id": "#200"
|
|
42075
42075
|
},
|
|
42076
42076
|
{
|
|
42077
42077
|
"@id": "#203"
|
|
@@ -43478,7 +43478,7 @@
|
|
|
43478
43478
|
"doc:ExternalDomainElement",
|
|
43479
43479
|
"doc:DomainElement"
|
|
43480
43480
|
],
|
|
43481
|
-
"doc:raw": "
|
|
43481
|
+
"doc:raw": "code: '5'\ndescription: 'Limited company'\n",
|
|
43482
43482
|
"core:mediaType": "application/yaml",
|
|
43483
43483
|
"sourcemaps:sources": [
|
|
43484
43484
|
{
|
|
@@ -43499,7 +43499,7 @@
|
|
|
43499
43499
|
"doc:ExternalDomainElement",
|
|
43500
43500
|
"doc:DomainElement"
|
|
43501
43501
|
],
|
|
43502
|
-
"doc:raw": "
|
|
43502
|
+
"doc:raw": "class: '3'\ndescription: '150 - 300'\nnumberOfFte: 5500\nnumberOfEmployees: 5232\n",
|
|
43503
43503
|
"core:mediaType": "application/yaml",
|
|
43504
43504
|
"sourcemaps:sources": [
|
|
43505
43505
|
{
|
|
@@ -44766,12 +44766,12 @@
|
|
|
44766
44766
|
{
|
|
44767
44767
|
"@id": "#199/source-map/lexical/element_0",
|
|
44768
44768
|
"sourcemaps:element": "amf://id#199",
|
|
44769
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44769
|
+
"sourcemaps:value": "[(1,0)-(3,0)]"
|
|
44770
44770
|
},
|
|
44771
44771
|
{
|
|
44772
44772
|
"@id": "#202/source-map/lexical/element_0",
|
|
44773
44773
|
"sourcemaps:element": "amf://id#202",
|
|
44774
|
-
"sourcemaps:value": "[(1,0)-(
|
|
44774
|
+
"sourcemaps:value": "[(1,0)-(5,0)]"
|
|
44775
44775
|
},
|
|
44776
44776
|
{
|
|
44777
44777
|
"@id": "#205/source-map/lexical/element_0",
|
package/package.json
CHANGED
|
@@ -26,6 +26,13 @@ export enum SemanticType {
|
|
|
26
26
|
* ensuring it is encrypted and not exposed in API responses.
|
|
27
27
|
*/
|
|
28
28
|
Password = 'Semantic#Password',
|
|
29
|
+
/**
|
|
30
|
+
* Annotates the field as the username for user authentication.
|
|
31
|
+
* This identifies which field should be used for login purposes.
|
|
32
|
+
* Can be applied to dedicated username fields or email fields that serve as usernames.
|
|
33
|
+
* The runtime uses this for authentication, password reset, and user lookup operations.
|
|
34
|
+
*/
|
|
35
|
+
Username = 'Semantic#Username',
|
|
29
36
|
/**
|
|
30
37
|
* Designates a Data Property as the `createdAt` timestamp of an entity.
|
|
31
38
|
* This is used to track when the entity was first created.
|
|
@@ -651,6 +658,22 @@ export const DataSemantics: Record<SemanticType, DataSemantic> = {
|
|
|
651
658
|
],
|
|
652
659
|
},
|
|
653
660
|
},
|
|
661
|
+
[SemanticType.Username]: {
|
|
662
|
+
id: SemanticType.Username,
|
|
663
|
+
displayName: 'Username',
|
|
664
|
+
scope: SemanticScope.Property,
|
|
665
|
+
description: 'User authentication identifier',
|
|
666
|
+
category: SemanticCategory.Identity,
|
|
667
|
+
applicableDataTypes: ['string'],
|
|
668
|
+
hasConfig: false,
|
|
669
|
+
runtime: {
|
|
670
|
+
timing: SemanticTiming.Before,
|
|
671
|
+
operations: [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Read],
|
|
672
|
+
priority: 15, // High priority for authentication
|
|
673
|
+
canDisable: false, // Security semantics cannot be disabled
|
|
674
|
+
timeoutMs: 100, // Fast operation
|
|
675
|
+
},
|
|
676
|
+
},
|
|
654
677
|
[SemanticType.UserRole]: {
|
|
655
678
|
id: SemanticType.UserRole,
|
|
656
679
|
displayName: 'User Role Field',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"blog-publishing-platform","name":"Blog Publishing Platform","description":"A comprehensive content management and publishing platform for blogs, magazines, and digital publications. Includes content management, user roles, publishing workflow, and social features.","createdAt":"2025-07-27T21:14:57.328Z","updatedAt":"2025-07-27T21:14:57.328Z","version":"1.0.0","author":"API Now! Core Team","tags":["blog","cms","publishing","content","media","editorial"],"structure":{"domain":{"name":"Blog Publishing Platform","description":"A comprehensive content management and publishing platform for blogs, magazines, and digital publications","totalEntities":8,"totalProperties":69,"totalAssociations":14},"namespaces":[{"name":"ContentManagement","displayName":"Content Management","description":"Core content creation, editing, and organization features","modelCount":2,"entityCount":4,"models":[{"name":"Publications","displayName":"Publications Management","description":"Individual blogs, magazines, or publications within the platform","entityCount":1,"entities":[{"name":"publication","displayName":"Publication","description":"Individual blog or publication site","propertyCount":8,"associationCount":0,"properties":[{"name":"id","displayName":"Publication ID","description":"Unique identifier for the publication","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"name","displayName":"Publication Name","description":"Display name of the publication","type":"string","semantics":["Semantic#Title"]},{"name":"slug","displayName":"URL Slug","description":"URL-friendly identifier for the publication","type":"string","required":true,"unique":true,"semantics":["Semantic#PublicUniqueName"]},{"name":"description","displayName":"Description","description":"Publication description and tagline","type":"string","semantics":["Semantic#Description"]},{"name":"domain","displayName":"Custom Domain","description":"Custom domain name for the publication","type":"string","semantics":[]},{"name":"logo_url","displayName":"Logo URL","description":"URL to publication logo image","type":"string","semantics":["Semantic#ImageURL"]},{"name":"status","displayName":"Publication Status","description":"Current status of the publication","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["active","suspended","archived"],"defaultValue":"active"},{"name":"created_at","displayName":"Created At","description":"When the publication was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[],"semantics":[]}]},{"name":"Content","displayName":"Content Management","description":"Posts, pages, and other content types","entityCount":3,"entities":[{"name":"category","displayName":"Content Category","description":"Content categorization for organization and navigation","propertyCount":5,"associationCount":2,"properties":[{"name":"id","displayName":"Category ID","description":"Unique identifier for the category","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"name","displayName":"Category Name","description":"Display name of the category","type":"string","semantics":["Semantic#Title"]},{"name":"slug","displayName":"URL Slug","description":"URL-friendly identifier for the category","type":"string","required":true,"unique":true,"semantics":["Semantic#PublicUniqueName"]},{"name":"description","displayName":"Description","description":"Category description","type":"string","semantics":["Semantic#Description"]},{"name":"color","displayName":"Color","description":"Theme color for the category","type":"string","semantics":[]}],"associations":[{"name":"publication","displayName":"Publication","description":"Publication this category belongs to","required":true,"multiple":false,"targetEntities":["publication"],"semantics":[],"cardinality":"One-to-One"},{"name":"parentCategory","displayName":"Parent Category","description":"Parent category for hierarchical organization","required":false,"multiple":false,"targetEntities":["category"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"Tag","displayName":"Content Tag","description":"Tags for flexible content labeling and discovery","propertyCount":3,"associationCount":1,"properties":[{"name":"id","displayName":"Tag ID","description":"Unique identifier for the tag","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"name","displayName":"Tag Name","description":"Display name of the tag","type":"string","semantics":["Semantic#Title"]},{"name":"slug","displayName":"URL Slug","description":"URL-friendly identifier for the tag","type":"string","required":true,"unique":true,"semantics":["Semantic#PublicUniqueName"]}],"associations":[{"name":"publication","displayName":"Publication","description":"Publication this tag belongs to","required":true,"multiple":false,"targetEntities":["publication"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"Post","displayName":"Blog Post","description":"Individual blog posts and articles","propertyCount":16,"associationCount":4,"properties":[{"name":"id","displayName":"Post ID","description":"Unique identifier for the post","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"title","displayName":"Post Title","description":"Title of the blog post","type":"string","required":true,"semantics":["Semantic#Title"]},{"name":"slug","displayName":"URL Slug","description":"URL-friendly identifier for the post","type":"string","required":true,"unique":true,"semantics":["Semantic#PublicUniqueName"]},{"name":"excerpt","displayName":"Excerpt","description":"Brief summary or excerpt of the post","type":"string","semantics":["Semantic#Summary"]},{"name":"content","displayName":"Content","description":"Full content of the post in HTML or Markdown","type":"string","required":true,"semantics":["Semantic#HTML"]},{"name":"content_format","displayName":"Content Format","description":"Format of the content (HTML, Markdown, etc.)","type":"string","required":true,"semantics":[],"enumValues":["html","markdown","richtext"],"defaultValue":"markdown"},{"name":"featured_image_url","displayName":"Featured Image URL","description":"URL to featured image","type":"string","semantics":["Semantic#ImageURL"]},{"name":"status","displayName":"Post Status","description":"Current publishing status of the post","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["draft","pending_review","scheduled","published","archived"],"defaultValue":"draft"},{"name":"published_at","displayName":"Published At","description":"When the post was published","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"scheduled_at","displayName":"Scheduled At","description":"When the post is scheduled to be published","type":"datetime","semantics":[]},{"name":"view_count","displayName":"View Count","description":"Number of times the post has been viewed","type":"number","required":true,"semantics":[]},{"name":"reading_time","displayName":"Reading Time","description":"Estimated reading time in minutes","type":"number","readOnly":true,"semantics":["Semantic#Calculated"]},{"name":"word_count","displayName":"Word Count","description":"Number of words in the post content","type":"number","readOnly":true,"semantics":["Semantic#Calculated"]},{"name":"meta_title","displayName":"Meta Title","description":"SEO meta title","type":"string","semantics":[]},{"name":"meta_description","displayName":"Meta Description","description":"SEO meta description","type":"string","semantics":[]},{"name":"updated_at","displayName":"Updated At","description":"When the post was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[{"name":"publication","displayName":"Publication","description":"Publication this post belongs to","required":true,"multiple":false,"targetEntities":["publication"],"semantics":[],"cardinality":"One-to-One"},{"name":"categories","displayName":"Post Categories","description":"Categories this post belongs to","required":false,"multiple":true,"targetEntities":["category"],"semantics":["Semantic#Categories"],"cardinality":"One-to-Many"},{"name":"tags","displayName":"Post Tags","description":"Tags associated with this post","required":false,"multiple":true,"targetEntities":["Tag"],"semantics":["Semantic#Tags"],"cardinality":"One-to-Many"},{"name":"author","displayName":"Post Author","description":"Author who wrote this post","required":true,"multiple":false,"targetEntities":["user"],"semantics":["Semantic#ResourceOwnerIdentifier"],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"UserManagement","displayName":"User Management","description":"Authors, editors, subscribers, and user roles management","modelCount":1,"entityCount":1,"models":[{"name":"Users","displayName":"User Management","description":"User accounts and authentication","entityCount":1,"entities":[{"name":"user","displayName":"User Account","description":"User account for authors, editors, and subscribers","propertyCount":13,"associationCount":0,"properties":[{"name":"id","displayName":"User ID","description":"Unique identifier for the user","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"email","displayName":"Email Address","description":"User email address for login and communication","type":"string","required":true,"semantics":["Semantic#Email"]},{"name":"password","displayName":"Password","description":"Encrypted password for authentication","type":"string","required":true,"semantics":["Semantic#Password"]},{"name":"username","displayName":"Username","description":"Unique username for the user","type":"string","required":true,"unique":true,"semantics":["Semantic#PublicUniqueName"]},{"name":"display_name","displayName":"Display Name","description":"Public display name for the user","type":"string","required":true,"semantics":[]},{"name":"first_name","displayName":"First Name","description":"User first name","type":"string","semantics":[]},{"name":"last_name","displayName":"Last Name","description":"User last name","type":"string","semantics":[]},{"name":"bio","displayName":"Biography","description":"User biography and description","type":"string","semantics":["Semantic#Description"]},{"name":"avatar_url","displayName":"Avatar URL","description":"URL to user profile picture","type":"string","semantics":["Semantic#ImageURL"]},{"name":"website","displayName":"Website","description":"User personal website URL","type":"string","semantics":["Semantic#URL"]},{"name":"role","displayName":"User Role","description":"User role for permission management","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["subscriber","author","editor","admin","super_admin"],"defaultValue":"subscriber"},{"name":"emailVerified","displayName":"Email Verified","description":"Whether the user has verified their email","type":"boolean","required":true,"semantics":[],"defaultValue":"false"},{"name":"created_at","displayName":"Created At","description":"When the user account was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[],"semantics":["Semantic#User"]}]}]},{"name":"SocialFeatures","displayName":"Social Features","description":"Comments, likes, shares, and social interactions","modelCount":1,"entityCount":1,"models":[{"name":"Comments","displayName":"Comment System","description":"Post comments and replies","entityCount":1,"entities":[{"name":"comment","displayName":"Comment","description":"User comments on posts","propertyCount":7,"associationCount":3,"properties":[{"name":"id","displayName":"Comment ID","description":"Unique identifier for the comment","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"content","displayName":"Comment Content","description":"Content of the comment","type":"string","required":true,"semantics":[]},{"name":"author_name","displayName":"Author Name","description":"Name of the comment author (for guest comments)","type":"string","semantics":[]},{"name":"author_email","displayName":"Author Email","description":"Email of the comment author (for guest comments)","type":"string","required":true,"semantics":["Semantic#Email"]},{"name":"status","displayName":"Comment Status","description":"Moderation status of the comment","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["pending","approved","rejected","spam"],"defaultValue":"pending"},{"name":"user_agent","displayName":"User Agent","description":"Browser user agent string","type":"string","semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the comment was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"post","displayName":"Post","description":"Post this comment belongs to","required":true,"multiple":false,"targetEntities":["Post"],"semantics":[],"cardinality":"One-to-One"},{"name":"author","displayName":"Comment Author","description":"Registered user who wrote this comment","required":false,"multiple":false,"targetEntities":["user"],"semantics":["Semantic#ResourceOwnerIdentifier"],"cardinality":"One-to-One"},{"name":"parent_comment","displayName":"Parent Comment","description":"Parent comment for replies","required":false,"multiple":false,"targetEntities":["comment"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"Analytics","displayName":"Analytics & Tracking","description":"Analytics, metrics, and performance tracking","modelCount":1,"entityCount":1,"models":[{"name":"Analytics","displayName":"Content Analytics","description":"Content performance and user engagement metrics","entityCount":1,"entities":[{"name":"page_view","displayName":"Page View","description":"Individual page view tracking record","propertyCount":7,"associationCount":2,"properties":[{"name":"id","displayName":"Page View ID","description":"Unique identifier for the page view","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"path","displayName":"Page Path","description":"URL path of the viewed page","type":"string","required":true,"semantics":[]},{"name":"referrer","displayName":"Referrer","description":"Referring URL","type":"string","semantics":["Semantic#URL"]},{"name":"ip_address","displayName":"IP Address","description":"Visitor IP address","type":"string","semantics":["Semantic#ClientIPAddress"]},{"name":"user_agent","displayName":"User Agent","description":"Browser user agent string","type":"string","semantics":[]},{"name":"session_id","displayName":"Session ID","description":"Visitor session identifier","type":"string","semantics":[]},{"name":"viewed_at","displayName":"Viewed At","description":"When the page was viewed","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"post","displayName":"Viewed Post","description":"Post that was viewed (if applicable)","required":false,"multiple":false,"targetEntities":["Post"],"semantics":[],"cardinality":"One-to-One"},{"name":"publication","displayName":"Publication","description":"Publication this page view belongs to","required":true,"multiple":false,"targetEntities":["publication"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"MediaManagement","displayName":"Media Management","description":"Image, video, and file upload management","modelCount":1,"entityCount":1,"models":[{"name":"Media","displayName":"Media Library","description":"Uploaded files, images, and media assets","entityCount":1,"entities":[{"name":"media_file","displayName":"Media File","description":"Uploaded media files (images, videos, documents)","propertyCount":10,"associationCount":2,"properties":[{"name":"id","displayName":"Media File ID","description":"Unique identifier for the media file","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"filename","displayName":"File Name","description":"Original filename of the uploaded file","type":"string","required":true,"semantics":[]},{"name":"storage_key","displayName":"Storage Key","description":"Unique storage key for the file","type":"string","required":true,"unique":true,"semantics":[]},{"name":"url","displayName":"File URL","description":"Public URL to access the file","type":"string","required":true,"semantics":["Semantic#URL"]},{"name":"mime_type","displayName":"MIME Type","description":"MIME type of the file","type":"string","required":true,"semantics":[]},{"name":"file_size","displayName":"File Size","description":"File size in bytes","type":"number","required":true,"semantics":[]},{"name":"width","displayName":"Image Width","description":"Width in pixels (for images)","type":"number","required":true,"semantics":[]},{"name":"height","displayName":"Image Height","description":"Height in pixels (for images)","type":"number","required":true,"semantics":[]},{"name":"alt_text","displayName":"Alt Text","description":"Alternative text for accessibility","type":"string","semantics":[]},{"name":"uploaded_at","displayName":"Uploaded At","description":"When the file was uploaded","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"uploader","displayName":"File Uploader","description":"User who uploaded this file","required":true,"multiple":false,"targetEntities":["user"],"semantics":["Semantic#ResourceOwnerIdentifier"],"cardinality":"One-to-One"},{"name":"publication","displayName":"Publication","description":"Publication this media file belongs to","required":true,"multiple":false,"targetEntities":["publication"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]}]}}
|
|
1
|
+
{"id":"blog-publishing-platform","name":"Blog Publishing Platform","description":"A comprehensive content management and publishing platform for blogs, magazines, and digital publications. Includes content management, user roles, publishing workflow, and social features.","createdAt":"2025-07-27T21:14:57.328Z","updatedAt":"2025-07-27T21:14:57.328Z","version":"1.0.0","author":"API Now! Core Team","tags":["blog","cms","publishing","content","media","editorial"],"structure":{"domain":{"name":"Blog Publishing Platform","description":"A comprehensive content management and publishing platform for blogs, magazines, and digital publications","totalEntities":8,"totalProperties":70,"totalAssociations":14},"namespaces":[{"name":"ContentManagement","displayName":"Content Management","description":"Core content creation, editing, and organization features","modelCount":2,"entityCount":4,"models":[{"name":"Publications","displayName":"Publications Management","description":"Individual blogs, magazines, or publications within the platform","entityCount":1,"entities":[{"name":"publication","displayName":"Publication","description":"Individual blog or publication site","propertyCount":8,"associationCount":0,"properties":[{"name":"id","displayName":"Publication ID","description":"Unique identifier for the publication","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"name","displayName":"Publication Name","description":"Display name of the publication","type":"string","semantics":["Semantic#Title"]},{"name":"slug","displayName":"URL Slug","description":"URL-friendly identifier for the publication","type":"string","required":true,"unique":true,"semantics":["Semantic#PublicUniqueName"]},{"name":"description","displayName":"Description","description":"Publication description and tagline","type":"string","semantics":["Semantic#Description"]},{"name":"domain","displayName":"Custom Domain","description":"Custom domain name for the publication","type":"string","semantics":[]},{"name":"logo_url","displayName":"Logo URL","description":"URL to publication logo image","type":"string","semantics":["Semantic#ImageURL"]},{"name":"status","displayName":"Publication Status","description":"Current status of the publication","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["active","suspended","archived"],"defaultValue":"active"},{"name":"created_at","displayName":"Created At","description":"When the publication was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[],"semantics":[]}]},{"name":"Content","displayName":"Content Management","description":"Posts, pages, and other content types","entityCount":3,"entities":[{"name":"category","displayName":"Content Category","description":"Content categorization for organization and navigation","propertyCount":5,"associationCount":2,"properties":[{"name":"id","displayName":"Category ID","description":"Unique identifier for the category","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"name","displayName":"Category Name","description":"Display name of the category","type":"string","semantics":["Semantic#Title"]},{"name":"slug","displayName":"URL Slug","description":"URL-friendly identifier for the category","type":"string","required":true,"unique":true,"semantics":["Semantic#PublicUniqueName"]},{"name":"description","displayName":"Description","description":"Category description","type":"string","semantics":["Semantic#Description"]},{"name":"color","displayName":"Color","description":"Theme color for the category","type":"string","semantics":[]}],"associations":[{"name":"publication","displayName":"Publication","description":"Publication this category belongs to","required":true,"multiple":false,"targetEntities":["publication"],"semantics":[],"cardinality":"One-to-One"},{"name":"parentCategory","displayName":"Parent Category","description":"Parent category for hierarchical organization","required":false,"multiple":false,"targetEntities":["category"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"Tag","displayName":"Content Tag","description":"Tags for flexible content labeling and discovery","propertyCount":3,"associationCount":1,"properties":[{"name":"id","displayName":"Tag ID","description":"Unique identifier for the tag","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"name","displayName":"Tag Name","description":"Display name of the tag","type":"string","semantics":["Semantic#Title"]},{"name":"slug","displayName":"URL Slug","description":"URL-friendly identifier for the tag","type":"string","required":true,"unique":true,"semantics":["Semantic#PublicUniqueName"]}],"associations":[{"name":"publication","displayName":"Publication","description":"Publication this tag belongs to","required":true,"multiple":false,"targetEntities":["publication"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"Post","displayName":"Blog Post","description":"Individual blog posts and articles","propertyCount":16,"associationCount":4,"properties":[{"name":"id","displayName":"Post ID","description":"Unique identifier for the post","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"title","displayName":"Post Title","description":"Title of the blog post","type":"string","required":true,"semantics":["Semantic#Title"]},{"name":"slug","displayName":"URL Slug","description":"URL-friendly identifier for the post","type":"string","required":true,"unique":true,"semantics":["Semantic#PublicUniqueName"]},{"name":"excerpt","displayName":"Excerpt","description":"Brief summary or excerpt of the post","type":"string","semantics":["Semantic#Summary"]},{"name":"content","displayName":"Content","description":"Full content of the post in HTML or Markdown","type":"string","required":true,"semantics":["Semantic#HTML"]},{"name":"content_format","displayName":"Content Format","description":"Format of the content (HTML, Markdown, etc.)","type":"string","required":true,"semantics":[],"enumValues":["html","markdown","richtext"],"defaultValue":"markdown"},{"name":"featured_image_url","displayName":"Featured Image URL","description":"URL to featured image","type":"string","semantics":["Semantic#ImageURL"]},{"name":"status","displayName":"Post Status","description":"Current publishing status of the post","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["draft","pending_review","scheduled","published","archived"],"defaultValue":"draft"},{"name":"published_at","displayName":"Published At","description":"When the post was published","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"scheduled_at","displayName":"Scheduled At","description":"When the post is scheduled to be published","type":"datetime","semantics":[]},{"name":"view_count","displayName":"View Count","description":"Number of times the post has been viewed","type":"number","required":true,"semantics":[]},{"name":"reading_time","displayName":"Reading Time","description":"Estimated reading time in minutes","type":"number","readOnly":true,"semantics":["Semantic#Calculated"]},{"name":"word_count","displayName":"Word Count","description":"Number of words in the post content","type":"number","readOnly":true,"semantics":["Semantic#Calculated"]},{"name":"meta_title","displayName":"Meta Title","description":"SEO meta title","type":"string","semantics":[]},{"name":"meta_description","displayName":"Meta Description","description":"SEO meta description","type":"string","semantics":[]},{"name":"updated_at","displayName":"Updated At","description":"When the post was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[{"name":"publication","displayName":"Publication","description":"Publication this post belongs to","required":true,"multiple":false,"targetEntities":["publication"],"semantics":[],"cardinality":"One-to-One"},{"name":"categories","displayName":"Post Categories","description":"Categories this post belongs to","required":false,"multiple":true,"targetEntities":["category"],"semantics":["Semantic#Categories"],"cardinality":"One-to-Many"},{"name":"tags","displayName":"Post Tags","description":"Tags associated with this post","required":false,"multiple":true,"targetEntities":["Tag"],"semantics":["Semantic#Tags"],"cardinality":"One-to-Many"},{"name":"author","displayName":"Post Author","description":"Author who wrote this post","required":true,"multiple":false,"targetEntities":["user"],"semantics":["Semantic#ResourceOwnerIdentifier"],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"UserManagement","displayName":"User Management","description":"Authors, editors, subscribers, and user roles management","modelCount":1,"entityCount":1,"models":[{"name":"Users","displayName":"User Management","description":"User accounts and authentication","entityCount":1,"entities":[{"name":"user","displayName":"User Account","description":"User account for authors, editors, and subscribers","propertyCount":14,"associationCount":0,"properties":[{"name":"id","displayName":"User ID","description":"Unique identifier for the user","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"email","displayName":"Email Address","description":"User email address for login and communication","type":"string","required":true,"semantics":["Semantic#Email"]},{"name":"password","displayName":"Password","description":"Encrypted password for authentication","type":"string","required":true,"semantics":["Semantic#Password"]},{"name":"username","displayName":"Username","description":"Unique username for the user","type":"string","required":true,"unique":true,"semantics":["Semantic#PublicUniqueName"]},{"name":"display_name","displayName":"Display Name","description":"Public display name for the user","type":"string","required":true,"semantics":[]},{"name":"first_name","displayName":"First Name","description":"User first name","type":"string","semantics":[]},{"name":"last_name","displayName":"Last Name","description":"User last name","type":"string","semantics":[]},{"name":"bio","displayName":"Biography","description":"User biography and description","type":"string","semantics":["Semantic#Description"]},{"name":"avatar_url","displayName":"Avatar URL","description":"URL to user profile picture","type":"string","semantics":["Semantic#ImageURL"]},{"name":"website","displayName":"Website","description":"User personal website URL","type":"string","semantics":["Semantic#URL"]},{"name":"role","displayName":"User Role","description":"User role for permission management","type":"string","required":true,"semantics":["Semantic#UserRole"],"enumValues":["subscriber","author","editor","admin","super_admin"],"defaultValue":"subscriber"},{"name":"status","displayName":"User Status","description":"Current status of the user account","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["active","inactive","suspended","pending_verification"],"defaultValue":"active"},{"name":"emailVerified","displayName":"Email Verified","description":"Whether the user has verified their email","type":"boolean","required":true,"semantics":[],"defaultValue":"false"},{"name":"created_at","displayName":"Created At","description":"When the user account was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[],"semantics":["Semantic#User"]}]}]},{"name":"SocialFeatures","displayName":"Social Features","description":"Comments, likes, shares, and social interactions","modelCount":1,"entityCount":1,"models":[{"name":"Comments","displayName":"Comment System","description":"Post comments and replies","entityCount":1,"entities":[{"name":"comment","displayName":"Comment","description":"User comments on posts","propertyCount":7,"associationCount":3,"properties":[{"name":"id","displayName":"Comment ID","description":"Unique identifier for the comment","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"content","displayName":"Comment Content","description":"Content of the comment","type":"string","required":true,"semantics":[]},{"name":"author_name","displayName":"Author Name","description":"Name of the comment author (for guest comments)","type":"string","semantics":[]},{"name":"author_email","displayName":"Author Email","description":"Email of the comment author (for guest comments)","type":"string","required":true,"semantics":["Semantic#Email"]},{"name":"status","displayName":"Comment Status","description":"Moderation status of the comment","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["pending","approved","rejected","spam"],"defaultValue":"pending"},{"name":"user_agent","displayName":"User Agent","description":"Browser user agent string","type":"string","semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the comment was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"post","displayName":"Post","description":"Post this comment belongs to","required":true,"multiple":false,"targetEntities":["Post"],"semantics":[],"cardinality":"One-to-One"},{"name":"author","displayName":"Comment Author","description":"Registered user who wrote this comment","required":false,"multiple":false,"targetEntities":["user"],"semantics":["Semantic#ResourceOwnerIdentifier"],"cardinality":"One-to-One"},{"name":"parent_comment","displayName":"Parent Comment","description":"Parent comment for replies","required":false,"multiple":false,"targetEntities":["comment"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"Analytics","displayName":"Analytics & Tracking","description":"Analytics, metrics, and performance tracking","modelCount":1,"entityCount":1,"models":[{"name":"Analytics","displayName":"Content Analytics","description":"Content performance and user engagement metrics","entityCount":1,"entities":[{"name":"page_view","displayName":"Page View","description":"Individual page view tracking record","propertyCount":7,"associationCount":2,"properties":[{"name":"id","displayName":"Page View ID","description":"Unique identifier for the page view","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"path","displayName":"Page Path","description":"URL path of the viewed page","type":"string","required":true,"semantics":[]},{"name":"referrer","displayName":"Referrer","description":"Referring URL","type":"string","semantics":["Semantic#URL"]},{"name":"ip_address","displayName":"IP Address","description":"Visitor IP address","type":"string","semantics":["Semantic#ClientIPAddress"]},{"name":"user_agent","displayName":"User Agent","description":"Browser user agent string","type":"string","semantics":[]},{"name":"session_id","displayName":"Session ID","description":"Visitor session identifier","type":"string","semantics":[]},{"name":"viewed_at","displayName":"Viewed At","description":"When the page was viewed","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"post","displayName":"Viewed Post","description":"Post that was viewed (if applicable)","required":false,"multiple":false,"targetEntities":["Post"],"semantics":[],"cardinality":"One-to-One"},{"name":"publication","displayName":"Publication","description":"Publication this page view belongs to","required":true,"multiple":false,"targetEntities":["publication"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"MediaManagement","displayName":"Media Management","description":"Image, video, and file upload management","modelCount":1,"entityCount":1,"models":[{"name":"Media","displayName":"Media Library","description":"Uploaded files, images, and media assets","entityCount":1,"entities":[{"name":"media_file","displayName":"Media File","description":"Uploaded media files (images, videos, documents)","propertyCount":10,"associationCount":2,"properties":[{"name":"id","displayName":"Media File ID","description":"Unique identifier for the media file","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"filename","displayName":"File Name","description":"Original filename of the uploaded file","type":"string","required":true,"semantics":[]},{"name":"storage_key","displayName":"Storage Key","description":"Unique storage key for the file","type":"string","required":true,"unique":true,"semantics":[]},{"name":"url","displayName":"File URL","description":"Public URL to access the file","type":"string","required":true,"semantics":["Semantic#URL"]},{"name":"mime_type","displayName":"MIME Type","description":"MIME type of the file","type":"string","required":true,"semantics":[]},{"name":"file_size","displayName":"File Size","description":"File size in bytes","type":"number","required":true,"semantics":[]},{"name":"width","displayName":"Image Width","description":"Width in pixels (for images)","type":"number","required":true,"semantics":[]},{"name":"height","displayName":"Image Height","description":"Height in pixels (for images)","type":"number","required":true,"semantics":[]},{"name":"alt_text","displayName":"Alt Text","description":"Alternative text for accessibility","type":"string","semantics":[]},{"name":"uploaded_at","displayName":"Uploaded At","description":"When the file was uploaded","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"uploader","displayName":"File Uploader","description":"User who uploaded this file","required":true,"multiple":false,"targetEntities":["user"],"semantics":["Semantic#ResourceOwnerIdentifier"],"cardinality":"One-to-One"},{"name":"publication","displayName":"Publication","description":"Publication this media file belongs to","required":true,"multiple":false,"targetEntities":["publication"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]}]}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"financial-services-platform","name":"Financial Services Platform","description":"A comprehensive financial services platform with account management, transaction processing, customer management, investment portfolios, and compliance features. Perfect for banks, credit unions, and fintech companies.","createdAt":"2025-01-27T00:00:00.000Z","updatedAt":"2025-01-27T00:00:00.000Z","version":"1.0.0","author":"API Now! Core Team","tags":["finance","banking","investment","compliance","fraud-detection","kyc"],"structure":{"domain":{"name":"Financial Services Platform","description":"A comprehensive financial services platform with account management, transaction processing, customer management, investment portfolios, and compliance features","totalEntities":17,"totalProperties":127,"totalAssociations":17},"namespaces":[{"name":"User Management","displayName":"User & Authentication Management","description":"Unified user authentication, roles, and profile management for customers and employees","modelCount":2,"entityCount":6,"models":[{"name":"Authentication","displayName":"Authentication & Access Control","description":"User authentication, sessions, and access control","entityCount":2,"entities":[{"name":"user","displayName":"User","description":"Unified user entity for both customers and employees with role-based access","propertyCount":14,"associationCount":3,"properties":[{"name":"id","displayName":"User ID","description":"Unique identifier for the user","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"username","displayName":"Username","description":"Unique username for login","type":"string","required":true,"unique":true,"semantics":[]},{"name":"password","displayName":"Password","description":"User password (hashed)","type":"string","required":true,"writeOnly":true,"semantics":["Semantic#Password"]},{"name":"email","displayName":"Email Address","description":"User email address","type":"string","required":true,"unique":true,"semantics":["Semantic#Email"]},{"name":"first_name","displayName":"First Name","description":"User first name","type":"string","semantics":[]},{"name":"last_name","displayName":"Last Name","description":"User last name","type":"string","semantics":[]},{"name":"phone","displayName":"Phone Number","description":"User phone number","type":"string","semantics":["Semantic#Phone"]},{"name":"user_type","displayName":"User Type","description":"Type of user account","type":"string","required":true,"semantics":[],"enumValues":["customer","employee","admin","system"]},{"name":"role","displayName":"User Role","description":"User role defining permissions and access level","type":"string","required":true,"semantics":[],"enumValues":["individual_customer","business_customer","premium_customer","private_banking_customer","teller","loan_officer","relationship_manager","compliance_officer","branch_manager","investment_advisor","risk_analyst","system_admin","security_admin","audit_admin"]},{"name":"status","displayName":"User Status","description":"Current status of the user account","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["active","inactive","suspended","pending_verification","locked"],"defaultValue":"active"},{"name":"email_verified","displayName":"Email Verified","description":"Whether user email is verified","type":"boolean","required":true,"semantics":[]},{"name":"last_login","displayName":"Last Login","description":"When user last logged in","type":"datetime","semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the user account was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"updated_at","displayName":"Updated At","description":"When the user account was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[{"name":"sessions","displayName":"User Sessions","description":"Active sessions for this user","required":false,"multiple":true,"targetEntities":["user_session"],"semantics":[],"cardinality":"One-to-Many"},{"name":"customer_profile","displayName":"Customer Profile","description":"Extended customer profile information","required":false,"multiple":false,"targetEntities":["customer_profile"],"semantics":[],"cardinality":"One-to-One"},{"name":"employee_profile","displayName":"Employee Profile","description":"Extended employee profile information","required":false,"multiple":false,"targetEntities":["employee_profile"],"semantics":[],"cardinality":"One-to-One"}],"semantics":["Semantic#User"]},{"name":"user_session","displayName":"User Session","description":"Active user authentication sessions","propertyCount":5,"associationCount":0,"properties":[{"name":"id","displayName":"Session ID","description":"Unique session identifier","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"token","displayName":"Session Token","description":"Authentication token for the session","type":"string","required":true,"writeOnly":true,"semantics":[]},{"name":"expires_at","displayName":"Expires At","description":"When the session expires","type":"datetime","required":true,"semantics":[]},{"name":"ip_address","displayName":"IP Address","description":"IP address of the session","type":"string","semantics":["Semantic#ClientIPAddress"]},{"name":"created_at","displayName":"Created At","description":"When the session was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[],"semantics":[]}]},{"name":"User Profiles","displayName":"User Profile Management","description":"Extended user profile information and preferences","entityCount":4,"entities":[{"name":"customer_profile","displayName":"Customer Profile","description":"Additional profile information specific to customers","propertyCount":10,"associationCount":0,"properties":[{"name":"id","displayName":"Profile ID","description":"Unique profile identifier","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"date_of_birth","displayName":"Date of Birth","description":"Customer date of birth","type":"date","required":true,"semantics":[]},{"name":"ssn","displayName":"Social Security Number","description":"Customer SSN for identification","type":"string","required":true,"writeOnly":true,"semantics":[]},{"name":"address","displayName":"Address","description":"Customer residential address","type":"string","required":true,"semantics":[]},{"name":"city","displayName":"City","description":"Customer city","type":"string","required":true,"semantics":[]},{"name":"state","displayName":"State","description":"Customer state","type":"string","required":true,"semantics":[]},{"name":"zip_code","displayName":"ZIP Code","description":"Customer ZIP code","type":"string","required":true,"semantics":[]},{"name":"customer_type","displayName":"Customer Type","description":"Type of customer account","type":"string","required":true,"semantics":[],"enumValues":["individual","business","trust","partnership"]},{"name":"created_at","displayName":"Created At","description":"When the customer profile was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"updated_at","displayName":"Updated At","description":"When the customer profile was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[],"semantics":[]},{"name":"employee_profile","displayName":"Employee Profile","description":"Additional profile information specific to employees","propertyCount":7,"associationCount":0,"properties":[{"name":"id","displayName":"Employee Profile ID","description":"Unique employee profile identifier","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"employee_id","displayName":"Employee ID","description":"Company employee identifier","type":"string","required":true,"unique":true,"semantics":[]},{"name":"department","displayName":"Department","description":"Employee department","type":"string","required":true,"semantics":[],"enumValues":["retail_banking","commercial_banking","investment_services","risk_management","compliance","operations","technology","human_resources","legal"]},{"name":"hire_date","displayName":"Hire Date","description":"Employee hire date","type":"date","required":true,"semantics":[]},{"name":"manager_id","displayName":"Manager ID","description":"Employee manager identifier","type":"string","semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the employee profile was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"updated_at","displayName":"Updated At","description":"When the employee profile was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[],"semantics":[]},{"name":"kyc_record","displayName":"KYC Record","description":"Know Your Customer verification and documentation","propertyCount":7,"associationCount":1,"properties":[{"name":"id","displayName":"KYC ID","description":"Unique identifier for the KYC record","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"status","displayName":"KYC Status","description":"Current status of KYC verification","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["pending","verified","rejected","expired"],"defaultValue":"pending"},{"name":"verification_date","displayName":"Verification Date","description":"Date when KYC was verified","type":"date","semantics":[]},{"name":"document_type","displayName":"Document Type","description":"Type of identification document","type":"string","required":true,"semantics":[],"enumValues":["passport","drivers_license","national_id","utility_bill","bank_statement"]},{"name":"document_number","displayName":"Document Number","description":"Document identification number","type":"string","required":true,"semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the KYC record was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"updated_at","displayName":"Updated At","description":"When the KYC record was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[{"name":"user","displayName":"User","description":"User for this KYC record","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"risk_profile","displayName":"Risk Profile","description":"Customer risk assessment and scoring","propertyCount":7,"associationCount":1,"properties":[{"name":"id","displayName":"Risk Profile ID","description":"Unique identifier for the risk profile","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"risk_score","displayName":"Risk Score","description":"Numerical risk score (1-100)","type":"number","required":true,"semantics":[]},{"name":"status","displayName":"Risk Level","description":"Risk level classification","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["low","medium","high","very_high"],"defaultValue":"low"},{"name":"assessment_date","displayName":"Assessment Date","description":"Date when risk was assessed","type":"date","required":true,"semantics":[]},{"name":"description","displayName":"Description","description":"Risk assessment notes and factors","type":"string","semantics":["Semantic#Description"]},{"name":"created_at","displayName":"Created At","description":"When the risk profile was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"updated_at","displayName":"Updated At","description":"When the risk profile was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[{"name":"user","displayName":"User","description":"User for this risk profile","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"AccountManagement","displayName":"Account Management","description":"Bank accounts, investment accounts, and credit cards","modelCount":1,"entityCount":3,"models":[{"name":"Accounts","displayName":"Account Management","description":"Financial accounts and products","entityCount":3,"entities":[{"name":"bank_account","displayName":"Bank Account","description":"Checking and savings accounts","propertyCount":9,"associationCount":1,"properties":[{"name":"id","displayName":"Account ID","description":"Unique identifier for the account","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"account_number","displayName":"Account Number","description":"Bank account number","type":"string","required":true,"unique":true,"semantics":[]},{"name":"routing_number","displayName":"Routing Number","description":"Bank routing number","type":"string","required":true,"semantics":[]},{"name":"account_type","displayName":"Account Type","description":"Type of bank account","type":"string","required":true,"semantics":[],"enumValues":["checking","savings","money_market","cd"]},{"name":"balance","displayName":"Account Balance","description":"Current account balance","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"available_balance","displayName":"Available Balance","description":"Available balance for transactions","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"status","displayName":"Account Status","description":"Current status of the account","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["active","inactive","frozen","closed"],"defaultValue":"active"},{"name":"created_at","displayName":"Created At","description":"When the account was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"updated_at","displayName":"Updated At","description":"When the account was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[{"name":"user","displayName":"Account Holder","description":"User who owns this account","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"investment_account","displayName":"Investment Account","description":"Investment and brokerage accounts","propertyCount":7,"associationCount":1,"properties":[{"name":"id","displayName":"Investment Account ID","description":"Unique identifier for the investment account","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"account_number","displayName":"Account Number","description":"Investment account number","type":"string","required":true,"unique":true,"semantics":[]},{"name":"account_type","displayName":"Account Type","description":"Type of investment account","type":"string","required":true,"semantics":[],"enumValues":["individual","joint","ira","401k","roth_ira"]},{"name":"total_value","displayName":"Total Portfolio Value","description":"Total value of all investments","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"cash_balance","displayName":"Cash Balance","description":"Available cash balance","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"status","displayName":"Account Status","description":"Current status of the investment account","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["active","inactive","suspended","closed"],"defaultValue":"active"},{"name":"created_at","displayName":"Created At","description":"When the investment account was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"user","displayName":"Account Holder","description":"User who owns this investment account","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"credit_card","displayName":"Credit Card","description":"Credit card accounts and lines of credit","propertyCount":8,"associationCount":1,"properties":[{"name":"id","displayName":"Credit Card ID","description":"Unique identifier for the credit card","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"card_number","displayName":"Card Number","description":"Credit card number (masked)","type":"string","required":true,"writeOnly":true,"semantics":[]},{"name":"credit_limit","displayName":"Credit Limit","description":"Total credit limit","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"available_credit","displayName":"Available Credit","description":"Available credit remaining","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"current_balance","displayName":"Current Balance","description":"Current outstanding balance","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"apr","displayName":"APR","description":"Annual Percentage Rate","type":"number","required":true,"semantics":[]},{"name":"status","displayName":"Card Status","description":"Current status of the credit card","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["active","inactive","suspended","closed"],"defaultValue":"active"},{"name":"created_at","displayName":"Created At","description":"When the credit card was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"user","displayName":"Cardholder","description":"User who owns this credit card","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"Transaction Processing","displayName":"Transaction Processing","description":"Payments, transfers, deposits, and withdrawals","modelCount":1,"entityCount":2,"models":[{"name":"Transactions","displayName":"Transaction Management","description":"Financial transactions and transfers","entityCount":2,"entities":[{"name":"transaction","displayName":"Transaction","description":"Financial transaction record","propertyCount":9,"associationCount":2,"properties":[{"name":"id","displayName":"Transaction ID","description":"Unique identifier for the transaction","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"transaction_number","displayName":"Transaction Number","description":"Human-readable transaction number","type":"string","required":true,"unique":true,"semantics":[]},{"name":"status","displayName":"Transaction Status","description":"Current status of the transaction","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["pending","processing","completed","failed","cancelled"],"defaultValue":"pending"},{"name":"transaction_type","displayName":"Transaction Type","description":"Type of financial transaction","type":"string","required":true,"semantics":[],"enumValues":["deposit","withdrawal","transfer","payment","fee"]},{"name":"amount","displayName":"Transaction Amount","description":"Amount of the transaction","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"description","displayName":"Description","description":"Transaction description","type":"string","semantics":[]},{"name":"transaction_date","displayName":"Transaction Date","description":"Date when transaction occurred","type":"date","required":true,"semantics":[]},{"name":"reference_number","displayName":"Reference Number","description":"External reference number","type":"string","semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the transaction was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"user","displayName":"User","description":"User who initiated the transaction","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"},{"name":"account","displayName":"Account","description":"Account involved in the transaction","required":true,"multiple":false,"targetEntities":["bank_account"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"transfer","displayName":"Transfer","description":"Money transfers between accounts","propertyCount":5,"associationCount":2,"properties":[{"name":"id","displayName":"Transfer ID","description":"Unique identifier for the transfer","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"status","displayName":"Transfer Status","description":"Current status of the transfer","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["pending","processing","completed","failed","cancelled"],"defaultValue":"pending"},{"name":"amount","displayName":"Transfer Amount","description":"Amount being transferred","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"transfer_date","displayName":"Transfer Date","description":"Date when transfer was initiated","type":"date","required":true,"semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the transfer was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"from_account","displayName":"From Account","description":"Source account for the transfer","required":true,"multiple":false,"targetEntities":["bank_account"],"semantics":[],"cardinality":"One-to-One"},{"name":"to_account","displayName":"To Account","description":"Destination account for the transfer","required":true,"multiple":false,"targetEntities":["bank_account"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"Investment Portfolio","displayName":"Investment Portfolio","description":"Assets, positions, and performance tracking","modelCount":1,"entityCount":3,"models":[{"name":"Portfolios","displayName":"Portfolio Management","description":"Investment portfolios and assets","entityCount":3,"entities":[{"name":"asset","displayName":"Asset","description":"Investment asset (stocks, bonds, etc.)","propertyCount":7,"associationCount":0,"properties":[{"name":"id","displayName":"Asset ID","description":"Unique identifier for the asset","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"symbol","displayName":"Symbol","description":"Asset symbol/ticker","type":"string","required":true,"unique":true,"semantics":[]},{"name":"name","displayName":"Asset Name","description":"Name of the asset","type":"string","semantics":["Semantic#Title"]},{"name":"asset_type","displayName":"Asset Type","description":"Type of investment asset","type":"string","required":true,"semantics":[],"enumValues":["stock","bond","etf","mutual_fund","commodity","crypto"]},{"name":"current_price","displayName":"Current Price","description":"Current market price of the asset","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"market_cap","displayName":"Market Cap","description":"Market capitalization","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"created_at","displayName":"Created At","description":"When the asset was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[],"semantics":[]},{"name":"position","displayName":"Position","description":"Investment position in a portfolio","propertyCount":6,"associationCount":2,"properties":[{"name":"id","displayName":"Position ID","description":"Unique identifier for the position","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"quantity","displayName":"Quantity","description":"Number of shares/units held","type":"number","required":true,"semantics":[]},{"name":"average_cost","displayName":"Average Cost","description":"Average cost per share/unit","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"current_value","displayName":"Current Value","description":"Current market value of the position","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"unrealized_gain_loss","displayName":"Unrealized Gain/Loss","description":"Unrealized profit or loss","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"created_at","displayName":"Created At","description":"When the position was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"account","displayName":"Investment Account","description":"Account holding this position","required":true,"multiple":false,"targetEntities":["investment_account"],"semantics":[],"cardinality":"One-to-One"},{"name":"asset","displayName":"Asset","description":"Asset for this position","required":true,"multiple":false,"targetEntities":["asset"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"performance","displayName":"Performance","description":"Portfolio performance tracking","propertyCount":5,"associationCount":1,"properties":[{"name":"id","displayName":"Performance ID","description":"Unique identifier for the performance record","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"date","displayName":"Date","description":"Date of performance measurement","type":"date","required":true,"semantics":[]},{"name":"total_value","displayName":"Total Value","description":"Total portfolio value on this date","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"return_percentage","displayName":"Return Percentage","description":"Percentage return","type":"number","required":true,"semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the performance record was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"account","displayName":"Investment Account","description":"Account for this performance record","required":true,"multiple":false,"targetEntities":["investment_account"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"Compliance Reporting","displayName":"Compliance & Reporting","description":"Regulatory reporting and audit trails","modelCount":1,"entityCount":2,"models":[{"name":"Compliance","displayName":"Compliance Management","description":"Regulatory compliance and reporting","entityCount":2,"entities":[{"name":"audit_trail","displayName":"Audit Trail","description":"System audit trail for compliance","propertyCount":8,"associationCount":0,"properties":[{"name":"id","displayName":"Audit ID","description":"Unique identifier for the audit record","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"action","displayName":"Action","description":"Action performed","type":"string","required":true,"semantics":[]},{"name":"entity_type","displayName":"Entity Type","description":"Type of entity affected","type":"string","required":true,"semantics":[]},{"name":"entity_id","displayName":"Entity ID","description":"ID of the affected entity","type":"string","required":true,"semantics":[]},{"name":"user_id","displayName":"User ID","description":"User who performed the action","type":"string","required":true,"semantics":[]},{"name":"ip_address","displayName":"IP Address","description":"IP address of the user","type":"string","semantics":["Semantic#ClientIPAddress"]},{"name":"description","displayName":"Description","description":"Additional details about the action","type":"string","semantics":["Semantic#Description"]},{"name":"timestamp","displayName":"Timestamp","description":"When the action occurred","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[],"semantics":[]},{"name":"regulatory_report","displayName":"Regulatory Report","description":"Regulatory reporting requirements","propertyCount":7,"associationCount":0,"properties":[{"name":"id","displayName":"Report ID","description":"Unique identifier for the report","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"name","displayName":"Report Name","description":"Name of the regulatory report","type":"string","semantics":["Semantic#Title"]},{"name":"status","displayName":"Report Status","description":"Current status of the report","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["draft","submitted","approved","rejected"],"defaultValue":"draft"},{"name":"report_type","displayName":"Report Type","description":"Type of regulatory report","type":"string","required":true,"semantics":[],"enumValues":["suspicious_activity","large_transaction","annual_report","quarterly_report"]},{"name":"reporting_period","displayName":"Reporting Period","description":"Period covered by the report","type":"string","required":true,"semantics":[]},{"name":"description","displayName":"Description","description":"Report content and details","type":"string","semantics":["Semantic#Description"]},{"name":"created_at","displayName":"Created At","description":"When the report was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[],"semantics":[]}]}]},{"name":"FraudDetection","displayName":"Fraud Detection","description":"Transaction monitoring and risk scoring","modelCount":1,"entityCount":1,"models":[{"name":"FraudDetection","displayName":"Fraud Detection Management","description":"Fraud detection and monitoring","entityCount":1,"entities":[{"name":"fraud_alert","displayName":"Fraud Alert","description":"Fraud detection alerts and flags","propertyCount":6,"associationCount":2,"properties":[{"name":"id","displayName":"Alert ID","description":"Unique identifier for the fraud alert","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"status","displayName":"Alert Status","description":"Current status of the fraud alert","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["pending","investigating","resolved","false_positive"],"defaultValue":"pending"},{"name":"alert_type","displayName":"Alert Type","description":"Type of fraud alert","type":"string","required":true,"semantics":[],"enumValues":["suspicious_transaction","unusual_pattern","identity_theft","account_takeover"]},{"name":"risk_score","displayName":"Risk Score","description":"Risk score (1-100)","type":"number","required":true,"semantics":[]},{"name":"description","displayName":"Description","description":"Details about the fraud alert","type":"string","semantics":["Semantic#Description"]},{"name":"created_at","displayName":"Created At","description":"When the fraud alert was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"transaction","displayName":"Transaction","description":"Transaction that triggered the alert","required":false,"multiple":false,"targetEntities":["transaction"],"semantics":[],"cardinality":"One-to-One"},{"name":"user","displayName":"User","description":"User associated with the alert","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]}]}}
|
|
1
|
+
{"id":"financial-services-platform","name":"Financial Services Platform","description":"A comprehensive financial services platform with account management, transaction processing, customer management, investment portfolios, and compliance features. Perfect for banks, credit unions, and fintech companies.","createdAt":"2025-01-27T00:00:00.000Z","updatedAt":"2025-01-27T00:00:00.000Z","version":"1.0.0","author":"API Now! Core Team","tags":["finance","banking","investment","compliance","fraud-detection","kyc"],"structure":{"domain":{"name":"Financial Services Platform","description":"A comprehensive financial services platform with account management, transaction processing, customer management, investment portfolios, and compliance features","totalEntities":17,"totalProperties":127,"totalAssociations":17},"namespaces":[{"name":"User Management","displayName":"User & Authentication Management","description":"Unified user authentication, roles, and profile management for customers and employees","modelCount":2,"entityCount":6,"models":[{"name":"Authentication","displayName":"Authentication & Access Control","description":"User authentication, sessions, and access control","entityCount":2,"entities":[{"name":"user","displayName":"User","description":"Unified user entity for both customers and employees with role-based access","propertyCount":14,"associationCount":3,"properties":[{"name":"id","displayName":"User ID","description":"Unique identifier for the user","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"username","displayName":"Username","description":"Unique username for login","type":"string","required":true,"unique":true,"semantics":[]},{"name":"password","displayName":"Password","description":"User password (hashed)","type":"string","required":true,"writeOnly":true,"semantics":["Semantic#Password"]},{"name":"email","displayName":"Email Address","description":"User email address","type":"string","required":true,"unique":true,"semantics":["Semantic#Email"]},{"name":"first_name","displayName":"First Name","description":"User first name","type":"string","semantics":[]},{"name":"last_name","displayName":"Last Name","description":"User last name","type":"string","semantics":[]},{"name":"phone","displayName":"Phone Number","description":"User phone number","type":"string","semantics":["Semantic#Phone"]},{"name":"user_type","displayName":"User Type","description":"Type of user account","type":"string","required":true,"semantics":[],"enumValues":["customer","employee","admin","system"]},{"name":"role","displayName":"User Role","description":"User role defining permissions and access level","type":"string","required":true,"semantics":["Semantic#UserRole"],"enumValues":["individual_customer","business_customer","premium_customer","private_banking_customer","teller","loan_officer","relationship_manager","compliance_officer","branch_manager","investment_advisor","risk_analyst","system_admin","security_admin","audit_admin"]},{"name":"status","displayName":"User Status","description":"Current status of the user account","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["active","inactive","suspended","pending_verification","locked"],"defaultValue":"active"},{"name":"email_verified","displayName":"Email Verified","description":"Whether user email is verified","type":"boolean","required":true,"semantics":[]},{"name":"last_login","displayName":"Last Login","description":"When user last logged in","type":"datetime","semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the user account was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"updated_at","displayName":"Updated At","description":"When the user account was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[{"name":"sessions","displayName":"User Sessions","description":"Active sessions for this user","required":false,"multiple":true,"targetEntities":["user_session"],"semantics":[],"cardinality":"One-to-Many"},{"name":"customer_profile","displayName":"Customer Profile","description":"Extended customer profile information","required":false,"multiple":false,"targetEntities":["customer_profile"],"semantics":[],"cardinality":"One-to-One"},{"name":"employee_profile","displayName":"Employee Profile","description":"Extended employee profile information","required":false,"multiple":false,"targetEntities":["employee_profile"],"semantics":[],"cardinality":"One-to-One"}],"semantics":["Semantic#User"]},{"name":"user_session","displayName":"User Session","description":"Active user authentication sessions","propertyCount":5,"associationCount":0,"properties":[{"name":"id","displayName":"Session ID","description":"Unique session identifier","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"token","displayName":"Session Token","description":"Authentication token for the session","type":"string","required":true,"writeOnly":true,"semantics":[]},{"name":"expires_at","displayName":"Expires At","description":"When the session expires","type":"datetime","required":true,"semantics":[]},{"name":"ip_address","displayName":"IP Address","description":"IP address of the session","type":"string","semantics":["Semantic#ClientIPAddress"]},{"name":"created_at","displayName":"Created At","description":"When the session was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[],"semantics":[]}]},{"name":"User Profiles","displayName":"User Profile Management","description":"Extended user profile information and preferences","entityCount":4,"entities":[{"name":"customer_profile","displayName":"Customer Profile","description":"Additional profile information specific to customers","propertyCount":10,"associationCount":0,"properties":[{"name":"id","displayName":"Profile ID","description":"Unique profile identifier","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"date_of_birth","displayName":"Date of Birth","description":"Customer date of birth","type":"date","required":true,"semantics":[]},{"name":"ssn","displayName":"Social Security Number","description":"Customer SSN for identification","type":"string","required":true,"writeOnly":true,"semantics":[]},{"name":"address","displayName":"Address","description":"Customer residential address","type":"string","required":true,"semantics":[]},{"name":"city","displayName":"City","description":"Customer city","type":"string","required":true,"semantics":[]},{"name":"state","displayName":"State","description":"Customer state","type":"string","required":true,"semantics":[]},{"name":"zip_code","displayName":"ZIP Code","description":"Customer ZIP code","type":"string","required":true,"semantics":[]},{"name":"customer_type","displayName":"Customer Type","description":"Type of customer account","type":"string","required":true,"semantics":[],"enumValues":["individual","business","trust","partnership"]},{"name":"created_at","displayName":"Created At","description":"When the customer profile was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"updated_at","displayName":"Updated At","description":"When the customer profile was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[],"semantics":[]},{"name":"employee_profile","displayName":"Employee Profile","description":"Additional profile information specific to employees","propertyCount":7,"associationCount":0,"properties":[{"name":"id","displayName":"Employee Profile ID","description":"Unique employee profile identifier","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"employee_id","displayName":"Employee ID","description":"Company employee identifier","type":"string","required":true,"unique":true,"semantics":[]},{"name":"department","displayName":"Department","description":"Employee department","type":"string","required":true,"semantics":[],"enumValues":["retail_banking","commercial_banking","investment_services","risk_management","compliance","operations","technology","human_resources","legal"]},{"name":"hire_date","displayName":"Hire Date","description":"Employee hire date","type":"date","required":true,"semantics":[]},{"name":"manager_id","displayName":"Manager ID","description":"Employee manager identifier","type":"string","semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the employee profile was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"updated_at","displayName":"Updated At","description":"When the employee profile was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[],"semantics":[]},{"name":"kyc_record","displayName":"KYC Record","description":"Know Your Customer verification and documentation","propertyCount":7,"associationCount":1,"properties":[{"name":"id","displayName":"KYC ID","description":"Unique identifier for the KYC record","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"status","displayName":"KYC Status","description":"Current status of KYC verification","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["pending","verified","rejected","expired"],"defaultValue":"pending"},{"name":"verification_date","displayName":"Verification Date","description":"Date when KYC was verified","type":"date","semantics":[]},{"name":"document_type","displayName":"Document Type","description":"Type of identification document","type":"string","required":true,"semantics":[],"enumValues":["passport","drivers_license","national_id","utility_bill","bank_statement"]},{"name":"document_number","displayName":"Document Number","description":"Document identification number","type":"string","required":true,"semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the KYC record was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"updated_at","displayName":"Updated At","description":"When the KYC record was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[{"name":"user","displayName":"User","description":"User for this KYC record","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"risk_profile","displayName":"Risk Profile","description":"Customer risk assessment and scoring","propertyCount":7,"associationCount":1,"properties":[{"name":"id","displayName":"Risk Profile ID","description":"Unique identifier for the risk profile","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"risk_score","displayName":"Risk Score","description":"Numerical risk score (1-100)","type":"number","required":true,"semantics":[]},{"name":"status","displayName":"Risk Level","description":"Risk level classification","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["low","medium","high","very_high"],"defaultValue":"low"},{"name":"assessment_date","displayName":"Assessment Date","description":"Date when risk was assessed","type":"date","required":true,"semantics":[]},{"name":"description","displayName":"Description","description":"Risk assessment notes and factors","type":"string","semantics":["Semantic#Description"]},{"name":"created_at","displayName":"Created At","description":"When the risk profile was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"updated_at","displayName":"Updated At","description":"When the risk profile was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[{"name":"user","displayName":"User","description":"User for this risk profile","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"AccountManagement","displayName":"Account Management","description":"Bank accounts, investment accounts, and credit cards","modelCount":1,"entityCount":3,"models":[{"name":"Accounts","displayName":"Account Management","description":"Financial accounts and products","entityCount":3,"entities":[{"name":"bank_account","displayName":"Bank Account","description":"Checking and savings accounts","propertyCount":9,"associationCount":1,"properties":[{"name":"id","displayName":"Account ID","description":"Unique identifier for the account","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"account_number","displayName":"Account Number","description":"Bank account number","type":"string","required":true,"unique":true,"semantics":[]},{"name":"routing_number","displayName":"Routing Number","description":"Bank routing number","type":"string","required":true,"semantics":[]},{"name":"account_type","displayName":"Account Type","description":"Type of bank account","type":"string","required":true,"semantics":[],"enumValues":["checking","savings","money_market","cd"]},{"name":"balance","displayName":"Account Balance","description":"Current account balance","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"available_balance","displayName":"Available Balance","description":"Available balance for transactions","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"status","displayName":"Account Status","description":"Current status of the account","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["active","inactive","frozen","closed"],"defaultValue":"active"},{"name":"created_at","displayName":"Created At","description":"When the account was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]},{"name":"updated_at","displayName":"Updated At","description":"When the account was last updated","type":"datetime","readOnly":true,"semantics":["Semantic#UpdatedTimestamp"]}],"associations":[{"name":"user","displayName":"Account Holder","description":"User who owns this account","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"investment_account","displayName":"Investment Account","description":"Investment and brokerage accounts","propertyCount":7,"associationCount":1,"properties":[{"name":"id","displayName":"Investment Account ID","description":"Unique identifier for the investment account","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"account_number","displayName":"Account Number","description":"Investment account number","type":"string","required":true,"unique":true,"semantics":[]},{"name":"account_type","displayName":"Account Type","description":"Type of investment account","type":"string","required":true,"semantics":[],"enumValues":["individual","joint","ira","401k","roth_ira"]},{"name":"total_value","displayName":"Total Portfolio Value","description":"Total value of all investments","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"cash_balance","displayName":"Cash Balance","description":"Available cash balance","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"status","displayName":"Account Status","description":"Current status of the investment account","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["active","inactive","suspended","closed"],"defaultValue":"active"},{"name":"created_at","displayName":"Created At","description":"When the investment account was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"user","displayName":"Account Holder","description":"User who owns this investment account","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"credit_card","displayName":"Credit Card","description":"Credit card accounts and lines of credit","propertyCount":8,"associationCount":1,"properties":[{"name":"id","displayName":"Credit Card ID","description":"Unique identifier for the credit card","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"card_number","displayName":"Card Number","description":"Credit card number (masked)","type":"string","required":true,"writeOnly":true,"semantics":[]},{"name":"credit_limit","displayName":"Credit Limit","description":"Total credit limit","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"available_credit","displayName":"Available Credit","description":"Available credit remaining","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"current_balance","displayName":"Current Balance","description":"Current outstanding balance","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"apr","displayName":"APR","description":"Annual Percentage Rate","type":"number","required":true,"semantics":[]},{"name":"status","displayName":"Card Status","description":"Current status of the credit card","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["active","inactive","suspended","closed"],"defaultValue":"active"},{"name":"created_at","displayName":"Created At","description":"When the credit card was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"user","displayName":"Cardholder","description":"User who owns this credit card","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"Transaction Processing","displayName":"Transaction Processing","description":"Payments, transfers, deposits, and withdrawals","modelCount":1,"entityCount":2,"models":[{"name":"Transactions","displayName":"Transaction Management","description":"Financial transactions and transfers","entityCount":2,"entities":[{"name":"transaction","displayName":"Transaction","description":"Financial transaction record","propertyCount":9,"associationCount":2,"properties":[{"name":"id","displayName":"Transaction ID","description":"Unique identifier for the transaction","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"transaction_number","displayName":"Transaction Number","description":"Human-readable transaction number","type":"string","required":true,"unique":true,"semantics":[]},{"name":"status","displayName":"Transaction Status","description":"Current status of the transaction","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["pending","processing","completed","failed","cancelled"],"defaultValue":"pending"},{"name":"transaction_type","displayName":"Transaction Type","description":"Type of financial transaction","type":"string","required":true,"semantics":[],"enumValues":["deposit","withdrawal","transfer","payment","fee"]},{"name":"amount","displayName":"Transaction Amount","description":"Amount of the transaction","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"description","displayName":"Description","description":"Transaction description","type":"string","semantics":[]},{"name":"transaction_date","displayName":"Transaction Date","description":"Date when transaction occurred","type":"date","required":true,"semantics":[]},{"name":"reference_number","displayName":"Reference Number","description":"External reference number","type":"string","semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the transaction was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"user","displayName":"User","description":"User who initiated the transaction","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"},{"name":"account","displayName":"Account","description":"Account involved in the transaction","required":true,"multiple":false,"targetEntities":["bank_account"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"transfer","displayName":"Transfer","description":"Money transfers between accounts","propertyCount":5,"associationCount":2,"properties":[{"name":"id","displayName":"Transfer ID","description":"Unique identifier for the transfer","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"status","displayName":"Transfer Status","description":"Current status of the transfer","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["pending","processing","completed","failed","cancelled"],"defaultValue":"pending"},{"name":"amount","displayName":"Transfer Amount","description":"Amount being transferred","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"transfer_date","displayName":"Transfer Date","description":"Date when transfer was initiated","type":"date","required":true,"semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the transfer was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"from_account","displayName":"From Account","description":"Source account for the transfer","required":true,"multiple":false,"targetEntities":["bank_account"],"semantics":[],"cardinality":"One-to-One"},{"name":"to_account","displayName":"To Account","description":"Destination account for the transfer","required":true,"multiple":false,"targetEntities":["bank_account"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"Investment Portfolio","displayName":"Investment Portfolio","description":"Assets, positions, and performance tracking","modelCount":1,"entityCount":3,"models":[{"name":"Portfolios","displayName":"Portfolio Management","description":"Investment portfolios and assets","entityCount":3,"entities":[{"name":"asset","displayName":"Asset","description":"Investment asset (stocks, bonds, etc.)","propertyCount":7,"associationCount":0,"properties":[{"name":"id","displayName":"Asset ID","description":"Unique identifier for the asset","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"symbol","displayName":"Symbol","description":"Asset symbol/ticker","type":"string","required":true,"unique":true,"semantics":[]},{"name":"name","displayName":"Asset Name","description":"Name of the asset","type":"string","semantics":["Semantic#Title"]},{"name":"asset_type","displayName":"Asset Type","description":"Type of investment asset","type":"string","required":true,"semantics":[],"enumValues":["stock","bond","etf","mutual_fund","commodity","crypto"]},{"name":"current_price","displayName":"Current Price","description":"Current market price of the asset","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"market_cap","displayName":"Market Cap","description":"Market capitalization","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"created_at","displayName":"Created At","description":"When the asset was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[],"semantics":[]},{"name":"position","displayName":"Position","description":"Investment position in a portfolio","propertyCount":6,"associationCount":2,"properties":[{"name":"id","displayName":"Position ID","description":"Unique identifier for the position","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"quantity","displayName":"Quantity","description":"Number of shares/units held","type":"number","required":true,"semantics":[]},{"name":"average_cost","displayName":"Average Cost","description":"Average cost per share/unit","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"current_value","displayName":"Current Value","description":"Current market value of the position","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"unrealized_gain_loss","displayName":"Unrealized Gain/Loss","description":"Unrealized profit or loss","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"created_at","displayName":"Created At","description":"When the position was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"account","displayName":"Investment Account","description":"Account holding this position","required":true,"multiple":false,"targetEntities":["investment_account"],"semantics":[],"cardinality":"One-to-One"},{"name":"asset","displayName":"Asset","description":"Asset for this position","required":true,"multiple":false,"targetEntities":["asset"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]},{"name":"performance","displayName":"Performance","description":"Portfolio performance tracking","propertyCount":5,"associationCount":1,"properties":[{"name":"id","displayName":"Performance ID","description":"Unique identifier for the performance record","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"date","displayName":"Date","description":"Date of performance measurement","type":"date","required":true,"semantics":[]},{"name":"total_value","displayName":"Total Value","description":"Total portfolio value on this date","type":"number","required":true,"semantics":["Semantic#Currency"]},{"name":"return_percentage","displayName":"Return Percentage","description":"Percentage return","type":"number","required":true,"semantics":[]},{"name":"created_at","displayName":"Created At","description":"When the performance record was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"account","displayName":"Investment Account","description":"Account for this performance record","required":true,"multiple":false,"targetEntities":["investment_account"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]},{"name":"Compliance Reporting","displayName":"Compliance & Reporting","description":"Regulatory reporting and audit trails","modelCount":1,"entityCount":2,"models":[{"name":"Compliance","displayName":"Compliance Management","description":"Regulatory compliance and reporting","entityCount":2,"entities":[{"name":"audit_trail","displayName":"Audit Trail","description":"System audit trail for compliance","propertyCount":8,"associationCount":0,"properties":[{"name":"id","displayName":"Audit ID","description":"Unique identifier for the audit record","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"action","displayName":"Action","description":"Action performed","type":"string","required":true,"semantics":[]},{"name":"entity_type","displayName":"Entity Type","description":"Type of entity affected","type":"string","required":true,"semantics":[]},{"name":"entity_id","displayName":"Entity ID","description":"ID of the affected entity","type":"string","required":true,"semantics":[]},{"name":"user_id","displayName":"User ID","description":"User who performed the action","type":"string","required":true,"semantics":[]},{"name":"ip_address","displayName":"IP Address","description":"IP address of the user","type":"string","semantics":["Semantic#ClientIPAddress"]},{"name":"description","displayName":"Description","description":"Additional details about the action","type":"string","semantics":["Semantic#Description"]},{"name":"timestamp","displayName":"Timestamp","description":"When the action occurred","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[],"semantics":[]},{"name":"regulatory_report","displayName":"Regulatory Report","description":"Regulatory reporting requirements","propertyCount":7,"associationCount":0,"properties":[{"name":"id","displayName":"Report ID","description":"Unique identifier for the report","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"name","displayName":"Report Name","description":"Name of the regulatory report","type":"string","semantics":["Semantic#Title"]},{"name":"status","displayName":"Report Status","description":"Current status of the report","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["draft","submitted","approved","rejected"],"defaultValue":"draft"},{"name":"report_type","displayName":"Report Type","description":"Type of regulatory report","type":"string","required":true,"semantics":[],"enumValues":["suspicious_activity","large_transaction","annual_report","quarterly_report"]},{"name":"reporting_period","displayName":"Reporting Period","description":"Period covered by the report","type":"string","required":true,"semantics":[]},{"name":"description","displayName":"Description","description":"Report content and details","type":"string","semantics":["Semantic#Description"]},{"name":"created_at","displayName":"Created At","description":"When the report was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[],"semantics":[]}]}]},{"name":"FraudDetection","displayName":"Fraud Detection","description":"Transaction monitoring and risk scoring","modelCount":1,"entityCount":1,"models":[{"name":"FraudDetection","displayName":"Fraud Detection Management","description":"Fraud detection and monitoring","entityCount":1,"entities":[{"name":"fraud_alert","displayName":"Fraud Alert","description":"Fraud detection alerts and flags","propertyCount":6,"associationCount":2,"properties":[{"name":"id","displayName":"Alert ID","description":"Unique identifier for the fraud alert","type":"string","primary":true,"readOnly":true,"semantics":[]},{"name":"status","displayName":"Alert Status","description":"Current status of the fraud alert","type":"string","required":true,"semantics":["Semantic#Status"],"enumValues":["pending","investigating","resolved","false_positive"],"defaultValue":"pending"},{"name":"alert_type","displayName":"Alert Type","description":"Type of fraud alert","type":"string","required":true,"semantics":[],"enumValues":["suspicious_transaction","unusual_pattern","identity_theft","account_takeover"]},{"name":"risk_score","displayName":"Risk Score","description":"Risk score (1-100)","type":"number","required":true,"semantics":[]},{"name":"description","displayName":"Description","description":"Details about the fraud alert","type":"string","semantics":["Semantic#Description"]},{"name":"created_at","displayName":"Created At","description":"When the fraud alert was created","type":"datetime","readOnly":true,"semantics":["Semantic#CreatedTimestamp"]}],"associations":[{"name":"transaction","displayName":"Transaction","description":"Transaction that triggered the alert","required":false,"multiple":false,"targetEntities":["transaction"],"semantics":[],"cardinality":"One-to-One"},{"name":"user","displayName":"User","description":"User associated with the alert","required":true,"multiple":false,"targetEntities":["user"],"semantics":[],"cardinality":"One-to-One"}],"semantics":[]}]}]}]}}
|
|
@@ -454,10 +454,18 @@ export default function createBlogDomain(options: CreateTemplateOptions = {}): D
|
|
|
454
454
|
// // semantics: [{ id: SemanticType.SocialMediaLinks }],
|
|
455
455
|
// })
|
|
456
456
|
|
|
457
|
-
|
|
458
|
-
name: 'role',
|
|
459
|
-
|
|
460
|
-
|
|
457
|
+
userEntity.addProperty({
|
|
458
|
+
info: { name: 'role', displayName: 'User Role', description: 'User role for permission management' },
|
|
459
|
+
type: 'string',
|
|
460
|
+
required: true,
|
|
461
|
+
schema: {
|
|
462
|
+
enum: ['subscriber', 'author', 'editor', 'admin', 'super_admin'],
|
|
463
|
+
defaultValue: {
|
|
464
|
+
type: 'literal',
|
|
465
|
+
value: 'subscriber',
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
semantics: [{ id: SemanticType.UserRole }],
|
|
461
469
|
})
|
|
462
470
|
|
|
463
471
|
addCustomStatusField(userEntity, ['active', 'inactive', 'suspended', 'pending_verification'], {
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { test } from '@japa/runner'
|
|
2
|
+
import {
|
|
3
|
+
SemanticType,
|
|
4
|
+
DataSemantics,
|
|
5
|
+
isPropertySemantic,
|
|
6
|
+
SemanticCategory,
|
|
7
|
+
SemanticScope,
|
|
8
|
+
SemanticTiming,
|
|
9
|
+
SemanticOperation,
|
|
10
|
+
} from '../../../src/modeling/Semantics.js'
|
|
11
|
+
|
|
12
|
+
test.group('Username Semantic', () => {
|
|
13
|
+
test('should exist in SemanticType enum', ({ assert }) => {
|
|
14
|
+
assert.equal(SemanticType.Username, 'Semantic#Username')
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
test('should exist in DataSemantics registry', ({ assert }) => {
|
|
18
|
+
const semantic = DataSemantics[SemanticType.Username]
|
|
19
|
+
assert.isDefined(semantic)
|
|
20
|
+
assert.equal(semantic.id, SemanticType.Username)
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
test('should be a property semantic', ({ assert }) => {
|
|
24
|
+
const semantic = DataSemantics[SemanticType.Username]
|
|
25
|
+
assert.isTrue(isPropertySemantic(semantic))
|
|
26
|
+
assert.equal(semantic.scope, SemanticScope.Property)
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
test('should have correct display name and description', ({ assert }) => {
|
|
30
|
+
const semantic = DataSemantics[SemanticType.Username]
|
|
31
|
+
assert.equal(semantic.displayName, 'Username')
|
|
32
|
+
assert.equal(semantic.description, 'User authentication identifier')
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
test('should be in Identity category', ({ assert }) => {
|
|
36
|
+
const semantic = DataSemantics[SemanticType.Username]
|
|
37
|
+
assert.equal(semantic.category, SemanticCategory.Identity)
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
test('should only apply to string data types', ({ assert }) => {
|
|
41
|
+
const semantic = DataSemantics[SemanticType.Username]
|
|
42
|
+
if (isPropertySemantic(semantic)) {
|
|
43
|
+
assert.deepEqual(semantic.applicableDataTypes, ['string'])
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
test('should not have configuration', ({ assert }) => {
|
|
48
|
+
const semantic = DataSemantics[SemanticType.Username]
|
|
49
|
+
assert.isFalse(semantic.hasConfig)
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
test('should not be disableable for security reasons', ({ assert }) => {
|
|
53
|
+
const semantic = DataSemantics[SemanticType.Username]
|
|
54
|
+
assert.isFalse(semantic.runtime.canDisable)
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
test('should have correct runtime configuration', ({ assert }) => {
|
|
58
|
+
const semantic = DataSemantics[SemanticType.Username]
|
|
59
|
+
const runtime = semantic.runtime
|
|
60
|
+
|
|
61
|
+
assert.equal(runtime.timing, SemanticTiming.Before)
|
|
62
|
+
assert.deepEqual(runtime.operations, [SemanticOperation.Create, SemanticOperation.Update, SemanticOperation.Read])
|
|
63
|
+
assert.equal(runtime.priority, 15) // High priority for authentication
|
|
64
|
+
assert.equal(runtime.timeoutMs, 100) // Fast operation
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
test('should have higher priority than general user properties but lower than password', ({ assert }) => {
|
|
68
|
+
const usernameSemantic = DataSemantics[SemanticType.Username]
|
|
69
|
+
const passwordSemantic = DataSemantics[SemanticType.Password]
|
|
70
|
+
const userRoleSemantic = DataSemantics[SemanticType.UserRole]
|
|
71
|
+
|
|
72
|
+
const usernameP = usernameSemantic.runtime.priority ?? 100
|
|
73
|
+
const passwordP = passwordSemantic.runtime.priority ?? 100
|
|
74
|
+
const userRoleP = userRoleSemantic.runtime.priority ?? 100
|
|
75
|
+
|
|
76
|
+
// Username should have lower priority number (higher priority) than UserRole
|
|
77
|
+
assert.isAtMost(usernameP, userRoleP)
|
|
78
|
+
// But higher priority number (lower priority) than Password
|
|
79
|
+
assert.isAtLeast(usernameP, passwordP)
|
|
80
|
+
})
|
|
81
|
+
})
|