@objectstack/spec 0.7.1 → 0.7.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 (91) hide show
  1. package/dist/ai/agent-action.zod.d.ts +8 -8
  2. package/dist/ai/model-registry.zod.d.ts +6 -6
  3. package/dist/ai/orchestration.zod.d.ts +6 -6
  4. package/dist/ai/predictive.zod.d.ts +2 -2
  5. package/dist/ai/rag-pipeline.zod.d.ts +2 -2
  6. package/dist/api/batch.zod.d.ts +81 -8
  7. package/dist/api/batch.zod.d.ts.map +1 -1
  8. package/dist/api/batch.zod.js +14 -1
  9. package/dist/api/graphql.zod.d.ts +224 -224
  10. package/dist/api/odata.zod.d.ts +379 -0
  11. package/dist/api/odata.zod.d.ts.map +1 -1
  12. package/dist/api/odata.zod.js +14 -1
  13. package/dist/api/protocol.zod.d.ts +18 -18
  14. package/dist/api/realtime.zod.d.ts +133 -0
  15. package/dist/api/realtime.zod.d.ts.map +1 -1
  16. package/dist/api/realtime.zod.js +14 -1
  17. package/dist/api/websocket.zod.d.ts +2 -2
  18. package/dist/auth/config.zod.d.ts +12 -12
  19. package/dist/auth/identity.zod.d.ts +3 -3
  20. package/dist/automation/approval.zod.d.ts +16 -16
  21. package/dist/automation/etl.zod.d.ts +2 -2
  22. package/dist/automation/sync.zod.d.ts +4 -4
  23. package/dist/automation/webhook.zod.d.ts +2 -2
  24. package/dist/automation/workflow.zod.d.ts +28 -28
  25. package/dist/data/object.zod.d.ts.map +1 -1
  26. package/dist/data/object.zod.js +3 -1
  27. package/dist/hub/composer.zod.d.ts +9 -8
  28. package/dist/hub/composer.zod.d.ts.map +1 -1
  29. package/dist/hub/marketplace.zod.d.ts +1 -0
  30. package/dist/hub/marketplace.zod.d.ts.map +1 -1
  31. package/dist/hub/plugin-registry.zod.d.ts +9 -9
  32. package/dist/hub/space.zod.d.ts +5 -4
  33. package/dist/hub/space.zod.d.ts.map +1 -1
  34. package/dist/integration/connector/database.zod.d.ts +33 -33
  35. package/dist/integration/connector/file-storage.zod.d.ts +52 -52
  36. package/dist/integration/connector/message-queue.zod.d.ts +43 -43
  37. package/dist/integration/connector/saas.zod.d.ts +31 -30
  38. package/dist/integration/connector/saas.zod.d.ts.map +1 -1
  39. package/dist/integration/connector.zod.d.ts +34 -34
  40. package/dist/stack.zod.d.ts +78 -78
  41. package/dist/system/change-management.zod.d.ts +2 -2
  42. package/dist/system/collaboration.zod.d.ts +6 -6
  43. package/dist/system/events.zod.d.ts +2536 -0
  44. package/dist/system/events.zod.d.ts.map +1 -1
  45. package/dist/system/events.zod.js +582 -1
  46. package/dist/system/http-server.zod.d.ts +2 -2
  47. package/dist/system/index.d.ts +1 -0
  48. package/dist/system/index.d.ts.map +1 -1
  49. package/dist/system/index.js +1 -0
  50. package/dist/system/job.zod.d.ts +3 -2
  51. package/dist/system/job.zod.d.ts.map +1 -1
  52. package/dist/system/logging.zod.d.ts +10 -10
  53. package/dist/system/manifest.zod.d.ts +6 -6
  54. package/dist/system/message-queue.zod.d.ts +10 -10
  55. package/dist/system/metadata-loader.zod.d.ts +3 -3
  56. package/dist/system/notification.zod.d.ts +12 -12
  57. package/dist/system/plugin-capability.zod.d.ts +6 -6
  58. package/dist/system/startup-orchestrator.zod.d.ts +2 -2
  59. package/dist/system/worker.zod.d.ts +1458 -0
  60. package/dist/system/worker.zod.d.ts.map +1 -0
  61. package/dist/system/worker.zod.js +479 -0
  62. package/json-schema/api/BatchConfig.json +51 -0
  63. package/json-schema/api/ODataConfig.json +132 -0
  64. package/json-schema/api/RealtimeConfig.json +90 -0
  65. package/json-schema/data/Object.json +4 -1
  66. package/json-schema/system/BatchProgress.json +72 -0
  67. package/json-schema/system/BatchTask.json +63 -0
  68. package/json-schema/system/DeadLetterQueueEntry.json +137 -0
  69. package/json-schema/system/Event.json +24 -0
  70. package/json-schema/system/EventBusConfig.json +552 -0
  71. package/json-schema/system/EventHandler.json +34 -0
  72. package/json-schema/system/EventLogEntry.json +153 -0
  73. package/json-schema/system/EventMessageQueueConfig.json +79 -0
  74. package/json-schema/system/EventMetadata.json +20 -0
  75. package/json-schema/system/EventPersistence.json +11 -0
  76. package/json-schema/system/EventPriority.json +16 -0
  77. package/json-schema/system/EventQueueConfig.json +67 -0
  78. package/json-schema/system/EventReplayConfig.json +50 -0
  79. package/json-schema/system/EventSourcingConfig.json +65 -0
  80. package/json-schema/system/EventTypeDefinition.json +45 -0
  81. package/json-schema/system/EventWebhookConfig.json +119 -0
  82. package/json-schema/system/QueueConfig.json +133 -0
  83. package/json-schema/system/RealTimeNotificationConfig.json +85 -0
  84. package/json-schema/system/Task.json +145 -0
  85. package/json-schema/system/TaskExecutionResult.json +85 -0
  86. package/json-schema/system/TaskPriority.json +16 -0
  87. package/json-schema/system/TaskRetryPolicy.json +46 -0
  88. package/json-schema/system/TaskStatus.json +19 -0
  89. package/json-schema/system/WorkerConfig.json +188 -0
  90. package/json-schema/system/WorkerStats.json +90 -0
  91. package/package.json +9 -1
@@ -0,0 +1,552 @@
1
+ {
2
+ "$ref": "#/definitions/EventBusConfig",
3
+ "definitions": {
4
+ "EventBusConfig": {
5
+ "type": "object",
6
+ "properties": {
7
+ "persistence": {
8
+ "type": "object",
9
+ "properties": {
10
+ "enabled": {
11
+ "type": "boolean",
12
+ "default": false,
13
+ "description": "Enable event persistence"
14
+ },
15
+ "retention": {
16
+ "type": "integer",
17
+ "exclusiveMinimum": 0,
18
+ "description": "Days to retain persisted events"
19
+ },
20
+ "storage": {
21
+ "type": "string",
22
+ "enum": [
23
+ "database",
24
+ "file",
25
+ "s3",
26
+ "custom"
27
+ ],
28
+ "default": "database",
29
+ "description": "Storage backend for persisted events"
30
+ }
31
+ },
32
+ "required": [
33
+ "retention"
34
+ ],
35
+ "additionalProperties": false,
36
+ "description": "Event persistence configuration"
37
+ },
38
+ "queue": {
39
+ "type": "object",
40
+ "properties": {
41
+ "name": {
42
+ "type": "string",
43
+ "default": "events",
44
+ "description": "Event queue name"
45
+ },
46
+ "concurrency": {
47
+ "type": "integer",
48
+ "minimum": 1,
49
+ "default": 10,
50
+ "description": "Max concurrent event handlers"
51
+ },
52
+ "retryPolicy": {
53
+ "type": "object",
54
+ "properties": {
55
+ "maxRetries": {
56
+ "type": "integer",
57
+ "minimum": 0,
58
+ "default": 3,
59
+ "description": "Max retries for failed events"
60
+ },
61
+ "backoffStrategy": {
62
+ "type": "string",
63
+ "enum": [
64
+ "fixed",
65
+ "linear",
66
+ "exponential"
67
+ ],
68
+ "default": "exponential",
69
+ "description": "Backoff strategy"
70
+ },
71
+ "initialDelayMs": {
72
+ "type": "integer",
73
+ "exclusiveMinimum": 0,
74
+ "default": 1000,
75
+ "description": "Initial retry delay"
76
+ },
77
+ "maxDelayMs": {
78
+ "type": "integer",
79
+ "exclusiveMinimum": 0,
80
+ "default": 60000,
81
+ "description": "Maximum retry delay"
82
+ }
83
+ },
84
+ "additionalProperties": false,
85
+ "description": "Default retry policy for events"
86
+ },
87
+ "deadLetterQueue": {
88
+ "type": "string",
89
+ "description": "Dead letter queue name for failed events"
90
+ },
91
+ "priorityEnabled": {
92
+ "type": "boolean",
93
+ "default": true,
94
+ "description": "Process events based on priority"
95
+ }
96
+ },
97
+ "additionalProperties": false,
98
+ "description": "Event queue configuration"
99
+ },
100
+ "eventSourcing": {
101
+ "type": "object",
102
+ "properties": {
103
+ "enabled": {
104
+ "type": "boolean",
105
+ "default": false,
106
+ "description": "Enable event sourcing"
107
+ },
108
+ "snapshotInterval": {
109
+ "type": "integer",
110
+ "exclusiveMinimum": 0,
111
+ "default": 100,
112
+ "description": "Create snapshot every N events"
113
+ },
114
+ "snapshotRetention": {
115
+ "type": "integer",
116
+ "exclusiveMinimum": 0,
117
+ "default": 10,
118
+ "description": "Number of snapshots to retain"
119
+ },
120
+ "retention": {
121
+ "type": "integer",
122
+ "exclusiveMinimum": 0,
123
+ "default": 365,
124
+ "description": "Days to retain events"
125
+ },
126
+ "aggregateTypes": {
127
+ "type": "array",
128
+ "items": {
129
+ "type": "string"
130
+ },
131
+ "description": "Aggregate types to enable event sourcing for"
132
+ },
133
+ "storage": {
134
+ "type": "object",
135
+ "properties": {
136
+ "type": {
137
+ "type": "string",
138
+ "enum": [
139
+ "database",
140
+ "file",
141
+ "s3",
142
+ "eventstore"
143
+ ],
144
+ "default": "database",
145
+ "description": "Storage backend"
146
+ },
147
+ "options": {
148
+ "type": "object",
149
+ "additionalProperties": {},
150
+ "description": "Storage-specific options"
151
+ }
152
+ },
153
+ "additionalProperties": false,
154
+ "description": "Event store configuration"
155
+ }
156
+ },
157
+ "additionalProperties": false,
158
+ "description": "Event sourcing configuration"
159
+ },
160
+ "replay": {
161
+ "type": "object",
162
+ "properties": {
163
+ "enabled": {
164
+ "type": "boolean",
165
+ "default": true,
166
+ "description": "Enable event replay capability"
167
+ }
168
+ },
169
+ "additionalProperties": false,
170
+ "description": "Event replay configuration"
171
+ },
172
+ "webhooks": {
173
+ "type": "array",
174
+ "items": {
175
+ "type": "object",
176
+ "properties": {
177
+ "id": {
178
+ "type": "string",
179
+ "description": "Unique webhook identifier"
180
+ },
181
+ "eventPattern": {
182
+ "type": "string",
183
+ "description": "Event name pattern (supports wildcards)"
184
+ },
185
+ "url": {
186
+ "type": "string",
187
+ "format": "uri",
188
+ "description": "Webhook endpoint URL"
189
+ },
190
+ "method": {
191
+ "type": "string",
192
+ "enum": [
193
+ "GET",
194
+ "POST",
195
+ "PUT",
196
+ "PATCH"
197
+ ],
198
+ "default": "POST",
199
+ "description": "HTTP method"
200
+ },
201
+ "headers": {
202
+ "type": "object",
203
+ "additionalProperties": {
204
+ "type": "string"
205
+ },
206
+ "description": "HTTP headers"
207
+ },
208
+ "authentication": {
209
+ "type": "object",
210
+ "properties": {
211
+ "type": {
212
+ "type": "string",
213
+ "enum": [
214
+ "none",
215
+ "bearer",
216
+ "basic",
217
+ "api-key"
218
+ ],
219
+ "description": "Auth type"
220
+ },
221
+ "credentials": {
222
+ "type": "object",
223
+ "additionalProperties": {
224
+ "type": "string"
225
+ },
226
+ "description": "Auth credentials"
227
+ }
228
+ },
229
+ "required": [
230
+ "type"
231
+ ],
232
+ "additionalProperties": false,
233
+ "description": "Authentication configuration"
234
+ },
235
+ "retryPolicy": {
236
+ "type": "object",
237
+ "properties": {
238
+ "maxRetries": {
239
+ "type": "integer",
240
+ "minimum": 0,
241
+ "default": 3,
242
+ "description": "Max retry attempts"
243
+ },
244
+ "backoffStrategy": {
245
+ "type": "string",
246
+ "enum": [
247
+ "fixed",
248
+ "linear",
249
+ "exponential"
250
+ ],
251
+ "default": "exponential"
252
+ },
253
+ "initialDelayMs": {
254
+ "type": "integer",
255
+ "exclusiveMinimum": 0,
256
+ "default": 1000,
257
+ "description": "Initial retry delay"
258
+ },
259
+ "maxDelayMs": {
260
+ "type": "integer",
261
+ "exclusiveMinimum": 0,
262
+ "default": 60000,
263
+ "description": "Max retry delay"
264
+ }
265
+ },
266
+ "additionalProperties": false,
267
+ "description": "Retry policy"
268
+ },
269
+ "timeoutMs": {
270
+ "type": "integer",
271
+ "exclusiveMinimum": 0,
272
+ "default": 30000,
273
+ "description": "Request timeout in milliseconds"
274
+ },
275
+ "enabled": {
276
+ "type": "boolean",
277
+ "default": true,
278
+ "description": "Whether webhook is enabled"
279
+ }
280
+ },
281
+ "required": [
282
+ "eventPattern",
283
+ "url"
284
+ ],
285
+ "additionalProperties": false
286
+ },
287
+ "description": "Webhook configurations"
288
+ },
289
+ "messageQueue": {
290
+ "type": "object",
291
+ "properties": {
292
+ "provider": {
293
+ "type": "string",
294
+ "enum": [
295
+ "kafka",
296
+ "rabbitmq",
297
+ "aws-sqs",
298
+ "redis-pubsub",
299
+ "google-pubsub",
300
+ "azure-service-bus"
301
+ ],
302
+ "description": "Message queue provider"
303
+ },
304
+ "topic": {
305
+ "type": "string",
306
+ "description": "Topic or queue name"
307
+ },
308
+ "eventPattern": {
309
+ "type": "string",
310
+ "default": "*",
311
+ "description": "Event name pattern to publish (supports wildcards)"
312
+ },
313
+ "partitionKey": {
314
+ "type": "string",
315
+ "description": "JSON path for partition key (e.g., \"metadata.tenantId\")"
316
+ },
317
+ "format": {
318
+ "type": "string",
319
+ "enum": [
320
+ "json",
321
+ "avro",
322
+ "protobuf"
323
+ ],
324
+ "default": "json",
325
+ "description": "Message serialization format"
326
+ },
327
+ "includeMetadata": {
328
+ "type": "boolean",
329
+ "default": true,
330
+ "description": "Include event metadata in message"
331
+ },
332
+ "compression": {
333
+ "type": "string",
334
+ "enum": [
335
+ "none",
336
+ "gzip",
337
+ "snappy",
338
+ "lz4"
339
+ ],
340
+ "default": "none",
341
+ "description": "Message compression"
342
+ },
343
+ "batchSize": {
344
+ "type": "integer",
345
+ "minimum": 1,
346
+ "default": 1,
347
+ "description": "Batch size for publishing"
348
+ },
349
+ "flushIntervalMs": {
350
+ "type": "integer",
351
+ "exclusiveMinimum": 0,
352
+ "default": 1000,
353
+ "description": "Flush interval for batching"
354
+ }
355
+ },
356
+ "required": [
357
+ "provider",
358
+ "topic"
359
+ ],
360
+ "additionalProperties": false,
361
+ "description": "Message queue integration"
362
+ },
363
+ "realtime": {
364
+ "type": "object",
365
+ "properties": {
366
+ "enabled": {
367
+ "type": "boolean",
368
+ "default": true,
369
+ "description": "Enable real-time notifications"
370
+ },
371
+ "protocol": {
372
+ "type": "string",
373
+ "enum": [
374
+ "websocket",
375
+ "sse",
376
+ "long-polling"
377
+ ],
378
+ "default": "websocket",
379
+ "description": "Real-time protocol"
380
+ },
381
+ "eventPattern": {
382
+ "type": "string",
383
+ "default": "*",
384
+ "description": "Event pattern to broadcast"
385
+ },
386
+ "userFilter": {
387
+ "type": "boolean",
388
+ "default": true,
389
+ "description": "Filter events by user"
390
+ },
391
+ "tenantFilter": {
392
+ "type": "boolean",
393
+ "default": true,
394
+ "description": "Filter events by tenant"
395
+ },
396
+ "channels": {
397
+ "type": "array",
398
+ "items": {
399
+ "type": "object",
400
+ "properties": {
401
+ "name": {
402
+ "type": "string",
403
+ "description": "Channel name"
404
+ },
405
+ "eventPattern": {
406
+ "type": "string",
407
+ "description": "Event pattern for channel"
408
+ }
409
+ },
410
+ "required": [
411
+ "name",
412
+ "eventPattern"
413
+ ],
414
+ "additionalProperties": false
415
+ },
416
+ "description": "Named channels for event broadcasting"
417
+ },
418
+ "rateLimit": {
419
+ "type": "object",
420
+ "properties": {
421
+ "maxEventsPerSecond": {
422
+ "type": "integer",
423
+ "exclusiveMinimum": 0,
424
+ "description": "Max events per second per client"
425
+ },
426
+ "windowMs": {
427
+ "type": "integer",
428
+ "exclusiveMinimum": 0,
429
+ "default": 1000,
430
+ "description": "Rate limit window"
431
+ }
432
+ },
433
+ "required": [
434
+ "maxEventsPerSecond"
435
+ ],
436
+ "additionalProperties": false,
437
+ "description": "Rate limiting configuration"
438
+ }
439
+ },
440
+ "additionalProperties": false,
441
+ "description": "Real-time notification configuration"
442
+ },
443
+ "eventTypes": {
444
+ "type": "array",
445
+ "items": {
446
+ "type": "object",
447
+ "properties": {
448
+ "name": {
449
+ "type": "string",
450
+ "minLength": 3,
451
+ "pattern": "^[a-z][a-z0-9_.]*$",
452
+ "description": "Event type name (lowercase with dots)"
453
+ },
454
+ "version": {
455
+ "type": "string",
456
+ "default": "1.0.0",
457
+ "description": "Event schema version"
458
+ },
459
+ "schema": {
460
+ "description": "JSON Schema for event payload validation"
461
+ },
462
+ "description": {
463
+ "type": "string",
464
+ "description": "Event type description"
465
+ },
466
+ "deprecated": {
467
+ "type": "boolean",
468
+ "default": false,
469
+ "description": "Whether this event type is deprecated"
470
+ },
471
+ "tags": {
472
+ "type": "array",
473
+ "items": {
474
+ "type": "string"
475
+ },
476
+ "description": "Event type tags"
477
+ }
478
+ },
479
+ "required": [
480
+ "name"
481
+ ],
482
+ "additionalProperties": false
483
+ },
484
+ "description": "Event type definitions"
485
+ },
486
+ "handlers": {
487
+ "type": "array",
488
+ "items": {
489
+ "type": "object",
490
+ "properties": {
491
+ "id": {
492
+ "type": "string",
493
+ "description": "Unique handler identifier"
494
+ },
495
+ "eventName": {
496
+ "type": "string",
497
+ "description": "Name of event to handle (supports wildcards like user.*)"
498
+ },
499
+ "priority": {
500
+ "type": "integer",
501
+ "default": 0,
502
+ "description": "Execution priority (lower numbers execute first)"
503
+ },
504
+ "async": {
505
+ "type": "boolean",
506
+ "default": true,
507
+ "description": "Execute in background (true) or block (false)"
508
+ },
509
+ "retry": {
510
+ "type": "object",
511
+ "properties": {
512
+ "maxRetries": {
513
+ "type": "integer",
514
+ "minimum": 0,
515
+ "default": 3,
516
+ "description": "Maximum retry attempts"
517
+ },
518
+ "backoffMs": {
519
+ "type": "integer",
520
+ "exclusiveMinimum": 0,
521
+ "default": 1000,
522
+ "description": "Initial backoff delay"
523
+ },
524
+ "backoffMultiplier": {
525
+ "type": "number",
526
+ "exclusiveMinimum": 0,
527
+ "default": 2,
528
+ "description": "Backoff multiplier"
529
+ }
530
+ },
531
+ "additionalProperties": false,
532
+ "description": "Retry policy for failed handlers"
533
+ },
534
+ "timeoutMs": {
535
+ "type": "integer",
536
+ "exclusiveMinimum": 0,
537
+ "description": "Handler timeout in milliseconds"
538
+ }
539
+ },
540
+ "required": [
541
+ "eventName"
542
+ ],
543
+ "additionalProperties": false
544
+ },
545
+ "description": "Global event handlers"
546
+ }
547
+ },
548
+ "additionalProperties": false
549
+ }
550
+ },
551
+ "$schema": "http://json-schema.org/draft-07/schema#"
552
+ }
@@ -4,6 +4,10 @@
4
4
  "EventHandler": {
5
5
  "type": "object",
6
6
  "properties": {
7
+ "id": {
8
+ "type": "string",
9
+ "description": "Unique handler identifier"
10
+ },
7
11
  "eventName": {
8
12
  "type": "string",
9
13
  "description": "Name of event to handle (supports wildcards like user.*)"
@@ -17,6 +21,36 @@
17
21
  "type": "boolean",
18
22
  "default": true,
19
23
  "description": "Execute in background (true) or block (false)"
24
+ },
25
+ "retry": {
26
+ "type": "object",
27
+ "properties": {
28
+ "maxRetries": {
29
+ "type": "integer",
30
+ "minimum": 0,
31
+ "default": 3,
32
+ "description": "Maximum retry attempts"
33
+ },
34
+ "backoffMs": {
35
+ "type": "integer",
36
+ "exclusiveMinimum": 0,
37
+ "default": 1000,
38
+ "description": "Initial backoff delay"
39
+ },
40
+ "backoffMultiplier": {
41
+ "type": "number",
42
+ "exclusiveMinimum": 0,
43
+ "default": 2,
44
+ "description": "Backoff multiplier"
45
+ }
46
+ },
47
+ "additionalProperties": false,
48
+ "description": "Retry policy for failed handlers"
49
+ },
50
+ "timeoutMs": {
51
+ "type": "integer",
52
+ "exclusiveMinimum": 0,
53
+ "description": "Handler timeout in milliseconds"
20
54
  }
21
55
  },
22
56
  "required": [