@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,359 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ETL = exports.ETLPipelineRunSchema = exports.ETLRunStatusSchema = exports.ETLPipelineSchema = exports.ETLSyncModeSchema = exports.ETLTransformationSchema = exports.ETLTransformationTypeSchema = exports.ETLDestinationSchema = exports.ETLSourceSchema = exports.ETLEndpointTypeSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* ETL (Extract, Transform, Load) Pipeline Protocol
|
|
7
|
+
*
|
|
8
|
+
* Inspired by modern data integration platforms like Airbyte, Fivetran, and Apache NiFi.
|
|
9
|
+
*
|
|
10
|
+
* ETL pipelines enable automated data synchronization between systems, transforming
|
|
11
|
+
* data as it moves from source to destination.
|
|
12
|
+
*
|
|
13
|
+
* ## Use Cases
|
|
14
|
+
*
|
|
15
|
+
* 1. **Data Warehouse Population**
|
|
16
|
+
* - Extract from multiple operational systems
|
|
17
|
+
* - Transform to analytical schema
|
|
18
|
+
* - Load into data warehouse
|
|
19
|
+
*
|
|
20
|
+
* 2. **System Integration**
|
|
21
|
+
* - Sync data between CRM and Marketing Automation
|
|
22
|
+
* - Keep product catalog synchronized across e-commerce platforms
|
|
23
|
+
* - Replicate data for backup/disaster recovery
|
|
24
|
+
*
|
|
25
|
+
* 3. **Data Migration**
|
|
26
|
+
* - Move data from legacy systems to modern platforms
|
|
27
|
+
* - Consolidate data from multiple sources
|
|
28
|
+
* - Split monolithic databases into microservices
|
|
29
|
+
*
|
|
30
|
+
* @see https://airbyte.com/
|
|
31
|
+
* @see https://docs.fivetran.com/
|
|
32
|
+
* @see https://nifi.apache.org/
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const salesforceToDB: ETLPipeline = {
|
|
37
|
+
* name: 'salesforce_to_postgres',
|
|
38
|
+
* label: 'Salesforce Accounts to PostgreSQL',
|
|
39
|
+
* source: {
|
|
40
|
+
* type: 'api',
|
|
41
|
+
* connector: 'salesforce',
|
|
42
|
+
* config: { object: 'Account' }
|
|
43
|
+
* },
|
|
44
|
+
* destination: {
|
|
45
|
+
* type: 'database',
|
|
46
|
+
* connector: 'postgres',
|
|
47
|
+
* config: { table: 'accounts' }
|
|
48
|
+
* },
|
|
49
|
+
* transformations: [
|
|
50
|
+
* { type: 'map', config: { 'Name': 'account_name' } }
|
|
51
|
+
* ],
|
|
52
|
+
* schedule: '0 2 * * *' // Daily at 2 AM
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
/**
|
|
57
|
+
* ETL Source/Destination Type
|
|
58
|
+
*/
|
|
59
|
+
exports.ETLEndpointTypeSchema = zod_1.z.enum([
|
|
60
|
+
'database', // SQL/NoSQL databases
|
|
61
|
+
'api', // REST/GraphQL APIs
|
|
62
|
+
'file', // CSV, JSON, XML, Excel files
|
|
63
|
+
'stream', // Kafka, RabbitMQ, Kinesis
|
|
64
|
+
'object', // ObjectStack object
|
|
65
|
+
'warehouse', // Data warehouse (Snowflake, BigQuery, Redshift)
|
|
66
|
+
'storage', // S3, Azure Blob, Google Cloud Storage
|
|
67
|
+
'spreadsheet', // Google Sheets, Excel Online
|
|
68
|
+
]);
|
|
69
|
+
/**
|
|
70
|
+
* ETL Source Configuration
|
|
71
|
+
*/
|
|
72
|
+
exports.ETLSourceSchema = zod_1.z.object({
|
|
73
|
+
/**
|
|
74
|
+
* Source type
|
|
75
|
+
*/
|
|
76
|
+
type: exports.ETLEndpointTypeSchema.describe('Source type'),
|
|
77
|
+
/**
|
|
78
|
+
* Connector identifier
|
|
79
|
+
* References a registered connector
|
|
80
|
+
*
|
|
81
|
+
* @example "salesforce", "postgres", "mysql", "s3"
|
|
82
|
+
*/
|
|
83
|
+
connector: zod_1.z.string().optional().describe('Connector ID'),
|
|
84
|
+
/**
|
|
85
|
+
* Source-specific configuration
|
|
86
|
+
* Structure varies by source type
|
|
87
|
+
*
|
|
88
|
+
* @example For database: { table: 'customers', schema: 'public' }
|
|
89
|
+
* @example For API: { endpoint: '/api/users', method: 'GET' }
|
|
90
|
+
* @example For file: { path: 's3://bucket/data.csv', format: 'csv' }
|
|
91
|
+
*/
|
|
92
|
+
config: zod_1.z.record(zod_1.z.any()).describe('Source configuration'),
|
|
93
|
+
/**
|
|
94
|
+
* Incremental sync configuration
|
|
95
|
+
* Allows extracting only changed data
|
|
96
|
+
*/
|
|
97
|
+
incremental: zod_1.z.object({
|
|
98
|
+
enabled: zod_1.z.boolean().default(false),
|
|
99
|
+
cursorField: zod_1.z.string().describe('Field to track progress (e.g., updated_at)'),
|
|
100
|
+
cursorValue: zod_1.z.any().optional().describe('Last processed value'),
|
|
101
|
+
}).optional().describe('Incremental extraction config'),
|
|
102
|
+
});
|
|
103
|
+
/**
|
|
104
|
+
* ETL Destination Configuration
|
|
105
|
+
*/
|
|
106
|
+
exports.ETLDestinationSchema = zod_1.z.object({
|
|
107
|
+
/**
|
|
108
|
+
* Destination type
|
|
109
|
+
*/
|
|
110
|
+
type: exports.ETLEndpointTypeSchema.describe('Destination type'),
|
|
111
|
+
/**
|
|
112
|
+
* Connector identifier
|
|
113
|
+
*/
|
|
114
|
+
connector: zod_1.z.string().optional().describe('Connector ID'),
|
|
115
|
+
/**
|
|
116
|
+
* Destination-specific configuration
|
|
117
|
+
*/
|
|
118
|
+
config: zod_1.z.record(zod_1.z.any()).describe('Destination configuration'),
|
|
119
|
+
/**
|
|
120
|
+
* Write mode
|
|
121
|
+
*/
|
|
122
|
+
writeMode: zod_1.z.enum([
|
|
123
|
+
'append', // Add new records
|
|
124
|
+
'overwrite', // Replace all data
|
|
125
|
+
'upsert', // Insert or update based on key
|
|
126
|
+
'merge', // Smart merge based on business rules
|
|
127
|
+
]).default('append').describe('How to write data'),
|
|
128
|
+
/**
|
|
129
|
+
* Primary key fields for upsert/merge
|
|
130
|
+
*/
|
|
131
|
+
primaryKey: zod_1.z.array(zod_1.z.string()).optional().describe('Primary key fields'),
|
|
132
|
+
});
|
|
133
|
+
/**
|
|
134
|
+
* ETL Transformation Type
|
|
135
|
+
*/
|
|
136
|
+
exports.ETLTransformationTypeSchema = zod_1.z.enum([
|
|
137
|
+
'map', // Field mapping/renaming
|
|
138
|
+
'filter', // Row filtering
|
|
139
|
+
'aggregate', // Aggregation/grouping
|
|
140
|
+
'join', // Joining with other data
|
|
141
|
+
'script', // Custom JavaScript/Python script
|
|
142
|
+
'lookup', // Enrich with lookup data
|
|
143
|
+
'split', // Split one record into multiple
|
|
144
|
+
'merge', // Merge multiple records into one
|
|
145
|
+
'normalize', // Data normalization
|
|
146
|
+
'deduplicate', // Remove duplicates
|
|
147
|
+
]);
|
|
148
|
+
/**
|
|
149
|
+
* ETL Transformation Configuration
|
|
150
|
+
*/
|
|
151
|
+
exports.ETLTransformationSchema = zod_1.z.object({
|
|
152
|
+
/**
|
|
153
|
+
* Transformation name
|
|
154
|
+
*/
|
|
155
|
+
name: zod_1.z.string().optional().describe('Transformation name'),
|
|
156
|
+
/**
|
|
157
|
+
* Transformation type
|
|
158
|
+
*/
|
|
159
|
+
type: exports.ETLTransformationTypeSchema.describe('Transformation type'),
|
|
160
|
+
/**
|
|
161
|
+
* Transformation-specific configuration
|
|
162
|
+
*
|
|
163
|
+
* @example For map: { oldField: 'newField' }
|
|
164
|
+
* @example For filter: { condition: 'status == "active"' }
|
|
165
|
+
* @example For script: { language: 'javascript', code: '...' }
|
|
166
|
+
*/
|
|
167
|
+
config: zod_1.z.record(zod_1.z.any()).describe('Transformation config'),
|
|
168
|
+
/**
|
|
169
|
+
* Whether to continue on error
|
|
170
|
+
*/
|
|
171
|
+
continueOnError: zod_1.z.boolean().default(false).describe('Continue on error'),
|
|
172
|
+
});
|
|
173
|
+
/**
|
|
174
|
+
* ETL Sync Mode
|
|
175
|
+
*/
|
|
176
|
+
exports.ETLSyncModeSchema = zod_1.z.enum([
|
|
177
|
+
'full', // Full refresh - extract all data every time
|
|
178
|
+
'incremental', // Only extract changed data
|
|
179
|
+
'cdc', // Change Data Capture - real-time streaming
|
|
180
|
+
]);
|
|
181
|
+
/**
|
|
182
|
+
* ETL Pipeline Schema
|
|
183
|
+
*
|
|
184
|
+
* Complete definition of a data pipeline from source to destination with transformations.
|
|
185
|
+
*/
|
|
186
|
+
exports.ETLPipelineSchema = zod_1.z.object({
|
|
187
|
+
/**
|
|
188
|
+
* Pipeline identifier (snake_case)
|
|
189
|
+
*/
|
|
190
|
+
name: zod_1.z.string()
|
|
191
|
+
.regex(/^[a-z_][a-z0-9_]*$/)
|
|
192
|
+
.describe('Pipeline identifier (snake_case)'),
|
|
193
|
+
/**
|
|
194
|
+
* Human-readable pipeline name
|
|
195
|
+
*/
|
|
196
|
+
label: zod_1.z.string().optional().describe('Pipeline display name'),
|
|
197
|
+
/**
|
|
198
|
+
* Pipeline description
|
|
199
|
+
*/
|
|
200
|
+
description: zod_1.z.string().optional().describe('Pipeline description'),
|
|
201
|
+
/**
|
|
202
|
+
* Data source configuration
|
|
203
|
+
*/
|
|
204
|
+
source: exports.ETLSourceSchema.describe('Data source'),
|
|
205
|
+
/**
|
|
206
|
+
* Data destination configuration
|
|
207
|
+
*/
|
|
208
|
+
destination: exports.ETLDestinationSchema.describe('Data destination'),
|
|
209
|
+
/**
|
|
210
|
+
* Transformation steps
|
|
211
|
+
* Applied in order from source to destination
|
|
212
|
+
*/
|
|
213
|
+
transformations: zod_1.z.array(exports.ETLTransformationSchema)
|
|
214
|
+
.optional()
|
|
215
|
+
.describe('Transformation pipeline'),
|
|
216
|
+
/**
|
|
217
|
+
* Sync mode
|
|
218
|
+
*/
|
|
219
|
+
syncMode: exports.ETLSyncModeSchema.default('full').describe('Sync mode'),
|
|
220
|
+
/**
|
|
221
|
+
* Execution schedule (cron expression)
|
|
222
|
+
*
|
|
223
|
+
* @example "0 2 * * *" - Daily at 2 AM
|
|
224
|
+
* @example "0 *\/4 * * *" - Every 4 hours
|
|
225
|
+
* @example "0 0 * * 0" - Weekly on Sunday
|
|
226
|
+
*/
|
|
227
|
+
schedule: zod_1.z.string().optional().describe('Cron schedule expression'),
|
|
228
|
+
/**
|
|
229
|
+
* Whether pipeline is enabled
|
|
230
|
+
*/
|
|
231
|
+
enabled: zod_1.z.boolean().default(true).describe('Pipeline enabled status'),
|
|
232
|
+
/**
|
|
233
|
+
* Retry configuration for failed runs
|
|
234
|
+
*/
|
|
235
|
+
retry: zod_1.z.object({
|
|
236
|
+
maxAttempts: zod_1.z.number().int().min(0).default(3).describe('Max retry attempts'),
|
|
237
|
+
backoffMs: zod_1.z.number().int().min(0).default(60000).describe('Backoff in milliseconds'),
|
|
238
|
+
}).optional().describe('Retry configuration'),
|
|
239
|
+
/**
|
|
240
|
+
* Notification configuration
|
|
241
|
+
*/
|
|
242
|
+
notifications: zod_1.z.object({
|
|
243
|
+
onSuccess: zod_1.z.array(zod_1.z.string()).optional().describe('Email addresses for success notifications'),
|
|
244
|
+
onFailure: zod_1.z.array(zod_1.z.string()).optional().describe('Email addresses for failure notifications'),
|
|
245
|
+
}).optional().describe('Notification settings'),
|
|
246
|
+
/**
|
|
247
|
+
* Pipeline tags for organization
|
|
248
|
+
*/
|
|
249
|
+
tags: zod_1.z.array(zod_1.z.string()).optional().describe('Pipeline tags'),
|
|
250
|
+
/**
|
|
251
|
+
* Custom metadata
|
|
252
|
+
*/
|
|
253
|
+
metadata: zod_1.z.record(zod_1.z.any()).optional().describe('Custom metadata'),
|
|
254
|
+
});
|
|
255
|
+
/**
|
|
256
|
+
* ETL Run Status
|
|
257
|
+
*/
|
|
258
|
+
exports.ETLRunStatusSchema = zod_1.z.enum([
|
|
259
|
+
'pending', // Queued for execution
|
|
260
|
+
'running', // Currently executing
|
|
261
|
+
'succeeded', // Completed successfully
|
|
262
|
+
'failed', // Failed with errors
|
|
263
|
+
'cancelled', // Manually cancelled
|
|
264
|
+
'timeout', // Timed out
|
|
265
|
+
]);
|
|
266
|
+
/**
|
|
267
|
+
* ETL Pipeline Run Result
|
|
268
|
+
*
|
|
269
|
+
* Result of a pipeline execution
|
|
270
|
+
*/
|
|
271
|
+
exports.ETLPipelineRunSchema = zod_1.z.object({
|
|
272
|
+
/**
|
|
273
|
+
* Run ID
|
|
274
|
+
*/
|
|
275
|
+
id: zod_1.z.string().describe('Run identifier'),
|
|
276
|
+
/**
|
|
277
|
+
* Pipeline name
|
|
278
|
+
*/
|
|
279
|
+
pipelineName: zod_1.z.string().describe('Pipeline name'),
|
|
280
|
+
/**
|
|
281
|
+
* Run status
|
|
282
|
+
*/
|
|
283
|
+
status: exports.ETLRunStatusSchema.describe('Run status'),
|
|
284
|
+
/**
|
|
285
|
+
* Start timestamp
|
|
286
|
+
*/
|
|
287
|
+
startedAt: zod_1.z.string().datetime().describe('Start time'),
|
|
288
|
+
/**
|
|
289
|
+
* End timestamp
|
|
290
|
+
*/
|
|
291
|
+
completedAt: zod_1.z.string().datetime().optional().describe('Completion time'),
|
|
292
|
+
/**
|
|
293
|
+
* Duration in milliseconds
|
|
294
|
+
*/
|
|
295
|
+
durationMs: zod_1.z.number().optional().describe('Duration in ms'),
|
|
296
|
+
/**
|
|
297
|
+
* Statistics
|
|
298
|
+
*/
|
|
299
|
+
stats: zod_1.z.object({
|
|
300
|
+
recordsRead: zod_1.z.number().int().default(0).describe('Records extracted'),
|
|
301
|
+
recordsWritten: zod_1.z.number().int().default(0).describe('Records loaded'),
|
|
302
|
+
recordsErrored: zod_1.z.number().int().default(0).describe('Records with errors'),
|
|
303
|
+
bytesProcessed: zod_1.z.number().int().default(0).describe('Bytes processed'),
|
|
304
|
+
}).optional().describe('Run statistics'),
|
|
305
|
+
/**
|
|
306
|
+
* Error information
|
|
307
|
+
*/
|
|
308
|
+
error: zod_1.z.object({
|
|
309
|
+
message: zod_1.z.string().describe('Error message'),
|
|
310
|
+
code: zod_1.z.string().optional().describe('Error code'),
|
|
311
|
+
details: zod_1.z.any().optional().describe('Error details'),
|
|
312
|
+
}).optional().describe('Error information'),
|
|
313
|
+
/**
|
|
314
|
+
* Execution logs
|
|
315
|
+
*/
|
|
316
|
+
logs: zod_1.z.array(zod_1.z.string()).optional().describe('Execution logs'),
|
|
317
|
+
});
|
|
318
|
+
/**
|
|
319
|
+
* Helper factory for creating ETL pipelines
|
|
320
|
+
*/
|
|
321
|
+
exports.ETL = {
|
|
322
|
+
/**
|
|
323
|
+
* Create a simple database-to-database pipeline
|
|
324
|
+
*/
|
|
325
|
+
databaseSync: (params) => ({
|
|
326
|
+
name: params.name,
|
|
327
|
+
source: {
|
|
328
|
+
type: 'database',
|
|
329
|
+
config: { table: params.sourceTable },
|
|
330
|
+
},
|
|
331
|
+
destination: {
|
|
332
|
+
type: 'database',
|
|
333
|
+
config: { table: params.destTable },
|
|
334
|
+
writeMode: 'upsert',
|
|
335
|
+
},
|
|
336
|
+
syncMode: 'incremental',
|
|
337
|
+
schedule: params.schedule,
|
|
338
|
+
enabled: true,
|
|
339
|
+
}),
|
|
340
|
+
/**
|
|
341
|
+
* Create an API to database pipeline
|
|
342
|
+
*/
|
|
343
|
+
apiToDatabase: (params) => ({
|
|
344
|
+
name: params.name,
|
|
345
|
+
source: {
|
|
346
|
+
type: 'api',
|
|
347
|
+
connector: params.apiConnector,
|
|
348
|
+
config: {},
|
|
349
|
+
},
|
|
350
|
+
destination: {
|
|
351
|
+
type: 'database',
|
|
352
|
+
config: { table: params.destTable },
|
|
353
|
+
writeMode: 'append',
|
|
354
|
+
},
|
|
355
|
+
syncMode: 'full',
|
|
356
|
+
schedule: params.schedule,
|
|
357
|
+
enabled: true,
|
|
358
|
+
}),
|
|
359
|
+
};
|
|
@@ -48,20 +48,20 @@ export declare const FlowNodeSchema: z.ZodObject<{
|
|
|
48
48
|
type: "loop" | "start" | "end" | "script" | "create_record" | "decision" | "assignment" | "update_record" | "delete_record" | "get_record" | "http_request" | "wait" | "subflow";
|
|
49
49
|
label: string;
|
|
50
50
|
id: string;
|
|
51
|
-
config?: Record<string, any> | undefined;
|
|
52
51
|
position?: {
|
|
53
52
|
x: number;
|
|
54
53
|
y: number;
|
|
55
54
|
} | undefined;
|
|
55
|
+
config?: Record<string, any> | undefined;
|
|
56
56
|
}, {
|
|
57
57
|
type: "loop" | "start" | "end" | "script" | "create_record" | "decision" | "assignment" | "update_record" | "delete_record" | "get_record" | "http_request" | "wait" | "subflow";
|
|
58
58
|
label: string;
|
|
59
59
|
id: string;
|
|
60
|
-
config?: Record<string, any> | undefined;
|
|
61
60
|
position?: {
|
|
62
61
|
x: number;
|
|
63
62
|
y: number;
|
|
64
63
|
} | undefined;
|
|
64
|
+
config?: Record<string, any> | undefined;
|
|
65
65
|
}>;
|
|
66
66
|
/**
|
|
67
67
|
* Flow Edge Schema
|
|
@@ -144,20 +144,20 @@ export declare const FlowSchema: z.ZodObject<{
|
|
|
144
144
|
type: "loop" | "start" | "end" | "script" | "create_record" | "decision" | "assignment" | "update_record" | "delete_record" | "get_record" | "http_request" | "wait" | "subflow";
|
|
145
145
|
label: string;
|
|
146
146
|
id: string;
|
|
147
|
-
config?: Record<string, any> | undefined;
|
|
148
147
|
position?: {
|
|
149
148
|
x: number;
|
|
150
149
|
y: number;
|
|
151
150
|
} | undefined;
|
|
151
|
+
config?: Record<string, any> | undefined;
|
|
152
152
|
}, {
|
|
153
153
|
type: "loop" | "start" | "end" | "script" | "create_record" | "decision" | "assignment" | "update_record" | "delete_record" | "get_record" | "http_request" | "wait" | "subflow";
|
|
154
154
|
label: string;
|
|
155
155
|
id: string;
|
|
156
|
-
config?: Record<string, any> | undefined;
|
|
157
156
|
position?: {
|
|
158
157
|
x: number;
|
|
159
158
|
y: number;
|
|
160
159
|
} | undefined;
|
|
160
|
+
config?: Record<string, any> | undefined;
|
|
161
161
|
}>, "many">;
|
|
162
162
|
edges: z.ZodArray<z.ZodObject<{
|
|
163
163
|
id: z.ZodString;
|
|
@@ -197,11 +197,11 @@ export declare const FlowSchema: z.ZodObject<{
|
|
|
197
197
|
type: "loop" | "start" | "end" | "script" | "create_record" | "decision" | "assignment" | "update_record" | "delete_record" | "get_record" | "http_request" | "wait" | "subflow";
|
|
198
198
|
label: string;
|
|
199
199
|
id: string;
|
|
200
|
-
config?: Record<string, any> | undefined;
|
|
201
200
|
position?: {
|
|
202
201
|
x: number;
|
|
203
202
|
y: number;
|
|
204
203
|
} | undefined;
|
|
204
|
+
config?: Record<string, any> | undefined;
|
|
205
205
|
}[];
|
|
206
206
|
edges: {
|
|
207
207
|
type: "default" | "fault";
|
|
@@ -227,11 +227,11 @@ export declare const FlowSchema: z.ZodObject<{
|
|
|
227
227
|
type: "loop" | "start" | "end" | "script" | "create_record" | "decision" | "assignment" | "update_record" | "delete_record" | "get_record" | "http_request" | "wait" | "subflow";
|
|
228
228
|
label: string;
|
|
229
229
|
id: string;
|
|
230
|
-
config?: Record<string, any> | undefined;
|
|
231
230
|
position?: {
|
|
232
231
|
x: number;
|
|
233
232
|
y: number;
|
|
234
233
|
} | undefined;
|
|
234
|
+
config?: Record<string, any> | undefined;
|
|
235
235
|
}[];
|
|
236
236
|
edges: {
|
|
237
237
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/automation/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/automation/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
|
package/dist/automation/index.js
CHANGED
|
@@ -17,3 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./workflow.zod"), exports);
|
|
18
18
|
__exportStar(require("./flow.zod"), exports);
|
|
19
19
|
__exportStar(require("./webhook.zod"), exports);
|
|
20
|
+
__exportStar(require("./approval.zod"), exports);
|
|
21
|
+
__exportStar(require("./etl.zod"), exports);
|
|
22
|
+
__exportStar(require("./connector.zod"), exports);
|
|
23
|
+
__exportStar(require("./sync.zod"), exports);
|