@etohq/connector-engine 1.5.1-alpha.4

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.
Files changed (77) hide show
  1. package/.turbo/turbo-build.log +4 -0
  2. package/CHANGELOG.md +1 -0
  3. package/LICENSE +21 -0
  4. package/README.md +253 -0
  5. package/dist/engine/clean-connector-engine.d.ts +81 -0
  6. package/dist/engine/clean-connector-engine.d.ts.map +1 -0
  7. package/dist/engine/clean-connector-engine.js +350 -0
  8. package/dist/engine/clean-connector-engine.js.map +1 -0
  9. package/dist/engine/connector-engine-impl.d.ts +73 -0
  10. package/dist/engine/connector-engine-impl.d.ts.map +1 -0
  11. package/dist/engine/connector-engine-impl.js +332 -0
  12. package/dist/engine/connector-engine-impl.js.map +1 -0
  13. package/dist/engine/connector-engine.d.ts +54 -0
  14. package/dist/engine/connector-engine.d.ts.map +1 -0
  15. package/dist/engine/connector-engine.js +694 -0
  16. package/dist/engine/connector-engine.js.map +1 -0
  17. package/dist/engine/index.d.ts +7 -0
  18. package/dist/engine/index.d.ts.map +1 -0
  19. package/dist/engine/index.js +10 -0
  20. package/dist/engine/index.js.map +1 -0
  21. package/dist/engine/routing-engine.d.ts +26 -0
  22. package/dist/engine/routing-engine.d.ts.map +1 -0
  23. package/dist/engine/routing-engine.js +329 -0
  24. package/dist/engine/routing-engine.js.map +1 -0
  25. package/dist/examples/booking-connector-example.d.ts +7 -0
  26. package/dist/examples/booking-connector-example.d.ts.map +1 -0
  27. package/dist/examples/booking-connector-example.js +221 -0
  28. package/dist/examples/booking-connector-example.js.map +1 -0
  29. package/dist/examples/dynamic-methods-example.d.ts +7 -0
  30. package/dist/examples/dynamic-methods-example.d.ts.map +1 -0
  31. package/dist/examples/dynamic-methods-example.js +163 -0
  32. package/dist/examples/dynamic-methods-example.js.map +1 -0
  33. package/dist/index.d.ts +9 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +14 -0
  36. package/dist/index.js.map +1 -0
  37. package/dist/types/base-plugin.d.ts +170 -0
  38. package/dist/types/base-plugin.d.ts.map +1 -0
  39. package/dist/types/base-plugin.js +68 -0
  40. package/dist/types/base-plugin.js.map +1 -0
  41. package/dist/types/connector-plugin.d.ts +22 -0
  42. package/dist/types/connector-plugin.d.ts.map +1 -0
  43. package/dist/types/connector-plugin.js +11 -0
  44. package/dist/types/connector-plugin.js.map +1 -0
  45. package/dist/types/engine.d.ts +223 -0
  46. package/dist/types/engine.d.ts.map +1 -0
  47. package/dist/types/engine.js +7 -0
  48. package/dist/types/engine.js.map +1 -0
  49. package/dist/types/index.d.ts +5 -0
  50. package/dist/types/index.d.ts.map +1 -0
  51. package/dist/types/index.js +9 -0
  52. package/dist/types/index.js.map +1 -0
  53. package/dist/types/operation-groups.d.ts +78 -0
  54. package/dist/types/operation-groups.d.ts.map +1 -0
  55. package/dist/types/operation-groups.js +60 -0
  56. package/dist/types/operation-groups.js.map +1 -0
  57. package/dist/types/routing-config.d.ts +116 -0
  58. package/dist/types/routing-config.d.ts.map +1 -0
  59. package/dist/types/routing-config.js +6 -0
  60. package/dist/types/routing-config.js.map +1 -0
  61. package/dist/utils/create-connector-engine.d.ts +31 -0
  62. package/dist/utils/create-connector-engine.d.ts.map +1 -0
  63. package/dist/utils/create-connector-engine.js +30 -0
  64. package/dist/utils/create-connector-engine.js.map +1 -0
  65. package/examples/booking-example.ts +168 -0
  66. package/examples/booking-test.ts +231 -0
  67. package/hyperswitch-example.ts +263 -0
  68. package/jest.config.js +2 -0
  69. package/package.json +54 -0
  70. package/src/engine/clean-connector-engine.ts +726 -0
  71. package/src/engine/index.ts +13 -0
  72. package/src/engine/routing-engine.ts +394 -0
  73. package/src/index.ts +32 -0
  74. package/src/types/connector-plugin.ts +34 -0
  75. package/src/types/index.ts +5 -0
  76. package/src/types/routing-config.ts +196 -0
  77. package/tsconfig.json +3 -0
@@ -0,0 +1,4 @@
1
+
2
+ > @etohq/connector-engine@0.0.1 build /Users/solarsoft0/workspace/obigtech/shopabox/shopabox-platform-api/eto/packages/core/connector-engine
3
+ > tsc
4
+
package/CHANGELOG.md ADDED
@@ -0,0 +1 @@
1
+ # @etohq/connector-engine
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Etohq
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,253 @@
1
+ # ETO Framework Connector Engine
2
+
3
+ A universal, type-safe connector engine with operation groups for orchestrating cross-domain operations.
4
+
5
+ ## 🎯 Overview
6
+
7
+ The ETO Connector Engine enables you to:
8
+ - **Orchestrate operations** across multiple domains (meetings, logistics, commerce)
9
+ - **Maintain full type safety** with compile-time validation
10
+ - **Configure flexible behaviors** (execute all, route by domain, first success)
11
+ - **Compose workflows** seamlessly with ETO framework
12
+ - **Support union return types** (steps or promises) from plugins
13
+
14
+ ## 🏗️ Architecture
15
+
16
+ ### Two-Parameter Configuration
17
+ ```typescript
18
+ const engine = ConnectorEngine(connectorTypes, operationGroups);
19
+ ```
20
+
21
+ 1. **Connector Types**: Define domain operations with input/output types
22
+ 2. **Operation Groups**: Define orchestration behavior across domains
23
+
24
+ ### Auto-Generated Methods
25
+ The engine generates type-safe methods like:
26
+ - `executeResourceCheckAvailability()` - Route by domain
27
+ - `executeInternalCheckAvailability()` - Execute all domains
28
+ - `executeExternalReserveResource()` - First success behavior
29
+
30
+ ## 🚀 Quick Start
31
+
32
+ ### 1. Define Connector Types
33
+ ```typescript
34
+ const connectorTypes = {
35
+ meetings: {
36
+ checkAvailability: {
37
+ input: { resourceType: string; timeSlot: { start: Date; end: Date } },
38
+ output: { available: boolean; conflicts: any[] }
39
+ }
40
+ },
41
+ logistics: {
42
+ checkAvailability: {
43
+ input: { vehicleType: string; timeSlot: { start: Date; end: Date } },
44
+ output: { available: boolean; vehicles: any[] }
45
+ }
46
+ }
47
+ } as const;
48
+ ```
49
+
50
+ ### 2. Define Operation Groups
51
+ ```typescript
52
+ const operationGroups = {
53
+ resource: {
54
+ domains: ['meetings', 'logistics'],
55
+ operations: ['checkAvailability'],
56
+ options: { behavior: 'route_by_domain' }
57
+ }
58
+ } as const;
59
+ ```
60
+
61
+ ### 3. Create Engine
62
+ ```typescript
63
+ const engine = ConnectorEngine(connectorTypes, operationGroups);
64
+ ```
65
+
66
+ ### 4. Use Type-Safe Methods
67
+ ```typescript
68
+ // ✅ Domain optional - uses operation group default
69
+ const result = await engine.executeResourceCheckAvailability({
70
+ // No domain needed - operation group routes to default domain
71
+ resourceType: 'conference_room',
72
+ timeSlot: { start: new Date(), end: new Date() }
73
+ });
74
+
75
+ // ✅ Domain override when needed
76
+ const specificResult = await engine.executeResourceCheckAvailability({
77
+ domain: 'logistics', // Optional override - takes precedence
78
+ resourceType: 'delivery_truck',
79
+ timeSlot: { start: new Date(), end: new Date() }
80
+ });
81
+ ```
82
+
83
+ ## 📋 Operation Group Behaviors
84
+
85
+ ### `route_by_domain`
86
+ Routes to specific domain. Domain is optional - uses group default or input override:
87
+ ```typescript
88
+ {
89
+ behavior: 'route_by_domain',
90
+ connectorId?: 'specific-connector'
91
+ }
92
+
93
+ // Usage:
94
+ await engine.executeResourceCheckAvailability({
95
+ // domain optional - uses group's first domain
96
+ resourceType: 'room'
97
+ });
98
+
99
+ await engine.executeResourceCheckAvailability({
100
+ domain: 'meetings', // Optional override
101
+ resourceType: 'room'
102
+ });
103
+ ```
104
+
105
+ ### `execute_all`
106
+ Executes all domains in parallel. No domain parameter needed:
107
+ ```typescript
108
+ {
109
+ behavior: 'execute_all',
110
+ timeout: 30000,
111
+ retries: 2
112
+ }
113
+
114
+ // Usage:
115
+ await engine.executeInternalCheckAvailability({
116
+ // No domain field - executes all group domains
117
+ resourceType: 'any_resource'
118
+ });
119
+ ```
120
+
121
+ ### `first_success`
122
+ Executes domains until first success. No domain parameter needed:
123
+ ```typescript
124
+ {
125
+ behavior: 'first_success',
126
+ priority: 1
127
+ }
128
+
129
+ // Usage:
130
+ await engine.executeExternalReserveResource({
131
+ // No domain field - tries domains until success
132
+ resourceType: 'resource'
133
+ });
134
+ ```
135
+
136
+ ## 🔧 Plugin Development
137
+
138
+ ### Simple Plugin (Returns Promise)
139
+ ```typescript
140
+ class SimplePlugin extends BaseConnectorPlugin {
141
+ async checkAvailability(config, input, { container }) {
142
+ const service = container.resolve(Modules.BOOKING);
143
+ return await service.findAvailability(input);
144
+ }
145
+ }
146
+ ```
147
+
148
+ ### Advanced Plugin (Returns Step)
149
+ ```typescript
150
+ class AdvancedPlugin extends BaseConnectorPlugin {
151
+ checkAvailability(config, input, { container }) {
152
+ return createStep("advanced-check", async (stepInput, { container }) => {
153
+ // Complex logic with compensation
154
+ const result = await this.complexCheck(stepInput, container);
155
+ return new StepResponse(result);
156
+ });
157
+ }
158
+ }
159
+ ```
160
+
161
+ ## 📊 Type Safety Features
162
+
163
+ ### Input Type Inference
164
+ - **route_by_domain**: Union of domain inputs + domain field
165
+ - **execute_all**: Intersection of all domain inputs
166
+
167
+ ### Output Type Inference
168
+ - **route_by_domain**: Single domain output
169
+ - **execute_all**: OperationGroupResult with all domain results
170
+
171
+ ### Compile-Time Validation
172
+ - Domain names are type-checked
173
+ - Operation names are validated
174
+ - Input/output types are enforced
175
+
176
+ ## 🎨 Advanced Examples
177
+
178
+ See `/examples/booking-example.ts` for comprehensive usage examples including:
179
+ - Multi-domain resource allocation
180
+ - Cross-domain notifications
181
+ - Priority-based execution
182
+ - Error handling and retries
183
+
184
+ ## 🧪 Testing
185
+
186
+ Run the test suite:
187
+ ```bash
188
+ npm test
189
+ # or
190
+ node examples/booking-test.ts
191
+ ```
192
+
193
+ ## 📚 API Reference
194
+
195
+ ### ConnectorEngine Factory
196
+ ```typescript
197
+ function ConnectorEngine<TConnectorTypes, TOperationGroups>(
198
+ connectorTypes: TConnectorTypes,
199
+ operationGroups?: TOperationGroups
200
+ ): ConnectorEngineImpl
201
+ ```
202
+
203
+ ### Operation Group Configuration
204
+ ```typescript
205
+ interface OperationGroupsConfig {
206
+ [groupName: string]: {
207
+ domains: string[];
208
+ operations: string[];
209
+ options: {
210
+ behavior: 'execute_all' | 'route_by_domain' | 'first_success';
211
+ connectorId?: string;
212
+ priority?: number;
213
+ timeout?: number;
214
+ retries?: number;
215
+ };
216
+ };
217
+ }
218
+ ```
219
+
220
+ ## 🔗 Integration with ETO Framework
221
+
222
+ The connector engine seamlessly integrates with ETO workflows:
223
+
224
+ ```typescript
225
+ const workflow = createWorkflow("booking", async (input) => {
226
+ const availability = await engine.executeResourceCheckAvailability({
227
+ domain: 'meetings',
228
+ resourceType: input.resourceType,
229
+ timeSlot: input.timeSlot
230
+ }).runAsStep({ input });
231
+
232
+ return new WorkflowResponse(availability);
233
+ });
234
+ ```
235
+
236
+ ## 🎯 Use Cases
237
+
238
+ - **Resource Booking Systems**: Meetings, rooms, equipment
239
+ - **Logistics Management**: Vehicle scheduling, route optimization
240
+ - **E-commerce Operations**: Inventory, fulfillment, payments
241
+ - **Multi-tenant Applications**: Domain-specific operations
242
+ - **Microservices Orchestration**: Cross-service coordination
243
+
244
+ ## 🤝 Contributing
245
+
246
+ 1. Follow ETO framework patterns
247
+ 2. Maintain full type safety
248
+ 3. Add comprehensive tests
249
+ 4. Update documentation
250
+
251
+ ## 📄 License
252
+
253
+ Part of the ETO Framework ecosystem.
@@ -0,0 +1,81 @@
1
+ /**
2
+ * @fileoverview Clean Connector Engine - First Principles Implementation
3
+ */
4
+ import { ConnectorPlugin } from "../types/connector-plugin";
5
+ import { RoutingConfig, RoutingContext } from "../types/routing-config";
6
+ import { ReturnWorkflow } from "@etohq/framework/workflows-sdk";
7
+ export interface CleanConnectorRegistry {
8
+ [connectorId: string]: ConnectorPlugin;
9
+ }
10
+ export interface CleanOperationGroup {
11
+ connectors: string[];
12
+ operations: string[];
13
+ options: {
14
+ behavior: "execute_all" | "first_success" | "route_by_domain";
15
+ timeout?: number;
16
+ retries?: number;
17
+ };
18
+ }
19
+ export interface CleanOperationGroups {
20
+ [groupName: string]: CleanOperationGroup;
21
+ }
22
+ export interface CleanEngineConfig {
23
+ configLoader: (connectorId: string) => Promise<any>;
24
+ routingConfigLoader?: (groupId: string) => Promise<RoutingConfig>;
25
+ }
26
+ export interface CleanGroupResult<T> {
27
+ groupName: string;
28
+ executedConnectors: string[];
29
+ results: Record<string, T>;
30
+ metadata: {
31
+ behavior: string;
32
+ executionTime: number;
33
+ errors?: Record<string, Error>;
34
+ routingDecision: any;
35
+ algorithm: any;
36
+ ruleApplied: string | undefined;
37
+ };
38
+ }
39
+ type AutoGroupMethods<TConnectors extends CleanConnectorRegistry> = {
40
+ [K in keyof TConnectors]: TConnectors[K] extends {
41
+ getName(): infer Domain;
42
+ } ? {
43
+ [Operation in keyof TConnectors[K]["operations"] as `execute${Capitalize<Domain & string>}${Capitalize<Operation & string>}`]: (input: TConnectors[K]["operations"][Operation] extends (input: infer I, config: any) => any ? I : never, context?: RoutingContext) => ReturnWorkflow<TConnectors[K]["operations"][Operation] extends (input: infer I, config: any) => any ? I : never, CleanGroupResult<TConnectors[K]["operations"][Operation] extends (input: any, config: any) => Promise<infer O> ? O : never>, [
44
+ ]>;
45
+ } : {};
46
+ }[keyof TConnectors];
47
+ type GroupMethods<TGroups extends CleanOperationGroups> = {
48
+ [GroupName in keyof TGroups]: {
49
+ [Operation in TGroups[GroupName]["operations"][number] as `execute${Capitalize<GroupName & string>}${Capitalize<Operation & string>}`]: (input: any, context?: RoutingContext) => ReturnWorkflow<any, CleanGroupResult<any>, []>;
50
+ };
51
+ }[keyof TGroups];
52
+ type ConnectorMethods<TConnectors extends CleanConnectorRegistry> = {
53
+ [ConnectorId in keyof TConnectors]: {
54
+ [Operation in keyof TConnectors[ConnectorId]["operations"] as `execute${Capitalize<ConnectorId & string>}${Capitalize<Operation & string>}`]: (input: TConnectors[ConnectorId]["operations"][Operation] extends (input: infer I, config: any) => any ? I : never) => ReturnWorkflow<TConnectors[ConnectorId]["operations"][Operation] extends (input: infer I, config: any) => any ? I : never, TConnectors[ConnectorId]["operations"][Operation] extends (input: any, config: any) => Promise<infer O> ? O : never, [
55
+ ]>;
56
+ };
57
+ }[keyof TConnectors];
58
+ declare class ConnectorEngineImpl<TConnectors extends CleanConnectorRegistry, TGroups extends CleanOperationGroups> {
59
+ private connectors;
60
+ private groups;
61
+ private configLoader;
62
+ private routingConfigLoader?;
63
+ private routingEngine;
64
+ constructor(connectors: TConnectors, groups: TGroups, config: CleanEngineConfig);
65
+ private generateDynamicMethods;
66
+ private generateConnectorMethods;
67
+ private generateGroupMethods;
68
+ private generateAutoGroups;
69
+ private createAutoGroupWorkflow;
70
+ private capitalize;
71
+ private createConnectorWorkflow;
72
+ private createSmartGroupWorkflow;
73
+ private extractRoutingContext;
74
+ private extractCustomFields;
75
+ private tryFallbackConnectors;
76
+ execute<ConnectorId extends keyof TConnectors, Operation extends keyof TConnectors[ConnectorId]["operations"]>(connectorId: ConnectorId, operation: Operation, input: any): Promise<any>;
77
+ executeGroup<GroupName extends keyof TGroups>(groupName: GroupName, operation: string, input: any): Promise<CleanGroupResult<any>>;
78
+ }
79
+ export declare function ConnectorEngine<TConnectors extends CleanConnectorRegistry, TGroups extends CleanOperationGroups = {}>(connectors: TConnectors, groups?: TGroups, config?: CleanEngineConfig): ConnectorEngineImpl<TConnectors, TGroups> & ConnectorMethods<TConnectors> & AutoGroupMethods<TConnectors> & GroupMethods<TGroups>;
80
+ export type { CleanConnectorRegistry as ConnectorRegistry, CleanOperationGroup as OperationGroup, CleanOperationGroups as OperationGroups, CleanEngineConfig as EngineConfig, CleanGroupResult as GroupResult, };
81
+ //# sourceMappingURL=clean-connector-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clean-connector-engine.d.ts","sourceRoot":"","sources":["../../src/engine/clean-connector-engine.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAEvE,OAAO,EAKL,cAAc,EAEf,MAAM,gCAAgC,CAAA;AAIvC,MAAM,WAAW,sBAAsB;IACrC,CAAC,WAAW,EAAE,MAAM,GAAG,eAAe,CAAA;CACvC;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,OAAO,EAAE;QACP,QAAQ,EAAE,aAAa,GAAG,eAAe,GAAG,iBAAiB,CAAA;QAC7D,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,CAAA;CACzC;AAED,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACnD,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