@stndrds/schema 1.0.0-alpha.194 → 1.0.0-alpha.196
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +45 -2
- package/dist/index.d.ts +45 -2
- package/dist/index.js +18 -0
- package/dist/index.mjs +18 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -3493,6 +3493,43 @@ type InferMultiselectValue<A extends MultiselectAttribute> = A["options"] extend
|
|
|
3493
3493
|
interface QualifiedDocumentBrand<TProps extends Record<string, unknown>> {
|
|
3494
3494
|
readonly __qualifiedDocumentProps: TProps;
|
|
3495
3495
|
}
|
|
3496
|
+
/**
|
|
3497
|
+
* Public, nominally-named return type for `DocumentAttributeBuilder.qualifyWith()`.
|
|
3498
|
+
*
|
|
3499
|
+
* Exposes only the inference surface (`_types`, `$infer`) plus `build()`. The concrete
|
|
3500
|
+
* builder class has `protected` members (`attr`, `setRequired`, …) that TypeScript cannot
|
|
3501
|
+
* emit when a consumer's exported object definition carries a qualified document under
|
|
3502
|
+
* `declaration: true` — it inlines the class as an anonymous type and fails with TS4094.
|
|
3503
|
+
* Returning this named interface keeps the type emittable while preserving full record
|
|
3504
|
+
* inference (`.attribute()` reads `_types`, `.build()` is invoked at runtime).
|
|
3505
|
+
*/
|
|
3506
|
+
interface QualifiedDocumentAttributeBuilder<TName extends string, TProps extends Record<string, unknown>, TRequired extends boolean = false> {
|
|
3507
|
+
readonly _types: {
|
|
3508
|
+
name: TName;
|
|
3509
|
+
attribute: DocumentAttribute & QualifiedDocumentBrand<TProps>;
|
|
3510
|
+
required: TRequired;
|
|
3511
|
+
};
|
|
3512
|
+
readonly $infer: {
|
|
3513
|
+
value: Array<{
|
|
3514
|
+
id: string;
|
|
3515
|
+
props: TProps;
|
|
3516
|
+
}>;
|
|
3517
|
+
definition: DocumentAttribute;
|
|
3518
|
+
};
|
|
3519
|
+
build(): DocumentAttribute;
|
|
3520
|
+
}
|
|
3521
|
+
/**
|
|
3522
|
+
* Forces eager materialization of a computed type into a concrete object shape.
|
|
3523
|
+
*
|
|
3524
|
+
* Without this, a type alias application like `InferQualifiedProps<[DateBuilder, …]>`
|
|
3525
|
+
* is kept deferred in emitted `.d.ts` files, dragging the (non-exported) builder
|
|
3526
|
+
* classes into a consumer's declaration output and triggering TS4094. Resolving it
|
|
3527
|
+
* to a plain `{ key: value }` object removes any reference to the builders. The
|
|
3528
|
+
* mapped type is homomorphic, so optional/readonly modifiers are preserved.
|
|
3529
|
+
*/
|
|
3530
|
+
type Eager<T> = T extends infer U ? {
|
|
3531
|
+
[K in keyof U]: U[K];
|
|
3532
|
+
} : never;
|
|
3496
3533
|
/**
|
|
3497
3534
|
* @internal — used by DocumentAttributeBuilder.qualifyWith().
|
|
3498
3535
|
*
|
|
@@ -5059,6 +5096,12 @@ declare class RollupAttributeBuilder<TName extends string> extends BaseAttribute
|
|
|
5059
5096
|
* @param options - The options array from the target attribute
|
|
5060
5097
|
*/
|
|
5061
5098
|
targetOptions(options: Option[]): this;
|
|
5099
|
+
/**
|
|
5100
|
+
* Build the attribute, validating computed-field configuration eagerly so a
|
|
5101
|
+
* misconfiguration surfaces at schema-definition time (with a fix-it hint)
|
|
5102
|
+
* rather than as an opaque runtime 500 when the rollup is first evaluated.
|
|
5103
|
+
*/
|
|
5104
|
+
build(): RollupAttribute;
|
|
5062
5105
|
required(): any;
|
|
5063
5106
|
optional(): any;
|
|
5064
5107
|
}
|
|
@@ -5146,7 +5189,7 @@ declare class DocumentAttributeBuilder<TName extends string, TRequired extends b
|
|
|
5146
5189
|
* number({ name: "amount", label: "Amount" }).min(0),
|
|
5147
5190
|
* )
|
|
5148
5191
|
*/
|
|
5149
|
-
qualifyWith<const TBuilders extends readonly PropertyAttributeBuilder[]>(...builders: TBuilders):
|
|
5192
|
+
qualifyWith<const TBuilders extends readonly PropertyAttributeBuilder[]>(...builders: TBuilders): QualifiedDocumentAttributeBuilder<TName, Eager<InferQualifiedProps<TBuilders>>, TRequired>;
|
|
5150
5193
|
/**
|
|
5151
5194
|
* Mark this attribute as required.
|
|
5152
5195
|
*/
|
|
@@ -7604,4 +7647,4 @@ interface QualifiedRuleValidationContext {
|
|
|
7604
7647
|
}
|
|
7605
7648
|
declare function validateQualifiedRule(rule: FilterRule, context: QualifiedRuleValidationContext): void;
|
|
7606
7649
|
|
|
7607
|
-
export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, type ActivityTab, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AdvancedFilterState, type AgentConfig, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionPatchLiveEvent, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type AgentUnreadPatchLiveEvent, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, type AttributeGroupField, AttributeInUseError, type AttributeLifecycleCapabilities, AttributeNotFoundError, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, ChangeTypeNotSupportedError, type ChannelRevokedLiveEvent, CheckboxAttribute, type CompileComputedFormulaInput, CompletionStatus, type ComputedCompileAttribute, type ComputedCompileObject, type ComputedCompileSchema, ComputedDependency, type ComputedDependencyGraphNode, type ComputedFormulaAstNode, type ComputedFormulaBinaryNode, type ComputedFormulaBinaryOperator, type ComputedFormulaCallNode, ComputedFormulaCompileError, type ComputedFormulaLiteralNode, ComputedFormulaParseError, type ComputedFormulaPathNode, type ComputedFormulaResult, type ComputedFunctionCategory, type ComputedFunctionMetadata, type ComputedFunctionName, type ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConcurrentModificationError, type ConfigOverrides, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, type CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CurrencyFilterValue, type CustomAttributeValue, type CustomTab, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, type DefaultRoleName, type DeletedMode, DestructiveSyncNotAllowedError, DetailViewBuilder, type DetailViewConfig, type DetailViewDefinition, type DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, type DocumentsTab, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type EffectivePermissions, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtendedFilterRule, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, type Field, type FieldGroup, type FieldHistoryEntry, type File, FileAttribute, type FileListOptions, type FileVisibility, type FilterCombinator, type FilterGroup, type FilterOperator, type FilterRule, type FilterState, type FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, FlagService, type FlagValueType, ForbiddenError, FormBuilder, type FormDefinition, type FormDensity, type FormFieldRef, type FormFieldsRow, type FormFreeFieldRef, type FormHeadingRow, FormRegistry, type FormRow, FormRowBuilder, type FormSeparatorRow, type FormSlot, type FormSlotFieldRef, type FormStatus, type FormStep, FormStepBuilder, type FormSubmission, type FormSubmissionStatus, type FormSubmittedAgentEvent, type FormTab, type FormTextRow, type FormsTab, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, type Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InverseSource, type InviteUserInput, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, type ListOptions, ListViewBuilder, type ListViewConfig, type ListViewDefinition, type ListViewLayout, type ListViewTab, ListViewTabConfigBuilder, type LiveChannel, type LiveChannelKind, type LiveErrorPayload, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveGapPayload, type LiveReplayCompletePayload, type LiveSubscribePayload, type LiveUnsubscribePayload, Location, LocationAttribute, LocationGranularity, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NO_VALUE_OPERATORS, type NoValueOperator, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type Permission, type PermissionScope, Phone, PhoneAttribute, type PhoneFilterValue, type PrincipalType, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentBrand, type QueryState, type ReasoningPartData, type RecordAgentEvent, type RecordDeletedLiveEvent, type RecordFieldPatch, type RecordMetadata, RecordNotFoundError, type RecordPatchLiveEvent, type RecordReference, RecordReferencedError, type RegexGenerationInput, RelationAttribute, type RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, type RelationSource, RelationTarget, type RelativeDateValue, RepositoryError, type RepositoryOperation, type ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, type RichtextTab, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, SchemaOperation, type SearchOptions, SelectAttribute, type SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, type SortDirection, type SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, type StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, type Tab, TabBuilder, type TabType, type TableSource, type TableTab, TableTabConfig, TenantId, TextAttribute, type TextPartData, type ThinkingPartData, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, UserReferenceType, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, type ViewConfig, type ViewDefinition, type ViewOverlay, type ViewProjectionStaleLiveEvent, type ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, extractAttributeNames, file, flagRegistry, form, formRegistry, formatAttributeValue, formatComputedResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, group, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeInUseError, isAttributeKanbanGroupable, isAttributeSearchable, isComputedFunctionName, isDefaultRole, isDetailView, isDocumentAttribute, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isNoValueOperator, isNotEmpty, isNotFoundError, isObjectReferencedError, isPlainRecord, isProtectedResourceError, isRecordReferencedError, isRelationGroup, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, liveChannelKey, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, number, numberFlag, object, parseComputedFormula, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, phone, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, rollupToFormulaExpression, select, status, stringFlag, text, toUndefinedIfEmpty, user, validateAttributeName, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|
|
7650
|
+
export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, type ActivityTab, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AdvancedFilterState, type AgentConfig, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionPatchLiveEvent, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type AgentUnreadPatchLiveEvent, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, type AttributeGroupField, AttributeInUseError, type AttributeLifecycleCapabilities, AttributeNotFoundError, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, ChangeTypeNotSupportedError, type ChannelRevokedLiveEvent, CheckboxAttribute, type CompileComputedFormulaInput, CompletionStatus, type ComputedCompileAttribute, type ComputedCompileObject, type ComputedCompileSchema, ComputedDependency, type ComputedDependencyGraphNode, type ComputedFormulaAstNode, type ComputedFormulaBinaryNode, type ComputedFormulaBinaryOperator, type ComputedFormulaCallNode, ComputedFormulaCompileError, type ComputedFormulaLiteralNode, ComputedFormulaParseError, type ComputedFormulaPathNode, type ComputedFormulaResult, type ComputedFunctionCategory, type ComputedFunctionMetadata, type ComputedFunctionName, type ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConcurrentModificationError, type ConfigOverrides, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, type CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CurrencyFilterValue, type CustomAttributeValue, type CustomTab, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, type DefaultRoleName, type DeletedMode, DestructiveSyncNotAllowedError, DetailViewBuilder, type DetailViewConfig, type DetailViewDefinition, type DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, type DocumentsTab, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type Eager, type EffectivePermissions, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtendedFilterRule, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, type Field, type FieldGroup, type FieldHistoryEntry, type File, FileAttribute, type FileListOptions, type FileVisibility, type FilterCombinator, type FilterGroup, type FilterOperator, type FilterRule, type FilterState, type FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, FlagService, type FlagValueType, ForbiddenError, FormBuilder, type FormDefinition, type FormDensity, type FormFieldRef, type FormFieldsRow, type FormFreeFieldRef, type FormHeadingRow, FormRegistry, type FormRow, FormRowBuilder, type FormSeparatorRow, type FormSlot, type FormSlotFieldRef, type FormStatus, type FormStep, FormStepBuilder, type FormSubmission, type FormSubmissionStatus, type FormSubmittedAgentEvent, type FormTab, type FormTextRow, type FormsTab, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, type Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InverseSource, type InviteUserInput, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, type ListOptions, ListViewBuilder, type ListViewConfig, type ListViewDefinition, type ListViewLayout, type ListViewTab, ListViewTabConfigBuilder, type LiveChannel, type LiveChannelKind, type LiveErrorPayload, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveGapPayload, type LiveReplayCompletePayload, type LiveSubscribePayload, type LiveUnsubscribePayload, Location, LocationAttribute, LocationGranularity, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NO_VALUE_OPERATORS, type NoValueOperator, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type Permission, type PermissionScope, Phone, PhoneAttribute, type PhoneFilterValue, type PrincipalType, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentAttributeBuilder, type QualifiedDocumentBrand, type QueryState, type ReasoningPartData, type RecordAgentEvent, type RecordDeletedLiveEvent, type RecordFieldPatch, type RecordMetadata, RecordNotFoundError, type RecordPatchLiveEvent, type RecordReference, RecordReferencedError, type RegexGenerationInput, RelationAttribute, type RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, type RelationSource, RelationTarget, type RelativeDateValue, RepositoryError, type RepositoryOperation, type ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, type RichtextTab, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, SchemaOperation, type SearchOptions, SelectAttribute, type SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, type SortDirection, type SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, type StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, type Tab, TabBuilder, type TabType, type TableSource, type TableTab, TableTabConfig, TenantId, TextAttribute, type TextPartData, type ThinkingPartData, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, UserReferenceType, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, type ViewConfig, type ViewDefinition, type ViewOverlay, type ViewProjectionStaleLiveEvent, type ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, extractAttributeNames, file, flagRegistry, form, formRegistry, formatAttributeValue, formatComputedResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, group, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeInUseError, isAttributeKanbanGroupable, isAttributeSearchable, isComputedFunctionName, isDefaultRole, isDetailView, isDocumentAttribute, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isNoValueOperator, isNotEmpty, isNotFoundError, isObjectReferencedError, isPlainRecord, isProtectedResourceError, isRecordReferencedError, isRelationGroup, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, liveChannelKey, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, number, numberFlag, object, parseComputedFormula, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, phone, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, rollupToFormulaExpression, select, status, stringFlag, text, toUndefinedIfEmpty, user, validateAttributeName, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|
package/dist/index.d.ts
CHANGED
|
@@ -3493,6 +3493,43 @@ type InferMultiselectValue<A extends MultiselectAttribute> = A["options"] extend
|
|
|
3493
3493
|
interface QualifiedDocumentBrand<TProps extends Record<string, unknown>> {
|
|
3494
3494
|
readonly __qualifiedDocumentProps: TProps;
|
|
3495
3495
|
}
|
|
3496
|
+
/**
|
|
3497
|
+
* Public, nominally-named return type for `DocumentAttributeBuilder.qualifyWith()`.
|
|
3498
|
+
*
|
|
3499
|
+
* Exposes only the inference surface (`_types`, `$infer`) plus `build()`. The concrete
|
|
3500
|
+
* builder class has `protected` members (`attr`, `setRequired`, …) that TypeScript cannot
|
|
3501
|
+
* emit when a consumer's exported object definition carries a qualified document under
|
|
3502
|
+
* `declaration: true` — it inlines the class as an anonymous type and fails with TS4094.
|
|
3503
|
+
* Returning this named interface keeps the type emittable while preserving full record
|
|
3504
|
+
* inference (`.attribute()` reads `_types`, `.build()` is invoked at runtime).
|
|
3505
|
+
*/
|
|
3506
|
+
interface QualifiedDocumentAttributeBuilder<TName extends string, TProps extends Record<string, unknown>, TRequired extends boolean = false> {
|
|
3507
|
+
readonly _types: {
|
|
3508
|
+
name: TName;
|
|
3509
|
+
attribute: DocumentAttribute & QualifiedDocumentBrand<TProps>;
|
|
3510
|
+
required: TRequired;
|
|
3511
|
+
};
|
|
3512
|
+
readonly $infer: {
|
|
3513
|
+
value: Array<{
|
|
3514
|
+
id: string;
|
|
3515
|
+
props: TProps;
|
|
3516
|
+
}>;
|
|
3517
|
+
definition: DocumentAttribute;
|
|
3518
|
+
};
|
|
3519
|
+
build(): DocumentAttribute;
|
|
3520
|
+
}
|
|
3521
|
+
/**
|
|
3522
|
+
* Forces eager materialization of a computed type into a concrete object shape.
|
|
3523
|
+
*
|
|
3524
|
+
* Without this, a type alias application like `InferQualifiedProps<[DateBuilder, …]>`
|
|
3525
|
+
* is kept deferred in emitted `.d.ts` files, dragging the (non-exported) builder
|
|
3526
|
+
* classes into a consumer's declaration output and triggering TS4094. Resolving it
|
|
3527
|
+
* to a plain `{ key: value }` object removes any reference to the builders. The
|
|
3528
|
+
* mapped type is homomorphic, so optional/readonly modifiers are preserved.
|
|
3529
|
+
*/
|
|
3530
|
+
type Eager<T> = T extends infer U ? {
|
|
3531
|
+
[K in keyof U]: U[K];
|
|
3532
|
+
} : never;
|
|
3496
3533
|
/**
|
|
3497
3534
|
* @internal — used by DocumentAttributeBuilder.qualifyWith().
|
|
3498
3535
|
*
|
|
@@ -5059,6 +5096,12 @@ declare class RollupAttributeBuilder<TName extends string> extends BaseAttribute
|
|
|
5059
5096
|
* @param options - The options array from the target attribute
|
|
5060
5097
|
*/
|
|
5061
5098
|
targetOptions(options: Option[]): this;
|
|
5099
|
+
/**
|
|
5100
|
+
* Build the attribute, validating computed-field configuration eagerly so a
|
|
5101
|
+
* misconfiguration surfaces at schema-definition time (with a fix-it hint)
|
|
5102
|
+
* rather than as an opaque runtime 500 when the rollup is first evaluated.
|
|
5103
|
+
*/
|
|
5104
|
+
build(): RollupAttribute;
|
|
5062
5105
|
required(): any;
|
|
5063
5106
|
optional(): any;
|
|
5064
5107
|
}
|
|
@@ -5146,7 +5189,7 @@ declare class DocumentAttributeBuilder<TName extends string, TRequired extends b
|
|
|
5146
5189
|
* number({ name: "amount", label: "Amount" }).min(0),
|
|
5147
5190
|
* )
|
|
5148
5191
|
*/
|
|
5149
|
-
qualifyWith<const TBuilders extends readonly PropertyAttributeBuilder[]>(...builders: TBuilders):
|
|
5192
|
+
qualifyWith<const TBuilders extends readonly PropertyAttributeBuilder[]>(...builders: TBuilders): QualifiedDocumentAttributeBuilder<TName, Eager<InferQualifiedProps<TBuilders>>, TRequired>;
|
|
5150
5193
|
/**
|
|
5151
5194
|
* Mark this attribute as required.
|
|
5152
5195
|
*/
|
|
@@ -7604,4 +7647,4 @@ interface QualifiedRuleValidationContext {
|
|
|
7604
7647
|
}
|
|
7605
7648
|
declare function validateQualifiedRule(rule: FilterRule, context: QualifiedRuleValidationContext): void;
|
|
7606
7649
|
|
|
7607
|
-
export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, type ActivityTab, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AdvancedFilterState, type AgentConfig, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionPatchLiveEvent, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type AgentUnreadPatchLiveEvent, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, type AttributeGroupField, AttributeInUseError, type AttributeLifecycleCapabilities, AttributeNotFoundError, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, ChangeTypeNotSupportedError, type ChannelRevokedLiveEvent, CheckboxAttribute, type CompileComputedFormulaInput, CompletionStatus, type ComputedCompileAttribute, type ComputedCompileObject, type ComputedCompileSchema, ComputedDependency, type ComputedDependencyGraphNode, type ComputedFormulaAstNode, type ComputedFormulaBinaryNode, type ComputedFormulaBinaryOperator, type ComputedFormulaCallNode, ComputedFormulaCompileError, type ComputedFormulaLiteralNode, ComputedFormulaParseError, type ComputedFormulaPathNode, type ComputedFormulaResult, type ComputedFunctionCategory, type ComputedFunctionMetadata, type ComputedFunctionName, type ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConcurrentModificationError, type ConfigOverrides, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, type CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CurrencyFilterValue, type CustomAttributeValue, type CustomTab, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, type DefaultRoleName, type DeletedMode, DestructiveSyncNotAllowedError, DetailViewBuilder, type DetailViewConfig, type DetailViewDefinition, type DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, type DocumentsTab, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type EffectivePermissions, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtendedFilterRule, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, type Field, type FieldGroup, type FieldHistoryEntry, type File, FileAttribute, type FileListOptions, type FileVisibility, type FilterCombinator, type FilterGroup, type FilterOperator, type FilterRule, type FilterState, type FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, FlagService, type FlagValueType, ForbiddenError, FormBuilder, type FormDefinition, type FormDensity, type FormFieldRef, type FormFieldsRow, type FormFreeFieldRef, type FormHeadingRow, FormRegistry, type FormRow, FormRowBuilder, type FormSeparatorRow, type FormSlot, type FormSlotFieldRef, type FormStatus, type FormStep, FormStepBuilder, type FormSubmission, type FormSubmissionStatus, type FormSubmittedAgentEvent, type FormTab, type FormTextRow, type FormsTab, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, type Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InverseSource, type InviteUserInput, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, type ListOptions, ListViewBuilder, type ListViewConfig, type ListViewDefinition, type ListViewLayout, type ListViewTab, ListViewTabConfigBuilder, type LiveChannel, type LiveChannelKind, type LiveErrorPayload, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveGapPayload, type LiveReplayCompletePayload, type LiveSubscribePayload, type LiveUnsubscribePayload, Location, LocationAttribute, LocationGranularity, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NO_VALUE_OPERATORS, type NoValueOperator, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type Permission, type PermissionScope, Phone, PhoneAttribute, type PhoneFilterValue, type PrincipalType, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentBrand, type QueryState, type ReasoningPartData, type RecordAgentEvent, type RecordDeletedLiveEvent, type RecordFieldPatch, type RecordMetadata, RecordNotFoundError, type RecordPatchLiveEvent, type RecordReference, RecordReferencedError, type RegexGenerationInput, RelationAttribute, type RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, type RelationSource, RelationTarget, type RelativeDateValue, RepositoryError, type RepositoryOperation, type ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, type RichtextTab, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, SchemaOperation, type SearchOptions, SelectAttribute, type SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, type SortDirection, type SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, type StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, type Tab, TabBuilder, type TabType, type TableSource, type TableTab, TableTabConfig, TenantId, TextAttribute, type TextPartData, type ThinkingPartData, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, UserReferenceType, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, type ViewConfig, type ViewDefinition, type ViewOverlay, type ViewProjectionStaleLiveEvent, type ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, extractAttributeNames, file, flagRegistry, form, formRegistry, formatAttributeValue, formatComputedResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, group, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeInUseError, isAttributeKanbanGroupable, isAttributeSearchable, isComputedFunctionName, isDefaultRole, isDetailView, isDocumentAttribute, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isNoValueOperator, isNotEmpty, isNotFoundError, isObjectReferencedError, isPlainRecord, isProtectedResourceError, isRecordReferencedError, isRelationGroup, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, liveChannelKey, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, number, numberFlag, object, parseComputedFormula, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, phone, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, rollupToFormulaExpression, select, status, stringFlag, text, toUndefinedIfEmpty, user, validateAttributeName, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|
|
7650
|
+
export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, type ActivityTab, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AdvancedFilterState, type AgentConfig, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionPatchLiveEvent, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type AgentUnreadPatchLiveEvent, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, type AttributeGroupField, AttributeInUseError, type AttributeLifecycleCapabilities, AttributeNotFoundError, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, ChangeTypeNotSupportedError, type ChannelRevokedLiveEvent, CheckboxAttribute, type CompileComputedFormulaInput, CompletionStatus, type ComputedCompileAttribute, type ComputedCompileObject, type ComputedCompileSchema, ComputedDependency, type ComputedDependencyGraphNode, type ComputedFormulaAstNode, type ComputedFormulaBinaryNode, type ComputedFormulaBinaryOperator, type ComputedFormulaCallNode, ComputedFormulaCompileError, type ComputedFormulaLiteralNode, ComputedFormulaParseError, type ComputedFormulaPathNode, type ComputedFormulaResult, type ComputedFunctionCategory, type ComputedFunctionMetadata, type ComputedFunctionName, type ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConcurrentModificationError, type ConfigOverrides, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, type CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CurrencyFilterValue, type CustomAttributeValue, type CustomTab, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, type DefaultRoleName, type DeletedMode, DestructiveSyncNotAllowedError, DetailViewBuilder, type DetailViewConfig, type DetailViewDefinition, type DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, type DocumentsTab, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type Eager, type EffectivePermissions, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtendedFilterRule, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, type Field, type FieldGroup, type FieldHistoryEntry, type File, FileAttribute, type FileListOptions, type FileVisibility, type FilterCombinator, type FilterGroup, type FilterOperator, type FilterRule, type FilterState, type FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, FlagService, type FlagValueType, ForbiddenError, FormBuilder, type FormDefinition, type FormDensity, type FormFieldRef, type FormFieldsRow, type FormFreeFieldRef, type FormHeadingRow, FormRegistry, type FormRow, FormRowBuilder, type FormSeparatorRow, type FormSlot, type FormSlotFieldRef, type FormStatus, type FormStep, FormStepBuilder, type FormSubmission, type FormSubmissionStatus, type FormSubmittedAgentEvent, type FormTab, type FormTextRow, type FormsTab, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, type Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InverseSource, type InviteUserInput, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, type ListOptions, ListViewBuilder, type ListViewConfig, type ListViewDefinition, type ListViewLayout, type ListViewTab, ListViewTabConfigBuilder, type LiveChannel, type LiveChannelKind, type LiveErrorPayload, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveGapPayload, type LiveReplayCompletePayload, type LiveSubscribePayload, type LiveUnsubscribePayload, Location, LocationAttribute, LocationGranularity, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NO_VALUE_OPERATORS, type NoValueOperator, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type Permission, type PermissionScope, Phone, PhoneAttribute, type PhoneFilterValue, type PrincipalType, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentAttributeBuilder, type QualifiedDocumentBrand, type QueryState, type ReasoningPartData, type RecordAgentEvent, type RecordDeletedLiveEvent, type RecordFieldPatch, type RecordMetadata, RecordNotFoundError, type RecordPatchLiveEvent, type RecordReference, RecordReferencedError, type RegexGenerationInput, RelationAttribute, type RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, type RelationSource, RelationTarget, type RelativeDateValue, RepositoryError, type RepositoryOperation, type ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, type RichtextTab, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, SchemaOperation, type SearchOptions, SelectAttribute, type SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, type SortDirection, type SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, type StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, type Tab, TabBuilder, type TabType, type TableSource, type TableTab, TableTabConfig, TenantId, TextAttribute, type TextPartData, type ThinkingPartData, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, UserReferenceType, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, type ViewConfig, type ViewDefinition, type ViewOverlay, type ViewProjectionStaleLiveEvent, type ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, extractAttributeNames, file, flagRegistry, form, formRegistry, formatAttributeValue, formatComputedResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, group, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeInUseError, isAttributeKanbanGroupable, isAttributeSearchable, isComputedFunctionName, isDefaultRole, isDetailView, isDocumentAttribute, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isNoValueOperator, isNotEmpty, isNotFoundError, isObjectReferencedError, isPlainRecord, isProtectedResourceError, isRecordReferencedError, isRelationGroup, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, liveChannelKey, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, number, numberFlag, object, parseComputedFormula, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, phone, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, rollupToFormulaExpression, select, status, stringFlag, text, toUndefinedIfEmpty, user, validateAttributeName, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|
package/dist/index.js
CHANGED
|
@@ -1970,6 +1970,24 @@ var RollupAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
1970
1970
|
this.attr.targetAttributeOptions = options;
|
|
1971
1971
|
return this;
|
|
1972
1972
|
}
|
|
1973
|
+
/**
|
|
1974
|
+
* Build the attribute, validating computed-field configuration eagerly so a
|
|
1975
|
+
* misconfiguration surfaces at schema-definition time (with a fix-it hint)
|
|
1976
|
+
* rather than as an opaque runtime 500 when the rollup is first evaluated.
|
|
1977
|
+
*/
|
|
1978
|
+
build() {
|
|
1979
|
+
const fn = this.attr.function;
|
|
1980
|
+
const targetType = this.attr.targetAttributeType;
|
|
1981
|
+
if (fn === "original" && targetType !== void 0 && targetType !== "select" && targetType !== "status" && targetType !== "multiselect") {
|
|
1982
|
+
const relation2 = this.attr.relationAttribute ?? "relation";
|
|
1983
|
+
const target = this.attr.targetAttribute ?? "field";
|
|
1984
|
+
throw new chunkMZOEL7FN_js.SchemaError(
|
|
1985
|
+
`Rollup "${this.attr.name}": .using("original") only supports a "select", "status", or "multiselect" target, but .targetType("${targetType}") was given. To surface a plain ${targetType} value from a related record, use a formula instead \u2014 e.g. formula({ name: "${this.attr.name}", label: "\u2026" }).expression("${relation2}.${target}").`,
|
|
1986
|
+
chunkMZOEL7FN_js.SchemaErrorCode.VALIDATION_FAILED
|
|
1987
|
+
);
|
|
1988
|
+
}
|
|
1989
|
+
return super.build();
|
|
1990
|
+
}
|
|
1973
1991
|
// Override to prevent making rollups required
|
|
1974
1992
|
// biome-ignore lint/suspicious/noExplicitAny: intentional override
|
|
1975
1993
|
required() {
|
package/dist/index.mjs
CHANGED
|
@@ -1966,6 +1966,24 @@ var RollupAttributeBuilder = class extends BaseAttributeBuilder {
|
|
|
1966
1966
|
this.attr.targetAttributeOptions = options;
|
|
1967
1967
|
return this;
|
|
1968
1968
|
}
|
|
1969
|
+
/**
|
|
1970
|
+
* Build the attribute, validating computed-field configuration eagerly so a
|
|
1971
|
+
* misconfiguration surfaces at schema-definition time (with a fix-it hint)
|
|
1972
|
+
* rather than as an opaque runtime 500 when the rollup is first evaluated.
|
|
1973
|
+
*/
|
|
1974
|
+
build() {
|
|
1975
|
+
const fn = this.attr.function;
|
|
1976
|
+
const targetType = this.attr.targetAttributeType;
|
|
1977
|
+
if (fn === "original" && targetType !== void 0 && targetType !== "select" && targetType !== "status" && targetType !== "multiselect") {
|
|
1978
|
+
const relation2 = this.attr.relationAttribute ?? "relation";
|
|
1979
|
+
const target = this.attr.targetAttribute ?? "field";
|
|
1980
|
+
throw new SchemaError(
|
|
1981
|
+
`Rollup "${this.attr.name}": .using("original") only supports a "select", "status", or "multiselect" target, but .targetType("${targetType}") was given. To surface a plain ${targetType} value from a related record, use a formula instead \u2014 e.g. formula({ name: "${this.attr.name}", label: "\u2026" }).expression("${relation2}.${target}").`,
|
|
1982
|
+
SchemaErrorCode.VALIDATION_FAILED
|
|
1983
|
+
);
|
|
1984
|
+
}
|
|
1985
|
+
return super.build();
|
|
1986
|
+
}
|
|
1969
1987
|
// Override to prevent making rollups required
|
|
1970
1988
|
// biome-ignore lint/suspicious/noExplicitAny: intentional override
|
|
1971
1989
|
required() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stndrds/schema",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.196",
|
|
4
4
|
"description": "Standard schema definitions and utilities",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"@standard-schema/spec": "^1.1.0",
|
|
121
121
|
"libphonenumber-js": "^1.12.31",
|
|
122
122
|
"zod": "^4.2.1",
|
|
123
|
-
"@stndrds/constants": "1.0.0-alpha.
|
|
123
|
+
"@stndrds/constants": "1.0.0-alpha.196"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@types/node": "^25.0.3",
|