@api-client/core 0.18.20 → 0.18.21

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.
@@ -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,CAAC,CAAA;IAC/B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,QAAyD;QACrF,OAAO,sBAAsB,CAAC,QAAQ,CAAC,CAAA;IACzC,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 * 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,CAA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O,CAAA;IACpB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,iCAAiC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,2CAA2C;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"]}