@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
package/dist/data/query.zod.js
CHANGED
|
@@ -42,7 +42,43 @@ exports.SortNodeSchema = zod_1.z.object({
|
|
|
42
42
|
});
|
|
43
43
|
/**
|
|
44
44
|
* Aggregation Function Enum
|
|
45
|
-
* Standard aggregation functions.
|
|
45
|
+
* Standard aggregation functions for data analysis.
|
|
46
|
+
*
|
|
47
|
+
* Supported Functions:
|
|
48
|
+
* - **count**: Count rows (SQL: COUNT(*) or COUNT(field))
|
|
49
|
+
* - **sum**: Sum numeric values (SQL: SUM(field))
|
|
50
|
+
* - **avg**: Average numeric values (SQL: AVG(field))
|
|
51
|
+
* - **min**: Minimum value (SQL: MIN(field))
|
|
52
|
+
* - **max**: Maximum value (SQL: MAX(field))
|
|
53
|
+
* - **count_distinct**: Count unique values (SQL: COUNT(DISTINCT field))
|
|
54
|
+
* - **array_agg**: Aggregate values into array (SQL: ARRAY_AGG(field))
|
|
55
|
+
* - **string_agg**: Concatenate values (SQL: STRING_AGG(field, delimiter))
|
|
56
|
+
*
|
|
57
|
+
* Performance Considerations:
|
|
58
|
+
* - COUNT(*) is typically faster than COUNT(field) as it doesn't check for nulls
|
|
59
|
+
* - COUNT DISTINCT may require additional memory for tracking unique values
|
|
60
|
+
* - Window aggregates (with OVER clause) can be more efficient than subqueries
|
|
61
|
+
* - Large GROUP BY operations benefit from proper indexing on grouped fields
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* // SQL: SELECT region, SUM(amount) FROM sales GROUP BY region
|
|
65
|
+
* {
|
|
66
|
+
* object: 'sales',
|
|
67
|
+
* fields: ['region'],
|
|
68
|
+
* aggregations: [
|
|
69
|
+
* { function: 'sum', field: 'amount', alias: 'total_sales' }
|
|
70
|
+
* ],
|
|
71
|
+
* groupBy: ['region']
|
|
72
|
+
* }
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* // Salesforce SOQL: SELECT COUNT(Id) FROM Account
|
|
76
|
+
* {
|
|
77
|
+
* object: 'account',
|
|
78
|
+
* aggregations: [
|
|
79
|
+
* { function: 'count', alias: 'total_accounts' }
|
|
80
|
+
* ]
|
|
81
|
+
* }
|
|
46
82
|
*/
|
|
47
83
|
exports.AggregationFunction = zod_1.z.enum([
|
|
48
84
|
'count', 'sum', 'avg', 'min', 'max',
|
|
@@ -50,7 +86,33 @@ exports.AggregationFunction = zod_1.z.enum([
|
|
|
50
86
|
]);
|
|
51
87
|
/**
|
|
52
88
|
* Aggregation Node
|
|
53
|
-
* Represents aggregated field with function.
|
|
89
|
+
* Represents an aggregated field with function.
|
|
90
|
+
*
|
|
91
|
+
* Aggregations summarize data across groups of rows (GROUP BY).
|
|
92
|
+
* Used with `groupBy` to create analytical queries.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* // SQL: SELECT customer_id, COUNT(*), SUM(amount) FROM orders GROUP BY customer_id
|
|
96
|
+
* {
|
|
97
|
+
* object: 'order',
|
|
98
|
+
* fields: ['customer_id'],
|
|
99
|
+
* aggregations: [
|
|
100
|
+
* { function: 'count', alias: 'order_count' },
|
|
101
|
+
* { function: 'sum', field: 'amount', alias: 'total_amount' }
|
|
102
|
+
* ],
|
|
103
|
+
* groupBy: ['customer_id']
|
|
104
|
+
* }
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* // Salesforce SOQL: SELECT LeadSource, COUNT(Id) FROM Lead GROUP BY LeadSource
|
|
108
|
+
* {
|
|
109
|
+
* object: 'lead',
|
|
110
|
+
* fields: ['lead_source'],
|
|
111
|
+
* aggregations: [
|
|
112
|
+
* { function: 'count', alias: 'lead_count' }
|
|
113
|
+
* ],
|
|
114
|
+
* groupBy: ['lead_source']
|
|
115
|
+
* }
|
|
54
116
|
*/
|
|
55
117
|
exports.AggregationNodeSchema = zod_1.z.object({
|
|
56
118
|
function: exports.AggregationFunction.describe('Aggregation function'),
|
|
@@ -60,11 +122,118 @@ exports.AggregationNodeSchema = zod_1.z.object({
|
|
|
60
122
|
});
|
|
61
123
|
/**
|
|
62
124
|
* Join Type Enum
|
|
125
|
+
* Standard SQL join types for combining tables.
|
|
126
|
+
*
|
|
127
|
+
* Join Types:
|
|
128
|
+
* - **inner**: Returns only matching rows from both tables (SQL: INNER JOIN)
|
|
129
|
+
* - **left**: Returns all rows from left table, matching rows from right (SQL: LEFT JOIN)
|
|
130
|
+
* - **right**: Returns all rows from right table, matching rows from left (SQL: RIGHT JOIN)
|
|
131
|
+
* - **full**: Returns all rows from both tables (SQL: FULL OUTER JOIN)
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* // SQL: SELECT * FROM orders INNER JOIN customers ON orders.customer_id = customers.id
|
|
135
|
+
* {
|
|
136
|
+
* object: 'order',
|
|
137
|
+
* joins: [
|
|
138
|
+
* {
|
|
139
|
+
* type: 'inner',
|
|
140
|
+
* object: 'customer',
|
|
141
|
+
* on: ['order.customer_id', '=', 'customer.id']
|
|
142
|
+
* }
|
|
143
|
+
* ]
|
|
144
|
+
* }
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* // Salesforce SOQL-style: Find all customers and their orders (if any)
|
|
148
|
+
* {
|
|
149
|
+
* object: 'customer',
|
|
150
|
+
* joins: [
|
|
151
|
+
* {
|
|
152
|
+
* type: 'left',
|
|
153
|
+
* object: 'order',
|
|
154
|
+
* on: ['customer.id', '=', 'order.customer_id']
|
|
155
|
+
* }
|
|
156
|
+
* ]
|
|
157
|
+
* }
|
|
63
158
|
*/
|
|
64
159
|
exports.JoinType = zod_1.z.enum(['inner', 'left', 'right', 'full']);
|
|
65
160
|
/**
|
|
66
161
|
* Join Node
|
|
67
|
-
* Represents table joins.
|
|
162
|
+
* Represents table joins for combining data from multiple objects.
|
|
163
|
+
*
|
|
164
|
+
* Joins connect related data across multiple tables using ON conditions.
|
|
165
|
+
* Supports both direct object joins and subquery joins.
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* // SQL: SELECT o.*, c.name FROM orders o INNER JOIN customers c ON o.customer_id = c.id
|
|
169
|
+
* {
|
|
170
|
+
* object: 'order',
|
|
171
|
+
* fields: ['id', 'amount'],
|
|
172
|
+
* joins: [
|
|
173
|
+
* {
|
|
174
|
+
* type: 'inner',
|
|
175
|
+
* object: 'customer',
|
|
176
|
+
* alias: 'c',
|
|
177
|
+
* on: ['order.customer_id', '=', 'c.id']
|
|
178
|
+
* }
|
|
179
|
+
* ]
|
|
180
|
+
* }
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* // SQL: Multi-table join
|
|
184
|
+
* // SELECT * FROM orders o
|
|
185
|
+
* // INNER JOIN customers c ON o.customer_id = c.id
|
|
186
|
+
* // LEFT JOIN shipments s ON o.id = s.order_id
|
|
187
|
+
* {
|
|
188
|
+
* object: 'order',
|
|
189
|
+
* joins: [
|
|
190
|
+
* {
|
|
191
|
+
* type: 'inner',
|
|
192
|
+
* object: 'customer',
|
|
193
|
+
* alias: 'c',
|
|
194
|
+
* on: ['order.customer_id', '=', 'c.id']
|
|
195
|
+
* },
|
|
196
|
+
* {
|
|
197
|
+
* type: 'left',
|
|
198
|
+
* object: 'shipment',
|
|
199
|
+
* alias: 's',
|
|
200
|
+
* on: ['order.id', '=', 's.order_id']
|
|
201
|
+
* }
|
|
202
|
+
* ]
|
|
203
|
+
* }
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* // Salesforce SOQL: SELECT Name, (SELECT LastName FROM Contacts) FROM Account
|
|
207
|
+
* {
|
|
208
|
+
* object: 'account',
|
|
209
|
+
* fields: ['name'],
|
|
210
|
+
* joins: [
|
|
211
|
+
* {
|
|
212
|
+
* type: 'left',
|
|
213
|
+
* object: 'contact',
|
|
214
|
+
* on: ['account.id', '=', 'contact.account_id']
|
|
215
|
+
* }
|
|
216
|
+
* ]
|
|
217
|
+
* }
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* // Subquery Join: Join with a filtered/aggregated dataset
|
|
221
|
+
* {
|
|
222
|
+
* object: 'customer',
|
|
223
|
+
* joins: [
|
|
224
|
+
* {
|
|
225
|
+
* type: 'left',
|
|
226
|
+
* object: 'order',
|
|
227
|
+
* alias: 'high_value_orders',
|
|
228
|
+
* on: ['customer.id', '=', 'high_value_orders.customer_id'],
|
|
229
|
+
* subquery: {
|
|
230
|
+
* object: 'order',
|
|
231
|
+
* fields: ['customer_id', 'total'],
|
|
232
|
+
* filters: ['total', '>', 1000]
|
|
233
|
+
* }
|
|
234
|
+
* }
|
|
235
|
+
* ]
|
|
236
|
+
* }
|
|
68
237
|
*/
|
|
69
238
|
exports.JoinNodeSchema = zod_1.z.lazy(() => zod_1.z.object({
|
|
70
239
|
type: exports.JoinType.describe('Join type'),
|
|
@@ -75,6 +244,58 @@ exports.JoinNodeSchema = zod_1.z.lazy(() => zod_1.z.object({
|
|
|
75
244
|
}));
|
|
76
245
|
/**
|
|
77
246
|
* Window Function Enum
|
|
247
|
+
* Advanced analytical functions for row-based calculations.
|
|
248
|
+
*
|
|
249
|
+
* Window Functions:
|
|
250
|
+
* - **row_number**: Sequential number within partition (SQL: ROW_NUMBER() OVER (...))
|
|
251
|
+
* - **rank**: Rank with gaps for ties (SQL: RANK() OVER (...))
|
|
252
|
+
* - **dense_rank**: Rank without gaps (SQL: DENSE_RANK() OVER (...))
|
|
253
|
+
* - **percent_rank**: Relative rank as percentage (SQL: PERCENT_RANK() OVER (...))
|
|
254
|
+
* - **lag**: Access previous row value (SQL: LAG(field) OVER (...))
|
|
255
|
+
* - **lead**: Access next row value (SQL: LEAD(field) OVER (...))
|
|
256
|
+
* - **first_value**: First value in window (SQL: FIRST_VALUE(field) OVER (...))
|
|
257
|
+
* - **last_value**: Last value in window (SQL: LAST_VALUE(field) OVER (...))
|
|
258
|
+
* - **sum/avg/count/min/max**: Aggregates over window (SQL: SUM(field) OVER (...))
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* // SQL: SELECT *, ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY amount DESC) as rank
|
|
262
|
+
* // FROM orders
|
|
263
|
+
* {
|
|
264
|
+
* object: 'order',
|
|
265
|
+
* fields: ['id', 'customer_id', 'amount'],
|
|
266
|
+
* windowFunctions: [
|
|
267
|
+
* {
|
|
268
|
+
* function: 'row_number',
|
|
269
|
+
* alias: 'rank',
|
|
270
|
+
* over: {
|
|
271
|
+
* partitionBy: ['customer_id'],
|
|
272
|
+
* orderBy: [{ field: 'amount', order: 'desc' }]
|
|
273
|
+
* }
|
|
274
|
+
* }
|
|
275
|
+
* ]
|
|
276
|
+
* }
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* // SQL: Running total with SUM() OVER (...)
|
|
280
|
+
* {
|
|
281
|
+
* object: 'transaction',
|
|
282
|
+
* fields: ['date', 'amount'],
|
|
283
|
+
* windowFunctions: [
|
|
284
|
+
* {
|
|
285
|
+
* function: 'sum',
|
|
286
|
+
* field: 'amount',
|
|
287
|
+
* alias: 'running_total',
|
|
288
|
+
* over: {
|
|
289
|
+
* orderBy: [{ field: 'date', order: 'asc' }],
|
|
290
|
+
* frame: {
|
|
291
|
+
* type: 'rows',
|
|
292
|
+
* start: 'UNBOUNDED PRECEDING',
|
|
293
|
+
* end: 'CURRENT ROW'
|
|
294
|
+
* }
|
|
295
|
+
* }
|
|
296
|
+
* }
|
|
297
|
+
* ]
|
|
298
|
+
* }
|
|
78
299
|
*/
|
|
79
300
|
exports.WindowFunction = zod_1.z.enum([
|
|
80
301
|
'row_number', 'rank', 'dense_rank', 'percent_rank',
|
|
@@ -84,6 +305,29 @@ exports.WindowFunction = zod_1.z.enum([
|
|
|
84
305
|
/**
|
|
85
306
|
* Window Specification
|
|
86
307
|
* Defines PARTITION BY and ORDER BY for window functions.
|
|
308
|
+
*
|
|
309
|
+
* Window specifications control how window functions compute values:
|
|
310
|
+
* - **partitionBy**: Divide rows into groups (like GROUP BY but without collapsing rows)
|
|
311
|
+
* - **orderBy**: Define order for ranking and offset functions
|
|
312
|
+
* - **frame**: Specify which rows to include in aggregate calculations
|
|
313
|
+
*
|
|
314
|
+
* @example
|
|
315
|
+
* // Partition by department, order by salary
|
|
316
|
+
* {
|
|
317
|
+
* partitionBy: ['department'],
|
|
318
|
+
* orderBy: [{ field: 'salary', order: 'desc' }]
|
|
319
|
+
* }
|
|
320
|
+
*
|
|
321
|
+
* @example
|
|
322
|
+
* // Moving average with frame specification
|
|
323
|
+
* {
|
|
324
|
+
* orderBy: [{ field: 'date', order: 'asc' }],
|
|
325
|
+
* frame: {
|
|
326
|
+
* type: 'rows',
|
|
327
|
+
* start: '6 PRECEDING',
|
|
328
|
+
* end: 'CURRENT ROW'
|
|
329
|
+
* }
|
|
330
|
+
* }
|
|
87
331
|
*/
|
|
88
332
|
exports.WindowSpecSchema = zod_1.z.object({
|
|
89
333
|
partitionBy: zod_1.z.array(zod_1.z.string()).optional().describe('PARTITION BY fields'),
|
|
@@ -97,6 +341,45 @@ exports.WindowSpecSchema = zod_1.z.object({
|
|
|
97
341
|
/**
|
|
98
342
|
* Window Function Node
|
|
99
343
|
* Represents window function with OVER clause.
|
|
344
|
+
*
|
|
345
|
+
* Window functions perform calculations across a set of rows related to the current row,
|
|
346
|
+
* without collapsing the result set (unlike GROUP BY aggregations).
|
|
347
|
+
*
|
|
348
|
+
* @example
|
|
349
|
+
* // SQL: Top 3 products per category
|
|
350
|
+
* // SELECT *, ROW_NUMBER() OVER (PARTITION BY category ORDER BY sales DESC) as rank
|
|
351
|
+
* // FROM products
|
|
352
|
+
* {
|
|
353
|
+
* object: 'product',
|
|
354
|
+
* fields: ['name', 'category', 'sales'],
|
|
355
|
+
* windowFunctions: [
|
|
356
|
+
* {
|
|
357
|
+
* function: 'row_number',
|
|
358
|
+
* alias: 'category_rank',
|
|
359
|
+
* over: {
|
|
360
|
+
* partitionBy: ['category'],
|
|
361
|
+
* orderBy: [{ field: 'sales', order: 'desc' }]
|
|
362
|
+
* }
|
|
363
|
+
* }
|
|
364
|
+
* ]
|
|
365
|
+
* }
|
|
366
|
+
*
|
|
367
|
+
* @example
|
|
368
|
+
* // SQL: Year-over-year comparison with LAG
|
|
369
|
+
* {
|
|
370
|
+
* object: 'monthly_sales',
|
|
371
|
+
* fields: ['month', 'revenue'],
|
|
372
|
+
* windowFunctions: [
|
|
373
|
+
* {
|
|
374
|
+
* function: 'lag',
|
|
375
|
+
* field: 'revenue',
|
|
376
|
+
* alias: 'prev_year_revenue',
|
|
377
|
+
* over: {
|
|
378
|
+
* orderBy: [{ field: 'month', order: 'asc' }]
|
|
379
|
+
* }
|
|
380
|
+
* }
|
|
381
|
+
* ]
|
|
382
|
+
* }
|
|
100
383
|
*/
|
|
101
384
|
exports.WindowFunctionNodeSchema = zod_1.z.object({
|
|
102
385
|
function: exports.WindowFunction.describe('Window function name'),
|
|
@@ -119,6 +402,106 @@ exports.FieldNodeSchema = zod_1.z.lazy(() => zod_1.z.union([
|
|
|
119
402
|
/**
|
|
120
403
|
* Query AST Schema
|
|
121
404
|
* The universal data retrieval contract defined in `ast-structure.mdx`.
|
|
405
|
+
*
|
|
406
|
+
* This schema represents ObjectQL - a universal query language that abstracts
|
|
407
|
+
* SQL, NoSQL, and SaaS APIs into a single unified interface.
|
|
408
|
+
*
|
|
409
|
+
* Key Features:
|
|
410
|
+
* - **Filtering**: WHERE clauses with nested logic
|
|
411
|
+
* - **Aggregations**: GROUP BY with COUNT, SUM, AVG, MIN, MAX
|
|
412
|
+
* - **Joins**: INNER, LEFT, RIGHT, FULL OUTER joins
|
|
413
|
+
* - **Window Functions**: ROW_NUMBER, RANK, LAG, LEAD, running totals
|
|
414
|
+
* - **Subqueries**: Nested queries in joins and filters
|
|
415
|
+
* - **Sorting & Pagination**: ORDER BY, LIMIT, OFFSET
|
|
416
|
+
*
|
|
417
|
+
* @example
|
|
418
|
+
* // Simple query: SELECT name, email FROM account WHERE status = 'active'
|
|
419
|
+
* {
|
|
420
|
+
* object: 'account',
|
|
421
|
+
* fields: ['name', 'email'],
|
|
422
|
+
* filters: ['status', '=', 'active']
|
|
423
|
+
* }
|
|
424
|
+
*
|
|
425
|
+
* @example
|
|
426
|
+
* // Aggregation: SELECT region, SUM(amount) as total FROM sales GROUP BY region HAVING total > 10000
|
|
427
|
+
* {
|
|
428
|
+
* object: 'sales',
|
|
429
|
+
* fields: ['region'],
|
|
430
|
+
* aggregations: [
|
|
431
|
+
* { function: 'sum', field: 'amount', alias: 'total' }
|
|
432
|
+
* ],
|
|
433
|
+
* groupBy: ['region'],
|
|
434
|
+
* having: ['total', '>', 10000]
|
|
435
|
+
* }
|
|
436
|
+
*
|
|
437
|
+
* @example
|
|
438
|
+
* // Join: SELECT o.*, c.name FROM orders o INNER JOIN customers c ON o.customer_id = c.id
|
|
439
|
+
* {
|
|
440
|
+
* object: 'order',
|
|
441
|
+
* fields: ['id', 'amount'],
|
|
442
|
+
* joins: [
|
|
443
|
+
* {
|
|
444
|
+
* type: 'inner',
|
|
445
|
+
* object: 'customer',
|
|
446
|
+
* alias: 'c',
|
|
447
|
+
* on: ['order.customer_id', '=', 'c.id']
|
|
448
|
+
* }
|
|
449
|
+
* ]
|
|
450
|
+
* }
|
|
451
|
+
*
|
|
452
|
+
* @example
|
|
453
|
+
* // Window Function: Top 5 orders per customer
|
|
454
|
+
* {
|
|
455
|
+
* object: 'order',
|
|
456
|
+
* fields: ['customer_id', 'amount', 'created_at'],
|
|
457
|
+
* windowFunctions: [
|
|
458
|
+
* {
|
|
459
|
+
* function: 'row_number',
|
|
460
|
+
* alias: 'customer_order_rank',
|
|
461
|
+
* over: {
|
|
462
|
+
* partitionBy: ['customer_id'],
|
|
463
|
+
* orderBy: [{ field: 'amount', order: 'desc' }]
|
|
464
|
+
* }
|
|
465
|
+
* }
|
|
466
|
+
* ]
|
|
467
|
+
* }
|
|
468
|
+
*
|
|
469
|
+
* @example
|
|
470
|
+
* // Complex: Customer lifetime value with rankings
|
|
471
|
+
* {
|
|
472
|
+
* object: 'customer',
|
|
473
|
+
* fields: ['id', 'name'],
|
|
474
|
+
* joins: [
|
|
475
|
+
* {
|
|
476
|
+
* type: 'left',
|
|
477
|
+
* object: 'order',
|
|
478
|
+
* alias: 'o',
|
|
479
|
+
* on: ['customer.id', '=', 'o.customer_id']
|
|
480
|
+
* }
|
|
481
|
+
* ],
|
|
482
|
+
* aggregations: [
|
|
483
|
+
* { function: 'count', field: 'o.id', alias: 'order_count' },
|
|
484
|
+
* { function: 'sum', field: 'o.amount', alias: 'lifetime_value' }
|
|
485
|
+
* ],
|
|
486
|
+
* groupBy: ['customer.id', 'customer.name'],
|
|
487
|
+
* having: ['order_count', '>', 0],
|
|
488
|
+
* sort: [{ field: 'lifetime_value', order: 'desc' }],
|
|
489
|
+
* top: 100
|
|
490
|
+
* }
|
|
491
|
+
*
|
|
492
|
+
* @example
|
|
493
|
+
* // Salesforce SOQL: SELECT Name, (SELECT LastName FROM Contacts) FROM Account
|
|
494
|
+
* {
|
|
495
|
+
* object: 'account',
|
|
496
|
+
* fields: ['name'],
|
|
497
|
+
* joins: [
|
|
498
|
+
* {
|
|
499
|
+
* type: 'left',
|
|
500
|
+
* object: 'contact',
|
|
501
|
+
* on: ['account.id', '=', 'contact.account_id']
|
|
502
|
+
* }
|
|
503
|
+
* ]
|
|
504
|
+
* }
|
|
122
505
|
*/
|
|
123
506
|
exports.QuerySchema = zod_1.z.object({
|
|
124
507
|
/** Target Entity */
|