@stndrds/schema 1.0.0-alpha.266 → 1.0.0-alpha.268

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.
@@ -384,6 +384,7 @@ function resolveEditMode(attribute) {
384
384
  case "status":
385
385
  case "relation":
386
386
  case "user":
387
+ case "date":
387
388
  return "popover";
388
389
  default:
389
390
  return "default";
@@ -382,6 +382,7 @@ function resolveEditMode(attribute) {
382
382
  case "status":
383
383
  case "relation":
384
384
  case "user":
385
+ case "date":
385
386
  return "popover";
386
387
  default:
387
388
  return "default";
package/dist/index.d.mts CHANGED
@@ -6619,6 +6619,43 @@ interface MailboxThreadDetail {
6619
6619
  */
6620
6620
  declare function canonicalStringify(value: unknown): string;
6621
6621
 
6622
+ /**
6623
+ * The one dynamic default a date attribute can carry.
6624
+ *
6625
+ * Stored as a bare sentinel rather than `{ dynamic: "date", anchor: "today" }`
6626
+ * because that is what the attribute-config popover has always written. It is
6627
+ * named here so the two sides that must agree on it — the creation form and the
6628
+ * write path — read the same constant instead of two string literals.
6629
+ */
6630
+ declare const TODAY_DEFAULT = "today";
6631
+ interface DefaultResolutionContext {
6632
+ /** The instant "today" is measured from. */
6633
+ now: Date;
6634
+ /** IANA timezone deciding which calendar day that instant falls on. */
6635
+ timezone: string;
6636
+ }
6637
+ /**
6638
+ * Today's date as `YYYY-MM-DD` in the given IANA timezone.
6639
+ *
6640
+ * `en-CA` renders ISO-like `YYYY-MM-DD`, and `timeZone` shifts the calendar
6641
+ * day — which is the whole point: at 01:00 in Paris it is still the previous
6642
+ * day in UTC, and a user who picks "today" means their own.
6643
+ */
6644
+ declare function dateInTimezone(date: Date, timezone: string): string;
6645
+ /**
6646
+ * An attribute's default value with any dynamic token resolved to something
6647
+ * storable.
6648
+ *
6649
+ * `"today"` used to travel verbatim: the creation form handed it to the date
6650
+ * picker, which cannot parse it and rendered blank, and the write path copied
6651
+ * it into the record, so the column held the literal string `"today"` — a value
6652
+ * nothing downstream can read back as a date (#1563).
6653
+ *
6654
+ * Both callers resolve through here so a form and the record it creates can
6655
+ * never disagree about what the default was.
6656
+ */
6657
+ declare function resolveAttributeDefaultValue(attribute: Attribute, ctx: DefaultResolutionContext): unknown;
6658
+
6622
6659
  /**
6623
6660
  * The subset of a view definition that participates in sync hashing.
6624
6661
  *
@@ -7532,4 +7569,4 @@ type SchemaPlanProposalInput = z$1.input<typeof structuralSchemaPlanSchema>;
7532
7569
  type ParsedSchemaPlanProposal = z$1.output<typeof schemaPlanSchema>;
7533
7570
  type ParsedPersistedSchemaPlan = z$1.output<typeof persistedSchemaPlanSchema>;
7534
7571
 
7535
- export { type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, ALLOWED_PROPERTY_TYPES, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, AUDIT_ACTIONS, AUDIT_RESOURCE_TYPES, type AcceptsCandidate, Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddSharedMailboxInput, AgentApprovalPolicy, AgentBlueprint, AgentBuilder, type AgentBuilderConfig, AgentExecutionConfig, AgentSchedule, type AgentSessionPatchLiveEvent, AgentTriggerBlueprint, type AgentUnreadPatchLiveEvent, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, AttributeGroupField, type AttributeLifecycleCapabilities, type AttributeLike, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, type AuthorizedGlobalSearchResult, type AuthorizedRecordSearchResult, type AuthorizedSearchPage, BEHAVIOR_PROPERTIES, BROWSER_PREVIEW_STATUSES, BYTE_UNIT_LABELS, BilateralConfig, type BoundingBox, type BrowserPreviewDescriptor, type BrowserPreviewStatus, type BrowserPreviewUpdatedLiveEvent, type BuilderConfig, type ByteMagnitude, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, CONNECTOR_CALLBACK_PARAM, type ChannelRevokedLiveEvent, CheckboxAttribute, type CollectionPage, type CollectionRequest, type CollectionResponse, type CompileComputedFormulaInput, type ComputedCompileAttribute, type ComputedCompileObject, type ComputedCompileSchema, ComputedDependency, type ComputedDependencyGraphNode, ComputedFormulaAstNode, ComputedFormulaCompileError, type ComputedFormulaResult, type ComputedFunctionCategory, type ComputedFunctionMetadata, type ComputedFunctionName, type ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConfigOverrides, type ConnectionStatus, type ConnectionStatusId, type ConnectionView, type ConnectorCallbackStatusValue, type ConnectorProviderId, type ConnectorScope, type ContinuationPage, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, CreateMode, type CreateNotificationInput, type CreateNotificationRecipientInput, type CreateObjectRecord, type CreateReflexInput, type CreateReflexVersionInput, type CreateUserProfile, Currency, CurrencyAttribute, type CustomAttributeValue, type CustomObjectInfo, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, type DBViewSyncResolution, DB_COLUMN_FIELDS, DEFAULT_AGENT_EXECUTION_CONFIG, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, DateRangeValue, type DefaultRoleName, type DeletedMode, DetailViewBuilder, DetailViewConfig, DetailViewDefinition, DocumentAttribute, DocumentLayout, DocumentsTabConfig, type DomainEvent, type DriftAttributeInfo, DynamicValue, type DynamicValueResolver, EMPTY_VALUE_PLACEHOLDER, ESTIMATED_COUNT_CAP, type Eager, type EmailAttachmentMeta, type EmailDirection, type EmailParticipantRef, type EmailParticipantRole, type EmailProvider, type EmailVisibility, EmailsTabConfig, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, Field, FieldGroup, type FieldHistoryEntry, type FileListOptions, FilterOperator, FilterRule, FilterState, FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, type FlagResolutionContext, FlagService, type FlagValueType, FormBuilder, type FormDefinition, 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 FormTextRow, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InviteUserInput, type IsWithinBounds, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, ListViewTabVisibility, type LiveChannel, type LiveChannelKind, type LiveErrorPayload, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveGapPayload, type LiveNotification, type LiveNotificationRecipient, type LiveNotificationRecipientPatch, type LiveReplayCompletePayload, type LiveSubscribePayload, type LiveUnsubscribePayload, Location, LocationAttribute, LocationGranularity, MEMORY_LIST_VIEW, MEMORY_OBJECT, MEMORY_VIEW, type MailboxAccount, type MailboxCursor, type MailboxEmail, type MailboxListResponse, type MailboxQuery, type MailboxReadState, type MailboxThread, type MailboxThreadDetail, MigrationDefinition, ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NOTIFICATION_INBOX_STATES, NOTIFICATION_KINDS, NOTIFICATION_PRIORITIES, NOTIFICATION_SENSITIVITIES, NOTIFICATION_TYPES_V1, NOTIFICATION_TYPE_AGENT_QUESTION_REQUESTED, NOTIFICATION_TYPE_AGENT_SESSION_COMPLETED, NOTIFICATION_TYPE_AGENT_SESSION_FAILED, NOTIFICATION_TYPE_AGENT_SESSION_TIMEOUT, NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN, NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED, NOTIFICATION_WORK_STATES, NoopGeocodingAdapter, type Notification, type NotificationCountPatchLiveEvent, type NotificationCounts, type NotificationCreatedLiveEvent, type NotificationInboxState, type NotificationKind, type NotificationListParams, type NotificationListResult, type NotificationPriority, type NotificationRecipient, type NotificationRecipientPatchLiveEvent, type NotificationSensitivity, type NotificationSubject, type NotificationType, type NotificationV1Type, type NotificationWithRecipient, type NotificationWorkState, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, type ObjectConfig, ObjectDefinition, ObjectRecord, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type ParsedPersistedSchemaPlan, type ParsedSchemaPlanProposal, PermissionScope, type PersistedDefaultViewTarget, type PersistedSchemaPlan, type PersistedSchemaPlanAdditive, Phone, PhoneAttribute, type PlannedAttribute, type PlannedAttributeRemoval, type PlannedObject, type PlannedObjectRemoval, type PlannedRename, PropertySchema, type ProposedDefaultViewTarget, ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentAttributeBuilder, type QualifiedDocumentBrand, RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY, REMOVED_OPERATOR_REPLACEMENTS, type RecordCreatedLiveEvent, type RecordDeletedLiveEvent, type RecordFieldPatch, type RecordLiveSnapshot, type RecordMetadata, type RecordPatchLiveEvent, type RecordRemovedLiveEvent, type Reflex, type ReflexRun, type ReflexState, type ReflexVersion, type ReflexVersionStatus, type RegexGenerationInput, RelationAttribute, RelationGroup, RelationGroupBuilder, RelationTarget, RelativeDateValue, type ResolutionContext, type ResolvedFlag, ResourceVisibility, type ReverseGeocodingParams, RichtextAttribute, RichtextTabConfig, RollupAttribute, RollupFunction, type RunEffect, type RunMode, SCHEMA_PLAN_LIMITS, SKILL_LIST_VIEW, SKILL_OBJECT, SKILL_VIEW, STANDARD_SCHEMA_VENDOR, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FILTER_ATTRIBUTE_TYPES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SchemaDriftResult, type SchemaPlan, type SchemaPlanAdditive, type SchemaPlanAdditiveBase, type SchemaPlanChangeSet, type SchemaPlanDestructive, type SchemaPlanDraft, type SchemaPlanDraftResponse, type SchemaPlanDraftState, type SchemaPlanDraftStatus, type SchemaPlanDraftWrite, type SchemaPlanImpact, type SchemaPlanImpactEntry, type SchemaPlanOutcome, type SchemaPlanProposalInput, type SchemaPlanSampleData, type SchemaPlanStatus, type SchemaPlanViewChanges, type SchemaState, type SearchOptions, SelectAttribute, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, SortRule, type StandardSchemaIssue, type StandardSchemaResult, type StartConnectorAuthInput, type StartConnectorAuthResult, type StaticFlagDefault, StatusAttribute, type StoredSchemaPlan, type SystemAttribute, type SystemAttributeI18nKey, type SystemFields, type SystemObjectDriftInfo, SystemResource, TEXT_FORMAT_PATTERNS, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, type TenantSettings, TextAttribute, TimeFormat, Timestamps, TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateUserProfile, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserLike, type UserProfile, UserReferenceType, type UserStatus, Uuid, ValidationError, type ValueRef, type ViewBaselineOrigin, type ViewChange, ViewConfig, type ViewConfigDelta, ViewDefinition, type ViewProjectionStaleLiveEvent, type ViewStateEntry, type ViewStateResolution, type ViewSyncPayload, ViewType, type WithCustomAttributes$1 as WithCustomAttributes, type WithoutSystemFields, agent, applyPipes, applyRelationProps, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, canonicalStringify, checkbox, collectQualifiedRuleIssues, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, computeByteMagnitude, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, currentActor, date, dateValueStart, destructiveSchema, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, evaluateRecordFilterState, extractAttributeNames, extractCurrencyFilterValue, extractFilterValue, extractValueRefs, flagRegistry, form, formRegistry, formatAttributeValue, formatByteSize, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRecordCreatorPrincipalId, getSlotFieldTargets, getSystemAttributeI18nKey, getSystemAttributeList, getUserDisplayName, group, hasDestructiveEntries, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isCheckboxEquality, isComputedFunctionName, isDateRangeValue, isDefaultRole, isDocumentAttribute, isDynamicValue, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isManagedSystemAttribute, isNotEmpty, isPlainRecord, isRelativeDateValue, isStandardSchema, jsonFlag, listView, liveChannelKey, location, matchesAccepts, multiselect, normalizeDateValue, normalizeFilterRule, normalizeForEdgeRpc, normalizeOperator, now, number, numberFlag, object, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, persistedDefaultViewTargetSchema, persistedSchemaPlanSchema, phone, plannedAttributeSchema, plannedInlineAttributeSchema, plannedObjectSchema, proposedDefaultViewTargetSchema, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, resolveIsWithinBounds, resolveTextPattern, richtext, rollup, rollupToFormulaExpression, schemaPlanSchema, select, status, stringFlag, text, toMultiValueOperator, toUndefinedIfEmpty, toUtcDayString, today, user, validateAttributeName, validateLabelExpression, validateObjectName, validateQualifiedRule, viewRegistry, viewStateKey, viewSyncPayload };
7572
+ export { type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, ALLOWED_PROPERTY_TYPES, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, AUDIT_ACTIONS, AUDIT_RESOURCE_TYPES, type AcceptsCandidate, Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddSharedMailboxInput, AgentApprovalPolicy, AgentBlueprint, AgentBuilder, type AgentBuilderConfig, AgentExecutionConfig, AgentSchedule, type AgentSessionPatchLiveEvent, AgentTriggerBlueprint, type AgentUnreadPatchLiveEvent, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, AttributeGroupField, type AttributeLifecycleCapabilities, type AttributeLike, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, type AuthorizedGlobalSearchResult, type AuthorizedRecordSearchResult, type AuthorizedSearchPage, BEHAVIOR_PROPERTIES, BROWSER_PREVIEW_STATUSES, BYTE_UNIT_LABELS, BilateralConfig, type BoundingBox, type BrowserPreviewDescriptor, type BrowserPreviewStatus, type BrowserPreviewUpdatedLiveEvent, type BuilderConfig, type ByteMagnitude, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, CONNECTOR_CALLBACK_PARAM, type ChannelRevokedLiveEvent, CheckboxAttribute, type CollectionPage, type CollectionRequest, type CollectionResponse, type CompileComputedFormulaInput, type ComputedCompileAttribute, type ComputedCompileObject, type ComputedCompileSchema, ComputedDependency, type ComputedDependencyGraphNode, ComputedFormulaAstNode, ComputedFormulaCompileError, type ComputedFormulaResult, type ComputedFunctionCategory, type ComputedFunctionMetadata, type ComputedFunctionName, type ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConfigOverrides, type ConnectionStatus, type ConnectionStatusId, type ConnectionView, type ConnectorCallbackStatusValue, type ConnectorProviderId, type ConnectorScope, type ContinuationPage, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, CreateMode, type CreateNotificationInput, type CreateNotificationRecipientInput, type CreateObjectRecord, type CreateReflexInput, type CreateReflexVersionInput, type CreateUserProfile, Currency, CurrencyAttribute, type CustomAttributeValue, type CustomObjectInfo, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, type DBViewSyncResolution, DB_COLUMN_FIELDS, DEFAULT_AGENT_EXECUTION_CONFIG, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, DateRangeValue, type DefaultResolutionContext, type DefaultRoleName, type DeletedMode, DetailViewBuilder, DetailViewConfig, DetailViewDefinition, DocumentAttribute, DocumentLayout, DocumentsTabConfig, type DomainEvent, type DriftAttributeInfo, DynamicValue, type DynamicValueResolver, EMPTY_VALUE_PLACEHOLDER, ESTIMATED_COUNT_CAP, type Eager, type EmailAttachmentMeta, type EmailDirection, type EmailParticipantRef, type EmailParticipantRole, type EmailProvider, type EmailVisibility, EmailsTabConfig, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, Field, FieldGroup, type FieldHistoryEntry, type FileListOptions, FilterOperator, FilterRule, FilterState, FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, type FlagResolutionContext, FlagService, type FlagValueType, FormBuilder, type FormDefinition, 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 FormTextRow, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InviteUserInput, type IsWithinBounds, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, ListViewTabVisibility, type LiveChannel, type LiveChannelKind, type LiveErrorPayload, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveGapPayload, type LiveNotification, type LiveNotificationRecipient, type LiveNotificationRecipientPatch, type LiveReplayCompletePayload, type LiveSubscribePayload, type LiveUnsubscribePayload, Location, LocationAttribute, LocationGranularity, MEMORY_LIST_VIEW, MEMORY_OBJECT, MEMORY_VIEW, type MailboxAccount, type MailboxCursor, type MailboxEmail, type MailboxListResponse, type MailboxQuery, type MailboxReadState, type MailboxThread, type MailboxThreadDetail, MigrationDefinition, ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NOTIFICATION_INBOX_STATES, NOTIFICATION_KINDS, NOTIFICATION_PRIORITIES, NOTIFICATION_SENSITIVITIES, NOTIFICATION_TYPES_V1, NOTIFICATION_TYPE_AGENT_QUESTION_REQUESTED, NOTIFICATION_TYPE_AGENT_SESSION_COMPLETED, NOTIFICATION_TYPE_AGENT_SESSION_FAILED, NOTIFICATION_TYPE_AGENT_SESSION_TIMEOUT, NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN, NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED, NOTIFICATION_WORK_STATES, NoopGeocodingAdapter, type Notification, type NotificationCountPatchLiveEvent, type NotificationCounts, type NotificationCreatedLiveEvent, type NotificationInboxState, type NotificationKind, type NotificationListParams, type NotificationListResult, type NotificationPriority, type NotificationRecipient, type NotificationRecipientPatchLiveEvent, type NotificationSensitivity, type NotificationSubject, type NotificationType, type NotificationV1Type, type NotificationWithRecipient, type NotificationWorkState, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, type ObjectConfig, ObjectDefinition, ObjectRecord, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type ParsedPersistedSchemaPlan, type ParsedSchemaPlanProposal, PermissionScope, type PersistedDefaultViewTarget, type PersistedSchemaPlan, type PersistedSchemaPlanAdditive, Phone, PhoneAttribute, type PlannedAttribute, type PlannedAttributeRemoval, type PlannedObject, type PlannedObjectRemoval, type PlannedRename, PropertySchema, type ProposedDefaultViewTarget, ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentAttributeBuilder, type QualifiedDocumentBrand, RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY, REMOVED_OPERATOR_REPLACEMENTS, type RecordCreatedLiveEvent, type RecordDeletedLiveEvent, type RecordFieldPatch, type RecordLiveSnapshot, type RecordMetadata, type RecordPatchLiveEvent, type RecordRemovedLiveEvent, type Reflex, type ReflexRun, type ReflexState, type ReflexVersion, type ReflexVersionStatus, type RegexGenerationInput, RelationAttribute, RelationGroup, RelationGroupBuilder, RelationTarget, RelativeDateValue, type ResolutionContext, type ResolvedFlag, ResourceVisibility, type ReverseGeocodingParams, RichtextAttribute, RichtextTabConfig, RollupAttribute, RollupFunction, type RunEffect, type RunMode, SCHEMA_PLAN_LIMITS, SKILL_LIST_VIEW, SKILL_OBJECT, SKILL_VIEW, STANDARD_SCHEMA_VENDOR, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FILTER_ATTRIBUTE_TYPES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SchemaDriftResult, type SchemaPlan, type SchemaPlanAdditive, type SchemaPlanAdditiveBase, type SchemaPlanChangeSet, type SchemaPlanDestructive, type SchemaPlanDraft, type SchemaPlanDraftResponse, type SchemaPlanDraftState, type SchemaPlanDraftStatus, type SchemaPlanDraftWrite, type SchemaPlanImpact, type SchemaPlanImpactEntry, type SchemaPlanOutcome, type SchemaPlanProposalInput, type SchemaPlanSampleData, type SchemaPlanStatus, type SchemaPlanViewChanges, type SchemaState, type SearchOptions, SelectAttribute, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, SortRule, type StandardSchemaIssue, type StandardSchemaResult, type StartConnectorAuthInput, type StartConnectorAuthResult, type StaticFlagDefault, StatusAttribute, type StoredSchemaPlan, type SystemAttribute, type SystemAttributeI18nKey, type SystemFields, type SystemObjectDriftInfo, SystemResource, TEXT_FORMAT_PATTERNS, TODAY_DEFAULT, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, type TenantSettings, TextAttribute, TimeFormat, Timestamps, TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateUserProfile, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserLike, type UserProfile, UserReferenceType, type UserStatus, Uuid, ValidationError, type ValueRef, type ViewBaselineOrigin, type ViewChange, ViewConfig, type ViewConfigDelta, ViewDefinition, type ViewProjectionStaleLiveEvent, type ViewStateEntry, type ViewStateResolution, type ViewSyncPayload, ViewType, type WithCustomAttributes$1 as WithCustomAttributes, type WithoutSystemFields, agent, applyPipes, applyRelationProps, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, canonicalStringify, checkbox, collectQualifiedRuleIssues, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, computeByteMagnitude, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, currentActor, date, dateInTimezone, dateValueStart, destructiveSchema, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, evaluateRecordFilterState, extractAttributeNames, extractCurrencyFilterValue, extractFilterValue, extractValueRefs, flagRegistry, form, formRegistry, formatAttributeValue, formatByteSize, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRecordCreatorPrincipalId, getSlotFieldTargets, getSystemAttributeI18nKey, getSystemAttributeList, getUserDisplayName, group, hasDestructiveEntries, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isCheckboxEquality, isComputedFunctionName, isDateRangeValue, isDefaultRole, isDocumentAttribute, isDynamicValue, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isManagedSystemAttribute, isNotEmpty, isPlainRecord, isRelativeDateValue, isStandardSchema, jsonFlag, listView, liveChannelKey, location, matchesAccepts, multiselect, normalizeDateValue, normalizeFilterRule, normalizeForEdgeRpc, normalizeOperator, now, number, numberFlag, object, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, persistedDefaultViewTargetSchema, persistedSchemaPlanSchema, phone, plannedAttributeSchema, plannedInlineAttributeSchema, plannedObjectSchema, proposedDefaultViewTargetSchema, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, resolveAttributeDefaultValue, resolveIsWithinBounds, resolveTextPattern, richtext, rollup, rollupToFormulaExpression, schemaPlanSchema, select, status, stringFlag, text, toMultiValueOperator, toUndefinedIfEmpty, toUtcDayString, today, user, validateAttributeName, validateLabelExpression, validateObjectName, validateQualifiedRule, viewRegistry, viewStateKey, viewSyncPayload };
package/dist/index.d.ts CHANGED
@@ -6619,6 +6619,43 @@ interface MailboxThreadDetail {
6619
6619
  */
6620
6620
  declare function canonicalStringify(value: unknown): string;
6621
6621
 
6622
+ /**
6623
+ * The one dynamic default a date attribute can carry.
6624
+ *
6625
+ * Stored as a bare sentinel rather than `{ dynamic: "date", anchor: "today" }`
6626
+ * because that is what the attribute-config popover has always written. It is
6627
+ * named here so the two sides that must agree on it — the creation form and the
6628
+ * write path — read the same constant instead of two string literals.
6629
+ */
6630
+ declare const TODAY_DEFAULT = "today";
6631
+ interface DefaultResolutionContext {
6632
+ /** The instant "today" is measured from. */
6633
+ now: Date;
6634
+ /** IANA timezone deciding which calendar day that instant falls on. */
6635
+ timezone: string;
6636
+ }
6637
+ /**
6638
+ * Today's date as `YYYY-MM-DD` in the given IANA timezone.
6639
+ *
6640
+ * `en-CA` renders ISO-like `YYYY-MM-DD`, and `timeZone` shifts the calendar
6641
+ * day — which is the whole point: at 01:00 in Paris it is still the previous
6642
+ * day in UTC, and a user who picks "today" means their own.
6643
+ */
6644
+ declare function dateInTimezone(date: Date, timezone: string): string;
6645
+ /**
6646
+ * An attribute's default value with any dynamic token resolved to something
6647
+ * storable.
6648
+ *
6649
+ * `"today"` used to travel verbatim: the creation form handed it to the date
6650
+ * picker, which cannot parse it and rendered blank, and the write path copied
6651
+ * it into the record, so the column held the literal string `"today"` — a value
6652
+ * nothing downstream can read back as a date (#1563).
6653
+ *
6654
+ * Both callers resolve through here so a form and the record it creates can
6655
+ * never disagree about what the default was.
6656
+ */
6657
+ declare function resolveAttributeDefaultValue(attribute: Attribute, ctx: DefaultResolutionContext): unknown;
6658
+
6622
6659
  /**
6623
6660
  * The subset of a view definition that participates in sync hashing.
6624
6661
  *
@@ -7532,4 +7569,4 @@ type SchemaPlanProposalInput = z$1.input<typeof structuralSchemaPlanSchema>;
7532
7569
  type ParsedSchemaPlanProposal = z$1.output<typeof schemaPlanSchema>;
7533
7570
  type ParsedPersistedSchemaPlan = z$1.output<typeof persistedSchemaPlanSchema>;
7534
7571
 
7535
- export { type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, ALLOWED_PROPERTY_TYPES, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, AUDIT_ACTIONS, AUDIT_RESOURCE_TYPES, type AcceptsCandidate, Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddSharedMailboxInput, AgentApprovalPolicy, AgentBlueprint, AgentBuilder, type AgentBuilderConfig, AgentExecutionConfig, AgentSchedule, type AgentSessionPatchLiveEvent, AgentTriggerBlueprint, type AgentUnreadPatchLiveEvent, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, AttributeGroupField, type AttributeLifecycleCapabilities, type AttributeLike, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, type AuthorizedGlobalSearchResult, type AuthorizedRecordSearchResult, type AuthorizedSearchPage, BEHAVIOR_PROPERTIES, BROWSER_PREVIEW_STATUSES, BYTE_UNIT_LABELS, BilateralConfig, type BoundingBox, type BrowserPreviewDescriptor, type BrowserPreviewStatus, type BrowserPreviewUpdatedLiveEvent, type BuilderConfig, type ByteMagnitude, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, CONNECTOR_CALLBACK_PARAM, type ChannelRevokedLiveEvent, CheckboxAttribute, type CollectionPage, type CollectionRequest, type CollectionResponse, type CompileComputedFormulaInput, type ComputedCompileAttribute, type ComputedCompileObject, type ComputedCompileSchema, ComputedDependency, type ComputedDependencyGraphNode, ComputedFormulaAstNode, ComputedFormulaCompileError, type ComputedFormulaResult, type ComputedFunctionCategory, type ComputedFunctionMetadata, type ComputedFunctionName, type ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConfigOverrides, type ConnectionStatus, type ConnectionStatusId, type ConnectionView, type ConnectorCallbackStatusValue, type ConnectorProviderId, type ConnectorScope, type ContinuationPage, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, CreateMode, type CreateNotificationInput, type CreateNotificationRecipientInput, type CreateObjectRecord, type CreateReflexInput, type CreateReflexVersionInput, type CreateUserProfile, Currency, CurrencyAttribute, type CustomAttributeValue, type CustomObjectInfo, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, type DBViewSyncResolution, DB_COLUMN_FIELDS, DEFAULT_AGENT_EXECUTION_CONFIG, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, DateRangeValue, type DefaultRoleName, type DeletedMode, DetailViewBuilder, DetailViewConfig, DetailViewDefinition, DocumentAttribute, DocumentLayout, DocumentsTabConfig, type DomainEvent, type DriftAttributeInfo, DynamicValue, type DynamicValueResolver, EMPTY_VALUE_PLACEHOLDER, ESTIMATED_COUNT_CAP, type Eager, type EmailAttachmentMeta, type EmailDirection, type EmailParticipantRef, type EmailParticipantRole, type EmailProvider, type EmailVisibility, EmailsTabConfig, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, Field, FieldGroup, type FieldHistoryEntry, type FileListOptions, FilterOperator, FilterRule, FilterState, FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, type FlagResolutionContext, FlagService, type FlagValueType, FormBuilder, type FormDefinition, 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 FormTextRow, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InviteUserInput, type IsWithinBounds, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, ListViewTabVisibility, type LiveChannel, type LiveChannelKind, type LiveErrorPayload, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveGapPayload, type LiveNotification, type LiveNotificationRecipient, type LiveNotificationRecipientPatch, type LiveReplayCompletePayload, type LiveSubscribePayload, type LiveUnsubscribePayload, Location, LocationAttribute, LocationGranularity, MEMORY_LIST_VIEW, MEMORY_OBJECT, MEMORY_VIEW, type MailboxAccount, type MailboxCursor, type MailboxEmail, type MailboxListResponse, type MailboxQuery, type MailboxReadState, type MailboxThread, type MailboxThreadDetail, MigrationDefinition, ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NOTIFICATION_INBOX_STATES, NOTIFICATION_KINDS, NOTIFICATION_PRIORITIES, NOTIFICATION_SENSITIVITIES, NOTIFICATION_TYPES_V1, NOTIFICATION_TYPE_AGENT_QUESTION_REQUESTED, NOTIFICATION_TYPE_AGENT_SESSION_COMPLETED, NOTIFICATION_TYPE_AGENT_SESSION_FAILED, NOTIFICATION_TYPE_AGENT_SESSION_TIMEOUT, NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN, NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED, NOTIFICATION_WORK_STATES, NoopGeocodingAdapter, type Notification, type NotificationCountPatchLiveEvent, type NotificationCounts, type NotificationCreatedLiveEvent, type NotificationInboxState, type NotificationKind, type NotificationListParams, type NotificationListResult, type NotificationPriority, type NotificationRecipient, type NotificationRecipientPatchLiveEvent, type NotificationSensitivity, type NotificationSubject, type NotificationType, type NotificationV1Type, type NotificationWithRecipient, type NotificationWorkState, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, type ObjectConfig, ObjectDefinition, ObjectRecord, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type ParsedPersistedSchemaPlan, type ParsedSchemaPlanProposal, PermissionScope, type PersistedDefaultViewTarget, type PersistedSchemaPlan, type PersistedSchemaPlanAdditive, Phone, PhoneAttribute, type PlannedAttribute, type PlannedAttributeRemoval, type PlannedObject, type PlannedObjectRemoval, type PlannedRename, PropertySchema, type ProposedDefaultViewTarget, ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentAttributeBuilder, type QualifiedDocumentBrand, RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY, REMOVED_OPERATOR_REPLACEMENTS, type RecordCreatedLiveEvent, type RecordDeletedLiveEvent, type RecordFieldPatch, type RecordLiveSnapshot, type RecordMetadata, type RecordPatchLiveEvent, type RecordRemovedLiveEvent, type Reflex, type ReflexRun, type ReflexState, type ReflexVersion, type ReflexVersionStatus, type RegexGenerationInput, RelationAttribute, RelationGroup, RelationGroupBuilder, RelationTarget, RelativeDateValue, type ResolutionContext, type ResolvedFlag, ResourceVisibility, type ReverseGeocodingParams, RichtextAttribute, RichtextTabConfig, RollupAttribute, RollupFunction, type RunEffect, type RunMode, SCHEMA_PLAN_LIMITS, SKILL_LIST_VIEW, SKILL_OBJECT, SKILL_VIEW, STANDARD_SCHEMA_VENDOR, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FILTER_ATTRIBUTE_TYPES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SchemaDriftResult, type SchemaPlan, type SchemaPlanAdditive, type SchemaPlanAdditiveBase, type SchemaPlanChangeSet, type SchemaPlanDestructive, type SchemaPlanDraft, type SchemaPlanDraftResponse, type SchemaPlanDraftState, type SchemaPlanDraftStatus, type SchemaPlanDraftWrite, type SchemaPlanImpact, type SchemaPlanImpactEntry, type SchemaPlanOutcome, type SchemaPlanProposalInput, type SchemaPlanSampleData, type SchemaPlanStatus, type SchemaPlanViewChanges, type SchemaState, type SearchOptions, SelectAttribute, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, SortRule, type StandardSchemaIssue, type StandardSchemaResult, type StartConnectorAuthInput, type StartConnectorAuthResult, type StaticFlagDefault, StatusAttribute, type StoredSchemaPlan, type SystemAttribute, type SystemAttributeI18nKey, type SystemFields, type SystemObjectDriftInfo, SystemResource, TEXT_FORMAT_PATTERNS, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, type TenantSettings, TextAttribute, TimeFormat, Timestamps, TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateUserProfile, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserLike, type UserProfile, UserReferenceType, type UserStatus, Uuid, ValidationError, type ValueRef, type ViewBaselineOrigin, type ViewChange, ViewConfig, type ViewConfigDelta, ViewDefinition, type ViewProjectionStaleLiveEvent, type ViewStateEntry, type ViewStateResolution, type ViewSyncPayload, ViewType, type WithCustomAttributes$1 as WithCustomAttributes, type WithoutSystemFields, agent, applyPipes, applyRelationProps, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, canonicalStringify, checkbox, collectQualifiedRuleIssues, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, computeByteMagnitude, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, currentActor, date, dateValueStart, destructiveSchema, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, evaluateRecordFilterState, extractAttributeNames, extractCurrencyFilterValue, extractFilterValue, extractValueRefs, flagRegistry, form, formRegistry, formatAttributeValue, formatByteSize, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRecordCreatorPrincipalId, getSlotFieldTargets, getSystemAttributeI18nKey, getSystemAttributeList, getUserDisplayName, group, hasDestructiveEntries, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isCheckboxEquality, isComputedFunctionName, isDateRangeValue, isDefaultRole, isDocumentAttribute, isDynamicValue, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isManagedSystemAttribute, isNotEmpty, isPlainRecord, isRelativeDateValue, isStandardSchema, jsonFlag, listView, liveChannelKey, location, matchesAccepts, multiselect, normalizeDateValue, normalizeFilterRule, normalizeForEdgeRpc, normalizeOperator, now, number, numberFlag, object, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, persistedDefaultViewTargetSchema, persistedSchemaPlanSchema, phone, plannedAttributeSchema, plannedInlineAttributeSchema, plannedObjectSchema, proposedDefaultViewTargetSchema, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, resolveIsWithinBounds, resolveTextPattern, richtext, rollup, rollupToFormulaExpression, schemaPlanSchema, select, status, stringFlag, text, toMultiValueOperator, toUndefinedIfEmpty, toUtcDayString, today, user, validateAttributeName, validateLabelExpression, validateObjectName, validateQualifiedRule, viewRegistry, viewStateKey, viewSyncPayload };
7572
+ export { type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, ALLOWED_PROPERTY_TYPES, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, AUDIT_ACTIONS, AUDIT_RESOURCE_TYPES, type AcceptsCandidate, Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddSharedMailboxInput, AgentApprovalPolicy, AgentBlueprint, AgentBuilder, type AgentBuilderConfig, AgentExecutionConfig, AgentSchedule, type AgentSessionPatchLiveEvent, AgentTriggerBlueprint, type AgentUnreadPatchLiveEvent, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, AttributeGroupField, type AttributeLifecycleCapabilities, type AttributeLike, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, type AuthorizedGlobalSearchResult, type AuthorizedRecordSearchResult, type AuthorizedSearchPage, BEHAVIOR_PROPERTIES, BROWSER_PREVIEW_STATUSES, BYTE_UNIT_LABELS, BilateralConfig, type BoundingBox, type BrowserPreviewDescriptor, type BrowserPreviewStatus, type BrowserPreviewUpdatedLiveEvent, type BuilderConfig, type ByteMagnitude, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, CONNECTOR_CALLBACK_PARAM, type ChannelRevokedLiveEvent, CheckboxAttribute, type CollectionPage, type CollectionRequest, type CollectionResponse, type CompileComputedFormulaInput, type ComputedCompileAttribute, type ComputedCompileObject, type ComputedCompileSchema, ComputedDependency, type ComputedDependencyGraphNode, ComputedFormulaAstNode, ComputedFormulaCompileError, type ComputedFormulaResult, type ComputedFunctionCategory, type ComputedFunctionMetadata, type ComputedFunctionName, type ComputedFunctionSignature, ComputedOptionsSource, ComputedPlan, ComputedReturnType, ComputedValueType, ConfigOverrides, type ConnectionStatus, type ConnectionStatusId, type ConnectionView, type ConnectorCallbackStatusValue, type ConnectorProviderId, type ConnectorScope, type ContinuationPage, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, CreateMode, type CreateNotificationInput, type CreateNotificationRecipientInput, type CreateObjectRecord, type CreateReflexInput, type CreateReflexVersionInput, type CreateUserProfile, Currency, CurrencyAttribute, type CustomAttributeValue, type CustomObjectInfo, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, type DBViewSyncResolution, DB_COLUMN_FIELDS, DEFAULT_AGENT_EXECUTION_CONFIG, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, DateRangeValue, type DefaultResolutionContext, type DefaultRoleName, type DeletedMode, DetailViewBuilder, DetailViewConfig, DetailViewDefinition, DocumentAttribute, DocumentLayout, DocumentsTabConfig, type DomainEvent, type DriftAttributeInfo, DynamicValue, type DynamicValueResolver, EMPTY_VALUE_PLACEHOLDER, ESTIMATED_COUNT_CAP, type Eager, type EmailAttachmentMeta, type EmailDirection, type EmailParticipantRef, type EmailParticipantRole, type EmailProvider, type EmailVisibility, EmailsTabConfig, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, Field, FieldGroup, type FieldHistoryEntry, type FileListOptions, FilterOperator, FilterRule, FilterState, FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, type FlagResolutionContext, FlagService, type FlagValueType, FormBuilder, type FormDefinition, 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 FormTextRow, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InviteUserInput, type IsWithinBounds, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, ListViewTabVisibility, type LiveChannel, type LiveChannelKind, type LiveErrorPayload, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveGapPayload, type LiveNotification, type LiveNotificationRecipient, type LiveNotificationRecipientPatch, type LiveReplayCompletePayload, type LiveSubscribePayload, type LiveUnsubscribePayload, Location, LocationAttribute, LocationGranularity, MEMORY_LIST_VIEW, MEMORY_OBJECT, MEMORY_VIEW, type MailboxAccount, type MailboxCursor, type MailboxEmail, type MailboxListResponse, type MailboxQuery, type MailboxReadState, type MailboxThread, type MailboxThreadDetail, MigrationDefinition, ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NOTIFICATION_INBOX_STATES, NOTIFICATION_KINDS, NOTIFICATION_PRIORITIES, NOTIFICATION_SENSITIVITIES, NOTIFICATION_TYPES_V1, NOTIFICATION_TYPE_AGENT_QUESTION_REQUESTED, NOTIFICATION_TYPE_AGENT_SESSION_COMPLETED, NOTIFICATION_TYPE_AGENT_SESSION_FAILED, NOTIFICATION_TYPE_AGENT_SESSION_TIMEOUT, NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN, NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED, NOTIFICATION_WORK_STATES, NoopGeocodingAdapter, type Notification, type NotificationCountPatchLiveEvent, type NotificationCounts, type NotificationCreatedLiveEvent, type NotificationInboxState, type NotificationKind, type NotificationListParams, type NotificationListResult, type NotificationPriority, type NotificationRecipient, type NotificationRecipientPatchLiveEvent, type NotificationSensitivity, type NotificationSubject, type NotificationType, type NotificationV1Type, type NotificationWithRecipient, type NotificationWorkState, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, type ObjectConfig, ObjectDefinition, ObjectRecord, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type ParsedPersistedSchemaPlan, type ParsedSchemaPlanProposal, PermissionScope, type PersistedDefaultViewTarget, type PersistedSchemaPlan, type PersistedSchemaPlanAdditive, Phone, PhoneAttribute, type PlannedAttribute, type PlannedAttributeRemoval, type PlannedObject, type PlannedObjectRemoval, type PlannedRename, PropertySchema, type ProposedDefaultViewTarget, ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentAttributeBuilder, type QualifiedDocumentBrand, RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY, REMOVED_OPERATOR_REPLACEMENTS, type RecordCreatedLiveEvent, type RecordDeletedLiveEvent, type RecordFieldPatch, type RecordLiveSnapshot, type RecordMetadata, type RecordPatchLiveEvent, type RecordRemovedLiveEvent, type Reflex, type ReflexRun, type ReflexState, type ReflexVersion, type ReflexVersionStatus, type RegexGenerationInput, RelationAttribute, RelationGroup, RelationGroupBuilder, RelationTarget, RelativeDateValue, type ResolutionContext, type ResolvedFlag, ResourceVisibility, type ReverseGeocodingParams, RichtextAttribute, RichtextTabConfig, RollupAttribute, RollupFunction, type RunEffect, type RunMode, SCHEMA_PLAN_LIMITS, SKILL_LIST_VIEW, SKILL_OBJECT, SKILL_VIEW, STANDARD_SCHEMA_VENDOR, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FILTER_ATTRIBUTE_TYPES, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SchemaDriftResult, type SchemaPlan, type SchemaPlanAdditive, type SchemaPlanAdditiveBase, type SchemaPlanChangeSet, type SchemaPlanDestructive, type SchemaPlanDraft, type SchemaPlanDraftResponse, type SchemaPlanDraftState, type SchemaPlanDraftStatus, type SchemaPlanDraftWrite, type SchemaPlanImpact, type SchemaPlanImpactEntry, type SchemaPlanOutcome, type SchemaPlanProposalInput, type SchemaPlanSampleData, type SchemaPlanStatus, type SchemaPlanViewChanges, type SchemaState, type SearchOptions, SelectAttribute, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, SortRule, type StandardSchemaIssue, type StandardSchemaResult, type StartConnectorAuthInput, type StartConnectorAuthResult, type StaticFlagDefault, StatusAttribute, type StoredSchemaPlan, type SystemAttribute, type SystemAttributeI18nKey, type SystemFields, type SystemObjectDriftInfo, SystemResource, TEXT_FORMAT_PATTERNS, TODAY_DEFAULT, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, type TenantSettings, TextAttribute, TimeFormat, Timestamps, TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateUserProfile, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserLike, type UserProfile, UserReferenceType, type UserStatus, Uuid, ValidationError, type ValueRef, type ViewBaselineOrigin, type ViewChange, ViewConfig, type ViewConfigDelta, ViewDefinition, type ViewProjectionStaleLiveEvent, type ViewStateEntry, type ViewStateResolution, type ViewSyncPayload, ViewType, type WithCustomAttributes$1 as WithCustomAttributes, type WithoutSystemFields, agent, applyPipes, applyRelationProps, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, canonicalStringify, checkbox, collectQualifiedRuleIssues, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, computeByteMagnitude, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, currentActor, date, dateInTimezone, dateValueStart, destructiveSchema, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, evaluateRecordFilterState, extractAttributeNames, extractCurrencyFilterValue, extractFilterValue, extractValueRefs, flagRegistry, form, formRegistry, formatAttributeValue, formatByteSize, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRecordCreatorPrincipalId, getSlotFieldTargets, getSystemAttributeI18nKey, getSystemAttributeList, getUserDisplayName, group, hasDestructiveEntries, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isCheckboxEquality, isComputedFunctionName, isDateRangeValue, isDefaultRole, isDocumentAttribute, isDynamicValue, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isManagedSystemAttribute, isNotEmpty, isPlainRecord, isRelativeDateValue, isStandardSchema, jsonFlag, listView, liveChannelKey, location, matchesAccepts, multiselect, normalizeDateValue, normalizeFilterRule, normalizeForEdgeRpc, normalizeOperator, now, number, numberFlag, object, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, persistedDefaultViewTargetSchema, persistedSchemaPlanSchema, phone, plannedAttributeSchema, plannedInlineAttributeSchema, plannedObjectSchema, proposedDefaultViewTargetSchema, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, resolveAttributeDefaultValue, resolveIsWithinBounds, resolveTextPattern, richtext, rollup, rollupToFormulaExpression, schemaPlanSchema, select, status, stringFlag, text, toMultiValueOperator, toUndefinedIfEmpty, toUtcDayString, today, user, validateAttributeName, validateLabelExpression, validateObjectName, validateQualifiedRule, viewRegistry, viewStateKey, viewSyncPayload };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkFRCDMQER_js = require('./chunk-FRCDMQER.js');
4
- var chunk6ZDH3EJA_js = require('./chunk-6ZDH3EJA.js');
4
+ var chunk63WWFZFY_js = require('./chunk-63WWFZFY.js');
5
5
  var chunkQN2N3IJZ_js = require('./chunk-QN2N3IJZ.js');
6
6
  var chunkV6Q7HCA7_js = require('./chunk-V6Q7HCA7.js');
7
7
  require('./chunk-EW5XR2X3.js');
@@ -81,7 +81,7 @@ function inferInverseCardinality(cardinality) {
81
81
  return cardinality === "one" ? "many" : "many";
82
82
  }
83
83
  function isAttributeSortable2(attr) {
84
- return chunk6ZDH3EJA_js.isAttributeSortable(attr);
84
+ return chunk63WWFZFY_js.isAttributeSortable(attr);
85
85
  }
86
86
 
87
87
  // src/types/audit.ts
@@ -941,10 +941,10 @@ function validateAttributeName(name) {
941
941
  "[AttributeBuilder] Invalid attribute name format.\nName must be a valid variable identifier:\n \u2705 Valid: 'firstName', 'first_name', 'FirstName', 'FIRST_NAME'\n \u274C Invalid: 'first-name', 'first name', '123name', 'first.name'"
942
942
  );
943
943
  }
944
- if (chunk6ZDH3EJA_js.RESERVED_ATTRIBUTE_NAMES.includes(name)) {
944
+ if (chunk63WWFZFY_js.RESERVED_ATTRIBUTE_NAMES.includes(name)) {
945
945
  throw new Error(
946
946
  `[AttributeBuilder] "${name}" is a reserved name and cannot be used as an attribute name.
947
- Reserved names: ${chunk6ZDH3EJA_js.RESERVED_ATTRIBUTE_NAMES.join(", ")}`
947
+ Reserved names: ${chunk63WWFZFY_js.RESERVED_ATTRIBUTE_NAMES.join(", ")}`
948
948
  );
949
949
  }
950
950
  }
@@ -4684,7 +4684,7 @@ var viewRegistry = new ViewRegistry();
4684
4684
  // src/views/auto-generator.ts
4685
4685
  function getRuntimeAttributes(attributes, excludeNames = []) {
4686
4686
  return attributes.filter(
4687
- (attr) => !(!chunk6ZDH3EJA_js.getAttributeCapabilities(attr).lifecycle.visibleInRuntime || attr.system || excludeNames.includes(attr.name))
4687
+ (attr) => !(!chunk63WWFZFY_js.getAttributeCapabilities(attr).lifecycle.visibleInRuntime || attr.system || excludeNames.includes(attr.name))
4688
4688
  );
4689
4689
  }
4690
4690
  function sortAttributes(attributes) {
@@ -4717,7 +4717,7 @@ function generateDefaultDetailView(object2, options = {}) {
4717
4717
  const { includeActivityTab = true, includeDocumentsTab = true, excludeAttributes = [] } = options;
4718
4718
  const runtimeAttrs = getRuntimeAttributes(object2.attributes, excludeAttributes);
4719
4719
  const sortedAttrs = sortAttributes(
4720
- runtimeAttrs.filter((attr) => chunk6ZDH3EJA_js.getAttributeCapabilities(attr).presentation.formField)
4720
+ runtimeAttrs.filter((attr) => chunk63WWFZFY_js.getAttributeCapabilities(attr).presentation.formField)
4721
4721
  );
4722
4722
  const formTab = {
4723
4723
  id: "form",
@@ -4774,7 +4774,7 @@ function generateDefaultListView(object2, options = {}) {
4774
4774
  const { excludeAttributes = [], maxListColumns = 5 } = options;
4775
4775
  const runtimeAttrs = getRuntimeAttributes(object2.attributes, excludeAttributes);
4776
4776
  const sortedAttrs = sortAttributes(
4777
- runtimeAttrs.filter((attr) => chunk6ZDH3EJA_js.getAttributeCapabilities(attr).presentation.defaultColumn)
4777
+ runtimeAttrs.filter((attr) => chunk63WWFZFY_js.getAttributeCapabilities(attr).presentation.defaultColumn)
4778
4778
  );
4779
4779
  const columns = sortedAttrs.slice(0, maxListColumns).map((attr) => attr.name);
4780
4780
  const config = {
@@ -6658,7 +6658,7 @@ var OPERATOR_SPECS = {
6658
6658
  appliesTo: ["date"],
6659
6659
  evaluateInMemory: (v, rv) => {
6660
6660
  const d = toDate2(v);
6661
- const bounds = chunk6ZDH3EJA_js.resolveIsWithinBounds(rv);
6661
+ const bounds = chunk63WWFZFY_js.resolveIsWithinBounds(rv);
6662
6662
  if (!(d && bounds)) return false;
6663
6663
  return d.getTime() >= bounds.startMs && d.getTime() < bounds.endMs;
6664
6664
  }
@@ -6738,7 +6738,7 @@ function toMultiValueOperator(op) {
6738
6738
  // src/filters/evaluate.ts
6739
6739
  var systemAttribute = (name, type) => ({ id: `system:${name}`, name, label: name, type, system: true });
6740
6740
  var RECORD_SYSTEM_ATTRIBUTES = [
6741
- ...Object.entries(chunk6ZDH3EJA_js.SYSTEM_FILTER_ATTRIBUTE_TYPES).map(
6741
+ ...Object.entries(chunk63WWFZFY_js.SYSTEM_FILTER_ATTRIBUTE_TYPES).map(
6742
6742
  ([name, type]) => systemAttribute(name, type)
6743
6743
  )
6744
6744
  ];
@@ -6898,6 +6898,23 @@ function canonicalStringify(value) {
6898
6898
  return encode(value) ?? "null";
6899
6899
  }
6900
6900
 
6901
+ // src/utils/attribute-defaults.ts
6902
+ var TODAY_DEFAULT = "today";
6903
+ function dateInTimezone(date2, timezone) {
6904
+ return new Intl.DateTimeFormat("en-CA", {
6905
+ timeZone: timezone,
6906
+ year: "numeric",
6907
+ month: "2-digit",
6908
+ day: "2-digit"
6909
+ }).format(date2);
6910
+ }
6911
+ function resolveAttributeDefaultValue(attribute, ctx) {
6912
+ if (!("defaultValue" in attribute)) return void 0;
6913
+ const { defaultValue } = attribute;
6914
+ if (attribute.type !== "date" || defaultValue !== TODAY_DEFAULT) return defaultValue;
6915
+ return attribute.includeTime ? ctx.now.toISOString() : dateInTimezone(ctx.now, ctx.timezone);
6916
+ }
6917
+
6901
6918
  // src/utils/view-sync-payload.ts
6902
6919
  function viewSyncPayload(view) {
6903
6920
  return {
@@ -6953,10 +6970,10 @@ var attributeNameSchema = z2.z.string().min(1).superRefine((name, ctx) => {
6953
6970
  'The attribute\'s machine name \u2014 the record\'s field key, and what `{{ name }}` refers to in a labelExpression. Must be a valid identifier: starts with a letter or underscore, then only letters/digits/underscores ("montantHt", "first_name", "FIRST_NAME" are valid; "first-name", "first name", "123name" are not). Max 63 characters. Cannot be a name reserved by the record shape itself (id, createdAt, updatedAt, createdBy, lastUpdatedBy, objectId, label, embeddingText, values, metadata, deletedAt, deletedBy, schemaVersion).'
6954
6971
  );
6955
6972
  var objectNameSchema = z2.z.string().min(1).superRefine((name, ctx) => {
6956
- if (chunk6ZDH3EJA_js.RESERVED_OBJECT_NAMES.includes(name)) {
6973
+ if (chunk63WWFZFY_js.RESERVED_OBJECT_NAMES.includes(name)) {
6957
6974
  ctx.addIssue({
6958
6975
  code: z2.z.ZodIssueCode.custom,
6959
- message: `"${name}" is a reserved object name (${chunk6ZDH3EJA_js.RESERVED_OBJECT_NAMES.join(", ")}) and cannot be used for a new object.`
6976
+ message: `"${name}" is a reserved object name (${chunk63WWFZFY_js.RESERVED_OBJECT_NAMES.join(", ")}) and cannot be used for a new object.`
6960
6977
  });
6961
6978
  }
6962
6979
  try {
@@ -7091,13 +7108,13 @@ var proposedDefaultViewTargetSchema = z2.z.discriminatedUnion("viewType", [
7091
7108
  z2.z.object({
7092
7109
  objectName: viewTargetObjectNameSchema,
7093
7110
  viewType: z2.z.literal("list").describe("Targets the object's default list view (the grid)."),
7094
- canonicalConfig: chunk6ZDH3EJA_js.listViewConfigSchema.describe(CANONICAL_CONFIG_DESCRIPTION),
7111
+ canonicalConfig: chunk63WWFZFY_js.listViewConfigSchema.describe(CANONICAL_CONFIG_DESCRIPTION),
7095
7112
  baselineToken: z2.z.string().min(1).optional().describe(BASELINE_TOKEN_DESCRIPTION)
7096
7113
  }).strict(),
7097
7114
  z2.z.object({
7098
7115
  objectName: viewTargetObjectNameSchema,
7099
7116
  viewType: z2.z.literal("detail").describe("Targets the object's default detail view (the single-record view)."),
7100
- canonicalConfig: chunk6ZDH3EJA_js.detailViewConfigSchema.describe(CANONICAL_CONFIG_DESCRIPTION),
7117
+ canonicalConfig: chunk63WWFZFY_js.detailViewConfigSchema.describe(CANONICAL_CONFIG_DESCRIPTION),
7101
7118
  baselineToken: z2.z.string().min(1).optional().describe(BASELINE_TOKEN_DESCRIPTION)
7102
7119
  }).strict()
7103
7120
  ]);
@@ -7111,13 +7128,13 @@ var persistedDefaultViewTargetSchema = z2.z.discriminatedUnion("viewType", [
7111
7128
  z2.z.object({
7112
7129
  objectName: z2.z.string().min(1),
7113
7130
  viewType: z2.z.literal("list"),
7114
- canonicalConfig: chunk6ZDH3EJA_js.listViewConfigSchema,
7131
+ canonicalConfig: chunk63WWFZFY_js.listViewConfigSchema,
7115
7132
  ...persistedBaselineFields
7116
7133
  }).strict(),
7117
7134
  z2.z.object({
7118
7135
  objectName: z2.z.string().min(1),
7119
7136
  viewType: z2.z.literal("detail"),
7120
- canonicalConfig: chunk6ZDH3EJA_js.detailViewConfigSchema,
7137
+ canonicalConfig: chunk63WWFZFY_js.detailViewConfigSchema,
7121
7138
  ...persistedBaselineFields
7122
7139
  }).strict()
7123
7140
  ]).superRefine((target, ctx) => {
@@ -7346,183 +7363,183 @@ Object.defineProperty(exports, "indexBy", {
7346
7363
  });
7347
7364
  Object.defineProperty(exports, "ATTRIBUTE_FILTER_OPERATORS", {
7348
7365
  enumerable: true,
7349
- get: function () { return chunk6ZDH3EJA_js.ATTRIBUTE_FILTER_OPERATORS; }
7366
+ get: function () { return chunk63WWFZFY_js.ATTRIBUTE_FILTER_OPERATORS; }
7350
7367
  });
7351
7368
  Object.defineProperty(exports, "LIST_VIEW_TAB_VISIBILITIES", {
7352
7369
  enumerable: true,
7353
- get: function () { return chunk6ZDH3EJA_js.LIST_VIEW_TAB_VISIBILITIES; }
7370
+ get: function () { return chunk63WWFZFY_js.LIST_VIEW_TAB_VISIBILITIES; }
7354
7371
  });
7355
7372
  Object.defineProperty(exports, "NO_VALUE_OPERATORS", {
7356
7373
  enumerable: true,
7357
- get: function () { return chunk6ZDH3EJA_js.NO_VALUE_OPERATORS; }
7374
+ get: function () { return chunk63WWFZFY_js.NO_VALUE_OPERATORS; }
7358
7375
  });
7359
7376
  Object.defineProperty(exports, "OPERATORS_BY_TYPE", {
7360
7377
  enumerable: true,
7361
- get: function () { return chunk6ZDH3EJA_js.OPERATORS_BY_TYPE; }
7378
+ get: function () { return chunk63WWFZFY_js.OPERATORS_BY_TYPE; }
7362
7379
  });
7363
7380
  Object.defineProperty(exports, "REMOVED_OPERATOR_REPLACEMENTS", {
7364
7381
  enumerable: true,
7365
- get: function () { return chunk6ZDH3EJA_js.REMOVED_OPERATOR_REPLACEMENTS; }
7382
+ get: function () { return chunk63WWFZFY_js.REMOVED_OPERATOR_REPLACEMENTS; }
7366
7383
  });
7367
7384
  Object.defineProperty(exports, "RESERVED_ATTRIBUTE_NAMES", {
7368
7385
  enumerable: true,
7369
- get: function () { return chunk6ZDH3EJA_js.RESERVED_ATTRIBUTE_NAMES; }
7386
+ get: function () { return chunk63WWFZFY_js.RESERVED_ATTRIBUTE_NAMES; }
7370
7387
  });
7371
7388
  Object.defineProperty(exports, "RESERVED_OBJECT_NAMES", {
7372
7389
  enumerable: true,
7373
- get: function () { return chunk6ZDH3EJA_js.RESERVED_OBJECT_NAMES; }
7390
+ get: function () { return chunk63WWFZFY_js.RESERVED_OBJECT_NAMES; }
7374
7391
  });
7375
7392
  Object.defineProperty(exports, "RESOURCE_VISIBILITIES", {
7376
7393
  enumerable: true,
7377
- get: function () { return chunk6ZDH3EJA_js.RESOURCE_VISIBILITIES; }
7394
+ get: function () { return chunk63WWFZFY_js.RESOURCE_VISIBILITIES; }
7378
7395
  });
7379
7396
  Object.defineProperty(exports, "SYNONYM_ALIASES", {
7380
7397
  enumerable: true,
7381
- get: function () { return chunk6ZDH3EJA_js.SYNONYM_ALIASES; }
7398
+ get: function () { return chunk63WWFZFY_js.SYNONYM_ALIASES; }
7382
7399
  });
7383
7400
  Object.defineProperty(exports, "SYSTEM_ATTRIBUTES", {
7384
7401
  enumerable: true,
7385
- get: function () { return chunk6ZDH3EJA_js.SYSTEM_ATTRIBUTES; }
7402
+ get: function () { return chunk63WWFZFY_js.SYSTEM_ATTRIBUTES; }
7386
7403
  });
7387
7404
  Object.defineProperty(exports, "SYSTEM_ATTRIBUTE_I18N_KEYS", {
7388
7405
  enumerable: true,
7389
- get: function () { return chunk6ZDH3EJA_js.SYSTEM_ATTRIBUTE_I18N_KEYS; }
7406
+ get: function () { return chunk63WWFZFY_js.SYSTEM_ATTRIBUTE_I18N_KEYS; }
7390
7407
  });
7391
7408
  Object.defineProperty(exports, "SYSTEM_FIELD_NAMES", {
7392
7409
  enumerable: true,
7393
- get: function () { return chunk6ZDH3EJA_js.SYSTEM_FIELD_NAMES; }
7410
+ get: function () { return chunk63WWFZFY_js.SYSTEM_FIELD_NAMES; }
7394
7411
  });
7395
7412
  Object.defineProperty(exports, "SYSTEM_FILTER_ATTRIBUTE_TYPES", {
7396
7413
  enumerable: true,
7397
- get: function () { return chunk6ZDH3EJA_js.SYSTEM_FILTER_ATTRIBUTE_TYPES; }
7414
+ get: function () { return chunk63WWFZFY_js.SYSTEM_FILTER_ATTRIBUTE_TYPES; }
7398
7415
  });
7399
7416
  Object.defineProperty(exports, "collectQualifiedRuleIssues", {
7400
7417
  enumerable: true,
7401
- get: function () { return chunk6ZDH3EJA_js.collectQualifiedRuleIssues; }
7418
+ get: function () { return chunk63WWFZFY_js.collectQualifiedRuleIssues; }
7402
7419
  });
7403
7420
  Object.defineProperty(exports, "currentActor", {
7404
7421
  enumerable: true,
7405
- get: function () { return chunk6ZDH3EJA_js.currentActor; }
7422
+ get: function () { return chunk63WWFZFY_js.currentActor; }
7406
7423
  });
7407
7424
  Object.defineProperty(exports, "detailTabSchema", {
7408
7425
  enumerable: true,
7409
- get: function () { return chunk6ZDH3EJA_js.detailTabSchema; }
7426
+ get: function () { return chunk63WWFZFY_js.detailTabSchema; }
7410
7427
  });
7411
7428
  Object.defineProperty(exports, "detailViewConfigSchema", {
7412
7429
  enumerable: true,
7413
- get: function () { return chunk6ZDH3EJA_js.detailViewConfigSchema; }
7430
+ get: function () { return chunk63WWFZFY_js.detailViewConfigSchema; }
7414
7431
  });
7415
7432
  Object.defineProperty(exports, "getAttributeCapabilities", {
7416
7433
  enumerable: true,
7417
- get: function () { return chunk6ZDH3EJA_js.getAttributeCapabilities; }
7434
+ get: function () { return chunk63WWFZFY_js.getAttributeCapabilities; }
7418
7435
  });
7419
7436
  Object.defineProperty(exports, "getAttributeFilterOperators", {
7420
7437
  enumerable: true,
7421
- get: function () { return chunk6ZDH3EJA_js.getAttributeFilterOperators; }
7438
+ get: function () { return chunk63WWFZFY_js.getAttributeFilterOperators; }
7422
7439
  });
7423
7440
  Object.defineProperty(exports, "getRollupFilterOperators", {
7424
7441
  enumerable: true,
7425
- get: function () { return chunk6ZDH3EJA_js.getRollupFilterOperators; }
7442
+ get: function () { return chunk63WWFZFY_js.getRollupFilterOperators; }
7426
7443
  });
7427
7444
  Object.defineProperty(exports, "getSystemAttributeI18nKey", {
7428
7445
  enumerable: true,
7429
- get: function () { return chunk6ZDH3EJA_js.getSystemAttributeI18nKey; }
7446
+ get: function () { return chunk63WWFZFY_js.getSystemAttributeI18nKey; }
7430
7447
  });
7431
7448
  Object.defineProperty(exports, "getSystemAttributeList", {
7432
7449
  enumerable: true,
7433
- get: function () { return chunk6ZDH3EJA_js.getSystemAttributeList; }
7450
+ get: function () { return chunk63WWFZFY_js.getSystemAttributeList; }
7434
7451
  });
7435
7452
  Object.defineProperty(exports, "inverseSourceSchema", {
7436
7453
  enumerable: true,
7437
- get: function () { return chunk6ZDH3EJA_js.inverseSourceSchema; }
7454
+ get: function () { return chunk63WWFZFY_js.inverseSourceSchema; }
7438
7455
  });
7439
7456
  Object.defineProperty(exports, "isAttributeFilterable", {
7440
7457
  enumerable: true,
7441
- get: function () { return chunk6ZDH3EJA_js.isAttributeFilterable; }
7458
+ get: function () { return chunk63WWFZFY_js.isAttributeFilterable; }
7442
7459
  });
7443
7460
  Object.defineProperty(exports, "isAttributeGroupable", {
7444
7461
  enumerable: true,
7445
- get: function () { return chunk6ZDH3EJA_js.isAttributeGroupable; }
7462
+ get: function () { return chunk63WWFZFY_js.isAttributeGroupable; }
7446
7463
  });
7447
7464
  Object.defineProperty(exports, "isAttributeKanbanGroupable", {
7448
7465
  enumerable: true,
7449
- get: function () { return chunk6ZDH3EJA_js.isAttributeKanbanGroupable; }
7466
+ get: function () { return chunk63WWFZFY_js.isAttributeKanbanGroupable; }
7450
7467
  });
7451
7468
  Object.defineProperty(exports, "isAttributeSearchable", {
7452
7469
  enumerable: true,
7453
- get: function () { return chunk6ZDH3EJA_js.isAttributeSearchable; }
7470
+ get: function () { return chunk63WWFZFY_js.isAttributeSearchable; }
7454
7471
  });
7455
7472
  Object.defineProperty(exports, "isDynamicValue", {
7456
7473
  enumerable: true,
7457
- get: function () { return chunk6ZDH3EJA_js.isDynamicValue; }
7474
+ get: function () { return chunk63WWFZFY_js.isDynamicValue; }
7458
7475
  });
7459
7476
  Object.defineProperty(exports, "isManagedSystemAttribute", {
7460
7477
  enumerable: true,
7461
- get: function () { return chunk6ZDH3EJA_js.isManagedSystemAttribute; }
7478
+ get: function () { return chunk63WWFZFY_js.isManagedSystemAttribute; }
7462
7479
  });
7463
7480
  Object.defineProperty(exports, "isNoValueOperator", {
7464
7481
  enumerable: true,
7465
- get: function () { return chunk6ZDH3EJA_js.isNoValueOperator; }
7482
+ get: function () { return chunk63WWFZFY_js.isNoValueOperator; }
7466
7483
  });
7467
7484
  Object.defineProperty(exports, "isRelativeDateValue", {
7468
7485
  enumerable: true,
7469
- get: function () { return chunk6ZDH3EJA_js.isRelativeDateValue; }
7486
+ get: function () { return chunk63WWFZFY_js.isRelativeDateValue; }
7470
7487
  });
7471
7488
  Object.defineProperty(exports, "listViewConfigSchema", {
7472
7489
  enumerable: true,
7473
- get: function () { return chunk6ZDH3EJA_js.listViewConfigSchema; }
7490
+ get: function () { return chunk63WWFZFY_js.listViewConfigSchema; }
7474
7491
  });
7475
7492
  Object.defineProperty(exports, "listViewTabSchema", {
7476
7493
  enumerable: true,
7477
- get: function () { return chunk6ZDH3EJA_js.listViewTabSchema; }
7494
+ get: function () { return chunk63WWFZFY_js.listViewTabSchema; }
7478
7495
  });
7479
7496
  Object.defineProperty(exports, "normalizeFilterRule", {
7480
7497
  enumerable: true,
7481
- get: function () { return chunk6ZDH3EJA_js.normalizeFilterRule; }
7498
+ get: function () { return chunk63WWFZFY_js.normalizeFilterRule; }
7482
7499
  });
7483
7500
  Object.defineProperty(exports, "normalizeOperator", {
7484
7501
  enumerable: true,
7485
- get: function () { return chunk6ZDH3EJA_js.normalizeOperator; }
7502
+ get: function () { return chunk63WWFZFY_js.normalizeOperator; }
7486
7503
  });
7487
7504
  Object.defineProperty(exports, "now", {
7488
7505
  enumerable: true,
7489
- get: function () { return chunk6ZDH3EJA_js.now; }
7506
+ get: function () { return chunk63WWFZFY_js.now; }
7490
7507
  });
7491
7508
  Object.defineProperty(exports, "parseViewConfig", {
7492
7509
  enumerable: true,
7493
- get: function () { return chunk6ZDH3EJA_js.parseViewConfig; }
7510
+ get: function () { return chunk63WWFZFY_js.parseViewConfig; }
7494
7511
  });
7495
7512
  Object.defineProperty(exports, "relationSourceSchema", {
7496
7513
  enumerable: true,
7497
- get: function () { return chunk6ZDH3EJA_js.relationSourceSchema; }
7514
+ get: function () { return chunk63WWFZFY_js.relationSourceSchema; }
7498
7515
  });
7499
7516
  Object.defineProperty(exports, "resolveIsWithinBounds", {
7500
7517
  enumerable: true,
7501
- get: function () { return chunk6ZDH3EJA_js.resolveIsWithinBounds; }
7518
+ get: function () { return chunk63WWFZFY_js.resolveIsWithinBounds; }
7502
7519
  });
7503
7520
  Object.defineProperty(exports, "tableSourceSchema", {
7504
7521
  enumerable: true,
7505
- get: function () { return chunk6ZDH3EJA_js.tableSourceSchema; }
7522
+ get: function () { return chunk63WWFZFY_js.tableSourceSchema; }
7506
7523
  });
7507
7524
  Object.defineProperty(exports, "toUtcDayString", {
7508
7525
  enumerable: true,
7509
- get: function () { return chunk6ZDH3EJA_js.toUtcDayString; }
7526
+ get: function () { return chunk63WWFZFY_js.toUtcDayString; }
7510
7527
  });
7511
7528
  Object.defineProperty(exports, "today", {
7512
7529
  enumerable: true,
7513
- get: function () { return chunk6ZDH3EJA_js.today; }
7530
+ get: function () { return chunk63WWFZFY_js.today; }
7514
7531
  });
7515
7532
  Object.defineProperty(exports, "validateQualifiedRule", {
7516
7533
  enumerable: true,
7517
- get: function () { return chunk6ZDH3EJA_js.validateQualifiedRule; }
7534
+ get: function () { return chunk63WWFZFY_js.validateQualifiedRule; }
7518
7535
  });
7519
7536
  Object.defineProperty(exports, "viewConfigByTypeSchema", {
7520
7537
  enumerable: true,
7521
- get: function () { return chunk6ZDH3EJA_js.viewConfigByTypeSchema; }
7538
+ get: function () { return chunk63WWFZFY_js.viewConfigByTypeSchema; }
7522
7539
  });
7523
7540
  Object.defineProperty(exports, "viewTypeSchema", {
7524
7541
  enumerable: true,
7525
- get: function () { return chunk6ZDH3EJA_js.viewTypeSchema; }
7542
+ get: function () { return chunk63WWFZFY_js.viewTypeSchema; }
7526
7543
  });
7527
7544
  Object.defineProperty(exports, "ComputedFormulaParseError", {
7528
7545
  enumerable: true,
@@ -7859,6 +7876,7 @@ exports.SKILL_VIEW = SKILL_VIEW;
7859
7876
  exports.STANDARD_SCHEMA_VENDOR = STANDARD_SCHEMA_VENDOR;
7860
7877
  exports.SYSTEM_RESOURCES = SYSTEM_RESOURCES;
7861
7878
  exports.SYSTEM_RESOURCE_LABELS = SYSTEM_RESOURCE_LABELS;
7879
+ exports.TODAY_DEFAULT = TODAY_DEFAULT;
7862
7880
  exports.TODO_PLAN_STATUSES = TODO_PLAN_STATUSES;
7863
7881
  exports.TODO_STATUSES = TODO_STATUSES;
7864
7882
  exports.TabBuilder = TabBuilder;
@@ -7886,6 +7904,7 @@ exports.createFlagService = createFlagService;
7886
7904
  exports.createStandardSchemaProps = createStandardSchemaProps;
7887
7905
  exports.currency = currency;
7888
7906
  exports.date = date;
7907
+ exports.dateInTimezone = dateInTimezone;
7889
7908
  exports.dateValueStart = dateValueStart;
7890
7909
  exports.destructiveSchema = destructiveSchema;
7891
7910
  exports.detailView = detailView;
@@ -7981,6 +8000,7 @@ exports.relation = relation;
7981
8000
  exports.relationGroup = relationGroup;
7982
8001
  exports.renderLabelExpression = renderLabelExpression;
7983
8002
  exports.resetViewToDefault = resetViewToDefault;
8003
+ exports.resolveAttributeDefaultValue = resolveAttributeDefaultValue;
7984
8004
  exports.resolvePropertyDefinitions = resolvePropertyDefinitions;
7985
8005
  exports.richtext = richtext;
7986
8006
  exports.rollup = rollup;
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { generateId } from './chunk-QY6QFRRV.mjs';
2
2
  export { asTenantId, asUserId, deepEqual, generateId, indexBy } from './chunk-QY6QFRRV.mjs';
3
- import { SYSTEM_FILTER_ATTRIBUTE_TYPES, RESERVED_OBJECT_NAMES, listViewConfigSchema, detailViewConfigSchema, RESERVED_ATTRIBUTE_NAMES, isAttributeSortable, getAttributeCapabilities, resolveIsWithinBounds } from './chunk-F6ATLCIR.mjs';
4
- export { ATTRIBUTE_FILTER_OPERATORS, LIST_VIEW_TAB_VISIBILITIES, NO_VALUE_OPERATORS, OPERATORS_BY_TYPE, REMOVED_OPERATOR_REPLACEMENTS, RESERVED_ATTRIBUTE_NAMES, RESERVED_OBJECT_NAMES, RESOURCE_VISIBILITIES, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FIELD_NAMES, SYSTEM_FILTER_ATTRIBUTE_TYPES, collectQualifiedRuleIssues, currentActor, detailTabSchema, detailViewConfigSchema, getAttributeCapabilities, getAttributeFilterOperators, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, inverseSourceSchema, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isDynamicValue, isManagedSystemAttribute, isNoValueOperator, isRelativeDateValue, listViewConfigSchema, listViewTabSchema, normalizeFilterRule, normalizeOperator, now, parseViewConfig, relationSourceSchema, resolveIsWithinBounds, tableSourceSchema, toUtcDayString, today, validateQualifiedRule, viewConfigByTypeSchema, viewTypeSchema } from './chunk-F6ATLCIR.mjs';
3
+ import { SYSTEM_FILTER_ATTRIBUTE_TYPES, RESERVED_OBJECT_NAMES, listViewConfigSchema, detailViewConfigSchema, RESERVED_ATTRIBUTE_NAMES, isAttributeSortable, getAttributeCapabilities, resolveIsWithinBounds } from './chunk-ITGE3PBX.mjs';
4
+ export { ATTRIBUTE_FILTER_OPERATORS, LIST_VIEW_TAB_VISIBILITIES, NO_VALUE_OPERATORS, OPERATORS_BY_TYPE, REMOVED_OPERATOR_REPLACEMENTS, RESERVED_ATTRIBUTE_NAMES, RESERVED_OBJECT_NAMES, RESOURCE_VISIBILITIES, SYNONYM_ALIASES, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_FIELD_NAMES, SYSTEM_FILTER_ATTRIBUTE_TYPES, collectQualifiedRuleIssues, currentActor, detailTabSchema, detailViewConfigSchema, getAttributeCapabilities, getAttributeFilterOperators, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, inverseSourceSchema, isAttributeFilterable, isAttributeGroupable, isAttributeKanbanGroupable, isAttributeSearchable, isDynamicValue, isManagedSystemAttribute, isNoValueOperator, isRelativeDateValue, listViewConfigSchema, listViewTabSchema, normalizeFilterRule, normalizeOperator, now, parseViewConfig, relationSourceSchema, resolveIsWithinBounds, tableSourceSchema, toUtcDayString, today, validateQualifiedRule, viewConfigByTypeSchema, viewTypeSchema } from './chunk-ITGE3PBX.mjs';
5
5
  import { iconNameSchema, parseAttributeConfigForCreate, parseComputedFormula } from './chunk-KDHDC7E6.mjs';
6
6
  export { ComputedFormulaParseError, SCHEMA_LIMITS, colorIdSchema, iconNameSchema, multiselectOptionWriteSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, parseComputedFormula, selectOptionWriteSchema, statusGroupSchema, statusOptionWriteSchema } from './chunk-KDHDC7E6.mjs';
7
7
  import { createObjectValidator, createAttributeValidator } from './chunk-QMLO7V5E.mjs';
@@ -6897,6 +6897,23 @@ function canonicalStringify(value) {
6897
6897
  return encode(value) ?? "null";
6898
6898
  }
6899
6899
 
6900
+ // src/utils/attribute-defaults.ts
6901
+ var TODAY_DEFAULT = "today";
6902
+ function dateInTimezone(date2, timezone) {
6903
+ return new Intl.DateTimeFormat("en-CA", {
6904
+ timeZone: timezone,
6905
+ year: "numeric",
6906
+ month: "2-digit",
6907
+ day: "2-digit"
6908
+ }).format(date2);
6909
+ }
6910
+ function resolveAttributeDefaultValue(attribute, ctx) {
6911
+ if (!("defaultValue" in attribute)) return void 0;
6912
+ const { defaultValue } = attribute;
6913
+ if (attribute.type !== "date" || defaultValue !== TODAY_DEFAULT) return defaultValue;
6914
+ return attribute.includeTime ? ctx.now.toISOString() : dateInTimezone(ctx.now, ctx.timezone);
6915
+ }
6916
+
6900
6917
  // src/utils/view-sync-payload.ts
6901
6918
  function viewSyncPayload(view) {
6902
6919
  return {
@@ -7323,4 +7340,4 @@ var persistedSchemaPlanSchema = z.preprocess(
7323
7340
  structuralPersistedSchemaPlanSchema
7324
7341
  );
7325
7342
 
7326
- export { ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, AUDIT_ACTIONS, AUDIT_RESOURCE_TYPES, ActivityTabConfig, AgentBuilder, BEHAVIOR_PROPERTIES, BROWSER_PREVIEW_STATUSES, BYTE_UNIT_LABELS, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, CONNECTOR_CALLBACK_PARAM, ComputedFormulaCompileError, CustomTabConfig, DB_COLUMN_FIELDS, DEFAULT_AGENT_EXECUTION_CONFIG, DEFAULT_APPROVAL_POLICY, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DetailViewBuilder, DocumentsTabConfig, EMPTY_VALUE_PLACEHOLDER, ESTIMATED_COUNT_CAP, EmailsTabConfig, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FlagRegistry, FlagService, FormBuilder, FormRegistry, FormRowBuilder, FormStepBuilder, GroupBuilder, IDENTITY_PROPERTIES, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, ListViewBuilder, ListViewTabConfigBuilder, MAX_PRESET_DEPTH, MAX_TODOS, MAX_TODO_DESCRIPTION_CHARS, MAX_TODO_ID_CHARS, MAX_TODO_RESULT_CHARS, MEMORY_LIST_VIEW, MEMORY_OBJECT, MEMORY_VIEW, NOTIFICATION_INBOX_STATES, NOTIFICATION_KINDS, NOTIFICATION_PRIORITIES, NOTIFICATION_SENSITIVITIES, NOTIFICATION_TYPES_V1, NOTIFICATION_TYPE_AGENT_QUESTION_REQUESTED, NOTIFICATION_TYPE_AGENT_SESSION_COMPLETED, NOTIFICATION_TYPE_AGENT_SESSION_FAILED, NOTIFICATION_TYPE_AGENT_SESSION_TIMEOUT, NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN, NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED, NOTIFICATION_WORK_STATES, NoopGeocodingAdapter, OPERATOR_SPECS, ObjectBuilder, PRESENTATION_PROPERTIES, QUALIFIED_SEPARATOR, RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY, RELATION_TARGET_ANY, RelationGroupBuilder, RichtextTabConfig, SCHEMA_PLAN_LIMITS, SESSION_TERMINAL_STATUSES, SKILL_LIST_VIEW, SKILL_OBJECT, SKILL_VIEW, STANDARD_SCHEMA_VENDOR, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, TODO_PLAN_STATUSES, TODO_STATUSES, TabBuilder, TableTabConfig, USER_STATUSES, accessLevelToActions, actionsToAccessLevel, agent, agentDisplayName, applyPipes, applyRelationProps, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, canonicalStringify, checkbox, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, computeByteMagnitude, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, dateValueStart, destructiveSchema, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, evaluateRecordFilterState, extractAttributeNames, extractCurrencyFilterValue, extractFilterValue, extractValueRefs, flagRegistry, form, formRegistry, formatAttributeValue, formatByteSize, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRecordCreatorPrincipalId, getSlotFieldTargets, getUserDisplayName, group, hasDestructiveEntries, hasOptions, inferInverseCardinality, inferRollupReturnType, isAttributeSortable2 as isAttributeSortable, isBilateralRelation, isCheckboxEquality, isComputedFunctionName, isDateRangeValue, isDefaultRole, isDetailView, isDocumentAttribute, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isNotEmpty, isPlainRecord, isRelationGroup, isStandardSchema, isTerminalSessionStatus, isUniversalRelation, jsonFlag, listView, liveChannelKey, location, matchesAccepts, multiselect, normalizeDateValue, normalizeForEdgeRpc, number, numberFlag, object, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, persistedDefaultViewTargetSchema, persistedSchemaPlanSchema, phone, plannedAttributeSchema, plannedInlineAttributeSchema, plannedObjectSchema, proposedDefaultViewTargetSchema, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, resolvePropertyDefinitions, richtext, rollup, rollupToFormulaExpression, schemaPlanSchema, select, status, stringFlag, text, toMultiValueOperator, toUndefinedIfEmpty, user, validateAttributeName, validateLabelExpression, validateObjectName, viewRegistry, viewStateKey, viewSyncPayload };
7343
+ export { ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, AUDIT_ACTIONS, AUDIT_RESOURCE_TYPES, ActivityTabConfig, AgentBuilder, BEHAVIOR_PROPERTIES, BROWSER_PREVIEW_STATUSES, BYTE_UNIT_LABELS, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, CONNECTOR_CALLBACK_PARAM, ComputedFormulaCompileError, CustomTabConfig, DB_COLUMN_FIELDS, DEFAULT_AGENT_EXECUTION_CONFIG, DEFAULT_APPROVAL_POLICY, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DetailViewBuilder, DocumentsTabConfig, EMPTY_VALUE_PLACEHOLDER, ESTIMATED_COUNT_CAP, EmailsTabConfig, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FlagRegistry, FlagService, FormBuilder, FormRegistry, FormRowBuilder, FormStepBuilder, GroupBuilder, IDENTITY_PROPERTIES, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, ListViewBuilder, ListViewTabConfigBuilder, MAX_PRESET_DEPTH, MAX_TODOS, MAX_TODO_DESCRIPTION_CHARS, MAX_TODO_ID_CHARS, MAX_TODO_RESULT_CHARS, MEMORY_LIST_VIEW, MEMORY_OBJECT, MEMORY_VIEW, NOTIFICATION_INBOX_STATES, NOTIFICATION_KINDS, NOTIFICATION_PRIORITIES, NOTIFICATION_SENSITIVITIES, NOTIFICATION_TYPES_V1, NOTIFICATION_TYPE_AGENT_QUESTION_REQUESTED, NOTIFICATION_TYPE_AGENT_SESSION_COMPLETED, NOTIFICATION_TYPE_AGENT_SESSION_FAILED, NOTIFICATION_TYPE_AGENT_SESSION_TIMEOUT, NOTIFICATION_TYPE_AGENT_SESSION_WAITING_HUMAN, NOTIFICATION_TYPE_AGENT_TASK_ASSIGNED, NOTIFICATION_WORK_STATES, NoopGeocodingAdapter, OPERATOR_SPECS, ObjectBuilder, PRESENTATION_PROPERTIES, QUALIFIED_SEPARATOR, RECORD_CREATOR_ROOT_ACTOR_METADATA_KEY, RELATION_TARGET_ANY, RelationGroupBuilder, RichtextTabConfig, SCHEMA_PLAN_LIMITS, SESSION_TERMINAL_STATUSES, SKILL_LIST_VIEW, SKILL_OBJECT, SKILL_VIEW, STANDARD_SCHEMA_VENDOR, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, TODAY_DEFAULT, TODO_PLAN_STATUSES, TODO_STATUSES, TabBuilder, TableTabConfig, USER_STATUSES, accessLevelToActions, actionsToAccessLevel, agent, agentDisplayName, applyPipes, applyRelationProps, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, canonicalStringify, checkbox, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, computeByteMagnitude, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, dateInTimezone, dateValueStart, destructiveSchema, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, evaluateRecordFilterState, extractAttributeNames, extractCurrencyFilterValue, extractFilterValue, extractValueRefs, flagRegistry, form, formRegistry, formatAttributeValue, formatByteSize, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRecordCreatorPrincipalId, getSlotFieldTargets, getUserDisplayName, group, hasDestructiveEntries, hasOptions, inferInverseCardinality, inferRollupReturnType, isAttributeSortable2 as isAttributeSortable, isBilateralRelation, isCheckboxEquality, isComputedFunctionName, isDateRangeValue, isDefaultRole, isDetailView, isDocumentAttribute, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isNotEmpty, isPlainRecord, isRelationGroup, isStandardSchema, isTerminalSessionStatus, isUniversalRelation, jsonFlag, listView, liveChannelKey, location, matchesAccepts, multiselect, normalizeDateValue, normalizeForEdgeRpc, number, numberFlag, object, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, persistedDefaultViewTargetSchema, persistedSchemaPlanSchema, phone, plannedAttributeSchema, plannedInlineAttributeSchema, plannedObjectSchema, proposedDefaultViewTargetSchema, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, resolveAttributeDefaultValue, resolvePropertyDefinitions, richtext, rollup, rollupToFormulaExpression, schemaPlanSchema, select, status, stringFlag, text, toMultiValueOperator, toUndefinedIfEmpty, user, validateAttributeName, validateLabelExpression, validateObjectName, viewRegistry, viewStateKey, viewSyncPayload };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6ZDH3EJA_js = require('../chunk-6ZDH3EJA.js');
3
+ var chunk63WWFZFY_js = require('../chunk-63WWFZFY.js');
4
4
  var chunkQN2N3IJZ_js = require('../chunk-QN2N3IJZ.js');
5
5
  var chunkV6Q7HCA7_js = require('../chunk-V6Q7HCA7.js');
6
6
  require('../chunk-EW5XR2X3.js');
@@ -23,39 +23,39 @@ var chunkYKWSHBT5_js = require('../chunk-YKWSHBT5.js');
23
23
 
24
24
  Object.defineProperty(exports, "detailTabSchema", {
25
25
  enumerable: true,
26
- get: function () { return chunk6ZDH3EJA_js.detailTabSchema; }
26
+ get: function () { return chunk63WWFZFY_js.detailTabSchema; }
27
27
  });
28
28
  Object.defineProperty(exports, "detailViewConfigSchema", {
29
29
  enumerable: true,
30
- get: function () { return chunk6ZDH3EJA_js.detailViewConfigSchema; }
30
+ get: function () { return chunk63WWFZFY_js.detailViewConfigSchema; }
31
31
  });
32
32
  Object.defineProperty(exports, "inverseSourceSchema", {
33
33
  enumerable: true,
34
- get: function () { return chunk6ZDH3EJA_js.inverseSourceSchema; }
34
+ get: function () { return chunk63WWFZFY_js.inverseSourceSchema; }
35
35
  });
36
36
  Object.defineProperty(exports, "listViewConfigSchema", {
37
37
  enumerable: true,
38
- get: function () { return chunk6ZDH3EJA_js.listViewConfigSchema; }
38
+ get: function () { return chunk63WWFZFY_js.listViewConfigSchema; }
39
39
  });
40
40
  Object.defineProperty(exports, "listViewTabSchema", {
41
41
  enumerable: true,
42
- get: function () { return chunk6ZDH3EJA_js.listViewTabSchema; }
42
+ get: function () { return chunk63WWFZFY_js.listViewTabSchema; }
43
43
  });
44
44
  Object.defineProperty(exports, "parseViewConfig", {
45
45
  enumerable: true,
46
- get: function () { return chunk6ZDH3EJA_js.parseViewConfig; }
46
+ get: function () { return chunk63WWFZFY_js.parseViewConfig; }
47
47
  });
48
48
  Object.defineProperty(exports, "relationSourceSchema", {
49
49
  enumerable: true,
50
- get: function () { return chunk6ZDH3EJA_js.relationSourceSchema; }
50
+ get: function () { return chunk63WWFZFY_js.relationSourceSchema; }
51
51
  });
52
52
  Object.defineProperty(exports, "tableSourceSchema", {
53
53
  enumerable: true,
54
- get: function () { return chunk6ZDH3EJA_js.tableSourceSchema; }
54
+ get: function () { return chunk63WWFZFY_js.tableSourceSchema; }
55
55
  });
56
56
  Object.defineProperty(exports, "viewConfigByTypeSchema", {
57
57
  enumerable: true,
58
- get: function () { return chunk6ZDH3EJA_js.viewConfigByTypeSchema; }
58
+ get: function () { return chunk63WWFZFY_js.viewConfigByTypeSchema; }
59
59
  });
60
60
  Object.defineProperty(exports, "SCHEMA_LIMITS", {
61
61
  enumerable: true,
@@ -1,4 +1,4 @@
1
- export { detailTabSchema, detailViewConfigSchema, inverseSourceSchema, listViewConfigSchema, listViewTabSchema, parseViewConfig, relationSourceSchema, tableSourceSchema, viewConfigByTypeSchema } from '../chunk-F6ATLCIR.mjs';
1
+ export { detailTabSchema, detailViewConfigSchema, inverseSourceSchema, listViewConfigSchema, listViewTabSchema, parseViewConfig, relationSourceSchema, tableSourceSchema, viewConfigByTypeSchema } from '../chunk-ITGE3PBX.mjs';
2
2
  export { SCHEMA_LIMITS, colorIdSchema, iconNameSchema, multiselectOptionWriteSchema, parseAttributeConfig, parseAttributeConfigForCreate, parseAttributeConfigForUpdate, selectOptionWriteSchema, statusGroupSchema, statusOptionWriteSchema } from '../chunk-KDHDC7E6.mjs';
3
3
  export { createFormAttributeValidator, rejectUnknownAttributesOrThrow, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from '../chunk-QMLO7V5E.mjs';
4
4
  import '../chunk-QVLQPW3O.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stndrds/schema",
3
- "version": "1.0.0-alpha.266",
3
+ "version": "1.0.0-alpha.268",
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.266"
123
+ "@stndrds/constants": "1.0.0-alpha.268"
124
124
  },
125
125
  "devDependencies": {
126
126
  "@types/node": "^25.0.3",