@genfeedai/types 0.1.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/dist/chunk-7NJUD2WZ.mjs +1 -0
- package/dist/chunk-KXAKQO3U.js +11 -0
- package/dist/chunk-OGJX4J7H.mjs +808 -0
- package/dist/chunk-P7K5LM6V.js +825 -0
- package/dist/chunk-RNGYPX4W.js +2 -0
- package/dist/chunk-WT2F5CAF.mjs +9 -0
- package/dist/comfyui.d.mts +91 -0
- package/dist/comfyui.d.ts +91 -0
- package/dist/comfyui.js +4 -0
- package/dist/comfyui.mjs +1 -0
- package/dist/index.d.mts +268 -0
- package/dist/index.d.ts +268 -0
- package/dist/index.js +185 -0
- package/dist/index.mjs +109 -0
- package/dist/nodes.d.mts +19 -0
- package/dist/nodes.d.ts +19 -0
- package/dist/nodes.js +54 -0
- package/dist/nodes.mjs +1 -0
- package/dist/replicate.d.mts +1092 -0
- package/dist/replicate.d.ts +1092 -0
- package/dist/replicate.js +2 -0
- package/dist/replicate.mjs +1 -0
- package/dist/union-CtYAY8Mv.d.mts +541 -0
- package/dist/union-CtYAY8Mv.d.ts +541 -0
- package/dist/workflow-CGpVuRPg.d.mts +99 -0
- package/dist/workflow-Di5vTrXa.d.ts +99 -0
- package/dist/workflow.d.mts +3 -0
- package/dist/workflow.d.ts +3 -0
- package/dist/workflow.js +10 -0
- package/dist/workflow.mjs +1 -0
- package/package.json +60 -0
- package/src/replicate/schemas.json +6636 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { aI as WorkflowNode, aK as WorkflowEdge, i as NodeType } from './union-CtYAY8Mv.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Node Group Types
|
|
5
|
+
* Groups allow users to organize and lock multiple nodes together
|
|
6
|
+
*/
|
|
7
|
+
interface NodeGroup {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
nodeIds: string[];
|
|
11
|
+
isLocked: boolean;
|
|
12
|
+
color?: GroupColor;
|
|
13
|
+
collapsed?: boolean;
|
|
14
|
+
}
|
|
15
|
+
type GroupColor = 'purple' | 'blue' | 'green' | 'yellow' | 'orange' | 'red' | 'pink' | 'gray';
|
|
16
|
+
|
|
17
|
+
declare enum EdgeStyleEnum {
|
|
18
|
+
DEFAULT = "default",
|
|
19
|
+
SMOOTHSTEP = "smoothstep",
|
|
20
|
+
STRAIGHT = "straight"
|
|
21
|
+
}
|
|
22
|
+
type EdgeStyle = `${EdgeStyleEnum}`;
|
|
23
|
+
interface WorkflowFile {
|
|
24
|
+
version: number;
|
|
25
|
+
name: string;
|
|
26
|
+
description: string;
|
|
27
|
+
nodes: WorkflowNode[];
|
|
28
|
+
edges: WorkflowEdge[];
|
|
29
|
+
edgeStyle: EdgeStyle;
|
|
30
|
+
groups?: NodeGroup[];
|
|
31
|
+
createdAt: string;
|
|
32
|
+
updatedAt: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Template node with loose typing for data - used in template definitions
|
|
36
|
+
* where we don't need strict type checking on node data
|
|
37
|
+
*/
|
|
38
|
+
interface TemplateNode {
|
|
39
|
+
id: string;
|
|
40
|
+
type: NodeType;
|
|
41
|
+
position: {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
};
|
|
45
|
+
data: Record<string, unknown>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Template edge - same as WorkflowEdge but defined separately for clarity
|
|
49
|
+
*/
|
|
50
|
+
interface TemplateEdge {
|
|
51
|
+
id: string;
|
|
52
|
+
source: string;
|
|
53
|
+
target: string;
|
|
54
|
+
sourceHandle?: string;
|
|
55
|
+
targetHandle?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Workflow template definition - uses loose typing for node data
|
|
59
|
+
* to allow easy template creation without strict type constraints
|
|
60
|
+
*/
|
|
61
|
+
interface WorkflowTemplate {
|
|
62
|
+
version: number;
|
|
63
|
+
name: string;
|
|
64
|
+
description: string;
|
|
65
|
+
nodes: TemplateNode[];
|
|
66
|
+
edges: TemplateEdge[];
|
|
67
|
+
edgeStyle?: EdgeStyle;
|
|
68
|
+
groups?: NodeGroup[];
|
|
69
|
+
createdAt?: string;
|
|
70
|
+
updatedAt?: string;
|
|
71
|
+
}
|
|
72
|
+
interface ValidationError {
|
|
73
|
+
nodeId: string;
|
|
74
|
+
message: string;
|
|
75
|
+
severity: 'error' | 'warning';
|
|
76
|
+
}
|
|
77
|
+
interface ValidationResult {
|
|
78
|
+
isValid: boolean;
|
|
79
|
+
errors: ValidationError[];
|
|
80
|
+
warnings: ValidationError[];
|
|
81
|
+
}
|
|
82
|
+
interface ExecutionResult {
|
|
83
|
+
success: boolean;
|
|
84
|
+
outputs: Map<string, unknown>;
|
|
85
|
+
errors: Map<string, string>;
|
|
86
|
+
duration: number;
|
|
87
|
+
}
|
|
88
|
+
interface CostEstimate {
|
|
89
|
+
model: string;
|
|
90
|
+
count: number;
|
|
91
|
+
unitCost: number;
|
|
92
|
+
totalCost: number;
|
|
93
|
+
}
|
|
94
|
+
interface WorkflowCostEstimate {
|
|
95
|
+
items: CostEstimate[];
|
|
96
|
+
totalCost: number;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export { type CostEstimate as C, EdgeStyleEnum as E, type GroupColor as G, type NodeGroup as N, type TemplateNode as T, type ValidationError as V, type WorkflowFile as W, type EdgeStyle as a, type TemplateEdge as b, type WorkflowTemplate as c, type ValidationResult as d, type ExecutionResult as e, type WorkflowCostEstimate as f };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { C as CostEstimate, a as EdgeStyle, E as EdgeStyleEnum, e as ExecutionResult, b as TemplateEdge, T as TemplateNode, V as ValidationError, d as ValidationResult, f as WorkflowCostEstimate, W as WorkflowFile, c as WorkflowTemplate } from './workflow-CGpVuRPg.mjs';
|
|
2
|
+
import './union-CtYAY8Mv.mjs';
|
|
3
|
+
import '@xyflow/react';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { C as CostEstimate, a as EdgeStyle, E as EdgeStyleEnum, e as ExecutionResult, b as TemplateEdge, T as TemplateNode, V as ValidationError, d as ValidationResult, f as WorkflowCostEstimate, W as WorkflowFile, c as WorkflowTemplate } from './workflow-Di5vTrXa.js';
|
|
2
|
+
import './union-CtYAY8Mv.js';
|
|
3
|
+
import '@xyflow/react';
|
package/dist/workflow.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EdgeStyleEnum } from './chunk-WT2F5CAF.mjs';
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@genfeedai/types",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "AGPL-3.0",
|
|
5
|
+
"description": "Type definitions for Genfeed workflow engine",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/genfeedai/core.git",
|
|
9
|
+
"directory": "packages/types"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public",
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"module": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js",
|
|
22
|
+
"require": "./dist/index.cjs"
|
|
23
|
+
},
|
|
24
|
+
"./nodes": {
|
|
25
|
+
"types": "./dist/nodes.d.ts",
|
|
26
|
+
"import": "./dist/nodes.js",
|
|
27
|
+
"require": "./dist/nodes.cjs"
|
|
28
|
+
},
|
|
29
|
+
"./workflow": {
|
|
30
|
+
"types": "./dist/workflow.d.ts",
|
|
31
|
+
"import": "./dist/workflow.js",
|
|
32
|
+
"require": "./dist/workflow.cjs"
|
|
33
|
+
},
|
|
34
|
+
"./comfyui": {
|
|
35
|
+
"types": "./dist/comfyui.d.ts",
|
|
36
|
+
"import": "./dist/comfyui.js",
|
|
37
|
+
"require": "./dist/comfyui.cjs"
|
|
38
|
+
},
|
|
39
|
+
"./replicate": {
|
|
40
|
+
"types": "./dist/replicate.d.ts",
|
|
41
|
+
"import": "./dist/replicate.js",
|
|
42
|
+
"require": "./dist/replicate.cjs"
|
|
43
|
+
},
|
|
44
|
+
"./replicate/schemas.json": "./src/replicate/schemas.json"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"dist",
|
|
48
|
+
"src/replicate/schemas.json"
|
|
49
|
+
],
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsup",
|
|
52
|
+
"dev": "tsup --watch",
|
|
53
|
+
"prepublishOnly": "bun run build"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@xyflow/react": "12.10.0",
|
|
57
|
+
"tsup": "8.4.0",
|
|
58
|
+
"typescript": "5.9.3"
|
|
59
|
+
}
|
|
60
|
+
}
|