@tiledesk/tiledesk-tybot-connector 0.2.139-rc1 → 0.2.139-rc3

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/CHANGELOG.md CHANGED
@@ -17,6 +17,12 @@ available on:
17
17
  - Added flowError on JSONCondition when result = null
18
18
  - Added fix on Filler -->
19
19
 
20
+ # v0.2.139-rc3
21
+ - Improved ReplaceBotV2 with slug option
22
+
23
+ # v0.2.139-rc1
24
+ - Improved ReplaceBotV2
25
+
20
26
  # v0.2.138
21
27
  - Bug-fixed: hiddenMessage not blocked
22
28
  - Bug-fixed: DirAskGPTV2 has hardcoded engine
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-tybot-connector",
3
- "version": "0.2.139-rc1",
3
+ "version": "0.2.139-rc3",
4
4
  "description": "Tiledesk Tybot connector",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -56,13 +56,20 @@ class DirReplaceBotV2 {
56
56
  const filler = new Filler();
57
57
  botName = filler.fill(botName, variables);
58
58
 
59
+ let data;
60
+ if (action.nameAsSlug && action.nameAsSlug === true) {
61
+ data.slug = botName;
62
+ } else {
63
+ data.name = botName;
64
+ }
65
+
59
66
  const HTTPREQUEST = {
60
67
  url: this.API_ENDPOINT + "/" + this.context.projectId + "/requests/" + this.requestId + "/replace",
61
68
  headers: {
62
69
  'Content-Type': 'application/json',
63
70
  'Authorization': 'JWT ' + this.context.token
64
71
  },
65
- json: { name: botName},
72
+ json: data,
66
73
  method: 'PUT'
67
74
  }
68
75