n8n-nodes-actual-budget-category 0.1.1 → 0.1.3

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.
@@ -36,7 +36,20 @@ class ActualBudget {
36
36
  const results = [];
37
37
 
38
38
  // 🔑 FIX: ensure syncId is a string
39
- const syncId = typeof creds.syncId === 'string' ? creds.syncId : creds.syncId?.value;
39
+ const value = creds.syncId;
40
+ let syncId = null;
41
+
42
+ if (typeof value === 'string') {
43
+ syncId = value;
44
+ }
45
+ if (value && typeof value === 'object') {
46
+ if (typeof value.value === 'string') {
47
+ syncId = value.value;
48
+ }
49
+ if (typeof value.syncId === 'string') {
50
+ syncId = value.syncId;
51
+ }
52
+ }
40
53
 
41
54
  if (!syncId) {
42
55
  throw new Error(`Invalid syncId: ${JSON.stringify(creds.syncId)}`);
@@ -55,7 +68,7 @@ class ActualBudget {
55
68
 
56
69
  try {
57
70
  // open budget once
58
- await downloadBudget(syncId);
71
+ await downloadBudget({ syncId });
59
72
 
60
73
  const accounts = await getAccounts();
61
74
  const categories = await getCategories();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-actual-budget-category",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "n8n community node for Actual Budget",
5
5
  "license": "MIT",
6
6
  "keywords": [