@stndrds/schema 1.0.0-alpha.225 → 1.0.0-alpha.227
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-5WYDO3ZB.mjs → chunk-6CTUPVHH.mjs} +11 -1
- package/dist/{chunk-XTPYL6OM.js → chunk-MUGKKCY3.js} +11 -1
- package/dist/index.d.mts +165 -4
- package/dist/index.d.ts +165 -4
- package/dist/index.js +140 -76
- package/dist/index.mjs +75 -12
- package/dist/validation/all.js +8 -8
- package/dist/validation/all.mjs +1 -1
- package/dist/validation/object/index.js +14 -14
- package/dist/validation/object/index.mjs +1 -1
- package/package.json +2 -2
|
@@ -125,6 +125,9 @@ var SchemaErrorCode = {
|
|
|
125
125
|
// Permissions
|
|
126
126
|
FORBIDDEN: "SCHEMA_FORBIDDEN",
|
|
127
127
|
ACCESS_DENIED: "SCHEMA_ACCESS_DENIED",
|
|
128
|
+
// Connectors
|
|
129
|
+
CONNECTOR_AUTH_FAILED: "SCHEMA_CONNECTOR_AUTH_FAILED",
|
|
130
|
+
CONNECTOR_INVALID_STATE: "SCHEMA_CONNECTOR_INVALID_STATE",
|
|
128
131
|
// Sync
|
|
129
132
|
SYNC_FAILED: "SCHEMA_SYNC_FAILED",
|
|
130
133
|
SYNC_CONFLICT: "SCHEMA_SYNC_CONFLICT",
|
|
@@ -205,7 +208,14 @@ var SchemaErrorCode = {
|
|
|
205
208
|
DOCUMENT_NOT_FOUND_FOR_OPERATION: "DOCUMENT_NOT_FOUND_FOR_OPERATION",
|
|
206
209
|
DOCUMENT_STORAGE_FAILED: "DOCUMENT_STORAGE_FAILED",
|
|
207
210
|
DOCUMENT_SIZE_EXCEEDED: "DOCUMENT_SIZE_EXCEEDED",
|
|
208
|
-
DOCUMENT_OCR_FAILED: "DOCUMENT_OCR_FAILED"
|
|
211
|
+
DOCUMENT_OCR_FAILED: "DOCUMENT_OCR_FAILED",
|
|
212
|
+
// Email image proxy — token/fetch failures surfaced through the proxy route
|
|
213
|
+
EMAIL_IMAGE_PROXY_INVALID_TOKEN: "EMAIL_IMAGE_PROXY_INVALID_TOKEN",
|
|
214
|
+
EMAIL_IMAGE_PROXY_EXPIRED_TOKEN: "EMAIL_IMAGE_PROXY_EXPIRED_TOKEN",
|
|
215
|
+
EMAIL_IMAGE_PROXY_TOO_LARGE: "EMAIL_IMAGE_PROXY_TOO_LARGE",
|
|
216
|
+
EMAIL_IMAGE_PROXY_UNSUPPORTED_CONTENT_TYPE: "EMAIL_IMAGE_PROXY_UNSUPPORTED_CONTENT_TYPE",
|
|
217
|
+
EMAIL_IMAGE_PROXY_UNSAFE_URL: "EMAIL_IMAGE_PROXY_UNSAFE_URL",
|
|
218
|
+
EMAIL_IMAGE_PROXY_UPSTREAM_FAILED: "EMAIL_IMAGE_PROXY_UPSTREAM_FAILED"
|
|
209
219
|
};
|
|
210
220
|
var SchemaError = class extends Error {
|
|
211
221
|
constructor(message, code = SchemaErrorCode.UNKNOWN, details) {
|
|
@@ -127,6 +127,9 @@ var SchemaErrorCode = {
|
|
|
127
127
|
// Permissions
|
|
128
128
|
FORBIDDEN: "SCHEMA_FORBIDDEN",
|
|
129
129
|
ACCESS_DENIED: "SCHEMA_ACCESS_DENIED",
|
|
130
|
+
// Connectors
|
|
131
|
+
CONNECTOR_AUTH_FAILED: "SCHEMA_CONNECTOR_AUTH_FAILED",
|
|
132
|
+
CONNECTOR_INVALID_STATE: "SCHEMA_CONNECTOR_INVALID_STATE",
|
|
130
133
|
// Sync
|
|
131
134
|
SYNC_FAILED: "SCHEMA_SYNC_FAILED",
|
|
132
135
|
SYNC_CONFLICT: "SCHEMA_SYNC_CONFLICT",
|
|
@@ -207,7 +210,14 @@ var SchemaErrorCode = {
|
|
|
207
210
|
DOCUMENT_NOT_FOUND_FOR_OPERATION: "DOCUMENT_NOT_FOUND_FOR_OPERATION",
|
|
208
211
|
DOCUMENT_STORAGE_FAILED: "DOCUMENT_STORAGE_FAILED",
|
|
209
212
|
DOCUMENT_SIZE_EXCEEDED: "DOCUMENT_SIZE_EXCEEDED",
|
|
210
|
-
DOCUMENT_OCR_FAILED: "DOCUMENT_OCR_FAILED"
|
|
213
|
+
DOCUMENT_OCR_FAILED: "DOCUMENT_OCR_FAILED",
|
|
214
|
+
// Email image proxy — token/fetch failures surfaced through the proxy route
|
|
215
|
+
EMAIL_IMAGE_PROXY_INVALID_TOKEN: "EMAIL_IMAGE_PROXY_INVALID_TOKEN",
|
|
216
|
+
EMAIL_IMAGE_PROXY_EXPIRED_TOKEN: "EMAIL_IMAGE_PROXY_EXPIRED_TOKEN",
|
|
217
|
+
EMAIL_IMAGE_PROXY_TOO_LARGE: "EMAIL_IMAGE_PROXY_TOO_LARGE",
|
|
218
|
+
EMAIL_IMAGE_PROXY_UNSUPPORTED_CONTENT_TYPE: "EMAIL_IMAGE_PROXY_UNSUPPORTED_CONTENT_TYPE",
|
|
219
|
+
EMAIL_IMAGE_PROXY_UNSAFE_URL: "EMAIL_IMAGE_PROXY_UNSAFE_URL",
|
|
220
|
+
EMAIL_IMAGE_PROXY_UPSTREAM_FAILED: "EMAIL_IMAGE_PROXY_UPSTREAM_FAILED"
|
|
211
221
|
};
|
|
212
222
|
var SchemaError = class extends Error {
|
|
213
223
|
constructor(message, code = SchemaErrorCode.UNKNOWN, details) {
|
package/dist/index.d.mts
CHANGED
|
@@ -381,7 +381,7 @@ interface RelationGroup extends BaseGroup {
|
|
|
381
381
|
* Discriminated union of all group types
|
|
382
382
|
*/
|
|
383
383
|
type Group = FieldGroup | RelationGroup;
|
|
384
|
-
type TabType = "form" | "table" | "custom" | "activity" | "richtext" | "documents" | "forms";
|
|
384
|
+
type TabType = "form" | "table" | "custom" | "activity" | "richtext" | "documents" | "forms" | "emails";
|
|
385
385
|
/**
|
|
386
386
|
* Base properties shared by all tab types
|
|
387
387
|
*/
|
|
@@ -517,10 +517,19 @@ interface FormsTab extends BaseTab {
|
|
|
517
517
|
/** Object name to filter forms by slot (derived from record context, but can be overridden) */
|
|
518
518
|
objectName?: string;
|
|
519
519
|
}
|
|
520
|
+
/**
|
|
521
|
+
* Emails tab - displays emails associated with the record at query time via the
|
|
522
|
+
* values of configured email-bearing text attributes. Config-only: no schema change.
|
|
523
|
+
*/
|
|
524
|
+
interface EmailsTab extends BaseTab {
|
|
525
|
+
type: "emails";
|
|
526
|
+
/** Names of text attributes whose values hold email addresses to match on. */
|
|
527
|
+
emailAttributeIds: string[];
|
|
528
|
+
}
|
|
520
529
|
/**
|
|
521
530
|
* Union of all tab types (for detail views)
|
|
522
531
|
*/
|
|
523
|
-
type Tab = FormTab | TableTab | CustomTab | ActivityTab | RichtextTab | DocumentsTab | FormsTab;
|
|
532
|
+
type Tab = FormTab | TableTab | CustomTab | ActivityTab | RichtextTab | DocumentsTab | FormsTab | EmailsTab;
|
|
524
533
|
/**
|
|
525
534
|
* Detail view layout mode
|
|
526
535
|
* - `page`: Full view with multiple tabs
|
|
@@ -1211,7 +1220,7 @@ type Action = "read" | "create" | "update" | "delete" | "manage" | "observe";
|
|
|
1211
1220
|
* - `workspace`: Tenant settings and workspace-level configuration
|
|
1212
1221
|
* - `architect`: Architect settings, templates, and configurations
|
|
1213
1222
|
*/
|
|
1214
|
-
type SystemResource = "people" | "workspace" | "architect" | "feature-flags" | "files" | "views" | "forms" | "documents" | "audit" | "api-keys" | "env-vars" | "session";
|
|
1223
|
+
type SystemResource = "people" | "workspace" | "architect" | "feature-flags" | "files" | "views" | "forms" | "documents" | "audit" | "api-keys" | "connectors" | "env-vars" | "session";
|
|
1215
1224
|
/**
|
|
1216
1225
|
* Preset access levels for simplified permission configuration.
|
|
1217
1226
|
* - `full`: All CRUD actions
|
|
@@ -2668,6 +2677,8 @@ declare const SchemaErrorCode: {
|
|
|
2668
2677
|
readonly PROTECTED_ROLE: "SCHEMA_PROTECTED_ROLE";
|
|
2669
2678
|
readonly FORBIDDEN: "SCHEMA_FORBIDDEN";
|
|
2670
2679
|
readonly ACCESS_DENIED: "SCHEMA_ACCESS_DENIED";
|
|
2680
|
+
readonly CONNECTOR_AUTH_FAILED: "SCHEMA_CONNECTOR_AUTH_FAILED";
|
|
2681
|
+
readonly CONNECTOR_INVALID_STATE: "SCHEMA_CONNECTOR_INVALID_STATE";
|
|
2671
2682
|
readonly SYNC_FAILED: "SCHEMA_SYNC_FAILED";
|
|
2672
2683
|
readonly SYNC_CONFLICT: "SCHEMA_SYNC_CONFLICT";
|
|
2673
2684
|
readonly SYNC_CASCADE: "SCHEMA_SYNC_CASCADE";
|
|
@@ -2726,6 +2737,12 @@ declare const SchemaErrorCode: {
|
|
|
2726
2737
|
readonly DOCUMENT_STORAGE_FAILED: "DOCUMENT_STORAGE_FAILED";
|
|
2727
2738
|
readonly DOCUMENT_SIZE_EXCEEDED: "DOCUMENT_SIZE_EXCEEDED";
|
|
2728
2739
|
readonly DOCUMENT_OCR_FAILED: "DOCUMENT_OCR_FAILED";
|
|
2740
|
+
readonly EMAIL_IMAGE_PROXY_INVALID_TOKEN: "EMAIL_IMAGE_PROXY_INVALID_TOKEN";
|
|
2741
|
+
readonly EMAIL_IMAGE_PROXY_EXPIRED_TOKEN: "EMAIL_IMAGE_PROXY_EXPIRED_TOKEN";
|
|
2742
|
+
readonly EMAIL_IMAGE_PROXY_TOO_LARGE: "EMAIL_IMAGE_PROXY_TOO_LARGE";
|
|
2743
|
+
readonly EMAIL_IMAGE_PROXY_UNSUPPORTED_CONTENT_TYPE: "EMAIL_IMAGE_PROXY_UNSUPPORTED_CONTENT_TYPE";
|
|
2744
|
+
readonly EMAIL_IMAGE_PROXY_UNSAFE_URL: "EMAIL_IMAGE_PROXY_UNSAFE_URL";
|
|
2745
|
+
readonly EMAIL_IMAGE_PROXY_UPSTREAM_FAILED: "EMAIL_IMAGE_PROXY_UPSTREAM_FAILED";
|
|
2729
2746
|
};
|
|
2730
2747
|
type SchemaErrorCode = (typeof SchemaErrorCode)[keyof typeof SchemaErrorCode];
|
|
2731
2748
|
/**
|
|
@@ -4418,6 +4435,8 @@ declare const SYSTEM_RESOURCES: {
|
|
|
4418
4435
|
readonly AUDIT: "audit";
|
|
4419
4436
|
/** Programmatic access keys */
|
|
4420
4437
|
readonly API_KEYS: "api-keys";
|
|
4438
|
+
/** OAuth connector connections (mailboxes, etc.) */
|
|
4439
|
+
readonly CONNECTORS: "connectors";
|
|
4421
4440
|
/** Environment variables for agents */
|
|
4422
4441
|
readonly ENV_VARS: "env-vars";
|
|
4423
4442
|
/** Agent session visibility — required for an agent actor to read its own sessions */
|
|
@@ -6054,6 +6073,32 @@ declare class ActivityTabConfig {
|
|
|
6054
6073
|
*/
|
|
6055
6074
|
build(): DetailViewDefinition;
|
|
6056
6075
|
}
|
|
6076
|
+
/**
|
|
6077
|
+
* Builder for configuring emails tabs.
|
|
6078
|
+
*
|
|
6079
|
+
* @example
|
|
6080
|
+
* .tab("emails", "Emails").emails().emailAttributes("email", "backup_email")
|
|
6081
|
+
*/
|
|
6082
|
+
declare class EmailsTabConfig {
|
|
6083
|
+
private view;
|
|
6084
|
+
private tabData;
|
|
6085
|
+
/** @internal */
|
|
6086
|
+
constructor(view: DetailViewBuilder, base: BaseTabConfig);
|
|
6087
|
+
/** Set the text attributes whose values are matched against email participants. */
|
|
6088
|
+
emailAttributes(...attributeIds: string[]): this;
|
|
6089
|
+
/**
|
|
6090
|
+
* Continue building with a new tab
|
|
6091
|
+
*/
|
|
6092
|
+
tab(name: string, label: string): TabBuilder;
|
|
6093
|
+
/**
|
|
6094
|
+
* Finish this tab and return to DetailViewBuilder
|
|
6095
|
+
*/
|
|
6096
|
+
done(): DetailViewBuilder;
|
|
6097
|
+
/**
|
|
6098
|
+
* Build the final view definition
|
|
6099
|
+
*/
|
|
6100
|
+
build(): DetailViewDefinition;
|
|
6101
|
+
}
|
|
6057
6102
|
/**
|
|
6058
6103
|
* Builder for configuring documents tabs
|
|
6059
6104
|
*
|
|
@@ -6172,6 +6217,11 @@ declare class TabBuilder {
|
|
|
6172
6217
|
* @example .documents().disableUpload().disableRemove()
|
|
6173
6218
|
*/
|
|
6174
6219
|
documents(): DocumentsTabConfig;
|
|
6220
|
+
/**
|
|
6221
|
+
* Create an emails tab (query-time association via email-bearing attributes)
|
|
6222
|
+
* @example .emails().emailAttributes("email", "backup_email")
|
|
6223
|
+
*/
|
|
6224
|
+
emails(): EmailsTabConfig;
|
|
6175
6225
|
/**
|
|
6176
6226
|
* Create a forms tab to launch and track form instances linked to this record
|
|
6177
6227
|
* @example .tab("forms", "Forms").forms()
|
|
@@ -7877,4 +7927,115 @@ interface DynamicValueResolver<K extends DynamicValue["dynamic"]> {
|
|
|
7877
7927
|
}>, ctx: ResolutionContext): FilterValue | undefined;
|
|
7878
7928
|
}
|
|
7879
7929
|
|
|
7880
|
-
export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, AccessDeniedError, type AccessLevel, type Action, type ActivityTab, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AdvancedFilterState, type AgentConfig, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentMessageAttachment, type AgentMessagePart, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionPatchLiveEvent, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type AgentUnreadPatchLiveEvent, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, type AttributeGroupField, AttributeInUseError, type AttributeLifecycleCapabilities, AttributeNotFoundError, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, AutofillConfig, type AutofillGenerationInput, type AutofillTargetSpec, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, ChangeTypeNotSupportedError, type ChannelRevokedLiveEvent, CheckboxAttribute, type CompactionStrategy, type CompileComputedFormulaInput, CompletionStatus, 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, ConcurrentModificationError, type ConfigOverrides, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, type CreateMode, type CreateNotificationInput, type CreateNotificationRecipientInput, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CurrencyFilterValue, type CustomAttributeValue, type CustomTab, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, type DefaultRoleName, type DeletedMode, DestructiveSyncNotAllowedError, DetailViewBuilder, type DetailViewConfig, type DetailViewDefinition, type DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, type DocumentsTab, DocumentsTabConfig, type DomainEvent, DuplicateError, type DynamicValue, type DynamicValueResolver, EMPTY_VALUE_PLACEHOLDER, type Eager, type EdgeQuantifier, type EffectivePermissions, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtendedFilterRule, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, type Field, type FieldGroup, type FieldHistoryEntry, type File, FileAttribute, type FileListOptions, type FilterCombinator, type FilterGroup, type FilterOperator, type FilterRule, type FilterState, type FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, FlagService, type FlagValueType, ForbiddenError, FormBuilder, type FormDefinition, type FormDensity, type FormFieldRef, type FormFieldsRow, type FormFreeFieldRef, type FormHeadingRow, FormRegistry, type FormRow, FormRowBuilder, type FormSeparatorRow, type FormSlot, type FormSlotFieldRef, type FormStatus, type FormStep, FormStepBuilder, type FormSubmission, type FormSubmissionStatus, type FormSubmittedAgentEvent, type FormTab, type FormTextRow, type FormsTab, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InverseSource, type InviteUserInput, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, type ListOptions, ListViewBuilder, type ListViewConfig, type ListViewDefinition, type ListViewLayout, type ListViewTab, ListViewTabConfigBuilder, type LiveChannel, type LiveChannelKind, type LiveErrorPayload, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveGapPayload, type LiveNotification, type LiveNotificationRecipient, type LiveNotificationRecipientPatch, type LiveReplayCompletePayload, type LiveSubscribePayload, type LiveUnsubscribePayload, Location, LocationAttribute, LocationGranularity, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type 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, NO_VALUE_OPERATORS, type NoValueOperator, NoopGeocodingAdapter, NotFoundError, NotImplementedError, 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, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, type ObjectConfig, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type Permission, type PermissionScope, Phone, PhoneAttribute, type PhoneFilterValue, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentAttributeBuilder, type QualifiedDocumentBrand, type QueryState, type ReasoningPartData, type RecordAgentEvent, type RecordDeletedLiveEvent, type RecordFieldPatch, type RecordMetadata, RecordNotFoundError, type RecordPatchLiveEvent, type RecordReference, RecordReferencedError, type RegexGenerationInput, RelationAttribute, type RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, type RelationSource, RelationTarget, type RelativeDateValue, RepositoryError, type RepositoryOperation, type ResolutionContext, type ResolvedFlag, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, type RichtextTab, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, SKILL_LIST_VIEW, SKILL_OBJECT, SKILL_VIEW, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SchemaOperation, SearchBackendError, type SearchOptions, SelectAttribute, type SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, type SortDirection, type SortRule, type StandardSchemaIssue, type StandardSchemaResult, type StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, type StreamEventMessageUpdated, type StreamEventUsage, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, type Tab, TabBuilder, type TabType, type TableSource, type TableTab, TableTabConfig, TenantId, type TenantSettings, TextAttribute, type TextPartData, type ThinkingPartData, Timestamps, type ToolPartData, type ToolPartErrorCode, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, UserReferenceType, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, type ViewConfig, type ViewDefinition, type ViewOverlay, type ViewProjectionStaleLiveEvent, type ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, currentActor, date, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, extractAttributeNames, file, flagRegistry, form, formRegistry, formatAttributeValue, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, group, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeInUseError, isAttributeKanbanGroupable, isAttributeSearchable, isComputedFunctionName, isDefaultRole, isDetailView, isDocumentAttribute, isDynamicValue, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isNoValueOperator, isNotEmpty, isNotFoundError, isObjectReferencedError, isPlainRecord, isProtectedResourceError, isRecordReferencedError, isRelationGroup, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, liveChannelKey, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, now, number, numberFlag, object, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, phone, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, rollupToFormulaExpression, select, status, stringFlag, text, toUndefinedIfEmpty, today, user, validateAttributeName, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|
|
7930
|
+
/** Built-in external connector providers (v1). */
|
|
7931
|
+
type ConnectorProviderId = "gmail" | "outlook";
|
|
7932
|
+
/** Connection lifecycle status, mirrored from `connector_connections.status`. */
|
|
7933
|
+
type ConnectionStatusId = "active" | "reauth_required" | "error" | "disconnected";
|
|
7934
|
+
/**
|
|
7935
|
+
* Token-free projection of a connection for client/UI consumption.
|
|
7936
|
+
* Access/refresh tokens NEVER cross this boundary.
|
|
7937
|
+
*/
|
|
7938
|
+
interface ConnectionView {
|
|
7939
|
+
id: string;
|
|
7940
|
+
provider: ConnectorProviderId;
|
|
7941
|
+
/** null = tenant/shared connection, set = user/private connection. */
|
|
7942
|
+
ownerActorId: string | null;
|
|
7943
|
+
externalAccountId: string;
|
|
7944
|
+
status: ConnectionStatusId;
|
|
7945
|
+
lastSyncedAt: string | null;
|
|
7946
|
+
createdAt: string;
|
|
7947
|
+
}
|
|
7948
|
+
/** Scope a connection is created under. Implied by the originating settings section. */
|
|
7949
|
+
type ConnectorScope = "actor" | "tenant";
|
|
7950
|
+
/** Input to start an OAuth authorization flow. */
|
|
7951
|
+
interface StartConnectorAuthInput {
|
|
7952
|
+
provider: ConnectorProviderId;
|
|
7953
|
+
scope: ConnectorScope;
|
|
7954
|
+
}
|
|
7955
|
+
/** Result of starting an OAuth flow — the URL the browser must visit. */
|
|
7956
|
+
interface StartConnectorAuthResult {
|
|
7957
|
+
authorizeUrl: string;
|
|
7958
|
+
}
|
|
7959
|
+
|
|
7960
|
+
type EmailProvider = "gmail" | "outlook";
|
|
7961
|
+
type EmailVisibility = "shared" | "private";
|
|
7962
|
+
type EmailDirection = "inbound" | "outbound";
|
|
7963
|
+
type MailboxReadState = "all" | "unread" | "read";
|
|
7964
|
+
type ConnectionStatus = "active" | "reauth_required" | "error" | "disconnected";
|
|
7965
|
+
type EmailParticipantRole = "from" | "to" | "cc" | "bcc";
|
|
7966
|
+
interface EmailParticipantRef {
|
|
7967
|
+
address: string;
|
|
7968
|
+
role: EmailParticipantRole;
|
|
7969
|
+
}
|
|
7970
|
+
interface EmailAttachmentMeta {
|
|
7971
|
+
index: number;
|
|
7972
|
+
filename: string;
|
|
7973
|
+
mimeType: string;
|
|
7974
|
+
sizeBytes: number;
|
|
7975
|
+
contentId?: string;
|
|
7976
|
+
inline?: boolean;
|
|
7977
|
+
}
|
|
7978
|
+
/** A single email message on the wire. bodyHtmlSafe is the ONLY HTML the client receives. */
|
|
7979
|
+
interface MailboxEmail {
|
|
7980
|
+
id: string;
|
|
7981
|
+
threadId: string;
|
|
7982
|
+
connectionId: string;
|
|
7983
|
+
messageId: string;
|
|
7984
|
+
fromAddress: string;
|
|
7985
|
+
fromName: string;
|
|
7986
|
+
subject: string;
|
|
7987
|
+
snippet: string;
|
|
7988
|
+
bodyHtmlSafe: string;
|
|
7989
|
+
bodyText: string;
|
|
7990
|
+
hasRemoteContent: boolean;
|
|
7991
|
+
sentAt: string;
|
|
7992
|
+
direction: EmailDirection;
|
|
7993
|
+
visibility: EmailVisibility;
|
|
7994
|
+
isRead: boolean;
|
|
7995
|
+
labels: string[];
|
|
7996
|
+
attachments: EmailAttachmentMeta[];
|
|
7997
|
+
participants: EmailParticipantRef[];
|
|
7998
|
+
}
|
|
7999
|
+
/** Thread summary for list rendering (mailbox projection — non-null display fields). */
|
|
8000
|
+
interface MailboxThread {
|
|
8001
|
+
threadId: string;
|
|
8002
|
+
latestFromAddress: string;
|
|
8003
|
+
latestFromName: string;
|
|
8004
|
+
subject: string;
|
|
8005
|
+
latestSentAt: string;
|
|
8006
|
+
unreadCount: number;
|
|
8007
|
+
messageCount: number;
|
|
8008
|
+
snippet: string;
|
|
8009
|
+
hasAttachments: boolean;
|
|
8010
|
+
participants: EmailParticipantRef[];
|
|
8011
|
+
accountId: string;
|
|
8012
|
+
}
|
|
8013
|
+
interface MailboxAccount {
|
|
8014
|
+
id: string;
|
|
8015
|
+
provider: EmailProvider;
|
|
8016
|
+
externalAccountId: string;
|
|
8017
|
+
visibility: EmailVisibility;
|
|
8018
|
+
status: ConnectionStatus;
|
|
8019
|
+
}
|
|
8020
|
+
interface MailboxCursor {
|
|
8021
|
+
sentAt: string;
|
|
8022
|
+
threadId: string;
|
|
8023
|
+
}
|
|
8024
|
+
interface MailboxQuery {
|
|
8025
|
+
accountId?: string;
|
|
8026
|
+
search?: string;
|
|
8027
|
+
readState?: MailboxReadState;
|
|
8028
|
+
limit?: number;
|
|
8029
|
+
cursor?: MailboxCursor;
|
|
8030
|
+
}
|
|
8031
|
+
interface MailboxListResponse {
|
|
8032
|
+
threads: MailboxThread[];
|
|
8033
|
+
nextCursor?: MailboxCursor;
|
|
8034
|
+
}
|
|
8035
|
+
interface MailboxThreadDetail {
|
|
8036
|
+
threadId: string;
|
|
8037
|
+
subject: string;
|
|
8038
|
+
emails: MailboxEmail[];
|
|
8039
|
+
}
|
|
8040
|
+
|
|
8041
|
+
export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, AccessDeniedError, type AccessLevel, type Action, type ActivityTab, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AdvancedFilterState, type AgentConfig, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentMessageAttachment, type AgentMessagePart, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionPatchLiveEvent, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type AgentUnreadPatchLiveEvent, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, type AttributeGroupField, AttributeInUseError, type AttributeLifecycleCapabilities, AttributeNotFoundError, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, AutofillConfig, type AutofillGenerationInput, type AutofillTargetSpec, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, ChangeTypeNotSupportedError, type ChannelRevokedLiveEvent, CheckboxAttribute, type CompactionStrategy, type CompileComputedFormulaInput, CompletionStatus, 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, ConcurrentModificationError, type ConfigOverrides, type ConnectionStatus, type ConnectionStatusId, type ConnectionView, type ConnectorProviderId, type ConnectorScope, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, type CreateMode, type CreateNotificationInput, type CreateNotificationRecipientInput, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CurrencyFilterValue, type CustomAttributeValue, type CustomTab, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, type DefaultRoleName, type DeletedMode, DestructiveSyncNotAllowedError, DetailViewBuilder, type DetailViewConfig, type DetailViewDefinition, type DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, type DocumentsTab, DocumentsTabConfig, type DomainEvent, DuplicateError, type DynamicValue, type DynamicValueResolver, EMPTY_VALUE_PLACEHOLDER, type Eager, type EdgeQuantifier, type EffectivePermissions, type EmailAttachmentMeta, type EmailDirection, type EmailParticipantRef, type EmailParticipantRole, type EmailProvider, type EmailVisibility, type EmailsTab, EmailsTabConfig, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtendedFilterRule, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, type Field, type FieldGroup, type FieldHistoryEntry, type File, FileAttribute, type FileListOptions, type FilterCombinator, type FilterGroup, type FilterOperator, type FilterRule, type FilterState, type FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, FlagService, type FlagValueType, ForbiddenError, FormBuilder, type FormDefinition, type FormDensity, type FormFieldRef, type FormFieldsRow, type FormFreeFieldRef, type FormHeadingRow, FormRegistry, type FormRow, FormRowBuilder, type FormSeparatorRow, type FormSlot, type FormSlotFieldRef, type FormStatus, type FormStep, FormStepBuilder, type FormSubmission, type FormSubmissionStatus, type FormSubmittedAgentEvent, type FormTab, type FormTextRow, type FormsTab, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InverseSource, type InviteUserInput, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, type ListOptions, ListViewBuilder, type ListViewConfig, type ListViewDefinition, type ListViewLayout, type ListViewTab, ListViewTabConfigBuilder, type LiveChannel, type LiveChannelKind, type LiveErrorPayload, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveGapPayload, type LiveNotification, type LiveNotificationRecipient, type LiveNotificationRecipientPatch, type LiveReplayCompletePayload, type LiveSubscribePayload, type LiveUnsubscribePayload, Location, LocationAttribute, LocationGranularity, type MailboxAccount, type MailboxCursor, type MailboxEmail, type MailboxListResponse, type MailboxQuery, type MailboxReadState, type MailboxThread, type MailboxThreadDetail, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type 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, NO_VALUE_OPERATORS, type NoValueOperator, NoopGeocodingAdapter, NotFoundError, NotImplementedError, 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, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, type ObjectConfig, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type Permission, type PermissionScope, Phone, PhoneAttribute, type PhoneFilterValue, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentAttributeBuilder, type QualifiedDocumentBrand, type QueryState, type ReasoningPartData, type RecordAgentEvent, type RecordDeletedLiveEvent, type RecordFieldPatch, type RecordMetadata, RecordNotFoundError, type RecordPatchLiveEvent, type RecordReference, RecordReferencedError, type RegexGenerationInput, RelationAttribute, type RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, type RelationSource, RelationTarget, type RelativeDateValue, RepositoryError, type RepositoryOperation, type ResolutionContext, type ResolvedFlag, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, type RichtextTab, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, SKILL_LIST_VIEW, SKILL_OBJECT, SKILL_VIEW, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SchemaOperation, SearchBackendError, type SearchOptions, SelectAttribute, type SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, type SortDirection, type SortRule, type StandardSchemaIssue, type StandardSchemaResult, type StartConnectorAuthInput, type StartConnectorAuthResult, type StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, type StreamEventMessageUpdated, type StreamEventUsage, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, type Tab, TabBuilder, type TabType, type TableSource, type TableTab, TableTabConfig, TenantId, type TenantSettings, TextAttribute, type TextPartData, type ThinkingPartData, Timestamps, type ToolPartData, type ToolPartErrorCode, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, UserReferenceType, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, type ViewConfig, type ViewDefinition, type ViewOverlay, type ViewProjectionStaleLiveEvent, type ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, currentActor, date, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, extractAttributeNames, file, flagRegistry, form, formRegistry, formatAttributeValue, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, group, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeInUseError, isAttributeKanbanGroupable, isAttributeSearchable, isComputedFunctionName, isDefaultRole, isDetailView, isDocumentAttribute, isDynamicValue, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isNoValueOperator, isNotEmpty, isNotFoundError, isObjectReferencedError, isPlainRecord, isProtectedResourceError, isRecordReferencedError, isRelationGroup, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, liveChannelKey, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, now, number, numberFlag, object, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, phone, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, rollupToFormulaExpression, select, status, stringFlag, text, toUndefinedIfEmpty, today, user, validateAttributeName, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|
package/dist/index.d.ts
CHANGED
|
@@ -381,7 +381,7 @@ interface RelationGroup extends BaseGroup {
|
|
|
381
381
|
* Discriminated union of all group types
|
|
382
382
|
*/
|
|
383
383
|
type Group = FieldGroup | RelationGroup;
|
|
384
|
-
type TabType = "form" | "table" | "custom" | "activity" | "richtext" | "documents" | "forms";
|
|
384
|
+
type TabType = "form" | "table" | "custom" | "activity" | "richtext" | "documents" | "forms" | "emails";
|
|
385
385
|
/**
|
|
386
386
|
* Base properties shared by all tab types
|
|
387
387
|
*/
|
|
@@ -517,10 +517,19 @@ interface FormsTab extends BaseTab {
|
|
|
517
517
|
/** Object name to filter forms by slot (derived from record context, but can be overridden) */
|
|
518
518
|
objectName?: string;
|
|
519
519
|
}
|
|
520
|
+
/**
|
|
521
|
+
* Emails tab - displays emails associated with the record at query time via the
|
|
522
|
+
* values of configured email-bearing text attributes. Config-only: no schema change.
|
|
523
|
+
*/
|
|
524
|
+
interface EmailsTab extends BaseTab {
|
|
525
|
+
type: "emails";
|
|
526
|
+
/** Names of text attributes whose values hold email addresses to match on. */
|
|
527
|
+
emailAttributeIds: string[];
|
|
528
|
+
}
|
|
520
529
|
/**
|
|
521
530
|
* Union of all tab types (for detail views)
|
|
522
531
|
*/
|
|
523
|
-
type Tab = FormTab | TableTab | CustomTab | ActivityTab | RichtextTab | DocumentsTab | FormsTab;
|
|
532
|
+
type Tab = FormTab | TableTab | CustomTab | ActivityTab | RichtextTab | DocumentsTab | FormsTab | EmailsTab;
|
|
524
533
|
/**
|
|
525
534
|
* Detail view layout mode
|
|
526
535
|
* - `page`: Full view with multiple tabs
|
|
@@ -1211,7 +1220,7 @@ type Action = "read" | "create" | "update" | "delete" | "manage" | "observe";
|
|
|
1211
1220
|
* - `workspace`: Tenant settings and workspace-level configuration
|
|
1212
1221
|
* - `architect`: Architect settings, templates, and configurations
|
|
1213
1222
|
*/
|
|
1214
|
-
type SystemResource = "people" | "workspace" | "architect" | "feature-flags" | "files" | "views" | "forms" | "documents" | "audit" | "api-keys" | "env-vars" | "session";
|
|
1223
|
+
type SystemResource = "people" | "workspace" | "architect" | "feature-flags" | "files" | "views" | "forms" | "documents" | "audit" | "api-keys" | "connectors" | "env-vars" | "session";
|
|
1215
1224
|
/**
|
|
1216
1225
|
* Preset access levels for simplified permission configuration.
|
|
1217
1226
|
* - `full`: All CRUD actions
|
|
@@ -2668,6 +2677,8 @@ declare const SchemaErrorCode: {
|
|
|
2668
2677
|
readonly PROTECTED_ROLE: "SCHEMA_PROTECTED_ROLE";
|
|
2669
2678
|
readonly FORBIDDEN: "SCHEMA_FORBIDDEN";
|
|
2670
2679
|
readonly ACCESS_DENIED: "SCHEMA_ACCESS_DENIED";
|
|
2680
|
+
readonly CONNECTOR_AUTH_FAILED: "SCHEMA_CONNECTOR_AUTH_FAILED";
|
|
2681
|
+
readonly CONNECTOR_INVALID_STATE: "SCHEMA_CONNECTOR_INVALID_STATE";
|
|
2671
2682
|
readonly SYNC_FAILED: "SCHEMA_SYNC_FAILED";
|
|
2672
2683
|
readonly SYNC_CONFLICT: "SCHEMA_SYNC_CONFLICT";
|
|
2673
2684
|
readonly SYNC_CASCADE: "SCHEMA_SYNC_CASCADE";
|
|
@@ -2726,6 +2737,12 @@ declare const SchemaErrorCode: {
|
|
|
2726
2737
|
readonly DOCUMENT_STORAGE_FAILED: "DOCUMENT_STORAGE_FAILED";
|
|
2727
2738
|
readonly DOCUMENT_SIZE_EXCEEDED: "DOCUMENT_SIZE_EXCEEDED";
|
|
2728
2739
|
readonly DOCUMENT_OCR_FAILED: "DOCUMENT_OCR_FAILED";
|
|
2740
|
+
readonly EMAIL_IMAGE_PROXY_INVALID_TOKEN: "EMAIL_IMAGE_PROXY_INVALID_TOKEN";
|
|
2741
|
+
readonly EMAIL_IMAGE_PROXY_EXPIRED_TOKEN: "EMAIL_IMAGE_PROXY_EXPIRED_TOKEN";
|
|
2742
|
+
readonly EMAIL_IMAGE_PROXY_TOO_LARGE: "EMAIL_IMAGE_PROXY_TOO_LARGE";
|
|
2743
|
+
readonly EMAIL_IMAGE_PROXY_UNSUPPORTED_CONTENT_TYPE: "EMAIL_IMAGE_PROXY_UNSUPPORTED_CONTENT_TYPE";
|
|
2744
|
+
readonly EMAIL_IMAGE_PROXY_UNSAFE_URL: "EMAIL_IMAGE_PROXY_UNSAFE_URL";
|
|
2745
|
+
readonly EMAIL_IMAGE_PROXY_UPSTREAM_FAILED: "EMAIL_IMAGE_PROXY_UPSTREAM_FAILED";
|
|
2729
2746
|
};
|
|
2730
2747
|
type SchemaErrorCode = (typeof SchemaErrorCode)[keyof typeof SchemaErrorCode];
|
|
2731
2748
|
/**
|
|
@@ -4418,6 +4435,8 @@ declare const SYSTEM_RESOURCES: {
|
|
|
4418
4435
|
readonly AUDIT: "audit";
|
|
4419
4436
|
/** Programmatic access keys */
|
|
4420
4437
|
readonly API_KEYS: "api-keys";
|
|
4438
|
+
/** OAuth connector connections (mailboxes, etc.) */
|
|
4439
|
+
readonly CONNECTORS: "connectors";
|
|
4421
4440
|
/** Environment variables for agents */
|
|
4422
4441
|
readonly ENV_VARS: "env-vars";
|
|
4423
4442
|
/** Agent session visibility — required for an agent actor to read its own sessions */
|
|
@@ -6054,6 +6073,32 @@ declare class ActivityTabConfig {
|
|
|
6054
6073
|
*/
|
|
6055
6074
|
build(): DetailViewDefinition;
|
|
6056
6075
|
}
|
|
6076
|
+
/**
|
|
6077
|
+
* Builder for configuring emails tabs.
|
|
6078
|
+
*
|
|
6079
|
+
* @example
|
|
6080
|
+
* .tab("emails", "Emails").emails().emailAttributes("email", "backup_email")
|
|
6081
|
+
*/
|
|
6082
|
+
declare class EmailsTabConfig {
|
|
6083
|
+
private view;
|
|
6084
|
+
private tabData;
|
|
6085
|
+
/** @internal */
|
|
6086
|
+
constructor(view: DetailViewBuilder, base: BaseTabConfig);
|
|
6087
|
+
/** Set the text attributes whose values are matched against email participants. */
|
|
6088
|
+
emailAttributes(...attributeIds: string[]): this;
|
|
6089
|
+
/**
|
|
6090
|
+
* Continue building with a new tab
|
|
6091
|
+
*/
|
|
6092
|
+
tab(name: string, label: string): TabBuilder;
|
|
6093
|
+
/**
|
|
6094
|
+
* Finish this tab and return to DetailViewBuilder
|
|
6095
|
+
*/
|
|
6096
|
+
done(): DetailViewBuilder;
|
|
6097
|
+
/**
|
|
6098
|
+
* Build the final view definition
|
|
6099
|
+
*/
|
|
6100
|
+
build(): DetailViewDefinition;
|
|
6101
|
+
}
|
|
6057
6102
|
/**
|
|
6058
6103
|
* Builder for configuring documents tabs
|
|
6059
6104
|
*
|
|
@@ -6172,6 +6217,11 @@ declare class TabBuilder {
|
|
|
6172
6217
|
* @example .documents().disableUpload().disableRemove()
|
|
6173
6218
|
*/
|
|
6174
6219
|
documents(): DocumentsTabConfig;
|
|
6220
|
+
/**
|
|
6221
|
+
* Create an emails tab (query-time association via email-bearing attributes)
|
|
6222
|
+
* @example .emails().emailAttributes("email", "backup_email")
|
|
6223
|
+
*/
|
|
6224
|
+
emails(): EmailsTabConfig;
|
|
6175
6225
|
/**
|
|
6176
6226
|
* Create a forms tab to launch and track form instances linked to this record
|
|
6177
6227
|
* @example .tab("forms", "Forms").forms()
|
|
@@ -7877,4 +7927,115 @@ interface DynamicValueResolver<K extends DynamicValue["dynamic"]> {
|
|
|
7877
7927
|
}>, ctx: ResolutionContext): FilterValue | undefined;
|
|
7878
7928
|
}
|
|
7879
7929
|
|
|
7880
|
-
export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, AccessDeniedError, type AccessLevel, type Action, type ActivityTab, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AdvancedFilterState, type AgentConfig, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentMessageAttachment, type AgentMessagePart, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionPatchLiveEvent, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type AgentUnreadPatchLiveEvent, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, type AttributeGroupField, AttributeInUseError, type AttributeLifecycleCapabilities, AttributeNotFoundError, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, AutofillConfig, type AutofillGenerationInput, type AutofillTargetSpec, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, ChangeTypeNotSupportedError, type ChannelRevokedLiveEvent, CheckboxAttribute, type CompactionStrategy, type CompileComputedFormulaInput, CompletionStatus, 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, ConcurrentModificationError, type ConfigOverrides, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, type CreateMode, type CreateNotificationInput, type CreateNotificationRecipientInput, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CurrencyFilterValue, type CustomAttributeValue, type CustomTab, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, type DefaultRoleName, type DeletedMode, DestructiveSyncNotAllowedError, DetailViewBuilder, type DetailViewConfig, type DetailViewDefinition, type DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, type DocumentsTab, DocumentsTabConfig, type DomainEvent, DuplicateError, type DynamicValue, type DynamicValueResolver, EMPTY_VALUE_PLACEHOLDER, type Eager, type EdgeQuantifier, type EffectivePermissions, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtendedFilterRule, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, type Field, type FieldGroup, type FieldHistoryEntry, type File, FileAttribute, type FileListOptions, type FilterCombinator, type FilterGroup, type FilterOperator, type FilterRule, type FilterState, type FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, FlagService, type FlagValueType, ForbiddenError, FormBuilder, type FormDefinition, type FormDensity, type FormFieldRef, type FormFieldsRow, type FormFreeFieldRef, type FormHeadingRow, FormRegistry, type FormRow, FormRowBuilder, type FormSeparatorRow, type FormSlot, type FormSlotFieldRef, type FormStatus, type FormStep, FormStepBuilder, type FormSubmission, type FormSubmissionStatus, type FormSubmittedAgentEvent, type FormTab, type FormTextRow, type FormsTab, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InverseSource, type InviteUserInput, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, type ListOptions, ListViewBuilder, type ListViewConfig, type ListViewDefinition, type ListViewLayout, type ListViewTab, ListViewTabConfigBuilder, type LiveChannel, type LiveChannelKind, type LiveErrorPayload, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveGapPayload, type LiveNotification, type LiveNotificationRecipient, type LiveNotificationRecipientPatch, type LiveReplayCompletePayload, type LiveSubscribePayload, type LiveUnsubscribePayload, Location, LocationAttribute, LocationGranularity, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type 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, NO_VALUE_OPERATORS, type NoValueOperator, NoopGeocodingAdapter, NotFoundError, NotImplementedError, 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, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, type ObjectConfig, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type Permission, type PermissionScope, Phone, PhoneAttribute, type PhoneFilterValue, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentAttributeBuilder, type QualifiedDocumentBrand, type QueryState, type ReasoningPartData, type RecordAgentEvent, type RecordDeletedLiveEvent, type RecordFieldPatch, type RecordMetadata, RecordNotFoundError, type RecordPatchLiveEvent, type RecordReference, RecordReferencedError, type RegexGenerationInput, RelationAttribute, type RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, type RelationSource, RelationTarget, type RelativeDateValue, RepositoryError, type RepositoryOperation, type ResolutionContext, type ResolvedFlag, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, type RichtextTab, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, SKILL_LIST_VIEW, SKILL_OBJECT, SKILL_VIEW, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SchemaOperation, SearchBackendError, type SearchOptions, SelectAttribute, type SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, type SortDirection, type SortRule, type StandardSchemaIssue, type StandardSchemaResult, type StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, type StreamEventMessageUpdated, type StreamEventUsage, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, type Tab, TabBuilder, type TabType, type TableSource, type TableTab, TableTabConfig, TenantId, type TenantSettings, TextAttribute, type TextPartData, type ThinkingPartData, Timestamps, type ToolPartData, type ToolPartErrorCode, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, UserReferenceType, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, type ViewConfig, type ViewDefinition, type ViewOverlay, type ViewProjectionStaleLiveEvent, type ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, currentActor, date, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, extractAttributeNames, file, flagRegistry, form, formRegistry, formatAttributeValue, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, group, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeInUseError, isAttributeKanbanGroupable, isAttributeSearchable, isComputedFunctionName, isDefaultRole, isDetailView, isDocumentAttribute, isDynamicValue, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isNoValueOperator, isNotEmpty, isNotFoundError, isObjectReferencedError, isPlainRecord, isProtectedResourceError, isRecordReferencedError, isRelationGroup, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, liveChannelKey, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, now, number, numberFlag, object, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, phone, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, rollupToFormulaExpression, select, status, stringFlag, text, toUndefinedIfEmpty, today, user, validateAttributeName, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|
|
7930
|
+
/** Built-in external connector providers (v1). */
|
|
7931
|
+
type ConnectorProviderId = "gmail" | "outlook";
|
|
7932
|
+
/** Connection lifecycle status, mirrored from `connector_connections.status`. */
|
|
7933
|
+
type ConnectionStatusId = "active" | "reauth_required" | "error" | "disconnected";
|
|
7934
|
+
/**
|
|
7935
|
+
* Token-free projection of a connection for client/UI consumption.
|
|
7936
|
+
* Access/refresh tokens NEVER cross this boundary.
|
|
7937
|
+
*/
|
|
7938
|
+
interface ConnectionView {
|
|
7939
|
+
id: string;
|
|
7940
|
+
provider: ConnectorProviderId;
|
|
7941
|
+
/** null = tenant/shared connection, set = user/private connection. */
|
|
7942
|
+
ownerActorId: string | null;
|
|
7943
|
+
externalAccountId: string;
|
|
7944
|
+
status: ConnectionStatusId;
|
|
7945
|
+
lastSyncedAt: string | null;
|
|
7946
|
+
createdAt: string;
|
|
7947
|
+
}
|
|
7948
|
+
/** Scope a connection is created under. Implied by the originating settings section. */
|
|
7949
|
+
type ConnectorScope = "actor" | "tenant";
|
|
7950
|
+
/** Input to start an OAuth authorization flow. */
|
|
7951
|
+
interface StartConnectorAuthInput {
|
|
7952
|
+
provider: ConnectorProviderId;
|
|
7953
|
+
scope: ConnectorScope;
|
|
7954
|
+
}
|
|
7955
|
+
/** Result of starting an OAuth flow — the URL the browser must visit. */
|
|
7956
|
+
interface StartConnectorAuthResult {
|
|
7957
|
+
authorizeUrl: string;
|
|
7958
|
+
}
|
|
7959
|
+
|
|
7960
|
+
type EmailProvider = "gmail" | "outlook";
|
|
7961
|
+
type EmailVisibility = "shared" | "private";
|
|
7962
|
+
type EmailDirection = "inbound" | "outbound";
|
|
7963
|
+
type MailboxReadState = "all" | "unread" | "read";
|
|
7964
|
+
type ConnectionStatus = "active" | "reauth_required" | "error" | "disconnected";
|
|
7965
|
+
type EmailParticipantRole = "from" | "to" | "cc" | "bcc";
|
|
7966
|
+
interface EmailParticipantRef {
|
|
7967
|
+
address: string;
|
|
7968
|
+
role: EmailParticipantRole;
|
|
7969
|
+
}
|
|
7970
|
+
interface EmailAttachmentMeta {
|
|
7971
|
+
index: number;
|
|
7972
|
+
filename: string;
|
|
7973
|
+
mimeType: string;
|
|
7974
|
+
sizeBytes: number;
|
|
7975
|
+
contentId?: string;
|
|
7976
|
+
inline?: boolean;
|
|
7977
|
+
}
|
|
7978
|
+
/** A single email message on the wire. bodyHtmlSafe is the ONLY HTML the client receives. */
|
|
7979
|
+
interface MailboxEmail {
|
|
7980
|
+
id: string;
|
|
7981
|
+
threadId: string;
|
|
7982
|
+
connectionId: string;
|
|
7983
|
+
messageId: string;
|
|
7984
|
+
fromAddress: string;
|
|
7985
|
+
fromName: string;
|
|
7986
|
+
subject: string;
|
|
7987
|
+
snippet: string;
|
|
7988
|
+
bodyHtmlSafe: string;
|
|
7989
|
+
bodyText: string;
|
|
7990
|
+
hasRemoteContent: boolean;
|
|
7991
|
+
sentAt: string;
|
|
7992
|
+
direction: EmailDirection;
|
|
7993
|
+
visibility: EmailVisibility;
|
|
7994
|
+
isRead: boolean;
|
|
7995
|
+
labels: string[];
|
|
7996
|
+
attachments: EmailAttachmentMeta[];
|
|
7997
|
+
participants: EmailParticipantRef[];
|
|
7998
|
+
}
|
|
7999
|
+
/** Thread summary for list rendering (mailbox projection — non-null display fields). */
|
|
8000
|
+
interface MailboxThread {
|
|
8001
|
+
threadId: string;
|
|
8002
|
+
latestFromAddress: string;
|
|
8003
|
+
latestFromName: string;
|
|
8004
|
+
subject: string;
|
|
8005
|
+
latestSentAt: string;
|
|
8006
|
+
unreadCount: number;
|
|
8007
|
+
messageCount: number;
|
|
8008
|
+
snippet: string;
|
|
8009
|
+
hasAttachments: boolean;
|
|
8010
|
+
participants: EmailParticipantRef[];
|
|
8011
|
+
accountId: string;
|
|
8012
|
+
}
|
|
8013
|
+
interface MailboxAccount {
|
|
8014
|
+
id: string;
|
|
8015
|
+
provider: EmailProvider;
|
|
8016
|
+
externalAccountId: string;
|
|
8017
|
+
visibility: EmailVisibility;
|
|
8018
|
+
status: ConnectionStatus;
|
|
8019
|
+
}
|
|
8020
|
+
interface MailboxCursor {
|
|
8021
|
+
sentAt: string;
|
|
8022
|
+
threadId: string;
|
|
8023
|
+
}
|
|
8024
|
+
interface MailboxQuery {
|
|
8025
|
+
accountId?: string;
|
|
8026
|
+
search?: string;
|
|
8027
|
+
readState?: MailboxReadState;
|
|
8028
|
+
limit?: number;
|
|
8029
|
+
cursor?: MailboxCursor;
|
|
8030
|
+
}
|
|
8031
|
+
interface MailboxListResponse {
|
|
8032
|
+
threads: MailboxThread[];
|
|
8033
|
+
nextCursor?: MailboxCursor;
|
|
8034
|
+
}
|
|
8035
|
+
interface MailboxThreadDetail {
|
|
8036
|
+
threadId: string;
|
|
8037
|
+
subject: string;
|
|
8038
|
+
emails: MailboxEmail[];
|
|
8039
|
+
}
|
|
8040
|
+
|
|
8041
|
+
export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, type AIGenerationInputMap, type AIGenerationResult, type AIGenerationType, type AIGenerationUsage, type AIMemoryEntry, type AIMemoryType, type AIMessageRole, type AIProviderMetrics, type AIQuestion, type AIQuestionAnswer, type AIQuestionOption, type AIQuestionType, type AITodoItem, type AITodoList, type AITodoStatus, type AIToolCall, type AIToolCallStatus, type AIUsageMetrics, ALLOWED_PROPERTY_TYPES, ALL_ACTIONS, ALL_SYSTEM_RESOURCES, ATTRIBUTE_FILTER_OPERATORS, AccessDeniedError, type AccessLevel, type Action, type ActivityTab, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AdvancedFilterState, type AgentConfig, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentMessageAttachment, type AgentMessagePart, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionPatchLiveEvent, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type AgentUnreadPatchLiveEvent, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, type AttributeAgentCapabilities, type AttributeAuthoringCapabilities, type AttributeCapabilities, type AttributeCardinality, type AttributeDefaultValueCapability, type AttributeExchangeCapabilities, type AttributeGroupField, AttributeInUseError, type AttributeLifecycleCapabilities, AttributeNotFoundError, type AttributePolymorphicCapability, type AttributePresentationCapabilities, type AttributeQueryCapabilities, type AttributeRequiredCapability, type AttributeStorageCapabilities, type AttributeStorageMode, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, AutofillConfig, type AutofillGenerationInput, type AutofillTargetSpec, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, COMPUTED_FUNCTIONS, COMPUTED_FUNCTION_METADATA, COMPUTED_FUNCTION_NAMES, ChangeTypeNotSupportedError, type ChannelRevokedLiveEvent, CheckboxAttribute, type CompactionStrategy, type CompileComputedFormulaInput, CompletionStatus, 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, ConcurrentModificationError, type ConfigOverrides, type ConnectionStatus, type ConnectionStatusId, type ConnectionView, type ConnectorProviderId, type ConnectorScope, type ConversationRenamedLiveEvent, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, type CreateMode, type CreateNotificationInput, type CreateNotificationRecipientInput, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CurrencyFilterValue, type CustomAttributeValue, type CustomTab, CustomTabConfig, type DBAttribute, type DBForm, type DBFormSubmission, type DBObject, type DBView, type DBViewOverlay, DB_COLUMN_FIELDS, DEFAULT_ROLES, DEFAULT_ROLE_DESCRIPTIONS, DEFAULT_ROLE_LABELS, DEFAULT_ROLE_PERMISSIONS, DOCUMENT_SYSTEM_ATTRIBUTES, DateAttribute, type DefaultRoleName, type DeletedMode, DestructiveSyncNotAllowedError, DetailViewBuilder, type DetailViewConfig, type DetailViewDefinition, type DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, type DocumentsTab, DocumentsTabConfig, type DomainEvent, DuplicateError, type DynamicValue, type DynamicValueResolver, EMPTY_VALUE_PLACEHOLDER, type Eager, type EdgeQuantifier, type EffectivePermissions, type EmailAttachmentMeta, type EmailDirection, type EmailParticipantRef, type EmailParticipantRole, type EmailProvider, type EmailVisibility, type EmailsTab, EmailsTabConfig, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtendedFilterRule, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, type FeatureFlagDefinition, type FeatureFlagsConfig, type FeatureFlagsRepository, type FeatureGate, type Field, type FieldGroup, type FieldHistoryEntry, type File, FileAttribute, type FileListOptions, type FilterCombinator, type FilterGroup, type FilterOperator, type FilterRule, type FilterState, type FilterValue, type FlagLevel, type FlagOverride, FlagRegistry, FlagService, type FlagValueType, ForbiddenError, FormBuilder, type FormDefinition, type FormDensity, type FormFieldRef, type FormFieldsRow, type FormFreeFieldRef, type FormHeadingRow, FormRegistry, type FormRow, FormRowBuilder, type FormSeparatorRow, type FormSlot, type FormSlotFieldRef, type FormStatus, type FormStep, FormStepBuilder, type FormSubmission, type FormSubmissionStatus, type FormSubmittedAgentEvent, type FormTab, type FormTextRow, type FormsTab, FormulaAttribute, type FormulaGenerationAttribute, type FormulaGenerationInput, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, type InverseSource, type InviteUserInput, LIVE_EVENT_TYPES, LIVE_STREAM_START_CURSOR, type ListOptions, ListViewBuilder, type ListViewConfig, type ListViewDefinition, type ListViewLayout, type ListViewTab, ListViewTabConfigBuilder, type LiveChannel, type LiveChannelKind, type LiveErrorPayload, type LiveEventEnvelope, type LiveEventPayload, type LiveEventType, type LiveGapPayload, type LiveNotification, type LiveNotificationRecipient, type LiveNotificationRecipientPatch, type LiveReplayCompletePayload, type LiveSubscribePayload, type LiveUnsubscribePayload, Location, LocationAttribute, LocationGranularity, type MailboxAccount, type MailboxCursor, type MailboxEmail, type MailboxListResponse, type MailboxQuery, type MailboxReadState, type MailboxThread, type MailboxThreadDetail, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type 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, NO_VALUE_OPERATORS, type NoValueOperator, NoopGeocodingAdapter, NotFoundError, NotImplementedError, 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, OPERATORS_BY_TYPE, OPERATOR_SPECS, ObjectBuilder, type ObjectConfig, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type Permission, type PermissionScope, Phone, PhoneAttribute, type PhoneFilterValue, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentAttributeBuilder, type QualifiedDocumentBrand, type QueryState, type ReasoningPartData, type RecordAgentEvent, type RecordDeletedLiveEvent, type RecordFieldPatch, type RecordMetadata, RecordNotFoundError, type RecordPatchLiveEvent, type RecordReference, RecordReferencedError, type RegexGenerationInput, RelationAttribute, type RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, type RelationSource, RelationTarget, type RelativeDateValue, RepositoryError, type RepositoryOperation, type ResolutionContext, type ResolvedFlag, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, type RichtextTab, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, SKILL_LIST_VIEW, SKILL_OBJECT, SKILL_VIEW, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, SchemaError, SchemaErrorCode, SchemaOperation, SearchBackendError, type SearchOptions, SelectAttribute, type SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, type SortDirection, type SortRule, type StandardSchemaIssue, type StandardSchemaResult, type StartConnectorAuthInput, type StartConnectorAuthResult, type StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, type StreamEventMessageUpdated, type StreamEventUsage, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, type Tab, TabBuilder, type TabType, type TableSource, type TableTab, TableTabConfig, TenantId, type TenantSettings, TextAttribute, type TextPartData, type ThinkingPartData, Timestamps, type ToolPartData, type ToolPartErrorCode, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, UserReferenceType, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, type ViewConfig, type ViewDefinition, type ViewOverlay, type ViewProjectionStaleLiveEvent, type ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, assertAcyclicComputedDependencies, assertLiveStreamCursor, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, compareLiveStreamCursors, compileComputedFormula, compileRollupAttribute, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, currentActor, date, detailView, document, evaluateComputedAst, evaluateComputedFormula, evaluateComputedFormulaWithResult, evaluateFilterState, extractAttributeNames, file, flagRegistry, form, formRegistry, formatAttributeValue, formatComputedResult, formatLocationValue, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getAttributeCapabilities, getAttributeFilterOperators, getErrorMessage, getLiveProtocolPayloadChannel, getOperatorPolarity, getRollupFilterOperators, getSystemAttributeI18nKey, getSystemAttributeList, group, inferRollupReturnType, isAttributeFilterable, isAttributeGroupable, isAttributeInUseError, isAttributeKanbanGroupable, isAttributeSearchable, isComputedFunctionName, isDefaultRole, isDetailView, isDocumentAttribute, isDynamicValue, isEmptyObject, isFieldGroup, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isListView, isLiveErrorPayload, isLiveEventEnvelope, isLiveEventPayload, isLiveEventPayloadForType, isLiveEventType, isLiveGapPayload, isLiveReplayCompletePayload, isLiveStreamCursor, isNoValueOperator, isNotEmpty, isNotFoundError, isObjectReferencedError, isPlainRecord, isProtectedResourceError, isRecordReferencedError, isRelationGroup, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, liveChannelKey, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, now, number, numberFlag, object, parseLiveChannelKey, parseLiveSubscribePayload, parseLiveUnsubscribePayload, parseQualifiedAttribute, phone, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, rollupToFormulaExpression, select, status, stringFlag, text, toUndefinedIfEmpty, today, user, validateAttributeName, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|