@trii/types 2.10.534 → 2.10.535
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/Conversations/Flows/Workflows/Workflow.d.ts +80 -0
- package/dist/Conversations/Flows/Workflows/Workflow.js +11 -0
- package/dist/Conversations/Flows/Workflows/index.d.ts +1 -0
- package/dist/Conversations/Flows/Workflows/index.js +17 -0
- package/dist/Conversations/Flows/index.d.ts +1 -0
- package/dist/Conversations/Flows/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export interface IWorkflowItem {
|
|
2
|
+
id: string;
|
|
3
|
+
spaceId: string;
|
|
4
|
+
flowId: string;
|
|
5
|
+
contactId: string;
|
|
6
|
+
contactName: string;
|
|
7
|
+
userId: string;
|
|
8
|
+
userName: string;
|
|
9
|
+
status: WorkflowStatus;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
}
|
|
12
|
+
export interface IWorkflow {
|
|
13
|
+
id: string;
|
|
14
|
+
spaceId: string;
|
|
15
|
+
name: string;
|
|
16
|
+
nodeId: string;
|
|
17
|
+
flowId: string;
|
|
18
|
+
conversationId: string;
|
|
19
|
+
contactId: string;
|
|
20
|
+
userId: string;
|
|
21
|
+
userName: string;
|
|
22
|
+
status: WorkflowStatus;
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
createdBy: string;
|
|
25
|
+
updatedAt?: Date | null;
|
|
26
|
+
updatedBy?: string | null;
|
|
27
|
+
finalizedAt?: Date | null;
|
|
28
|
+
finalizedBy?: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface IWorkflowMessage {
|
|
31
|
+
id: string;
|
|
32
|
+
spaceId: string;
|
|
33
|
+
role: 'system' | 'user' | 'assistant' | 'tool' | 'log';
|
|
34
|
+
content?: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
tool_call_id?: string;
|
|
37
|
+
tool_calls?: IToolCall[];
|
|
38
|
+
tool_responses?: IToolCall[];
|
|
39
|
+
workflowId: string;
|
|
40
|
+
nodeId: string;
|
|
41
|
+
messageId: string;
|
|
42
|
+
messageShardKey: string;
|
|
43
|
+
mediaUrl: string;
|
|
44
|
+
transcription: string;
|
|
45
|
+
toolName: string;
|
|
46
|
+
createdAt: Date;
|
|
47
|
+
createdBy: string;
|
|
48
|
+
updatedAt?: Date | null;
|
|
49
|
+
updatedBy?: string | null;
|
|
50
|
+
deletedAt?: Date | null;
|
|
51
|
+
deletedBy?: string | null;
|
|
52
|
+
startedAt: Date;
|
|
53
|
+
completedAt?: Date | null;
|
|
54
|
+
aiProviderId?: string | null;
|
|
55
|
+
aiModelId?: string | null;
|
|
56
|
+
aiPromptTokens?: number | null;
|
|
57
|
+
aiResponseTokens?: number | null;
|
|
58
|
+
aiTotalTokens?: number | null;
|
|
59
|
+
aiCost?: number | null;
|
|
60
|
+
aiError?: string | null;
|
|
61
|
+
aiLatencyMs?: number | null;
|
|
62
|
+
}
|
|
63
|
+
export interface IToolCall {
|
|
64
|
+
id: string;
|
|
65
|
+
type: string;
|
|
66
|
+
toolId: string;
|
|
67
|
+
toolName: string;
|
|
68
|
+
}
|
|
69
|
+
export interface IToolResponse {
|
|
70
|
+
id: string;
|
|
71
|
+
content: string;
|
|
72
|
+
toolCallId: string;
|
|
73
|
+
}
|
|
74
|
+
export declare enum WorkflowStatus {
|
|
75
|
+
NONE = 0,
|
|
76
|
+
WAITING = 1,
|
|
77
|
+
PROCESSING = 2,
|
|
78
|
+
FINALIZED = 4,
|
|
79
|
+
CANCELED = 5
|
|
80
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WorkflowStatus = void 0;
|
|
4
|
+
var WorkflowStatus;
|
|
5
|
+
(function (WorkflowStatus) {
|
|
6
|
+
WorkflowStatus[WorkflowStatus["NONE"] = 0] = "NONE";
|
|
7
|
+
WorkflowStatus[WorkflowStatus["WAITING"] = 1] = "WAITING";
|
|
8
|
+
WorkflowStatus[WorkflowStatus["PROCESSING"] = 2] = "PROCESSING";
|
|
9
|
+
WorkflowStatus[WorkflowStatus["FINALIZED"] = 4] = "FINALIZED";
|
|
10
|
+
WorkflowStatus[WorkflowStatus["CANCELED"] = 5] = "CANCELED";
|
|
11
|
+
})(WorkflowStatus || (exports.WorkflowStatus = WorkflowStatus = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Workflow';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Workflow"), exports);
|