@stndrds/schema 0.1.0-alpha.37 → 0.1.0-alpha.39

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/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { D as DateAttribute, U as UserAttribute, A as Attribute, S as SystemResource, a as SystemAction, O as ObjectAction, T as TextAttribute, b as TextAreaAttribute, R as RichtextAttribute, c as RichtextFeature, N as NumberAttribute, C as CheckboxAttribute, P as PhoneAttribute, d as CurrencyAttribute, e as Option, f as StatusAttribute, g as SelectAttribute, M as MultiselectAttribute, L as LocationAttribute, F as FileAttribute, h as SingleRelationAttribute, i as MultiRelationAttribute, j as RelationTarget, k as RatingAttribute, l as FormulaAttribute, m as FormulaReturnType, n as RollupAttribute, o as RollupFunction, p as AttributeType, q as FlowDefinition, r as FlowPage, s as FlowRow, I as InferAttributeValue, t as ObjectDefinition, u as Field, v as AttributeGroupField, G as Group, w as TableTab, V as ViewLayout, x as InverseTableTab, y as ViewDefinition, z as Tab, B as FilterState, E as SortRule, H as DirectTableTab, J as BlockNoteContent } from './runtime-Hwgvv9Bn.js';
2
- export { bZ as ActivityTab, bf as AddAttribute, eD as AddAttributeInput, aP as AdvancedFilterState, bM as AssignRoleInput, e7 as AttributeChange, Q as AttributeGroup, be as AttributeMap, ba as AttributeSchema, ej as AttributesRepository, an as AuditAction, ao as AuditActorType, ap as AuditChange, as as AuditListOptions, aq as AuditLogEntry, ep as AuditRepository, am as AuditResourceType, es as AuditService, at as AuditServiceOptions, W as BaseAttribute, a5 as BlockNoteBlock, a6 as BlockNoteCustomInlineContent, a7 as BlockNoteDefaultProps, a8 as BlockNoteInlineContent, a9 as BlockNoteLink, aa as BlockNoteStyledText, ab as BlockNoteStyles, ac as BlockNoteTableCell, ad as BlockNoteTableCellProps, ae as BlockNoteTableContent, da as CacheAdapter, db as CacheOptions, aB as CheckboxFilterOperator, bA as CompletionStatus, ar as CreateAuditLogInput, eC as CreateCustomObjectInput, ft as CreateDBAttribute, fH as CreateDBFlow, fp as CreateDBObject, fD as CreateDBView, ax as CreateFile, ex as CreateFlowInput, fw as CreateObjectRecord, bL as CreatePermissionInput, bJ as CreateRoleInput, bT as CreateUserProfile, f2 as CreateViewInput, $ as Currency, aI as CurrencyFilterValue, bj as CustomAttributeValue, bY as CustomTab, fs as DBAttribute, fG as DBFlow, fo as DBObject, fC as DBView, fj as DEFAULT_LABEL_FALLBACK, cg as DEFAULT_VALIDATION_MESSAGES, d9 as DatabaseAdapter, aC as DateFilterOperator, Y as DateFormat, Z as DateValue, bG as EffectivePermissions, aM as ExtendedFilterRule, bt as ExtractAttributes, bn as ExtractRecord, bp as ExtractRecordInput, bq as ExtractRecordInputStrict, bo as ExtractRecordStrict, br as ExtractRecordUpdate, bs as ExtractRecordUpdateStrict, df as FetchResult, aw as File, f5 as FileContent, fB as FileListOptions, ew as FileService, ev as FileServiceOptions, av as FileVisibility, el as FilesRepository, aN as FilterCombinator, aO as FilterGroup, aG as FilterOperator, aL as FilterRule, aK as FilterValue, a$ as FlowRelation, a_ as FlowRowField, ez as FlowService, aZ as FlowSlot, b0 as FlowStatus, eo as FlowsRepository, bX as FormTab, dg as FormattedRecord, dR as FormulaResult, fh as FullSyncOptions, fg as FullSyncResult, b8 as GeocodingAdapter, b5 as GeocodingAutocompleteParams, b7 as GeocodingParams, eA as GeocodingService, b4 as GeocodingSuggestion, eP as GetRelationOptionsParams, fz as GlobalSearchOptions, fA as GlobalSearchResultItem, eB as GlobalSearchService, dh as GroupedFetchResult, e8 as HookContext, e9 as HookDefinition, ea as HookHandler, ed as HookRegistry, eb as HookType, bg as InferRecord, bb as InferRecordFromSchema, bh as InferRecordInput, bi as InferRecordUpdate, bc as InferRecordWithRequirements, di as InsertOptions, dV as InvalidPathError, bV as InviteUserInput, fx as ListOptions, a0 as Location, a1 as LocationGranularity, dW as MaxDepthExceededError, aE as MultiselectFilterOperator, aX as NO_VALUE_OPERATORS, aW as NoValueOperator, de as NoopCacheAdapter, b9 as NoopGeocodingAdapter, ec as NoopHookRegistry, b_ as NotesTab, aA as NumberFilterOperator, X as NumberUnit, aV as OPERATORS_BY_TYPE, bz as ObjectAttribute, bH as ObjectPermissions, bB as ObjectRecord, em as ObjectRecordsRepository, eG as ObjectSchemaService, eF as ObjectSchemaServiceOptions, ei as ObjectsRepository, fJ as OperationResult, af as PartialBlockNoteBlock, ag as PartialBlockNoteContent, ah as PartialBlockNoteInlineContent, ai as PartialBlockNoteLink, aj as PartialBlockNoteStyledText, ak as PartialBlockNoteTableCell, al as PartialBlockNoteTableContent, d_ as PathCardinality, d$ as PathSegment, e0 as PathSegmentType, bE as Permission, bC as PermissionScope, eI as PermissionService, eH as PermissionServiceOptions, eq as PermissionsRepository, _ as Phone, aJ as PhoneFilterValue, bN as PolicyContext, eg as PolicyRegistry, bP as PolicyViolationError, dv as QueryBuilder, dw as QueryBuilderOptions, dj as QueryBuilderState, dr as QueryMultipleResultsError, ds as QueryNoResultError, aU as QueryState, a2 as RELATION_TARGET_ANY, bu as RESERVED_ATTRIBUTE_NAMES, bl as RecordMetadata, bO as RecordPolicy, eK as RecordService, eJ as RecordServiceOptions, dk as RegistryMap, dl as RegistryObjectNames, a3 as RelationAttribute, aF as RelationFilterOperator, eN as RelationOption, eO as RelationOptionsResponse, eT as RelationResolverService, eR as RelationService, eQ as RelationServiceOptions, eM as RelationValidationError, eL as RelationValidationResult, aH as RelativeDateValue, bw as ReservedAttributeName, eS as ResolvedRelations, b6 as ReverseGeocodingParams, bD as Role, eU as RollupResult, eY as RollupScheduler, eX as RollupSchedulerOptions, eW as RollupService, eV as RollupServiceOptions, dt as SHORTCUT_TO_FILTER_OPERATOR, bv as SYSTEM_FIELD_NAMES, e1 as SchemaResolver, fy as SearchOptions, aD as SelectFilterOperator, dm as ShortcutOperator, f8 as SignedUrlOptions, aT as SortDirection, K as StatusGroup, f9 as StorageAdapter, au as StorageProvider, f6 as StorageUploadInput, f7 as StorageUploadResult, fc as SyncOptions, fb as SyncResult, bx as SystemFieldName, bm as SystemFields, bI as SystemPermissions, bW as TabType, eu as TenantAwareRepository, et as TenantAwareService, dE as TenantContext, dx as TenantContextError, c7 as TenantId, az as TextFilterOperator, by as Timestamps, e5 as TraversalOptions, e6 as TraversalResult, bd as TypedAttribute, fu as UpdateDBAttribute, fI as UpdateDBFlow, fq as UpdateDBObject, fE as UpdateDBView, ay as UpdateFile, ey as UpdateFlowInput, eE as UpdateObjectInput, bK as UpdateRoleInput, bU as UpdateUserProfile, f3 as UpdateViewInput, fa as UploadFileInput, fv as UpsertDBAttribute, fr as UpsertDBObject, fF as UpsertDBView, c8 as UserId, bS as UserProfile, e_ as UserProfileService, eZ as UserProfileServiceOptions, ek as UserProfilesRepository, bQ as UserRole, bF as UserRoleAssignment, f1 as UserService, bR as UserStatus, f0 as UserValidationError, e$ as UserValidationResult, c6 as Uuid, cf as ValidationMessages, c$ as ValidationResult, f4 as ViewService, fL as ViewSyncOptions, fK as ViewSyncResult, en as ViewsRepository, bk as WithCustomAttributes, c9 as asTenantId, ca as asUserId, cz as attributeConfigSchemas, er as buildAuditChanges, dc as cacheKeys, dd as cacheTtl, cl as checkboxConfigSchema, d8 as computeRecordStatus, cY as createAttributeValidator, cG as createCheckboxValidator, cJ as createCurrencyValidator, cH as createDateValidator, dn as createDefaultState, d3 as createDraftValidator, cO as createFileValidator, cZ as createFormAttributeValidator, cU as createFormulaValidator, cN as createLocationValidator, ee as createMockAdapter, cR as createMultiRelationValidator, cM as createMultiselectValidator, cF as createNumberValidator, c_ as createObjectValidator, cI as createPhoneValidator, du as createQueryBuilder, cT as createRatingValidator, cS as createRelationValidator, cX as createRichtextValidator, cV as createRollupValidator, cL as createSelectValidator, cQ as createSingleRelationValidator, cK as createStatusValidator, cW as createTextAreaValidator, cE as createTextValidator, cP as createUserValidator, co as currencyConfigSchema, cm as dateConfigSchema, ef as defaultPolicyRegistry, fn as enrichValuesWithSelectLabels, dF as evaluateFormula, dG as evaluateFormulaAttribute, dH as evaluateFormulaAttributeWithRelations, dI as evaluateFormulaWithRelations, dJ as evaluateFormulaWithResult, fm as extractAttributeNames, dK as extractFormulaVariables, dL as extractRelationNames, dM as extractRelationReferences, ct as fileConfigSchema, dN as flattenRelationsForEval, dO as formatFormulaResult, dp as formatRecord, dq as formatRecords, cx as formulaConfigSchema, cb as generateId, cc as generatePrefixedId, cA as getAttributeConfigSchema, dy as getContext, d6 as getMissingRequiredAttributes, dS as getPathDepth, dT as getRelationPath, ff as getSyncPreview, dU as getTargetAttributeName, dz as getTenantId, dA as getUserId, fO as getViewSyncPreview, dB as hasContext, dP as hasRelationReferences, c4 as isActivityTab, aQ as isAdvancedFilterState, c3 as isCustomTab, c1 as isDirectTableTab, b1 as isFlowDefinition, b2 as isFlowPublished, b$ as isFormTab, c2 as isInverseTableTab, fl as isLabelExpression, aY as isNoValueOperator, c5 as isNotesTab, d7 as isRecordComplete, b3 as isSystemFlow, c0 as isTableTab, a4 as isUniversalRelation, cq as locationConfigSchema, cs as multiselectConfigSchema, eh as notesPolicy, ck as numberConfigSchema, cC as parseAttributeConfig, dX as parsePath, dY as pathHasManyCardinality, cn as phoneConfigSchema, cw as ratingConfigSchema, cd as registry, cv as relationConfigSchema, fk as renderLabelExpression, e2 as resolveMultiplePaths, e3 as resolveSingleValue, cj as richtextConfigSchema, cy as rollupConfigSchema, dC as runWithContext, cD as safeParseAttributeConfig, cr as selectConfigSchema, cp as statusConfigSchema, fi as syncAll, fd as syncNativeObjects, fM as syncNativeViews, ch as textConfigSchema, ci as textareaConfigSchema, aR as toAdvancedFilterState, aS as toSimpleFilterState, e4 as traversePath, cu as userConfigSchema, d0 as validateAttribute, cB as validateAttributeConfig, d4 as validateDraft, d5 as validateDraftOrThrow, dQ as validateFormulaExpression, d1 as validateObject, d2 as validateObjectOrThrow, dZ as validatePath, fe as verifyNativeObjectsSync, fN as verifyNativeViewsSync, ce as viewRegistry, dD as withTenantContext } from './runtime-Hwgvv9Bn.js';
1
+ import { D as DateAttribute, U as UserAttribute, A as Attribute, S as SystemResource, a as SystemAction, O as ObjectAction, T as TextAttribute, b as TextAreaAttribute, R as RichtextAttribute, c as RichtextFeature, N as NumberAttribute, C as CheckboxAttribute, P as PhoneAttribute, d as CurrencyAttribute, e as Option, f as StatusAttribute, g as SelectAttribute, M as MultiselectAttribute, L as LocationAttribute, F as FileAttribute, h as SingleRelationAttribute, i as MultiRelationAttribute, j as RelationTarget, k as RatingAttribute, l as FormulaAttribute, m as FormulaReturnType, n as RollupAttribute, o as RollupFunction, p as AttributeType, I as InferAttributeValue, q as ObjectDefinition, r as Field, s as AttributeGroupField, G as Group, t as TableTab, V as ViewLayout, u as InverseTableTab, v as ViewDefinition, w as InstanceStatus, x as Tab, y as FilterState, z as SortRule, B as DirectTableTab, W as WorkflowTheme, E as WorkflowConfig, H as SlotMode, J as AuthMethod, K as AuthChannel, Q as ParticipantTemplate, X as ConditionGroup, Y as ConditionRule, Z as WorkflowNode, _ as WorkflowDefinition, $ as FlowRow, a0 as BlockNoteContent } from './runtime-B3RCubTj.js';
2
+ export { c8 as ActivityTab, bq as AddAttribute, gp as AddAttributeInput, aY as AdvancedFilterState, bX as AssignRoleInput, fW as AttributeChange, a2 as AttributeGroup, bp as AttributeMap, bl as AttributeSchema, g6 as AttributesRepository, aw as AuditAction, ax as AuditActorType, ay as AuditChange, aB as AuditListOptions, az as AuditLogEntry, ge as AuditRepository, av as AuditResourceType, gh as AuditService, aC as AuditServiceOptions, gZ as AuthenticationResult, a3 as BaseAttribute, ae as BlockNoteBlock, af as BlockNoteCustomInlineContent, ag as BlockNoteDefaultProps, ah as BlockNoteInlineContent, ai as BlockNoteLink, aj as BlockNoteStyledText, ak as BlockNoteStyles, al as BlockNoteTableCell, am as BlockNoteTableCellProps, an as BlockNoteTableContent, eD as CacheAdapter, eE as CacheOptions, cI as CanvasViewport, aK as CheckboxFilterOperator, bL as CompletionStatus, fo as ConditionExecutor, cm as ConditionNode, cw as ConditionOperator, aA as CreateAuditLogInput, go as CreateCustomObjectInput, hv as CreateDBAttribute, hr as CreateDBObject, hF as CreateDBView, hJ as CreateDBWorkflow, hM as CreateDBWorkflowInstance, hP as CreateDBWorkflowParticipation, aG as CreateFile, hy as CreateObjectRecord, gX as CreateParticipationInput, gY as CreateParticipationResult, bW as CreatePermissionInput, bU as CreateRoleInput, c2 as CreateUserProfile, gQ as CreateViewInput, h1 as CreateWorkflowInput, a8 as Currency, aR as CurrencyFilterValue, bu as CustomAttributeValue, c7 as CustomTab, hu as DBAttribute, hq as DBObject, hE as DBView, hI as DBWorkflow, hL as DBWorkflowInstance, hO as DBWorkflowParticipation, hi as DEFAULT_LABEL_FALLBACK, dk as DEFAULT_THEME, dy as DEFAULT_VALIDATION_MESSAGES, er as DatabaseAdapter, aL as DateFilterOperator, a5 as DateFormat, a6 as DateValue, bR as EffectivePermissions, fp as EndExecutor, cn as EndNode, eZ as EvaluationResult, e_ as EvaluationTrace, fc as ExecutorCompleteResult, fd as ExecutorContext, fe as ExecutorErrorResult, fl as ExecutorRegistry, ff as ExecutorResult, fg as ExecutorSuccessResult, fh as ExecutorWaitResult, aV as ExtendedFilterRule, bE as ExtractAttributes, by as ExtractRecord, bA as ExtractRecordInput, bB as ExtractRecordInputStrict, bz as ExtractRecordStrict, bC as ExtractRecordUpdate, bD as ExtractRecordUpdateStrict, eI as FetchResult, g$ as FieldReadOnlyResult, aF as File, h4 as FileContent, hD as FileListOptions, gl as FileService, gk as FileServiceOptions, aE as FileVisibility, g8 as FilesRepository, aW as FilterCombinator, aX as FilterGroup, aP as FilterOperator, aU as FilterRule, aT as FilterValue, bb as FlowDefinition, b8 as FlowPage, b9 as FlowRelation, b7 as FlowRowField, b6 as FlowSlot, ba as FlowStatus, ca as FlowsTab, dg as FormContextResponse, fq as FormExecutor, dd as FormFieldContext, cl as FormFieldRef, de as FormFieldRow, ck as FormNode, df as FormNodeInfo, c6 as FormTab, eJ as FormattedRecord, fE as FormulaResult, hg as FullSyncOptions, hf as FullSyncResult, d5 as GeneratedDocument, bj as GeocodingAdapter, bg as GeocodingAutocompleteParams, bi as GeocodingParams, gm as GeocodingService, bf as GeocodingSuggestion, gD as GetRelationOptionsParams, hB as GlobalSearchOptions, hC as GlobalSearchResultItem, gn as GlobalSearchService, eK as GroupedFetchResult, fX as HookContext, fY as HookDefinition, fZ as HookHandler, g0 as HookRegistry, f_ as HookType, br as InferRecord, bm as InferRecordFromSchema, bs as InferRecordInput, bt as InferRecordUpdate, bn as InferRecordWithRequirements, eL as InsertOptions, fI as InvalidPathError, c4 as InviteUserInput, hz as ListOptions, a9 as Location, aa as LocationGranularity, fJ as MaxDepthExceededError, aN as MultiselectFilterOperator, b4 as NO_VALUE_OPERATORS, b3 as NoValueOperator, fi as NodeExecutor, cH as NodePosition, eH as NoopCacheAdapter, bk as NoopGeocodingAdapter, f$ as NoopHookRegistry, c9 as NotesTab, aJ as NumberFilterOperator, a4 as NumberUnit, b2 as OPERATORS_BY_TYPE, bK as ObjectAttribute, bS as ObjectPermissions, bM as ObjectRecord, g9 as ObjectRecordsRepository, gs as ObjectSchemaService, gr as ObjectSchemaServiceOptions, g5 as ObjectsRepository, hR as OperationResult, ao as PartialBlockNoteBlock, ap as PartialBlockNoteContent, aq as PartialBlockNoteInlineContent, ar as PartialBlockNoteLink, as as PartialBlockNoteStyledText, at as PartialBlockNoteTableCell, au as PartialBlockNoteTableContent, cK as ParticipantAuthConfig, c_ as ParticipationAuth, cX as ParticipationStatus, ev as ParticipationTokenPayload, es as ParticipationTokenService, fN as PathCardinality, fO as PathSegment, fP as PathSegmentType, cR as PendingAction, bP as Permission, bN as PermissionScope, gu as PermissionService, gt as PermissionServiceOptions, gf as PermissionsRepository, a7 as Phone, aS as PhoneFilterValue, cZ as PinCodeAuth, eB as PinCodeGenerationOptions, ey as PinCodeService, eC as PinCodeVerificationResult, bY as PolicyContext, g3 as PolicyRegistry, b_ as PolicyViolationError, eX as QueryBuilder, eY as QueryBuilderOptions, eM as QueryBuilderState, eT as QueryMultipleResultsError, eU as QueryNoResultError, b1 as QueryState, ab as RELATION_TARGET_ANY, bF as RESERVED_ATTRIBUTE_NAMES, dc as ReadOnlyReason, bw as RecordMetadata, bZ as RecordPolicy, gw as RecordService, gv as RecordServiceOptions, eN as RegistryMap, eO as RegistryObjectNames, ac as RelationAttribute, aO as RelationFilterOperator, ho as RelationLabelResolver, gB as RelationOption, gC as RelationOptionsResponse, gy as RelationResolverService, gF as RelationService, gE as RelationServiceOptions, gA as RelationValidationError, gz as RelationValidationResult, aQ as RelativeDateValue, bH as ReservedAttributeName, gx as ResolvedRelations, gU as ResumeWorkflowInput, bh as ReverseGeocodingParams, bO as Role, gI as RollupResult, gH as RollupScheduler, gG as RollupSchedulerOptions, gK as RollupService, gJ as RollupServiceOptions, eV as SHORTCUT_TO_FILTER_OPERATOR, bG as SYSTEM_FIELD_NAMES, fQ as SchemaResolver, hA as SearchOptions, aM as SelectFilterOperator, eP as ShortcutOperator, cY as SignedLinkAuth, h7 as SignedUrlOptions, b0 as SortDirection, fr as StartExecutor, cj as StartNode, gT as StartWorkflowInput, a1 as StatusGroup, h8 as StorageAdapter, aD as StorageProvider, h5 as StorageUploadInput, h6 as StorageUploadResult, hb as SyncOptions, ha as SyncResult, bI as SystemFieldName, bx as SystemFields, bT as SystemPermissions, c5 as TabType, gj as TenantAwareRepository, gi as TenantAwareService, f9 as TenantContext, f2 as TenantContextError, dp as TenantId, aI as TextFilterOperator, di as ThemeColors, dh as ThemeLogo, dj as ThemeTypography, bJ as Timestamps, ew as TokenGenerationOptions, ex as TokenVerificationResult, fU as TraversalOptions, fV as TraversalResult, bo as TypedAttribute, hw as UpdateDBAttribute, hs as UpdateDBObject, hG as UpdateDBView, hK as UpdateDBWorkflow, hN as UpdateDBWorkflowInstance, hQ as UpdateDBWorkflowParticipation, aH as UpdateFile, gq as UpdateObjectInput, bV as UpdateRoleInput, c3 as UpdateUserProfile, gR as UpdateViewInput, h2 as UpdateWorkflowInput, h9 as UploadFileInput, hx as UpsertDBAttribute, ht as UpsertDBObject, hH as UpsertDBView, dq as UserId, c1 as UserProfile, gM as UserProfileService, gL as UserProfileServiceOptions, g7 as UserProfilesRepository, b$ as UserRole, bQ as UserRoleAssignment, gP as UserService, c0 as UserStatus, gO as UserValidationError, gN as UserValidationResult, dn as Uuid, dx as ValidationMessages, eh as ValidationResult, gS as ViewService, hT as ViewSyncOptions, hS as ViewSyncResult, ga as ViewsRepository, bv as WithCustomAttributes, db as WorkflowAccessMode, cQ as WorkflowError, d6 as WorkflowExecutionContext, cS as WorkflowInstance, gW as WorkflowInstanceService, gV as WorkflowInstanceServiceOptions, gc as WorkflowInstancesRepository, cJ as WorkflowLayout, co as WorkflowNodeType, c$ as WorkflowParticipation, g_ as WorkflowParticipationService, gd as WorkflowParticipationsRepository, h0 as WorkflowRelationService, h3 as WorkflowService, cG as WorkflowSlot, cL as WorkflowStatus, cP as WorkflowTransition, gb as WorkflowsRepository, cB as and, dr as asTenantId, ds as asUserId, dR as attributeConfigSchemas, gg as buildAuditChanges, eF as cacheKeys, eG as cacheTtl, d3 as canAuthenticate, d4 as canExecuteNode, d2 as canParticipate, cV as canResumeInstance, dD as checkboxConfigSchema, fj as complete, hp as computeLabelWithRelations, eq as computeRecordStatus, ee as createAttributeValidator, dY as createCheckboxValidator, d$ as createCurrencyValidator, dZ as createDateValidator, fa as createDefaultExecutorRegistry, eQ as createDefaultState, el as createDraftValidator, d7 as createEmptyContext, e4 as createFileValidator, ef as createFormAttributeValidator, ea as createFormulaValidator, e3 as createLocationValidator, g1 as createMockAdapter, e7 as createMultiRelationValidator, e2 as createMultiselectValidator, dX as createNumberValidator, eg as createObjectValidator, d_ as createPhoneValidator, eW as createQueryBuilder, e9 as createRatingValidator, e8 as createRelationValidator, ed as createRichtextValidator, eb as createRollupValidator, e1 as createSelectValidator, e6 as createSingleRelationValidator, cW as createStartTransition, e0 as createStatusValidator, ec as createTextAreaValidator, dW as createTextValidator, e5 as createUserValidator, dG as currencyConfigSchema, dE as dateConfigSchema, g2 as defaultPolicyRegistry, hm as enrichValuesWithSelectLabels, cz as eq, fk as error, f0 as evaluate, e$ as evaluateCondition, fs as evaluateFormula, ft as evaluateFormulaAttribute, fu as evaluateFormulaAttributeWithRelations, fv as evaluateFormulaWithRelations, fw as evaluateFormulaWithResult, f1 as evaluateWithTrace, hl as extractAttributeNames, fx as extractFormulaVariables, hn as extractRelationIds, fy as extractRelationNames, fz as extractRelationReferences, dL as fileConfigSchema, fA as flattenRelationsForEval, fB as formatFormulaResult, eR as formatRecord, eS as formatRecords, dP as formulaConfigSchema, dm as generateCssVariables, dt as generateId, du as generatePrefixedId, dS as getAttributeConfigSchema, f3 as getContext, d8 as getContextValue, fb as getDefaultExecutorRegistry, ez as getDefaultPinCodeService, et as getDefaultTokenService, eo as getMissingRequiredAttributes, cv as getNodeOutputs, fF as getPathDepth, fG as getRelationPath, he as getSyncPreview, fH as getTargetAttributeName, f4 as getTenantId, f5 as getUserId, hW as getViewSyncPreview, f6 as hasContext, fC as hasRelationReferences, cD as inValues, eA as initializePinCodeService, eu as initializeTokenService, cg as isActivityTab, aZ as isAdvancedFilterState, cu as isAdvancedFormNode, cy as isConditionGroup, cr as isConditionNode, cx as isConditionRule, cf as isCustomTab, cd as isDirectTableTab, cE as isEmpty, cs as isEndNode, bc as isFlowDefinition, bd as isFlowPublished, ci as isFlowsTab, cq as isFormNode, cb as isFormTab, cT as isInstanceTerminal, cU as isInstanceWaiting, ce as isInverseTableTab, hk as isLabelExpression, b5 as isNoValueOperator, cF as isNotEmpty, ch as isNotesTab, d1 as isPinCodeAuth, ep as isRecordComplete, d0 as isSignedLinkAuth, ct as isSimpleFormNode, cp as isStartNode, be as isSystemFlow, cO as isSystemWorkflow, cc as isTableTab, ad as isUniversalRelation, cM as isWorkflowDefinition, cN as isWorkflowPublished, dI as locationConfigSchema, da as mergeFormToSlot, dl as mergeWithDefaults, dK as multiselectConfigSchema, cA as neq, g4 as notesPolicy, dC as numberConfigSchema, cC as or, dU as parseAttributeConfig, fK as parsePath, fL as pathHasManyCardinality, dF as phoneConfigSchema, dO as ratingConfigSchema, dv as registry, dN as relationConfigSchema, hj as renderLabelExpression, fR as resolveMultiplePaths, fS as resolveSingleValue, dB as richtextConfigSchema, dQ as rollupConfigSchema, f7 as runWithContext, dV as safeParseAttributeConfig, dJ as selectConfigSchema, d9 as setContextValue, dH as statusConfigSchema, fm as success, hh as syncAll, hc as syncNativeObjects, hU as syncNativeViews, dz as textConfigSchema, dA as textareaConfigSchema, a_ as toAdvancedFilterState, a$ as toSimpleFilterState, fT as traversePath, dM as userConfigSchema, ei as validateAttribute, dT as validateAttributeConfig, em as validateDraft, en as validateDraftOrThrow, fD as validateFormulaExpression, ej as validateObject, ek as validateObjectOrThrow, fM as validatePath, hd as verifyNativeObjectsSync, hV as verifyNativeViewsSync, dw as viewRegistry, fn as wait, f8 as withTenantContext } from './runtime-B3RCubTj.js';
3
+ import { z } from 'zod';
3
4
  import { IconName, CountryIso3, CurrencyCode, MimeType, ColorId } from '@stndrds/constants';
4
- import 'zod';
5
5
 
6
6
  /**
7
7
  * Common configuration for all builders (Objects & Attributes)
@@ -107,6 +107,725 @@ declare class ObjectReferencedError extends Error {
107
107
  constructor(objectName: string, referencingObjects: string[]);
108
108
  }
109
109
 
110
+ /**
111
+ * Base event interface with common properties
112
+ */
113
+ interface BaseWorkflowEvent {
114
+ /** Timestamp when the event occurred */
115
+ timestamp: Date;
116
+ /** Tenant ID for multi-tenant systems */
117
+ tenantId: string;
118
+ }
119
+ /**
120
+ * Event fired when a workflow instance is started
121
+ */
122
+ interface WorkflowInstanceStartedEvent extends BaseWorkflowEvent {
123
+ type: "workflow.instance.started";
124
+ /** ID of the workflow instance */
125
+ instanceId: string;
126
+ /** ID of the workflow definition */
127
+ workflowId: string;
128
+ /** Name of the workflow */
129
+ workflowName: string;
130
+ /** ID of the user who started the workflow */
131
+ startedBy: string;
132
+ }
133
+ /**
134
+ * Event fired when a workflow instance completes successfully
135
+ */
136
+ interface WorkflowInstanceCompletedEvent extends BaseWorkflowEvent {
137
+ type: "workflow.instance.completed";
138
+ /** ID of the workflow instance */
139
+ instanceId: string;
140
+ /** Final status from the end node */
141
+ status: string;
142
+ /** Duration of the workflow execution in milliseconds */
143
+ durationMs: number;
144
+ }
145
+ /**
146
+ * Event fired when a workflow instance fails
147
+ */
148
+ interface WorkflowInstanceFailedEvent extends BaseWorkflowEvent {
149
+ type: "workflow.instance.failed";
150
+ /** ID of the workflow instance */
151
+ instanceId: string;
152
+ /** Error code */
153
+ errorCode: string;
154
+ /** Error message */
155
+ error: string;
156
+ /** ID of the node where failure occurred */
157
+ failedNodeId?: string;
158
+ }
159
+ /**
160
+ * Event fired when a workflow instance is cancelled
161
+ */
162
+ interface WorkflowInstanceCancelledEvent extends BaseWorkflowEvent {
163
+ type: "workflow.instance.cancelled";
164
+ /** ID of the workflow instance */
165
+ instanceId: string;
166
+ /** ID of the user who cancelled */
167
+ cancelledBy: string;
168
+ /** Reason for cancellation */
169
+ reason?: string;
170
+ }
171
+ /**
172
+ * Event fired when execution enters a node
173
+ */
174
+ interface WorkflowNodeEnteredEvent extends BaseWorkflowEvent {
175
+ type: "workflow.node.entered";
176
+ /** ID of the workflow instance */
177
+ instanceId: string;
178
+ /** ID of the node */
179
+ nodeId: string;
180
+ /** Type of the node */
181
+ nodeType: string;
182
+ /** Label of the node */
183
+ nodeLabel?: string;
184
+ }
185
+ /**
186
+ * Event fired when a node completes execution
187
+ */
188
+ interface WorkflowNodeCompletedEvent extends BaseWorkflowEvent {
189
+ type: "workflow.node.completed";
190
+ /** ID of the workflow instance */
191
+ instanceId: string;
192
+ /** ID of the node */
193
+ nodeId: string;
194
+ /** Type of the node */
195
+ nodeType: string;
196
+ /** ID of the next node to execute */
197
+ nextNodeId: string;
198
+ /** Duration of node execution in milliseconds */
199
+ durationMs: number;
200
+ }
201
+ /**
202
+ * Event fired when a node fails
203
+ */
204
+ interface WorkflowNodeFailedEvent extends BaseWorkflowEvent {
205
+ type: "workflow.node.failed";
206
+ /** ID of the workflow instance */
207
+ instanceId: string;
208
+ /** ID of the node */
209
+ nodeId: string;
210
+ /** Error message */
211
+ error: string;
212
+ /** Whether the workflow will continue (if continueOnError is set) */
213
+ willContinue: boolean;
214
+ }
215
+ /**
216
+ * Event fired when a participation invitation is sent
217
+ */
218
+ interface WorkflowParticipationInvitedEvent extends BaseWorkflowEvent {
219
+ type: "workflow.participation.invited";
220
+ /** ID of the participation */
221
+ participationId: string;
222
+ /** ID of the workflow instance */
223
+ instanceId: string;
224
+ /** Email of the participant */
225
+ email: string;
226
+ /** Name of the participant */
227
+ name?: string;
228
+ /** Authentication method used */
229
+ authMethod: "signed_link" | "pin_code";
230
+ /** When the invitation expires */
231
+ expiresAt: Date;
232
+ }
233
+ /**
234
+ * Event fired when a participant authenticates
235
+ */
236
+ interface WorkflowParticipationAuthenticatedEvent extends BaseWorkflowEvent {
237
+ type: "workflow.participation.authenticated";
238
+ /** ID of the participation */
239
+ participationId: string;
240
+ /** ID of the workflow instance */
241
+ instanceId: string;
242
+ /** Email of the participant */
243
+ email: string;
244
+ /** IP address used for authentication */
245
+ ipAddress?: string;
246
+ }
247
+ /**
248
+ * Event fired when a participant completes all their assigned nodes
249
+ */
250
+ interface WorkflowParticipationCompletedEvent extends BaseWorkflowEvent {
251
+ type: "workflow.participation.completed";
252
+ /** ID of the participation */
253
+ participationId: string;
254
+ /** ID of the workflow instance */
255
+ instanceId: string;
256
+ /** Number of nodes completed */
257
+ nodesCompleted: number;
258
+ }
259
+ /**
260
+ * Event fired when a participation expires
261
+ */
262
+ interface WorkflowParticipationExpiredEvent extends BaseWorkflowEvent {
263
+ type: "workflow.participation.expired";
264
+ /** ID of the participation */
265
+ participationId: string;
266
+ /** ID of the workflow instance */
267
+ instanceId: string;
268
+ /** Email of the participant */
269
+ email: string;
270
+ }
271
+ /**
272
+ * Union of all workflow event types
273
+ */
274
+ type WorkflowEvent = WorkflowInstanceStartedEvent | WorkflowInstanceCompletedEvent | WorkflowInstanceFailedEvent | WorkflowInstanceCancelledEvent | WorkflowNodeEnteredEvent | WorkflowNodeCompletedEvent | WorkflowNodeFailedEvent | WorkflowParticipationInvitedEvent | WorkflowParticipationAuthenticatedEvent | WorkflowParticipationCompletedEvent | WorkflowParticipationExpiredEvent;
275
+ /**
276
+ * All possible event types
277
+ */
278
+ type WorkflowEventType = WorkflowEvent["type"];
279
+ /**
280
+ * Check if an event is an instance event
281
+ */
282
+ declare function isInstanceEvent(event: WorkflowEvent): event is WorkflowInstanceStartedEvent | WorkflowInstanceCompletedEvent | WorkflowInstanceFailedEvent | WorkflowInstanceCancelledEvent;
283
+ /**
284
+ * Check if an event is a node event
285
+ */
286
+ declare function isNodeEvent(event: WorkflowEvent): event is WorkflowNodeEnteredEvent | WorkflowNodeCompletedEvent | WorkflowNodeFailedEvent;
287
+ /**
288
+ * Check if an event is a participation event
289
+ */
290
+ declare function isParticipationEvent(event: WorkflowEvent): event is WorkflowParticipationInvitedEvent | WorkflowParticipationAuthenticatedEvent | WorkflowParticipationCompletedEvent | WorkflowParticipationExpiredEvent;
291
+
292
+ /**
293
+ * All valid condition operators
294
+ */
295
+ declare const ConditionOperatorSchema: z.ZodEnum<{
296
+ contains: "contains";
297
+ eq: "eq";
298
+ neq: "neq";
299
+ lt: "lt";
300
+ gt: "gt";
301
+ lte: "lte";
302
+ gte: "gte";
303
+ endsWith: "endsWith";
304
+ startsWith: "startsWith";
305
+ isEmpty: "isEmpty";
306
+ isNotEmpty: "isNotEmpty";
307
+ in: "in";
308
+ notIn: "notIn";
309
+ }>;
310
+ /**
311
+ * Single condition rule schema
312
+ */
313
+ declare const ConditionRuleSchema: z.ZodObject<{
314
+ field: z.ZodString;
315
+ operator: z.ZodEnum<{
316
+ contains: "contains";
317
+ eq: "eq";
318
+ neq: "neq";
319
+ lt: "lt";
320
+ gt: "gt";
321
+ lte: "lte";
322
+ gte: "gte";
323
+ endsWith: "endsWith";
324
+ startsWith: "startsWith";
325
+ isEmpty: "isEmpty";
326
+ isNotEmpty: "isNotEmpty";
327
+ in: "in";
328
+ notIn: "notIn";
329
+ }>;
330
+ value: z.ZodUnknown;
331
+ }, z.core.$strip>;
332
+ /**
333
+ * Condition group schema (recursive)
334
+ */
335
+ declare const ConditionGroupSchema: z.ZodType<{
336
+ operator: "and" | "or";
337
+ rules: Array<{
338
+ field: string;
339
+ operator: z.infer<typeof ConditionOperatorSchema>;
340
+ value: unknown;
341
+ } | {
342
+ operator: "and" | "or";
343
+ rules: unknown[];
344
+ }>;
345
+ }>;
346
+ /**
347
+ * Start node schema
348
+ */
349
+ declare const StartNodeSchema: z.ZodObject<{
350
+ type: z.ZodLiteral<"start">;
351
+ id: z.ZodString;
352
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
353
+ }, z.core.$strip>;
354
+ /**
355
+ * Simple field reference schema for FormNode simple mode
356
+ */
357
+ declare const FormFieldRefSchema: z.ZodObject<{
358
+ slotId: z.ZodString;
359
+ attribute: z.ZodString;
360
+ }, z.core.$strip>;
361
+ /**
362
+ * Flow row field schema
363
+ */
364
+ declare const FlowRowFieldSchema: z.ZodObject<{
365
+ id: z.ZodString;
366
+ slotId: z.ZodString;
367
+ attribute: z.ZodString;
368
+ label: z.ZodOptional<z.ZodString>;
369
+ required: z.ZodOptional<z.ZodBoolean>;
370
+ }, z.core.$strip>;
371
+ /**
372
+ * Flow row schema
373
+ */
374
+ declare const FlowRowSchema: z.ZodObject<{
375
+ id: z.ZodString;
376
+ order: z.ZodNumber;
377
+ fields: z.ZodArray<z.ZodObject<{
378
+ id: z.ZodString;
379
+ slotId: z.ZodString;
380
+ attribute: z.ZodString;
381
+ label: z.ZodOptional<z.ZodString>;
382
+ required: z.ZodOptional<z.ZodBoolean>;
383
+ }, z.core.$strip>>;
384
+ }, z.core.$strip>;
385
+ /**
386
+ * Form node schema (supports both simple and advanced modes)
387
+ *
388
+ * Simple mode: uses `fields` array with FormFieldRef objects
389
+ * Advanced mode: uses `rows` array with full row/field structure
390
+ */
391
+ declare const FormNodeSchema: z.ZodObject<{
392
+ type: z.ZodLiteral<"form">;
393
+ id: z.ZodString;
394
+ label: z.ZodString;
395
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
396
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
397
+ slotId: z.ZodString;
398
+ attribute: z.ZodString;
399
+ }, z.core.$strip>>>;
400
+ rows: z.ZodOptional<z.ZodArray<z.ZodObject<{
401
+ id: z.ZodString;
402
+ order: z.ZodNumber;
403
+ fields: z.ZodArray<z.ZodObject<{
404
+ id: z.ZodString;
405
+ slotId: z.ZodString;
406
+ attribute: z.ZodString;
407
+ label: z.ZodOptional<z.ZodString>;
408
+ required: z.ZodOptional<z.ZodBoolean>;
409
+ }, z.core.$strip>>;
410
+ }, z.core.$strip>>>;
411
+ participantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
412
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
413
+ }, z.core.$strip>;
414
+ /**
415
+ * Condition node schema
416
+ */
417
+ declare const ConditionNodeSchema: z.ZodObject<{
418
+ type: z.ZodLiteral<"condition">;
419
+ id: z.ZodString;
420
+ label: z.ZodString;
421
+ condition: z.ZodType<{
422
+ operator: "and" | "or";
423
+ rules: Array<{
424
+ field: string;
425
+ operator: z.infer<typeof ConditionOperatorSchema>;
426
+ value: unknown;
427
+ } | {
428
+ operator: "and" | "or";
429
+ rules: unknown[];
430
+ }>;
431
+ }, unknown, z.core.$ZodTypeInternals<{
432
+ operator: "and" | "or";
433
+ rules: Array<{
434
+ field: string;
435
+ operator: z.infer<typeof ConditionOperatorSchema>;
436
+ value: unknown;
437
+ } | {
438
+ operator: "and" | "or";
439
+ rules: unknown[];
440
+ }>;
441
+ }, unknown>>;
442
+ onTrue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
443
+ onFalse: z.ZodOptional<z.ZodNullable<z.ZodString>>;
444
+ }, z.core.$strip>;
445
+ /**
446
+ * End node schema
447
+ */
448
+ declare const EndNodeSchema: z.ZodObject<{
449
+ type: z.ZodLiteral<"end">;
450
+ id: z.ZodString;
451
+ label: z.ZodOptional<z.ZodString>;
452
+ status: z.ZodOptional<z.ZodString>;
453
+ }, z.core.$strip>;
454
+ /**
455
+ * Union of all node schemas
456
+ */
457
+ declare const WorkflowNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
458
+ type: z.ZodLiteral<"start">;
459
+ id: z.ZodString;
460
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
461
+ }, z.core.$strip>, z.ZodObject<{
462
+ type: z.ZodLiteral<"form">;
463
+ id: z.ZodString;
464
+ label: z.ZodString;
465
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
466
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
467
+ slotId: z.ZodString;
468
+ attribute: z.ZodString;
469
+ }, z.core.$strip>>>;
470
+ rows: z.ZodOptional<z.ZodArray<z.ZodObject<{
471
+ id: z.ZodString;
472
+ order: z.ZodNumber;
473
+ fields: z.ZodArray<z.ZodObject<{
474
+ id: z.ZodString;
475
+ slotId: z.ZodString;
476
+ attribute: z.ZodString;
477
+ label: z.ZodOptional<z.ZodString>;
478
+ required: z.ZodOptional<z.ZodBoolean>;
479
+ }, z.core.$strip>>;
480
+ }, z.core.$strip>>>;
481
+ participantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
482
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
483
+ }, z.core.$strip>, z.ZodObject<{
484
+ type: z.ZodLiteral<"condition">;
485
+ id: z.ZodString;
486
+ label: z.ZodString;
487
+ condition: z.ZodType<{
488
+ operator: "and" | "or";
489
+ rules: Array<{
490
+ field: string;
491
+ operator: z.infer<typeof ConditionOperatorSchema>;
492
+ value: unknown;
493
+ } | {
494
+ operator: "and" | "or";
495
+ rules: unknown[];
496
+ }>;
497
+ }, unknown, z.core.$ZodTypeInternals<{
498
+ operator: "and" | "or";
499
+ rules: Array<{
500
+ field: string;
501
+ operator: z.infer<typeof ConditionOperatorSchema>;
502
+ value: unknown;
503
+ } | {
504
+ operator: "and" | "or";
505
+ rules: unknown[];
506
+ }>;
507
+ }, unknown>>;
508
+ onTrue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
509
+ onFalse: z.ZodOptional<z.ZodNullable<z.ZodString>>;
510
+ }, z.core.$strip>, z.ZodObject<{
511
+ type: z.ZodLiteral<"end">;
512
+ id: z.ZodString;
513
+ label: z.ZodOptional<z.ZodString>;
514
+ status: z.ZodOptional<z.ZodString>;
515
+ }, z.core.$strip>], "type">;
516
+ /**
517
+ * Slot mode schema
518
+ */
519
+ declare const SlotModeSchema: z.ZodEnum<{
520
+ select: "select";
521
+ create: "create";
522
+ optional: "optional";
523
+ }>;
524
+ /**
525
+ * Workflow slot schema
526
+ */
527
+ declare const WorkflowSlotSchema: z.ZodObject<{
528
+ id: z.ZodString;
529
+ objectName: z.ZodString;
530
+ label: z.ZodString;
531
+ mode: z.ZodEnum<{
532
+ select: "select";
533
+ create: "create";
534
+ optional: "optional";
535
+ }>;
536
+ color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
537
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
538
+ }, z.core.$strip>;
539
+ /**
540
+ * Participant auth config schema
541
+ */
542
+ declare const ParticipantAuthConfigSchema: z.ZodObject<{
543
+ method: z.ZodEnum<{
544
+ signed_link: "signed_link";
545
+ pin_code: "pin_code";
546
+ }>;
547
+ expiresIn: z.ZodOptional<z.ZodString>;
548
+ channel: z.ZodOptional<z.ZodEnum<{
549
+ email: "email";
550
+ sms: "sms";
551
+ }>>;
552
+ }, z.core.$strip>;
553
+ /**
554
+ * Participant template schema
555
+ */
556
+ declare const ParticipantTemplateSchema: z.ZodObject<{
557
+ id: z.ZodString;
558
+ label: z.ZodString;
559
+ type: z.ZodEnum<{
560
+ internal: "internal";
561
+ external: "external";
562
+ }>;
563
+ emailSource: z.ZodOptional<z.ZodString>;
564
+ phoneSource: z.ZodOptional<z.ZodString>;
565
+ defaultAuth: z.ZodObject<{
566
+ method: z.ZodEnum<{
567
+ signed_link: "signed_link";
568
+ pin_code: "pin_code";
569
+ }>;
570
+ expiresIn: z.ZodOptional<z.ZodString>;
571
+ channel: z.ZodOptional<z.ZodEnum<{
572
+ email: "email";
573
+ sms: "sms";
574
+ }>>;
575
+ }, z.core.$strip>;
576
+ allowedNodeIds: z.ZodArray<z.ZodString>;
577
+ }, z.core.$strip>;
578
+ /**
579
+ * Node position schema
580
+ */
581
+ declare const NodePositionSchema: z.ZodObject<{
582
+ x: z.ZodNumber;
583
+ y: z.ZodNumber;
584
+ }, z.core.$strip>;
585
+ /**
586
+ * Viewport schema
587
+ */
588
+ declare const ViewportSchema: z.ZodObject<{
589
+ x: z.ZodNumber;
590
+ y: z.ZodNumber;
591
+ zoom: z.ZodNumber;
592
+ }, z.core.$strip>;
593
+ /**
594
+ * Workflow layout schema
595
+ */
596
+ declare const WorkflowLayoutSchema: z.ZodObject<{
597
+ positions: z.ZodRecord<z.ZodString, z.ZodObject<{
598
+ x: z.ZodNumber;
599
+ y: z.ZodNumber;
600
+ }, z.core.$strip>>;
601
+ viewport: z.ZodOptional<z.ZodObject<{
602
+ x: z.ZodNumber;
603
+ y: z.ZodNumber;
604
+ zoom: z.ZodNumber;
605
+ }, z.core.$strip>>;
606
+ }, z.core.$strip>;
607
+ /**
608
+ * Theme colors schema
609
+ */
610
+ declare const ThemeColorsSchema: z.ZodObject<{
611
+ primary: z.ZodOptional<z.ZodString>;
612
+ primaryForeground: z.ZodOptional<z.ZodString>;
613
+ background: z.ZodOptional<z.ZodString>;
614
+ foreground: z.ZodOptional<z.ZodString>;
615
+ muted: z.ZodOptional<z.ZodString>;
616
+ border: z.ZodOptional<z.ZodString>;
617
+ accent: z.ZodOptional<z.ZodString>;
618
+ }, z.core.$strip>;
619
+ /**
620
+ * Theme logo schema
621
+ */
622
+ declare const ThemeLogoSchema: z.ZodObject<{
623
+ url: z.ZodString;
624
+ alt: z.ZodOptional<z.ZodString>;
625
+ maxHeight: z.ZodOptional<z.ZodNumber>;
626
+ }, z.core.$strip>;
627
+ /**
628
+ * Workflow theme schema
629
+ */
630
+ declare const WorkflowThemeSchema: z.ZodObject<{
631
+ logo: z.ZodOptional<z.ZodObject<{
632
+ url: z.ZodString;
633
+ alt: z.ZodOptional<z.ZodString>;
634
+ maxHeight: z.ZodOptional<z.ZodNumber>;
635
+ }, z.core.$strip>>;
636
+ colors: z.ZodOptional<z.ZodObject<{
637
+ primary: z.ZodOptional<z.ZodString>;
638
+ primaryForeground: z.ZodOptional<z.ZodString>;
639
+ background: z.ZodOptional<z.ZodString>;
640
+ foreground: z.ZodOptional<z.ZodString>;
641
+ muted: z.ZodOptional<z.ZodString>;
642
+ border: z.ZodOptional<z.ZodString>;
643
+ accent: z.ZodOptional<z.ZodString>;
644
+ }, z.core.$strip>>;
645
+ typography: z.ZodOptional<z.ZodObject<{
646
+ headingFont: z.ZodOptional<z.ZodString>;
647
+ bodyFont: z.ZodOptional<z.ZodString>;
648
+ baseFontSize: z.ZodOptional<z.ZodNumber>;
649
+ }, z.core.$strip>>;
650
+ borderRadius: z.ZodOptional<z.ZodNumber>;
651
+ showPoweredBy: z.ZodOptional<z.ZodBoolean>;
652
+ customCss: z.ZodOptional<z.ZodString>;
653
+ }, z.core.$strip>;
654
+ /**
655
+ * Workflow config schema
656
+ */
657
+ declare const WorkflowConfigSchema: z.ZodObject<{
658
+ instanceTtl: z.ZodOptional<z.ZodString>;
659
+ externalLinkTtl: z.ZodOptional<z.ZodString>;
660
+ allowExternalParticipants: z.ZodOptional<z.ZodBoolean>;
661
+ }, z.core.$strip>;
662
+ /**
663
+ * Workflow status schema
664
+ */
665
+ declare const WorkflowStatusSchema: z.ZodEnum<{
666
+ archived: "archived";
667
+ draft: "draft";
668
+ published: "published";
669
+ }>;
670
+ /**
671
+ * Complete workflow definition schema
672
+ */
673
+ declare const WorkflowDefinitionSchema: z.ZodObject<{
674
+ id: z.ZodOptional<z.ZodString>;
675
+ name: z.ZodString;
676
+ label: z.ZodString;
677
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
678
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
679
+ status: z.ZodEnum<{
680
+ archived: "archived";
681
+ draft: "draft";
682
+ published: "published";
683
+ }>;
684
+ version: z.ZodNumber;
685
+ slots: z.ZodArray<z.ZodObject<{
686
+ id: z.ZodString;
687
+ objectName: z.ZodString;
688
+ label: z.ZodString;
689
+ mode: z.ZodEnum<{
690
+ select: "select";
691
+ create: "create";
692
+ optional: "optional";
693
+ }>;
694
+ color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
695
+ icon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
696
+ }, z.core.$strip>>;
697
+ nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
698
+ type: z.ZodLiteral<"start">;
699
+ id: z.ZodString;
700
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
701
+ }, z.core.$strip>, z.ZodObject<{
702
+ type: z.ZodLiteral<"form">;
703
+ id: z.ZodString;
704
+ label: z.ZodString;
705
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
706
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
707
+ slotId: z.ZodString;
708
+ attribute: z.ZodString;
709
+ }, z.core.$strip>>>;
710
+ rows: z.ZodOptional<z.ZodArray<z.ZodObject<{
711
+ id: z.ZodString;
712
+ order: z.ZodNumber;
713
+ fields: z.ZodArray<z.ZodObject<{
714
+ id: z.ZodString;
715
+ slotId: z.ZodString;
716
+ attribute: z.ZodString;
717
+ label: z.ZodOptional<z.ZodString>;
718
+ required: z.ZodOptional<z.ZodBoolean>;
719
+ }, z.core.$strip>>;
720
+ }, z.core.$strip>>>;
721
+ participantId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
722
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
723
+ }, z.core.$strip>, z.ZodObject<{
724
+ type: z.ZodLiteral<"condition">;
725
+ id: z.ZodString;
726
+ label: z.ZodString;
727
+ condition: z.ZodType<{
728
+ operator: "and" | "or";
729
+ rules: Array<{
730
+ field: string;
731
+ operator: z.infer<typeof ConditionOperatorSchema>;
732
+ value: unknown;
733
+ } | {
734
+ operator: "and" | "or";
735
+ rules: unknown[];
736
+ }>;
737
+ }, unknown, z.core.$ZodTypeInternals<{
738
+ operator: "and" | "or";
739
+ rules: Array<{
740
+ field: string;
741
+ operator: z.infer<typeof ConditionOperatorSchema>;
742
+ value: unknown;
743
+ } | {
744
+ operator: "and" | "or";
745
+ rules: unknown[];
746
+ }>;
747
+ }, unknown>>;
748
+ onTrue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
749
+ onFalse: z.ZodOptional<z.ZodNullable<z.ZodString>>;
750
+ }, z.core.$strip>, z.ZodObject<{
751
+ type: z.ZodLiteral<"end">;
752
+ id: z.ZodString;
753
+ label: z.ZodOptional<z.ZodString>;
754
+ status: z.ZodOptional<z.ZodString>;
755
+ }, z.core.$strip>], "type">>;
756
+ startNodeId: z.ZodString;
757
+ layout: z.ZodObject<{
758
+ positions: z.ZodRecord<z.ZodString, z.ZodObject<{
759
+ x: z.ZodNumber;
760
+ y: z.ZodNumber;
761
+ }, z.core.$strip>>;
762
+ viewport: z.ZodOptional<z.ZodObject<{
763
+ x: z.ZodNumber;
764
+ y: z.ZodNumber;
765
+ zoom: z.ZodNumber;
766
+ }, z.core.$strip>>;
767
+ }, z.core.$strip>;
768
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
769
+ id: z.ZodString;
770
+ label: z.ZodString;
771
+ type: z.ZodEnum<{
772
+ internal: "internal";
773
+ external: "external";
774
+ }>;
775
+ emailSource: z.ZodOptional<z.ZodString>;
776
+ phoneSource: z.ZodOptional<z.ZodString>;
777
+ defaultAuth: z.ZodObject<{
778
+ method: z.ZodEnum<{
779
+ signed_link: "signed_link";
780
+ pin_code: "pin_code";
781
+ }>;
782
+ expiresIn: z.ZodOptional<z.ZodString>;
783
+ channel: z.ZodOptional<z.ZodEnum<{
784
+ email: "email";
785
+ sms: "sms";
786
+ }>>;
787
+ }, z.core.$strip>;
788
+ allowedNodeIds: z.ZodArray<z.ZodString>;
789
+ }, z.core.$strip>>>;
790
+ theme: z.ZodOptional<z.ZodObject<{
791
+ logo: z.ZodOptional<z.ZodObject<{
792
+ url: z.ZodString;
793
+ alt: z.ZodOptional<z.ZodString>;
794
+ maxHeight: z.ZodOptional<z.ZodNumber>;
795
+ }, z.core.$strip>>;
796
+ colors: z.ZodOptional<z.ZodObject<{
797
+ primary: z.ZodOptional<z.ZodString>;
798
+ primaryForeground: z.ZodOptional<z.ZodString>;
799
+ background: z.ZodOptional<z.ZodString>;
800
+ foreground: z.ZodOptional<z.ZodString>;
801
+ muted: z.ZodOptional<z.ZodString>;
802
+ border: z.ZodOptional<z.ZodString>;
803
+ accent: z.ZodOptional<z.ZodString>;
804
+ }, z.core.$strip>>;
805
+ typography: z.ZodOptional<z.ZodObject<{
806
+ headingFont: z.ZodOptional<z.ZodString>;
807
+ bodyFont: z.ZodOptional<z.ZodString>;
808
+ baseFontSize: z.ZodOptional<z.ZodNumber>;
809
+ }, z.core.$strip>>;
810
+ borderRadius: z.ZodOptional<z.ZodNumber>;
811
+ showPoweredBy: z.ZodOptional<z.ZodBoolean>;
812
+ customCss: z.ZodOptional<z.ZodString>;
813
+ }, z.core.$strip>>;
814
+ config: z.ZodOptional<z.ZodObject<{
815
+ instanceTtl: z.ZodOptional<z.ZodString>;
816
+ externalLinkTtl: z.ZodOptional<z.ZodString>;
817
+ allowExternalParticipants: z.ZodOptional<z.ZodBoolean>;
818
+ }, z.core.$strip>>;
819
+ tenantId: z.ZodOptional<z.ZodString>;
820
+ system: z.ZodOptional<z.ZodBoolean>;
821
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
822
+ createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
823
+ updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
824
+ }, z.core.$strip>;
825
+ type ValidatedWorkflowDefinition = z.infer<typeof WorkflowDefinitionSchema>;
826
+ type ValidatedWorkflowNode = z.infer<typeof WorkflowNodeSchema>;
827
+ type ValidatedConditionGroup = z.infer<typeof ConditionGroupSchema>;
828
+
110
829
  /**
111
830
  * System attribute union type
112
831
  */
@@ -150,6 +869,54 @@ declare function isSystemAttributeObject(attr: {
150
869
  system?: boolean;
151
870
  }): boolean;
152
871
 
872
+ /**
873
+ * API types for workflow operations.
874
+ *
875
+ * These types represent the client-side API contract.
876
+ * Server-side types (with fields like startedBy) are in runtime/services.
877
+ *
878
+ * @packageDocumentation
879
+ */
880
+ /**
881
+ * API input for starting a workflow instance (client-side).
882
+ *
883
+ * Note: `startedBy` is added server-side from authentication context.
884
+ *
885
+ * @example
886
+ * ```typescript
887
+ * const input: StartWorkflowApiInput = {
888
+ * workflowName: "onboarding",
889
+ * initialSlots: {
890
+ * user: { id: "user-123" },
891
+ * },
892
+ * };
893
+ * ```
894
+ */
895
+ interface StartWorkflowApiInput {
896
+ /** Name of the workflow to start */
897
+ workflowName: string;
898
+ /** Initial slot data (for "select" mode slots) */
899
+ initialSlots?: Record<string, Record<string, unknown>>;
900
+ /** Custom variables to initialize */
901
+ variables?: Record<string, unknown>;
902
+ }
903
+ /**
904
+ * API input for resuming a waiting workflow instance (client-side).
905
+ *
906
+ * @example
907
+ * ```typescript
908
+ * const input: ResumeWorkflowApiInput = {
909
+ * input: {
910
+ * user: { approved: true, notes: "All good" },
911
+ * },
912
+ * };
913
+ * ```
914
+ */
915
+ interface ResumeWorkflowApiInput {
916
+ /** Form/action data to submit, keyed by slot ID */
917
+ input: Record<string, unknown>;
918
+ }
919
+
153
920
  /**
154
921
  * Default empty value placeholder
155
922
  */
@@ -1010,231 +1777,6 @@ type ExtractAttributeRequired<T> = T extends {
1010
1777
  };
1011
1778
  } ? R : false;
1012
1779
 
1013
- /**
1014
- * Builder for creating flow rows with fields
1015
- */
1016
- declare class FlowRowBuilder {
1017
- private pageBuilder;
1018
- private rowData;
1019
- /** @internal */
1020
- constructor(pageBuilder: FlowPageBuilder, id: string, order: number);
1021
- /**
1022
- * Add a field to the current row
1023
- *
1024
- * @param slotId - Reference to a slot defined with .slot()
1025
- * @param attribute - Attribute name on the object
1026
- * @param options - Optional field configuration
1027
- *
1028
- * @example
1029
- * ```typescript
1030
- * .row("row-1")
1031
- * .field("mr", "firstName")
1032
- * .field("mr", "lastName")
1033
- * ```
1034
- */
1035
- field(slotId: string, attribute: string, options?: {
1036
- label?: string;
1037
- required?: boolean;
1038
- }): this;
1039
- /**
1040
- * Start a new row on the same page
1041
- */
1042
- row(id: string): FlowRowBuilder;
1043
- /**
1044
- * Start a new page
1045
- */
1046
- page(id: string, label: string, description?: string): FlowPageBuilder;
1047
- /**
1048
- * Build the final flow definition
1049
- */
1050
- build(): FlowDefinition;
1051
- }
1052
- /**
1053
- * Builder for creating flow pages with rows
1054
- */
1055
- declare class FlowPageBuilder {
1056
- private flow;
1057
- private pageData;
1058
- private rowOrder;
1059
- /** @internal */
1060
- constructor(flow: FlowBuilder, id: string, label: string, description?: string);
1061
- /**
1062
- * Add a row to the current page
1063
- *
1064
- * @param id - Unique row identifier
1065
- *
1066
- * @example
1067
- * ```typescript
1068
- * .page("identity", "Identité")
1069
- * .row("name-row")
1070
- * .field("mr", "firstName")
1071
- * .field("mr", "lastName")
1072
- * .row("email-row")
1073
- * .field("mr", "email")
1074
- * ```
1075
- */
1076
- row(id: string): FlowRowBuilder;
1077
- /**
1078
- * Start a new page
1079
- */
1080
- page(id: string, label: string, description?: string): FlowPageBuilder;
1081
- /**
1082
- * Build the final flow definition
1083
- */
1084
- build(): FlowDefinition;
1085
- /** @internal */
1086
- _finalizeRow(row: FlowRow): this;
1087
- /** @internal */
1088
- _getFlow(): FlowBuilder;
1089
- /** @internal */
1090
- _getPageData(): FlowPage;
1091
- }
1092
- /**
1093
- * Fluent builder for creating FlowDefinition with validation
1094
- *
1095
- * @example
1096
- * ```typescript
1097
- * const COUPLE_FLOW = flow("couple-creation", "Création Couple")
1098
- * .description("Create a couple with company")
1099
- * .slot("mr", "contacts", "Monsieur", { color: "blue" })
1100
- * .slot("mme", "contacts", "Madame", { color: "pink" })
1101
- * .slot("company", "companies", "Entreprise", { color: "green" })
1102
- * .relation("mr", "company", "company")
1103
- * .relation("mme", "company", "company")
1104
- * .page("identity", "Identité")
1105
- * .row("mr-name")
1106
- * .field("mr", "firstName")
1107
- * .field("mr", "lastName")
1108
- * .row("mme-name")
1109
- * .field("mme", "firstName")
1110
- * .field("mme", "lastName")
1111
- * .page("company", "Entreprise")
1112
- * .row("company-name")
1113
- * .field("company", "name")
1114
- * .row("company-siret")
1115
- * .field("company", "siret")
1116
- * .build();
1117
- * ```
1118
- */
1119
- declare class FlowBuilder {
1120
- private data;
1121
- constructor(name: string, label: string);
1122
- /**
1123
- * Set flow description
1124
- */
1125
- description(value: string): this;
1126
- /**
1127
- * Set flow icon
1128
- */
1129
- icon(value: IconName): this;
1130
- /**
1131
- * Set extensible metadata
1132
- */
1133
- metadata(value: Record<string, unknown>): this;
1134
- /**
1135
- * Add a slot (object to create in the flow)
1136
- *
1137
- * @param id - Unique slot identifier (used to reference in fields and relations)
1138
- * @param objectName - Name of the object to create
1139
- * @param label - Display label for the slot
1140
- * @param options - Optional slot configuration
1141
- *
1142
- * @example
1143
- * ```typescript
1144
- * .slot("mr", "contacts", "Monsieur", { color: "blue", icon: "user" })
1145
- * .slot("company", "companies", "Entreprise", { color: "green" })
1146
- * ```
1147
- */
1148
- slot(id: string, objectName: string, label: string, options?: {
1149
- color?: ColorId;
1150
- icon?: IconName;
1151
- }): this;
1152
- /**
1153
- * Define a relation between two slots
1154
- * The source slot will be linked to the target slot via the specified attribute
1155
- *
1156
- * @param sourceSlotId - Slot that has the relation attribute
1157
- * @param sourceAttribute - Relation attribute name on the source
1158
- * @param targetSlotId - Target slot to link to
1159
- *
1160
- * @example
1161
- * ```typescript
1162
- * // mr.company → company (the contact's company field will be set to the created company)
1163
- * .relation("mr", "company", "company")
1164
- * ```
1165
- */
1166
- relation(sourceSlotId: string, sourceAttribute: string, targetSlotId: string): this;
1167
- /**
1168
- * Start a new page/step in the flow
1169
- *
1170
- * @param id - Unique page identifier
1171
- * @param label - Display label
1172
- * @param description - Optional description
1173
- *
1174
- * @example
1175
- * ```typescript
1176
- * .page("identity", "Identité", "Informations personnelles")
1177
- * .row("name")
1178
- * .field("mr", "firstName")
1179
- * .field("mr", "lastName")
1180
- * ```
1181
- */
1182
- page(id: string, label: string, description?: string): FlowPageBuilder;
1183
- /**
1184
- * Build and validate the flow definition
1185
- *
1186
- * @throws Error if validation fails
1187
- */
1188
- build(): FlowDefinition;
1189
- /**
1190
- * Validate that required data is present
1191
- */
1192
- private validateRequiredData;
1193
- /**
1194
- * Validate that all field slotId references exist
1195
- */
1196
- private validateFieldReferences;
1197
- /**
1198
- * Validate that all relation references exist and are valid
1199
- */
1200
- private validateRelationReferences;
1201
- /**
1202
- * @internal Used by FlowPageBuilder to finalize a page
1203
- */
1204
- _finalizePage(page: FlowPage): this;
1205
- /**
1206
- * Validate flow name format (kebab-case)
1207
- */
1208
- private validateName;
1209
- /**
1210
- * Validate that there are no circular dependencies in relations
1211
- * Uses DFS to detect cycles in the dependency graph
1212
- */
1213
- private validateNoCircularDependencies;
1214
- }
1215
- /**
1216
- * Create a new flow builder
1217
- *
1218
- * @param name - Flow name (kebab-case)
1219
- * @param label - Display label
1220
- *
1221
- * @example
1222
- * ```typescript
1223
- * const COUPLE_FLOW = flow("couple-creation", "Création Couple")
1224
- * .slot("mr", "contacts", "Monsieur")
1225
- * .slot("mme", "contacts", "Madame")
1226
- * .page("identity", "Identité")
1227
- * .row("mr-name")
1228
- * .field("mr", "firstName")
1229
- * .field("mr", "lastName")
1230
- * .row("mme-name")
1231
- * .field("mme", "firstName")
1232
- * .field("mme", "lastName")
1233
- * .build();
1234
- * ```
1235
- */
1236
- declare function flow(name: string, label: string): FlowBuilder;
1237
-
1238
1780
  /**
1239
1781
  * Extract attribute info from a builder instance
1240
1782
  */
@@ -1647,6 +2189,54 @@ declare class ActivityTabConfig {
1647
2189
  */
1648
2190
  build(): ViewDefinition;
1649
2191
  }
2192
+ /**
2193
+ * Builder for configuring flows tabs (workflow instances)
2194
+ *
2195
+ * @example
2196
+ * ```typescript
2197
+ * .tab("workflows", "Workflows")
2198
+ * .flows()
2199
+ * .allowStart()
2200
+ * .allowCancel()
2201
+ * .statusFilter("running", "waiting")
2202
+ * ```
2203
+ */
2204
+ declare class FlowsTabConfig {
2205
+ private view;
2206
+ private tabData;
2207
+ /** @internal */
2208
+ constructor(view: ViewBuilder, base: BaseTabConfig);
2209
+ /**
2210
+ * Filter by instance statuses
2211
+ * @example .statusFilter("running", "waiting", "completed")
2212
+ */
2213
+ statusFilter(...statuses: InstanceStatus[]): this;
2214
+ /**
2215
+ * Allow starting new workflow instances
2216
+ */
2217
+ allowStart(): this;
2218
+ /**
2219
+ * Allow canceling running instances
2220
+ */
2221
+ allowCancel(): this;
2222
+ /**
2223
+ * Set columns to display in the instances table
2224
+ * @example .columns("workflow", "status", "createdAt")
2225
+ */
2226
+ columns(...cols: ("workflow" | "status" | "startedBy" | "createdAt" | "updatedAt")[]): this;
2227
+ /**
2228
+ * Continue building with a new tab
2229
+ */
2230
+ tab(name: string, label: string): TabBuilder;
2231
+ /**
2232
+ * Finish this tab and return to ViewBuilder
2233
+ */
2234
+ done(): ViewBuilder;
2235
+ /**
2236
+ * Build the final view definition
2237
+ */
2238
+ build(): ViewDefinition;
2239
+ }
1650
2240
  /**
1651
2241
  * Builder for creating tabs with type discrimination
1652
2242
  *
@@ -1713,6 +2303,11 @@ declare class TabBuilder {
1713
2303
  * @example .activity().limit(50)
1714
2304
  */
1715
2305
  activity(): ActivityTabConfig;
2306
+ /**
2307
+ * Create a flows tab for workflow instances
2308
+ * @example .flows().allowStart().allowCancel()
2309
+ */
2310
+ flows(): FlowsTabConfig;
1716
2311
  }
1717
2312
  /**
1718
2313
  * Builder for creating view definitions
@@ -1854,6 +2449,353 @@ declare function view(name: string, label: string): ViewBuilder;
1854
2449
  */
1855
2450
  declare function group(id: string, label: string): GroupBuilder;
1856
2451
 
2452
+ /**
2453
+ * Builder for creating rows within a form node.
2454
+ * Each row can contain fields from multiple slots.
2455
+ */
2456
+ declare class WorkflowFormRowBuilder {
2457
+ private formBuilder;
2458
+ private rowData;
2459
+ /** @internal */
2460
+ constructor(formBuilder: WorkflowFormBuilder, rowId: string, order: number);
2461
+ /**
2462
+ * Add a field to the current row
2463
+ * @param slotId - The slot containing the attribute
2464
+ * @param attribute - The attribute name
2465
+ * @param options - Optional label override and required flag
2466
+ */
2467
+ field(slotId: string, attribute: string, options?: {
2468
+ label?: string;
2469
+ required?: boolean;
2470
+ }): this;
2471
+ /**
2472
+ * Start a new row
2473
+ */
2474
+ row(id: string): WorkflowFormRowBuilder;
2475
+ /**
2476
+ * Set the next node and finish this form
2477
+ */
2478
+ next(nodeId: string): WorkflowBuilder;
2479
+ }
2480
+ /**
2481
+ * Builder for creating form nodes with advanced row structure.
2482
+ * Each form node is a single "step" that can contain fields from multiple slots.
2483
+ */
2484
+ declare class WorkflowFormBuilder {
2485
+ private workflowBuilder;
2486
+ private nodeId;
2487
+ private label;
2488
+ private description?;
2489
+ private participantId?;
2490
+ private rows;
2491
+ private rowOrder;
2492
+ /** @internal */
2493
+ constructor(workflowBuilder: WorkflowBuilder, nodeId: string, label: string);
2494
+ /**
2495
+ * Set the description for this form step
2496
+ */
2497
+ describe(description: string): this;
2498
+ /**
2499
+ * Set the participant template that can fill this form
2500
+ */
2501
+ participant(participantId: string): this;
2502
+ /**
2503
+ * Start a new row in the form
2504
+ */
2505
+ row(id: string): WorkflowFormRowBuilder;
2506
+ /**
2507
+ * Set the next node and complete the form definition
2508
+ */
2509
+ next(nodeId: string): WorkflowBuilder;
2510
+ /** @internal */
2511
+ _finalizeRow(row: FlowRow): this;
2512
+ }
2513
+ /**
2514
+ * Builder for creating simple form nodes with field references.
2515
+ * Each field specifies both the slot and attribute.
2516
+ */
2517
+ declare class WorkflowSimpleFormBuilder {
2518
+ private workflowBuilder;
2519
+ private nodeId;
2520
+ private label;
2521
+ private description?;
2522
+ private fieldList;
2523
+ private participantId?;
2524
+ /** @internal */
2525
+ constructor(workflowBuilder: WorkflowBuilder, nodeId: string, label: string);
2526
+ /**
2527
+ * Set the description for this form step
2528
+ */
2529
+ describe(description: string): this;
2530
+ /**
2531
+ * Add a field reference (slotId + attribute)
2532
+ */
2533
+ field(slotId: string, attribute: string): this;
2534
+ /**
2535
+ * Add multiple fields from the same slot
2536
+ */
2537
+ fieldsFrom(slotId: string, attributes: string[]): this;
2538
+ /**
2539
+ * Set the participant template that can fill this form
2540
+ */
2541
+ participant(participantId: string): this;
2542
+ /**
2543
+ * Set the next node and complete the form definition
2544
+ */
2545
+ next(nodeId: string): WorkflowBuilder;
2546
+ }
2547
+ /**
2548
+ * Builder for creating condition nodes
2549
+ */
2550
+ declare class WorkflowConditionBuilder {
2551
+ private workflowBuilder;
2552
+ private nodeId;
2553
+ private label;
2554
+ private condition?;
2555
+ /** @internal */
2556
+ constructor(workflowBuilder: WorkflowBuilder, nodeId: string, label: string);
2557
+ /**
2558
+ * Set the condition to evaluate (full ConditionGroup)
2559
+ */
2560
+ when(condition: ConditionGroup): this;
2561
+ /**
2562
+ * Shorthand: create a simple single-rule condition
2563
+ */
2564
+ whenField(rule: ConditionRule): this;
2565
+ /**
2566
+ * Set the branches for true/false outcomes
2567
+ */
2568
+ branches(onTrue: string, onFalse: string): WorkflowBuilder;
2569
+ /**
2570
+ * Set onTrue branch and return builder for onFalse
2571
+ */
2572
+ onTrue(nodeId: string): {
2573
+ onFalse: (nodeId: string) => WorkflowBuilder;
2574
+ };
2575
+ }
2576
+ /**
2577
+ * Builder for creating end nodes
2578
+ */
2579
+ declare class WorkflowEndBuilder {
2580
+ private workflowBuilder;
2581
+ private nodeId;
2582
+ private nodeLabel?;
2583
+ private nodeStatus?;
2584
+ /** @internal */
2585
+ constructor(workflowBuilder: WorkflowBuilder, nodeId: string);
2586
+ /**
2587
+ * Set the display label
2588
+ */
2589
+ label(label: string): this;
2590
+ /**
2591
+ * Set the final status
2592
+ */
2593
+ status(status: string): this;
2594
+ /**
2595
+ * Build and add the end node, then return to workflow builder
2596
+ */
2597
+ done(): WorkflowBuilder;
2598
+ }
2599
+ /**
2600
+ * Builder for the start node
2601
+ */
2602
+ declare class WorkflowStartBuilder {
2603
+ private workflowBuilder;
2604
+ private nodeId;
2605
+ /** @internal */
2606
+ constructor(workflowBuilder: WorkflowBuilder, nodeId: string);
2607
+ /**
2608
+ * Set the next node after start
2609
+ */
2610
+ next(nodeId: string): WorkflowBuilder;
2611
+ }
2612
+ /**
2613
+ * Builder for participant templates
2614
+ */
2615
+ declare class WorkflowParticipantBuilder {
2616
+ private workflowBuilder;
2617
+ private template;
2618
+ /** @internal */
2619
+ constructor(workflowBuilder: WorkflowBuilder, id: string, label: string);
2620
+ /**
2621
+ * Mark as external participant
2622
+ */
2623
+ external(): this;
2624
+ /**
2625
+ * Mark as internal participant
2626
+ */
2627
+ internal(): this;
2628
+ /**
2629
+ * Set email source path
2630
+ */
2631
+ emailFrom(path: string): this;
2632
+ /**
2633
+ * Set phone source path
2634
+ */
2635
+ phoneFrom(path: string): this;
2636
+ /**
2637
+ * Set authentication configuration
2638
+ */
2639
+ auth(config: {
2640
+ method: AuthMethod;
2641
+ expiresIn?: string;
2642
+ channel?: AuthChannel;
2643
+ }): this;
2644
+ /**
2645
+ * Set nodes this participant can execute
2646
+ */
2647
+ canExecute(nodeIds: string[]): WorkflowBuilder;
2648
+ }
2649
+ /**
2650
+ * Fluent builder for creating WorkflowDefinition with validation
2651
+ *
2652
+ * @example
2653
+ * ```typescript
2654
+ * const ONBOARDING = workflow("client-onboarding", "Onboarding Client")
2655
+ * .description("Collecte des informations client")
2656
+ *
2657
+ * .slot("client", "contacts", { label: "Client", mode: "optional" })
2658
+ * .slot("company", "companies", { label: "Entreprise", mode: "create" })
2659
+ *
2660
+ * .participant("external-client", "Client Externe")
2661
+ * .external()
2662
+ * .emailFrom("slots.client.email")
2663
+ * .auth({ method: "signed_link", expiresIn: "7d" })
2664
+ * .canExecute(["client-form"])
2665
+ *
2666
+ * .start("entry").next("client-form")
2667
+ *
2668
+ * .simpleForm("client-form", "Infos Client")
2669
+ * .slot("client")
2670
+ * .fields(["firstName", "lastName", "email", "type"])
2671
+ * .participant("external-client")
2672
+ * .next("check-vip")
2673
+ *
2674
+ * .condition("check-vip", "Client VIP ?")
2675
+ * .when({ operator: "or", rules: [
2676
+ * { field: "slots.client.type", operator: "eq", value: "vip" },
2677
+ * { field: "slots.client.type", operator: "eq", value: "premium" }
2678
+ * ]})
2679
+ * .onTrue("company-form")
2680
+ * .onFalse("end-basic")
2681
+ *
2682
+ * .form("company-form", "Infos Entreprise")
2683
+ * .slot("company")
2684
+ * .page("main", "Entreprise")
2685
+ * .row("name").field("name").field("siret")
2686
+ * .row("address").field("address")
2687
+ * .next("end-complete")
2688
+ *
2689
+ * .end("end-basic").label("Client créé").done()
2690
+ * .end("end-complete").label("Client + Entreprise créés").done()
2691
+ *
2692
+ * .build();
2693
+ * ```
2694
+ */
2695
+ declare class WorkflowBuilder {
2696
+ private data;
2697
+ private startNodeId;
2698
+ private nodeCount;
2699
+ constructor(name: string, label: string);
2700
+ /**
2701
+ * Set workflow description
2702
+ */
2703
+ description(value: string): this;
2704
+ /**
2705
+ * Set workflow icon
2706
+ */
2707
+ icon(value: IconName): this;
2708
+ /**
2709
+ * Mark as system workflow (protected from deletion)
2710
+ */
2711
+ system(): this;
2712
+ /**
2713
+ * Set extensible metadata
2714
+ */
2715
+ metadata(value: Record<string, unknown>): this;
2716
+ /**
2717
+ * Set workflow theme
2718
+ */
2719
+ theme(value: WorkflowTheme): this;
2720
+ /**
2721
+ * Set workflow config
2722
+ */
2723
+ config(value: WorkflowConfig): this;
2724
+ /**
2725
+ * Add a slot (object to manipulate in the workflow)
2726
+ *
2727
+ * @param id - Unique slot identifier
2728
+ * @param objectName - Name of the object definition
2729
+ * @param options - Slot configuration
2730
+ */
2731
+ slot(id: string, objectName: string, options: {
2732
+ label: string;
2733
+ mode?: SlotMode;
2734
+ color?: ColorId;
2735
+ icon?: IconName;
2736
+ }): this;
2737
+ /**
2738
+ * Define a participant template
2739
+ */
2740
+ participant(id: string, label: string): WorkflowParticipantBuilder;
2741
+ /** @internal */
2742
+ _addParticipant(template: ParticipantTemplate): this;
2743
+ /**
2744
+ * Define the start node
2745
+ */
2746
+ start(id: string): WorkflowStartBuilder;
2747
+ /**
2748
+ * Define a simple form node (single page, list of fields)
2749
+ */
2750
+ simpleForm(id: string, label: string): WorkflowSimpleFormBuilder;
2751
+ /**
2752
+ * Define an advanced form node (multi-page with custom layout)
2753
+ */
2754
+ form(id: string, label: string): WorkflowFormBuilder;
2755
+ /**
2756
+ * Define a condition node
2757
+ */
2758
+ condition(id: string, label: string): WorkflowConditionBuilder;
2759
+ /**
2760
+ * Define an end node
2761
+ */
2762
+ end(id: string): WorkflowEndBuilder;
2763
+ /** @internal */
2764
+ _addNode(node: WorkflowNode): this;
2765
+ /** @internal */
2766
+ _addFormNode(node: WorkflowNode): this;
2767
+ /**
2768
+ * Build and validate the workflow definition
2769
+ */
2770
+ build(): WorkflowDefinition;
2771
+ private validateName;
2772
+ private validateRequiredData;
2773
+ private validateNodeReferences;
2774
+ private validateSlotReferences;
2775
+ private validateParticipantReferences;
2776
+ private validateDAG;
2777
+ }
2778
+ /**
2779
+ * Create a new workflow builder
2780
+ *
2781
+ * @param name - Workflow name (kebab-case)
2782
+ * @param label - Display label
2783
+ *
2784
+ * @example
2785
+ * ```typescript
2786
+ * const ONBOARDING = workflow("client-onboarding", "Onboarding Client")
2787
+ * .slot("client", "contacts", { label: "Client", mode: "create" })
2788
+ * .start("entry").next("form-1")
2789
+ * .simpleForm("form-1", "Info")
2790
+ * .slot("client")
2791
+ * .fields(["firstName", "lastName"])
2792
+ * .next("end")
2793
+ * .end("end").done()
2794
+ * .build();
2795
+ * ```
2796
+ */
2797
+ declare function workflow(name: string, label: string): WorkflowBuilder;
2798
+
1857
2799
  /**
1858
2800
  * Native Notes Object
1859
2801
  *
@@ -1899,10 +2841,10 @@ declare function group(id: string, label: string): GroupBuilder;
1899
2841
  * Notes object definition
1900
2842
  */
1901
2843
  declare const NOTES: ObjectBuilder<{
1902
- visibility: "private" | "shared";
1903
2844
  title: string;
2845
+ visibility: "private" | "shared";
1904
2846
  content: BlockNoteContent;
1905
2847
  linkedTo?: string | undefined;
1906
2848
  }>;
1907
2849
 
1908
- export { ALL_SYSTEM_RESOURCES, ActivityTabConfig, type AnyAttributeBuilder, Attribute, AttributeGroupField, AttributeInUseError, AttributeNotFoundError, AttributeType, type AttributeUsage, BlockNoteContent, type BuilderConfig, CheckboxAttribute, CurrencyAttribute, CustomTabConfig, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, type DefaultRolePermissionConfig, DirectTableTab, DirectTableTabConfig, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type ExtractAttributeName, type ExtractAttributeRequired, Field, FileAttribute, FileNotFoundError, FilterState, FlowBuilder, FlowDefinition, FlowPage, FlowPageBuilder, FlowRow, FlowRowBuilder, ForbiddenError, FormulaAttribute, FormulaReturnType, Group, GroupBuilder, InferAttributeValue, InverseTableTab, InverseTableTabConfig, LocationAttribute, MultiRelationAttribute, MultiselectAttribute, NOTES, NotFoundError, NotSystemObjectError, NotesTabConfig, NumberAttribute, ObjectAction, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, ObjectReferencedError, Option, PhoneAttribute, ProtectedResourceError, ProtectedRoleError, RatingAttribute, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationTarget, RichtextAttribute, RichtextFeature, RoleNotFoundError, RollupAttribute, RollupFunction, SYSTEM_ATTRIBUTES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SelectAttribute, SingleRelationAttribute, SortRule, StatusAttribute, SyncError, SystemAction, type SystemAttribute, type SystemAttributeName, SystemResource, Tab, TabBuilder, TableTab, TextAreaAttribute, TextAttribute, type TypedBuilderConfig, UserAttribute, UserProfileNotFoundError, ValidationError, type ValidationErrorDetail, ViewBuilder, ViewDefinition, ViewLayout, checkbox, currency, date, file, flow, formatAttributeValue, formula, getSystemAttributeList, group, isDefaultRole, isForbiddenError, isNotFoundError, isProtectedResourceError, isSchemaError, isSystemAttribute, isSystemAttributeObject, isValidationError, location, multiselect, number, object, phone, rating, relation, richtext, rollup, select, status, text, textarea, user, view };
2850
+ export { ALL_SYSTEM_RESOURCES, ActivityTabConfig, type AnyAttributeBuilder, Attribute, AttributeGroupField, AttributeInUseError, AttributeNotFoundError, AttributeType, type AttributeUsage, AuthChannel, AuthMethod, BlockNoteContent, type BuilderConfig, CheckboxAttribute, ConditionGroup, ConditionGroupSchema, ConditionNodeSchema, ConditionOperatorSchema, ConditionRule, ConditionRuleSchema, CurrencyAttribute, CustomTabConfig, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, type DefaultRolePermissionConfig, DirectTableTab, DirectTableTabConfig, DuplicateError, EMPTY_VALUE_PLACEHOLDER, EndNodeSchema, type ExtractAttributeName, type ExtractAttributeRequired, Field, FileAttribute, FileNotFoundError, FilterState, FlowRow, FlowRowFieldSchema, FlowRowSchema, FlowsTabConfig, ForbiddenError, FormFieldRefSchema, FormNodeSchema, FormulaAttribute, FormulaReturnType, Group, GroupBuilder, InferAttributeValue, InstanceStatus, InverseTableTab, InverseTableTabConfig, LocationAttribute, MultiRelationAttribute, MultiselectAttribute, NOTES, NodePositionSchema, NotFoundError, NotSystemObjectError, NotesTabConfig, NumberAttribute, ObjectAction, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, ObjectReferencedError, Option, ParticipantAuthConfigSchema, ParticipantTemplate, ParticipantTemplateSchema, PhoneAttribute, ProtectedResourceError, ProtectedRoleError, RatingAttribute, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationTarget, type ResumeWorkflowApiInput, RichtextAttribute, RichtextFeature, RoleNotFoundError, RollupAttribute, RollupFunction, SYSTEM_ATTRIBUTES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SelectAttribute, SingleRelationAttribute, SlotMode, SlotModeSchema, SortRule, StartNodeSchema, type StartWorkflowApiInput, StatusAttribute, SyncError, SystemAction, type SystemAttribute, type SystemAttributeName, SystemResource, Tab, TabBuilder, TableTab, TextAreaAttribute, TextAttribute, ThemeColorsSchema, ThemeLogoSchema, type TypedBuilderConfig, UserAttribute, UserProfileNotFoundError, type ValidatedConditionGroup, type ValidatedWorkflowDefinition, type ValidatedWorkflowNode, ValidationError, type ValidationErrorDetail, ViewBuilder, ViewDefinition, ViewLayout, ViewportSchema, WorkflowBuilder, WorkflowConditionBuilder, WorkflowConfig, WorkflowConfigSchema, WorkflowDefinition, WorkflowDefinitionSchema, WorkflowEndBuilder, type WorkflowEvent, type WorkflowEventType, WorkflowFormBuilder, WorkflowFormRowBuilder, type WorkflowInstanceCancelledEvent, type WorkflowInstanceCompletedEvent, type WorkflowInstanceFailedEvent, type WorkflowInstanceStartedEvent, WorkflowLayoutSchema, WorkflowNode, type WorkflowNodeCompletedEvent, type WorkflowNodeEnteredEvent, type WorkflowNodeFailedEvent, WorkflowNodeSchema, WorkflowParticipantBuilder, type WorkflowParticipationAuthenticatedEvent, type WorkflowParticipationCompletedEvent, type WorkflowParticipationExpiredEvent, type WorkflowParticipationInvitedEvent, WorkflowSimpleFormBuilder, WorkflowSlotSchema, WorkflowStartBuilder, WorkflowStatusSchema, WorkflowTheme, WorkflowThemeSchema, checkbox, currency, date, file, formatAttributeValue, formula, getSystemAttributeList, group, isDefaultRole, isForbiddenError, isInstanceEvent, isNodeEvent, isNotFoundError, isParticipationEvent, isProtectedResourceError, isSchemaError, isSystemAttribute, isSystemAttributeObject, isValidationError, location, multiselect, number, object, phone, rating, relation, richtext, rollup, select, status, text, textarea, user, view, workflow };