@stndrds/schema 0.1.0-alpha.56 → 0.1.0-alpha.58

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.
@@ -1,4 +1,6 @@
1
- export { hF as AIConversationsRepository, hH as AIUsageMetricsRepository, hG as AIUserMemoryRepository, hN as AddAttributeInput, hb as AttributeChange, ho as AttributesRepository, ht as AuditRepository, j0 as AuditService, hJ as BaseRepository, hI as BaseService, fK as CacheAdapter, fI as CacheKeyType, fL as CacheOptions, cL as CompletionStatus, gE as ConditionExecutor, hM as CreateCustomObjectInput, jU as CreateDBAttribute, jQ as CreateDBObject, k2 as CreateDBView, k6 as CreateDBWorkflow, kf as CreateDBWorkflowAccessGrant, k9 as CreateDBWorkflowInstance, kc as CreateDBWorkflowInvitation, iF as CreateGrantResult, jX as CreateObjectRecord, jf as CreateRecordDocumentInput, jg as CreateRecordDocumentResult, jp as CreateViewInput, iT as CreateWorkflowInput, jT as DBAttribute, jP as DBObject, k1 as DBView, k5 as DBWorkflow, ke as DBWorkflowAccessGrant, k8 as DBWorkflowInstance, kb as DBWorkflowInvitation, jG as DEFAULT_LABEL_FALLBACK, fB as DatabaseAdapter, gF as DocumentExecutor, j3 as DocumentGenerationNotConfiguredError, j4 as DocumentGenerationService, hD as DocumentGenerationTemplateListOptions, j2 as DocumentGenerationTemplateNotFoundError, hE as DocumentGenerationTemplatesRepository, hC as DocumentJobsRepository, j5 as DocumentProcessingConfig, iz as DocumentProcessingHook, iy as DocumentProcessingHookOptions, j6 as DocumentProcessingService, ja as DocumentRenderError, j8 as DocumentRendererOptions, jc as DocumentRendererService, ji as DocumentService, jh as DocumentServiceOptions, hB as DocumentSlotsRepository, jd as DocumentTemplateService, hz as DocumentTemplatesRepository, hA as DocumentsRepository, gG as EndExecutor, g5 as EvaluationResult, g6 as EvaluationTrace, gs as ExecutorCompleteResult, gt as ExecutorContext, gu as ExecutorErrorResult, gB as ExecutorRegistry, gv as ExecutorResult, gw as ExecutorSuccessResult, gx as ExecutorWaitResult, fQ as FetchResult, iR as FieldReadOnlyResult, js as FileContent, k0 as FileListOptions, jk as FileService, jj as FileServiceOptions, hs as FilesRepository, gH as FormExecutor, fR as FormattedRecord, i8 as FormulaResolverService, i7 as FormulaResolverServiceOptions, gV as FormulaResult, jE as FullSyncOptions, jD as FullSyncResult, cf as GeocodingAdapter, cc as GeocodingAutocompleteParams, ce as GeocodingParams, jl as GeocodingService, cb as GeocodingSuggestion, i0 as GetRelationOptionsParams, j_ as GlobalSearchOptions, j$ as GlobalSearchResultItem, jm as GlobalSearchService, iB as GrantExpiredError, iA as GrantNotFoundError, iC as GrantRevokedError, iE as GrantServiceConfig, fS as GroupedFetchResult, hc as HookContext, hd as HookDefinition, he as HookHandler, hh as HookRegistry, hf as HookType, fT as InsertOptions, gZ as InvalidPathError, iO as InvitationAlreadyAcceptedError, iN as InvitationExpiredError, iM as InvitationNotFoundError, iP as InvitationRevokedError, iL as InvitationServiceConfig, fD as JwtVerificationResult, ip as LabelResolver, jY as ListOptions, fE as MagicLinkPayload, g_ as MaxDepthExceededError, hj as MockStores, gy as NodeExecutor, fP as NoopCacheAdapter, cg as NoopGeocodingAdapter, hg as NoopHookRegistry, hp as ObjectRecordsRepository, hQ as ObjectSchemaService, hP as ObjectSchemaServiceOptions, hn as ObjectsRepository, kh as OperationResult, h2 as PathCardinality, h3 as PathSegment, h4 as PathSegmentType, jo as PermissionService, jn as PermissionServiceOptions, hu as PermissionsRepository, cY as PolicyContext, hl as PolicyRegistry, c_ as PolicyViolationError, g3 as QueryBuilder, g4 as QueryBuilderOptions, fU as QueryBuilderState, f$ as QueryMultipleResultsError, g0 as QueryNoResultError, hU as QueryOptions, hW as QueryResult, je as RecordDocumentsResult, cZ as RecordPolicy, hX as RecordQueryService, hT as RecordQueryServiceOptions, i5 as RecordResolverService, hS as RecordService, hR as RecordServiceOptions, fV as RegistryMap, fW as RegistryObjectNames, jN as RelationLabelResolver, h_ as RelationOption, h$ as RelationOptionsResponse, i4 as RelationService, i1 as RelationServiceOptions, hZ as RelationValidationError, hY as RelationValidationResult, j7 as RenderDocumentInput, j9 as RenderDocumentResult, i2 as ResolveIdsBatchRequest, i3 as ResolveIdsBatchResponse, i6 as ResolvedRelations, iI as ResumeWorkflowInput, cd as ReverseGeocodingParams, ix as RollupCascadeContext, i9 as RollupResult, id as RollupScheduler, ic as RollupSchedulerOptions, ib as RollupService, ia as RollupServiceOptions, g1 as SHORTCUT_TO_FILTER_OPERATOR, gi as SchemaContext, hK as SchemaContextAware, hL as SchemaContextAwareRepository, h5 as SchemaResolver, jZ as SearchOptions, hV as SearchQueryOptions, fX as ShortcutOperator, jv as SignedUrlOptions, gI as StartExecutor, iH as StartWorkflowInput, jw as StorageAdapter, jb as StorageDownloadNotSupportedError, jt as StorageUploadInput, ju as StorageUploadResult, jz as SyncOptions, jy as SyncResult, gp as TenantContext, ga as TenantContextError, iD as TokenRevokedError, h9 as TraversalOptions, ha as TraversalResult, jV as UpdateDBAttribute, jR as UpdateDBObject, k3 as UpdateDBView, k7 as UpdateDBWorkflow, kg as UpdateDBWorkflowAccessGrant, ka as UpdateDBWorkflowInstance, kd as UpdateDBWorkflowInvitation, hO as UpdateObjectInput, jq as UpdateViewInput, iU as UpdateWorkflowInput, jx as UploadFileInput, jW as UpsertDBAttribute, jS as UpsertDBObject, k4 as UpsertDBView, i$ as UserProfileService, i_ as UserProfileServiceOptions, hr as UserProfilesRepository, iZ as UserService, iY as UserValidationError, iX as UserValidationResult, jr as ViewService, kj as ViewSyncLogger, kk as ViewSyncOptions, ki as ViewSyncResult, hq as ViewsRepository, iG as WorkflowAccessGrantService, hy as WorkflowAccessGrantsRepository, fF as WorkflowAccessPayload, iK as WorkflowInstanceService, iJ as WorkflowInstanceServiceOptions, hw as WorkflowInstancesRepository, iQ as WorkflowInvitationService, hx as WorkflowInvitationsRepository, fG as WorkflowJwtConfig, fH as WorkflowJwtPayload, fC as WorkflowJwtService, iS as WorkflowRelationService, iW as WorkflowService, iV as WorkflowServiceOptions, hv as WorkflowsRepository, gb as addSchemaToContext, ie as applyDefaultValues, j1 as buildAuditChanges, ii as buildPolicyContext, fM as cacheKeys, fN as cacheTtl, ig as checkPermission, ij as checkRecordAccess, il as checkRecordDeleteOrThrow, ik as checkRecordModifyOrThrow, im as checkSharedObjectWriteAccess, gz as complete, io as computeLabel, jO as computeLabelWithRelations, is as createContextForCreate, iu as createContextForDelete, iv as createContextForRestore, it as createContextForUpdate, gq as createDefaultExecutorRegistry, fY as createDefaultState, hi as createMockAdapter, g2 as createQueryBuilder, hk as defaultPolicyRegistry, fO as defaultTtl, ir as enrichRecordsWithFormulas, jK as enrichValuesForDisplay, jL as enrichValuesWithSelectLabels, iq as enrichWithFormulas, gA as error, g8 as evaluate, g7 as evaluateCondition, gJ as evaluateFormula, gK as evaluateFormulaAttribute, gL as evaluateFormulaAttributeWithRelations, gM as evaluateFormulaWithRelations, gN as evaluateFormulaWithResult, g9 as evaluateWithTrace, jJ as extractAttributeNames, gO as extractFormulaVariables, jM as extractRelationIds, gP as extractRelationNames, gQ as extractRelationReferences, gR as flattenRelationsForEval, gS as formatFormulaResult, fZ as formatRecord, f_ as formatRecords, gj as getContext, gr as getDefaultExecutorRegistry, gW as getPathDepth, ih as getPolicy, gX as getRelationPath, gc as getSchemaByNameFromContext, gd as getSchemaContext, ge as getSchemaFromContext, jC as getSyncPreview, gY as getTargetAttributeName, gk as getTenantId, gl as getUserId, kn as getViewSyncPreview, gm as hasContext, gT as hasRelationReferences, gf as hasSchemaContext, fJ as hashOptions, jI as isLabelExpression, hm as notesPolicy, g$ as parsePath, h0 as pathHasManyCardinality, iw as recalculateParentRollups, jH as renderLabelExpression, h6 as resolveMultiplePaths, h7 as resolveSingleValue, gn as runWithContext, gg as runWithMergedSchemaContext, gh as runWithSchemaContext, gC as success, jF as syncAll, jA as syncNativeObjects, kl as syncNativeViews, h8 as traversePath, gU as validateFormulaExpression, h1 as validatePath, jB as verifyNativeObjectsSync, km as verifyNativeViewsSync, gD as wait, go as withTenantContext } from './runtime-D5MuaVQs.mjs';
1
+ export { fV as AIConversationsRepository, fW as AIUsageMetricsRepository, fX as AIUserMemoryRepository, gj as AddAttributeInput, fJ as AttributeChange, fY as AttributesRepository, fZ as AuditRepository, hv as AuditService, gf as BaseRepository, ge as BaseService, e7 as CacheAdapter, e5 as CacheKeyType, e8 as CacheOptions, fa as ConditionExecutor, gi as CreateCustomObjectInput, ir as CreateDBAttribute, im as CreateDBObject, iB as CreateDBView, iF as CreateDBViewOverlay, iI as CreateDBWorkflow, iR as CreateDBWorkflowAccessGrant, iL as CreateDBWorkflowInstance, iO as CreateDBWorkflowInvitation, h9 as CreateGrantResult, iu as CreateObjectRecord, hK as CreateRecordDocumentInput, hL as CreateRecordDocumentResult, hU as CreateViewInput, hm as CreateWorkflowInput, iq as DBAttribute, il as DBObject, iA as DBView, iE as DBViewOverlay, iH as DBWorkflow, iQ as DBWorkflowAccessGrant, iK as DBWorkflowInstance, iN as DBWorkflowInvitation, ib as DEFAULT_LABEL_FALLBACK, d_ as DatabaseAdapter, fb as DocumentExecutor, hy as DocumentGenerationNotConfiguredError, hz as DocumentGenerationService, f_ as DocumentGenerationTemplateListOptions, hx as DocumentGenerationTemplateNotFoundError, f$ as DocumentGenerationTemplatesRepository, g0 as DocumentJobsRepository, hA as DocumentProcessingConfig, h3 as DocumentProcessingHook, h2 as DocumentProcessingHookOptions, hB as DocumentProcessingService, hF as DocumentRenderError, hD as DocumentRendererOptions, hH as DocumentRendererService, hN as DocumentService, hM as DocumentServiceOptions, g1 as DocumentSlotsRepository, hI as DocumentTemplateService, g3 as DocumentTemplatesRepository, g2 as DocumentsRepository, fc as EndExecutor, eu as EvaluationResult, ev as EvaluationTrace, e_ as ExecutorCompleteResult, e$ as ExecutorContext, f0 as ExecutorErrorResult, f7 as ExecutorRegistry, f1 as ExecutorResult, f2 as ExecutorSuccessResult, f3 as ExecutorWaitResult, eI as FeatureFlagsContext, eA as FeatureFlagsContextError, ed as FetchResult, hZ as FileContent, iz as FileListOptions, hP as FileService, hO as FileServiceOptions, g4 as FilesRepository, fd as FormExecutor, ee as FormattedRecord, gG as FormulaResolverService, gF as FormulaResolverServiceOptions, fr as FormulaResult, i9 as FullSyncOptions, i8 as FullSyncResult, bA as GeocodingAdapter, bx as GeocodingAutocompleteParams, bz as GeocodingParams, hQ as GeocodingService, bw as GeocodingSuggestion, gy as GetRelationOptionsParams, hX as GetViewOptions, hW as GetViewsOptions, ix as GlobalSearchOptions, iy as GlobalSearchResultItem, hR as GlobalSearchService, h5 as GrantExpiredError, h4 as GrantNotFoundError, h6 as GrantRevokedError, h8 as GrantServiceConfig, ef as GroupedFetchResult, fK as HookContext, fL as HookDefinition, fM as HookHandler, fP as HookRegistry, fN as HookType, eg as InsertOptions, fv as InvalidPathError, hi as InvitationAlreadyAcceptedError, hh as InvitationExpiredError, hg as InvitationNotFoundError, hj as InvitationRevokedError, hf as InvitationServiceConfig, e0 as JwtVerificationResult, gV as LabelResolver, iv as ListOptions, e1 as MagicLinkPayload, fw as MaxDepthExceededError, fR as MockStores, f4 as NodeExecutor, ec as NoopCacheAdapter, bB as NoopGeocodingAdapter, fO as NoopHookRegistry, g5 as ObjectRecordsRepository, gm as ObjectSchemaService, gl as ObjectSchemaServiceOptions, g6 as ObjectsRepository, iT as OperationResult, fA as PathCardinality, fB as PathSegment, fC as PathSegmentType, hT as PermissionService, hS as PermissionServiceOptions, g7 as PermissionsRepository, c8 as PolicyContext, fT as PolicyRegistry, ca as PolicyViolationError, es as QueryBuilder, et as QueryBuilderOptions, eh as QueryBuilderState, eo as QueryMultipleResultsError, ep as QueryNoResultError, gq as QueryOptions, gs as QueryResult, hJ as RecordDocumentsResult, c9 as RecordPolicy, gt as RecordQueryService, gp as RecordQueryServiceOptions, gD as RecordResolverService, go as RecordService, gn as RecordServiceOptions, ei as RegistryMap, ej as RegistryObjectNames, ij as RelationLabelResolver, gw as RelationOption, gx as RelationOptionsResponse, gC as RelationService, gz as RelationServiceOptions, gv as RelationValidationError, gu as RelationValidationResult, hC as RenderDocumentInput, hE as RenderDocumentResult, gA as ResolveIdsBatchRequest, gB as ResolveIdsBatchResponse, gE as ResolvedRelations, hc as ResumeWorkflowInput, by as ReverseGeocodingParams, h1 as RollupCascadeContext, gH as RollupResult, gL as RollupScheduler, gK as RollupSchedulerOptions, gJ as RollupService, gI as RollupServiceOptions, eq as SHORTCUT_TO_FILTER_OPERATOR, eQ as SchemaContext, gg as SchemaContextAware, gh as SchemaContextAwareRepository, fD as SchemaResolver, iw as SearchOptions, gr as SearchQueryOptions, ek as ShortcutOperator, i0 as SignedUrlOptions, fe as StartExecutor, hb as StartWorkflowInput, i1 as StorageAdapter, hG as StorageDownloadNotSupportedError, h_ as StorageUploadInput, h$ as StorageUploadResult, i4 as SyncOptions, i3 as SyncResult, eX as TenantContext, ez as TenantContextError, h7 as TokenRevokedError, fH as TraversalOptions, fI as TraversalResult, is as UpdateDBAttribute, io as UpdateDBObject, iC as UpdateDBView, iG as UpdateDBViewOverlay, iJ as UpdateDBWorkflow, iS as UpdateDBWorkflowAccessGrant, iM as UpdateDBWorkflowInstance, iP as UpdateDBWorkflowInvitation, gk as UpdateObjectInput, hV as UpdateViewInput, hn as UpdateWorkflowInput, i2 as UploadFileInput, it as UpsertDBAttribute, ip as UpsertDBObject, iD as UpsertDBView, hu as UserProfileService, ht as UserProfileServiceOptions, g8 as UserProfilesRepository, hs as UserService, hr as UserValidationError, hq as UserValidationResult, dZ as ViewOverlaysRepository, hY as ViewService, iV as ViewSyncLogger, iW as ViewSyncOptions, iU as ViewSyncResult, g9 as ViewsRepository, ha as WorkflowAccessGrantService, ga as WorkflowAccessGrantsRepository, e2 as WorkflowAccessPayload, he as WorkflowInstanceService, hd as WorkflowInstanceServiceOptions, gb as WorkflowInstancesRepository, hk as WorkflowInvitationService, gc as WorkflowInvitationsRepository, e3 as WorkflowJwtConfig, e4 as WorkflowJwtPayload, d$ as WorkflowJwtService, hl as WorkflowRelationService, hp as WorkflowService, ho as WorkflowServiceOptions, gd as WorkflowsRepository, eJ as addSchemaToContext, gM as applyDefaultValues, hw as buildAuditChanges, gP as buildPolicyContext, e9 as cacheKeys, ea as cacheTtl, gN as checkPermission, gQ as checkRecordAccess, gS as checkRecordDeleteOrThrow, gR as checkRecordModifyOrThrow, gT as checkSharedObjectWriteAccess, f5 as complete, gU as computeLabel, ik as computeLabelWithRelations, gY as createContextForCreate, g_ as createContextForDelete, g$ as createContextForRestore, gZ as createContextForUpdate, eY as createDefaultExecutorRegistry, el as createDefaultState, fQ as createMockAdapter, er as createQueryBuilder, fS as defaultPolicyRegistry, eb as defaultTtl, gX as enrichRecordsWithFormulas, ig as enrichValuesForDisplay, ih as enrichValuesWithSelectLabels, gW as enrichWithFormulas, f6 as error, ex as evaluate, ew as evaluateCondition, ff as evaluateFormula, fg as evaluateFormulaAttribute, fh as evaluateFormulaAttributeWithRelations, fi as evaluateFormulaWithRelations, fj as evaluateFormulaWithResult, ey as evaluateWithTrace, ie as extractAttributeNames, fk as extractFormulaVariables, ii as extractRelationIds, fl as extractRelationNames, fm as extractRelationReferences, fn as flattenRelationsForEval, fo as formatFormulaResult, em as formatRecord, en as formatRecords, eR as getContext, eZ as getDefaultExecutorRegistry, eB as getFeatureFlags, eC as getFeatureValue, fs as getPathDepth, gO as getPolicy, ft as getRelationPath, eK as getSchemaByNameFromContext, eL as getSchemaContext, eM as getSchemaFromContext, i7 as getSyncPreview, fu as getTargetAttributeName, eS as getTenantId, eT as getUserId, i$ as getViewSeedPreview, j0 as getViewSyncPreview, eU as hasContext, eD as hasFeatureFlagsContext, fp as hasRelationReferences, eN as hasSchemaContext, e6 as hashOptions, eE as isFeatureEnabled, id as isLabelExpression, fU as notesPolicy, fx as parsePath, fy as pathHasManyCardinality, h0 as recalculateParentRollups, ic as renderLabelExpression, fE as resolveMultiplePaths, fF as resolveSingleValue, eV as runWithContext, eF as runWithFeatureFlags, eO as runWithMergedSchemaContext, eP as runWithSchemaContext, iX as seedRegistryViews, f8 as success, ia as syncAll, i5 as syncNativeObjects, iY as syncNativeViews, fG as traversePath, eG as tryGetFeatureValue, fq as validateFormulaExpression, fz as validatePath, i6 as verifyNativeObjectsSync, i_ as verifyNativeViewsSync, iZ as verifyRegistryViewsSeeded, f9 as wait, eH as withFeatureFlags, eW as withTenantContext } from './runtime-SCsDOQi0.mjs';
2
+ export { a3 as CompletionStatus } from './validators-BgmWgr-G.mjs';
2
3
  import '@stndrds/constants';
4
+ import './utils.mjs';
3
5
  import 'jose';
4
6
  import 'zod';
package/dist/runtime.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- export { hF as AIConversationsRepository, hH as AIUsageMetricsRepository, hG as AIUserMemoryRepository, hN as AddAttributeInput, hb as AttributeChange, ho as AttributesRepository, ht as AuditRepository, j0 as AuditService, hJ as BaseRepository, hI as BaseService, fK as CacheAdapter, fI as CacheKeyType, fL as CacheOptions, cL as CompletionStatus, gE as ConditionExecutor, hM as CreateCustomObjectInput, jU as CreateDBAttribute, jQ as CreateDBObject, k2 as CreateDBView, k6 as CreateDBWorkflow, kf as CreateDBWorkflowAccessGrant, k9 as CreateDBWorkflowInstance, kc as CreateDBWorkflowInvitation, iF as CreateGrantResult, jX as CreateObjectRecord, jf as CreateRecordDocumentInput, jg as CreateRecordDocumentResult, jp as CreateViewInput, iT as CreateWorkflowInput, jT as DBAttribute, jP as DBObject, k1 as DBView, k5 as DBWorkflow, ke as DBWorkflowAccessGrant, k8 as DBWorkflowInstance, kb as DBWorkflowInvitation, jG as DEFAULT_LABEL_FALLBACK, fB as DatabaseAdapter, gF as DocumentExecutor, j3 as DocumentGenerationNotConfiguredError, j4 as DocumentGenerationService, hD as DocumentGenerationTemplateListOptions, j2 as DocumentGenerationTemplateNotFoundError, hE as DocumentGenerationTemplatesRepository, hC as DocumentJobsRepository, j5 as DocumentProcessingConfig, iz as DocumentProcessingHook, iy as DocumentProcessingHookOptions, j6 as DocumentProcessingService, ja as DocumentRenderError, j8 as DocumentRendererOptions, jc as DocumentRendererService, ji as DocumentService, jh as DocumentServiceOptions, hB as DocumentSlotsRepository, jd as DocumentTemplateService, hz as DocumentTemplatesRepository, hA as DocumentsRepository, gG as EndExecutor, g5 as EvaluationResult, g6 as EvaluationTrace, gs as ExecutorCompleteResult, gt as ExecutorContext, gu as ExecutorErrorResult, gB as ExecutorRegistry, gv as ExecutorResult, gw as ExecutorSuccessResult, gx as ExecutorWaitResult, fQ as FetchResult, iR as FieldReadOnlyResult, js as FileContent, k0 as FileListOptions, jk as FileService, jj as FileServiceOptions, hs as FilesRepository, gH as FormExecutor, fR as FormattedRecord, i8 as FormulaResolverService, i7 as FormulaResolverServiceOptions, gV as FormulaResult, jE as FullSyncOptions, jD as FullSyncResult, cf as GeocodingAdapter, cc as GeocodingAutocompleteParams, ce as GeocodingParams, jl as GeocodingService, cb as GeocodingSuggestion, i0 as GetRelationOptionsParams, j_ as GlobalSearchOptions, j$ as GlobalSearchResultItem, jm as GlobalSearchService, iB as GrantExpiredError, iA as GrantNotFoundError, iC as GrantRevokedError, iE as GrantServiceConfig, fS as GroupedFetchResult, hc as HookContext, hd as HookDefinition, he as HookHandler, hh as HookRegistry, hf as HookType, fT as InsertOptions, gZ as InvalidPathError, iO as InvitationAlreadyAcceptedError, iN as InvitationExpiredError, iM as InvitationNotFoundError, iP as InvitationRevokedError, iL as InvitationServiceConfig, fD as JwtVerificationResult, ip as LabelResolver, jY as ListOptions, fE as MagicLinkPayload, g_ as MaxDepthExceededError, hj as MockStores, gy as NodeExecutor, fP as NoopCacheAdapter, cg as NoopGeocodingAdapter, hg as NoopHookRegistry, hp as ObjectRecordsRepository, hQ as ObjectSchemaService, hP as ObjectSchemaServiceOptions, hn as ObjectsRepository, kh as OperationResult, h2 as PathCardinality, h3 as PathSegment, h4 as PathSegmentType, jo as PermissionService, jn as PermissionServiceOptions, hu as PermissionsRepository, cY as PolicyContext, hl as PolicyRegistry, c_ as PolicyViolationError, g3 as QueryBuilder, g4 as QueryBuilderOptions, fU as QueryBuilderState, f$ as QueryMultipleResultsError, g0 as QueryNoResultError, hU as QueryOptions, hW as QueryResult, je as RecordDocumentsResult, cZ as RecordPolicy, hX as RecordQueryService, hT as RecordQueryServiceOptions, i5 as RecordResolverService, hS as RecordService, hR as RecordServiceOptions, fV as RegistryMap, fW as RegistryObjectNames, jN as RelationLabelResolver, h_ as RelationOption, h$ as RelationOptionsResponse, i4 as RelationService, i1 as RelationServiceOptions, hZ as RelationValidationError, hY as RelationValidationResult, j7 as RenderDocumentInput, j9 as RenderDocumentResult, i2 as ResolveIdsBatchRequest, i3 as ResolveIdsBatchResponse, i6 as ResolvedRelations, iI as ResumeWorkflowInput, cd as ReverseGeocodingParams, ix as RollupCascadeContext, i9 as RollupResult, id as RollupScheduler, ic as RollupSchedulerOptions, ib as RollupService, ia as RollupServiceOptions, g1 as SHORTCUT_TO_FILTER_OPERATOR, gi as SchemaContext, hK as SchemaContextAware, hL as SchemaContextAwareRepository, h5 as SchemaResolver, jZ as SearchOptions, hV as SearchQueryOptions, fX as ShortcutOperator, jv as SignedUrlOptions, gI as StartExecutor, iH as StartWorkflowInput, jw as StorageAdapter, jb as StorageDownloadNotSupportedError, jt as StorageUploadInput, ju as StorageUploadResult, jz as SyncOptions, jy as SyncResult, gp as TenantContext, ga as TenantContextError, iD as TokenRevokedError, h9 as TraversalOptions, ha as TraversalResult, jV as UpdateDBAttribute, jR as UpdateDBObject, k3 as UpdateDBView, k7 as UpdateDBWorkflow, kg as UpdateDBWorkflowAccessGrant, ka as UpdateDBWorkflowInstance, kd as UpdateDBWorkflowInvitation, hO as UpdateObjectInput, jq as UpdateViewInput, iU as UpdateWorkflowInput, jx as UploadFileInput, jW as UpsertDBAttribute, jS as UpsertDBObject, k4 as UpsertDBView, i$ as UserProfileService, i_ as UserProfileServiceOptions, hr as UserProfilesRepository, iZ as UserService, iY as UserValidationError, iX as UserValidationResult, jr as ViewService, kj as ViewSyncLogger, kk as ViewSyncOptions, ki as ViewSyncResult, hq as ViewsRepository, iG as WorkflowAccessGrantService, hy as WorkflowAccessGrantsRepository, fF as WorkflowAccessPayload, iK as WorkflowInstanceService, iJ as WorkflowInstanceServiceOptions, hw as WorkflowInstancesRepository, iQ as WorkflowInvitationService, hx as WorkflowInvitationsRepository, fG as WorkflowJwtConfig, fH as WorkflowJwtPayload, fC as WorkflowJwtService, iS as WorkflowRelationService, iW as WorkflowService, iV as WorkflowServiceOptions, hv as WorkflowsRepository, gb as addSchemaToContext, ie as applyDefaultValues, j1 as buildAuditChanges, ii as buildPolicyContext, fM as cacheKeys, fN as cacheTtl, ig as checkPermission, ij as checkRecordAccess, il as checkRecordDeleteOrThrow, ik as checkRecordModifyOrThrow, im as checkSharedObjectWriteAccess, gz as complete, io as computeLabel, jO as computeLabelWithRelations, is as createContextForCreate, iu as createContextForDelete, iv as createContextForRestore, it as createContextForUpdate, gq as createDefaultExecutorRegistry, fY as createDefaultState, hi as createMockAdapter, g2 as createQueryBuilder, hk as defaultPolicyRegistry, fO as defaultTtl, ir as enrichRecordsWithFormulas, jK as enrichValuesForDisplay, jL as enrichValuesWithSelectLabels, iq as enrichWithFormulas, gA as error, g8 as evaluate, g7 as evaluateCondition, gJ as evaluateFormula, gK as evaluateFormulaAttribute, gL as evaluateFormulaAttributeWithRelations, gM as evaluateFormulaWithRelations, gN as evaluateFormulaWithResult, g9 as evaluateWithTrace, jJ as extractAttributeNames, gO as extractFormulaVariables, jM as extractRelationIds, gP as extractRelationNames, gQ as extractRelationReferences, gR as flattenRelationsForEval, gS as formatFormulaResult, fZ as formatRecord, f_ as formatRecords, gj as getContext, gr as getDefaultExecutorRegistry, gW as getPathDepth, ih as getPolicy, gX as getRelationPath, gc as getSchemaByNameFromContext, gd as getSchemaContext, ge as getSchemaFromContext, jC as getSyncPreview, gY as getTargetAttributeName, gk as getTenantId, gl as getUserId, kn as getViewSyncPreview, gm as hasContext, gT as hasRelationReferences, gf as hasSchemaContext, fJ as hashOptions, jI as isLabelExpression, hm as notesPolicy, g$ as parsePath, h0 as pathHasManyCardinality, iw as recalculateParentRollups, jH as renderLabelExpression, h6 as resolveMultiplePaths, h7 as resolveSingleValue, gn as runWithContext, gg as runWithMergedSchemaContext, gh as runWithSchemaContext, gC as success, jF as syncAll, jA as syncNativeObjects, kl as syncNativeViews, h8 as traversePath, gU as validateFormulaExpression, h1 as validatePath, jB as verifyNativeObjectsSync, km as verifyNativeViewsSync, gD as wait, go as withTenantContext } from './runtime-D5MuaVQs.js';
1
+ export { fV as AIConversationsRepository, fW as AIUsageMetricsRepository, fX as AIUserMemoryRepository, gj as AddAttributeInput, fJ as AttributeChange, fY as AttributesRepository, fZ as AuditRepository, hv as AuditService, gf as BaseRepository, ge as BaseService, e7 as CacheAdapter, e5 as CacheKeyType, e8 as CacheOptions, fa as ConditionExecutor, gi as CreateCustomObjectInput, ir as CreateDBAttribute, im as CreateDBObject, iB as CreateDBView, iF as CreateDBViewOverlay, iI as CreateDBWorkflow, iR as CreateDBWorkflowAccessGrant, iL as CreateDBWorkflowInstance, iO as CreateDBWorkflowInvitation, h9 as CreateGrantResult, iu as CreateObjectRecord, hK as CreateRecordDocumentInput, hL as CreateRecordDocumentResult, hU as CreateViewInput, hm as CreateWorkflowInput, iq as DBAttribute, il as DBObject, iA as DBView, iE as DBViewOverlay, iH as DBWorkflow, iQ as DBWorkflowAccessGrant, iK as DBWorkflowInstance, iN as DBWorkflowInvitation, ib as DEFAULT_LABEL_FALLBACK, d_ as DatabaseAdapter, fb as DocumentExecutor, hy as DocumentGenerationNotConfiguredError, hz as DocumentGenerationService, f_ as DocumentGenerationTemplateListOptions, hx as DocumentGenerationTemplateNotFoundError, f$ as DocumentGenerationTemplatesRepository, g0 as DocumentJobsRepository, hA as DocumentProcessingConfig, h3 as DocumentProcessingHook, h2 as DocumentProcessingHookOptions, hB as DocumentProcessingService, hF as DocumentRenderError, hD as DocumentRendererOptions, hH as DocumentRendererService, hN as DocumentService, hM as DocumentServiceOptions, g1 as DocumentSlotsRepository, hI as DocumentTemplateService, g3 as DocumentTemplatesRepository, g2 as DocumentsRepository, fc as EndExecutor, eu as EvaluationResult, ev as EvaluationTrace, e_ as ExecutorCompleteResult, e$ as ExecutorContext, f0 as ExecutorErrorResult, f7 as ExecutorRegistry, f1 as ExecutorResult, f2 as ExecutorSuccessResult, f3 as ExecutorWaitResult, eI as FeatureFlagsContext, eA as FeatureFlagsContextError, ed as FetchResult, hZ as FileContent, iz as FileListOptions, hP as FileService, hO as FileServiceOptions, g4 as FilesRepository, fd as FormExecutor, ee as FormattedRecord, gG as FormulaResolverService, gF as FormulaResolverServiceOptions, fr as FormulaResult, i9 as FullSyncOptions, i8 as FullSyncResult, bA as GeocodingAdapter, bx as GeocodingAutocompleteParams, bz as GeocodingParams, hQ as GeocodingService, bw as GeocodingSuggestion, gy as GetRelationOptionsParams, hX as GetViewOptions, hW as GetViewsOptions, ix as GlobalSearchOptions, iy as GlobalSearchResultItem, hR as GlobalSearchService, h5 as GrantExpiredError, h4 as GrantNotFoundError, h6 as GrantRevokedError, h8 as GrantServiceConfig, ef as GroupedFetchResult, fK as HookContext, fL as HookDefinition, fM as HookHandler, fP as HookRegistry, fN as HookType, eg as InsertOptions, fv as InvalidPathError, hi as InvitationAlreadyAcceptedError, hh as InvitationExpiredError, hg as InvitationNotFoundError, hj as InvitationRevokedError, hf as InvitationServiceConfig, e0 as JwtVerificationResult, gV as LabelResolver, iv as ListOptions, e1 as MagicLinkPayload, fw as MaxDepthExceededError, fR as MockStores, f4 as NodeExecutor, ec as NoopCacheAdapter, bB as NoopGeocodingAdapter, fO as NoopHookRegistry, g5 as ObjectRecordsRepository, gm as ObjectSchemaService, gl as ObjectSchemaServiceOptions, g6 as ObjectsRepository, iT as OperationResult, fA as PathCardinality, fB as PathSegment, fC as PathSegmentType, hT as PermissionService, hS as PermissionServiceOptions, g7 as PermissionsRepository, c8 as PolicyContext, fT as PolicyRegistry, ca as PolicyViolationError, es as QueryBuilder, et as QueryBuilderOptions, eh as QueryBuilderState, eo as QueryMultipleResultsError, ep as QueryNoResultError, gq as QueryOptions, gs as QueryResult, hJ as RecordDocumentsResult, c9 as RecordPolicy, gt as RecordQueryService, gp as RecordQueryServiceOptions, gD as RecordResolverService, go as RecordService, gn as RecordServiceOptions, ei as RegistryMap, ej as RegistryObjectNames, ij as RelationLabelResolver, gw as RelationOption, gx as RelationOptionsResponse, gC as RelationService, gz as RelationServiceOptions, gv as RelationValidationError, gu as RelationValidationResult, hC as RenderDocumentInput, hE as RenderDocumentResult, gA as ResolveIdsBatchRequest, gB as ResolveIdsBatchResponse, gE as ResolvedRelations, hc as ResumeWorkflowInput, by as ReverseGeocodingParams, h1 as RollupCascadeContext, gH as RollupResult, gL as RollupScheduler, gK as RollupSchedulerOptions, gJ as RollupService, gI as RollupServiceOptions, eq as SHORTCUT_TO_FILTER_OPERATOR, eQ as SchemaContext, gg as SchemaContextAware, gh as SchemaContextAwareRepository, fD as SchemaResolver, iw as SearchOptions, gr as SearchQueryOptions, ek as ShortcutOperator, i0 as SignedUrlOptions, fe as StartExecutor, hb as StartWorkflowInput, i1 as StorageAdapter, hG as StorageDownloadNotSupportedError, h_ as StorageUploadInput, h$ as StorageUploadResult, i4 as SyncOptions, i3 as SyncResult, eX as TenantContext, ez as TenantContextError, h7 as TokenRevokedError, fH as TraversalOptions, fI as TraversalResult, is as UpdateDBAttribute, io as UpdateDBObject, iC as UpdateDBView, iG as UpdateDBViewOverlay, iJ as UpdateDBWorkflow, iS as UpdateDBWorkflowAccessGrant, iM as UpdateDBWorkflowInstance, iP as UpdateDBWorkflowInvitation, gk as UpdateObjectInput, hV as UpdateViewInput, hn as UpdateWorkflowInput, i2 as UploadFileInput, it as UpsertDBAttribute, ip as UpsertDBObject, iD as UpsertDBView, hu as UserProfileService, ht as UserProfileServiceOptions, g8 as UserProfilesRepository, hs as UserService, hr as UserValidationError, hq as UserValidationResult, dZ as ViewOverlaysRepository, hY as ViewService, iV as ViewSyncLogger, iW as ViewSyncOptions, iU as ViewSyncResult, g9 as ViewsRepository, ha as WorkflowAccessGrantService, ga as WorkflowAccessGrantsRepository, e2 as WorkflowAccessPayload, he as WorkflowInstanceService, hd as WorkflowInstanceServiceOptions, gb as WorkflowInstancesRepository, hk as WorkflowInvitationService, gc as WorkflowInvitationsRepository, e3 as WorkflowJwtConfig, e4 as WorkflowJwtPayload, d$ as WorkflowJwtService, hl as WorkflowRelationService, hp as WorkflowService, ho as WorkflowServiceOptions, gd as WorkflowsRepository, eJ as addSchemaToContext, gM as applyDefaultValues, hw as buildAuditChanges, gP as buildPolicyContext, e9 as cacheKeys, ea as cacheTtl, gN as checkPermission, gQ as checkRecordAccess, gS as checkRecordDeleteOrThrow, gR as checkRecordModifyOrThrow, gT as checkSharedObjectWriteAccess, f5 as complete, gU as computeLabel, ik as computeLabelWithRelations, gY as createContextForCreate, g_ as createContextForDelete, g$ as createContextForRestore, gZ as createContextForUpdate, eY as createDefaultExecutorRegistry, el as createDefaultState, fQ as createMockAdapter, er as createQueryBuilder, fS as defaultPolicyRegistry, eb as defaultTtl, gX as enrichRecordsWithFormulas, ig as enrichValuesForDisplay, ih as enrichValuesWithSelectLabels, gW as enrichWithFormulas, f6 as error, ex as evaluate, ew as evaluateCondition, ff as evaluateFormula, fg as evaluateFormulaAttribute, fh as evaluateFormulaAttributeWithRelations, fi as evaluateFormulaWithRelations, fj as evaluateFormulaWithResult, ey as evaluateWithTrace, ie as extractAttributeNames, fk as extractFormulaVariables, ii as extractRelationIds, fl as extractRelationNames, fm as extractRelationReferences, fn as flattenRelationsForEval, fo as formatFormulaResult, em as formatRecord, en as formatRecords, eR as getContext, eZ as getDefaultExecutorRegistry, eB as getFeatureFlags, eC as getFeatureValue, fs as getPathDepth, gO as getPolicy, ft as getRelationPath, eK as getSchemaByNameFromContext, eL as getSchemaContext, eM as getSchemaFromContext, i7 as getSyncPreview, fu as getTargetAttributeName, eS as getTenantId, eT as getUserId, i$ as getViewSeedPreview, j0 as getViewSyncPreview, eU as hasContext, eD as hasFeatureFlagsContext, fp as hasRelationReferences, eN as hasSchemaContext, e6 as hashOptions, eE as isFeatureEnabled, id as isLabelExpression, fU as notesPolicy, fx as parsePath, fy as pathHasManyCardinality, h0 as recalculateParentRollups, ic as renderLabelExpression, fE as resolveMultiplePaths, fF as resolveSingleValue, eV as runWithContext, eF as runWithFeatureFlags, eO as runWithMergedSchemaContext, eP as runWithSchemaContext, iX as seedRegistryViews, f8 as success, ia as syncAll, i5 as syncNativeObjects, iY as syncNativeViews, fG as traversePath, eG as tryGetFeatureValue, fq as validateFormulaExpression, fz as validatePath, i6 as verifyNativeObjectsSync, i_ as verifyNativeViewsSync, iZ as verifyRegistryViewsSeeded, f9 as wait, eH as withFeatureFlags, eW as withTenantContext } from './runtime-C4vB_EcQ.js';
2
+ export { a3 as CompletionStatus } from './validators-miARInAq.js';
2
3
  import '@stndrds/constants';
4
+ import './utils.js';
3
5
  import 'jose';
4
6
  import 'zod';
package/dist/runtime.js CHANGED
@@ -146,7 +146,20 @@
146
146
 
147
147
 
148
148
 
149
- var _chunkXBF4EUC4js = require('./chunk-XBF4EUC4.js');
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+ var _chunk2OS63USQjs = require('./chunk-2OS63USQ.js');
161
+ require('./chunk-NEVERCM3.js');
162
+ require('./chunk-U4AB53AM.js');
150
163
  require('./chunk-3RG5ZIWI.js');
151
164
 
152
165
 
@@ -296,4 +309,15 @@ require('./chunk-3RG5ZIWI.js');
296
309
 
297
310
 
298
311
 
299
- exports.AuditService = _chunkXBF4EUC4js.AuditService; exports.BaseRepository = _chunkXBF4EUC4js.BaseRepository; exports.BaseService = _chunkXBF4EUC4js.BaseService; exports.ConditionExecutor = _chunkXBF4EUC4js.ConditionExecutor; exports.DEFAULT_LABEL_FALLBACK = _chunkXBF4EUC4js.DEFAULT_LABEL_FALLBACK; exports.DocumentExecutor = _chunkXBF4EUC4js.DocumentExecutor; exports.DocumentGenerationNotConfiguredError = _chunkXBF4EUC4js.DocumentGenerationNotConfiguredError; exports.DocumentGenerationService = _chunkXBF4EUC4js.DocumentGenerationService; exports.DocumentGenerationTemplateNotFoundError = _chunkXBF4EUC4js.DocumentGenerationTemplateNotFoundError; exports.DocumentProcessingHook = _chunkXBF4EUC4js.DocumentProcessingHook; exports.DocumentProcessingService = _chunkXBF4EUC4js.DocumentProcessingService; exports.DocumentRenderError = _chunkXBF4EUC4js.DocumentRenderError; exports.DocumentRendererService = _chunkXBF4EUC4js.DocumentRendererService; exports.DocumentService = _chunkXBF4EUC4js.DocumentService; exports.DocumentTemplateService = _chunkXBF4EUC4js.DocumentTemplateService; exports.EndExecutor = _chunkXBF4EUC4js.EndExecutor; exports.ExecutorRegistry = _chunkXBF4EUC4js.ExecutorRegistry; exports.FileService = _chunkXBF4EUC4js.FileService; exports.FormExecutor = _chunkXBF4EUC4js.FormExecutor; exports.FormulaResolverService = _chunkXBF4EUC4js.FormulaResolverService; exports.GeocodingService = _chunkXBF4EUC4js.GeocodingService; exports.GlobalSearchService = _chunkXBF4EUC4js.GlobalSearchService; exports.GrantExpiredError = _chunkXBF4EUC4js.GrantExpiredError; exports.GrantNotFoundError = _chunkXBF4EUC4js.GrantNotFoundError; exports.GrantRevokedError = _chunkXBF4EUC4js.GrantRevokedError; exports.InvalidPathError = _chunkXBF4EUC4js.InvalidPathError; exports.InvitationAlreadyAcceptedError = _chunkXBF4EUC4js.InvitationAlreadyAcceptedError; exports.InvitationExpiredError = _chunkXBF4EUC4js.InvitationExpiredError; exports.InvitationNotFoundError = _chunkXBF4EUC4js.InvitationNotFoundError; exports.InvitationRevokedError = _chunkXBF4EUC4js.InvitationRevokedError; exports.MaxDepthExceededError = _chunkXBF4EUC4js.MaxDepthExceededError; exports.NoopCacheAdapter = _chunkXBF4EUC4js.NoopCacheAdapter; exports.NoopGeocodingAdapter = _chunkXBF4EUC4js.NoopGeocodingAdapter; exports.NoopHookRegistry = _chunkXBF4EUC4js.NoopHookRegistry; exports.ObjectSchemaService = _chunkXBF4EUC4js.ObjectSchemaService; exports.PermissionService = _chunkXBF4EUC4js.PermissionService; exports.PolicyRegistry = _chunkXBF4EUC4js.PolicyRegistry; exports.PolicyViolationError = _chunkXBF4EUC4js.PolicyViolationError; exports.QueryBuilder = _chunkXBF4EUC4js.QueryBuilder; exports.QueryMultipleResultsError = _chunkXBF4EUC4js.QueryMultipleResultsError; exports.QueryNoResultError = _chunkXBF4EUC4js.QueryNoResultError; exports.RecordQueryService = _chunkXBF4EUC4js.RecordQueryService; exports.RecordResolverService = _chunkXBF4EUC4js.RecordResolverService; exports.RecordService = _chunkXBF4EUC4js.RecordService; exports.RelationService = _chunkXBF4EUC4js.RelationService; exports.RollupScheduler = _chunkXBF4EUC4js.RollupScheduler; exports.RollupService = _chunkXBF4EUC4js.RollupService; exports.SHORTCUT_TO_FILTER_OPERATOR = _chunkXBF4EUC4js.SHORTCUT_TO_FILTER_OPERATOR; exports.SchemaContextAwareRepository = _chunkXBF4EUC4js.SchemaContextAwareRepository; exports.StartExecutor = _chunkXBF4EUC4js.StartExecutor; exports.StorageDownloadNotSupportedError = _chunkXBF4EUC4js.StorageDownloadNotSupportedError; exports.TenantContextError = _chunkXBF4EUC4js.TenantContextError; exports.TokenRevokedError = _chunkXBF4EUC4js.TokenRevokedError; exports.UserProfileService = _chunkXBF4EUC4js.UserProfileService; exports.UserService = _chunkXBF4EUC4js.UserService; exports.ViewService = _chunkXBF4EUC4js.ViewService; exports.WorkflowAccessGrantService = _chunkXBF4EUC4js.WorkflowAccessGrantService; exports.WorkflowInstanceService = _chunkXBF4EUC4js.WorkflowInstanceService; exports.WorkflowInvitationService = _chunkXBF4EUC4js.WorkflowInvitationService; exports.WorkflowJwtService = _chunkXBF4EUC4js.WorkflowJwtService; exports.WorkflowRelationService = _chunkXBF4EUC4js.WorkflowRelationService; exports.WorkflowService = _chunkXBF4EUC4js.WorkflowService; exports.addSchemaToContext = _chunkXBF4EUC4js.addSchemaToContext; exports.applyDefaultValues = _chunkXBF4EUC4js.applyDefaultValues; exports.buildAuditChanges = _chunkXBF4EUC4js.buildAuditChanges; exports.buildPolicyContext = _chunkXBF4EUC4js.buildPolicyContext; exports.cacheKeys = _chunkXBF4EUC4js.cacheKeys; exports.cacheTtl = _chunkXBF4EUC4js.cacheTtl; exports.checkPermission = _chunkXBF4EUC4js.checkPermission; exports.checkRecordAccess = _chunkXBF4EUC4js.checkRecordAccess; exports.checkRecordDeleteOrThrow = _chunkXBF4EUC4js.checkRecordDeleteOrThrow; exports.checkRecordModifyOrThrow = _chunkXBF4EUC4js.checkRecordModifyOrThrow; exports.checkSharedObjectWriteAccess = _chunkXBF4EUC4js.checkSharedObjectWriteAccess; exports.complete = _chunkXBF4EUC4js.complete; exports.computeLabel = _chunkXBF4EUC4js.computeLabel; exports.computeLabelWithRelations = _chunkXBF4EUC4js.computeLabelWithRelations; exports.createContextForCreate = _chunkXBF4EUC4js.createContextForCreate; exports.createContextForDelete = _chunkXBF4EUC4js.createContextForDelete; exports.createContextForRestore = _chunkXBF4EUC4js.createContextForRestore; exports.createContextForUpdate = _chunkXBF4EUC4js.createContextForUpdate; exports.createDefaultExecutorRegistry = _chunkXBF4EUC4js.createDefaultExecutorRegistry; exports.createDefaultState = _chunkXBF4EUC4js.createDefaultState; exports.createMockAdapter = _chunkXBF4EUC4js.createMockAdapter; exports.createQueryBuilder = _chunkXBF4EUC4js.createQueryBuilder; exports.defaultPolicyRegistry = _chunkXBF4EUC4js.defaultPolicyRegistry; exports.defaultTtl = _chunkXBF4EUC4js.defaultTtl; exports.enrichRecordsWithFormulas = _chunkXBF4EUC4js.enrichRecordsWithFormulas; exports.enrichValuesForDisplay = _chunkXBF4EUC4js.enrichValuesForDisplay; exports.enrichValuesWithSelectLabels = _chunkXBF4EUC4js.enrichValuesWithSelectLabels; exports.enrichWithFormulas = _chunkXBF4EUC4js.enrichWithFormulas; exports.error = _chunkXBF4EUC4js.error; exports.evaluate = _chunkXBF4EUC4js.evaluate; exports.evaluateCondition = _chunkXBF4EUC4js.evaluateCondition; exports.evaluateFormula = _chunkXBF4EUC4js.evaluateFormula; exports.evaluateFormulaAttribute = _chunkXBF4EUC4js.evaluateFormulaAttribute; exports.evaluateFormulaAttributeWithRelations = _chunkXBF4EUC4js.evaluateFormulaAttributeWithRelations; exports.evaluateFormulaWithRelations = _chunkXBF4EUC4js.evaluateFormulaWithRelations; exports.evaluateFormulaWithResult = _chunkXBF4EUC4js.evaluateFormulaWithResult; exports.evaluateWithTrace = _chunkXBF4EUC4js.evaluateWithTrace; exports.extractAttributeNames = _chunkXBF4EUC4js.extractAttributeNames; exports.extractFormulaVariables = _chunkXBF4EUC4js.extractFormulaVariables; exports.extractRelationIds = _chunkXBF4EUC4js.extractRelationIds; exports.extractRelationNames = _chunkXBF4EUC4js.extractRelationNames; exports.extractRelationReferences = _chunkXBF4EUC4js.extractRelationReferences; exports.flattenRelationsForEval = _chunkXBF4EUC4js.flattenRelationsForEval; exports.formatFormulaResult = _chunkXBF4EUC4js.formatFormulaResult; exports.formatRecord = _chunkXBF4EUC4js.formatRecord; exports.formatRecords = _chunkXBF4EUC4js.formatRecords; exports.getContext = _chunkXBF4EUC4js.getContext; exports.getDefaultExecutorRegistry = _chunkXBF4EUC4js.getDefaultExecutorRegistry; exports.getPathDepth = _chunkXBF4EUC4js.getPathDepth; exports.getPolicy = _chunkXBF4EUC4js.getPolicy; exports.getRelationPath = _chunkXBF4EUC4js.getRelationPath; exports.getSchemaByNameFromContext = _chunkXBF4EUC4js.getSchemaByNameFromContext; exports.getSchemaContext = _chunkXBF4EUC4js.getSchemaContext; exports.getSchemaFromContext = _chunkXBF4EUC4js.getSchemaFromContext; exports.getSyncPreview = _chunkXBF4EUC4js.getSyncPreview; exports.getTargetAttributeName = _chunkXBF4EUC4js.getTargetAttributeName; exports.getTenantId = _chunkXBF4EUC4js.getTenantId; exports.getUserId = _chunkXBF4EUC4js.getUserId; exports.getViewSyncPreview = _chunkXBF4EUC4js.getViewSyncPreview; exports.hasContext = _chunkXBF4EUC4js.hasContext; exports.hasRelationReferences = _chunkXBF4EUC4js.hasRelationReferences; exports.hasSchemaContext = _chunkXBF4EUC4js.hasSchemaContext; exports.hashOptions = _chunkXBF4EUC4js.hashOptions; exports.isLabelExpression = _chunkXBF4EUC4js.isLabelExpression; exports.notesPolicy = _chunkXBF4EUC4js.notesPolicy; exports.parsePath = _chunkXBF4EUC4js.parsePath; exports.pathHasManyCardinality = _chunkXBF4EUC4js.pathHasManyCardinality; exports.recalculateParentRollups = _chunkXBF4EUC4js.recalculateParentRollups; exports.renderLabelExpression = _chunkXBF4EUC4js.renderLabelExpression; exports.resolveMultiplePaths = _chunkXBF4EUC4js.resolveMultiplePaths; exports.resolveSingleValue = _chunkXBF4EUC4js.resolveSingleValue; exports.runWithContext = _chunkXBF4EUC4js.runWithContext; exports.runWithMergedSchemaContext = _chunkXBF4EUC4js.runWithMergedSchemaContext; exports.runWithSchemaContext = _chunkXBF4EUC4js.runWithSchemaContext; exports.success = _chunkXBF4EUC4js.success; exports.syncAll = _chunkXBF4EUC4js.syncAll; exports.syncNativeObjects = _chunkXBF4EUC4js.syncNativeObjects; exports.syncNativeViews = _chunkXBF4EUC4js.syncNativeViews; exports.traversePath = _chunkXBF4EUC4js.traversePath; exports.validateFormulaExpression = _chunkXBF4EUC4js.validateFormulaExpression; exports.validatePath = _chunkXBF4EUC4js.validatePath; exports.verifyNativeObjectsSync = _chunkXBF4EUC4js.verifyNativeObjectsSync; exports.verifyNativeViewsSync = _chunkXBF4EUC4js.verifyNativeViewsSync; exports.wait = _chunkXBF4EUC4js.wait; exports.withTenantContext = _chunkXBF4EUC4js.withTenantContext;
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+ exports.AuditService = _chunk2OS63USQjs.AuditService; exports.BaseRepository = _chunk2OS63USQjs.BaseRepository; exports.BaseService = _chunk2OS63USQjs.BaseService; exports.ConditionExecutor = _chunk2OS63USQjs.ConditionExecutor; exports.DEFAULT_LABEL_FALLBACK = _chunk2OS63USQjs.DEFAULT_LABEL_FALLBACK; exports.DocumentExecutor = _chunk2OS63USQjs.DocumentExecutor; exports.DocumentGenerationNotConfiguredError = _chunk2OS63USQjs.DocumentGenerationNotConfiguredError; exports.DocumentGenerationService = _chunk2OS63USQjs.DocumentGenerationService; exports.DocumentGenerationTemplateNotFoundError = _chunk2OS63USQjs.DocumentGenerationTemplateNotFoundError; exports.DocumentProcessingHook = _chunk2OS63USQjs.DocumentProcessingHook; exports.DocumentProcessingService = _chunk2OS63USQjs.DocumentProcessingService; exports.DocumentRenderError = _chunk2OS63USQjs.DocumentRenderError; exports.DocumentRendererService = _chunk2OS63USQjs.DocumentRendererService; exports.DocumentService = _chunk2OS63USQjs.DocumentService; exports.DocumentTemplateService = _chunk2OS63USQjs.DocumentTemplateService; exports.EndExecutor = _chunk2OS63USQjs.EndExecutor; exports.ExecutorRegistry = _chunk2OS63USQjs.ExecutorRegistry; exports.FeatureFlagsContextError = _chunk2OS63USQjs.FeatureFlagsContextError; exports.FileService = _chunk2OS63USQjs.FileService; exports.FormExecutor = _chunk2OS63USQjs.FormExecutor; exports.FormulaResolverService = _chunk2OS63USQjs.FormulaResolverService; exports.GeocodingService = _chunk2OS63USQjs.GeocodingService; exports.GlobalSearchService = _chunk2OS63USQjs.GlobalSearchService; exports.GrantExpiredError = _chunk2OS63USQjs.GrantExpiredError; exports.GrantNotFoundError = _chunk2OS63USQjs.GrantNotFoundError; exports.GrantRevokedError = _chunk2OS63USQjs.GrantRevokedError; exports.InvalidPathError = _chunk2OS63USQjs.InvalidPathError; exports.InvitationAlreadyAcceptedError = _chunk2OS63USQjs.InvitationAlreadyAcceptedError; exports.InvitationExpiredError = _chunk2OS63USQjs.InvitationExpiredError; exports.InvitationNotFoundError = _chunk2OS63USQjs.InvitationNotFoundError; exports.InvitationRevokedError = _chunk2OS63USQjs.InvitationRevokedError; exports.MaxDepthExceededError = _chunk2OS63USQjs.MaxDepthExceededError; exports.NoopCacheAdapter = _chunk2OS63USQjs.NoopCacheAdapter; exports.NoopGeocodingAdapter = _chunk2OS63USQjs.NoopGeocodingAdapter; exports.NoopHookRegistry = _chunk2OS63USQjs.NoopHookRegistry; exports.ObjectSchemaService = _chunk2OS63USQjs.ObjectSchemaService; exports.PermissionService = _chunk2OS63USQjs.PermissionService; exports.PolicyRegistry = _chunk2OS63USQjs.PolicyRegistry; exports.PolicyViolationError = _chunk2OS63USQjs.PolicyViolationError; exports.QueryBuilder = _chunk2OS63USQjs.QueryBuilder; exports.QueryMultipleResultsError = _chunk2OS63USQjs.QueryMultipleResultsError; exports.QueryNoResultError = _chunk2OS63USQjs.QueryNoResultError; exports.RecordQueryService = _chunk2OS63USQjs.RecordQueryService; exports.RecordResolverService = _chunk2OS63USQjs.RecordResolverService; exports.RecordService = _chunk2OS63USQjs.RecordService; exports.RelationService = _chunk2OS63USQjs.RelationService; exports.RollupScheduler = _chunk2OS63USQjs.RollupScheduler; exports.RollupService = _chunk2OS63USQjs.RollupService; exports.SHORTCUT_TO_FILTER_OPERATOR = _chunk2OS63USQjs.SHORTCUT_TO_FILTER_OPERATOR; exports.SchemaContextAwareRepository = _chunk2OS63USQjs.SchemaContextAwareRepository; exports.StartExecutor = _chunk2OS63USQjs.StartExecutor; exports.StorageDownloadNotSupportedError = _chunk2OS63USQjs.StorageDownloadNotSupportedError; exports.TenantContextError = _chunk2OS63USQjs.TenantContextError; exports.TokenRevokedError = _chunk2OS63USQjs.TokenRevokedError; exports.UserProfileService = _chunk2OS63USQjs.UserProfileService; exports.UserService = _chunk2OS63USQjs.UserService; exports.ViewService = _chunk2OS63USQjs.ViewService; exports.WorkflowAccessGrantService = _chunk2OS63USQjs.WorkflowAccessGrantService; exports.WorkflowInstanceService = _chunk2OS63USQjs.WorkflowInstanceService; exports.WorkflowInvitationService = _chunk2OS63USQjs.WorkflowInvitationService; exports.WorkflowJwtService = _chunk2OS63USQjs.WorkflowJwtService; exports.WorkflowRelationService = _chunk2OS63USQjs.WorkflowRelationService; exports.WorkflowService = _chunk2OS63USQjs.WorkflowService; exports.addSchemaToContext = _chunk2OS63USQjs.addSchemaToContext; exports.applyDefaultValues = _chunk2OS63USQjs.applyDefaultValues; exports.buildAuditChanges = _chunk2OS63USQjs.buildAuditChanges; exports.buildPolicyContext = _chunk2OS63USQjs.buildPolicyContext; exports.cacheKeys = _chunk2OS63USQjs.cacheKeys; exports.cacheTtl = _chunk2OS63USQjs.cacheTtl; exports.checkPermission = _chunk2OS63USQjs.checkPermission; exports.checkRecordAccess = _chunk2OS63USQjs.checkRecordAccess; exports.checkRecordDeleteOrThrow = _chunk2OS63USQjs.checkRecordDeleteOrThrow; exports.checkRecordModifyOrThrow = _chunk2OS63USQjs.checkRecordModifyOrThrow; exports.checkSharedObjectWriteAccess = _chunk2OS63USQjs.checkSharedObjectWriteAccess; exports.complete = _chunk2OS63USQjs.complete; exports.computeLabel = _chunk2OS63USQjs.computeLabel; exports.computeLabelWithRelations = _chunk2OS63USQjs.computeLabelWithRelations; exports.createContextForCreate = _chunk2OS63USQjs.createContextForCreate; exports.createContextForDelete = _chunk2OS63USQjs.createContextForDelete; exports.createContextForRestore = _chunk2OS63USQjs.createContextForRestore; exports.createContextForUpdate = _chunk2OS63USQjs.createContextForUpdate; exports.createDefaultExecutorRegistry = _chunk2OS63USQjs.createDefaultExecutorRegistry; exports.createDefaultState = _chunk2OS63USQjs.createDefaultState; exports.createMockAdapter = _chunk2OS63USQjs.createMockAdapter; exports.createQueryBuilder = _chunk2OS63USQjs.createQueryBuilder; exports.defaultPolicyRegistry = _chunk2OS63USQjs.defaultPolicyRegistry; exports.defaultTtl = _chunk2OS63USQjs.defaultTtl; exports.enrichRecordsWithFormulas = _chunk2OS63USQjs.enrichRecordsWithFormulas; exports.enrichValuesForDisplay = _chunk2OS63USQjs.enrichValuesForDisplay; exports.enrichValuesWithSelectLabels = _chunk2OS63USQjs.enrichValuesWithSelectLabels; exports.enrichWithFormulas = _chunk2OS63USQjs.enrichWithFormulas; exports.error = _chunk2OS63USQjs.error; exports.evaluate = _chunk2OS63USQjs.evaluate; exports.evaluateCondition = _chunk2OS63USQjs.evaluateCondition; exports.evaluateFormula = _chunk2OS63USQjs.evaluateFormula; exports.evaluateFormulaAttribute = _chunk2OS63USQjs.evaluateFormulaAttribute; exports.evaluateFormulaAttributeWithRelations = _chunk2OS63USQjs.evaluateFormulaAttributeWithRelations; exports.evaluateFormulaWithRelations = _chunk2OS63USQjs.evaluateFormulaWithRelations; exports.evaluateFormulaWithResult = _chunk2OS63USQjs.evaluateFormulaWithResult; exports.evaluateWithTrace = _chunk2OS63USQjs.evaluateWithTrace; exports.extractAttributeNames = _chunk2OS63USQjs.extractAttributeNames; exports.extractFormulaVariables = _chunk2OS63USQjs.extractFormulaVariables; exports.extractRelationIds = _chunk2OS63USQjs.extractRelationIds; exports.extractRelationNames = _chunk2OS63USQjs.extractRelationNames; exports.extractRelationReferences = _chunk2OS63USQjs.extractRelationReferences; exports.flattenRelationsForEval = _chunk2OS63USQjs.flattenRelationsForEval; exports.formatFormulaResult = _chunk2OS63USQjs.formatFormulaResult; exports.formatRecord = _chunk2OS63USQjs.formatRecord; exports.formatRecords = _chunk2OS63USQjs.formatRecords; exports.getContext = _chunk2OS63USQjs.getContext; exports.getDefaultExecutorRegistry = _chunk2OS63USQjs.getDefaultExecutorRegistry; exports.getFeatureFlags = _chunk2OS63USQjs.getFeatureFlags; exports.getFeatureValue = _chunk2OS63USQjs.getFeatureValue; exports.getPathDepth = _chunk2OS63USQjs.getPathDepth; exports.getPolicy = _chunk2OS63USQjs.getPolicy; exports.getRelationPath = _chunk2OS63USQjs.getRelationPath; exports.getSchemaByNameFromContext = _chunk2OS63USQjs.getSchemaByNameFromContext; exports.getSchemaContext = _chunk2OS63USQjs.getSchemaContext; exports.getSchemaFromContext = _chunk2OS63USQjs.getSchemaFromContext; exports.getSyncPreview = _chunk2OS63USQjs.getSyncPreview; exports.getTargetAttributeName = _chunk2OS63USQjs.getTargetAttributeName; exports.getTenantId = _chunk2OS63USQjs.getTenantId; exports.getUserId = _chunk2OS63USQjs.getUserId; exports.getViewSeedPreview = _chunk2OS63USQjs.getViewSeedPreview; exports.getViewSyncPreview = _chunk2OS63USQjs.getViewSyncPreview; exports.hasContext = _chunk2OS63USQjs.hasContext; exports.hasFeatureFlagsContext = _chunk2OS63USQjs.hasFeatureFlagsContext; exports.hasRelationReferences = _chunk2OS63USQjs.hasRelationReferences; exports.hasSchemaContext = _chunk2OS63USQjs.hasSchemaContext; exports.hashOptions = _chunk2OS63USQjs.hashOptions; exports.isFeatureEnabled = _chunk2OS63USQjs.isFeatureEnabled; exports.isLabelExpression = _chunk2OS63USQjs.isLabelExpression; exports.notesPolicy = _chunk2OS63USQjs.notesPolicy; exports.parsePath = _chunk2OS63USQjs.parsePath; exports.pathHasManyCardinality = _chunk2OS63USQjs.pathHasManyCardinality; exports.recalculateParentRollups = _chunk2OS63USQjs.recalculateParentRollups; exports.renderLabelExpression = _chunk2OS63USQjs.renderLabelExpression; exports.resolveMultiplePaths = _chunk2OS63USQjs.resolveMultiplePaths; exports.resolveSingleValue = _chunk2OS63USQjs.resolveSingleValue; exports.runWithContext = _chunk2OS63USQjs.runWithContext; exports.runWithFeatureFlags = _chunk2OS63USQjs.runWithFeatureFlags; exports.runWithMergedSchemaContext = _chunk2OS63USQjs.runWithMergedSchemaContext; exports.runWithSchemaContext = _chunk2OS63USQjs.runWithSchemaContext; exports.seedRegistryViews = _chunk2OS63USQjs.seedRegistryViews; exports.success = _chunk2OS63USQjs.success; exports.syncAll = _chunk2OS63USQjs.syncAll; exports.syncNativeObjects = _chunk2OS63USQjs.syncNativeObjects; exports.syncNativeViews = _chunk2OS63USQjs.syncNativeViews; exports.traversePath = _chunk2OS63USQjs.traversePath; exports.tryGetFeatureValue = _chunk2OS63USQjs.tryGetFeatureValue; exports.validateFormulaExpression = _chunk2OS63USQjs.validateFormulaExpression; exports.validatePath = _chunk2OS63USQjs.validatePath; exports.verifyNativeObjectsSync = _chunk2OS63USQjs.verifyNativeObjectsSync; exports.verifyNativeViewsSync = _chunk2OS63USQjs.verifyNativeViewsSync; exports.verifyRegistryViewsSeeded = _chunk2OS63USQjs.verifyRegistryViewsSeeded; exports.wait = _chunk2OS63USQjs.wait; exports.withFeatureFlags = _chunk2OS63USQjs.withFeatureFlags; exports.withTenantContext = _chunk2OS63USQjs.withTenantContext;
package/dist/runtime.mjs CHANGED
@@ -16,6 +16,7 @@ import {
16
16
  DocumentTemplateService,
17
17
  EndExecutor,
18
18
  ExecutorRegistry,
19
+ FeatureFlagsContextError,
19
20
  FileService,
20
21
  FormExecutor,
21
22
  FormulaResolverService,
@@ -109,6 +110,8 @@ import {
109
110
  formatRecords,
110
111
  getContext,
111
112
  getDefaultExecutorRegistry,
113
+ getFeatureFlags,
114
+ getFeatureValue,
112
115
  getPathDepth,
113
116
  getPolicy,
114
117
  getRelationPath,
@@ -119,11 +122,14 @@ import {
119
122
  getTargetAttributeName,
120
123
  getTenantId,
121
124
  getUserId,
125
+ getViewSeedPreview,
122
126
  getViewSyncPreview,
123
127
  hasContext,
128
+ hasFeatureFlagsContext,
124
129
  hasRelationReferences,
125
130
  hasSchemaContext,
126
131
  hashOptions,
132
+ isFeatureEnabled,
127
133
  isLabelExpression,
128
134
  notesPolicy,
129
135
  parsePath,
@@ -133,20 +139,27 @@ import {
133
139
  resolveMultiplePaths,
134
140
  resolveSingleValue,
135
141
  runWithContext,
142
+ runWithFeatureFlags,
136
143
  runWithMergedSchemaContext,
137
144
  runWithSchemaContext,
145
+ seedRegistryViews,
138
146
  success,
139
147
  syncAll,
140
148
  syncNativeObjects,
141
149
  syncNativeViews,
142
150
  traversePath,
151
+ tryGetFeatureValue,
143
152
  validateFormulaExpression,
144
153
  validatePath,
145
154
  verifyNativeObjectsSync,
146
155
  verifyNativeViewsSync,
156
+ verifyRegistryViewsSeeded,
147
157
  wait,
158
+ withFeatureFlags,
148
159
  withTenantContext
149
- } from "./chunk-LOOGQL6M.mjs";
160
+ } from "./chunk-JRY236AO.mjs";
161
+ import "./chunk-V2RPPE2Y.mjs";
162
+ import "./chunk-SV4BCGQU.mjs";
150
163
  import "./chunk-Y6FXYEAI.mjs";
151
164
  export {
152
165
  AuditService,
@@ -166,6 +179,7 @@ export {
166
179
  DocumentTemplateService,
167
180
  EndExecutor,
168
181
  ExecutorRegistry,
182
+ FeatureFlagsContextError,
169
183
  FileService,
170
184
  FormExecutor,
171
185
  FormulaResolverService,
@@ -259,6 +273,8 @@ export {
259
273
  formatRecords,
260
274
  getContext,
261
275
  getDefaultExecutorRegistry,
276
+ getFeatureFlags,
277
+ getFeatureValue,
262
278
  getPathDepth,
263
279
  getPolicy,
264
280
  getRelationPath,
@@ -269,11 +285,14 @@ export {
269
285
  getTargetAttributeName,
270
286
  getTenantId,
271
287
  getUserId,
288
+ getViewSeedPreview,
272
289
  getViewSyncPreview,
273
290
  hasContext,
291
+ hasFeatureFlagsContext,
274
292
  hasRelationReferences,
275
293
  hasSchemaContext,
276
294
  hashOptions,
295
+ isFeatureEnabled,
277
296
  isLabelExpression,
278
297
  notesPolicy,
279
298
  parsePath,
@@ -283,17 +302,22 @@ export {
283
302
  resolveMultiplePaths,
284
303
  resolveSingleValue,
285
304
  runWithContext,
305
+ runWithFeatureFlags,
286
306
  runWithMergedSchemaContext,
287
307
  runWithSchemaContext,
308
+ seedRegistryViews,
288
309
  success,
289
310
  syncAll,
290
311
  syncNativeObjects,
291
312
  syncNativeViews,
292
313
  traversePath,
314
+ tryGetFeatureValue,
293
315
  validateFormulaExpression,
294
316
  validatePath,
295
317
  verifyNativeObjectsSync,
296
318
  verifyNativeViewsSync,
319
+ verifyRegistryViewsSeeded,
297
320
  wait,
321
+ withFeatureFlags,
298
322
  withTenantContext
299
323
  };
@@ -0,0 +1,154 @@
1
+ /**
2
+ * Brand symbol for nominal typing.
3
+ * This ensures type-safety by making IDs non-interchangeable.
4
+ */
5
+ declare const __brand: unique symbol;
6
+ /**
7
+ * Creates a branded type from a base type.
8
+ * Branded types are structurally identical but nominally different.
9
+ */
10
+ type Brand<T, B> = T & {
11
+ readonly [__brand]: B;
12
+ };
13
+ /**
14
+ * UUID string type for all identifiers
15
+ */
16
+ type Uuid = string;
17
+ /**
18
+ * Tenant identifier for multi-tenant isolation.
19
+ * Branded type to prevent accidental mixing with other string IDs.
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * const tenantId: TenantId = asTenantId('tenant-123');
24
+ * const userId: UserId = asUserId('user-456');
25
+ *
26
+ * // Type error: cannot assign UserId to TenantId
27
+ * const wrong: TenantId = userId;
28
+ * ```
29
+ */
30
+ type TenantId = Brand<string, "TenantId">;
31
+ /**
32
+ * User identifier for audit trails and permissions.
33
+ * Branded type to prevent accidental mixing with other string IDs.
34
+ */
35
+ type UserId = Brand<string, "UserId">;
36
+ /**
37
+ * Convert a string to a TenantId.
38
+ * Use this when receiving tenant IDs from external sources (JWT, headers).
39
+ *
40
+ * @param id - The string to convert
41
+ * @returns A branded TenantId
42
+ *
43
+ * @example
44
+ * ```typescript
45
+ * const tenantId = asTenantId(request.headers['x-tenant-id']);
46
+ * ```
47
+ */
48
+ declare function asTenantId(id: string): TenantId;
49
+ /**
50
+ * Convert a string to a UserId.
51
+ * Use this when receiving user IDs from external sources (JWT, auth).
52
+ *
53
+ * @param id - The string to convert
54
+ * @returns A branded UserId
55
+ *
56
+ * @example
57
+ * ```typescript
58
+ * const userId = asUserId(jwtPayload.sub);
59
+ * ```
60
+ */
61
+ declare function asUserId(id: string): UserId;
62
+ /**
63
+ * Generate a unique UUID v4
64
+ * Uses crypto.randomUUID() when available (Node.js 19+, modern browsers)
65
+ * Falls back to a manual implementation for older environments
66
+ *
67
+ * @returns A UUID v4 string
68
+ *
69
+ * @example
70
+ * ```typescript
71
+ * const id = generateId();
72
+ * // "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
73
+ * ```
74
+ */
75
+ declare function generateId(): Uuid;
76
+ /**
77
+ * Generate a prefixed ID for better debugging and readability
78
+ *
79
+ * @param prefix - Prefix for the ID (e.g., "obj", "attr", "rec")
80
+ * @returns A prefixed UUID string
81
+ *
82
+ * @example
83
+ * ```typescript
84
+ * const objectId = generatePrefixedId("obj");
85
+ * // "obj_a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
86
+ *
87
+ * const attrId = generatePrefixedId("attr");
88
+ * // "attr_a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
89
+ * ```
90
+ */
91
+ declare function generatePrefixedId(prefix: string): Uuid;
92
+ /**
93
+ * Convert a string to a valid kebab-case slug.
94
+ * Removes accents, special chars, and normalizes spaces.
95
+ *
96
+ * @param input - The string to slugify
97
+ * @returns A kebab-case slug matching pattern ^[a-z][a-z0-9-]*$
98
+ *
99
+ * @example
100
+ * ```typescript
101
+ * slugify("Contrat de Vente");
102
+ * // "contrat-de-vente"
103
+ *
104
+ * slugify("Éléphant café");
105
+ * // "elephant-cafe"
106
+ *
107
+ * slugify(" Multiple Spaces ");
108
+ * // "multiple-spaces"
109
+ * ```
110
+ */
111
+ declare function slugify(input: string): string;
112
+ /**
113
+ * Generate a unique template name from a label.
114
+ * Format: {slugified-label}-{8-char-suffix}
115
+ * Matches DB constraint: ^[a-z][a-z0-9_-]*$
116
+ *
117
+ * @param label - The label to generate a name from
118
+ * @returns A unique kebab-case name
119
+ *
120
+ * @example
121
+ * ```typescript
122
+ * generateTemplateName("Contrat de Vente");
123
+ * // "contrat-de-vente-a1b2c3d4"
124
+ *
125
+ * generateTemplateName("");
126
+ * // "template-a1b2c3d4"
127
+ * ```
128
+ */
129
+ declare function generateTemplateName(label: string): string;
130
+ /**
131
+ * Create a Map indexed by a key extracted from each item.
132
+ * This eliminates the repeated pattern: new Map(items.map(item => [keyFn(item), item]))
133
+ *
134
+ * Time complexity: O(n)
135
+ * Space complexity: O(n)
136
+ *
137
+ * @param items - Array of items to index
138
+ * @param keyFn - Function to extract the key from each item
139
+ * @returns Map indexed by the extracted key
140
+ *
141
+ * @example
142
+ * ```typescript
143
+ * const attributes = [{ name: "title", type: "text" }, { name: "status", type: "select" }];
144
+ *
145
+ * // Before:
146
+ * const attrMap = new Map(attributes.map(a => [a.name, a]));
147
+ *
148
+ * // After:
149
+ * const attrMap = indexBy(attributes, a => a.name);
150
+ * ```
151
+ */
152
+ declare function indexBy<T, K extends PropertyKey>(items: T[], keyFn: (item: T) => K): Map<K, T>;
153
+
154
+ export { type TenantId, type UserId, type Uuid, asTenantId, asUserId, generateId, generatePrefixedId, generateTemplateName, indexBy, slugify };
@@ -0,0 +1,154 @@
1
+ /**
2
+ * Brand symbol for nominal typing.
3
+ * This ensures type-safety by making IDs non-interchangeable.
4
+ */
5
+ declare const __brand: unique symbol;
6
+ /**
7
+ * Creates a branded type from a base type.
8
+ * Branded types are structurally identical but nominally different.
9
+ */
10
+ type Brand<T, B> = T & {
11
+ readonly [__brand]: B;
12
+ };
13
+ /**
14
+ * UUID string type for all identifiers
15
+ */
16
+ type Uuid = string;
17
+ /**
18
+ * Tenant identifier for multi-tenant isolation.
19
+ * Branded type to prevent accidental mixing with other string IDs.
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * const tenantId: TenantId = asTenantId('tenant-123');
24
+ * const userId: UserId = asUserId('user-456');
25
+ *
26
+ * // Type error: cannot assign UserId to TenantId
27
+ * const wrong: TenantId = userId;
28
+ * ```
29
+ */
30
+ type TenantId = Brand<string, "TenantId">;
31
+ /**
32
+ * User identifier for audit trails and permissions.
33
+ * Branded type to prevent accidental mixing with other string IDs.
34
+ */
35
+ type UserId = Brand<string, "UserId">;
36
+ /**
37
+ * Convert a string to a TenantId.
38
+ * Use this when receiving tenant IDs from external sources (JWT, headers).
39
+ *
40
+ * @param id - The string to convert
41
+ * @returns A branded TenantId
42
+ *
43
+ * @example
44
+ * ```typescript
45
+ * const tenantId = asTenantId(request.headers['x-tenant-id']);
46
+ * ```
47
+ */
48
+ declare function asTenantId(id: string): TenantId;
49
+ /**
50
+ * Convert a string to a UserId.
51
+ * Use this when receiving user IDs from external sources (JWT, auth).
52
+ *
53
+ * @param id - The string to convert
54
+ * @returns A branded UserId
55
+ *
56
+ * @example
57
+ * ```typescript
58
+ * const userId = asUserId(jwtPayload.sub);
59
+ * ```
60
+ */
61
+ declare function asUserId(id: string): UserId;
62
+ /**
63
+ * Generate a unique UUID v4
64
+ * Uses crypto.randomUUID() when available (Node.js 19+, modern browsers)
65
+ * Falls back to a manual implementation for older environments
66
+ *
67
+ * @returns A UUID v4 string
68
+ *
69
+ * @example
70
+ * ```typescript
71
+ * const id = generateId();
72
+ * // "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
73
+ * ```
74
+ */
75
+ declare function generateId(): Uuid;
76
+ /**
77
+ * Generate a prefixed ID for better debugging and readability
78
+ *
79
+ * @param prefix - Prefix for the ID (e.g., "obj", "attr", "rec")
80
+ * @returns A prefixed UUID string
81
+ *
82
+ * @example
83
+ * ```typescript
84
+ * const objectId = generatePrefixedId("obj");
85
+ * // "obj_a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
86
+ *
87
+ * const attrId = generatePrefixedId("attr");
88
+ * // "attr_a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
89
+ * ```
90
+ */
91
+ declare function generatePrefixedId(prefix: string): Uuid;
92
+ /**
93
+ * Convert a string to a valid kebab-case slug.
94
+ * Removes accents, special chars, and normalizes spaces.
95
+ *
96
+ * @param input - The string to slugify
97
+ * @returns A kebab-case slug matching pattern ^[a-z][a-z0-9-]*$
98
+ *
99
+ * @example
100
+ * ```typescript
101
+ * slugify("Contrat de Vente");
102
+ * // "contrat-de-vente"
103
+ *
104
+ * slugify("Éléphant café");
105
+ * // "elephant-cafe"
106
+ *
107
+ * slugify(" Multiple Spaces ");
108
+ * // "multiple-spaces"
109
+ * ```
110
+ */
111
+ declare function slugify(input: string): string;
112
+ /**
113
+ * Generate a unique template name from a label.
114
+ * Format: {slugified-label}-{8-char-suffix}
115
+ * Matches DB constraint: ^[a-z][a-z0-9_-]*$
116
+ *
117
+ * @param label - The label to generate a name from
118
+ * @returns A unique kebab-case name
119
+ *
120
+ * @example
121
+ * ```typescript
122
+ * generateTemplateName("Contrat de Vente");
123
+ * // "contrat-de-vente-a1b2c3d4"
124
+ *
125
+ * generateTemplateName("");
126
+ * // "template-a1b2c3d4"
127
+ * ```
128
+ */
129
+ declare function generateTemplateName(label: string): string;
130
+ /**
131
+ * Create a Map indexed by a key extracted from each item.
132
+ * This eliminates the repeated pattern: new Map(items.map(item => [keyFn(item), item]))
133
+ *
134
+ * Time complexity: O(n)
135
+ * Space complexity: O(n)
136
+ *
137
+ * @param items - Array of items to index
138
+ * @param keyFn - Function to extract the key from each item
139
+ * @returns Map indexed by the extracted key
140
+ *
141
+ * @example
142
+ * ```typescript
143
+ * const attributes = [{ name: "title", type: "text" }, { name: "status", type: "select" }];
144
+ *
145
+ * // Before:
146
+ * const attrMap = new Map(attributes.map(a => [a.name, a]));
147
+ *
148
+ * // After:
149
+ * const attrMap = indexBy(attributes, a => a.name);
150
+ * ```
151
+ */
152
+ declare function indexBy<T, K extends PropertyKey>(items: T[], keyFn: (item: T) => K): Map<K, T>;
153
+
154
+ export { type TenantId, type UserId, type Uuid, asTenantId, asUserId, generateId, generatePrefixedId, generateTemplateName, indexBy, slugify };
package/dist/utils.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+ var _chunkNEVERCM3js = require('./chunk-NEVERCM3.js');
10
+ require('./chunk-3RG5ZIWI.js');
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+ exports.asTenantId = _chunkNEVERCM3js.asTenantId; exports.asUserId = _chunkNEVERCM3js.asUserId; exports.generateId = _chunkNEVERCM3js.generateId; exports.generatePrefixedId = _chunkNEVERCM3js.generatePrefixedId; exports.generateTemplateName = _chunkNEVERCM3js.generateTemplateName; exports.indexBy = _chunkNEVERCM3js.indexBy; exports.slugify = _chunkNEVERCM3js.slugify;
package/dist/utils.mjs ADDED
@@ -0,0 +1,19 @@
1
+ import {
2
+ asTenantId,
3
+ asUserId,
4
+ generateId,
5
+ generatePrefixedId,
6
+ generateTemplateName,
7
+ indexBy,
8
+ slugify
9
+ } from "./chunk-V2RPPE2Y.mjs";
10
+ import "./chunk-Y6FXYEAI.mjs";
11
+ export {
12
+ asTenantId,
13
+ asUserId,
14
+ generateId,
15
+ generatePrefixedId,
16
+ generateTemplateName,
17
+ indexBy,
18
+ slugify
19
+ };