@eventcatalog/core 4.2.1 → 4.2.3
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.
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/astro-output.cjs +43 -0
- package/dist/astro-output.d.cts +4 -0
- package/dist/astro-output.d.ts +4 -0
- package/dist/astro-output.js +8 -0
- package/dist/{chunk-PUTZR6SV.js → chunk-DGDCWOWP.js} +1 -1
- package/dist/{chunk-A6SWOPJ4.js → chunk-I4TTHHXI.js} +1 -1
- package/dist/{chunk-DTQ2MXRB.js → chunk-M2YEUPPP.js} +1 -1
- package/dist/{chunk-V6UMVNX4.js → chunk-QQC5UX3E.js} +3 -3
- package/dist/chunk-RDYYZQYU.js +18 -0
- package/dist/{chunk-RQ36O7QA.js → chunk-WOASLQ3F.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +15 -12
- package/dist/eventcatalog.js +16 -23
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/src/components/MDX/CustomProperties/CustomProperties.astro +39 -0
- package/eventcatalog/src/components/MDX/CustomProperties/CustomProperty.astro +37 -0
- package/eventcatalog/src/components/MDX/CustomProperties/CustomPropertyRow.astro +37 -0
- package/eventcatalog/src/components/MDX/CustomProperties/CustomPropertyValue.astro +51 -0
- package/eventcatalog/src/components/MDX/CustomProperties/custom-properties.spec.ts +38 -0
- package/eventcatalog/src/components/MDX/CustomProperties/custom-properties.ts +39 -0
- package/eventcatalog/src/components/MDX/components.tsx +4 -0
- package/eventcatalog/src/content.config.ts +402 -373
- package/eventcatalog/src/utils/collections/extension-properties.ts +25 -0
- package/package.json +3 -3
|
@@ -10,6 +10,7 @@ import { userTeamDirectoryLoader } from './enterprise/directory/user-team-direct
|
|
|
10
10
|
import config from '@config';
|
|
11
11
|
import { schemaLoader } from './utils/collections/schema-loader';
|
|
12
12
|
import { globWithSafeWatcher, withIgnoredBuildArtifacts } from './utils/collections/glob-loader';
|
|
13
|
+
import { withExtensionProperties } from './utils/collections/extension-properties';
|
|
13
14
|
|
|
14
15
|
// Enterprise Collections
|
|
15
16
|
import { customPagesSchema, resourceDocsSchema, resourceDocCategoriesSchema } from './enterprise/collections';
|
|
@@ -270,85 +271,87 @@ const flows = defineCollection({
|
|
|
270
271
|
return `${data.id}-${data.version}`;
|
|
271
272
|
},
|
|
272
273
|
}),
|
|
273
|
-
schema:
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
owners: detailPanelPropertySchema.optional(),
|
|
278
|
-
versions: detailPanelPropertySchema.optional(),
|
|
279
|
-
changelog: detailPanelPropertySchema.optional(),
|
|
280
|
-
})
|
|
281
|
-
.optional(),
|
|
282
|
-
steps: z.array(
|
|
283
|
-
z
|
|
274
|
+
schema: withExtensionProperties(
|
|
275
|
+
z
|
|
276
|
+
.object({
|
|
277
|
+
detailsPanel: z
|
|
284
278
|
.object({
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
summary: z.string().optional(),
|
|
289
|
-
message: pointer.optional(),
|
|
290
|
-
agent: pointer.optional(),
|
|
291
|
-
service: pointer.optional(),
|
|
292
|
-
flow: pointer.optional(),
|
|
293
|
-
container: pointer.optional(),
|
|
294
|
-
dataProduct: pointer.optional(),
|
|
295
|
-
|
|
296
|
-
actor: z
|
|
297
|
-
.object({
|
|
298
|
-
name: z.string(),
|
|
299
|
-
summary: z.string().optional(),
|
|
300
|
-
})
|
|
301
|
-
.optional(),
|
|
302
|
-
custom: z
|
|
303
|
-
.object({
|
|
304
|
-
title: z.string(),
|
|
305
|
-
icon: z.string().optional(),
|
|
306
|
-
type: z.string().optional(),
|
|
307
|
-
summary: z.string().optional(),
|
|
308
|
-
url: z.string().url().optional(),
|
|
309
|
-
color: z.string().optional(),
|
|
310
|
-
properties: z.record(z.string(), z.union([z.string(), z.number()])).optional(),
|
|
311
|
-
height: z.number().optional(),
|
|
312
|
-
menu: z
|
|
313
|
-
.array(
|
|
314
|
-
z.object({
|
|
315
|
-
label: z.string(),
|
|
316
|
-
url: z.string().url().optional(),
|
|
317
|
-
})
|
|
318
|
-
)
|
|
319
|
-
.optional(),
|
|
320
|
-
})
|
|
321
|
-
.optional(),
|
|
322
|
-
externalSystem: z
|
|
323
|
-
.object({
|
|
324
|
-
name: z.string(),
|
|
325
|
-
summary: z.string().optional(),
|
|
326
|
-
url: z.string().url().optional(),
|
|
327
|
-
})
|
|
328
|
-
.optional(),
|
|
329
|
-
next_step: flowStep,
|
|
330
|
-
next_steps: z.array(flowStep).optional(),
|
|
331
|
-
})
|
|
332
|
-
.refine((data) => {
|
|
333
|
-
// Cant have both next_steps and next_steps
|
|
334
|
-
if (data.next_step && data.next_steps) return false;
|
|
335
|
-
|
|
336
|
-
// Either one or non types can be present
|
|
337
|
-
const typesUsed = [
|
|
338
|
-
data.message,
|
|
339
|
-
data.agent,
|
|
340
|
-
data.service,
|
|
341
|
-
data.flow,
|
|
342
|
-
data.container,
|
|
343
|
-
data.dataProduct,
|
|
344
|
-
data.actor,
|
|
345
|
-
data.custom,
|
|
346
|
-
].filter((v) => v).length;
|
|
347
|
-
return typesUsed === 0 || typesUsed === 1;
|
|
279
|
+
owners: detailPanelPropertySchema.optional(),
|
|
280
|
+
versions: detailPanelPropertySchema.optional(),
|
|
281
|
+
changelog: detailPanelPropertySchema.optional(),
|
|
348
282
|
})
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
283
|
+
.optional(),
|
|
284
|
+
steps: z.array(
|
|
285
|
+
z
|
|
286
|
+
.object({
|
|
287
|
+
id: z.union([z.string(), z.number()]),
|
|
288
|
+
type: z.enum(['node', 'message', 'agent', 'user', 'actor']).optional(),
|
|
289
|
+
title: z.string(),
|
|
290
|
+
summary: z.string().optional(),
|
|
291
|
+
message: pointer.optional(),
|
|
292
|
+
agent: pointer.optional(),
|
|
293
|
+
service: pointer.optional(),
|
|
294
|
+
flow: pointer.optional(),
|
|
295
|
+
container: pointer.optional(),
|
|
296
|
+
dataProduct: pointer.optional(),
|
|
297
|
+
|
|
298
|
+
actor: z
|
|
299
|
+
.object({
|
|
300
|
+
name: z.string(),
|
|
301
|
+
summary: z.string().optional(),
|
|
302
|
+
})
|
|
303
|
+
.optional(),
|
|
304
|
+
custom: z
|
|
305
|
+
.object({
|
|
306
|
+
title: z.string(),
|
|
307
|
+
icon: z.string().optional(),
|
|
308
|
+
type: z.string().optional(),
|
|
309
|
+
summary: z.string().optional(),
|
|
310
|
+
url: z.string().url().optional(),
|
|
311
|
+
color: z.string().optional(),
|
|
312
|
+
properties: z.record(z.string(), z.union([z.string(), z.number()])).optional(),
|
|
313
|
+
height: z.number().optional(),
|
|
314
|
+
menu: z
|
|
315
|
+
.array(
|
|
316
|
+
z.object({
|
|
317
|
+
label: z.string(),
|
|
318
|
+
url: z.string().url().optional(),
|
|
319
|
+
})
|
|
320
|
+
)
|
|
321
|
+
.optional(),
|
|
322
|
+
})
|
|
323
|
+
.optional(),
|
|
324
|
+
externalSystem: z
|
|
325
|
+
.object({
|
|
326
|
+
name: z.string(),
|
|
327
|
+
summary: z.string().optional(),
|
|
328
|
+
url: z.string().url().optional(),
|
|
329
|
+
})
|
|
330
|
+
.optional(),
|
|
331
|
+
next_step: flowStep,
|
|
332
|
+
next_steps: z.array(flowStep).optional(),
|
|
333
|
+
})
|
|
334
|
+
.refine((data) => {
|
|
335
|
+
// Cant have both next_steps and next_steps
|
|
336
|
+
if (data.next_step && data.next_steps) return false;
|
|
337
|
+
|
|
338
|
+
// Either one or non types can be present
|
|
339
|
+
const typesUsed = [
|
|
340
|
+
data.message,
|
|
341
|
+
data.agent,
|
|
342
|
+
data.service,
|
|
343
|
+
data.flow,
|
|
344
|
+
data.container,
|
|
345
|
+
data.dataProduct,
|
|
346
|
+
data.actor,
|
|
347
|
+
data.custom,
|
|
348
|
+
].filter((v) => v).length;
|
|
349
|
+
return typesUsed === 0 || typesUsed === 1;
|
|
350
|
+
})
|
|
351
|
+
),
|
|
352
|
+
})
|
|
353
|
+
.extend(baseSchema.shape)
|
|
354
|
+
),
|
|
352
355
|
});
|
|
353
356
|
|
|
354
357
|
const operationSchema = z
|
|
@@ -380,19 +383,21 @@ const events = defineCollection({
|
|
|
380
383
|
return `${data.id}-${data.version}`;
|
|
381
384
|
},
|
|
382
385
|
}),
|
|
383
|
-
schema:
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
386
|
+
schema: withExtensionProperties(
|
|
387
|
+
z
|
|
388
|
+
.object({
|
|
389
|
+
// Used by users
|
|
390
|
+
operation: operationSchema,
|
|
391
|
+
// Used by eventcatalog
|
|
392
|
+
producers: z.array(reference('services')).optional(),
|
|
393
|
+
consumers: z.array(reference('services')).optional(),
|
|
394
|
+
channels: z.array(channelPointer).optional(),
|
|
395
|
+
schemas: z.array(schemaPointer).optional(),
|
|
396
|
+
messageChannels: z.array(reference('channels')).optional(),
|
|
397
|
+
detailsPanel: messageDetailsPanelPropertySchema.optional(),
|
|
398
|
+
})
|
|
399
|
+
.extend(baseSchema.shape)
|
|
400
|
+
),
|
|
396
401
|
});
|
|
397
402
|
|
|
398
403
|
const commands = defineCollection({
|
|
@@ -403,19 +408,21 @@ const commands = defineCollection({
|
|
|
403
408
|
return `${data.id}-${data.version}`;
|
|
404
409
|
},
|
|
405
410
|
}),
|
|
406
|
-
schema:
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
411
|
+
schema: withExtensionProperties(
|
|
412
|
+
z
|
|
413
|
+
.object({
|
|
414
|
+
// Used by users
|
|
415
|
+
operation: operationSchema,
|
|
416
|
+
// Used by eventcatalog
|
|
417
|
+
producers: z.array(reference('services')).optional(),
|
|
418
|
+
consumers: z.array(reference('services')).optional(),
|
|
419
|
+
channels: z.array(channelPointer).optional(),
|
|
420
|
+
schemas: z.array(schemaPointer).optional(),
|
|
421
|
+
detailsPanel: messageDetailsPanelPropertySchema.optional(),
|
|
422
|
+
messageChannels: z.array(reference('channels')).optional(),
|
|
423
|
+
})
|
|
424
|
+
.extend(baseSchema.shape)
|
|
425
|
+
),
|
|
419
426
|
});
|
|
420
427
|
|
|
421
428
|
const queries = defineCollection({
|
|
@@ -426,19 +433,21 @@ const queries = defineCollection({
|
|
|
426
433
|
return `${data.id}-${data.version}`;
|
|
427
434
|
},
|
|
428
435
|
}),
|
|
429
|
-
schema:
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
436
|
+
schema: withExtensionProperties(
|
|
437
|
+
z
|
|
438
|
+
.object({
|
|
439
|
+
// Used by users
|
|
440
|
+
operation: operationSchema,
|
|
441
|
+
// Used by eventcatalog
|
|
442
|
+
producers: z.array(reference('services')).optional(),
|
|
443
|
+
consumers: z.array(reference('services')).optional(),
|
|
444
|
+
channels: z.array(channelPointer).optional(),
|
|
445
|
+
schemas: z.array(schemaPointer).optional(),
|
|
446
|
+
detailsPanel: messageDetailsPanelPropertySchema.optional(),
|
|
447
|
+
messageChannels: z.array(reference('channels')).optional(),
|
|
448
|
+
})
|
|
449
|
+
.extend(baseSchema.shape)
|
|
450
|
+
),
|
|
442
451
|
});
|
|
443
452
|
|
|
444
453
|
const dataProductOutputPointer = z.object({
|
|
@@ -461,24 +470,26 @@ const dataProducts = defineCollection({
|
|
|
461
470
|
return `${data.id}-${data.version}`;
|
|
462
471
|
},
|
|
463
472
|
}),
|
|
464
|
-
schema:
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
473
|
+
schema: withExtensionProperties(
|
|
474
|
+
z
|
|
475
|
+
.object({
|
|
476
|
+
inputs: z.array(pointer).optional(),
|
|
477
|
+
outputs: z.array(dataProductOutputPointer).optional(),
|
|
478
|
+
detailsPanel: z
|
|
479
|
+
.object({
|
|
480
|
+
domains: detailPanelPropertySchema.optional(),
|
|
481
|
+
inputs: detailPanelPropertySchema.optional(),
|
|
482
|
+
outputs: detailPanelPropertySchema.optional(),
|
|
483
|
+
versions: detailPanelPropertySchema.optional(),
|
|
484
|
+
repository: detailPanelPropertySchema.optional(),
|
|
485
|
+
owners: detailPanelPropertySchema.optional(),
|
|
486
|
+
changelog: detailPanelPropertySchema.optional(),
|
|
487
|
+
flows: detailPanelPropertySchema.optional(),
|
|
488
|
+
})
|
|
489
|
+
.optional(),
|
|
490
|
+
})
|
|
491
|
+
.extend(baseSchema.shape)
|
|
492
|
+
),
|
|
482
493
|
});
|
|
483
494
|
|
|
484
495
|
const services = defineCollection({
|
|
@@ -506,30 +517,32 @@ const services = defineCollection({
|
|
|
506
517
|
return `${data.id}-${data.version}`;
|
|
507
518
|
},
|
|
508
519
|
}),
|
|
509
|
-
schema:
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
520
|
+
schema: withExtensionProperties(
|
|
521
|
+
z
|
|
522
|
+
.object({
|
|
523
|
+
sends: z.array(sendsPointer).optional(),
|
|
524
|
+
receives: z.array(receivesPointer).optional(),
|
|
525
|
+
entities: z.array(pointer).optional(),
|
|
526
|
+
writesTo: z.array(pointer).optional(),
|
|
527
|
+
readsFrom: z.array(pointer).optional(),
|
|
528
|
+
flows: z.array(pointer).optional(),
|
|
529
|
+
externalSystem: z.boolean().optional(),
|
|
530
|
+
detailsPanel: z
|
|
531
|
+
.object({
|
|
532
|
+
domains: detailPanelPropertySchema.optional(),
|
|
533
|
+
messages: detailPanelPropertySchema.optional(),
|
|
534
|
+
versions: detailPanelPropertySchema.optional(),
|
|
535
|
+
specifications: detailPanelPropertySchema.optional(),
|
|
536
|
+
entities: detailPanelPropertySchema.optional(),
|
|
537
|
+
repository: detailPanelPropertySchema.optional(),
|
|
538
|
+
owners: detailPanelPropertySchema.optional(),
|
|
539
|
+
changelog: detailPanelPropertySchema.optional(),
|
|
540
|
+
containers: detailPanelPropertySchema.optional(),
|
|
541
|
+
})
|
|
542
|
+
.optional(),
|
|
543
|
+
})
|
|
544
|
+
.extend(baseSchema.shape)
|
|
545
|
+
),
|
|
533
546
|
});
|
|
534
547
|
|
|
535
548
|
const agentTool = z.object({
|
|
@@ -554,31 +567,33 @@ const agents = defineCollection({
|
|
|
554
567
|
return `${data.id}-${data.version}`;
|
|
555
568
|
},
|
|
556
569
|
}),
|
|
557
|
-
schema:
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
570
|
+
schema: withExtensionProperties(
|
|
571
|
+
z
|
|
572
|
+
.object({
|
|
573
|
+
sends: z.array(sendsPointer).optional(),
|
|
574
|
+
receives: z.array(receivesPointer).optional(),
|
|
575
|
+
writesTo: z.array(pointer).optional(),
|
|
576
|
+
readsFrom: z.array(pointer).optional(),
|
|
577
|
+
flows: z.array(pointer).optional(),
|
|
578
|
+
model: agentModel.optional(),
|
|
579
|
+
tools: z.array(agentTool).optional(),
|
|
580
|
+
specifications: z.undefined().optional(),
|
|
581
|
+
detailsPanel: z
|
|
582
|
+
.object({
|
|
583
|
+
domains: detailPanelPropertySchema.optional(),
|
|
584
|
+
messages: detailPanelPropertySchema.optional(),
|
|
585
|
+
versions: detailPanelPropertySchema.optional(),
|
|
586
|
+
repository: detailPanelPropertySchema.optional(),
|
|
587
|
+
owners: detailPanelPropertySchema.optional(),
|
|
588
|
+
changelog: detailPanelPropertySchema.optional(),
|
|
589
|
+
containers: detailPanelPropertySchema.optional(),
|
|
590
|
+
tools: detailPanelPropertySchema.optional(),
|
|
591
|
+
model: detailPanelPropertySchema.optional(),
|
|
592
|
+
})
|
|
593
|
+
.optional(),
|
|
594
|
+
})
|
|
595
|
+
.extend(baseSchema.shape)
|
|
596
|
+
),
|
|
582
597
|
});
|
|
583
598
|
|
|
584
599
|
const adrStatus = z.enum(ADR_STATUS_VALUES);
|
|
@@ -614,31 +629,33 @@ const adrs = defineCollection({
|
|
|
614
629
|
base: projectDirBase,
|
|
615
630
|
generateId: ({ data }) => `${data.id}-${data.version}`,
|
|
616
631
|
}),
|
|
617
|
-
schema:
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
632
|
+
schema: withExtensionProperties(
|
|
633
|
+
z
|
|
634
|
+
.object({
|
|
635
|
+
status: adrStatus,
|
|
636
|
+
date: z.coerce.date(),
|
|
637
|
+
decisionMakers: z.array(ownerReference).optional(),
|
|
638
|
+
appliesTo: z.array(adrResourcePointer).optional(),
|
|
639
|
+
supersedes: z.array(adrPointer).optional(),
|
|
640
|
+
supersededBy: z.array(adrPointer).optional(),
|
|
641
|
+
amends: z.array(adrPointer).optional(),
|
|
642
|
+
amendedBy: z.array(adrPointer).optional(),
|
|
643
|
+
related: z.array(adrPointer).optional(),
|
|
644
|
+
detailsPanel: z
|
|
645
|
+
.object({
|
|
646
|
+
status: detailPanelPropertySchema.optional(),
|
|
647
|
+
date: detailPanelPropertySchema.optional(),
|
|
648
|
+
decisionMakers: detailPanelPropertySchema.optional(),
|
|
649
|
+
appliesTo: detailPanelPropertySchema.optional(),
|
|
650
|
+
relationships: detailPanelPropertySchema.optional(),
|
|
651
|
+
owners: detailPanelPropertySchema.optional(),
|
|
652
|
+
repository: detailPanelPropertySchema.optional(),
|
|
653
|
+
changelog: detailPanelPropertySchema.optional(),
|
|
654
|
+
})
|
|
655
|
+
.optional(),
|
|
656
|
+
})
|
|
657
|
+
.extend(baseSchema.shape)
|
|
658
|
+
),
|
|
642
659
|
});
|
|
643
660
|
|
|
644
661
|
// 1) Put this near your other enums/utilities
|
|
@@ -666,35 +683,38 @@ const containers = defineCollection({
|
|
|
666
683
|
return `${data.id}-${data.version}`;
|
|
667
684
|
},
|
|
668
685
|
}),
|
|
669
|
-
schema:
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
686
|
+
schema: withExtensionProperties(
|
|
687
|
+
z
|
|
688
|
+
.object({
|
|
689
|
+
container_type: containerTypeEnum, // <— the important discriminator inside DataContainer
|
|
690
|
+
technology: z.string().optional(), // e.g. "postgres@14", "kafka", "s3"
|
|
691
|
+
purpose: z.string().optional(),
|
|
692
|
+
authoritative: z.boolean().optional().default(false),
|
|
693
|
+
access_mode: accessModeEnum.optional(), // read/write/readWrite/appendOnly
|
|
694
|
+
classification: dataClassificationEnum.optional(),
|
|
695
|
+
residency: z.string().optional(),
|
|
696
|
+
retention: z.string().optional(),
|
|
697
|
+
// details panel toggles (aligns with your pattern)
|
|
698
|
+
detailsPanel: z
|
|
699
|
+
.object({
|
|
700
|
+
versions: detailPanelPropertySchema.optional(),
|
|
701
|
+
repository: detailPanelPropertySchema.optional(),
|
|
702
|
+
owners: detailPanelPropertySchema.optional(),
|
|
703
|
+
changelog: detailPanelPropertySchema.optional(),
|
|
704
|
+
attachments: detailPanelPropertySchema.optional(),
|
|
705
|
+
services: detailPanelPropertySchema.optional(),
|
|
706
|
+
flows: detailPanelPropertySchema.optional(),
|
|
707
|
+
})
|
|
708
|
+
.optional(),
|
|
709
|
+
services: z.array(reference('services')).optional(),
|
|
691
710
|
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
711
|
+
servicesThatWriteToContainer: z.array(reference('services')).optional(),
|
|
712
|
+
servicesThatReadFromContainer: z.array(reference('services')).optional(),
|
|
713
|
+
dataProductsThatWriteToContainer: z.array(reference('data-products')).optional(),
|
|
714
|
+
dataProductsThatReadFromContainer: z.array(reference('data-products')).optional(),
|
|
715
|
+
})
|
|
716
|
+
.extend(baseSchema.shape)
|
|
717
|
+
),
|
|
698
718
|
});
|
|
699
719
|
|
|
700
720
|
const customPages = defineCollection({
|
|
@@ -756,35 +776,37 @@ const domains = defineCollection({
|
|
|
756
776
|
return `${data.id}-${data.version}`;
|
|
757
777
|
},
|
|
758
778
|
}),
|
|
759
|
-
schema:
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
779
|
+
schema: withExtensionProperties(
|
|
780
|
+
z
|
|
781
|
+
.object({
|
|
782
|
+
services: z.array(pointer).optional(),
|
|
783
|
+
agents: z.array(pointer).optional(),
|
|
784
|
+
domains: z.array(pointer).optional(),
|
|
785
|
+
systems: z.array(pointer).optional(),
|
|
786
|
+
entities: z.array(pointer).optional(),
|
|
787
|
+
'data-products': z.array(pointer).optional(),
|
|
788
|
+
flows: z.array(pointer).optional(),
|
|
789
|
+
sends: z.array(sendsPointer).optional(),
|
|
790
|
+
receives: z.array(receivesPointer).optional(),
|
|
791
|
+
detailsPanel: z
|
|
792
|
+
.object({
|
|
793
|
+
parentDomains: detailPanelPropertySchema.optional(),
|
|
794
|
+
subdomains: detailPanelPropertySchema.optional(),
|
|
795
|
+
systems: detailPanelPropertySchema.optional(),
|
|
796
|
+
services: detailPanelPropertySchema.optional(),
|
|
797
|
+
entities: detailPanelPropertySchema.optional(),
|
|
798
|
+
messages: detailPanelPropertySchema.optional(),
|
|
799
|
+
ubiquitousLanguage: detailPanelPropertySchema.optional(),
|
|
800
|
+
repository: detailPanelPropertySchema.optional(),
|
|
801
|
+
versions: detailPanelPropertySchema.optional(),
|
|
802
|
+
owners: detailPanelPropertySchema.optional(),
|
|
803
|
+
changelog: detailPanelPropertySchema.optional(),
|
|
804
|
+
attachments: detailPanelPropertySchema.optional(),
|
|
805
|
+
})
|
|
806
|
+
.optional(),
|
|
807
|
+
})
|
|
808
|
+
.extend(baseSchema.shape)
|
|
809
|
+
),
|
|
788
810
|
});
|
|
789
811
|
|
|
790
812
|
// A relationship from one system to another, used by the System Diagram.
|
|
@@ -835,34 +857,36 @@ const systems = defineCollection({
|
|
|
835
857
|
return `${data.id}-${data.version}`;
|
|
836
858
|
},
|
|
837
859
|
}),
|
|
838
|
-
schema:
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
860
|
+
schema: withExtensionProperties(
|
|
861
|
+
z
|
|
862
|
+
.object({
|
|
863
|
+
// Whether the system belongs to your organisation (`internal`) or is a
|
|
864
|
+
// third-party/SaaS system you integrate with (`external`, e.g. "Resend",
|
|
865
|
+
// "Stripe"). External systems are shaded in the node-graph. Defaults to internal.
|
|
866
|
+
scope: z.enum(['internal', 'external']).optional().default('internal'),
|
|
867
|
+
services: z.array(pointer).optional(),
|
|
868
|
+
flows: z.array(pointer).optional(),
|
|
869
|
+
entities: z.array(pointer).optional(),
|
|
870
|
+
containers: z.array(pointer).optional(),
|
|
871
|
+
relationships: z.array(systemRelationshipPointer).optional(),
|
|
872
|
+
actors: z.array(systemActorRelationship).optional(),
|
|
873
|
+
detailsPanel: z
|
|
874
|
+
.object({
|
|
875
|
+
versions: detailPanelPropertySchema.optional(),
|
|
876
|
+
repository: detailPanelPropertySchema.optional(),
|
|
877
|
+
owners: detailPanelPropertySchema.optional(),
|
|
878
|
+
changelog: detailPanelPropertySchema.optional(),
|
|
879
|
+
attachments: detailPanelPropertySchema.optional(),
|
|
880
|
+
services: detailPanelPropertySchema.optional(),
|
|
881
|
+
flows: detailPanelPropertySchema.optional(),
|
|
882
|
+
entities: detailPanelPropertySchema.optional(),
|
|
883
|
+
containers: detailPanelPropertySchema.optional(),
|
|
884
|
+
diagrams: detailPanelPropertySchema.optional(),
|
|
885
|
+
})
|
|
886
|
+
.optional(),
|
|
887
|
+
})
|
|
888
|
+
.extend(baseSchema.shape)
|
|
889
|
+
),
|
|
866
890
|
});
|
|
867
891
|
|
|
868
892
|
const channels = defineCollection({
|
|
@@ -873,41 +897,43 @@ const channels = defineCollection({
|
|
|
873
897
|
return `${data.id}-${data.version}`;
|
|
874
898
|
},
|
|
875
899
|
}),
|
|
876
|
-
schema:
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
900
|
+
schema: withExtensionProperties(
|
|
901
|
+
z
|
|
902
|
+
.object({
|
|
903
|
+
channels: z.array(channelPointer).optional(),
|
|
904
|
+
address: z.string().optional(),
|
|
905
|
+
protocols: z.array(z.string()).optional(),
|
|
906
|
+
deliveryGuarantee: z.enum(['at-most-once', 'at-least-once', 'exactly-once']).optional(),
|
|
907
|
+
routes: z.array(channelPointer).optional(),
|
|
908
|
+
parameters: z
|
|
909
|
+
.record(
|
|
910
|
+
z.string(),
|
|
911
|
+
z.object({
|
|
912
|
+
enum: z.array(z.string()).optional(),
|
|
913
|
+
default: z.string().optional(),
|
|
914
|
+
examples: z.array(z.string()).optional(),
|
|
915
|
+
description: z.string().optional(),
|
|
916
|
+
})
|
|
917
|
+
)
|
|
918
|
+
.optional(),
|
|
919
|
+
messages: z.array(z.object({ collection: z.string(), name: z.string(), ...pointer.shape })).optional(),
|
|
920
|
+
detailsPanel: z
|
|
921
|
+
.object({
|
|
922
|
+
producers: detailPanelPropertySchema.optional(),
|
|
923
|
+
consumers: detailPanelPropertySchema.optional(),
|
|
924
|
+
messages: detailPanelPropertySchema.optional(),
|
|
925
|
+
protocols: detailPanelPropertySchema.optional(),
|
|
926
|
+
parameters: detailPanelPropertySchema.optional(),
|
|
927
|
+
versions: detailPanelPropertySchema.optional(),
|
|
928
|
+
repository: detailPanelPropertySchema.optional(),
|
|
929
|
+
owners: detailPanelPropertySchema.optional(),
|
|
930
|
+
changelog: detailPanelPropertySchema.optional(),
|
|
931
|
+
attachments: detailPanelPropertySchema.optional(),
|
|
891
932
|
})
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
.object({
|
|
897
|
-
producers: detailPanelPropertySchema.optional(),
|
|
898
|
-
consumers: detailPanelPropertySchema.optional(),
|
|
899
|
-
messages: detailPanelPropertySchema.optional(),
|
|
900
|
-
protocols: detailPanelPropertySchema.optional(),
|
|
901
|
-
parameters: detailPanelPropertySchema.optional(),
|
|
902
|
-
versions: detailPanelPropertySchema.optional(),
|
|
903
|
-
repository: detailPanelPropertySchema.optional(),
|
|
904
|
-
owners: detailPanelPropertySchema.optional(),
|
|
905
|
-
changelog: detailPanelPropertySchema.optional(),
|
|
906
|
-
attachments: detailPanelPropertySchema.optional(),
|
|
907
|
-
})
|
|
908
|
-
.optional(),
|
|
909
|
-
})
|
|
910
|
-
.extend(baseSchema.shape),
|
|
933
|
+
.optional(),
|
|
934
|
+
})
|
|
935
|
+
.extend(baseSchema.shape)
|
|
936
|
+
),
|
|
911
937
|
});
|
|
912
938
|
|
|
913
939
|
const ubiquitousLanguages = defineCollection({
|
|
@@ -945,45 +971,46 @@ const entities = defineCollection({
|
|
|
945
971
|
return `${data.id}-${data.version}`;
|
|
946
972
|
},
|
|
947
973
|
}),
|
|
948
|
-
schema:
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
974
|
+
schema: withExtensionProperties(
|
|
975
|
+
z
|
|
976
|
+
.object({
|
|
977
|
+
aggregateRoot: z.boolean().optional(),
|
|
978
|
+
identifier: z.string().optional(),
|
|
979
|
+
properties: z
|
|
980
|
+
.array(
|
|
981
|
+
z.object({
|
|
982
|
+
name: z.string(),
|
|
983
|
+
type: z.string(),
|
|
984
|
+
required: z.boolean().optional(),
|
|
985
|
+
description: z.string().optional(),
|
|
986
|
+
references: z.string().optional(),
|
|
987
|
+
referencesIdentifier: z.string().optional(),
|
|
988
|
+
relationType: z.string().optional(),
|
|
989
|
+
enum: z.array(z.string()).optional(),
|
|
990
|
+
items: z
|
|
991
|
+
.object({
|
|
992
|
+
type: z.string(),
|
|
993
|
+
})
|
|
994
|
+
.optional(),
|
|
995
|
+
})
|
|
996
|
+
)
|
|
997
|
+
.optional(),
|
|
998
|
+
services: z.array(reference('services')).optional(),
|
|
999
|
+
domains: z.array(reference('domains')).optional(),
|
|
1000
|
+
detailsPanel: z
|
|
1001
|
+
.object({
|
|
1002
|
+
domains: detailPanelPropertySchema.optional(),
|
|
1003
|
+
services: detailPanelPropertySchema.optional(),
|
|
1004
|
+
messages: detailPanelPropertySchema.optional(),
|
|
1005
|
+
versions: detailPanelPropertySchema.optional(),
|
|
1006
|
+
owners: detailPanelPropertySchema.optional(),
|
|
1007
|
+
changelog: detailPanelPropertySchema.optional(),
|
|
1008
|
+
attachments: detailPanelPropertySchema.optional(),
|
|
968
1009
|
})
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
detailsPanel: z
|
|
974
|
-
.object({
|
|
975
|
-
domains: detailPanelPropertySchema.optional(),
|
|
976
|
-
services: detailPanelPropertySchema.optional(),
|
|
977
|
-
messages: detailPanelPropertySchema.optional(),
|
|
978
|
-
versions: detailPanelPropertySchema.optional(),
|
|
979
|
-
owners: detailPanelPropertySchema.optional(),
|
|
980
|
-
changelog: detailPanelPropertySchema.optional(),
|
|
981
|
-
attachments: detailPanelPropertySchema.optional(),
|
|
982
|
-
})
|
|
983
|
-
.optional(),
|
|
984
|
-
})
|
|
985
|
-
|
|
986
|
-
.extend(baseSchema.shape),
|
|
1010
|
+
.optional(),
|
|
1011
|
+
})
|
|
1012
|
+
.extend(baseSchema.shape)
|
|
1013
|
+
),
|
|
987
1014
|
});
|
|
988
1015
|
|
|
989
1016
|
const users = defineCollection({
|
|
@@ -1084,14 +1111,16 @@ const diagrams = defineCollection({
|
|
|
1084
1111
|
base: projectDirBase,
|
|
1085
1112
|
generateId: ({ data }) => `${data.id}-${data.version}`,
|
|
1086
1113
|
}),
|
|
1087
|
-
schema:
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1114
|
+
schema: withExtensionProperties(
|
|
1115
|
+
z
|
|
1116
|
+
.object({
|
|
1117
|
+
id: z.string(),
|
|
1118
|
+
name: z.string(),
|
|
1119
|
+
version: z.string(),
|
|
1120
|
+
summary: z.string().optional(),
|
|
1121
|
+
})
|
|
1122
|
+
.extend(baseSchema.shape)
|
|
1123
|
+
),
|
|
1095
1124
|
});
|
|
1096
1125
|
|
|
1097
1126
|
const schemas = defineCollection({
|