n8n-nodes-typebot 1.3.20 → 1.3.22

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.
@@ -7,10 +7,7 @@ class Typebot {
7
7
  this.description = {
8
8
  displayName: 'Typebot',
9
9
  name: 'typebot',
10
- icon: {
11
- light: 'file:typebot.svg',
12
- dark: 'file:typebot.dark.svg',
13
- },
10
+ icon: 'file:typebot.png',
14
11
  group: ['transform'],
15
12
  version: 1,
16
13
  subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
@@ -966,7 +963,7 @@ class Typebot {
966
963
  if (additionalFields.textBubbleContentFormat) {
967
964
  body.textBubbleContentFormat = additionalFields.textBubbleContentFormat;
968
965
  }
969
- responseData = await this.helpers.request({
966
+ responseData = await this.helpers.httpRequest({
970
967
  method: 'POST',
971
968
  url: `${chatBaseUrl}/v1/typebots/${publicId}/startChat`,
972
969
  body,
@@ -976,7 +973,7 @@ class Typebot {
976
973
  else if (operation === 'continueChat') {
977
974
  const sessionId = this.getNodeParameter('sessionId', i);
978
975
  const message = this.getNodeParameter('message', i);
979
- responseData = await this.helpers.request({
976
+ responseData = await this.helpers.httpRequest({
980
977
  method: 'POST',
981
978
  url: `${chatBaseUrl}/v1/sessions/${sessionId}/continueChat`,
982
979
  body: { message },
@@ -1001,7 +998,7 @@ class Typebot {
1001
998
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Prefilled Variables must be valid JSON');
1002
999
  }
1003
1000
  }
1004
- responseData = await this.helpers.request({
1001
+ responseData = await this.helpers.httpRequest({
1005
1002
  method: 'POST',
1006
1003
  url: `${chatBaseUrl}/v1/typebots/${typebotId}/preview/startChat`,
1007
1004
  body,
@@ -1010,7 +1007,7 @@ class Typebot {
1010
1007
  }
1011
1008
  else if (operation === 'updateTypebotInSession') {
1012
1009
  const sessionId = this.getNodeParameter('sessionId', i);
1013
- responseData = await this.helpers.request({
1010
+ responseData = await this.helpers.httpRequest({
1014
1011
  method: 'POST',
1015
1012
  url: `${chatBaseUrl}/v1/sessions/${sessionId}/updateTypebot`,
1016
1013
  json: true,
@@ -1026,7 +1023,7 @@ class Typebot {
1026
1023
  catch (error) {
1027
1024
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Client Logs must be valid JSON');
1028
1025
  }
1029
- responseData = await this.helpers.request({
1026
+ responseData = await this.helpers.httpRequest({
1030
1027
  method: 'POST',
1031
1028
  url: `${chatBaseUrl}/v2/sessions/${sessionId}/clientLogs`,
1032
1029
  body: { clientLogs: logs },
@@ -1043,7 +1040,7 @@ class Typebot {
1043
1040
  if (fileType) {
1044
1041
  body.fileType = fileType;
1045
1042
  }
1046
- responseData = await this.helpers.request({
1043
+ responseData = await this.helpers.httpRequest({
1047
1044
  method: 'POST',
1048
1045
  url: `${chatBaseUrl}/v2/generate-upload-url`,
1049
1046
  qs: { sessionId },
@@ -1065,7 +1062,7 @@ class Typebot {
1065
1062
  if (additionalFields.folderId) {
1066
1063
  qs.folderId = additionalFields.folderId;
1067
1064
  }
1068
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1065
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1069
1066
  method: 'GET',
1070
1067
  url: `${baseUrl}/v1/typebots`,
1071
1068
  qs,
@@ -1079,7 +1076,7 @@ class Typebot {
1079
1076
  if (migrateToLatestVersion) {
1080
1077
  qs.migrateToLatestVersion = true;
1081
1078
  }
1082
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1079
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1083
1080
  method: 'GET',
1084
1081
  url: `${baseUrl}/v1/typebots/${typebotId}`,
1085
1082
  qs,
@@ -1096,7 +1093,7 @@ class Typebot {
1096
1093
  catch (error) {
1097
1094
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Typebot Data must be valid JSON');
1098
1095
  }
1099
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1096
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1100
1097
  method: 'POST',
1101
1098
  url: `${baseUrl}/v1/typebots`,
1102
1099
  body: {
@@ -1116,7 +1113,7 @@ class Typebot {
1116
1113
  catch (error) {
1117
1114
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Update Data must be valid JSON');
1118
1115
  }
1119
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1116
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1120
1117
  method: 'PATCH',
1121
1118
  url: `${baseUrl}/v1/typebots/${typebotId}`,
1122
1119
  body: updates,
@@ -1125,7 +1122,7 @@ class Typebot {
1125
1122
  }
1126
1123
  else if (operation === 'delete') {
1127
1124
  const typebotId = this.getNodeParameter('typebotId', i);
1128
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1125
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1129
1126
  method: 'DELETE',
1130
1127
  url: `${baseUrl}/v1/typebots/${typebotId}`,
1131
1128
  json: true,
@@ -1133,7 +1130,7 @@ class Typebot {
1133
1130
  }
1134
1131
  else if (operation === 'publish') {
1135
1132
  const typebotId = this.getNodeParameter('typebotId', i);
1136
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1133
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1137
1134
  method: 'POST',
1138
1135
  url: `${baseUrl}/v1/typebots/${typebotId}/publish`,
1139
1136
  json: true,
@@ -1141,7 +1138,7 @@ class Typebot {
1141
1138
  }
1142
1139
  else if (operation === 'unpublish') {
1143
1140
  const typebotId = this.getNodeParameter('typebotId', i);
1144
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1141
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1145
1142
  method: 'POST',
1146
1143
  url: `${baseUrl}/v1/typebots/${typebotId}/unpublish`,
1147
1144
  json: true,
@@ -1149,7 +1146,7 @@ class Typebot {
1149
1146
  }
1150
1147
  else if (operation === 'getPublished') {
1151
1148
  const publicId = this.getNodeParameter('publicId', i);
1152
- responseData = await this.helpers.request({
1149
+ responseData = await this.helpers.httpRequest({
1153
1150
  method: 'GET',
1154
1151
  url: `${chatBaseUrl}/v1/publicTypebots/${publicId}`,
1155
1152
  json: true,
@@ -1165,7 +1162,7 @@ class Typebot {
1165
1162
  catch (error) {
1166
1163
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Typebot Data must be valid JSON');
1167
1164
  }
1168
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1165
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1169
1166
  method: 'POST',
1170
1167
  url: `${baseUrl}/v1/typebots/import`,
1171
1168
  body: {
@@ -1182,7 +1179,7 @@ class Typebot {
1182
1179
  else if (resource === 'result') {
1183
1180
  if (operation === 'list') {
1184
1181
  const typebotId = this.getNodeParameter('typebotId', i);
1185
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1182
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1186
1183
  method: 'GET',
1187
1184
  url: `${baseUrl}/v1/typebots/${typebotId}/results`,
1188
1185
  json: true,
@@ -1191,7 +1188,7 @@ class Typebot {
1191
1188
  else if (operation === 'get') {
1192
1189
  const typebotId = this.getNodeParameter('typebotId', i);
1193
1190
  const resultId = this.getNodeParameter('resultId', i);
1194
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1191
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1195
1192
  method: 'GET',
1196
1193
  url: `${baseUrl}/v1/typebots/${typebotId}/results/${resultId}`,
1197
1194
  json: true,
@@ -1201,7 +1198,7 @@ class Typebot {
1201
1198
  const typebotId = this.getNodeParameter('typebotId', i);
1202
1199
  const resultIds = this.getNodeParameter('resultIds', i);
1203
1200
  const ids = resultIds.split(',').map(id => id.trim());
1204
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1201
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1205
1202
  method: 'DELETE',
1206
1203
  url: `${baseUrl}/v1/typebots/${typebotId}/results`,
1207
1204
  body: { resultIds: ids },
@@ -1210,7 +1207,7 @@ class Typebot {
1210
1207
  }
1211
1208
  else if (operation === 'getStats') {
1212
1209
  const typebotId = this.getNodeParameter('typebotId', i);
1213
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1210
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1214
1211
  method: 'GET',
1215
1212
  url: `${baseUrl}/v1/typebots/${typebotId}/analytics/stats`,
1216
1213
  json: true,
@@ -1219,7 +1216,7 @@ class Typebot {
1219
1216
  else if (operation === 'listLogs') {
1220
1217
  const typebotId = this.getNodeParameter('typebotId', i);
1221
1218
  const resultId = this.getNodeParameter('resultId', i);
1222
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1219
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1223
1220
  method: 'GET',
1224
1221
  url: `${baseUrl}/v1/typebots/${typebotId}/results/${resultId}/logs`,
1225
1222
  json: true,
@@ -1231,7 +1228,7 @@ class Typebot {
1231
1228
  // =====================================
1232
1229
  else if (resource === 'workspace') {
1233
1230
  if (operation === 'list') {
1234
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1231
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1235
1232
  method: 'GET',
1236
1233
  url: `${baseUrl}/v1/workspaces`,
1237
1234
  json: true,
@@ -1239,7 +1236,7 @@ class Typebot {
1239
1236
  }
1240
1237
  else if (operation === 'get') {
1241
1238
  const workspaceId = this.getNodeParameter('workspaceId', i);
1242
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1239
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1243
1240
  method: 'GET',
1244
1241
  url: `${baseUrl}/v1/workspaces/${workspaceId}`,
1245
1242
  json: true,
@@ -1247,7 +1244,7 @@ class Typebot {
1247
1244
  }
1248
1245
  else if (operation === 'create') {
1249
1246
  const name = this.getNodeParameter('name', i);
1250
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1247
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1251
1248
  method: 'POST',
1252
1249
  url: `${baseUrl}/v1/workspaces`,
1253
1250
  body: { name },
@@ -1264,7 +1261,7 @@ class Typebot {
1264
1261
  catch (error) {
1265
1262
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Update Data must be valid JSON');
1266
1263
  }
1267
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1264
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1268
1265
  method: 'PATCH',
1269
1266
  url: `${baseUrl}/v1/workspaces/${workspaceId}`,
1270
1267
  body: updates,
@@ -1273,7 +1270,7 @@ class Typebot {
1273
1270
  }
1274
1271
  else if (operation === 'delete') {
1275
1272
  const workspaceId = this.getNodeParameter('workspaceId', i);
1276
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1273
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1277
1274
  method: 'DELETE',
1278
1275
  url: `${baseUrl}/v1/workspaces/${workspaceId}`,
1279
1276
  json: true,
@@ -1281,7 +1278,7 @@ class Typebot {
1281
1278
  }
1282
1279
  else if (operation === 'listMembers') {
1283
1280
  const workspaceId = this.getNodeParameter('workspaceId', i);
1284
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1281
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1285
1282
  method: 'GET',
1286
1283
  url: `${baseUrl}/v1/workspaces/${workspaceId}/members`,
1287
1284
  json: true,
@@ -1294,7 +1291,7 @@ class Typebot {
1294
1291
  else if (resource === 'folder') {
1295
1292
  if (operation === 'list') {
1296
1293
  const workspaceId = this.getNodeParameter('workspaceId', i);
1297
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1294
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1298
1295
  method: 'GET',
1299
1296
  url: `${baseUrl}/v1/folders`,
1300
1297
  qs: { workspaceId },
@@ -1311,7 +1308,7 @@ class Typebot {
1311
1308
  catch (error) {
1312
1309
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Folder Data must be valid JSON');
1313
1310
  }
1314
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1311
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1315
1312
  method: 'POST',
1316
1313
  url: `${baseUrl}/v1/folders`,
1317
1314
  body: {
@@ -1331,7 +1328,7 @@ class Typebot {
1331
1328
  catch (error) {
1332
1329
  throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Update Data must be valid JSON');
1333
1330
  }
1334
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1331
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1335
1332
  method: 'PATCH',
1336
1333
  url: `${baseUrl}/v1/folders/${folderId}`,
1337
1334
  body: updates,
@@ -1340,7 +1337,7 @@ class Typebot {
1340
1337
  }
1341
1338
  else if (operation === 'delete') {
1342
1339
  const folderId = this.getNodeParameter('folderId', i);
1343
- responseData = await this.helpers.requestWithAuthentication.call(this, 'typebotApi', {
1340
+ responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'typebotApi', {
1344
1341
  method: 'DELETE',
1345
1342
  url: `${baseUrl}/v1/folders/${folderId}`,
1346
1343
  json: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-typebot",
3
- "version": "1.3.20",
3
+ "version": "1.3.22",
4
4
  "description": "n8n community node for Typebot - A powerful chatbot builder integration",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",
@@ -10,6 +10,14 @@
10
10
  "conversational-ai"
11
11
  ],
12
12
  "license": "MIT",
13
+ "homepage": "https://github.com/achiya-automation/n8n-nodes-typebot#readme",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/achiya-automation/n8n-nodes-typebot.git"
17
+ },
18
+ "bugs": {
19
+ "url": "https://github.com/achiya-automation/n8n-nodes-typebot/issues"
20
+ },
13
21
  "author": {
14
22
  "name": "אחיה אוטומציה",
15
23
  "email": "a.c0504197060@gmail.com"