@worktables/n8n-nodes-worktables 12.2.0 → 12.2.2

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.
@@ -2755,7 +2755,7 @@ class Worktables {
2755
2755
  };
2756
2756
  }
2757
2757
  async execute() {
2758
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23;
2758
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24;
2759
2759
  const resource = this.getNodeParameter('resource', 0);
2760
2760
  const operation = this.getNodeParameter('operation', 0);
2761
2761
  const credentials = await this.getCredentials('WorktablesApi');
@@ -3368,7 +3368,9 @@ class Worktables {
3368
3368
  const itemId = this.getNodeParameter('itemId', 0);
3369
3369
  const isSubitem = this.getNodeParameter('isSubitem', 0);
3370
3370
  const fetchAllColumns = this.getNodeParameter('fetchAllColumns', 0);
3371
- const columnIds = this.getNodeParameter('columnIds', 0);
3371
+ const columnIds = fetchAllColumns
3372
+ ? ''
3373
+ : this.getNodeParameter('columnIds', 0, false) || '';
3372
3374
  const fetchSubitems = !isSubitem && this.getNodeParameter('fetchSubitems', 0);
3373
3375
  const fetchParentItem = isSubitem && this.getNodeParameter('fetchParentItems', 0);
3374
3376
  let queryColumnValues = '';
@@ -3473,7 +3475,11 @@ class Worktables {
3473
3475
  body: { query },
3474
3476
  });
3475
3477
  const parsed = JSON.parse(rawResponse);
3476
- const item = parsed.data.items[0];
3478
+ const items = (_a = parsed.data) === null || _a === void 0 ? void 0 : _a.items;
3479
+ const item = items === null || items === void 0 ? void 0 : items[0];
3480
+ if (!item || !items || items.length === 0) {
3481
+ return [[]];
3482
+ }
3477
3483
  const columnValues = item.column_values || [];
3478
3484
  const formatted = {
3479
3485
  id: item.id,
@@ -3616,7 +3622,7 @@ class Worktables {
3616
3622
  headers,
3617
3623
  body: { query: mutation },
3618
3624
  });
3619
- const existingIds = ((_f = (_e = (_d = (_c = (_b = (_a = JSON.parse(itemConnectionResponse)) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.items) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.column_values) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.linked_item_ids) || [];
3625
+ const existingIds = ((_g = (_f = (_e = (_d = (_c = (_b = JSON.parse(itemConnectionResponse)) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.items) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.column_values) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.linked_item_ids) || [];
3620
3626
  console.log('Existing IDs:', existingIds);
3621
3627
  const newIds = columnValue.split(',').map((id) => id.trim());
3622
3628
  const mergedIds = Array.from(new Set([...existingIds, ...newIds]));
@@ -3656,8 +3662,8 @@ class Worktables {
3656
3662
  break;
3657
3663
  case 'timeline':
3658
3664
  column_values_object[columnId] = {
3659
- from: (_g = col.startDate) === null || _g === void 0 ? void 0 : _g.split('T')[0],
3660
- to: (_h = col.endDate) === null || _h === void 0 ? void 0 : _h.split('T')[0],
3665
+ from: (_h = col.startDate) === null || _h === void 0 ? void 0 : _h.split('T')[0],
3666
+ to: (_j = col.endDate) === null || _j === void 0 ? void 0 : _j.split('T')[0],
3661
3667
  };
3662
3668
  break;
3663
3669
  case 'checkbox':
@@ -3678,7 +3684,7 @@ class Worktables {
3678
3684
  };
3679
3685
  break;
3680
3686
  case 'dropdown':
3681
- const dropdownLabels = (_j = col.dropdownValue) === null || _j === void 0 ? void 0 : _j.split(',').map((label) => label.trim()).filter(Boolean);
3687
+ const dropdownLabels = (_k = col.dropdownValue) === null || _k === void 0 ? void 0 : _k.split(',').map((label) => label.trim()).filter(Boolean);
3682
3688
  if (dropdownLabels === null || dropdownLabels === void 0 ? void 0 : dropdownLabels.length) {
3683
3689
  column_values_object[columnId] = { labels: dropdownLabels };
3684
3690
  }
@@ -3711,8 +3717,8 @@ class Worktables {
3711
3717
  break;
3712
3718
  case 'phone':
3713
3719
  column_values_object[columnId] = {
3714
- phone: `${(_k = col.countryCode) === null || _k === void 0 ? void 0 : _k.split(' ')[0]}${col.phoneValue || ''}`.replace(/[^\d+]/g, ''),
3715
- countryShortName: ((_l = col.countryCode) === null || _l === void 0 ? void 0 : _l.split(' ')[1]) || '',
3720
+ phone: `${(_l = col.countryCode) === null || _l === void 0 ? void 0 : _l.split(' ')[0]}${col.phoneValue || ''}`.replace(/[^\d+]/g, ''),
3721
+ countryShortName: ((_m = col.countryCode) === null || _m === void 0 ? void 0 : _m.split(' ')[1]) || '',
3716
3722
  };
3717
3723
  break;
3718
3724
  case 'fileLink':
@@ -3745,7 +3751,7 @@ class Worktables {
3745
3751
  });
3746
3752
  try {
3747
3753
  const buttonValue = JSON.parse(buttonResponse).data.items[0].column_values[0].value;
3748
- const clicks = ((_m = JSON.parse(buttonValue)) === null || _m === void 0 ? void 0 : _m.clicks) || 0;
3754
+ const clicks = ((_o = JSON.parse(buttonValue)) === null || _o === void 0 ? void 0 : _o.clicks) || 0;
3749
3755
  column_values_object[columnId] = {
3750
3756
  clicks: clicks + 1,
3751
3757
  changed_at: new Date().toISOString(),
@@ -3772,14 +3778,13 @@ class Worktables {
3772
3778
  }
3773
3779
  }
3774
3780
  console.log('column_values_object FINAL:', JSON.stringify(column_values_object, null, 2));
3781
+ const escapedColumnValues = (0, worktablesHelpers_1.escapeGraphQLJSONString)(column_values_object);
3775
3782
  const mutation = `mutation {
3776
3783
  change_multiple_column_values(
3777
3784
  create_labels_if_missing: true,
3778
3785
  board_id: ${boardId},
3779
3786
  item_id: "${itemId}",
3780
- column_values: "${JSON.stringify(column_values_object)
3781
- .replace(/"/g, '\\"')
3782
- .replace(/(^|[^\\])\\n/g, '$1\\\\n')}"
3787
+ column_values: "${escapedColumnValues}"
3783
3788
  ) {
3784
3789
  id
3785
3790
  url
@@ -3916,8 +3921,8 @@ class Worktables {
3916
3921
  break;
3917
3922
  case 'timeline':
3918
3923
  {
3919
- const from = ((_o = col.startDate) === null || _o === void 0 ? void 0 : _o.split('T')[0]) || '';
3920
- const to = ((_p = col.endDate) === null || _p === void 0 ? void 0 : _p.split('T')[0]) || '';
3924
+ const from = ((_p = col.startDate) === null || _p === void 0 ? void 0 : _p.split('T')[0]) || '';
3925
+ const to = ((_q = col.endDate) === null || _q === void 0 ? void 0 : _q.split('T')[0]) || '';
3921
3926
  column_values_object[columnId] = { from, to };
3922
3927
  }
3923
3928
  break;
@@ -3955,8 +3960,8 @@ class Worktables {
3955
3960
  break;
3956
3961
  case 'phone':
3957
3962
  column_values_object[columnId] = {
3958
- phone: `${(_q = col.countryCode) === null || _q === void 0 ? void 0 : _q.split(' ')[0]}${col.phoneValue || ''}`.replace(/[^\d+]/g, ''),
3959
- countryShortName: ((_r = col.countryCode) === null || _r === void 0 ? void 0 : _r.split(' ')[1]) || '',
3963
+ phone: `${(_r = col.countryCode) === null || _r === void 0 ? void 0 : _r.split(' ')[0]}${col.phoneValue || ''}`.replace(/[^\d+]/g, ''),
3964
+ countryShortName: ((_s = col.countryCode) === null || _s === void 0 ? void 0 : _s.split(' ')[1]) || '',
3960
3965
  };
3961
3966
  break;
3962
3967
  case 'file':
@@ -3972,7 +3977,7 @@ class Worktables {
3972
3977
  break;
3973
3978
  case 'dropdown':
3974
3979
  {
3975
- const labels = (_s = col.dropdownValue) === null || _s === void 0 ? void 0 : _s.split(',').map((t) => t.trim()).filter((t) => t);
3980
+ const labels = (_t = col.dropdownValue) === null || _t === void 0 ? void 0 : _t.split(',').map((t) => t.trim()).filter((t) => t);
3976
3981
  if (labels && labels.length) {
3977
3982
  column_values_object[columnId] = { labels };
3978
3983
  }
@@ -4035,16 +4040,15 @@ class Worktables {
4035
4040
  if (parentBoardName.startsWith('Subitems of') || (parentBoardName && isSubitem)) {
4036
4041
  parentId = this.getNodeParameter('parentId', 0);
4037
4042
  }
4038
- const columnValuesString = JSON.stringify(column_values_object)
4039
- .replace(/"/g, '\\"')
4040
- .replace(/(^|[^\\])\\n/g, '$1\\\\n');
4043
+ const columnValuesString = (0, worktablesHelpers_1.escapeGraphQLJSONString)(column_values_object);
4041
4044
  let groupLine = groupId ? `group_id: "${groupId}",` : '';
4045
+ const escapedItemName = (0, worktablesHelpers_1.escapeGraphQLString)(itemName);
4042
4046
  const mutation = parentId
4043
4047
  ? `mutation {
4044
4048
  create_subitem(
4045
4049
  create_labels_if_missing: true,
4046
4050
  parent_item_id: ${parentId},
4047
- item_name: "${itemName}",
4051
+ item_name: "${escapedItemName}",
4048
4052
  column_values: "${columnValuesString}"
4049
4053
  ) { id name url
4050
4054
  board {
@@ -4061,7 +4065,7 @@ class Worktables {
4061
4065
  create_item(
4062
4066
  create_labels_if_missing: true,
4063
4067
  board_id: ${boardId},
4064
- item_name: "${itemName}",
4068
+ item_name: "${escapedItemName}",
4065
4069
  ${groupLine}
4066
4070
  column_values: "${columnValuesString}"
4067
4071
  ) { id name url
@@ -4096,7 +4100,7 @@ class Worktables {
4096
4100
  });
4097
4101
  }
4098
4102
  const parsedResponse = JSON.parse(responseRaw);
4099
- const itemData = ((_t = parsedResponse.data) === null || _t === void 0 ? void 0 : _t.create_item) || ((_u = parsedResponse.data) === null || _u === void 0 ? void 0 : _u.create_subitem);
4103
+ const itemData = ((_u = parsedResponse.data) === null || _u === void 0 ? void 0 : _u.create_item) || ((_v = parsedResponse.data) === null || _v === void 0 ? void 0 : _v.create_subitem);
4100
4104
  const formattedResponse = {
4101
4105
  id: itemData.id,
4102
4106
  name: itemName,
@@ -4243,7 +4247,7 @@ class Worktables {
4243
4247
  };
4244
4248
  break;
4245
4249
  case 'file':
4246
- if ((_v = col.fileLinks) === null || _v === void 0 ? void 0 : _v.file) {
4250
+ if ((_w = col.fileLinks) === null || _w === void 0 ? void 0 : _w.file) {
4247
4251
  column_values_object[columnId] = { files: col.fileLinks.file };
4248
4252
  }
4249
4253
  break;
@@ -4258,14 +4262,13 @@ class Worktables {
4258
4262
  let formatted;
4259
4263
  if (itemIdOptional && itemIdOptional.trim() !== '') {
4260
4264
  console.log('Updating existing item:', itemIdOptional);
4265
+ const escapedColumnValues = (0, worktablesHelpers_1.escapeGraphQLJSONString)(column_values_object);
4261
4266
  mutation = `mutation {
4262
4267
  change_multiple_column_values(
4263
4268
  create_labels_if_missing: true,
4264
4269
  board_id: ${boardId},
4265
4270
  item_id: "${itemIdOptional}",
4266
- column_values: "${JSON.stringify(column_values_object)
4267
- .replace(/"/g, '\\"')
4268
- .replace(/(^|[^\\])\\n/g, '$1\\\\n')}"
4271
+ column_values: "${escapedColumnValues}"
4269
4272
  ) {
4270
4273
  id
4271
4274
  url
@@ -4294,12 +4297,14 @@ class Worktables {
4294
4297
  else {
4295
4298
  console.log('Creating new item:', itemName);
4296
4299
  const parentId = this.getNodeParameter('parentId', 0, false);
4300
+ const escapedItemName = (0, worktablesHelpers_1.escapeGraphQLString)(itemName);
4301
+ const escapedColumnValues = (0, worktablesHelpers_1.escapeGraphQLJSONString)(column_values_object);
4297
4302
  if (isSubitem && parentId) {
4298
4303
  mutation = `mutation {
4299
4304
  create_subitem(
4300
4305
  parent_item_id: ${parentId},
4301
- item_name: "${itemName}",
4302
- column_values: "${JSON.stringify(column_values_object).replace(/"/g, '\\"').replace(/(^|[^\\])\\n/g, '$1\\\\n')}"
4306
+ item_name: "${escapedItemName}",
4307
+ column_values: "${escapedColumnValues}"
4303
4308
  ) {
4304
4309
  id
4305
4310
  name
@@ -4314,8 +4319,8 @@ class Worktables {
4314
4319
  mutation = `mutation {
4315
4320
  create_item(
4316
4321
  board_id: ${boardId},
4317
- item_name: "${itemName}",
4318
- column_values: "${JSON.stringify(column_values_object).replace(/"/g, '\\"').replace(/(^|[^\\])\\n/g, '$1\\\\n')}"
4322
+ item_name: "${escapedItemName}",
4323
+ column_values: "${escapedColumnValues}"
4319
4324
  ) {
4320
4325
  id
4321
4326
  name
@@ -4463,7 +4468,7 @@ class Worktables {
4463
4468
  const sortOptions = this.getNodeParameter('sortOptions', 0, { sortBy: [] });
4464
4469
  const logicalOperator = this.getNodeParameter('logicalOperator', 0);
4465
4470
  let rulesArray = [];
4466
- if (((_w = filterRules === null || filterRules === void 0 ? void 0 : filterRules.rule) === null || _w === void 0 ? void 0 : _w.length) > 0) {
4471
+ if (((_x = filterRules === null || filterRules === void 0 ? void 0 : filterRules.rule) === null || _x === void 0 ? void 0 : _x.length) > 0) {
4467
4472
  rulesArray = filterRules.rule.map((rule) => {
4468
4473
  let formattedValue;
4469
4474
  if (['is_empty', 'is_not_empty'].includes(rule.operator)) {
@@ -4507,7 +4512,7 @@ class Worktables {
4507
4512
  });
4508
4513
  }
4509
4514
  const orderByArray = [];
4510
- if (((_x = sortOptions === null || sortOptions === void 0 ? void 0 : sortOptions.sortBy) === null || _x === void 0 ? void 0 : _x.length) > 0) {
4515
+ if (((_y = sortOptions === null || sortOptions === void 0 ? void 0 : sortOptions.sortBy) === null || _y === void 0 ? void 0 : _y.length) > 0) {
4511
4516
  sortOptions.sortBy.forEach((sort) => {
4512
4517
  orderByArray.push(`{
4513
4518
  column_id: "${sort.columnId}",
@@ -4553,7 +4558,7 @@ class Worktables {
4553
4558
  body: { query },
4554
4559
  });
4555
4560
  const parsed = JSON.parse(rawResponse);
4556
- const items = ((_1 = (_0 = (_z = (_y = parsed === null || parsed === void 0 ? void 0 : parsed.data) === null || _y === void 0 ? void 0 : _y.boards) === null || _z === void 0 ? void 0 : _z[0]) === null || _0 === void 0 ? void 0 : _0.items_page) === null || _1 === void 0 ? void 0 : _1.items) || [];
4561
+ const items = ((_2 = (_1 = (_0 = (_z = parsed === null || parsed === void 0 ? void 0 : parsed.data) === null || _z === void 0 ? void 0 : _z.boards) === null || _0 === void 0 ? void 0 : _0[0]) === null || _1 === void 0 ? void 0 : _1.items_page) === null || _2 === void 0 ? void 0 : _2.items) || [];
4557
4562
  const formattedItems = await Promise.all(items.map(async (item) => {
4558
4563
  const formatted = {
4559
4564
  id: item.id,
@@ -4587,7 +4592,7 @@ class Worktables {
4587
4592
  const advancedSortOptions = this.getNodeParameter('advancedSortOptions', 0, { sortBy: [] });
4588
4593
  const logicalOperator = this.getNodeParameter('logicalOperatorAdvanced', 0);
4589
4594
  let rulesArray = [];
4590
- if (((_2 = advancedFilterRules === null || advancedFilterRules === void 0 ? void 0 : advancedFilterRules.rule) === null || _2 === void 0 ? void 0 : _2.length) > 0) {
4595
+ if (((_3 = advancedFilterRules === null || advancedFilterRules === void 0 ? void 0 : advancedFilterRules.rule) === null || _3 === void 0 ? void 0 : _3.length) > 0) {
4591
4596
  console.log('Processing filter rules:', advancedFilterRules.rule);
4592
4597
  rulesArray = advancedFilterRules.rule.map((rule) => {
4593
4598
  let formattedValue;
@@ -4803,7 +4808,7 @@ class Worktables {
4803
4808
  });
4804
4809
  }
4805
4810
  const orderByArray = [];
4806
- if (((_3 = advancedSortOptions === null || advancedSortOptions === void 0 ? void 0 : advancedSortOptions.sortBy) === null || _3 === void 0 ? void 0 : _3.length) > 0) {
4811
+ if (((_4 = advancedSortOptions === null || advancedSortOptions === void 0 ? void 0 : advancedSortOptions.sortBy) === null || _4 === void 0 ? void 0 : _4.length) > 0) {
4807
4812
  advancedSortOptions.sortBy.forEach((sort) => {
4808
4813
  orderByArray.push(`{
4809
4814
  column_id: "${sort.columnId}",
@@ -4875,7 +4880,7 @@ class Worktables {
4875
4880
  body: { query: testQuery },
4876
4881
  });
4877
4882
  const testParsed = JSON.parse(testResponse);
4878
- const testItems = ((_7 = (_6 = (_5 = (_4 = testParsed === null || testParsed === void 0 ? void 0 : testParsed.data) === null || _4 === void 0 ? void 0 : _4.boards) === null || _5 === void 0 ? void 0 : _5[0]) === null || _6 === void 0 ? void 0 : _6.items_page) === null || _7 === void 0 ? void 0 : _7.items) || [];
4883
+ const testItems = ((_8 = (_7 = (_6 = (_5 = testParsed === null || testParsed === void 0 ? void 0 : testParsed.data) === null || _5 === void 0 ? void 0 : _5.boards) === null || _6 === void 0 ? void 0 : _6[0]) === null || _7 === void 0 ? void 0 : _7.items_page) === null || _8 === void 0 ? void 0 : _8.items) || [];
4879
4884
  console.log('Test - Items in board (no filters):', testItems.length);
4880
4885
  if (testItems.length > 0) {
4881
4886
  console.log('Sample item column values:', testItems[0].column_values);
@@ -4887,7 +4892,7 @@ class Worktables {
4887
4892
  body: { query },
4888
4893
  });
4889
4894
  const parsed = JSON.parse(rawResponse);
4890
- const itemsPage = (_10 = (_9 = (_8 = parsed === null || parsed === void 0 ? void 0 : parsed.data) === null || _8 === void 0 ? void 0 : _8.boards) === null || _9 === void 0 ? void 0 : _9[0]) === null || _10 === void 0 ? void 0 : _10.items_page;
4895
+ const itemsPage = (_11 = (_10 = (_9 = parsed === null || parsed === void 0 ? void 0 : parsed.data) === null || _9 === void 0 ? void 0 : _9.boards) === null || _10 === void 0 ? void 0 : _10[0]) === null || _11 === void 0 ? void 0 : _11.items_page;
4891
4896
  const items = (itemsPage === null || itemsPage === void 0 ? void 0 : itemsPage.items) || [];
4892
4897
  const nextCursor = itemsPage === null || itemsPage === void 0 ? void 0 : itemsPage.cursor;
4893
4898
  const hasMore = nextCursor ? true : false;
@@ -5034,7 +5039,7 @@ class Worktables {
5034
5039
  body: { query },
5035
5040
  });
5036
5041
  const parsed = JSON.parse(rawResponse);
5037
- const items = ((_16 = (_15 = (_14 = (_13 = (_12 = (_11 = parsed === null || parsed === void 0 ? void 0 : parsed.data) === null || _11 === void 0 ? void 0 : _11.boards) === null || _12 === void 0 ? void 0 : _12[0]) === null || _13 === void 0 ? void 0 : _13.groups) === null || _14 === void 0 ? void 0 : _14[0]) === null || _15 === void 0 ? void 0 : _15.items_page) === null || _16 === void 0 ? void 0 : _16.items) || [];
5042
+ const items = ((_17 = (_16 = (_15 = (_14 = (_13 = (_12 = parsed === null || parsed === void 0 ? void 0 : parsed.data) === null || _12 === void 0 ? void 0 : _12.boards) === null || _13 === void 0 ? void 0 : _13[0]) === null || _14 === void 0 ? void 0 : _14.groups) === null || _15 === void 0 ? void 0 : _15[0]) === null || _16 === void 0 ? void 0 : _16.items_page) === null || _17 === void 0 ? void 0 : _17.items) || [];
5038
5043
  const formattedItems = await Promise.all(items.map(async (item) => {
5039
5044
  const formatted = {
5040
5045
  id: item.id,
@@ -5107,7 +5112,7 @@ class Worktables {
5107
5112
  response = await (0, isErrorResponse_1.parseApiResponse)(response);
5108
5113
  if (response.success) {
5109
5114
  const parsed = JSON.parse(response.data);
5110
- const updates = ((_19 = (_18 = (_17 = parsed === null || parsed === void 0 ? void 0 : parsed.data) === null || _17 === void 0 ? void 0 : _17.items) === null || _18 === void 0 ? void 0 : _18[0]) === null || _19 === void 0 ? void 0 : _19.updates) || [];
5115
+ const updates = ((_20 = (_19 = (_18 = parsed === null || parsed === void 0 ? void 0 : parsed.data) === null || _18 === void 0 ? void 0 : _18.items) === null || _19 === void 0 ? void 0 : _19[0]) === null || _20 === void 0 ? void 0 : _20.updates) || [];
5111
5116
  return [updates.map((update) => ({ json: update }))];
5112
5117
  }
5113
5118
  else {
@@ -5164,7 +5169,7 @@ class Worktables {
5164
5169
  console.log('variables:', variables);
5165
5170
  response = await (0, worktablesHelpers_1.makeGraphQLRequest)(this, mutation, headers, variables);
5166
5171
  console.log('Create Update Result:', JSON.stringify(response, null, 2));
5167
- const updateId = (_21 = (_20 = JSON.parse(response).data) === null || _20 === void 0 ? void 0 : _20.create_update) === null || _21 === void 0 ? void 0 : _21.id;
5172
+ const updateId = (_22 = (_21 = JSON.parse(response).data) === null || _21 === void 0 ? void 0 : _21.create_update) === null || _22 === void 0 ? void 0 : _22.id;
5168
5173
  if (!updateId) {
5169
5174
  throw new n8n_workflow_1.NodeApiError(this.getNode(), {
5170
5175
  message: 'Error creating update: Update not created, no ID returned',
@@ -5470,7 +5475,7 @@ class Worktables {
5470
5475
  body: { query },
5471
5476
  json: true,
5472
5477
  });
5473
- const asset = (_23 = (_22 = responseFile === null || responseFile === void 0 ? void 0 : responseFile.data) === null || _22 === void 0 ? void 0 : _22.assets) === null || _23 === void 0 ? void 0 : _23[0];
5478
+ const asset = (_24 = (_23 = responseFile === null || responseFile === void 0 ? void 0 : responseFile.data) === null || _23 === void 0 ? void 0 : _23.assets) === null || _24 === void 0 ? void 0 : _24[0];
5474
5479
  if (!(asset === null || asset === void 0 ? void 0 : asset.public_url)) {
5475
5480
  throw new n8n_workflow_1.NodeApiError(this.getNode(), {
5476
5481
  message: 'Public URL not found for the given file ID.',