@objectstack/spec 0.3.3 → 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/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 +42 -1939
- 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 +515 -0
- package/dist/system/manifest.zod.d.ts.map +1 -0
- package/dist/{kernel → system}/manifest.zod.js +0 -12
- 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 +0 -2162
- 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 +395 -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,854 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Data Sync Protocol
|
|
4
|
+
*
|
|
5
|
+
* Inspired by Salesforce Connect, Segment Sync, and Census Reverse ETL.
|
|
6
|
+
*
|
|
7
|
+
* Data sync provides bidirectional or unidirectional data synchronization
|
|
8
|
+
* between ObjectStack and external systems, maintaining data consistency
|
|
9
|
+
* across platforms.
|
|
10
|
+
*
|
|
11
|
+
* ## Use Cases
|
|
12
|
+
*
|
|
13
|
+
* 1. **CRM Integration**
|
|
14
|
+
* - Sync contacts between ObjectStack and Salesforce
|
|
15
|
+
* - Keep opportunity data synchronized
|
|
16
|
+
* - Bidirectional updates
|
|
17
|
+
*
|
|
18
|
+
* 2. **Customer Data Platform (CDP)**
|
|
19
|
+
* - Sync user profiles to Segment
|
|
20
|
+
* - Enrichment data from Clearbit
|
|
21
|
+
* - Marketing automation sync
|
|
22
|
+
*
|
|
23
|
+
* 3. **Operational Analytics**
|
|
24
|
+
* - Sync production data to analytics warehouse
|
|
25
|
+
* - Real-time dashboards
|
|
26
|
+
* - Business intelligence
|
|
27
|
+
*
|
|
28
|
+
* @see https://help.salesforce.com/s/articleView?id=sf.platform_connect_about.htm
|
|
29
|
+
* @see https://segment.com/docs/connections/sync/
|
|
30
|
+
* @see https://www.getcensus.com/
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const contactSync: DataSyncConfig = {
|
|
35
|
+
* name: 'salesforce_contact_sync',
|
|
36
|
+
* label: 'Salesforce Contact Sync',
|
|
37
|
+
* source: {
|
|
38
|
+
* object: 'contact',
|
|
39
|
+
* filters: { status: 'active' }
|
|
40
|
+
* },
|
|
41
|
+
* destination: {
|
|
42
|
+
* connector: 'salesforce',
|
|
43
|
+
* operation: 'upsert_contact',
|
|
44
|
+
* mapping: {
|
|
45
|
+
* first_name: 'FirstName',
|
|
46
|
+
* last_name: 'LastName',
|
|
47
|
+
* email: 'Email'
|
|
48
|
+
* }
|
|
49
|
+
* },
|
|
50
|
+
* syncMode: 'incremental',
|
|
51
|
+
* schedule: '0 * * * *' // Hourly
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* Sync Direction
|
|
57
|
+
*/
|
|
58
|
+
export declare const SyncDirectionSchema: z.ZodEnum<["push", "pull", "bidirectional"]>;
|
|
59
|
+
export type SyncDirection = z.infer<typeof SyncDirectionSchema>;
|
|
60
|
+
/**
|
|
61
|
+
* Sync Mode
|
|
62
|
+
*/
|
|
63
|
+
export declare const SyncModeSchema: z.ZodEnum<["full", "incremental", "realtime"]>;
|
|
64
|
+
export type SyncMode = z.infer<typeof SyncModeSchema>;
|
|
65
|
+
/**
|
|
66
|
+
* Conflict Resolution Strategy
|
|
67
|
+
*/
|
|
68
|
+
export declare const ConflictResolutionSchema: z.ZodEnum<["source_wins", "destination_wins", "latest_wins", "manual", "merge"]>;
|
|
69
|
+
export type ConflictResolution = z.infer<typeof ConflictResolutionSchema>;
|
|
70
|
+
/**
|
|
71
|
+
* Field Mapping Schema
|
|
72
|
+
*
|
|
73
|
+
* Maps fields between source and destination systems.
|
|
74
|
+
*/
|
|
75
|
+
export declare const FieldMappingSchema: z.ZodObject<{
|
|
76
|
+
/**
|
|
77
|
+
* Source field name
|
|
78
|
+
*/
|
|
79
|
+
sourceField: z.ZodString;
|
|
80
|
+
/**
|
|
81
|
+
* Destination field name
|
|
82
|
+
*/
|
|
83
|
+
destinationField: z.ZodString;
|
|
84
|
+
/**
|
|
85
|
+
* Transformation formula
|
|
86
|
+
* JavaScript expression to transform the value
|
|
87
|
+
*
|
|
88
|
+
* @example "value.toUpperCase()"
|
|
89
|
+
* @example "new Date(value).toISOString()"
|
|
90
|
+
*/
|
|
91
|
+
transform: z.ZodOptional<z.ZodString>;
|
|
92
|
+
/**
|
|
93
|
+
* Default value if source is null/undefined
|
|
94
|
+
*/
|
|
95
|
+
default: z.ZodOptional<z.ZodAny>;
|
|
96
|
+
/**
|
|
97
|
+
* Whether to sync null values
|
|
98
|
+
*/
|
|
99
|
+
syncNull: z.ZodDefault<z.ZodBoolean>;
|
|
100
|
+
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
sourceField: string;
|
|
102
|
+
destinationField: string;
|
|
103
|
+
syncNull: boolean;
|
|
104
|
+
default?: any;
|
|
105
|
+
transform?: string | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
sourceField: string;
|
|
108
|
+
destinationField: string;
|
|
109
|
+
default?: any;
|
|
110
|
+
transform?: string | undefined;
|
|
111
|
+
syncNull?: boolean | undefined;
|
|
112
|
+
}>;
|
|
113
|
+
export type FieldMapping = z.infer<typeof FieldMappingSchema>;
|
|
114
|
+
/**
|
|
115
|
+
* Data Source Configuration
|
|
116
|
+
*/
|
|
117
|
+
export declare const DataSourceConfigSchema: z.ZodObject<{
|
|
118
|
+
/**
|
|
119
|
+
* Source object name
|
|
120
|
+
* For ObjectStack objects
|
|
121
|
+
*/
|
|
122
|
+
object: z.ZodOptional<z.ZodString>;
|
|
123
|
+
/**
|
|
124
|
+
* Filter conditions
|
|
125
|
+
* Only sync records matching these filters
|
|
126
|
+
*/
|
|
127
|
+
filters: z.ZodOptional<z.ZodAny>;
|
|
128
|
+
/**
|
|
129
|
+
* Fields to include
|
|
130
|
+
* If not specified, all fields are synced
|
|
131
|
+
*/
|
|
132
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
133
|
+
/**
|
|
134
|
+
* External connector instance ID
|
|
135
|
+
* For external data sources
|
|
136
|
+
*/
|
|
137
|
+
connectorInstanceId: z.ZodOptional<z.ZodString>;
|
|
138
|
+
/**
|
|
139
|
+
* External resource identifier
|
|
140
|
+
* e.g., Salesforce object name, database table, API endpoint
|
|
141
|
+
*/
|
|
142
|
+
externalResource: z.ZodOptional<z.ZodString>;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
object?: string | undefined;
|
|
145
|
+
fields?: string[] | undefined;
|
|
146
|
+
filters?: any;
|
|
147
|
+
connectorInstanceId?: string | undefined;
|
|
148
|
+
externalResource?: string | undefined;
|
|
149
|
+
}, {
|
|
150
|
+
object?: string | undefined;
|
|
151
|
+
fields?: string[] | undefined;
|
|
152
|
+
filters?: any;
|
|
153
|
+
connectorInstanceId?: string | undefined;
|
|
154
|
+
externalResource?: string | undefined;
|
|
155
|
+
}>;
|
|
156
|
+
export type DataSourceConfig = z.infer<typeof DataSourceConfigSchema>;
|
|
157
|
+
/**
|
|
158
|
+
* Data Destination Configuration
|
|
159
|
+
*/
|
|
160
|
+
export declare const DataDestinationConfigSchema: z.ZodObject<{
|
|
161
|
+
/**
|
|
162
|
+
* Destination object name
|
|
163
|
+
* For ObjectStack objects
|
|
164
|
+
*/
|
|
165
|
+
object: z.ZodOptional<z.ZodString>;
|
|
166
|
+
/**
|
|
167
|
+
* Connector instance ID
|
|
168
|
+
* For external destinations
|
|
169
|
+
*/
|
|
170
|
+
connectorInstanceId: z.ZodOptional<z.ZodString>;
|
|
171
|
+
/**
|
|
172
|
+
* Operation to perform
|
|
173
|
+
*/
|
|
174
|
+
operation: z.ZodEnum<["insert", "update", "upsert", "delete", "sync"]>;
|
|
175
|
+
/**
|
|
176
|
+
* Field mappings
|
|
177
|
+
* Maps source fields to destination fields
|
|
178
|
+
*/
|
|
179
|
+
mapping: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodObject<{
|
|
180
|
+
/**
|
|
181
|
+
* Source field name
|
|
182
|
+
*/
|
|
183
|
+
sourceField: z.ZodString;
|
|
184
|
+
/**
|
|
185
|
+
* Destination field name
|
|
186
|
+
*/
|
|
187
|
+
destinationField: z.ZodString;
|
|
188
|
+
/**
|
|
189
|
+
* Transformation formula
|
|
190
|
+
* JavaScript expression to transform the value
|
|
191
|
+
*
|
|
192
|
+
* @example "value.toUpperCase()"
|
|
193
|
+
* @example "new Date(value).toISOString()"
|
|
194
|
+
*/
|
|
195
|
+
transform: z.ZodOptional<z.ZodString>;
|
|
196
|
+
/**
|
|
197
|
+
* Default value if source is null/undefined
|
|
198
|
+
*/
|
|
199
|
+
default: z.ZodOptional<z.ZodAny>;
|
|
200
|
+
/**
|
|
201
|
+
* Whether to sync null values
|
|
202
|
+
*/
|
|
203
|
+
syncNull: z.ZodDefault<z.ZodBoolean>;
|
|
204
|
+
}, "strip", z.ZodTypeAny, {
|
|
205
|
+
sourceField: string;
|
|
206
|
+
destinationField: string;
|
|
207
|
+
syncNull: boolean;
|
|
208
|
+
default?: any;
|
|
209
|
+
transform?: string | undefined;
|
|
210
|
+
}, {
|
|
211
|
+
sourceField: string;
|
|
212
|
+
destinationField: string;
|
|
213
|
+
default?: any;
|
|
214
|
+
transform?: string | undefined;
|
|
215
|
+
syncNull?: boolean | undefined;
|
|
216
|
+
}>, "many">]>>;
|
|
217
|
+
/**
|
|
218
|
+
* External resource identifier
|
|
219
|
+
*/
|
|
220
|
+
externalResource: z.ZodOptional<z.ZodString>;
|
|
221
|
+
/**
|
|
222
|
+
* Match key for upsert operations
|
|
223
|
+
* Fields to use for matching existing records
|
|
224
|
+
*/
|
|
225
|
+
matchKey: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
226
|
+
}, "strip", z.ZodTypeAny, {
|
|
227
|
+
operation: "insert" | "update" | "delete" | "upsert" | "sync";
|
|
228
|
+
object?: string | undefined;
|
|
229
|
+
mapping?: Record<string, string> | {
|
|
230
|
+
sourceField: string;
|
|
231
|
+
destinationField: string;
|
|
232
|
+
syncNull: boolean;
|
|
233
|
+
default?: any;
|
|
234
|
+
transform?: string | undefined;
|
|
235
|
+
}[] | undefined;
|
|
236
|
+
connectorInstanceId?: string | undefined;
|
|
237
|
+
externalResource?: string | undefined;
|
|
238
|
+
matchKey?: string[] | undefined;
|
|
239
|
+
}, {
|
|
240
|
+
operation: "insert" | "update" | "delete" | "upsert" | "sync";
|
|
241
|
+
object?: string | undefined;
|
|
242
|
+
mapping?: Record<string, string> | {
|
|
243
|
+
sourceField: string;
|
|
244
|
+
destinationField: string;
|
|
245
|
+
default?: any;
|
|
246
|
+
transform?: string | undefined;
|
|
247
|
+
syncNull?: boolean | undefined;
|
|
248
|
+
}[] | undefined;
|
|
249
|
+
connectorInstanceId?: string | undefined;
|
|
250
|
+
externalResource?: string | undefined;
|
|
251
|
+
matchKey?: string[] | undefined;
|
|
252
|
+
}>;
|
|
253
|
+
export type DataDestinationConfig = z.infer<typeof DataDestinationConfigSchema>;
|
|
254
|
+
/**
|
|
255
|
+
* Data Sync Configuration Schema
|
|
256
|
+
*
|
|
257
|
+
* Complete definition of a data synchronization between systems.
|
|
258
|
+
*/
|
|
259
|
+
export declare const DataSyncConfigSchema: z.ZodObject<{
|
|
260
|
+
/**
|
|
261
|
+
* Sync configuration name (snake_case)
|
|
262
|
+
*/
|
|
263
|
+
name: z.ZodString;
|
|
264
|
+
/**
|
|
265
|
+
* Human-readable label
|
|
266
|
+
*/
|
|
267
|
+
label: z.ZodOptional<z.ZodString>;
|
|
268
|
+
/**
|
|
269
|
+
* Description
|
|
270
|
+
*/
|
|
271
|
+
description: z.ZodOptional<z.ZodString>;
|
|
272
|
+
/**
|
|
273
|
+
* Source configuration
|
|
274
|
+
*/
|
|
275
|
+
source: z.ZodObject<{
|
|
276
|
+
/**
|
|
277
|
+
* Source object name
|
|
278
|
+
* For ObjectStack objects
|
|
279
|
+
*/
|
|
280
|
+
object: z.ZodOptional<z.ZodString>;
|
|
281
|
+
/**
|
|
282
|
+
* Filter conditions
|
|
283
|
+
* Only sync records matching these filters
|
|
284
|
+
*/
|
|
285
|
+
filters: z.ZodOptional<z.ZodAny>;
|
|
286
|
+
/**
|
|
287
|
+
* Fields to include
|
|
288
|
+
* If not specified, all fields are synced
|
|
289
|
+
*/
|
|
290
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
291
|
+
/**
|
|
292
|
+
* External connector instance ID
|
|
293
|
+
* For external data sources
|
|
294
|
+
*/
|
|
295
|
+
connectorInstanceId: z.ZodOptional<z.ZodString>;
|
|
296
|
+
/**
|
|
297
|
+
* External resource identifier
|
|
298
|
+
* e.g., Salesforce object name, database table, API endpoint
|
|
299
|
+
*/
|
|
300
|
+
externalResource: z.ZodOptional<z.ZodString>;
|
|
301
|
+
}, "strip", z.ZodTypeAny, {
|
|
302
|
+
object?: string | undefined;
|
|
303
|
+
fields?: string[] | undefined;
|
|
304
|
+
filters?: any;
|
|
305
|
+
connectorInstanceId?: string | undefined;
|
|
306
|
+
externalResource?: string | undefined;
|
|
307
|
+
}, {
|
|
308
|
+
object?: string | undefined;
|
|
309
|
+
fields?: string[] | undefined;
|
|
310
|
+
filters?: any;
|
|
311
|
+
connectorInstanceId?: string | undefined;
|
|
312
|
+
externalResource?: string | undefined;
|
|
313
|
+
}>;
|
|
314
|
+
/**
|
|
315
|
+
* Destination configuration
|
|
316
|
+
*/
|
|
317
|
+
destination: z.ZodObject<{
|
|
318
|
+
/**
|
|
319
|
+
* Destination object name
|
|
320
|
+
* For ObjectStack objects
|
|
321
|
+
*/
|
|
322
|
+
object: z.ZodOptional<z.ZodString>;
|
|
323
|
+
/**
|
|
324
|
+
* Connector instance ID
|
|
325
|
+
* For external destinations
|
|
326
|
+
*/
|
|
327
|
+
connectorInstanceId: z.ZodOptional<z.ZodString>;
|
|
328
|
+
/**
|
|
329
|
+
* Operation to perform
|
|
330
|
+
*/
|
|
331
|
+
operation: z.ZodEnum<["insert", "update", "upsert", "delete", "sync"]>;
|
|
332
|
+
/**
|
|
333
|
+
* Field mappings
|
|
334
|
+
* Maps source fields to destination fields
|
|
335
|
+
*/
|
|
336
|
+
mapping: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodObject<{
|
|
337
|
+
/**
|
|
338
|
+
* Source field name
|
|
339
|
+
*/
|
|
340
|
+
sourceField: z.ZodString;
|
|
341
|
+
/**
|
|
342
|
+
* Destination field name
|
|
343
|
+
*/
|
|
344
|
+
destinationField: z.ZodString;
|
|
345
|
+
/**
|
|
346
|
+
* Transformation formula
|
|
347
|
+
* JavaScript expression to transform the value
|
|
348
|
+
*
|
|
349
|
+
* @example "value.toUpperCase()"
|
|
350
|
+
* @example "new Date(value).toISOString()"
|
|
351
|
+
*/
|
|
352
|
+
transform: z.ZodOptional<z.ZodString>;
|
|
353
|
+
/**
|
|
354
|
+
* Default value if source is null/undefined
|
|
355
|
+
*/
|
|
356
|
+
default: z.ZodOptional<z.ZodAny>;
|
|
357
|
+
/**
|
|
358
|
+
* Whether to sync null values
|
|
359
|
+
*/
|
|
360
|
+
syncNull: z.ZodDefault<z.ZodBoolean>;
|
|
361
|
+
}, "strip", z.ZodTypeAny, {
|
|
362
|
+
sourceField: string;
|
|
363
|
+
destinationField: string;
|
|
364
|
+
syncNull: boolean;
|
|
365
|
+
default?: any;
|
|
366
|
+
transform?: string | undefined;
|
|
367
|
+
}, {
|
|
368
|
+
sourceField: string;
|
|
369
|
+
destinationField: string;
|
|
370
|
+
default?: any;
|
|
371
|
+
transform?: string | undefined;
|
|
372
|
+
syncNull?: boolean | undefined;
|
|
373
|
+
}>, "many">]>>;
|
|
374
|
+
/**
|
|
375
|
+
* External resource identifier
|
|
376
|
+
*/
|
|
377
|
+
externalResource: z.ZodOptional<z.ZodString>;
|
|
378
|
+
/**
|
|
379
|
+
* Match key for upsert operations
|
|
380
|
+
* Fields to use for matching existing records
|
|
381
|
+
*/
|
|
382
|
+
matchKey: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
383
|
+
}, "strip", z.ZodTypeAny, {
|
|
384
|
+
operation: "insert" | "update" | "delete" | "upsert" | "sync";
|
|
385
|
+
object?: string | undefined;
|
|
386
|
+
mapping?: Record<string, string> | {
|
|
387
|
+
sourceField: string;
|
|
388
|
+
destinationField: string;
|
|
389
|
+
syncNull: boolean;
|
|
390
|
+
default?: any;
|
|
391
|
+
transform?: string | undefined;
|
|
392
|
+
}[] | undefined;
|
|
393
|
+
connectorInstanceId?: string | undefined;
|
|
394
|
+
externalResource?: string | undefined;
|
|
395
|
+
matchKey?: string[] | undefined;
|
|
396
|
+
}, {
|
|
397
|
+
operation: "insert" | "update" | "delete" | "upsert" | "sync";
|
|
398
|
+
object?: string | undefined;
|
|
399
|
+
mapping?: Record<string, string> | {
|
|
400
|
+
sourceField: string;
|
|
401
|
+
destinationField: string;
|
|
402
|
+
default?: any;
|
|
403
|
+
transform?: string | undefined;
|
|
404
|
+
syncNull?: boolean | undefined;
|
|
405
|
+
}[] | undefined;
|
|
406
|
+
connectorInstanceId?: string | undefined;
|
|
407
|
+
externalResource?: string | undefined;
|
|
408
|
+
matchKey?: string[] | undefined;
|
|
409
|
+
}>;
|
|
410
|
+
/**
|
|
411
|
+
* Sync direction
|
|
412
|
+
*/
|
|
413
|
+
direction: z.ZodDefault<z.ZodEnum<["push", "pull", "bidirectional"]>>;
|
|
414
|
+
/**
|
|
415
|
+
* Sync mode
|
|
416
|
+
*/
|
|
417
|
+
syncMode: z.ZodDefault<z.ZodEnum<["full", "incremental", "realtime"]>>;
|
|
418
|
+
/**
|
|
419
|
+
* Conflict resolution strategy
|
|
420
|
+
*/
|
|
421
|
+
conflictResolution: z.ZodDefault<z.ZodEnum<["source_wins", "destination_wins", "latest_wins", "manual", "merge"]>>;
|
|
422
|
+
/**
|
|
423
|
+
* Execution schedule (cron expression)
|
|
424
|
+
* For scheduled syncs
|
|
425
|
+
*
|
|
426
|
+
* @example "0 * * * *" - Hourly
|
|
427
|
+
* @example "*\/15 * * * *" - Every 15 minutes
|
|
428
|
+
*/
|
|
429
|
+
schedule: z.ZodOptional<z.ZodString>;
|
|
430
|
+
/**
|
|
431
|
+
* Whether sync is enabled
|
|
432
|
+
*/
|
|
433
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
434
|
+
/**
|
|
435
|
+
* Change tracking field
|
|
436
|
+
* Field to track when records were last modified
|
|
437
|
+
* Used for incremental sync
|
|
438
|
+
*
|
|
439
|
+
* @example "updated_at", "modified_date"
|
|
440
|
+
*/
|
|
441
|
+
changeTrackingField: z.ZodOptional<z.ZodString>;
|
|
442
|
+
/**
|
|
443
|
+
* Batch size
|
|
444
|
+
* Number of records to process per batch
|
|
445
|
+
*/
|
|
446
|
+
batchSize: z.ZodDefault<z.ZodNumber>;
|
|
447
|
+
/**
|
|
448
|
+
* Retry configuration
|
|
449
|
+
*/
|
|
450
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
451
|
+
maxAttempts: z.ZodDefault<z.ZodNumber>;
|
|
452
|
+
backoffMs: z.ZodDefault<z.ZodNumber>;
|
|
453
|
+
}, "strip", z.ZodTypeAny, {
|
|
454
|
+
backoffMs: number;
|
|
455
|
+
maxAttempts: number;
|
|
456
|
+
}, {
|
|
457
|
+
backoffMs?: number | undefined;
|
|
458
|
+
maxAttempts?: number | undefined;
|
|
459
|
+
}>>;
|
|
460
|
+
/**
|
|
461
|
+
* Pre-sync validation rules
|
|
462
|
+
*/
|
|
463
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
464
|
+
required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
465
|
+
unique: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
466
|
+
custom: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
467
|
+
name: z.ZodString;
|
|
468
|
+
condition: z.ZodString;
|
|
469
|
+
message: z.ZodString;
|
|
470
|
+
}, "strip", z.ZodTypeAny, {
|
|
471
|
+
message: string;
|
|
472
|
+
name: string;
|
|
473
|
+
condition: string;
|
|
474
|
+
}, {
|
|
475
|
+
message: string;
|
|
476
|
+
name: string;
|
|
477
|
+
condition: string;
|
|
478
|
+
}>, "many">>;
|
|
479
|
+
}, "strip", z.ZodTypeAny, {
|
|
480
|
+
custom?: {
|
|
481
|
+
message: string;
|
|
482
|
+
name: string;
|
|
483
|
+
condition: string;
|
|
484
|
+
}[] | undefined;
|
|
485
|
+
required?: string[] | undefined;
|
|
486
|
+
unique?: string[] | undefined;
|
|
487
|
+
}, {
|
|
488
|
+
custom?: {
|
|
489
|
+
message: string;
|
|
490
|
+
name: string;
|
|
491
|
+
condition: string;
|
|
492
|
+
}[] | undefined;
|
|
493
|
+
required?: string[] | undefined;
|
|
494
|
+
unique?: string[] | undefined;
|
|
495
|
+
}>>;
|
|
496
|
+
/**
|
|
497
|
+
* Error handling configuration
|
|
498
|
+
*/
|
|
499
|
+
errorHandling: z.ZodOptional<z.ZodObject<{
|
|
500
|
+
onValidationError: z.ZodDefault<z.ZodEnum<["skip", "fail", "log"]>>;
|
|
501
|
+
onSyncError: z.ZodDefault<z.ZodEnum<["skip", "fail", "retry"]>>;
|
|
502
|
+
notifyOnError: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
503
|
+
}, "strip", z.ZodTypeAny, {
|
|
504
|
+
onValidationError: "log" | "skip" | "fail";
|
|
505
|
+
onSyncError: "retry" | "skip" | "fail";
|
|
506
|
+
notifyOnError?: string[] | undefined;
|
|
507
|
+
}, {
|
|
508
|
+
onValidationError?: "log" | "skip" | "fail" | undefined;
|
|
509
|
+
onSyncError?: "retry" | "skip" | "fail" | undefined;
|
|
510
|
+
notifyOnError?: string[] | undefined;
|
|
511
|
+
}>>;
|
|
512
|
+
/**
|
|
513
|
+
* Performance optimization
|
|
514
|
+
*/
|
|
515
|
+
optimization: z.ZodOptional<z.ZodObject<{
|
|
516
|
+
parallelBatches: z.ZodDefault<z.ZodBoolean>;
|
|
517
|
+
cacheEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
518
|
+
compressionEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
519
|
+
}, "strip", z.ZodTypeAny, {
|
|
520
|
+
parallelBatches: boolean;
|
|
521
|
+
cacheEnabled: boolean;
|
|
522
|
+
compressionEnabled: boolean;
|
|
523
|
+
}, {
|
|
524
|
+
parallelBatches?: boolean | undefined;
|
|
525
|
+
cacheEnabled?: boolean | undefined;
|
|
526
|
+
compressionEnabled?: boolean | undefined;
|
|
527
|
+
}>>;
|
|
528
|
+
/**
|
|
529
|
+
* Audit and logging
|
|
530
|
+
*/
|
|
531
|
+
audit: z.ZodOptional<z.ZodObject<{
|
|
532
|
+
logLevel: z.ZodDefault<z.ZodEnum<["none", "error", "warn", "info", "debug"]>>;
|
|
533
|
+
retainLogsForDays: z.ZodDefault<z.ZodNumber>;
|
|
534
|
+
trackChanges: z.ZodDefault<z.ZodBoolean>;
|
|
535
|
+
}, "strip", z.ZodTypeAny, {
|
|
536
|
+
logLevel: "error" | "info" | "none" | "debug" | "warn";
|
|
537
|
+
retainLogsForDays: number;
|
|
538
|
+
trackChanges: boolean;
|
|
539
|
+
}, {
|
|
540
|
+
logLevel?: "error" | "info" | "none" | "debug" | "warn" | undefined;
|
|
541
|
+
retainLogsForDays?: number | undefined;
|
|
542
|
+
trackChanges?: boolean | undefined;
|
|
543
|
+
}>>;
|
|
544
|
+
/**
|
|
545
|
+
* Tags for organization
|
|
546
|
+
*/
|
|
547
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
548
|
+
/**
|
|
549
|
+
* Custom metadata
|
|
550
|
+
*/
|
|
551
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
552
|
+
}, "strip", z.ZodTypeAny, {
|
|
553
|
+
name: string;
|
|
554
|
+
enabled: boolean;
|
|
555
|
+
source: {
|
|
556
|
+
object?: string | undefined;
|
|
557
|
+
fields?: string[] | undefined;
|
|
558
|
+
filters?: any;
|
|
559
|
+
connectorInstanceId?: string | undefined;
|
|
560
|
+
externalResource?: string | undefined;
|
|
561
|
+
};
|
|
562
|
+
batchSize: number;
|
|
563
|
+
direction: "push" | "pull" | "bidirectional";
|
|
564
|
+
destination: {
|
|
565
|
+
operation: "insert" | "update" | "delete" | "upsert" | "sync";
|
|
566
|
+
object?: string | undefined;
|
|
567
|
+
mapping?: Record<string, string> | {
|
|
568
|
+
sourceField: string;
|
|
569
|
+
destinationField: string;
|
|
570
|
+
syncNull: boolean;
|
|
571
|
+
default?: any;
|
|
572
|
+
transform?: string | undefined;
|
|
573
|
+
}[] | undefined;
|
|
574
|
+
connectorInstanceId?: string | undefined;
|
|
575
|
+
externalResource?: string | undefined;
|
|
576
|
+
matchKey?: string[] | undefined;
|
|
577
|
+
};
|
|
578
|
+
syncMode: "full" | "incremental" | "realtime";
|
|
579
|
+
conflictResolution: "merge" | "manual" | "source_wins" | "destination_wins" | "latest_wins";
|
|
580
|
+
validation?: {
|
|
581
|
+
custom?: {
|
|
582
|
+
message: string;
|
|
583
|
+
name: string;
|
|
584
|
+
condition: string;
|
|
585
|
+
}[] | undefined;
|
|
586
|
+
required?: string[] | undefined;
|
|
587
|
+
unique?: string[] | undefined;
|
|
588
|
+
} | undefined;
|
|
589
|
+
tags?: string[] | undefined;
|
|
590
|
+
label?: string | undefined;
|
|
591
|
+
description?: string | undefined;
|
|
592
|
+
metadata?: Record<string, any> | undefined;
|
|
593
|
+
schedule?: string | undefined;
|
|
594
|
+
audit?: {
|
|
595
|
+
logLevel: "error" | "info" | "none" | "debug" | "warn";
|
|
596
|
+
retainLogsForDays: number;
|
|
597
|
+
trackChanges: boolean;
|
|
598
|
+
} | undefined;
|
|
599
|
+
retry?: {
|
|
600
|
+
backoffMs: number;
|
|
601
|
+
maxAttempts: number;
|
|
602
|
+
} | undefined;
|
|
603
|
+
changeTrackingField?: string | undefined;
|
|
604
|
+
errorHandling?: {
|
|
605
|
+
onValidationError: "log" | "skip" | "fail";
|
|
606
|
+
onSyncError: "retry" | "skip" | "fail";
|
|
607
|
+
notifyOnError?: string[] | undefined;
|
|
608
|
+
} | undefined;
|
|
609
|
+
optimization?: {
|
|
610
|
+
parallelBatches: boolean;
|
|
611
|
+
cacheEnabled: boolean;
|
|
612
|
+
compressionEnabled: boolean;
|
|
613
|
+
} | undefined;
|
|
614
|
+
}, {
|
|
615
|
+
name: string;
|
|
616
|
+
source: {
|
|
617
|
+
object?: string | undefined;
|
|
618
|
+
fields?: string[] | undefined;
|
|
619
|
+
filters?: any;
|
|
620
|
+
connectorInstanceId?: string | undefined;
|
|
621
|
+
externalResource?: string | undefined;
|
|
622
|
+
};
|
|
623
|
+
destination: {
|
|
624
|
+
operation: "insert" | "update" | "delete" | "upsert" | "sync";
|
|
625
|
+
object?: string | undefined;
|
|
626
|
+
mapping?: Record<string, string> | {
|
|
627
|
+
sourceField: string;
|
|
628
|
+
destinationField: string;
|
|
629
|
+
default?: any;
|
|
630
|
+
transform?: string | undefined;
|
|
631
|
+
syncNull?: boolean | undefined;
|
|
632
|
+
}[] | undefined;
|
|
633
|
+
connectorInstanceId?: string | undefined;
|
|
634
|
+
externalResource?: string | undefined;
|
|
635
|
+
matchKey?: string[] | undefined;
|
|
636
|
+
};
|
|
637
|
+
validation?: {
|
|
638
|
+
custom?: {
|
|
639
|
+
message: string;
|
|
640
|
+
name: string;
|
|
641
|
+
condition: string;
|
|
642
|
+
}[] | undefined;
|
|
643
|
+
required?: string[] | undefined;
|
|
644
|
+
unique?: string[] | undefined;
|
|
645
|
+
} | undefined;
|
|
646
|
+
tags?: string[] | undefined;
|
|
647
|
+
label?: string | undefined;
|
|
648
|
+
description?: string | undefined;
|
|
649
|
+
enabled?: boolean | undefined;
|
|
650
|
+
metadata?: Record<string, any> | undefined;
|
|
651
|
+
schedule?: string | undefined;
|
|
652
|
+
audit?: {
|
|
653
|
+
logLevel?: "error" | "info" | "none" | "debug" | "warn" | undefined;
|
|
654
|
+
retainLogsForDays?: number | undefined;
|
|
655
|
+
trackChanges?: boolean | undefined;
|
|
656
|
+
} | undefined;
|
|
657
|
+
batchSize?: number | undefined;
|
|
658
|
+
direction?: "push" | "pull" | "bidirectional" | undefined;
|
|
659
|
+
syncMode?: "full" | "incremental" | "realtime" | undefined;
|
|
660
|
+
retry?: {
|
|
661
|
+
backoffMs?: number | undefined;
|
|
662
|
+
maxAttempts?: number | undefined;
|
|
663
|
+
} | undefined;
|
|
664
|
+
conflictResolution?: "merge" | "manual" | "source_wins" | "destination_wins" | "latest_wins" | undefined;
|
|
665
|
+
changeTrackingField?: string | undefined;
|
|
666
|
+
errorHandling?: {
|
|
667
|
+
onValidationError?: "log" | "skip" | "fail" | undefined;
|
|
668
|
+
onSyncError?: "retry" | "skip" | "fail" | undefined;
|
|
669
|
+
notifyOnError?: string[] | undefined;
|
|
670
|
+
} | undefined;
|
|
671
|
+
optimization?: {
|
|
672
|
+
parallelBatches?: boolean | undefined;
|
|
673
|
+
cacheEnabled?: boolean | undefined;
|
|
674
|
+
compressionEnabled?: boolean | undefined;
|
|
675
|
+
} | undefined;
|
|
676
|
+
}>;
|
|
677
|
+
export type DataSyncConfig = z.infer<typeof DataSyncConfigSchema>;
|
|
678
|
+
/**
|
|
679
|
+
* Sync Execution Status
|
|
680
|
+
*/
|
|
681
|
+
export declare const SyncExecutionStatusSchema: z.ZodEnum<["pending", "running", "completed", "partial", "failed", "cancelled"]>;
|
|
682
|
+
export type SyncExecutionStatus = z.infer<typeof SyncExecutionStatusSchema>;
|
|
683
|
+
/**
|
|
684
|
+
* Sync Execution Result Schema
|
|
685
|
+
*
|
|
686
|
+
* Result of a sync execution.
|
|
687
|
+
*/
|
|
688
|
+
export declare const SyncExecutionResultSchema: z.ZodObject<{
|
|
689
|
+
/**
|
|
690
|
+
* Execution ID
|
|
691
|
+
*/
|
|
692
|
+
id: z.ZodString;
|
|
693
|
+
/**
|
|
694
|
+
* Sync configuration name
|
|
695
|
+
*/
|
|
696
|
+
syncName: z.ZodString;
|
|
697
|
+
/**
|
|
698
|
+
* Execution status
|
|
699
|
+
*/
|
|
700
|
+
status: z.ZodEnum<["pending", "running", "completed", "partial", "failed", "cancelled"]>;
|
|
701
|
+
/**
|
|
702
|
+
* Start timestamp
|
|
703
|
+
*/
|
|
704
|
+
startedAt: z.ZodString;
|
|
705
|
+
/**
|
|
706
|
+
* End timestamp
|
|
707
|
+
*/
|
|
708
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
709
|
+
/**
|
|
710
|
+
* Duration in milliseconds
|
|
711
|
+
*/
|
|
712
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
713
|
+
/**
|
|
714
|
+
* Statistics
|
|
715
|
+
*/
|
|
716
|
+
stats: z.ZodOptional<z.ZodObject<{
|
|
717
|
+
recordsProcessed: z.ZodDefault<z.ZodNumber>;
|
|
718
|
+
recordsInserted: z.ZodDefault<z.ZodNumber>;
|
|
719
|
+
recordsUpdated: z.ZodDefault<z.ZodNumber>;
|
|
720
|
+
recordsDeleted: z.ZodDefault<z.ZodNumber>;
|
|
721
|
+
recordsSkipped: z.ZodDefault<z.ZodNumber>;
|
|
722
|
+
recordsErrored: z.ZodDefault<z.ZodNumber>;
|
|
723
|
+
conflictsDetected: z.ZodDefault<z.ZodNumber>;
|
|
724
|
+
conflictsResolved: z.ZodDefault<z.ZodNumber>;
|
|
725
|
+
}, "strip", z.ZodTypeAny, {
|
|
726
|
+
recordsErrored: number;
|
|
727
|
+
recordsProcessed: number;
|
|
728
|
+
recordsInserted: number;
|
|
729
|
+
recordsUpdated: number;
|
|
730
|
+
recordsDeleted: number;
|
|
731
|
+
recordsSkipped: number;
|
|
732
|
+
conflictsDetected: number;
|
|
733
|
+
conflictsResolved: number;
|
|
734
|
+
}, {
|
|
735
|
+
recordsErrored?: number | undefined;
|
|
736
|
+
recordsProcessed?: number | undefined;
|
|
737
|
+
recordsInserted?: number | undefined;
|
|
738
|
+
recordsUpdated?: number | undefined;
|
|
739
|
+
recordsDeleted?: number | undefined;
|
|
740
|
+
recordsSkipped?: number | undefined;
|
|
741
|
+
conflictsDetected?: number | undefined;
|
|
742
|
+
conflictsResolved?: number | undefined;
|
|
743
|
+
}>>;
|
|
744
|
+
/**
|
|
745
|
+
* Errors encountered
|
|
746
|
+
*/
|
|
747
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
748
|
+
recordId: z.ZodOptional<z.ZodString>;
|
|
749
|
+
field: z.ZodOptional<z.ZodString>;
|
|
750
|
+
message: z.ZodString;
|
|
751
|
+
code: z.ZodOptional<z.ZodString>;
|
|
752
|
+
}, "strip", z.ZodTypeAny, {
|
|
753
|
+
message: string;
|
|
754
|
+
code?: string | undefined;
|
|
755
|
+
field?: string | undefined;
|
|
756
|
+
recordId?: string | undefined;
|
|
757
|
+
}, {
|
|
758
|
+
message: string;
|
|
759
|
+
code?: string | undefined;
|
|
760
|
+
field?: string | undefined;
|
|
761
|
+
recordId?: string | undefined;
|
|
762
|
+
}>, "many">>;
|
|
763
|
+
/**
|
|
764
|
+
* Execution logs
|
|
765
|
+
*/
|
|
766
|
+
logs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
767
|
+
}, "strip", z.ZodTypeAny, {
|
|
768
|
+
status: "partial" | "running" | "failed" | "pending" | "completed" | "cancelled";
|
|
769
|
+
id: string;
|
|
770
|
+
startedAt: string;
|
|
771
|
+
syncName: string;
|
|
772
|
+
durationMs?: number | undefined;
|
|
773
|
+
completedAt?: string | undefined;
|
|
774
|
+
logs?: string[] | undefined;
|
|
775
|
+
errors?: {
|
|
776
|
+
message: string;
|
|
777
|
+
code?: string | undefined;
|
|
778
|
+
field?: string | undefined;
|
|
779
|
+
recordId?: string | undefined;
|
|
780
|
+
}[] | undefined;
|
|
781
|
+
stats?: {
|
|
782
|
+
recordsErrored: number;
|
|
783
|
+
recordsProcessed: number;
|
|
784
|
+
recordsInserted: number;
|
|
785
|
+
recordsUpdated: number;
|
|
786
|
+
recordsDeleted: number;
|
|
787
|
+
recordsSkipped: number;
|
|
788
|
+
conflictsDetected: number;
|
|
789
|
+
conflictsResolved: number;
|
|
790
|
+
} | undefined;
|
|
791
|
+
}, {
|
|
792
|
+
status: "partial" | "running" | "failed" | "pending" | "completed" | "cancelled";
|
|
793
|
+
id: string;
|
|
794
|
+
startedAt: string;
|
|
795
|
+
syncName: string;
|
|
796
|
+
durationMs?: number | undefined;
|
|
797
|
+
completedAt?: string | undefined;
|
|
798
|
+
logs?: string[] | undefined;
|
|
799
|
+
errors?: {
|
|
800
|
+
message: string;
|
|
801
|
+
code?: string | undefined;
|
|
802
|
+
field?: string | undefined;
|
|
803
|
+
recordId?: string | undefined;
|
|
804
|
+
}[] | undefined;
|
|
805
|
+
stats?: {
|
|
806
|
+
recordsErrored?: number | undefined;
|
|
807
|
+
recordsProcessed?: number | undefined;
|
|
808
|
+
recordsInserted?: number | undefined;
|
|
809
|
+
recordsUpdated?: number | undefined;
|
|
810
|
+
recordsDeleted?: number | undefined;
|
|
811
|
+
recordsSkipped?: number | undefined;
|
|
812
|
+
conflictsDetected?: number | undefined;
|
|
813
|
+
conflictsResolved?: number | undefined;
|
|
814
|
+
} | undefined;
|
|
815
|
+
}>;
|
|
816
|
+
export type SyncExecutionResult = z.infer<typeof SyncExecutionResultSchema>;
|
|
817
|
+
/**
|
|
818
|
+
* Helper factory for creating sync configurations
|
|
819
|
+
*/
|
|
820
|
+
export declare const Sync: {
|
|
821
|
+
/**
|
|
822
|
+
* Create a simple object-to-object sync
|
|
823
|
+
*/
|
|
824
|
+
readonly objectSync: (params: {
|
|
825
|
+
name: string;
|
|
826
|
+
sourceObject: string;
|
|
827
|
+
destObject: string;
|
|
828
|
+
mapping: Record<string, string>;
|
|
829
|
+
schedule?: string;
|
|
830
|
+
}) => DataSyncConfig;
|
|
831
|
+
/**
|
|
832
|
+
* Create a connector sync
|
|
833
|
+
*/
|
|
834
|
+
readonly connectorSync: (params: {
|
|
835
|
+
name: string;
|
|
836
|
+
sourceObject: string;
|
|
837
|
+
connectorInstanceId: string;
|
|
838
|
+
externalResource: string;
|
|
839
|
+
mapping: Record<string, string>;
|
|
840
|
+
schedule?: string;
|
|
841
|
+
}) => DataSyncConfig;
|
|
842
|
+
/**
|
|
843
|
+
* Create a bidirectional sync
|
|
844
|
+
*/
|
|
845
|
+
readonly bidirectionalSync: (params: {
|
|
846
|
+
name: string;
|
|
847
|
+
object: string;
|
|
848
|
+
connectorInstanceId: string;
|
|
849
|
+
externalResource: string;
|
|
850
|
+
mapping: Record<string, string>;
|
|
851
|
+
schedule?: string;
|
|
852
|
+
}) => DataSyncConfig;
|
|
853
|
+
};
|
|
854
|
+
//# sourceMappingURL=sync.zod.d.ts.map
|