@objectstack/spec 0.2.0 → 0.3.1
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/README.md +127 -5
- package/dist/ai/conversation.zod.d.ts +1059 -0
- package/dist/ai/conversation.zod.d.ts.map +1 -0
- package/dist/ai/conversation.zod.js +248 -0
- package/dist/ai/cost.zod.d.ts +2025 -0
- package/dist/ai/cost.zod.d.ts.map +1 -0
- package/dist/ai/cost.zod.js +324 -0
- package/dist/ai/index.d.ts +22 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +37 -0
- package/dist/ai/model-registry.zod.d.ts +1389 -0
- package/dist/ai/model-registry.zod.d.ts.map +1 -0
- package/dist/ai/model-registry.zod.js +164 -0
- package/dist/ai/nlq.zod.d.ts +1126 -0
- package/dist/ai/nlq.zod.d.ts.map +1 -0
- package/dist/ai/nlq.zod.js +246 -0
- package/dist/ai/predictive.zod.d.ts +838 -0
- package/dist/ai/predictive.zod.d.ts.map +1 -0
- package/dist/ai/predictive.zod.js +244 -0
- package/dist/ai/rag-pipeline.zod.d.ts +1034 -0
- package/dist/ai/rag-pipeline.zod.d.ts.map +1 -0
- package/dist/ai/rag-pipeline.zod.js +244 -0
- package/dist/ai/workflow-automation.zod.d.ts +590 -0
- package/dist/ai/workflow-automation.zod.d.ts.map +1 -0
- package/dist/ai/workflow-automation.zod.js +197 -0
- package/dist/api/contract.zod.d.ts +22 -22
- package/dist/api/index.d.ts +9 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +24 -0
- package/dist/data/field.zod.d.ts +409 -4
- package/dist/data/field.zod.d.ts.map +1 -1
- package/dist/data/field.zod.js +28 -2
- package/dist/data/index.d.ts +21 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +36 -0
- package/dist/data/mapping.zod.d.ts +6 -6
- package/dist/data/object.zod.d.ts +80 -10
- package/dist/data/object.zod.d.ts.map +1 -1
- package/dist/data/query.zod.d.ts +386 -3
- package/dist/data/query.zod.d.ts.map +1 -1
- package/dist/data/query.zod.js +386 -3
- package/dist/data/validation.zod.d.ts +349 -0
- package/dist/data/validation.zod.d.ts.map +1 -1
- package/dist/data/validation.zod.js +395 -0
- package/dist/data/workflow.zod.d.ts +809 -18
- package/dist/data/workflow.zod.d.ts.map +1 -1
- package/dist/data/workflow.zod.js +115 -7
- package/dist/index.d.ts +36 -41
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +64 -49
- package/dist/system/api.zod.d.ts +4 -4
- package/dist/system/audit.zod.d.ts +1172 -0
- package/dist/system/audit.zod.d.ts.map +1 -0
- package/dist/system/audit.zod.js +596 -0
- package/dist/system/auth-protocol.d.ts +175 -0
- package/dist/system/auth-protocol.d.ts.map +1 -0
- package/dist/system/auth-protocol.js +60 -0
- package/dist/system/auth.zod.d.ts +1089 -57
- package/dist/system/auth.zod.d.ts.map +1 -1
- package/dist/system/auth.zod.js +135 -1
- package/dist/system/driver.zod.d.ts +4 -4
- package/dist/system/events.zod.d.ts +177 -0
- package/dist/system/events.zod.d.ts.map +1 -0
- package/dist/system/events.zod.js +51 -0
- package/dist/system/identity.zod.d.ts +234 -180
- package/dist/system/identity.zod.d.ts.map +1 -1
- package/dist/system/identity.zod.js +168 -51
- package/dist/system/index.d.ts +33 -0
- package/dist/system/index.d.ts.map +1 -0
- package/dist/system/index.js +48 -0
- package/dist/system/job.zod.d.ts +237 -0
- package/dist/system/job.zod.d.ts.map +1 -0
- package/dist/system/job.zod.js +82 -0
- package/dist/system/organization.zod.d.ts +179 -0
- package/dist/system/organization.zod.d.ts.map +1 -0
- package/dist/system/organization.zod.js +129 -0
- package/dist/system/realtime.zod.d.ts +135 -0
- package/dist/system/realtime.zod.d.ts.map +1 -0
- package/dist/system/realtime.zod.js +83 -0
- package/dist/system/tenant.zod.d.ts +1151 -0
- package/dist/system/tenant.zod.d.ts.map +1 -0
- package/dist/system/tenant.zod.js +498 -0
- package/dist/system/webhook.zod.d.ts +2 -2
- package/dist/ui/action.zod.d.ts +10 -10
- package/dist/ui/index.d.ts +17 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +32 -0
- package/dist/ui/theme.zod.d.ts +18 -18
- package/dist/ui/widget.zod.d.ts +40 -5
- package/dist/ui/widget.zod.d.ts.map +1 -1
- package/json-schema/README.md +127 -0
- package/json-schema/ai/AITask.json +123 -0
- package/json-schema/ai/AITaskType.json +21 -0
- package/json-schema/ai/AIWorkflowAutomation.json +379 -0
- package/json-schema/ai/AIWorkflowExecutionResult.json +105 -0
- package/json-schema/ai/AIWorkflowTrigger.json +18 -0
- package/json-schema/ai/BatchAIWorkflowExecution.json +48 -0
- package/json-schema/ai/BillingPeriod.json +18 -0
- package/json-schema/ai/BudgetLimit.json +111 -0
- package/json-schema/ai/BudgetStatus.json +91 -0
- package/json-schema/ai/BudgetType.json +17 -0
- package/json-schema/ai/ChunkingStrategy.json +133 -0
- package/json-schema/ai/ConversationAnalytics.json +86 -0
- package/json-schema/ai/ConversationContext.json +48 -0
- package/json-schema/ai/ConversationMessage.json +209 -0
- package/json-schema/ai/ConversationSession.json +458 -0
- package/json-schema/ai/ConversationSummary.json +73 -0
- package/json-schema/ai/CostAlert.json +107 -0
- package/json-schema/ai/CostAlertType.json +16 -0
- package/json-schema/ai/CostAnalytics.json +589 -0
- package/json-schema/ai/CostBreakdownDimension.json +20 -0
- package/json-schema/ai/CostBreakdownEntry.json +60 -0
- package/json-schema/ai/CostEntry.json +106 -0
- package/json-schema/ai/CostMetricType.json +17 -0
- package/json-schema/ai/CostOptimizationRecommendation.json +100 -0
- package/json-schema/ai/CostQueryFilters.json +112 -0
- package/json-schema/ai/CostReport.json +964 -0
- package/json-schema/ai/DocumentChunk.json +97 -0
- package/json-schema/ai/DocumentLoaderConfig.json +69 -0
- package/json-schema/ai/DocumentMetadata.json +61 -0
- package/json-schema/ai/EmbeddingModel.json +57 -0
- package/json-schema/ai/Entity.json +55 -0
- package/json-schema/ai/EvaluationMetrics.json +64 -0
- package/json-schema/ai/FieldSynonymConfig.json +39 -0
- package/json-schema/ai/FunctionCall.json +28 -0
- package/json-schema/ai/Hyperparameters.json +80 -0
- package/json-schema/ai/MessageContent.json +46 -0
- package/json-schema/ai/MessageContentType.json +16 -0
- package/json-schema/ai/MessagePruningEvent.json +92 -0
- package/json-schema/ai/MessageRole.json +16 -0
- package/json-schema/ai/ModelCapability.json +47 -0
- package/json-schema/ai/ModelConfig.json +181 -0
- package/json-schema/ai/ModelDrift.json +73 -0
- package/json-schema/ai/ModelFeature.json +71 -0
- package/json-schema/ai/ModelLimits.json +45 -0
- package/json-schema/ai/ModelPricing.json +28 -0
- package/json-schema/ai/ModelProvider.json +19 -0
- package/json-schema/ai/ModelRegistry.json +427 -0
- package/json-schema/ai/ModelRegistryEntry.json +239 -0
- package/json-schema/ai/ModelSelectionCriteria.json +50 -0
- package/json-schema/ai/NLQAnalytics.json +106 -0
- package/json-schema/ai/NLQFieldMapping.json +40 -0
- package/json-schema/ai/NLQModelConfig.json +78 -0
- package/json-schema/ai/NLQParseResult.json +252 -0
- package/json-schema/ai/NLQRequest.json +110 -0
- package/json-schema/ai/NLQResponse.json +288 -0
- package/json-schema/ai/NLQTrainingExample.json +120 -0
- package/json-schema/ai/PostProcessingAction.json +41 -0
- package/json-schema/ai/PredictionRequest.json +39 -0
- package/json-schema/ai/PredictionResult.json +82 -0
- package/json-schema/ai/PredictiveModel.json +445 -0
- package/json-schema/ai/PredictiveModelType.json +18 -0
- package/json-schema/ai/PromptTemplate.json +163 -0
- package/json-schema/ai/PromptVariable.json +56 -0
- package/json-schema/ai/QueryContext.json +72 -0
- package/json-schema/ai/QueryIntent.json +21 -0
- package/json-schema/ai/QueryTemplate.json +81 -0
- package/json-schema/ai/RAGPipelineConfig.json +552 -0
- package/json-schema/ai/RAGPipelineStatus.json +66 -0
- package/json-schema/ai/RAGQueryRequest.json +64 -0
- package/json-schema/ai/RAGQueryResponse.json +108 -0
- package/json-schema/ai/RerankingConfig.json +34 -0
- package/json-schema/ai/RetrievalStrategy.json +121 -0
- package/json-schema/ai/Timeframe.json +68 -0
- package/json-schema/ai/TokenBudgetConfig.json +92 -0
- package/json-schema/ai/TokenBudgetStrategy.json +16 -0
- package/json-schema/ai/TokenUsageStats.json +66 -0
- package/json-schema/ai/ToolCall.json +49 -0
- package/json-schema/ai/TrainingConfig.json +88 -0
- package/json-schema/ai/VectorStoreConfig.json +82 -0
- package/json-schema/ai/VectorStoreProvider.json +21 -0
- package/json-schema/ai/WorkflowFieldCondition.json +33 -0
- package/json-schema/ai/WorkflowSchedule.json +51 -0
- package/json-schema/data/CustomScriptAction.json +49 -0
- package/json-schema/{Field.json → data/Field.json} +50 -1
- package/json-schema/{FieldType.json → data/FieldType.json} +4 -1
- package/json-schema/data/HttpCallAction.json +81 -0
- package/json-schema/{Object.json → data/Object.json} +50 -1
- package/json-schema/data/PushNotificationAction.json +59 -0
- package/json-schema/data/SlackMessageAction.json +45 -0
- package/json-schema/data/SmsNotificationAction.json +50 -0
- package/json-schema/data/TaskCreationAction.json +59 -0
- package/json-schema/data/TeamsMessageAction.json +45 -0
- package/json-schema/data/WebhookTriggerAction.json +58 -0
- package/json-schema/data/WorkflowAction.json +465 -0
- package/json-schema/data/WorkflowRule.json +509 -0
- package/json-schema/system/Account.json +87 -0
- package/json-schema/system/AuditConfig.json +587 -0
- package/json-schema/system/AuditEvent.json +232 -0
- package/json-schema/system/AuditEventActor.json +48 -0
- package/json-schema/system/AuditEventChange.json +25 -0
- package/json-schema/system/AuditEventFilter.json +127 -0
- package/json-schema/system/AuditEventSeverity.json +19 -0
- package/json-schema/system/AuditEventTarget.json +33 -0
- package/json-schema/system/AuditEventType.json +53 -0
- package/json-schema/system/AuditRetentionPolicy.json +73 -0
- package/json-schema/system/AuditStorageConfig.json +60 -0
- package/json-schema/{AuthConfig.json → system/AuthConfig.json} +235 -0
- package/json-schema/system/CronSchedule.json +29 -0
- package/json-schema/system/DatabaseLevelIsolationStrategy.json +139 -0
- package/json-schema/system/DatabaseMapping.json +48 -0
- package/json-schema/system/EnterpriseAuthConfig.json +172 -0
- package/json-schema/system/Event.json +52 -0
- package/json-schema/system/EventHandler.json +29 -0
- package/json-schema/system/EventMetadata.json +33 -0
- package/json-schema/system/EventPersistence.json +25 -0
- package/json-schema/system/EventRoute.json +27 -0
- package/json-schema/system/IntervalSchedule.json +25 -0
- package/json-schema/system/Invitation.json +69 -0
- package/json-schema/system/InvitationStatus.json +15 -0
- package/json-schema/system/Job.json +127 -0
- package/json-schema/system/JobExecution.json +49 -0
- package/json-schema/system/JobExecutionStatus.json +15 -0
- package/json-schema/{LDAPConfig.json → system/LDAPConfig.json} +22 -5
- package/json-schema/system/LevelIsolationStrategySchema.json +93 -0
- package/json-schema/system/Member.json +46 -0
- package/json-schema/{OIDCConfig.json → system/OIDCConfig.json} +18 -3
- package/json-schema/system/OnceSchedule.json +25 -0
- package/json-schema/system/Organization.json +52 -0
- package/json-schema/system/Presence.json +40 -0
- package/json-schema/system/PresenceStatus.json +14 -0
- package/json-schema/system/RealtimeAction.json +14 -0
- package/json-schema/system/RealtimeEvent.json +51 -0
- package/json-schema/system/RealtimeEventType.json +15 -0
- package/json-schema/system/RetryPolicy.json +30 -0
- package/json-schema/system/RowLevelIsolationStrategy.json +74 -0
- package/json-schema/{SAMLConfig.json → system/SAMLConfig.json} +17 -3
- package/json-schema/system/Schedule.json +71 -0
- package/json-schema/system/Session.json +63 -0
- package/json-schema/{StandardAuthProvider.json → system/StandardAuthProvider.json} +235 -0
- package/json-schema/system/Subscription.json +65 -0
- package/json-schema/system/SubscriptionEvent.json +32 -0
- package/json-schema/system/SuspiciousActivityRule.json +175 -0
- package/json-schema/system/Tenant.json +61 -0
- package/json-schema/system/TenantIsolationConfig.json +298 -0
- package/json-schema/system/TenantIsolationLevel.json +14 -0
- package/json-schema/system/TenantQuota.json +27 -0
- package/json-schema/system/TenantSecurityPolicy.json +115 -0
- package/json-schema/system/TransportProtocol.json +14 -0
- package/json-schema/system/User.json +51 -0
- package/json-schema/system/VerificationToken.json +36 -0
- package/json-schema/{Action.json → ui/Action.json} +4 -1
- package/json-schema/{ActionParam.json → ui/ActionParam.json} +4 -1
- package/json-schema/{FieldWidgetProps.json → ui/FieldWidgetProps.json} +50 -1
- package/package.json +38 -12
- package/json-schema/AuthProtocol.json +0 -17
- package/json-schema/AuthProvider.json +0 -171
- package/json-schema/AuthenticationConfig.json +0 -601
- package/json-schema/AuthenticationProvider.json +0 -617
- package/json-schema/MenuItem.json +0 -28
- package/json-schema/WorkflowAction.json +0 -84
- package/json-schema/WorkflowRule.json +0 -128
- /package/json-schema/{AIKnowledge.json → ai/AIKnowledge.json} +0 -0
- /package/json-schema/{AIModelConfig.json → ai/AIModelConfig.json} +0 -0
- /package/json-schema/{AITool.json → ai/AITool.json} +0 -0
- /package/json-schema/{Agent.json → ai/Agent.json} +0 -0
- /package/json-schema/{ApiError.json → api/ApiError.json} +0 -0
- /package/json-schema/{BaseResponse.json → api/BaseResponse.json} +0 -0
- /package/json-schema/{BulkRequest.json → api/BulkRequest.json} +0 -0
- /package/json-schema/{BulkResponse.json → api/BulkResponse.json} +0 -0
- /package/json-schema/{CreateRequest.json → api/CreateRequest.json} +0 -0
- /package/json-schema/{DeleteResponse.json → api/DeleteResponse.json} +0 -0
- /package/json-schema/{ExportRequest.json → api/ExportRequest.json} +0 -0
- /package/json-schema/{ListRecordResponse.json → api/ListRecordResponse.json} +0 -0
- /package/json-schema/{ModificationResult.json → api/ModificationResult.json} +0 -0
- /package/json-schema/{RecordData.json → api/RecordData.json} +0 -0
- /package/json-schema/{SingleRecordResponse.json → api/SingleRecordResponse.json} +0 -0
- /package/json-schema/{UpdateRequest.json → api/UpdateRequest.json} +0 -0
- /package/json-schema/{Address.json → data/Address.json} +0 -0
- /package/json-schema/{AggregationFunction.json → data/AggregationFunction.json} +0 -0
- /package/json-schema/{AggregationNode.json → data/AggregationNode.json} +0 -0
- /package/json-schema/{AsyncValidation.json → data/AsyncValidation.json} +0 -0
- /package/json-schema/{ComparisonOperator.json → data/ComparisonOperator.json} +0 -0
- /package/json-schema/{ConditionalValidation.json → data/ConditionalValidation.json} +0 -0
- /package/json-schema/{CrossFieldValidation.json → data/CrossFieldValidation.json} +0 -0
- /package/json-schema/{CustomValidator.json → data/CustomValidator.json} +0 -0
- /package/json-schema/{Dataset.json → data/Dataset.json} +0 -0
- /package/json-schema/{DatasetMode.json → data/DatasetMode.json} +0 -0
- /package/json-schema/{EmailAlertAction.json → data/EmailAlertAction.json} +0 -0
- /package/json-schema/{EqualityOperator.json → data/EqualityOperator.json} +0 -0
- /package/json-schema/{FieldMapping.json → data/FieldMapping.json} +0 -0
- /package/json-schema/{FieldNode.json → data/FieldNode.json} +0 -0
- /package/json-schema/{FieldOperators.json → data/FieldOperators.json} +0 -0
- /package/json-schema/{FieldPermission.json → data/FieldPermission.json} +0 -0
- /package/json-schema/{FieldUpdateAction.json → data/FieldUpdateAction.json} +0 -0
- /package/json-schema/{FilterCondition.json → data/FilterCondition.json} +0 -0
- /package/json-schema/{FilterNode.json → data/FilterNode.json} +0 -0
- /package/json-schema/{FilterOperator.json → data/FilterOperator.json} +0 -0
- /package/json-schema/{Flow.json → data/Flow.json} +0 -0
- /package/json-schema/{FlowEdge.json → data/FlowEdge.json} +0 -0
- /package/json-schema/{FlowNode.json → data/FlowNode.json} +0 -0
- /package/json-schema/{FlowNodeAction.json → data/FlowNodeAction.json} +0 -0
- /package/json-schema/{FlowVariable.json → data/FlowVariable.json} +0 -0
- /package/json-schema/{FormatValidation.json → data/FormatValidation.json} +0 -0
- /package/json-schema/{Index.json → data/Index.json} +0 -0
- /package/json-schema/{JoinNode.json → data/JoinNode.json} +0 -0
- /package/json-schema/{JoinType.json → data/JoinType.json} +0 -0
- /package/json-schema/{LocationCoordinates.json → data/LocationCoordinates.json} +0 -0
- /package/json-schema/{LogicOperator.json → data/LogicOperator.json} +0 -0
- /package/json-schema/{Mapping.json → data/Mapping.json} +0 -0
- /package/json-schema/{NormalizedFilter.json → data/NormalizedFilter.json} +0 -0
- /package/json-schema/{OWDModel.json → data/OWDModel.json} +0 -0
- /package/json-schema/{ObjectCapabilities.json → data/ObjectCapabilities.json} +0 -0
- /package/json-schema/{ObjectPermission.json → data/ObjectPermission.json} +0 -0
- /package/json-schema/{PermissionSet.json → data/PermissionSet.json} +0 -0
- /package/json-schema/{Query.json → data/Query.json} +0 -0
- /package/json-schema/{QueryFilter.json → data/QueryFilter.json} +0 -0
- /package/json-schema/{RangeOperator.json → data/RangeOperator.json} +0 -0
- /package/json-schema/{ScriptValidation.json → data/ScriptValidation.json} +0 -0
- /package/json-schema/{SelectOption.json → data/SelectOption.json} +0 -0
- /package/json-schema/{SetOperator.json → data/SetOperator.json} +0 -0
- /package/json-schema/{SharingLevel.json → data/SharingLevel.json} +0 -0
- /package/json-schema/{SharingRule.json → data/SharingRule.json} +0 -0
- /package/json-schema/{SharingRuleType.json → data/SharingRuleType.json} +0 -0
- /package/json-schema/{SortNode.json → data/SortNode.json} +0 -0
- /package/json-schema/{SpecialOperator.json → data/SpecialOperator.json} +0 -0
- /package/json-schema/{StateMachineValidation.json → data/StateMachineValidation.json} +0 -0
- /package/json-schema/{StringOperator.json → data/StringOperator.json} +0 -0
- /package/json-schema/{TransformType.json → data/TransformType.json} +0 -0
- /package/json-schema/{Trigger.json → data/Trigger.json} +0 -0
- /package/json-schema/{TriggerAction.json → data/TriggerAction.json} +0 -0
- /package/json-schema/{TriggerContext.json → data/TriggerContext.json} +0 -0
- /package/json-schema/{TriggerTiming.json → data/TriggerTiming.json} +0 -0
- /package/json-schema/{UniquenessValidation.json → data/UniquenessValidation.json} +0 -0
- /package/json-schema/{ValidationRule.json → data/ValidationRule.json} +0 -0
- /package/json-schema/{WindowFunction.json → data/WindowFunction.json} +0 -0
- /package/json-schema/{WindowFunctionNode.json → data/WindowFunctionNode.json} +0 -0
- /package/json-schema/{WindowSpec.json → data/WindowSpec.json} +0 -0
- /package/json-schema/{WorkflowTriggerType.json → data/WorkflowTriggerType.json} +0 -0
- /package/json-schema/{AccountLinkingConfig.json → system/AccountLinkingConfig.json} +0 -0
- /package/json-schema/{ApiCapabilities.json → system/ApiCapabilities.json} +0 -0
- /package/json-schema/{ApiEndpoint.json → system/ApiEndpoint.json} +0 -0
- /package/json-schema/{ApiMapping.json → system/ApiMapping.json} +0 -0
- /package/json-schema/{ApiRoutes.json → system/ApiRoutes.json} +0 -0
- /package/json-schema/{AuditPolicy.json → system/AuditPolicy.json} +0 -0
- /package/json-schema/{AuthPluginConfig.json → system/AuthPluginConfig.json} +0 -0
- /package/json-schema/{AuthStrategy.json → system/AuthStrategy.json} +0 -0
- /package/json-schema/{CSRFConfig.json → system/CSRFConfig.json} +0 -0
- /package/json-schema/{DatabaseAdapter.json → system/DatabaseAdapter.json} +0 -0
- /package/json-schema/{Datasource.json → system/Datasource.json} +0 -0
- /package/json-schema/{DatasourceCapabilities.json → system/DatasourceCapabilities.json} +0 -0
- /package/json-schema/{Discovery.json → system/Discovery.json} +0 -0
- /package/json-schema/{DriverCapabilities.json → system/DriverCapabilities.json} +0 -0
- /package/json-schema/{DriverDefinition.json → system/DriverDefinition.json} +0 -0
- /package/json-schema/{DriverInterface.json → system/DriverInterface.json} +0 -0
- /package/json-schema/{DriverOptions.json → system/DriverOptions.json} +0 -0
- /package/json-schema/{DriverType.json → system/DriverType.json} +0 -0
- /package/json-schema/{EmailPasswordConfig.json → system/EmailPasswordConfig.json} +0 -0
- /package/json-schema/{Feature.json → system/Feature.json} +0 -0
- /package/json-schema/{HttpMethod.json → system/HttpMethod.json} +0 -0
- /package/json-schema/{I18nContext.json → system/I18nContext.json} +0 -0
- /package/json-schema/{License.json → system/License.json} +0 -0
- /package/json-schema/{Locale.json → system/Locale.json} +0 -0
- /package/json-schema/{Logger.json → system/Logger.json} +0 -0
- /package/json-schema/{MagicLinkConfig.json → system/MagicLinkConfig.json} +0 -0
- /package/json-schema/{Manifest.json → system/Manifest.json} +0 -0
- /package/json-schema/{MetricType.json → system/MetricType.json} +0 -0
- /package/json-schema/{NetworkPolicy.json → system/NetworkPolicy.json} +0 -0
- /package/json-schema/{OAuthProvider.json → system/OAuthProvider.json} +0 -0
- /package/json-schema/{ObjectQLClient.json → system/ObjectQLClient.json} +0 -0
- /package/json-schema/{PasskeyConfig.json → system/PasskeyConfig.json} +0 -0
- /package/json-schema/{PasswordPolicy.json → system/PasswordPolicy.json} +0 -0
- /package/json-schema/{Plan.json → system/Plan.json} +0 -0
- /package/json-schema/{Plugin.json → system/Plugin.json} +0 -0
- /package/json-schema/{PluginContext.json → system/PluginContext.json} +0 -0
- /package/json-schema/{PluginLifecycle.json → system/PluginLifecycle.json} +0 -0
- /package/json-schema/{Policy.json → system/Policy.json} +0 -0
- /package/json-schema/{RateLimit.json → system/RateLimit.json} +0 -0
- /package/json-schema/{RateLimitConfig.json → system/RateLimitConfig.json} +0 -0
- /package/json-schema/{Role.json → system/Role.json} +0 -0
- /package/json-schema/{Router.json → system/Router.json} +0 -0
- /package/json-schema/{Scheduler.json → system/Scheduler.json} +0 -0
- /package/json-schema/{ScopedStorage.json → system/ScopedStorage.json} +0 -0
- /package/json-schema/{SessionConfig.json → system/SessionConfig.json} +0 -0
- /package/json-schema/{SessionPolicy.json → system/SessionPolicy.json} +0 -0
- /package/json-schema/{SystemAPI.json → system/SystemAPI.json} +0 -0
- /package/json-schema/{Territory.json → system/Territory.json} +0 -0
- /package/json-schema/{TerritoryModel.json → system/TerritoryModel.json} +0 -0
- /package/json-schema/{TerritoryType.json → system/TerritoryType.json} +0 -0
- /package/json-schema/{TranslationBundle.json → system/TranslationBundle.json} +0 -0
- /package/json-schema/{TranslationData.json → system/TranslationData.json} +0 -0
- /package/json-schema/{TwoFactorConfig.json → system/TwoFactorConfig.json} +0 -0
- /package/json-schema/{UserFieldMapping.json → system/UserFieldMapping.json} +0 -0
- /package/json-schema/{Webhook.json → system/Webhook.json} +0 -0
- /package/json-schema/{WebhookReceiver.json → system/WebhookReceiver.json} +0 -0
- /package/json-schema/{WebhookTriggerType.json → system/WebhookTriggerType.json} +0 -0
- /package/json-schema/{Animation.json → ui/Animation.json} +0 -0
- /package/json-schema/{App.json → ui/App.json} +0 -0
- /package/json-schema/{AppBranding.json → ui/AppBranding.json} +0 -0
- /package/json-schema/{BorderRadius.json → ui/BorderRadius.json} +0 -0
- /package/json-schema/{Breakpoints.json → ui/Breakpoints.json} +0 -0
- /package/json-schema/{CalendarConfig.json → ui/CalendarConfig.json} +0 -0
- /package/json-schema/{ChartType.json → ui/ChartType.json} +0 -0
- /package/json-schema/{ColorPalette.json → ui/ColorPalette.json} +0 -0
- /package/json-schema/{Dashboard.json → ui/Dashboard.json} +0 -0
- /package/json-schema/{DashboardNavItem.json → ui/DashboardNavItem.json} +0 -0
- /package/json-schema/{DashboardWidget.json → ui/DashboardWidget.json} +0 -0
- /package/json-schema/{FormSection.json → ui/FormSection.json} +0 -0
- /package/json-schema/{FormView.json → ui/FormView.json} +0 -0
- /package/json-schema/{GanttConfig.json → ui/GanttConfig.json} +0 -0
- /package/json-schema/{GroupNavItem.json → ui/GroupNavItem.json} +0 -0
- /package/json-schema/{KanbanConfig.json → ui/KanbanConfig.json} +0 -0
- /package/json-schema/{ListView.json → ui/ListView.json} +0 -0
- /package/json-schema/{NavigationItem.json → ui/NavigationItem.json} +0 -0
- /package/json-schema/{ObjectNavItem.json → ui/ObjectNavItem.json} +0 -0
- /package/json-schema/{Page.json → ui/Page.json} +0 -0
- /package/json-schema/{PageComponent.json → ui/PageComponent.json} +0 -0
- /package/json-schema/{PageNavItem.json → ui/PageNavItem.json} +0 -0
- /package/json-schema/{PageRegion.json → ui/PageRegion.json} +0 -0
- /package/json-schema/{Report.json → ui/Report.json} +0 -0
- /package/json-schema/{ReportChart.json → ui/ReportChart.json} +0 -0
- /package/json-schema/{ReportColumn.json → ui/ReportColumn.json} +0 -0
- /package/json-schema/{ReportGrouping.json → ui/ReportGrouping.json} +0 -0
- /package/json-schema/{ReportType.json → ui/ReportType.json} +0 -0
- /package/json-schema/{Shadow.json → ui/Shadow.json} +0 -0
- /package/json-schema/{Spacing.json → ui/Spacing.json} +0 -0
- /package/json-schema/{Theme.json → ui/Theme.json} +0 -0
- /package/json-schema/{ThemeMode.json → ui/ThemeMode.json} +0 -0
- /package/json-schema/{Typography.json → ui/Typography.json} +0 -0
- /package/json-schema/{UrlNavItem.json → ui/UrlNavItem.json} +0 -0
- /package/json-schema/{View.json → ui/View.json} +0 -0
- /package/json-schema/{ZIndex.json → ui/ZIndex.json} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant.zod.d.ts","sourceRoot":"","sources":["../../src/system/tenant.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;GAWG;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,gEAI/B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,iBAAiB;IAC5B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,YAAY;IACvB;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;OAEG;;QA/CH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCH,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,+BAA+B;;IAG1C;;OAEG;;QAED;;WAEG;;QAGH;;WAEG;;QAOH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGL,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,kCAAkC;;IAG7C;;OAEG;;QAED;;;;WAIG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAOH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGL,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,eAAO,MAAM,oCAAoC;;IAG/C;;OAEG;;QAED;;;;WAIG;;QAGH;;WAEG;;QAOH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAOH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGL,CAAC;AAEH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B;;IAzUtC;;OAEG;;QAED;;WAEG;;QAGH;;WAEG;;QAOH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuDL;;OAEG;;QAED;;;;WAIG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAOH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0DL;;OAEG;;QAED;;;;WAIG;;QAGH;;WAEG;;QAOH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAOH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiBL,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,0BAA0B;IACrC;;OAEG;;QAED;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;IAIL;;OAEG;;QAED;;WAEG;;QAUH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;YAED;;eAEG;;YAGH;;eAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIP,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TenantSecurityPolicySchema = exports.TenantIsolationConfigSchema = exports.DatabaseLevelIsolationStrategySchema = exports.SchemaLevelIsolationStrategySchema = exports.RowLevelIsolationStrategySchema = exports.TenantSchema = exports.TenantQuotaSchema = exports.TenantIsolationLevel = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Tenant Schema (Multi-Tenant Architecture)
|
|
7
|
+
*
|
|
8
|
+
* Defines the tenant/tenancy model for ObjectStack SaaS deployments.
|
|
9
|
+
* Supports different levels of data isolation to meet varying security,
|
|
10
|
+
* performance, and compliance requirements.
|
|
11
|
+
*
|
|
12
|
+
* Isolation Levels:
|
|
13
|
+
* - shared_schema: All tenants share the same database and schema (row-level isolation)
|
|
14
|
+
* - isolated_schema: Tenants have separate schemas within a shared database
|
|
15
|
+
* - isolated_db: Each tenant has a completely separate database
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Tenant Isolation Level Enum
|
|
19
|
+
* Defines how tenant data is separated in the system
|
|
20
|
+
*/
|
|
21
|
+
exports.TenantIsolationLevel = zod_1.z.enum([
|
|
22
|
+
'shared_schema', // Shared DB, shared schema, row-level isolation (most economical)
|
|
23
|
+
'isolated_schema', // Shared DB, separate schema per tenant (balanced)
|
|
24
|
+
'isolated_db', // Separate database per tenant (maximum isolation)
|
|
25
|
+
]);
|
|
26
|
+
/**
|
|
27
|
+
* Tenant Quota Schema
|
|
28
|
+
* Defines resource limits and usage quotas for a tenant
|
|
29
|
+
*/
|
|
30
|
+
exports.TenantQuotaSchema = zod_1.z.object({
|
|
31
|
+
/**
|
|
32
|
+
* Maximum number of users allowed for this tenant
|
|
33
|
+
*/
|
|
34
|
+
maxUsers: zod_1.z.number().int().positive().optional().describe('Maximum number of users'),
|
|
35
|
+
/**
|
|
36
|
+
* Maximum storage space in bytes
|
|
37
|
+
*/
|
|
38
|
+
maxStorage: zod_1.z.number().int().positive().optional().describe('Maximum storage in bytes'),
|
|
39
|
+
/**
|
|
40
|
+
* API rate limit (requests per minute)
|
|
41
|
+
*/
|
|
42
|
+
apiRateLimit: zod_1.z.number().int().positive().optional().describe('API requests per minute'),
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* Tenant Schema
|
|
46
|
+
* Represents a tenant in a multi-tenant SaaS deployment
|
|
47
|
+
*/
|
|
48
|
+
exports.TenantSchema = zod_1.z.object({
|
|
49
|
+
/**
|
|
50
|
+
* Unique tenant identifier
|
|
51
|
+
*/
|
|
52
|
+
id: zod_1.z.string().describe('Unique tenant identifier'),
|
|
53
|
+
/**
|
|
54
|
+
* Tenant name (display name)
|
|
55
|
+
*/
|
|
56
|
+
name: zod_1.z.string().describe('Tenant display name'),
|
|
57
|
+
/**
|
|
58
|
+
* Data isolation level for this tenant
|
|
59
|
+
* Determines how tenant data is segregated from other tenants
|
|
60
|
+
*/
|
|
61
|
+
isolationLevel: exports.TenantIsolationLevel.describe('Data isolation strategy'),
|
|
62
|
+
/**
|
|
63
|
+
* Custom configurations and metadata specific to this tenant
|
|
64
|
+
* Can store tenant-specific settings, branding, features, etc.
|
|
65
|
+
*/
|
|
66
|
+
customizations: zod_1.z.record(zod_1.z.any()).optional().describe('Tenant-specific customizations'),
|
|
67
|
+
/**
|
|
68
|
+
* Resource quotas and limits for this tenant
|
|
69
|
+
*/
|
|
70
|
+
quotas: exports.TenantQuotaSchema.optional().describe('Resource quotas and limits'),
|
|
71
|
+
});
|
|
72
|
+
/**
|
|
73
|
+
* Tenant Isolation Strategy Documentation
|
|
74
|
+
*
|
|
75
|
+
* Comprehensive documentation of three isolation strategies for multi-tenant systems.
|
|
76
|
+
* Each strategy has different trade-offs in terms of security, cost, complexity, and compliance.
|
|
77
|
+
*/
|
|
78
|
+
/**
|
|
79
|
+
* Row-Level Isolation Strategy (shared_schema)
|
|
80
|
+
*
|
|
81
|
+
* Recommended for: Most SaaS applications, cost-sensitive deployments
|
|
82
|
+
*
|
|
83
|
+
* IMPLEMENTATION:
|
|
84
|
+
* - All tenants share the same database and schema
|
|
85
|
+
* - Each table includes a tenant_id column
|
|
86
|
+
* - PostgreSQL Row-Level Security (RLS) enforces isolation
|
|
87
|
+
* - Queries automatically filter by tenant_id via RLS policies
|
|
88
|
+
*
|
|
89
|
+
* ADVANTAGES:
|
|
90
|
+
* ✅ Simple backup and restore (single database)
|
|
91
|
+
* ✅ Cost-effective (shared resources, minimal overhead)
|
|
92
|
+
* ✅ Easy tenant migration (update tenant_id)
|
|
93
|
+
* ✅ Efficient resource utilization (connection pooling)
|
|
94
|
+
* ✅ Simple schema migrations (single schema to update)
|
|
95
|
+
* ✅ Lower operational complexity
|
|
96
|
+
*
|
|
97
|
+
* DISADVANTAGES:
|
|
98
|
+
* ❌ RLS misconfiguration can lead to data leakage
|
|
99
|
+
* ❌ Performance impact from RLS policy evaluation
|
|
100
|
+
* ❌ Noisy neighbor problem (one tenant can affect others)
|
|
101
|
+
* ❌ Cannot easily isolate tenant to different hardware
|
|
102
|
+
* ❌ Compliance challenges for regulated industries
|
|
103
|
+
*
|
|
104
|
+
* SECURITY CONSIDERATIONS:
|
|
105
|
+
* - Requires careful RLS policy configuration
|
|
106
|
+
* - Must validate tenant_id in all queries
|
|
107
|
+
* - Need comprehensive testing of RLS policies
|
|
108
|
+
* - Audit all database access patterns
|
|
109
|
+
* - Implement application-level validation as defense-in-depth
|
|
110
|
+
*
|
|
111
|
+
* EXAMPLE RLS POLICY (PostgreSQL):
|
|
112
|
+
* ```sql
|
|
113
|
+
* -- Example: Apply RLS policy to a table (e.g., "app_data")
|
|
114
|
+
* CREATE POLICY tenant_isolation ON app_data
|
|
115
|
+
* USING (tenant_id = current_setting('app.current_tenant')::text);
|
|
116
|
+
*
|
|
117
|
+
* ALTER TABLE app_data ENABLE ROW LEVEL SECURITY;
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
exports.RowLevelIsolationStrategySchema = zod_1.z.object({
|
|
121
|
+
strategy: zod_1.z.literal('shared_schema').describe('Row-level isolation strategy'),
|
|
122
|
+
/**
|
|
123
|
+
* Database configuration for row-level isolation
|
|
124
|
+
*/
|
|
125
|
+
database: zod_1.z.object({
|
|
126
|
+
/**
|
|
127
|
+
* Whether to enable Row-Level Security (RLS)
|
|
128
|
+
*/
|
|
129
|
+
enableRLS: zod_1.z.boolean().default(true).describe('Enable PostgreSQL Row-Level Security'),
|
|
130
|
+
/**
|
|
131
|
+
* Tenant context setting method
|
|
132
|
+
*/
|
|
133
|
+
contextMethod: zod_1.z.enum([
|
|
134
|
+
'session_variable', // SET app.current_tenant = 'tenant_123'
|
|
135
|
+
'search_path', // SET search_path = tenant_123, public
|
|
136
|
+
'application_name', // SET application_name = 'tenant_123'
|
|
137
|
+
]).default('session_variable').describe('How to set tenant context'),
|
|
138
|
+
/**
|
|
139
|
+
* Session variable name for tenant context
|
|
140
|
+
*/
|
|
141
|
+
contextVariable: zod_1.z.string().default('app.current_tenant').describe('Session variable name'),
|
|
142
|
+
/**
|
|
143
|
+
* Whether to validate tenant_id at application level
|
|
144
|
+
*/
|
|
145
|
+
applicationValidation: zod_1.z.boolean().default(true).describe('Application-level tenant validation'),
|
|
146
|
+
}).optional().describe('Database configuration'),
|
|
147
|
+
/**
|
|
148
|
+
* Performance optimization settings
|
|
149
|
+
*/
|
|
150
|
+
performance: zod_1.z.object({
|
|
151
|
+
/**
|
|
152
|
+
* Whether to use partial indexes for tenant_id
|
|
153
|
+
*/
|
|
154
|
+
usePartialIndexes: zod_1.z.boolean().default(true).describe('Use partial indexes per tenant'),
|
|
155
|
+
/**
|
|
156
|
+
* Whether to use table partitioning
|
|
157
|
+
*/
|
|
158
|
+
usePartitioning: zod_1.z.boolean().default(false).describe('Use table partitioning by tenant_id'),
|
|
159
|
+
/**
|
|
160
|
+
* Connection pool size per tenant
|
|
161
|
+
*/
|
|
162
|
+
poolSizePerTenant: zod_1.z.number().int().positive().optional().describe('Connection pool size per tenant'),
|
|
163
|
+
}).optional().describe('Performance settings'),
|
|
164
|
+
});
|
|
165
|
+
/**
|
|
166
|
+
* Schema-Level Isolation Strategy (isolated_schema)
|
|
167
|
+
*
|
|
168
|
+
* Recommended for: Enterprise SaaS, B2B platforms with compliance needs
|
|
169
|
+
*
|
|
170
|
+
* IMPLEMENTATION:
|
|
171
|
+
* - All tenants share the same database server
|
|
172
|
+
* - Each tenant has a separate database schema
|
|
173
|
+
* - Schema name typically: tenant_<tenant_id>
|
|
174
|
+
* - Application switches schema using SET search_path
|
|
175
|
+
*
|
|
176
|
+
* ADVANTAGES:
|
|
177
|
+
* ✅ Better isolation than row-level (schema boundaries)
|
|
178
|
+
* ✅ Easier to debug (separate schemas)
|
|
179
|
+
* ✅ Can grant different database permissions per schema
|
|
180
|
+
* ✅ Reduced risk of data leakage
|
|
181
|
+
* ✅ Performance isolation (indexes, statistics per schema)
|
|
182
|
+
* ✅ Simplified queries (no tenant_id filtering needed)
|
|
183
|
+
*
|
|
184
|
+
* DISADVANTAGES:
|
|
185
|
+
* ❌ More complex backups (must backup all schemas)
|
|
186
|
+
* ❌ Higher migration costs (schema changes across all tenants)
|
|
187
|
+
* ❌ Schema proliferation (PostgreSQL has limits)
|
|
188
|
+
* ❌ Connection overhead (switching schemas)
|
|
189
|
+
* ❌ More complex monitoring and maintenance
|
|
190
|
+
*
|
|
191
|
+
* SECURITY CONSIDERATIONS:
|
|
192
|
+
* - Ensure proper schema permissions (GRANT USAGE ON SCHEMA)
|
|
193
|
+
* - Validate schema name to prevent SQL injection
|
|
194
|
+
* - Implement connection-level schema switching
|
|
195
|
+
* - Audit schema access patterns
|
|
196
|
+
* - Prevent cross-schema queries in application
|
|
197
|
+
*
|
|
198
|
+
* EXAMPLE IMPLEMENTATION (PostgreSQL):
|
|
199
|
+
* ```sql
|
|
200
|
+
* -- Create tenant schema
|
|
201
|
+
* CREATE SCHEMA tenant_123;
|
|
202
|
+
*
|
|
203
|
+
* -- Grant access
|
|
204
|
+
* GRANT USAGE ON SCHEMA tenant_123 TO app_user;
|
|
205
|
+
*
|
|
206
|
+
* -- Switch to tenant schema
|
|
207
|
+
* SET search_path TO tenant_123, public;
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
exports.SchemaLevelIsolationStrategySchema = zod_1.z.object({
|
|
211
|
+
strategy: zod_1.z.literal('isolated_schema').describe('Schema-level isolation strategy'),
|
|
212
|
+
/**
|
|
213
|
+
* Schema configuration
|
|
214
|
+
*/
|
|
215
|
+
schema: zod_1.z.object({
|
|
216
|
+
/**
|
|
217
|
+
* Schema naming pattern
|
|
218
|
+
* Use {tenant_id} as placeholder (must contain only alphanumeric and underscores)
|
|
219
|
+
* The tenant_id will be sanitized before substitution to prevent SQL injection
|
|
220
|
+
*/
|
|
221
|
+
namingPattern: zod_1.z.string().default('tenant_{tenant_id}').describe('Schema naming pattern'),
|
|
222
|
+
/**
|
|
223
|
+
* Whether to include public schema in search_path
|
|
224
|
+
*/
|
|
225
|
+
includePublicSchema: zod_1.z.boolean().default(true).describe('Include public schema'),
|
|
226
|
+
/**
|
|
227
|
+
* Default schema for shared resources
|
|
228
|
+
*/
|
|
229
|
+
sharedSchema: zod_1.z.string().default('public').describe('Schema for shared resources'),
|
|
230
|
+
/**
|
|
231
|
+
* Whether to automatically create schema on tenant creation
|
|
232
|
+
*/
|
|
233
|
+
autoCreateSchema: zod_1.z.boolean().default(true).describe('Auto-create schema'),
|
|
234
|
+
}).optional().describe('Schema configuration'),
|
|
235
|
+
/**
|
|
236
|
+
* Migration configuration
|
|
237
|
+
*/
|
|
238
|
+
migrations: zod_1.z.object({
|
|
239
|
+
/**
|
|
240
|
+
* Migration strategy
|
|
241
|
+
*/
|
|
242
|
+
strategy: zod_1.z.enum([
|
|
243
|
+
'parallel', // Run migrations on all schemas in parallel
|
|
244
|
+
'sequential', // Run migrations one schema at a time
|
|
245
|
+
'on_demand', // Run migrations when tenant accesses system
|
|
246
|
+
]).default('parallel').describe('Migration strategy'),
|
|
247
|
+
/**
|
|
248
|
+
* Maximum concurrent migrations
|
|
249
|
+
*/
|
|
250
|
+
maxConcurrent: zod_1.z.number().int().positive().default(10).describe('Max concurrent migrations'),
|
|
251
|
+
/**
|
|
252
|
+
* Whether to rollback on first failure
|
|
253
|
+
*/
|
|
254
|
+
rollbackOnError: zod_1.z.boolean().default(true).describe('Rollback on error'),
|
|
255
|
+
}).optional().describe('Migration configuration'),
|
|
256
|
+
/**
|
|
257
|
+
* Performance optimization settings
|
|
258
|
+
*/
|
|
259
|
+
performance: zod_1.z.object({
|
|
260
|
+
/**
|
|
261
|
+
* Whether to use connection pooling per schema
|
|
262
|
+
*/
|
|
263
|
+
poolPerSchema: zod_1.z.boolean().default(false).describe('Separate pool per schema'),
|
|
264
|
+
/**
|
|
265
|
+
* Schema cache TTL in seconds
|
|
266
|
+
*/
|
|
267
|
+
schemaCacheTTL: zod_1.z.number().int().positive().default(3600).describe('Schema cache TTL'),
|
|
268
|
+
}).optional().describe('Performance settings'),
|
|
269
|
+
});
|
|
270
|
+
/**
|
|
271
|
+
* Database-Level Isolation Strategy (isolated_db)
|
|
272
|
+
*
|
|
273
|
+
* Recommended for: Regulated industries (healthcare, finance), strict compliance requirements
|
|
274
|
+
*
|
|
275
|
+
* IMPLEMENTATION:
|
|
276
|
+
* - Each tenant has a completely separate database
|
|
277
|
+
* - Database name typically: tenant_<tenant_id>
|
|
278
|
+
* - Requires separate connection pool per tenant
|
|
279
|
+
* - Complete physical and logical isolation
|
|
280
|
+
*
|
|
281
|
+
* ADVANTAGES:
|
|
282
|
+
* ✅ Perfect data isolation (strongest security)
|
|
283
|
+
* ✅ Meets strict regulatory requirements (HIPAA, SOX, PCI-DSS)
|
|
284
|
+
* ✅ Complete performance isolation (no noisy neighbors)
|
|
285
|
+
* ✅ Can place databases on different hardware
|
|
286
|
+
* ✅ Easy to backup/restore individual tenant
|
|
287
|
+
* ✅ Simplified compliance auditing per tenant
|
|
288
|
+
* ✅ Can apply different encryption keys per database
|
|
289
|
+
*
|
|
290
|
+
* DISADVANTAGES:
|
|
291
|
+
* ❌ Most expensive option (resource overhead)
|
|
292
|
+
* ❌ Complex database server management (many databases)
|
|
293
|
+
* ❌ Connection pool limits (max connections per server)
|
|
294
|
+
* ❌ Difficult cross-tenant analytics
|
|
295
|
+
* ❌ Higher operational complexity
|
|
296
|
+
* ❌ Schema migrations take longer (many databases)
|
|
297
|
+
*
|
|
298
|
+
* SECURITY CONSIDERATIONS:
|
|
299
|
+
* - Each database can have separate credentials
|
|
300
|
+
* - Enables per-tenant encryption at rest
|
|
301
|
+
* - Simplifies compliance and audit trails
|
|
302
|
+
* - Prevents any cross-tenant data access
|
|
303
|
+
* - Supports tenant-specific backup schedules
|
|
304
|
+
*
|
|
305
|
+
* EXAMPLE IMPLEMENTATION (PostgreSQL):
|
|
306
|
+
* ```sql
|
|
307
|
+
* -- Create tenant database
|
|
308
|
+
* CREATE DATABASE tenant_123
|
|
309
|
+
* WITH OWNER = tenant_123_user
|
|
310
|
+
* ENCODING = 'UTF8'
|
|
311
|
+
* LC_COLLATE = 'en_US.UTF-8'
|
|
312
|
+
* LC_CTYPE = 'en_US.UTF-8';
|
|
313
|
+
*
|
|
314
|
+
* -- Connect to tenant database
|
|
315
|
+
* \c tenant_123
|
|
316
|
+
* ```
|
|
317
|
+
*/
|
|
318
|
+
exports.DatabaseLevelIsolationStrategySchema = zod_1.z.object({
|
|
319
|
+
strategy: zod_1.z.literal('isolated_db').describe('Database-level isolation strategy'),
|
|
320
|
+
/**
|
|
321
|
+
* Database configuration
|
|
322
|
+
*/
|
|
323
|
+
database: zod_1.z.object({
|
|
324
|
+
/**
|
|
325
|
+
* Database naming pattern
|
|
326
|
+
* Use {tenant_id} as placeholder (must contain only alphanumeric and underscores)
|
|
327
|
+
* The tenant_id will be sanitized before substitution to prevent SQL injection
|
|
328
|
+
*/
|
|
329
|
+
namingPattern: zod_1.z.string().default('tenant_{tenant_id}').describe('Database naming pattern'),
|
|
330
|
+
/**
|
|
331
|
+
* Database server/cluster assignment strategy
|
|
332
|
+
*/
|
|
333
|
+
serverStrategy: zod_1.z.enum([
|
|
334
|
+
'shared', // All tenant databases on same server
|
|
335
|
+
'sharded', // Tenant databases distributed across servers
|
|
336
|
+
'dedicated', // Each tenant gets dedicated server (enterprise)
|
|
337
|
+
]).default('shared').describe('Server assignment strategy'),
|
|
338
|
+
/**
|
|
339
|
+
* Whether to use separate credentials per tenant
|
|
340
|
+
*/
|
|
341
|
+
separateCredentials: zod_1.z.boolean().default(true).describe('Separate credentials per tenant'),
|
|
342
|
+
/**
|
|
343
|
+
* Whether to automatically create database on tenant creation
|
|
344
|
+
*/
|
|
345
|
+
autoCreateDatabase: zod_1.z.boolean().default(true).describe('Auto-create database'),
|
|
346
|
+
}).optional().describe('Database configuration'),
|
|
347
|
+
/**
|
|
348
|
+
* Connection pooling configuration
|
|
349
|
+
*/
|
|
350
|
+
connectionPool: zod_1.z.object({
|
|
351
|
+
/**
|
|
352
|
+
* Pool size per tenant database
|
|
353
|
+
*/
|
|
354
|
+
poolSize: zod_1.z.number().int().positive().default(10).describe('Connection pool size'),
|
|
355
|
+
/**
|
|
356
|
+
* Maximum number of tenant pools to keep active
|
|
357
|
+
*/
|
|
358
|
+
maxActivePools: zod_1.z.number().int().positive().default(100).describe('Max active pools'),
|
|
359
|
+
/**
|
|
360
|
+
* Idle pool timeout in seconds
|
|
361
|
+
*/
|
|
362
|
+
idleTimeout: zod_1.z.number().int().positive().default(300).describe('Idle pool timeout'),
|
|
363
|
+
/**
|
|
364
|
+
* Whether to use connection pooler (PgBouncer, etc.)
|
|
365
|
+
*/
|
|
366
|
+
usePooler: zod_1.z.boolean().default(true).describe('Use connection pooler'),
|
|
367
|
+
}).optional().describe('Connection pool configuration'),
|
|
368
|
+
/**
|
|
369
|
+
* Backup and restore configuration
|
|
370
|
+
*/
|
|
371
|
+
backup: zod_1.z.object({
|
|
372
|
+
/**
|
|
373
|
+
* Backup strategy per tenant
|
|
374
|
+
*/
|
|
375
|
+
strategy: zod_1.z.enum([
|
|
376
|
+
'individual', // Separate backup per tenant
|
|
377
|
+
'consolidated', // Combined backup with all tenants
|
|
378
|
+
'on_demand', // Backup only when requested
|
|
379
|
+
]).default('individual').describe('Backup strategy'),
|
|
380
|
+
/**
|
|
381
|
+
* Backup frequency in hours
|
|
382
|
+
*/
|
|
383
|
+
frequencyHours: zod_1.z.number().int().positive().default(24).describe('Backup frequency'),
|
|
384
|
+
/**
|
|
385
|
+
* Retention period in days
|
|
386
|
+
*/
|
|
387
|
+
retentionDays: zod_1.z.number().int().positive().default(30).describe('Backup retention days'),
|
|
388
|
+
}).optional().describe('Backup configuration'),
|
|
389
|
+
/**
|
|
390
|
+
* Encryption configuration
|
|
391
|
+
*/
|
|
392
|
+
encryption: zod_1.z.object({
|
|
393
|
+
/**
|
|
394
|
+
* Whether to use per-tenant encryption keys
|
|
395
|
+
*/
|
|
396
|
+
perTenantKeys: zod_1.z.boolean().default(false).describe('Per-tenant encryption keys'),
|
|
397
|
+
/**
|
|
398
|
+
* Encryption algorithm
|
|
399
|
+
*/
|
|
400
|
+
algorithm: zod_1.z.string().default('AES-256-GCM').describe('Encryption algorithm'),
|
|
401
|
+
/**
|
|
402
|
+
* Key management service
|
|
403
|
+
*/
|
|
404
|
+
keyManagement: zod_1.z.enum(['aws_kms', 'azure_key_vault', 'gcp_kms', 'hashicorp_vault', 'custom']).optional().describe('Key management service'),
|
|
405
|
+
}).optional().describe('Encryption configuration'),
|
|
406
|
+
});
|
|
407
|
+
/**
|
|
408
|
+
* Tenant Isolation Configuration Schema
|
|
409
|
+
*
|
|
410
|
+
* Complete configuration for tenant isolation strategy.
|
|
411
|
+
* Supports all three isolation levels with detailed configuration options.
|
|
412
|
+
*/
|
|
413
|
+
exports.TenantIsolationConfigSchema = zod_1.z.discriminatedUnion('strategy', [
|
|
414
|
+
exports.RowLevelIsolationStrategySchema,
|
|
415
|
+
exports.SchemaLevelIsolationStrategySchema,
|
|
416
|
+
exports.DatabaseLevelIsolationStrategySchema,
|
|
417
|
+
]);
|
|
418
|
+
/**
|
|
419
|
+
* Tenant Security Policy Schema
|
|
420
|
+
* Defines security policies and compliance requirements for tenants
|
|
421
|
+
*/
|
|
422
|
+
exports.TenantSecurityPolicySchema = zod_1.z.object({
|
|
423
|
+
/**
|
|
424
|
+
* Encryption requirements
|
|
425
|
+
*/
|
|
426
|
+
encryption: zod_1.z.object({
|
|
427
|
+
/**
|
|
428
|
+
* Require encryption at rest
|
|
429
|
+
*/
|
|
430
|
+
atRest: zod_1.z.boolean().default(true).describe('Require encryption at rest'),
|
|
431
|
+
/**
|
|
432
|
+
* Require encryption in transit
|
|
433
|
+
*/
|
|
434
|
+
inTransit: zod_1.z.boolean().default(true).describe('Require encryption in transit'),
|
|
435
|
+
/**
|
|
436
|
+
* Require field-level encryption for sensitive data
|
|
437
|
+
*/
|
|
438
|
+
fieldLevel: zod_1.z.boolean().default(false).describe('Require field-level encryption'),
|
|
439
|
+
}).optional().describe('Encryption requirements'),
|
|
440
|
+
/**
|
|
441
|
+
* Access control requirements
|
|
442
|
+
*/
|
|
443
|
+
accessControl: zod_1.z.object({
|
|
444
|
+
/**
|
|
445
|
+
* Require multi-factor authentication
|
|
446
|
+
*/
|
|
447
|
+
requireMFA: zod_1.z.boolean().default(false).describe('Require MFA'),
|
|
448
|
+
/**
|
|
449
|
+
* Require SSO/SAML authentication
|
|
450
|
+
*/
|
|
451
|
+
requireSSO: zod_1.z.boolean().default(false).describe('Require SSO'),
|
|
452
|
+
/**
|
|
453
|
+
* IP whitelist
|
|
454
|
+
*/
|
|
455
|
+
ipWhitelist: zod_1.z.array(zod_1.z.string()).optional().describe('Allowed IP addresses'),
|
|
456
|
+
/**
|
|
457
|
+
* Session timeout in seconds
|
|
458
|
+
*/
|
|
459
|
+
sessionTimeout: zod_1.z.number().int().positive().default(3600).describe('Session timeout'),
|
|
460
|
+
}).optional().describe('Access control requirements'),
|
|
461
|
+
/**
|
|
462
|
+
* Audit and compliance requirements
|
|
463
|
+
*/
|
|
464
|
+
compliance: zod_1.z.object({
|
|
465
|
+
/**
|
|
466
|
+
* Compliance standards to enforce
|
|
467
|
+
*/
|
|
468
|
+
standards: zod_1.z.array(zod_1.z.enum([
|
|
469
|
+
'sox',
|
|
470
|
+
'hipaa',
|
|
471
|
+
'gdpr',
|
|
472
|
+
'pci_dss',
|
|
473
|
+
'iso_27001',
|
|
474
|
+
'fedramp',
|
|
475
|
+
])).optional().describe('Compliance standards'),
|
|
476
|
+
/**
|
|
477
|
+
* Require audit logging for all operations
|
|
478
|
+
*/
|
|
479
|
+
requireAuditLog: zod_1.z.boolean().default(true).describe('Require audit logging'),
|
|
480
|
+
/**
|
|
481
|
+
* Audit log retention period in days
|
|
482
|
+
*/
|
|
483
|
+
auditRetentionDays: zod_1.z.number().int().positive().default(365).describe('Audit retention days'),
|
|
484
|
+
/**
|
|
485
|
+
* Data residency requirements
|
|
486
|
+
*/
|
|
487
|
+
dataResidency: zod_1.z.object({
|
|
488
|
+
/**
|
|
489
|
+
* Required geographic region
|
|
490
|
+
*/
|
|
491
|
+
region: zod_1.z.string().optional().describe('Required region (e.g., US, EU, APAC)'),
|
|
492
|
+
/**
|
|
493
|
+
* Prohibited regions
|
|
494
|
+
*/
|
|
495
|
+
excludeRegions: zod_1.z.array(zod_1.z.string()).optional().describe('Prohibited regions'),
|
|
496
|
+
}).optional().describe('Data residency requirements'),
|
|
497
|
+
}).optional().describe('Compliance requirements'),
|
|
498
|
+
});
|
|
@@ -36,8 +36,8 @@ export declare const WebhookSchema: z.ZodObject<{
|
|
|
36
36
|
retryCount: number;
|
|
37
37
|
isActive: boolean;
|
|
38
38
|
label?: string | undefined;
|
|
39
|
-
secret?: string | undefined;
|
|
40
39
|
headers?: Record<string, string> | undefined;
|
|
40
|
+
secret?: string | undefined;
|
|
41
41
|
payloadFields?: string[] | undefined;
|
|
42
42
|
}, {
|
|
43
43
|
object: string;
|
|
@@ -45,9 +45,9 @@ export declare const WebhookSchema: z.ZodObject<{
|
|
|
45
45
|
name: string;
|
|
46
46
|
triggers: ("create" | "update" | "delete" | "api" | "undelete")[];
|
|
47
47
|
label?: string | undefined;
|
|
48
|
-
secret?: string | undefined;
|
|
49
48
|
method?: "GET" | "POST" | "PUT" | undefined;
|
|
50
49
|
headers?: Record<string, string> | undefined;
|
|
50
|
+
secret?: string | undefined;
|
|
51
51
|
payloadFields?: string[] | undefined;
|
|
52
52
|
includeSession?: boolean | undefined;
|
|
53
53
|
retryCount?: number | undefined;
|
package/dist/ui/action.zod.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { z } from 'zod';
|
|
|
6
6
|
export declare const ActionParamSchema: z.ZodObject<{
|
|
7
7
|
name: z.ZodString;
|
|
8
8
|
label: z.ZodString;
|
|
9
|
-
type: z.ZodEnum<["text", "textarea", "email", "url", "phone", "password", "markdown", "html", "richtext", "number", "currency", "percent", "date", "datetime", "time", "boolean", "select", "lookup", "master_detail", "image", "file", "avatar", "formula", "summary", "autonumber", "location", "address", "code", "color", "rating", "signature"]>;
|
|
9
|
+
type: z.ZodEnum<["text", "textarea", "email", "url", "phone", "password", "markdown", "html", "richtext", "number", "currency", "percent", "date", "datetime", "time", "boolean", "select", "lookup", "master_detail", "image", "file", "avatar", "formula", "summary", "autonumber", "location", "geolocation", "address", "code", "color", "rating", "slider", "signature", "qrcode"]>;
|
|
10
10
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
11
11
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12
12
|
label: z.ZodString;
|
|
@@ -19,7 +19,7 @@ export declare const ActionParamSchema: z.ZodObject<{
|
|
|
19
19
|
label: string;
|
|
20
20
|
}>, "many">>;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "address" | "code" | "color" | "rating" | "signature";
|
|
22
|
+
type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "geolocation" | "address" | "code" | "color" | "rating" | "slider" | "signature" | "qrcode";
|
|
23
23
|
label: string;
|
|
24
24
|
name: string;
|
|
25
25
|
required: boolean;
|
|
@@ -28,7 +28,7 @@ export declare const ActionParamSchema: z.ZodObject<{
|
|
|
28
28
|
label: string;
|
|
29
29
|
}[] | undefined;
|
|
30
30
|
}, {
|
|
31
|
-
type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "address" | "code" | "color" | "rating" | "signature";
|
|
31
|
+
type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "geolocation" | "address" | "code" | "color" | "rating" | "slider" | "signature" | "qrcode";
|
|
32
32
|
label: string;
|
|
33
33
|
name: string;
|
|
34
34
|
options?: {
|
|
@@ -60,7 +60,7 @@ export declare const ActionSchema: z.ZodObject<{
|
|
|
60
60
|
params: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
61
61
|
name: z.ZodString;
|
|
62
62
|
label: z.ZodString;
|
|
63
|
-
type: z.ZodEnum<["text", "textarea", "email", "url", "phone", "password", "markdown", "html", "richtext", "number", "currency", "percent", "date", "datetime", "time", "boolean", "select", "lookup", "master_detail", "image", "file", "avatar", "formula", "summary", "autonumber", "location", "address", "code", "color", "rating", "signature"]>;
|
|
63
|
+
type: z.ZodEnum<["text", "textarea", "email", "url", "phone", "password", "markdown", "html", "richtext", "number", "currency", "percent", "date", "datetime", "time", "boolean", "select", "lookup", "master_detail", "image", "file", "avatar", "formula", "summary", "autonumber", "location", "geolocation", "address", "code", "color", "rating", "slider", "signature", "qrcode"]>;
|
|
64
64
|
required: z.ZodDefault<z.ZodBoolean>;
|
|
65
65
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
66
66
|
label: z.ZodString;
|
|
@@ -73,7 +73,7 @@ export declare const ActionSchema: z.ZodObject<{
|
|
|
73
73
|
label: string;
|
|
74
74
|
}>, "many">>;
|
|
75
75
|
}, "strip", z.ZodTypeAny, {
|
|
76
|
-
type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "address" | "code" | "color" | "rating" | "signature";
|
|
76
|
+
type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "geolocation" | "address" | "code" | "color" | "rating" | "slider" | "signature" | "qrcode";
|
|
77
77
|
label: string;
|
|
78
78
|
name: string;
|
|
79
79
|
required: boolean;
|
|
@@ -82,7 +82,7 @@ export declare const ActionSchema: z.ZodObject<{
|
|
|
82
82
|
label: string;
|
|
83
83
|
}[] | undefined;
|
|
84
84
|
}, {
|
|
85
|
-
type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "address" | "code" | "color" | "rating" | "signature";
|
|
85
|
+
type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "geolocation" | "address" | "code" | "color" | "rating" | "slider" | "signature" | "qrcode";
|
|
86
86
|
label: string;
|
|
87
87
|
name: string;
|
|
88
88
|
options?: {
|
|
@@ -98,13 +98,13 @@ export declare const ActionSchema: z.ZodObject<{
|
|
|
98
98
|
/** Access */
|
|
99
99
|
visible: z.ZodOptional<z.ZodString>;
|
|
100
100
|
}, "strip", z.ZodTypeAny, {
|
|
101
|
-
type: "url" | "script" | "api" | "
|
|
101
|
+
type: "url" | "script" | "api" | "modal" | "flow";
|
|
102
102
|
label: string;
|
|
103
103
|
name: string;
|
|
104
104
|
refreshAfter: boolean;
|
|
105
105
|
location?: any;
|
|
106
106
|
params?: {
|
|
107
|
-
type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "address" | "code" | "color" | "rating" | "signature";
|
|
107
|
+
type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "geolocation" | "address" | "code" | "color" | "rating" | "slider" | "signature" | "qrcode";
|
|
108
108
|
label: string;
|
|
109
109
|
name: string;
|
|
110
110
|
required: boolean;
|
|
@@ -125,7 +125,7 @@ export declare const ActionSchema: z.ZodObject<{
|
|
|
125
125
|
name: string;
|
|
126
126
|
location?: any;
|
|
127
127
|
params?: {
|
|
128
|
-
type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "address" | "code" | "color" | "rating" | "signature";
|
|
128
|
+
type: "number" | "boolean" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "date" | "datetime" | "time" | "select" | "lookup" | "master_detail" | "image" | "file" | "avatar" | "formula" | "summary" | "autonumber" | "location" | "geolocation" | "address" | "code" | "color" | "rating" | "slider" | "signature" | "qrcode";
|
|
129
129
|
label: string;
|
|
130
130
|
name: string;
|
|
131
131
|
options?: {
|
|
@@ -134,7 +134,7 @@ export declare const ActionSchema: z.ZodObject<{
|
|
|
134
134
|
}[] | undefined;
|
|
135
135
|
required?: boolean | undefined;
|
|
136
136
|
}[] | undefined;
|
|
137
|
-
type?: "url" | "script" | "api" | "
|
|
137
|
+
type?: "url" | "script" | "api" | "modal" | "flow" | undefined;
|
|
138
138
|
icon?: string | undefined;
|
|
139
139
|
target?: string | undefined;
|
|
140
140
|
execute?: string | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI Protocol Exports
|
|
3
|
+
*
|
|
4
|
+
* Presentation & Interaction
|
|
5
|
+
* - App, Page, View (Grid/Kanban)
|
|
6
|
+
* - Dashboard (Widgets), Report
|
|
7
|
+
* - Action (Triggers)
|
|
8
|
+
*/
|
|
9
|
+
export * from './app.zod';
|
|
10
|
+
export * from './view.zod';
|
|
11
|
+
export * from './dashboard.zod';
|
|
12
|
+
export * from './report.zod';
|
|
13
|
+
export * from './action.zod';
|
|
14
|
+
export * from './page.zod';
|
|
15
|
+
export * from './widget.zod';
|
|
16
|
+
export * from './theme.zod';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|