@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
@@ -0,0 +1,299 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * 1. Object Navigation Item
4
+ * Navigates to an object's list view.
5
+ */
6
+ export declare const ObjectNavItemSchema: z.ZodObject<{
7
+ /** Unique identifier for the item */
8
+ id: z.ZodString;
9
+ /** Display label */
10
+ label: z.ZodString;
11
+ /** Icon name (Lucide) */
12
+ icon: z.ZodOptional<z.ZodString>;
13
+ /**
14
+ * Visibility condition.
15
+ * Formula expression returning boolean.
16
+ * e.g. "user.is_admin || user.department == 'sales'"
17
+ */
18
+ visible: z.ZodOptional<z.ZodString>;
19
+ } & {
20
+ type: z.ZodLiteral<"object">;
21
+ objectName: z.ZodString;
22
+ viewName: z.ZodOptional<z.ZodString>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ type: "object";
25
+ label: string;
26
+ objectName: string;
27
+ id: string;
28
+ icon?: string | undefined;
29
+ visible?: string | undefined;
30
+ viewName?: string | undefined;
31
+ }, {
32
+ type: "object";
33
+ label: string;
34
+ objectName: string;
35
+ id: string;
36
+ icon?: string | undefined;
37
+ visible?: string | undefined;
38
+ viewName?: string | undefined;
39
+ }>;
40
+ /**
41
+ * 2. Dashboard Navigation Item
42
+ * Navigates to a specific dashboard.
43
+ */
44
+ export declare const DashboardNavItemSchema: z.ZodObject<{
45
+ /** Unique identifier for the item */
46
+ id: z.ZodString;
47
+ /** Display label */
48
+ label: z.ZodString;
49
+ /** Icon name (Lucide) */
50
+ icon: z.ZodOptional<z.ZodString>;
51
+ /**
52
+ * Visibility condition.
53
+ * Formula expression returning boolean.
54
+ * e.g. "user.is_admin || user.department == 'sales'"
55
+ */
56
+ visible: z.ZodOptional<z.ZodString>;
57
+ } & {
58
+ type: z.ZodLiteral<"dashboard">;
59
+ dashboardName: z.ZodString;
60
+ }, "strip", z.ZodTypeAny, {
61
+ type: "dashboard";
62
+ label: string;
63
+ id: string;
64
+ dashboardName: string;
65
+ icon?: string | undefined;
66
+ visible?: string | undefined;
67
+ }, {
68
+ type: "dashboard";
69
+ label: string;
70
+ id: string;
71
+ dashboardName: string;
72
+ icon?: string | undefined;
73
+ visible?: string | undefined;
74
+ }>;
75
+ /**
76
+ * 3. Page Navigation Item
77
+ * Navigates to a custom UI page/component.
78
+ */
79
+ export declare const PageNavItemSchema: z.ZodObject<{
80
+ /** Unique identifier for the item */
81
+ id: z.ZodString;
82
+ /** Display label */
83
+ label: z.ZodString;
84
+ /** Icon name (Lucide) */
85
+ icon: z.ZodOptional<z.ZodString>;
86
+ /**
87
+ * Visibility condition.
88
+ * Formula expression returning boolean.
89
+ * e.g. "user.is_admin || user.department == 'sales'"
90
+ */
91
+ visible: z.ZodOptional<z.ZodString>;
92
+ } & {
93
+ type: z.ZodLiteral<"page">;
94
+ pageName: z.ZodString;
95
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ type: "page";
98
+ label: string;
99
+ id: string;
100
+ pageName: string;
101
+ params?: Record<string, any> | undefined;
102
+ icon?: string | undefined;
103
+ visible?: string | undefined;
104
+ }, {
105
+ type: "page";
106
+ label: string;
107
+ id: string;
108
+ pageName: string;
109
+ params?: Record<string, any> | undefined;
110
+ icon?: string | undefined;
111
+ visible?: string | undefined;
112
+ }>;
113
+ /**
114
+ * 4. URL Navigation Item
115
+ * Navigates to an external or absolute URL.
116
+ */
117
+ export declare const UrlNavItemSchema: z.ZodObject<{
118
+ /** Unique identifier for the item */
119
+ id: z.ZodString;
120
+ /** Display label */
121
+ label: z.ZodString;
122
+ /** Icon name (Lucide) */
123
+ icon: z.ZodOptional<z.ZodString>;
124
+ /**
125
+ * Visibility condition.
126
+ * Formula expression returning boolean.
127
+ * e.g. "user.is_admin || user.department == 'sales'"
128
+ */
129
+ visible: z.ZodOptional<z.ZodString>;
130
+ } & {
131
+ type: z.ZodLiteral<"url">;
132
+ url: z.ZodString;
133
+ target: z.ZodDefault<z.ZodEnum<["_self", "_blank"]>>;
134
+ }, "strip", z.ZodTypeAny, {
135
+ url: string;
136
+ type: "url";
137
+ label: string;
138
+ id: string;
139
+ target: "_self" | "_blank";
140
+ icon?: string | undefined;
141
+ visible?: string | undefined;
142
+ }, {
143
+ url: string;
144
+ type: "url";
145
+ label: string;
146
+ id: string;
147
+ icon?: string | undefined;
148
+ target?: "_self" | "_blank" | undefined;
149
+ visible?: string | undefined;
150
+ }>;
151
+ /**
152
+ * 5. Group Navigation Item
153
+ * A container for child navigation items (Sub-menu).
154
+ * Does not perform navigation itself.
155
+ */
156
+ export declare const GroupNavItemSchema: z.ZodObject<{
157
+ /** Unique identifier for the item */
158
+ id: z.ZodString;
159
+ /** Display label */
160
+ label: z.ZodString;
161
+ /** Icon name (Lucide) */
162
+ icon: z.ZodOptional<z.ZodString>;
163
+ /**
164
+ * Visibility condition.
165
+ * Formula expression returning boolean.
166
+ * e.g. "user.is_admin || user.department == 'sales'"
167
+ */
168
+ visible: z.ZodOptional<z.ZodString>;
169
+ } & {
170
+ type: z.ZodLiteral<"group">;
171
+ expanded: z.ZodDefault<z.ZodBoolean>;
172
+ }, "strip", z.ZodTypeAny, {
173
+ type: "group";
174
+ label: string;
175
+ id: string;
176
+ expanded: boolean;
177
+ icon?: string | undefined;
178
+ visible?: string | undefined;
179
+ }, {
180
+ type: "group";
181
+ label: string;
182
+ id: string;
183
+ icon?: string | undefined;
184
+ visible?: string | undefined;
185
+ expanded?: boolean | undefined;
186
+ }>;
187
+ /**
188
+ * Recursive Union of all navigation item types.
189
+ * Allows constructing a navigation tree.
190
+ */
191
+ export declare const NavigationItemSchema: z.ZodType<any>;
192
+ /**
193
+ * App Branding Configuration
194
+ * Allows configuring the look and feel of the specific app.
195
+ */
196
+ export declare const AppBrandingSchema: z.ZodObject<{
197
+ primaryColor: z.ZodOptional<z.ZodString>;
198
+ logo: z.ZodOptional<z.ZodString>;
199
+ favicon: z.ZodOptional<z.ZodString>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ primaryColor?: string | undefined;
202
+ logo?: string | undefined;
203
+ favicon?: string | undefined;
204
+ }, {
205
+ primaryColor?: string | undefined;
206
+ logo?: string | undefined;
207
+ favicon?: string | undefined;
208
+ }>;
209
+ /**
210
+ * Schema for Applications (Apps).
211
+ * A logical container for business functionality (e.g., "Sales CRM", "HR Portal").
212
+ */
213
+ export declare const AppSchema: z.ZodObject<{
214
+ /** Machine name (id) */
215
+ name: z.ZodString;
216
+ /** Display label */
217
+ label: z.ZodString;
218
+ /** Description */
219
+ description: z.ZodOptional<z.ZodString>;
220
+ /** Icon name (Lucide) */
221
+ icon: z.ZodOptional<z.ZodString>;
222
+ /** Branding/Theming Configuration */
223
+ branding: z.ZodOptional<z.ZodObject<{
224
+ primaryColor: z.ZodOptional<z.ZodString>;
225
+ logo: z.ZodOptional<z.ZodString>;
226
+ favicon: z.ZodOptional<z.ZodString>;
227
+ }, "strip", z.ZodTypeAny, {
228
+ primaryColor?: string | undefined;
229
+ logo?: string | undefined;
230
+ favicon?: string | undefined;
231
+ }, {
232
+ primaryColor?: string | undefined;
233
+ logo?: string | undefined;
234
+ favicon?: string | undefined;
235
+ }>>;
236
+ /** Application status */
237
+ active: z.ZodDefault<z.ZodBoolean>;
238
+ /** Is this the default app for new users? */
239
+ isDefault: z.ZodDefault<z.ZodBoolean>;
240
+ /**
241
+ * Navigation Tree Structure.
242
+ * Replaces the old flat 'tabs' list with a structured menu.
243
+ */
244
+ navigation: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
245
+ /**
246
+ * App-level Home Page Override
247
+ * ID of the navigation item to act as the landing page.
248
+ * If not set, usually defaults to the first navigation item.
249
+ */
250
+ homePageId: z.ZodOptional<z.ZodString>;
251
+ /**
252
+ * Access Control
253
+ * List of permissions required to access this app.
254
+ * Modern replacement for role/profile based assignment.
255
+ * Example: ["app.access.crm"]
256
+ */
257
+ requiredPermissions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
258
+ }, "strip", z.ZodTypeAny, {
259
+ label: string;
260
+ name: string;
261
+ active: boolean;
262
+ isDefault: boolean;
263
+ navigation: any[];
264
+ description?: string | undefined;
265
+ icon?: string | undefined;
266
+ branding?: {
267
+ primaryColor?: string | undefined;
268
+ logo?: string | undefined;
269
+ favicon?: string | undefined;
270
+ } | undefined;
271
+ homePageId?: string | undefined;
272
+ requiredPermissions?: string[] | undefined;
273
+ }, {
274
+ label: string;
275
+ name: string;
276
+ navigation: any[];
277
+ description?: string | undefined;
278
+ icon?: string | undefined;
279
+ active?: boolean | undefined;
280
+ branding?: {
281
+ primaryColor?: string | undefined;
282
+ logo?: string | undefined;
283
+ favicon?: string | undefined;
284
+ } | undefined;
285
+ isDefault?: boolean | undefined;
286
+ homePageId?: string | undefined;
287
+ requiredPermissions?: string[] | undefined;
288
+ }>;
289
+ export type App = z.infer<typeof AppSchema>;
290
+ export type AppBranding = z.infer<typeof AppBrandingSchema>;
291
+ export type NavigationItem = z.infer<typeof NavigationItemSchema>;
292
+ export type ObjectNavItem = z.infer<typeof ObjectNavItemSchema>;
293
+ export type DashboardNavItem = z.infer<typeof DashboardNavItemSchema>;
294
+ export type PageNavItem = z.infer<typeof PageNavItemSchema>;
295
+ export type UrlNavItem = z.infer<typeof UrlNavItemSchema>;
296
+ export type GroupNavItem = z.infer<typeof GroupNavItemSchema> & {
297
+ children: NavigationItem[];
298
+ };
299
+ //# sourceMappingURL=app.zod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.zod.d.ts","sourceRoot":"","sources":["../../src/ui/app.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB;;;GAGG;AACH,eAAO,MAAM,mBAAmB;IArB9B,qCAAqC;;IAGrC,oBAAoB;;IAGpB,yBAAyB;;IAGzB;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;EAYH,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB;IA/BjC,qCAAqC;;IAGrC,oBAAoB;;IAGpB,yBAAyB;;IAGzB;;;;OAIG;;;;;;;;;;;;;;;;;;;EAqBH,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB;IAxC5B,qCAAqC;;IAGrC,oBAAoB;;IAGpB,yBAAyB;;IAGzB;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;EA+BH,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB;IAlD3B,qCAAqC;;IAGrC,oBAAoB;;IAGpB,yBAAyB;;IAGzB;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;EAyCH,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;IA7D7B,qCAAqC;;IAGrC,oBAAoB;;IAGpB,yBAAyB;;IAGzB;;;;OAIG;;;;;;;;;;;;;;;;;;;EAoDH,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAU/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAI5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,SAAS;IACpB,wBAAwB;;IAGxB,oBAAoB;;IAGpB,kBAAkB;;IAGlB,yBAAyB;;IAGzB,qCAAqC;;;;;;;;;;;;;;IAGrC,yBAAyB;;IAGzB,6CAA6C;;IAG7C;;;OAGG;;IAGH;;;;OAIG;;IAGH;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAGH,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAC5C,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGlE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,GAAG;IAAE,QAAQ,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC"}
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppSchema = exports.AppBrandingSchema = exports.NavigationItemSchema = exports.GroupNavItemSchema = exports.UrlNavItemSchema = exports.PageNavItemSchema = exports.DashboardNavItemSchema = exports.ObjectNavItemSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Base Navigation Item Schema
7
+ * Shared properties for all navigation types.
8
+ */
9
+ const BaseNavItemSchema = zod_1.z.object({
10
+ /** Unique identifier for the item */
11
+ id: zod_1.z.string().describe('Unique identifier for this navigation item'),
12
+ /** Display label */
13
+ label: zod_1.z.string().describe('Display proper label'),
14
+ /** Icon name (Lucide) */
15
+ icon: zod_1.z.string().optional().describe('Icon name'),
16
+ /**
17
+ * Visibility condition.
18
+ * Formula expression returning boolean.
19
+ * e.g. "user.is_admin || user.department == 'sales'"
20
+ */
21
+ visible: zod_1.z.string().optional().describe('Visibility formula condition'),
22
+ });
23
+ /**
24
+ * 1. Object Navigation Item
25
+ * Navigates to an object's list view.
26
+ */
27
+ exports.ObjectNavItemSchema = BaseNavItemSchema.extend({
28
+ type: zod_1.z.literal('object'),
29
+ objectName: zod_1.z.string().describe('Target object name'),
30
+ viewName: zod_1.z.string().optional().describe('Default list view to open. Defaults to "all"'),
31
+ });
32
+ /**
33
+ * 2. Dashboard Navigation Item
34
+ * Navigates to a specific dashboard.
35
+ */
36
+ exports.DashboardNavItemSchema = BaseNavItemSchema.extend({
37
+ type: zod_1.z.literal('dashboard'),
38
+ dashboardName: zod_1.z.string().describe('Target dashboard name'),
39
+ });
40
+ /**
41
+ * 3. Page Navigation Item
42
+ * Navigates to a custom UI page/component.
43
+ */
44
+ exports.PageNavItemSchema = BaseNavItemSchema.extend({
45
+ type: zod_1.z.literal('page'),
46
+ pageName: zod_1.z.string().describe('Target custom page component name'),
47
+ params: zod_1.z.record(zod_1.z.any()).optional().describe('Parameters passed to the page context'),
48
+ });
49
+ /**
50
+ * 4. URL Navigation Item
51
+ * Navigates to an external or absolute URL.
52
+ */
53
+ exports.UrlNavItemSchema = BaseNavItemSchema.extend({
54
+ type: zod_1.z.literal('url'),
55
+ url: zod_1.z.string().describe('Target external URL'),
56
+ target: zod_1.z.enum(['_self', '_blank']).default('_self').describe('Link target window'),
57
+ });
58
+ /**
59
+ * 5. Group Navigation Item
60
+ * A container for child navigation items (Sub-menu).
61
+ * Does not perform navigation itself.
62
+ */
63
+ exports.GroupNavItemSchema = BaseNavItemSchema.extend({
64
+ type: zod_1.z.literal('group'),
65
+ expanded: zod_1.z.boolean().default(false).describe('Default expansion state in sidebar'),
66
+ // children property is added in the recursive definition below
67
+ });
68
+ /**
69
+ * Recursive Union of all navigation item types.
70
+ * Allows constructing a navigation tree.
71
+ */
72
+ exports.NavigationItemSchema = zod_1.z.lazy(() => zod_1.z.union([
73
+ exports.ObjectNavItemSchema,
74
+ exports.DashboardNavItemSchema,
75
+ exports.PageNavItemSchema,
76
+ exports.UrlNavItemSchema,
77
+ exports.GroupNavItemSchema.extend({
78
+ children: zod_1.z.array(exports.NavigationItemSchema).describe('Child navigation items'),
79
+ })
80
+ ]));
81
+ /**
82
+ * App Branding Configuration
83
+ * Allows configuring the look and feel of the specific app.
84
+ */
85
+ exports.AppBrandingSchema = zod_1.z.object({
86
+ primaryColor: zod_1.z.string().optional().describe('Primary theme color hex code'),
87
+ logo: zod_1.z.string().optional().describe('Custom logo URL for this app'),
88
+ favicon: zod_1.z.string().optional().describe('Custom favicon URL for this app'),
89
+ });
90
+ /**
91
+ * Schema for Applications (Apps).
92
+ * A logical container for business functionality (e.g., "Sales CRM", "HR Portal").
93
+ */
94
+ exports.AppSchema = zod_1.z.object({
95
+ /** Machine name (id) */
96
+ name: zod_1.z.string().regex(/^[a-z_][a-z0-9_]*$/).describe('App unique machine name'),
97
+ /** Display label */
98
+ label: zod_1.z.string().describe('App display label'),
99
+ /** Description */
100
+ description: zod_1.z.string().optional().describe('App description'),
101
+ /** Icon name (Lucide) */
102
+ icon: zod_1.z.string().optional().describe('App icon used in the App Launcher'),
103
+ /** Branding/Theming Configuration */
104
+ branding: exports.AppBrandingSchema.optional().describe('App-specific branding'),
105
+ /** Application status */
106
+ active: zod_1.z.boolean().default(true).describe('Whether the app is enabled'),
107
+ /** Is this the default app for new users? */
108
+ isDefault: zod_1.z.boolean().default(false).describe('Is default app'),
109
+ /**
110
+ * Navigation Tree Structure.
111
+ * Replaces the old flat 'tabs' list with a structured menu.
112
+ */
113
+ navigation: zod_1.z.array(exports.NavigationItemSchema).describe('Structured navigation menu tree'),
114
+ /**
115
+ * App-level Home Page Override
116
+ * ID of the navigation item to act as the landing page.
117
+ * If not set, usually defaults to the first navigation item.
118
+ */
119
+ homePageId: zod_1.z.string().optional().describe('ID of the navigation item to serve as landing page'),
120
+ /**
121
+ * Access Control
122
+ * List of permissions required to access this app.
123
+ * Modern replacement for role/profile based assignment.
124
+ * Example: ["app.access.crm"]
125
+ */
126
+ requiredPermissions: zod_1.z.array(zod_1.z.string()).optional().describe('Permissions required to access this app'),
127
+ });
@@ -0,0 +1,207 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Chart Type Enum
4
+ */
5
+ export declare const ChartType: z.ZodEnum<["metric", "bar", "line", "pie", "donut", "funnel", "table", "text"]>;
6
+ /**
7
+ * Dashboard Widget Schema
8
+ * A single component on the dashboard grid.
9
+ */
10
+ export declare const DashboardWidgetSchema: z.ZodObject<{
11
+ /** Widget Title */
12
+ title: z.ZodOptional<z.ZodString>;
13
+ /** Visualization Type */
14
+ type: z.ZodDefault<z.ZodEnum<["metric", "bar", "line", "pie", "donut", "funnel", "table", "text"]>>;
15
+ /** Data Source Object */
16
+ object: z.ZodOptional<z.ZodString>;
17
+ /** Data Filter (ObjectQL JSON) */
18
+ filter: z.ZodOptional<z.ZodAny>;
19
+ /** Category Field (X-Axis / Group By) */
20
+ categoryField: z.ZodOptional<z.ZodString>;
21
+ /** Value Field (Y-Axis) */
22
+ valueField: z.ZodOptional<z.ZodString>;
23
+ /** Aggregate operation */
24
+ aggregate: z.ZodDefault<z.ZodOptional<z.ZodEnum<["count", "sum", "avg", "min", "max"]>>>;
25
+ /**
26
+ * Layout Position (React-Grid-Layout style)
27
+ * x: column (0-11)
28
+ * y: row
29
+ * w: width (1-12)
30
+ * h: height
31
+ */
32
+ layout: z.ZodObject<{
33
+ x: z.ZodNumber;
34
+ y: z.ZodNumber;
35
+ w: z.ZodNumber;
36
+ h: z.ZodNumber;
37
+ }, "strip", z.ZodTypeAny, {
38
+ x: number;
39
+ y: number;
40
+ w: number;
41
+ h: number;
42
+ }, {
43
+ x: number;
44
+ y: number;
45
+ w: number;
46
+ h: number;
47
+ }>;
48
+ /** Widget specific options (colors, legend, etc.) */
49
+ options: z.ZodOptional<z.ZodAny>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ type: "text" | "metric" | "bar" | "line" | "pie" | "donut" | "funnel" | "table";
52
+ aggregate: "min" | "max" | "count" | "sum" | "avg";
53
+ layout: {
54
+ x: number;
55
+ y: number;
56
+ w: number;
57
+ h: number;
58
+ };
59
+ object?: string | undefined;
60
+ filter?: any;
61
+ options?: any;
62
+ title?: string | undefined;
63
+ categoryField?: string | undefined;
64
+ valueField?: string | undefined;
65
+ }, {
66
+ layout: {
67
+ x: number;
68
+ y: number;
69
+ w: number;
70
+ h: number;
71
+ };
72
+ object?: string | undefined;
73
+ filter?: any;
74
+ options?: any;
75
+ type?: "text" | "metric" | "bar" | "line" | "pie" | "donut" | "funnel" | "table" | undefined;
76
+ title?: string | undefined;
77
+ categoryField?: string | undefined;
78
+ valueField?: string | undefined;
79
+ aggregate?: "min" | "max" | "count" | "sum" | "avg" | undefined;
80
+ }>;
81
+ /**
82
+ * Dashboard Schema
83
+ * Represents a page containing multiple visualizations.
84
+ */
85
+ export declare const DashboardSchema: z.ZodObject<{
86
+ /** Machine name */
87
+ name: z.ZodString;
88
+ /** Display label */
89
+ label: z.ZodString;
90
+ /** Description */
91
+ description: z.ZodOptional<z.ZodString>;
92
+ /** Collection of widgets */
93
+ widgets: z.ZodArray<z.ZodObject<{
94
+ /** Widget Title */
95
+ title: z.ZodOptional<z.ZodString>;
96
+ /** Visualization Type */
97
+ type: z.ZodDefault<z.ZodEnum<["metric", "bar", "line", "pie", "donut", "funnel", "table", "text"]>>;
98
+ /** Data Source Object */
99
+ object: z.ZodOptional<z.ZodString>;
100
+ /** Data Filter (ObjectQL JSON) */
101
+ filter: z.ZodOptional<z.ZodAny>;
102
+ /** Category Field (X-Axis / Group By) */
103
+ categoryField: z.ZodOptional<z.ZodString>;
104
+ /** Value Field (Y-Axis) */
105
+ valueField: z.ZodOptional<z.ZodString>;
106
+ /** Aggregate operation */
107
+ aggregate: z.ZodDefault<z.ZodOptional<z.ZodEnum<["count", "sum", "avg", "min", "max"]>>>;
108
+ /**
109
+ * Layout Position (React-Grid-Layout style)
110
+ * x: column (0-11)
111
+ * y: row
112
+ * w: width (1-12)
113
+ * h: height
114
+ */
115
+ layout: z.ZodObject<{
116
+ x: z.ZodNumber;
117
+ y: z.ZodNumber;
118
+ w: z.ZodNumber;
119
+ h: z.ZodNumber;
120
+ }, "strip", z.ZodTypeAny, {
121
+ x: number;
122
+ y: number;
123
+ w: number;
124
+ h: number;
125
+ }, {
126
+ x: number;
127
+ y: number;
128
+ w: number;
129
+ h: number;
130
+ }>;
131
+ /** Widget specific options (colors, legend, etc.) */
132
+ options: z.ZodOptional<z.ZodAny>;
133
+ }, "strip", z.ZodTypeAny, {
134
+ type: "text" | "metric" | "bar" | "line" | "pie" | "donut" | "funnel" | "table";
135
+ aggregate: "min" | "max" | "count" | "sum" | "avg";
136
+ layout: {
137
+ x: number;
138
+ y: number;
139
+ w: number;
140
+ h: number;
141
+ };
142
+ object?: string | undefined;
143
+ filter?: any;
144
+ options?: any;
145
+ title?: string | undefined;
146
+ categoryField?: string | undefined;
147
+ valueField?: string | undefined;
148
+ }, {
149
+ layout: {
150
+ x: number;
151
+ y: number;
152
+ w: number;
153
+ h: number;
154
+ };
155
+ object?: string | undefined;
156
+ filter?: any;
157
+ options?: any;
158
+ type?: "text" | "metric" | "bar" | "line" | "pie" | "donut" | "funnel" | "table" | undefined;
159
+ title?: string | undefined;
160
+ categoryField?: string | undefined;
161
+ valueField?: string | undefined;
162
+ aggregate?: "min" | "max" | "count" | "sum" | "avg" | undefined;
163
+ }>, "many">;
164
+ }, "strip", z.ZodTypeAny, {
165
+ label: string;
166
+ name: string;
167
+ widgets: {
168
+ type: "text" | "metric" | "bar" | "line" | "pie" | "donut" | "funnel" | "table";
169
+ aggregate: "min" | "max" | "count" | "sum" | "avg";
170
+ layout: {
171
+ x: number;
172
+ y: number;
173
+ w: number;
174
+ h: number;
175
+ };
176
+ object?: string | undefined;
177
+ filter?: any;
178
+ options?: any;
179
+ title?: string | undefined;
180
+ categoryField?: string | undefined;
181
+ valueField?: string | undefined;
182
+ }[];
183
+ description?: string | undefined;
184
+ }, {
185
+ label: string;
186
+ name: string;
187
+ widgets: {
188
+ layout: {
189
+ x: number;
190
+ y: number;
191
+ w: number;
192
+ h: number;
193
+ };
194
+ object?: string | undefined;
195
+ filter?: any;
196
+ options?: any;
197
+ type?: "text" | "metric" | "bar" | "line" | "pie" | "donut" | "funnel" | "table" | undefined;
198
+ title?: string | undefined;
199
+ categoryField?: string | undefined;
200
+ valueField?: string | undefined;
201
+ aggregate?: "min" | "max" | "count" | "sum" | "avg" | undefined;
202
+ }[];
203
+ description?: string | undefined;
204
+ }>;
205
+ export type Dashboard = z.infer<typeof DashboardSchema>;
206
+ export type DashboardWidget = z.infer<typeof DashboardWidgetSchema>;
207
+ //# sourceMappingURL=dashboard.zod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.zod.d.ts","sourceRoot":"","sources":["../../src/ui/dashboard.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,SAAS,iFASpB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB;IAChC,mBAAmB;;IAGnB,yBAAyB;;IAGzB,yBAAyB;;IAGzB,kCAAkC;;IAGlC,yCAAyC;;IAGzC,2BAA2B;;IAG3B,0BAA0B;;IAG1B;;;;;;OAMG;;;;;;;;;;;;;;;;;IAQH,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAErD,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B,mBAAmB;;IAGnB,oBAAoB;;IAGpB,kBAAkB;;IAGlB,4BAA4B;;QArD5B,mBAAmB;;QAGnB,yBAAyB;;QAGzB,yBAAyB;;QAGzB,kCAAkC;;QAGlC,yCAAyC;;QAGzC,2BAA2B;;QAG3B,0BAA0B;;QAG1B;;;;;;WAMG;;;;;;;;;;;;;;;;;QAQH,qDAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBrD,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}