@anchrd/intel-contract 0.3.0 → 0.4.0

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.
@@ -146,6 +146,7 @@ export declare const KnowledgeNodeList: z.ZodObject<{
146
146
  updatedAt: z.ZodISODateTime;
147
147
  archivedAt: z.ZodNullable<z.ZodISODateTime>;
148
148
  }, z.core.$strict>>;
149
+ withChildren: z.ZodDefault<z.ZodArray<z.ZodString>>;
149
150
  }, z.core.$strict>;
150
151
  export type KnowledgeNodeList = z.infer<typeof KnowledgeNodeList>;
151
152
  export declare const KnowledgeVersionList: z.ZodObject<{
@@ -1274,6 +1275,7 @@ export declare const FlowList: z.ZodObject<{
1274
1275
  updatedAt: z.ZodISODateTime;
1275
1276
  archivedAt: z.ZodNullable<z.ZodISODateTime>;
1276
1277
  }, z.core.$strict>>;
1278
+ withCalls: z.ZodDefault<z.ZodArray<z.ZodString>>;
1277
1279
  }, z.core.$strict>;
1278
1280
  export type FlowList = z.infer<typeof FlowList>;
1279
1281
  export declare const FlowKnowledgeReference: z.ZodObject<{
@@ -100,7 +100,14 @@ export const ArchiveKnowledgeNodeInput = z.strictObject({
100
100
  archived: z.boolean(),
101
101
  idempotencyKey: z.string().min(8).max(200),
102
102
  });
103
- export const KnowledgeNodeList = z.strictObject({ items: z.array(KnowledgeNode) });
103
+ // ⚠️ `withChildren` gehört zur EBENE, nicht zum Knoten (#59). Ob etwas Kinder hat, die DIESER
104
+ // Leser sehen darf, ist keine Eigenschaft der Sache — zwei Leser bekommen verschiedene Antworten.
105
+ // Als Feld am Knoten müsste jede andere Stelle, die einen Knoten zurückgibt, es mitberechnen oder
106
+ // lügen; als Liste neben den Einträgen kostet es nur die eine Antwort, die es braucht.
107
+ export const KnowledgeNodeList = z.strictObject({
108
+ items: z.array(KnowledgeNode),
109
+ withChildren: z.array(IntelId).default([]),
110
+ });
104
111
  export const KnowledgeVersionList = z.strictObject({ items: z.array(KnowledgeVersion) });
105
112
  export const KnowledgeDocument = z.strictObject({
106
113
  node: KnowledgeNode,
@@ -536,7 +543,13 @@ export const FlowDocument = z.strictObject({
536
543
  flow: Flow,
537
544
  version: FlowVersion.nullable(),
538
545
  });
539
- export const FlowList = z.strictObject({ items: z.array(Flow) });
546
+ // Dasselbe für Flows: welche von ihnen einen anderen Flow rufen, den dieser Leser auch sehen darf
547
+ // (#59). Ein Aufklapp-Pfeil an einem Flow, dessen Aufrufe alle verborgen sind, verspricht Inhalt,
548
+ // den das Aufklappen nicht liefern kann.
549
+ export const FlowList = z.strictObject({
550
+ items: z.array(Flow),
551
+ withCalls: z.array(IntelId).default([]),
552
+ });
540
553
  export const FlowKnowledgeReference = z.strictObject({
541
554
  id: IntelId,
542
555
  title: z.string().min(1).max(240),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anchrd/intel-contract",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {