@anchrd/intel-contract 0.4.0 → 0.4.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.
|
@@ -1320,8 +1320,16 @@ export declare const UpdateFlowInput: z.ZodObject<{
|
|
|
1320
1320
|
idempotencyKey: z.ZodString;
|
|
1321
1321
|
}, z.core.$strict>;
|
|
1322
1322
|
export type UpdateFlowInput = z.infer<typeof UpdateFlowInput>;
|
|
1323
|
+
export declare const ArchiveFlowInput: z.ZodObject<{
|
|
1324
|
+
flowId: z.ZodString;
|
|
1325
|
+
baseUpdatedAt: z.ZodISODateTime;
|
|
1326
|
+
archived: z.ZodBoolean;
|
|
1327
|
+
idempotencyKey: z.ZodString;
|
|
1328
|
+
}, z.core.$strict>;
|
|
1329
|
+
export type ArchiveFlowInput = z.infer<typeof ArchiveFlowInput>;
|
|
1323
1330
|
export declare const ListFlowsInput: z.ZodObject<{
|
|
1324
1331
|
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1332
|
+
includeArchived: z.ZodOptional<z.ZodBoolean>;
|
|
1325
1333
|
}, z.core.$strict>;
|
|
1326
1334
|
export type ListFlowsInput = z.infer<typeof ListFlowsInput>;
|
|
1327
1335
|
export declare const GetFlowInput: z.ZodObject<{
|
|
@@ -604,11 +604,29 @@ export const UpdateFlowInput = z
|
|
|
604
604
|
idempotencyKey: z.string().min(8).max(200),
|
|
605
605
|
})
|
|
606
606
|
.refine((input) => input.title !== undefined || input.description !== undefined || input.parentId !== undefined, { error: "At least one change is required" });
|
|
607
|
+
// Archiving a flow is the same shape as archiving a document, deliberately: `archived` is a boolean
|
|
608
|
+
// rather than a one-way verb, because an archive nothing returns from is a delete under a friendlier
|
|
609
|
+
// name. Restoring is the same call with `false`.
|
|
610
|
+
export const ArchiveFlowInput = z.strictObject({
|
|
611
|
+
flowId: IntelId,
|
|
612
|
+
baseUpdatedAt: IsoDateTime,
|
|
613
|
+
archived: z.boolean(),
|
|
614
|
+
idempotencyKey: z.string().min(8).max(200),
|
|
615
|
+
});
|
|
607
616
|
// Three answers, not two: an absent `parentId` lists every visible flow (the search dialog asks
|
|
608
617
|
// that), `null` lists the root of the shared tree and an ID lists one folder (the sidebar tree asks
|
|
609
618
|
// per level, which is what keeps the tree off the N+1 it used to load with).
|
|
610
619
|
export const ListFlowsInput = z.strictObject({
|
|
611
620
|
parentId: IntelId.nullable().optional(),
|
|
621
|
+
// The only way back to an archived flow, and the only place that asks for one: the bounded read
|
|
622
|
+
// behind the relation graph has no such flag on purpose (#30). A drawing that includes what was
|
|
623
|
+
// archived says the tidying up never happened.
|
|
624
|
+
//
|
|
625
|
+
// ⚠️ `.optional()` rather than `.default(false)`, unlike `ListKnowledgeNodesInput`. This schema is
|
|
626
|
+
// the argument type of `listFlows` on three layers, and a default makes the field required in the
|
|
627
|
+
// *parsed* type — every existing caller that lists a folder would have to spell out the answer to
|
|
628
|
+
// a question it is not asking. Absent means "without the archive" everywhere it is read.
|
|
629
|
+
includeArchived: z.boolean().optional(),
|
|
612
630
|
});
|
|
613
631
|
export const GetFlowInput = z.strictObject({ flowId: IntelId });
|
|
614
632
|
export const SaveFlowVersionInput = z.strictObject({
|