@objectstack/spec 0.3.3 → 0.4.2
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/dist/ai/conversation.zod.d.ts +14 -14
- package/dist/ai/cost.zod.d.ts +112 -112
- package/dist/ai/model-registry.zod.d.ts +44 -44
- package/dist/ai/nlq.zod.d.ts +2 -2
- package/dist/ai/orchestration.zod.d.ts +6 -6
- package/dist/ai/predictive.zod.d.ts +8 -8
- package/dist/ai/rag-pipeline.zod.d.ts +62 -62
- package/dist/api/contract.zod.d.ts +92 -92
- package/dist/api/discovery.zod.d.ts +2 -2
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -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/api/router.zod.d.ts +4 -4
- package/dist/auth/config.zod.d.ts +21 -21
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +1 -0
- package/dist/auth/organization.zod.d.ts +2 -2
- package/dist/auth/role.zod.d.ts +14 -0
- package/dist/auth/role.zod.d.ts.map +1 -1
- package/dist/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/automation/flow.zod.d.ts +6 -6
- package/dist/automation/index.d.ts +4 -0
- package/dist/automation/index.d.ts.map +1 -1
- package/dist/automation/index.js +4 -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/automation/webhook.zod.d.ts +24 -1
- package/dist/automation/webhook.zod.d.ts.map +1 -1
- package/dist/automation/webhook.zod.js +27 -3
- package/dist/automation/workflow.zod.d.ts +14 -0
- package/dist/automation/workflow.zod.d.ts.map +1 -1
- package/dist/automation/workflow.zod.js +16 -1
- package/dist/data/field.zod.d.ts +338 -8
- package/dist/data/field.zod.d.ts.map +1 -1
- package/dist/data/field.zod.js +100 -16
- package/dist/data/mapping.zod.d.ts +22 -10
- 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 +116 -22
- package/dist/data/object.zod.d.ts.map +1 -1
- package/dist/data/object.zod.js +4 -4
- package/dist/data/validation.zod.d.ts +18 -18
- package/dist/hub/composer.zod.d.ts +43 -1940
- package/dist/hub/composer.zod.d.ts.map +1 -1
- package/dist/hub/composer.zod.js +1 -1
- package/dist/hub/license.zod.d.ts +2 -2
- package/dist/hub/marketplace.zod.d.ts +6 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/permission/index.d.ts +7 -5
- package/dist/permission/index.d.ts.map +1 -1
- package/dist/permission/index.js +7 -5
- package/dist/permission/permission.zod.d.ts +14 -0
- package/dist/permission/permission.zod.d.ts.map +1 -1
- package/dist/permission/permission.zod.js +16 -1
- 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/territory.zod.d.ts +13 -0
- package/dist/permission/territory.zod.d.ts.map +1 -1
- package/dist/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/{driver → shared}/index.js +5 -4
- 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 +12 -12
- package/dist/{kernel → system}/context.zod.d.ts.map +1 -1
- package/dist/{driver → system}/datasource.zod.d.ts +2 -2
- package/dist/{driver → system}/datasource.zod.d.ts.map +1 -1
- package/dist/{driver → system/driver}/mongo.zod.d.ts +2 -2
- package/dist/system/driver/mongo.zod.d.ts.map +1 -0
- package/dist/{driver → system/driver}/postgres.zod.d.ts +4 -4
- package/dist/system/driver/postgres.zod.d.ts.map +1 -0
- package/dist/{driver → system}/driver.zod.d.ts +14 -14
- package/dist/{driver → system}/driver.zod.d.ts.map +1 -1
- package/dist/system/events.zod.d.ts +15 -12
- 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 +10 -0
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js +12 -0
- package/dist/system/job.zod.d.ts +8 -8
- package/dist/{kernel → system}/logger.zod.d.ts +4 -4
- package/dist/{kernel → system}/logger.zod.d.ts.map +1 -1
- package/dist/system/manifest.zod.d.ts +518 -0
- package/dist/system/manifest.zod.d.ts.map +1 -0
- package/dist/{kernel → system}/manifest.zod.js +8 -17
- package/dist/{kernel → system}/plugin.zod.d.ts.map +1 -1
- package/dist/{kernel → system}/scoped-storage.zod.d.ts +2 -2
- package/dist/{kernel → system}/scoped-storage.zod.d.ts.map +1 -1
- package/dist/ui/action.zod.d.ts +35 -10
- 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 +23 -8
- 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 +21 -3
- 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 +7 -7
- package/dist/ui/view.zod.d.ts +252 -240
- 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 +673 -5
- package/dist/ui/widget.zod.d.ts.map +1 -1
- package/dist/ui/widget.zod.js +294 -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/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/automation/ETLSyncMode.json +14 -0
- 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/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/automation/SyncMode.json +14 -0
- package/json-schema/automation/Webhook.json +3 -1
- package/json-schema/automation/WebhookReceiver.json +3 -1
- package/json-schema/automation/WorkflowRule.json +3 -2
- package/json-schema/data/Field.json +62 -4
- package/json-schema/data/FieldType.json +12 -2
- package/json-schema/data/Object.json +62 -4
- package/json-schema/data/SelectOption.json +4 -2
- package/json-schema/data/VectorConfig.json +51 -0
- package/json-schema/hub/ComposerResponse.json +4 -2163
- package/json-schema/permission/PermissionSet.json +3 -1
- package/json-schema/permission/RLSConfig.json +59 -0
- package/json-schema/permission/RLSEvaluationResult.json +40 -0
- package/json-schema/permission/RLSOperation.json +16 -0
- package/json-schema/permission/RLSUserContext.json +51 -0
- package/json-schema/permission/RowLevelSecurityPolicy.json +77 -0
- package/json-schema/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/Event.json +3 -2
- package/json-schema/system/FeatureFlag.json +87 -0
- package/json-schema/system/FeatureStrategy.json +16 -0
- package/json-schema/system/Manifest.json +398 -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 +62 -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/package.json +1 -1
- package/prompts/architecture.md +5 -5
- package/prompts/create-new-project.md +85 -0
- package/dist/driver/index.d.ts +0 -5
- package/dist/driver/index.d.ts.map +0 -1
- package/dist/driver/mongo.zod.d.ts.map +0 -1
- package/dist/driver/postgres.zod.d.ts.map +0 -1
- package/dist/kernel/index.d.ts +0 -12
- package/dist/kernel/index.d.ts.map +0 -1
- package/dist/kernel/index.js +0 -27
- package/dist/kernel/manifest.zod.d.ts +0 -2153
- package/dist/kernel/manifest.zod.d.ts.map +0 -1
- package/json-schema/kernel/Manifest.json +0 -2557
- /package/dist/{kernel → system}/context.zod.d.ts +0 -0
- /package/dist/{kernel → system}/context.zod.js +0 -0
- /package/dist/{driver → system}/datasource.zod.js +0 -0
- /package/dist/{driver → system/driver}/mongo.zod.js +0 -0
- /package/dist/{driver → system/driver}/postgres.zod.js +0 -0
- /package/dist/{driver → system}/driver.zod.js +0 -0
- /package/dist/{kernel → system}/logger.zod.js +0 -0
- /package/dist/{kernel → system}/plugin.zod.d.ts +0 -0
- /package/dist/{kernel → system}/plugin.zod.js +0 -0
- /package/dist/{kernel → system}/scoped-storage.zod.js +0 -0
- /package/json-schema/{driver → system}/Datasource.json +0 -0
- /package/json-schema/{driver → system}/DatasourceCapabilities.json +0 -0
- /package/json-schema/{driver → system}/DriverCapabilities.json +0 -0
- /package/json-schema/{driver → system}/DriverDefinition.json +0 -0
- /package/json-schema/{driver → system}/DriverInterface.json +0 -0
- /package/json-schema/{driver → system}/DriverOptions.json +0 -0
- /package/json-schema/{driver → system}/DriverType.json +0 -0
- /package/json-schema/{kernel → system}/FileMetadata.json +0 -0
- /package/json-schema/{kernel → system}/I18nContext.json +0 -0
- /package/json-schema/{kernel → system}/KernelContext.json +0 -0
- /package/json-schema/{kernel → system}/LogEntry.json +0 -0
- /package/json-schema/{kernel → system}/LogFormat.json +0 -0
- /package/json-schema/{kernel → system}/LogLevel.json +0 -0
- /package/json-schema/{kernel → system}/Logger.json +0 -0
- /package/json-schema/{kernel → system}/LoggerConfig.json +0 -0
- /package/json-schema/{driver → system}/MongoConfig.json +0 -0
- /package/json-schema/{kernel → system}/ObjectQLClient.json +0 -0
- /package/json-schema/{kernel → system}/Plugin.json +0 -0
- /package/json-schema/{kernel → system}/PluginContext.json +0 -0
- /package/json-schema/{kernel → system}/PluginLifecycle.json +0 -0
- /package/json-schema/{driver → system}/PostgresConfig.json +0 -0
- /package/json-schema/{kernel → system}/Router.json +0 -0
- /package/json-schema/{kernel → system}/RuntimeMode.json +0 -0
- /package/json-schema/{kernel → system}/Scheduler.json +0 -0
- /package/json-schema/{kernel → system}/ScopedStorage.json +0 -0
- /package/json-schema/{kernel → system}/ScopedStorageConfig.json +0 -0
- /package/json-schema/{kernel → system}/StorageAdapterType.json +0 -0
- /package/json-schema/{kernel → system}/StorageScope.json +0 -0
- /package/json-schema/{kernel → system}/SystemAPI.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,CA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AGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;EAIH,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,SAAS;IACpB;;OAEG;8BACc;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
|
+
};
|