@objectstack/spec 0.1.1 → 0.1.2

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 (136) hide show
  1. package/README.md +73 -1
  2. package/dist/api/contract.zod.d.ts +1733 -0
  3. package/dist/api/contract.zod.d.ts.map +1 -0
  4. package/dist/api/contract.zod.js +138 -0
  5. package/dist/data/dataset.zod.d.ts +2 -2
  6. package/dist/data/field.zod.d.ts +1648 -10
  7. package/dist/data/field.zod.d.ts.map +1 -1
  8. package/dist/data/field.zod.js +149 -8
  9. package/dist/data/mapping.zod.d.ts +215 -2
  10. package/dist/data/mapping.zod.d.ts.map +1 -1
  11. package/dist/data/object.zod.d.ts +505 -25
  12. package/dist/data/object.zod.d.ts.map +1 -1
  13. package/dist/data/object.zod.js +32 -5
  14. package/dist/data/query.zod.d.ts +349 -0
  15. package/dist/data/query.zod.d.ts.map +1 -1
  16. package/dist/data/query.zod.js +77 -1
  17. package/dist/data/trigger.zod.d.ts +354 -0
  18. package/dist/data/trigger.zod.d.ts.map +1 -0
  19. package/dist/data/trigger.zod.js +195 -0
  20. package/dist/data/validation.zod.d.ts +83 -43
  21. package/dist/data/validation.zod.d.ts.map +1 -1
  22. package/dist/data/validation.zod.js +51 -5
  23. package/dist/index.d.ts +8 -0
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +9 -0
  26. package/dist/system/api.zod.d.ts +130 -4
  27. package/dist/system/api.zod.d.ts.map +1 -1
  28. package/dist/system/api.zod.js +4 -1
  29. package/dist/system/datasource.zod.d.ts +89 -6
  30. package/dist/system/datasource.zod.d.ts.map +1 -1
  31. package/dist/system/datasource.zod.js +33 -5
  32. package/dist/system/discovery.zod.d.ts +174 -0
  33. package/dist/system/discovery.zod.d.ts.map +1 -0
  34. package/dist/system/discovery.zod.js +53 -0
  35. package/dist/system/driver.zod.d.ts +1525 -0
  36. package/dist/system/driver.zod.d.ts.map +1 -0
  37. package/dist/system/driver.zod.js +290 -0
  38. package/dist/system/license.zod.d.ts +2 -2
  39. package/dist/system/manifest.zod.d.ts +323 -52
  40. package/dist/system/manifest.zod.d.ts.map +1 -1
  41. package/dist/system/manifest.zod.js +91 -17
  42. package/dist/system/plugin.zod.d.ts +3516 -0
  43. package/dist/system/plugin.zod.d.ts.map +1 -0
  44. package/dist/system/plugin.zod.js +226 -0
  45. package/dist/system/territory.zod.d.ts +1 -1
  46. package/dist/system/webhook.zod.d.ts +3 -3
  47. package/dist/ui/action.zod.d.ts +19 -12
  48. package/dist/ui/action.zod.d.ts.map +1 -1
  49. package/dist/ui/action.zod.js +7 -1
  50. package/dist/ui/app.zod.d.ts +109 -3
  51. package/dist/ui/app.zod.d.ts.map +1 -1
  52. package/dist/ui/app.zod.js +13 -2
  53. package/dist/ui/dashboard.zod.d.ts +9 -3
  54. package/dist/ui/dashboard.zod.d.ts.map +1 -1
  55. package/dist/ui/dashboard.zod.js +7 -1
  56. package/dist/ui/page.zod.d.ts +6 -6
  57. package/dist/ui/report.zod.d.ts +9 -0
  58. package/dist/ui/report.zod.d.ts.map +1 -1
  59. package/dist/ui/report.zod.js +7 -1
  60. package/dist/ui/theme.zod.d.ts +1221 -0
  61. package/dist/ui/theme.zod.d.ts.map +1 -0
  62. package/dist/ui/theme.zod.js +202 -0
  63. package/dist/ui/widget.zod.d.ts +350 -0
  64. package/dist/ui/widget.zod.d.ts.map +1 -0
  65. package/dist/ui/widget.zod.js +66 -0
  66. package/json-schema/Action.json +8 -2
  67. package/json-schema/ActionParam.json +8 -2
  68. package/json-schema/Address.json +40 -0
  69. package/json-schema/AggregationFunction.json +19 -0
  70. package/json-schema/AggregationNode.json +42 -0
  71. package/json-schema/Animation.json +56 -0
  72. package/json-schema/ApiCapabilities.json +28 -0
  73. package/json-schema/ApiError.json +27 -0
  74. package/json-schema/ApiRoutes.json +41 -0
  75. package/json-schema/App.json +13 -2
  76. package/json-schema/AsyncValidation.json +70 -0
  77. package/json-schema/BaseResponse.json +63 -0
  78. package/json-schema/BorderRadius.json +44 -0
  79. package/json-schema/Breakpoints.json +36 -0
  80. package/json-schema/BulkRequest.json +29 -0
  81. package/json-schema/BulkResponse.json +108 -0
  82. package/json-schema/ColorPalette.json +83 -0
  83. package/json-schema/ConditionalValidation.json +793 -0
  84. package/json-schema/CreateRequest.json +20 -0
  85. package/json-schema/CrossFieldValidation.json +56 -0
  86. package/json-schema/CustomValidator.json +57 -0
  87. package/json-schema/Datasource.json +0 -18
  88. package/json-schema/DeleteResponse.json +68 -0
  89. package/json-schema/Discovery.json +114 -0
  90. package/json-schema/DriverCapabilities.json +39 -0
  91. package/json-schema/DriverDefinition.json +66 -0
  92. package/json-schema/DriverInterface.json +58 -0
  93. package/json-schema/DriverOptions.json +23 -0
  94. package/json-schema/DriverType.json +1 -18
  95. package/json-schema/ExportRequest.json +786 -0
  96. package/json-schema/Field.json +75 -4
  97. package/json-schema/FieldType.json +8 -2
  98. package/json-schema/FieldWidgetProps.json +327 -0
  99. package/json-schema/I18nContext.json +12 -0
  100. package/json-schema/JoinNode.json +455 -0
  101. package/json-schema/JoinType.json +15 -0
  102. package/json-schema/ListRecordResponse.json +103 -0
  103. package/json-schema/LocationCoordinates.json +36 -0
  104. package/json-schema/Logger.json +25 -0
  105. package/json-schema/Manifest.json +243 -18
  106. package/json-schema/Mapping.json +328 -0
  107. package/json-schema/ModificationResult.json +46 -0
  108. package/json-schema/Object.json +103 -6
  109. package/json-schema/ObjectCapabilities.json +26 -0
  110. package/json-schema/ObjectQLClient.json +12 -0
  111. package/json-schema/Plugin.json +20 -0
  112. package/json-schema/PluginContext.json +91 -0
  113. package/json-schema/PluginLifecycle.json +11 -0
  114. package/json-schema/Query.json +328 -0
  115. package/json-schema/RecordData.json +11 -0
  116. package/json-schema/Router.json +12 -0
  117. package/json-schema/Scheduler.json +12 -0
  118. package/json-schema/ScopedStorage.json +12 -0
  119. package/json-schema/Shadow.json +44 -0
  120. package/json-schema/SingleRecordResponse.json +69 -0
  121. package/json-schema/Spacing.json +64 -0
  122. package/json-schema/SystemAPI.json +12 -0
  123. package/json-schema/Theme.json +543 -0
  124. package/json-schema/ThemeMode.json +14 -0
  125. package/json-schema/Trigger.json +73 -0
  126. package/json-schema/TriggerAction.json +14 -0
  127. package/json-schema/TriggerContext.json +61 -0
  128. package/json-schema/TriggerTiming.json +13 -0
  129. package/json-schema/Typography.json +142 -0
  130. package/json-schema/UpdateRequest.json +20 -0
  131. package/json-schema/ValidationRule.json +583 -0
  132. package/json-schema/WindowFunction.json +24 -0
  133. package/json-schema/WindowFunctionNode.json +104 -0
  134. package/json-schema/WindowSpec.json +65 -0
  135. package/json-schema/ZIndex.json +44 -0
  136. package/package.json +8 -3
@@ -1,24 +1,4 @@
1
1
  import { z } from 'zod';
2
- /**
3
- * Schema for menu items in ObjectStack packages.
4
- * Defines navigation structure that can be injected into the UI.
5
- */
6
- export declare const MenuItemSchema: z.ZodObject<{
7
- /** Display label for the menu item */
8
- label: z.ZodString;
9
- /** Navigation path (route) for the menu item */
10
- path: z.ZodString;
11
- /** Optional icon identifier for the menu item */
12
- icon: z.ZodOptional<z.ZodString>;
13
- }, "strip", z.ZodTypeAny, {
14
- path: string;
15
- label: string;
16
- icon?: string | undefined;
17
- }, {
18
- path: string;
19
- label: string;
20
- icon?: string | undefined;
21
- }>;
22
2
  /**
23
3
  * Schema for the ObjectStack Manifest.
24
4
  * This defines the structure of a package configuration in the ObjectStack ecosystem.
@@ -57,29 +37,240 @@ export declare const ManifestSchema: z.ZodObject<{
57
37
  */
58
38
  permissions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
59
39
  /**
60
- * Navigation menu structure that the package contributes to the UI.
40
+ * Glob patterns specifying ObjectQL schemas files (typically *.object.yml or *.object.ts).
41
+ * Example: `["./src/objects/*.object.yml"]`
42
+ */
43
+ objects: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
44
+ /**
45
+ * Defines system level DataSources.
46
+ */
47
+ datasources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
48
+ /**
49
+ * Package Dependencies.
50
+ * Map of package IDs to version requirements.
61
51
  */
62
- menus: z.ZodOptional<z.ZodArray<z.ZodObject<{
63
- /** Display label for the menu item */
64
- label: z.ZodString;
65
- /** Navigation path (route) for the menu item */
66
- path: z.ZodString;
67
- /** Optional icon identifier for the menu item */
68
- icon: z.ZodOptional<z.ZodString>;
52
+ dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
53
+ /**
54
+ * Plugin Configuration Schema.
55
+ * Defines the settings this plugin exposes to the user.
56
+ * Uses a simplified JSON Schema format.
57
+ */
58
+ configuration: z.ZodOptional<z.ZodObject<{
59
+ title: z.ZodOptional<z.ZodString>;
60
+ properties: z.ZodRecord<z.ZodString, z.ZodObject<{
61
+ type: z.ZodEnum<["string", "number", "boolean", "array", "object"]>;
62
+ default: z.ZodOptional<z.ZodAny>;
63
+ description: z.ZodOptional<z.ZodString>;
64
+ required: z.ZodOptional<z.ZodBoolean>;
65
+ secret: z.ZodOptional<z.ZodBoolean>;
66
+ enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
67
+ }, "strip", z.ZodTypeAny, {
68
+ type: "string" | "number" | "boolean" | "object" | "array";
69
+ default?: any;
70
+ description?: string | undefined;
71
+ required?: boolean | undefined;
72
+ secret?: boolean | undefined;
73
+ enum?: string[] | undefined;
74
+ }, {
75
+ type: "string" | "number" | "boolean" | "object" | "array";
76
+ default?: any;
77
+ description?: string | undefined;
78
+ required?: boolean | undefined;
79
+ secret?: boolean | undefined;
80
+ enum?: string[] | undefined;
81
+ }>>;
69
82
  }, "strip", z.ZodTypeAny, {
70
- path: string;
71
- label: string;
72
- icon?: string | undefined;
83
+ properties: Record<string, {
84
+ type: "string" | "number" | "boolean" | "object" | "array";
85
+ default?: any;
86
+ description?: string | undefined;
87
+ required?: boolean | undefined;
88
+ secret?: boolean | undefined;
89
+ enum?: string[] | undefined;
90
+ }>;
91
+ title?: string | undefined;
73
92
  }, {
74
- path: string;
75
- label: string;
76
- icon?: string | undefined;
77
- }>, "many">>;
93
+ properties: Record<string, {
94
+ type: "string" | "number" | "boolean" | "object" | "array";
95
+ default?: any;
96
+ description?: string | undefined;
97
+ required?: boolean | undefined;
98
+ secret?: boolean | undefined;
99
+ enum?: string[] | undefined;
100
+ }>;
101
+ title?: string | undefined;
102
+ }>>;
78
103
  /**
79
- * Glob patterns specifying ObjectQL schemas files (typically *.object.yml or *.object.ts).
80
- * Example: `["./src/objects/*.object.yml"]`
104
+ * Contribution Points (VS Code Style).
105
+ * formalized way to extend the platform capabilities.
81
106
  */
82
- objects: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
107
+ contributes: z.ZodOptional<z.ZodObject<{
108
+ /**
109
+ * Register new Metadata Kinds (CRDs).
110
+ * Enables the system to parse and validate new file types.
111
+ * Example: Registering a BI plugin to handle *.report.ts
112
+ */
113
+ kinds: z.ZodOptional<z.ZodArray<z.ZodObject<{
114
+ id: z.ZodString;
115
+ globs: z.ZodArray<z.ZodString, "many">;
116
+ description: z.ZodOptional<z.ZodString>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ id: string;
119
+ globs: string[];
120
+ description?: string | undefined;
121
+ }, {
122
+ id: string;
123
+ globs: string[];
124
+ description?: string | undefined;
125
+ }>, "many">>;
126
+ /**
127
+ * Register System Hooks.
128
+ * Declares that this plugin listens to specific system events.
129
+ */
130
+ events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
131
+ /**
132
+ * Register UI Menus.
133
+ */
134
+ menus: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
135
+ id: z.ZodString;
136
+ label: z.ZodString;
137
+ command: z.ZodOptional<z.ZodString>;
138
+ }, "strip", z.ZodTypeAny, {
139
+ label: string;
140
+ id: string;
141
+ command?: string | undefined;
142
+ }, {
143
+ label: string;
144
+ id: string;
145
+ command?: string | undefined;
146
+ }>, "many">>>;
147
+ /**
148
+ * Register Custom Themes.
149
+ */
150
+ themes: z.ZodOptional<z.ZodArray<z.ZodObject<{
151
+ id: z.ZodString;
152
+ label: z.ZodString;
153
+ path: z.ZodString;
154
+ }, "strip", z.ZodTypeAny, {
155
+ path: string;
156
+ label: string;
157
+ id: string;
158
+ }, {
159
+ path: string;
160
+ label: string;
161
+ id: string;
162
+ }>, "many">>;
163
+ /**
164
+ * Register Translations.
165
+ * Path to translation files (e.g. "locales/en.json").
166
+ */
167
+ translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
168
+ locale: z.ZodString;
169
+ path: z.ZodString;
170
+ }, "strip", z.ZodTypeAny, {
171
+ path: string;
172
+ locale: string;
173
+ }, {
174
+ path: string;
175
+ locale: string;
176
+ }>, "many">>;
177
+ /**
178
+ * Register Server Actions.
179
+ * Invocable functions exposed to Flows or API.
180
+ */
181
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
182
+ name: z.ZodString;
183
+ label: z.ZodOptional<z.ZodString>;
184
+ description: z.ZodOptional<z.ZodString>;
185
+ input: z.ZodOptional<z.ZodAny>;
186
+ output: z.ZodOptional<z.ZodAny>;
187
+ }, "strip", z.ZodTypeAny, {
188
+ name: string;
189
+ label?: string | undefined;
190
+ description?: string | undefined;
191
+ input?: any;
192
+ output?: any;
193
+ }, {
194
+ name: string;
195
+ label?: string | undefined;
196
+ description?: string | undefined;
197
+ input?: any;
198
+ output?: any;
199
+ }>, "many">>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ actions?: {
202
+ name: string;
203
+ label?: string | undefined;
204
+ description?: string | undefined;
205
+ input?: any;
206
+ output?: any;
207
+ }[] | undefined;
208
+ kinds?: {
209
+ id: string;
210
+ globs: string[];
211
+ description?: string | undefined;
212
+ }[] | undefined;
213
+ events?: string[] | undefined;
214
+ menus?: Record<string, {
215
+ label: string;
216
+ id: string;
217
+ command?: string | undefined;
218
+ }[]> | undefined;
219
+ themes?: {
220
+ path: string;
221
+ label: string;
222
+ id: string;
223
+ }[] | undefined;
224
+ translations?: {
225
+ path: string;
226
+ locale: string;
227
+ }[] | undefined;
228
+ }, {
229
+ actions?: {
230
+ name: string;
231
+ label?: string | undefined;
232
+ description?: string | undefined;
233
+ input?: any;
234
+ output?: any;
235
+ }[] | undefined;
236
+ kinds?: {
237
+ id: string;
238
+ globs: string[];
239
+ description?: string | undefined;
240
+ }[] | undefined;
241
+ events?: string[] | undefined;
242
+ menus?: Record<string, {
243
+ label: string;
244
+ id: string;
245
+ command?: string | undefined;
246
+ }[]> | undefined;
247
+ themes?: {
248
+ path: string;
249
+ label: string;
250
+ id: string;
251
+ }[] | undefined;
252
+ translations?: {
253
+ path: string;
254
+ locale: string;
255
+ }[] | undefined;
256
+ }>>;
257
+ /**
258
+ * Initial data seeding configuration.
259
+ * Defines default records to be inserted when the package is installed.
260
+ */
261
+ data: z.ZodOptional<z.ZodArray<z.ZodObject<{
262
+ object: z.ZodString;
263
+ records: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">;
264
+ mode: z.ZodDefault<z.ZodEnum<["upsert", "insert", "ignore"]>>;
265
+ }, "strip", z.ZodTypeAny, {
266
+ object: string;
267
+ mode: "upsert" | "insert" | "ignore";
268
+ records: Record<string, any>[];
269
+ }, {
270
+ object: string;
271
+ records: Record<string, any>[];
272
+ mode?: "upsert" | "insert" | "ignore" | undefined;
273
+ }>, "many">>;
83
274
  /**
84
275
  * Extension points contributed by this package.
85
276
  * Allows packages to extend UI components, add functionality, etc.
@@ -92,12 +283,54 @@ export declare const ManifestSchema: z.ZodObject<{
92
283
  version: string;
93
284
  description?: string | undefined;
94
285
  objects?: string[] | undefined;
95
- permissions?: string[] | undefined;
96
- menus?: {
97
- path: string;
98
- label: string;
99
- icon?: string | undefined;
286
+ data?: {
287
+ object: string;
288
+ mode: "upsert" | "insert" | "ignore";
289
+ records: Record<string, any>[];
100
290
  }[] | undefined;
291
+ permissions?: string[] | undefined;
292
+ datasources?: string[] | undefined;
293
+ dependencies?: Record<string, string> | undefined;
294
+ configuration?: {
295
+ properties: Record<string, {
296
+ type: "string" | "number" | "boolean" | "object" | "array";
297
+ default?: any;
298
+ description?: string | undefined;
299
+ required?: boolean | undefined;
300
+ secret?: boolean | undefined;
301
+ enum?: string[] | undefined;
302
+ }>;
303
+ title?: string | undefined;
304
+ } | undefined;
305
+ contributes?: {
306
+ actions?: {
307
+ name: string;
308
+ label?: string | undefined;
309
+ description?: string | undefined;
310
+ input?: any;
311
+ output?: any;
312
+ }[] | undefined;
313
+ kinds?: {
314
+ id: string;
315
+ globs: string[];
316
+ description?: string | undefined;
317
+ }[] | undefined;
318
+ events?: string[] | undefined;
319
+ menus?: Record<string, {
320
+ label: string;
321
+ id: string;
322
+ command?: string | undefined;
323
+ }[]> | undefined;
324
+ themes?: {
325
+ path: string;
326
+ label: string;
327
+ id: string;
328
+ }[] | undefined;
329
+ translations?: {
330
+ path: string;
331
+ locale: string;
332
+ }[] | undefined;
333
+ } | undefined;
101
334
  extensions?: Record<string, any> | undefined;
102
335
  }, {
103
336
  type: "app" | "plugin" | "driver" | "module";
@@ -106,12 +339,54 @@ export declare const ManifestSchema: z.ZodObject<{
106
339
  version: string;
107
340
  description?: string | undefined;
108
341
  objects?: string[] | undefined;
109
- permissions?: string[] | undefined;
110
- menus?: {
111
- path: string;
112
- label: string;
113
- icon?: string | undefined;
342
+ data?: {
343
+ object: string;
344
+ records: Record<string, any>[];
345
+ mode?: "upsert" | "insert" | "ignore" | undefined;
114
346
  }[] | undefined;
347
+ permissions?: string[] | undefined;
348
+ datasources?: string[] | undefined;
349
+ dependencies?: Record<string, string> | undefined;
350
+ configuration?: {
351
+ properties: Record<string, {
352
+ type: "string" | "number" | "boolean" | "object" | "array";
353
+ default?: any;
354
+ description?: string | undefined;
355
+ required?: boolean | undefined;
356
+ secret?: boolean | undefined;
357
+ enum?: string[] | undefined;
358
+ }>;
359
+ title?: string | undefined;
360
+ } | undefined;
361
+ contributes?: {
362
+ actions?: {
363
+ name: string;
364
+ label?: string | undefined;
365
+ description?: string | undefined;
366
+ input?: any;
367
+ output?: any;
368
+ }[] | undefined;
369
+ kinds?: {
370
+ id: string;
371
+ globs: string[];
372
+ description?: string | undefined;
373
+ }[] | undefined;
374
+ events?: string[] | undefined;
375
+ menus?: Record<string, {
376
+ label: string;
377
+ id: string;
378
+ command?: string | undefined;
379
+ }[]> | undefined;
380
+ themes?: {
381
+ path: string;
382
+ label: string;
383
+ id: string;
384
+ }[] | undefined;
385
+ translations?: {
386
+ path: string;
387
+ locale: string;
388
+ }[] | undefined;
389
+ } | undefined;
115
390
  extensions?: Record<string, any> | undefined;
116
391
  }>;
117
392
  /**
@@ -119,8 +394,4 @@ export declare const ManifestSchema: z.ZodObject<{
119
394
  * Use this type for type-safe manifest handling in TypeScript code.
120
395
  */
121
396
  export type ObjectStackManifest = z.infer<typeof ManifestSchema>;
122
- /**
123
- * TypeScript type for menu items.
124
- */
125
- export type MenuItem = z.infer<typeof MenuItemSchema>;
126
397
  //# sourceMappingURL=manifest.zod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.zod.d.ts","sourceRoot":"","sources":["../../src/system/manifest.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,cAAc;IACzB,sCAAsC;;IAEtC,gDAAgD;;IAEhD,iDAAiD;;;;;;;;;;EAEjD,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,cAAc;IACzB;;;OAGG;;IAGH;;;OAGG;;IAGH;;;;;;OAMG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;OAEG;;QArDH,sCAAsC;;QAEtC,gDAAgD;;QAEhD,iDAAiD;;;;;;;;;;;IAoDjD;;;OAGG;;IAGH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"manifest.zod.d.ts","sourceRoot":"","sources":["../../src/system/manifest.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,cAAc;IACzB;;;OAGG;;IAGH;;;OAGG;;IAGH;;;;;;OAMG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaH;;;OAGG;;QAED;;;;WAIG;;;;;;;;;;;;;;QAOH;;;WAGG;;QAGH;;WAEG;;;;;;;;;;;;;;QAOH;;WAEG;;;;;;;;;;;;;;QAOH;;;WAGG;;;;;;;;;;;QAMH;;;WAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUL;;;OAGG;;;;;;;;;;;;;;IAOH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -1,19 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ManifestSchema = exports.MenuItemSchema = void 0;
3
+ exports.ManifestSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- /**
6
- * Schema for menu items in ObjectStack packages.
7
- * Defines navigation structure that can be injected into the UI.
8
- */
9
- exports.MenuItemSchema = zod_1.z.object({
10
- /** Display label for the menu item */
11
- label: zod_1.z.string().describe('Display label for the menu item'),
12
- /** Navigation path (route) for the menu item */
13
- path: zod_1.z.string().describe('Navigation path (route) for the menu item'),
14
- /** Optional icon identifier for the menu item */
15
- icon: zod_1.z.string().optional().describe('Optional icon identifier for the menu item'),
16
- });
17
5
  /**
18
6
  * Schema for the ObjectStack Manifest.
19
7
  * This defines the structure of a package configuration in the ObjectStack ecosystem.
@@ -51,15 +39,101 @@ exports.ManifestSchema = zod_1.z.object({
51
39
  * Example: ["system.user.read", "system.data.write"]
52
40
  */
53
41
  permissions: zod_1.z.array(zod_1.z.string()).optional().describe('Array of required permission strings'),
54
- /**
55
- * Navigation menu structure that the package contributes to the UI.
56
- */
57
- menus: zod_1.z.array(exports.MenuItemSchema).optional().describe('Navigation menu structure'),
58
42
  /**
59
43
  * Glob patterns specifying ObjectQL schemas files (typically *.object.yml or *.object.ts).
60
44
  * Example: `["./src/objects/*.object.yml"]`
61
45
  */
62
46
  objects: zod_1.z.array(zod_1.z.string()).optional().describe('Glob patterns for ObjectQL schemas files'),
47
+ /**
48
+ * Defines system level DataSources.
49
+ */
50
+ datasources: zod_1.z.array(zod_1.z.string()).optional().describe('Glob patterns for Datasource definitions'),
51
+ /**
52
+ * Package Dependencies.
53
+ * Map of package IDs to version requirements.
54
+ */
55
+ dependencies: zod_1.z.record(zod_1.z.string()).optional().describe('Package dependencies'),
56
+ /**
57
+ * Plugin Configuration Schema.
58
+ * Defines the settings this plugin exposes to the user.
59
+ * Uses a simplified JSON Schema format.
60
+ */
61
+ configuration: zod_1.z.object({
62
+ title: zod_1.z.string().optional(),
63
+ properties: zod_1.z.record(zod_1.z.object({
64
+ type: zod_1.z.enum(['string', 'number', 'boolean', 'array', 'object']).describe('Data type of the setting'),
65
+ default: zod_1.z.any().optional().describe('Default value'),
66
+ description: zod_1.z.string().optional().describe('Tooltip description'),
67
+ required: zod_1.z.boolean().optional().describe('Is this setting required?'),
68
+ secret: zod_1.z.boolean().optional().describe('If true, value is encrypted/masked (e.g. API Keys)'),
69
+ enum: zod_1.z.array(zod_1.z.string()).optional().describe('Allowed values for select inputs'),
70
+ })).describe('Map of configuration keys to their definitions')
71
+ }).optional().describe('Plugin configuration settings'),
72
+ /**
73
+ * Contribution Points (VS Code Style).
74
+ * formalized way to extend the platform capabilities.
75
+ */
76
+ contributes: zod_1.z.object({
77
+ /**
78
+ * Register new Metadata Kinds (CRDs).
79
+ * Enables the system to parse and validate new file types.
80
+ * Example: Registering a BI plugin to handle *.report.ts
81
+ */
82
+ kinds: zod_1.z.array(zod_1.z.object({
83
+ id: zod_1.z.string().describe('The generic identifier of the kind (e.g., "sys.bi.report")'),
84
+ globs: zod_1.z.array(zod_1.z.string()).describe('File patterns to watch (e.g., ["**/*.report.ts"])'),
85
+ description: zod_1.z.string().optional().describe('Description of what this kind represents'),
86
+ })).optional().describe('New Metadata Types to recognize'),
87
+ /**
88
+ * Register System Hooks.
89
+ * Declares that this plugin listens to specific system events.
90
+ */
91
+ events: zod_1.z.array(zod_1.z.string()).optional().describe('Events this plugin listens to'),
92
+ /**
93
+ * Register UI Menus.
94
+ */
95
+ menus: zod_1.z.record(zod_1.z.array(zod_1.z.object({
96
+ id: zod_1.z.string(),
97
+ label: zod_1.z.string(),
98
+ command: zod_1.z.string().optional(),
99
+ }))).optional().describe('UI Menu contributions'),
100
+ /**
101
+ * Register Custom Themes.
102
+ */
103
+ themes: zod_1.z.array(zod_1.z.object({
104
+ id: zod_1.z.string(),
105
+ label: zod_1.z.string(),
106
+ path: zod_1.z.string(),
107
+ })).optional().describe('Theme contributions'),
108
+ /**
109
+ * Register Translations.
110
+ * Path to translation files (e.g. "locales/en.json").
111
+ */
112
+ translations: zod_1.z.array(zod_1.z.object({
113
+ locale: zod_1.z.string(),
114
+ path: zod_1.z.string(),
115
+ })).optional().describe('Translation resources'),
116
+ /**
117
+ * Register Server Actions.
118
+ * Invocable functions exposed to Flows or API.
119
+ */
120
+ actions: zod_1.z.array(zod_1.z.object({
121
+ name: zod_1.z.string().describe('Unique action name'),
122
+ label: zod_1.z.string().optional(),
123
+ description: zod_1.z.string().optional(),
124
+ input: zod_1.z.any().optional().describe('Input validation schema'),
125
+ output: zod_1.z.any().optional().describe('Output schema'),
126
+ })).optional().describe('Exposed server actions'),
127
+ }).optional().describe('Platform contributions'),
128
+ /**
129
+ * Initial data seeding configuration.
130
+ * Defines default records to be inserted when the package is installed.
131
+ */
132
+ data: zod_1.z.array(zod_1.z.object({
133
+ object: zod_1.z.string().describe('Target Object Name'),
134
+ records: zod_1.z.array(zod_1.z.record(zod_1.z.any())).describe('List of records to insert'),
135
+ mode: zod_1.z.enum(['upsert', 'insert', 'ignore']).default('upsert').describe('Seeding mode')
136
+ })).optional().describe('Initial seed data'),
63
137
  /**
64
138
  * Extension points contributed by this package.
65
139
  * Allows packages to extend UI components, add functionality, etc.