@amaster.ai/client 1.1.42 → 1.1.43-beta.2
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/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +11 -11
- package/types/index.d.ts +3 -0
- package/types/workflow.d.ts +48 -0
package/dist/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ export { EntityGetParams, EntityListResponse, EntityQueryParams, FilterGroup, Fi
|
|
|
5
5
|
import { BpmClient } from '@amaster.ai/bpm-client';
|
|
6
6
|
export { ActivityInstanceTree, CamundaVariable, HistoryActivityInstance, HistoryProcessInstance, HistoryTask, ProcessInstance, ProcessVariable, Task, TaskFormSchema, TaskQueryParams, UserOperationLog } from '@amaster.ai/bpm-client';
|
|
7
7
|
import { WorkflowClient } from '@amaster.ai/workflow-client';
|
|
8
|
-
export { WorkflowFile, WorkflowInputValue, WorkflowRunRequest, WorkflowRunResponse } from '@amaster.ai/workflow-client';
|
|
8
|
+
export { WorkflowFile, WorkflowInputValue, WorkflowNodeUsage, WorkflowRunRequest, WorkflowRunResponse, WorkflowRunUsage, WorkflowUsageSummary } from '@amaster.ai/workflow-client';
|
|
9
9
|
import { ASRClientConfig, ASRClient, ASRHttpClientConfig, ASRHttpClient } from '@amaster.ai/asr-client';
|
|
10
10
|
export { ASRClient, ASRClientConfig, ASRHttpClient, ASRHttpClientConfig, ASRLanguage } from '@amaster.ai/asr-client';
|
|
11
11
|
import { CopilotClient } from '@amaster.ai/copilot-client';
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { EntityGetParams, EntityListResponse, EntityQueryParams, FilterGroup, Fi
|
|
|
5
5
|
import { BpmClient } from '@amaster.ai/bpm-client';
|
|
6
6
|
export { ActivityInstanceTree, CamundaVariable, HistoryActivityInstance, HistoryProcessInstance, HistoryTask, ProcessInstance, ProcessVariable, Task, TaskFormSchema, TaskQueryParams, UserOperationLog } from '@amaster.ai/bpm-client';
|
|
7
7
|
import { WorkflowClient } from '@amaster.ai/workflow-client';
|
|
8
|
-
export { WorkflowFile, WorkflowInputValue, WorkflowRunRequest, WorkflowRunResponse } from '@amaster.ai/workflow-client';
|
|
8
|
+
export { WorkflowFile, WorkflowInputValue, WorkflowNodeUsage, WorkflowRunRequest, WorkflowRunResponse, WorkflowRunUsage, WorkflowUsageSummary } from '@amaster.ai/workflow-client';
|
|
9
9
|
import { ASRClientConfig, ASRClient, ASRHttpClientConfig, ASRHttpClient } from '@amaster.ai/asr-client';
|
|
10
10
|
export { ASRClient, ASRClientConfig, ASRHttpClient, ASRHttpClientConfig, ASRLanguage } from '@amaster.ai/asr-client';
|
|
11
11
|
import { CopilotClient } from '@amaster.ai/copilot-client';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amaster.ai/client",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.43-beta.2",
|
|
4
4
|
"description": "Unified API client for Amaster platform - All services in one package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -72,16 +72,16 @@
|
|
|
72
72
|
"registry": "https://registry.npmjs.org/"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@amaster.ai/asr-client": "1.1.
|
|
76
|
-
"@amaster.ai/
|
|
77
|
-
"@amaster.ai/
|
|
78
|
-
"@amaster.ai/
|
|
79
|
-
"@amaster.ai/
|
|
80
|
-
"@amaster.ai/
|
|
81
|
-
"@amaster.ai/
|
|
82
|
-
"@amaster.ai/s3-client": "1.1.
|
|
83
|
-
"@amaster.ai/
|
|
84
|
-
"@amaster.ai/workflow-client": "1.1.
|
|
75
|
+
"@amaster.ai/asr-client": "1.1.43-beta.2",
|
|
76
|
+
"@amaster.ai/bpm-client": "1.1.43-beta.2",
|
|
77
|
+
"@amaster.ai/function-client": "1.1.43-beta.2",
|
|
78
|
+
"@amaster.ai/auth-client": "1.1.43-beta.2",
|
|
79
|
+
"@amaster.ai/copilot-client": "1.1.43-beta.2",
|
|
80
|
+
"@amaster.ai/entity-client": "1.1.43-beta.2",
|
|
81
|
+
"@amaster.ai/tts-client": "1.1.43-beta.2",
|
|
82
|
+
"@amaster.ai/s3-client": "1.1.43-beta.2",
|
|
83
|
+
"@amaster.ai/http-client": "1.1.43-beta.2",
|
|
84
|
+
"@amaster.ai/workflow-client": "1.1.43-beta.2"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"axios": "^1.11.0"
|
package/types/index.d.ts
CHANGED
|
@@ -399,8 +399,11 @@ export type {
|
|
|
399
399
|
} from "./bpm";
|
|
400
400
|
export type {
|
|
401
401
|
WorkflowClientAPI,
|
|
402
|
+
WorkflowNodeUsage,
|
|
402
403
|
WorkflowRunRequest,
|
|
403
404
|
WorkflowRunResponse,
|
|
405
|
+
WorkflowRunUsage,
|
|
406
|
+
WorkflowUsageSummary,
|
|
404
407
|
WorkflowInputValue,
|
|
405
408
|
WorkflowFile,
|
|
406
409
|
} from "./workflow";
|
package/types/workflow.d.ts
CHANGED
|
@@ -61,6 +61,52 @@ export interface WorkflowRunRequest {
|
|
|
61
61
|
files?: WorkflowFile[];
|
|
62
62
|
/** Trace ID for debugging */
|
|
63
63
|
trace_id?: string;
|
|
64
|
+
/** Include workflow and node usage in blocking run response */
|
|
65
|
+
usage?: boolean;
|
|
66
|
+
/** Include node-level usage details when `usage` is enabled */
|
|
67
|
+
usage_detail?: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Workflow usage summary.
|
|
72
|
+
*/
|
|
73
|
+
export interface WorkflowUsageSummary {
|
|
74
|
+
workflow_run_id: string;
|
|
75
|
+
status: string;
|
|
76
|
+
total_tokens: number;
|
|
77
|
+
total_steps: number;
|
|
78
|
+
elapsed_time: number;
|
|
79
|
+
created_at: number | null;
|
|
80
|
+
finished_at: number | null;
|
|
81
|
+
is_finished: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Per-node workflow usage detail.
|
|
86
|
+
*/
|
|
87
|
+
export interface WorkflowNodeUsage {
|
|
88
|
+
id: string;
|
|
89
|
+
node_execution_id: string | null;
|
|
90
|
+
index: number;
|
|
91
|
+
node_id: string;
|
|
92
|
+
node_type: string;
|
|
93
|
+
title: string;
|
|
94
|
+
status: string;
|
|
95
|
+
error: string | null;
|
|
96
|
+
elapsed_time: number;
|
|
97
|
+
created_at: number | null;
|
|
98
|
+
finished_at: number | null;
|
|
99
|
+
usage: Record<string, unknown>;
|
|
100
|
+
execution_metadata: Record<string, unknown>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Workflow usage returned when run request includes `usage: true`.
|
|
105
|
+
*/
|
|
106
|
+
export interface WorkflowRunUsage {
|
|
107
|
+
summary: WorkflowUsageSummary;
|
|
108
|
+
estimated_price_by_currency?: Record<string, string>;
|
|
109
|
+
nodes?: WorkflowNodeUsage[];
|
|
64
110
|
}
|
|
65
111
|
|
|
66
112
|
/**
|
|
@@ -92,6 +138,8 @@ export interface WorkflowRunResponse<TOutput = Record<string, unknown>> {
|
|
|
92
138
|
created_at: number;
|
|
93
139
|
/** Completion timestamp (Unix time in milliseconds) */
|
|
94
140
|
finished_at: number;
|
|
141
|
+
/** Optional usage detail returned when request includes `usage: true` */
|
|
142
|
+
usage?: WorkflowRunUsage;
|
|
95
143
|
}
|
|
96
144
|
|
|
97
145
|
// ==================== Workflow Client API ====================
|