@objectstack/spec 0.3.1 → 0.3.3
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 +32 -10
- package/dist/ai/agent.zod.d.ts +12 -12
- package/dist/ai/conversation.zod.d.ts +65 -65
- package/dist/ai/cost.zod.d.ts +125 -125
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +1 -1
- package/dist/ai/model-registry.zod.d.ts +94 -94
- package/dist/ai/nlq.zod.d.ts +70 -70
- package/dist/ai/{workflow-automation.zod.d.ts → orchestration.zod.d.ts} +50 -49
- package/dist/ai/orchestration.zod.d.ts.map +1 -0
- package/dist/ai/{workflow-automation.zod.js → orchestration.zod.js} +26 -25
- package/dist/ai/predictive.zod.d.ts +31 -31
- package/dist/ai/rag-pipeline.zod.d.ts +86 -86
- package/dist/api/contract.zod.d.ts +125 -109
- package/dist/api/contract.zod.d.ts.map +1 -1
- package/dist/{system → api}/discovery.zod.d.ts +26 -26
- package/dist/api/discovery.zod.d.ts.map +1 -0
- package/dist/{system → api}/discovery.zod.js +9 -9
- package/dist/{system/api.zod.d.ts → api/endpoint.zod.d.ts} +53 -57
- package/dist/api/endpoint.zod.d.ts.map +1 -0
- package/dist/{system/api.zod.js → api/endpoint.zod.js} +3 -6
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +4 -0
- package/dist/{system → api}/realtime.zod.d.ts +4 -4
- package/dist/api/realtime.zod.d.ts.map +1 -0
- package/dist/api/router.zod.d.ts +182 -0
- package/dist/api/router.zod.d.ts.map +1 -0
- package/dist/api/router.zod.js +103 -0
- package/dist/{system/auth.zod.d.ts → auth/config.zod.d.ts} +191 -191
- package/dist/auth/config.zod.d.ts.map +1 -0
- package/dist/{system → auth}/identity.zod.d.ts +8 -8
- package/dist/auth/identity.zod.d.ts.map +1 -0
- package/dist/auth/index.d.ts +7 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +22 -0
- package/dist/{system → auth}/organization.zod.d.ts +5 -5
- package/dist/auth/organization.zod.d.ts.map +1 -0
- package/dist/{system → auth}/policy.zod.d.ts +3 -3
- package/dist/auth/policy.zod.d.ts.map +1 -0
- package/dist/{system/auth-protocol.d.ts → auth/protocol.d.ts} +1 -1
- package/dist/auth/protocol.d.ts.map +1 -0
- package/dist/auth/role.zod.d.ts.map +1 -0
- package/dist/{data → automation}/flow.zod.d.ts +34 -16
- package/dist/automation/flow.zod.d.ts.map +1 -0
- package/dist/{data → automation}/flow.zod.js +6 -1
- package/dist/automation/index.d.ts +4 -0
- package/dist/automation/index.d.ts.map +1 -0
- package/dist/automation/index.js +19 -0
- package/dist/{system → automation}/webhook.zod.d.ts +2 -2
- package/dist/automation/webhook.zod.d.ts.map +1 -0
- package/dist/automation/workflow.zod.d.ts +2045 -0
- package/dist/automation/workflow.zod.d.ts.map +1 -0
- package/dist/{data → automation}/workflow.zod.js +24 -1
- package/dist/data/dataset.zod.d.ts +2 -2
- package/dist/data/field.zod.d.ts +443 -213
- package/dist/data/field.zod.d.ts.map +1 -1
- package/dist/data/field.zod.js +29 -1
- package/dist/data/filter.zod.d.ts +167 -30
- package/dist/data/filter.zod.d.ts.map +1 -1
- package/dist/data/filter.zod.js +25 -13
- package/dist/data/hook.zod.d.ts +191 -0
- package/dist/data/hook.zod.d.ts.map +1 -0
- package/dist/data/hook.zod.js +144 -0
- package/dist/data/index.d.ts +4 -17
- package/dist/data/index.d.ts.map +1 -1
- package/dist/data/index.js +4 -17
- package/dist/data/mapping.zod.d.ts +103 -91
- package/dist/data/mapping.zod.d.ts.map +1 -1
- package/dist/data/object.zod.d.ts +387 -127
- package/dist/data/object.zod.d.ts.map +1 -1
- package/dist/data/object.zod.js +87 -42
- package/dist/data/query.zod.d.ts +98 -169
- package/dist/data/query.zod.d.ts.map +1 -1
- package/dist/data/query.zod.js +42 -130
- package/dist/data/validation.zod.d.ts +166 -26
- package/dist/data/validation.zod.d.ts.map +1 -1
- package/dist/data/validation.zod.js +38 -16
- package/dist/{system → driver}/datasource.zod.d.ts +42 -8
- package/dist/driver/datasource.zod.d.ts.map +1 -0
- package/dist/{system → driver}/datasource.zod.js +17 -13
- package/dist/driver/driver.zod.d.ts +3392 -0
- package/dist/driver/driver.zod.d.ts.map +1 -0
- package/dist/{system → driver}/driver.zod.js +99 -0
- package/dist/driver/index.d.ts +5 -0
- package/dist/driver/index.d.ts.map +1 -0
- package/dist/driver/index.js +20 -0
- package/dist/driver/mongo.zod.d.ts +107 -0
- package/dist/driver/mongo.zod.d.ts.map +1 -0
- package/dist/driver/mongo.zod.js +80 -0
- package/dist/driver/postgres.zod.d.ts +134 -0
- package/dist/driver/postgres.zod.d.ts.map +1 -0
- package/dist/driver/postgres.zod.js +88 -0
- package/dist/hub/composer.zod.d.ts +2768 -0
- package/dist/hub/composer.zod.d.ts.map +1 -0
- package/dist/hub/composer.zod.js +111 -0
- package/dist/hub/index.d.ts +6 -0
- package/dist/hub/index.d.ts.map +1 -0
- package/dist/hub/index.js +22 -0
- package/dist/{system → hub}/license.zod.d.ts +11 -7
- package/dist/hub/license.zod.d.ts.map +1 -0
- package/dist/{system → hub}/license.zod.js +5 -3
- package/dist/hub/marketplace.zod.d.ts +191 -0
- package/dist/hub/marketplace.zod.d.ts.map +1 -0
- package/dist/hub/marketplace.zod.js +85 -0
- package/dist/hub/space.zod.d.ts +383 -0
- package/dist/hub/space.zod.d.ts.map +1 -0
- package/dist/hub/space.zod.js +103 -0
- package/dist/{system → hub}/tenant.zod.d.ts +73 -47
- package/dist/hub/tenant.zod.d.ts.map +1 -0
- package/dist/{system → hub}/tenant.zod.js +36 -10
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -5
- package/dist/kernel/context.zod.d.ts +56 -0
- package/dist/kernel/context.zod.d.ts.map +1 -0
- package/dist/kernel/context.zod.js +43 -0
- package/dist/kernel/index.d.ts +12 -0
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/index.js +27 -0
- package/dist/kernel/logger.zod.d.ts +111 -0
- package/dist/kernel/logger.zod.d.ts.map +1 -0
- package/dist/kernel/logger.zod.js +75 -0
- package/dist/kernel/manifest.zod.d.ts +2153 -0
- package/dist/kernel/manifest.zod.d.ts.map +1 -0
- package/dist/{system → kernel}/manifest.zod.js +40 -0
- package/dist/{system → kernel}/plugin.zod.d.ts +598 -318
- package/dist/kernel/plugin.zod.d.ts.map +1 -0
- package/dist/{system → kernel}/plugin.zod.js +13 -0
- package/dist/kernel/scoped-storage.zod.d.ts +81 -0
- package/dist/kernel/scoped-storage.zod.d.ts.map +1 -0
- package/dist/kernel/scoped-storage.zod.js +66 -0
- package/dist/permission/index.d.ts +12 -0
- package/dist/permission/index.d.ts.map +1 -0
- package/dist/permission/index.js +27 -0
- package/dist/{data → permission}/permission.zod.d.ts +34 -3
- package/dist/permission/permission.zod.d.ts.map +1 -0
- package/dist/{data → permission}/permission.zod.js +10 -1
- package/dist/permission/sharing.zod.d.ts +146 -0
- package/dist/permission/sharing.zod.d.ts.map +1 -0
- package/dist/permission/sharing.zod.js +88 -0
- package/dist/permission/territory.zod.d.ts.map +1 -0
- package/dist/system/audit.zod.d.ts +52 -52
- package/dist/system/events.zod.d.ts +17 -17
- package/dist/system/index.d.ts +1 -20
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js +3 -20
- package/dist/system/job.zod.d.ts +13 -13
- package/dist/ui/action.zod.d.ts +13 -13
- package/dist/ui/app.zod.d.ts +11 -11
- package/dist/ui/dashboard.zod.d.ts +12 -12
- package/dist/ui/page.zod.d.ts +2 -2
- package/dist/ui/report.zod.d.ts +7 -7
- package/dist/ui/theme.zod.d.ts +42 -42
- package/dist/ui/view.zod.d.ts +2320 -59
- package/dist/ui/view.zod.d.ts.map +1 -1
- package/dist/ui/view.zod.js +102 -3
- package/dist/ui/widget.zod.d.ts +61 -28
- package/dist/ui/widget.zod.d.ts.map +1 -1
- package/json-schema/ai/{AIWorkflowAutomation.json → AIOrchestration.json} +5 -5
- package/json-schema/ai/{AIWorkflowExecutionResult.json → AIOrchestrationExecutionResult.json} +2 -2
- package/json-schema/ai/{AIWorkflowTrigger.json → AIOrchestrationTrigger.json} +2 -2
- package/json-schema/ai/{BatchAIWorkflowExecution.json → BatchAIOrchestrationExecution.json} +3 -3
- package/json-schema/{system → api}/ApiEndpoint.json +3 -1
- package/json-schema/{system → api}/ApiRoutes.json +7 -7
- package/json-schema/{system → api}/Discovery.json +7 -7
- package/json-schema/api/ExportRequest.json +402 -438
- package/json-schema/api/HttpMethod.json +18 -0
- package/json-schema/api/RouteCategory.json +17 -0
- package/json-schema/api/RouteDefinition.json +77 -0
- package/json-schema/api/RouterConfig.json +117 -0
- package/json-schema/{data → automation}/Flow.json +31 -1
- package/json-schema/{data → automation}/FlowEdge.json +9 -0
- package/json-schema/{data/WorkflowRule.json → automation/TimeTrigger.json} +35 -25
- package/json-schema/automation/WorkflowRule.json +1031 -0
- package/json-schema/data/AggregationNode.json +23 -0
- package/json-schema/data/AsyncValidation.json +49 -2
- package/json-schema/data/ComparisonOperator.json +52 -0
- package/json-schema/data/ConditionalValidation.json +693 -46
- package/json-schema/data/CrossFieldValidation.json +33 -2
- package/json-schema/data/CurrencyConfig.json +35 -0
- package/json-schema/data/CurrencyValue.json +26 -0
- package/json-schema/data/CustomValidator.json +37 -10
- package/json-schema/data/Field.json +30 -0
- package/json-schema/data/FieldOperators.json +78 -0
- package/json-schema/data/FieldReference.json +19 -0
- package/json-schema/data/FormatValidation.json +33 -2
- package/json-schema/data/Hook.json +95 -0
- package/json-schema/data/HookContext.json +88 -0
- package/json-schema/data/HookEvent.json +29 -0
- package/json-schema/data/Index.json +10 -0
- package/json-schema/data/JSONValidation.json +85 -0
- package/json-schema/data/JoinNode.json +197 -213
- package/json-schema/data/{TriggerAction.json → JoinStrategy.json} +6 -5
- package/json-schema/data/NormalizedFilter.json +234 -0
- package/json-schema/data/Object.json +1580 -28
- package/json-schema/data/ObjectCapabilities.json +30 -12
- package/json-schema/data/Query.json +246 -262
- package/json-schema/data/RangeOperator.json +26 -0
- package/json-schema/data/ScriptValidation.json +33 -2
- package/json-schema/data/SearchConfig.json +36 -0
- package/json-schema/data/StateMachineValidation.json +33 -2
- package/json-schema/data/UniquenessValidation.json +33 -2
- package/json-schema/data/ValidationRule.json +693 -46
- package/json-schema/{system → driver}/Datasource.json +35 -0
- package/json-schema/{system → driver}/DriverCapabilities.json +10 -0
- package/json-schema/{system → driver}/DriverInterface.json +10 -0
- package/json-schema/{system → driver}/DriverOptions.json +11 -0
- package/json-schema/driver/MongoConfig.json +82 -0
- package/json-schema/driver/PostgresConfig.json +98 -0
- package/json-schema/hub/BillOfMaterials.json +70 -0
- package/json-schema/hub/ComposerRequest.json +86 -0
- package/json-schema/hub/ComposerResponse.json +2645 -0
- package/json-schema/hub/ConflictReport.json +53 -0
- package/json-schema/hub/DependencyRequirement.json +36 -0
- package/json-schema/hub/DeploymentTarget.json +38 -0
- package/json-schema/hub/HubSpace.json +279 -0
- package/json-schema/{system → hub}/License.json +11 -3
- package/json-schema/hub/MarketplacePlugin.json +141 -0
- package/json-schema/hub/PluginAuthor.json +26 -0
- package/json-schema/hub/PluginPricing.json +43 -0
- package/json-schema/hub/SpaceSubscription.json +77 -0
- package/json-schema/hub/SubscriptionStatus.json +16 -0
- package/json-schema/{system → hub}/Tenant.json +3 -5
- package/json-schema/kernel/FileMetadata.json +43 -0
- package/json-schema/kernel/KernelContext.json +62 -0
- package/json-schema/kernel/LogEntry.json +63 -0
- package/json-schema/kernel/LogFormat.json +15 -0
- package/json-schema/kernel/LogLevel.json +17 -0
- package/json-schema/kernel/LoggerConfig.json +70 -0
- package/json-schema/kernel/Manifest.json +2557 -0
- package/json-schema/{system → kernel}/PluginContext.json +8 -1
- package/json-schema/kernel/RuntimeMode.json +16 -0
- package/json-schema/kernel/ScopedStorageConfig.json +54 -0
- package/json-schema/kernel/StorageAdapterType.json +17 -0
- package/json-schema/kernel/StorageScope.json +18 -0
- package/json-schema/permission/CriteriaSharingRule.json +82 -0
- package/json-schema/{data → permission}/OWDModel.json +2 -1
- package/json-schema/{data → permission}/ObjectPermission.json +15 -0
- package/json-schema/permission/OwnerSharingRule.json +102 -0
- package/json-schema/{data → permission}/PermissionSet.json +15 -0
- package/json-schema/permission/ShareRecipientType.json +16 -0
- package/json-schema/{data → permission}/SharingLevel.json +2 -1
- package/json-schema/permission/SharingRule.json +182 -0
- package/json-schema/{data → permission}/SharingRuleType.json +1 -3
- package/json-schema/ui/FieldWidgetProps.json +30 -0
- package/json-schema/ui/FormField.json +61 -0
- package/json-schema/ui/FormSection.json +60 -1
- package/json-schema/ui/FormView.json +257 -2
- package/json-schema/{system → ui}/HttpMethod.json +2 -2
- package/json-schema/ui/HttpRequest.json +46 -0
- package/json-schema/ui/ListColumn.json +57 -0
- package/json-schema/ui/ListView.json +249 -4
- package/json-schema/ui/PaginationConfig.json +26 -0
- package/json-schema/ui/SelectionConfig.json +22 -0
- package/json-schema/ui/View.json +1012 -12
- package/json-schema/ui/ViewData.json +142 -0
- package/llms.txt +182 -0
- package/package.json +38 -16
- package/prompts/README.md +18 -0
- package/prompts/architecture.md +81 -0
- package/prompts/implement-objectai.md +39 -0
- package/prompts/implement-objectos.md +48 -0
- package/prompts/implement-objectql.md +39 -0
- package/prompts/implement-objectui.md +46 -0
- package/prompts/instructions.md +91 -0
- package/dist/ai/workflow-automation.zod.d.ts.map +0 -1
- package/dist/data/flow.zod.d.ts.map +0 -1
- package/dist/data/permission.zod.d.ts.map +0 -1
- package/dist/data/sharing.zod.d.ts +0 -63
- package/dist/data/sharing.zod.d.ts.map +0 -1
- package/dist/data/sharing.zod.js +0 -57
- package/dist/data/trigger.zod.d.ts +0 -354
- package/dist/data/trigger.zod.d.ts.map +0 -1
- package/dist/data/trigger.zod.js +0 -195
- package/dist/data/workflow.zod.d.ts +0 -986
- package/dist/data/workflow.zod.d.ts.map +0 -1
- package/dist/system/api.zod.d.ts.map +0 -1
- package/dist/system/auth-protocol.d.ts.map +0 -1
- package/dist/system/auth.zod.d.ts.map +0 -1
- package/dist/system/datasource.zod.d.ts.map +0 -1
- package/dist/system/discovery.zod.d.ts.map +0 -1
- package/dist/system/driver.zod.d.ts +0 -1631
- package/dist/system/driver.zod.d.ts.map +0 -1
- package/dist/system/identity.zod.d.ts.map +0 -1
- package/dist/system/license.zod.d.ts.map +0 -1
- package/dist/system/manifest.zod.d.ts +0 -397
- package/dist/system/manifest.zod.d.ts.map +0 -1
- package/dist/system/organization.zod.d.ts.map +0 -1
- package/dist/system/plugin.zod.d.ts.map +0 -1
- package/dist/system/policy.zod.d.ts.map +0 -1
- package/dist/system/realtime.zod.d.ts.map +0 -1
- package/dist/system/role.zod.d.ts.map +0 -1
- package/dist/system/tenant.zod.d.ts.map +0 -1
- package/dist/system/territory.zod.d.ts.map +0 -1
- package/dist/system/webhook.zod.d.ts.map +0 -1
- package/json-schema/README.md +0 -127
- package/json-schema/data/FieldMapping.json +0 -83
- package/json-schema/data/FilterNode.json +0 -52
- package/json-schema/data/FilterOperator.json +0 -26
- package/json-schema/data/LogicOperator.json +0 -14
- package/json-schema/data/Mapping.json +0 -598
- package/json-schema/data/SharingRule.json +0 -58
- package/json-schema/data/TransformType.json +0 -18
- package/json-schema/data/Trigger.json +0 -73
- package/json-schema/data/TriggerContext.json +0 -61
- package/json-schema/data/TriggerTiming.json +0 -13
- package/json-schema/system/Manifest.json +0 -315
- /package/dist/{system → api}/realtime.zod.js +0 -0
- /package/dist/{system/auth.zod.js → auth/config.zod.js} +0 -0
- /package/dist/{system → auth}/identity.zod.js +0 -0
- /package/dist/{system → auth}/organization.zod.js +0 -0
- /package/dist/{system → auth}/policy.zod.js +0 -0
- /package/dist/{system/auth-protocol.js → auth/protocol.js} +0 -0
- /package/dist/{system → auth}/role.zod.d.ts +0 -0
- /package/dist/{system → auth}/role.zod.js +0 -0
- /package/dist/{system → automation}/webhook.zod.js +0 -0
- /package/dist/{system → permission}/territory.zod.d.ts +0 -0
- /package/dist/{system → permission}/territory.zod.js +0 -0
- /package/json-schema/{system → api}/ApiCapabilities.json +0 -0
- /package/json-schema/{system → api}/ApiMapping.json +0 -0
- /package/json-schema/{system → api}/Presence.json +0 -0
- /package/json-schema/{system → api}/PresenceStatus.json +0 -0
- /package/json-schema/{system → api}/RateLimit.json +0 -0
- /package/json-schema/{system → api}/RealtimeAction.json +0 -0
- /package/json-schema/{system → api}/RealtimeEvent.json +0 -0
- /package/json-schema/{system → api}/RealtimeEventType.json +0 -0
- /package/json-schema/{system → api}/Subscription.json +0 -0
- /package/json-schema/{system → api}/SubscriptionEvent.json +0 -0
- /package/json-schema/{system → api}/TransportProtocol.json +0 -0
- /package/json-schema/{system → auth}/Account.json +0 -0
- /package/json-schema/{system → auth}/AccountLinkingConfig.json +0 -0
- /package/json-schema/{system → auth}/AuditPolicy.json +0 -0
- /package/json-schema/{system → auth}/AuthConfig.json +0 -0
- /package/json-schema/{system → auth}/AuthPluginConfig.json +0 -0
- /package/json-schema/{system → auth}/AuthStrategy.json +0 -0
- /package/json-schema/{system → auth}/CSRFConfig.json +0 -0
- /package/json-schema/{system → auth}/DatabaseAdapter.json +0 -0
- /package/json-schema/{system → auth}/DatabaseMapping.json +0 -0
- /package/json-schema/{system → auth}/EmailPasswordConfig.json +0 -0
- /package/json-schema/{system → auth}/EnterpriseAuthConfig.json +0 -0
- /package/json-schema/{system → auth}/Invitation.json +0 -0
- /package/json-schema/{system → auth}/InvitationStatus.json +0 -0
- /package/json-schema/{system → auth}/LDAPConfig.json +0 -0
- /package/json-schema/{system → auth}/MagicLinkConfig.json +0 -0
- /package/json-schema/{system → auth}/Member.json +0 -0
- /package/json-schema/{system → auth}/NetworkPolicy.json +0 -0
- /package/json-schema/{system → auth}/OAuthProvider.json +0 -0
- /package/json-schema/{system → auth}/OIDCConfig.json +0 -0
- /package/json-schema/{system → auth}/Organization.json +0 -0
- /package/json-schema/{system → auth}/PasskeyConfig.json +0 -0
- /package/json-schema/{system → auth}/PasswordPolicy.json +0 -0
- /package/json-schema/{system → auth}/Policy.json +0 -0
- /package/json-schema/{system → auth}/RateLimitConfig.json +0 -0
- /package/json-schema/{system → auth}/Role.json +0 -0
- /package/json-schema/{system → auth}/SAMLConfig.json +0 -0
- /package/json-schema/{system → auth}/Session.json +0 -0
- /package/json-schema/{system → auth}/SessionConfig.json +0 -0
- /package/json-schema/{system → auth}/SessionPolicy.json +0 -0
- /package/json-schema/{system → auth}/StandardAuthProvider.json +0 -0
- /package/json-schema/{system → auth}/TwoFactorConfig.json +0 -0
- /package/json-schema/{system → auth}/User.json +0 -0
- /package/json-schema/{system → auth}/UserFieldMapping.json +0 -0
- /package/json-schema/{system → auth}/VerificationToken.json +0 -0
- /package/json-schema/{data → automation}/CustomScriptAction.json +0 -0
- /package/json-schema/{data → automation}/EmailAlertAction.json +0 -0
- /package/json-schema/{data → automation}/FieldUpdateAction.json +0 -0
- /package/json-schema/{data → automation}/FlowNode.json +0 -0
- /package/json-schema/{data → automation}/FlowNodeAction.json +0 -0
- /package/json-schema/{data → automation}/FlowVariable.json +0 -0
- /package/json-schema/{data → automation}/HttpCallAction.json +0 -0
- /package/json-schema/{data → automation}/PushNotificationAction.json +0 -0
- /package/json-schema/{data → automation}/SlackMessageAction.json +0 -0
- /package/json-schema/{data → automation}/SmsNotificationAction.json +0 -0
- /package/json-schema/{data → automation}/TaskCreationAction.json +0 -0
- /package/json-schema/{data → automation}/TeamsMessageAction.json +0 -0
- /package/json-schema/{system → automation}/Webhook.json +0 -0
- /package/json-schema/{system → automation}/WebhookReceiver.json +0 -0
- /package/json-schema/{data → automation}/WebhookTriggerAction.json +0 -0
- /package/json-schema/{system → automation}/WebhookTriggerType.json +0 -0
- /package/json-schema/{data → automation}/WorkflowAction.json +0 -0
- /package/json-schema/{data → automation}/WorkflowTriggerType.json +0 -0
- /package/json-schema/{system → driver}/DatasourceCapabilities.json +0 -0
- /package/json-schema/{system → driver}/DriverDefinition.json +0 -0
- /package/json-schema/{system → driver}/DriverType.json +0 -0
- /package/json-schema/{system → hub}/DatabaseLevelIsolationStrategy.json +0 -0
- /package/json-schema/{system → hub}/Feature.json +0 -0
- /package/json-schema/{system → hub}/LevelIsolationStrategySchema.json +0 -0
- /package/json-schema/{system → hub}/MetricType.json +0 -0
- /package/json-schema/{system → hub}/Plan.json +0 -0
- /package/json-schema/{system → hub}/RowLevelIsolationStrategy.json +0 -0
- /package/json-schema/{system → hub}/TenantIsolationConfig.json +0 -0
- /package/json-schema/{system → hub}/TenantIsolationLevel.json +0 -0
- /package/json-schema/{system → hub}/TenantQuota.json +0 -0
- /package/json-schema/{system → hub}/TenantSecurityPolicy.json +0 -0
- /package/json-schema/{system → kernel}/I18nContext.json +0 -0
- /package/json-schema/{system → kernel}/Logger.json +0 -0
- /package/json-schema/{system → kernel}/ObjectQLClient.json +0 -0
- /package/json-schema/{system → kernel}/Plugin.json +0 -0
- /package/json-schema/{system → kernel}/PluginLifecycle.json +0 -0
- /package/json-schema/{system → kernel}/Router.json +0 -0
- /package/json-schema/{system → kernel}/Scheduler.json +0 -0
- /package/json-schema/{system → kernel}/ScopedStorage.json +0 -0
- /package/json-schema/{system → kernel}/SystemAPI.json +0 -0
- /package/json-schema/{data → permission}/FieldPermission.json +0 -0
- /package/json-schema/{system → permission}/Territory.json +0 -0
- /package/json-schema/{system → permission}/TerritoryModel.json +0 -0
- /package/json-schema/{system → permission}/TerritoryType.json +0 -0
package/dist/data/query.zod.js
CHANGED
|
@@ -1,37 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QuerySchema = exports.FieldNodeSchema = exports.WindowFunctionNodeSchema = exports.WindowSpecSchema = exports.WindowFunction = exports.JoinNodeSchema = exports.
|
|
3
|
+
exports.QuerySchema = exports.FieldNodeSchema = exports.WindowFunctionNodeSchema = exports.WindowSpecSchema = exports.WindowFunction = exports.JoinNodeSchema = exports.JoinStrategy = exports.JoinType = exports.AggregationNodeSchema = exports.AggregationFunction = exports.SortNodeSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
6
|
-
* Filter Operator Enum
|
|
7
|
-
* Standard SQL/NoSQL operators supported by the engine.
|
|
8
|
-
*/
|
|
9
|
-
exports.FilterOperator = zod_1.z.enum([
|
|
10
|
-
'=', '!=', '<>',
|
|
11
|
-
'>', '>=', '<', '<=',
|
|
12
|
-
'startswith', 'contains', 'notcontains',
|
|
13
|
-
'between', 'in', 'notin',
|
|
14
|
-
'is_null', 'is_not_null'
|
|
15
|
-
]);
|
|
16
|
-
/**
|
|
17
|
-
* Filter Logic Operator
|
|
18
|
-
*/
|
|
19
|
-
exports.LogicOperator = zod_1.z.enum(['and', 'or', 'not']);
|
|
20
|
-
/**
|
|
21
|
-
* Recursive Filter Node
|
|
22
|
-
* Represents the "Where" clause.
|
|
23
|
-
*
|
|
24
|
-
* Structure: [Field, Operator, Value] OR [Logic, Filter, Filter...]
|
|
25
|
-
* Examples:
|
|
26
|
-
* - Simple: ["amount", ">", 1000]
|
|
27
|
-
* - Logic: [["status", "=", "closed"], "or", ["amount", ">", 1000]]
|
|
28
|
-
*/
|
|
29
|
-
exports.FilterNodeSchema = zod_1.z.lazy(() => zod_1.z.union([
|
|
30
|
-
// Leaf Node: [Field, Operator, Value]
|
|
31
|
-
zod_1.z.tuple([zod_1.z.string(), exports.FilterOperator, zod_1.z.any()]),
|
|
32
|
-
// Logic Node: [Expression, "or", Expression]
|
|
33
|
-
zod_1.z.array(zod_1.z.union([zod_1.z.string(), exports.FilterNodeSchema]))
|
|
34
|
-
]));
|
|
5
|
+
const filter_zod_1 = require("./filter.zod");
|
|
35
6
|
/**
|
|
36
7
|
* Sort Node
|
|
37
8
|
* Represents "Order By".
|
|
@@ -119,6 +90,7 @@ exports.AggregationNodeSchema = zod_1.z.object({
|
|
|
119
90
|
field: zod_1.z.string().optional().describe('Field to aggregate (optional for COUNT(*))'),
|
|
120
91
|
alias: zod_1.z.string().describe('Result column alias'),
|
|
121
92
|
distinct: zod_1.z.boolean().optional().describe('Apply DISTINCT before aggregation'),
|
|
93
|
+
filter: filter_zod_1.FilterConditionSchema.optional().describe('Filter/Condition to apply to the aggregation (FILTER WHERE clause)'),
|
|
122
94
|
});
|
|
123
95
|
/**
|
|
124
96
|
* Join Type Enum
|
|
@@ -157,6 +129,17 @@ exports.AggregationNodeSchema = zod_1.z.object({
|
|
|
157
129
|
* }
|
|
158
130
|
*/
|
|
159
131
|
exports.JoinType = zod_1.z.enum(['inner', 'left', 'right', 'full']);
|
|
132
|
+
/**
|
|
133
|
+
* Join Execution Strategy
|
|
134
|
+
* Hints to the query engine on how to execute the join.
|
|
135
|
+
*
|
|
136
|
+
* Strategies:
|
|
137
|
+
* - **auto**: Engine decides best strategy (Default).
|
|
138
|
+
* - **database**: Push down join to the database (Requires same datasource).
|
|
139
|
+
* - **hash**: Load both sets into memory and hash join (Cross-datasource, memory intensive).
|
|
140
|
+
* - **loop**: Nested loop lookup (N+1 safe version). (Good for small right-side lookups).
|
|
141
|
+
*/
|
|
142
|
+
exports.JoinStrategy = zod_1.z.enum(['auto', 'database', 'hash', 'loop']);
|
|
160
143
|
/**
|
|
161
144
|
* Join Node
|
|
162
145
|
* Represents table joins for combining data from multiple objects.
|
|
@@ -237,9 +220,10 @@ exports.JoinType = zod_1.z.enum(['inner', 'left', 'right', 'full']);
|
|
|
237
220
|
*/
|
|
238
221
|
exports.JoinNodeSchema = zod_1.z.lazy(() => zod_1.z.object({
|
|
239
222
|
type: exports.JoinType.describe('Join type'),
|
|
223
|
+
strategy: exports.JoinStrategy.optional().describe('Execution strategy hint'),
|
|
240
224
|
object: zod_1.z.string().describe('Object/table to join'),
|
|
241
225
|
alias: zod_1.z.string().optional().describe('Table alias'),
|
|
242
|
-
on:
|
|
226
|
+
on: filter_zod_1.FilterConditionSchema.describe('Join condition'),
|
|
243
227
|
subquery: zod_1.z.lazy(() => exports.QuerySchema).optional().describe('Subquery instead of object'),
|
|
244
228
|
}));
|
|
245
229
|
/**
|
|
@@ -406,101 +390,28 @@ exports.FieldNodeSchema = zod_1.z.lazy(() => zod_1.z.union([
|
|
|
406
390
|
* This schema represents ObjectQL - a universal query language that abstracts
|
|
407
391
|
* SQL, NoSQL, and SaaS APIs into a single unified interface.
|
|
408
392
|
*
|
|
409
|
-
*
|
|
410
|
-
* -
|
|
411
|
-
* -
|
|
412
|
-
* -
|
|
413
|
-
* -
|
|
414
|
-
* - **Subqueries**: Nested queries in joins and filters
|
|
415
|
-
* - **Sorting & Pagination**: ORDER BY, LIMIT, OFFSET
|
|
393
|
+
* Updates (v2):
|
|
394
|
+
* - Aligned with modern ORM standards (Prisma/TypeORM)
|
|
395
|
+
* - Added `cursor` based pagination support
|
|
396
|
+
* - Renamed `top`/`skip` to `limit`/`offset`
|
|
397
|
+
* - Unified filtering syntax with `FilterConditionSchema`
|
|
416
398
|
*
|
|
417
399
|
* @example
|
|
418
400
|
* // Simple query: SELECT name, email FROM account WHERE status = 'active'
|
|
419
401
|
* {
|
|
420
402
|
* object: 'account',
|
|
421
403
|
* fields: ['name', 'email'],
|
|
422
|
-
*
|
|
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
|
-
* ]
|
|
404
|
+
* where: { status: 'active' }
|
|
467
405
|
* }
|
|
468
406
|
*
|
|
469
407
|
* @example
|
|
470
|
-
* //
|
|
408
|
+
* // Pagination with Limit/Offset
|
|
471
409
|
* {
|
|
472
|
-
* object: '
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
*
|
|
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
|
-
* ]
|
|
410
|
+
* object: 'post',
|
|
411
|
+
* where: { published: true },
|
|
412
|
+
* orderBy: [{ field: 'created_at', order: 'desc' }],
|
|
413
|
+
* limit: 20,
|
|
414
|
+
* offset: 40
|
|
504
415
|
* }
|
|
505
416
|
*/
|
|
506
417
|
exports.QuerySchema = zod_1.z.object({
|
|
@@ -508,23 +419,24 @@ exports.QuerySchema = zod_1.z.object({
|
|
|
508
419
|
object: zod_1.z.string().describe('Object name (e.g. account)'),
|
|
509
420
|
/** Select Clause */
|
|
510
421
|
fields: zod_1.z.array(exports.FieldNodeSchema).optional().describe('Fields to retrieve'),
|
|
511
|
-
/**
|
|
512
|
-
|
|
513
|
-
/**
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
|
|
422
|
+
/** Where Clause (Filtering) */
|
|
423
|
+
where: filter_zod_1.FilterConditionSchema.optional().describe('Filtering criteria (WHERE)'),
|
|
424
|
+
/** Order By Clause (Sorting) */
|
|
425
|
+
orderBy: zod_1.z.array(exports.SortNodeSchema).optional().describe('Sorting instructions (ORDER BY)'),
|
|
426
|
+
/** Pagination */
|
|
427
|
+
limit: zod_1.z.number().optional().describe('Max records to return (LIMIT)'),
|
|
428
|
+
offset: zod_1.z.number().optional().describe('Records to skip (OFFSET)'),
|
|
429
|
+
cursor: zod_1.z.record(zod_1.z.any()).optional().describe('Cursor for keyset pagination'),
|
|
517
430
|
/** Joins */
|
|
518
|
-
joins: zod_1.z.array(exports.JoinNodeSchema).optional().describe('Table
|
|
431
|
+
joins: zod_1.z.array(exports.JoinNodeSchema).optional().describe('Explicit Table Joins'),
|
|
432
|
+
/** Aggregations */
|
|
433
|
+
aggregations: zod_1.z.array(exports.AggregationNodeSchema).optional().describe('Aggregation functions'),
|
|
519
434
|
/** Group By Clause */
|
|
520
435
|
groupBy: zod_1.z.array(zod_1.z.string()).optional().describe('GROUP BY fields'),
|
|
521
436
|
/** Having Clause */
|
|
522
|
-
having:
|
|
523
|
-
/**
|
|
524
|
-
|
|
525
|
-
/** Pagination */
|
|
526
|
-
top: zod_1.z.number().optional().describe('Limit results'),
|
|
527
|
-
skip: zod_1.z.number().optional().describe('Offset results'),
|
|
437
|
+
having: filter_zod_1.FilterConditionSchema.optional().describe('HAVING clause for aggregation filtering'),
|
|
438
|
+
/** Window Functions */
|
|
439
|
+
windowFunctions: zod_1.z.array(exports.WindowFunctionNodeSchema).optional().describe('Window functions with OVER clause'),
|
|
528
440
|
/** Subquery flag */
|
|
529
441
|
distinct: zod_1.z.boolean().optional().describe('SELECT DISTINCT flag'),
|
|
530
442
|
});
|
|
@@ -5,7 +5,11 @@ import { z } from 'zod';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const ScriptValidationSchema: z.ZodObject<{
|
|
7
7
|
name: z.ZodString;
|
|
8
|
+
label: z.ZodOptional<z.ZodString>;
|
|
9
|
+
description: z.ZodOptional<z.ZodString>;
|
|
8
10
|
active: z.ZodDefault<z.ZodBoolean>;
|
|
11
|
+
events: z.ZodDefault<z.ZodArray<z.ZodEnum<["insert", "update", "delete"]>, "many">>;
|
|
12
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
9
13
|
severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
10
14
|
message: z.ZodString;
|
|
11
15
|
} & {
|
|
@@ -16,14 +20,22 @@ export declare const ScriptValidationSchema: z.ZodObject<{
|
|
|
16
20
|
type: "script";
|
|
17
21
|
name: string;
|
|
18
22
|
active: boolean;
|
|
23
|
+
events: ("insert" | "update" | "delete")[];
|
|
19
24
|
severity: "error" | "warning" | "info";
|
|
20
25
|
condition: string;
|
|
26
|
+
label?: string | undefined;
|
|
27
|
+
description?: string | undefined;
|
|
28
|
+
tags?: string[] | undefined;
|
|
21
29
|
}, {
|
|
22
30
|
message: string;
|
|
23
31
|
type: "script";
|
|
24
32
|
name: string;
|
|
25
33
|
condition: string;
|
|
34
|
+
label?: string | undefined;
|
|
35
|
+
description?: string | undefined;
|
|
26
36
|
active?: boolean | undefined;
|
|
37
|
+
events?: ("insert" | "update" | "delete")[] | undefined;
|
|
38
|
+
tags?: string[] | undefined;
|
|
27
39
|
severity?: "error" | "warning" | "info" | undefined;
|
|
28
40
|
}>;
|
|
29
41
|
/**
|
|
@@ -32,7 +44,11 @@ export declare const ScriptValidationSchema: z.ZodObject<{
|
|
|
32
44
|
*/
|
|
33
45
|
export declare const UniquenessValidationSchema: z.ZodObject<{
|
|
34
46
|
name: z.ZodString;
|
|
47
|
+
label: z.ZodOptional<z.ZodString>;
|
|
48
|
+
description: z.ZodOptional<z.ZodString>;
|
|
35
49
|
active: z.ZodDefault<z.ZodBoolean>;
|
|
50
|
+
events: z.ZodDefault<z.ZodArray<z.ZodEnum<["insert", "update", "delete"]>, "many">>;
|
|
51
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
36
52
|
severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
37
53
|
message: z.ZodString;
|
|
38
54
|
} & {
|
|
@@ -43,18 +59,26 @@ export declare const UniquenessValidationSchema: z.ZodObject<{
|
|
|
43
59
|
}, "strip", z.ZodTypeAny, {
|
|
44
60
|
message: string;
|
|
45
61
|
type: "unique";
|
|
46
|
-
name: string;
|
|
47
62
|
fields: string[];
|
|
63
|
+
name: string;
|
|
48
64
|
active: boolean;
|
|
65
|
+
events: ("insert" | "update" | "delete")[];
|
|
49
66
|
severity: "error" | "warning" | "info";
|
|
50
67
|
caseSensitive: boolean;
|
|
68
|
+
label?: string | undefined;
|
|
69
|
+
description?: string | undefined;
|
|
70
|
+
tags?: string[] | undefined;
|
|
51
71
|
scope?: string | undefined;
|
|
52
72
|
}, {
|
|
53
73
|
message: string;
|
|
54
74
|
type: "unique";
|
|
55
|
-
name: string;
|
|
56
75
|
fields: string[];
|
|
76
|
+
name: string;
|
|
77
|
+
label?: string | undefined;
|
|
78
|
+
description?: string | undefined;
|
|
57
79
|
active?: boolean | undefined;
|
|
80
|
+
events?: ("insert" | "update" | "delete")[] | undefined;
|
|
81
|
+
tags?: string[] | undefined;
|
|
58
82
|
severity?: "error" | "warning" | "info" | undefined;
|
|
59
83
|
scope?: string | undefined;
|
|
60
84
|
caseSensitive?: boolean | undefined;
|
|
@@ -65,7 +89,11 @@ export declare const UniquenessValidationSchema: z.ZodObject<{
|
|
|
65
89
|
*/
|
|
66
90
|
export declare const StateMachineValidationSchema: z.ZodObject<{
|
|
67
91
|
name: z.ZodString;
|
|
92
|
+
label: z.ZodOptional<z.ZodString>;
|
|
93
|
+
description: z.ZodOptional<z.ZodString>;
|
|
68
94
|
active: z.ZodDefault<z.ZodBoolean>;
|
|
95
|
+
events: z.ZodDefault<z.ZodArray<z.ZodEnum<["insert", "update", "delete"]>, "many">>;
|
|
96
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
69
97
|
severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
70
98
|
message: z.ZodString;
|
|
71
99
|
} & {
|
|
@@ -75,18 +103,26 @@ export declare const StateMachineValidationSchema: z.ZodObject<{
|
|
|
75
103
|
}, "strip", z.ZodTypeAny, {
|
|
76
104
|
message: string;
|
|
77
105
|
type: "state_machine";
|
|
78
|
-
name: string;
|
|
79
106
|
field: string;
|
|
107
|
+
name: string;
|
|
80
108
|
active: boolean;
|
|
109
|
+
events: ("insert" | "update" | "delete")[];
|
|
81
110
|
severity: "error" | "warning" | "info";
|
|
82
111
|
transitions: Record<string, string[]>;
|
|
112
|
+
label?: string | undefined;
|
|
113
|
+
description?: string | undefined;
|
|
114
|
+
tags?: string[] | undefined;
|
|
83
115
|
}, {
|
|
84
116
|
message: string;
|
|
85
117
|
type: "state_machine";
|
|
86
|
-
name: string;
|
|
87
118
|
field: string;
|
|
119
|
+
name: string;
|
|
88
120
|
transitions: Record<string, string[]>;
|
|
121
|
+
label?: string | undefined;
|
|
122
|
+
description?: string | undefined;
|
|
89
123
|
active?: boolean | undefined;
|
|
124
|
+
events?: ("insert" | "update" | "delete")[] | undefined;
|
|
125
|
+
tags?: string[] | undefined;
|
|
90
126
|
severity?: "error" | "warning" | "info" | undefined;
|
|
91
127
|
}>;
|
|
92
128
|
/**
|
|
@@ -95,7 +131,11 @@ export declare const StateMachineValidationSchema: z.ZodObject<{
|
|
|
95
131
|
*/
|
|
96
132
|
export declare const FormatValidationSchema: z.ZodObject<{
|
|
97
133
|
name: z.ZodString;
|
|
134
|
+
label: z.ZodOptional<z.ZodString>;
|
|
135
|
+
description: z.ZodOptional<z.ZodString>;
|
|
98
136
|
active: z.ZodDefault<z.ZodBoolean>;
|
|
137
|
+
events: z.ZodDefault<z.ZodArray<z.ZodEnum<["insert", "update", "delete"]>, "many">>;
|
|
138
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
99
139
|
severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
100
140
|
message: z.ZodString;
|
|
101
141
|
} & {
|
|
@@ -106,19 +146,27 @@ export declare const FormatValidationSchema: z.ZodObject<{
|
|
|
106
146
|
}, "strip", z.ZodTypeAny, {
|
|
107
147
|
message: string;
|
|
108
148
|
type: "format";
|
|
109
|
-
name: string;
|
|
110
149
|
field: string;
|
|
150
|
+
name: string;
|
|
111
151
|
active: boolean;
|
|
152
|
+
events: ("insert" | "update" | "delete")[];
|
|
112
153
|
severity: "error" | "warning" | "info";
|
|
154
|
+
label?: string | undefined;
|
|
155
|
+
description?: string | undefined;
|
|
113
156
|
format?: "email" | "url" | "phone" | "json" | undefined;
|
|
157
|
+
tags?: string[] | undefined;
|
|
114
158
|
regex?: string | undefined;
|
|
115
159
|
}, {
|
|
116
160
|
message: string;
|
|
117
161
|
type: "format";
|
|
118
|
-
name: string;
|
|
119
162
|
field: string;
|
|
163
|
+
name: string;
|
|
164
|
+
label?: string | undefined;
|
|
165
|
+
description?: string | undefined;
|
|
120
166
|
format?: "email" | "url" | "phone" | "json" | undefined;
|
|
121
167
|
active?: boolean | undefined;
|
|
168
|
+
events?: ("insert" | "update" | "delete")[] | undefined;
|
|
169
|
+
tags?: string[] | undefined;
|
|
122
170
|
severity?: "error" | "warning" | "info" | undefined;
|
|
123
171
|
regex?: string | undefined;
|
|
124
172
|
}>;
|
|
@@ -187,7 +235,11 @@ export declare const FormatValidationSchema: z.ZodObject<{
|
|
|
187
235
|
*/
|
|
188
236
|
export declare const CrossFieldValidationSchema: z.ZodObject<{
|
|
189
237
|
name: z.ZodString;
|
|
238
|
+
label: z.ZodOptional<z.ZodString>;
|
|
239
|
+
description: z.ZodOptional<z.ZodString>;
|
|
190
240
|
active: z.ZodDefault<z.ZodBoolean>;
|
|
241
|
+
events: z.ZodDefault<z.ZodArray<z.ZodEnum<["insert", "update", "delete"]>, "many">>;
|
|
242
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
191
243
|
severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
192
244
|
message: z.ZodString;
|
|
193
245
|
} & {
|
|
@@ -197,22 +249,77 @@ export declare const CrossFieldValidationSchema: z.ZodObject<{
|
|
|
197
249
|
}, "strip", z.ZodTypeAny, {
|
|
198
250
|
message: string;
|
|
199
251
|
type: "cross_field";
|
|
200
|
-
name: string;
|
|
201
252
|
fields: string[];
|
|
253
|
+
name: string;
|
|
202
254
|
active: boolean;
|
|
255
|
+
events: ("insert" | "update" | "delete")[];
|
|
203
256
|
severity: "error" | "warning" | "info";
|
|
204
257
|
condition: string;
|
|
258
|
+
label?: string | undefined;
|
|
259
|
+
description?: string | undefined;
|
|
260
|
+
tags?: string[] | undefined;
|
|
205
261
|
}, {
|
|
206
262
|
message: string;
|
|
207
263
|
type: "cross_field";
|
|
208
|
-
name: string;
|
|
209
264
|
fields: string[];
|
|
265
|
+
name: string;
|
|
210
266
|
condition: string;
|
|
267
|
+
label?: string | undefined;
|
|
268
|
+
description?: string | undefined;
|
|
269
|
+
active?: boolean | undefined;
|
|
270
|
+
events?: ("insert" | "update" | "delete")[] | undefined;
|
|
271
|
+
tags?: string[] | undefined;
|
|
272
|
+
severity?: "error" | "warning" | "info" | undefined;
|
|
273
|
+
}>;
|
|
274
|
+
/**
|
|
275
|
+
* 6. JSON Structure Validation
|
|
276
|
+
* Validates JSON fields against a JSON Schema.
|
|
277
|
+
*
|
|
278
|
+
* ## Use Cases
|
|
279
|
+
* - Validating configuration objects stored in JSON fields
|
|
280
|
+
* - Enforcing API payload structures
|
|
281
|
+
* - Complex nested data validation
|
|
282
|
+
*/
|
|
283
|
+
export declare const JSONValidationSchema: z.ZodObject<{
|
|
284
|
+
name: z.ZodString;
|
|
285
|
+
label: z.ZodOptional<z.ZodString>;
|
|
286
|
+
description: z.ZodOptional<z.ZodString>;
|
|
287
|
+
active: z.ZodDefault<z.ZodBoolean>;
|
|
288
|
+
events: z.ZodDefault<z.ZodArray<z.ZodEnum<["insert", "update", "delete"]>, "many">>;
|
|
289
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
290
|
+
severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
291
|
+
message: z.ZodString;
|
|
292
|
+
} & {
|
|
293
|
+
type: z.ZodLiteral<"json_schema">;
|
|
294
|
+
field: z.ZodString;
|
|
295
|
+
schema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
296
|
+
}, "strip", z.ZodTypeAny, {
|
|
297
|
+
message: string;
|
|
298
|
+
type: "json_schema";
|
|
299
|
+
field: string;
|
|
300
|
+
name: string;
|
|
301
|
+
active: boolean;
|
|
302
|
+
events: ("insert" | "update" | "delete")[];
|
|
303
|
+
severity: "error" | "warning" | "info";
|
|
304
|
+
schema: Record<string, any>;
|
|
305
|
+
label?: string | undefined;
|
|
306
|
+
description?: string | undefined;
|
|
307
|
+
tags?: string[] | undefined;
|
|
308
|
+
}, {
|
|
309
|
+
message: string;
|
|
310
|
+
type: "json_schema";
|
|
311
|
+
field: string;
|
|
312
|
+
name: string;
|
|
313
|
+
schema: Record<string, any>;
|
|
314
|
+
label?: string | undefined;
|
|
315
|
+
description?: string | undefined;
|
|
211
316
|
active?: boolean | undefined;
|
|
317
|
+
events?: ("insert" | "update" | "delete")[] | undefined;
|
|
318
|
+
tags?: string[] | undefined;
|
|
212
319
|
severity?: "error" | "warning" | "info" | undefined;
|
|
213
320
|
}>;
|
|
214
321
|
/**
|
|
215
|
-
*
|
|
322
|
+
* 7. Async Validation
|
|
216
323
|
* Remote validation via API call or database query.
|
|
217
324
|
*
|
|
218
325
|
* ## Use Cases
|
|
@@ -325,23 +432,22 @@ export declare const CrossFieldValidationSchema: z.ZodObject<{
|
|
|
325
432
|
* }
|
|
326
433
|
* }
|
|
327
434
|
* ```
|
|
328
|
-
*
|
|
329
|
-
* ## Best Practices
|
|
330
|
-
* - Always set a reasonable `timeout` (default is 5000ms)
|
|
331
|
-
* - Use `debounce` for fields that are typed (300-500ms recommended)
|
|
332
|
-
* - Implement proper error handling on the server side
|
|
333
|
-
* - Cache validation results when appropriate
|
|
334
|
-
* - Consider rate limiting for external API calls
|
|
335
435
|
*/
|
|
336
436
|
export declare const AsyncValidationSchema: z.ZodObject<{
|
|
337
437
|
name: z.ZodString;
|
|
438
|
+
label: z.ZodOptional<z.ZodString>;
|
|
439
|
+
description: z.ZodOptional<z.ZodString>;
|
|
338
440
|
active: z.ZodDefault<z.ZodBoolean>;
|
|
441
|
+
events: z.ZodDefault<z.ZodArray<z.ZodEnum<["insert", "update", "delete"]>, "many">>;
|
|
442
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
339
443
|
severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
340
444
|
message: z.ZodString;
|
|
341
445
|
} & {
|
|
342
446
|
type: z.ZodLiteral<"async">;
|
|
343
447
|
field: z.ZodString;
|
|
344
448
|
validatorUrl: z.ZodOptional<z.ZodString>;
|
|
449
|
+
method: z.ZodDefault<z.ZodEnum<["GET", "POST"]>>;
|
|
450
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
345
451
|
validatorFunction: z.ZodOptional<z.ZodString>;
|
|
346
452
|
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
347
453
|
debounce: z.ZodOptional<z.ZodNumber>;
|
|
@@ -349,63 +455,84 @@ export declare const AsyncValidationSchema: z.ZodObject<{
|
|
|
349
455
|
}, "strip", z.ZodTypeAny, {
|
|
350
456
|
message: string;
|
|
351
457
|
type: "async";
|
|
352
|
-
name: string;
|
|
353
458
|
field: string;
|
|
459
|
+
name: string;
|
|
354
460
|
active: boolean;
|
|
461
|
+
events: ("insert" | "update" | "delete")[];
|
|
355
462
|
severity: "error" | "warning" | "info";
|
|
463
|
+
method: "GET" | "POST";
|
|
356
464
|
timeout: number;
|
|
357
465
|
params?: Record<string, any> | undefined;
|
|
466
|
+
label?: string | undefined;
|
|
467
|
+
description?: string | undefined;
|
|
468
|
+
tags?: string[] | undefined;
|
|
358
469
|
validatorUrl?: string | undefined;
|
|
470
|
+
headers?: Record<string, string> | undefined;
|
|
359
471
|
validatorFunction?: string | undefined;
|
|
360
472
|
debounce?: number | undefined;
|
|
361
473
|
}, {
|
|
362
474
|
message: string;
|
|
363
475
|
type: "async";
|
|
364
|
-
name: string;
|
|
365
476
|
field: string;
|
|
477
|
+
name: string;
|
|
366
478
|
params?: Record<string, any> | undefined;
|
|
479
|
+
label?: string | undefined;
|
|
480
|
+
description?: string | undefined;
|
|
367
481
|
active?: boolean | undefined;
|
|
482
|
+
events?: ("insert" | "update" | "delete")[] | undefined;
|
|
483
|
+
tags?: string[] | undefined;
|
|
368
484
|
severity?: "error" | "warning" | "info" | undefined;
|
|
369
485
|
validatorUrl?: string | undefined;
|
|
486
|
+
method?: "GET" | "POST" | undefined;
|
|
487
|
+
headers?: Record<string, string> | undefined;
|
|
370
488
|
validatorFunction?: string | undefined;
|
|
371
489
|
timeout?: number | undefined;
|
|
372
490
|
debounce?: number | undefined;
|
|
373
491
|
}>;
|
|
374
492
|
/**
|
|
375
|
-
*
|
|
493
|
+
* 8. Custom Validator Function
|
|
376
494
|
* User-defined validation logic with code reference.
|
|
377
495
|
*/
|
|
378
496
|
export declare const CustomValidatorSchema: z.ZodObject<{
|
|
379
497
|
name: z.ZodString;
|
|
498
|
+
label: z.ZodOptional<z.ZodString>;
|
|
499
|
+
description: z.ZodOptional<z.ZodString>;
|
|
380
500
|
active: z.ZodDefault<z.ZodBoolean>;
|
|
501
|
+
events: z.ZodDefault<z.ZodArray<z.ZodEnum<["insert", "update", "delete"]>, "many">>;
|
|
502
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
381
503
|
severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
382
504
|
message: z.ZodString;
|
|
383
505
|
} & {
|
|
384
506
|
type: z.ZodLiteral<"custom">;
|
|
385
|
-
|
|
386
|
-
validatorFunction: z.ZodString;
|
|
507
|
+
handler: z.ZodString;
|
|
387
508
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
388
509
|
}, "strip", z.ZodTypeAny, {
|
|
389
510
|
message: string;
|
|
390
511
|
type: "custom";
|
|
391
512
|
name: string;
|
|
392
513
|
active: boolean;
|
|
514
|
+
events: ("insert" | "update" | "delete")[];
|
|
393
515
|
severity: "error" | "warning" | "info";
|
|
394
|
-
|
|
516
|
+
handler: string;
|
|
395
517
|
params?: Record<string, any> | undefined;
|
|
396
|
-
|
|
518
|
+
label?: string | undefined;
|
|
519
|
+
description?: string | undefined;
|
|
520
|
+
tags?: string[] | undefined;
|
|
397
521
|
}, {
|
|
398
522
|
message: string;
|
|
399
523
|
type: "custom";
|
|
400
524
|
name: string;
|
|
401
|
-
|
|
525
|
+
handler: string;
|
|
402
526
|
params?: Record<string, any> | undefined;
|
|
403
|
-
|
|
527
|
+
label?: string | undefined;
|
|
528
|
+
description?: string | undefined;
|
|
404
529
|
active?: boolean | undefined;
|
|
530
|
+
events?: ("insert" | "update" | "delete")[] | undefined;
|
|
531
|
+
tags?: string[] | undefined;
|
|
405
532
|
severity?: "error" | "warning" | "info" | undefined;
|
|
406
533
|
}>;
|
|
407
534
|
/**
|
|
408
|
-
* Master Validation Rule Schema
|
|
535
|
+
* 9. Master Validation Rule Schema
|
|
409
536
|
*/
|
|
410
537
|
export declare const ValidationRuleSchema: z.ZodType<any>;
|
|
411
538
|
/**
|
|
@@ -586,7 +713,11 @@ export declare const ValidationRuleSchema: z.ZodType<any>;
|
|
|
586
713
|
*/
|
|
587
714
|
export declare const ConditionalValidationSchema: z.ZodObject<{
|
|
588
715
|
name: z.ZodString;
|
|
716
|
+
label: z.ZodOptional<z.ZodString>;
|
|
717
|
+
description: z.ZodOptional<z.ZodString>;
|
|
589
718
|
active: z.ZodDefault<z.ZodBoolean>;
|
|
719
|
+
events: z.ZodDefault<z.ZodArray<z.ZodEnum<["insert", "update", "delete"]>, "many">>;
|
|
720
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
590
721
|
severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
591
722
|
message: z.ZodString;
|
|
592
723
|
} & {
|
|
@@ -599,8 +730,12 @@ export declare const ConditionalValidationSchema: z.ZodObject<{
|
|
|
599
730
|
type: "conditional";
|
|
600
731
|
name: string;
|
|
601
732
|
active: boolean;
|
|
733
|
+
events: ("insert" | "update" | "delete")[];
|
|
602
734
|
severity: "error" | "warning" | "info";
|
|
603
735
|
when: string;
|
|
736
|
+
label?: string | undefined;
|
|
737
|
+
description?: string | undefined;
|
|
738
|
+
tags?: string[] | undefined;
|
|
604
739
|
then?: any;
|
|
605
740
|
otherwise?: any;
|
|
606
741
|
}, {
|
|
@@ -608,7 +743,11 @@ export declare const ConditionalValidationSchema: z.ZodObject<{
|
|
|
608
743
|
type: "conditional";
|
|
609
744
|
name: string;
|
|
610
745
|
when: string;
|
|
746
|
+
label?: string | undefined;
|
|
747
|
+
description?: string | undefined;
|
|
611
748
|
active?: boolean | undefined;
|
|
749
|
+
events?: ("insert" | "update" | "delete")[] | undefined;
|
|
750
|
+
tags?: string[] | undefined;
|
|
612
751
|
severity?: "error" | "warning" | "info" | undefined;
|
|
613
752
|
then?: any;
|
|
614
753
|
otherwise?: any;
|
|
@@ -619,6 +758,7 @@ export type UniquenessValidation = z.infer<typeof UniquenessValidationSchema>;
|
|
|
619
758
|
export type StateMachineValidation = z.infer<typeof StateMachineValidationSchema>;
|
|
620
759
|
export type FormatValidation = z.infer<typeof FormatValidationSchema>;
|
|
621
760
|
export type CrossFieldValidation = z.infer<typeof CrossFieldValidationSchema>;
|
|
761
|
+
export type JSONValidation = z.infer<typeof JSONValidationSchema>;
|
|
622
762
|
export type AsyncValidation = z.infer<typeof AsyncValidationSchema>;
|
|
623
763
|
export type CustomValidation = z.infer<typeof CustomValidatorSchema>;
|
|
624
764
|
export type ConditionalValidation = z.infer<typeof ConditionalValidationSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.zod.d.ts","sourceRoot":"","sources":["../../src/data/validation.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"validation.zod.d.ts","sourceRoot":"","sources":["../../src/data/validation.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2ExB;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKrC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIvC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKjC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIrC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI/B,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkHG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAY/C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+KG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKtC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACrE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|