@objectstack/spec 0.1.0 → 0.1.1

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.
Files changed (231) hide show
  1. package/README.md +66 -125
  2. package/dist/ai/agent.zod.d.ts +164 -0
  3. package/dist/ai/agent.zod.d.ts.map +1 -0
  4. package/dist/ai/agent.zod.js +51 -0
  5. package/dist/data/dataset.zod.d.ts +60 -0
  6. package/dist/data/dataset.zod.d.ts.map +1 -0
  7. package/dist/data/dataset.zod.js +54 -0
  8. package/dist/data/field.zod.d.ts +170 -0
  9. package/dist/data/field.zod.d.ts.map +1 -0
  10. package/dist/data/field.zod.js +81 -0
  11. package/dist/data/flow.zod.d.ts +242 -0
  12. package/dist/data/flow.zod.d.ts.map +1 -0
  13. package/dist/data/flow.zod.js +77 -0
  14. package/dist/data/mapping.zod.d.ts +257 -0
  15. package/dist/data/mapping.zod.d.ts.map +1 -0
  16. package/dist/data/mapping.zod.js +65 -0
  17. package/dist/data/object.zod.d.ts +364 -0
  18. package/dist/data/object.zod.d.ts.map +1 -0
  19. package/dist/data/object.zod.js +54 -0
  20. package/dist/data/permission.zod.d.ts +163 -0
  21. package/dist/data/permission.zod.d.ts.map +1 -0
  22. package/dist/data/permission.zod.js +62 -0
  23. package/dist/data/query.zod.d.ts +89 -0
  24. package/dist/data/query.zod.d.ts.map +1 -0
  25. package/dist/data/query.zod.js +71 -0
  26. package/dist/data/sharing.zod.d.ts +63 -0
  27. package/dist/data/sharing.zod.d.ts.map +1 -0
  28. package/dist/data/sharing.zod.js +57 -0
  29. package/dist/data/validation.zod.d.ts +236 -0
  30. package/dist/data/validation.zod.d.ts.map +1 -0
  31. package/dist/data/validation.zod.js +59 -0
  32. package/dist/data/workflow.zod.d.ts +195 -0
  33. package/dist/data/workflow.zod.d.ts.map +1 -0
  34. package/dist/data/workflow.zod.js +64 -0
  35. package/dist/index.d.ts +33 -5
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +53 -5
  38. package/dist/system/api.zod.d.ts +168 -0
  39. package/dist/system/api.zod.d.ts.map +1 -0
  40. package/dist/system/api.zod.js +53 -0
  41. package/dist/system/constants/index.d.ts +11 -0
  42. package/dist/system/constants/index.d.ts.map +1 -0
  43. package/dist/system/constants/index.js +26 -0
  44. package/dist/system/constants/paths.d.ts +71 -0
  45. package/dist/system/constants/paths.d.ts.map +1 -0
  46. package/dist/system/constants/paths.js +65 -0
  47. package/dist/system/datasource.zod.d.ts +127 -0
  48. package/dist/system/datasource.zod.d.ts.map +1 -0
  49. package/dist/system/datasource.zod.js +62 -0
  50. package/dist/system/identity.zod.d.ts +204 -0
  51. package/dist/system/identity.zod.d.ts.map +1 -0
  52. package/dist/system/identity.zod.js +68 -0
  53. package/dist/system/license.zod.d.ts +110 -0
  54. package/dist/system/license.zod.d.ts.map +1 -0
  55. package/dist/system/license.zod.js +63 -0
  56. package/dist/system/manifest.zod.d.ts +126 -0
  57. package/dist/system/manifest.zod.d.ts.map +1 -0
  58. package/dist/system/manifest.zod.js +68 -0
  59. package/dist/system/policy.zod.d.ts +209 -0
  60. package/dist/system/policy.zod.d.ts.map +1 -0
  61. package/dist/system/policy.zod.js +54 -0
  62. package/dist/system/role.zod.d.ts +34 -0
  63. package/dist/system/role.zod.d.ts.map +1 -0
  64. package/dist/system/role.zod.js +25 -0
  65. package/dist/system/territory.zod.d.ts +91 -0
  66. package/dist/system/territory.zod.d.ts.map +1 -0
  67. package/dist/system/territory.zod.js +64 -0
  68. package/dist/system/translation.zod.d.ts +171 -0
  69. package/dist/system/translation.zod.d.ts.map +1 -0
  70. package/dist/system/translation.zod.js +34 -0
  71. package/dist/system/types/index.d.ts +7 -0
  72. package/dist/system/types/index.d.ts.map +1 -0
  73. package/dist/system/types/index.js +22 -0
  74. package/dist/system/types/plugin.d.ts +113 -0
  75. package/dist/system/types/plugin.d.ts.map +1 -0
  76. package/dist/system/types/plugin.js +6 -0
  77. package/dist/system/webhook.zod.d.ts +106 -0
  78. package/dist/system/webhook.zod.d.ts.map +1 -0
  79. package/dist/system/webhook.zod.js +56 -0
  80. package/dist/ui/action.zod.d.ts +148 -0
  81. package/dist/ui/action.zod.d.ts.map +1 -0
  82. package/dist/ui/action.zod.js +48 -0
  83. package/dist/ui/app.zod.d.ts +299 -0
  84. package/dist/ui/app.zod.d.ts.map +1 -0
  85. package/dist/ui/app.zod.js +127 -0
  86. package/dist/ui/dashboard.zod.d.ts +207 -0
  87. package/dist/ui/dashboard.zod.d.ts.map +1 -0
  88. package/dist/ui/dashboard.zod.js +66 -0
  89. package/dist/ui/page.zod.d.ts +187 -0
  90. package/dist/ui/page.zod.d.ts.map +1 -0
  91. package/dist/ui/page.zod.js +48 -0
  92. package/dist/ui/report.zod.d.ts +224 -0
  93. package/dist/ui/report.zod.d.ts.map +1 -0
  94. package/dist/ui/report.zod.js +68 -0
  95. package/dist/ui/view.zod.d.ts +887 -0
  96. package/dist/ui/view.zod.d.ts.map +1 -0
  97. package/dist/ui/view.zod.js +83 -0
  98. package/json-schema/AIKnowledge.json +30 -0
  99. package/json-schema/AIModelConfig.json +41 -0
  100. package/json-schema/AITool.json +33 -0
  101. package/json-schema/Action.json +156 -0
  102. package/json-schema/ActionParam.json +76 -0
  103. package/json-schema/Agent.json +140 -0
  104. package/json-schema/ApiEndpoint.json +162 -0
  105. package/json-schema/ApiMapping.json +28 -0
  106. package/json-schema/App.json +286 -0
  107. package/json-schema/AppBranding.json +24 -0
  108. package/json-schema/AuditPolicy.json +31 -0
  109. package/json-schema/AuthProtocol.json +17 -0
  110. package/json-schema/AuthProvider.json +171 -0
  111. package/json-schema/CalendarConfig.json +28 -0
  112. package/json-schema/ChartType.json +19 -0
  113. package/json-schema/Dashboard.json +117 -0
  114. package/json-schema/DashboardNavItem.json +42 -0
  115. package/json-schema/DashboardWidget.json +89 -0
  116. package/json-schema/Dataset.json +63 -0
  117. package/json-schema/DatasetMode.json +16 -0
  118. package/json-schema/Datasource.json +93 -0
  119. package/json-schema/DatasourceCapabilities.json +36 -0
  120. package/json-schema/DriverType.json +27 -0
  121. package/json-schema/EmailAlertAction.json +37 -0
  122. package/json-schema/Feature.json +51 -0
  123. package/json-schema/Field.json +219 -0
  124. package/json-schema/FieldMapping.json +83 -0
  125. package/json-schema/FieldNode.json +32 -0
  126. package/json-schema/FieldPermission.json +22 -0
  127. package/json-schema/FieldType.json +36 -0
  128. package/json-schema/FieldUpdateAction.json +32 -0
  129. package/json-schema/FilterNode.json +52 -0
  130. package/json-schema/FilterOperator.json +26 -0
  131. package/json-schema/Flow.json +186 -0
  132. package/json-schema/FlowEdge.json +37 -0
  133. package/json-schema/FlowNode.json +65 -0
  134. package/json-schema/FlowNodeAction.json +24 -0
  135. package/json-schema/FlowVariable.json +34 -0
  136. package/json-schema/FormSection.json +42 -0
  137. package/json-schema/FormView.json +99 -0
  138. package/json-schema/FormatValidation.json +59 -0
  139. package/json-schema/GanttConfig.json +32 -0
  140. package/json-schema/GroupNavItem.json +42 -0
  141. package/json-schema/HttpMethod.json +16 -0
  142. package/json-schema/Index.json +30 -0
  143. package/json-schema/KanbanConfig.json +31 -0
  144. package/json-schema/LDAPConfig.json +39 -0
  145. package/json-schema/License.json +57 -0
  146. package/json-schema/ListView.json +153 -0
  147. package/json-schema/Locale.json +10 -0
  148. package/json-schema/LogicOperator.json +14 -0
  149. package/json-schema/Manifest.json +90 -0
  150. package/json-schema/Mapping.json +270 -0
  151. package/json-schema/MenuItem.json +28 -0
  152. package/json-schema/MetricType.json +14 -0
  153. package/json-schema/NavigationItem.json +214 -0
  154. package/json-schema/NetworkPolicy.json +31 -0
  155. package/json-schema/OIDCConfig.json +46 -0
  156. package/json-schema/OWDModel.json +14 -0
  157. package/json-schema/Object.json +331 -0
  158. package/json-schema/ObjectCapabilities.json +36 -0
  159. package/json-schema/ObjectNavItem.json +46 -0
  160. package/json-schema/ObjectPermission.json +42 -0
  161. package/json-schema/Page.json +117 -0
  162. package/json-schema/PageComponent.json +36 -0
  163. package/json-schema/PageNavItem.json +47 -0
  164. package/json-schema/PageRegion.json +63 -0
  165. package/json-schema/PasswordPolicy.json +41 -0
  166. package/json-schema/PermissionSet.json +96 -0
  167. package/json-schema/Plan.json +53 -0
  168. package/json-schema/Policy.json +138 -0
  169. package/json-schema/Query.json +128 -0
  170. package/json-schema/RateLimit.json +26 -0
  171. package/json-schema/Report.json +219 -0
  172. package/json-schema/ReportChart.json +45 -0
  173. package/json-schema/ReportColumn.json +35 -0
  174. package/json-schema/ReportGrouping.json +38 -0
  175. package/json-schema/ReportType.json +15 -0
  176. package/json-schema/Role.json +32 -0
  177. package/json-schema/SAMLConfig.json +44 -0
  178. package/json-schema/ScriptValidation.json +48 -0
  179. package/json-schema/SelectOption.json +32 -0
  180. package/json-schema/SessionPolicy.json +27 -0
  181. package/json-schema/SharingLevel.json +13 -0
  182. package/json-schema/SharingRule.json +58 -0
  183. package/json-schema/SharingRuleType.json +15 -0
  184. package/json-schema/SortNode.json +26 -0
  185. package/json-schema/StateMachineValidation.json +59 -0
  186. package/json-schema/Territory.json +77 -0
  187. package/json-schema/TerritoryModel.json +34 -0
  188. package/json-schema/TerritoryType.json +15 -0
  189. package/json-schema/TransformType.json +18 -0
  190. package/json-schema/TranslationBundle.json +78 -0
  191. package/json-schema/TranslationData.json +75 -0
  192. package/json-schema/UniquenessValidation.json +59 -0
  193. package/json-schema/UrlNavItem.json +51 -0
  194. package/json-schema/ValidationRule.json +211 -0
  195. package/json-schema/View.json +500 -0
  196. package/json-schema/Webhook.json +88 -0
  197. package/json-schema/WebhookReceiver.json +66 -0
  198. package/json-schema/WebhookTriggerType.json +16 -0
  199. package/json-schema/WorkflowAction.json +84 -0
  200. package/json-schema/WorkflowRule.json +128 -0
  201. package/json-schema/WorkflowTriggerType.json +16 -0
  202. package/package.json +28 -19
  203. package/dist/examples.d.ts +0 -28
  204. package/dist/examples.d.ts.map +0 -1
  205. package/dist/examples.js +0 -250
  206. package/dist/types/index.d.ts +0 -9
  207. package/dist/types/index.d.ts.map +0 -1
  208. package/dist/types/index.js +0 -8
  209. package/dist/types/meta/field-type.d.ts +0 -54
  210. package/dist/types/meta/field-type.d.ts.map +0 -1
  211. package/dist/types/meta/field-type.js +0 -42
  212. package/dist/types/meta/index.d.ts +0 -13
  213. package/dist/types/meta/index.d.ts.map +0 -1
  214. package/dist/types/meta/index.js +0 -12
  215. package/dist/types/meta/object-entity.d.ts +0 -246
  216. package/dist/types/meta/object-entity.d.ts.map +0 -1
  217. package/dist/types/meta/object-entity.js +0 -9
  218. package/dist/types/meta/object-field.d.ts +0 -199
  219. package/dist/types/meta/object-field.d.ts.map +0 -1
  220. package/dist/types/meta/object-field.js +0 -9
  221. package/dist/types/meta/object-view.d.ts +0 -430
  222. package/dist/types/meta/object-view.d.ts.map +0 -1
  223. package/dist/types/meta/object-view.js +0 -9
  224. package/src/examples.ts +0 -257
  225. package/src/index.ts +0 -10
  226. package/src/types/index.ts +0 -9
  227. package/src/types/meta/field-type.ts +0 -91
  228. package/src/types/meta/index.ts +0 -13
  229. package/src/types/meta/object-entity.ts +0 -265
  230. package/src/types/meta/object-field.ts +0 -218
  231. package/src/types/meta/object-view.ts +0 -475
package/dist/examples.js DELETED
@@ -1,250 +0,0 @@
1
- /**
2
- * Example Usage of ObjectStack Metamodel
3
- *
4
- * This file demonstrates how to use the metamodel interfaces
5
- * to define entities and views.
6
- */
7
- /**
8
- * Example: User Entity Definition
9
- */
10
- export const UserEntity = {
11
- name: 'User',
12
- label: 'User',
13
- pluralLabel: 'Users',
14
- description: 'System user account',
15
- fields: [
16
- {
17
- name: 'id',
18
- label: 'ID',
19
- type: 'text',
20
- required: true,
21
- readonly: true,
22
- },
23
- {
24
- name: 'email',
25
- label: 'Email Address',
26
- type: 'email',
27
- required: true,
28
- unique: true,
29
- maxLength: 255,
30
- },
31
- {
32
- name: 'name',
33
- label: 'Full Name',
34
- type: 'text',
35
- required: true,
36
- maxLength: 100,
37
- },
38
- {
39
- name: 'role',
40
- label: 'Role',
41
- type: 'select',
42
- required: true,
43
- options: [
44
- { value: 'admin', label: 'Administrator' },
45
- { value: 'editor', label: 'Editor' },
46
- { value: 'viewer', label: 'Viewer' },
47
- ],
48
- },
49
- {
50
- name: 'status',
51
- label: 'Status',
52
- type: 'select',
53
- required: true,
54
- defaultValue: 'active',
55
- options: [
56
- { value: 'active', label: 'Active' },
57
- { value: 'inactive', label: 'Inactive' },
58
- { value: 'suspended', label: 'Suspended' },
59
- ],
60
- },
61
- {
62
- name: 'createdAt',
63
- label: 'Created At',
64
- type: 'datetime',
65
- readonly: true,
66
- },
67
- ],
68
- primaryKey: 'id',
69
- displayField: 'name',
70
- icon: 'user',
71
- auditable: true,
72
- searchable: true,
73
- searchableFields: ['name', 'email'],
74
- };
75
- /**
76
- * Example: All Users List View
77
- */
78
- export const AllUsersView = {
79
- name: 'all_users',
80
- label: 'All Users',
81
- entityName: 'User',
82
- type: 'list',
83
- description: 'View all users in the system',
84
- columns: [
85
- {
86
- field: 'name',
87
- label: 'Name',
88
- width: '25%',
89
- sortable: true,
90
- },
91
- {
92
- field: 'email',
93
- label: 'Email',
94
- width: '30%',
95
- sortable: true,
96
- },
97
- {
98
- field: 'role',
99
- label: 'Role',
100
- width: '15%',
101
- sortable: true,
102
- },
103
- {
104
- field: 'status',
105
- label: 'Status',
106
- width: '15%',
107
- sortable: true,
108
- },
109
- {
110
- field: 'createdAt',
111
- label: 'Created',
112
- width: '15%',
113
- sortable: true,
114
- format: 'date:MM/DD/YYYY',
115
- },
116
- ],
117
- sort: [
118
- {
119
- field: 'name',
120
- direction: 'asc',
121
- },
122
- ],
123
- pageSize: 25,
124
- default: true,
125
- };
126
- /**
127
- * Example: Active Users View (with filter)
128
- */
129
- export const ActiveUsersView = {
130
- name: 'active_users',
131
- label: 'Active Users',
132
- entityName: 'User',
133
- type: 'list',
134
- description: 'View only active users',
135
- columns: [
136
- {
137
- field: 'name',
138
- width: '30%',
139
- },
140
- {
141
- field: 'email',
142
- width: '40%',
143
- },
144
- {
145
- field: 'role',
146
- width: '30%',
147
- },
148
- ],
149
- filters: [
150
- {
151
- field: 'status',
152
- operator: 'equals',
153
- value: 'active',
154
- },
155
- ],
156
- sort: [
157
- {
158
- field: 'name',
159
- direction: 'asc',
160
- },
161
- ],
162
- };
163
- /**
164
- * Example: User Form View
165
- */
166
- export const UserFormView = {
167
- name: 'user_form',
168
- label: 'User Form',
169
- entityName: 'User',
170
- type: 'form',
171
- description: 'Form for creating and editing users',
172
- fields: ['name', 'email', 'role', 'status'],
173
- layout: {
174
- type: 'sections',
175
- sections: [
176
- {
177
- id: 'basic',
178
- title: 'Basic Information',
179
- fields: ['name', 'email'],
180
- },
181
- {
182
- id: 'settings',
183
- title: 'Settings',
184
- fields: ['role', 'status'],
185
- },
186
- ],
187
- },
188
- };
189
- /**
190
- * Example: Product Entity with Lookup
191
- */
192
- export const ProductEntity = {
193
- name: 'Product',
194
- label: 'Product',
195
- pluralLabel: 'Products',
196
- description: 'Product catalog',
197
- fields: [
198
- {
199
- name: 'id',
200
- label: 'ID',
201
- type: 'text',
202
- required: true,
203
- readonly: true,
204
- },
205
- {
206
- name: 'name',
207
- label: 'Product Name',
208
- type: 'text',
209
- required: true,
210
- maxLength: 200,
211
- },
212
- {
213
- name: 'description',
214
- label: 'Description',
215
- type: 'textarea',
216
- maxLength: 1000,
217
- },
218
- {
219
- name: 'price',
220
- label: 'Price',
221
- type: 'currency',
222
- required: true,
223
- min: 0,
224
- },
225
- {
226
- name: 'category',
227
- label: 'Category',
228
- type: 'lookup',
229
- required: true,
230
- lookupEntity: 'Category',
231
- lookupDisplayField: 'name',
232
- },
233
- {
234
- name: 'inStock',
235
- label: 'In Stock',
236
- type: 'boolean',
237
- defaultValue: true,
238
- },
239
- {
240
- name: 'image',
241
- label: 'Product Image',
242
- type: 'image',
243
- },
244
- ],
245
- primaryKey: 'id',
246
- displayField: 'name',
247
- icon: 'package',
248
- searchable: true,
249
- searchableFields: ['name', 'description'],
250
- };
@@ -1,9 +0,0 @@
1
- /**
2
- * Type Definitions
3
- *
4
- * This module exports all type definitions used in the ObjectStack specification.
5
- *
6
- * @module types
7
- */
8
- export * from './meta';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,QAAQ,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Type Definitions
3
- *
4
- * This module exports all type definitions used in the ObjectStack specification.
5
- *
6
- * @module types
7
- */
8
- export * from './meta';
@@ -1,54 +0,0 @@
1
- /**
2
- * Field Type Definitions
3
- *
4
- * Defines the available field types in the ObjectStack metamodel.
5
- * These types determine how fields are stored, validated, and rendered.
6
- *
7
- * @module types/meta/field-type
8
- */
9
- /**
10
- * Available field types in the ObjectStack metamodel.
11
- *
12
- * @remarks
13
- * Each field type corresponds to specific storage, validation, and rendering behavior:
14
- *
15
- * - `text`: Short text strings (single line)
16
- * - `textarea`: Long text content (multi-line)
17
- * - `number`: Numeric values (integer or decimal)
18
- * - `boolean`: True/false values (checkbox)
19
- * - `date`: Date values (without time)
20
- * - `datetime`: Date and time values
21
- * - `email`: Email address with validation
22
- * - `url`: URL with validation
23
- * - `lookup`: Reference to another entity (foreign key)
24
- * - `select`: Single selection from predefined options
25
- * - `multiselect`: Multiple selections from predefined options
26
- * - `json`: Arbitrary JSON data structure
27
- * - `file`: File attachment reference
28
- * - `image`: Image file reference with preview
29
- * - `currency`: Monetary values with precision
30
- * - `percentage`: Percentage values (0-100)
31
- *
32
- * @example
33
- * ```typescript
34
- * const nameField: FieldType = 'text';
35
- * const priceField: FieldType = 'currency';
36
- * const ownerField: FieldType = 'lookup';
37
- * ```
38
- */
39
- export type FieldType = 'text' | 'textarea' | 'number' | 'boolean' | 'date' | 'datetime' | 'email' | 'url' | 'lookup' | 'select' | 'multiselect' | 'json' | 'file' | 'image' | 'currency' | 'percentage';
40
- /**
41
- * Type guard to check if a string is a valid FieldType
42
- *
43
- * @param value - The value to check
44
- * @returns True if the value is a valid FieldType
45
- *
46
- * @example
47
- * ```typescript
48
- * if (isFieldType('text')) {
49
- * // value is a valid FieldType
50
- * }
51
- * ```
52
- */
53
- export declare function isFieldType(value: unknown): value is FieldType;
54
- //# sourceMappingURL=field-type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field-type.d.ts","sourceRoot":"","sources":["../../../src/types/meta/field-type.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,UAAU,GACV,QAAQ,GACR,SAAS,GACT,MAAM,GACN,UAAU,GACV,OAAO,GACP,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,aAAa,GACb,MAAM,GACN,MAAM,GACN,OAAO,GACP,UAAU,GACV,YAAY,CAAC;AAEjB;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAoB9D"}
@@ -1,42 +0,0 @@
1
- /**
2
- * Field Type Definitions
3
- *
4
- * Defines the available field types in the ObjectStack metamodel.
5
- * These types determine how fields are stored, validated, and rendered.
6
- *
7
- * @module types/meta/field-type
8
- */
9
- /**
10
- * Type guard to check if a string is a valid FieldType
11
- *
12
- * @param value - The value to check
13
- * @returns True if the value is a valid FieldType
14
- *
15
- * @example
16
- * ```typescript
17
- * if (isFieldType('text')) {
18
- * // value is a valid FieldType
19
- * }
20
- * ```
21
- */
22
- export function isFieldType(value) {
23
- const validTypes = [
24
- 'text',
25
- 'textarea',
26
- 'number',
27
- 'boolean',
28
- 'date',
29
- 'datetime',
30
- 'email',
31
- 'url',
32
- 'lookup',
33
- 'select',
34
- 'multiselect',
35
- 'json',
36
- 'file',
37
- 'image',
38
- 'currency',
39
- 'percentage',
40
- ];
41
- return typeof value === 'string' && validTypes.includes(value);
42
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Metamodel Type Definitions
3
- *
4
- * This module defines the core metamodel interfaces that form the contract
5
- * between the backend (ObjectQL) parser and the frontend (ObjectUI) renderer.
6
- *
7
- * @module types/meta
8
- */
9
- export * from './field-type';
10
- export * from './object-field';
11
- export * from './object-entity';
12
- export * from './object-view';
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/meta/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Metamodel Type Definitions
3
- *
4
- * This module defines the core metamodel interfaces that form the contract
5
- * between the backend (ObjectQL) parser and the frontend (ObjectUI) renderer.
6
- *
7
- * @module types/meta
8
- */
9
- export * from './field-type';
10
- export * from './object-field';
11
- export * from './object-entity';
12
- export * from './object-view';
@@ -1,246 +0,0 @@
1
- /**
2
- * Object Entity Interface
3
- *
4
- * Defines the structure of an entity in the ObjectStack metamodel.
5
- * Entities represent data models/tables with their fields and relationships.
6
- *
7
- * @module types/meta/object-entity
8
- */
9
- import { ObjectField } from './object-field';
10
- /**
11
- * Represents an entity definition in the ObjectStack metamodel
12
- *
13
- * @remarks
14
- * ObjectEntity is the core data model definition. It describes a logical
15
- * entity (like User, Account, Product) with its fields, constraints,
16
- * and metadata. This interface is used by:
17
- *
18
- * - ObjectQL parser: To validate and process schema definitions
19
- * - ObjectUI renderer: To generate forms, tables, and views
20
- * - Database drivers: To create tables and migrations
21
- * - API generators: To expose REST/GraphQL endpoints
22
- *
23
- * @example
24
- * ```typescript
25
- * const userEntity: ObjectEntity = {
26
- * name: 'User',
27
- * label: 'User',
28
- * pluralLabel: 'Users',
29
- * description: 'System user account',
30
- * fields: [
31
- * {
32
- * name: 'id',
33
- * label: 'ID',
34
- * type: 'text',
35
- * required: true,
36
- * readonly: true
37
- * },
38
- * {
39
- * name: 'email',
40
- * label: 'Email',
41
- * type: 'email',
42
- * required: true,
43
- * unique: true
44
- * },
45
- * {
46
- * name: 'name',
47
- * label: 'Full Name',
48
- * type: 'text',
49
- * required: true
50
- * }
51
- * ],
52
- * primaryKey: 'id',
53
- * displayField: 'name'
54
- * };
55
- * ```
56
- */
57
- export interface ObjectEntity {
58
- /**
59
- * Technical name of the entity
60
- *
61
- * @remarks
62
- * Used in code, APIs, and database table names.
63
- * Should be in PascalCase for entities.
64
- * Must be unique across the system.
65
- *
66
- * @example 'User', 'Account', 'SalesOrder'
67
- */
68
- name: string;
69
- /**
70
- * Human-readable singular label for the entity
71
- *
72
- * @remarks
73
- * Used in UI headers, forms, and documentation.
74
- *
75
- * @example 'User', 'Sales Order', 'Product Category'
76
- */
77
- label: string;
78
- /**
79
- * Human-readable plural label for the entity
80
- *
81
- * @remarks
82
- * Used in UI when displaying lists or collections.
83
- *
84
- * @example 'Users', 'Sales Orders', 'Product Categories'
85
- */
86
- pluralLabel: string;
87
- /**
88
- * Detailed description of the entity's purpose
89
- *
90
- * @remarks
91
- * Used for documentation and context-sensitive help
92
- */
93
- description?: string;
94
- /**
95
- * Array of field definitions that make up this entity
96
- *
97
- * @remarks
98
- * Each field represents a column/attribute in the entity.
99
- * Field names must be unique within the entity.
100
- *
101
- * @see ObjectField
102
- */
103
- fields: ObjectField[];
104
- /**
105
- * Name of the field that serves as the primary key
106
- *
107
- * @remarks
108
- * The primary key uniquely identifies each record.
109
- * Must be one of the field names in the fields array.
110
- *
111
- * @defaultValue 'id'
112
- *
113
- * @example 'id', 'uuid', 'userId'
114
- */
115
- primaryKey?: string;
116
- /**
117
- * Name of the field to use as the display/title field
118
- *
119
- * @remarks
120
- * Used when showing a record reference in lookups, breadcrumbs, etc.
121
- * Should be a field that uniquely and meaningfully identifies a record.
122
- *
123
- * @defaultValue 'name'
124
- *
125
- * @example 'name', 'title', 'email', 'code'
126
- */
127
- displayField?: string;
128
- /**
129
- * Icon identifier for the entity
130
- *
131
- * @remarks
132
- * Used in navigation menus, headers, and lists.
133
- * Can be an icon library reference (e.g., 'user', 'building', 'package')
134
- * or a URL to a custom icon.
135
- *
136
- * @example 'user', 'briefcase', 'https://example.com/icon.svg'
137
- */
138
- icon?: string;
139
- /**
140
- * Color theme for the entity
141
- *
142
- * @remarks
143
- * Used for visual distinction in UI elements.
144
- * Can be a CSS color name, hex code, or theme variable.
145
- *
146
- * @example 'blue', '#3B82F6', 'primary'
147
- */
148
- color?: string;
149
- /**
150
- * Whether this entity should be audited
151
- *
152
- * @remarks
153
- * When enabled, tracks create/update/delete operations with user and timestamp.
154
- * Typically adds fields like: createdBy, createdAt, updatedBy, updatedAt
155
- *
156
- * @defaultValue false
157
- */
158
- auditable?: boolean;
159
- /**
160
- * Whether this entity supports soft deletion
161
- *
162
- * @remarks
163
- * When enabled, records are marked as deleted rather than physically removed.
164
- * Typically adds a 'deletedAt' timestamp field.
165
- *
166
- * @defaultValue false
167
- */
168
- softDelete?: boolean;
169
- /**
170
- * Whether this entity can be searched via full-text search
171
- *
172
- * @remarks
173
- * When enabled, the entity is indexed for full-text search operations
174
- *
175
- * @defaultValue false
176
- */
177
- searchable?: boolean;
178
- /**
179
- * Names of fields to include in full-text search
180
- *
181
- * @remarks
182
- * Only relevant when searchable is true.
183
- * If not specified, all text fields are included.
184
- *
185
- * @example ['name', 'description', 'email']
186
- */
187
- searchableFields?: string[];
188
- /**
189
- * Permission scope identifier
190
- *
191
- * @remarks
192
- * Defines the permission namespace for this entity.
193
- * Used to generate permission strings like: '{scope}.read', '{scope}.write'
194
- *
195
- * @example 'user', 'sales.order', 'product.category'
196
- */
197
- permissionScope?: string;
198
- /**
199
- * Custom validation rules
200
- *
201
- * @remarks
202
- * Array of validation rule identifiers that apply to the entire entity.
203
- * Can reference built-in validators or custom validation functions.
204
- *
205
- * @example ['uniqueTogether:email,domain', 'requiredIf:field1,field2']
206
- */
207
- validationRules?: string[];
208
- /**
209
- * Database table name override
210
- *
211
- * @remarks
212
- * By default, table name is derived from entity name.
213
- * Use this to specify a custom table name.
214
- *
215
- * @example 'tbl_users', 'legacy_accounts'
216
- */
217
- tableName?: string;
218
- /**
219
- * Entity version for schema migration tracking
220
- *
221
- * @remarks
222
- * Incremented when breaking changes are made to the entity structure.
223
- * Used for migration management and compatibility checking.
224
- *
225
- * @defaultValue 1
226
- */
227
- version?: number;
228
- /**
229
- * Tags for categorization and filtering
230
- *
231
- * @remarks
232
- * Used to organize entities into logical groups.
233
- *
234
- * @example ['core', 'sales', 'internal']
235
- */
236
- tags?: string[];
237
- /**
238
- * Custom metadata for extensions and plugins
239
- *
240
- * @remarks
241
- * Allows third-party code to attach arbitrary metadata to entities
242
- * without modifying the core interface
243
- */
244
- metadata?: Record<string, unknown>;
245
- }
246
- //# sourceMappingURL=object-entity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object-entity.d.ts","sourceRoot":"","sources":["../../../src/types/meta/object-entity.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;;;OASG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;OAOG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;;;OAQG;IACH,MAAM,EAAE,WAAW,EAAE,CAAC;IAEtB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5B;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAE3B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Object Entity Interface
3
- *
4
- * Defines the structure of an entity in the ObjectStack metamodel.
5
- * Entities represent data models/tables with their fields and relationships.
6
- *
7
- * @module types/meta/object-entity
8
- */
9
- export {};