@pixelml/agenticflow-sdk 1.0.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 +253 -0
- package/dist/core.d.ts +52 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +183 -0
- package/dist/core.js.map +1 -0
- package/dist/exceptions.d.ts +50 -0
- package/dist/exceptions.d.ts.map +1 -0
- package/dist/exceptions.js +78 -0
- package/dist/exceptions.js.map +1 -0
- package/dist/http.d.ts +20 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +99 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/agents.d.ts +37 -0
- package/dist/resources/agents.d.ts.map +1 -0
- package/dist/resources/agents.js +88 -0
- package/dist/resources/agents.js.map +1 -0
- package/dist/resources/connections.d.ts +36 -0
- package/dist/resources/connections.d.ts.map +1 -0
- package/dist/resources/connections.js +77 -0
- package/dist/resources/connections.js.map +1 -0
- package/dist/resources/index.d.ts +6 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +6 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/node-types.d.ts +21 -0
- package/dist/resources/node-types.d.ts.map +1 -0
- package/dist/resources/node-types.js +73 -0
- package/dist/resources/node-types.js.map +1 -0
- package/dist/resources/uploads.d.ts +12 -0
- package/dist/resources/uploads.d.ts.map +1 -0
- package/dist/resources/uploads.js +16 -0
- package/dist/resources/uploads.js.map +1 -0
- package/dist/resources/workflows.d.ts +45 -0
- package/dist/resources/workflows.d.ts.map +1 -0
- package/dist/resources/workflows.js +107 -0
- package/dist/resources/workflows.js.map +1 -0
- package/dist/types.d.ts +15 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +37 -0
- package/dist/types.js.map +1 -0
- package/package.json +32 -0
package/dist/http.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministic HTTP transport layer used by the SDK core.
|
|
3
|
+
*/
|
|
4
|
+
import { NetworkError, RequestTimeoutError } from "./exceptions.js";
|
|
5
|
+
export class DeterministicHTTPClient {
|
|
6
|
+
timeout;
|
|
7
|
+
constructor(options) {
|
|
8
|
+
this.timeout = options?.timeout ?? 30_000;
|
|
9
|
+
}
|
|
10
|
+
async request(options) {
|
|
11
|
+
const effectiveHeaders = normalizeHeaders(options.headers);
|
|
12
|
+
const effectiveTimeout = options.timeout ?? this.timeout;
|
|
13
|
+
let url = options.url;
|
|
14
|
+
const normalizedParams = normalizeParams(options.params);
|
|
15
|
+
if (normalizedParams) {
|
|
16
|
+
const searchParams = new URLSearchParams();
|
|
17
|
+
for (const [key, value] of Object.entries(normalizedParams)) {
|
|
18
|
+
if (Array.isArray(value)) {
|
|
19
|
+
for (const v of value)
|
|
20
|
+
searchParams.append(key, v);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
searchParams.append(key, value);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const qs = searchParams.toString();
|
|
27
|
+
if (qs)
|
|
28
|
+
url += (url.includes("?") ? "&" : "?") + qs;
|
|
29
|
+
}
|
|
30
|
+
let body;
|
|
31
|
+
if (options.json !== undefined && options.json !== null) {
|
|
32
|
+
body = JSON.stringify(options.json);
|
|
33
|
+
if (!effectiveHeaders["content-type"]) {
|
|
34
|
+
effectiveHeaders["content-type"] = "application/json";
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else if (typeof options.data === "string") {
|
|
38
|
+
body = options.data;
|
|
39
|
+
}
|
|
40
|
+
const controller = new AbortController();
|
|
41
|
+
const timer = setTimeout(() => controller.abort(), effectiveTimeout);
|
|
42
|
+
try {
|
|
43
|
+
const response = await fetch(url, {
|
|
44
|
+
method: options.method,
|
|
45
|
+
headers: effectiveHeaders,
|
|
46
|
+
body,
|
|
47
|
+
signal: controller.signal,
|
|
48
|
+
});
|
|
49
|
+
return response;
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
if (err instanceof DOMException && err.name === "AbortError") {
|
|
53
|
+
throw new RequestTimeoutError("Request timed out.", { cause: err });
|
|
54
|
+
}
|
|
55
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
56
|
+
throw new NetworkError(`Network request failed for ${url}: ${message}`, {
|
|
57
|
+
cause: err instanceof Error ? err : undefined,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
finally {
|
|
61
|
+
clearTimeout(timer);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function normalizeHeaders(headers) {
|
|
66
|
+
if (!headers)
|
|
67
|
+
return {};
|
|
68
|
+
const normalized = {};
|
|
69
|
+
for (const key of Object.keys(headers).sort()) {
|
|
70
|
+
const value = headers[key];
|
|
71
|
+
if (value != null) {
|
|
72
|
+
normalized[key] = String(value);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return normalized;
|
|
76
|
+
}
|
|
77
|
+
function normalizeParams(params) {
|
|
78
|
+
if (!params)
|
|
79
|
+
return null;
|
|
80
|
+
const normalized = {};
|
|
81
|
+
for (const key of Object.keys(params).sort()) {
|
|
82
|
+
const value = params[key];
|
|
83
|
+
if (value == null)
|
|
84
|
+
continue;
|
|
85
|
+
if (Array.isArray(value)) {
|
|
86
|
+
normalized[key] = value.map(scalarToQuery);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
normalized[key] = scalarToQuery(value);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return Object.keys(normalized).length > 0 ? normalized : null;
|
|
93
|
+
}
|
|
94
|
+
function scalarToQuery(value) {
|
|
95
|
+
if (typeof value === "boolean")
|
|
96
|
+
return value ? "true" : "false";
|
|
97
|
+
return String(value);
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=http.js.map
|
package/dist/http.js.map
ADDED
|
@@ -0,0 +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;IACH,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;AAChE,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,OAAO,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAChE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SDK public exports.
|
|
3
|
+
*/
|
|
4
|
+
export { AgenticFlowSDK, DEFAULT_BASE_URL, AGENTICFLOW_API_KEY, WORKSPACE_ID, PROJECT_ID } from "./core.js";
|
|
5
|
+
export type { AgenticFlowSDKOptions } from "./core.js";
|
|
6
|
+
export type { APIResponse } from "./types.js";
|
|
7
|
+
export { fromFetchResponse } from "./types.js";
|
|
8
|
+
export { AgenticFlowError, NetworkError, RequestTimeoutError, APIError, ValidationError, AuthenticationError, AuthorizationError, NotFoundError, ConflictError, RateLimitError, ServerError, } from "./exceptions.js";
|
|
9
|
+
export { AgentsResource, WorkflowsResource, ConnectionsResource, NodeTypesResource, UploadsResource, } from "./resources/index.js";
|
|
10
|
+
import { AgenticFlowSDK, type AgenticFlowSDKOptions } from "./core.js";
|
|
11
|
+
import { AgentsResource } from "./resources/agents.js";
|
|
12
|
+
import { WorkflowsResource } from "./resources/workflows.js";
|
|
13
|
+
import { ConnectionsResource } from "./resources/connections.js";
|
|
14
|
+
import { NodeTypesResource } from "./resources/node-types.js";
|
|
15
|
+
import { UploadsResource } from "./resources/uploads.js";
|
|
16
|
+
export interface AgenticFlowClient {
|
|
17
|
+
/** Agent CRUD, streaming, publishing, uploads */
|
|
18
|
+
agents: AgentsResource;
|
|
19
|
+
/** Workflow CRUD, runs, history */
|
|
20
|
+
workflows: WorkflowsResource;
|
|
21
|
+
/** App-connection CRUD, categories, health checks */
|
|
22
|
+
connections: ConnectionsResource;
|
|
23
|
+
/** Node-type discovery, search, dynamic options */
|
|
24
|
+
nodeTypes: NodeTypesResource;
|
|
25
|
+
/** Anonymous upload sessions */
|
|
26
|
+
uploads: UploadsResource;
|
|
27
|
+
/** Low-level SDK instance for advanced / raw requests */
|
|
28
|
+
sdk: AgenticFlowSDK;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Create a fully-wired AgenticFlow client.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* import { createClient } from "@pixelml/agenticflow-sdk";
|
|
36
|
+
*
|
|
37
|
+
* const client = createClient({
|
|
38
|
+
* apiKey: process.env.AGENTICFLOW_API_KEY,
|
|
39
|
+
* workspaceId: process.env.WORKSPACE_ID,
|
|
40
|
+
* projectId: process.env.PROJECT_ID,
|
|
41
|
+
* });
|
|
42
|
+
*
|
|
43
|
+
* const agents = await client.agents.list();
|
|
44
|
+
* const workflow = await client.workflows.get("workflow-id");
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function createClient(options?: AgenticFlowSDKOptions): AgenticFlowClient;
|
|
48
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5G,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAW,GACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,WAAW,iBAAiB;IAChC,iDAAiD;IACjD,MAAM,EAAE,cAAc,CAAC;IACvB,mCAAmC;IACnC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,qDAAqD;IACrD,WAAW,EAAE,mBAAmB,CAAC;IACjC,mDAAmD;IACnD,SAAS,EAAE,iBAAiB,CAAC;IAC7B,gCAAgC;IAChC,OAAO,EAAE,eAAe,CAAC;IACzB,yDAAyD;IACzD,GAAG,EAAE,cAAc,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,qBAA0B,GAAG,iBAAiB,CAUnF"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SDK public exports.
|
|
3
|
+
*/
|
|
4
|
+
export { AgenticFlowSDK, DEFAULT_BASE_URL, AGENTICFLOW_API_KEY, WORKSPACE_ID, PROJECT_ID } from "./core.js";
|
|
5
|
+
export { fromFetchResponse } from "./types.js";
|
|
6
|
+
export { AgenticFlowError, NetworkError, RequestTimeoutError, APIError, ValidationError, AuthenticationError, AuthorizationError, NotFoundError, ConflictError, RateLimitError, ServerError, } from "./exceptions.js";
|
|
7
|
+
export { AgentsResource, WorkflowsResource, ConnectionsResource, NodeTypesResource, UploadsResource, } from "./resources/index.js";
|
|
8
|
+
// ── createClient ────────────────────────────────────────────────────
|
|
9
|
+
import { AgenticFlowSDK } from "./core.js";
|
|
10
|
+
import { AgentsResource } from "./resources/agents.js";
|
|
11
|
+
import { WorkflowsResource } from "./resources/workflows.js";
|
|
12
|
+
import { ConnectionsResource } from "./resources/connections.js";
|
|
13
|
+
import { NodeTypesResource } from "./resources/node-types.js";
|
|
14
|
+
import { UploadsResource } from "./resources/uploads.js";
|
|
15
|
+
/**
|
|
16
|
+
* Create a fully-wired AgenticFlow client.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* import { createClient } from "@pixelml/agenticflow-sdk";
|
|
21
|
+
*
|
|
22
|
+
* const client = createClient({
|
|
23
|
+
* apiKey: process.env.AGENTICFLOW_API_KEY,
|
|
24
|
+
* workspaceId: process.env.WORKSPACE_ID,
|
|
25
|
+
* projectId: process.env.PROJECT_ID,
|
|
26
|
+
* });
|
|
27
|
+
*
|
|
28
|
+
* const agents = await client.agents.list();
|
|
29
|
+
* const workflow = await client.workflows.get("workflow-id");
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export function createClient(options = {}) {
|
|
33
|
+
const sdk = new AgenticFlowSDK(options);
|
|
34
|
+
return {
|
|
35
|
+
agents: new AgentsResource(sdk),
|
|
36
|
+
workflows: new WorkflowsResource(sdk),
|
|
37
|
+
connections: new ConnectionsResource(sdk),
|
|
38
|
+
nodeTypes: new NodeTypesResource(sdk),
|
|
39
|
+
uploads: new UploadsResource(sdk),
|
|
40
|
+
sdk,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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,GAAG;KACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agents resource — matches OpenAPI spec.
|
|
3
|
+
*
|
|
4
|
+
* Agent endpoints do NOT use workspace_id in paths.
|
|
5
|
+
* project_id is an optional query param on list/versions.
|
|
6
|
+
*/
|
|
7
|
+
import type { AgenticFlowSDK } from "../core.js";
|
|
8
|
+
import type { APIResponse } from "../types.js";
|
|
9
|
+
export declare class AgentsResource {
|
|
10
|
+
private client;
|
|
11
|
+
constructor(client: AgenticFlowSDK);
|
|
12
|
+
list(options?: {
|
|
13
|
+
projectId?: string;
|
|
14
|
+
searchQuery?: string;
|
|
15
|
+
limit?: number;
|
|
16
|
+
offset?: number;
|
|
17
|
+
}): Promise<APIResponse>;
|
|
18
|
+
create(payload: unknown): Promise<APIResponse>;
|
|
19
|
+
get(agentId: string): Promise<APIResponse>;
|
|
20
|
+
update(agentId: string, payload: unknown): Promise<APIResponse>;
|
|
21
|
+
delete(agentId: string): Promise<APIResponse>;
|
|
22
|
+
getAnonymous(agentId: string): Promise<APIResponse>;
|
|
23
|
+
stream(agentId: string, payload: unknown): Promise<APIResponse>;
|
|
24
|
+
streamAnonymous(agentId: string, payload: unknown): Promise<APIResponse>;
|
|
25
|
+
uploadFile(agentId: string, payload: unknown): Promise<APIResponse>;
|
|
26
|
+
getUploadSession(agentId: string, sessionId: string): Promise<APIResponse>;
|
|
27
|
+
uploadFileAnonymous(agentId: string, payload: unknown): Promise<APIResponse>;
|
|
28
|
+
getUploadSessionAnonymous(agentId: string, sessionId: string): Promise<APIResponse>;
|
|
29
|
+
getPublishInfo(agentId: string, options?: {
|
|
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>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -0,0 +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;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,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,WAAW,CAAC;IAWvB,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC;IAK9C,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAK1C,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC;IAK/D,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAK7C,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAKnD,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC;IAK/D,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC;IAKxE,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC;IAKnE,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAK1E,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC;IAK5E,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAKnF,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,WAAW,CAAC;IAO1F,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC;IAKhE,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC;IAKlE,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAKzD,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC;CAG9E"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export class AgentsResource {
|
|
2
|
+
client;
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
// ── List ───────────────────────────────────────────────────────────
|
|
7
|
+
async list(options = {}) {
|
|
8
|
+
const projectId = options.projectId ?? this.client.projectId;
|
|
9
|
+
const queryParams = {};
|
|
10
|
+
if (projectId != null)
|
|
11
|
+
queryParams["project_id"] = projectId;
|
|
12
|
+
if (options.searchQuery != null)
|
|
13
|
+
queryParams["search_query"] = options.searchQuery;
|
|
14
|
+
if (options.limit != null)
|
|
15
|
+
queryParams["limit"] = options.limit;
|
|
16
|
+
if (options.offset != null)
|
|
17
|
+
queryParams["offset"] = options.offset;
|
|
18
|
+
return this.client.get("/v1/agents/", { queryParams });
|
|
19
|
+
}
|
|
20
|
+
// ── Create ─────────────────────────────────────────────────────────
|
|
21
|
+
async create(payload) {
|
|
22
|
+
return this.client.post("/v1/agents/", { json: payload });
|
|
23
|
+
}
|
|
24
|
+
// ── Get by ID ──────────────────────────────────────────────────────
|
|
25
|
+
async get(agentId) {
|
|
26
|
+
return this.client.get(`/v1/agents/${agentId}`);
|
|
27
|
+
}
|
|
28
|
+
// ── Update ─────────────────────────────────────────────────────────
|
|
29
|
+
async update(agentId, payload) {
|
|
30
|
+
return this.client.put(`/v1/agents/${agentId}`, { json: payload });
|
|
31
|
+
}
|
|
32
|
+
// ── Delete ─────────────────────────────────────────────────────────
|
|
33
|
+
async delete(agentId) {
|
|
34
|
+
return this.client.delete(`/v1/agents/${agentId}`);
|
|
35
|
+
}
|
|
36
|
+
// ── Get Anonymous ──────────────────────────────────────────────────
|
|
37
|
+
async getAnonymous(agentId) {
|
|
38
|
+
return this.client.get(`/v1/agents/anonymous/${agentId}`);
|
|
39
|
+
}
|
|
40
|
+
// ── Stream (authenticated) ─────────────────────────────────────────
|
|
41
|
+
async stream(agentId, payload) {
|
|
42
|
+
return this.client.post(`/v1/agents/${agentId}/stream`, { json: payload });
|
|
43
|
+
}
|
|
44
|
+
// ── Stream Anonymous ───────────────────────────────────────────────
|
|
45
|
+
async streamAnonymous(agentId, payload) {
|
|
46
|
+
return this.client.post(`/v1/agents/anonymous/${agentId}/stream`, { json: payload });
|
|
47
|
+
}
|
|
48
|
+
// ── Upload File (authenticated) ────────────────────────────────────
|
|
49
|
+
async uploadFile(agentId, payload) {
|
|
50
|
+
return this.client.post(`/v1/agents/${agentId}/upload-file`, { json: payload });
|
|
51
|
+
}
|
|
52
|
+
// ── Get Upload Session ─────────────────────────────────────────────
|
|
53
|
+
async getUploadSession(agentId, sessionId) {
|
|
54
|
+
return this.client.get(`/v1/agents/${agentId}/upload-sessions/${sessionId}`);
|
|
55
|
+
}
|
|
56
|
+
// ── Upload File Anonymous ──────────────────────────────────────────
|
|
57
|
+
async uploadFileAnonymous(agentId, payload) {
|
|
58
|
+
return this.client.post(`/v1/agents/anonymous/${agentId}/upload-file`, { json: payload });
|
|
59
|
+
}
|
|
60
|
+
// ── Get Upload Session Anonymous ───────────────────────────────────
|
|
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 });
|
|
78
|
+
}
|
|
79
|
+
// ── Reference Impact ───────────────────────────────────────────────
|
|
80
|
+
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 });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=agents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/resources/agents.ts"],"names":[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,CAAC;CACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App Connections resource — matches OpenAPI spec.
|
|
3
|
+
*
|
|
4
|
+
* All workspace-scoped endpoints use `/v1/workspaces/{workspace_id}/app_connections/`.
|
|
5
|
+
* Note: API uses underscore `app_connections`, NOT hyphen.
|
|
6
|
+
*/
|
|
7
|
+
import type { AgenticFlowSDK } from "../core.js";
|
|
8
|
+
import type { APIResponse } from "../types.js";
|
|
9
|
+
export declare class ConnectionsResource {
|
|
10
|
+
private client;
|
|
11
|
+
constructor(client: AgenticFlowSDK);
|
|
12
|
+
private resolveWorkspaceId;
|
|
13
|
+
private resolveProjectId;
|
|
14
|
+
list(options?: {
|
|
15
|
+
workspaceId?: string;
|
|
16
|
+
projectId?: string;
|
|
17
|
+
limit?: number;
|
|
18
|
+
offset?: number;
|
|
19
|
+
}): Promise<APIResponse>;
|
|
20
|
+
create(payload: unknown, workspaceId?: string): Promise<APIResponse>;
|
|
21
|
+
getDefault(options: {
|
|
22
|
+
categoryName: string;
|
|
23
|
+
workspaceId?: string;
|
|
24
|
+
projectId?: string;
|
|
25
|
+
}): Promise<APIResponse>;
|
|
26
|
+
update(connectionId: string, payload: unknown, workspaceId?: string): Promise<APIResponse>;
|
|
27
|
+
delete(connectionId: string, workspaceId?: string): Promise<APIResponse>;
|
|
28
|
+
categories(options?: {
|
|
29
|
+
workspaceId?: string;
|
|
30
|
+
limit?: number;
|
|
31
|
+
offset?: number;
|
|
32
|
+
}): Promise<APIResponse>;
|
|
33
|
+
healthCheckPreCreate(payload: unknown): Promise<APIResponse>;
|
|
34
|
+
healthCheckPostCreate(connectionId: string): Promise<APIResponse>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=connections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../src/resources/connections.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,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CAGxE"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export class ConnectionsResource {
|
|
2
|
+
client;
|
|
3
|
+
constructor(client) {
|
|
4
|
+
this.client = client;
|
|
5
|
+
}
|
|
6
|
+
// ── helpers ────────────────────────────────────────────────────────
|
|
7
|
+
resolveWorkspaceId(workspaceId) {
|
|
8
|
+
const wsId = workspaceId ?? this.client.workspaceId;
|
|
9
|
+
if (!wsId)
|
|
10
|
+
throw new Error("workspaceId is required");
|
|
11
|
+
return wsId;
|
|
12
|
+
}
|
|
13
|
+
resolveProjectId(projectId) {
|
|
14
|
+
const pId = projectId ?? this.client.projectId;
|
|
15
|
+
if (!pId)
|
|
16
|
+
throw new Error("projectId is required");
|
|
17
|
+
return pId;
|
|
18
|
+
}
|
|
19
|
+
// ── List ───────────────────────────────────────────────────────────
|
|
20
|
+
// project_id is REQUIRED for this endpoint.
|
|
21
|
+
async list(options = {}) {
|
|
22
|
+
const wsId = this.resolveWorkspaceId(options.workspaceId);
|
|
23
|
+
const projectId = this.resolveProjectId(options.projectId);
|
|
24
|
+
const queryParams = {
|
|
25
|
+
project_id: projectId,
|
|
26
|
+
};
|
|
27
|
+
if (options.limit != null)
|
|
28
|
+
queryParams["limit"] = options.limit;
|
|
29
|
+
if (options.offset != null)
|
|
30
|
+
queryParams["offset"] = options.offset;
|
|
31
|
+
return this.client.get(`/v1/workspaces/${wsId}/app_connections/`, { queryParams });
|
|
32
|
+
}
|
|
33
|
+
// ── Create ─────────────────────────────────────────────────────────
|
|
34
|
+
async create(payload, workspaceId) {
|
|
35
|
+
const wsId = this.resolveWorkspaceId(workspaceId);
|
|
36
|
+
return this.client.post(`/v1/workspaces/${wsId}/app_connections/`, { json: payload });
|
|
37
|
+
}
|
|
38
|
+
// ── Get Default ────────────────────────────────────────────────────
|
|
39
|
+
async getDefault(options) {
|
|
40
|
+
const wsId = this.resolveWorkspaceId(options.workspaceId);
|
|
41
|
+
const projectId = this.resolveProjectId(options.projectId);
|
|
42
|
+
const queryParams = {
|
|
43
|
+
category_name: options.categoryName,
|
|
44
|
+
project_id: projectId,
|
|
45
|
+
};
|
|
46
|
+
return this.client.get(`/v1/workspaces/${wsId}/app_connections/default`, { queryParams });
|
|
47
|
+
}
|
|
48
|
+
// ── Update ─────────────────────────────────────────────────────────
|
|
49
|
+
async update(connectionId, payload, workspaceId) {
|
|
50
|
+
const wsId = this.resolveWorkspaceId(workspaceId);
|
|
51
|
+
return this.client.put(`/v1/workspaces/${wsId}/app_connections/${connectionId}`, { json: payload });
|
|
52
|
+
}
|
|
53
|
+
// ── Delete ─────────────────────────────────────────────────────────
|
|
54
|
+
async delete(connectionId, workspaceId) {
|
|
55
|
+
const wsId = this.resolveWorkspaceId(workspaceId);
|
|
56
|
+
return this.client.delete(`/v1/workspaces/${wsId}/app_connections/${connectionId}`);
|
|
57
|
+
}
|
|
58
|
+
// ── Categories ─────────────────────────────────────────────────────
|
|
59
|
+
async categories(options = {}) {
|
|
60
|
+
const wsId = this.resolveWorkspaceId(options.workspaceId);
|
|
61
|
+
const queryParams = {};
|
|
62
|
+
if (options.limit != null)
|
|
63
|
+
queryParams["limit"] = options.limit;
|
|
64
|
+
if (options.offset != null)
|
|
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`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=connections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connections.js","sourceRoot":"","s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QACJ,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC1D,MAAM,WAAW,GAA4B,EAAE,CAAC;QAChD,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,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,kBAAkB,IAAI,6BAA6B,EACnD,EAAE,WAAW,EAAE,CAChB,CAAC;IACJ,CAAC;IAED,sEAAsE;IACtE,KAAK,CAAC,oBAAoB,CAAC,OAAgB;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;IAED,sEAAsE;IACtE,KAAK,CAAC,qBAAqB,CAAC,YAAoB;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,YAAY,eAAe,CAAC,CAAC;IAC9E,CAAC;CACF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { AgentsResource } from "./agents.js";
|
|
2
|
+
export { WorkflowsResource } from "./workflows.js";
|
|
3
|
+
export { ConnectionsResource } from "./connections.js";
|
|
4
|
+
export { NodeTypesResource } from "./node-types.js";
|
|
5
|
+
export { UploadsResource } from "./uploads.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { AgentsResource } from "./agents.js";
|
|
2
|
+
export { WorkflowsResource } from "./workflows.js";
|
|
3
|
+
export { ConnectionsResource } from "./connections.js";
|
|
4
|
+
export { NodeTypesResource } from "./node-types.js";
|
|
5
|
+
export { UploadsResource } from "./uploads.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node-type resource helpers.
|
|
3
|
+
*/
|
|
4
|
+
import type { AgenticFlowSDK } from "../core.js";
|
|
5
|
+
import type { APIResponse } from "../types.js";
|
|
6
|
+
export declare class NodeTypesResource {
|
|
7
|
+
private client;
|
|
8
|
+
constructor(client: AgenticFlowSDK);
|
|
9
|
+
list(queryParams?: Record<string, unknown>): Promise<APIResponse>;
|
|
10
|
+
get(name: string): Promise<APIResponse>;
|
|
11
|
+
search(query: string, queryParams?: Record<string, unknown>): Promise<APIResponse>;
|
|
12
|
+
dynamicOptions(options: {
|
|
13
|
+
name: string;
|
|
14
|
+
fieldName: string;
|
|
15
|
+
projectId?: string;
|
|
16
|
+
inputConfig?: Record<string, unknown>;
|
|
17
|
+
connection?: string;
|
|
18
|
+
searchTerm?: string;
|
|
19
|
+
}): Promise<APIResponse>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=node-types.d.ts.map
|
|
@@ -0,0 +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;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA2B/C,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,WAAW,CAAC;IAMjE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIvC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAkBlF,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,WAAW,CAAC;CAazB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node-type resource helpers.
|
|
3
|
+
*/
|
|
4
|
+
function compactDict(values) {
|
|
5
|
+
if (!values)
|
|
6
|
+
return {};
|
|
7
|
+
const result = {};
|
|
8
|
+
for (const [k, v] of Object.entries(values)) {
|
|
9
|
+
if (v != null)
|
|
10
|
+
result[k] = v;
|
|
11
|
+
}
|
|
12
|
+
return result;
|
|
13
|
+
}
|
|
14
|
+
function coerceNodes(response) {
|
|
15
|
+
const data = response.data;
|
|
16
|
+
if (!data)
|
|
17
|
+
return [];
|
|
18
|
+
const body = data["body"];
|
|
19
|
+
if (Array.isArray(body)) {
|
|
20
|
+
return body.filter((item) => typeof item === "object" && item !== null);
|
|
21
|
+
}
|
|
22
|
+
if (body && typeof body === "object" && !Array.isArray(body)) {
|
|
23
|
+
const items = body["items"];
|
|
24
|
+
if (Array.isArray(items)) {
|
|
25
|
+
return items.filter((item) => typeof item === "object" && item !== null);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
export class NodeTypesResource {
|
|
31
|
+
client;
|
|
32
|
+
constructor(client) {
|
|
33
|
+
this.client = client;
|
|
34
|
+
}
|
|
35
|
+
async list(queryParams) {
|
|
36
|
+
return this.client.get("/v1/node-types", {
|
|
37
|
+
queryParams: compactDict(queryParams),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
async get(name) {
|
|
41
|
+
return this.client.get(`/v1/node-types/name/${name}`);
|
|
42
|
+
}
|
|
43
|
+
async search(query, queryParams) {
|
|
44
|
+
const response = await this.list(queryParams);
|
|
45
|
+
const nodes = coerceNodes(response);
|
|
46
|
+
const needle = query.toLowerCase();
|
|
47
|
+
const matches = nodes.filter((node) => JSON.stringify(node).toLowerCase().includes(needle));
|
|
48
|
+
return {
|
|
49
|
+
...response,
|
|
50
|
+
data: {
|
|
51
|
+
status: response.data?.["status"],
|
|
52
|
+
query,
|
|
53
|
+
count: matches.length,
|
|
54
|
+
body: matches,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
async dynamicOptions(options) {
|
|
59
|
+
const projectId = options.projectId ?? this.client.projectId;
|
|
60
|
+
const body = {
|
|
61
|
+
field_name: options.fieldName,
|
|
62
|
+
node_input: options.inputConfig ?? {},
|
|
63
|
+
connection: options.connection ?? null,
|
|
64
|
+
project_id: projectId ?? null,
|
|
65
|
+
};
|
|
66
|
+
if (options.searchTerm != null)
|
|
67
|
+
body["search_term"] = options.searchTerm;
|
|
68
|
+
return this.client.post(`/v1/node-types/name/${options.name}/dynamic-options`, {
|
|
69
|
+
json: body,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=node-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-types.js","sourceRoot":"","sources":["../../src/resources/node-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,SAAS,WAAW,CAAC,MAAuC;IAC1D,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IACvB,MAAM,MAAM,GAA4B,EAAE,CAAC;IAC3C,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5C,IAAI,CAAC,IAAI,IAAI;YAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,WAAW,CAAC,QAAqB;IACxC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAsC,CAAC;IAC7D,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1B,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAmC,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,CAAC,CAAC;IAC3G,CAAC;IACD,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,C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AC,QAAQ,CAAC;gBAC9D,KAAK;gBACL,KAAK,EAAE,OAAO,CAAC,MAAM;gBACrB,IAAI,EAAE,OAAO;aACd;SACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAOpB;QACC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QAC7D,MAAM,IAAI,GAA4B;YACpC,UAAU,EAAE,OAAO,CAAC,SAAS;YAC7B,UAAU,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE;YACrC,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,IAAI;YACtC,UAAU,EAAE,SAAS,IAAI,IAAI;SAC9B,CAAC;QACF,IAAI,OAAO,CAAC,UAAU,IAAI,IAAI;YAAE,IAAI,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;QACzE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,OAAO,CAAC,IAAI,kBAAkB,EAAE;YAC7E,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Upload-session resource helpers.
|
|
3
|
+
*/
|
|
4
|
+
import type { AgenticFlowSDK } from "../core.js";
|
|
5
|
+
import type { APIResponse } from "../types.js";
|
|
6
|
+
export declare class UploadsResource {
|
|
7
|
+
private client;
|
|
8
|
+
constructor(client: AgenticFlowSDK);
|
|
9
|
+
inputCreate(payload: Record<string, unknown>): Promise<APIResponse>;
|
|
10
|
+
inputStatus(sessionId: string): Promise<APIResponse>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=uploads.d.ts.map
|
|
@@ -0,0 +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;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,qBAAa,eAAe;IACd,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IAEpC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAInE,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAG3D"}
|