@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
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* # Space Protocol
|
|
4
|
+
*
|
|
5
|
+
* Defines the SaaS-side representation of a Space (formerly Project).
|
|
6
|
+
* A Space is a logical container for business apps, data, and logic.
|
|
7
|
+
* Corresponds to an entry in the Hub's database.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Subscription Status Enum
|
|
11
|
+
*/
|
|
12
|
+
export declare const SubscriptionStatus: z.ZodEnum<["active", "past_due", "canceled", "trialing", "incomplete"]>;
|
|
13
|
+
/**
|
|
14
|
+
* Space Subscription Info
|
|
15
|
+
*/
|
|
16
|
+
export declare const SpaceSubscriptionSchema: z.ZodObject<{
|
|
17
|
+
planId: z.ZodString;
|
|
18
|
+
status: z.ZodEnum<["active", "past_due", "canceled", "trialing", "incomplete"]>;
|
|
19
|
+
currentPeriodEnd: z.ZodOptional<z.ZodString>;
|
|
20
|
+
stripeCustomerId: z.ZodOptional<z.ZodString>;
|
|
21
|
+
stripeSubscriptionId: z.ZodOptional<z.ZodString>;
|
|
22
|
+
/**
|
|
23
|
+
* Purchased Add-ons from Marketplace
|
|
24
|
+
*/
|
|
25
|
+
addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26
|
+
pluginId: z.ZodString;
|
|
27
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
28
|
+
status: z.ZodDefault<z.ZodEnum<["active", "past_due", "canceled", "trialing", "incomplete"]>>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
status: "active" | "past_due" | "canceled" | "trialing" | "incomplete";
|
|
31
|
+
pluginId: string;
|
|
32
|
+
quantity: number;
|
|
33
|
+
}, {
|
|
34
|
+
pluginId: string;
|
|
35
|
+
status?: "active" | "past_due" | "canceled" | "trialing" | "incomplete" | undefined;
|
|
36
|
+
quantity?: number | undefined;
|
|
37
|
+
}>, "many">>;
|
|
38
|
+
/**
|
|
39
|
+
* Quota Usage Snapshot
|
|
40
|
+
* Cached usage metrics for quick display/validation.
|
|
41
|
+
*/
|
|
42
|
+
usage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
status: "active" | "past_due" | "canceled" | "trialing" | "incomplete";
|
|
45
|
+
planId: string;
|
|
46
|
+
currentPeriodEnd?: string | undefined;
|
|
47
|
+
stripeCustomerId?: string | undefined;
|
|
48
|
+
stripeSubscriptionId?: string | undefined;
|
|
49
|
+
addons?: {
|
|
50
|
+
status: "active" | "past_due" | "canceled" | "trialing" | "incomplete";
|
|
51
|
+
pluginId: string;
|
|
52
|
+
quantity: number;
|
|
53
|
+
}[] | undefined;
|
|
54
|
+
usage?: Record<string, number> | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
status: "active" | "past_due" | "canceled" | "trialing" | "incomplete";
|
|
57
|
+
planId: string;
|
|
58
|
+
currentPeriodEnd?: string | undefined;
|
|
59
|
+
stripeCustomerId?: string | undefined;
|
|
60
|
+
stripeSubscriptionId?: string | undefined;
|
|
61
|
+
addons?: {
|
|
62
|
+
pluginId: string;
|
|
63
|
+
status?: "active" | "past_due" | "canceled" | "trialing" | "incomplete" | undefined;
|
|
64
|
+
quantity?: number | undefined;
|
|
65
|
+
}[] | undefined;
|
|
66
|
+
usage?: Record<string, number> | undefined;
|
|
67
|
+
}>;
|
|
68
|
+
/**
|
|
69
|
+
* Deployment Target
|
|
70
|
+
* Vercel or Container configuration.
|
|
71
|
+
*/
|
|
72
|
+
export declare const DeploymentTargetSchema: z.ZodObject<{
|
|
73
|
+
provider: z.ZodEnum<["vercel", "docker", "kubernetes"]>;
|
|
74
|
+
region: z.ZodOptional<z.ZodString>;
|
|
75
|
+
url: z.ZodOptional<z.ZodString>;
|
|
76
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
provider: "vercel" | "docker" | "kubernetes";
|
|
79
|
+
url?: string | undefined;
|
|
80
|
+
env?: Record<string, string> | undefined;
|
|
81
|
+
region?: string | undefined;
|
|
82
|
+
}, {
|
|
83
|
+
provider: "vercel" | "docker" | "kubernetes";
|
|
84
|
+
url?: string | undefined;
|
|
85
|
+
env?: Record<string, string> | undefined;
|
|
86
|
+
region?: string | undefined;
|
|
87
|
+
}>;
|
|
88
|
+
/**
|
|
89
|
+
* Hub Space Schema
|
|
90
|
+
*/
|
|
91
|
+
export declare const HubSpaceSchema: z.ZodObject<{
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
/**
|
|
94
|
+
* Display Name
|
|
95
|
+
*/
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
slug: z.ZodString;
|
|
98
|
+
/**
|
|
99
|
+
* Owner (User or Org ID in Hub)
|
|
100
|
+
*/
|
|
101
|
+
ownerId: z.ZodString;
|
|
102
|
+
/**
|
|
103
|
+
* The Runtime Instance Definition
|
|
104
|
+
* Defines the technical execution environment.
|
|
105
|
+
*/
|
|
106
|
+
runtime: z.ZodOptional<z.ZodObject<{
|
|
107
|
+
isolation: z.ZodEnum<["shared_schema", "isolated_schema", "isolated_db"]>;
|
|
108
|
+
quotas: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
maxUsers: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
maxStorage: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
apiRateLimit: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
maxUsers?: number | undefined;
|
|
114
|
+
maxStorage?: number | undefined;
|
|
115
|
+
apiRateLimit?: number | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
maxUsers?: number | undefined;
|
|
118
|
+
maxStorage?: number | undefined;
|
|
119
|
+
apiRateLimit?: number | undefined;
|
|
120
|
+
}>>;
|
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
|
122
|
+
isolation: "shared_schema" | "isolated_schema" | "isolated_db";
|
|
123
|
+
quotas?: {
|
|
124
|
+
maxUsers?: number | undefined;
|
|
125
|
+
maxStorage?: number | undefined;
|
|
126
|
+
apiRateLimit?: number | undefined;
|
|
127
|
+
} | undefined;
|
|
128
|
+
}, {
|
|
129
|
+
isolation: "shared_schema" | "isolated_schema" | "isolated_db";
|
|
130
|
+
quotas?: {
|
|
131
|
+
maxUsers?: number | undefined;
|
|
132
|
+
maxStorage?: number | undefined;
|
|
133
|
+
apiRateLimit?: number | undefined;
|
|
134
|
+
} | undefined;
|
|
135
|
+
}>>;
|
|
136
|
+
/**
|
|
137
|
+
* The Desired State (Bill of Materials)
|
|
138
|
+
* This is what the user configures in the UI.
|
|
139
|
+
*/
|
|
140
|
+
bom: z.ZodObject<{
|
|
141
|
+
tenantId: z.ZodString;
|
|
142
|
+
dependencies: z.ZodArray<z.ZodObject<{
|
|
143
|
+
id: z.ZodString;
|
|
144
|
+
version: z.ZodDefault<z.ZodString>;
|
|
145
|
+
configuration: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
146
|
+
features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
147
|
+
}, "strip", z.ZodTypeAny, {
|
|
148
|
+
id: string;
|
|
149
|
+
version: string;
|
|
150
|
+
configuration?: Record<string, any> | undefined;
|
|
151
|
+
features?: Record<string, boolean> | undefined;
|
|
152
|
+
}, {
|
|
153
|
+
id: string;
|
|
154
|
+
version?: string | undefined;
|
|
155
|
+
configuration?: Record<string, any> | undefined;
|
|
156
|
+
features?: Record<string, boolean> | undefined;
|
|
157
|
+
}>, "many">;
|
|
158
|
+
environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
159
|
+
resolutionStrategy: z.ZodDefault<z.ZodEnum<["strict", "override", "merge"]>>;
|
|
160
|
+
}, "strip", z.ZodTypeAny, {
|
|
161
|
+
tenantId: string;
|
|
162
|
+
dependencies: {
|
|
163
|
+
id: string;
|
|
164
|
+
version: string;
|
|
165
|
+
configuration?: Record<string, any> | undefined;
|
|
166
|
+
features?: Record<string, boolean> | undefined;
|
|
167
|
+
}[];
|
|
168
|
+
resolutionStrategy: "strict" | "merge" | "override";
|
|
169
|
+
environment?: Record<string, string> | undefined;
|
|
170
|
+
}, {
|
|
171
|
+
tenantId: string;
|
|
172
|
+
dependencies: {
|
|
173
|
+
id: string;
|
|
174
|
+
version?: string | undefined;
|
|
175
|
+
configuration?: Record<string, any> | undefined;
|
|
176
|
+
features?: Record<string, boolean> | undefined;
|
|
177
|
+
}[];
|
|
178
|
+
environment?: Record<string, string> | undefined;
|
|
179
|
+
resolutionStrategy?: "strict" | "merge" | "override" | undefined;
|
|
180
|
+
}>;
|
|
181
|
+
/**
|
|
182
|
+
* The Current Actual State (Last Successful Build)
|
|
183
|
+
*/
|
|
184
|
+
lastBuild: z.ZodOptional<z.ZodObject<{
|
|
185
|
+
id: z.ZodString;
|
|
186
|
+
timestamp: z.ZodString;
|
|
187
|
+
manifestUrl: z.ZodOptional<z.ZodString>;
|
|
188
|
+
status: z.ZodEnum<["pending", "success", "failed"]>;
|
|
189
|
+
}, "strip", z.ZodTypeAny, {
|
|
190
|
+
status: "success" | "failed" | "pending";
|
|
191
|
+
id: string;
|
|
192
|
+
timestamp: string;
|
|
193
|
+
manifestUrl?: string | undefined;
|
|
194
|
+
}, {
|
|
195
|
+
status: "success" | "failed" | "pending";
|
|
196
|
+
id: string;
|
|
197
|
+
timestamp: string;
|
|
198
|
+
manifestUrl?: string | undefined;
|
|
199
|
+
}>>;
|
|
200
|
+
/**
|
|
201
|
+
* Commercial / Billing Info
|
|
202
|
+
*/
|
|
203
|
+
subscription: z.ZodOptional<z.ZodObject<{
|
|
204
|
+
planId: z.ZodString;
|
|
205
|
+
status: z.ZodEnum<["active", "past_due", "canceled", "trialing", "incomplete"]>;
|
|
206
|
+
currentPeriodEnd: z.ZodOptional<z.ZodString>;
|
|
207
|
+
stripeCustomerId: z.ZodOptional<z.ZodString>;
|
|
208
|
+
stripeSubscriptionId: z.ZodOptional<z.ZodString>;
|
|
209
|
+
/**
|
|
210
|
+
* Purchased Add-ons from Marketplace
|
|
211
|
+
*/
|
|
212
|
+
addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
213
|
+
pluginId: z.ZodString;
|
|
214
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
215
|
+
status: z.ZodDefault<z.ZodEnum<["active", "past_due", "canceled", "trialing", "incomplete"]>>;
|
|
216
|
+
}, "strip", z.ZodTypeAny, {
|
|
217
|
+
status: "active" | "past_due" | "canceled" | "trialing" | "incomplete";
|
|
218
|
+
pluginId: string;
|
|
219
|
+
quantity: number;
|
|
220
|
+
}, {
|
|
221
|
+
pluginId: string;
|
|
222
|
+
status?: "active" | "past_due" | "canceled" | "trialing" | "incomplete" | undefined;
|
|
223
|
+
quantity?: number | undefined;
|
|
224
|
+
}>, "many">>;
|
|
225
|
+
/**
|
|
226
|
+
* Quota Usage Snapshot
|
|
227
|
+
* Cached usage metrics for quick display/validation.
|
|
228
|
+
*/
|
|
229
|
+
usage: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
230
|
+
}, "strip", z.ZodTypeAny, {
|
|
231
|
+
status: "active" | "past_due" | "canceled" | "trialing" | "incomplete";
|
|
232
|
+
planId: string;
|
|
233
|
+
currentPeriodEnd?: string | undefined;
|
|
234
|
+
stripeCustomerId?: string | undefined;
|
|
235
|
+
stripeSubscriptionId?: string | undefined;
|
|
236
|
+
addons?: {
|
|
237
|
+
status: "active" | "past_due" | "canceled" | "trialing" | "incomplete";
|
|
238
|
+
pluginId: string;
|
|
239
|
+
quantity: number;
|
|
240
|
+
}[] | undefined;
|
|
241
|
+
usage?: Record<string, number> | undefined;
|
|
242
|
+
}, {
|
|
243
|
+
status: "active" | "past_due" | "canceled" | "trialing" | "incomplete";
|
|
244
|
+
planId: string;
|
|
245
|
+
currentPeriodEnd?: string | undefined;
|
|
246
|
+
stripeCustomerId?: string | undefined;
|
|
247
|
+
stripeSubscriptionId?: string | undefined;
|
|
248
|
+
addons?: {
|
|
249
|
+
pluginId: string;
|
|
250
|
+
status?: "active" | "past_due" | "canceled" | "trialing" | "incomplete" | undefined;
|
|
251
|
+
quantity?: number | undefined;
|
|
252
|
+
}[] | undefined;
|
|
253
|
+
usage?: Record<string, number> | undefined;
|
|
254
|
+
}>>;
|
|
255
|
+
/**
|
|
256
|
+
* Infrastructure Settings
|
|
257
|
+
*/
|
|
258
|
+
deployment: z.ZodOptional<z.ZodObject<{
|
|
259
|
+
provider: z.ZodEnum<["vercel", "docker", "kubernetes"]>;
|
|
260
|
+
region: z.ZodOptional<z.ZodString>;
|
|
261
|
+
url: z.ZodOptional<z.ZodString>;
|
|
262
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
263
|
+
}, "strip", z.ZodTypeAny, {
|
|
264
|
+
provider: "vercel" | "docker" | "kubernetes";
|
|
265
|
+
url?: string | undefined;
|
|
266
|
+
env?: Record<string, string> | undefined;
|
|
267
|
+
region?: string | undefined;
|
|
268
|
+
}, {
|
|
269
|
+
provider: "vercel" | "docker" | "kubernetes";
|
|
270
|
+
url?: string | undefined;
|
|
271
|
+
env?: Record<string, string> | undefined;
|
|
272
|
+
region?: string | undefined;
|
|
273
|
+
}>>;
|
|
274
|
+
createdAt: z.ZodString;
|
|
275
|
+
updatedAt: z.ZodString;
|
|
276
|
+
}, "strip", z.ZodTypeAny, {
|
|
277
|
+
name: string;
|
|
278
|
+
id: string;
|
|
279
|
+
createdAt: string;
|
|
280
|
+
updatedAt: string;
|
|
281
|
+
slug: string;
|
|
282
|
+
bom: {
|
|
283
|
+
tenantId: string;
|
|
284
|
+
dependencies: {
|
|
285
|
+
id: string;
|
|
286
|
+
version: string;
|
|
287
|
+
configuration?: Record<string, any> | undefined;
|
|
288
|
+
features?: Record<string, boolean> | undefined;
|
|
289
|
+
}[];
|
|
290
|
+
resolutionStrategy: "strict" | "merge" | "override";
|
|
291
|
+
environment?: Record<string, string> | undefined;
|
|
292
|
+
};
|
|
293
|
+
ownerId: string;
|
|
294
|
+
runtime?: {
|
|
295
|
+
isolation: "shared_schema" | "isolated_schema" | "isolated_db";
|
|
296
|
+
quotas?: {
|
|
297
|
+
maxUsers?: number | undefined;
|
|
298
|
+
maxStorage?: number | undefined;
|
|
299
|
+
apiRateLimit?: number | undefined;
|
|
300
|
+
} | undefined;
|
|
301
|
+
} | undefined;
|
|
302
|
+
lastBuild?: {
|
|
303
|
+
status: "success" | "failed" | "pending";
|
|
304
|
+
id: string;
|
|
305
|
+
timestamp: string;
|
|
306
|
+
manifestUrl?: string | undefined;
|
|
307
|
+
} | undefined;
|
|
308
|
+
subscription?: {
|
|
309
|
+
status: "active" | "past_due" | "canceled" | "trialing" | "incomplete";
|
|
310
|
+
planId: string;
|
|
311
|
+
currentPeriodEnd?: string | undefined;
|
|
312
|
+
stripeCustomerId?: string | undefined;
|
|
313
|
+
stripeSubscriptionId?: string | undefined;
|
|
314
|
+
addons?: {
|
|
315
|
+
status: "active" | "past_due" | "canceled" | "trialing" | "incomplete";
|
|
316
|
+
pluginId: string;
|
|
317
|
+
quantity: number;
|
|
318
|
+
}[] | undefined;
|
|
319
|
+
usage?: Record<string, number> | undefined;
|
|
320
|
+
} | undefined;
|
|
321
|
+
deployment?: {
|
|
322
|
+
provider: "vercel" | "docker" | "kubernetes";
|
|
323
|
+
url?: string | undefined;
|
|
324
|
+
env?: Record<string, string> | undefined;
|
|
325
|
+
region?: string | undefined;
|
|
326
|
+
} | undefined;
|
|
327
|
+
}, {
|
|
328
|
+
name: string;
|
|
329
|
+
id: string;
|
|
330
|
+
createdAt: string;
|
|
331
|
+
updatedAt: string;
|
|
332
|
+
slug: string;
|
|
333
|
+
bom: {
|
|
334
|
+
tenantId: string;
|
|
335
|
+
dependencies: {
|
|
336
|
+
id: string;
|
|
337
|
+
version?: string | undefined;
|
|
338
|
+
configuration?: Record<string, any> | undefined;
|
|
339
|
+
features?: Record<string, boolean> | undefined;
|
|
340
|
+
}[];
|
|
341
|
+
environment?: Record<string, string> | undefined;
|
|
342
|
+
resolutionStrategy?: "strict" | "merge" | "override" | undefined;
|
|
343
|
+
};
|
|
344
|
+
ownerId: string;
|
|
345
|
+
runtime?: {
|
|
346
|
+
isolation: "shared_schema" | "isolated_schema" | "isolated_db";
|
|
347
|
+
quotas?: {
|
|
348
|
+
maxUsers?: number | undefined;
|
|
349
|
+
maxStorage?: number | undefined;
|
|
350
|
+
apiRateLimit?: number | undefined;
|
|
351
|
+
} | undefined;
|
|
352
|
+
} | undefined;
|
|
353
|
+
lastBuild?: {
|
|
354
|
+
status: "success" | "failed" | "pending";
|
|
355
|
+
id: string;
|
|
356
|
+
timestamp: string;
|
|
357
|
+
manifestUrl?: string | undefined;
|
|
358
|
+
} | undefined;
|
|
359
|
+
subscription?: {
|
|
360
|
+
status: "active" | "past_due" | "canceled" | "trialing" | "incomplete";
|
|
361
|
+
planId: string;
|
|
362
|
+
currentPeriodEnd?: string | undefined;
|
|
363
|
+
stripeCustomerId?: string | undefined;
|
|
364
|
+
stripeSubscriptionId?: string | undefined;
|
|
365
|
+
addons?: {
|
|
366
|
+
pluginId: string;
|
|
367
|
+
status?: "active" | "past_due" | "canceled" | "trialing" | "incomplete" | undefined;
|
|
368
|
+
quantity?: number | undefined;
|
|
369
|
+
}[] | undefined;
|
|
370
|
+
usage?: Record<string, number> | undefined;
|
|
371
|
+
} | undefined;
|
|
372
|
+
deployment?: {
|
|
373
|
+
provider: "vercel" | "docker" | "kubernetes";
|
|
374
|
+
url?: string | undefined;
|
|
375
|
+
env?: Record<string, string> | undefined;
|
|
376
|
+
region?: string | undefined;
|
|
377
|
+
} | undefined;
|
|
378
|
+
}>;
|
|
379
|
+
export type SubscriptionStatus = z.infer<typeof SubscriptionStatus>;
|
|
380
|
+
export type SpaceSubscription = z.infer<typeof SpaceSubscriptionSchema>;
|
|
381
|
+
export type DeploymentTarget = z.infer<typeof DeploymentTargetSchema>;
|
|
382
|
+
export type HubSpace = z.infer<typeof HubSpaceSchema>;
|
|
383
|
+
//# sourceMappingURL=space.zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"space.zod.d.ts","sourceRoot":"","sources":["../../src/hub/space.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;GAMG;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,yEAM7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;IAOlC;;OAEG;;;;;;;;;;;;;;IAOH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAKjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;IAGzB;;OAEG;;;IAIH;;OAEG;;IAGH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;OAEG;;;;;;;;;;;;;;;;;IAQH;;OAEG;;;;;;;QAvEH;;WAEG;;;;;;;;;;;;;;QAOH;;;WAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8DH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKH,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACpE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HubSpaceSchema = exports.DeploymentTargetSchema = exports.SpaceSubscriptionSchema = exports.SubscriptionStatus = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const composer_zod_1 = require("./composer.zod");
|
|
6
|
+
const tenant_zod_1 = require("./tenant.zod");
|
|
7
|
+
/**
|
|
8
|
+
* # Space Protocol
|
|
9
|
+
*
|
|
10
|
+
* Defines the SaaS-side representation of a Space (formerly Project).
|
|
11
|
+
* A Space is a logical container for business apps, data, and logic.
|
|
12
|
+
* Corresponds to an entry in the Hub's database.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Subscription Status Enum
|
|
16
|
+
*/
|
|
17
|
+
exports.SubscriptionStatus = zod_1.z.enum([
|
|
18
|
+
'active',
|
|
19
|
+
'past_due',
|
|
20
|
+
'canceled',
|
|
21
|
+
'trialing',
|
|
22
|
+
'incomplete'
|
|
23
|
+
]);
|
|
24
|
+
/**
|
|
25
|
+
* Space Subscription Info
|
|
26
|
+
*/
|
|
27
|
+
exports.SpaceSubscriptionSchema = zod_1.z.object({
|
|
28
|
+
planId: zod_1.z.string().describe('Reference to Plan Code'),
|
|
29
|
+
status: exports.SubscriptionStatus,
|
|
30
|
+
currentPeriodEnd: zod_1.z.string().datetime().optional(),
|
|
31
|
+
stripeCustomerId: zod_1.z.string().optional(),
|
|
32
|
+
stripeSubscriptionId: zod_1.z.string().optional(),
|
|
33
|
+
/**
|
|
34
|
+
* Purchased Add-ons from Marketplace
|
|
35
|
+
*/
|
|
36
|
+
addons: zod_1.z.array(zod_1.z.object({
|
|
37
|
+
pluginId: zod_1.z.string().describe('Marketplace Plugin ID (NPM package name)'),
|
|
38
|
+
quantity: zod_1.z.number().default(1),
|
|
39
|
+
status: exports.SubscriptionStatus.default('active'),
|
|
40
|
+
})).optional(),
|
|
41
|
+
/**
|
|
42
|
+
* Quota Usage Snapshot
|
|
43
|
+
* Cached usage metrics for quick display/validation.
|
|
44
|
+
*/
|
|
45
|
+
usage: zod_1.z.record(zod_1.z.number()).optional(),
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* Deployment Target
|
|
49
|
+
* Vercel or Container configuration.
|
|
50
|
+
*/
|
|
51
|
+
exports.DeploymentTargetSchema = zod_1.z.object({
|
|
52
|
+
provider: zod_1.z.enum(['vercel', 'docker', 'kubernetes']),
|
|
53
|
+
region: zod_1.z.string().optional(),
|
|
54
|
+
url: zod_1.z.string().url().optional().describe('Public Access URL'),
|
|
55
|
+
env: zod_1.z.record(zod_1.z.string()).optional().describe('Runtime Environment Variables'),
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* Hub Space Schema
|
|
59
|
+
*/
|
|
60
|
+
exports.HubSpaceSchema = zod_1.z.object({
|
|
61
|
+
id: zod_1.z.string().uuid(),
|
|
62
|
+
/**
|
|
63
|
+
* Display Name
|
|
64
|
+
*/
|
|
65
|
+
name: zod_1.z.string(),
|
|
66
|
+
slug: zod_1.z.string().describe('URL friendly identifier'),
|
|
67
|
+
/**
|
|
68
|
+
* Owner (User or Org ID in Hub)
|
|
69
|
+
*/
|
|
70
|
+
ownerId: zod_1.z.string(),
|
|
71
|
+
/**
|
|
72
|
+
* The Runtime Instance Definition
|
|
73
|
+
* Defines the technical execution environment.
|
|
74
|
+
*/
|
|
75
|
+
runtime: zod_1.z.object({
|
|
76
|
+
isolation: tenant_zod_1.TenantIsolationLevel.describe('Data isolation strategy'),
|
|
77
|
+
quotas: tenant_zod_1.TenantQuotaSchema.optional().describe('Resource quotas'),
|
|
78
|
+
}).optional().describe('Runtime instance configuration'),
|
|
79
|
+
/**
|
|
80
|
+
* The Desired State (Bill of Materials)
|
|
81
|
+
* This is what the user configures in the UI.
|
|
82
|
+
*/
|
|
83
|
+
bom: composer_zod_1.BillOfMaterialsSchema,
|
|
84
|
+
/**
|
|
85
|
+
* The Current Actual State (Last Successful Build)
|
|
86
|
+
*/
|
|
87
|
+
lastBuild: zod_1.z.object({
|
|
88
|
+
id: zod_1.z.string(),
|
|
89
|
+
timestamp: zod_1.z.string().datetime(),
|
|
90
|
+
manifestUrl: zod_1.z.string().url().optional(),
|
|
91
|
+
status: zod_1.z.enum(['pending', 'success', 'failed']),
|
|
92
|
+
}).optional(),
|
|
93
|
+
/**
|
|
94
|
+
* Commercial / Billing Info
|
|
95
|
+
*/
|
|
96
|
+
subscription: exports.SpaceSubscriptionSchema.optional(),
|
|
97
|
+
/**
|
|
98
|
+
* Infrastructure Settings
|
|
99
|
+
*/
|
|
100
|
+
deployment: exports.DeploymentTargetSchema.optional(),
|
|
101
|
+
createdAt: zod_1.z.string(),
|
|
102
|
+
updatedAt: zod_1.z.string(),
|
|
103
|
+
});
|