@drosenthal/n8n-nodes-ynab 0.1.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.
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.YnabApi = void 0;
|
|
4
|
+
class YnabApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'ynabApi';
|
|
7
|
+
this.displayName = 'YNAB API';
|
|
8
|
+
this.documentationUrl = 'https://api.ynab.com/';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Personal Access Token',
|
|
12
|
+
name: 'accessToken',
|
|
13
|
+
type: 'string',
|
|
14
|
+
typeOptions: { password: true },
|
|
15
|
+
default: '',
|
|
16
|
+
hint: 'Generate one at https://app.ynab.com/settings/developer',
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
this.authenticate = {
|
|
20
|
+
type: 'generic',
|
|
21
|
+
properties: {
|
|
22
|
+
headers: {
|
|
23
|
+
Authorization: '=Bearer {{$credentials.accessToken}}',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.YnabApi = YnabApi;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Ynab = void 0;
|
|
37
|
+
const n8n_openapi_node_1 = require("@devlikeapro/n8n-openapi-node");
|
|
38
|
+
const doc = __importStar(require("./openapi.json"));
|
|
39
|
+
const config = {};
|
|
40
|
+
const parser = new n8n_openapi_node_1.N8NPropertiesBuilder(doc, config);
|
|
41
|
+
const properties = parser.build();
|
|
42
|
+
class Ynab {
|
|
43
|
+
constructor() {
|
|
44
|
+
this.description = {
|
|
45
|
+
displayName: 'YNAB',
|
|
46
|
+
name: 'ynab',
|
|
47
|
+
icon: 'file:ynab.svg',
|
|
48
|
+
group: ['transform'],
|
|
49
|
+
version: 1,
|
|
50
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
51
|
+
description: 'Interact with the YNAB (You Need A Budget) API',
|
|
52
|
+
defaults: {
|
|
53
|
+
name: 'YNAB',
|
|
54
|
+
},
|
|
55
|
+
inputs: ['main'],
|
|
56
|
+
outputs: ['main'],
|
|
57
|
+
credentials: [
|
|
58
|
+
{
|
|
59
|
+
name: 'ynabApi',
|
|
60
|
+
required: true,
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
requestDefaults: {
|
|
64
|
+
baseURL: 'https://api.ynab.com/v1',
|
|
65
|
+
headers: {
|
|
66
|
+
Accept: 'application/json',
|
|
67
|
+
'Content-Type': 'application/json',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
properties,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.Ynab = Ynab;
|