@objectstack/spec 0.3.2 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -10
- package/dist/ai/agent.zod.d.ts +12 -12
- package/dist/ai/conversation.zod.d.ts +54 -54
- package/dist/ai/cost.zod.d.ts +135 -135
- 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 +91 -91
- package/dist/ai/nlq.zod.d.ts +72 -72
- package/dist/ai/{workflow-automation.zod.d.ts → orchestration.zod.d.ts} +51 -50
- 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 +27 -27
- package/dist/ai/rag-pipeline.zod.d.ts +102 -102
- package/dist/api/contract.zod.d.ts +213 -197
- 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 +6 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +6 -0
- package/dist/api/odata.zod.d.ts +482 -0
- package/dist/api/odata.zod.d.ts.map +1 -0
- package/dist/api/odata.zod.js +401 -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} +199 -199
- 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 +8 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +23 -0
- package/dist/{system → auth}/organization.zod.d.ts +7 -7
- 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/{system → auth}/role.zod.d.ts +14 -0
- package/dist/auth/role.zod.d.ts.map +1 -0
- package/dist/{system → auth}/role.zod.js +16 -1
- package/dist/auth/scim.zod.d.ts +2732 -0
- package/dist/auth/scim.zod.d.ts.map +1 -0
- package/dist/auth/scim.zod.js +811 -0
- package/dist/automation/approval.zod.d.ts +643 -0
- package/dist/automation/approval.zod.d.ts.map +1 -0
- package/dist/automation/approval.zod.js +84 -0
- package/dist/automation/connector.zod.d.ts +1284 -0
- package/dist/automation/connector.zod.d.ts.map +1 -0
- package/dist/automation/connector.zod.js +500 -0
- package/dist/automation/etl.zod.d.ts +623 -0
- package/dist/automation/etl.zod.d.ts.map +1 -0
- package/dist/automation/etl.zod.js +359 -0
- package/dist/{data → automation}/flow.zod.d.ts +40 -22
- 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 +8 -0
- package/dist/automation/index.d.ts.map +1 -0
- package/dist/automation/index.js +23 -0
- package/dist/automation/sync.zod.d.ts +854 -0
- package/dist/automation/sync.zod.d.ts.map +1 -0
- package/dist/automation/sync.zod.js +444 -0
- package/dist/{system → automation}/webhook.zod.d.ts +26 -3
- package/dist/automation/webhook.zod.d.ts.map +1 -0
- package/dist/{system → automation}/webhook.zod.js +27 -3
- package/dist/automation/workflow.zod.d.ts +2059 -0
- package/dist/automation/workflow.zod.d.ts.map +1 -0
- package/dist/{data → automation}/workflow.zod.js +40 -2
- package/dist/data/dataset.zod.d.ts +2 -2
- package/dist/data/field.zod.d.ts +779 -219
- package/dist/data/field.zod.d.ts.map +1 -1
- package/dist/data/field.zod.js +128 -16
- 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 +117 -93
- package/dist/data/mapping.zod.d.ts.map +1 -1
- package/dist/data/mapping.zod.js +16 -3
- package/dist/data/object.zod.d.ts +485 -131
- 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/hub/composer.zod.d.ts +871 -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 +13 -9
- 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 +15 -5
- package/dist/permission/index.d.ts +14 -0
- package/dist/permission/index.d.ts.map +1 -0
- package/dist/permission/index.js +29 -0
- package/dist/{data → permission}/permission.zod.d.ts +48 -3
- package/dist/permission/permission.zod.d.ts.map +1 -0
- package/dist/{data → permission}/permission.zod.js +26 -2
- package/dist/permission/rls.zod.d.ts +605 -0
- package/dist/permission/rls.zod.d.ts.map +1 -0
- package/dist/permission/rls.zod.js +615 -0
- 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/{system → permission}/territory.zod.d.ts +13 -0
- package/dist/permission/territory.zod.d.ts.map +1 -0
- package/dist/{system → permission}/territory.zod.js +15 -1
- package/dist/shared/identifiers.zod.d.ts +87 -0
- package/dist/shared/identifiers.zod.d.ts.map +1 -0
- package/dist/shared/identifiers.zod.js +101 -0
- package/dist/shared/index.d.ts +6 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +21 -0
- package/dist/stack.zod.d.ts +19869 -0
- package/dist/stack.zod.d.ts.map +1 -0
- package/dist/stack.zod.js +248 -0
- package/dist/system/audit.zod.d.ts +58 -58
- package/dist/system/context.zod.d.ts +56 -0
- package/dist/system/context.zod.d.ts.map +1 -0
- package/dist/system/context.zod.js +43 -0
- package/dist/system/datasource.zod.d.ts +40 -6
- package/dist/system/datasource.zod.d.ts.map +1 -1
- package/dist/system/datasource.zod.js +17 -13
- package/dist/system/driver/mongo.zod.d.ts +107 -0
- package/dist/system/driver/mongo.zod.d.ts.map +1 -0
- package/dist/system/driver/mongo.zod.js +80 -0
- package/dist/system/driver/postgres.zod.d.ts +134 -0
- package/dist/system/driver/postgres.zod.d.ts.map +1 -0
- package/dist/system/driver/postgres.zod.js +88 -0
- package/dist/system/driver.zod.d.ts +2249 -488
- package/dist/system/driver.zod.d.ts.map +1 -1
- package/dist/system/driver.zod.js +99 -0
- package/dist/system/events.zod.d.ts +8 -5
- package/dist/system/events.zod.d.ts.map +1 -1
- package/dist/system/events.zod.js +5 -1
- package/dist/system/feature.zod.d.ts +131 -0
- package/dist/system/feature.zod.d.ts.map +1 -0
- package/dist/system/feature.zod.js +45 -0
- package/dist/system/index.d.ts +11 -20
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js +15 -20
- package/dist/system/job.zod.d.ts +5 -5
- package/dist/system/logger.zod.d.ts +111 -0
- package/dist/system/logger.zod.d.ts.map +1 -0
- package/dist/system/logger.zod.js +75 -0
- package/dist/system/manifest.zod.d.ts +136 -18
- package/dist/system/manifest.zod.d.ts.map +1 -1
- package/dist/system/manifest.zod.js +28 -0
- package/dist/system/plugin.zod.d.ts +598 -318
- package/dist/system/plugin.zod.d.ts.map +1 -1
- package/dist/system/plugin.zod.js +13 -0
- package/dist/system/scoped-storage.zod.d.ts +81 -0
- package/dist/system/scoped-storage.zod.d.ts.map +1 -0
- package/dist/system/scoped-storage.zod.js +66 -0
- package/dist/ui/action.zod.d.ts +42 -17
- package/dist/ui/action.zod.d.ts.map +1 -1
- package/dist/ui/action.zod.js +30 -1
- package/dist/ui/app.zod.d.ts +26 -11
- package/dist/ui/app.zod.d.ts.map +1 -1
- package/dist/ui/app.zod.js +32 -4
- package/dist/ui/block.zod.d.ts +265 -0
- package/dist/ui/block.zod.d.ts.map +1 -0
- package/dist/ui/block.zod.js +90 -0
- package/dist/ui/component.zod.d.ts +265 -0
- package/dist/ui/component.zod.d.ts.map +1 -0
- package/dist/ui/component.zod.js +90 -0
- package/dist/ui/dashboard.zod.d.ts +15 -15
- package/dist/ui/dashboard.zod.d.ts.map +1 -1
- package/dist/ui/dashboard.zod.js +18 -8
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -0
- package/dist/ui/page.zod.d.ts +23 -5
- package/dist/ui/page.zod.d.ts.map +1 -1
- package/dist/ui/page.zod.js +37 -4
- package/dist/ui/report.zod.d.ts +12 -12
- package/dist/ui/theme.zod.d.ts +42 -42
- package/dist/ui/view.zod.d.ts +302 -290
- package/dist/ui/view.zod.d.ts.map +1 -1
- package/dist/ui/view.zod.js +32 -3
- package/dist/ui/widget.zod.d.ts +730 -29
- package/dist/ui/widget.zod.d.ts.map +1 -1
- package/dist/ui/widget.zod.js +294 -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/{system → api}/HttpMethod.json +3 -1
- package/json-schema/api/ODataError.json +65 -0
- package/json-schema/api/ODataFilterFunction.json +39 -0
- package/json-schema/api/ODataFilterOperator.json +24 -0
- package/json-schema/api/ODataMetadata.json +115 -0
- package/json-schema/api/ODataQuery.json +89 -0
- package/json-schema/api/ODataResponse.json +37 -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/{system → auth}/Role.json +3 -2
- package/json-schema/auth/SCIMAddress.json +50 -0
- package/json-schema/auth/SCIMEmail.json +38 -0
- package/json-schema/auth/SCIMEnterpriseUser.json +55 -0
- package/json-schema/auth/SCIMError.json +52 -0
- package/json-schema/auth/SCIMGroup.json +102 -0
- package/json-schema/auth/SCIMGroupReference.json +36 -0
- package/json-schema/auth/SCIMListResponse.json +606 -0
- package/json-schema/auth/SCIMMemberReference.json +36 -0
- package/json-schema/auth/SCIMMeta.json +35 -0
- package/json-schema/auth/SCIMName.json +36 -0
- package/json-schema/auth/SCIMPatchOperation.json +31 -0
- package/json-schema/auth/SCIMPatchRequest.json +56 -0
- package/json-schema/auth/SCIMPhoneNumber.json +40 -0
- package/json-schema/auth/SCIMUser.json +462 -0
- package/json-schema/automation/ApprovalAction.json +35 -0
- package/json-schema/automation/ApprovalActionType.json +15 -0
- package/json-schema/automation/ApprovalProcess.json +326 -0
- package/json-schema/automation/ApprovalStep.json +147 -0
- package/json-schema/automation/ApproverType.json +16 -0
- package/json-schema/automation/AuthField.json +73 -0
- package/json-schema/automation/Authentication.json +159 -0
- package/json-schema/automation/AuthenticationType.json +18 -0
- package/json-schema/automation/ConflictResolution.json +16 -0
- package/json-schema/automation/Connector.json +440 -0
- package/json-schema/automation/ConnectorCategory.json +26 -0
- package/json-schema/automation/ConnectorInstance.json +69 -0
- package/json-schema/automation/ConnectorOperation.json +117 -0
- package/json-schema/automation/ConnectorTrigger.json +54 -0
- package/json-schema/automation/DataDestinationConfig.json +89 -0
- package/json-schema/automation/DataSourceConfig.json +34 -0
- package/json-schema/automation/DataSyncConfig.json +355 -0
- package/json-schema/automation/ETLDestination.json +57 -0
- package/json-schema/automation/ETLEndpointType.json +19 -0
- package/json-schema/automation/ETLPipeline.json +252 -0
- package/json-schema/automation/ETLPipelineRun.json +107 -0
- package/json-schema/automation/ETLRunStatus.json +17 -0
- package/json-schema/automation/ETLSource.json +60 -0
- package/json-schema/{data/LogicOperator.json → automation/ETLSyncMode.json} +5 -5
- package/json-schema/automation/ETLTransformation.json +46 -0
- package/json-schema/automation/ETLTransformationType.json +21 -0
- package/json-schema/automation/FieldMapping.json +36 -0
- package/json-schema/{data → automation}/Flow.json +31 -1
- package/json-schema/{data → automation}/FlowEdge.json +9 -0
- package/json-schema/automation/OAuth2Config.json +43 -0
- package/json-schema/automation/OperationParameter.json +59 -0
- package/json-schema/automation/OperationType.json +17 -0
- package/json-schema/automation/SyncDirection.json +14 -0
- package/json-schema/automation/SyncExecutionResult.json +135 -0
- package/json-schema/automation/SyncExecutionStatus.json +17 -0
- package/json-schema/{data/TriggerTiming.json → automation/SyncMode.json} +5 -4
- package/json-schema/{data/WorkflowRule.json → automation/TimeTrigger.json} +35 -25
- package/json-schema/{system → automation}/Webhook.json +3 -1
- package/json-schema/{system → automation}/WebhookReceiver.json +3 -1
- package/json-schema/automation/WorkflowRule.json +1032 -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 +92 -4
- package/json-schema/data/FieldOperators.json +78 -0
- package/json-schema/data/FieldReference.json +19 -0
- package/json-schema/data/FieldType.json +12 -2
- 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/JoinStrategy.json +15 -0
- package/json-schema/data/NormalizedFilter.json +234 -0
- package/json-schema/data/Object.json +1642 -32
- 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/SelectOption.json +4 -2
- 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/data/VectorConfig.json +51 -0
- package/json-schema/hub/BillOfMaterials.json +70 -0
- package/json-schema/hub/ComposerRequest.json +86 -0
- package/json-schema/hub/ComposerResponse.json +483 -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/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 +18 -1
- package/json-schema/permission/RLSConfig.json +59 -0
- package/json-schema/permission/RLSEvaluationResult.json +40 -0
- package/json-schema/{data/TriggerAction.json → permission/RLSOperation.json} +5 -3
- package/json-schema/permission/RLSUserContext.json +51 -0
- package/json-schema/permission/RowLevelSecurityPolicy.json +77 -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/{system → permission}/Territory.json +3 -1
- package/json-schema/shared/EventName.json +12 -0
- package/json-schema/shared/SnakeCaseIdentifier.json +12 -0
- package/json-schema/shared/SystemIdentifier.json +12 -0
- package/json-schema/system/Datasource.json +35 -0
- package/json-schema/system/DriverCapabilities.json +10 -0
- package/json-schema/system/DriverInterface.json +10 -0
- package/json-schema/system/DriverOptions.json +11 -0
- package/json-schema/system/Event.json +3 -2
- package/json-schema/system/FeatureFlag.json +87 -0
- package/json-schema/system/FeatureStrategy.json +16 -0
- package/json-schema/system/FileMetadata.json +43 -0
- package/json-schema/system/KernelContext.json +62 -0
- package/json-schema/system/LogEntry.json +63 -0
- package/json-schema/system/LogFormat.json +15 -0
- package/json-schema/system/LogLevel.json +17 -0
- package/json-schema/system/LoggerConfig.json +70 -0
- package/json-schema/system/Manifest.json +80 -0
- package/json-schema/system/MongoConfig.json +82 -0
- package/json-schema/system/PluginContext.json +8 -1
- package/json-schema/system/PostgresConfig.json +98 -0
- package/json-schema/system/RuntimeMode.json +16 -0
- package/json-schema/system/ScopedStorageConfig.json +54 -0
- package/json-schema/system/StorageAdapterType.json +17 -0
- package/json-schema/system/StorageScope.json +18 -0
- package/json-schema/ui/Action.json +25 -4
- package/json-schema/ui/ActionParam.json +12 -2
- package/json-schema/ui/App.json +18 -7
- package/json-schema/ui/ChartType.json +9 -1
- package/json-schema/ui/Dashboard.json +9 -1
- package/json-schema/ui/DashboardNavItem.json +3 -1
- package/json-schema/ui/DashboardWidget.json +9 -1
- package/json-schema/ui/FieldWidgetProps.json +92 -4
- package/json-schema/ui/FormView.json +4 -1
- package/json-schema/ui/GroupNavItem.json +3 -1
- package/json-schema/ui/ListView.json +7 -1
- package/json-schema/ui/NavigationItem.json +15 -5
- package/json-schema/ui/ObjectNavItem.json +3 -1
- package/json-schema/ui/Page.json +36 -4
- package/json-schema/ui/PageCardProps.json +32 -0
- package/json-schema/ui/PageComponent.json +33 -3
- package/json-schema/ui/PageComponentType.json +32 -0
- package/json-schema/ui/PageHeaderProps.json +39 -0
- package/json-schema/ui/PageNavItem.json +3 -1
- package/json-schema/ui/PageRegion.json +33 -3
- package/json-schema/ui/PageTabsProps.json +55 -0
- package/json-schema/ui/RecordDetailsProps.json +37 -0
- package/json-schema/ui/RecordHighlightsProps.json +24 -0
- package/json-schema/ui/RecordRelatedListProps.json +39 -0
- package/json-schema/ui/UrlNavItem.json +3 -1
- package/json-schema/ui/View.json +22 -4
- package/json-schema/ui/WidgetEvent.json +42 -0
- package/json-schema/ui/WidgetLifecycle.json +40 -0
- package/json-schema/ui/WidgetManifest.json +262 -0
- package/json-schema/ui/WidgetProperty.json +58 -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/create-new-project.md +85 -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/discovery.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/organization.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/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/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/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}/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/{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 → 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/{data → permission}/FieldPermission.json +0 -0
- /package/json-schema/{system → permission}/TerritoryModel.json +0 -0
- /package/json-schema/{system → permission}/TerritoryType.json +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector.zod.d.ts","sourceRoot":"","sources":["../../src/automation/connector.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB,4LAgBlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,wBAAwB,gFAQnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,eAAe;IAC1B;;OAEG;;IAKH;;OAEG;;IAGH;;OAEG;;IAKH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH,MAA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ACc;QACf,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,iBAAiB,CAAC;QAC5B,OAAO,EAAE,MAAM,CAAC;KACjB,KAAG,SAAS;IAmBb;;OAEG;8BACc;QACf,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,iBAAiB,CAAC;QAC5B,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;KACnB,KAAG,SAAS;CAiBL,CAAC"}
|
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Connector = exports.ConnectorInstanceSchema = exports.ConnectorSchema = exports.ConnectorTriggerSchema = exports.ConnectorOperationSchema = exports.OperationParameterSchema = exports.OperationTypeSchema = exports.AuthenticationSchema = exports.OAuth2ConfigSchema = exports.AuthFieldSchema = exports.AuthenticationTypeSchema = exports.ConnectorCategorySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Connector Registry Protocol
|
|
7
|
+
*
|
|
8
|
+
* Inspired by Zapier, n8n, and Workato connector architectures.
|
|
9
|
+
*
|
|
10
|
+
* Connectors are reusable components that provide pre-built integrations with
|
|
11
|
+
* external systems (SaaS, databases, APIs, etc.).
|
|
12
|
+
*
|
|
13
|
+
* ## Use Cases
|
|
14
|
+
*
|
|
15
|
+
* 1. **SaaS Integration**
|
|
16
|
+
* - Connect to Salesforce, HubSpot, Stripe, etc.
|
|
17
|
+
* - Pre-built authentication and API clients
|
|
18
|
+
* - Standard operations (CRUD, search, etc.)
|
|
19
|
+
*
|
|
20
|
+
* 2. **Database Connectivity**
|
|
21
|
+
* - Connect to PostgreSQL, MySQL, MongoDB, etc.
|
|
22
|
+
* - Query builders and connection pooling
|
|
23
|
+
* - Schema introspection
|
|
24
|
+
*
|
|
25
|
+
* 3. **Third-Party Services**
|
|
26
|
+
* - Payment processors (Stripe, PayPal)
|
|
27
|
+
* - Communication (Twilio, SendGrid, Slack)
|
|
28
|
+
* - Storage (S3, Google Drive, Dropbox)
|
|
29
|
+
*
|
|
30
|
+
* @see https://zapier.com/developer/documentation/v2/
|
|
31
|
+
* @see https://docs.n8n.io/integrations/creating-nodes/
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const stripeConnector: Connector = {
|
|
36
|
+
* id: 'stripe',
|
|
37
|
+
* name: 'Stripe',
|
|
38
|
+
* category: 'payment',
|
|
39
|
+
* authentication: {
|
|
40
|
+
* type: 'apiKey',
|
|
41
|
+
* fields: [{ name: 'api_key', label: 'API Key', type: 'password' }]
|
|
42
|
+
* },
|
|
43
|
+
* operations: [
|
|
44
|
+
* { id: 'create_customer', name: 'Create Customer', type: 'write' }
|
|
45
|
+
* ]
|
|
46
|
+
* }
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
/**
|
|
50
|
+
* Connector Category
|
|
51
|
+
*/
|
|
52
|
+
exports.ConnectorCategorySchema = zod_1.z.enum([
|
|
53
|
+
'crm', // Customer Relationship Management
|
|
54
|
+
'payment', // Payment processors
|
|
55
|
+
'communication', // Email, SMS, Chat
|
|
56
|
+
'storage', // File storage
|
|
57
|
+
'analytics', // Analytics platforms
|
|
58
|
+
'database', // Databases
|
|
59
|
+
'marketing', // Marketing automation
|
|
60
|
+
'accounting', // Accounting software
|
|
61
|
+
'hr', // Human resources
|
|
62
|
+
'productivity', // Productivity tools
|
|
63
|
+
'ecommerce', // E-commerce platforms
|
|
64
|
+
'support', // Customer support
|
|
65
|
+
'devtools', // Developer tools
|
|
66
|
+
'social', // Social media
|
|
67
|
+
'other', // Other category
|
|
68
|
+
]);
|
|
69
|
+
/**
|
|
70
|
+
* Authentication Type
|
|
71
|
+
*/
|
|
72
|
+
exports.AuthenticationTypeSchema = zod_1.z.enum([
|
|
73
|
+
'none', // No authentication
|
|
74
|
+
'apiKey', // API key
|
|
75
|
+
'basic', // Basic auth (username/password)
|
|
76
|
+
'bearer', // Bearer token
|
|
77
|
+
'oauth1', // OAuth 1.0
|
|
78
|
+
'oauth2', // OAuth 2.0
|
|
79
|
+
'custom', // Custom authentication
|
|
80
|
+
]);
|
|
81
|
+
/**
|
|
82
|
+
* Authentication Field Schema
|
|
83
|
+
*/
|
|
84
|
+
exports.AuthFieldSchema = zod_1.z.object({
|
|
85
|
+
/**
|
|
86
|
+
* Field name (machine name)
|
|
87
|
+
*/
|
|
88
|
+
name: zod_1.z.string()
|
|
89
|
+
.regex(/^[a-z_][a-z0-9_]*$/)
|
|
90
|
+
.describe('Field name (snake_case)'),
|
|
91
|
+
/**
|
|
92
|
+
* Field label
|
|
93
|
+
*/
|
|
94
|
+
label: zod_1.z.string().describe('Field label'),
|
|
95
|
+
/**
|
|
96
|
+
* Field type
|
|
97
|
+
*/
|
|
98
|
+
type: zod_1.z.enum(['text', 'password', 'url', 'select'])
|
|
99
|
+
.default('text')
|
|
100
|
+
.describe('Field type'),
|
|
101
|
+
/**
|
|
102
|
+
* Field description
|
|
103
|
+
*/
|
|
104
|
+
description: zod_1.z.string().optional().describe('Field description'),
|
|
105
|
+
/**
|
|
106
|
+
* Whether field is required
|
|
107
|
+
*/
|
|
108
|
+
required: zod_1.z.boolean().default(true).describe('Required field'),
|
|
109
|
+
/**
|
|
110
|
+
* Default value
|
|
111
|
+
*/
|
|
112
|
+
default: zod_1.z.string().optional().describe('Default value'),
|
|
113
|
+
/**
|
|
114
|
+
* Options for select fields
|
|
115
|
+
*/
|
|
116
|
+
options: zod_1.z.array(zod_1.z.object({
|
|
117
|
+
label: zod_1.z.string(),
|
|
118
|
+
value: zod_1.z.string(),
|
|
119
|
+
})).optional().describe('Select field options'),
|
|
120
|
+
/**
|
|
121
|
+
* Placeholder text
|
|
122
|
+
*/
|
|
123
|
+
placeholder: zod_1.z.string().optional().describe('Placeholder text'),
|
|
124
|
+
});
|
|
125
|
+
/**
|
|
126
|
+
* OAuth 2.0 Configuration
|
|
127
|
+
*/
|
|
128
|
+
exports.OAuth2ConfigSchema = zod_1.z.object({
|
|
129
|
+
/**
|
|
130
|
+
* Authorization URL
|
|
131
|
+
*/
|
|
132
|
+
authorizationUrl: zod_1.z.string().url().describe('Authorization endpoint URL'),
|
|
133
|
+
/**
|
|
134
|
+
* Token URL
|
|
135
|
+
*/
|
|
136
|
+
tokenUrl: zod_1.z.string().url().describe('Token endpoint URL'),
|
|
137
|
+
/**
|
|
138
|
+
* Scopes to request
|
|
139
|
+
*/
|
|
140
|
+
scopes: zod_1.z.array(zod_1.z.string()).optional().describe('OAuth scopes'),
|
|
141
|
+
/**
|
|
142
|
+
* Client ID field name
|
|
143
|
+
*/
|
|
144
|
+
clientIdField: zod_1.z.string().default('client_id').describe('Client ID field name'),
|
|
145
|
+
/**
|
|
146
|
+
* Client secret field name
|
|
147
|
+
*/
|
|
148
|
+
clientSecretField: zod_1.z.string().default('client_secret').describe('Client secret field name'),
|
|
149
|
+
});
|
|
150
|
+
/**
|
|
151
|
+
* Authentication Configuration
|
|
152
|
+
*/
|
|
153
|
+
exports.AuthenticationSchema = zod_1.z.object({
|
|
154
|
+
/**
|
|
155
|
+
* Authentication type
|
|
156
|
+
*/
|
|
157
|
+
type: exports.AuthenticationTypeSchema.describe('Authentication type'),
|
|
158
|
+
/**
|
|
159
|
+
* Authentication fields
|
|
160
|
+
* Configuration fields needed for this auth type
|
|
161
|
+
*/
|
|
162
|
+
fields: zod_1.z.array(exports.AuthFieldSchema).optional().describe('Authentication fields'),
|
|
163
|
+
/**
|
|
164
|
+
* OAuth 2.0 configuration (when type is oauth2)
|
|
165
|
+
*/
|
|
166
|
+
oauth2: exports.OAuth2ConfigSchema.optional().describe('OAuth 2.0 configuration'),
|
|
167
|
+
/**
|
|
168
|
+
* Test authentication instructions
|
|
169
|
+
*/
|
|
170
|
+
test: zod_1.z.object({
|
|
171
|
+
url: zod_1.z.string().optional().describe('Test endpoint URL'),
|
|
172
|
+
method: zod_1.z.enum(['GET', 'POST', 'PUT', 'DELETE']).default('GET').describe('HTTP method'),
|
|
173
|
+
}).optional().describe('Authentication test configuration'),
|
|
174
|
+
});
|
|
175
|
+
/**
|
|
176
|
+
* Connector Operation Type
|
|
177
|
+
*/
|
|
178
|
+
exports.OperationTypeSchema = zod_1.z.enum([
|
|
179
|
+
'read', // Read/query data
|
|
180
|
+
'write', // Create/update data
|
|
181
|
+
'delete', // Delete data
|
|
182
|
+
'search', // Search operation
|
|
183
|
+
'trigger', // Webhook/polling trigger
|
|
184
|
+
'action', // Custom action
|
|
185
|
+
]);
|
|
186
|
+
/**
|
|
187
|
+
* Operation Parameter Schema
|
|
188
|
+
*/
|
|
189
|
+
exports.OperationParameterSchema = zod_1.z.object({
|
|
190
|
+
/**
|
|
191
|
+
* Parameter name
|
|
192
|
+
*/
|
|
193
|
+
name: zod_1.z.string().describe('Parameter name'),
|
|
194
|
+
/**
|
|
195
|
+
* Parameter label
|
|
196
|
+
*/
|
|
197
|
+
label: zod_1.z.string().describe('Parameter label'),
|
|
198
|
+
/**
|
|
199
|
+
* Parameter description
|
|
200
|
+
*/
|
|
201
|
+
description: zod_1.z.string().optional().describe('Parameter description'),
|
|
202
|
+
/**
|
|
203
|
+
* Parameter type
|
|
204
|
+
*/
|
|
205
|
+
type: zod_1.z.enum(['string', 'number', 'boolean', 'array', 'object', 'date', 'file'])
|
|
206
|
+
.describe('Parameter type'),
|
|
207
|
+
/**
|
|
208
|
+
* Whether parameter is required
|
|
209
|
+
*/
|
|
210
|
+
required: zod_1.z.boolean().default(false).describe('Required parameter'),
|
|
211
|
+
/**
|
|
212
|
+
* Default value
|
|
213
|
+
*/
|
|
214
|
+
default: zod_1.z.any().optional().describe('Default value'),
|
|
215
|
+
/**
|
|
216
|
+
* Validation schema
|
|
217
|
+
*/
|
|
218
|
+
validation: zod_1.z.record(zod_1.z.any()).optional().describe('Validation rules'),
|
|
219
|
+
/**
|
|
220
|
+
* Dynamic options function
|
|
221
|
+
*/
|
|
222
|
+
dynamicOptions: zod_1.z.string().optional().describe('Function to load dynamic options'),
|
|
223
|
+
});
|
|
224
|
+
/**
|
|
225
|
+
* Connector Operation Schema
|
|
226
|
+
*/
|
|
227
|
+
exports.ConnectorOperationSchema = zod_1.z.object({
|
|
228
|
+
/**
|
|
229
|
+
* Operation identifier
|
|
230
|
+
*/
|
|
231
|
+
id: zod_1.z.string()
|
|
232
|
+
.regex(/^[a-z_][a-z0-9_]*$/)
|
|
233
|
+
.describe('Operation ID (snake_case)'),
|
|
234
|
+
/**
|
|
235
|
+
* Operation name
|
|
236
|
+
*/
|
|
237
|
+
name: zod_1.z.string().describe('Operation name'),
|
|
238
|
+
/**
|
|
239
|
+
* Operation description
|
|
240
|
+
*/
|
|
241
|
+
description: zod_1.z.string().optional().describe('Operation description'),
|
|
242
|
+
/**
|
|
243
|
+
* Operation type
|
|
244
|
+
*/
|
|
245
|
+
type: exports.OperationTypeSchema.describe('Operation type'),
|
|
246
|
+
/**
|
|
247
|
+
* Input parameters
|
|
248
|
+
*/
|
|
249
|
+
inputSchema: zod_1.z.array(exports.OperationParameterSchema)
|
|
250
|
+
.optional()
|
|
251
|
+
.describe('Input parameters'),
|
|
252
|
+
/**
|
|
253
|
+
* Output schema
|
|
254
|
+
*/
|
|
255
|
+
outputSchema: zod_1.z.record(zod_1.z.any())
|
|
256
|
+
.optional()
|
|
257
|
+
.describe('Output schema'),
|
|
258
|
+
/**
|
|
259
|
+
* Sample output for documentation
|
|
260
|
+
*/
|
|
261
|
+
sampleOutput: zod_1.z.any().optional().describe('Sample output'),
|
|
262
|
+
/**
|
|
263
|
+
* Whether operation supports pagination
|
|
264
|
+
*/
|
|
265
|
+
supportsPagination: zod_1.z.boolean().default(false).describe('Supports pagination'),
|
|
266
|
+
/**
|
|
267
|
+
* Whether operation supports filtering
|
|
268
|
+
*/
|
|
269
|
+
supportsFiltering: zod_1.z.boolean().default(false).describe('Supports filtering'),
|
|
270
|
+
});
|
|
271
|
+
/**
|
|
272
|
+
* Connector Trigger Schema
|
|
273
|
+
*
|
|
274
|
+
* Triggers are special operations that watch for events and initiate workflows.
|
|
275
|
+
*/
|
|
276
|
+
exports.ConnectorTriggerSchema = zod_1.z.object({
|
|
277
|
+
/**
|
|
278
|
+
* Trigger identifier
|
|
279
|
+
*/
|
|
280
|
+
id: zod_1.z.string()
|
|
281
|
+
.regex(/^[a-z_][a-z0-9_]*$/)
|
|
282
|
+
.describe('Trigger ID (snake_case)'),
|
|
283
|
+
/**
|
|
284
|
+
* Trigger name
|
|
285
|
+
*/
|
|
286
|
+
name: zod_1.z.string().describe('Trigger name'),
|
|
287
|
+
/**
|
|
288
|
+
* Trigger description
|
|
289
|
+
*/
|
|
290
|
+
description: zod_1.z.string().optional().describe('Trigger description'),
|
|
291
|
+
/**
|
|
292
|
+
* Trigger type
|
|
293
|
+
*/
|
|
294
|
+
type: zod_1.z.enum(['webhook', 'polling', 'stream'])
|
|
295
|
+
.describe('Trigger mechanism'),
|
|
296
|
+
/**
|
|
297
|
+
* Trigger configuration
|
|
298
|
+
*/
|
|
299
|
+
config: zod_1.z.record(zod_1.z.any())
|
|
300
|
+
.optional()
|
|
301
|
+
.describe('Trigger configuration'),
|
|
302
|
+
/**
|
|
303
|
+
* Output schema
|
|
304
|
+
*/
|
|
305
|
+
outputSchema: zod_1.z.record(zod_1.z.any())
|
|
306
|
+
.optional()
|
|
307
|
+
.describe('Event payload schema'),
|
|
308
|
+
/**
|
|
309
|
+
* Polling interval (for polling triggers)
|
|
310
|
+
* In milliseconds
|
|
311
|
+
*/
|
|
312
|
+
pollingIntervalMs: zod_1.z.number().int().min(1000)
|
|
313
|
+
.optional()
|
|
314
|
+
.describe('Polling interval in ms'),
|
|
315
|
+
});
|
|
316
|
+
/**
|
|
317
|
+
* Connector Schema
|
|
318
|
+
*
|
|
319
|
+
* Complete definition of a connector to an external system.
|
|
320
|
+
*/
|
|
321
|
+
exports.ConnectorSchema = zod_1.z.object({
|
|
322
|
+
/**
|
|
323
|
+
* Connector identifier
|
|
324
|
+
* Must be globally unique
|
|
325
|
+
*/
|
|
326
|
+
id: zod_1.z.string()
|
|
327
|
+
.regex(/^[a-z_][a-z0-9_]*$/)
|
|
328
|
+
.describe('Connector ID (snake_case)'),
|
|
329
|
+
/**
|
|
330
|
+
* Connector name
|
|
331
|
+
*/
|
|
332
|
+
name: zod_1.z.string().describe('Connector name'),
|
|
333
|
+
/**
|
|
334
|
+
* Connector description
|
|
335
|
+
*/
|
|
336
|
+
description: zod_1.z.string().optional().describe('Connector description'),
|
|
337
|
+
/**
|
|
338
|
+
* Connector version (semver)
|
|
339
|
+
*/
|
|
340
|
+
version: zod_1.z.string().optional().describe('Connector version'),
|
|
341
|
+
/**
|
|
342
|
+
* Connector icon URL or name
|
|
343
|
+
*/
|
|
344
|
+
icon: zod_1.z.string().optional().describe('Connector icon'),
|
|
345
|
+
/**
|
|
346
|
+
* Connector category
|
|
347
|
+
*/
|
|
348
|
+
category: exports.ConnectorCategorySchema.describe('Connector category'),
|
|
349
|
+
/**
|
|
350
|
+
* Base URL for API calls
|
|
351
|
+
*/
|
|
352
|
+
baseUrl: zod_1.z.string().url().optional().describe('API base URL'),
|
|
353
|
+
/**
|
|
354
|
+
* Authentication configuration
|
|
355
|
+
*/
|
|
356
|
+
authentication: exports.AuthenticationSchema.describe('Authentication config'),
|
|
357
|
+
/**
|
|
358
|
+
* Available operations
|
|
359
|
+
*/
|
|
360
|
+
operations: zod_1.z.array(exports.ConnectorOperationSchema)
|
|
361
|
+
.optional()
|
|
362
|
+
.describe('Connector operations'),
|
|
363
|
+
/**
|
|
364
|
+
* Available triggers
|
|
365
|
+
*/
|
|
366
|
+
triggers: zod_1.z.array(exports.ConnectorTriggerSchema)
|
|
367
|
+
.optional()
|
|
368
|
+
.describe('Connector triggers'),
|
|
369
|
+
/**
|
|
370
|
+
* Rate limiting information
|
|
371
|
+
*/
|
|
372
|
+
rateLimit: zod_1.z.object({
|
|
373
|
+
requestsPerSecond: zod_1.z.number().optional().describe('Max requests per second'),
|
|
374
|
+
requestsPerMinute: zod_1.z.number().optional().describe('Max requests per minute'),
|
|
375
|
+
requestsPerHour: zod_1.z.number().optional().describe('Max requests per hour'),
|
|
376
|
+
}).optional().describe('Rate limiting'),
|
|
377
|
+
/**
|
|
378
|
+
* Connector author
|
|
379
|
+
*/
|
|
380
|
+
author: zod_1.z.string().optional().describe('Connector author'),
|
|
381
|
+
/**
|
|
382
|
+
* Documentation URL
|
|
383
|
+
*/
|
|
384
|
+
documentation: zod_1.z.string().url().optional().describe('Documentation URL'),
|
|
385
|
+
/**
|
|
386
|
+
* Homepage URL
|
|
387
|
+
*/
|
|
388
|
+
homepage: zod_1.z.string().url().optional().describe('Homepage URL'),
|
|
389
|
+
/**
|
|
390
|
+
* License
|
|
391
|
+
*/
|
|
392
|
+
license: zod_1.z.string().optional().describe('License (SPDX identifier)'),
|
|
393
|
+
/**
|
|
394
|
+
* Tags for discovery
|
|
395
|
+
*/
|
|
396
|
+
tags: zod_1.z.array(zod_1.z.string()).optional().describe('Connector tags'),
|
|
397
|
+
/**
|
|
398
|
+
* Whether connector is verified/certified
|
|
399
|
+
*/
|
|
400
|
+
verified: zod_1.z.boolean().default(false).describe('Verified connector'),
|
|
401
|
+
/**
|
|
402
|
+
* Custom metadata
|
|
403
|
+
*/
|
|
404
|
+
metadata: zod_1.z.record(zod_1.z.any()).optional().describe('Custom metadata'),
|
|
405
|
+
});
|
|
406
|
+
/**
|
|
407
|
+
* Connector Instance Schema
|
|
408
|
+
*
|
|
409
|
+
* A configured instance of a connector with credentials.
|
|
410
|
+
*/
|
|
411
|
+
exports.ConnectorInstanceSchema = zod_1.z.object({
|
|
412
|
+
/**
|
|
413
|
+
* Instance ID
|
|
414
|
+
*/
|
|
415
|
+
id: zod_1.z.string().describe('Instance ID'),
|
|
416
|
+
/**
|
|
417
|
+
* Connector ID this instance uses
|
|
418
|
+
*/
|
|
419
|
+
connectorId: zod_1.z.string().describe('Connector ID'),
|
|
420
|
+
/**
|
|
421
|
+
* Instance name
|
|
422
|
+
*/
|
|
423
|
+
name: zod_1.z.string().describe('Instance name'),
|
|
424
|
+
/**
|
|
425
|
+
* Instance description
|
|
426
|
+
*/
|
|
427
|
+
description: zod_1.z.string().optional().describe('Instance description'),
|
|
428
|
+
/**
|
|
429
|
+
* Authentication credentials (encrypted)
|
|
430
|
+
*/
|
|
431
|
+
credentials: zod_1.z.record(zod_1.z.any()).describe('Encrypted credentials'),
|
|
432
|
+
/**
|
|
433
|
+
* Additional configuration
|
|
434
|
+
*/
|
|
435
|
+
config: zod_1.z.record(zod_1.z.any()).optional().describe('Additional config'),
|
|
436
|
+
/**
|
|
437
|
+
* Whether instance is active
|
|
438
|
+
*/
|
|
439
|
+
active: zod_1.z.boolean().default(true).describe('Instance active status'),
|
|
440
|
+
/**
|
|
441
|
+
* Created timestamp
|
|
442
|
+
*/
|
|
443
|
+
createdAt: zod_1.z.string().datetime().optional().describe('Creation time'),
|
|
444
|
+
/**
|
|
445
|
+
* Last tested timestamp
|
|
446
|
+
*/
|
|
447
|
+
lastTestedAt: zod_1.z.string().datetime().optional().describe('Last test time'),
|
|
448
|
+
/**
|
|
449
|
+
* Test status
|
|
450
|
+
*/
|
|
451
|
+
testStatus: zod_1.z.enum(['unknown', 'success', 'failed'])
|
|
452
|
+
.default('unknown')
|
|
453
|
+
.describe('Connection test status'),
|
|
454
|
+
});
|
|
455
|
+
/**
|
|
456
|
+
* Helper factory for creating connectors
|
|
457
|
+
*/
|
|
458
|
+
exports.Connector = {
|
|
459
|
+
/**
|
|
460
|
+
* Create a basic API key connector
|
|
461
|
+
*/
|
|
462
|
+
apiKey: (params) => ({
|
|
463
|
+
id: params.id,
|
|
464
|
+
name: params.name,
|
|
465
|
+
category: params.category,
|
|
466
|
+
baseUrl: params.baseUrl,
|
|
467
|
+
authentication: {
|
|
468
|
+
type: 'apiKey',
|
|
469
|
+
fields: [
|
|
470
|
+
{
|
|
471
|
+
name: 'api_key',
|
|
472
|
+
label: 'API Key',
|
|
473
|
+
type: 'password',
|
|
474
|
+
required: true,
|
|
475
|
+
},
|
|
476
|
+
],
|
|
477
|
+
},
|
|
478
|
+
verified: false,
|
|
479
|
+
}),
|
|
480
|
+
/**
|
|
481
|
+
* Create an OAuth 2.0 connector
|
|
482
|
+
*/
|
|
483
|
+
oauth2: (params) => ({
|
|
484
|
+
id: params.id,
|
|
485
|
+
name: params.name,
|
|
486
|
+
category: params.category,
|
|
487
|
+
baseUrl: params.baseUrl,
|
|
488
|
+
authentication: {
|
|
489
|
+
type: 'oauth2',
|
|
490
|
+
oauth2: {
|
|
491
|
+
authorizationUrl: params.authUrl,
|
|
492
|
+
tokenUrl: params.tokenUrl,
|
|
493
|
+
clientIdField: 'client_id',
|
|
494
|
+
clientSecretField: 'client_secret',
|
|
495
|
+
scopes: params.scopes,
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
verified: false,
|
|
499
|
+
}),
|
|
500
|
+
};
|