@ramme-io/kernel 2.0.0 → 2.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.
@@ -1,1253 +1,7 @@
1
- import { z } from 'zod';
2
-
3
1
  /**
4
2
  * @file schema.ts
5
- * @description The "Application Constitution".
6
- *
7
- * ARCHITECTURAL ROLE:
8
- * This file uses Zod to define the strict runtime validation rules for the
9
- * App Manifest. While `manifest-types.ts` handles compile-time TypeScript checks,
10
- * this file handles runtime validation, ensuring that any JSON loaded into the
11
- * engine (whether from a file, API, or user input) is structurally sound.
12
- *
13
- * LAYERS DEFINED:
14
- * 1. **SaaS Layer:** Data resources, fields, and tables.
15
- * 2. **Physical Layer:** IoT signals, sensors, and entities.
16
- * 3. **Logic Layer:** Workflows, triggers, and automated actions.
17
- * 4. **Presentation Layer:** Pages, sections, and UI blocks.
3
+ * @description Re-export proxy. The source of truth is now @ramme-io/shared.
4
+ * This file exists solely for backward compatibility with existing local imports.
18
5
  */
19
- export declare const FieldSchema: z.ZodObject<{
20
- key: z.ZodString;
21
- label: z.ZodString;
22
- type: z.ZodEnum<["text", "number", "currency", "date", "boolean", "status", "email", "image", "textarea"]>;
23
- required: z.ZodOptional<z.ZodBoolean>;
24
- description: z.ZodOptional<z.ZodString>;
25
- defaultValue: z.ZodOptional<z.ZodAny>;
26
- }, "strip", z.ZodTypeAny, {
27
- key?: string;
28
- label?: string;
29
- type?: "number" | "boolean" | "status" | "date" | "text" | "currency" | "email" | "image" | "textarea";
30
- required?: boolean;
31
- description?: string;
32
- defaultValue?: any;
33
- }, {
34
- key?: string;
35
- label?: string;
36
- type?: "number" | "boolean" | "status" | "date" | "text" | "currency" | "email" | "image" | "textarea";
37
- required?: boolean;
38
- description?: string;
39
- defaultValue?: any;
40
- }>;
41
- export type FieldDefinition = z.infer<typeof FieldSchema>;
42
- export declare const ResourceSchema: z.ZodObject<{
43
- id: z.ZodString;
44
- name: z.ZodString;
45
- fields: z.ZodArray<z.ZodObject<{
46
- key: z.ZodString;
47
- label: z.ZodString;
48
- type: z.ZodEnum<["text", "number", "currency", "date", "boolean", "status", "email", "image", "textarea"]>;
49
- required: z.ZodOptional<z.ZodBoolean>;
50
- description: z.ZodOptional<z.ZodString>;
51
- defaultValue: z.ZodOptional<z.ZodAny>;
52
- }, "strip", z.ZodTypeAny, {
53
- key?: string;
54
- label?: string;
55
- type?: "number" | "boolean" | "status" | "date" | "text" | "currency" | "email" | "image" | "textarea";
56
- required?: boolean;
57
- description?: string;
58
- defaultValue?: any;
59
- }, {
60
- key?: string;
61
- label?: string;
62
- type?: "number" | "boolean" | "status" | "date" | "text" | "currency" | "email" | "image" | "textarea";
63
- required?: boolean;
64
- description?: string;
65
- defaultValue?: any;
66
- }>, "many">;
67
- defaultView: z.ZodOptional<z.ZodEnum<["table", "grid", "list"]>>;
68
- features: z.ZodOptional<z.ZodObject<{
69
- searchable: z.ZodOptional<z.ZodBoolean>;
70
- creatable: z.ZodOptional<z.ZodBoolean>;
71
- editable: z.ZodOptional<z.ZodBoolean>;
72
- deletable: z.ZodOptional<z.ZodBoolean>;
73
- exportable: z.ZodOptional<z.ZodBoolean>;
74
- }, "strip", z.ZodTypeAny, {
75
- searchable?: boolean;
76
- creatable?: boolean;
77
- editable?: boolean;
78
- deletable?: boolean;
79
- exportable?: boolean;
80
- }, {
81
- searchable?: boolean;
82
- creatable?: boolean;
83
- editable?: boolean;
84
- deletable?: boolean;
85
- exportable?: boolean;
86
- }>>;
87
- }, "strip", z.ZodTypeAny, {
88
- id?: string;
89
- name?: string;
90
- fields?: {
91
- key?: string;
92
- label?: string;
93
- type?: "number" | "boolean" | "status" | "date" | "text" | "currency" | "email" | "image" | "textarea";
94
- required?: boolean;
95
- description?: string;
96
- defaultValue?: any;
97
- }[];
98
- defaultView?: "table" | "grid" | "list";
99
- features?: {
100
- searchable?: boolean;
101
- creatable?: boolean;
102
- editable?: boolean;
103
- deletable?: boolean;
104
- exportable?: boolean;
105
- };
106
- }, {
107
- id?: string;
108
- name?: string;
109
- fields?: {
110
- key?: string;
111
- label?: string;
112
- type?: "number" | "boolean" | "status" | "date" | "text" | "currency" | "email" | "image" | "textarea";
113
- required?: boolean;
114
- description?: string;
115
- defaultValue?: any;
116
- }[];
117
- defaultView?: "table" | "grid" | "list";
118
- features?: {
119
- searchable?: boolean;
120
- creatable?: boolean;
121
- editable?: boolean;
122
- deletable?: boolean;
123
- exportable?: boolean;
124
- };
125
- }>;
126
- export type ResourceDefinition = z.infer<typeof ResourceSchema>;
127
- export declare const SignalSchema: z.ZodObject<{
128
- id: z.ZodString;
129
- label: z.ZodString;
130
- description: z.ZodOptional<z.ZodString>;
131
- kind: z.ZodEnum<["sensor", "actuator", "setpoint", "metric", "status", "kpi"]>;
132
- source: z.ZodEnum<["mock", "mqtt", "http", "derived", "local"]>;
133
- topic: z.ZodOptional<z.ZodString>;
134
- endpoint: z.ZodOptional<z.ZodString>;
135
- jsonPath: z.ZodOptional<z.ZodString>;
136
- refreshRate: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
137
- defaultValue: z.ZodOptional<z.ZodAny>;
138
- unit: z.ZodOptional<z.ZodString>;
139
- min: z.ZodOptional<z.ZodNumber>;
140
- max: z.ZodOptional<z.ZodNumber>;
141
- }, "strip", z.ZodTypeAny, {
142
- label?: string;
143
- description?: string;
144
- defaultValue?: any;
145
- id?: string;
146
- kind?: "status" | "sensor" | "actuator" | "setpoint" | "metric" | "kpi";
147
- source?: "mock" | "mqtt" | "http" | "derived" | "local";
148
- topic?: string;
149
- endpoint?: string;
150
- jsonPath?: string;
151
- refreshRate?: number;
152
- unit?: string;
153
- min?: number;
154
- max?: number;
155
- }, {
156
- label?: string;
157
- description?: string;
158
- defaultValue?: any;
159
- id?: string;
160
- kind?: "status" | "sensor" | "actuator" | "setpoint" | "metric" | "kpi";
161
- source?: "mock" | "mqtt" | "http" | "derived" | "local";
162
- topic?: string;
163
- endpoint?: string;
164
- jsonPath?: string;
165
- refreshRate?: number;
166
- unit?: string;
167
- min?: number;
168
- max?: number;
169
- }>;
170
- export type SignalDefinition = z.infer<typeof SignalSchema>;
171
- export declare const EntitySchema: z.ZodObject<{
172
- id: z.ZodString;
173
- name: z.ZodString;
174
- description: z.ZodOptional<z.ZodString>;
175
- type: z.ZodString;
176
- category: z.ZodDefault<z.ZodString>;
177
- signals: z.ZodArray<z.ZodString, "many">;
178
- ui: z.ZodOptional<z.ZodObject<{
179
- icon: z.ZodOptional<z.ZodString>;
180
- color: z.ZodOptional<z.ZodString>;
181
- dashboardComponent: z.ZodOptional<z.ZodString>;
182
- }, "strip", z.ZodTypeAny, {
183
- icon?: string;
184
- color?: string;
185
- dashboardComponent?: string;
186
- }, {
187
- icon?: string;
188
- color?: string;
189
- dashboardComponent?: string;
190
- }>>;
191
- }, "strip", z.ZodTypeAny, {
192
- type?: string;
193
- description?: string;
194
- id?: string;
195
- name?: string;
196
- category?: string;
197
- signals?: string[];
198
- ui?: {
199
- icon?: string;
200
- color?: string;
201
- dashboardComponent?: string;
202
- };
203
- }, {
204
- type?: string;
205
- description?: string;
206
- id?: string;
207
- name?: string;
208
- category?: string;
209
- signals?: string[];
210
- ui?: {
211
- icon?: string;
212
- color?: string;
213
- dashboardComponent?: string;
214
- };
215
- }>;
216
- export type EntityDefinition = z.infer<typeof EntitySchema>;
217
- export declare const TriggerSchema: z.ZodObject<{
218
- id: z.ZodString;
219
- type: z.ZodEnum<["signal_change", "manual_action", "schedule", "webhook"]>;
220
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
221
- }, "strip", z.ZodTypeAny, {
222
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
223
- id?: string;
224
- config?: Record<string, any>;
225
- }, {
226
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
227
- id?: string;
228
- config?: Record<string, any>;
229
- }>;
230
- export declare const ActionSchema: z.ZodObject<{
231
- id: z.ZodString;
232
- type: z.ZodEnum<["update_resource", "send_notification", "mqtt_publish", "api_call", "navigate", "agent_task"]>;
233
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
234
- }, "strip", z.ZodTypeAny, {
235
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
236
- id?: string;
237
- config?: Record<string, any>;
238
- }, {
239
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
240
- id?: string;
241
- config?: Record<string, any>;
242
- }>;
243
- export declare const WorkflowSchema: z.ZodObject<{
244
- id: z.ZodString;
245
- name: z.ZodString;
246
- active: z.ZodDefault<z.ZodBoolean>;
247
- trigger: z.ZodObject<{
248
- id: z.ZodString;
249
- type: z.ZodEnum<["signal_change", "manual_action", "schedule", "webhook"]>;
250
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
251
- }, "strip", z.ZodTypeAny, {
252
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
253
- id?: string;
254
- config?: Record<string, any>;
255
- }, {
256
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
257
- id?: string;
258
- config?: Record<string, any>;
259
- }>;
260
- actions: z.ZodArray<z.ZodObject<{
261
- id: z.ZodString;
262
- type: z.ZodEnum<["update_resource", "send_notification", "mqtt_publish", "api_call", "navigate", "agent_task"]>;
263
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
264
- }, "strip", z.ZodTypeAny, {
265
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
266
- id?: string;
267
- config?: Record<string, any>;
268
- }, {
269
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
270
- id?: string;
271
- config?: Record<string, any>;
272
- }>, "many">;
273
- }, "strip", z.ZodTypeAny, {
274
- id?: string;
275
- name?: string;
276
- active?: boolean;
277
- trigger?: {
278
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
279
- id?: string;
280
- config?: Record<string, any>;
281
- };
282
- actions?: {
283
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
284
- id?: string;
285
- config?: Record<string, any>;
286
- }[];
287
- }, {
288
- id?: string;
289
- name?: string;
290
- active?: boolean;
291
- trigger?: {
292
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
293
- id?: string;
294
- config?: Record<string, any>;
295
- };
296
- actions?: {
297
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
298
- id?: string;
299
- config?: Record<string, any>;
300
- }[];
301
- }>;
302
- export type WorkflowDefinition = z.infer<typeof WorkflowSchema>;
303
- export type ActionDefinition = z.infer<typeof ActionSchema>;
304
- export declare const BlockSchema: z.ZodObject<{
305
- id: z.ZodString;
306
- type: z.ZodString;
307
- props: z.ZodRecord<z.ZodString, z.ZodAny>;
308
- layout: z.ZodOptional<z.ZodObject<{
309
- colSpan: z.ZodOptional<z.ZodNumber>;
310
- rowSpan: z.ZodOptional<z.ZodNumber>;
311
- }, "strip", z.ZodTypeAny, {
312
- colSpan?: number;
313
- rowSpan?: number;
314
- }, {
315
- colSpan?: number;
316
- rowSpan?: number;
317
- }>>;
318
- }, "strip", z.ZodTypeAny, {
319
- type?: string;
320
- id?: string;
321
- props?: Record<string, any>;
322
- layout?: {
323
- colSpan?: number;
324
- rowSpan?: number;
325
- };
326
- }, {
327
- type?: string;
328
- id?: string;
329
- props?: Record<string, any>;
330
- layout?: {
331
- colSpan?: number;
332
- rowSpan?: number;
333
- };
334
- }>;
335
- export type Block = z.infer<typeof BlockSchema>;
336
- export declare const PageSectionSchema: z.ZodObject<{
337
- id: z.ZodString;
338
- title: z.ZodOptional<z.ZodString>;
339
- description: z.ZodOptional<z.ZodString>;
340
- layout: z.ZodOptional<z.ZodObject<{
341
- columns: z.ZodOptional<z.ZodNumber>;
342
- variant: z.ZodOptional<z.ZodEnum<["grid", "stack", "split"]>>;
343
- }, "strip", z.ZodTypeAny, {
344
- columns?: number;
345
- variant?: "grid" | "stack" | "split";
346
- }, {
347
- columns?: number;
348
- variant?: "grid" | "stack" | "split";
349
- }>>;
350
- blocks: z.ZodArray<z.ZodObject<{
351
- id: z.ZodString;
352
- type: z.ZodString;
353
- props: z.ZodRecord<z.ZodString, z.ZodAny>;
354
- layout: z.ZodOptional<z.ZodObject<{
355
- colSpan: z.ZodOptional<z.ZodNumber>;
356
- rowSpan: z.ZodOptional<z.ZodNumber>;
357
- }, "strip", z.ZodTypeAny, {
358
- colSpan?: number;
359
- rowSpan?: number;
360
- }, {
361
- colSpan?: number;
362
- rowSpan?: number;
363
- }>>;
364
- }, "strip", z.ZodTypeAny, {
365
- type?: string;
366
- id?: string;
367
- props?: Record<string, any>;
368
- layout?: {
369
- colSpan?: number;
370
- rowSpan?: number;
371
- };
372
- }, {
373
- type?: string;
374
- id?: string;
375
- props?: Record<string, any>;
376
- layout?: {
377
- colSpan?: number;
378
- rowSpan?: number;
379
- };
380
- }>, "many">;
381
- }, "strip", z.ZodTypeAny, {
382
- description?: string;
383
- id?: string;
384
- layout?: {
385
- columns?: number;
386
- variant?: "grid" | "stack" | "split";
387
- };
388
- title?: string;
389
- blocks?: {
390
- type?: string;
391
- id?: string;
392
- props?: Record<string, any>;
393
- layout?: {
394
- colSpan?: number;
395
- rowSpan?: number;
396
- };
397
- }[];
398
- }, {
399
- description?: string;
400
- id?: string;
401
- layout?: {
402
- columns?: number;
403
- variant?: "grid" | "stack" | "split";
404
- };
405
- title?: string;
406
- blocks?: {
407
- type?: string;
408
- id?: string;
409
- props?: Record<string, any>;
410
- layout?: {
411
- colSpan?: number;
412
- rowSpan?: number;
413
- };
414
- }[];
415
- }>;
416
- export type PageSection = z.infer<typeof PageSectionSchema>;
417
- export declare const PageSchema: z.ZodObject<{
418
- id: z.ZodString;
419
- slug: z.ZodString;
420
- title: z.ZodString;
421
- description: z.ZodOptional<z.ZodString>;
422
- icon: z.ZodOptional<z.ZodString>;
423
- sections: z.ZodArray<z.ZodObject<{
424
- id: z.ZodString;
425
- title: z.ZodOptional<z.ZodString>;
426
- description: z.ZodOptional<z.ZodString>;
427
- layout: z.ZodOptional<z.ZodObject<{
428
- columns: z.ZodOptional<z.ZodNumber>;
429
- variant: z.ZodOptional<z.ZodEnum<["grid", "stack", "split"]>>;
430
- }, "strip", z.ZodTypeAny, {
431
- columns?: number;
432
- variant?: "grid" | "stack" | "split";
433
- }, {
434
- columns?: number;
435
- variant?: "grid" | "stack" | "split";
436
- }>>;
437
- blocks: z.ZodArray<z.ZodObject<{
438
- id: z.ZodString;
439
- type: z.ZodString;
440
- props: z.ZodRecord<z.ZodString, z.ZodAny>;
441
- layout: z.ZodOptional<z.ZodObject<{
442
- colSpan: z.ZodOptional<z.ZodNumber>;
443
- rowSpan: z.ZodOptional<z.ZodNumber>;
444
- }, "strip", z.ZodTypeAny, {
445
- colSpan?: number;
446
- rowSpan?: number;
447
- }, {
448
- colSpan?: number;
449
- rowSpan?: number;
450
- }>>;
451
- }, "strip", z.ZodTypeAny, {
452
- type?: string;
453
- id?: string;
454
- props?: Record<string, any>;
455
- layout?: {
456
- colSpan?: number;
457
- rowSpan?: number;
458
- };
459
- }, {
460
- type?: string;
461
- id?: string;
462
- props?: Record<string, any>;
463
- layout?: {
464
- colSpan?: number;
465
- rowSpan?: number;
466
- };
467
- }>, "many">;
468
- }, "strip", z.ZodTypeAny, {
469
- description?: string;
470
- id?: string;
471
- layout?: {
472
- columns?: number;
473
- variant?: "grid" | "stack" | "split";
474
- };
475
- title?: string;
476
- blocks?: {
477
- type?: string;
478
- id?: string;
479
- props?: Record<string, any>;
480
- layout?: {
481
- colSpan?: number;
482
- rowSpan?: number;
483
- };
484
- }[];
485
- }, {
486
- description?: string;
487
- id?: string;
488
- layout?: {
489
- columns?: number;
490
- variant?: "grid" | "stack" | "split";
491
- };
492
- title?: string;
493
- blocks?: {
494
- type?: string;
495
- id?: string;
496
- props?: Record<string, any>;
497
- layout?: {
498
- colSpan?: number;
499
- rowSpan?: number;
500
- };
501
- }[];
502
- }>, "many">;
503
- }, "strip", z.ZodTypeAny, {
504
- description?: string;
505
- id?: string;
506
- icon?: string;
507
- title?: string;
508
- slug?: string;
509
- sections?: {
510
- description?: string;
511
- id?: string;
512
- layout?: {
513
- columns?: number;
514
- variant?: "grid" | "stack" | "split";
515
- };
516
- title?: string;
517
- blocks?: {
518
- type?: string;
519
- id?: string;
520
- props?: Record<string, any>;
521
- layout?: {
522
- colSpan?: number;
523
- rowSpan?: number;
524
- };
525
- }[];
526
- }[];
527
- }, {
528
- description?: string;
529
- id?: string;
530
- icon?: string;
531
- title?: string;
532
- slug?: string;
533
- sections?: {
534
- description?: string;
535
- id?: string;
536
- layout?: {
537
- columns?: number;
538
- variant?: "grid" | "stack" | "split";
539
- };
540
- title?: string;
541
- blocks?: {
542
- type?: string;
543
- id?: string;
544
- props?: Record<string, any>;
545
- layout?: {
546
- colSpan?: number;
547
- rowSpan?: number;
548
- };
549
- }[];
550
- }[];
551
- }>;
552
- export type PageDefinition = z.infer<typeof PageSchema>;
553
- export declare const AppSpecificationSchema: z.ZodObject<{
554
- meta: z.ZodObject<{
555
- name: z.ZodString;
556
- version: z.ZodString;
557
- description: z.ZodOptional<z.ZodString>;
558
- author: z.ZodOptional<z.ZodString>;
559
- createdAt: z.ZodOptional<z.ZodString>;
560
- }, "strip", z.ZodTypeAny, {
561
- description?: string;
562
- name?: string;
563
- version?: string;
564
- author?: string;
565
- createdAt?: string;
566
- }, {
567
- description?: string;
568
- name?: string;
569
- version?: string;
570
- author?: string;
571
- createdAt?: string;
572
- }>;
573
- config: z.ZodObject<{
574
- theme: z.ZodDefault<z.ZodEnum<["light", "dark", "system", "corporate", "midnight", "blueprint"]>>;
575
- mockMode: z.ZodDefault<z.ZodBoolean>;
576
- brokerUrl: z.ZodOptional<z.ZodString>;
577
- }, "strip", z.ZodTypeAny, {
578
- theme?: "light" | "dark" | "system" | "corporate" | "midnight" | "blueprint";
579
- mockMode?: boolean;
580
- brokerUrl?: string;
581
- }, {
582
- theme?: "light" | "dark" | "system" | "corporate" | "midnight" | "blueprint";
583
- mockMode?: boolean;
584
- brokerUrl?: string;
585
- }>;
586
- modules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
587
- resources: z.ZodOptional<z.ZodArray<z.ZodObject<{
588
- id: z.ZodString;
589
- name: z.ZodString;
590
- fields: z.ZodArray<z.ZodObject<{
591
- key: z.ZodString;
592
- label: z.ZodString;
593
- type: z.ZodEnum<["text", "number", "currency", "date", "boolean", "status", "email", "image", "textarea"]>;
594
- required: z.ZodOptional<z.ZodBoolean>;
595
- description: z.ZodOptional<z.ZodString>;
596
- defaultValue: z.ZodOptional<z.ZodAny>;
597
- }, "strip", z.ZodTypeAny, {
598
- key?: string;
599
- label?: string;
600
- type?: "number" | "boolean" | "status" | "date" | "text" | "currency" | "email" | "image" | "textarea";
601
- required?: boolean;
602
- description?: string;
603
- defaultValue?: any;
604
- }, {
605
- key?: string;
606
- label?: string;
607
- type?: "number" | "boolean" | "status" | "date" | "text" | "currency" | "email" | "image" | "textarea";
608
- required?: boolean;
609
- description?: string;
610
- defaultValue?: any;
611
- }>, "many">;
612
- defaultView: z.ZodOptional<z.ZodEnum<["table", "grid", "list"]>>;
613
- features: z.ZodOptional<z.ZodObject<{
614
- searchable: z.ZodOptional<z.ZodBoolean>;
615
- creatable: z.ZodOptional<z.ZodBoolean>;
616
- editable: z.ZodOptional<z.ZodBoolean>;
617
- deletable: z.ZodOptional<z.ZodBoolean>;
618
- exportable: z.ZodOptional<z.ZodBoolean>;
619
- }, "strip", z.ZodTypeAny, {
620
- searchable?: boolean;
621
- creatable?: boolean;
622
- editable?: boolean;
623
- deletable?: boolean;
624
- exportable?: boolean;
625
- }, {
626
- searchable?: boolean;
627
- creatable?: boolean;
628
- editable?: boolean;
629
- deletable?: boolean;
630
- exportable?: boolean;
631
- }>>;
632
- }, "strip", z.ZodTypeAny, {
633
- id?: string;
634
- name?: string;
635
- fields?: {
636
- key?: string;
637
- label?: string;
638
- type?: "number" | "boolean" | "status" | "date" | "text" | "currency" | "email" | "image" | "textarea";
639
- required?: boolean;
640
- description?: string;
641
- defaultValue?: any;
642
- }[];
643
- defaultView?: "table" | "grid" | "list";
644
- features?: {
645
- searchable?: boolean;
646
- creatable?: boolean;
647
- editable?: boolean;
648
- deletable?: boolean;
649
- exportable?: boolean;
650
- };
651
- }, {
652
- id?: string;
653
- name?: string;
654
- fields?: {
655
- key?: string;
656
- label?: string;
657
- type?: "number" | "boolean" | "status" | "date" | "text" | "currency" | "email" | "image" | "textarea";
658
- required?: boolean;
659
- description?: string;
660
- defaultValue?: any;
661
- }[];
662
- defaultView?: "table" | "grid" | "list";
663
- features?: {
664
- searchable?: boolean;
665
- creatable?: boolean;
666
- editable?: boolean;
667
- deletable?: boolean;
668
- exportable?: boolean;
669
- };
670
- }>, "many">>;
671
- domain: z.ZodObject<{
672
- signals: z.ZodArray<z.ZodObject<{
673
- id: z.ZodString;
674
- label: z.ZodString;
675
- description: z.ZodOptional<z.ZodString>;
676
- kind: z.ZodEnum<["sensor", "actuator", "setpoint", "metric", "status", "kpi"]>;
677
- source: z.ZodEnum<["mock", "mqtt", "http", "derived", "local"]>;
678
- topic: z.ZodOptional<z.ZodString>;
679
- endpoint: z.ZodOptional<z.ZodString>;
680
- jsonPath: z.ZodOptional<z.ZodString>;
681
- refreshRate: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
682
- defaultValue: z.ZodOptional<z.ZodAny>;
683
- unit: z.ZodOptional<z.ZodString>;
684
- min: z.ZodOptional<z.ZodNumber>;
685
- max: z.ZodOptional<z.ZodNumber>;
686
- }, "strip", z.ZodTypeAny, {
687
- label?: string;
688
- description?: string;
689
- defaultValue?: any;
690
- id?: string;
691
- kind?: "status" | "sensor" | "actuator" | "setpoint" | "metric" | "kpi";
692
- source?: "mock" | "mqtt" | "http" | "derived" | "local";
693
- topic?: string;
694
- endpoint?: string;
695
- jsonPath?: string;
696
- refreshRate?: number;
697
- unit?: string;
698
- min?: number;
699
- max?: number;
700
- }, {
701
- label?: string;
702
- description?: string;
703
- defaultValue?: any;
704
- id?: string;
705
- kind?: "status" | "sensor" | "actuator" | "setpoint" | "metric" | "kpi";
706
- source?: "mock" | "mqtt" | "http" | "derived" | "local";
707
- topic?: string;
708
- endpoint?: string;
709
- jsonPath?: string;
710
- refreshRate?: number;
711
- unit?: string;
712
- min?: number;
713
- max?: number;
714
- }>, "many">;
715
- entities: z.ZodArray<z.ZodObject<{
716
- id: z.ZodString;
717
- name: z.ZodString;
718
- description: z.ZodOptional<z.ZodString>;
719
- type: z.ZodString;
720
- category: z.ZodDefault<z.ZodString>;
721
- signals: z.ZodArray<z.ZodString, "many">;
722
- ui: z.ZodOptional<z.ZodObject<{
723
- icon: z.ZodOptional<z.ZodString>;
724
- color: z.ZodOptional<z.ZodString>;
725
- dashboardComponent: z.ZodOptional<z.ZodString>;
726
- }, "strip", z.ZodTypeAny, {
727
- icon?: string;
728
- color?: string;
729
- dashboardComponent?: string;
730
- }, {
731
- icon?: string;
732
- color?: string;
733
- dashboardComponent?: string;
734
- }>>;
735
- }, "strip", z.ZodTypeAny, {
736
- type?: string;
737
- description?: string;
738
- id?: string;
739
- name?: string;
740
- category?: string;
741
- signals?: string[];
742
- ui?: {
743
- icon?: string;
744
- color?: string;
745
- dashboardComponent?: string;
746
- };
747
- }, {
748
- type?: string;
749
- description?: string;
750
- id?: string;
751
- name?: string;
752
- category?: string;
753
- signals?: string[];
754
- ui?: {
755
- icon?: string;
756
- color?: string;
757
- dashboardComponent?: string;
758
- };
759
- }>, "many">;
760
- workflows: z.ZodOptional<z.ZodArray<z.ZodObject<{
761
- id: z.ZodString;
762
- name: z.ZodString;
763
- active: z.ZodDefault<z.ZodBoolean>;
764
- trigger: z.ZodObject<{
765
- id: z.ZodString;
766
- type: z.ZodEnum<["signal_change", "manual_action", "schedule", "webhook"]>;
767
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
768
- }, "strip", z.ZodTypeAny, {
769
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
770
- id?: string;
771
- config?: Record<string, any>;
772
- }, {
773
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
774
- id?: string;
775
- config?: Record<string, any>;
776
- }>;
777
- actions: z.ZodArray<z.ZodObject<{
778
- id: z.ZodString;
779
- type: z.ZodEnum<["update_resource", "send_notification", "mqtt_publish", "api_call", "navigate", "agent_task"]>;
780
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
781
- }, "strip", z.ZodTypeAny, {
782
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
783
- id?: string;
784
- config?: Record<string, any>;
785
- }, {
786
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
787
- id?: string;
788
- config?: Record<string, any>;
789
- }>, "many">;
790
- }, "strip", z.ZodTypeAny, {
791
- id?: string;
792
- name?: string;
793
- active?: boolean;
794
- trigger?: {
795
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
796
- id?: string;
797
- config?: Record<string, any>;
798
- };
799
- actions?: {
800
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
801
- id?: string;
802
- config?: Record<string, any>;
803
- }[];
804
- }, {
805
- id?: string;
806
- name?: string;
807
- active?: boolean;
808
- trigger?: {
809
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
810
- id?: string;
811
- config?: Record<string, any>;
812
- };
813
- actions?: {
814
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
815
- id?: string;
816
- config?: Record<string, any>;
817
- }[];
818
- }>, "many">>;
819
- }, "strip", z.ZodTypeAny, {
820
- signals?: {
821
- label?: string;
822
- description?: string;
823
- defaultValue?: any;
824
- id?: string;
825
- kind?: "status" | "sensor" | "actuator" | "setpoint" | "metric" | "kpi";
826
- source?: "mock" | "mqtt" | "http" | "derived" | "local";
827
- topic?: string;
828
- endpoint?: string;
829
- jsonPath?: string;
830
- refreshRate?: number;
831
- unit?: string;
832
- min?: number;
833
- max?: number;
834
- }[];
835
- entities?: {
836
- type?: string;
837
- description?: string;
838
- id?: string;
839
- name?: string;
840
- category?: string;
841
- signals?: string[];
842
- ui?: {
843
- icon?: string;
844
- color?: string;
845
- dashboardComponent?: string;
846
- };
847
- }[];
848
- workflows?: {
849
- id?: string;
850
- name?: string;
851
- active?: boolean;
852
- trigger?: {
853
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
854
- id?: string;
855
- config?: Record<string, any>;
856
- };
857
- actions?: {
858
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
859
- id?: string;
860
- config?: Record<string, any>;
861
- }[];
862
- }[];
863
- }, {
864
- signals?: {
865
- label?: string;
866
- description?: string;
867
- defaultValue?: any;
868
- id?: string;
869
- kind?: "status" | "sensor" | "actuator" | "setpoint" | "metric" | "kpi";
870
- source?: "mock" | "mqtt" | "http" | "derived" | "local";
871
- topic?: string;
872
- endpoint?: string;
873
- jsonPath?: string;
874
- refreshRate?: number;
875
- unit?: string;
876
- min?: number;
877
- max?: number;
878
- }[];
879
- entities?: {
880
- type?: string;
881
- description?: string;
882
- id?: string;
883
- name?: string;
884
- category?: string;
885
- signals?: string[];
886
- ui?: {
887
- icon?: string;
888
- color?: string;
889
- dashboardComponent?: string;
890
- };
891
- }[];
892
- workflows?: {
893
- id?: string;
894
- name?: string;
895
- active?: boolean;
896
- trigger?: {
897
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
898
- id?: string;
899
- config?: Record<string, any>;
900
- };
901
- actions?: {
902
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
903
- id?: string;
904
- config?: Record<string, any>;
905
- }[];
906
- }[];
907
- }>;
908
- pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
909
- id: z.ZodString;
910
- slug: z.ZodString;
911
- title: z.ZodString;
912
- description: z.ZodOptional<z.ZodString>;
913
- icon: z.ZodOptional<z.ZodString>;
914
- sections: z.ZodArray<z.ZodObject<{
915
- id: z.ZodString;
916
- title: z.ZodOptional<z.ZodString>;
917
- description: z.ZodOptional<z.ZodString>;
918
- layout: z.ZodOptional<z.ZodObject<{
919
- columns: z.ZodOptional<z.ZodNumber>;
920
- variant: z.ZodOptional<z.ZodEnum<["grid", "stack", "split"]>>;
921
- }, "strip", z.ZodTypeAny, {
922
- columns?: number;
923
- variant?: "grid" | "stack" | "split";
924
- }, {
925
- columns?: number;
926
- variant?: "grid" | "stack" | "split";
927
- }>>;
928
- blocks: z.ZodArray<z.ZodObject<{
929
- id: z.ZodString;
930
- type: z.ZodString;
931
- props: z.ZodRecord<z.ZodString, z.ZodAny>;
932
- layout: z.ZodOptional<z.ZodObject<{
933
- colSpan: z.ZodOptional<z.ZodNumber>;
934
- rowSpan: z.ZodOptional<z.ZodNumber>;
935
- }, "strip", z.ZodTypeAny, {
936
- colSpan?: number;
937
- rowSpan?: number;
938
- }, {
939
- colSpan?: number;
940
- rowSpan?: number;
941
- }>>;
942
- }, "strip", z.ZodTypeAny, {
943
- type?: string;
944
- id?: string;
945
- props?: Record<string, any>;
946
- layout?: {
947
- colSpan?: number;
948
- rowSpan?: number;
949
- };
950
- }, {
951
- type?: string;
952
- id?: string;
953
- props?: Record<string, any>;
954
- layout?: {
955
- colSpan?: number;
956
- rowSpan?: number;
957
- };
958
- }>, "many">;
959
- }, "strip", z.ZodTypeAny, {
960
- description?: string;
961
- id?: string;
962
- layout?: {
963
- columns?: number;
964
- variant?: "grid" | "stack" | "split";
965
- };
966
- title?: string;
967
- blocks?: {
968
- type?: string;
969
- id?: string;
970
- props?: Record<string, any>;
971
- layout?: {
972
- colSpan?: number;
973
- rowSpan?: number;
974
- };
975
- }[];
976
- }, {
977
- description?: string;
978
- id?: string;
979
- layout?: {
980
- columns?: number;
981
- variant?: "grid" | "stack" | "split";
982
- };
983
- title?: string;
984
- blocks?: {
985
- type?: string;
986
- id?: string;
987
- props?: Record<string, any>;
988
- layout?: {
989
- colSpan?: number;
990
- rowSpan?: number;
991
- };
992
- }[];
993
- }>, "many">;
994
- }, "strip", z.ZodTypeAny, {
995
- description?: string;
996
- id?: string;
997
- icon?: string;
998
- title?: string;
999
- slug?: string;
1000
- sections?: {
1001
- description?: string;
1002
- id?: string;
1003
- layout?: {
1004
- columns?: number;
1005
- variant?: "grid" | "stack" | "split";
1006
- };
1007
- title?: string;
1008
- blocks?: {
1009
- type?: string;
1010
- id?: string;
1011
- props?: Record<string, any>;
1012
- layout?: {
1013
- colSpan?: number;
1014
- rowSpan?: number;
1015
- };
1016
- }[];
1017
- }[];
1018
- }, {
1019
- description?: string;
1020
- id?: string;
1021
- icon?: string;
1022
- title?: string;
1023
- slug?: string;
1024
- sections?: {
1025
- description?: string;
1026
- id?: string;
1027
- layout?: {
1028
- columns?: number;
1029
- variant?: "grid" | "stack" | "split";
1030
- };
1031
- title?: string;
1032
- blocks?: {
1033
- type?: string;
1034
- id?: string;
1035
- props?: Record<string, any>;
1036
- layout?: {
1037
- colSpan?: number;
1038
- rowSpan?: number;
1039
- };
1040
- }[];
1041
- }[];
1042
- }>, "many">>;
1043
- }, "strip", z.ZodTypeAny, {
1044
- config?: {
1045
- theme?: "light" | "dark" | "system" | "corporate" | "midnight" | "blueprint";
1046
- mockMode?: boolean;
1047
- brokerUrl?: string;
1048
- };
1049
- meta?: {
1050
- description?: string;
1051
- name?: string;
1052
- version?: string;
1053
- author?: string;
1054
- createdAt?: string;
1055
- };
1056
- modules?: string[];
1057
- resources?: {
1058
- id?: string;
1059
- name?: string;
1060
- fields?: {
1061
- key?: string;
1062
- label?: string;
1063
- type?: "number" | "boolean" | "status" | "date" | "text" | "currency" | "email" | "image" | "textarea";
1064
- required?: boolean;
1065
- description?: string;
1066
- defaultValue?: any;
1067
- }[];
1068
- defaultView?: "table" | "grid" | "list";
1069
- features?: {
1070
- searchable?: boolean;
1071
- creatable?: boolean;
1072
- editable?: boolean;
1073
- deletable?: boolean;
1074
- exportable?: boolean;
1075
- };
1076
- }[];
1077
- domain?: {
1078
- signals?: {
1079
- label?: string;
1080
- description?: string;
1081
- defaultValue?: any;
1082
- id?: string;
1083
- kind?: "status" | "sensor" | "actuator" | "setpoint" | "metric" | "kpi";
1084
- source?: "mock" | "mqtt" | "http" | "derived" | "local";
1085
- topic?: string;
1086
- endpoint?: string;
1087
- jsonPath?: string;
1088
- refreshRate?: number;
1089
- unit?: string;
1090
- min?: number;
1091
- max?: number;
1092
- }[];
1093
- entities?: {
1094
- type?: string;
1095
- description?: string;
1096
- id?: string;
1097
- name?: string;
1098
- category?: string;
1099
- signals?: string[];
1100
- ui?: {
1101
- icon?: string;
1102
- color?: string;
1103
- dashboardComponent?: string;
1104
- };
1105
- }[];
1106
- workflows?: {
1107
- id?: string;
1108
- name?: string;
1109
- active?: boolean;
1110
- trigger?: {
1111
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
1112
- id?: string;
1113
- config?: Record<string, any>;
1114
- };
1115
- actions?: {
1116
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
1117
- id?: string;
1118
- config?: Record<string, any>;
1119
- }[];
1120
- }[];
1121
- };
1122
- pages?: {
1123
- description?: string;
1124
- id?: string;
1125
- icon?: string;
1126
- title?: string;
1127
- slug?: string;
1128
- sections?: {
1129
- description?: string;
1130
- id?: string;
1131
- layout?: {
1132
- columns?: number;
1133
- variant?: "grid" | "stack" | "split";
1134
- };
1135
- title?: string;
1136
- blocks?: {
1137
- type?: string;
1138
- id?: string;
1139
- props?: Record<string, any>;
1140
- layout?: {
1141
- colSpan?: number;
1142
- rowSpan?: number;
1143
- };
1144
- }[];
1145
- }[];
1146
- }[];
1147
- }, {
1148
- config?: {
1149
- theme?: "light" | "dark" | "system" | "corporate" | "midnight" | "blueprint";
1150
- mockMode?: boolean;
1151
- brokerUrl?: string;
1152
- };
1153
- meta?: {
1154
- description?: string;
1155
- name?: string;
1156
- version?: string;
1157
- author?: string;
1158
- createdAt?: string;
1159
- };
1160
- modules?: string[];
1161
- resources?: {
1162
- id?: string;
1163
- name?: string;
1164
- fields?: {
1165
- key?: string;
1166
- label?: string;
1167
- type?: "number" | "boolean" | "status" | "date" | "text" | "currency" | "email" | "image" | "textarea";
1168
- required?: boolean;
1169
- description?: string;
1170
- defaultValue?: any;
1171
- }[];
1172
- defaultView?: "table" | "grid" | "list";
1173
- features?: {
1174
- searchable?: boolean;
1175
- creatable?: boolean;
1176
- editable?: boolean;
1177
- deletable?: boolean;
1178
- exportable?: boolean;
1179
- };
1180
- }[];
1181
- domain?: {
1182
- signals?: {
1183
- label?: string;
1184
- description?: string;
1185
- defaultValue?: any;
1186
- id?: string;
1187
- kind?: "status" | "sensor" | "actuator" | "setpoint" | "metric" | "kpi";
1188
- source?: "mock" | "mqtt" | "http" | "derived" | "local";
1189
- topic?: string;
1190
- endpoint?: string;
1191
- jsonPath?: string;
1192
- refreshRate?: number;
1193
- unit?: string;
1194
- min?: number;
1195
- max?: number;
1196
- }[];
1197
- entities?: {
1198
- type?: string;
1199
- description?: string;
1200
- id?: string;
1201
- name?: string;
1202
- category?: string;
1203
- signals?: string[];
1204
- ui?: {
1205
- icon?: string;
1206
- color?: string;
1207
- dashboardComponent?: string;
1208
- };
1209
- }[];
1210
- workflows?: {
1211
- id?: string;
1212
- name?: string;
1213
- active?: boolean;
1214
- trigger?: {
1215
- type?: "signal_change" | "manual_action" | "schedule" | "webhook";
1216
- id?: string;
1217
- config?: Record<string, any>;
1218
- };
1219
- actions?: {
1220
- type?: "update_resource" | "send_notification" | "mqtt_publish" | "api_call" | "navigate" | "agent_task";
1221
- id?: string;
1222
- config?: Record<string, any>;
1223
- }[];
1224
- }[];
1225
- };
1226
- pages?: {
1227
- description?: string;
1228
- id?: string;
1229
- icon?: string;
1230
- title?: string;
1231
- slug?: string;
1232
- sections?: {
1233
- description?: string;
1234
- id?: string;
1235
- layout?: {
1236
- columns?: number;
1237
- variant?: "grid" | "stack" | "split";
1238
- };
1239
- title?: string;
1240
- blocks?: {
1241
- type?: string;
1242
- id?: string;
1243
- props?: Record<string, any>;
1244
- layout?: {
1245
- colSpan?: number;
1246
- rowSpan?: number;
1247
- };
1248
- }[];
1249
- }[];
1250
- }[];
1251
- }>;
1252
- export type AppSpecification = z.infer<typeof AppSpecificationSchema>;
6
+ export { FieldSchema, type FieldDefinition, ResourceSchema, type ResourceDefinition, SignalSchema, type SignalDefinition, EntitySchema, type EntityDefinition, TriggerSchema, ActionSchema, WorkflowSchema, type WorkflowDefinition, type ActionDefinition, BlockSchema, type Block, PageSectionSchema, type PageSection, PageSchema, type PageDefinition, AppSpecificationSchema, type AppSpecification, } from '@ramme-io/shared';
1253
7
  //# sourceMappingURL=schema.d.ts.map