@stndrds/schema 0.1.0-alpha.19 → 0.1.0-alpha.21

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.
Files changed (58) hide show
  1. package/dist/chunk-3RVLIIUK.mjs +9257 -0
  2. package/dist/chunk-4SW4V3YU.mjs +8854 -0
  3. package/dist/chunk-6FNFXEQY.mjs +9316 -0
  4. package/dist/chunk-6TJR4WDK.mjs +9262 -0
  5. package/dist/chunk-7GSIXU67.mjs +8820 -0
  6. package/dist/chunk-BQUYTOB3.mjs +8815 -0
  7. package/dist/chunk-BSAR4UKK.mjs +8851 -0
  8. package/dist/chunk-F27AKBTL.mjs +9452 -0
  9. package/dist/chunk-HSNBVKQU.mjs +9316 -0
  10. package/dist/chunk-I4TTNDN7.mjs +8910 -0
  11. package/dist/chunk-JJLODIBK.mjs +9389 -0
  12. package/dist/chunk-KDHA2N7D.mjs +8927 -0
  13. package/dist/chunk-MAXEN3GU.mjs +9266 -0
  14. package/dist/chunk-MX4X4UEN.mjs +8854 -0
  15. package/dist/chunk-OJWVSONX.mjs +8900 -0
  16. package/dist/chunk-PMYSW54L.mjs +8855 -0
  17. package/dist/chunk-Y5KIRAND.mjs +8916 -0
  18. package/dist/chunk-ZD3BFM25.mjs +9316 -0
  19. package/dist/chunk-ZU5SR355.mjs +8862 -0
  20. package/dist/index.d.mts +8 -197
  21. package/dist/index.d.ts +8 -197
  22. package/dist/index.js +921 -272
  23. package/dist/index.mjs +21 -5
  24. package/dist/runtime-09fOm3VO.d.mts +6383 -0
  25. package/dist/runtime-09fOm3VO.d.ts +6383 -0
  26. package/dist/runtime-0gaIqXql.d.mts +7074 -0
  27. package/dist/runtime-0gaIqXql.d.ts +7074 -0
  28. package/dist/runtime-3u5doYAK.d.mts +6934 -0
  29. package/dist/runtime-3u5doYAK.d.ts +6934 -0
  30. package/dist/runtime-B6mOrMV4.d.mts +6985 -0
  31. package/dist/runtime-B6mOrMV4.d.ts +6985 -0
  32. package/dist/runtime-BMHqETm7.d.mts +6450 -0
  33. package/dist/runtime-BMHqETm7.d.ts +6450 -0
  34. package/dist/runtime-BNML-fPx.d.mts +6969 -0
  35. package/dist/runtime-BNML-fPx.d.ts +6969 -0
  36. package/dist/runtime-BPdsKDJo.d.mts +6969 -0
  37. package/dist/runtime-BPdsKDJo.d.ts +6969 -0
  38. package/dist/runtime-BpsaNQPs.d.mts +6397 -0
  39. package/dist/runtime-BpsaNQPs.d.ts +6397 -0
  40. package/dist/runtime-CHAkwiwa.d.mts +6450 -0
  41. package/dist/runtime-CHAkwiwa.d.ts +6450 -0
  42. package/dist/runtime-CfVfZtoq.d.mts +6437 -0
  43. package/dist/runtime-CfVfZtoq.d.ts +6437 -0
  44. package/dist/runtime-D1jyS1lS.d.mts +7008 -0
  45. package/dist/runtime-D1jyS1lS.d.ts +7008 -0
  46. package/dist/runtime-DjEUAeL4.d.mts +6713 -0
  47. package/dist/runtime-DjEUAeL4.d.ts +6713 -0
  48. package/dist/runtime-rTM9ddEe.d.mts +6934 -0
  49. package/dist/runtime-rTM9ddEe.d.ts +6934 -0
  50. package/dist/runtime-xLzAkAnp.d.mts +6969 -0
  51. package/dist/runtime-xLzAkAnp.d.ts +6969 -0
  52. package/dist/runtime-xtAfMn_f.d.mts +6436 -0
  53. package/dist/runtime-xtAfMn_f.d.ts +6436 -0
  54. package/dist/runtime.d.mts +1 -1
  55. package/dist/runtime.d.ts +1 -1
  56. package/dist/runtime.js +901 -272
  57. package/dist/runtime.mjs +17 -5
  58. package/package.json +2 -2
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as Attribute, S as StatusAttribute, a as SelectAttribute, M as MultiselectAttribute, P as Phone, C as Currency, L as Location, F as FormulaAttribute, R as RollupAttribute, 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, k as FileAttribute, U as UserAttribute, l as SingleRelationAttribute, m as MultiRelationAttribute, n as RelationTarget, o as RatingAttribute, p as FormulaReturnType, q as RollupFunction, r as FlowDefinition, s as FlowPage, t as FlowRow, u as ObjectDefinition, v as Field, w as AttributeGroupField, G as Group, V as ViewDefinition, x as Tab } from './runtime-DSMMZRLE.mjs';
2
- export { bb as ActivityTab, d9 as AddAttributeInput, ar as AdvancedFilterState, b1 as AssignRoleInput, cH as AttributeChange, B as AttributeGroup, y as AttributeType, cT as AttributesRepository, $ as AuditAction, a0 as AuditActorType, a1 as AuditChange, a4 as AuditListOptions, a2 as AuditLogEntry, cZ as AuditRepository, _ as AuditResourceType, d0 as AuditService, a5 as AuditServiceOptions, E as BaseAttribute, ad as CheckboxFilterOperator, aR as CompletionStatus, a3 as CreateAuditLogInput, d8 as CreateCustomObjectInput, d_ as CreateDBAttribute, ec as CreateDBFlow, dW as CreateDBObject, e8 as CreateDBView, a9 as CreateFile, d3 as CreateFlowInput, e1 as CreateObjectRecord, b0 as CreatePermissionInput, a_ as CreateRoleInput, b5 as CreateUserProfile, dz as CreateViewInput, ak as CurrencyFilterValue, ba as CustomTab, dZ as DBAttribute, eb as DBFlow, dV as DBObject, e7 as DBView, dQ as DEFAULT_LABEL_FALLBACK, cc as DatabaseAdapter, ae as DateFilterOperator, I as DateFormat, J as DateValue, W as DocumentFace, Q as DocumentType, X as DocumentTypeConfig, aX as EffectivePermissions, a8 as File, dC as FileContent, e6 as FileListOptions, d2 as FileService, d1 as FileServiceOptions, Y as FileVerificationConfig, a7 as FileVisibility, cV as FilesRepository, ao as FilterCombinator, aq as FilterGroup, ai as FilterOperator, an as FilterRule, ap as FilterState, am as FilterValue, aE as FlowRelation, aD as FlowRowField, d5 as FlowService, aC as FlowSlot, aF as FlowStatus, cY as FlowsRepository, b8 as FormTab, cp as FormulaResult, dO as FullSyncOptions, dN as FullSyncResult, aN as GeocodingAdapter, aK as GeocodingAutocompleteParams, aM as GeocodingParams, d6 as GeocodingService, aJ as GeocodingSuggestion, dl as GetRelationOptionsParams, e4 as GlobalSearchOptions, e5 as GlobalSearchResultItem, d7 as GlobalSearchService, cI as HookContext, cJ as HookDefinition, cK as HookHandler, cN as HookRegistry, cL as HookType, ct as InvalidPathError, e2 as ListOptions, K as LocationGranularity, cu as MaxDepthExceededError, ag as MultiselectFilterOperator, aA as NO_VALUE_OPERATORS, az as NoValueOperator, aO as NoopGeocodingAdapter, cM as NoopHookRegistry, ac as NumberFilterOperator, H as NumberUnit, ay as OPERATORS_BY_TYPE, aQ as ObjectAttribute, aY as ObjectPermissions, aS as ObjectRecord, cW as ObjectRecordsRepository, dc as ObjectSchemaService, db as ObjectSchemaServiceOptions, cS as ObjectsRepository, ee as OperationResult, cy as PathCardinality, cz as PathSegment, cA as PathSegmentType, aV as Permission, aT as PermissionScope, de as PermissionService, dd as PermissionServiceOptions, c_ as PermissionsRepository, al as PhoneFilterValue, ax as QueryState, dg as RecordService, df as RecordServiceOptions, Z as RelationAttribute, ah as RelationFilterOperator, dj as RelationOption, dk as RelationOptionsResponse, dp as RelationResolverService, dm as RelationService, di as RelationValidationError, dh as RelationValidationResult, aj as RelativeDateValue, dn as ResolvedRelations, aL as ReverseGeocodingParams, aU as Role, cQ as RollupHooksConfig, dq as RollupResult, dt as RollupScheduler, ds as RollupSchedulerOptions, dr as RollupService, cB as SchemaResolver, e3 as SearchOptions, af as SelectFilterOperator, dF as SignedUrlOptions, av as SortDirection, aw as SortRule, z as StatusGroup, dG as StorageAdapter, a6 as StorageProvider, dD as StorageUploadInput, dE as StorageUploadResult, dJ as SyncOptions, dI as SyncResult, aZ as SystemPermissions, b7 as TabType, b9 as TableTab, bh as TenantId, ab as TextFilterOperator, aP as Timestamps, cF as TraversalOptions, cG as TraversalResult, d$ as UpdateDBAttribute, ed as UpdateDBFlow, dX as UpdateDBObject, e9 as UpdateDBView, aa as UpdateFile, d4 as UpdateFlowInput, da as UpdateObjectInput, a$ as UpdateRoleInput, b6 as UpdateUserProfile, dA as UpdateViewInput, dH as UploadFileInput, e0 as UpsertDBAttribute, dY as UpsertDBObject, ea as UpsertDBView, b4 as UserProfile, dv as UserProfileService, du as UserProfileServiceOptions, cU as UserProfilesRepository, b2 as UserRole, aW as UserRoleAssignment, dy as UserService, b3 as UserStatus, dx as UserValidationError, dw as UserValidationResult, bg as Uuid, c2 as ValidationResult, dB as ViewService, eg as ViewSyncOptions, ef as ViewSyncResult, cX as ViewsRepository, bE as attributeConfigSchemas, c$ as buildAuditChanges, bp as checkboxConfigSchema, cb as computeRecordStatus, c0 as createAttributeValidator, bL as createCheckboxValidator, bO as createCurrencyValidator, bM as createDateValidator, c6 as createDraftValidator, bU as createFileValidator, b_ as createFormulaValidator, bS as createLocationValidator, cR as createMockAdapter, bX as createMultiRelationValidator, bR as createMultiselectValidator, bK as createNumberValidator, c1 as createObjectValidator, bN as createPhoneValidator, bZ as createRatingValidator, bY as createRelationValidator, cO as createRollupHooks, b$ as createRollupValidator, bQ as createSelectValidator, bW as createSingleRelationValidator, bP as createStatusValidator, bJ as createTextValidator, bT as createTimestampValidator, bV as createUserValidator, bs as currencyConfigSchema, bq as dateConfigSchema, dU as enrichValuesWithSelectLabels, cd as evaluateFormula, ce as evaluateFormulaAttribute, cf as evaluateFormulaAttributeWithRelations, cg as evaluateFormulaWithRelations, ch as evaluateFormulaWithResult, dT as extractAttributeNames, ci as extractFormulaVariables, cj as extractRelationNames, ck as extractRelationReferences, by as fileConfigSchema, cl as flattenRelationsForEval, cm as formatFormulaResult, bC as formulaConfigSchema, bi as generateId, bj as generatePrefixedId, bF as getAttributeConfigSchema, c9 as getMissingRequiredAttributes, cq as getPathDepth, cr as getRelationPath, dM as getSyncPreview, cs as getTargetAttributeName, ej as getViewSyncPreview, cn as hasRelationReferences, bf as isActivityTab, as as isAdvancedFilterState, be as isCustomTab, aG as isFlowDefinition, aH as isFlowPublished, bc as isFormTab, dS as isLabelExpression, aB as isNoValueOperator, ca as isRecordComplete, aI as isSystemFlow, bd as isTableTab, bu as locationConfigSchema, bx as multiselectConfigSchema, bo as numberConfigSchema, bH as parseAttributeConfig, cv as parsePath, cw as pathHasManyCardinality, br as phoneConfigSchema, bB as ratingConfigSchema, cP as registerAllRollupHooks, bk as registry, bA as relationConfigSchema, dR as renderLabelExpression, cC as resolveMultiplePaths, cD as resolveSingleValue, bD as rollupConfigSchema, bI as safeParseAttributeConfig, bw as selectConfigSchema, bt as statusConfigSchema, dP as syncAll, dK as syncNativeObjects, eh as syncNativeViews, bm as textConfigSchema, bn as textareaConfigSchema, bv as timestampConfigSchema, at as toAdvancedFilterState, au as toSimpleFilterState, cE as traversePath, bz as userConfigSchema, c3 as validateAttribute, bG as validateAttributeConfig, c7 as validateDraft, c8 as validateDraftOrThrow, co as validateFormulaExpression, c4 as validateObject, c5 as validateObjectOrThrow, cx as validatePath, dL as verifyNativeObjectsSync, ei as verifyNativeViewsSync, bl as viewRegistry } from './runtime-DSMMZRLE.mjs';
1
+ import { A as Attribute, S as SystemResource, a as SystemAction, O as ObjectAction, T as TextAttribute, b as TextAreaAttribute, N as NumberAttribute, C as CheckboxAttribute, D as DateAttribute, P as PhoneAttribute, c as CurrencyAttribute, d as Option, e as StatusAttribute, f as SelectAttribute, M as MultiselectAttribute, L as LocationAttribute, g as TimestampAttribute, F as FileAttribute, U as UserAttribute, h as SingleRelationAttribute, i as MultiRelationAttribute, R as RelationTarget, j as RatingAttribute, k as FormulaAttribute, l as FormulaReturnType, m as RollupAttribute, n as RollupFunction, o as FlowDefinition, p as FlowPage, q as FlowRow, I as InferAttributeValue, r as ObjectDefinition, s as Field, t as AttributeGroupField, G as Group, V as ViewDefinition, u as Tab } from './runtime-0gaIqXql.mjs';
2
+ export { bx as ActivityTab, aV as AddAttribute, dJ as AddAttributeInput, as as AdvancedFilterState, bn as AssignRoleInput, dh as AttributeChange, x as AttributeGroup, aU as AttributeMap, aQ as AttributeSchema, v as AttributeType, dr as AttributesRepository, a0 as AuditAction, a1 as AuditActorType, a2 as AuditChange, a5 as AuditListOptions, a3 as AuditLogEntry, dx as AuditRepository, $ as AuditResourceType, dA as AuditService, a6 as AuditServiceOptions, B as BaseAttribute, ae as CheckboxFilterOperator, bb as CompletionStatus, a4 as CreateAuditLogInput, dI as CreateCustomObjectInput, ex as CreateDBAttribute, eL as CreateDBFlow, et as CreateDBObject, eH as CreateDBView, aa as CreateFile, dD as CreateFlowInput, eA as CreateObjectRecord, bm as CreatePermissionInput, bk as CreateRoleInput, br as CreateUserProfile, e6 as CreateViewInput, J as Currency, al as CurrencyFilterValue, aZ as CustomAttributeValue, bw as CustomTab, ew as DBAttribute, eK as DBFlow, es as DBObject, eG as DBView, en as DEFAULT_LABEL_FALLBACK, cy as DatabaseAdapter, af as DateFilterOperator, z as DateFormat, E as DateValue, X as DocumentFace, W as DocumentType, Y as DocumentTypeConfig, bh as EffectivePermissions, b8 as ExtractAttributes, b2 as ExtractRecord, b4 as ExtractRecordInput, b5 as ExtractRecordInputStrict, b3 as ExtractRecordStrict, b6 as ExtractRecordUpdate, b7 as ExtractRecordUpdateStrict, cz as FetchResult, a9 as File, e9 as FileContent, eF as FileListOptions, dC as FileService, dB as FileServiceOptions, Z as FileVerificationConfig, a8 as FileVisibility, dt as FilesRepository, ap as FilterCombinator, ar as FilterGroup, aj as FilterOperator, ao as FilterRule, aq as FilterState, an as FilterValue, aF as FlowRelation, aE as FlowRowField, dF as FlowService, aD as FlowSlot, aG as FlowStatus, dw as FlowsRepository, bu as FormTab, cA as FormattedRecord, c$ as FormulaResult, el as FullSyncOptions, ek as FullSyncResult, aO as GeocodingAdapter, aL as GeocodingAutocompleteParams, aN as GeocodingParams, dG as GeocodingService, aK as GeocodingSuggestion, dV as GetRelationOptionsParams, eD as GlobalSearchOptions, eE as GlobalSearchResultItem, dH as GlobalSearchService, cB as GroupedFetchResult, di as HookContext, dj as HookDefinition, dk as HookHandler, dn as HookRegistry, dl as HookType, aW as InferRecord, aR as InferRecordFromSchema, aX as InferRecordInput, aY as InferRecordUpdate, aS as InferRecordWithRequirements, cC as InsertOptions, d3 as InvalidPathError, eB as ListOptions, K as Location, Q as LocationGranularity, d4 as MaxDepthExceededError, ah as MultiselectFilterOperator, aB as NO_VALUE_OPERATORS, aA as NoValueOperator, aP as NoopGeocodingAdapter, dm as NoopHookRegistry, ad as NumberFilterOperator, y as NumberUnit, az as OPERATORS_BY_TYPE, ba as ObjectAttribute, bi as ObjectPermissions, bc as ObjectRecord, du as ObjectRecordsRepository, dM as ObjectSchemaService, dL as ObjectSchemaServiceOptions, dq as ObjectsRepository, eN as OperationResult, d8 as PathCardinality, d9 as PathSegment, da as PathSegmentType, bf as Permission, bd as PermissionScope, dO as PermissionService, dN as PermissionServiceOptions, dy as PermissionsRepository, H as Phone, am as PhoneFilterValue, cO as QueryBuilder, cD as QueryBuilderState, cK as QueryMultipleResultsError, cL as QueryNoResultError, ay as QueryState, a$ as RecordMetadata, dQ as RecordService, dP as RecordServiceOptions, cE as RegistryMap, cF as RegistryObjectNames, _ as RelationAttribute, ai as RelationFilterOperator, dT as RelationOption, dU as RelationOptionsResponse, dY as RelationResolverService, dW as RelationService, dS as RelationValidationError, dR as RelationValidationResult, ak as RelativeDateValue, dX as ResolvedRelations, aM as ReverseGeocodingParams, be as Role, dZ as RollupResult, e0 as RollupScheduler, d$ as RollupSchedulerOptions, d_ as RollupService, cM as SHORTCUT_TO_FILTER_OPERATOR, b1 as SYSTEM_FIELD_NAMES, db as SchemaResolver, eC as SearchOptions, ag as SelectFilterOperator, cG as ShortcutOperator, ec as SignedUrlOptions, aw as SortDirection, ax as SortRule, w as StatusGroup, ed as StorageAdapter, a7 as StorageProvider, ea as StorageUploadInput, eb as StorageUploadResult, eg as SyncOptions, ef as SyncResult, b0 as SystemFields, bj as SystemPermissions, bt as TabType, bv as TableTab, bD as TenantId, ac as TextFilterOperator, b9 as Timestamps, df as TraversalOptions, dg as TraversalResult, aT as TypedAttribute, ey as UpdateDBAttribute, eM as UpdateDBFlow, eu as UpdateDBObject, eI as UpdateDBView, ab as UpdateFile, dE as UpdateFlowInput, dK as UpdateObjectInput, bl as UpdateRoleInput, bs as UpdateUserProfile, e7 as UpdateViewInput, ee as UploadFileInput, ez as UpsertDBAttribute, ev as UpsertDBObject, eJ as UpsertDBView, bq as UserProfile, e2 as UserProfileService, e1 as UserProfileServiceOptions, ds as UserProfilesRepository, bo as UserRole, bg as UserRoleAssignment, e5 as UserService, bp as UserStatus, e4 as UserValidationError, e3 as UserValidationResult, bC as Uuid, co as ValidationResult, e8 as ViewService, eP as ViewSyncOptions, eO as ViewSyncResult, dv as ViewsRepository, a_ as WithCustomAttributes, b_ as attributeConfigSchemas, dz as buildAuditChanges, bL as checkboxConfigSchema, cx as computeRecordStatus, cm as createAttributeValidator, c5 as createCheckboxValidator, c8 as createCurrencyValidator, c6 as createDateValidator, cH as createDefaultState, cs as createDraftValidator, ce as createFileValidator, ck as createFormulaValidator, cc as createLocationValidator, dp as createMockAdapter, ch as createMultiRelationValidator, cb as createMultiselectValidator, c4 as createNumberValidator, cn as createObjectValidator, c7 as createPhoneValidator, cN as createQueryBuilder, cj as createRatingValidator, ci as createRelationValidator, cl as createRollupValidator, ca as createSelectValidator, cg as createSingleRelationValidator, c9 as createStatusValidator, c3 as createTextValidator, cd as createTimestampValidator, cf as createUserValidator, bO as currencyConfigSchema, bM as dateConfigSchema, er as enrichValuesWithSelectLabels, cP as evaluateFormula, cQ as evaluateFormulaAttribute, cR as evaluateFormulaAttributeWithRelations, cS as evaluateFormulaWithRelations, cT as evaluateFormulaWithResult, eq as extractAttributeNames, cU as extractFormulaVariables, cV as extractRelationNames, cW as extractRelationReferences, bU as fileConfigSchema, cX as flattenRelationsForEval, cY as formatFormulaResult, cI as formatRecord, cJ as formatRecords, bY as formulaConfigSchema, bE as generateId, bF as generatePrefixedId, b$ as getAttributeConfigSchema, cv as getMissingRequiredAttributes, d0 as getPathDepth, d1 as getRelationPath, ej as getSyncPreview, d2 as getTargetAttributeName, eS as getViewSyncPreview, cZ as hasRelationReferences, bB as isActivityTab, at as isAdvancedFilterState, bA as isCustomTab, aH as isFlowDefinition, aI as isFlowPublished, by as isFormTab, ep as isLabelExpression, aC as isNoValueOperator, cw as isRecordComplete, aJ as isSystemFlow, bz as isTableTab, bQ as locationConfigSchema, bT as multiselectConfigSchema, bK as numberConfigSchema, c1 as parseAttributeConfig, d5 as parsePath, d6 as pathHasManyCardinality, bN as phoneConfigSchema, bX as ratingConfigSchema, bG as registry, bW as relationConfigSchema, eo as renderLabelExpression, dc as resolveMultiplePaths, dd as resolveSingleValue, bZ as rollupConfigSchema, c2 as safeParseAttributeConfig, bS as selectConfigSchema, bP as statusConfigSchema, em as syncAll, eh as syncNativeObjects, eQ as syncNativeViews, bI as textConfigSchema, bJ as textareaConfigSchema, bR as timestampConfigSchema, au as toAdvancedFilterState, av as toSimpleFilterState, de as traversePath, bV as userConfigSchema, cp as validateAttribute, c0 as validateAttributeConfig, ct as validateDraft, cu as validateDraftOrThrow, c_ as validateFormulaExpression, cq as validateObject, cr as validateObjectOrThrow, d7 as validatePath, ei as verifyNativeObjectsSync, eR as verifyNativeViewsSync, bH as viewRegistry } from './runtime-0gaIqXql.mjs';
3
3
  import { IconName, CountryIso3, CurrencyCode, MimeType, ColorId } from '@stndrds/constants';
4
4
  import 'zod';
5
5
 
@@ -107,200 +107,6 @@ declare class ObjectReferencedError extends Error {
107
107
  constructor(objectName: string, referencingObjects: string[]);
108
108
  }
109
109
 
110
- /**
111
- * Lookup table for primitive attribute types
112
- * Maps attribute type name to its runtime value type
113
- */
114
- type AttributeValueMap = {
115
- text: string;
116
- textarea: string;
117
- number: number;
118
- checkbox: boolean;
119
- date: string;
120
- phone: Phone;
121
- currency: Currency;
122
- location: Location;
123
- timestamp: number;
124
- file: string;
125
- user: string;
126
- relation: string;
127
- rating: number;
128
- };
129
- /**
130
- * Infer status value from options (union of option values)
131
- */
132
- type InferStatusValue<A extends StatusAttribute> = A["options"] extends readonly {
133
- value: infer V;
134
- }[] ? V : string;
135
- /**
136
- * Infer select value from options (union of option values)
137
- */
138
- type InferSelectValue<A extends SelectAttribute> = A["options"] extends readonly {
139
- value: infer V;
140
- }[] ? V : string;
141
- /**
142
- * Infer multiselect value from options (array of option values)
143
- */
144
- type InferMultiselectValue<A extends MultiselectAttribute> = A["options"] extends readonly {
145
- value: infer V;
146
- }[] ? V[] : string[];
147
- /**
148
- * Maps an Attribute type to its runtime value type
149
- * Uses a flat lookup table + 3 special cases for option-based attributes
150
- * This avoids deep conditional nesting that causes TS2589 on large objects
151
- */
152
- type InferAttributeValue<A extends Attribute> = A extends StatusAttribute ? InferStatusValue<A> : A extends SelectAttribute ? InferSelectValue<A> : A extends MultiselectAttribute ? InferMultiselectValue<A> : A["type"] extends keyof AttributeValueMap ? AttributeValueMap[A["type"]] : unknown;
153
- /**
154
- * Schema definition type for type-safe object definitions
155
- * Maps attribute names to their builder types
156
- */
157
- type AttributeSchema = Record<string, Attribute>;
158
- /**
159
- * Infer record type from an attribute schema
160
- * Creates a typed object with all attribute values
161
- */
162
- type InferRecordFromSchema<TSchema extends AttributeSchema> = {
163
- [K in keyof TSchema]: InferAttributeValue<TSchema[K]>;
164
- };
165
- /**
166
- * Make required attributes required and optional ones optional
167
- */
168
- type InferRecordWithRequirements<TSchema extends AttributeSchema> = {
169
- [K in RequiredAttributeKeys<TSchema>]: InferAttributeValue<TSchema[K]>;
170
- } & {
171
- [K in OptionalAttributeKeys<TSchema>]?: InferAttributeValue<TSchema[K]>;
172
- };
173
- /**
174
- * Extract keys of required attributes
175
- */
176
- type RequiredAttributeKeys<TSchema extends AttributeSchema> = {
177
- [K in keyof TSchema]: TSchema[K]["required"] extends true ? K : never;
178
- }[keyof TSchema];
179
- /**
180
- * Extract keys of optional attributes
181
- */
182
- type OptionalAttributeKeys<TSchema extends AttributeSchema> = {
183
- [K in keyof TSchema]: TSchema[K]["required"] extends true ? never : K;
184
- }[keyof TSchema];
185
- /**
186
- * Type-safe attribute entry for builder accumulation
187
- * Preserves the attribute name as a literal type
188
- */
189
- type TypedAttribute<TName extends string = string, TAttr extends Attribute = Attribute> = TAttr & {
190
- readonly name: TName;
191
- };
192
- /**
193
- * Accumulated attributes map (built via chained .attribute() calls)
194
- */
195
- type AttributeMap = Record<string, Attribute>;
196
- /**
197
- * Add an attribute to an existing map
198
- */
199
- type AddAttribute$1<TMap extends AttributeMap, TName extends string, TAttr extends Attribute> = TMap & {
200
- [K in TName]: TAttr;
201
- };
202
- /**
203
- * Infer record type from accumulated attribute map
204
- */
205
- type InferRecord<TMap extends AttributeMap> = InferRecordWithRequirements<TMap>;
206
- /**
207
- * Infer input type for creating a record (all required + partial optional)
208
- */
209
- type InferRecordInput<TMap extends AttributeMap> = InferRecordWithRequirements<TMap>;
210
- /**
211
- * Infer update type (all fields optional)
212
- */
213
- type InferRecordUpdate<TMap extends AttributeMap> = Partial<InferRecordFromSchema<TMap>>;
214
- /**
215
- * Base type for custom attribute values added via UI
216
- * Supports all possible attribute value types
217
- * Formula and Rollup attributes don't have defaultValue, so we exclude them
218
- */
219
- type CustomAttributeValue = Exclude<Attribute, FormulaAttribute | RollupAttribute>["defaultValue"] | undefined;
220
- /**
221
- * Adds support for custom attributes (added via UI) to a record type
222
- * Preserves autocompletion for known attributes while allowing additional properties
223
- */
224
- type WithCustomAttributes<T> = T & {
225
- [key: string]: CustomAttributeValue;
226
- };
227
- /**
228
- * Extract the record type from an ObjectBuilder instance
229
- * Includes support for custom attributes added via UI
230
- *
231
- * @example
232
- * ```typescript
233
- * const PRODUCT = object({ name: "products", label: "Product" })
234
- * .attribute(text({ name: "name", label: "Name" }).required())
235
- * .attribute(number({ name: "price", label: "Price" }));
236
- *
237
- * type ProductRecord = ExtractRecord<typeof PRODUCT>;
238
- * // → { name: string; price?: number } & { [key: string]: CustomAttributeValue }
239
- *
240
- * const product: ProductRecord = {
241
- * name: "Nike Air Max",
242
- * price: 129.99,
243
- * customField: "added via UI", // ✅ Allowed
244
- * };
245
- * ```
246
- */
247
- type ExtractRecord<TBuilder> = TBuilder extends {
248
- _types: {
249
- record: infer R;
250
- };
251
- } ? WithCustomAttributes<R> : never;
252
- /**
253
- * Extract the record type without custom attributes (strict mode)
254
- * Use this when you only want the defined attributes
255
- */
256
- type ExtractRecordStrict<TBuilder> = TBuilder extends {
257
- _types: {
258
- record: infer R;
259
- };
260
- } ? R : never;
261
- /**
262
- * Extract the input type from an ObjectBuilder instance
263
- * Includes support for custom attributes
264
- */
265
- type ExtractRecordInput<TBuilder> = TBuilder extends {
266
- _types: {
267
- input: infer R;
268
- };
269
- } ? WithCustomAttributes<R> : never;
270
- /**
271
- * Extract the input type without custom attributes (strict mode)
272
- */
273
- type ExtractRecordInputStrict<TBuilder> = TBuilder extends {
274
- _types: {
275
- input: infer R;
276
- };
277
- } ? R : never;
278
- /**
279
- * Extract the update type from an ObjectBuilder instance
280
- * Includes support for custom attributes
281
- */
282
- type ExtractRecordUpdate<TBuilder> = TBuilder extends {
283
- _types: {
284
- update: infer R;
285
- };
286
- } ? WithCustomAttributes<R> : never;
287
- /**
288
- * Extract the update type without custom attributes (strict mode)
289
- */
290
- type ExtractRecordUpdateStrict<TBuilder> = TBuilder extends {
291
- _types: {
292
- update: infer R;
293
- };
294
- } ? R : never;
295
- /**
296
- * Extract the attribute map from an ObjectBuilder instance
297
- */
298
- type ExtractAttributes<TBuilder> = TBuilder extends {
299
- _types: {
300
- attributes: infer A;
301
- };
302
- } ? A : never;
303
-
304
110
  /**
305
111
  * Default empty value placeholder
306
112
  */
@@ -1025,6 +831,11 @@ declare class RollupAttributeBuilder<TName extends string> extends BaseAttribute
1025
831
  * Set decimal places for numeric results
1026
832
  */
1027
833
  decimals(value: number): this;
834
+ /**
835
+ * Display the rollup value using the target attribute's type formatter
836
+ * instead of the default rollup-specific formatting
837
+ */
838
+ showAsOriginal(): this;
1028
839
  /**
1029
840
  * Set multi-level path for traversing nested relations (Phase 4+)
1030
841
  * @param path - Dot notation path (e.g., "orders.items")
@@ -1780,4 +1591,4 @@ declare function view(name: string, label: string): ViewBuilder;
1780
1591
  */
1781
1592
  declare function group(id: string, label: string): GroupBuilder;
1782
1593
 
1783
- 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, EMPTY_VALUE_PLACEHOLDER, 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, FormulaAttribute, FormulaReturnType, 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, RollupAttribute, RollupFunction, 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, formatAttributeValue, formula, group, isDefaultRole, isForbiddenError, isNotFoundError, isProtectedResourceError, isSchemaError, isValidationError, location, multiselect, number, object, phone, rating, relation, rollup, select, status, text, textarea, timestamp, user, view };
1594
+ export { ALL_SYSTEM_RESOURCES, type AnyAttributeBuilder, Attribute, AttributeGroupField, AttributeInUseError, AttributeNotFoundError, type AttributeUsage, type BuilderConfig, CheckboxAttribute, CurrencyAttribute, CustomTabConfig, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, type DefaultRolePermissionConfig, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type ExtractAttributeName, type ExtractAttributeRequired, Field, FileAttribute, FileNotFoundError, FlowBuilder, FlowDefinition, FlowPage, FlowPageBuilder, FlowRow, FlowRowBuilder, ForbiddenError, FormulaAttribute, FormulaReturnType, Group, GroupBuilder, InferAttributeValue, LocationAttribute, MultiRelationAttribute, MultiselectAttribute, NotFoundError, NotSystemObjectError, NumberAttribute, ObjectAction, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, ObjectReferencedError, Option, PhoneAttribute, ProtectedResourceError, ProtectedRoleError, RatingAttribute, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationTarget, RoleNotFoundError, RollupAttribute, RollupFunction, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SelectAttribute, SingleRelationAttribute, StatusAttribute, SyncError, SystemAction, SystemResource, Tab, TabBuilder, TableTabConfig, TextAreaAttribute, TextAttribute, TimestampAttribute, type TypedBuilderConfig, UserAttribute, UserProfileNotFoundError, ValidationError, type ValidationErrorDetail, ViewBuilder, ViewDefinition, checkbox, currency, date, file, flow, formatAttributeValue, formula, group, isDefaultRole, isForbiddenError, isNotFoundError, isProtectedResourceError, isSchemaError, isValidationError, location, multiselect, number, object, phone, rating, relation, rollup, select, status, text, textarea, timestamp, user, view };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as Attribute, S as StatusAttribute, a as SelectAttribute, M as MultiselectAttribute, P as Phone, C as Currency, L as Location, F as FormulaAttribute, R as RollupAttribute, 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, k as FileAttribute, U as UserAttribute, l as SingleRelationAttribute, m as MultiRelationAttribute, n as RelationTarget, o as RatingAttribute, p as FormulaReturnType, q as RollupFunction, r as FlowDefinition, s as FlowPage, t as FlowRow, u as ObjectDefinition, v as Field, w as AttributeGroupField, G as Group, V as ViewDefinition, x as Tab } from './runtime-DSMMZRLE.js';
2
- export { bb as ActivityTab, d9 as AddAttributeInput, ar as AdvancedFilterState, b1 as AssignRoleInput, cH as AttributeChange, B as AttributeGroup, y as AttributeType, cT as AttributesRepository, $ as AuditAction, a0 as AuditActorType, a1 as AuditChange, a4 as AuditListOptions, a2 as AuditLogEntry, cZ as AuditRepository, _ as AuditResourceType, d0 as AuditService, a5 as AuditServiceOptions, E as BaseAttribute, ad as CheckboxFilterOperator, aR as CompletionStatus, a3 as CreateAuditLogInput, d8 as CreateCustomObjectInput, d_ as CreateDBAttribute, ec as CreateDBFlow, dW as CreateDBObject, e8 as CreateDBView, a9 as CreateFile, d3 as CreateFlowInput, e1 as CreateObjectRecord, b0 as CreatePermissionInput, a_ as CreateRoleInput, b5 as CreateUserProfile, dz as CreateViewInput, ak as CurrencyFilterValue, ba as CustomTab, dZ as DBAttribute, eb as DBFlow, dV as DBObject, e7 as DBView, dQ as DEFAULT_LABEL_FALLBACK, cc as DatabaseAdapter, ae as DateFilterOperator, I as DateFormat, J as DateValue, W as DocumentFace, Q as DocumentType, X as DocumentTypeConfig, aX as EffectivePermissions, a8 as File, dC as FileContent, e6 as FileListOptions, d2 as FileService, d1 as FileServiceOptions, Y as FileVerificationConfig, a7 as FileVisibility, cV as FilesRepository, ao as FilterCombinator, aq as FilterGroup, ai as FilterOperator, an as FilterRule, ap as FilterState, am as FilterValue, aE as FlowRelation, aD as FlowRowField, d5 as FlowService, aC as FlowSlot, aF as FlowStatus, cY as FlowsRepository, b8 as FormTab, cp as FormulaResult, dO as FullSyncOptions, dN as FullSyncResult, aN as GeocodingAdapter, aK as GeocodingAutocompleteParams, aM as GeocodingParams, d6 as GeocodingService, aJ as GeocodingSuggestion, dl as GetRelationOptionsParams, e4 as GlobalSearchOptions, e5 as GlobalSearchResultItem, d7 as GlobalSearchService, cI as HookContext, cJ as HookDefinition, cK as HookHandler, cN as HookRegistry, cL as HookType, ct as InvalidPathError, e2 as ListOptions, K as LocationGranularity, cu as MaxDepthExceededError, ag as MultiselectFilterOperator, aA as NO_VALUE_OPERATORS, az as NoValueOperator, aO as NoopGeocodingAdapter, cM as NoopHookRegistry, ac as NumberFilterOperator, H as NumberUnit, ay as OPERATORS_BY_TYPE, aQ as ObjectAttribute, aY as ObjectPermissions, aS as ObjectRecord, cW as ObjectRecordsRepository, dc as ObjectSchemaService, db as ObjectSchemaServiceOptions, cS as ObjectsRepository, ee as OperationResult, cy as PathCardinality, cz as PathSegment, cA as PathSegmentType, aV as Permission, aT as PermissionScope, de as PermissionService, dd as PermissionServiceOptions, c_ as PermissionsRepository, al as PhoneFilterValue, ax as QueryState, dg as RecordService, df as RecordServiceOptions, Z as RelationAttribute, ah as RelationFilterOperator, dj as RelationOption, dk as RelationOptionsResponse, dp as RelationResolverService, dm as RelationService, di as RelationValidationError, dh as RelationValidationResult, aj as RelativeDateValue, dn as ResolvedRelations, aL as ReverseGeocodingParams, aU as Role, cQ as RollupHooksConfig, dq as RollupResult, dt as RollupScheduler, ds as RollupSchedulerOptions, dr as RollupService, cB as SchemaResolver, e3 as SearchOptions, af as SelectFilterOperator, dF as SignedUrlOptions, av as SortDirection, aw as SortRule, z as StatusGroup, dG as StorageAdapter, a6 as StorageProvider, dD as StorageUploadInput, dE as StorageUploadResult, dJ as SyncOptions, dI as SyncResult, aZ as SystemPermissions, b7 as TabType, b9 as TableTab, bh as TenantId, ab as TextFilterOperator, aP as Timestamps, cF as TraversalOptions, cG as TraversalResult, d$ as UpdateDBAttribute, ed as UpdateDBFlow, dX as UpdateDBObject, e9 as UpdateDBView, aa as UpdateFile, d4 as UpdateFlowInput, da as UpdateObjectInput, a$ as UpdateRoleInput, b6 as UpdateUserProfile, dA as UpdateViewInput, dH as UploadFileInput, e0 as UpsertDBAttribute, dY as UpsertDBObject, ea as UpsertDBView, b4 as UserProfile, dv as UserProfileService, du as UserProfileServiceOptions, cU as UserProfilesRepository, b2 as UserRole, aW as UserRoleAssignment, dy as UserService, b3 as UserStatus, dx as UserValidationError, dw as UserValidationResult, bg as Uuid, c2 as ValidationResult, dB as ViewService, eg as ViewSyncOptions, ef as ViewSyncResult, cX as ViewsRepository, bE as attributeConfigSchemas, c$ as buildAuditChanges, bp as checkboxConfigSchema, cb as computeRecordStatus, c0 as createAttributeValidator, bL as createCheckboxValidator, bO as createCurrencyValidator, bM as createDateValidator, c6 as createDraftValidator, bU as createFileValidator, b_ as createFormulaValidator, bS as createLocationValidator, cR as createMockAdapter, bX as createMultiRelationValidator, bR as createMultiselectValidator, bK as createNumberValidator, c1 as createObjectValidator, bN as createPhoneValidator, bZ as createRatingValidator, bY as createRelationValidator, cO as createRollupHooks, b$ as createRollupValidator, bQ as createSelectValidator, bW as createSingleRelationValidator, bP as createStatusValidator, bJ as createTextValidator, bT as createTimestampValidator, bV as createUserValidator, bs as currencyConfigSchema, bq as dateConfigSchema, dU as enrichValuesWithSelectLabels, cd as evaluateFormula, ce as evaluateFormulaAttribute, cf as evaluateFormulaAttributeWithRelations, cg as evaluateFormulaWithRelations, ch as evaluateFormulaWithResult, dT as extractAttributeNames, ci as extractFormulaVariables, cj as extractRelationNames, ck as extractRelationReferences, by as fileConfigSchema, cl as flattenRelationsForEval, cm as formatFormulaResult, bC as formulaConfigSchema, bi as generateId, bj as generatePrefixedId, bF as getAttributeConfigSchema, c9 as getMissingRequiredAttributes, cq as getPathDepth, cr as getRelationPath, dM as getSyncPreview, cs as getTargetAttributeName, ej as getViewSyncPreview, cn as hasRelationReferences, bf as isActivityTab, as as isAdvancedFilterState, be as isCustomTab, aG as isFlowDefinition, aH as isFlowPublished, bc as isFormTab, dS as isLabelExpression, aB as isNoValueOperator, ca as isRecordComplete, aI as isSystemFlow, bd as isTableTab, bu as locationConfigSchema, bx as multiselectConfigSchema, bo as numberConfigSchema, bH as parseAttributeConfig, cv as parsePath, cw as pathHasManyCardinality, br as phoneConfigSchema, bB as ratingConfigSchema, cP as registerAllRollupHooks, bk as registry, bA as relationConfigSchema, dR as renderLabelExpression, cC as resolveMultiplePaths, cD as resolveSingleValue, bD as rollupConfigSchema, bI as safeParseAttributeConfig, bw as selectConfigSchema, bt as statusConfigSchema, dP as syncAll, dK as syncNativeObjects, eh as syncNativeViews, bm as textConfigSchema, bn as textareaConfigSchema, bv as timestampConfigSchema, at as toAdvancedFilterState, au as toSimpleFilterState, cE as traversePath, bz as userConfigSchema, c3 as validateAttribute, bG as validateAttributeConfig, c7 as validateDraft, c8 as validateDraftOrThrow, co as validateFormulaExpression, c4 as validateObject, c5 as validateObjectOrThrow, cx as validatePath, dL as verifyNativeObjectsSync, ei as verifyNativeViewsSync, bl as viewRegistry } from './runtime-DSMMZRLE.js';
1
+ import { A as Attribute, S as SystemResource, a as SystemAction, O as ObjectAction, T as TextAttribute, b as TextAreaAttribute, N as NumberAttribute, C as CheckboxAttribute, D as DateAttribute, P as PhoneAttribute, c as CurrencyAttribute, d as Option, e as StatusAttribute, f as SelectAttribute, M as MultiselectAttribute, L as LocationAttribute, g as TimestampAttribute, F as FileAttribute, U as UserAttribute, h as SingleRelationAttribute, i as MultiRelationAttribute, R as RelationTarget, j as RatingAttribute, k as FormulaAttribute, l as FormulaReturnType, m as RollupAttribute, n as RollupFunction, o as FlowDefinition, p as FlowPage, q as FlowRow, I as InferAttributeValue, r as ObjectDefinition, s as Field, t as AttributeGroupField, G as Group, V as ViewDefinition, u as Tab } from './runtime-0gaIqXql.js';
2
+ export { bx as ActivityTab, aV as AddAttribute, dJ as AddAttributeInput, as as AdvancedFilterState, bn as AssignRoleInput, dh as AttributeChange, x as AttributeGroup, aU as AttributeMap, aQ as AttributeSchema, v as AttributeType, dr as AttributesRepository, a0 as AuditAction, a1 as AuditActorType, a2 as AuditChange, a5 as AuditListOptions, a3 as AuditLogEntry, dx as AuditRepository, $ as AuditResourceType, dA as AuditService, a6 as AuditServiceOptions, B as BaseAttribute, ae as CheckboxFilterOperator, bb as CompletionStatus, a4 as CreateAuditLogInput, dI as CreateCustomObjectInput, ex as CreateDBAttribute, eL as CreateDBFlow, et as CreateDBObject, eH as CreateDBView, aa as CreateFile, dD as CreateFlowInput, eA as CreateObjectRecord, bm as CreatePermissionInput, bk as CreateRoleInput, br as CreateUserProfile, e6 as CreateViewInput, J as Currency, al as CurrencyFilterValue, aZ as CustomAttributeValue, bw as CustomTab, ew as DBAttribute, eK as DBFlow, es as DBObject, eG as DBView, en as DEFAULT_LABEL_FALLBACK, cy as DatabaseAdapter, af as DateFilterOperator, z as DateFormat, E as DateValue, X as DocumentFace, W as DocumentType, Y as DocumentTypeConfig, bh as EffectivePermissions, b8 as ExtractAttributes, b2 as ExtractRecord, b4 as ExtractRecordInput, b5 as ExtractRecordInputStrict, b3 as ExtractRecordStrict, b6 as ExtractRecordUpdate, b7 as ExtractRecordUpdateStrict, cz as FetchResult, a9 as File, e9 as FileContent, eF as FileListOptions, dC as FileService, dB as FileServiceOptions, Z as FileVerificationConfig, a8 as FileVisibility, dt as FilesRepository, ap as FilterCombinator, ar as FilterGroup, aj as FilterOperator, ao as FilterRule, aq as FilterState, an as FilterValue, aF as FlowRelation, aE as FlowRowField, dF as FlowService, aD as FlowSlot, aG as FlowStatus, dw as FlowsRepository, bu as FormTab, cA as FormattedRecord, c$ as FormulaResult, el as FullSyncOptions, ek as FullSyncResult, aO as GeocodingAdapter, aL as GeocodingAutocompleteParams, aN as GeocodingParams, dG as GeocodingService, aK as GeocodingSuggestion, dV as GetRelationOptionsParams, eD as GlobalSearchOptions, eE as GlobalSearchResultItem, dH as GlobalSearchService, cB as GroupedFetchResult, di as HookContext, dj as HookDefinition, dk as HookHandler, dn as HookRegistry, dl as HookType, aW as InferRecord, aR as InferRecordFromSchema, aX as InferRecordInput, aY as InferRecordUpdate, aS as InferRecordWithRequirements, cC as InsertOptions, d3 as InvalidPathError, eB as ListOptions, K as Location, Q as LocationGranularity, d4 as MaxDepthExceededError, ah as MultiselectFilterOperator, aB as NO_VALUE_OPERATORS, aA as NoValueOperator, aP as NoopGeocodingAdapter, dm as NoopHookRegistry, ad as NumberFilterOperator, y as NumberUnit, az as OPERATORS_BY_TYPE, ba as ObjectAttribute, bi as ObjectPermissions, bc as ObjectRecord, du as ObjectRecordsRepository, dM as ObjectSchemaService, dL as ObjectSchemaServiceOptions, dq as ObjectsRepository, eN as OperationResult, d8 as PathCardinality, d9 as PathSegment, da as PathSegmentType, bf as Permission, bd as PermissionScope, dO as PermissionService, dN as PermissionServiceOptions, dy as PermissionsRepository, H as Phone, am as PhoneFilterValue, cO as QueryBuilder, cD as QueryBuilderState, cK as QueryMultipleResultsError, cL as QueryNoResultError, ay as QueryState, a$ as RecordMetadata, dQ as RecordService, dP as RecordServiceOptions, cE as RegistryMap, cF as RegistryObjectNames, _ as RelationAttribute, ai as RelationFilterOperator, dT as RelationOption, dU as RelationOptionsResponse, dY as RelationResolverService, dW as RelationService, dS as RelationValidationError, dR as RelationValidationResult, ak as RelativeDateValue, dX as ResolvedRelations, aM as ReverseGeocodingParams, be as Role, dZ as RollupResult, e0 as RollupScheduler, d$ as RollupSchedulerOptions, d_ as RollupService, cM as SHORTCUT_TO_FILTER_OPERATOR, b1 as SYSTEM_FIELD_NAMES, db as SchemaResolver, eC as SearchOptions, ag as SelectFilterOperator, cG as ShortcutOperator, ec as SignedUrlOptions, aw as SortDirection, ax as SortRule, w as StatusGroup, ed as StorageAdapter, a7 as StorageProvider, ea as StorageUploadInput, eb as StorageUploadResult, eg as SyncOptions, ef as SyncResult, b0 as SystemFields, bj as SystemPermissions, bt as TabType, bv as TableTab, bD as TenantId, ac as TextFilterOperator, b9 as Timestamps, df as TraversalOptions, dg as TraversalResult, aT as TypedAttribute, ey as UpdateDBAttribute, eM as UpdateDBFlow, eu as UpdateDBObject, eI as UpdateDBView, ab as UpdateFile, dE as UpdateFlowInput, dK as UpdateObjectInput, bl as UpdateRoleInput, bs as UpdateUserProfile, e7 as UpdateViewInput, ee as UploadFileInput, ez as UpsertDBAttribute, ev as UpsertDBObject, eJ as UpsertDBView, bq as UserProfile, e2 as UserProfileService, e1 as UserProfileServiceOptions, ds as UserProfilesRepository, bo as UserRole, bg as UserRoleAssignment, e5 as UserService, bp as UserStatus, e4 as UserValidationError, e3 as UserValidationResult, bC as Uuid, co as ValidationResult, e8 as ViewService, eP as ViewSyncOptions, eO as ViewSyncResult, dv as ViewsRepository, a_ as WithCustomAttributes, b_ as attributeConfigSchemas, dz as buildAuditChanges, bL as checkboxConfigSchema, cx as computeRecordStatus, cm as createAttributeValidator, c5 as createCheckboxValidator, c8 as createCurrencyValidator, c6 as createDateValidator, cH as createDefaultState, cs as createDraftValidator, ce as createFileValidator, ck as createFormulaValidator, cc as createLocationValidator, dp as createMockAdapter, ch as createMultiRelationValidator, cb as createMultiselectValidator, c4 as createNumberValidator, cn as createObjectValidator, c7 as createPhoneValidator, cN as createQueryBuilder, cj as createRatingValidator, ci as createRelationValidator, cl as createRollupValidator, ca as createSelectValidator, cg as createSingleRelationValidator, c9 as createStatusValidator, c3 as createTextValidator, cd as createTimestampValidator, cf as createUserValidator, bO as currencyConfigSchema, bM as dateConfigSchema, er as enrichValuesWithSelectLabels, cP as evaluateFormula, cQ as evaluateFormulaAttribute, cR as evaluateFormulaAttributeWithRelations, cS as evaluateFormulaWithRelations, cT as evaluateFormulaWithResult, eq as extractAttributeNames, cU as extractFormulaVariables, cV as extractRelationNames, cW as extractRelationReferences, bU as fileConfigSchema, cX as flattenRelationsForEval, cY as formatFormulaResult, cI as formatRecord, cJ as formatRecords, bY as formulaConfigSchema, bE as generateId, bF as generatePrefixedId, b$ as getAttributeConfigSchema, cv as getMissingRequiredAttributes, d0 as getPathDepth, d1 as getRelationPath, ej as getSyncPreview, d2 as getTargetAttributeName, eS as getViewSyncPreview, cZ as hasRelationReferences, bB as isActivityTab, at as isAdvancedFilterState, bA as isCustomTab, aH as isFlowDefinition, aI as isFlowPublished, by as isFormTab, ep as isLabelExpression, aC as isNoValueOperator, cw as isRecordComplete, aJ as isSystemFlow, bz as isTableTab, bQ as locationConfigSchema, bT as multiselectConfigSchema, bK as numberConfigSchema, c1 as parseAttributeConfig, d5 as parsePath, d6 as pathHasManyCardinality, bN as phoneConfigSchema, bX as ratingConfigSchema, bG as registry, bW as relationConfigSchema, eo as renderLabelExpression, dc as resolveMultiplePaths, dd as resolveSingleValue, bZ as rollupConfigSchema, c2 as safeParseAttributeConfig, bS as selectConfigSchema, bP as statusConfigSchema, em as syncAll, eh as syncNativeObjects, eQ as syncNativeViews, bI as textConfigSchema, bJ as textareaConfigSchema, bR as timestampConfigSchema, au as toAdvancedFilterState, av as toSimpleFilterState, de as traversePath, bV as userConfigSchema, cp as validateAttribute, c0 as validateAttributeConfig, ct as validateDraft, cu as validateDraftOrThrow, c_ as validateFormulaExpression, cq as validateObject, cr as validateObjectOrThrow, d7 as validatePath, ei as verifyNativeObjectsSync, eR as verifyNativeViewsSync, bH as viewRegistry } from './runtime-0gaIqXql.js';
3
3
  import { IconName, CountryIso3, CurrencyCode, MimeType, ColorId } from '@stndrds/constants';
4
4
  import 'zod';
5
5
 
@@ -107,200 +107,6 @@ declare class ObjectReferencedError extends Error {
107
107
  constructor(objectName: string, referencingObjects: string[]);
108
108
  }
109
109
 
110
- /**
111
- * Lookup table for primitive attribute types
112
- * Maps attribute type name to its runtime value type
113
- */
114
- type AttributeValueMap = {
115
- text: string;
116
- textarea: string;
117
- number: number;
118
- checkbox: boolean;
119
- date: string;
120
- phone: Phone;
121
- currency: Currency;
122
- location: Location;
123
- timestamp: number;
124
- file: string;
125
- user: string;
126
- relation: string;
127
- rating: number;
128
- };
129
- /**
130
- * Infer status value from options (union of option values)
131
- */
132
- type InferStatusValue<A extends StatusAttribute> = A["options"] extends readonly {
133
- value: infer V;
134
- }[] ? V : string;
135
- /**
136
- * Infer select value from options (union of option values)
137
- */
138
- type InferSelectValue<A extends SelectAttribute> = A["options"] extends readonly {
139
- value: infer V;
140
- }[] ? V : string;
141
- /**
142
- * Infer multiselect value from options (array of option values)
143
- */
144
- type InferMultiselectValue<A extends MultiselectAttribute> = A["options"] extends readonly {
145
- value: infer V;
146
- }[] ? V[] : string[];
147
- /**
148
- * Maps an Attribute type to its runtime value type
149
- * Uses a flat lookup table + 3 special cases for option-based attributes
150
- * This avoids deep conditional nesting that causes TS2589 on large objects
151
- */
152
- type InferAttributeValue<A extends Attribute> = A extends StatusAttribute ? InferStatusValue<A> : A extends SelectAttribute ? InferSelectValue<A> : A extends MultiselectAttribute ? InferMultiselectValue<A> : A["type"] extends keyof AttributeValueMap ? AttributeValueMap[A["type"]] : unknown;
153
- /**
154
- * Schema definition type for type-safe object definitions
155
- * Maps attribute names to their builder types
156
- */
157
- type AttributeSchema = Record<string, Attribute>;
158
- /**
159
- * Infer record type from an attribute schema
160
- * Creates a typed object with all attribute values
161
- */
162
- type InferRecordFromSchema<TSchema extends AttributeSchema> = {
163
- [K in keyof TSchema]: InferAttributeValue<TSchema[K]>;
164
- };
165
- /**
166
- * Make required attributes required and optional ones optional
167
- */
168
- type InferRecordWithRequirements<TSchema extends AttributeSchema> = {
169
- [K in RequiredAttributeKeys<TSchema>]: InferAttributeValue<TSchema[K]>;
170
- } & {
171
- [K in OptionalAttributeKeys<TSchema>]?: InferAttributeValue<TSchema[K]>;
172
- };
173
- /**
174
- * Extract keys of required attributes
175
- */
176
- type RequiredAttributeKeys<TSchema extends AttributeSchema> = {
177
- [K in keyof TSchema]: TSchema[K]["required"] extends true ? K : never;
178
- }[keyof TSchema];
179
- /**
180
- * Extract keys of optional attributes
181
- */
182
- type OptionalAttributeKeys<TSchema extends AttributeSchema> = {
183
- [K in keyof TSchema]: TSchema[K]["required"] extends true ? never : K;
184
- }[keyof TSchema];
185
- /**
186
- * Type-safe attribute entry for builder accumulation
187
- * Preserves the attribute name as a literal type
188
- */
189
- type TypedAttribute<TName extends string = string, TAttr extends Attribute = Attribute> = TAttr & {
190
- readonly name: TName;
191
- };
192
- /**
193
- * Accumulated attributes map (built via chained .attribute() calls)
194
- */
195
- type AttributeMap = Record<string, Attribute>;
196
- /**
197
- * Add an attribute to an existing map
198
- */
199
- type AddAttribute$1<TMap extends AttributeMap, TName extends string, TAttr extends Attribute> = TMap & {
200
- [K in TName]: TAttr;
201
- };
202
- /**
203
- * Infer record type from accumulated attribute map
204
- */
205
- type InferRecord<TMap extends AttributeMap> = InferRecordWithRequirements<TMap>;
206
- /**
207
- * Infer input type for creating a record (all required + partial optional)
208
- */
209
- type InferRecordInput<TMap extends AttributeMap> = InferRecordWithRequirements<TMap>;
210
- /**
211
- * Infer update type (all fields optional)
212
- */
213
- type InferRecordUpdate<TMap extends AttributeMap> = Partial<InferRecordFromSchema<TMap>>;
214
- /**
215
- * Base type for custom attribute values added via UI
216
- * Supports all possible attribute value types
217
- * Formula and Rollup attributes don't have defaultValue, so we exclude them
218
- */
219
- type CustomAttributeValue = Exclude<Attribute, FormulaAttribute | RollupAttribute>["defaultValue"] | undefined;
220
- /**
221
- * Adds support for custom attributes (added via UI) to a record type
222
- * Preserves autocompletion for known attributes while allowing additional properties
223
- */
224
- type WithCustomAttributes<T> = T & {
225
- [key: string]: CustomAttributeValue;
226
- };
227
- /**
228
- * Extract the record type from an ObjectBuilder instance
229
- * Includes support for custom attributes added via UI
230
- *
231
- * @example
232
- * ```typescript
233
- * const PRODUCT = object({ name: "products", label: "Product" })
234
- * .attribute(text({ name: "name", label: "Name" }).required())
235
- * .attribute(number({ name: "price", label: "Price" }));
236
- *
237
- * type ProductRecord = ExtractRecord<typeof PRODUCT>;
238
- * // → { name: string; price?: number } & { [key: string]: CustomAttributeValue }
239
- *
240
- * const product: ProductRecord = {
241
- * name: "Nike Air Max",
242
- * price: 129.99,
243
- * customField: "added via UI", // ✅ Allowed
244
- * };
245
- * ```
246
- */
247
- type ExtractRecord<TBuilder> = TBuilder extends {
248
- _types: {
249
- record: infer R;
250
- };
251
- } ? WithCustomAttributes<R> : never;
252
- /**
253
- * Extract the record type without custom attributes (strict mode)
254
- * Use this when you only want the defined attributes
255
- */
256
- type ExtractRecordStrict<TBuilder> = TBuilder extends {
257
- _types: {
258
- record: infer R;
259
- };
260
- } ? R : never;
261
- /**
262
- * Extract the input type from an ObjectBuilder instance
263
- * Includes support for custom attributes
264
- */
265
- type ExtractRecordInput<TBuilder> = TBuilder extends {
266
- _types: {
267
- input: infer R;
268
- };
269
- } ? WithCustomAttributes<R> : never;
270
- /**
271
- * Extract the input type without custom attributes (strict mode)
272
- */
273
- type ExtractRecordInputStrict<TBuilder> = TBuilder extends {
274
- _types: {
275
- input: infer R;
276
- };
277
- } ? R : never;
278
- /**
279
- * Extract the update type from an ObjectBuilder instance
280
- * Includes support for custom attributes
281
- */
282
- type ExtractRecordUpdate<TBuilder> = TBuilder extends {
283
- _types: {
284
- update: infer R;
285
- };
286
- } ? WithCustomAttributes<R> : never;
287
- /**
288
- * Extract the update type without custom attributes (strict mode)
289
- */
290
- type ExtractRecordUpdateStrict<TBuilder> = TBuilder extends {
291
- _types: {
292
- update: infer R;
293
- };
294
- } ? R : never;
295
- /**
296
- * Extract the attribute map from an ObjectBuilder instance
297
- */
298
- type ExtractAttributes<TBuilder> = TBuilder extends {
299
- _types: {
300
- attributes: infer A;
301
- };
302
- } ? A : never;
303
-
304
110
  /**
305
111
  * Default empty value placeholder
306
112
  */
@@ -1025,6 +831,11 @@ declare class RollupAttributeBuilder<TName extends string> extends BaseAttribute
1025
831
  * Set decimal places for numeric results
1026
832
  */
1027
833
  decimals(value: number): this;
834
+ /**
835
+ * Display the rollup value using the target attribute's type formatter
836
+ * instead of the default rollup-specific formatting
837
+ */
838
+ showAsOriginal(): this;
1028
839
  /**
1029
840
  * Set multi-level path for traversing nested relations (Phase 4+)
1030
841
  * @param path - Dot notation path (e.g., "orders.items")
@@ -1780,4 +1591,4 @@ declare function view(name: string, label: string): ViewBuilder;
1780
1591
  */
1781
1592
  declare function group(id: string, label: string): GroupBuilder;
1782
1593
 
1783
- 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, EMPTY_VALUE_PLACEHOLDER, 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, FormulaAttribute, FormulaReturnType, 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, RollupAttribute, RollupFunction, 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, formatAttributeValue, formula, group, isDefaultRole, isForbiddenError, isNotFoundError, isProtectedResourceError, isSchemaError, isValidationError, location, multiselect, number, object, phone, rating, relation, rollup, select, status, text, textarea, timestamp, user, view };
1594
+ export { ALL_SYSTEM_RESOURCES, type AnyAttributeBuilder, Attribute, AttributeGroupField, AttributeInUseError, AttributeNotFoundError, type AttributeUsage, type BuilderConfig, CheckboxAttribute, CurrencyAttribute, CustomTabConfig, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DateAttribute, type DefaultRoleName, type DefaultRolePermissionConfig, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type ExtractAttributeName, type ExtractAttributeRequired, Field, FileAttribute, FileNotFoundError, FlowBuilder, FlowDefinition, FlowPage, FlowPageBuilder, FlowRow, FlowRowBuilder, ForbiddenError, FormulaAttribute, FormulaReturnType, Group, GroupBuilder, InferAttributeValue, LocationAttribute, MultiRelationAttribute, MultiselectAttribute, NotFoundError, NotSystemObjectError, NumberAttribute, ObjectAction, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, ObjectReferencedError, Option, PhoneAttribute, ProtectedResourceError, ProtectedRoleError, RatingAttribute, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationTarget, RoleNotFoundError, RollupAttribute, RollupFunction, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SelectAttribute, SingleRelationAttribute, StatusAttribute, SyncError, SystemAction, SystemResource, Tab, TabBuilder, TableTabConfig, TextAreaAttribute, TextAttribute, TimestampAttribute, type TypedBuilderConfig, UserAttribute, UserProfileNotFoundError, ValidationError, type ValidationErrorDetail, ViewBuilder, ViewDefinition, checkbox, currency, date, file, flow, formatAttributeValue, formula, group, isDefaultRole, isForbiddenError, isNotFoundError, isProtectedResourceError, isSchemaError, isValidationError, location, multiselect, number, object, phone, rating, relation, rollup, select, status, text, textarea, timestamp, user, view };