@cognigy/rest-api-client
Version:
Cognigy REST-Client
248 lines • 6.81 kB
JavaScript
/* Custom modules */
import { createNodeDescriptor } from "../createNodeDescriptor";
export const ALL_FIELDS = createNodeDescriptor({
type: "allFields",
defaultLabel: "All Fields",
appearance: {
showIcon: false,
},
fields: [
{
key: "text",
type: "text",
label: "Text Message",
defaultValue: "Default Value",
description: "Lorem Ipsum Dolor Sit Amet lkj afsdlkj dfsalkj;sdf alkjdfs lkjdf salkjdf slkj; sdflkjsdf lkj;sd flkjdf sljksdf alk;j adsjlk; sdflkj;sdf lkj; fsadlkjsdflk;jsdf alkj; sdflkj;d sflk;j sdflkj;sdf lkj;",
params: { required: true },
},
{
key: "adaptivecard",
type: "adaptivecard",
label: "Adaptive Card",
description: "Create an Adaptive Card using this JSON editor",
defaultValue: '{"$schema":"http://adaptivecards.io/schemas/adaptive-card.json","type":"AdaptiveCard","version":"1.0","body":[]}'
},
{
key: "agentAssistConfig",
type: "agentAssistConfig",
label: "Copilot Config",
description: "Create an Copilot Config using this JSON editor",
},
{
key: "backgroundSelector",
type: "backgroundSelector",
label: "Background Selector",
description: "Give the user the ability to select a background image or color",
},
{
key: "date",
type: "date",
label: "Date",
params: {
locale: "de-DE",
disabled: true,
},
},
{
key: "datetime",
type: "datetime",
label: "Date Time",
params: {
locale: "de-DE",
},
},
{
key: "time",
type: "time",
label: "Time",
params: {
locale: "de-DE",
},
},
{
key: "daterange",
type: "daterange",
label: "Date Range",
params: {
locale: "de-DE",
},
},
{
key: "handoverProvider",
type: "handoverProvider",
label: "Handover Provider Configuration",
description: "Select and configure a handover provider",
},
{
key: "select",
type: "select",
label: "Select",
params: {
options: [
{
label: "こちら",
value: "Value 1",
},
{
label: "田中さん",
value: "Value 2",
},
],
},
},
{
key: "checkbox",
type: "checkbox",
label: "Checkbox",
},
{
key: "json",
type: "json",
label: "Json",
},
{
key: "typescript",
type: "typescript",
label: "Typescript",
},
{
key: "xml",
type: "xml",
label: "Xml",
},
{
key: "toggle",
type: "toggle",
label: "Toggle",
},
{
key: "cognigyText",
type: "cognigyText",
label: "Cognigy Text",
},
{
key: "textArray",
type: "textArray",
label: "Text Array",
},
{
key: "chipInput",
type: "chipInput",
label: "Chip Input",
},
{
key: "number",
type: "number",
label: "Number",
},
{
key: "slider",
type: "slider",
label: "Slider",
params: {
min: 0,
max: 10,
step: 1,
},
defaultValue: [1, 5],
},
{
key: "flow",
type: "flow",
label: "flow",
},
{
key: "node",
type: "node",
label: "node",
},
{
key: "flowNode",
type: "flowNode",
label: "flowNode",
},
{
key: "lexicon",
type: "lexicon",
label: "lexicon",
},
{
key: "condition",
type: "condition",
label: "Condition",
},
{
key: "showEntitySelects",
type: "toggle",
label: "Show Entity Selects",
defaultValue: false,
},
{
key: "state",
type: "state",
label: "State",
},
{
key: "text",
type: "cognigyText",
label: "Text"
},
],
sections: [
{
key: "dateFields",
defaultCollapsed: true,
label: "Date Fields",
fields: ["date", "datetime", "time", "daterange"],
},
{
key: "codeEditors",
defaultCollapsed: true,
label: "Code Editors",
fields: ["json", "typescript", "xml", "INVALID_KEY_TEST"],
},
{
key: "entitySelects",
defaultCollapsed: false,
label: "Entity Selects",
fields: ["flow", "node", "flowNode", "lexicon"],
condition: {
key: "showEntitySelects",
value: true
}
}
],
form: [
{ type: "field", key: "text" },
{ type: "field", key: "adaptivecard" },
{ type: "field", key: "select" },
{ type: "section", key: "dateFields" },
{ type: "section", key: "codeEditors" },
{ type: "field", key: "text" },
{ type: "field", key: "select" },
{ type: "field", key: "lexicon" },
{ type: "field", key: "condition" },
{ type: "field", key: "slide" },
{ type: "field", key: "node" },
{ type: "field", key: "flow" },
{ type: "field", key: "flowNode" },
{ type: "field", key: "INVALID_KEY_TEST" },
{ type: "field", key: "showEntitySelects" },
{ type: "section", key: "entitySelects" },
{ type: "field", key: "state" },
{ type: "field", key: "cognigyText" },
],
preview: {
key: "text",
type: "text",
},
tags: ["data"],
tokens: [
{
label: "word count",
type: "input",
script: "ci.text.split(' ').length",
},
],
});
//# sourceMappingURL=allFields.js.map