@genfeedai/types 0.2.1 → 0.3.0

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 (51) hide show
  1. package/README.md +11 -27
  2. package/dist/{chunk-KXAKQO3U.js → chunk-74STGUJY.js} +2 -0
  3. package/dist/chunk-74STGUJY.js.map +1 -0
  4. package/dist/{chunk-WT2F5CAF.mjs → chunk-CVFAILC4.mjs} +2 -0
  5. package/dist/chunk-CVFAILC4.mjs.map +1 -0
  6. package/dist/chunk-DVR3GE4F.js +4 -0
  7. package/dist/chunk-DVR3GE4F.js.map +1 -0
  8. package/dist/chunk-G2BD5ZTF.mjs +3 -0
  9. package/dist/chunk-G2BD5ZTF.mjs.map +1 -0
  10. package/dist/{chunk-P4XY3T5T.js → chunk-MRTGK3CK.js} +601 -578
  11. package/dist/chunk-MRTGK3CK.js.map +1 -0
  12. package/dist/{chunk-QNWQE2LJ.mjs → chunk-ZMENGANG.mjs} +601 -578
  13. package/dist/chunk-ZMENGANG.mjs.map +1 -0
  14. package/dist/comfyui.d.mts +44 -44
  15. package/dist/comfyui.d.ts +44 -44
  16. package/dist/comfyui.js +3 -1
  17. package/dist/comfyui.js.map +1 -0
  18. package/dist/comfyui.mjs +3 -1
  19. package/dist/comfyui.mjs.map +1 -0
  20. package/dist/index.d.mts +341 -3
  21. package/dist/index.d.ts +341 -3
  22. package/dist/index.js +28 -26
  23. package/dist/index.js.map +1 -0
  24. package/dist/index.mjs +11 -9
  25. package/dist/index.mjs.map +1 -0
  26. package/dist/nodes.d.mts +2 -2
  27. package/dist/nodes.d.ts +2 -2
  28. package/dist/nodes.js +15 -13
  29. package/dist/nodes.js.map +1 -0
  30. package/dist/nodes.mjs +3 -1
  31. package/dist/nodes.mjs.map +1 -0
  32. package/dist/replicate.d.mts +3 -3
  33. package/dist/replicate.d.ts +3 -3
  34. package/dist/replicate.js +2 -0
  35. package/dist/replicate.js.map +1 -0
  36. package/dist/replicate.mjs +2 -0
  37. package/dist/replicate.mjs.map +1 -0
  38. package/dist/{union-BVaWc1Cx.d.mts → union-D5EesBEB.d.mts} +142 -142
  39. package/dist/{union-BVaWc1Cx.d.ts → union-D5EesBEB.d.ts} +142 -142
  40. package/dist/{workflow-B_Q38s-U.d.ts → workflow-Cd_F9hZk.d.ts} +1 -1
  41. package/dist/{workflow-BbAp7VSK.d.mts → workflow-D9M1Yoiy.d.mts} +1 -1
  42. package/dist/workflow.d.mts +2 -2
  43. package/dist/workflow.d.ts +2 -2
  44. package/dist/workflow.js +4 -2
  45. package/dist/workflow.js.map +1 -0
  46. package/dist/workflow.mjs +3 -1
  47. package/dist/workflow.mjs.map +1 -0
  48. package/package.json +37 -37
  49. package/src/replicate/schemas.json +3624 -4185
  50. package/dist/chunk-7NJUD2WZ.mjs +0 -1
  51. package/dist/chunk-RNGYPX4W.js +0 -2
package/README.md CHANGED
@@ -1,45 +1,29 @@
1
1
  # @genfeedai/types
2
2
 
3
- Type definitions for the Genfeed workflow engine.
3
+ Type definitions for the Genfeed workflow engine and node ecosystem.
4
4
 
5
- ## Installation
5
+ ## Install
6
6
 
7
7
  ```bash
8
- npm install @genfeedai/types
9
- # or
10
- bun add @genfeedai/types
8
+ npm i @genfeedai/types
11
9
  ```
12
10
 
13
11
  ## Usage
14
12
 
15
- ```typescript
13
+ ```ts
16
14
  import type { WorkflowFile, WorkflowNode, WorkflowEdge } from '@genfeedai/types';
17
- import type { NodeType, HandleType } from '@genfeedai/types';
15
+ import type { ImageNodeData } from '@genfeedai/types/nodes';
16
+ import replicateSchemas from '@genfeedai/types/replicate/schemas.json';
18
17
  ```
19
18
 
20
- ### Subpath Exports
19
+ ## Related Packages
21
20
 
22
- ```typescript
23
- // Node type definitions
24
- import type { ImageNodeData, VideoNodeData } from '@genfeedai/types/nodes';
21
+ - `@genfeedai/core`
22
+ - `@genfeedai/workflow-ui`
25
23
 
26
- // Workflow file schema
27
- import type { WorkflowFile } from '@genfeedai/types/workflow';
24
+ ## Build Faster with Genfeed
28
25
 
29
- // ComfyUI integration types
30
- import type { ComfyUIWorkflow } from '@genfeedai/types/comfyui';
31
-
32
- // Replicate model schemas
33
- import type { ReplicateModel } from '@genfeedai/types/replicate';
34
- ```
35
-
36
- ## Key Exports
37
-
38
- - **Workflow types**: `WorkflowFile`, `WorkflowNode`, `WorkflowEdge`, `NodeGroup`
39
- - **Node types**: Data interfaces for all 36 node types (image, video, audio, text)
40
- - **Enums**: `NodeCategory`, `HandleType`, `EdgeStyle`
41
- - **ComfyUI types**: ComfyUI workflow and prompt schemas
42
- - **Replicate types**: Replicate model input/output schemas
26
+ Use strongly typed workflow contracts in your own apps, or use Genfeed at [https://genfeed.ai](https://genfeed.ai).
43
27
 
44
28
  ## License
45
29
 
@@ -9,3 +9,5 @@ var EdgeStyleEnum = /* @__PURE__ */ ((EdgeStyleEnum2) => {
9
9
  })(EdgeStyleEnum || {});
10
10
 
11
11
  exports.EdgeStyleEnum = EdgeStyleEnum;
12
+ //# sourceMappingURL=chunk-74STGUJY.js.map
13
+ //# sourceMappingURL=chunk-74STGUJY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/workflow.ts"],"names":["EdgeStyleEnum"],"mappings":";;;AAGO,IAAK,aAAA,qBAAAA,cAAAA,KAAL;AACL,EAAAA,eAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,eAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,eAAA,UAAA,CAAA,GAAW,UAAA;AAHD,EAAA,OAAAA,cAAAA;AAAA,CAAA,EAAA,aAAA,IAAA,EAAA","file":"chunk-74STGUJY.js","sourcesContent":["import type { NodeGroup } from './groups';\nimport type { NodeType, WorkflowEdge, WorkflowNode } from './nodes';\n\nexport enum EdgeStyleEnum {\n DEFAULT = 'default',\n SMOOTHSTEP = 'smoothstep',\n STRAIGHT = 'straight',\n}\n\nexport type EdgeStyle = `${EdgeStyleEnum}`;\n\nexport interface WorkflowFile {\n version: number;\n name: string;\n description: string;\n nodes: WorkflowNode[];\n edges: WorkflowEdge[];\n edgeStyle: EdgeStyle;\n groups?: NodeGroup[];\n createdAt?: string;\n updatedAt?: string;\n metadata?: {\n exportedAt?: string;\n exportedFrom?: string;\n originalId?: string;\n };\n}\n\n/**\n * Template node with loose typing for data - used in template definitions\n * where we don't need strict type checking on node data\n */\nexport interface TemplateNode {\n id: string;\n type: NodeType;\n position: { x: number; y: number };\n data: Record<string, unknown>;\n}\n\n/**\n * Template edge - same as WorkflowEdge but defined separately for clarity\n */\nexport interface TemplateEdge {\n id: string;\n source: string;\n target: string;\n sourceHandle?: string;\n targetHandle?: string;\n}\n\n/**\n * Workflow template definition - uses loose typing for node data\n * to allow easy template creation without strict type constraints\n */\nexport interface WorkflowTemplate {\n version: number;\n name: string;\n description: string;\n nodes: TemplateNode[];\n edges: TemplateEdge[];\n edgeStyle?: EdgeStyle;\n groups?: NodeGroup[];\n createdAt?: string;\n updatedAt?: string;\n}\n\nexport interface ValidationError {\n nodeId: string;\n message: string;\n severity: 'error' | 'warning';\n}\n\nexport interface ValidationResult {\n isValid: boolean;\n errors: ValidationError[];\n warnings: ValidationError[];\n}\n\nexport interface ExecutionResult {\n success: boolean;\n outputs: Map<string, unknown>;\n errors: Map<string, string>;\n duration: number;\n}\n"]}
@@ -7,3 +7,5 @@ var EdgeStyleEnum = /* @__PURE__ */ ((EdgeStyleEnum2) => {
7
7
  })(EdgeStyleEnum || {});
8
8
 
9
9
  export { EdgeStyleEnum };
10
+ //# sourceMappingURL=chunk-CVFAILC4.mjs.map
11
+ //# sourceMappingURL=chunk-CVFAILC4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/workflow.ts"],"names":["EdgeStyleEnum"],"mappings":";AAGO,IAAK,aAAA,qBAAAA,cAAAA,KAAL;AACL,EAAAA,eAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,eAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,eAAA,UAAA,CAAA,GAAW,UAAA;AAHD,EAAA,OAAAA,cAAAA;AAAA,CAAA,EAAA,aAAA,IAAA,EAAA","file":"chunk-CVFAILC4.mjs","sourcesContent":["import type { NodeGroup } from './groups';\nimport type { NodeType, WorkflowEdge, WorkflowNode } from './nodes';\n\nexport enum EdgeStyleEnum {\n DEFAULT = 'default',\n SMOOTHSTEP = 'smoothstep',\n STRAIGHT = 'straight',\n}\n\nexport type EdgeStyle = `${EdgeStyleEnum}`;\n\nexport interface WorkflowFile {\n version: number;\n name: string;\n description: string;\n nodes: WorkflowNode[];\n edges: WorkflowEdge[];\n edgeStyle: EdgeStyle;\n groups?: NodeGroup[];\n createdAt?: string;\n updatedAt?: string;\n metadata?: {\n exportedAt?: string;\n exportedFrom?: string;\n originalId?: string;\n };\n}\n\n/**\n * Template node with loose typing for data - used in template definitions\n * where we don't need strict type checking on node data\n */\nexport interface TemplateNode {\n id: string;\n type: NodeType;\n position: { x: number; y: number };\n data: Record<string, unknown>;\n}\n\n/**\n * Template edge - same as WorkflowEdge but defined separately for clarity\n */\nexport interface TemplateEdge {\n id: string;\n source: string;\n target: string;\n sourceHandle?: string;\n targetHandle?: string;\n}\n\n/**\n * Workflow template definition - uses loose typing for node data\n * to allow easy template creation without strict type constraints\n */\nexport interface WorkflowTemplate {\n version: number;\n name: string;\n description: string;\n nodes: TemplateNode[];\n edges: TemplateEdge[];\n edgeStyle?: EdgeStyle;\n groups?: NodeGroup[];\n createdAt?: string;\n updatedAt?: string;\n}\n\nexport interface ValidationError {\n nodeId: string;\n message: string;\n severity: 'error' | 'warning';\n}\n\nexport interface ValidationResult {\n isValid: boolean;\n errors: ValidationError[];\n warnings: ValidationError[];\n}\n\nexport interface ExecutionResult {\n success: boolean;\n outputs: Map<string, unknown>;\n errors: Map<string, string>;\n duration: number;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=chunk-DVR3GE4F.js.map
4
+ //# sourceMappingURL=chunk-DVR3GE4F.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-DVR3GE4F.js"}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=chunk-G2BD5ZTF.mjs.map
3
+ //# sourceMappingURL=chunk-G2BD5ZTF.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-G2BD5ZTF.mjs"}