@worktables/n8n-nodes-worktables 12.2.24 → 12.2.26

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.
@@ -37,6 +37,7 @@ class Worktables {
37
37
  baseURL: 'https://api.monday.com/v2',
38
38
  headers: {
39
39
  'Content-Type': 'application/json',
40
+ 'API-Version': '2025-01',
40
41
  },
41
42
  },
42
43
  codex: {
@@ -2214,6 +2215,7 @@ class Worktables {
2214
2215
  headers: {
2215
2216
  Authorization: `Bearer ${apiKey}`,
2216
2217
  'Content-Type': 'application/json',
2218
+ 'API-Version': '2025-01',
2217
2219
  },
2218
2220
  body: JSON.stringify({
2219
2221
  query: `{ workspaces (limit: ${limit}, page: ${page}) { id name } }`,
@@ -2276,6 +2278,7 @@ class Worktables {
2276
2278
  headers: {
2277
2279
  Authorization: `Bearer ${apiKey}`,
2278
2280
  'Content-Type': 'application/json',
2281
+ 'API-Version': '2025-01',
2279
2282
  },
2280
2283
  body: currentQuery,
2281
2284
  });
@@ -2624,6 +2627,7 @@ class Worktables {
2624
2627
  headers: {
2625
2628
  Authorization: `Bearer ${apiKey}`,
2626
2629
  'Content-Type': 'application/json',
2630
+ 'API-Version': '2025-01',
2627
2631
  },
2628
2632
  body: {
2629
2633
  query: `{ folders (limit: ${limit}, page: ${page}, workspace_ids: ${workspaceId}) { id name } }`,
@@ -2660,6 +2664,7 @@ class Worktables {
2660
2664
  headers: {
2661
2665
  Authorization: `Bearer ${apiKey}`,
2662
2666
  'Content-Type': 'application/json',
2667
+ 'API-Version': '2025-01',
2663
2668
  },
2664
2669
  body: {
2665
2670
  query: `{ users (limit: ${limit}, page: ${page}) { id name } }`,
@@ -2821,6 +2826,7 @@ class Worktables {
2821
2826
  const headers = {
2822
2827
  Authorization: `Bearer ${apiKey}`,
2823
2828
  'Content-Type': 'application/json',
2829
+ 'API-Version': '2025-01',
2824
2830
  };
2825
2831
  switch (resource) {
2826
2832
  case 'board': {
@@ -3551,7 +3557,6 @@ class Worktables {
3551
3557
  for (const col of columnValues) {
3552
3558
  if (col.type === 'subtasks' ||
3553
3559
  col.type === 'formula' ||
3554
- col.type === 'mirror' ||
3555
3560
  col.type === 'auto_number' ||
3556
3561
  col.type === 'creation_log' ||
3557
3562
  col.type === 'last_updated') {
@@ -4344,6 +4349,10 @@ class Worktables {
4344
4349
  id
4345
4350
  text
4346
4351
  value
4352
+ type
4353
+ ... on BoardRelationValue {
4354
+ display_value
4355
+ }
4347
4356
  }
4348
4357
  }
4349
4358
  }
@@ -4391,15 +4400,18 @@ class Worktables {
4391
4400
  else {
4392
4401
  const colValue = (_0 = subitem.column_values) === null || _0 === void 0 ? void 0 : _0.find((cv) => cv.id === identifierColumn);
4393
4402
  if (colValue) {
4394
- let colText = (colValue.text || '').trim();
4403
+ const isBoardRelation = colValue.type === 'board_relation';
4404
+ const compareValue = isBoardRelation
4405
+ ? (colValue.display_value || '').trim()
4406
+ : (colValue.text || '').trim();
4395
4407
  const searchValue = identifierValue.trim().toLowerCase();
4396
- const colTextLower = colText.toLowerCase();
4397
- matches = colTextLower === searchValue;
4408
+ const compareValueLower = compareValue.toLowerCase();
4409
+ matches = compareValueLower === searchValue;
4398
4410
  if (matches) {
4399
- console.log(`✓ Match found! Subitem ${subitem.id} - Column ${identifierColumn}: text="${colText}", search="${identifierValue}"`);
4411
+ console.log(`✓ Match found! Subitem ${subitem.id} - Column ${identifierColumn} (${colValue.type}): ${isBoardRelation ? 'display_value' : 'text'}="${compareValue}", search="${identifierValue}"`);
4400
4412
  }
4401
- else if (colText) {
4402
- console.log(`✗ No match - Subitem ${subitem.id} - Column ${identifierColumn}: text="${colText}", search="${identifierValue}"`);
4413
+ else if (compareValue) {
4414
+ console.log(`✗ No match - Subitem ${subitem.id} - Column ${identifierColumn} (${colValue.type}): ${isBoardRelation ? 'display_value' : 'text'}="${compareValue}", search="${identifierValue}"`);
4403
4415
  }
4404
4416
  }
4405
4417
  else {
@@ -4428,15 +4440,18 @@ class Worktables {
4428
4440
  else {
4429
4441
  const colValue = (_1 = item.column_values) === null || _1 === void 0 ? void 0 : _1.find((cv) => cv.id === identifierColumn);
4430
4442
  if (colValue) {
4431
- let colText = (colValue.text || '').trim();
4443
+ const isBoardRelation = colValue.type === 'board_relation';
4444
+ const compareValue = isBoardRelation
4445
+ ? (colValue.display_value || '').trim()
4446
+ : (colValue.text || '').trim();
4432
4447
  const searchValue = identifierValue.trim().toLowerCase();
4433
- const colTextLower = colText.toLowerCase();
4434
- matches = colTextLower === searchValue;
4448
+ const compareValueLower = compareValue.toLowerCase();
4449
+ matches = compareValueLower === searchValue;
4435
4450
  if (matches) {
4436
- console.log(`✓ Match found! Item ${item.id} - Column ${identifierColumn}: text="${colText}", search="${identifierValue}"`);
4451
+ console.log(`✓ Match found! Item ${item.id} - Column ${identifierColumn} (${colValue.type}): ${isBoardRelation ? 'display_value' : 'text'}="${compareValue}", search="${identifierValue}"`);
4437
4452
  }
4438
- else if (colText) {
4439
- console.log(`✗ No match - Item ${item.id} - Column ${identifierColumn}: text="${colText}", search="${identifierValue}"`);
4453
+ else if (compareValue) {
4454
+ console.log(`✗ No match - Item ${item.id} - Column ${identifierColumn} (${colValue.type}): ${isBoardRelation ? 'display_value' : 'text'}="${compareValue}", search="${identifierValue}"`);
4440
4455
  }
4441
4456
  }
4442
4457
  else {
@@ -4754,7 +4769,6 @@ class Worktables {
4754
4769
  for (const col of columnValues) {
4755
4770
  if (col.type === 'subtasks' ||
4756
4771
  col.type === 'formula' ||
4757
- col.type === 'mirror' ||
4758
4772
  col.type === 'auto_number' ||
4759
4773
  col.type === 'creation_log' ||
4760
4774
  col.type === 'last_updated') {
@@ -4865,6 +4879,16 @@ class Worktables {
4865
4879
  text
4866
4880
  value
4867
4881
  type
4882
+ ... on BoardRelationValue {
4883
+ display_value
4884
+ linked_item_ids
4885
+ }
4886
+ ... on MirrorValue {
4887
+ display_value
4888
+ mirrored_items {
4889
+ linked_board_id
4890
+ }
4891
+ }
4868
4892
  }
4869
4893
  group {
4870
4894
  id
@@ -5162,6 +5186,16 @@ class Worktables {
5162
5186
  text
5163
5187
  value
5164
5188
  type
5189
+ ... on BoardRelationValue {
5190
+ display_value
5191
+ linked_item_ids
5192
+ }
5193
+ ... on MirrorValue {
5194
+ display_value
5195
+ mirrored_items {
5196
+ linked_board_id
5197
+ }
5198
+ }
5165
5199
  }
5166
5200
  group {
5167
5201
  id
@@ -5248,7 +5282,6 @@ class Worktables {
5248
5282
  for (const col of item.column_values || []) {
5249
5283
  if (col.type === 'subtasks' ||
5250
5284
  col.type === 'formula' ||
5251
- col.type === 'mirror' ||
5252
5285
  col.type === 'auto_number' ||
5253
5286
  col.type === 'creation_log' ||
5254
5287
  col.type === 'last_updated') {
@@ -5262,6 +5295,12 @@ class Worktables {
5262
5295
  if ('display_value' in col) {
5263
5296
  formattedCol.display_value = col.display_value;
5264
5297
  }
5298
+ if ('linked_item_ids' in col) {
5299
+ formattedCol.linked_item_ids = col.linked_item_ids;
5300
+ }
5301
+ if ('mirrored_items' in col) {
5302
+ formattedCol.mirrored_items = col.mirrored_items;
5303
+ }
5265
5304
  formatted.column_values[col.id] = formattedCol;
5266
5305
  }
5267
5306
  return formatted;
@@ -5313,6 +5352,7 @@ class Worktables {
5313
5352
  const uploadFile = await axios_1.default.post('https://api.monday.com/v2/file', form, {
5314
5353
  headers: {
5315
5354
  Authorization: headers.Authorization,
5355
+ 'API-Version': '2025-01',
5316
5356
  ...form.getHeaders(),
5317
5357
  },
5318
5358
  maxContentLength: Infinity,
@@ -5403,7 +5443,6 @@ class Worktables {
5403
5443
  for (const col of columnValues) {
5404
5444
  if (col.type === 'subtasks' ||
5405
5445
  col.type === 'formula' ||
5406
- col.type === 'mirror' ||
5407
5446
  col.type === 'auto_number' ||
5408
5447
  col.type === 'creation_log' ||
5409
5448
  col.type === 'last_updated') {
@@ -5569,6 +5608,7 @@ class Worktables {
5569
5608
  const uploadResponse = await axios_1.default.post('https://api.monday.com/v2/file', form, {
5570
5609
  headers: {
5571
5610
  Authorization: headers.Authorization,
5611
+ 'API-Version': '2025-01',
5572
5612
  ...form.getHeaders(),
5573
5613
  },
5574
5614
  maxContentLength: Infinity,
@@ -5630,6 +5670,7 @@ class Worktables {
5630
5670
  const uploadResponse = await axios_1.default.post('https://api.monday.com/v2/file', form, {
5631
5671
  headers: {
5632
5672
  Authorization: headers.Authorization,
5673
+ 'API-Version': '2025-01',
5633
5674
  ...form.getHeaders(),
5634
5675
  },
5635
5676
  maxContentLength: Infinity,
@@ -5693,6 +5734,7 @@ class Worktables {
5693
5734
  const uploadResponse = await axios_1.default.post('https://api.monday.com/v2/file', form, {
5694
5735
  headers: {
5695
5736
  Authorization: headers.Authorization,
5737
+ 'API-Version': '2025-01',
5696
5738
  ...form.getHeaders(),
5697
5739
  },
5698
5740
  maxContentLength: Infinity,