@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.
- package/README.md +11 -27
- package/dist/{chunk-KXAKQO3U.js → chunk-74STGUJY.js} +2 -0
- package/dist/chunk-74STGUJY.js.map +1 -0
- package/dist/{chunk-WT2F5CAF.mjs → chunk-CVFAILC4.mjs} +2 -0
- package/dist/chunk-CVFAILC4.mjs.map +1 -0
- package/dist/chunk-DVR3GE4F.js +4 -0
- package/dist/chunk-DVR3GE4F.js.map +1 -0
- package/dist/chunk-G2BD5ZTF.mjs +3 -0
- package/dist/chunk-G2BD5ZTF.mjs.map +1 -0
- package/dist/{chunk-P4XY3T5T.js → chunk-MRTGK3CK.js} +601 -578
- package/dist/chunk-MRTGK3CK.js.map +1 -0
- package/dist/{chunk-QNWQE2LJ.mjs → chunk-ZMENGANG.mjs} +601 -578
- package/dist/chunk-ZMENGANG.mjs.map +1 -0
- package/dist/comfyui.d.mts +44 -44
- package/dist/comfyui.d.ts +44 -44
- package/dist/comfyui.js +3 -1
- package/dist/comfyui.js.map +1 -0
- package/dist/comfyui.mjs +3 -1
- package/dist/comfyui.mjs.map +1 -0
- package/dist/index.d.mts +341 -3
- package/dist/index.d.ts +341 -3
- package/dist/index.js +28 -26
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +11 -9
- package/dist/index.mjs.map +1 -0
- package/dist/nodes.d.mts +2 -2
- package/dist/nodes.d.ts +2 -2
- package/dist/nodes.js +15 -13
- package/dist/nodes.js.map +1 -0
- package/dist/nodes.mjs +3 -1
- package/dist/nodes.mjs.map +1 -0
- package/dist/replicate.d.mts +3 -3
- package/dist/replicate.d.ts +3 -3
- package/dist/replicate.js +2 -0
- package/dist/replicate.js.map +1 -0
- package/dist/replicate.mjs +2 -0
- package/dist/replicate.mjs.map +1 -0
- package/dist/{union-BVaWc1Cx.d.mts → union-D5EesBEB.d.mts} +142 -142
- package/dist/{union-BVaWc1Cx.d.ts → union-D5EesBEB.d.ts} +142 -142
- package/dist/{workflow-B_Q38s-U.d.ts → workflow-Cd_F9hZk.d.ts} +1 -1
- package/dist/{workflow-BbAp7VSK.d.mts → workflow-D9M1Yoiy.d.mts} +1 -1
- package/dist/workflow.d.mts +2 -2
- package/dist/workflow.d.ts +2 -2
- package/dist/workflow.js +4 -2
- package/dist/workflow.js.map +1 -0
- package/dist/workflow.mjs +3 -1
- package/dist/workflow.mjs.map +1 -0
- package/package.json +37 -37
- package/src/replicate/schemas.json +3624 -4185
- package/dist/chunk-7NJUD2WZ.mjs +0 -1
- 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
|
-
##
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm
|
|
9
|
-
# or
|
|
10
|
-
bun add @genfeedai/types
|
|
8
|
+
npm i @genfeedai/types
|
|
11
9
|
```
|
|
12
10
|
|
|
13
11
|
## Usage
|
|
14
12
|
|
|
15
|
-
```
|
|
13
|
+
```ts
|
|
16
14
|
import type { WorkflowFile, WorkflowNode, WorkflowEdge } from '@genfeedai/types';
|
|
17
|
-
import type {
|
|
15
|
+
import type { ImageNodeData } from '@genfeedai/types/nodes';
|
|
16
|
+
import replicateSchemas from '@genfeedai/types/replicate/schemas.json';
|
|
18
17
|
```
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
## Related Packages
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
import type { ImageNodeData, VideoNodeData } from '@genfeedai/types/nodes';
|
|
21
|
+
- `@genfeedai/core`
|
|
22
|
+
- `@genfeedai/workflow-ui`
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
import type { WorkflowFile } from '@genfeedai/types/workflow';
|
|
24
|
+
## Build Faster with Genfeed
|
|
28
25
|
|
|
29
|
-
|
|
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
|
|
|
@@ -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"]}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-DVR3GE4F.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-G2BD5ZTF.mjs"}
|