@stndrds/schema 1.0.0-alpha.190 → 1.0.0-alpha.192
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +41 -2
- package/dist/index.d.ts +41 -2
- package/dist/index.js +12 -8
- package/dist/index.mjs +13 -9
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -765,7 +765,7 @@ type Action = "read" | "create" | "update" | "delete" | "manage" | "observe";
|
|
|
765
765
|
* - `workspace`: Tenant settings and workspace-level configuration
|
|
766
766
|
* - `architect`: Architect settings, templates, and configurations
|
|
767
767
|
*/
|
|
768
|
-
type SystemResource = "people" | "workspace" | "architect" | "feature-flags" | "files" | "views" | "forms" | "documents" | "audit" | "api-keys" | "session";
|
|
768
|
+
type SystemResource = "people" | "workspace" | "architect" | "feature-flags" | "files" | "views" | "forms" | "documents" | "audit" | "api-keys" | "env-vars" | "session";
|
|
769
769
|
/**
|
|
770
770
|
* Preset access levels for simplified permission configuration.
|
|
771
771
|
* - `full`: All CRUD actions
|
|
@@ -1033,6 +1033,27 @@ interface CreateApiKeyInput {
|
|
|
1033
1033
|
actorMetadata?: Record<string, unknown>;
|
|
1034
1034
|
}
|
|
1035
1035
|
|
|
1036
|
+
/** Scope of an env var — consumer type + ID (e.g. agent definition). */
|
|
1037
|
+
interface EnvVarScope {
|
|
1038
|
+
type: string;
|
|
1039
|
+
id: string;
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* Returned by list endpoints.
|
|
1043
|
+
* The encrypted value is NEVER included — only metadata.
|
|
1044
|
+
* `isSet: true` is the only indicator that a value exists.
|
|
1045
|
+
*/
|
|
1046
|
+
interface EnvVarEntry {
|
|
1047
|
+
id: string;
|
|
1048
|
+
key: string;
|
|
1049
|
+
isSensitive: boolean;
|
|
1050
|
+
isSet: true;
|
|
1051
|
+
scopeType: string;
|
|
1052
|
+
scopeId: string | null;
|
|
1053
|
+
createdAt: string;
|
|
1054
|
+
updatedAt: string;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1036
1057
|
/**
|
|
1037
1058
|
* Type of mentionable entity
|
|
1038
1059
|
*/
|
|
@@ -1235,6 +1256,22 @@ interface AuditServiceOptions {
|
|
|
1235
1256
|
*/
|
|
1236
1257
|
flushIntervalMs?: number;
|
|
1237
1258
|
}
|
|
1259
|
+
/**
|
|
1260
|
+
* A single field-level history entry, derived from an audit log change.
|
|
1261
|
+
* Client-safe — no tenant or internal IDs.
|
|
1262
|
+
*/
|
|
1263
|
+
interface FieldHistoryEntry {
|
|
1264
|
+
id: string;
|
|
1265
|
+
field: string;
|
|
1266
|
+
oldValue: unknown;
|
|
1267
|
+
newValue: unknown;
|
|
1268
|
+
oldLabel?: string;
|
|
1269
|
+
newLabel?: string;
|
|
1270
|
+
oldLabels?: string[];
|
|
1271
|
+
newLabels?: string[];
|
|
1272
|
+
actorEmail?: string;
|
|
1273
|
+
createdAt: Date;
|
|
1274
|
+
}
|
|
1238
1275
|
|
|
1239
1276
|
type AgentRunStatus = "pending" | "running" | "completed" | "failed" | "cancelled" | "paused";
|
|
1240
1277
|
type AgentSessionStatus = "active" | "idle" | "completed" | "failed" | "cancelled" | "waiting_human" | "timeout" | "expired";
|
|
@@ -3367,6 +3404,8 @@ declare const SYSTEM_RESOURCES: {
|
|
|
3367
3404
|
readonly AUDIT: "audit";
|
|
3368
3405
|
/** Programmatic access keys */
|
|
3369
3406
|
readonly API_KEYS: "api-keys";
|
|
3407
|
+
/** Environment variables for agents */
|
|
3408
|
+
readonly ENV_VARS: "env-vars";
|
|
3370
3409
|
/** Agent session visibility — required for an agent actor to read its own sessions */
|
|
3371
3410
|
readonly SESSION: "session";
|
|
3372
3411
|
};
|
|
@@ -6679,4 +6718,4 @@ interface QualifiedRuleValidationContext {
|
|
|
6679
6718
|
}
|
|
6680
6719
|
declare function validateQualifiedRule(rule: FilterRule, context: QualifiedRuleValidationContext): void;
|
|
6681
6720
|
|
|
6682
|
-
export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, 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, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AgentConfig, type AgentContextEntry, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentQuestion, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, AttributeGroupField, AttributeInUseError, AttributeNotFoundError, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, ChangeTypeNotSupportedError, CheckboxAttribute, CompletionStatus, ConcurrentModificationError, ConfigOverrides, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CustomAttributeValue, 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, DetailViewConfig, DetailViewDefinition, DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type EffectivePermissions, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FeatureFlagDefinition, FeatureFlagsRepository, FeatureGate, Field, FieldGroup, type File, FileAttribute, type FileListOptions, type FileVisibility, FilterOperator, FilterRule, FilterState, FilterValue, FlagLevel, FlagRegistry, FlagService, FlagValueType, ForbiddenError, 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 FormSubmittedAgentEvent, type FormTextRow, FormulaAttribute, type FormulaResult, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, InvalidPathError, type InviteUserInput, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, Location, LocationAttribute, LocationGranularity, MaxDepthExceededError, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type PathCardinality, type PathSegment, type PathSegmentType, type Permission, type PermissionScope, Phone, PhoneAttribute, type PrincipalType, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentBrand, type QuestionResponse, type QuestionStatus, RatingAttribute, type ReasoningPartData, type RecordAgentEvent, type RecordMetadata, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationAttribute, RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, RelationTarget, RepositoryError, type RepositoryOperation, ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, RichtextFeature, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, SchemaOperation, type SchemaResolver, type SearchOptions, SelectAttribute, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, TextAreaAttribute, TextAttribute, type TextPartData, type ThinkingPartData, type TimeoutPolicy, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, ViewConfig, ViewDefinition, ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateFilterState, evaluateFormula, evaluateFormulaAttribute, evaluateFormulaWithResult, extractAttributeNames, extractFormulaVariables, extractRelationNames, extractRelationReferences, file, flagRegistry, flattenRelationsForEval, form, formRegistry, formatAttributeValue, formatFormulaResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getOperatorPolarity, getPathDepth, getRelationPath, getSystemAttributeI18nKey, getSystemAttributeList, getTargetAttributeName, group, hasRelationReferences, isAttributeInUseError, isDefaultRole, isDocumentAttribute, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isNotEmpty, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, number, numberFlag, object, parsePath, parseQualifiedAttribute, pathHasManyCardinality, phone, rating, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, select, status, stringFlag, text, textarea, toUndefinedIfEmpty, user, validateAttributeName, validateFormulaExpression, validatePath, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|
|
6721
|
+
export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, 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, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AgentConfig, type AgentContextEntry, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentQuestion, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, AttributeGroupField, AttributeInUseError, AttributeNotFoundError, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, ChangeTypeNotSupportedError, CheckboxAttribute, CompletionStatus, ConcurrentModificationError, ConfigOverrides, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CustomAttributeValue, 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, DetailViewConfig, DetailViewDefinition, DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type EffectivePermissions, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FeatureFlagDefinition, FeatureFlagsRepository, FeatureGate, Field, FieldGroup, type FieldHistoryEntry, type File, FileAttribute, type FileListOptions, type FileVisibility, FilterOperator, FilterRule, FilterState, FilterValue, FlagLevel, FlagRegistry, FlagService, FlagValueType, ForbiddenError, 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 FormSubmittedAgentEvent, type FormTextRow, FormulaAttribute, type FormulaResult, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, InvalidPathError, type InviteUserInput, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, Location, LocationAttribute, LocationGranularity, MaxDepthExceededError, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type PathCardinality, type PathSegment, type PathSegmentType, type Permission, type PermissionScope, Phone, PhoneAttribute, type PrincipalType, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentBrand, type QuestionResponse, type QuestionStatus, RatingAttribute, type ReasoningPartData, type RecordAgentEvent, type RecordMetadata, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationAttribute, RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, RelationTarget, RepositoryError, type RepositoryOperation, ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, RichtextFeature, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, SchemaOperation, type SchemaResolver, type SearchOptions, SelectAttribute, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, TextAreaAttribute, TextAttribute, type TextPartData, type ThinkingPartData, type TimeoutPolicy, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, ViewConfig, ViewDefinition, ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateFilterState, evaluateFormula, evaluateFormulaAttribute, evaluateFormulaWithResult, extractAttributeNames, extractFormulaVariables, extractRelationNames, extractRelationReferences, file, flagRegistry, flattenRelationsForEval, form, formRegistry, formatAttributeValue, formatFormulaResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getOperatorPolarity, getPathDepth, getRelationPath, getSystemAttributeI18nKey, getSystemAttributeList, getTargetAttributeName, group, hasRelationReferences, isAttributeInUseError, isDefaultRole, isDocumentAttribute, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isNotEmpty, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, number, numberFlag, object, parsePath, parseQualifiedAttribute, pathHasManyCardinality, phone, rating, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, select, status, stringFlag, text, textarea, toUndefinedIfEmpty, user, validateAttributeName, validateFormulaExpression, validatePath, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|
package/dist/index.d.ts
CHANGED
|
@@ -765,7 +765,7 @@ type Action = "read" | "create" | "update" | "delete" | "manage" | "observe";
|
|
|
765
765
|
* - `workspace`: Tenant settings and workspace-level configuration
|
|
766
766
|
* - `architect`: Architect settings, templates, and configurations
|
|
767
767
|
*/
|
|
768
|
-
type SystemResource = "people" | "workspace" | "architect" | "feature-flags" | "files" | "views" | "forms" | "documents" | "audit" | "api-keys" | "session";
|
|
768
|
+
type SystemResource = "people" | "workspace" | "architect" | "feature-flags" | "files" | "views" | "forms" | "documents" | "audit" | "api-keys" | "env-vars" | "session";
|
|
769
769
|
/**
|
|
770
770
|
* Preset access levels for simplified permission configuration.
|
|
771
771
|
* - `full`: All CRUD actions
|
|
@@ -1033,6 +1033,27 @@ interface CreateApiKeyInput {
|
|
|
1033
1033
|
actorMetadata?: Record<string, unknown>;
|
|
1034
1034
|
}
|
|
1035
1035
|
|
|
1036
|
+
/** Scope of an env var — consumer type + ID (e.g. agent definition). */
|
|
1037
|
+
interface EnvVarScope {
|
|
1038
|
+
type: string;
|
|
1039
|
+
id: string;
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* Returned by list endpoints.
|
|
1043
|
+
* The encrypted value is NEVER included — only metadata.
|
|
1044
|
+
* `isSet: true` is the only indicator that a value exists.
|
|
1045
|
+
*/
|
|
1046
|
+
interface EnvVarEntry {
|
|
1047
|
+
id: string;
|
|
1048
|
+
key: string;
|
|
1049
|
+
isSensitive: boolean;
|
|
1050
|
+
isSet: true;
|
|
1051
|
+
scopeType: string;
|
|
1052
|
+
scopeId: string | null;
|
|
1053
|
+
createdAt: string;
|
|
1054
|
+
updatedAt: string;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1036
1057
|
/**
|
|
1037
1058
|
* Type of mentionable entity
|
|
1038
1059
|
*/
|
|
@@ -1235,6 +1256,22 @@ interface AuditServiceOptions {
|
|
|
1235
1256
|
*/
|
|
1236
1257
|
flushIntervalMs?: number;
|
|
1237
1258
|
}
|
|
1259
|
+
/**
|
|
1260
|
+
* A single field-level history entry, derived from an audit log change.
|
|
1261
|
+
* Client-safe — no tenant or internal IDs.
|
|
1262
|
+
*/
|
|
1263
|
+
interface FieldHistoryEntry {
|
|
1264
|
+
id: string;
|
|
1265
|
+
field: string;
|
|
1266
|
+
oldValue: unknown;
|
|
1267
|
+
newValue: unknown;
|
|
1268
|
+
oldLabel?: string;
|
|
1269
|
+
newLabel?: string;
|
|
1270
|
+
oldLabels?: string[];
|
|
1271
|
+
newLabels?: string[];
|
|
1272
|
+
actorEmail?: string;
|
|
1273
|
+
createdAt: Date;
|
|
1274
|
+
}
|
|
1238
1275
|
|
|
1239
1276
|
type AgentRunStatus = "pending" | "running" | "completed" | "failed" | "cancelled" | "paused";
|
|
1240
1277
|
type AgentSessionStatus = "active" | "idle" | "completed" | "failed" | "cancelled" | "waiting_human" | "timeout" | "expired";
|
|
@@ -3367,6 +3404,8 @@ declare const SYSTEM_RESOURCES: {
|
|
|
3367
3404
|
readonly AUDIT: "audit";
|
|
3368
3405
|
/** Programmatic access keys */
|
|
3369
3406
|
readonly API_KEYS: "api-keys";
|
|
3407
|
+
/** Environment variables for agents */
|
|
3408
|
+
readonly ENV_VARS: "env-vars";
|
|
3370
3409
|
/** Agent session visibility — required for an agent actor to read its own sessions */
|
|
3371
3410
|
readonly SESSION: "session";
|
|
3372
3411
|
};
|
|
@@ -6679,4 +6718,4 @@ interface QualifiedRuleValidationContext {
|
|
|
6679
6718
|
}
|
|
6680
6719
|
declare function validateQualifiedRule(rule: FilterRule, context: QualifiedRuleValidationContext): void;
|
|
6681
6720
|
|
|
6682
|
-
export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, 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, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AgentConfig, type AgentContextEntry, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentQuestion, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, AttributeGroupField, AttributeInUseError, AttributeNotFoundError, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, ChangeTypeNotSupportedError, CheckboxAttribute, CompletionStatus, ConcurrentModificationError, ConfigOverrides, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CustomAttributeValue, 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, DetailViewConfig, DetailViewDefinition, DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type EffectivePermissions, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FeatureFlagDefinition, FeatureFlagsRepository, FeatureGate, Field, FieldGroup, type File, FileAttribute, type FileListOptions, type FileVisibility, FilterOperator, FilterRule, FilterState, FilterValue, FlagLevel, FlagRegistry, FlagService, FlagValueType, ForbiddenError, 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 FormSubmittedAgentEvent, type FormTextRow, FormulaAttribute, type FormulaResult, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, InvalidPathError, type InviteUserInput, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, Location, LocationAttribute, LocationGranularity, MaxDepthExceededError, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type PathCardinality, type PathSegment, type PathSegmentType, type Permission, type PermissionScope, Phone, PhoneAttribute, type PrincipalType, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentBrand, type QuestionResponse, type QuestionStatus, RatingAttribute, type ReasoningPartData, type RecordAgentEvent, type RecordMetadata, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationAttribute, RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, RelationTarget, RepositoryError, type RepositoryOperation, ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, RichtextFeature, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, SchemaOperation, type SchemaResolver, type SearchOptions, SelectAttribute, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, TextAreaAttribute, TextAttribute, type TextPartData, type ThinkingPartData, type TimeoutPolicy, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, ViewConfig, ViewDefinition, ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateFilterState, evaluateFormula, evaluateFormulaAttribute, evaluateFormulaWithResult, extractAttributeNames, extractFormulaVariables, extractRelationNames, extractRelationReferences, file, flagRegistry, flattenRelationsForEval, form, formRegistry, formatAttributeValue, formatFormulaResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getOperatorPolarity, getPathDepth, getRelationPath, getSystemAttributeI18nKey, getSystemAttributeList, getTargetAttributeName, group, hasRelationReferences, isAttributeInUseError, isDefaultRole, isDocumentAttribute, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isNotEmpty, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, number, numberFlag, object, parsePath, parseQualifiedAttribute, pathHasManyCardinality, phone, rating, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, select, status, stringFlag, text, textarea, toUndefinedIfEmpty, user, validateAttributeName, validateFormulaExpression, validatePath, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|
|
6721
|
+
export { type AIAvailableModel, type AIBatchQuestion, type AIBatchQuestionAnswer, type AIBatchQuestionOption, type AIChatMessage, type AIChatMessagePart, type AIChatMessagePartType, type AICompactionSummary, 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, type AccessAction, type AccessActionList, AccessDeniedError, type AccessLevel, type AccessPolicy, type AccessPolicyPreset, type AccessResourceType, type Action, ActivityTabConfig, type Actor, type ActorRoleAssignment, type ActorStatus, type ActorType, type AddAttributeInput, type AgentConfig, type AgentContextEntry, type AgentDashboard, type AgentDefinition, type AgentEvent, type AgentExecutionConfig, type AgentExecutionPolicy, type AgentMessageAttachment, type AgentMessagePart, type AgentQuestion, type AgentRun, type AgentRunStatus, type AgentSchedule, type AgentSession, type AgentSessionMessage, type AgentSessionMode, type AgentSessionStatus, type AgentToolCall, type AgentTriggerDefinition, type AgentTriggerType, type ApiKey, type ApiKeyAuthContext, type ApiKeyPermission, type ApiKeyWithSecret, type AssignActorRoleInput, type AssignRoleInput, Attribute, AttributeGroupField, AttributeInUseError, AttributeNotFoundError, AttributeType, type AttributeUsage, type AuditAction, type AuditActorType, type AuditChange, type AuditListOptions, type AuditLogEntry, type AuditResourceType, type AuditServiceOptions, type AuditSortField, BEHAVIOR_PROPERTIES, BilateralConfig, type BoundingBox, type BuilderConfig, ChangeTypeNotSupportedError, CheckboxAttribute, CompletionStatus, ConcurrentModificationError, ConfigOverrides, type CountMode, type CreateActorInput, type CreateApiKeyInput, type CreateAuditLogInput, type CreateCustomObjectInput, type CreateDBAttribute, type CreateDBForm, type CreateDBFormSubmission, type CreateDBObject, type CreateDBView, type CreateDBViewOverlay, type CreateFile, CreateMode, type CreateObjectRecord, type CreatePermissionInput, type CreateRoleInput, type CreateSandboxExecution, type CreateUserProfile, type CreateViewInput, type CriticConfig, Currency, CurrencyAttribute, type CustomAttributeValue, 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, DetailViewConfig, DetailViewDefinition, DetailViewLayout, DocumentAttribute, DocumentLayout, DocumentSlotConfig, DocumentSlotValidationError, DocumentsTabConfig, type DomainEvent, DuplicateError, EMPTY_VALUE_PLACEHOLDER, type EffectivePermissions, type EnvVarEntry, type EnvVarScope, type EventDataMap, type EventType, type ExtractRecord, type ExtractRecordInput, type ExtractRecordInputStrict, type ExtractRecordStrict, type ExtractRecordUpdate, type ExtractRecordUpdateStrict, FORM_FORBIDDEN_ATTRIBUTE_TYPES, FeatureFlagDefinition, FeatureFlagsRepository, FeatureGate, Field, FieldGroup, type FieldHistoryEntry, type File, FileAttribute, type FileListOptions, type FileVisibility, FilterOperator, FilterRule, FilterState, FilterValue, FlagLevel, FlagRegistry, FlagService, FlagValueType, ForbiddenError, 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 FormSubmittedAgentEvent, type FormTextRow, FormulaAttribute, type FormulaResult, FormulaReturnType, type GeocodingAdapter, type GeocodingAutocompleteParams, type GeocodingParams, type GeocodingSuggestion, type GlobalSearchGroupedOptions, type GlobalSearchGroupedResult, type GlobalSearchOptions, type GlobalSearchResultItem, type GrantResourceAccessInput, Group, GroupBuilder, IDENTITY_PROPERTIES, type InferAttributeValue, type InferQualifiedProps, InvalidPathError, type InviteUserInput, type ListOptions, ListViewBuilder, ListViewConfig, ListViewDefinition, ListViewTab, ListViewTabConfigBuilder, Location, LocationAttribute, LocationGranularity, MaxDepthExceededError, MemoryNotFoundError, type MentionEntityType, type MentionReference, type MentionedContext, type MentionedEntityContext, MigrationDefinition, MigrationTimeoutError, type ModelDefinition, MultiRelationAttribute, MultiselectAttribute, NoopGeocodingAdapter, NotFoundError, NotImplementedError, NumberAttribute, OPERATOR_SPECS, ObjectBuilder, ObjectDefinition, ObjectNotFoundError, type ObjectPermissions, ObjectReferencedError, type OcrAdapter, type OcrInput, type OcrOptions, type OcrPage, type OcrResult, type OcrTextBlock, type OperatorSpec, Option, OrphanSystemAttributeError, PRESENTATION_PROPERTIES, type PageInfo, type PageOptions, type PageResponse, type ParsedAttribute, type PathCardinality, type PathSegment, type PathSegmentType, type Permission, type PermissionScope, Phone, PhoneAttribute, type PrincipalType, PropertySchema, ProtectedResourceError, ProtectedRoleError, type ProviderName, QUALIFIED_SEPARATOR, type QualifiedDocumentBrand, type QuestionResponse, type QuestionStatus, RatingAttribute, type ReasoningPartData, type RecordAgentEvent, type RecordMetadata, RecordNotFoundError, type RecordReference, RecordReferencedError, RelationAttribute, RelationGroup, RelationGroupBuilder, type RelationOption, type RelationOptionsResponse, RelationTarget, RepositoryError, type RepositoryOperation, ResolvedFlag, type ResourceAccess, type ResourceRef, type RetryPolicy, type ReverseGeocodingParams, RichtextAttribute, RichtextFeature, RichtextTabConfig, type Role, RoleNotFoundError, RollupAttribute, RollupFunction, STANDARD_SCHEMA_VENDOR, SYSTEM_ATTRIBUTES, SYSTEM_ATTRIBUTE_I18N_KEYS, SYSTEM_RESOURCES, SYSTEM_RESOURCE_LABELS, type SandboxExecution, type SandboxExecutionInput, type SandboxExecutionResult, type SandboxExecutionStatus, type SandboxMode, type SandboxTrigger, SchemaError, SchemaErrorCode, SchemaOperation, type SchemaResolver, type SearchOptions, SelectAttribute, SidePanelConfig, type SidebarExtraItem, SingleRelationAttribute, type SlotMode, SortRule, type SpecificAccessAction, type StandardSchemaIssue, type StandardSchemaResult, StaticFlagDefault, StatusAttribute, StorageError, type StorageOperation, type StorageProvider, type StreamEventCompactionEnd, type StreamEventCompactionFailed, type StreamEventCompactionStart, type StreamEventMessagePersisted, SyncCascadeError, SyncConflictError, SyncError, type SystemAttribute, type SystemAttributeI18nKey, SystemEntityImmutableError, type SystemFields, type SystemPermissions, type SystemResource, Tab, TabBuilder, TableTab, TableTabConfig, TenantId, TextAreaAttribute, TextAttribute, type TextPartData, type ThinkingPartData, type TimeoutPolicy, Timestamps, type ToolPartData, type ToolPartState, type TriggerEventType, USER_STATUSES, type UpdateActorInput, type UpdateDBAttribute, type UpdateDBForm, type UpdateDBFormSubmission, type UpdateDBObject, type UpdateDBView, type UpdateDBViewOverlay, type UpdateFile, type UpdateObjectInput, type UpdateRoleInput, type UpdateUserProfile, type UpdateViewInput, type UpsertAccessPolicyInput, type UpsertDBAttribute, type UpsertDBObject, type UpsertDBView, UserAttribute, type UserProfile, type UserRoleAssignment, type UserStatus, Uuid, ValidationError, type ValidationErrorDetail, ViewConfig, ViewDefinition, ViewType, type WithCustomAttributes$1 as WithCustomAttributes, accessLevelToActions, actionsToAccessLevel, applyPipes, booleanFlag, buildPropertySchema, buildQualifiedAttribute, checkbox, createFlagRegistry, createFlagService, createStandardSchemaProps, currency, date, detailView, document, evaluateFilterState, evaluateFormula, evaluateFormulaAttribute, evaluateFormulaWithResult, extractAttributeNames, extractFormulaVariables, extractRelationNames, extractRelationReferences, file, flagRegistry, flattenRelationsForEval, form, formRegistry, formatAttributeValue, formatFormulaResult, formula, generateDefaultDetailView, generateDefaultListView, getActiveTab, getErrorMessage, getOperatorPolarity, getPathDepth, getRelationPath, getSystemAttributeI18nKey, getSystemAttributeList, getTargetAttributeName, group, hasRelationReferences, isAttributeInUseError, isDefaultRole, isDocumentAttribute, isEmptyObject, isFormDefinition, isFormFieldsRow, isFormFreeFieldRef, isFormHeadingRow, isFormSeparatorRow, isFormSlotFieldRef, isFormTextRow, isLabelExpression, isNotEmpty, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isStandardSchema, isValidationError, jsonFlag, listView, location, matchesMime, multiselect, normaliseDocumentSlots, normalizeForEdgeRpc, number, numberFlag, object, parsePath, parseQualifiedAttribute, pathHasManyCardinality, phone, rating, registry, relation, relationGroup, renderLabelExpression, resetViewToDefault, richtext, rollup, select, status, stringFlag, text, textarea, toUndefinedIfEmpty, user, validateAttributeName, validateFormulaExpression, validatePath, validateQualifiedRule, validateSlotAgainstConfig, viewRegistry };
|
package/dist/index.js
CHANGED
|
@@ -839,6 +839,8 @@ var SYSTEM_RESOURCES = {
|
|
|
839
839
|
AUDIT: "audit",
|
|
840
840
|
/** Programmatic access keys */
|
|
841
841
|
API_KEYS: "api-keys",
|
|
842
|
+
/** Environment variables for agents */
|
|
843
|
+
ENV_VARS: "env-vars",
|
|
842
844
|
/** Agent session visibility — required for an agent actor to read its own sessions */
|
|
843
845
|
SESSION: "session"
|
|
844
846
|
};
|
|
@@ -853,6 +855,7 @@ var ALL_SYSTEM_RESOURCES = [
|
|
|
853
855
|
SYSTEM_RESOURCES.DOCUMENTS,
|
|
854
856
|
SYSTEM_RESOURCES.AUDIT,
|
|
855
857
|
SYSTEM_RESOURCES.API_KEYS,
|
|
858
|
+
SYSTEM_RESOURCES.ENV_VARS,
|
|
856
859
|
SYSTEM_RESOURCES.SESSION
|
|
857
860
|
];
|
|
858
861
|
var SYSTEM_RESOURCE_LABELS = {
|
|
@@ -866,6 +869,7 @@ var SYSTEM_RESOURCE_LABELS = {
|
|
|
866
869
|
documents: "Documents",
|
|
867
870
|
audit: "Audit",
|
|
868
871
|
"api-keys": "API keys",
|
|
872
|
+
"env-vars": "Environment variables",
|
|
869
873
|
session: "Agent sessions"
|
|
870
874
|
};
|
|
871
875
|
var DEFAULT_ROLES = {
|
|
@@ -903,6 +907,7 @@ var DEFAULT_ROLE_PERMISSIONS = {
|
|
|
903
907
|
system: [
|
|
904
908
|
{ target: "documents", actions: ["read", "create", "update"] },
|
|
905
909
|
{ target: "files", actions: ["read", "create", "update"] },
|
|
910
|
+
{ target: "env-vars", actions: ["read"] },
|
|
906
911
|
// Required so the agent actor can read its own sessions when the worker
|
|
907
912
|
// resumes a queued job under the agent's identity (runAsAgentActor).
|
|
908
913
|
{ target: "session", actions: ["observe"] }
|
|
@@ -2593,18 +2598,17 @@ var ObjectBuilder = class {
|
|
|
2593
2598
|
throw new Error("[ObjectBuilder] Missing required field: label");
|
|
2594
2599
|
}
|
|
2595
2600
|
if (!this._labelExpression) {
|
|
2596
|
-
throw new
|
|
2597
|
-
`
|
|
2598
|
-
|
|
2599
|
-
\u2705 Example: .labelExpression("{{ name }}")
|
|
2600
|
-
\u2705 Example: .labelExpression("{{ firstName }} {{ lastName }}")`
|
|
2601
|
+
throw new chunkFQ2ZYOVS_js.SchemaError(
|
|
2602
|
+
`Object "${this.obj.name}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,
|
|
2603
|
+
chunkFQ2ZYOVS_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2601
2604
|
);
|
|
2602
2605
|
}
|
|
2603
2606
|
const labelResult = labelExpressionSchema.safeParse(this._labelExpression);
|
|
2604
2607
|
if (!labelResult.success) {
|
|
2605
2608
|
const errorMsg = labelResult.error.issues[0]?.message ?? "Invalid labelExpression";
|
|
2606
|
-
throw new
|
|
2607
|
-
`
|
|
2609
|
+
throw new chunkFQ2ZYOVS_js.SchemaError(
|
|
2610
|
+
`Invalid labelExpression for "${this.obj.name}": ${errorMsg}`,
|
|
2611
|
+
chunkFQ2ZYOVS_js.SchemaErrorCode.VALIDATION_FAILED
|
|
2608
2612
|
);
|
|
2609
2613
|
}
|
|
2610
2614
|
const sortedVersions = [...this._migrations].sort((a, b) => a.version - b.version);
|
|
@@ -2641,7 +2645,7 @@ The labelExpression defines how records are displayed in lists and relations.
|
|
|
2641
2645
|
objectNameSchema.parse(name);
|
|
2642
2646
|
} catch (error) {
|
|
2643
2647
|
if (error instanceof z3__default.default.ZodError) {
|
|
2644
|
-
throw new
|
|
2648
|
+
throw new chunkFQ2ZYOVS_js.SchemaError(error.issues[0].message, chunkFQ2ZYOVS_js.SchemaErrorCode.INVALID_OBJECT_NAME);
|
|
2645
2649
|
}
|
|
2646
2650
|
throw error;
|
|
2647
2651
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { generateId } from './chunk-QY6QFRRV.mjs';
|
|
|
2
2
|
export { asTenantId, asUserId, deepEqual, generateId, indexBy } from './chunk-QY6QFRRV.mjs';
|
|
3
3
|
import './chunk-SP3PNHYF.mjs';
|
|
4
4
|
export { parseAttributeConfig } from './chunk-U4JC7P6D.mjs';
|
|
5
|
-
import { createObjectValidator, ValidationError, createAttributeValidator } from './chunk-LTHSU4NF.mjs';
|
|
5
|
+
import { createObjectValidator, SchemaError, SchemaErrorCode, ValidationError, createAttributeValidator } from './chunk-LTHSU4NF.mjs';
|
|
6
6
|
export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReferencedError, RepositoryError, RoleNotFoundError, SchemaError, SchemaErrorCode, StorageError, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, computeRecordStatus, createFormAttributeValidator, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError, validateDraft, validateDraftOrThrow, validateObject, validateObjectOrThrow } from './chunk-LTHSU4NF.mjs';
|
|
7
7
|
import './chunk-TMYBEXBT.mjs';
|
|
8
8
|
import './chunk-4KRLCWJM.mjs';
|
|
@@ -835,6 +835,8 @@ var SYSTEM_RESOURCES = {
|
|
|
835
835
|
AUDIT: "audit",
|
|
836
836
|
/** Programmatic access keys */
|
|
837
837
|
API_KEYS: "api-keys",
|
|
838
|
+
/** Environment variables for agents */
|
|
839
|
+
ENV_VARS: "env-vars",
|
|
838
840
|
/** Agent session visibility — required for an agent actor to read its own sessions */
|
|
839
841
|
SESSION: "session"
|
|
840
842
|
};
|
|
@@ -849,6 +851,7 @@ var ALL_SYSTEM_RESOURCES = [
|
|
|
849
851
|
SYSTEM_RESOURCES.DOCUMENTS,
|
|
850
852
|
SYSTEM_RESOURCES.AUDIT,
|
|
851
853
|
SYSTEM_RESOURCES.API_KEYS,
|
|
854
|
+
SYSTEM_RESOURCES.ENV_VARS,
|
|
852
855
|
SYSTEM_RESOURCES.SESSION
|
|
853
856
|
];
|
|
854
857
|
var SYSTEM_RESOURCE_LABELS = {
|
|
@@ -862,6 +865,7 @@ var SYSTEM_RESOURCE_LABELS = {
|
|
|
862
865
|
documents: "Documents",
|
|
863
866
|
audit: "Audit",
|
|
864
867
|
"api-keys": "API keys",
|
|
868
|
+
"env-vars": "Environment variables",
|
|
865
869
|
session: "Agent sessions"
|
|
866
870
|
};
|
|
867
871
|
var DEFAULT_ROLES = {
|
|
@@ -899,6 +903,7 @@ var DEFAULT_ROLE_PERMISSIONS = {
|
|
|
899
903
|
system: [
|
|
900
904
|
{ target: "documents", actions: ["read", "create", "update"] },
|
|
901
905
|
{ target: "files", actions: ["read", "create", "update"] },
|
|
906
|
+
{ target: "env-vars", actions: ["read"] },
|
|
902
907
|
// Required so the agent actor can read its own sessions when the worker
|
|
903
908
|
// resumes a queued job under the agent's identity (runAsAgentActor).
|
|
904
909
|
{ target: "session", actions: ["observe"] }
|
|
@@ -2589,18 +2594,17 @@ var ObjectBuilder = class {
|
|
|
2589
2594
|
throw new Error("[ObjectBuilder] Missing required field: label");
|
|
2590
2595
|
}
|
|
2591
2596
|
if (!this._labelExpression) {
|
|
2592
|
-
throw new
|
|
2593
|
-
`
|
|
2594
|
-
|
|
2595
|
-
\u2705 Example: .labelExpression("{{ name }}")
|
|
2596
|
-
\u2705 Example: .labelExpression("{{ firstName }} {{ lastName }}")`
|
|
2597
|
+
throw new SchemaError(
|
|
2598
|
+
`Object "${this.obj.name}" must have a labelExpression. The labelExpression defines how records are displayed in lists and relations (e.g. "{{ name }}").`,
|
|
2599
|
+
SchemaErrorCode.VALIDATION_FAILED
|
|
2597
2600
|
);
|
|
2598
2601
|
}
|
|
2599
2602
|
const labelResult = labelExpressionSchema.safeParse(this._labelExpression);
|
|
2600
2603
|
if (!labelResult.success) {
|
|
2601
2604
|
const errorMsg = labelResult.error.issues[0]?.message ?? "Invalid labelExpression";
|
|
2602
|
-
throw new
|
|
2603
|
-
`
|
|
2605
|
+
throw new SchemaError(
|
|
2606
|
+
`Invalid labelExpression for "${this.obj.name}": ${errorMsg}`,
|
|
2607
|
+
SchemaErrorCode.VALIDATION_FAILED
|
|
2604
2608
|
);
|
|
2605
2609
|
}
|
|
2606
2610
|
const sortedVersions = [...this._migrations].sort((a, b) => a.version - b.version);
|
|
@@ -2637,7 +2641,7 @@ The labelExpression defines how records are displayed in lists and relations.
|
|
|
2637
2641
|
objectNameSchema.parse(name);
|
|
2638
2642
|
} catch (error) {
|
|
2639
2643
|
if (error instanceof z3.ZodError) {
|
|
2640
|
-
throw new
|
|
2644
|
+
throw new SchemaError(error.issues[0].message, SchemaErrorCode.INVALID_OBJECT_NAME);
|
|
2641
2645
|
}
|
|
2642
2646
|
throw error;
|
|
2643
2647
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stndrds/schema",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.192",
|
|
4
4
|
"description": "Standard schema definitions and utilities",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"expr-eval": "^2.0.2",
|
|
132
132
|
"libphonenumber-js": "^1.12.31",
|
|
133
133
|
"zod": "^4.2.1",
|
|
134
|
-
"@stndrds/constants": "1.0.0-alpha.
|
|
134
|
+
"@stndrds/constants": "1.0.0-alpha.192"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
137
|
"@types/node": "^25.0.3",
|