@drosenthal/n8n-nodes-ynab 0.1.2 → 0.2.0
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/dist/nodes/Ynab/GenericFunctions.js +75 -0
- package/dist/nodes/Ynab/Ynab.node.js +13 -48
- package/dist/nodes/Ynab/descriptions/AccountDescription.js +116 -0
- package/dist/nodes/Ynab/descriptions/CategoryDescription.js +286 -0
- package/dist/nodes/Ynab/descriptions/MoneyMovementDescription.js +80 -0
- package/dist/nodes/Ynab/descriptions/MonthDescription.js +69 -0
- package/dist/nodes/Ynab/descriptions/PayeeDescription.js +96 -0
- package/dist/nodes/Ynab/descriptions/PayeeLocationDescription.js +73 -0
- package/dist/nodes/Ynab/descriptions/PlanDescription.js +76 -0
- package/dist/nodes/Ynab/descriptions/ScheduledTransactionDescription.js +223 -0
- package/dist/nodes/Ynab/descriptions/TransactionDescription.js +463 -0
- package/dist/nodes/Ynab/descriptions/UserDescription.js +22 -0
- package/dist/nodes/Ynab/descriptions/index.js +55 -0
- package/package.json +3 -6
- package/dist/nodes/Ynab/openapi.json +0 -5456
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.monthFields = exports.monthOperations = void 0;
|
|
4
|
+
exports.monthOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: { show: { resource: ['month'] } },
|
|
11
|
+
options: [
|
|
12
|
+
{
|
|
13
|
+
name: 'Get All',
|
|
14
|
+
value: 'getAll',
|
|
15
|
+
action: 'Get all plan months',
|
|
16
|
+
routing: {
|
|
17
|
+
request: { method: 'GET', url: '=/plans/{{$parameter.plan_id}}/months' },
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Get',
|
|
22
|
+
value: 'get',
|
|
23
|
+
action: 'Get a plan month',
|
|
24
|
+
routing: {
|
|
25
|
+
request: {
|
|
26
|
+
method: 'GET',
|
|
27
|
+
url: '=/plans/{{$parameter.plan_id}}/months/{{$parameter.month}}',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
default: 'getAll',
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
exports.monthFields = [
|
|
36
|
+
{
|
|
37
|
+
displayName: 'Plan Name or ID',
|
|
38
|
+
name: 'plan_id',
|
|
39
|
+
type: 'options',
|
|
40
|
+
required: true,
|
|
41
|
+
default: '',
|
|
42
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
43
|
+
typeOptions: { loadOptionsMethod: 'getPlans' },
|
|
44
|
+
displayOptions: { show: { resource: ['month'] } },
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Month',
|
|
48
|
+
name: 'month',
|
|
49
|
+
type: 'string',
|
|
50
|
+
required: true,
|
|
51
|
+
default: 'current',
|
|
52
|
+
placeholder: 'current or YYYY-MM-01',
|
|
53
|
+
description: 'ISO-formatted month (e.g. 2024-03-01) or "current"',
|
|
54
|
+
displayOptions: { show: { resource: ['month'], operation: ['get'] } },
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
displayName: 'Last Knowledge of Server',
|
|
58
|
+
name: 'last_knowledge_of_server',
|
|
59
|
+
type: 'number',
|
|
60
|
+
default: 0,
|
|
61
|
+
description: 'Returns entities changed since this knowledge value. Use 0 to fetch everything.',
|
|
62
|
+
displayOptions: { show: { resource: ['month'], operation: ['getAll'] } },
|
|
63
|
+
routing: {
|
|
64
|
+
request: {
|
|
65
|
+
qs: { last_knowledge_of_server: '={{ $value > 0 ? $value : undefined }}' },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
];
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.payeeFields = exports.payeeOperations = void 0;
|
|
4
|
+
exports.payeeOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: { show: { resource: ['payee'] } },
|
|
11
|
+
options: [
|
|
12
|
+
{
|
|
13
|
+
name: 'Get All',
|
|
14
|
+
value: 'getAll',
|
|
15
|
+
action: 'Get all payees',
|
|
16
|
+
routing: {
|
|
17
|
+
request: { method: 'GET', url: '=/plans/{{$parameter.plan_id}}/payees' },
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Get',
|
|
22
|
+
value: 'get',
|
|
23
|
+
action: 'Get a payee',
|
|
24
|
+
routing: {
|
|
25
|
+
request: {
|
|
26
|
+
method: 'GET',
|
|
27
|
+
url: '=/plans/{{$parameter.plan_id}}/payees/{{$parameter.payee_id}}',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'Create',
|
|
33
|
+
value: 'create',
|
|
34
|
+
action: 'Create a payee',
|
|
35
|
+
routing: {
|
|
36
|
+
request: { method: 'POST', url: '=/plans/{{$parameter.plan_id}}/payees' },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'Update',
|
|
41
|
+
value: 'update',
|
|
42
|
+
action: 'Update a payee',
|
|
43
|
+
routing: {
|
|
44
|
+
request: {
|
|
45
|
+
method: 'PATCH',
|
|
46
|
+
url: '=/plans/{{$parameter.plan_id}}/payees/{{$parameter.payee_id}}',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
default: 'getAll',
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
exports.payeeFields = [
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Plan Name or ID',
|
|
57
|
+
name: 'plan_id',
|
|
58
|
+
type: 'options',
|
|
59
|
+
required: true,
|
|
60
|
+
default: '',
|
|
61
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
62
|
+
typeOptions: { loadOptionsMethod: 'getPlans' },
|
|
63
|
+
displayOptions: { show: { resource: ['payee'] } },
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Payee ID',
|
|
67
|
+
name: 'payee_id',
|
|
68
|
+
type: 'string',
|
|
69
|
+
required: true,
|
|
70
|
+
default: '',
|
|
71
|
+
displayOptions: { show: { resource: ['payee'], operation: ['get', 'update'] } },
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: 'Last Knowledge of Server',
|
|
75
|
+
name: 'last_knowledge_of_server',
|
|
76
|
+
type: 'number',
|
|
77
|
+
default: 0,
|
|
78
|
+
description: 'Returns entities changed since this knowledge value. Use 0 to fetch everything.',
|
|
79
|
+
displayOptions: { show: { resource: ['payee'], operation: ['getAll'] } },
|
|
80
|
+
routing: {
|
|
81
|
+
request: {
|
|
82
|
+
qs: { last_knowledge_of_server: '={{ $value > 0 ? $value : undefined }}' },
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
displayName: 'Name',
|
|
88
|
+
name: 'name',
|
|
89
|
+
type: 'string',
|
|
90
|
+
default: '',
|
|
91
|
+
required: true,
|
|
92
|
+
description: 'Payee name (max 500 characters)',
|
|
93
|
+
displayOptions: { show: { resource: ['payee'], operation: ['create', 'update'] } },
|
|
94
|
+
routing: { send: { type: 'body', property: 'payee.name' } },
|
|
95
|
+
},
|
|
96
|
+
];
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.payeeLocationFields = exports.payeeLocationOperations = void 0;
|
|
4
|
+
exports.payeeLocationOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: { show: { resource: ['payeeLocation'] } },
|
|
11
|
+
options: [
|
|
12
|
+
{
|
|
13
|
+
name: 'Get All',
|
|
14
|
+
value: 'getAll',
|
|
15
|
+
action: 'Get all payee locations',
|
|
16
|
+
routing: {
|
|
17
|
+
request: { method: 'GET', url: '=/plans/{{$parameter.plan_id}}/payee_locations' },
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Get',
|
|
22
|
+
value: 'get',
|
|
23
|
+
action: 'Get a payee location',
|
|
24
|
+
routing: {
|
|
25
|
+
request: {
|
|
26
|
+
method: 'GET',
|
|
27
|
+
url: '=/plans/{{$parameter.plan_id}}/payee_locations/{{$parameter.payee_location_id}}',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'Get All For Payee',
|
|
33
|
+
value: 'getAllForPayee',
|
|
34
|
+
action: 'Get all locations for a payee',
|
|
35
|
+
routing: {
|
|
36
|
+
request: {
|
|
37
|
+
method: 'GET',
|
|
38
|
+
url: '=/plans/{{$parameter.plan_id}}/payees/{{$parameter.payee_id}}/payee_locations',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
default: 'getAll',
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
exports.payeeLocationFields = [
|
|
47
|
+
{
|
|
48
|
+
displayName: 'Plan Name or ID',
|
|
49
|
+
name: 'plan_id',
|
|
50
|
+
type: 'options',
|
|
51
|
+
required: true,
|
|
52
|
+
default: '',
|
|
53
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
54
|
+
typeOptions: { loadOptionsMethod: 'getPlans' },
|
|
55
|
+
displayOptions: { show: { resource: ['payeeLocation'] } },
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
displayName: 'Payee Location ID',
|
|
59
|
+
name: 'payee_location_id',
|
|
60
|
+
type: 'string',
|
|
61
|
+
required: true,
|
|
62
|
+
default: '',
|
|
63
|
+
displayOptions: { show: { resource: ['payeeLocation'], operation: ['get'] } },
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Payee ID',
|
|
67
|
+
name: 'payee_id',
|
|
68
|
+
type: 'string',
|
|
69
|
+
required: true,
|
|
70
|
+
default: '',
|
|
71
|
+
displayOptions: { show: { resource: ['payeeLocation'], operation: ['getAllForPayee'] } },
|
|
72
|
+
},
|
|
73
|
+
];
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.planFields = exports.planOperations = void 0;
|
|
4
|
+
exports.planOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: { show: { resource: ['plan'] } },
|
|
11
|
+
options: [
|
|
12
|
+
{
|
|
13
|
+
name: 'Get All',
|
|
14
|
+
value: 'getAll',
|
|
15
|
+
action: 'Get all plans',
|
|
16
|
+
routing: { request: { method: 'GET', url: '/plans' } },
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'Get',
|
|
20
|
+
value: 'get',
|
|
21
|
+
action: 'Get a plan',
|
|
22
|
+
routing: {
|
|
23
|
+
request: { method: 'GET', url: '=/plans/{{$parameter.plan_id}}' },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Get Settings',
|
|
28
|
+
value: 'getSettings',
|
|
29
|
+
action: 'Get plan settings',
|
|
30
|
+
routing: {
|
|
31
|
+
request: { method: 'GET', url: '=/plans/{{$parameter.plan_id}}/settings' },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
default: 'getAll',
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
exports.planFields = [
|
|
39
|
+
// getAll: include_accounts
|
|
40
|
+
{
|
|
41
|
+
displayName: 'Include Accounts',
|
|
42
|
+
name: 'include_accounts',
|
|
43
|
+
type: 'boolean',
|
|
44
|
+
default: false,
|
|
45
|
+
description: 'Whether to include the list of plan accounts',
|
|
46
|
+
displayOptions: { show: { resource: ['plan'], operation: ['getAll'] } },
|
|
47
|
+
routing: { request: { qs: { include_accounts: '={{$value}}' } } },
|
|
48
|
+
},
|
|
49
|
+
// plan_id (shared by get, getSettings)
|
|
50
|
+
{
|
|
51
|
+
displayName: 'Plan Name or ID',
|
|
52
|
+
name: 'plan_id',
|
|
53
|
+
type: 'options',
|
|
54
|
+
required: true,
|
|
55
|
+
default: '',
|
|
56
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
57
|
+
typeOptions: { loadOptionsMethod: 'getPlans' },
|
|
58
|
+
displayOptions: { show: { resource: ['plan'], operation: ['get', 'getSettings'] } },
|
|
59
|
+
},
|
|
60
|
+
// get: last_knowledge_of_server
|
|
61
|
+
{
|
|
62
|
+
displayName: 'Last Knowledge of Server',
|
|
63
|
+
name: 'last_knowledge_of_server',
|
|
64
|
+
type: 'number',
|
|
65
|
+
default: 0,
|
|
66
|
+
description: 'Returns entities that have been created/updated/deleted since this knowledge value. Use 0 to fetch everything.',
|
|
67
|
+
displayOptions: { show: { resource: ['plan'], operation: ['get'] } },
|
|
68
|
+
routing: {
|
|
69
|
+
request: {
|
|
70
|
+
qs: {
|
|
71
|
+
last_knowledge_of_server: '={{ $value > 0 ? $value : undefined }}',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
];
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.scheduledTransactionFields = exports.scheduledTransactionOperations = void 0;
|
|
4
|
+
const FLAG_COLOR_OPTIONS = [
|
|
5
|
+
{ name: '(None)', value: '' },
|
|
6
|
+
{ name: 'Red', value: 'red' },
|
|
7
|
+
{ name: 'Orange', value: 'orange' },
|
|
8
|
+
{ name: 'Yellow', value: 'yellow' },
|
|
9
|
+
{ name: 'Green', value: 'green' },
|
|
10
|
+
{ name: 'Blue', value: 'blue' },
|
|
11
|
+
{ name: 'Purple', value: 'purple' },
|
|
12
|
+
];
|
|
13
|
+
const FREQUENCY_OPTIONS = [
|
|
14
|
+
{ name: 'Never', value: 'never' },
|
|
15
|
+
{ name: 'Daily', value: 'daily' },
|
|
16
|
+
{ name: 'Weekly', value: 'weekly' },
|
|
17
|
+
{ name: 'Every Other Week', value: 'everyOtherWeek' },
|
|
18
|
+
{ name: 'Twice a Month', value: 'twiceAMonth' },
|
|
19
|
+
{ name: 'Every 4 Weeks', value: 'every4Weeks' },
|
|
20
|
+
{ name: 'Monthly', value: 'monthly' },
|
|
21
|
+
{ name: 'Every Other Month', value: 'everyOtherMonth' },
|
|
22
|
+
{ name: 'Every 3 Months', value: 'every3Months' },
|
|
23
|
+
{ name: 'Every 4 Months', value: 'every4Months' },
|
|
24
|
+
{ name: 'Twice a Year', value: 'twiceAYear' },
|
|
25
|
+
{ name: 'Yearly', value: 'yearly' },
|
|
26
|
+
{ name: 'Every Other Year', value: 'everyOtherYear' },
|
|
27
|
+
];
|
|
28
|
+
exports.scheduledTransactionOperations = [
|
|
29
|
+
{
|
|
30
|
+
displayName: 'Operation',
|
|
31
|
+
name: 'operation',
|
|
32
|
+
type: 'options',
|
|
33
|
+
noDataExpression: true,
|
|
34
|
+
displayOptions: { show: { resource: ['scheduledTransaction'] } },
|
|
35
|
+
options: [
|
|
36
|
+
{
|
|
37
|
+
name: 'Get All',
|
|
38
|
+
value: 'getAll',
|
|
39
|
+
action: 'Get all scheduled transactions',
|
|
40
|
+
routing: {
|
|
41
|
+
request: {
|
|
42
|
+
method: 'GET',
|
|
43
|
+
url: '=/plans/{{$parameter.plan_id}}/scheduled_transactions',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'Get',
|
|
49
|
+
value: 'get',
|
|
50
|
+
action: 'Get a scheduled transaction',
|
|
51
|
+
routing: {
|
|
52
|
+
request: {
|
|
53
|
+
method: 'GET',
|
|
54
|
+
url: '=/plans/{{$parameter.plan_id}}/scheduled_transactions/{{$parameter.scheduled_transaction_id}}',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Create',
|
|
60
|
+
value: 'create',
|
|
61
|
+
action: 'Create a scheduled transaction',
|
|
62
|
+
routing: {
|
|
63
|
+
request: {
|
|
64
|
+
method: 'POST',
|
|
65
|
+
url: '=/plans/{{$parameter.plan_id}}/scheduled_transactions',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Update',
|
|
71
|
+
value: 'update',
|
|
72
|
+
action: 'Update a scheduled transaction',
|
|
73
|
+
routing: {
|
|
74
|
+
request: {
|
|
75
|
+
method: 'PUT',
|
|
76
|
+
url: '=/plans/{{$parameter.plan_id}}/scheduled_transactions/{{$parameter.scheduled_transaction_id}}',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'Delete',
|
|
82
|
+
value: 'delete',
|
|
83
|
+
action: 'Delete a scheduled transaction',
|
|
84
|
+
routing: {
|
|
85
|
+
request: {
|
|
86
|
+
method: 'DELETE',
|
|
87
|
+
url: '=/plans/{{$parameter.plan_id}}/scheduled_transactions/{{$parameter.scheduled_transaction_id}}',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
default: 'getAll',
|
|
93
|
+
},
|
|
94
|
+
];
|
|
95
|
+
exports.scheduledTransactionFields = [
|
|
96
|
+
{
|
|
97
|
+
displayName: 'Plan Name or ID',
|
|
98
|
+
name: 'plan_id',
|
|
99
|
+
type: 'options',
|
|
100
|
+
required: true,
|
|
101
|
+
default: '',
|
|
102
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
103
|
+
typeOptions: { loadOptionsMethod: 'getPlans' },
|
|
104
|
+
displayOptions: { show: { resource: ['scheduledTransaction'] } },
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
displayName: 'Scheduled Transaction ID',
|
|
108
|
+
name: 'scheduled_transaction_id',
|
|
109
|
+
type: 'string',
|
|
110
|
+
required: true,
|
|
111
|
+
default: '',
|
|
112
|
+
displayOptions: {
|
|
113
|
+
show: { resource: ['scheduledTransaction'], operation: ['get', 'update', 'delete'] },
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
displayName: 'Last Knowledge of Server',
|
|
118
|
+
name: 'last_knowledge_of_server',
|
|
119
|
+
type: 'number',
|
|
120
|
+
default: 0,
|
|
121
|
+
description: 'Returns entities changed since this knowledge value. Use 0 to fetch everything.',
|
|
122
|
+
displayOptions: { show: { resource: ['scheduledTransaction'], operation: ['getAll'] } },
|
|
123
|
+
routing: {
|
|
124
|
+
request: {
|
|
125
|
+
qs: { last_knowledge_of_server: '={{ $value > 0 ? $value : undefined }}' },
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
// CREATE / UPDATE shared body
|
|
130
|
+
{
|
|
131
|
+
displayName: 'Account Name or ID',
|
|
132
|
+
name: 'st_account_id',
|
|
133
|
+
type: 'options',
|
|
134
|
+
required: true,
|
|
135
|
+
default: '',
|
|
136
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
137
|
+
typeOptions: { loadOptionsMethod: 'getAccounts', loadOptionsDependsOn: ['plan_id'] },
|
|
138
|
+
displayOptions: {
|
|
139
|
+
show: { resource: ['scheduledTransaction'], operation: ['create', 'update'] },
|
|
140
|
+
},
|
|
141
|
+
routing: { send: { type: 'body', property: 'scheduled_transaction.account_id' } },
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
displayName: 'Date',
|
|
145
|
+
name: 'st_date',
|
|
146
|
+
type: 'string',
|
|
147
|
+
required: true,
|
|
148
|
+
default: '',
|
|
149
|
+
placeholder: 'YYYY-MM-DD',
|
|
150
|
+
description: 'Future date (within 5 years) in ISO format',
|
|
151
|
+
displayOptions: {
|
|
152
|
+
show: { resource: ['scheduledTransaction'], operation: ['create', 'update'] },
|
|
153
|
+
},
|
|
154
|
+
routing: { send: { type: 'body', property: 'scheduled_transaction.date' } },
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
displayName: 'Additional Fields',
|
|
158
|
+
name: 'stAdditionalFields',
|
|
159
|
+
type: 'collection',
|
|
160
|
+
placeholder: 'Add Field',
|
|
161
|
+
default: {},
|
|
162
|
+
displayOptions: {
|
|
163
|
+
show: { resource: ['scheduledTransaction'], operation: ['create', 'update'] },
|
|
164
|
+
},
|
|
165
|
+
options: [
|
|
166
|
+
{
|
|
167
|
+
displayName: 'Amount (Milliunits)',
|
|
168
|
+
name: 'amount',
|
|
169
|
+
type: 'number',
|
|
170
|
+
default: 0,
|
|
171
|
+
description: 'Amount in milliunits (multiply dollars by 1000, negative for outflow)',
|
|
172
|
+
routing: { send: { type: 'body', property: 'scheduled_transaction.amount' } },
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
displayName: 'Payee ID',
|
|
176
|
+
name: 'payee_id',
|
|
177
|
+
type: 'string',
|
|
178
|
+
default: '',
|
|
179
|
+
description: 'UUID of the payee. Leave empty to use Payee Name instead.',
|
|
180
|
+
routing: { send: { type: 'body', property: 'scheduled_transaction.payee_id' } },
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
displayName: 'Payee Name',
|
|
184
|
+
name: 'payee_name',
|
|
185
|
+
type: 'string',
|
|
186
|
+
default: '',
|
|
187
|
+
routing: { send: { type: 'body', property: 'scheduled_transaction.payee_name' } },
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
displayName: 'Category Name or ID',
|
|
191
|
+
name: 'category_id',
|
|
192
|
+
type: 'options',
|
|
193
|
+
default: '',
|
|
194
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
195
|
+
typeOptions: { loadOptionsMethod: 'getCategories', loadOptionsDependsOn: ['plan_id'] },
|
|
196
|
+
routing: { send: { type: 'body', property: 'scheduled_transaction.category_id' } },
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
displayName: 'Memo',
|
|
200
|
+
name: 'memo',
|
|
201
|
+
type: 'string',
|
|
202
|
+
default: '',
|
|
203
|
+
routing: { send: { type: 'body', property: 'scheduled_transaction.memo' } },
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
displayName: 'Flag Color',
|
|
207
|
+
name: 'flag_color',
|
|
208
|
+
type: 'options',
|
|
209
|
+
default: '',
|
|
210
|
+
options: FLAG_COLOR_OPTIONS,
|
|
211
|
+
routing: { send: { type: 'body', property: 'scheduled_transaction.flag_color' } },
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
displayName: 'Frequency',
|
|
215
|
+
name: 'frequency',
|
|
216
|
+
type: 'options',
|
|
217
|
+
default: 'monthly',
|
|
218
|
+
options: FREQUENCY_OPTIONS,
|
|
219
|
+
routing: { send: { type: 'body', property: 'scheduled_transaction.frequency' } },
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
},
|
|
223
|
+
];
|