@pixelml/agenticflow-sdk 1.0.0 → 1.0.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/README.md +84 -110
- package/dist/resources/agents.d.ts +13 -20
- package/dist/resources/agents.d.ts.map +1 -1
- package/dist/resources/agents.js +13 -32
- package/dist/resources/agents.js.map +1 -1
- package/dist/resources/connections.d.ts +6 -9
- package/dist/resources/connections.d.ts.map +1 -1
- package/dist/resources/connections.js +6 -14
- package/dist/resources/connections.js.map +1 -1
- package/dist/resources/node-types.d.ts +4 -5
- package/dist/resources/node-types.d.ts.map +1 -1
- package/dist/resources/node-types.js +15 -18
- package/dist/resources/node-types.js.map +1 -1
- package/dist/resources/uploads.d.ts +2 -3
- package/dist/resources/uploads.d.ts.map +1 -1
- package/dist/resources/uploads.js +2 -2
- package/dist/resources/uploads.js.map +1 -1
- package/dist/resources/workflows.d.ts +17 -18
- package/dist/resources/workflows.d.ts.map +1 -1
- package/dist/resources/workflows.js +17 -17
- package/dist/resources/workflows.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @pixelml/agenticflow-sdk
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Typed JavaScript / TypeScript SDK for the [AgenticFlow](https://agenticflow.ai) API.
|
|
4
|
+
Manage agents, workflows, connections, node types and uploads from a single client
|
|
5
|
+
object — with automatic auth, path-parameter resolution and structured error classes.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -14,6 +14,8 @@ yarn add @pixelml/agenticflow-sdk
|
|
|
14
14
|
pnpm add @pixelml/agenticflow-sdk
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
**Requirements:** Node.js ≥ 18
|
|
18
|
+
|
|
17
19
|
## Quick Start
|
|
18
20
|
|
|
19
21
|
```typescript
|
|
@@ -25,104 +27,89 @@ const client = createClient({
|
|
|
25
27
|
projectId: process.env.AGENTICFLOW_PROJECT_ID,
|
|
26
28
|
});
|
|
27
29
|
|
|
28
|
-
// List
|
|
30
|
+
// List agents
|
|
29
31
|
const agents = await client.agents.list();
|
|
30
|
-
console.log(agents.data);
|
|
31
32
|
|
|
32
33
|
// Run a workflow
|
|
33
34
|
const run = await client.workflows.run({
|
|
34
35
|
workflow_id: "wf-abc123",
|
|
35
36
|
input: { prompt: "Hello!" },
|
|
36
37
|
});
|
|
37
|
-
console.log(run.data);
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Authentication
|
|
41
|
-
|
|
42
|
-
The SDK uses API key authentication via the `Authorization: Bearer` header.
|
|
43
|
-
|
|
44
|
-
```typescript
|
|
45
|
-
const client = createClient({
|
|
46
|
-
apiKey: "sk-...",
|
|
47
|
-
});
|
|
48
38
|
```
|
|
49
39
|
|
|
50
|
-
The `apiKey` can also be read automatically from the `AGENTICFLOW_API_KEY`
|
|
51
|
-
environment variable if not provided explicitly.
|
|
52
|
-
|
|
53
40
|
## Configuration
|
|
54
41
|
|
|
55
42
|
| Option | Env Variable | Description |
|
|
56
43
|
|---|---|---|
|
|
57
|
-
| `apiKey` | `AGENTICFLOW_API_KEY` | API key
|
|
44
|
+
| `apiKey` | `AGENTICFLOW_API_KEY` | API key (sent as `Bearer` token) |
|
|
58
45
|
| `workspaceId` | `AGENTICFLOW_WORKSPACE_ID` | Default workspace ID |
|
|
59
46
|
| `projectId` | `AGENTICFLOW_PROJECT_ID` | Default project ID |
|
|
60
47
|
| `baseUrl` | — | API base URL (default: `https://api.agenticflow.ai/`) |
|
|
61
|
-
| `timeout` | — | Request timeout |
|
|
62
|
-
| `defaultHeaders` | — |
|
|
48
|
+
| `timeout` | — | Request timeout in milliseconds |
|
|
49
|
+
| `defaultHeaders` | — | Extra headers sent with every request |
|
|
50
|
+
|
|
51
|
+
> **Note:** If `apiKey` is omitted, the SDK reads `AGENTICFLOW_API_KEY` from the
|
|
52
|
+
> environment automatically.
|
|
63
53
|
|
|
64
54
|
## Resources
|
|
65
55
|
|
|
56
|
+
All resource methods return the response **data** directly (the parsed JSON body),
|
|
57
|
+
not a wrapper object.
|
|
58
|
+
|
|
66
59
|
### Agents
|
|
67
60
|
|
|
68
61
|
```typescript
|
|
69
|
-
// List
|
|
70
|
-
await client.agents.list({
|
|
62
|
+
// List
|
|
63
|
+
await client.agents.list({ projectId, searchQuery, limit, offset });
|
|
71
64
|
|
|
72
65
|
// CRUD
|
|
73
|
-
await client.agents.create(
|
|
66
|
+
await client.agents.create(payload);
|
|
74
67
|
await client.agents.get("agent-id");
|
|
75
|
-
await client.agents.update("agent-id",
|
|
68
|
+
await client.agents.update("agent-id", payload);
|
|
76
69
|
await client.agents.delete("agent-id");
|
|
77
70
|
|
|
78
|
-
//
|
|
79
|
-
await client.agents.
|
|
71
|
+
// Anonymous access (no API key required)
|
|
72
|
+
await client.agents.getAnonymous("agent-id");
|
|
80
73
|
|
|
81
|
-
//
|
|
82
|
-
await client.agents.
|
|
83
|
-
await client.agents.
|
|
84
|
-
await client.agents.unpublish("agent-id", { platform: "web" });
|
|
74
|
+
// Streaming
|
|
75
|
+
await client.agents.stream("agent-id", payload);
|
|
76
|
+
await client.agents.streamAnonymous("agent-id", payload);
|
|
85
77
|
|
|
86
78
|
// File uploads
|
|
87
|
-
await client.agents.uploadFile("agent-id",
|
|
79
|
+
await client.agents.uploadFile("agent-id", payload);
|
|
88
80
|
await client.agents.getUploadSession("agent-id", "session-id");
|
|
81
|
+
await client.agents.uploadFileAnonymous("agent-id", payload);
|
|
82
|
+
await client.agents.getUploadSessionAnonymous("agent-id", "session-id");
|
|
89
83
|
|
|
90
|
-
//
|
|
84
|
+
// Reference impact
|
|
91
85
|
await client.agents.getReferenceImpact("agent-id");
|
|
92
|
-
await client.agents.saveAsTemplate("agent-id", templatePayload);
|
|
93
86
|
```
|
|
94
87
|
|
|
95
88
|
### Workflows
|
|
96
89
|
|
|
97
90
|
```typescript
|
|
98
|
-
// List
|
|
99
|
-
await client.workflows.list({
|
|
91
|
+
// List (requires workspaceId)
|
|
92
|
+
await client.workflows.list({ workspaceId, projectId, searchQuery, limit, offset });
|
|
100
93
|
|
|
101
94
|
// CRUD
|
|
102
|
-
await client.workflows.create(
|
|
95
|
+
await client.workflows.create(payload, workspaceId);
|
|
103
96
|
await client.workflows.get("workflow-id");
|
|
104
|
-
await client.workflows.
|
|
105
|
-
await client.workflows.
|
|
106
|
-
|
|
107
|
-
// Run a workflow
|
|
108
|
-
const run = await client.workflows.run({
|
|
109
|
-
workflow_id: "workflow-id",
|
|
110
|
-
input: { key: "value" },
|
|
111
|
-
});
|
|
97
|
+
await client.workflows.getAnonymous("workflow-id");
|
|
98
|
+
await client.workflows.update("workflow-id", payload, workspaceId);
|
|
99
|
+
await client.workflows.delete("workflow-id", workspaceId);
|
|
112
100
|
|
|
113
|
-
//
|
|
101
|
+
// Runs
|
|
102
|
+
await client.workflows.run(payload);
|
|
103
|
+
await client.workflows.runAnonymous(payload);
|
|
114
104
|
await client.workflows.getRun("run-id");
|
|
105
|
+
await client.workflows.getRunAnonymous("run-id");
|
|
106
|
+
await client.workflows.listRuns("workflow-id", { workspaceId, limit, offset, sortOrder });
|
|
107
|
+
await client.workflows.runHistory("workflow-id", { limit, offset });
|
|
115
108
|
|
|
116
|
-
//
|
|
117
|
-
await client.workflows.
|
|
118
|
-
|
|
119
|
-
// Run history
|
|
120
|
-
await client.workflows.runHistory("workflow-id");
|
|
121
|
-
|
|
122
|
-
// Validate a workflow definition
|
|
123
|
-
await client.workflows.validate(workflowPayload);
|
|
109
|
+
// Validation
|
|
110
|
+
await client.workflows.validate(payload);
|
|
124
111
|
|
|
125
|
-
// Reference impact
|
|
112
|
+
// Reference impact
|
|
126
113
|
await client.workflows.getReferenceImpact("workflow-id");
|
|
127
114
|
|
|
128
115
|
// Like / Unlike
|
|
@@ -134,120 +121,107 @@ await client.workflows.getLikeStatus("workflow-id");
|
|
|
134
121
|
### Connections
|
|
135
122
|
|
|
136
123
|
```typescript
|
|
137
|
-
// List
|
|
138
|
-
await client.connections.list();
|
|
124
|
+
// List (requires projectId)
|
|
125
|
+
await client.connections.list({ workspaceId, projectId, limit, offset });
|
|
139
126
|
|
|
140
127
|
// CRUD
|
|
141
|
-
await client.connections.create(
|
|
142
|
-
await client.connections.update("conn-id",
|
|
143
|
-
await client.connections.delete("conn-id");
|
|
128
|
+
await client.connections.create(payload, workspaceId);
|
|
129
|
+
await client.connections.update("conn-id", payload, workspaceId);
|
|
130
|
+
await client.connections.delete("conn-id", workspaceId);
|
|
144
131
|
|
|
145
|
-
//
|
|
146
|
-
await client.connections.getDefault({ categoryName: "llm" });
|
|
132
|
+
// Default connection for a category
|
|
133
|
+
await client.connections.getDefault({ categoryName: "llm", workspaceId, projectId });
|
|
147
134
|
|
|
148
|
-
// List
|
|
149
|
-
await client.connections.categories();
|
|
150
|
-
|
|
151
|
-
// Health checks
|
|
152
|
-
await client.connections.healthCheckPreCreate(configPayload);
|
|
153
|
-
await client.connections.healthCheckPostCreate("conn-id");
|
|
135
|
+
// List categories
|
|
136
|
+
await client.connections.categories({ workspaceId, limit, offset });
|
|
154
137
|
```
|
|
155
138
|
|
|
156
139
|
### Node Types
|
|
157
140
|
|
|
158
141
|
```typescript
|
|
159
|
-
// List
|
|
142
|
+
// List & get
|
|
160
143
|
await client.nodeTypes.list();
|
|
161
|
-
|
|
162
|
-
// Get a specific node type by name
|
|
163
144
|
await client.nodeTypes.get("node-type-name");
|
|
164
145
|
|
|
165
|
-
// Search
|
|
146
|
+
// Search (client-side text match)
|
|
166
147
|
await client.nodeTypes.search("text generation");
|
|
167
148
|
|
|
168
|
-
//
|
|
149
|
+
// Dynamic field options
|
|
169
150
|
await client.nodeTypes.dynamicOptions({
|
|
170
151
|
name: "node-type-name",
|
|
171
152
|
fieldName: "model",
|
|
172
153
|
connection: "conn-id",
|
|
154
|
+
projectId: "proj-id",
|
|
155
|
+
searchTerm: "gpt",
|
|
173
156
|
});
|
|
174
157
|
```
|
|
175
158
|
|
|
176
159
|
### Uploads
|
|
177
160
|
|
|
178
161
|
```typescript
|
|
179
|
-
//
|
|
180
|
-
await client.uploads.inputCreate({ filename: "data.csv"
|
|
181
|
-
|
|
182
|
-
// Check upload session status
|
|
162
|
+
// Anonymous upload sessions
|
|
163
|
+
await client.uploads.inputCreate({ filename: "data.csv" });
|
|
183
164
|
await client.uploads.inputStatus("session-id");
|
|
184
165
|
```
|
|
185
166
|
|
|
186
167
|
## Error Handling
|
|
187
168
|
|
|
188
|
-
The SDK throws
|
|
169
|
+
The SDK throws structured errors for every non-2xx response:
|
|
189
170
|
|
|
190
171
|
```typescript
|
|
191
172
|
import {
|
|
192
173
|
AuthenticationError,
|
|
193
|
-
AuthorizationError,
|
|
194
174
|
NotFoundError,
|
|
195
|
-
ValidationError,
|
|
196
175
|
RateLimitError,
|
|
197
|
-
ServerError,
|
|
198
176
|
} from "@pixelml/agenticflow-sdk";
|
|
199
177
|
|
|
200
178
|
try {
|
|
201
179
|
await client.agents.get("invalid-id");
|
|
202
180
|
} catch (err) {
|
|
203
181
|
if (err instanceof NotFoundError) {
|
|
204
|
-
console.log(
|
|
205
|
-
|
|
206
|
-
console.log(
|
|
207
|
-
|
|
208
|
-
console.log("Rate limited, retry later");
|
|
182
|
+
console.log(err.statusCode); // 404
|
|
183
|
+
console.log(err.message);
|
|
184
|
+
console.log(err.payload); // raw response body
|
|
185
|
+
console.log(err.requestId); // X-Request-Id if present
|
|
209
186
|
}
|
|
210
187
|
}
|
|
211
188
|
```
|
|
212
189
|
|
|
213
190
|
| Error Class | HTTP Status |
|
|
214
191
|
|---|---|
|
|
215
|
-
| `ValidationError` | 400
|
|
192
|
+
| `ValidationError` | 400 / 422 |
|
|
216
193
|
| `AuthenticationError` | 401 |
|
|
217
194
|
| `AuthorizationError` | 403 |
|
|
218
195
|
| `NotFoundError` | 404 |
|
|
219
196
|
| `ConflictError` | 409 |
|
|
220
197
|
| `RateLimitError` | 429 |
|
|
221
198
|
| `ServerError` | 5xx |
|
|
199
|
+
| `NetworkError` | Connection / DNS failures |
|
|
200
|
+
| `RequestTimeoutError` | Timeout exceeded |
|
|
201
|
+
|
|
202
|
+
All API errors extend `APIError`, which extends `AgenticFlowError` (→ `Error`).
|
|
222
203
|
|
|
223
204
|
## Low-Level Access
|
|
224
205
|
|
|
225
|
-
For endpoints not covered by resource classes, use the
|
|
206
|
+
For endpoints not covered by resource classes, use the SDK instance directly:
|
|
226
207
|
|
|
227
208
|
```typescript
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
|
|
209
|
+
// HTTP convenience methods
|
|
210
|
+
const data = await client.sdk.get("/v1/health");
|
|
211
|
+
const data = await client.sdk.post("/v1/custom", { json: { key: "value" } });
|
|
212
|
+
const data = await client.sdk.put("/v1/custom/123", { json: payload });
|
|
213
|
+
const data = await client.sdk.patch("/v1/custom/123", { json: patch });
|
|
214
|
+
const data = await client.sdk.delete("/v1/custom/123");
|
|
215
|
+
|
|
216
|
+
// Full control
|
|
217
|
+
const data = await client.sdk.request("POST", "/v1/agents/{agent_id}/run", {
|
|
218
|
+
pathParams: { agent_id: "abc" },
|
|
219
|
+
queryParams: { verbose: true },
|
|
220
|
+
json: { input: "Hello" },
|
|
221
|
+
headers: { "X-Custom": "value" },
|
|
231
222
|
});
|
|
232
223
|
```
|
|
233
224
|
|
|
234
|
-
Available methods: `get`, `post`, `put`, `patch`, `delete`.
|
|
235
|
-
|
|
236
|
-
## Response Format
|
|
237
|
-
|
|
238
|
-
All resource methods return an `APIResponse` object:
|
|
239
|
-
|
|
240
|
-
```typescript
|
|
241
|
-
interface APIResponse {
|
|
242
|
-
ok: boolean;
|
|
243
|
-
statusCode: number;
|
|
244
|
-
data: unknown;
|
|
245
|
-
text: string;
|
|
246
|
-
headers: Record<string, string>;
|
|
247
|
-
requestId: string | null;
|
|
248
|
-
}
|
|
249
|
-
```
|
|
250
|
-
|
|
251
225
|
## License
|
|
252
226
|
|
|
253
227
|
Apache-2.0
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* project_id is an optional query param on list/versions.
|
|
6
6
|
*/
|
|
7
7
|
import type { AgenticFlowSDK } from "../core.js";
|
|
8
|
-
import type { APIResponse } from "../types.js";
|
|
9
8
|
export declare class AgentsResource {
|
|
10
9
|
private client;
|
|
11
10
|
constructor(client: AgenticFlowSDK);
|
|
@@ -14,24 +13,18 @@ export declare class AgentsResource {
|
|
|
14
13
|
searchQuery?: string;
|
|
15
14
|
limit?: number;
|
|
16
15
|
offset?: number;
|
|
17
|
-
}): Promise<
|
|
18
|
-
create(payload: unknown): Promise<
|
|
19
|
-
get(agentId: string): Promise<
|
|
20
|
-
update(agentId: string, payload: unknown): Promise<
|
|
21
|
-
delete(agentId: string): Promise<
|
|
22
|
-
getAnonymous(agentId: string): Promise<
|
|
23
|
-
stream(agentId: string, payload: unknown): Promise<
|
|
24
|
-
streamAnonymous(agentId: string, payload: unknown): Promise<
|
|
25
|
-
uploadFile(agentId: string, payload: unknown): Promise<
|
|
26
|
-
getUploadSession(agentId: string, sessionId: string): Promise<
|
|
27
|
-
uploadFileAnonymous(agentId: string, payload: unknown): Promise<
|
|
28
|
-
getUploadSessionAnonymous(agentId: string, sessionId: string): Promise<
|
|
29
|
-
|
|
30
|
-
platform?: string;
|
|
31
|
-
}): Promise<APIResponse>;
|
|
32
|
-
publish(agentId: string, payload: unknown): Promise<APIResponse>;
|
|
33
|
-
unpublish(agentId: string, payload: unknown): Promise<APIResponse>;
|
|
34
|
-
getReferenceImpact(agentId: string): Promise<APIResponse>;
|
|
35
|
-
saveAsTemplate(agentId: string, payload: unknown): Promise<APIResponse>;
|
|
16
|
+
}): Promise<unknown>;
|
|
17
|
+
create(payload: unknown): Promise<unknown>;
|
|
18
|
+
get(agentId: string): Promise<unknown>;
|
|
19
|
+
update(agentId: string, payload: unknown): Promise<unknown>;
|
|
20
|
+
delete(agentId: string): Promise<unknown>;
|
|
21
|
+
getAnonymous(agentId: string): Promise<unknown>;
|
|
22
|
+
stream(agentId: string, payload: unknown): Promise<unknown>;
|
|
23
|
+
streamAnonymous(agentId: string, payload: unknown): Promise<unknown>;
|
|
24
|
+
uploadFile(agentId: string, payload: unknown): Promise<unknown>;
|
|
25
|
+
getUploadSession(agentId: string, sessionId: string): Promise<unknown>;
|
|
26
|
+
uploadFileAnonymous(agentId: string, payload: unknown): Promise<unknown>;
|
|
27
|
+
getUploadSessionAnonymous(agentId: string, sessionId: string): Promise<unknown>;
|
|
28
|
+
getReferenceImpact(agentId: string): Promise<unknown>;
|
|
36
29
|
}
|
|
37
30
|
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/resources/agents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/resources/agents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,qBAAa,cAAc;IACb,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IAGpC,IAAI,CAAC,OAAO,GAAE;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACZ,GAAG,OAAO,CAAC,OAAO,CAAC;IAWnB,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAK1C,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKtC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAK3D,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKzC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK/C,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAK3D,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAKpE,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAK/D,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKtE,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxE,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK/E,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAG5D"}
|
package/dist/resources/agents.js
CHANGED
|
@@ -15,74 +15,55 @@ export class AgentsResource {
|
|
|
15
15
|
queryParams["limit"] = options.limit;
|
|
16
16
|
if (options.offset != null)
|
|
17
17
|
queryParams["offset"] = options.offset;
|
|
18
|
-
return this.client.get("/v1/agents/", { queryParams });
|
|
18
|
+
return (await this.client.get("/v1/agents/", { queryParams })).data;
|
|
19
19
|
}
|
|
20
20
|
// ── Create ─────────────────────────────────────────────────────────
|
|
21
21
|
async create(payload) {
|
|
22
|
-
return this.client.post("/v1/agents/", { json: payload });
|
|
22
|
+
return (await this.client.post("/v1/agents/", { json: payload })).data;
|
|
23
23
|
}
|
|
24
24
|
// ── Get by ID ──────────────────────────────────────────────────────
|
|
25
25
|
async get(agentId) {
|
|
26
|
-
return this.client.get(`/v1/agents/${agentId}`);
|
|
26
|
+
return (await this.client.get(`/v1/agents/${agentId}`)).data;
|
|
27
27
|
}
|
|
28
28
|
// ── Update ─────────────────────────────────────────────────────────
|
|
29
29
|
async update(agentId, payload) {
|
|
30
|
-
return this.client.put(`/v1/agents/${agentId}`, { json: payload });
|
|
30
|
+
return (await this.client.put(`/v1/agents/${agentId}`, { json: payload })).data;
|
|
31
31
|
}
|
|
32
32
|
// ── Delete ─────────────────────────────────────────────────────────
|
|
33
33
|
async delete(agentId) {
|
|
34
|
-
return this.client.delete(`/v1/agents/${agentId}`);
|
|
34
|
+
return (await this.client.delete(`/v1/agents/${agentId}`)).data;
|
|
35
35
|
}
|
|
36
36
|
// ── Get Anonymous ──────────────────────────────────────────────────
|
|
37
37
|
async getAnonymous(agentId) {
|
|
38
|
-
return this.client.get(`/v1/agents/anonymous/${agentId}`);
|
|
38
|
+
return (await this.client.get(`/v1/agents/anonymous/${agentId}`)).data;
|
|
39
39
|
}
|
|
40
40
|
// ── Stream (authenticated) ─────────────────────────────────────────
|
|
41
41
|
async stream(agentId, payload) {
|
|
42
|
-
return this.client.post(`/v1/agents/${agentId}/stream`, { json: payload });
|
|
42
|
+
return (await this.client.post(`/v1/agents/${agentId}/stream`, { json: payload })).data;
|
|
43
43
|
}
|
|
44
44
|
// ── Stream Anonymous ───────────────────────────────────────────────
|
|
45
45
|
async streamAnonymous(agentId, payload) {
|
|
46
|
-
return this.client.post(`/v1/agents/anonymous/${agentId}/stream`, { json: payload });
|
|
46
|
+
return (await this.client.post(`/v1/agents/anonymous/${agentId}/stream`, { json: payload })).data;
|
|
47
47
|
}
|
|
48
48
|
// ── Upload File (authenticated) ────────────────────────────────────
|
|
49
49
|
async uploadFile(agentId, payload) {
|
|
50
|
-
return this.client.post(`/v1/agents/${agentId}/upload-file`, { json: payload });
|
|
50
|
+
return (await this.client.post(`/v1/agents/${agentId}/upload-file`, { json: payload })).data;
|
|
51
51
|
}
|
|
52
52
|
// ── Get Upload Session ─────────────────────────────────────────────
|
|
53
53
|
async getUploadSession(agentId, sessionId) {
|
|
54
|
-
return this.client.get(`/v1/agents/${agentId}/upload-sessions/${sessionId}`);
|
|
54
|
+
return (await this.client.get(`/v1/agents/${agentId}/upload-sessions/${sessionId}`)).data;
|
|
55
55
|
}
|
|
56
56
|
// ── Upload File Anonymous ──────────────────────────────────────────
|
|
57
57
|
async uploadFileAnonymous(agentId, payload) {
|
|
58
|
-
return this.client.post(`/v1/agents/anonymous/${agentId}/upload-file`, { json: payload });
|
|
58
|
+
return (await this.client.post(`/v1/agents/anonymous/${agentId}/upload-file`, { json: payload })).data;
|
|
59
59
|
}
|
|
60
60
|
// ── Get Upload Session Anonymous ───────────────────────────────────
|
|
61
61
|
async getUploadSessionAnonymous(agentId, sessionId) {
|
|
62
|
-
return this.client.get(`/v1/agents/anonymous/${agentId}/upload-sessions/${sessionId}`);
|
|
63
|
-
}
|
|
64
|
-
// ── Publish Info ───────────────────────────────────────────────────
|
|
65
|
-
async getPublishInfo(agentId, options = {}) {
|
|
66
|
-
const queryParams = {};
|
|
67
|
-
if (options.platform != null)
|
|
68
|
-
queryParams["platform"] = options.platform;
|
|
69
|
-
return this.client.get(`/v1/agents/${agentId}/publish-info`, { queryParams });
|
|
70
|
-
}
|
|
71
|
-
// ── Publish ────────────────────────────────────────────────────────
|
|
72
|
-
async publish(agentId, payload) {
|
|
73
|
-
return this.client.post(`/v1/agents/${agentId}/publish`, { json: payload });
|
|
74
|
-
}
|
|
75
|
-
// ── Unpublish ──────────────────────────────────────────────────────
|
|
76
|
-
async unpublish(agentId, payload) {
|
|
77
|
-
return this.client.post(`/v1/agents/${agentId}/unpublish`, { json: payload });
|
|
62
|
+
return (await this.client.get(`/v1/agents/anonymous/${agentId}/upload-sessions/${sessionId}`)).data;
|
|
78
63
|
}
|
|
79
64
|
// ── Reference Impact ───────────────────────────────────────────────
|
|
80
65
|
async getReferenceImpact(agentId) {
|
|
81
|
-
return this.client.get(`/v1/agents/${agentId}/reference-impact`);
|
|
82
|
-
}
|
|
83
|
-
// ── Save As Template ───────────────────────────────────────────────
|
|
84
|
-
async saveAsTemplate(agentId, payload) {
|
|
85
|
-
return this.client.post(`/v1/agents/${agentId}/save-as-template`, { json: payload });
|
|
66
|
+
return (await this.client.get(`/v1/agents/${agentId}/reference-impact`)).data;
|
|
86
67
|
}
|
|
87
68
|
}
|
|
88
69
|
//# sourceMappingURL=agents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/resources/agents.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/resources/agents.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,cAAc;IACL;IAApB,YAAoB,MAAsB;QAAtB,WAAM,GAAN,MAAM,CAAgB;IAAI,CAAC;IAE/C,sEAAsE;IACtE,KAAK,CAAC,IAAI,CAAC,UAKP,EAAE;QACJ,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QAC7D,MAAM,WAAW,GAA4B,EAAE,CAAC;QAChD,IAAI,SAAS,IAAI,IAAI;YAAE,WAAW,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;QAC7D,IAAI,OAAO,CAAC,WAAW,IAAI,IAAI;YAAE,WAAW,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;QACnF,IAAI,OAAO,CAAC,KAAK,IAAI,IAAI;YAAE,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;QAChE,IAAI,OAAO,CAAC,MAAM,IAAI,IAAI;YAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;QACnE,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,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* Note: API uses underscore `app_connections`, NOT hyphen.
|
|
6
6
|
*/
|
|
7
7
|
import type { AgenticFlowSDK } from "../core.js";
|
|
8
|
-
import type { APIResponse } from "../types.js";
|
|
9
8
|
export declare class ConnectionsResource {
|
|
10
9
|
private client;
|
|
11
10
|
constructor(client: AgenticFlowSDK);
|
|
@@ -16,21 +15,19 @@ export declare class ConnectionsResource {
|
|
|
16
15
|
projectId?: string;
|
|
17
16
|
limit?: number;
|
|
18
17
|
offset?: number;
|
|
19
|
-
}): Promise<
|
|
20
|
-
create(payload: unknown, workspaceId?: string): Promise<
|
|
18
|
+
}): Promise<unknown>;
|
|
19
|
+
create(payload: unknown, workspaceId?: string): Promise<unknown>;
|
|
21
20
|
getDefault(options: {
|
|
22
21
|
categoryName: string;
|
|
23
22
|
workspaceId?: string;
|
|
24
23
|
projectId?: string;
|
|
25
|
-
}): Promise<
|
|
26
|
-
update(connectionId: string, payload: unknown, workspaceId?: string): Promise<
|
|
27
|
-
delete(connectionId: string, workspaceId?: string): Promise<
|
|
24
|
+
}): Promise<unknown>;
|
|
25
|
+
update(connectionId: string, payload: unknown, workspaceId?: string): Promise<unknown>;
|
|
26
|
+
delete(connectionId: string, workspaceId?: string): Promise<unknown>;
|
|
28
27
|
categories(options?: {
|
|
29
28
|
workspaceId?: string;
|
|
30
29
|
limit?: number;
|
|
31
30
|
offset?: number;
|
|
32
|
-
}): Promise<
|
|
33
|
-
healthCheckPreCreate(payload: unknown): Promise<APIResponse>;
|
|
34
|
-
healthCheckPostCreate(connectionId: string): Promise<APIResponse>;
|
|
31
|
+
}): Promise<unknown>;
|
|
35
32
|
}
|
|
36
33
|
//# sourceMappingURL=connections.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../src/resources/connections.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../src/resources/connections.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,qBAAa,mBAAmB;IAClB,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IAG1C,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,gBAAgB;IAQlB,IAAI,CAAC,OAAO,GAAE;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACZ,GAAG,OAAO,CAAC,OAAO,CAAC;IAenB,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMhE,UAAU,CAAC,OAAO,EAAE;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,OAAO,CAAC;IAcd,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAStF,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMpE,UAAU,CAAC,OAAO,GAAE;QACxB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACZ,GAAG,OAAO,CAAC,OAAO,CAAC;CAU1B"}
|
|
@@ -28,12 +28,12 @@ export class ConnectionsResource {
|
|
|
28
28
|
queryParams["limit"] = options.limit;
|
|
29
29
|
if (options.offset != null)
|
|
30
30
|
queryParams["offset"] = options.offset;
|
|
31
|
-
return this.client.get(`/v1/workspaces/${wsId}/app_connections/`, { queryParams });
|
|
31
|
+
return (await this.client.get(`/v1/workspaces/${wsId}/app_connections/`, { queryParams })).data;
|
|
32
32
|
}
|
|
33
33
|
// ── Create ─────────────────────────────────────────────────────────
|
|
34
34
|
async create(payload, workspaceId) {
|
|
35
35
|
const wsId = this.resolveWorkspaceId(workspaceId);
|
|
36
|
-
return this.client.post(`/v1/workspaces/${wsId}/app_connections/`, { json: payload });
|
|
36
|
+
return (await this.client.post(`/v1/workspaces/${wsId}/app_connections/`, { json: payload })).data;
|
|
37
37
|
}
|
|
38
38
|
// ── Get Default ────────────────────────────────────────────────────
|
|
39
39
|
async getDefault(options) {
|
|
@@ -43,17 +43,17 @@ export class ConnectionsResource {
|
|
|
43
43
|
category_name: options.categoryName,
|
|
44
44
|
project_id: projectId,
|
|
45
45
|
};
|
|
46
|
-
return this.client.get(`/v1/workspaces/${wsId}/app_connections/default`, { queryParams });
|
|
46
|
+
return (await this.client.get(`/v1/workspaces/${wsId}/app_connections/default`, { queryParams })).data;
|
|
47
47
|
}
|
|
48
48
|
// ── Update ─────────────────────────────────────────────────────────
|
|
49
49
|
async update(connectionId, payload, workspaceId) {
|
|
50
50
|
const wsId = this.resolveWorkspaceId(workspaceId);
|
|
51
|
-
return this.client.put(`/v1/workspaces/${wsId}/app_connections/${connectionId}`, { json: payload });
|
|
51
|
+
return (await this.client.put(`/v1/workspaces/${wsId}/app_connections/${connectionId}`, { json: payload })).data;
|
|
52
52
|
}
|
|
53
53
|
// ── Delete ─────────────────────────────────────────────────────────
|
|
54
54
|
async delete(connectionId, workspaceId) {
|
|
55
55
|
const wsId = this.resolveWorkspaceId(workspaceId);
|
|
56
|
-
return this.client.delete(`/v1/workspaces/${wsId}/app_connections/${connectionId}`);
|
|
56
|
+
return (await this.client.delete(`/v1/workspaces/${wsId}/app_connections/${connectionId}`)).data;
|
|
57
57
|
}
|
|
58
58
|
// ── Categories ─────────────────────────────────────────────────────
|
|
59
59
|
async categories(options = {}) {
|
|
@@ -63,15 +63,7 @@ export class ConnectionsResource {
|
|
|
63
63
|
queryParams["limit"] = options.limit;
|
|
64
64
|
if (options.offset != null)
|
|
65
65
|
queryParams["offset"] = options.offset;
|
|
66
|
-
return this.client.get(`/v1/workspaces/${wsId}/app_connections/categories`, { queryParams });
|
|
67
|
-
}
|
|
68
|
-
// ── Health Check Pre-Create ────────────────────────────────────────
|
|
69
|
-
async healthCheckPreCreate(payload) {
|
|
70
|
-
return this.client.post("/v1/app_connections/health-check", { json: payload });
|
|
71
|
-
}
|
|
72
|
-
// ── Health Check Post-Create ───────────────────────────────────────
|
|
73
|
-
async healthCheckPostCreate(connectionId) {
|
|
74
|
-
return this.client.post(`/v1/app_connections/${connectionId}/health-check`);
|
|
66
|
+
return (await this.client.get(`/v1/workspaces/${wsId}/app_connections/categories`, { queryParams })).data;
|
|
75
67
|
}
|
|
76
68
|
}
|
|
77
69
|
//# sourceMappingURL=connections.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connections.js","sourceRoot":"","sources":["../../src/resources/connections.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connections.js","sourceRoot":"","sources":["../../src/resources/connections.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,mBAAmB;IACV;IAApB,YAAoB,MAAsB;QAAtB,WAAM,GAAN,MAAM,CAAgB;IAAI,CAAC;IAE/C,sEAAsE;IAC9D,kBAAkB,CAAC,WAAoB;QAC7C,MAAM,IAAI,GAAG,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACpD,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,gBAAgB,CAAC,SAAkB;QACzC,MAAM,GAAG,GAAG,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,S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GAAG,OAAO,CAAC,MAAM,CAAC;QACnE,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAC3B,kBAAkB,IAAI,6BAA6B,EACnD,EAAE,WAAW,EAAE,CAChB,CAAC,CAAC,IAAI,CAAC;IACV,CAAC;CACF"}
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
* Node-type resource helpers.
|
|
3
3
|
*/
|
|
4
4
|
import type { AgenticFlowSDK } from "../core.js";
|
|
5
|
-
import type { APIResponse } from "../types.js";
|
|
6
5
|
export declare class NodeTypesResource {
|
|
7
6
|
private client;
|
|
8
7
|
constructor(client: AgenticFlowSDK);
|
|
9
|
-
list(queryParams?: Record<string, unknown>): Promise<
|
|
10
|
-
get(name: string): Promise<
|
|
11
|
-
search(query: string, queryParams?: Record<string, unknown>): Promise<
|
|
8
|
+
list(queryParams?: Record<string, unknown>): Promise<unknown>;
|
|
9
|
+
get(name: string): Promise<unknown>;
|
|
10
|
+
search(query: string, queryParams?: Record<string, unknown>): Promise<unknown>;
|
|
12
11
|
dynamicOptions(options: {
|
|
13
12
|
name: string;
|
|
14
13
|
fieldName: string;
|
|
@@ -16,6 +15,6 @@ export declare class NodeTypesResource {
|
|
|
16
15
|
inputConfig?: Record<string, unknown>;
|
|
17
16
|
connection?: string;
|
|
18
17
|
searchTerm?: string;
|
|
19
|
-
}): Promise<
|
|
18
|
+
}): Promise<unknown>;
|
|
20
19
|
}
|
|
21
20
|
//# sourceMappingURL=node-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-types.d.ts","sourceRoot":"","sources":["../../src/resources/node-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"node-types.d.ts","sourceRoot":"","sources":["../../src/resources/node-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AA2BjD,qBAAa,iBAAiB;IAChB,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IAEpC,IAAI,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAM7D,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAInC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAe9E,cAAc,CAAC,OAAO,EAAE;QAC5B,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACtC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,OAAO,CAAC;CAarB"}
|
|
@@ -11,11 +11,11 @@ function compactDict(values) {
|
|
|
11
11
|
}
|
|
12
12
|
return result;
|
|
13
13
|
}
|
|
14
|
-
function coerceNodes(
|
|
15
|
-
|
|
16
|
-
if (!data)
|
|
14
|
+
function coerceNodes(data) {
|
|
15
|
+
if (!data || typeof data !== "object")
|
|
17
16
|
return [];
|
|
18
|
-
const
|
|
17
|
+
const obj = data;
|
|
18
|
+
const body = obj["body"];
|
|
19
19
|
if (Array.isArray(body)) {
|
|
20
20
|
return body.filter((item) => typeof item === "object" && item !== null);
|
|
21
21
|
}
|
|
@@ -33,26 +33,23 @@ export class NodeTypesResource {
|
|
|
33
33
|
this.client = client;
|
|
34
34
|
}
|
|
35
35
|
async list(queryParams) {
|
|
36
|
-
return this.client.get("/v1/node-types", {
|
|
36
|
+
return (await this.client.get("/v1/node-types", {
|
|
37
37
|
queryParams: compactDict(queryParams),
|
|
38
|
-
});
|
|
38
|
+
})).data;
|
|
39
39
|
}
|
|
40
40
|
async get(name) {
|
|
41
|
-
return this.client.get(`/v1/node-types/name/${name}`);
|
|
41
|
+
return (await this.client.get(`/v1/node-types/name/${name}`)).data;
|
|
42
42
|
}
|
|
43
43
|
async search(query, queryParams) {
|
|
44
|
-
const
|
|
45
|
-
const nodes = coerceNodes(
|
|
44
|
+
const data = await this.list(queryParams);
|
|
45
|
+
const nodes = coerceNodes(data);
|
|
46
46
|
const needle = query.toLowerCase();
|
|
47
47
|
const matches = nodes.filter((node) => JSON.stringify(node).toLowerCase().includes(needle));
|
|
48
48
|
return {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
count: matches.length,
|
|
54
|
-
body: matches,
|
|
55
|
-
},
|
|
49
|
+
status: data?.["status"],
|
|
50
|
+
query,
|
|
51
|
+
count: matches.length,
|
|
52
|
+
body: matches,
|
|
56
53
|
};
|
|
57
54
|
}
|
|
58
55
|
async dynamicOptions(options) {
|
|
@@ -65,9 +62,9 @@ export class NodeTypesResource {
|
|
|
65
62
|
};
|
|
66
63
|
if (options.searchTerm != null)
|
|
67
64
|
body["search_term"] = options.searchTerm;
|
|
68
|
-
return this.client.post(`/v1/node-types/name/${options.name}/dynamic-options`, {
|
|
65
|
+
return (await this.client.post(`/v1/node-types/name/${options.name}/dynamic-options`, {
|
|
69
66
|
json: body,
|
|
70
|
-
});
|
|
67
|
+
})).data;
|
|
71
68
|
}
|
|
72
69
|
}
|
|
73
70
|
//# sourceMappingURL=node-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-types.js","sourceRoot":"","sources":["../../src/resources/node-types.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"node-types.js","sourceRoot":"","sources":["../../src/resources/node-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,SAAS,WAAW,CAAC,MA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,IAAI;SAC9B,CAAC;QACF,IAAI,OAAO,CAAC,UAAU,IAAI,IAAI;YAAE,IAAI,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;QACzE,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,OAAO,CAAC,IAAI,kBAAkB,EAAE;YACpF,IAAI,EAAE,IAAI;SACX,CAAC,CAAC,CAAC,IAAI,CAAC;IACX,CAAC;CACF"}
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* Upload-session resource helpers.
|
|
3
3
|
*/
|
|
4
4
|
import type { AgenticFlowSDK } from "../core.js";
|
|
5
|
-
import type { APIResponse } from "../types.js";
|
|
6
5
|
export declare class UploadsResource {
|
|
7
6
|
private client;
|
|
8
7
|
constructor(client: AgenticFlowSDK);
|
|
9
|
-
inputCreate(payload: Record<string, unknown>): Promise<
|
|
10
|
-
inputStatus(sessionId: string): Promise<
|
|
8
|
+
inputCreate(payload: Record<string, unknown>): Promise<unknown>;
|
|
9
|
+
inputStatus(sessionId: string): Promise<unknown>;
|
|
11
10
|
}
|
|
12
11
|
//# sourceMappingURL=uploads.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../../src/resources/uploads.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../../src/resources/uploads.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,qBAAa,eAAe;IACd,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IAEpC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAI/D,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAGvD"}
|
|
@@ -7,10 +7,10 @@ export class UploadsResource {
|
|
|
7
7
|
this.client = client;
|
|
8
8
|
}
|
|
9
9
|
async inputCreate(payload) {
|
|
10
|
-
return this.client.post("/v1/uploads/inputs/anonymous", { json: payload });
|
|
10
|
+
return (await this.client.post("/v1/uploads/inputs/anonymous", { json: payload })).data;
|
|
11
11
|
}
|
|
12
12
|
async inputStatus(sessionId) {
|
|
13
|
-
return this.client.get(`/v1/uploads/sessions/${sessionId}/anonymous`);
|
|
13
|
+
return (await this.client.get(`/v1/uploads/sessions/${sessionId}/anonymous`)).data;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=uploads.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../../src/resources/uploads.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../../src/resources/uploads.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,OAAO,eAAe;IACN;IAApB,YAAoB,MAAsB;QAAtB,WAAM,GAAN,MAAM,CAAgB;IAAI,CAAC;IAE/C,KAAK,CAAC,WAAW,CAAC,OAAgC;QAChD,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,8BAA8B,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1F,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,SAAiB;QACjC,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,wBAAwB,SAAS,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC;IACrF,CAAC;CACF"}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Get by ID does NOT require workspace_id.
|
|
6
6
|
*/
|
|
7
7
|
import type { AgenticFlowSDK } from "../core.js";
|
|
8
|
-
import type { APIResponse } from "../types.js";
|
|
9
8
|
export declare class WorkflowsResource {
|
|
10
9
|
private client;
|
|
11
10
|
constructor(client: AgenticFlowSDK);
|
|
@@ -16,30 +15,30 @@ export declare class WorkflowsResource {
|
|
|
16
15
|
searchQuery?: string;
|
|
17
16
|
limit?: number;
|
|
18
17
|
offset?: number;
|
|
19
|
-
}): Promise<
|
|
20
|
-
create(payload: unknown, workspaceId?: string): Promise<
|
|
21
|
-
get(workflowId: string): Promise<
|
|
22
|
-
getAnonymous(workflowId: string): Promise<
|
|
23
|
-
update(workflowId: string, payload: unknown, workspaceId?: string): Promise<
|
|
24
|
-
delete(workflowId: string, workspaceId?: string): Promise<
|
|
25
|
-
run(payload: unknown): Promise<
|
|
26
|
-
getRun(workflowRunId: string): Promise<
|
|
27
|
-
runAnonymous(payload: unknown): Promise<
|
|
28
|
-
getRunAnonymous(workflowRunId: string): Promise<
|
|
18
|
+
}): Promise<unknown>;
|
|
19
|
+
create(payload: unknown, workspaceId?: string): Promise<unknown>;
|
|
20
|
+
get(workflowId: string): Promise<unknown>;
|
|
21
|
+
getAnonymous(workflowId: string): Promise<unknown>;
|
|
22
|
+
update(workflowId: string, payload: unknown, workspaceId?: string): Promise<unknown>;
|
|
23
|
+
delete(workflowId: string, workspaceId?: string): Promise<unknown>;
|
|
24
|
+
run(payload: unknown): Promise<unknown>;
|
|
25
|
+
getRun(workflowRunId: string): Promise<unknown>;
|
|
26
|
+
runAnonymous(payload: unknown): Promise<unknown>;
|
|
27
|
+
getRunAnonymous(workflowRunId: string): Promise<unknown>;
|
|
29
28
|
listRuns(workflowId: string, options?: {
|
|
30
29
|
workspaceId?: string;
|
|
31
30
|
limit?: number;
|
|
32
31
|
offset?: number;
|
|
33
32
|
sortOrder?: "asc" | "desc";
|
|
34
|
-
}): Promise<
|
|
33
|
+
}): Promise<unknown>;
|
|
35
34
|
runHistory(workflowId: string, options?: {
|
|
36
35
|
limit?: number;
|
|
37
36
|
offset?: number;
|
|
38
|
-
}): Promise<
|
|
39
|
-
validate(payload: unknown): Promise<
|
|
40
|
-
getReferenceImpact(workflowId: string): Promise<
|
|
41
|
-
like(workflowId: string): Promise<
|
|
42
|
-
unlike(workflowId: string): Promise<
|
|
43
|
-
getLikeStatus(workflowId: string): Promise<
|
|
37
|
+
}): Promise<unknown>;
|
|
38
|
+
validate(payload: unknown): Promise<unknown>;
|
|
39
|
+
getReferenceImpact(workflowId: string): Promise<unknown>;
|
|
40
|
+
like(workflowId: string): Promise<unknown>;
|
|
41
|
+
unlike(workflowId: string): Promise<unknown>;
|
|
42
|
+
getLikeStatus(workflowId: string): Promise<unknown>;
|
|
44
43
|
}
|
|
45
44
|
//# sourceMappingURL=workflows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/resources/workflows.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/resources/workflows.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,qBAAa,iBAAiB;IAChB,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IAG1C,OAAO,CAAC,kBAAkB;IAOpB,IAAI,CAAC,OAAO,GAAE;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACZ,GAAG,OAAO,CAAC,OAAO,CAAC;IAYnB,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CA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,OAAO,CAAC,OAAO,CAAC;IAI1C,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI5C,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAG1D"}
|
|
@@ -23,46 +23,46 @@ export class WorkflowsResource {
|
|
|
23
23
|
queryParams["limit"] = options.limit;
|
|
24
24
|
if (options.offset != null)
|
|
25
25
|
queryParams["offset"] = options.offset;
|
|
26
|
-
return this.client.get(`/v1/workspaces/${wsId}/workflows`, { queryParams });
|
|
26
|
+
return (await this.client.get(`/v1/workspaces/${wsId}/workflows`, { queryParams })).data;
|
|
27
27
|
}
|
|
28
28
|
// ── Create Workflow Model ───────────────────────────────────────────
|
|
29
29
|
async create(payload, workspaceId) {
|
|
30
30
|
const wsId = this.resolveWorkspaceId(workspaceId);
|
|
31
|
-
return this.client.post(`/v1/workspaces/${wsId}/workflows`, { json: payload });
|
|
31
|
+
return (await this.client.post(`/v1/workspaces/${wsId}/workflows`, { json: payload })).data;
|
|
32
32
|
}
|
|
33
33
|
// ── Get Workflow Model ─────────────────────────────────────────────
|
|
34
34
|
async get(workflowId) {
|
|
35
|
-
return this.client.get(`/v1/workflows/${workflowId}`);
|
|
35
|
+
return (await this.client.get(`/v1/workflows/${workflowId}`)).data;
|
|
36
36
|
}
|
|
37
37
|
// ── Get Anonymous Model ────────────────────────────────────────────
|
|
38
38
|
async getAnonymous(workflowId) {
|
|
39
|
-
return this.client.get(`/v1/workflows/anonymous/${workflowId}`);
|
|
39
|
+
return (await this.client.get(`/v1/workflows/anonymous/${workflowId}`)).data;
|
|
40
40
|
}
|
|
41
41
|
// ── Update Workflow Model ──────────────────────────────────────────
|
|
42
42
|
async update(workflowId, payload, workspaceId) {
|
|
43
43
|
const wsId = this.resolveWorkspaceId(workspaceId);
|
|
44
|
-
return this.client.put(`/v1/workspaces/${wsId}/workflows/${workflowId}`, { json: payload });
|
|
44
|
+
return (await this.client.put(`/v1/workspaces/${wsId}/workflows/${workflowId}`, { json: payload })).data;
|
|
45
45
|
}
|
|
46
46
|
// ── Delete Workflow Model ──────────────────────────────────────────
|
|
47
47
|
async delete(workflowId, workspaceId) {
|
|
48
48
|
const wsId = this.resolveWorkspaceId(workspaceId);
|
|
49
|
-
return this.client.delete(`/v1/workspaces/${wsId}/workflows/${workflowId}`);
|
|
49
|
+
return (await this.client.delete(`/v1/workspaces/${wsId}/workflows/${workflowId}`)).data;
|
|
50
50
|
}
|
|
51
51
|
// ── Create Workflow Run Model ──────────────────────────────────────
|
|
52
52
|
async run(payload) {
|
|
53
|
-
return this.client.post("/v1/workflow_runs/", { json: payload });
|
|
53
|
+
return (await this.client.post("/v1/workflow_runs/", { json: payload })).data;
|
|
54
54
|
}
|
|
55
55
|
// ── Get Workflow Run Model ─────────────────────────────────────────
|
|
56
56
|
async getRun(workflowRunId) {
|
|
57
|
-
return this.client.get(`/v1/workflow_runs/${workflowRunId}`);
|
|
57
|
+
return (await this.client.get(`/v1/workflow_runs/${workflowRunId}`)).data;
|
|
58
58
|
}
|
|
59
59
|
// ── Create Workflow Run Model Anonymous ─────────────────────────────
|
|
60
60
|
async runAnonymous(payload) {
|
|
61
|
-
return this.client.post("/v1/workflow_runs/anonymous", { json: payload });
|
|
61
|
+
return (await this.client.post("/v1/workflow_runs/anonymous", { json: payload })).data;
|
|
62
62
|
}
|
|
63
63
|
// ── Get Workflow Run Model Anonymous ────────────────────────────────
|
|
64
64
|
async getRunAnonymous(workflowRunId) {
|
|
65
|
-
return this.client.get(`/v1/workflow_runs/anonymous/${workflowRunId}`);
|
|
65
|
+
return (await this.client.get(`/v1/workflow_runs/anonymous/${workflowRunId}`)).data;
|
|
66
66
|
}
|
|
67
67
|
// ── List Runs ─────────────────────────────────────────────────────
|
|
68
68
|
async listRuns(workflowId, options = {}) {
|
|
@@ -74,7 +74,7 @@ export class WorkflowsResource {
|
|
|
74
74
|
queryParams["offset"] = options.offset;
|
|
75
75
|
if (options.sortOrder != null)
|
|
76
76
|
queryParams["sort_order"] = options.sortOrder;
|
|
77
|
-
return this.client.get(`/v1/workspaces/${wsId}/workflows/${workflowId}/runs`, { queryParams });
|
|
77
|
+
return (await this.client.get(`/v1/workspaces/${wsId}/workflows/${workflowId}/runs`, { queryParams })).data;
|
|
78
78
|
}
|
|
79
79
|
// ── Run History ──────────────────────────────────────────────────
|
|
80
80
|
async runHistory(workflowId, options = {}) {
|
|
@@ -83,25 +83,25 @@ export class WorkflowsResource {
|
|
|
83
83
|
queryParams["limit"] = options.limit;
|
|
84
84
|
if (options.offset != null)
|
|
85
85
|
queryParams["offset"] = options.offset;
|
|
86
|
-
return this.client.get(`/v1/workflows/${workflowId}/run_history`, { queryParams });
|
|
86
|
+
return (await this.client.get(`/v1/workflows/${workflowId}/run_history`, { queryParams })).data;
|
|
87
87
|
}
|
|
88
88
|
// ── Validate ─────────────────────────────────────────────────────
|
|
89
89
|
async validate(payload) {
|
|
90
|
-
return this.client.post("/v1/workflows/utils/validate_create_workflow_model", { json: payload });
|
|
90
|
+
return (await this.client.post("/v1/workflows/utils/validate_create_workflow_model", { json: payload })).data;
|
|
91
91
|
}
|
|
92
92
|
// ── Get Reference Impact ───────────────────────────────────────────
|
|
93
93
|
async getReferenceImpact(workflowId) {
|
|
94
|
-
return this.client.get(`/v1/workflows/${workflowId}/reference-impact`);
|
|
94
|
+
return (await this.client.get(`/v1/workflows/${workflowId}/reference-impact`)).data;
|
|
95
95
|
}
|
|
96
96
|
// ── Like / Unlike / Like Status ────────────────────────────────────
|
|
97
97
|
async like(workflowId) {
|
|
98
|
-
return this.client.post(`/v1/workflows/${workflowId}/like`);
|
|
98
|
+
return (await this.client.post(`/v1/workflows/${workflowId}/like`)).data;
|
|
99
99
|
}
|
|
100
100
|
async unlike(workflowId) {
|
|
101
|
-
return this.client.post(`/v1/workflows/${workflowId}/unlike`);
|
|
101
|
+
return (await this.client.post(`/v1/workflows/${workflowId}/unlike`)).data;
|
|
102
102
|
}
|
|
103
103
|
async getLikeStatus(workflowId) {
|
|
104
|
-
return this.client.get(`/v1/workflows/${workflowId}/like_status`);
|
|
104
|
+
return (await this.client.get(`/v1/workflows/${workflowId}/like_status`)).data;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
//# sourceMappingURL=workflows.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../src/resources/workflows.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../src/resources/workflows.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,iBAAiB;IACR;IAApB,YAAoB,MAAsB;QAAtB,WAAM,GAAN,MAAM,CAAgB;IAAI,CAAC;IAE/C,sEAAsE;IAC9D,kBAAkB,CAAC,WAAoB;QAC7C,MAAM,IAAI,GAAG,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACpD,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,uEAAuE;IACvE,KAAK,CAAC,IAAI,CAAC,UAMP,EAAE;QACJ,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC1D,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QAC7D,MAAM,WAAW,GAA4B,EAAE,CAAC;QAChD,IAAI,SAAS,IAAI,IAAI;YAAE,WAAW,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;QAC7D,IAAI,OAAO,CAAC,WAAW,IAAI,IAAI;YAAE,WAAW,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;QACnF,IAAI,OAAO,CAAC,KAAK,IAAI,IAAI;YAAE,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,KAAK,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