@trii/types 2.10.496 → 2.10.498
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/Definitions.js +6 -0
- package/dist/Conversations/Flows/Flow.d.ts +1 -0
- package/dist/Conversations/Flows/Flow.js +1 -0
- package/dist/Conversations/Flows/Nodes/NodeToolShoppingCart.d.ts +2 -0
- package/dist/Conversations/Flows/Nodes/NodeToolShoppingCart.js +81 -0
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ const Nodes_1 = require("./Nodes");
|
|
|
5
5
|
const NodeStart_1 = require("./Nodes/NodeStart");
|
|
6
6
|
const NodeToolContacts_1 = require("./Nodes/NodeToolContacts");
|
|
7
7
|
const NodeToolFunction_1 = require("./Nodes/NodeToolFunction");
|
|
8
|
+
const NodeToolShoppingCart_1 = require("./Nodes/NodeToolShoppingCart");
|
|
8
9
|
exports.triggerNodeTypeList = [
|
|
9
10
|
{
|
|
10
11
|
id: 'StartNewConversation',
|
|
@@ -124,6 +125,11 @@ exports.toolNodeTypeList = [
|
|
|
124
125
|
id: 'McpClient',
|
|
125
126
|
name: 'MCP Client',
|
|
126
127
|
definition: Nodes_1.defaultNodeToolMcpClient
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: 'ShoppingCart',
|
|
131
|
+
name: 'Shopping Cart',
|
|
132
|
+
definition: NodeToolShoppingCart_1.defaultNodeToolShoppingCart
|
|
127
133
|
}
|
|
128
134
|
];
|
|
129
135
|
exports.agentNodeTypeList = [
|
|
@@ -39,6 +39,7 @@ var NodeType;
|
|
|
39
39
|
NodeType[NodeType["TOOL_KNOWLEDGE"] = 205] = "TOOL_KNOWLEDGE";
|
|
40
40
|
NodeType[NodeType["TOOL_FUNCTION"] = 206] = "TOOL_FUNCTION";
|
|
41
41
|
NodeType[NodeType["TOOL_CALCULATOR"] = 207] = "TOOL_CALCULATOR";
|
|
42
|
+
NodeType[NodeType["TOOL_SHOPPING_CART"] = 208] = "TOOL_SHOPPING_CART";
|
|
42
43
|
NodeType[NodeType["TOOL_GOOGLE_CALENDAR"] = 251] = "TOOL_GOOGLE_CALENDAR";
|
|
43
44
|
NodeType[NodeType["TOOL_GOOGLE_MAPS"] = 252] = "TOOL_GOOGLE_MAPS";
|
|
44
45
|
})(NodeType || (exports.NodeType = NodeType = {}));
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultNodeToolShoppingCart = void 0;
|
|
4
|
+
const Flow_1 = require("../Flow");
|
|
5
|
+
exports.defaultNodeToolShoppingCart = {
|
|
6
|
+
id: "NodeToolShoppingCart-{uid}",
|
|
7
|
+
type: Flow_1.NodeType.TOOL_SHOPPING_CART,
|
|
8
|
+
category: 'tool',
|
|
9
|
+
description: "Tool for managing a shopping cart in a conversation flow.",
|
|
10
|
+
tags: [],
|
|
11
|
+
version: 1,
|
|
12
|
+
asyncLoadHandlesOut: false,
|
|
13
|
+
handlesIn: [
|
|
14
|
+
{
|
|
15
|
+
id: "in",
|
|
16
|
+
type: 'target',
|
|
17
|
+
position: 'left',
|
|
18
|
+
name: "IN",
|
|
19
|
+
nameKey: 'NODE_HANDLE_IN',
|
|
20
|
+
showName: false,
|
|
21
|
+
multiple: false
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
handlesOut: [],
|
|
25
|
+
name: "ShoppingCart",
|
|
26
|
+
nameKey: 'NODE_TOOL_SHOPPING_CART_NAME',
|
|
27
|
+
enableStatics: false,
|
|
28
|
+
properties: [
|
|
29
|
+
{
|
|
30
|
+
type: 'multiOptions',
|
|
31
|
+
id: 'generalProperties',
|
|
32
|
+
label: 'General Properties',
|
|
33
|
+
labelKey: 'NODE_TOOL_SHOPPING_CART_GENERAL_PROPERTIES',
|
|
34
|
+
optional: false,
|
|
35
|
+
options: [
|
|
36
|
+
{ id: 'contactName', label: 'Contact Name' },
|
|
37
|
+
{ id: 'shippingAddress', label: 'Shipping Address' },
|
|
38
|
+
{ id: 'sendToHome', label: 'Send to home' }
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: 'array',
|
|
43
|
+
id: 'itemProperties',
|
|
44
|
+
label: 'Item Properties',
|
|
45
|
+
labelKey: 'NODE_TOOL_FUNCTION_JAVASCRIPT_CODE',
|
|
46
|
+
optional: false,
|
|
47
|
+
array: [
|
|
48
|
+
{
|
|
49
|
+
type: 'string',
|
|
50
|
+
id: 'name',
|
|
51
|
+
label: 'Name',
|
|
52
|
+
labelKey: 'NODE_TOOL_SHOPPING_CART_ITEM_NAME',
|
|
53
|
+
default: '',
|
|
54
|
+
optional: false
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: 'options',
|
|
58
|
+
id: 'valueType',
|
|
59
|
+
label: 'Value Type',
|
|
60
|
+
labelKey: 'NODE_TOOL_SHOPPING_CART_ITEM_VALUE_TYPE',
|
|
61
|
+
optional: false,
|
|
62
|
+
default: 'string',
|
|
63
|
+
options: [
|
|
64
|
+
{ label: 'String', id: 'string' },
|
|
65
|
+
{ label: 'Number', id: 'number' },
|
|
66
|
+
{ label: 'Boolean', id: 'boolean' },
|
|
67
|
+
{ label: 'Date', id: 'date' }
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
values: undefined,
|
|
74
|
+
color: '#00bcd4', // Cyan color for the start node
|
|
75
|
+
icon: '',
|
|
76
|
+
badge: undefined,
|
|
77
|
+
hideInput: true,
|
|
78
|
+
hideOutput: false,
|
|
79
|
+
author: '',
|
|
80
|
+
documentation: '',
|
|
81
|
+
};
|