@stndrds/schema 0.1.0-alpha.15 → 0.1.0-alpha.16

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.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { A as Attribute, S as StatusAttribute, a as SelectAttribute, M as MultiselectAttribute, P as Phone, C as Currency, L as Location, b as SystemResource, c as SystemAction, O as ObjectAction, T as TextAttribute, d as TextAreaAttribute, N as NumberAttribute, e as CheckboxAttribute, D as DateAttribute, f as PhoneAttribute, g as CurrencyAttribute, h as Option, i as LocationAttribute, j as TimestampAttribute, F as FileAttribute, U as UserAttribute, k as SingleRelationAttribute, l as MultiRelationAttribute, R as RelationTarget, m as RatingAttribute, n as ObjectDefinition, o as Field, p as AttributeGroupField, G as Group, V as ViewDefinition, q as Tab } from './runtime-DUxWyRcq.mjs';
2
- export { cf as AddAttributeInput, ak as AdvancedFilterState, aP as AssignRoleInput, bV as AttributeChange, t as AttributeGroup, r as AttributeType, c2 as AttributesRepository, K as AuditAction, Q as AuditActorType, W as AuditChange, Z as AuditListOptions, X as AuditLogEntry, c7 as AuditRepository, J as AuditResourceType, ca as AuditService, _ as AuditServiceOptions, B as BaseAttribute, a6 as CheckboxFilterOperator, aD as CompletionStatus, Y as CreateAuditLogInput, ce as CreateCustomObjectInput, cP as CreateDBAttribute, cL as CreateDBObject, cZ as CreateDBView, a2 as CreateFile, cS as CreateObjectRecord, aO as CreatePermissionInput, aM as CreateRoleInput, aT as CreateUserProfile, cv as CreateViewInput, ad as CurrencyFilterValue, aY as CustomTab, cO as DBAttribute, cK as DBObject, cY as DBView, cG as DEFAULT_LABEL_FALLBACK, bU as DatabaseAdapter, a7 as DateFilterOperator, v as DateFormat, w as DateValue, z as DocumentFace, y as DocumentType, E as DocumentTypeConfig, aJ as EffectivePermissions, a1 as File, cX as FileListOptions, cb as FileService, H as FileVerificationConfig, a0 as FileVisibility, c4 as FilesRepository, ah as FilterCombinator, aj as FilterGroup, ab as FilterOperator, ag as FilterRule, ai as FilterState, af as FilterValue, aW as FormTab, cE as FullSyncOptions, cD as FullSyncResult, az as GeocodingAdapter, aw as GeocodingAutocompleteParams, ay as GeocodingParams, cc as GeocodingService, av as GeocodingSuggestion, cr as GetRelationOptionsParams, cV as GlobalSearchOptions, cW as GlobalSearchResultItem, cd as GlobalSearchService, bW as HookContext, bX as HookDefinition, bY as HookHandler, b$ as HookRegistry, bZ as HookType, cT as ListOptions, x as LocationGranularity, a9 as MultiselectFilterOperator, at as NO_VALUE_OPERATORS, as as NoValueOperator, aA as NoopGeocodingAdapter, b_ as NoopHookRegistry, a5 as NumberFilterOperator, u as NumberUnit, ar as OPERATORS_BY_TYPE, aC as ObjectAttribute, aK as ObjectPermissions, aE as ObjectRecord, c5 as ObjectRecordsRepository, ci as ObjectSchemaService, ch as ObjectSchemaServiceOptions, c1 as ObjectsRepository, d0 as OperationResult, aH as Permission, aF as PermissionScope, ck as PermissionService, cj as PermissionServiceOptions, c8 as PermissionsRepository, ae as PhoneFilterValue, aq as QueryState, cm as RecordService, cl as RecordServiceOptions, I as RelationAttribute, aa as RelationFilterOperator, cp as RelationOption, cq as RelationOptionsResponse, cs as RelationService, co as RelationValidationError, cn as RelationValidationResult, ac as RelativeDateValue, ax as ReverseGeocodingParams, aG as Role, cU as SearchOptions, a8 as SelectFilterOperator, ao as SortDirection, ap as SortRule, s as StatusGroup, $ as StorageProvider, cz as SyncOptions, cy as SyncResult, aL as SystemPermissions, aV as TabType, aX as TableTab, b1 as TenantId, a4 as TextFilterOperator, aB as Timestamps, cQ as UpdateDBAttribute, cM as UpdateDBObject, c_ as UpdateDBView, a3 as UpdateFile, cg as UpdateObjectInput, aN as UpdateRoleInput, aU as UpdateUserProfile, cw as UpdateViewInput, cR as UpsertDBAttribute, cN as UpsertDBObject, c$ as UpsertDBView, aS as UserProfile, cu as UserProfileService, ct as UserProfileServiceOptions, c3 as UserProfilesRepository, aQ as UserRole, aI as UserRoleAssignment, aR as UserStatus, b0 as Uuid, bK as ValidationResult, cx as ViewService, d2 as ViewSyncOptions, d1 as ViewSyncResult, c6 as ViewsRepository, bm as attributeConfigSchemas, c9 as buildAuditChanges, b9 as checkboxConfigSchema, bT as computeRecordStatus, bI as createAttributeValidator, bt as createCheckboxValidator, bw as createCurrencyValidator, bu as createDateValidator, bO as createDraftValidator, bC as createFileValidator, bA as createLocationValidator, c0 as createMockAdapter, bF as createMultiRelationValidator, bz as createMultiselectValidator, bs as createNumberValidator, bJ as createObjectValidator, bv as createPhoneValidator, bH as createRatingValidator, bG as createRelationValidator, by as createSelectValidator, bE as createSingleRelationValidator, bx as createStatusValidator, br as createTextValidator, bB as createTimestampValidator, bD as createUserValidator, bc as currencyConfigSchema, ba as dateConfigSchema, cJ as extractAttributeNames, bi as fileConfigSchema, b2 as generateId, b3 as generatePrefixedId, bn as getAttributeConfigSchema, bR as getMissingRequiredAttributes, cC as getSyncPreview, d5 as getViewSyncPreview, al as isAdvancedFilterState, a$ as isCustomTab, aZ as isFormTab, cI as isLabelExpression, au as isNoValueOperator, bS as isRecordComplete, a_ as isTableTab, be as locationConfigSchema, bh as multiselectConfigSchema, b8 as numberConfigSchema, bp as parseAttributeConfig, bb as phoneConfigSchema, bl as ratingConfigSchema, b4 as registry, bk as relationConfigSchema, cH as renderLabelExpression, bq as safeParseAttributeConfig, bg as selectConfigSchema, bd as statusConfigSchema, cF as syncAll, cA as syncNativeObjects, d3 as syncNativeViews, b6 as textConfigSchema, b7 as textareaConfigSchema, bf as timestampConfigSchema, am as toAdvancedFilterState, an as toSimpleFilterState, bj as userConfigSchema, bL as validateAttribute, bo as validateAttributeConfig, bP as validateDraft, bQ as validateDraftOrThrow, bM as validateObject, bN as validateObjectOrThrow, cB as verifyNativeObjectsSync, d4 as verifyNativeViewsSync, b5 as viewRegistry } from './runtime-DUxWyRcq.mjs';
3
- import { IconName, CountryIso3, CurrencyCode, MimeType } from '@stndrds/constants';
1
+ import { A as Attribute, S as StatusAttribute, a as SelectAttribute, M as MultiselectAttribute, P as Phone, C as Currency, L as Location, b as SystemResource, c as SystemAction, O as ObjectAction, T as TextAttribute, d as TextAreaAttribute, N as NumberAttribute, e as CheckboxAttribute, D as DateAttribute, f as PhoneAttribute, g as CurrencyAttribute, h as Option, i as LocationAttribute, j as TimestampAttribute, F as FileAttribute, U as UserAttribute, k as SingleRelationAttribute, l as MultiRelationAttribute, R as RelationTarget, m as RatingAttribute, n as FlowDefinition, o as FlowPage, p as FlowRow, q as ObjectDefinition, r as Field, s as AttributeGroupField, G as Group, V as ViewDefinition, t as Tab } from './runtime-DlCiIIfr.mjs';
2
+ export { ct as AddAttributeInput, an as AdvancedFilterState, aZ as AssignRoleInput, c3 as AttributeChange, w as AttributeGroup, u as AttributeType, cc as AttributesRepository, X as AuditAction, Y as AuditActorType, Z as AuditChange, a0 as AuditListOptions, _ as AuditLogEntry, ci as AuditRepository, W as AuditResourceType, cl as AuditService, a1 as AuditServiceOptions, B as BaseAttribute, a9 as CheckboxFilterOperator, aN as CompletionStatus, $ as CreateAuditLogInput, cs as CreateCustomObjectInput, d1 as CreateDBAttribute, df as CreateDBFlow, cZ as CreateDBObject, db as CreateDBView, a5 as CreateFile, cn as CreateFlowInput, d4 as CreateObjectRecord, aY as CreatePermissionInput, aW as CreateRoleInput, b1 as CreateUserProfile, cJ as CreateViewInput, ag as CurrencyFilterValue, b6 as CustomTab, d0 as DBAttribute, de as DBFlow, cY as DBObject, da as DBView, cU as DEFAULT_LABEL_FALLBACK, c2 as DatabaseAdapter, aa as DateFilterOperator, y as DateFormat, z as DateValue, I as DocumentFace, H as DocumentType, J as DocumentTypeConfig, aT as EffectivePermissions, a4 as File, d9 as FileListOptions, cm as FileService, K as FileVerificationConfig, a3 as FileVisibility, ce as FilesRepository, ak as FilterCombinator, am as FilterGroup, ae as FilterOperator, aj as FilterRule, al as FilterState, ai as FilterValue, aA as FlowRelation, az as FlowRowField, cp as FlowService, ay as FlowSlot, aB as FlowStatus, ch as FlowsRepository, b4 as FormTab, cS as FullSyncOptions, cR as FullSyncResult, aJ as GeocodingAdapter, aG as GeocodingAutocompleteParams, aI as GeocodingParams, cq as GeocodingService, aF as GeocodingSuggestion, cF as GetRelationOptionsParams, d7 as GlobalSearchOptions, d8 as GlobalSearchResultItem, cr as GlobalSearchService, c4 as HookContext, c5 as HookDefinition, c6 as HookHandler, c9 as HookRegistry, c7 as HookType, d5 as ListOptions, E as LocationGranularity, ac as MultiselectFilterOperator, aw as NO_VALUE_OPERATORS, av as NoValueOperator, aK as NoopGeocodingAdapter, c8 as NoopHookRegistry, a8 as NumberFilterOperator, x as NumberUnit, au as OPERATORS_BY_TYPE, aM as ObjectAttribute, aU as ObjectPermissions, aO as ObjectRecord, cf as ObjectRecordsRepository, cw as ObjectSchemaService, cv as ObjectSchemaServiceOptions, cb as ObjectsRepository, dh as OperationResult, aR as Permission, aP as PermissionScope, cy as PermissionService, cx as PermissionServiceOptions, cj as PermissionsRepository, ah as PhoneFilterValue, at as QueryState, cA as RecordService, cz as RecordServiceOptions, Q as RelationAttribute, ad as RelationFilterOperator, cD as RelationOption, cE as RelationOptionsResponse, cG as RelationService, cC as RelationValidationError, cB as RelationValidationResult, af as RelativeDateValue, aH as ReverseGeocodingParams, aQ as Role, d6 as SearchOptions, ab as SelectFilterOperator, ar as SortDirection, as as SortRule, v as StatusGroup, a2 as StorageProvider, cN as SyncOptions, cM as SyncResult, aV as SystemPermissions, b3 as TabType, b5 as TableTab, bb as TenantId, a7 as TextFilterOperator, aL as Timestamps, d2 as UpdateDBAttribute, dg as UpdateDBFlow, c_ as UpdateDBObject, dc as UpdateDBView, a6 as UpdateFile, co as UpdateFlowInput, cu as UpdateObjectInput, aX as UpdateRoleInput, b2 as UpdateUserProfile, cK as UpdateViewInput, d3 as UpsertDBAttribute, c$ as UpsertDBObject, dd as UpsertDBView, b0 as UserProfile, cI as UserProfileService, cH as UserProfileServiceOptions, cd as UserProfilesRepository, a_ as UserRole, aS as UserRoleAssignment, a$ as UserStatus, ba as Uuid, bU as ValidationResult, cL as ViewService, dj as ViewSyncOptions, di as ViewSyncResult, cg as ViewsRepository, bw as attributeConfigSchemas, ck as buildAuditChanges, bj as checkboxConfigSchema, c1 as computeRecordStatus, bS as createAttributeValidator, bD as createCheckboxValidator, bG as createCurrencyValidator, bE as createDateValidator, bY as createDraftValidator, bM as createFileValidator, bK as createLocationValidator, ca as createMockAdapter, bP as createMultiRelationValidator, bJ as createMultiselectValidator, bC as createNumberValidator, bT as createObjectValidator, bF as createPhoneValidator, bR as createRatingValidator, bQ as createRelationValidator, bI as createSelectValidator, bO as createSingleRelationValidator, bH as createStatusValidator, bB as createTextValidator, bL as createTimestampValidator, bN as createUserValidator, bm as currencyConfigSchema, bk as dateConfigSchema, cX as extractAttributeNames, bs as fileConfigSchema, bc as generateId, bd as generatePrefixedId, bx as getAttributeConfigSchema, b$ as getMissingRequiredAttributes, cQ as getSyncPreview, dm as getViewSyncPreview, ao as isAdvancedFilterState, b9 as isCustomTab, aC as isFlowDefinition, aD as isFlowPublished, b7 as isFormTab, cW as isLabelExpression, ax as isNoValueOperator, c0 as isRecordComplete, aE as isSystemFlow, b8 as isTableTab, bo as locationConfigSchema, br as multiselectConfigSchema, bi as numberConfigSchema, bz as parseAttributeConfig, bl as phoneConfigSchema, bv as ratingConfigSchema, be as registry, bu as relationConfigSchema, cV as renderLabelExpression, bA as safeParseAttributeConfig, bq as selectConfigSchema, bn as statusConfigSchema, cT as syncAll, cO as syncNativeObjects, dk as syncNativeViews, bg as textConfigSchema, bh as textareaConfigSchema, bp as timestampConfigSchema, ap as toAdvancedFilterState, aq as toSimpleFilterState, bt as userConfigSchema, bV as validateAttribute, by as validateAttributeConfig, bZ as validateDraft, b_ as validateDraftOrThrow, bW as validateObject, bX as validateObjectOrThrow, cP as verifyNativeObjectsSync, dl as verifyNativeViewsSync, bf as viewRegistry } from './runtime-DlCiIIfr.mjs';
3
+ import { IconName, CountryIso3, CurrencyCode, MimeType, ColorId } from '@stndrds/constants';
4
4
  import 'zod';
5
5
 
6
6
  /**
@@ -917,6 +917,231 @@ type ExtractAttributeRequired<T> = T extends {
917
917
  };
918
918
  } ? R : false;
919
919
 
920
+ /**
921
+ * Builder for creating flow rows with fields
922
+ */
923
+ declare class FlowRowBuilder {
924
+ private pageBuilder;
925
+ private rowData;
926
+ /** @internal */
927
+ constructor(pageBuilder: FlowPageBuilder, id: string, order: number);
928
+ /**
929
+ * Add a field to the current row
930
+ *
931
+ * @param slotId - Reference to a slot defined with .slot()
932
+ * @param attribute - Attribute name on the object
933
+ * @param options - Optional field configuration
934
+ *
935
+ * @example
936
+ * ```typescript
937
+ * .row("row-1")
938
+ * .field("mr", "firstName")
939
+ * .field("mr", "lastName")
940
+ * ```
941
+ */
942
+ field(slotId: string, attribute: string, options?: {
943
+ label?: string;
944
+ required?: boolean;
945
+ }): this;
946
+ /**
947
+ * Start a new row on the same page
948
+ */
949
+ row(id: string): FlowRowBuilder;
950
+ /**
951
+ * Start a new page
952
+ */
953
+ page(id: string, label: string, description?: string): FlowPageBuilder;
954
+ /**
955
+ * Build the final flow definition
956
+ */
957
+ build(): FlowDefinition;
958
+ }
959
+ /**
960
+ * Builder for creating flow pages with rows
961
+ */
962
+ declare class FlowPageBuilder {
963
+ private flow;
964
+ private pageData;
965
+ private rowOrder;
966
+ /** @internal */
967
+ constructor(flow: FlowBuilder, id: string, label: string, description?: string);
968
+ /**
969
+ * Add a row to the current page
970
+ *
971
+ * @param id - Unique row identifier
972
+ *
973
+ * @example
974
+ * ```typescript
975
+ * .page("identity", "Identité")
976
+ * .row("name-row")
977
+ * .field("mr", "firstName")
978
+ * .field("mr", "lastName")
979
+ * .row("email-row")
980
+ * .field("mr", "email")
981
+ * ```
982
+ */
983
+ row(id: string): FlowRowBuilder;
984
+ /**
985
+ * Start a new page
986
+ */
987
+ page(id: string, label: string, description?: string): FlowPageBuilder;
988
+ /**
989
+ * Build the final flow definition
990
+ */
991
+ build(): FlowDefinition;
992
+ /** @internal */
993
+ _finalizeRow(row: FlowRow): this;
994
+ /** @internal */
995
+ _getFlow(): FlowBuilder;
996
+ /** @internal */
997
+ _getPageData(): FlowPage;
998
+ }
999
+ /**
1000
+ * Fluent builder for creating FlowDefinition with validation
1001
+ *
1002
+ * @example
1003
+ * ```typescript
1004
+ * const COUPLE_FLOW = flow("couple-creation", "Création Couple")
1005
+ * .description("Create a couple with company")
1006
+ * .slot("mr", "contacts", "Monsieur", { color: "blue" })
1007
+ * .slot("mme", "contacts", "Madame", { color: "pink" })
1008
+ * .slot("company", "companies", "Entreprise", { color: "green" })
1009
+ * .relation("mr", "company", "company")
1010
+ * .relation("mme", "company", "company")
1011
+ * .page("identity", "Identité")
1012
+ * .row("mr-name")
1013
+ * .field("mr", "firstName")
1014
+ * .field("mr", "lastName")
1015
+ * .row("mme-name")
1016
+ * .field("mme", "firstName")
1017
+ * .field("mme", "lastName")
1018
+ * .page("company", "Entreprise")
1019
+ * .row("company-name")
1020
+ * .field("company", "name")
1021
+ * .row("company-siret")
1022
+ * .field("company", "siret")
1023
+ * .build();
1024
+ * ```
1025
+ */
1026
+ declare class FlowBuilder {
1027
+ private data;
1028
+ constructor(name: string, label: string);
1029
+ /**
1030
+ * Set flow description
1031
+ */
1032
+ description(value: string): this;
1033
+ /**
1034
+ * Set flow icon
1035
+ */
1036
+ icon(value: IconName): this;
1037
+ /**
1038
+ * Set extensible metadata
1039
+ */
1040
+ metadata(value: Record<string, unknown>): this;
1041
+ /**
1042
+ * Add a slot (object to create in the flow)
1043
+ *
1044
+ * @param id - Unique slot identifier (used to reference in fields and relations)
1045
+ * @param objectName - Name of the object to create
1046
+ * @param label - Display label for the slot
1047
+ * @param options - Optional slot configuration
1048
+ *
1049
+ * @example
1050
+ * ```typescript
1051
+ * .slot("mr", "contacts", "Monsieur", { color: "blue", icon: "user" })
1052
+ * .slot("company", "companies", "Entreprise", { color: "green" })
1053
+ * ```
1054
+ */
1055
+ slot(id: string, objectName: string, label: string, options?: {
1056
+ color?: ColorId;
1057
+ icon?: IconName;
1058
+ }): this;
1059
+ /**
1060
+ * Define a relation between two slots
1061
+ * The source slot will be linked to the target slot via the specified attribute
1062
+ *
1063
+ * @param sourceSlotId - Slot that has the relation attribute
1064
+ * @param sourceAttribute - Relation attribute name on the source
1065
+ * @param targetSlotId - Target slot to link to
1066
+ *
1067
+ * @example
1068
+ * ```typescript
1069
+ * // mr.company → company (the contact's company field will be set to the created company)
1070
+ * .relation("mr", "company", "company")
1071
+ * ```
1072
+ */
1073
+ relation(sourceSlotId: string, sourceAttribute: string, targetSlotId: string): this;
1074
+ /**
1075
+ * Start a new page/step in the flow
1076
+ *
1077
+ * @param id - Unique page identifier
1078
+ * @param label - Display label
1079
+ * @param description - Optional description
1080
+ *
1081
+ * @example
1082
+ * ```typescript
1083
+ * .page("identity", "Identité", "Informations personnelles")
1084
+ * .row("name")
1085
+ * .field("mr", "firstName")
1086
+ * .field("mr", "lastName")
1087
+ * ```
1088
+ */
1089
+ page(id: string, label: string, description?: string): FlowPageBuilder;
1090
+ /**
1091
+ * Build and validate the flow definition
1092
+ *
1093
+ * @throws Error if validation fails
1094
+ */
1095
+ build(): FlowDefinition;
1096
+ /**
1097
+ * Validate that required data is present
1098
+ */
1099
+ private validateRequiredData;
1100
+ /**
1101
+ * Validate that all field slotId references exist
1102
+ */
1103
+ private validateFieldReferences;
1104
+ /**
1105
+ * Validate that all relation references exist and are valid
1106
+ */
1107
+ private validateRelationReferences;
1108
+ /**
1109
+ * @internal Used by FlowPageBuilder to finalize a page
1110
+ */
1111
+ _finalizePage(page: FlowPage): this;
1112
+ /**
1113
+ * Validate flow name format (kebab-case)
1114
+ */
1115
+ private validateName;
1116
+ /**
1117
+ * Validate that there are no circular dependencies in relations
1118
+ * Uses DFS to detect cycles in the dependency graph
1119
+ */
1120
+ private validateNoCircularDependencies;
1121
+ }
1122
+ /**
1123
+ * Create a new flow builder
1124
+ *
1125
+ * @param name - Flow name (kebab-case)
1126
+ * @param label - Display label
1127
+ *
1128
+ * @example
1129
+ * ```typescript
1130
+ * const COUPLE_FLOW = flow("couple-creation", "Création Couple")
1131
+ * .slot("mr", "contacts", "Monsieur")
1132
+ * .slot("mme", "contacts", "Madame")
1133
+ * .page("identity", "Identité")
1134
+ * .row("mr-name")
1135
+ * .field("mr", "firstName")
1136
+ * .field("mr", "lastName")
1137
+ * .row("mme-name")
1138
+ * .field("mme", "firstName")
1139
+ * .field("mme", "lastName")
1140
+ * .build();
1141
+ * ```
1142
+ */
1143
+ declare function flow(name: string, label: string): FlowBuilder;
1144
+
920
1145
  /**
921
1146
  * Extract attribute info from a builder instance
922
1147
  */
@@ -1397,4 +1622,4 @@ declare function view(name: string, label: string): ViewBuilder;
1397
1622
  */
1398
1623
  declare function group(id: string, label: string): GroupBuilder;
1399
1624
 
1400
- export { ALL_SYSTEM_RESOURCES, type AddAttribute$1 as AddAttribute, type AnyAttributeBuilder, Attribute, AttributeGroupField, AttributeInUseError, type AttributeMap, AttributeNotFoundError, type AttributeSchema, type AttributeUsage, type BuilderConfig, CheckboxAttribute, Currency, CurrencyAttribute, type CustomAttributeValue, CustomTabConfig, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, type DefaultRolePermissionConfig, DuplicateError, type ExtractAttributeName, type ExtractAttributeRequired, type ExtractAttributes, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, Field, FileAttribute, FileNotFoundError, ForbiddenError, Group, GroupBuilder, type InferAttributeValue, type InferRecord, type InferRecordFromSchema, type InferRecordInput, type InferRecordUpdate, type InferRecordWithRequirements, Location, LocationAttribute, MultiRelationAttribute, MultiselectAttribute, NotFoundError, NotSystemObjectError, NumberAttribute, ObjectAction, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, ObjectReferencedError, Option, Phone, PhoneAttribute, ProtectedResourceError, ProtectedRoleError, RatingAttribute, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationTarget, RoleNotFoundError, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SelectAttribute, SingleRelationAttribute, StatusAttribute, SyncError, SystemAction, SystemResource, Tab, TabBuilder, TableTabConfig, TextAreaAttribute, TextAttribute, TimestampAttribute, type TypedAttribute, type TypedBuilderConfig, UserAttribute, UserProfileNotFoundError, ValidationError, type ValidationErrorDetail, ViewBuilder, ViewDefinition, type WithCustomAttributes, checkbox, currency, date, file, group, isDefaultRole, isForbiddenError, isNotFoundError, isProtectedResourceError, isSchemaError, isValidationError, location, multiselect, number, object, phone, rating, relation, select, status, text, textarea, timestamp, user, view };
1625
+ export { ALL_SYSTEM_RESOURCES, type AddAttribute$1 as AddAttribute, type AnyAttributeBuilder, Attribute, AttributeGroupField, AttributeInUseError, type AttributeMap, AttributeNotFoundError, type AttributeSchema, type AttributeUsage, type BuilderConfig, CheckboxAttribute, Currency, CurrencyAttribute, type CustomAttributeValue, CustomTabConfig, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, type DefaultRolePermissionConfig, DuplicateError, type ExtractAttributeName, type ExtractAttributeRequired, type ExtractAttributes, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, Field, FileAttribute, FileNotFoundError, FlowBuilder, FlowDefinition, FlowPage, FlowPageBuilder, FlowRow, FlowRowBuilder, ForbiddenError, Group, GroupBuilder, type InferAttributeValue, type InferRecord, type InferRecordFromSchema, type InferRecordInput, type InferRecordUpdate, type InferRecordWithRequirements, Location, LocationAttribute, MultiRelationAttribute, MultiselectAttribute, NotFoundError, NotSystemObjectError, NumberAttribute, ObjectAction, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, ObjectReferencedError, Option, Phone, PhoneAttribute, ProtectedResourceError, ProtectedRoleError, RatingAttribute, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationTarget, RoleNotFoundError, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SelectAttribute, SingleRelationAttribute, StatusAttribute, SyncError, SystemAction, SystemResource, Tab, TabBuilder, TableTabConfig, TextAreaAttribute, TextAttribute, TimestampAttribute, type TypedAttribute, type TypedBuilderConfig, UserAttribute, UserProfileNotFoundError, ValidationError, type ValidationErrorDetail, ViewBuilder, ViewDefinition, type WithCustomAttributes, checkbox, currency, date, file, flow, group, isDefaultRole, isForbiddenError, isNotFoundError, isProtectedResourceError, isSchemaError, isValidationError, location, multiselect, number, object, phone, rating, relation, select, status, text, textarea, timestamp, user, view };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { A as Attribute, S as StatusAttribute, a as SelectAttribute, M as MultiselectAttribute, P as Phone, C as Currency, L as Location, b as SystemResource, c as SystemAction, O as ObjectAction, T as TextAttribute, d as TextAreaAttribute, N as NumberAttribute, e as CheckboxAttribute, D as DateAttribute, f as PhoneAttribute, g as CurrencyAttribute, h as Option, i as LocationAttribute, j as TimestampAttribute, F as FileAttribute, U as UserAttribute, k as SingleRelationAttribute, l as MultiRelationAttribute, R as RelationTarget, m as RatingAttribute, n as ObjectDefinition, o as Field, p as AttributeGroupField, G as Group, V as ViewDefinition, q as Tab } from './runtime-DUxWyRcq.js';
2
- export { cf as AddAttributeInput, ak as AdvancedFilterState, aP as AssignRoleInput, bV as AttributeChange, t as AttributeGroup, r as AttributeType, c2 as AttributesRepository, K as AuditAction, Q as AuditActorType, W as AuditChange, Z as AuditListOptions, X as AuditLogEntry, c7 as AuditRepository, J as AuditResourceType, ca as AuditService, _ as AuditServiceOptions, B as BaseAttribute, a6 as CheckboxFilterOperator, aD as CompletionStatus, Y as CreateAuditLogInput, ce as CreateCustomObjectInput, cP as CreateDBAttribute, cL as CreateDBObject, cZ as CreateDBView, a2 as CreateFile, cS as CreateObjectRecord, aO as CreatePermissionInput, aM as CreateRoleInput, aT as CreateUserProfile, cv as CreateViewInput, ad as CurrencyFilterValue, aY as CustomTab, cO as DBAttribute, cK as DBObject, cY as DBView, cG as DEFAULT_LABEL_FALLBACK, bU as DatabaseAdapter, a7 as DateFilterOperator, v as DateFormat, w as DateValue, z as DocumentFace, y as DocumentType, E as DocumentTypeConfig, aJ as EffectivePermissions, a1 as File, cX as FileListOptions, cb as FileService, H as FileVerificationConfig, a0 as FileVisibility, c4 as FilesRepository, ah as FilterCombinator, aj as FilterGroup, ab as FilterOperator, ag as FilterRule, ai as FilterState, af as FilterValue, aW as FormTab, cE as FullSyncOptions, cD as FullSyncResult, az as GeocodingAdapter, aw as GeocodingAutocompleteParams, ay as GeocodingParams, cc as GeocodingService, av as GeocodingSuggestion, cr as GetRelationOptionsParams, cV as GlobalSearchOptions, cW as GlobalSearchResultItem, cd as GlobalSearchService, bW as HookContext, bX as HookDefinition, bY as HookHandler, b$ as HookRegistry, bZ as HookType, cT as ListOptions, x as LocationGranularity, a9 as MultiselectFilterOperator, at as NO_VALUE_OPERATORS, as as NoValueOperator, aA as NoopGeocodingAdapter, b_ as NoopHookRegistry, a5 as NumberFilterOperator, u as NumberUnit, ar as OPERATORS_BY_TYPE, aC as ObjectAttribute, aK as ObjectPermissions, aE as ObjectRecord, c5 as ObjectRecordsRepository, ci as ObjectSchemaService, ch as ObjectSchemaServiceOptions, c1 as ObjectsRepository, d0 as OperationResult, aH as Permission, aF as PermissionScope, ck as PermissionService, cj as PermissionServiceOptions, c8 as PermissionsRepository, ae as PhoneFilterValue, aq as QueryState, cm as RecordService, cl as RecordServiceOptions, I as RelationAttribute, aa as RelationFilterOperator, cp as RelationOption, cq as RelationOptionsResponse, cs as RelationService, co as RelationValidationError, cn as RelationValidationResult, ac as RelativeDateValue, ax as ReverseGeocodingParams, aG as Role, cU as SearchOptions, a8 as SelectFilterOperator, ao as SortDirection, ap as SortRule, s as StatusGroup, $ as StorageProvider, cz as SyncOptions, cy as SyncResult, aL as SystemPermissions, aV as TabType, aX as TableTab, b1 as TenantId, a4 as TextFilterOperator, aB as Timestamps, cQ as UpdateDBAttribute, cM as UpdateDBObject, c_ as UpdateDBView, a3 as UpdateFile, cg as UpdateObjectInput, aN as UpdateRoleInput, aU as UpdateUserProfile, cw as UpdateViewInput, cR as UpsertDBAttribute, cN as UpsertDBObject, c$ as UpsertDBView, aS as UserProfile, cu as UserProfileService, ct as UserProfileServiceOptions, c3 as UserProfilesRepository, aQ as UserRole, aI as UserRoleAssignment, aR as UserStatus, b0 as Uuid, bK as ValidationResult, cx as ViewService, d2 as ViewSyncOptions, d1 as ViewSyncResult, c6 as ViewsRepository, bm as attributeConfigSchemas, c9 as buildAuditChanges, b9 as checkboxConfigSchema, bT as computeRecordStatus, bI as createAttributeValidator, bt as createCheckboxValidator, bw as createCurrencyValidator, bu as createDateValidator, bO as createDraftValidator, bC as createFileValidator, bA as createLocationValidator, c0 as createMockAdapter, bF as createMultiRelationValidator, bz as createMultiselectValidator, bs as createNumberValidator, bJ as createObjectValidator, bv as createPhoneValidator, bH as createRatingValidator, bG as createRelationValidator, by as createSelectValidator, bE as createSingleRelationValidator, bx as createStatusValidator, br as createTextValidator, bB as createTimestampValidator, bD as createUserValidator, bc as currencyConfigSchema, ba as dateConfigSchema, cJ as extractAttributeNames, bi as fileConfigSchema, b2 as generateId, b3 as generatePrefixedId, bn as getAttributeConfigSchema, bR as getMissingRequiredAttributes, cC as getSyncPreview, d5 as getViewSyncPreview, al as isAdvancedFilterState, a$ as isCustomTab, aZ as isFormTab, cI as isLabelExpression, au as isNoValueOperator, bS as isRecordComplete, a_ as isTableTab, be as locationConfigSchema, bh as multiselectConfigSchema, b8 as numberConfigSchema, bp as parseAttributeConfig, bb as phoneConfigSchema, bl as ratingConfigSchema, b4 as registry, bk as relationConfigSchema, cH as renderLabelExpression, bq as safeParseAttributeConfig, bg as selectConfigSchema, bd as statusConfigSchema, cF as syncAll, cA as syncNativeObjects, d3 as syncNativeViews, b6 as textConfigSchema, b7 as textareaConfigSchema, bf as timestampConfigSchema, am as toAdvancedFilterState, an as toSimpleFilterState, bj as userConfigSchema, bL as validateAttribute, bo as validateAttributeConfig, bP as validateDraft, bQ as validateDraftOrThrow, bM as validateObject, bN as validateObjectOrThrow, cB as verifyNativeObjectsSync, d4 as verifyNativeViewsSync, b5 as viewRegistry } from './runtime-DUxWyRcq.js';
3
- import { IconName, CountryIso3, CurrencyCode, MimeType } from '@stndrds/constants';
1
+ import { A as Attribute, S as StatusAttribute, a as SelectAttribute, M as MultiselectAttribute, P as Phone, C as Currency, L as Location, b as SystemResource, c as SystemAction, O as ObjectAction, T as TextAttribute, d as TextAreaAttribute, N as NumberAttribute, e as CheckboxAttribute, D as DateAttribute, f as PhoneAttribute, g as CurrencyAttribute, h as Option, i as LocationAttribute, j as TimestampAttribute, F as FileAttribute, U as UserAttribute, k as SingleRelationAttribute, l as MultiRelationAttribute, R as RelationTarget, m as RatingAttribute, n as FlowDefinition, o as FlowPage, p as FlowRow, q as ObjectDefinition, r as Field, s as AttributeGroupField, G as Group, V as ViewDefinition, t as Tab } from './runtime-DlCiIIfr.js';
2
+ export { ct as AddAttributeInput, an as AdvancedFilterState, aZ as AssignRoleInput, c3 as AttributeChange, w as AttributeGroup, u as AttributeType, cc as AttributesRepository, X as AuditAction, Y as AuditActorType, Z as AuditChange, a0 as AuditListOptions, _ as AuditLogEntry, ci as AuditRepository, W as AuditResourceType, cl as AuditService, a1 as AuditServiceOptions, B as BaseAttribute, a9 as CheckboxFilterOperator, aN as CompletionStatus, $ as CreateAuditLogInput, cs as CreateCustomObjectInput, d1 as CreateDBAttribute, df as CreateDBFlow, cZ as CreateDBObject, db as CreateDBView, a5 as CreateFile, cn as CreateFlowInput, d4 as CreateObjectRecord, aY as CreatePermissionInput, aW as CreateRoleInput, b1 as CreateUserProfile, cJ as CreateViewInput, ag as CurrencyFilterValue, b6 as CustomTab, d0 as DBAttribute, de as DBFlow, cY as DBObject, da as DBView, cU as DEFAULT_LABEL_FALLBACK, c2 as DatabaseAdapter, aa as DateFilterOperator, y as DateFormat, z as DateValue, I as DocumentFace, H as DocumentType, J as DocumentTypeConfig, aT as EffectivePermissions, a4 as File, d9 as FileListOptions, cm as FileService, K as FileVerificationConfig, a3 as FileVisibility, ce as FilesRepository, ak as FilterCombinator, am as FilterGroup, ae as FilterOperator, aj as FilterRule, al as FilterState, ai as FilterValue, aA as FlowRelation, az as FlowRowField, cp as FlowService, ay as FlowSlot, aB as FlowStatus, ch as FlowsRepository, b4 as FormTab, cS as FullSyncOptions, cR as FullSyncResult, aJ as GeocodingAdapter, aG as GeocodingAutocompleteParams, aI as GeocodingParams, cq as GeocodingService, aF as GeocodingSuggestion, cF as GetRelationOptionsParams, d7 as GlobalSearchOptions, d8 as GlobalSearchResultItem, cr as GlobalSearchService, c4 as HookContext, c5 as HookDefinition, c6 as HookHandler, c9 as HookRegistry, c7 as HookType, d5 as ListOptions, E as LocationGranularity, ac as MultiselectFilterOperator, aw as NO_VALUE_OPERATORS, av as NoValueOperator, aK as NoopGeocodingAdapter, c8 as NoopHookRegistry, a8 as NumberFilterOperator, x as NumberUnit, au as OPERATORS_BY_TYPE, aM as ObjectAttribute, aU as ObjectPermissions, aO as ObjectRecord, cf as ObjectRecordsRepository, cw as ObjectSchemaService, cv as ObjectSchemaServiceOptions, cb as ObjectsRepository, dh as OperationResult, aR as Permission, aP as PermissionScope, cy as PermissionService, cx as PermissionServiceOptions, cj as PermissionsRepository, ah as PhoneFilterValue, at as QueryState, cA as RecordService, cz as RecordServiceOptions, Q as RelationAttribute, ad as RelationFilterOperator, cD as RelationOption, cE as RelationOptionsResponse, cG as RelationService, cC as RelationValidationError, cB as RelationValidationResult, af as RelativeDateValue, aH as ReverseGeocodingParams, aQ as Role, d6 as SearchOptions, ab as SelectFilterOperator, ar as SortDirection, as as SortRule, v as StatusGroup, a2 as StorageProvider, cN as SyncOptions, cM as SyncResult, aV as SystemPermissions, b3 as TabType, b5 as TableTab, bb as TenantId, a7 as TextFilterOperator, aL as Timestamps, d2 as UpdateDBAttribute, dg as UpdateDBFlow, c_ as UpdateDBObject, dc as UpdateDBView, a6 as UpdateFile, co as UpdateFlowInput, cu as UpdateObjectInput, aX as UpdateRoleInput, b2 as UpdateUserProfile, cK as UpdateViewInput, d3 as UpsertDBAttribute, c$ as UpsertDBObject, dd as UpsertDBView, b0 as UserProfile, cI as UserProfileService, cH as UserProfileServiceOptions, cd as UserProfilesRepository, a_ as UserRole, aS as UserRoleAssignment, a$ as UserStatus, ba as Uuid, bU as ValidationResult, cL as ViewService, dj as ViewSyncOptions, di as ViewSyncResult, cg as ViewsRepository, bw as attributeConfigSchemas, ck as buildAuditChanges, bj as checkboxConfigSchema, c1 as computeRecordStatus, bS as createAttributeValidator, bD as createCheckboxValidator, bG as createCurrencyValidator, bE as createDateValidator, bY as createDraftValidator, bM as createFileValidator, bK as createLocationValidator, ca as createMockAdapter, bP as createMultiRelationValidator, bJ as createMultiselectValidator, bC as createNumberValidator, bT as createObjectValidator, bF as createPhoneValidator, bR as createRatingValidator, bQ as createRelationValidator, bI as createSelectValidator, bO as createSingleRelationValidator, bH as createStatusValidator, bB as createTextValidator, bL as createTimestampValidator, bN as createUserValidator, bm as currencyConfigSchema, bk as dateConfigSchema, cX as extractAttributeNames, bs as fileConfigSchema, bc as generateId, bd as generatePrefixedId, bx as getAttributeConfigSchema, b$ as getMissingRequiredAttributes, cQ as getSyncPreview, dm as getViewSyncPreview, ao as isAdvancedFilterState, b9 as isCustomTab, aC as isFlowDefinition, aD as isFlowPublished, b7 as isFormTab, cW as isLabelExpression, ax as isNoValueOperator, c0 as isRecordComplete, aE as isSystemFlow, b8 as isTableTab, bo as locationConfigSchema, br as multiselectConfigSchema, bi as numberConfigSchema, bz as parseAttributeConfig, bl as phoneConfigSchema, bv as ratingConfigSchema, be as registry, bu as relationConfigSchema, cV as renderLabelExpression, bA as safeParseAttributeConfig, bq as selectConfigSchema, bn as statusConfigSchema, cT as syncAll, cO as syncNativeObjects, dk as syncNativeViews, bg as textConfigSchema, bh as textareaConfigSchema, bp as timestampConfigSchema, ap as toAdvancedFilterState, aq as toSimpleFilterState, bt as userConfigSchema, bV as validateAttribute, by as validateAttributeConfig, bZ as validateDraft, b_ as validateDraftOrThrow, bW as validateObject, bX as validateObjectOrThrow, cP as verifyNativeObjectsSync, dl as verifyNativeViewsSync, bf as viewRegistry } from './runtime-DlCiIIfr.js';
3
+ import { IconName, CountryIso3, CurrencyCode, MimeType, ColorId } from '@stndrds/constants';
4
4
  import 'zod';
5
5
 
6
6
  /**
@@ -917,6 +917,231 @@ type ExtractAttributeRequired<T> = T extends {
917
917
  };
918
918
  } ? R : false;
919
919
 
920
+ /**
921
+ * Builder for creating flow rows with fields
922
+ */
923
+ declare class FlowRowBuilder {
924
+ private pageBuilder;
925
+ private rowData;
926
+ /** @internal */
927
+ constructor(pageBuilder: FlowPageBuilder, id: string, order: number);
928
+ /**
929
+ * Add a field to the current row
930
+ *
931
+ * @param slotId - Reference to a slot defined with .slot()
932
+ * @param attribute - Attribute name on the object
933
+ * @param options - Optional field configuration
934
+ *
935
+ * @example
936
+ * ```typescript
937
+ * .row("row-1")
938
+ * .field("mr", "firstName")
939
+ * .field("mr", "lastName")
940
+ * ```
941
+ */
942
+ field(slotId: string, attribute: string, options?: {
943
+ label?: string;
944
+ required?: boolean;
945
+ }): this;
946
+ /**
947
+ * Start a new row on the same page
948
+ */
949
+ row(id: string): FlowRowBuilder;
950
+ /**
951
+ * Start a new page
952
+ */
953
+ page(id: string, label: string, description?: string): FlowPageBuilder;
954
+ /**
955
+ * Build the final flow definition
956
+ */
957
+ build(): FlowDefinition;
958
+ }
959
+ /**
960
+ * Builder for creating flow pages with rows
961
+ */
962
+ declare class FlowPageBuilder {
963
+ private flow;
964
+ private pageData;
965
+ private rowOrder;
966
+ /** @internal */
967
+ constructor(flow: FlowBuilder, id: string, label: string, description?: string);
968
+ /**
969
+ * Add a row to the current page
970
+ *
971
+ * @param id - Unique row identifier
972
+ *
973
+ * @example
974
+ * ```typescript
975
+ * .page("identity", "Identité")
976
+ * .row("name-row")
977
+ * .field("mr", "firstName")
978
+ * .field("mr", "lastName")
979
+ * .row("email-row")
980
+ * .field("mr", "email")
981
+ * ```
982
+ */
983
+ row(id: string): FlowRowBuilder;
984
+ /**
985
+ * Start a new page
986
+ */
987
+ page(id: string, label: string, description?: string): FlowPageBuilder;
988
+ /**
989
+ * Build the final flow definition
990
+ */
991
+ build(): FlowDefinition;
992
+ /** @internal */
993
+ _finalizeRow(row: FlowRow): this;
994
+ /** @internal */
995
+ _getFlow(): FlowBuilder;
996
+ /** @internal */
997
+ _getPageData(): FlowPage;
998
+ }
999
+ /**
1000
+ * Fluent builder for creating FlowDefinition with validation
1001
+ *
1002
+ * @example
1003
+ * ```typescript
1004
+ * const COUPLE_FLOW = flow("couple-creation", "Création Couple")
1005
+ * .description("Create a couple with company")
1006
+ * .slot("mr", "contacts", "Monsieur", { color: "blue" })
1007
+ * .slot("mme", "contacts", "Madame", { color: "pink" })
1008
+ * .slot("company", "companies", "Entreprise", { color: "green" })
1009
+ * .relation("mr", "company", "company")
1010
+ * .relation("mme", "company", "company")
1011
+ * .page("identity", "Identité")
1012
+ * .row("mr-name")
1013
+ * .field("mr", "firstName")
1014
+ * .field("mr", "lastName")
1015
+ * .row("mme-name")
1016
+ * .field("mme", "firstName")
1017
+ * .field("mme", "lastName")
1018
+ * .page("company", "Entreprise")
1019
+ * .row("company-name")
1020
+ * .field("company", "name")
1021
+ * .row("company-siret")
1022
+ * .field("company", "siret")
1023
+ * .build();
1024
+ * ```
1025
+ */
1026
+ declare class FlowBuilder {
1027
+ private data;
1028
+ constructor(name: string, label: string);
1029
+ /**
1030
+ * Set flow description
1031
+ */
1032
+ description(value: string): this;
1033
+ /**
1034
+ * Set flow icon
1035
+ */
1036
+ icon(value: IconName): this;
1037
+ /**
1038
+ * Set extensible metadata
1039
+ */
1040
+ metadata(value: Record<string, unknown>): this;
1041
+ /**
1042
+ * Add a slot (object to create in the flow)
1043
+ *
1044
+ * @param id - Unique slot identifier (used to reference in fields and relations)
1045
+ * @param objectName - Name of the object to create
1046
+ * @param label - Display label for the slot
1047
+ * @param options - Optional slot configuration
1048
+ *
1049
+ * @example
1050
+ * ```typescript
1051
+ * .slot("mr", "contacts", "Monsieur", { color: "blue", icon: "user" })
1052
+ * .slot("company", "companies", "Entreprise", { color: "green" })
1053
+ * ```
1054
+ */
1055
+ slot(id: string, objectName: string, label: string, options?: {
1056
+ color?: ColorId;
1057
+ icon?: IconName;
1058
+ }): this;
1059
+ /**
1060
+ * Define a relation between two slots
1061
+ * The source slot will be linked to the target slot via the specified attribute
1062
+ *
1063
+ * @param sourceSlotId - Slot that has the relation attribute
1064
+ * @param sourceAttribute - Relation attribute name on the source
1065
+ * @param targetSlotId - Target slot to link to
1066
+ *
1067
+ * @example
1068
+ * ```typescript
1069
+ * // mr.company → company (the contact's company field will be set to the created company)
1070
+ * .relation("mr", "company", "company")
1071
+ * ```
1072
+ */
1073
+ relation(sourceSlotId: string, sourceAttribute: string, targetSlotId: string): this;
1074
+ /**
1075
+ * Start a new page/step in the flow
1076
+ *
1077
+ * @param id - Unique page identifier
1078
+ * @param label - Display label
1079
+ * @param description - Optional description
1080
+ *
1081
+ * @example
1082
+ * ```typescript
1083
+ * .page("identity", "Identité", "Informations personnelles")
1084
+ * .row("name")
1085
+ * .field("mr", "firstName")
1086
+ * .field("mr", "lastName")
1087
+ * ```
1088
+ */
1089
+ page(id: string, label: string, description?: string): FlowPageBuilder;
1090
+ /**
1091
+ * Build and validate the flow definition
1092
+ *
1093
+ * @throws Error if validation fails
1094
+ */
1095
+ build(): FlowDefinition;
1096
+ /**
1097
+ * Validate that required data is present
1098
+ */
1099
+ private validateRequiredData;
1100
+ /**
1101
+ * Validate that all field slotId references exist
1102
+ */
1103
+ private validateFieldReferences;
1104
+ /**
1105
+ * Validate that all relation references exist and are valid
1106
+ */
1107
+ private validateRelationReferences;
1108
+ /**
1109
+ * @internal Used by FlowPageBuilder to finalize a page
1110
+ */
1111
+ _finalizePage(page: FlowPage): this;
1112
+ /**
1113
+ * Validate flow name format (kebab-case)
1114
+ */
1115
+ private validateName;
1116
+ /**
1117
+ * Validate that there are no circular dependencies in relations
1118
+ * Uses DFS to detect cycles in the dependency graph
1119
+ */
1120
+ private validateNoCircularDependencies;
1121
+ }
1122
+ /**
1123
+ * Create a new flow builder
1124
+ *
1125
+ * @param name - Flow name (kebab-case)
1126
+ * @param label - Display label
1127
+ *
1128
+ * @example
1129
+ * ```typescript
1130
+ * const COUPLE_FLOW = flow("couple-creation", "Création Couple")
1131
+ * .slot("mr", "contacts", "Monsieur")
1132
+ * .slot("mme", "contacts", "Madame")
1133
+ * .page("identity", "Identité")
1134
+ * .row("mr-name")
1135
+ * .field("mr", "firstName")
1136
+ * .field("mr", "lastName")
1137
+ * .row("mme-name")
1138
+ * .field("mme", "firstName")
1139
+ * .field("mme", "lastName")
1140
+ * .build();
1141
+ * ```
1142
+ */
1143
+ declare function flow(name: string, label: string): FlowBuilder;
1144
+
920
1145
  /**
921
1146
  * Extract attribute info from a builder instance
922
1147
  */
@@ -1397,4 +1622,4 @@ declare function view(name: string, label: string): ViewBuilder;
1397
1622
  */
1398
1623
  declare function group(id: string, label: string): GroupBuilder;
1399
1624
 
1400
- export { ALL_SYSTEM_RESOURCES, type AddAttribute$1 as AddAttribute, type AnyAttributeBuilder, Attribute, AttributeGroupField, AttributeInUseError, type AttributeMap, AttributeNotFoundError, type AttributeSchema, type AttributeUsage, type BuilderConfig, CheckboxAttribute, Currency, CurrencyAttribute, type CustomAttributeValue, CustomTabConfig, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, type DefaultRolePermissionConfig, DuplicateError, type ExtractAttributeName, type ExtractAttributeRequired, type ExtractAttributes, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, Field, FileAttribute, FileNotFoundError, ForbiddenError, Group, GroupBuilder, type InferAttributeValue, type InferRecord, type InferRecordFromSchema, type InferRecordInput, type InferRecordUpdate, type InferRecordWithRequirements, Location, LocationAttribute, MultiRelationAttribute, MultiselectAttribute, NotFoundError, NotSystemObjectError, NumberAttribute, ObjectAction, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, ObjectReferencedError, Option, Phone, PhoneAttribute, ProtectedResourceError, ProtectedRoleError, RatingAttribute, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationTarget, RoleNotFoundError, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SelectAttribute, SingleRelationAttribute, StatusAttribute, SyncError, SystemAction, SystemResource, Tab, TabBuilder, TableTabConfig, TextAreaAttribute, TextAttribute, TimestampAttribute, type TypedAttribute, type TypedBuilderConfig, UserAttribute, UserProfileNotFoundError, ValidationError, type ValidationErrorDetail, ViewBuilder, ViewDefinition, type WithCustomAttributes, checkbox, currency, date, file, group, isDefaultRole, isForbiddenError, isNotFoundError, isProtectedResourceError, isSchemaError, isValidationError, location, multiselect, number, object, phone, rating, relation, select, status, text, textarea, timestamp, user, view };
1625
+ export { ALL_SYSTEM_RESOURCES, type AddAttribute$1 as AddAttribute, type AnyAttributeBuilder, Attribute, AttributeGroupField, AttributeInUseError, type AttributeMap, AttributeNotFoundError, type AttributeSchema, type AttributeUsage, type BuilderConfig, CheckboxAttribute, Currency, CurrencyAttribute, type CustomAttributeValue, CustomTabConfig, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, type DefaultRolePermissionConfig, DuplicateError, type ExtractAttributeName, type ExtractAttributeRequired, type ExtractAttributes, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, Field, FileAttribute, FileNotFoundError, FlowBuilder, FlowDefinition, FlowPage, FlowPageBuilder, FlowRow, FlowRowBuilder, ForbiddenError, Group, GroupBuilder, type InferAttributeValue, type InferRecord, type InferRecordFromSchema, type InferRecordInput, type InferRecordUpdate, type InferRecordWithRequirements, Location, LocationAttribute, MultiRelationAttribute, MultiselectAttribute, NotFoundError, NotSystemObjectError, NumberAttribute, ObjectAction, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, ObjectReferencedError, Option, Phone, PhoneAttribute, ProtectedResourceError, ProtectedRoleError, RatingAttribute, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationTarget, RoleNotFoundError, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SelectAttribute, SingleRelationAttribute, StatusAttribute, SyncError, SystemAction, SystemResource, Tab, TabBuilder, TableTabConfig, TextAreaAttribute, TextAttribute, TimestampAttribute, type TypedAttribute, type TypedBuilderConfig, UserAttribute, UserProfileNotFoundError, ValidationError, type ValidationErrorDetail, ViewBuilder, ViewDefinition, type WithCustomAttributes, checkbox, currency, date, file, flow, group, isDefaultRole, isForbiddenError, isNotFoundError, isProtectedResourceError, isSchemaError, isValidationError, location, multiselect, number, object, phone, rating, relation, select, status, text, textarea, timestamp, user, view };