@tiledesk/tiledesk-server
Version:
The Tiledesk server module
288 lines (284 loc) • 9.84 kB
JavaScript
// const json_multiple_operation = {
// "id_faq_kb": "6543c2357be357002c682908",
// "operations": [
// {
// "type": "delete",
// "intent": {
// "webhook_enabled": false,
// "enabled": true,
// "topic": "default",
// "status": "live",
// "actions": [
// {
// "_tdActionTitle": "",
// "_tdActionId": "846d1b3c-3f2c-4a53-bf07-0b0b5cc7e3dd",
// "_tdActionType": "close"
// }
// ],
// "_id": "655b46ebbaddb8002c5a889e",
// "id_faq_kb": "6543c2357be357002c682908",
// "id_project": "64a6e63d4152c9002c927891",
// "language": "en",
// "intent_display_name": "untitled_block_4",
// "createdBy": "5ab0f3fa57066e0014bfd71e",
// "intent_id": "7c25c967-3162-451c-a7de-b240d8c8265b",
// "attributes": {
// "position": {
// "x": 2331,
// "y": -611.5
// },
// "nextBlockAction": {
// "_tdActionId": "9f12ef32-ca5f-4bc9-8a40-76a179e9ebcb",
// "_tdActionType": "intent",
// "intentName": ""
// }
// },
// "createdAt": "2023-11-20T11:45:47.448Z",
// "updatedAt": "2023-11-20T11:45:47.448Z",
// "faq_kb": [
// {
// "webhook_enabled": false,
// "type": "tilebot",
// "language": "en",
// "public": false,
// "certified": false,
// "intentsEngine": "none",
// "tags": [],
// "score": 0,
// "trained": true,
// "certifiedTags": [],
// "_id": "6543c2357be357002c682908",
// "name": "02nov16:37",
// "id_project": "64a6e63d4152c9002c927891",
// "trashed": false,
// "createdBy": "5ab0f3fa57066e0014bfd71e",
// "createdAt": "2023-11-02T15:37:25.364Z",
// "updatedAt": "2023-11-02T15:37:25.400Z",
// "url": "https://tiledesk-server-pre.herokuapp.com/modules/tilebot/ext/6543c2357be357002c682908"
// }
// ],
// "id": "655b46ebbaddb8002c5a889e"
// }
// },
// {
// "type": "put",
// "intent": {
// "webhook_enabled": false,
// "enabled": true,
// "topic": "default",
// "status": "live",
// "actions": [
// {
// "_tdActionTitle": "",
// "_tdActionId": "bee43d8a-03d7-4b51-a22a-83c55a13eadf",
// "_tdActionType": "close"
// }
// ],
// "_id": "65579a7fbcee1b003c6dd6fb",
// "id_faq_kb": "6543c2357be357002c682908",
// "id_project": "64a6e63d4152c9002c927891",
// "language": "en",
// "intent_display_name": "untitled_block_2",
// "createdBy": "5ab0f3fa57066e0014bfd71e",
// "intent_id": "ede5cf7f-ce09-49d2-921c-55a9faf099d8",
// "attributes": {
// "position": {
// "x": 1904,
// "y": -746
// },
// "nextBlockAction": {
// "_tdActionId": "481701dd-661d-45ee-97ec-7034720eb235",
// "_tdActionType": "intent",
// "intentName": ""
// }
// },
// "createdAt": "2023-11-17T16:53:19.856Z",
// "updatedAt": "2023-11-20T14:56:51.089Z",
// "answer": "",
// "question": "",
// "faq_kb": [
// {
// "webhook_enabled": false,
// "type": "tilebot",
// "language": "en",
// "public": false,
// "certified": false,
// "intentsEngine": "none",
// "tags": [],
// "score": 0,
// "trained": true,
// "certifiedTags": [],
// "_id": "6543c2357be357002c682908",
// "name": "02nov16:37",
// "id_project": "64a6e63d4152c9002c927891",
// "trashed": false,
// "createdBy": "5ab0f3fa57066e0014bfd71e",
// "createdAt": "2023-11-02T15:37:25.364Z",
// "updatedAt": "2023-11-02T15:37:25.400Z",
// "url": "https://tiledesk-server-pre.herokuapp.com/modules/tilebot/ext/6543c2357be357002c682908"
// }
// ],
// "id": "65579a7fbcee1b003c6dd6fb"
// }
// },
// {
// "type": "put",
// "intent": {
// "webhook_enabled": false,
// "enabled": true,
// "topic": "default",
// "status": "live",
// "actions": [
// {
// "_tdActionTitle": "",
// "_tdActionId": "34f6ae25-829b-4d9c-8899-5ba85a53861b",
// "_tdActionType": "reply",
// "attributes": {
// "disableInputMessage": false,
// "commands": [
// {
// "type": "wait",
// "time": 500
// },
// {
// "type": "message",
// "message": {
// "type": "text",
// "text": "A chat message will be sent to the visitor ...",
// "attributes": {
// "attachment": {
// "type": "template",
// "buttons": [
// {
// "uid": "5d18e074bded4b4b8ff2724cbfd44d04",
// "type": "action",
// "value": "Button",
// "link": "",
// "target": "blank",
// "action": "",
// "attributes": "",
// "show_echo": true
// }
// ]
// }
// }
// }
// }
// ]
// }
// }
// ],
// "_id": "655b44b3baddb8002c5a8708",
// "id_faq_kb": "6543c2357be357002c682908",
// "id_project": "64a6e63d4152c9002c927891",
// "language": "en",
// "intent_display_name": "untitled_block_3",
// "createdBy": "5ab0f3fa57066e0014bfd71e",
// "intent_id": "06e171e6-614e-4092-b949-b04e21c674f0",
// "attributes": {
// "position": {
// "x": 1851,
// "y": -435
// },
// "nextBlockAction": {
// "_tdActionId": "9cfa41bf-ef98-4bce-b37f-18eb52e17b3a",
// "_tdActionType": "intent",
// "intentName": ""
// }
// },
// "createdAt": "2023-11-20T11:36:19.054Z",
// "updatedAt": "2023-11-20T14:42:40.825Z",
// "answer": "",
// "question": "",
// "faq_kb": [
// {
// "webhook_enabled": false,
// "type": "tilebot",
// "language": "en",
// "public": false,
// "certified": false,
// "intentsEngine": "none",
// "tags": [],
// "score": 0,
// "trained": true,
// "certifiedTags": [],
// "_id": "6543c2357be357002c682908",
// "name": "02nov16:37",
// "id_project": "64a6e63d4152c9002c927891",
// "trashed": false,
// "createdBy": "5ab0f3fa57066e0014bfd71e",
// "createdAt": "2023-11-02T15:37:25.364Z",
// "updatedAt": "2023-11-02T15:37:25.400Z",
// "url": "https://tiledesk-server-pre.herokuapp.com/modules/tilebot/ext/6543c2357be357002c682908"
// }
// ],
// "id": "655b44b3baddb8002c5a8708"
// }
// }
// ]
// }
const json_multiple_operation = {
"id_faq_kb": "6543c2357be357002c682908",
"operations": [
{
"type": "delete",
"intent": {
"webhook_enabled": false,
"enabled": true,
"topic": "default",
"status": "live",
"actions": [
{
"_tdActionTitle": "",
"_tdActionId": "846d1b3c-3f2c-4a53-bf07-0b0b5cc7e3dd",
"_tdActionType": "close"
}
],
"_id": "655b46ebbaddb8002c5a889e",
"id_faq_kb": "6543c2357be357002c682908",
"id_project": "64a6e63d4152c9002c927891",
"language": "en",
"intent_display_name": "untitled_block_4",
"createdBy": "5ab0f3fa57066e0014bfd71e",
"intent_id": "7c25c967-3162-451c-a7de-b240d8c8265b",
"attributes": {
"position": {
"x": 2331,
"y": -611.5
},
"nextBlockAction": {
"_tdActionId": "9f12ef32-ca5f-4bc9-8a40-76a179e9ebcb",
"_tdActionType": "intent",
"intentName": ""
}
},
"createdAt": "2023-11-20T11:45:47.448Z",
"updatedAt": "2023-11-20T11:45:47.448Z",
"faq_kb": [
{
"webhook_enabled": false,
"type": "tilebot",
"language": "en",
"public": false,
"certified": false,
"intentsEngine": "none",
"tags": [],
"score": 0,
"trained": true,
"certifiedTags": [],
"_id": "6543c2357be357002c682908",
"name": "02nov16:37",
"id_project": "64a6e63d4152c9002c927891",
"trashed": false,
"createdBy": "5ab0f3fa57066e0014bfd71e",
"createdAt": "2023-11-02T15:37:25.364Z",
"updatedAt": "2023-11-02T15:37:25.400Z",
"url": "https://tiledesk-server-pre.herokuapp.com/modules/tilebot/ext/6543c2357be357002c682908"
}
],
"id": "655b46ebbaddb8002c5a889e"
}
}
]
}
module.exports = { json_multiple_operation };