@api-client/core 0.18.20 → 0.18.22
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/helpers/Intelisense.d.ts +1 -0
- package/build/src/modeling/helpers/Intelisense.d.ts.map +1 -1
- package/build/src/modeling/helpers/Intelisense.js +1 -0
- package/build/src/modeling/helpers/Intelisense.js.map +1 -1
- package/build/src/modeling/templates/index.d.ts +21 -0
- package/build/src/modeling/templates/index.d.ts.map +1 -0
- package/build/src/modeling/templates/index.js +176 -0
- package/build/src/modeling/templates/index.js.map +1 -0
- package/build/src/modeling/templates/meta/blog-publishing-platform.json +1 -0
- package/build/src/modeling/templates/meta/ecommerce-platform.json +1 -0
- package/build/src/modeling/templates/meta/education-management-platform.json +1 -0
- package/build/src/modeling/templates/meta/financial-services-platform.json +1 -0
- package/build/src/modeling/templates/meta/gaming-platform.json +1 -0
- package/build/src/modeling/templates/meta/healthcare-management-platform.json +1 -0
- package/build/src/modeling/templates/meta/hospitality-platform.json +1 -0
- package/build/src/modeling/templates/meta/index.d.ts +56 -0
- package/build/src/modeling/templates/meta/index.d.ts.map +1 -0
- package/build/src/modeling/templates/meta/index.js +120 -0
- package/build/src/modeling/templates/meta/index.js.map +1 -0
- package/build/src/modeling/templates/meta/iot-smart-home-platform.json +1 -0
- package/build/src/modeling/templates/meta/legal-services-platform.json +1 -0
- package/build/src/modeling/templates/meta/manufacturing-platform.json +1 -0
- package/build/src/modeling/templates/meta/non-profit-platform.json +1 -0
- package/build/src/modeling/templates/meta/real-estate-management-platform.json +1 -0
- package/build/src/modeling/templates/template-registry.d.ts +55 -0
- package/build/src/modeling/templates/template-registry.d.ts.map +1 -0
- package/build/src/modeling/templates/template-registry.js +111 -0
- package/build/src/modeling/templates/template-registry.js.map +1 -0
- package/build/src/modeling/templates/types.d.ts +158 -0
- package/build/src/modeling/templates/types.d.ts.map +1 -1
- package/build/src/modeling/templates/types.js.map +1 -1
- package/build/src/modeling/templates/{ecommerce-domain.d.ts → verticals/business-services/ecommerce-domain.d.ts} +2 -2
- package/build/src/modeling/templates/verticals/business-services/ecommerce-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/{ecommerce-domain.js → verticals/business-services/ecommerce-domain.js} +6 -6
- package/build/src/modeling/templates/verticals/business-services/ecommerce-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.d.ts +40 -0
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js +744 -0
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/hospitality-domain.d.ts +45 -0
- package/build/src/modeling/templates/verticals/business-services/hospitality-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/hospitality-domain.js +797 -0
- package/build/src/modeling/templates/verticals/business-services/hospitality-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/index.d.ts +21 -0
- package/build/src/modeling/templates/verticals/business-services/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/index.js +50 -0
- package/build/src/modeling/templates/verticals/business-services/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/legal-services-domain.d.ts +46 -0
- package/build/src/modeling/templates/verticals/business-services/legal-services-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/legal-services-domain.js +837 -0
- package/build/src/modeling/templates/verticals/business-services/legal-services-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/education-training/education-domain.d.ts +40 -0
- package/build/src/modeling/templates/verticals/education-training/education-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/education-training/education-domain.js +725 -0
- package/build/src/modeling/templates/verticals/education-training/education-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/education-training/index.d.ts +18 -0
- package/build/src/modeling/templates/verticals/education-training/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/education-training/index.js +21 -0
- package/build/src/modeling/templates/verticals/education-training/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.d.ts +40 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.js +859 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/index.d.ts +18 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/index.js +21 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/index.d.ts +79 -0
- package/build/src/modeling/templates/verticals/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/index.js +186 -0
- package/build/src/modeling/templates/verticals/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/index.d.ts +18 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/index.js +22 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.d.ts +45 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.js +710 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/public-sector/index.d.ts +18 -0
- package/build/src/modeling/templates/verticals/public-sector/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/public-sector/index.js +22 -0
- package/build/src/modeling/templates/verticals/public-sector/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/public-sector/non-profit-domain.d.ts +47 -0
- package/build/src/modeling/templates/verticals/public-sector/non-profit-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/public-sector/non-profit-domain.js +864 -0
- package/build/src/modeling/templates/verticals/public-sector/non-profit-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/index.d.ts +18 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/index.js +21 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.d.ts +40 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.js +727 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.js.map +1 -0
- package/build/src/modeling/templates/{blog-domain.d.ts → verticals/technology-media/blog-domain.d.ts} +2 -2
- package/build/src/modeling/templates/verticals/technology-media/blog-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/{blog-domain.js → verticals/technology-media/blog-domain.js} +5 -5
- package/build/src/modeling/templates/verticals/technology-media/blog-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/technology-media/gaming-domain.d.ts +46 -0
- package/build/src/modeling/templates/verticals/technology-media/gaming-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/technology-media/gaming-domain.js +1033 -0
- package/build/src/modeling/templates/verticals/technology-media/gaming-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/technology-media/index.d.ts +21 -0
- package/build/src/modeling/templates/verticals/technology-media/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/technology-media/index.js +42 -0
- package/build/src/modeling/templates/verticals/technology-media/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.d.ts +47 -0
- package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.js +1027 -0
- package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/data/models/example-generator-api.json +6 -6
- package/package.json +1 -1
- package/src/modeling/helpers/Intelisense.ts +1 -0
- package/src/modeling/templates/meta/blog-publishing-platform.json +1 -0
- package/src/modeling/templates/meta/ecommerce-platform.json +1 -0
- package/src/modeling/templates/meta/education-management-platform.json +1 -0
- package/src/modeling/templates/meta/financial-services-platform.json +1 -0
- package/src/modeling/templates/meta/gaming-platform.json +1 -0
- package/src/modeling/templates/meta/healthcare-management-platform.json +1 -0
- package/src/modeling/templates/meta/hospitality-platform.json +1 -0
- package/src/modeling/templates/meta/iot-smart-home-platform.json +1 -0
- package/src/modeling/templates/meta/legal-services-platform.json +1 -0
- package/src/modeling/templates/meta/manufacturing-platform.json +1 -0
- package/src/modeling/templates/meta/non-profit-platform.json +1 -0
- package/src/modeling/templates/meta/real-estate-management-platform.json +1 -0
- package/src/modeling/templates/readme.md +260 -0
- package/src/modeling/templates/template-registry.ts +140 -0
- package/src/modeling/templates/types.ts +166 -0
- package/src/modeling/templates/verticals/README.md +122 -0
- package/src/modeling/templates/{ecommerce-domain.ts → verticals/business-services/ecommerce-domain.ts} +7 -7
- package/src/modeling/templates/verticals/business-services/financial-services-domain.ts +943 -0
- package/src/modeling/templates/verticals/business-services/hospitality-domain.ts +994 -0
- package/src/modeling/templates/verticals/business-services/legal-services-domain.ts +1059 -0
- package/src/modeling/templates/verticals/education-training/education-domain.ts +922 -0
- package/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.ts +1111 -0
- package/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.ts +895 -0
- package/src/modeling/templates/verticals/public-sector/non-profit-domain.ts +1109 -0
- package/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.ts +944 -0
- package/src/modeling/templates/{blog-domain.ts → verticals/technology-media/blog-domain.ts} +6 -6
- package/src/modeling/templates/verticals/technology-media/gaming-domain.ts +1290 -0
- package/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.ts +1287 -0
- package/build/src/modeling/templates/blog-domain.d.ts.map +0 -1
- package/build/src/modeling/templates/blog-domain.js.map +0 -1
- package/build/src/modeling/templates/ecommerce-domain.d.ts.map +0 -1
- package/build/src/modeling/templates/ecommerce-domain.js.map +0 -1
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { getAllTemplates, getTemplate, getTemplatesByTag, getTemplatesByCategory, searchTemplates, getTemplateStats, } from './meta/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Registry of all available domain templates with their metadata.
|
|
4
|
+
* This provides a central location for UI components to discover and present templates.
|
|
5
|
+
*
|
|
6
|
+
* The templates are pre-processed at build time using the generate-template-metadata.js script
|
|
7
|
+
* to avoid loading and processing all templates on the client side.
|
|
8
|
+
*/
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
|
|
10
|
+
export class TemplateRegistry {
|
|
11
|
+
/**
|
|
12
|
+
* Gets all available templates
|
|
13
|
+
*/
|
|
14
|
+
static getAllTemplates() {
|
|
15
|
+
return getAllTemplates();
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Gets a template by its ID
|
|
19
|
+
*/
|
|
20
|
+
static getTemplate(id) {
|
|
21
|
+
return getTemplate(id);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Gets templates filtered by tags
|
|
25
|
+
*/
|
|
26
|
+
static getTemplatesByTag(tag) {
|
|
27
|
+
return getTemplatesByTag(tag);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Gets templates filtered by category (based on tags)
|
|
31
|
+
*/
|
|
32
|
+
static getTemplatesByCategory(category) {
|
|
33
|
+
return getTemplatesByCategory(category);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Gets templates filtered by industry vertical
|
|
37
|
+
*/
|
|
38
|
+
static getTemplatesByVertical(vertical) {
|
|
39
|
+
// This would need to be implemented in the meta/index.js
|
|
40
|
+
return getAllTemplates().filter((template) => template.tags?.some((tag) => tag.toLowerCase().includes(vertical.toLowerCase())));
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Gets all available industry verticals
|
|
44
|
+
*/
|
|
45
|
+
static getIndustryVerticals() {
|
|
46
|
+
return [
|
|
47
|
+
{
|
|
48
|
+
id: 'business-services',
|
|
49
|
+
name: 'Business Services',
|
|
50
|
+
description: 'E-commerce, Financial Services, Legal Services',
|
|
51
|
+
subcategories: ['E-commerce', 'Financial Services', 'Legal Services'],
|
|
52
|
+
templateCount: 4,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 'healthcare-life-sciences',
|
|
56
|
+
name: 'Healthcare & Life Sciences',
|
|
57
|
+
description: 'Healthcare, Pharmaceutical, Research',
|
|
58
|
+
subcategories: ['Healthcare', 'Pharmaceutical', 'Research'],
|
|
59
|
+
templateCount: 1,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'education-training',
|
|
63
|
+
name: 'Education & Training',
|
|
64
|
+
description: 'Education, Corporate Training, Certification',
|
|
65
|
+
subcategories: ['Education', 'Corporate Training', 'Certification'],
|
|
66
|
+
templateCount: 1,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'real-estate-construction',
|
|
70
|
+
name: 'Real Estate & Construction',
|
|
71
|
+
description: 'Real Estate, Construction, Property Management',
|
|
72
|
+
subcategories: ['Real Estate', 'Construction', 'Property Management'],
|
|
73
|
+
templateCount: 1,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 'manufacturing-logistics',
|
|
77
|
+
name: 'Manufacturing & Logistics',
|
|
78
|
+
description: 'Manufacturing, Supply Chain, Distribution',
|
|
79
|
+
subcategories: ['Manufacturing', 'Supply Chain', 'Distribution'],
|
|
80
|
+
templateCount: 1,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 'technology-media',
|
|
84
|
+
name: 'Technology & Media',
|
|
85
|
+
description: 'Gaming, IoT, Content Management, Social Media',
|
|
86
|
+
subcategories: ['Gaming', 'IoT', 'Content Management', 'Social Media'],
|
|
87
|
+
templateCount: 3,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: 'public-sector',
|
|
91
|
+
name: 'Public Sector',
|
|
92
|
+
description: 'Government, Non-Profit, Healthcare',
|
|
93
|
+
subcategories: ['Government', 'Non-Profit', 'Healthcare'],
|
|
94
|
+
templateCount: 1,
|
|
95
|
+
},
|
|
96
|
+
];
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Searches templates by name or description
|
|
100
|
+
*/
|
|
101
|
+
static searchTemplates(query) {
|
|
102
|
+
return searchTemplates(query);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Gets template statistics for analytics
|
|
106
|
+
*/
|
|
107
|
+
static getTemplateStats() {
|
|
108
|
+
return getTemplateStats();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=template-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-registry.js","sourceRoot":"","sources":["../../../../src/modeling/templates/template-registry.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,GACjB,MAAM,iBAAiB,CAAA;AAExB;;;;;;GAMG;AACH,kEAAkE;AAClE,MAAM,OAAO,gBAAgB;IAC3B;;OAEG;IACH,MAAM,CAAC,eAAe;QACpB,OAAO,eAAe,EAAE,CAAA;IAC1B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,EAAU;QAC3B,OAAO,WAAW,CAAC,EAAE,CAAC,CAAA;IACxB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,GAAW;QAClC,OAAO,iBAAiB,CAAC,GAAG,C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YACD;gBACE,EAAE,EAAE,yBAAyB;gBAC7B,IAAI,EAAE,2BAA2B;gBACjC,WAAW,EAAE,2CAA2C;gBACxD,aAAa,EAAE,CAAC,eAAe,EAAE,cAAc,EAAE,cAAc,CAAC;gBAChE,aAAa,EAAE,CAAC;aACjB;YACD;gBACE,EAAE,EAAE,kBAAkB;gBACtB,IAAI,EAAE,oBAAoB;gBAC1B,WAAW,EAAE,+CAA+C;gBAC5D,aAAa,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE,cAAc,CAAC;gBACtE,aAAa,EAAE,CAAC;aACjB;YACD;gBACE,EAAE,EAAE,eAAe;gBACnB,IAAI,EAAE,eAAe;gBACrB,WAAW,EAAE,oCAAoC;gBACjD,aAAa,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC;gBACzD,aAAa,EAAE,CAAC;aACjB;SACF,CAAA;IACH,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,KAAa;QAClC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,gBAAgB;QAOrB,OAAO,gBAAgB,EAAE,CAAA;IAC3B,CAAC;CACF","sourcesContent":["import type { DomainTemplate } from './types.js'\nimport {\n getAllTemplates,\n getTemplate,\n getTemplatesByTag,\n getTemplatesByCategory,\n searchTemplates,\n getTemplateStats,\n} from './meta/index.js'\n\n/**\n * Registry of all available domain templates with their metadata.\n * This provides a central location for UI components to discover and present templates.\n *\n * The templates are pre-processed at build time using the generate-template-metadata.js script\n * to avoid loading and processing all templates on the client side.\n */\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nexport class TemplateRegistry {\n /**\n * Gets all available templates\n */\n static getAllTemplates(): DomainTemplate[] {\n return getAllTemplates()\n }\n\n /**\n * Gets a template by its ID\n */\n static getTemplate(id: string): DomainTemplate | undefined {\n return getTemplate(id)\n }\n\n /**\n * Gets templates filtered by tags\n */\n static getTemplatesByTag(tag: string): DomainTemplate[] {\n return getTemplatesByTag(tag)\n }\n\n /**\n * Gets templates filtered by category (based on tags)\n */\n static getTemplatesByCategory(category: 'business' | 'content' | 'social' | 'technical'): DomainTemplate[] {\n return getTemplatesByCategory(category)\n }\n\n /**\n * Gets templates filtered by industry vertical\n */\n static getTemplatesByVertical(vertical: string): DomainTemplate[] {\n // This would need to be implemented in the meta/index.js\n return getAllTemplates().filter((template) =>\n template.tags?.some((tag) => tag.toLowerCase().includes(vertical.toLowerCase()))\n )\n }\n\n /**\n * Gets all available industry verticals\n */\n static getIndustryVerticals(): {\n id: string\n name: string\n description: string\n subcategories: string[]\n templateCount: number\n }[] {\n return [\n {\n id: 'business-services',\n name: 'Business Services',\n description: 'E-commerce, Financial Services, Legal Services',\n subcategories: ['E-commerce', 'Financial Services', 'Legal Services'],\n templateCount: 4,\n },\n {\n id: 'healthcare-life-sciences',\n name: 'Healthcare & Life Sciences',\n description: 'Healthcare, Pharmaceutical, Research',\n subcategories: ['Healthcare', 'Pharmaceutical', 'Research'],\n templateCount: 1,\n },\n {\n id: 'education-training',\n name: 'Education & Training',\n description: 'Education, Corporate Training, Certification',\n subcategories: ['Education', 'Corporate Training', 'Certification'],\n templateCount: 1,\n },\n {\n id: 'real-estate-construction',\n name: 'Real Estate & Construction',\n description: 'Real Estate, Construction, Property Management',\n subcategories: ['Real Estate', 'Construction', 'Property Management'],\n templateCount: 1,\n },\n {\n id: 'manufacturing-logistics',\n name: 'Manufacturing & Logistics',\n description: 'Manufacturing, Supply Chain, Distribution',\n subcategories: ['Manufacturing', 'Supply Chain', 'Distribution'],\n templateCount: 1,\n },\n {\n id: 'technology-media',\n name: 'Technology & Media',\n description: 'Gaming, IoT, Content Management, Social Media',\n subcategories: ['Gaming', 'IoT', 'Content Management', 'Social Media'],\n templateCount: 3,\n },\n {\n id: 'public-sector',\n name: 'Public Sector',\n description: 'Government, Non-Profit, Healthcare',\n subcategories: ['Government', 'Non-Profit', 'Healthcare'],\n templateCount: 1,\n },\n ]\n }\n\n /**\n * Searches templates by name or description\n */\n static searchTemplates(query: string): DomainTemplate[] {\n return searchTemplates(query)\n }\n\n /**\n * Gets template statistics for analytics\n */\n static getTemplateStats(): {\n totalTemplates: number\n totalEntities: number\n totalProperties: number\n totalAssociations: number\n categoryCounts: Record<string, number>\n } {\n return getTemplateStats()\n }\n}\n"]}
|
|
@@ -6,4 +6,162 @@ export interface CreateTemplateOptions {
|
|
|
6
6
|
*/
|
|
7
7
|
domain?: DataDomain;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Template metadata for UI presentation
|
|
11
|
+
*/
|
|
12
|
+
export interface DomainTemplate {
|
|
13
|
+
/** Unique identifier for the template */
|
|
14
|
+
id: string;
|
|
15
|
+
/** Display name of the template */
|
|
16
|
+
name: string;
|
|
17
|
+
/** Short description of what the template does (plain text, no HTML/markdown) */
|
|
18
|
+
description: string;
|
|
19
|
+
/** When the template was created (ISO string) */
|
|
20
|
+
createdAt: string;
|
|
21
|
+
/** When the template was last updated (ISO string) */
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
/** Template version */
|
|
24
|
+
version: string;
|
|
25
|
+
/** Author information */
|
|
26
|
+
author: string;
|
|
27
|
+
/** Template categorization tags */
|
|
28
|
+
tags: string[];
|
|
29
|
+
/** Detailed domain structure for UI presentation */
|
|
30
|
+
structure: DomainTemplateStructure;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Detailed domain structure information for UI presentation
|
|
34
|
+
*/
|
|
35
|
+
export interface DomainTemplateStructure {
|
|
36
|
+
/** Domain information */
|
|
37
|
+
domain: DomainInfo;
|
|
38
|
+
/** List of namespaces in the domain */
|
|
39
|
+
namespaces: NamespaceInfo[];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Domain-level information
|
|
43
|
+
*/
|
|
44
|
+
export interface DomainInfo {
|
|
45
|
+
/** Domain name */
|
|
46
|
+
name: string;
|
|
47
|
+
/** Domain description */
|
|
48
|
+
description?: string;
|
|
49
|
+
/** Total number of entities across all namespaces */
|
|
50
|
+
totalEntities: number;
|
|
51
|
+
/** Total number of properties across all entities */
|
|
52
|
+
totalProperties: number;
|
|
53
|
+
/** Total number of associations across all entities */
|
|
54
|
+
totalAssociations: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Namespace-level information
|
|
58
|
+
*/
|
|
59
|
+
export interface NamespaceInfo {
|
|
60
|
+
/** Namespace name */
|
|
61
|
+
name: string;
|
|
62
|
+
/** Namespace display name */
|
|
63
|
+
displayName?: string;
|
|
64
|
+
/** Namespace description */
|
|
65
|
+
description?: string;
|
|
66
|
+
/** Number of models in this namespace */
|
|
67
|
+
modelCount: number;
|
|
68
|
+
/** Number of entities in this namespace */
|
|
69
|
+
entityCount: number;
|
|
70
|
+
/** List of models in this namespace */
|
|
71
|
+
models: ModelInfo[];
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Model-level information
|
|
75
|
+
*/
|
|
76
|
+
export interface ModelInfo {
|
|
77
|
+
/** Model name */
|
|
78
|
+
name: string;
|
|
79
|
+
/** Model display name */
|
|
80
|
+
displayName?: string;
|
|
81
|
+
/** Model description */
|
|
82
|
+
description?: string;
|
|
83
|
+
/** Number of entities in this model */
|
|
84
|
+
entityCount: number;
|
|
85
|
+
/** List of entities in this model */
|
|
86
|
+
entities: EntityInfo[];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Entity-level information for UI presentation
|
|
90
|
+
*/
|
|
91
|
+
export interface EntityInfo {
|
|
92
|
+
/** Entity name */
|
|
93
|
+
name: string;
|
|
94
|
+
/** Entity display name */
|
|
95
|
+
displayName?: string;
|
|
96
|
+
/** Entity description */
|
|
97
|
+
description?: string;
|
|
98
|
+
/** Number of properties */
|
|
99
|
+
propertyCount: number;
|
|
100
|
+
/** Number of associations */
|
|
101
|
+
associationCount: number;
|
|
102
|
+
/** Whether this entity is deprecated */
|
|
103
|
+
deprecated?: boolean;
|
|
104
|
+
/** List of properties for this entity */
|
|
105
|
+
properties: PropertyInfo[];
|
|
106
|
+
/** List of associations for this entity */
|
|
107
|
+
associations: AssociationInfo[];
|
|
108
|
+
/** Applied semantic types */
|
|
109
|
+
semantics: string[];
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Property-level information for UI presentation
|
|
113
|
+
*/
|
|
114
|
+
export interface PropertyInfo {
|
|
115
|
+
/** Property name */
|
|
116
|
+
name: string;
|
|
117
|
+
/** Property display name */
|
|
118
|
+
displayName?: string;
|
|
119
|
+
/** Property description */
|
|
120
|
+
description?: string;
|
|
121
|
+
/** Data type (string, number, boolean, etc.) */
|
|
122
|
+
type: string;
|
|
123
|
+
/** Whether this property is required */
|
|
124
|
+
required?: boolean;
|
|
125
|
+
/** Whether this property allows multiple values */
|
|
126
|
+
multiple?: boolean;
|
|
127
|
+
/** Whether this property is a primary key */
|
|
128
|
+
primary?: boolean;
|
|
129
|
+
/** Whether this property is unique */
|
|
130
|
+
unique?: boolean;
|
|
131
|
+
/** Whether this property is read-only */
|
|
132
|
+
readOnly?: boolean;
|
|
133
|
+
/** Whether this property is write-only */
|
|
134
|
+
writeOnly?: boolean;
|
|
135
|
+
/** Whether this property is deprecated */
|
|
136
|
+
deprecated?: boolean;
|
|
137
|
+
/** Applied semantic types */
|
|
138
|
+
semantics: string[];
|
|
139
|
+
/** Enum values if applicable */
|
|
140
|
+
enumValues?: string[];
|
|
141
|
+
/** Default value if specified */
|
|
142
|
+
defaultValue?: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Association-level information for UI presentation
|
|
146
|
+
*/
|
|
147
|
+
export interface AssociationInfo {
|
|
148
|
+
/** Association name */
|
|
149
|
+
name: string;
|
|
150
|
+
/** Association display name */
|
|
151
|
+
displayName?: string;
|
|
152
|
+
/** Association description */
|
|
153
|
+
description?: string;
|
|
154
|
+
/** Whether this association is required */
|
|
155
|
+
required?: boolean;
|
|
156
|
+
/** Whether this association allows multiple targets */
|
|
157
|
+
multiple?: boolean;
|
|
158
|
+
/** Whether this association is read-only */
|
|
159
|
+
readOnly?: boolean;
|
|
160
|
+
/** Target entity names this association points to */
|
|
161
|
+
targetEntities: string[];
|
|
162
|
+
/** Applied semantic types */
|
|
163
|
+
semantics: string[];
|
|
164
|
+
/** Relationship cardinality description (e.g., "One-to-Many", "Many-to-Many") */
|
|
165
|
+
cardinality: string;
|
|
166
|
+
}
|
|
9
167
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/modeling/templates/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAA;CACpB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/modeling/templates/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAA;IACV,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAA;IACZ,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAA;IACnB,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAA;IACjB,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAA;IACjB,uBAAuB;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,mCAAmC;IACnC,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,oDAAoD;IACpD,SAAS,EAAE,uBAAuB,CAAA;CACnC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A2C;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qDAAqD;IACrD,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAA;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/modeling/templates/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataDomain } from '../DataDomain.js'\n\nexport interface CreateTemplateOptions {\n /**\n * The DataDomain instance to use for the template.\n * If not provided, a new DataDomain instance will be created.\n */\n domain?: DataDomain\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/modeling/templates/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataDomain } from '../DataDomain.js'\n\nexport interface CreateTemplateOptions {\n /**\n * The DataDomain instance to use for the template.\n * If not provided, a new DataDomain instance will be created.\n */\n domain?: DataDomain\n}\n\n/**\n * Template metadata for UI presentation\n */\nexport interface DomainTemplate {\n /** Unique identifier for the template */\n id: string\n /** Display name of the template */\n name: string\n /** Short description of what the template does (plain text, no HTML/markdown) */\n description: string\n /** When the template was created (ISO string) */\n createdAt: string\n /** When the template was last updated (ISO string) */\n updatedAt: string\n /** Template version */\n version: string\n /** Author information */\n author: string\n /** Template categorization tags */\n tags: string[]\n /** Detailed domain structure for UI presentation */\n structure: DomainTemplateStructure\n}\n\n/**\n * Detailed domain structure information for UI presentation\n */\nexport interface DomainTemplateStructure {\n /** Domain information */\n domain: DomainInfo\n /** List of namespaces in the domain */\n namespaces: NamespaceInfo[]\n}\n\n/**\n * Domain-level information\n */\nexport interface DomainInfo {\n /** Domain name */\n name: string\n /** Domain description */\n description?: string\n /** Total number of entities across all namespaces */\n totalEntities: number\n /** Total number of properties across all entities */\n totalProperties: number\n /** Total number of associations across all entities */\n totalAssociations: number\n}\n\n/**\n * Namespace-level information\n */\nexport interface NamespaceInfo {\n /** Namespace name */\n name: string\n /** Namespace display name */\n displayName?: string\n /** Namespace description */\n description?: string\n /** Number of models in this namespace */\n modelCount: number\n /** Number of entities in this namespace */\n entityCount: number\n /** List of models in this namespace */\n models: ModelInfo[]\n}\n\n/**\n * Model-level information\n */\nexport interface ModelInfo {\n /** Model name */\n name: string\n /** Model display name */\n displayName?: string\n /** Model description */\n description?: string\n /** Number of entities in this model */\n entityCount: number\n /** List of entities in this model */\n entities: EntityInfo[]\n}\n\n/**\n * Entity-level information for UI presentation\n */\nexport interface EntityInfo {\n /** Entity name */\n name: string\n /** Entity display name */\n displayName?: string\n /** Entity description */\n description?: string\n /** Number of properties */\n propertyCount: number\n /** Number of associations */\n associationCount: number\n /** Whether this entity is deprecated */\n deprecated?: boolean\n /** List of properties for this entity */\n properties: PropertyInfo[]\n /** List of associations for this entity */\n associations: AssociationInfo[]\n /** Applied semantic types */\n semantics: string[]\n}\n\n/**\n * Property-level information for UI presentation\n */\nexport interface PropertyInfo {\n /** Property name */\n name: string\n /** Property display name */\n displayName?: string\n /** Property description */\n description?: string\n /** Data type (string, number, boolean, etc.) */\n type: string\n /** Whether this property is required */\n required?: boolean\n /** Whether this property allows multiple values */\n multiple?: boolean\n /** Whether this property is a primary key */\n primary?: boolean\n /** Whether this property is unique */\n unique?: boolean\n /** Whether this property is read-only */\n readOnly?: boolean\n /** Whether this property is write-only */\n writeOnly?: boolean\n /** Whether this property is deprecated */\n deprecated?: boolean\n /** Applied semantic types */\n semantics: string[]\n /** Enum values if applicable */\n enumValues?: string[]\n /** Default value if specified */\n defaultValue?: string\n}\n\n/**\n * Association-level information for UI presentation\n */\nexport interface AssociationInfo {\n /** Association name */\n name: string\n /** Association display name */\n displayName?: string\n /** Association description */\n description?: string\n /** Whether this association is required */\n required?: boolean\n /** Whether this association allows multiple targets */\n multiple?: boolean\n /** Whether this association is read-only */\n readOnly?: boolean\n /** Target entity names this association points to */\n targetEntities: string[]\n /** Applied semantic types */\n semantics: string[]\n /** Relationship cardinality description (e.g., \"One-to-Many\", \"Many-to-Many\") */\n cardinality: string\n}\n"]}
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
* console.log('Domain created with', domain.graph.nodeCount(), 'nodes')
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
import { DataDomain } from '
|
|
25
|
-
import type { CreateTemplateOptions } from '
|
|
24
|
+
import { DataDomain } from '../../../DataDomain.js';
|
|
25
|
+
import type { CreateTemplateOptions } from '../../types.js';
|
|
26
26
|
/**
|
|
27
27
|
* Creates a comprehensive e-commerce data domain following domain-driven design principles.
|
|
28
28
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecommerce-domain.d.ts","sourceRoot":"","sources":["../../../../../../src/modeling/templates/verticals/business-services/ecommerce-domain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AA8BnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAa3D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,OAAO,GAAE,qBAA0B,GAAG,UAAU,CAkvB7F"}
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
* console.log('Domain created with', domain.graph.nodeCount(), 'nodes')
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
import { DataDomain } from '
|
|
25
|
-
import { SemanticType } from '
|
|
26
|
-
import { createCalculatedSemantic } from '
|
|
27
|
-
import { createCurrencySemantic } from '
|
|
28
|
-
import { createSummarySemantic } from '
|
|
29
|
-
import { addAvatarUrlField, addCreatedAtField, addDescriptionField, addEmailField, addFirstNameField, addIdField, addLastNameField, addNameField, addPasswordField, addPhoneField, addPublicUniqueNameField, addUpdatedAtField, addSkuField, addPriceField, addQuantityField, addWeightField, addImagesField, addCustomStatusField, addBooleanField, addSessionIdField, addExpiresAtField, addUnitPriceField, addCurrencyAmountField, } from '
|
|
24
|
+
import { DataDomain } from '../../../DataDomain.js';
|
|
25
|
+
import { SemanticType } from '../../../Semantics.js';
|
|
26
|
+
import { createCalculatedSemantic } from '../../../definitions/Calculated.js';
|
|
27
|
+
import { createCurrencySemantic } from '../../../definitions/Currency.js';
|
|
28
|
+
import { createSummarySemantic } from '../../../definitions/Summary.js';
|
|
29
|
+
import { addAvatarUrlField, addCreatedAtField, addDescriptionField, addEmailField, addFirstNameField, addIdField, addLastNameField, addNameField, addPasswordField, addPhoneField, addPublicUniqueNameField, addUpdatedAtField, addSkuField, addPriceField, addQuantityField, addWeightField, addImagesField, addCustomStatusField, addBooleanField, addSessionIdField, addExpiresAtField, addUnitPriceField, addCurrencyAmountField, } from '../../../helpers/Intelisense.js';
|
|
30
30
|
function createDomain() {
|
|
31
31
|
return new DataDomain({
|
|
32
32
|
info: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecommerce-domain.js","sourceRoot":"","sources":["../../../../../../src/modeling/templates/verticals/business-services/ecommerce-domain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAA;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB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AC,WAAW,CAAC;QACxB,IAAI,EAAE;YACJ,IAAI,EAAE,gBAAgB;YACtB,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,2CAA2C;SACzD;QACD,IAAI,EAAE,QAAQ;KACf,CAAC,CAAA;IAEF,8BAA8B;IAC9B,YAAY;IACZ,+BAA+B;IAC/B,uCAAuC;IACvC,wDAAwD;IACxD,OAAO;IACP,oBAAoB;IACpB,oBAAoB;IACpB,KAAK;IAEL,iBAAiB,CAAC,aAAa,EAAE,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC,CAAA;IAEjF,0CAA0C;IAC1C,WAAW,CAAC,cAAc,CACxB,EAAE,GAAG,EAAE,aAAa,CAAC,GAAG,EAAE,EAC1B;QACE,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,qCAAqC,EAAE;QAC7G,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,UAAU,EAAE,+CAA+C;KACtE,CACF,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC","sourcesContent":["/**\n * E-Commerce Data Domain Example\n *\n * This file demonstrates how to create a comprehensive e-commerce data domain\n * using the API Client Core modeling system. It follows the business-first approach\n * and demonstrates proper use of namespaces, models, entities, properties,\n * associations, and semantic annotations.\n *\n * The example includes:\n * - User Management domain with proper authentication setup\n * - Product Catalog with categories and inventory\n * - Order Management with cart functionality and payment processing\n * - Proper semantic annotations for security, timestamps, and business logic\n * - Realistic associations between entities with proper cardinality\n *\n * @example\n * ```typescript\n * import { createEcommerceDomain } from './ecommerce-domain.js'\n *\n * const domain = createEcommerceDomain()\n * console.log('Domain created with', domain.graph.nodeCount(), 'nodes')\n * ```\n */\n\nimport { DataDomain } from '../../../DataDomain.js'\nimport { SemanticType } from '../../../Semantics.js'\nimport { createCalculatedSemantic } from '../../../definitions/Calculated.js'\nimport { createCurrencySemantic } from '../../../definitions/Currency.js'\nimport { createSummarySemantic } from '../../../definitions/Summary.js'\nimport {\n addAvatarUrlField,\n addCreatedAtField,\n addDescriptionField,\n addEmailField,\n addFirstNameField,\n addIdField,\n addLastNameField,\n addNameField,\n addPasswordField,\n addPhoneField,\n addPublicUniqueNameField,\n addUpdatedAtField,\n addSkuField,\n addPriceField,\n addQuantityField,\n addWeightField,\n addImagesField,\n addCustomStatusField,\n addBooleanField,\n addSessionIdField,\n addExpiresAtField,\n addUnitPriceField,\n addCurrencyAmountField,\n} from '../../../helpers/Intelisense.js'\nimport type { CreateTemplateOptions } from '../../types.js'\n\nfunction createDomain(): DataDomain {\n return new DataDomain({\n info: {\n name: 'E-Commerce Platform',\n displayName: 'E-Commerce Platform',\n description:\n 'A comprehensive e-commerce platform with user management, product catalog, and order processing capabilities',\n },\n })\n}\n\n/**\n * Creates a comprehensive e-commerce data domain following domain-driven design principles.\n *\n * This function demonstrates the proper hierarchy and organization for a business domain:\n * 1. Creates the root DataDomain\n * 2. Organizes functionality into logical namespaces (User Management, Product Catalog, etc.)\n * 3. Groups related entities into models within each namespace\n * 4. Defines entities with proper semantic annotations\n * 5. Establishes associations with appropriate cardinality and business rules\n *\n * @returns A fully configured DataDomain with all e-commerce entities and relationships\n */\nexport default function createEcommerceDomain(options: CreateTemplateOptions = {}): DataDomain {\n // Ensure the root data domain\n const domain = options.domain ?? createDomain()\n\n //\n // 1. USER MANAGEMENT NAMESPACE\n //\n const userManagement = domain.addNamespace({\n info: {\n name: 'UserManagement',\n displayName: 'User Management',\n description: 'Handles user authentication, authorization, and profile management',\n },\n })\n\n // User Authentication Model\n const authModel = userManagement.addModel({\n info: {\n name: 'Authentication',\n displayName: 'User Authentication',\n description: 'User accounts and authentication data',\n },\n })\n\n // User Entity - The core user account\n const userEntity = authModel.addEntity({\n info: {\n name: 'User',\n displayName: 'User Account',\n description: 'Represents a user account in the system',\n },\n semantics: [{ id: SemanticType.User }], // Mark this as a User entity for system-wide recognition\n })\n\n // User properties with proper semantic annotations\n addIdField(userEntity, { displayName: 'User ID', description: 'Unique identifier for the user' })\n addEmailField(userEntity, { description: 'User email address for login and communication' })\n addPasswordField(userEntity, { description: 'User password for authentication' })\n\n const fName = addFirstNameField(userEntity, { description: 'User first name' })\n fName.required = true\n\n const lName = addLastNameField(userEntity, { description: 'User last name' })\n lName.required = true\n\n userEntity.addProperty({\n info: { name: 'role', displayName: 'User Role', description: 'User role for permission management' },\n type: 'string',\n required: true,\n schema: {\n enum: ['customer', 'admin', 'moderator'],\n defaultValue: {\n type: 'literal',\n value: 'customer',\n },\n },\n semantics: [{ id: SemanticType.UserRole }],\n })\n\n userEntity.addProperty({\n info: {\n name: 'email_verified',\n displayName: 'Email Verified',\n description: 'Whether the user has verified their email address',\n },\n type: 'boolean',\n required: true,\n schema: {\n defaultValue: {\n type: 'literal',\n value: 'false',\n },\n },\n })\n\n addCreatedAtField(userEntity, { description: 'When the user account was created' })\n addUpdatedAtField(userEntity, { description: 'When the user account was last updated' })\n\n // User Profile Model\n const profileModel = userManagement.addModel({\n info: {\n name: 'UserProfile',\n displayName: 'User Profile',\n description: 'Extended user profile information',\n },\n })\n\n // User Profile Entity\n const userProfileEntity = profileModel.addEntity({\n info: {\n name: 'user_profile',\n displayName: 'User Profile',\n description: 'Extended profile information for users',\n },\n })\n\n addIdField(userProfileEntity, { displayName: 'Profile ID', description: 'Unique identifier for the profile' })\n\n userProfileEntity.addProperty({\n info: { name: 'birthdate', displayName: 'Date of Birth', description: 'User date of birth' },\n type: 'date',\n })\n\n addPhoneField(userProfileEntity, { description: 'User phone number' })\n addAvatarUrlField(userProfileEntity, { description: 'URL to user profile picture' })\n\n // User-Profile Association (One-to-One), not required for registration flows.\n userEntity.addAssociation(\n { key: userProfileEntity.key },\n {\n info: { name: 'profile', displayName: 'User Profile', description: 'Link to extended profile information' },\n required: false,\n multiple: false,\n }\n )\n\n // Address Entity\n const addressEntity = profileModel.addEntity({\n info: {\n name: 'address',\n displayName: 'Address',\n description: 'Physical address information',\n },\n })\n\n addIdField(addressEntity, { displayName: 'Address ID', description: 'Unique identifier for the address' })\n\n addressEntity.addProperty({\n info: { name: 'type', displayName: 'Address Type', description: 'Type of address (shipping, billing, etc.)' },\n type: 'string',\n required: true,\n schema: {\n enum: ['shipping', 'billing', 'both'],\n },\n })\n\n addressEntity.addProperty({\n info: {\n name: 'line1',\n displayName: 'Address Line 1',\n description: 'Primary street address, including house number and street name',\n },\n type: 'string',\n required: true,\n })\n\n addressEntity.addProperty({\n info: {\n name: 'line2',\n displayName: 'Address Line 2',\n description: 'Optional field for additional street-level information like apartment numbers or building names.',\n },\n type: 'string',\n required: false,\n })\n\n addressEntity.addProperty({\n info: {\n name: 'line3',\n displayName: 'Address Line 3',\n description: 'Optional field for additional street-level information like apartment numbers or building names.',\n },\n type: 'string',\n required: false,\n })\n\n addressEntity.addProperty({\n info: { name: 'city', displayName: 'City', description: 'City name' },\n type: 'string',\n required: true,\n })\n\n addressEntity.addProperty({\n info: { name: 'state', displayName: 'State/Province', description: 'State or province' },\n type: 'string',\n required: true,\n })\n\n addressEntity.addProperty({\n info: { name: 'postal_code', displayName: 'ZIP/Postal Code', description: 'ZIP or postal code' },\n type: 'string',\n required: true,\n })\n\n addressEntity.addProperty({\n info: { name: 'country', displayName: 'Country', description: 'Country name' },\n type: 'string',\n required: true,\n })\n\n // User-Address Association (One-to-Many)\n userEntity.addAssociation(\n { key: addressEntity.key },\n {\n info: { name: 'addresses', displayName: 'User Addresses', description: 'User shipping and billing addresses' },\n required: false,\n multiple: true,\n }\n )\n\n //\n // 2. PRODUCT CATALOG NAMESPACE\n //\n const productCatalog = domain.addNamespace({\n info: {\n name: 'ProductCatalog',\n displayName: 'Product Catalog',\n description: 'Product information, categories, and inventory management',\n },\n })\n\n // Product Management Model\n const productModel = productCatalog.addModel({\n info: {\n name: 'Products',\n displayName: 'Product Management',\n description: 'Core product entities and relationships',\n },\n })\n\n // Category Entity\n const categoryEntity = productModel.addEntity({\n info: {\n name: 'category',\n displayName: 'Product Category',\n description: 'Product categorization for organization and navigation',\n },\n })\n addIdField(categoryEntity, { displayName: 'Category ID', description: 'Unique identifier for the category' })\n addNameField(categoryEntity, { displayName: 'Category Name', description: 'Display name of the category' })\n addPublicUniqueNameField(categoryEntity, {\n displayName: 'URL Slug',\n description: 'URL-friendly identifier for the category',\n })\n addDescriptionField(categoryEntity, { description: 'Category description' })\n\n // Self-referencing association for category hierarchy\n categoryEntity.addAssociation(\n { key: categoryEntity.key },\n {\n info: {\n name: 'parent_category',\n displayName: 'Parent Category',\n description: 'Parent category for hierarchical organization',\n },\n required: false,\n multiple: false,\n }\n )\n\n // Product Entity\n const productEntity = productModel.addEntity({\n info: {\n name: 'product',\n displayName: 'Product',\n description: 'Core product information and specifications',\n },\n })\n\n addIdField(productEntity, { displayName: 'Product ID', description: 'Unique identifier for the product' })\n addNameField(productEntity, { displayName: 'Product Name', description: 'Display name of the product' })\n addPublicUniqueNameField(productEntity, {\n displayName: 'URL Slug',\n description: 'URL-friendly identifier for the product',\n })\n addDescriptionField(productEntity, { description: 'Detailed product description' })\n\n productEntity.addProperty({\n info: { name: 'short_description', displayName: 'Short Description', description: 'Brief product summary' },\n type: 'string',\n semantics: [createSummarySemantic()],\n })\n\n addSkuField(productEntity, { description: 'Stock Keeping Unit - unique product identifier' })\n\n addPriceField(productEntity, { description: 'Product price in cents (USD)' })\n\n productEntity.addProperty({\n info: {\n name: 'compare_at_price',\n displayName: 'Compare at Price',\n description: 'Original price for discount display',\n },\n type: 'number',\n schema: {\n maximum: 0,\n },\n bindings: [\n {\n type: 'web',\n schema: {\n dataType: 'float',\n },\n },\n ],\n semantics: [\n createCurrencySemantic({\n storageFormat: 'integer_cents',\n defaultCurrency: 'USD',\n decimalPlaces: 2,\n allowNegative: false,\n validateCurrencyCode: true,\n }),\n ],\n })\n\n addCustomStatusField(productEntity, ['inactive', 'active', 'pending', 'archived'], {\n description: 'Current status of the product',\n })\n\n addWeightField(productEntity, { description: 'Product weight in grams' })\n\n addImagesField(productEntity, { description: 'Array of product image URLs' })\n\n addCreatedAtField(productEntity, { description: 'When the product was created' })\n addUpdatedAtField(productEntity, { description: 'When the product was last updated' })\n\n // Product-Category Association (Many-to-Many)\n productEntity.addAssociation(\n { key: categoryEntity.key },\n {\n info: {\n name: 'categories',\n displayName: 'Product Categories',\n description: 'Categories this product belongs to',\n },\n required: true,\n multiple: true,\n semantics: [{ id: SemanticType.Categories }],\n }\n )\n\n // Inventory Model\n const inventoryModel = productCatalog.addModel({\n info: {\n name: 'Inventory',\n displayName: 'Inventory Management',\n description: 'Stock levels and inventory tracking',\n },\n })\n\n // Inventory Entity\n const inventoryEntity = inventoryModel.addEntity({\n info: {\n name: 'inventory',\n displayName: 'Inventory',\n description: 'Stock levels and inventory information for products',\n },\n })\n\n addIdField(inventoryEntity, {\n displayName: 'Inventory ID',\n description: 'Unique identifier for the inventory record',\n })\n\n addQuantityField(inventoryEntity, { displayName: 'Stock Quantity', description: 'Available stock quantity' })\n\n const reservedQty = addQuantityField(inventoryEntity, {\n name: 'reserved_quantity',\n displayName: 'Reserved Quantity',\n description: 'Quantity reserved for pending orders',\n })\n reservedQty.schema = {\n defaultValue: {\n type: 'literal',\n value: '0',\n },\n minimum: 0,\n }\n\n addBooleanField(inventoryEntity, 'trackQuantity', 'true', {\n displayName: 'Track Quantity',\n description: 'Whether to track inventory for this product',\n })\n\n addBooleanField(inventoryEntity, 'allowBackorder', 'false', {\n displayName: 'Allow Backorder',\n description: 'Whether to allow ordering when out of stock',\n })\n\n // Product-Inventory Association (One-to-One)\n productEntity.addAssociation(\n { key: inventoryEntity.key },\n {\n info: {\n name: 'inventory',\n displayName: 'Product Inventory',\n description: 'Inventory information for this product',\n },\n required: true,\n multiple: false,\n }\n )\n\n //\n // 3. ORDER MANAGEMENT NAMESPACE\n //\n const orderManagement = domain.addNamespace({\n info: {\n name: 'OrderManagement',\n displayName: 'Order Management',\n description: 'Shopping cart, orders, and payment processing',\n },\n })\n\n // Shopping Cart Model\n const cartModel = orderManagement.addModel({\n info: {\n name: 'ShoppingCart',\n displayName: 'Shopping Cart',\n description: 'Shopping cart and cart items',\n },\n })\n\n // Cart Entity\n const cartEntity = cartModel.addEntity({\n info: {\n name: 'cart',\n displayName: 'Shopping Cart',\n description: 'User shopping cart',\n },\n })\n\n addIdField(cartEntity, { displayName: 'Cart ID', description: 'Unique identifier for the cart' })\n\n addSessionIdField(cartEntity, { description: 'Session identifier for guest carts' })\n\n addExpiresAtField(cartEntity, { description: 'When the cart expires for cleanup' })\n\n addCreatedAtField(cartEntity, { description: 'When the cart was created' })\n addUpdatedAtField(cartEntity, { description: 'When the cart was last updated' })\n\n // Cart-User Association (Many-to-One)\n cartEntity.addAssociation(\n { key: userEntity.key },\n {\n info: { name: 'user', displayName: 'Cart Owner', description: 'User who owns this cart' },\n required: false,\n multiple: false,\n semantics: [{ id: SemanticType.ResourceOwnerIdentifier }],\n }\n )\n\n // Cart Item Entity\n const cartItemEntity = cartModel.addEntity({\n info: {\n name: 'cart_item',\n displayName: 'Cart Item',\n description: 'Individual items in a shopping cart',\n },\n })\n\n addIdField(cartItemEntity, { displayName: 'Cart Item ID', description: 'Unique identifier for the cart item' })\n\n const cartItemQuantity = addQuantityField(cartItemEntity, { description: 'Number of items' })\n cartItemQuantity.schema = { minimum: 1 }\n\n const cartUnitPrice = addUnitPriceField(cartItemEntity, { description: 'Price per unit at time of adding to cart' })\n\n cartItemEntity.addProperty({\n info: { name: 'total_price', displayName: 'Total Price', description: 'Total price for this line item' },\n type: 'number',\n required: true,\n readOnly: true,\n semantics: [\n createCurrencySemantic({\n storageFormat: 'integer_cents',\n defaultCurrency: 'USD',\n decimalPlaces: 2,\n allowNegative: false,\n }),\n createCalculatedSemantic({\n formula: '{{unitPrice}} * {{quantity}}',\n dependencies: [cartUnitPrice.key, cartItemQuantity.key],\n recalculateOnUpdate: true,\n }),\n ],\n })\n\n // Cart-CartItem Association (One-to-Many)\n cartEntity.addAssociation(\n { key: cartItemEntity.key },\n {\n info: { name: 'items', displayName: 'Cart Items', description: 'Items in this cart' },\n required: false,\n multiple: true,\n onDelete: 'cascade',\n }\n )\n\n // CartItem-Product Association (Many-to-One)\n cartItemEntity.addAssociation(\n { key: productEntity.key },\n {\n info: { name: 'product', displayName: 'Product', description: 'Product for this cart item' },\n required: true,\n multiple: false,\n }\n )\n\n // Order Processing Model\n const orderModel = orderManagement.addModel({\n info: {\n name: 'Orders',\n displayName: 'Order Processing',\n description: 'Orders and order fulfillment',\n },\n })\n\n // Order Entity\n const orderEntity = orderModel.addEntity({\n info: {\n name: 'order',\n displayName: 'Order',\n description: 'Customer order',\n },\n })\n\n addIdField(orderEntity, { displayName: 'Order ID', description: 'Unique identifier for the order' })\n\n orderEntity.addProperty({\n info: { name: 'order_number', displayName: 'Order Number', description: 'Human-readable order number' },\n type: 'string',\n required: true,\n unique: true,\n })\n\n addCustomStatusField(\n orderEntity,\n ['pending', 'confirmed', 'processing', 'shipped', 'delivered', 'cancelled', 'refunded'],\n {\n displayName: 'Order Status',\n description: 'Current status of the order',\n }\n )\n\n const subtotal = addCurrencyAmountField(orderEntity, 'subtotal', 'Subtotal', {\n description: 'Order subtotal before taxes and shipping',\n })\n\n const taxAmount = addCurrencyAmountField(orderEntity, 'taxAmount', 'Tax Amount', {\n description: 'Total tax amount',\n })\n\n const shippingAmount = addCurrencyAmountField(orderEntity, 'shippingAmount', 'Shipping Amount', {\n description: 'Shipping cost',\n })\n\n orderEntity.addProperty({\n info: { name: 'total_amount', displayName: 'Total Amount', description: 'Final order total' },\n type: 'number',\n required: true,\n semantics: [\n createCurrencySemantic({\n storageFormat: 'integer_cents',\n defaultCurrency: 'USD',\n decimalPlaces: 2,\n allowNegative: false,\n }),\n createCalculatedSemantic({\n formula: '{{subtotal}} + {{taxAmount}} + {{shippingAmount}}',\n dependencies: [subtotal.key, taxAmount.key, shippingAmount.key],\n recalculateOnUpdate: true,\n }),\n ],\n })\n\n orderEntity.addProperty({\n info: { name: 'notes', displayName: 'Order Notes', description: 'Customer notes or special instructions' },\n type: 'string',\n })\n\n addCreatedAtField(orderEntity, { description: 'When the order was created' })\n addUpdatedAtField(orderEntity, { description: 'When the order was last updated' })\n\n // Order-User Association (Many-to-One)\n orderEntity.addAssociation(\n { key: userEntity.key },\n {\n info: { name: 'customer', displayName: 'Customer', description: 'Customer who placed this order' },\n required: true,\n multiple: false,\n semantics: [{ id: SemanticType.ResourceOwnerIdentifier }],\n }\n )\n\n // Order-Address Associations (Many-to-One)\n orderEntity.addAssociation(\n { key: addressEntity.key },\n {\n info: { name: 'shipping_address', displayName: 'Shipping Address', description: 'Address for order delivery' },\n required: true,\n multiple: false,\n }\n )\n\n orderEntity.addAssociation(\n { key: addressEntity.key },\n {\n info: { name: 'billing_address', displayName: 'Billing Address', description: 'Address for billing purposes' },\n required: true,\n multiple: false,\n }\n )\n\n // Order Line Item Entity\n const orderItemEntity = orderModel.addEntity({\n info: {\n name: 'order_item',\n displayName: 'Order Line Item',\n description: 'Individual line items in an order',\n },\n })\n\n addIdField(orderItemEntity, { displayName: 'Order Item ID', description: 'Unique identifier for the order item' })\n\n const quantity = addQuantityField(orderItemEntity, { description: 'Number of items ordered' })\n quantity.schema = { minimum: 1 }\n\n const unitPrice = addUnitPriceField(orderItemEntity, { description: 'Price per unit at time of order' })\n\n orderItemEntity.addProperty({\n info: { name: 'total_price', displayName: 'Total Price', description: 'Total price for this line item' },\n type: 'number',\n required: true,\n readOnly: true,\n semantics: [\n createCurrencySemantic({\n storageFormat: 'integer_cents',\n defaultCurrency: 'USD',\n decimalPlaces: 2,\n allowNegative: false,\n }),\n createCalculatedSemantic({\n formula: '{{quantity}} * {{unitPrice}}',\n dependencies: [quantity.key, unitPrice.key],\n recalculateOnUpdate: true,\n }),\n ],\n })\n\n // orderItemEntity.addProperty({\n // info: {\n // name: 'productSnapshot',\n // displayName: 'Product Snapshot',\n // description: 'Snapshot of product data at time of order',\n // },\n // type: 'object',\n // required: true,\n // readOnly: true,\n // })\n\n // Order-OrderItem Association (One-to-Many)\n orderEntity.addAssociation(\n { key: orderItemEntity.key },\n {\n info: { name: 'items', displayName: 'Order Items', description: 'Items in this order' },\n required: true,\n multiple: true,\n onDelete: 'cascade',\n }\n )\n\n // OrderItem-Product Association (Many-to-One)\n orderItemEntity.addAssociation(\n { key: productEntity.key },\n {\n info: { name: 'product', displayName: 'Product', description: 'Product for this order item' },\n required: true,\n multiple: false,\n }\n )\n\n // Payment Model\n const paymentModel = orderManagement.addModel({\n info: {\n name: 'Payments',\n displayName: 'Payment Processing',\n description: 'Payment methods and transactions',\n },\n })\n\n // Payment Entity\n const paymentEntity = paymentModel.addEntity({\n info: {\n name: 'payment',\n displayName: 'Payment',\n description: 'Payment transaction record',\n },\n })\n\n addIdField(paymentEntity, { displayName: 'Payment ID', description: 'Unique identifier for the payment' })\n\n paymentEntity.addProperty({\n info: { name: 'method', displayName: 'Payment Method', description: 'Method used for payment' },\n type: 'string',\n required: true,\n schema: {\n enum: ['credit_card', 'debit_card', 'paypal', 'bank_transfer', 'apple_pay', 'google_pay'],\n },\n })\n\n addCustomStatusField(paymentEntity, ['pending', 'authorized', 'captured', 'failed', 'cancelled', 'refunded'], {\n displayName: 'Payment Status',\n description: 'Current status of the payment',\n })\n\n addCurrencyAmountField(paymentEntity, 'amount', 'Payment Amount', { description: 'Amount charged' })\n\n paymentEntity.addProperty({\n info: { name: 'currency', displayName: 'Currency', description: 'Currency code for the payment' },\n type: 'string',\n required: true,\n schema: {\n defaultValue: {\n type: 'literal',\n value: 'USD',\n },\n },\n })\n\n paymentEntity.addProperty({\n info: {\n name: 'transaction_id',\n displayName: 'Transaction ID',\n description: 'External payment processor transaction ID',\n },\n type: 'string',\n })\n\n // paymentEntity.addProperty({\n // info: {\n // name: 'gatewayResponse',\n // displayName: 'Gateway Response',\n // description: 'Raw response from payment gateway',\n // },\n // type: 'object',\n // readOnly: true,\n // })\n\n addCreatedAtField(paymentEntity, { description: 'When the payment was created' })\n\n // Order-Payment Association (One-to-Many)\n orderEntity.addAssociation(\n { key: paymentEntity.key },\n {\n info: { name: 'payments', displayName: 'Order Payments', description: 'Payment transactions for this order' },\n required: false,\n multiple: true,\n onDelete: 'restrict', // Don't allow order deletion if payments exist\n }\n )\n\n return domain\n}\n"]}
|
package/build/src/modeling/templates/verticals/business-services/financial-services-domain.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Financial Services Data Domain Example
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to create a comprehensive financial services data domain
|
|
5
|
+
* using the API Client Core modeling system. It follows the business-first approach
|
|
6
|
+
* and demonstrates proper use of namespaces, models, entities, properties,
|
|
7
|
+
* associations, and semantic annotations.
|
|
8
|
+
*
|
|
9
|
+
* The example includes:
|
|
10
|
+
* - Account Management with bank accounts, investment accounts, and credit cards
|
|
11
|
+
* - Transaction Processing with payments, transfers, deposits, and withdrawals
|
|
12
|
+
* - Customer Management with KYC, risk profiles, and customer segments
|
|
13
|
+
* - Investment Portfolio with assets, positions, and performance tracking
|
|
14
|
+
* - Compliance & Reporting with regulatory reporting and audit trails
|
|
15
|
+
* - Fraud Detection with transaction monitoring and risk scoring
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import { createFinancialServicesDomain } from './financial-services-domain.js'
|
|
20
|
+
*
|
|
21
|
+
* const domain = createFinancialServicesDomain()
|
|
22
|
+
* console.log('Financial Services domain created with', domain.graph.nodeCount(), 'nodes')
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
import { DataDomain } from '../../../DataDomain.js';
|
|
26
|
+
import type { CreateTemplateOptions } from '../../types.js';
|
|
27
|
+
/**
|
|
28
|
+
* Creates a comprehensive financial services data domain following domain-driven design principles.
|
|
29
|
+
*
|
|
30
|
+
* This function demonstrates the proper hierarchy and organization for a financial services platform:
|
|
31
|
+
* 1. Creates the root DataDomain for the financial services platform
|
|
32
|
+
* 2. Organizes functionality into logical namespaces (Customer Management, Account Management, etc.)
|
|
33
|
+
* 3. Groups related entities into models within each namespace
|
|
34
|
+
* 4. Defines entities with proper semantic annotations for financial workflows
|
|
35
|
+
* 5. Establishes associations with appropriate cardinality for customer-account relationships
|
|
36
|
+
*
|
|
37
|
+
* @returns A fully configured DataDomain with all financial services entities and relationships
|
|
38
|
+
*/
|
|
39
|
+
export default function createFinancialServicesDomain(options?: CreateTemplateOptions): DataDomain;
|
|
40
|
+
//# sourceMappingURL=financial-services-domain.d.ts.map
|
package/build/src/modeling/templates/verticals/business-services/financial-services-domain.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"financial-services-domain.d.ts","sourceRoot":"","sources":["../../../../../../src/modeling/templates/verticals/business-services/financial-services-domain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAcnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAc3D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,UAAU,6BAA6B,CAAC,OAAO,GAAE,qBAA0B,GAAG,UAAU,CA62BrG"}
|