@stndrds/schema 1.0.0-alpha.96 → 1.0.0-alpha.97
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/{attributes-Btn-GLvC.d.ts → attributes-C-bhC0k5.d.ts} +5 -6
- package/dist/{attributes-CeDp1IMp.d.mts → attributes-DB76JqXm.d.mts} +5 -6
- package/dist/{index-telccAkt.d.ts → index-Bt-0XNSh.d.ts} +5 -143
- package/dist/{index-CvXnHxD2.d.mts → index-C9tOwUbK.d.mts} +5 -143
- package/dist/index.d.mts +147 -676
- package/dist/index.d.ts +147 -676
- package/dist/index.js +4 -281
- package/dist/index.mjs +5 -273
- package/dist/{types-B5Zhhoev.d.ts → types-B7nS2D1A.d.ts} +1 -1
- package/dist/{types-C6naks1H.d.mts → types-CjXbGsy8.d.mts} +1 -1
- package/dist/validation/all.d.mts +3 -3
- package/dist/validation/all.d.ts +3 -3
- package/dist/validation/complex/currency.d.mts +2 -2
- package/dist/validation/complex/currency.d.ts +2 -2
- package/dist/validation/complex/file.d.mts +2 -2
- package/dist/validation/complex/file.d.ts +2 -2
- package/dist/validation/complex/location.d.mts +2 -2
- package/dist/validation/complex/location.d.ts +2 -2
- package/dist/validation/complex/phone.d.mts +2 -2
- package/dist/validation/complex/phone.d.ts +2 -2
- package/dist/validation/complex/relation.d.mts +2 -2
- package/dist/validation/complex/relation.d.ts +2 -2
- package/dist/validation/complex/richtext.d.mts +2 -2
- package/dist/validation/complex/richtext.d.ts +2 -2
- package/dist/validation/complex/select.d.mts +2 -2
- package/dist/validation/complex/select.d.ts +2 -2
- package/dist/validation/complex/user.d.mts +2 -2
- package/dist/validation/complex/user.d.ts +2 -2
- package/dist/validation/computed/formula.d.mts +2 -2
- package/dist/validation/computed/formula.d.ts +2 -2
- package/dist/validation/computed/rollup.d.mts +2 -2
- package/dist/validation/computed/rollup.d.ts +2 -2
- package/dist/validation/config/index.d.mts +1 -1
- package/dist/validation/config/index.d.ts +1 -1
- package/dist/validation/core/index.d.mts +3 -3
- package/dist/validation/core/index.d.ts +3 -3
- package/dist/validation/object/index.d.mts +3 -3
- package/dist/validation/object/index.d.ts +3 -3
- package/dist/validation/primitives/checkbox.d.mts +2 -2
- package/dist/validation/primitives/checkbox.d.ts +2 -2
- package/dist/validation/primitives/date.d.mts +2 -2
- package/dist/validation/primitives/date.d.ts +2 -2
- package/dist/validation/primitives/number.d.mts +2 -2
- package/dist/validation/primitives/number.d.ts +2 -2
- package/dist/validation/primitives/rating.d.mts +2 -2
- package/dist/validation/primitives/rating.d.ts +2 -2
- package/dist/validation/primitives/text.d.mts +2 -2
- package/dist/validation/primitives/text.d.ts +2 -2
- package/dist/validation/validators.d.mts +3 -3
- package/dist/validation/validators.d.ts +3 -3
- package/package.json +2 -2
|
@@ -620,16 +620,15 @@ interface RollupAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "r
|
|
|
620
620
|
targetAttributeOptions?: Option[];
|
|
621
621
|
}
|
|
622
622
|
/**
|
|
623
|
-
* DocumentAttribute - References one or multiple documents
|
|
623
|
+
* DocumentAttribute - References one or multiple structured documents.
|
|
624
624
|
*
|
|
625
625
|
* Unlike FileAttribute which stores raw file references, DocumentAttribute
|
|
626
|
-
* provides structured document handling with
|
|
627
|
-
*
|
|
626
|
+
* provides structured document handling with multi-file support and
|
|
627
|
+
* optional agent-compatible processing (for example OCR).
|
|
628
628
|
*
|
|
629
|
-
* @example Single document
|
|
629
|
+
* @example Single document
|
|
630
630
|
* ```typescript
|
|
631
631
|
* document({ name: "identityDocument", label: "Pièce d'identité" })
|
|
632
|
-
* .templates(["french_id_card", "passport"])
|
|
633
632
|
* .autoProcess()
|
|
634
633
|
* .required()
|
|
635
634
|
* ```
|
|
@@ -654,7 +653,7 @@ interface DocumentAttribute extends BaseAttribute<string | string[]> {
|
|
|
654
653
|
*/
|
|
655
654
|
maxDocuments?: number;
|
|
656
655
|
/**
|
|
657
|
-
* Automatically trigger processing
|
|
656
|
+
* Automatically trigger agent-compatible processing on upload.
|
|
658
657
|
*/
|
|
659
658
|
autoProcess?: boolean;
|
|
660
659
|
}
|
|
@@ -620,16 +620,15 @@ interface RollupAttribute extends Omit<BaseAttribute<never>, "defaultValue" | "r
|
|
|
620
620
|
targetAttributeOptions?: Option[];
|
|
621
621
|
}
|
|
622
622
|
/**
|
|
623
|
-
* DocumentAttribute - References one or multiple documents
|
|
623
|
+
* DocumentAttribute - References one or multiple structured documents.
|
|
624
624
|
*
|
|
625
625
|
* Unlike FileAttribute which stores raw file references, DocumentAttribute
|
|
626
|
-
* provides structured document handling with
|
|
627
|
-
*
|
|
626
|
+
* provides structured document handling with multi-file support and
|
|
627
|
+
* optional agent-compatible processing (for example OCR).
|
|
628
628
|
*
|
|
629
|
-
* @example Single document
|
|
629
|
+
* @example Single document
|
|
630
630
|
* ```typescript
|
|
631
631
|
* document({ name: "identityDocument", label: "Pièce d'identité" })
|
|
632
|
-
* .templates(["french_id_card", "passport"])
|
|
633
632
|
* .autoProcess()
|
|
634
633
|
* .required()
|
|
635
634
|
* ```
|
|
@@ -654,7 +653,7 @@ interface DocumentAttribute extends BaseAttribute<string | string[]> {
|
|
|
654
653
|
*/
|
|
655
654
|
maxDocuments?: number;
|
|
656
655
|
/**
|
|
657
|
-
* Automatically trigger processing
|
|
656
|
+
* Automatically trigger agent-compatible processing on upload.
|
|
658
657
|
*/
|
|
659
658
|
autoProcess?: boolean;
|
|
660
659
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as Attribute, j as AttributeType, f as RollupAttribute } from './attributes-
|
|
3
|
-
import { V as ValidationMessages, a as ValidationResult } from './types-
|
|
2
|
+
import { A as Attribute, j as AttributeType, f as RollupAttribute } from './attributes-C-bhC0k5.js';
|
|
3
|
+
import { V as ValidationMessages, a as ValidationResult } from './types-B7nS2D1A.js';
|
|
4
4
|
import { IconName, ColorId } from '@stndrds/constants';
|
|
5
5
|
import { Uuid } from './utils.js';
|
|
6
6
|
|
|
@@ -741,131 +741,6 @@ interface ConditionNode extends BaseNode {
|
|
|
741
741
|
/** ID of node to execute if condition is false (optional for drafts) */
|
|
742
742
|
onFalse?: string | null;
|
|
743
743
|
}
|
|
744
|
-
/**
|
|
745
|
-
* Source for an assignment value.
|
|
746
|
-
*
|
|
747
|
-
* - `expression`: mustache template resolved at execution (text-like attrs only).
|
|
748
|
-
* Uses `{{ slotId.attribute }}` dot notation, resolved via `renderLabelExpression`.
|
|
749
|
-
* - `slot-ref`: reference to a slot's record for relation attributes.
|
|
750
|
-
* Resolved at persistence time via `$slot:slotId` placeholder.
|
|
751
|
-
* - `static`: fixed value set directly.
|
|
752
|
-
*/
|
|
753
|
-
type AssignmentSource = {
|
|
754
|
-
type: "expression";
|
|
755
|
-
template: string;
|
|
756
|
-
} | {
|
|
757
|
-
type: "slot-ref";
|
|
758
|
-
slotId: string;
|
|
759
|
-
properties?: Record<string, unknown>;
|
|
760
|
-
} | {
|
|
761
|
-
type: "static";
|
|
762
|
-
value: unknown;
|
|
763
|
-
};
|
|
764
|
-
/**
|
|
765
|
-
* Single assignment: set one attribute on the target slot.
|
|
766
|
-
*/
|
|
767
|
-
interface AssignmentMapping {
|
|
768
|
-
/** Attribute name on the target slot's object */
|
|
769
|
-
targetAttribute: string;
|
|
770
|
-
/** Source of the value */
|
|
771
|
-
source: AssignmentSource;
|
|
772
|
-
}
|
|
773
|
-
/**
|
|
774
|
-
* Assign node: set values on a target slot's record.
|
|
775
|
-
* All assignments target the same slot, selected at the node level.
|
|
776
|
-
*
|
|
777
|
-
* @example
|
|
778
|
-
* ```typescript
|
|
779
|
-
* const node: AssignNode = {
|
|
780
|
-
* type: "assign",
|
|
781
|
-
* id: "assign-client-data",
|
|
782
|
-
* label: "Set Client Data",
|
|
783
|
-
* targetSlotId: "client",
|
|
784
|
-
* assignments: [
|
|
785
|
-
* { targetAttribute: "company", source: { type: "slot-ref", slotId: "company" } },
|
|
786
|
-
* { targetAttribute: "fullName", source: { type: "expression", template: "{{ client.firstName }} {{ client.lastName }}" } },
|
|
787
|
-
* { targetAttribute: "status", source: { type: "static", value: "active" } },
|
|
788
|
-
* ],
|
|
789
|
-
* next: "end"
|
|
790
|
-
* };
|
|
791
|
-
* ```
|
|
792
|
-
*/
|
|
793
|
-
interface AssignNode extends BaseNode {
|
|
794
|
-
type: "assign";
|
|
795
|
-
label: string;
|
|
796
|
-
description?: string;
|
|
797
|
-
/** Single target slot for all assignments */
|
|
798
|
-
targetSlotId: string;
|
|
799
|
-
/** List of attribute assignments */
|
|
800
|
-
assignments: AssignmentMapping[];
|
|
801
|
-
next?: string | null;
|
|
802
|
-
}
|
|
803
|
-
/**
|
|
804
|
-
* AI node — runs an AI agent (inline or referenced from a definition).
|
|
805
|
-
*
|
|
806
|
-
* Two modes:
|
|
807
|
-
* - `sync`: runs the agent inline, workflow waits for result
|
|
808
|
-
* - `async`: enqueues a background agent run, workflow waits via event bus
|
|
809
|
-
*
|
|
810
|
-
* Two sources:
|
|
811
|
-
* - `definitionId`: load agent config from DB (existing background agent definition)
|
|
812
|
-
* - inline props: define the agent directly in the node (no DB record needed)
|
|
813
|
-
*
|
|
814
|
-
* When both `definitionId` and inline props are set, inline props override the definition.
|
|
815
|
-
*
|
|
816
|
-
* @example Inline sync agent
|
|
817
|
-
* ```typescript
|
|
818
|
-
* const node: AINode = {
|
|
819
|
-
* type: "ai",
|
|
820
|
-
* id: "generate",
|
|
821
|
-
* label: "Générer le contrat",
|
|
822
|
-
* mode: "sync",
|
|
823
|
-
* systemPrompt: "Tu es un expert en rédaction de contrats.",
|
|
824
|
-
* model: "claude-sonnet-4-6",
|
|
825
|
-
* tools: ["generate_document"],
|
|
826
|
-
* inputSlotIds: ["client"],
|
|
827
|
-
* targetSlotIds: ["client"],
|
|
828
|
-
* instructions: "Génère un contrat PDF pour ce client.",
|
|
829
|
-
* next: "end",
|
|
830
|
-
* };
|
|
831
|
-
* ```
|
|
832
|
-
*
|
|
833
|
-
* @example Referenced async agent
|
|
834
|
-
* ```typescript
|
|
835
|
-
* const node: AINode = {
|
|
836
|
-
* type: "ai",
|
|
837
|
-
* id: "enrich",
|
|
838
|
-
* label: "Enrichir le contact",
|
|
839
|
-
* mode: "async",
|
|
840
|
-
* definitionId: "my-enrichment-agent-id",
|
|
841
|
-
* inputSlotIds: ["contact"],
|
|
842
|
-
* instructions: "Enrichis le profil du contact.",
|
|
843
|
-
* next: "end",
|
|
844
|
-
* };
|
|
845
|
-
* ```
|
|
846
|
-
*/
|
|
847
|
-
interface AINode extends BaseNode {
|
|
848
|
-
type: "ai";
|
|
849
|
-
label: string;
|
|
850
|
-
description?: string;
|
|
851
|
-
/** Execution mode */
|
|
852
|
-
mode: "sync" | "async";
|
|
853
|
-
/** ID of an existing agent_definition record in DB */
|
|
854
|
-
definitionId?: string;
|
|
855
|
-
systemPrompt?: string;
|
|
856
|
-
model?: string;
|
|
857
|
-
/** Tool names to expose to the agent. Example: ["generate_document", "execute_code"] */
|
|
858
|
-
tools?: string[];
|
|
859
|
-
maxIterations?: number;
|
|
860
|
-
/** User message injected as the agent's first message */
|
|
861
|
-
instructions?: string;
|
|
862
|
-
/** Slot IDs whose data is serialized into the agent's context */
|
|
863
|
-
inputSlotIds?: string[];
|
|
864
|
-
/** Slot IDs used as targets by the generate_document tool */
|
|
865
|
-
targetSlotIds?: string[];
|
|
866
|
-
timeoutMs?: number;
|
|
867
|
-
next?: string | null;
|
|
868
|
-
}
|
|
869
744
|
/**
|
|
870
745
|
* Terminal node marking the end of a workflow path.
|
|
871
746
|
* A workflow can have multiple EndNodes for different outcomes.
|
|
@@ -901,7 +776,7 @@ interface EndNode extends BaseNode {
|
|
|
901
776
|
* Union of all workflow node types.
|
|
902
777
|
* Use discriminated union on `type` field for type narrowing.
|
|
903
778
|
*/
|
|
904
|
-
type WorkflowNode = StartNode | FormNode | ConditionNode |
|
|
779
|
+
type WorkflowNode = StartNode | FormNode | ConditionNode | EndNode;
|
|
905
780
|
/**
|
|
906
781
|
* All possible node types
|
|
907
782
|
*/
|
|
@@ -918,14 +793,6 @@ declare function isFormNode(node: WorkflowNode): node is FormNode;
|
|
|
918
793
|
* Check if a node is a ConditionNode
|
|
919
794
|
*/
|
|
920
795
|
declare function isConditionNode(node: WorkflowNode): node is ConditionNode;
|
|
921
|
-
/**
|
|
922
|
-
* Check if a node is an AssignNode
|
|
923
|
-
*/
|
|
924
|
-
declare function isAssignNode(node: WorkflowNode): node is AssignNode;
|
|
925
|
-
/**
|
|
926
|
-
* Check if a node is an AINode
|
|
927
|
-
*/
|
|
928
|
-
declare function isAINode(node: WorkflowNode): node is AINode;
|
|
929
796
|
/**
|
|
930
797
|
* Check if a node is an EndNode
|
|
931
798
|
*/
|
|
@@ -1222,18 +1089,13 @@ interface PendingAction {
|
|
|
1222
1089
|
/** ID of the node waiting for action */
|
|
1223
1090
|
nodeId: string;
|
|
1224
1091
|
/** Type of the waiting node */
|
|
1225
|
-
nodeType: "form" | "signature" | "approval"
|
|
1092
|
+
nodeType: "form" | "signature" | "approval";
|
|
1226
1093
|
/** Display label for the action */
|
|
1227
1094
|
nodeLabel: string;
|
|
1228
1095
|
/** ID of the participation required to complete this action */
|
|
1229
1096
|
requiredParticipationId?: string;
|
|
1230
1097
|
/** When the pending action expires */
|
|
1231
1098
|
expiresAt?: Date;
|
|
1232
|
-
/**
|
|
1233
|
-
* Background agent run ID — set when nodeType is "ai" and mode is "async".
|
|
1234
|
-
* Used to resume the workflow when the agent run completes.
|
|
1235
|
-
*/
|
|
1236
|
-
agentRunId?: string;
|
|
1237
1099
|
}
|
|
1238
1100
|
/**
|
|
1239
1101
|
* A specific execution of a workflow.
|
|
@@ -2184,4 +2046,4 @@ declare function isRecordComplete(objectDef: ObjectDefinition, data: Record<stri
|
|
|
2184
2046
|
*/
|
|
2185
2047
|
declare function computeRecordStatus(objectDef: ObjectDefinition, data: Record<string, unknown>): CompletionStatus;
|
|
2186
2048
|
|
|
2187
|
-
export { type ListViewConfig as $, type WorkflowExecutionContext as A, type WorkflowTransition as B, type ConfigOverrides as C, type CompletionStatus as D, type ObjectDefinition as E, type FilterState as F, type DetailViewConfig as G, type DetailViewDefinition as H, type InstanceStatus as I, type DetailViewLayout as J, type SidePanelConfig as K, type Field as L, type MigrationDefinition as M, type AttributeGroupField as N, type ObjectRecord as O, type PendingAction as P, type FieldGroup as Q, type RelationFieldConfig as R, type SortRule as S, type Timestamps as T, type RelationGroup as U, type ViewType as V, type WorkflowNode as W, type Group as X, type TableTab as Y, type CreateMode as Z, type Tab as _, createAttributeValidator as a,
|
|
2049
|
+
export { type ListViewConfig as $, type WorkflowExecutionContext as A, type WorkflowTransition as B, type ConfigOverrides as C, type CompletionStatus as D, type ObjectDefinition as E, type FilterState as F, type DetailViewConfig as G, type DetailViewDefinition as H, type InstanceStatus as I, type DetailViewLayout as J, type SidePanelConfig as K, type Field as L, type MigrationDefinition as M, type AttributeGroupField as N, type ObjectRecord as O, type PendingAction as P, type FieldGroup as Q, type RelationFieldConfig as R, type SortRule as S, type Timestamps as T, type RelationGroup as U, type ViewType as V, type WorkflowNode as W, type Group as X, type TableTab as Y, type CreateMode as Z, type Tab as _, createAttributeValidator as a, type RelationQualifierPatch as a$, type ListViewDefinition as a0, type SlotMode as a1, type FlowFieldsRow as a2, type ConditionGroup as a3, type ConditionRule as a4, type ViewDefinition as a5, type ListViewTab as a6, type ActivityTab as a7, type AdvancedFilterState as a8, type BufferedRecord as a9, type FlowRowType as aA, type FlowSlot as aB, type FlowStatus as aC, type FlowsTab as aD, type FormDensity as aE, type FormFieldRef as aF, type FormTab as aG, type GalleryViewConfig as aH, type GalleryViewDefinition as aI, type GeneratedDocument as aJ, type InverseSource as aK, type ListViewLayout as aL, type MigrationError as aM, type MigrationPreview as aN, type MultiselectFilterOperator as aO, NO_VALUE_OPERATORS as aP, type NoValueOperator as aQ, type NodePosition as aR, type NumberFilterOperator as aS, OPERATORS_BY_TYPE as aT, type ObjectAttribute as aU, type PhoneFilterValue as aV, type QueryState as aW, RESERVED_ATTRIBUTE_NAMES as aX, type RecordPatch as aY, type RelationBuffer as aZ, type RelationFilterOperator as a_, type BuiltInTransform as aa, type CalendarViewConfig as ab, type CalendarViewDefinition as ac, type CanvasViewport as ad, type CheckboxFilterOperator as ae, type ConditionNode as af, type ConditionOperator as ag, type CurrencyFilterValue as ah, type CustomTab as ai, DEFAULT_RETENTION_POLICY as aj, DEFAULT_THEME as ak, type DateFilterOperator as al, type DisplayRecord as am, type DocumentsTab as an, type EndNode as ao, type ExtendedFilterRule as ap, type FilterCombinator as aq, type FilterGroup as ar, type FilterOperator as as, type FilterRule as at, type FilterValue as au, type FlowDefinition as av, type FlowPage as aw, type FlowRelation as ax, type FlowRow as ay, type FlowRowField as az, createDraftValidator as b, isSimpleFormNode as b$, type RelationSource as b0, type RelativeDateValue as b1, type ReservedAttributeName as b2, type RetentionPolicy as b3, type RichtextTab as b4, SYSTEM_FIELD_NAMES as b5, type SchemaOperation as b6, type SchemaTransform as b7, type SelectFilterOperator as b8, type SortDirection as b9, isAdvancedFormNode as bA, isCalendarView as bB, isConditionGroup as bC, isConditionNode as bD, isConditionRule as bE, isCustomTab as bF, isDetailView as bG, isDocumentsTab as bH, isEndNode as bI, isFieldGroup as bJ, isFlowDefinition as bK, isFlowFieldsRow as bL, isFlowPublished as bM, isFlowRelationListRow as bN, isFlowsTab as bO, isFormNode as bP, isFormTab as bQ, isGalleryView as bR, isInstanceTerminal as bS, isInstanceWaiting as bT, isInverseSourceTab as bU, isLayoutRow as bV, isListView as bW, isNoValueOperator as bX, isRelationGroup as bY, isRelationSourceTab as bZ, isRichtextTab as b_, type StartNode as ba, type SystemFieldName as bb, type TabType as bc, type TableSource as bd, type TextFilterOperator as be, type ThemeColors as bf, type ThemeLogo as bg, type ThemeTypography as bh, type TimelineViewConfig as bi, type TimelineViewDefinition as bj, type TransformSource as bk, type ViewOperation as bl, type ViewOverlay as bm, type ViewTransform as bn, type WorkflowError as bo, type WorkflowInstance as bp, and as bq, canResumeInstance as br, createEmptyContext as bs, createStartTransition as bt, eq as bu, generateCssVariables as bv, getContextValue as bw, getRollupFilterOperators as bx, inValues as by, isActivityTab as bz, computeRecordStatus as c, isStartNode as c0, isSystemFlow as c1, isSystemWorkflow as c2, isTableTab as c3, isTimelineView as c4, isWorkflowDefinition as c5, isWorkflowPublished as c6, mergeWithDefaults as c7, neq as c8, or as c9, setContextValue as ca, createFormAttributeValidator as d, createObjectValidator as e, validateDraft as f, getMissingRequiredAttributes as g, validateDraftOrThrow as h, isRecordComplete as i, validateObject as j, validateObjectOrThrow as k, type FormNode as l, type WorkflowNodeType as m, type FlowHeadingRow as n, type FlowSeparatorRow as o, type FlowTextRow as p, type FlowRelationListRow as q, type WorkflowSlot as r, type WorkflowTheme as s, type RelationBufferMap as t, type ViewConfig as u, validateAttribute as v, type WorkflowStatus as w, type WorkflowLayout as x, type WorkflowConfig as y, type WorkflowDefinition as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as Attribute, j as AttributeType, f as RollupAttribute } from './attributes-
|
|
3
|
-
import { V as ValidationMessages, a as ValidationResult } from './types-
|
|
2
|
+
import { A as Attribute, j as AttributeType, f as RollupAttribute } from './attributes-DB76JqXm.mjs';
|
|
3
|
+
import { V as ValidationMessages, a as ValidationResult } from './types-CjXbGsy8.mjs';
|
|
4
4
|
import { IconName, ColorId } from '@stndrds/constants';
|
|
5
5
|
import { Uuid } from './utils.mjs';
|
|
6
6
|
|
|
@@ -741,131 +741,6 @@ interface ConditionNode extends BaseNode {
|
|
|
741
741
|
/** ID of node to execute if condition is false (optional for drafts) */
|
|
742
742
|
onFalse?: string | null;
|
|
743
743
|
}
|
|
744
|
-
/**
|
|
745
|
-
* Source for an assignment value.
|
|
746
|
-
*
|
|
747
|
-
* - `expression`: mustache template resolved at execution (text-like attrs only).
|
|
748
|
-
* Uses `{{ slotId.attribute }}` dot notation, resolved via `renderLabelExpression`.
|
|
749
|
-
* - `slot-ref`: reference to a slot's record for relation attributes.
|
|
750
|
-
* Resolved at persistence time via `$slot:slotId` placeholder.
|
|
751
|
-
* - `static`: fixed value set directly.
|
|
752
|
-
*/
|
|
753
|
-
type AssignmentSource = {
|
|
754
|
-
type: "expression";
|
|
755
|
-
template: string;
|
|
756
|
-
} | {
|
|
757
|
-
type: "slot-ref";
|
|
758
|
-
slotId: string;
|
|
759
|
-
properties?: Record<string, unknown>;
|
|
760
|
-
} | {
|
|
761
|
-
type: "static";
|
|
762
|
-
value: unknown;
|
|
763
|
-
};
|
|
764
|
-
/**
|
|
765
|
-
* Single assignment: set one attribute on the target slot.
|
|
766
|
-
*/
|
|
767
|
-
interface AssignmentMapping {
|
|
768
|
-
/** Attribute name on the target slot's object */
|
|
769
|
-
targetAttribute: string;
|
|
770
|
-
/** Source of the value */
|
|
771
|
-
source: AssignmentSource;
|
|
772
|
-
}
|
|
773
|
-
/**
|
|
774
|
-
* Assign node: set values on a target slot's record.
|
|
775
|
-
* All assignments target the same slot, selected at the node level.
|
|
776
|
-
*
|
|
777
|
-
* @example
|
|
778
|
-
* ```typescript
|
|
779
|
-
* const node: AssignNode = {
|
|
780
|
-
* type: "assign",
|
|
781
|
-
* id: "assign-client-data",
|
|
782
|
-
* label: "Set Client Data",
|
|
783
|
-
* targetSlotId: "client",
|
|
784
|
-
* assignments: [
|
|
785
|
-
* { targetAttribute: "company", source: { type: "slot-ref", slotId: "company" } },
|
|
786
|
-
* { targetAttribute: "fullName", source: { type: "expression", template: "{{ client.firstName }} {{ client.lastName }}" } },
|
|
787
|
-
* { targetAttribute: "status", source: { type: "static", value: "active" } },
|
|
788
|
-
* ],
|
|
789
|
-
* next: "end"
|
|
790
|
-
* };
|
|
791
|
-
* ```
|
|
792
|
-
*/
|
|
793
|
-
interface AssignNode extends BaseNode {
|
|
794
|
-
type: "assign";
|
|
795
|
-
label: string;
|
|
796
|
-
description?: string;
|
|
797
|
-
/** Single target slot for all assignments */
|
|
798
|
-
targetSlotId: string;
|
|
799
|
-
/** List of attribute assignments */
|
|
800
|
-
assignments: AssignmentMapping[];
|
|
801
|
-
next?: string | null;
|
|
802
|
-
}
|
|
803
|
-
/**
|
|
804
|
-
* AI node — runs an AI agent (inline or referenced from a definition).
|
|
805
|
-
*
|
|
806
|
-
* Two modes:
|
|
807
|
-
* - `sync`: runs the agent inline, workflow waits for result
|
|
808
|
-
* - `async`: enqueues a background agent run, workflow waits via event bus
|
|
809
|
-
*
|
|
810
|
-
* Two sources:
|
|
811
|
-
* - `definitionId`: load agent config from DB (existing background agent definition)
|
|
812
|
-
* - inline props: define the agent directly in the node (no DB record needed)
|
|
813
|
-
*
|
|
814
|
-
* When both `definitionId` and inline props are set, inline props override the definition.
|
|
815
|
-
*
|
|
816
|
-
* @example Inline sync agent
|
|
817
|
-
* ```typescript
|
|
818
|
-
* const node: AINode = {
|
|
819
|
-
* type: "ai",
|
|
820
|
-
* id: "generate",
|
|
821
|
-
* label: "Générer le contrat",
|
|
822
|
-
* mode: "sync",
|
|
823
|
-
* systemPrompt: "Tu es un expert en rédaction de contrats.",
|
|
824
|
-
* model: "claude-sonnet-4-6",
|
|
825
|
-
* tools: ["generate_document"],
|
|
826
|
-
* inputSlotIds: ["client"],
|
|
827
|
-
* targetSlotIds: ["client"],
|
|
828
|
-
* instructions: "Génère un contrat PDF pour ce client.",
|
|
829
|
-
* next: "end",
|
|
830
|
-
* };
|
|
831
|
-
* ```
|
|
832
|
-
*
|
|
833
|
-
* @example Referenced async agent
|
|
834
|
-
* ```typescript
|
|
835
|
-
* const node: AINode = {
|
|
836
|
-
* type: "ai",
|
|
837
|
-
* id: "enrich",
|
|
838
|
-
* label: "Enrichir le contact",
|
|
839
|
-
* mode: "async",
|
|
840
|
-
* definitionId: "my-enrichment-agent-id",
|
|
841
|
-
* inputSlotIds: ["contact"],
|
|
842
|
-
* instructions: "Enrichis le profil du contact.",
|
|
843
|
-
* next: "end",
|
|
844
|
-
* };
|
|
845
|
-
* ```
|
|
846
|
-
*/
|
|
847
|
-
interface AINode extends BaseNode {
|
|
848
|
-
type: "ai";
|
|
849
|
-
label: string;
|
|
850
|
-
description?: string;
|
|
851
|
-
/** Execution mode */
|
|
852
|
-
mode: "sync" | "async";
|
|
853
|
-
/** ID of an existing agent_definition record in DB */
|
|
854
|
-
definitionId?: string;
|
|
855
|
-
systemPrompt?: string;
|
|
856
|
-
model?: string;
|
|
857
|
-
/** Tool names to expose to the agent. Example: ["generate_document", "execute_code"] */
|
|
858
|
-
tools?: string[];
|
|
859
|
-
maxIterations?: number;
|
|
860
|
-
/** User message injected as the agent's first message */
|
|
861
|
-
instructions?: string;
|
|
862
|
-
/** Slot IDs whose data is serialized into the agent's context */
|
|
863
|
-
inputSlotIds?: string[];
|
|
864
|
-
/** Slot IDs used as targets by the generate_document tool */
|
|
865
|
-
targetSlotIds?: string[];
|
|
866
|
-
timeoutMs?: number;
|
|
867
|
-
next?: string | null;
|
|
868
|
-
}
|
|
869
744
|
/**
|
|
870
745
|
* Terminal node marking the end of a workflow path.
|
|
871
746
|
* A workflow can have multiple EndNodes for different outcomes.
|
|
@@ -901,7 +776,7 @@ interface EndNode extends BaseNode {
|
|
|
901
776
|
* Union of all workflow node types.
|
|
902
777
|
* Use discriminated union on `type` field for type narrowing.
|
|
903
778
|
*/
|
|
904
|
-
type WorkflowNode = StartNode | FormNode | ConditionNode |
|
|
779
|
+
type WorkflowNode = StartNode | FormNode | ConditionNode | EndNode;
|
|
905
780
|
/**
|
|
906
781
|
* All possible node types
|
|
907
782
|
*/
|
|
@@ -918,14 +793,6 @@ declare function isFormNode(node: WorkflowNode): node is FormNode;
|
|
|
918
793
|
* Check if a node is a ConditionNode
|
|
919
794
|
*/
|
|
920
795
|
declare function isConditionNode(node: WorkflowNode): node is ConditionNode;
|
|
921
|
-
/**
|
|
922
|
-
* Check if a node is an AssignNode
|
|
923
|
-
*/
|
|
924
|
-
declare function isAssignNode(node: WorkflowNode): node is AssignNode;
|
|
925
|
-
/**
|
|
926
|
-
* Check if a node is an AINode
|
|
927
|
-
*/
|
|
928
|
-
declare function isAINode(node: WorkflowNode): node is AINode;
|
|
929
796
|
/**
|
|
930
797
|
* Check if a node is an EndNode
|
|
931
798
|
*/
|
|
@@ -1222,18 +1089,13 @@ interface PendingAction {
|
|
|
1222
1089
|
/** ID of the node waiting for action */
|
|
1223
1090
|
nodeId: string;
|
|
1224
1091
|
/** Type of the waiting node */
|
|
1225
|
-
nodeType: "form" | "signature" | "approval"
|
|
1092
|
+
nodeType: "form" | "signature" | "approval";
|
|
1226
1093
|
/** Display label for the action */
|
|
1227
1094
|
nodeLabel: string;
|
|
1228
1095
|
/** ID of the participation required to complete this action */
|
|
1229
1096
|
requiredParticipationId?: string;
|
|
1230
1097
|
/** When the pending action expires */
|
|
1231
1098
|
expiresAt?: Date;
|
|
1232
|
-
/**
|
|
1233
|
-
* Background agent run ID — set when nodeType is "ai" and mode is "async".
|
|
1234
|
-
* Used to resume the workflow when the agent run completes.
|
|
1235
|
-
*/
|
|
1236
|
-
agentRunId?: string;
|
|
1237
1099
|
}
|
|
1238
1100
|
/**
|
|
1239
1101
|
* A specific execution of a workflow.
|
|
@@ -2184,4 +2046,4 @@ declare function isRecordComplete(objectDef: ObjectDefinition, data: Record<stri
|
|
|
2184
2046
|
*/
|
|
2185
2047
|
declare function computeRecordStatus(objectDef: ObjectDefinition, data: Record<string, unknown>): CompletionStatus;
|
|
2186
2048
|
|
|
2187
|
-
export { type ListViewConfig as $, type WorkflowExecutionContext as A, type WorkflowTransition as B, type ConfigOverrides as C, type CompletionStatus as D, type ObjectDefinition as E, type FilterState as F, type DetailViewConfig as G, type DetailViewDefinition as H, type InstanceStatus as I, type DetailViewLayout as J, type SidePanelConfig as K, type Field as L, type MigrationDefinition as M, type AttributeGroupField as N, type ObjectRecord as O, type PendingAction as P, type FieldGroup as Q, type RelationFieldConfig as R, type SortRule as S, type Timestamps as T, type RelationGroup as U, type ViewType as V, type WorkflowNode as W, type Group as X, type TableTab as Y, type CreateMode as Z, type Tab as _, createAttributeValidator as a,
|
|
2049
|
+
export { type ListViewConfig as $, type WorkflowExecutionContext as A, type WorkflowTransition as B, type ConfigOverrides as C, type CompletionStatus as D, type ObjectDefinition as E, type FilterState as F, type DetailViewConfig as G, type DetailViewDefinition as H, type InstanceStatus as I, type DetailViewLayout as J, type SidePanelConfig as K, type Field as L, type MigrationDefinition as M, type AttributeGroupField as N, type ObjectRecord as O, type PendingAction as P, type FieldGroup as Q, type RelationFieldConfig as R, type SortRule as S, type Timestamps as T, type RelationGroup as U, type ViewType as V, type WorkflowNode as W, type Group as X, type TableTab as Y, type CreateMode as Z, type Tab as _, createAttributeValidator as a, type RelationQualifierPatch as a$, type ListViewDefinition as a0, type SlotMode as a1, type FlowFieldsRow as a2, type ConditionGroup as a3, type ConditionRule as a4, type ViewDefinition as a5, type ListViewTab as a6, type ActivityTab as a7, type AdvancedFilterState as a8, type BufferedRecord as a9, type FlowRowType as aA, type FlowSlot as aB, type FlowStatus as aC, type FlowsTab as aD, type FormDensity as aE, type FormFieldRef as aF, type FormTab as aG, type GalleryViewConfig as aH, type GalleryViewDefinition as aI, type GeneratedDocument as aJ, type InverseSource as aK, type ListViewLayout as aL, type MigrationError as aM, type MigrationPreview as aN, type MultiselectFilterOperator as aO, NO_VALUE_OPERATORS as aP, type NoValueOperator as aQ, type NodePosition as aR, type NumberFilterOperator as aS, OPERATORS_BY_TYPE as aT, type ObjectAttribute as aU, type PhoneFilterValue as aV, type QueryState as aW, RESERVED_ATTRIBUTE_NAMES as aX, type RecordPatch as aY, type RelationBuffer as aZ, type RelationFilterOperator as a_, type BuiltInTransform as aa, type CalendarViewConfig as ab, type CalendarViewDefinition as ac, type CanvasViewport as ad, type CheckboxFilterOperator as ae, type ConditionNode as af, type ConditionOperator as ag, type CurrencyFilterValue as ah, type CustomTab as ai, DEFAULT_RETENTION_POLICY as aj, DEFAULT_THEME as ak, type DateFilterOperator as al, type DisplayRecord as am, type DocumentsTab as an, type EndNode as ao, type ExtendedFilterRule as ap, type FilterCombinator as aq, type FilterGroup as ar, type FilterOperator as as, type FilterRule as at, type FilterValue as au, type FlowDefinition as av, type FlowPage as aw, type FlowRelation as ax, type FlowRow as ay, type FlowRowField as az, createDraftValidator as b, isSimpleFormNode as b$, type RelationSource as b0, type RelativeDateValue as b1, type ReservedAttributeName as b2, type RetentionPolicy as b3, type RichtextTab as b4, SYSTEM_FIELD_NAMES as b5, type SchemaOperation as b6, type SchemaTransform as b7, type SelectFilterOperator as b8, type SortDirection as b9, isAdvancedFormNode as bA, isCalendarView as bB, isConditionGroup as bC, isConditionNode as bD, isConditionRule as bE, isCustomTab as bF, isDetailView as bG, isDocumentsTab as bH, isEndNode as bI, isFieldGroup as bJ, isFlowDefinition as bK, isFlowFieldsRow as bL, isFlowPublished as bM, isFlowRelationListRow as bN, isFlowsTab as bO, isFormNode as bP, isFormTab as bQ, isGalleryView as bR, isInstanceTerminal as bS, isInstanceWaiting as bT, isInverseSourceTab as bU, isLayoutRow as bV, isListView as bW, isNoValueOperator as bX, isRelationGroup as bY, isRelationSourceTab as bZ, isRichtextTab as b_, type StartNode as ba, type SystemFieldName as bb, type TabType as bc, type TableSource as bd, type TextFilterOperator as be, type ThemeColors as bf, type ThemeLogo as bg, type ThemeTypography as bh, type TimelineViewConfig as bi, type TimelineViewDefinition as bj, type TransformSource as bk, type ViewOperation as bl, type ViewOverlay as bm, type ViewTransform as bn, type WorkflowError as bo, type WorkflowInstance as bp, and as bq, canResumeInstance as br, createEmptyContext as bs, createStartTransition as bt, eq as bu, generateCssVariables as bv, getContextValue as bw, getRollupFilterOperators as bx, inValues as by, isActivityTab as bz, computeRecordStatus as c, isStartNode as c0, isSystemFlow as c1, isSystemWorkflow as c2, isTableTab as c3, isTimelineView as c4, isWorkflowDefinition as c5, isWorkflowPublished as c6, mergeWithDefaults as c7, neq as c8, or as c9, setContextValue as ca, createFormAttributeValidator as d, createObjectValidator as e, validateDraft as f, getMissingRequiredAttributes as g, validateDraftOrThrow as h, isRecordComplete as i, validateObject as j, validateObjectOrThrow as k, type FormNode as l, type WorkflowNodeType as m, type FlowHeadingRow as n, type FlowSeparatorRow as o, type FlowTextRow as p, type FlowRelationListRow as q, type WorkflowSlot as r, type WorkflowTheme as s, type RelationBufferMap as t, type ViewConfig as u, validateAttribute as v, type WorkflowStatus as w, type WorkflowLayout as x, type WorkflowConfig as y, type WorkflowDefinition as z };
|