n8n-nodes-klicktipp 1.0.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/LICENSE.md +19 -0
- package/README.md +105 -0
- package/dist/credentials/KlickTippApi.credentials.d.ts +12 -0
- package/dist/credentials/KlickTippApi.credentials.js +84 -0
- package/dist/credentials/KlickTippApi.credentials.js.map +1 -0
- package/dist/nodes/KlickTipp/KlickTipp.node.d.ts +10 -0
- package/dist/nodes/KlickTipp/KlickTipp.node.js +20 -0
- package/dist/nodes/KlickTipp/KlickTipp.node.js.map +1 -0
- package/dist/nodes/KlickTipp/KlickTipp.node.json +18 -0
- package/dist/nodes/KlickTipp/actions/field/index.d.ts +4 -0
- package/dist/nodes/KlickTipp/actions/field/index.js +52 -0
- package/dist/nodes/KlickTipp/actions/field/index.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/field/index.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/field/index.operation.js +24 -0
- package/dist/nodes/KlickTipp/actions/field/index.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/node.description.d.ts +2 -0
- package/dist/nodes/KlickTipp/actions/node.description.js +82 -0
- package/dist/nodes/KlickTipp/actions/node.description.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/node.type.d.ts +9 -0
- package/dist/nodes/KlickTipp/actions/node.type.js +3 -0
- package/dist/nodes/KlickTipp/actions/node.type.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/opt-in-process/get-redirect.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/opt-in-process/get-redirect.operation.js +55 -0
- package/dist/nodes/KlickTipp/actions/opt-in-process/get-redirect.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/opt-in-process/get.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/opt-in-process/get.operation.js +39 -0
- package/dist/nodes/KlickTipp/actions/opt-in-process/get.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/opt-in-process/index.d.ts +6 -0
- package/dist/nodes/KlickTipp/actions/opt-in-process/index.js +69 -0
- package/dist/nodes/KlickTipp/actions/opt-in-process/index.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/opt-in-process/index.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/opt-in-process/index.operation.js +29 -0
- package/dist/nodes/KlickTipp/actions/opt-in-process/index.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/router.d.ts +2 -0
- package/dist/nodes/KlickTipp/actions/router.js +80 -0
- package/dist/nodes/KlickTipp/actions/router.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/delete.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/delete.operation.js +36 -0
- package/dist/nodes/KlickTipp/actions/subscriber/delete.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/get.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/get.operation.js +37 -0
- package/dist/nodes/KlickTipp/actions/subscriber/get.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/index.d.ts +17 -0
- package/dist/nodes/KlickTipp/actions/subscriber/index.js +169 -0
- package/dist/nodes/KlickTipp/actions/subscriber/index.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/index.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/index.operation.js +24 -0
- package/dist/nodes/KlickTipp/actions/subscriber/index.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/resend-autoresponder.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/resend-autoresponder.operation.js +48 -0
- package/dist/nodes/KlickTipp/actions/subscriber/resend-autoresponder.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/search.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/search.operation.js +36 -0
- package/dist/nodes/KlickTipp/actions/subscriber/search.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/sign-in.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/sign-in.operation.js +94 -0
- package/dist/nodes/KlickTipp/actions/subscriber/sign-in.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/sign-off.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/sign-off.operation.js +48 -0
- package/dist/nodes/KlickTipp/actions/subscriber/sign-off.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/sign-out.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/sign-out.operation.js +48 -0
- package/dist/nodes/KlickTipp/actions/subscriber/sign-out.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/subscribe.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/subscribe.operation.js +109 -0
- package/dist/nodes/KlickTipp/actions/subscriber/subscribe.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/tag.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/tag.operation.js +54 -0
- package/dist/nodes/KlickTipp/actions/subscriber/tag.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/tagged.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/tagged.operation.js +41 -0
- package/dist/nodes/KlickTipp/actions/subscriber/tagged.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/unsubscribe.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/unsubscribe.operation.js +36 -0
- package/dist/nodes/KlickTipp/actions/subscriber/unsubscribe.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/untag.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/untag.operation.js +54 -0
- package/dist/nodes/KlickTipp/actions/subscriber/untag.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/subscriber/update.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/subscriber/update.operation.js +93 -0
- package/dist/nodes/KlickTipp/actions/subscriber/update.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/tag/create.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/tag/create.operation.js +50 -0
- package/dist/nodes/KlickTipp/actions/tag/create.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/tag/delete.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/tag/delete.operation.js +41 -0
- package/dist/nodes/KlickTipp/actions/tag/delete.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/tag/get.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/tag/get.operation.js +40 -0
- package/dist/nodes/KlickTipp/actions/tag/get.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/tag/index.d.ts +8 -0
- package/dist/nodes/KlickTipp/actions/tag/index.js +87 -0
- package/dist/nodes/KlickTipp/actions/tag/index.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/tag/index.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/tag/index.operation.js +24 -0
- package/dist/nodes/KlickTipp/actions/tag/index.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/actions/tag/update.operation.d.ts +26 -0
- package/dist/nodes/KlickTipp/actions/tag/update.operation.js +61 -0
- package/dist/nodes/KlickTipp/actions/tag/update.operation.js.map +1 -0
- package/dist/nodes/KlickTipp/helpers/constants.d.ts +3 -0
- package/dist/nodes/KlickTipp/helpers/constants.js +7 -0
- package/dist/nodes/KlickTipp/helpers/constants.js.map +1 -0
- package/dist/nodes/KlickTipp/helpers/interfaces.d.ts +3 -0
- package/dist/nodes/KlickTipp/helpers/interfaces.js +3 -0
- package/dist/nodes/KlickTipp/helpers/interfaces.js.map +1 -0
- package/dist/nodes/KlickTipp/klicktipp.svg +4 -0
- package/dist/nodes/KlickTipp/methods/index.d.ts +1 -0
- package/dist/nodes/KlickTipp/methods/index.js +28 -0
- package/dist/nodes/KlickTipp/methods/index.js.map +1 -0
- package/dist/nodes/KlickTipp/methods/loadOptions.d.ts +5 -0
- package/dist/nodes/KlickTipp/methods/loadOptions.js +52 -0
- package/dist/nodes/KlickTipp/methods/loadOptions.js.map +1 -0
- package/dist/nodes/KlickTipp/transport/index.d.ts +3 -0
- package/dist/nodes/KlickTipp/transport/index.js +62 -0
- package/dist/nodes/KlickTipp/transport/index.js.map +1 -0
- package/dist/nodes/KlickTipp/utils/utilities.d.ts +31 -0
- package/dist/nodes/KlickTipp/utils/utilities.js +57 -0
- package/dist/nodes/KlickTipp/utils/utilities.js.map +1 -0
- package/dist/package.json +72 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.js +0 -0
- package/package.json +70 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
import * as create from './create.operation';
|
|
3
|
+
import * as del from './delete.operation';
|
|
4
|
+
import * as index from './index.operation';
|
|
5
|
+
import * as get from './get.operation';
|
|
6
|
+
import * as update from './update.operation';
|
|
7
|
+
export { create, del as delete, get, index, update };
|
|
8
|
+
export declare const description: INodeProperties[];
|
|
@@ -0,0 +1,87 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.description = exports.update = exports.index = exports.get = exports.delete = exports.create = void 0;
|
|
27
|
+
const create = __importStar(require("./create.operation"));
|
|
28
|
+
exports.create = create;
|
|
29
|
+
const del = __importStar(require("./delete.operation"));
|
|
30
|
+
exports.delete = del;
|
|
31
|
+
const index = __importStar(require("./index.operation"));
|
|
32
|
+
exports.index = index;
|
|
33
|
+
const get = __importStar(require("./get.operation"));
|
|
34
|
+
exports.get = get;
|
|
35
|
+
const update = __importStar(require("./update.operation"));
|
|
36
|
+
exports.update = update;
|
|
37
|
+
exports.description = [
|
|
38
|
+
{
|
|
39
|
+
displayName: 'Operation',
|
|
40
|
+
name: 'operation',
|
|
41
|
+
type: 'options',
|
|
42
|
+
noDataExpression: true,
|
|
43
|
+
displayOptions: {
|
|
44
|
+
show: {
|
|
45
|
+
resource: ['tag'],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
options: [
|
|
49
|
+
{
|
|
50
|
+
name: 'Tag Create',
|
|
51
|
+
value: 'create',
|
|
52
|
+
description: 'Creates a new manual tag',
|
|
53
|
+
action: 'Tag create',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'Tag Delete',
|
|
57
|
+
value: 'delete',
|
|
58
|
+
description: 'Deletes a manual tag or SmartLink',
|
|
59
|
+
action: 'Tag delete',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'Tag Get',
|
|
63
|
+
value: 'get',
|
|
64
|
+
description: 'Returns the name and description of a tag',
|
|
65
|
+
action: 'Tag get',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'Tag Index',
|
|
69
|
+
value: 'index',
|
|
70
|
+
description: 'Returns an associative array <code>[tag_id] => [tag_name]</code> of all manual tags and SmartLinks',
|
|
71
|
+
action: 'Tag index',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'Tag Update',
|
|
75
|
+
value: 'update',
|
|
76
|
+
description: 'Updates a manual tag or SmartLink',
|
|
77
|
+
action: 'Tag update',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
default: 'index',
|
|
81
|
+
},
|
|
82
|
+
...create.description,
|
|
83
|
+
...del.description,
|
|
84
|
+
...get.description,
|
|
85
|
+
...update.description,
|
|
86
|
+
];
|
|
87
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/KlickTipp/actions/tag/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAA6C;AAMpC,wBAAM;AALf,wDAA0C;AAKlB,qBAAM;AAJ9B,yDAA2C;AAIN,sBAAK;AAH1C,qDAAuC;AAGP,kBAAG;AAFnC,2DAA6C;AAED,wBAAM;AAErC,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,KAAK,CAAC;aACjB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,0BAA0B;gBACvC,MAAM,EAAE,YAAY;aACpB;YACD;gBACC,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,mCAAmC;gBAChD,MAAM,EAAE,YAAY;aACpB;YACD;gBACC,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,2CAA2C;gBACxD,MAAM,EAAE,SAAS;aACjB;YACD;gBACC,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,OAAO;gBACd,WAAW,EAAE,oGAAoG;gBACjH,MAAM,EAAE,WAAW;aACnB;YACD;gBACC,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,mCAAmC;gBAChD,MAAM,EAAE,YAAY;aACpB;SACD;QACD,OAAO,EAAE,OAAO;KAChB;IACD,GAAG,MAAM,CAAC,WAAW;IACrB,GAAG,GAAG,CAAC,WAAW;IAClB,GAAG,GAAG,CAAC,WAAW;IAClB,GAAG,MAAM,CAAC,WAAW;CACrB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const properties: INodeProperties[];
|
|
3
|
+
export declare const description: {
|
|
4
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
5
|
+
displayName: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
8
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
|
|
9
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
10
|
+
description?: string;
|
|
11
|
+
hint?: string;
|
|
12
|
+
options?: Array<import("n8n-workflow").INodePropertyOptions | INodeProperties | import("n8n-workflow").INodePropertyCollection>;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
isNodeSetting?: boolean;
|
|
15
|
+
noDataExpression?: boolean;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
routing?: import("n8n-workflow").INodePropertyRouting;
|
|
18
|
+
credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
|
|
19
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
|
|
20
|
+
modes?: import("n8n-workflow").INodePropertyMode[];
|
|
21
|
+
requiresDataPath?: "single" | "multiple";
|
|
22
|
+
doNotInherit?: boolean;
|
|
23
|
+
validateType?: import("n8n-workflow").FieldType;
|
|
24
|
+
ignoreValidationDuringExecution?: boolean;
|
|
25
|
+
}[];
|
|
26
|
+
export declare function execute(this: IExecuteFunctions, index: number): Promise<import("n8n-workflow").INodeExecutionData[]>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = exports.properties = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const transport_1 = require("../../transport");
|
|
6
|
+
const utilities_1 = require("../../utils/utilities");
|
|
7
|
+
exports.properties = [];
|
|
8
|
+
const displayOptions = {
|
|
9
|
+
show: {
|
|
10
|
+
resource: ['tag'],
|
|
11
|
+
operation: ['index'],
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
exports.description = (0, utilities_1.updateDisplayOptions)(displayOptions, exports.properties);
|
|
15
|
+
async function execute(index) {
|
|
16
|
+
try {
|
|
17
|
+
const responseData = await transport_1.apiRequest.call(this, 'GET', `/tag`);
|
|
18
|
+
return utilities_1.handleResponse.call(this, responseData, index);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
return utilities_1.handleError.call(this, error);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=index.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.operation.js","sourceRoot":"","sources":["../../../../../nodes/KlickTipp/actions/tag/index.operation.ts"],"names":[],"mappings":";;;AAeA,0BAOC;AArBD,+CAA6C;AAC7C,qDAA0F;AAE7E,QAAA,UAAU,GAAsB,EAAE,CAAC;AAEhD,MAAM,cAAc,GAAG;IACtB,IAAI,EAAE;QACL,QAAQ,EAAE,CAAC,KAAK,CAAC;QACjB,SAAS,EAAE,CAAC,OAAO,CAAC;KACpB;CACD,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,gCAAoB,EAAC,cAAc,EAAE,kBAAU,CAAC,CAAC;AAErE,KAAK,UAAU,OAAO,CAA0B,KAAa;IACnE,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,MAAM,sBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAChE,OAAO,0BAAc,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;IACvD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,uBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const properties: INodeProperties[];
|
|
3
|
+
export declare const description: {
|
|
4
|
+
displayOptions: import("n8n-workflow").IDisplayOptions;
|
|
5
|
+
displayName: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
8
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
|
|
9
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
10
|
+
description?: string;
|
|
11
|
+
hint?: string;
|
|
12
|
+
options?: Array<import("n8n-workflow").INodePropertyOptions | INodeProperties | import("n8n-workflow").INodePropertyCollection>;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
isNodeSetting?: boolean;
|
|
15
|
+
noDataExpression?: boolean;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
routing?: import("n8n-workflow").INodePropertyRouting;
|
|
18
|
+
credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
|
|
19
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
|
|
20
|
+
modes?: import("n8n-workflow").INodePropertyMode[];
|
|
21
|
+
requiresDataPath?: "single" | "multiple";
|
|
22
|
+
doNotInherit?: boolean;
|
|
23
|
+
validateType?: import("n8n-workflow").FieldType;
|
|
24
|
+
ignoreValidationDuringExecution?: boolean;
|
|
25
|
+
}[];
|
|
26
|
+
export declare function execute(this: IExecuteFunctions, index: number): Promise<import("n8n-workflow").INodeExecutionData[]>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = exports.properties = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const transport_1 = require("../../transport");
|
|
6
|
+
const utilities_1 = require("../../utils/utilities");
|
|
7
|
+
const utilities_2 = require("../../utils/utilities");
|
|
8
|
+
exports.properties = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Tag ID',
|
|
11
|
+
name: 'tagId',
|
|
12
|
+
type: 'options',
|
|
13
|
+
typeOptions: {
|
|
14
|
+
loadOptionsMethod: 'getTags',
|
|
15
|
+
},
|
|
16
|
+
default: '',
|
|
17
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Name',
|
|
21
|
+
name: 'name',
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: '',
|
|
24
|
+
placeholder: 'Enter name (optional)',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Description',
|
|
28
|
+
name: 'description',
|
|
29
|
+
type: 'string',
|
|
30
|
+
default: '',
|
|
31
|
+
placeholder: 'Enter description (optional)',
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
const displayOptions = {
|
|
35
|
+
show: {
|
|
36
|
+
resource: ['tag'],
|
|
37
|
+
operation: ['update'],
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
exports.description = (0, utilities_1.updateDisplayOptions)(displayOptions, exports.properties);
|
|
41
|
+
async function execute(index) {
|
|
42
|
+
const tagId = this.getNodeParameter('tagId', index);
|
|
43
|
+
const name = this.getNodeParameter('name', index);
|
|
44
|
+
const description = this.getNodeParameter('description', index);
|
|
45
|
+
if (!tagId) {
|
|
46
|
+
return utilities_1.handleError.call(this, 'The tag ID is required.');
|
|
47
|
+
}
|
|
48
|
+
const body = {
|
|
49
|
+
...(name && { name }),
|
|
50
|
+
...(description && { text: description }),
|
|
51
|
+
};
|
|
52
|
+
try {
|
|
53
|
+
await transport_1.apiRequest.call(this, 'PUT', `/tag/${tagId}`, body);
|
|
54
|
+
(0, utilities_2.clearCache)(['cachedTags']);
|
|
55
|
+
return this.helpers.returnJsonArray({ success: true });
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
return utilities_1.handleError.call(this, error);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=update.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.operation.js","sourceRoot":"","sources":["../../../../../nodes/KlickTipp/actions/tag/update.operation.ts"],"names":[],"mappings":";;;AA0CA,0BAuBC;AAhED,+CAA6C;AAC7C,qDAA0E;AAC1E,qDAAmD;AAEtC,QAAA,UAAU,GAAsB;IAC5C;QAEC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,SAAS;SAC5B;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,yHAAyH;KACtI;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,uBAAuB;KACpC;IAC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O,uBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CACHE_TTL = exports.KLICKTIPP_API_CREDENTIAL_NAME = exports.BASE_URL = void 0;
|
|
4
|
+
exports.BASE_URL = 'https://api.klicktipp.com';
|
|
5
|
+
exports.KLICKTIPP_API_CREDENTIAL_NAME = 'klickTippApi';
|
|
6
|
+
exports.CACHE_TTL = 600;
|
|
7
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../nodes/KlickTipp/helpers/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG,2BAA2B,CAAC;AACvC,QAAA,6BAA6B,GAAG,cAAc,CAAC;AAC/C,QAAA,SAAS,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../nodes/KlickTipp/helpers/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="260" height="200" viewBox="0 0 260 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M118.288 167.165C101.695 165.743 86.0957 158.534 74.2719 146.794L74.0732 146.595C73.8744 146.43 73.7088 146.265 73.5432 146.066C61.9181 134.326 54.7974 118.85 53.4063 102.381C53.1745 99.3384 55.4598 96.6928 58.5068 96.4613C58.6724 96.4613 58.838 96.4613 59.0036 96.4613C61.885 96.4613 64.3028 98.677 64.5677 101.521C64.8327 104.464 65.2964 107.407 65.9919 110.318H66.0913C68.5752 120.867 73.9076 130.523 81.4589 138.262C81.5914 138.361 81.7239 138.493 81.8232 138.626L82.5519 139.353C90.2026 146.761 99.6748 151.986 110.008 154.499V154.598C113.022 155.359 116.102 155.855 119.216 156.119C122.263 156.384 124.548 159.096 124.283 162.138C124.018 165.015 121.633 167.198 118.752 167.198C118.586 167.165 118.454 167.165 118.288 167.165ZM118.255 145.008C95.8992 142.197 78.2794 124.604 75.4642 102.282C75.1661 99.3384 77.2858 96.6928 80.2666 96.3621C80.4653 96.3291 80.664 96.3291 80.8627 96.3291C83.5786 96.296 85.8638 98.3133 86.195 100.992C86.5262 103.538 87.0562 106.019 87.851 108.466H87.9504C91.3949 118.949 99.2443 127.382 109.445 131.615V131.714C112.658 133.07 116.069 133.963 119.547 134.393C122.494 134.789 124.548 137.501 124.15 140.444C123.786 143.09 121.534 145.074 118.851 145.107C118.653 145.041 118.454 145.041 118.255 145.008ZM117.626 122.95C107.855 120.47 100.238 112.831 97.787 103.042C97.0584 100.231 98.7475 97.3542 101.563 96.6267C101.993 96.5275 102.424 96.4613 102.887 96.4613H102.987C105.438 96.4613 107.557 98.1148 108.154 100.496C109.644 106.415 114.281 111.045 120.176 112.566C123.058 113.261 124.813 116.171 124.084 119.048C123.488 121.429 121.335 123.116 118.851 123.116C118.454 123.083 118.023 123.05 117.626 122.95ZM168.001 96.296C165.285 96.3291 163 94.3118 162.669 91.6331C162.338 89.0868 161.775 86.6065 160.98 84.1593H160.88C157.436 73.6762 149.587 65.2103 139.386 61.0104V60.9112C136.173 59.5553 132.762 58.6624 129.284 58.2325C126.336 57.8026 124.316 55.0578 124.747 52.1476C125.177 49.3036 127.727 47.3194 130.576 47.584C152.932 50.3949 170.551 67.9881 173.367 90.3103C173.731 93.2205 171.644 95.8661 168.73 96.2299C168.498 96.2629 168.299 96.2629 168.067 96.2629H168.001V96.296ZM184.329 91.2363C184.064 88.2931 183.601 85.3499 182.905 82.4728H182.806C180.322 71.9235 174.99 62.267 167.405 54.5287C167.273 54.4295 167.14 54.2972 167.041 54.1649L166.312 53.4374C158.661 46.0297 149.189 40.8047 138.823 38.2913V38.1921C135.809 37.4315 132.729 36.9355 129.615 36.6709C126.734 36.4064 124.548 34.0253 124.548 31.1152C124.548 28.0066 127.065 25.4602 130.211 25.4602H130.509C147.103 26.8822 162.702 34.0915 174.526 45.8313C174.559 45.8974 174.691 45.9966 174.725 46.0297C174.923 46.1951 175.089 46.3604 175.254 46.5588C186.88 58.2987 194.033 73.7754 195.391 90.2442C195.623 93.3528 193.272 96.0645 190.158 96.296H189.827C186.979 96.296 184.561 94.0803 184.329 91.2363ZM145.877 96.1637C143.426 96.1637 141.307 94.5102 140.71 92.1292C139.22 86.2097 134.583 81.5799 128.688 80.0587C126.303 79.4965 124.614 77.3469 124.614 74.8997C124.647 71.9235 127.098 69.5094 130.112 69.5424C130.509 69.5424 130.907 69.6086 131.271 69.6747C141.042 72.1549 148.659 79.7941 151.11 89.5828C151.839 92.3938 150.15 95.2708 147.368 95.9984C146.937 96.0976 146.506 96.1637 146.043 96.1637H145.877Z" fill="#F1871F"/>
|
|
3
|
+
<path d="M186.714 145.24L204.267 160.882C207.149 163.461 207.414 167.859 204.83 170.736C204.797 170.77 204.764 170.803 204.731 170.836C202.181 173.713 197.776 173.977 194.894 171.431L194.861 171.398C188.999 166.173 183.17 161.014 177.275 155.756C177.01 156.351 176.844 156.781 176.645 157.211C174.592 162.271 172.572 167.363 170.518 172.423C170.386 172.754 170.253 173.051 170.088 173.382C169.723 174.209 168.829 174.672 167.968 174.506C167.239 174.308 166.643 173.812 166.279 173.151C164.656 169.877 163.132 166.537 161.576 163.197C154.223 147.455 146.871 131.714 139.551 115.94C139.187 115.146 139.12 114.286 139.319 113.426C139.75 112.07 140.942 111.707 142.499 112.236L166.511 120.206L202.446 132.177C203.406 132.508 204.3 132.871 204.4 133.996C204.466 135.087 203.804 136.079 202.777 136.443C197.676 139.188 192.609 141.966 187.542 144.744L186.714 145.24Z" fill="white"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as loadOptions from './loadOptions';
|
|
@@ -0,0 +1,28 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.loadOptions = void 0;
|
|
27
|
+
exports.loadOptions = __importStar(require("./loadOptions"));
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/KlickTipp/methods/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAA6C"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
|
2
|
+
export declare function getTags(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
3
|
+
export declare function getTagsWithoutPlaceholder(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
4
|
+
export declare function getOptInProcesses(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
5
|
+
export declare function getFields(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTags = getTags;
|
|
4
|
+
exports.getTagsWithoutPlaceholder = getTagsWithoutPlaceholder;
|
|
5
|
+
exports.getOptInProcesses = getOptInProcesses;
|
|
6
|
+
exports.getFields = getFields;
|
|
7
|
+
const transport_1 = require("../transport");
|
|
8
|
+
const utilities_1 = require("../utils/utilities");
|
|
9
|
+
const lodash_1 = require("lodash");
|
|
10
|
+
function addPlaceholder(options, placeholder) {
|
|
11
|
+
if (placeholder) {
|
|
12
|
+
options.unshift({ name: placeholder, value: '' });
|
|
13
|
+
}
|
|
14
|
+
return options;
|
|
15
|
+
}
|
|
16
|
+
async function getCachedOptions(cacheKey, endpoint, placeholder, defaultName = 'Unnamed') {
|
|
17
|
+
var _a, _b;
|
|
18
|
+
const node = this.getNode();
|
|
19
|
+
const credentialsId = (_b = (_a = node.credentials) === null || _a === void 0 ? void 0 : _a.klickTippApi) === null || _b === void 0 ? void 0 : _b.id;
|
|
20
|
+
if (!credentialsId) {
|
|
21
|
+
throw new Error('Credentials ID is missing.');
|
|
22
|
+
}
|
|
23
|
+
const cacheKeyWithCredentials = `${cacheKey}_${credentialsId}`;
|
|
24
|
+
let options = utilities_1.cache.get(cacheKeyWithCredentials);
|
|
25
|
+
if (options) {
|
|
26
|
+
console.log(`Served from cache: ${cacheKeyWithCredentials}`);
|
|
27
|
+
return addPlaceholder(options, placeholder);
|
|
28
|
+
}
|
|
29
|
+
const responseData = await transport_1.apiRequest.call(this, 'GET', endpoint);
|
|
30
|
+
if (!(0, lodash_1.isObject)(responseData) || (0, lodash_1.isEmpty)(responseData)) {
|
|
31
|
+
throw new Error(`Unexpected response format for ${endpoint}`);
|
|
32
|
+
}
|
|
33
|
+
options = Object.entries(responseData).map(([id, name]) => ({
|
|
34
|
+
name: name || defaultName,
|
|
35
|
+
value: id,
|
|
36
|
+
}));
|
|
37
|
+
utilities_1.cache.set(cacheKeyWithCredentials, options);
|
|
38
|
+
return addPlaceholder(options, placeholder);
|
|
39
|
+
}
|
|
40
|
+
async function getTags() {
|
|
41
|
+
return getCachedOptions.call(this, 'cachedTags', '/tag', 'Please select a tag');
|
|
42
|
+
}
|
|
43
|
+
async function getTagsWithoutPlaceholder() {
|
|
44
|
+
return getCachedOptions.call(this, 'cachedTags', '/tag');
|
|
45
|
+
}
|
|
46
|
+
async function getOptInProcesses() {
|
|
47
|
+
return getCachedOptions.call(this, 'cachedOptInProcesses', '/list', 'Please select the opt-in process', 'Predefined double opt-in process');
|
|
48
|
+
}
|
|
49
|
+
async function getFields() {
|
|
50
|
+
return getCachedOptions.call(this, 'cachedDataFields', '/field', 'Please select a field');
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=loadOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadOptions.js","sourceRoot":"","sources":["../../../../nodes/KlickTipp/methods/loadOptions.ts"],"names":[],"mappings":";;AAiEA,0BAEC;AAED,8DAIC;AAED,8CAUC;AAED,8BAEC;AAxFD,4CAA0C;AAE1C,kDAA2C;AAC3C,mCAA2C;AAK3C,SAAS,cAAc,CACtB,OAA+B,EAC/B,WAAoB;IAEpB,IAAI,WAAW,EAAE,CAAC;QACjB,OAAO,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC;AAKD,KAAK,UAAU,gBAAgB,CAE9B,Q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KAAK,UAAU,OAAO;IAC5B,OAAO,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,qBAAqB,CAAC,CAAC;AACjF,CAAC;AAEM,KAAK,UAAU,yBAAyB;IAG9C,OAAO,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;AAC1D,CAAC;AAEM,KAAK,UAAU,iBAAiB;IAGtC,OAAO,gBAAgB,CAAC,IAAI,CAC3B,IAAI,EACJ,sBAAsB,EACtB,OAAO,EACP,kCAAkC,EAClC,kCAAkC,CAClC,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,SAAS;IAC9B,OAAO,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,uBAAuB,CAAC,CAAC;AAC3F,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IDataObject, IExecuteFunctions, IHttpRequestMethods, ILoadOptionsFunctions, IPollFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function apiRequest(this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions, method: IHttpRequestMethods, endpoint: string, body?: IDataObject, query?: IDataObject, uri?: string, option?: IDataObject, defaultHeaders?: IDataObject, session?: IDataObject, verifySSL?: boolean): Promise<any>;
|
|
3
|
+
export default apiRequest;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.apiRequest = apiRequest;
|
|
7
|
+
const qs_1 = __importDefault(require("qs"));
|
|
8
|
+
const buffer_1 = require("buffer");
|
|
9
|
+
const constants_1 = require("../helpers/constants");
|
|
10
|
+
async function logout(authenticationMethod, session, verifySSL) {
|
|
11
|
+
if (!session.sessionName || !session.sessionId) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const logoutOptions = {
|
|
15
|
+
method: 'POST',
|
|
16
|
+
uri: `${constants_1.BASE_URL}/account/logout`,
|
|
17
|
+
json: true,
|
|
18
|
+
rejectUnauthorized: verifySSL,
|
|
19
|
+
};
|
|
20
|
+
try {
|
|
21
|
+
await this.helpers.requestWithAuthentication.call(this, authenticationMethod, logoutOptions);
|
|
22
|
+
this.logger.info('Logout succeeded.');
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
this.logger.error(`Logout failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
async function apiRequest(method, endpoint, body = {}, query, uri, option = {}, defaultHeaders = {}, session = {}, verifySSL = true) {
|
|
29
|
+
query = query || {};
|
|
30
|
+
const headers = {
|
|
31
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
32
|
+
...defaultHeaders,
|
|
33
|
+
};
|
|
34
|
+
let requestData;
|
|
35
|
+
if (method === 'POST' || method === 'PUT') {
|
|
36
|
+
requestData = qs_1.default.stringify(body);
|
|
37
|
+
headers['Content-Length'] = buffer_1.Buffer.byteLength(requestData).toString();
|
|
38
|
+
}
|
|
39
|
+
const options = {
|
|
40
|
+
headers,
|
|
41
|
+
method,
|
|
42
|
+
body,
|
|
43
|
+
qs: query,
|
|
44
|
+
uri: uri || `${constants_1.BASE_URL}/${endpoint}`,
|
|
45
|
+
useQuerystring: false,
|
|
46
|
+
json: true,
|
|
47
|
+
...option,
|
|
48
|
+
rejectUnauthorized: verifySSL,
|
|
49
|
+
};
|
|
50
|
+
if (Object.keys(body).length === 0) {
|
|
51
|
+
delete options.body;
|
|
52
|
+
}
|
|
53
|
+
try {
|
|
54
|
+
return await this.helpers.requestWithAuthentication.call(this, constants_1.KLICKTIPP_API_CREDENTIAL_NAME, options);
|
|
55
|
+
}
|
|
56
|
+
finally {
|
|
57
|
+
const credentials = await this.getCredentials(constants_1.KLICKTIPP_API_CREDENTIAL_NAME);
|
|
58
|
+
await logout.call(this, constants_1.KLICKTIPP_API_CREDENTIAL_NAME, credentials, verifySSL);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.default = apiRequest;
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/KlickTipp/transport/index.ts"],"names":[],"mappings":";;;;;AAsCA,gCAuDC;AA7FD,4CAAoB;AAUpB,mCAAgC;AAChC,oDAA+E;AAE/E,KAAK,UAAU,MAAM,CAEpB,oBAA4B,EAC5B,OAAoB,EACpB,SAAkB;IAElB,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QAChD,OAAO;IACR,CAAC;IAED,MAAM,aAAa,GAAoB;QACtC,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,GAAG,oBAAQ,iBAAiB;QACjC,IAAI,EAAE,IAAI;QACV,kBAAkB,EAAE,SAAS;KAC7B,CAAC;IAEF,IAAI,CAAC;QACJ,MAAM,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,EAAE,oBAAoB,EAAE,aAAa,CAAC,CAAC;QAC7F,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC/F,CAAC;AACF,CAAC;AAEM,KAAK,UAAU,UAAU,CAE/B,MAA2B,EAC3B,QAAgB,EAChB,OAAoB,EAAE,EACtB,KAAmB,EACnB,GAAY,EACZ,SAAsB,EAA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|
|
1
|
+
import { IDataObject, IDisplayOptions, IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
import NodeCache from 'node-cache';
|
|
3
|
+
export declare function updateDisplayOptions(displayOptions: IDisplayOptions, properties: INodeProperties[]): {
|
|
4
|
+
displayOptions: IDisplayOptions;
|
|
5
|
+
displayName: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: import("n8n-workflow").NodePropertyTypes;
|
|
8
|
+
typeOptions?: import("n8n-workflow").INodePropertyTypeOptions;
|
|
9
|
+
default: import("n8n-workflow").NodeParameterValueType;
|
|
10
|
+
description?: string;
|
|
11
|
+
hint?: string;
|
|
12
|
+
options?: Array<import("n8n-workflow").INodePropertyOptions | INodeProperties | import("n8n-workflow").INodePropertyCollection>;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
isNodeSetting?: boolean;
|
|
15
|
+
noDataExpression?: boolean;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
routing?: import("n8n-workflow").INodePropertyRouting;
|
|
18
|
+
credentialTypes?: Array<"extends:oAuth2Api" | "extends:oAuth1Api" | "has:authenticate" | "has:genericAuth">;
|
|
19
|
+
extractValue?: import("n8n-workflow").INodePropertyValueExtractor;
|
|
20
|
+
modes?: import("n8n-workflow").INodePropertyMode[];
|
|
21
|
+
requiresDataPath?: "single" | "multiple";
|
|
22
|
+
doNotInherit?: boolean;
|
|
23
|
+
validateType?: import("n8n-workflow").FieldType;
|
|
24
|
+
ignoreValidationDuringExecution?: boolean;
|
|
25
|
+
}[];
|
|
26
|
+
export declare function transformDataFields(dataFields: IDataObject[]): IDataObject;
|
|
27
|
+
declare const cache: NodeCache;
|
|
28
|
+
export declare function clearCache(keys?: string[]): void;
|
|
29
|
+
export { cache };
|
|
30
|
+
export declare function handleError(this: IExecuteFunctions, error: unknown): INodeExecutionData[];
|
|
31
|
+
export declare function handleResponse(this: IExecuteFunctions, data: IDataObject, index: number): INodeExecutionData[];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.cache = void 0;
|
|
7
|
+
exports.updateDisplayOptions = updateDisplayOptions;
|
|
8
|
+
exports.transformDataFields = transformDataFields;
|
|
9
|
+
exports.clearCache = clearCache;
|
|
10
|
+
exports.handleError = handleError;
|
|
11
|
+
exports.handleResponse = handleResponse;
|
|
12
|
+
const node_cache_1 = __importDefault(require("node-cache"));
|
|
13
|
+
const lodash_1 = require("lodash");
|
|
14
|
+
const constants_1 = require("../helpers/constants");
|
|
15
|
+
function updateDisplayOptions(displayOptions, properties) {
|
|
16
|
+
return properties.map((nodeProperty) => {
|
|
17
|
+
return {
|
|
18
|
+
...nodeProperty,
|
|
19
|
+
displayOptions: (0, lodash_1.merge)({}, nodeProperty.displayOptions, displayOptions),
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function transformDataFields(dataFields) {
|
|
24
|
+
const uniqueFields = (0, lodash_1.uniqBy)(dataFields, 'fieldId');
|
|
25
|
+
return (0, lodash_1.reduce)(uniqueFields, (acc, field) => {
|
|
26
|
+
const fieldId = field.fieldId;
|
|
27
|
+
if (fieldId) {
|
|
28
|
+
acc[fieldId] = field.fieldValue;
|
|
29
|
+
}
|
|
30
|
+
return acc;
|
|
31
|
+
}, {});
|
|
32
|
+
}
|
|
33
|
+
const cache = new node_cache_1.default({ stdTTL: constants_1.CACHE_TTL });
|
|
34
|
+
exports.cache = cache;
|
|
35
|
+
function clearCache(keys) {
|
|
36
|
+
if (keys) {
|
|
37
|
+
keys.forEach((key) => cache.del(key));
|
|
38
|
+
console.log(`Cleared cache keys: ${keys.join(', ')}`);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
cache.flushAll();
|
|
42
|
+
console.log('Cleared all cache entries');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function handleError(error) {
|
|
46
|
+
const errorMessage = typeof error === 'string' ? error : error.message || 'Undefined error';
|
|
47
|
+
return this.helpers.returnJsonArray({
|
|
48
|
+
success: false,
|
|
49
|
+
error: errorMessage,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function handleResponse(data, index) {
|
|
53
|
+
return this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(data), {
|
|
54
|
+
itemData: { item: index },
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../../../nodes/KlickTipp/utils/utilities.ts"],"names":[],"mappings":";;;;;;AAYA,oDAUC;AAED,kDAeC;AAKD,gCAQC;AAID,kCAQC;AAED,wCAQC;AAnED,4DAAmC;AAEnC,mCAA+C;AAC/C,oDAAiD;AAEjD,SAAgB,oBAAoB,CACnC,cAA+B,EAC/B,UAA6B;IAE7B,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE;QACtC,OAAO;YACN,GAAG,YAAY;YACf,cAAc,EAAE,IAAA,cAAK,EAAC,EAAE,EAAE,YAAY,CAAC,cAAc,EAAE,cAAc,CAAC;SACtE,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,mBAAmB,CAAC,UAAyB;IAE5D,MAAM,YAAY,GAAG,IAAA,eAAM,EAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAEnD,OAAO,IAAA,eAAM,EACZ,YAAY,EACZ,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QACd,MAAM,OAAO,GAAG,KAAK,CAAC,OAAiB,CAAC;QACxC,IAAI,OAAO,EAAE,CAAC;YACb,GAAG,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC;QACjC,CAAC;QACD,OAA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[
|
|
6
|
+
"n8n-community-node-package",
|
|
7
|
+
"n8n",
|
|
8
|
+
"klicktipp",
|
|
9
|
+
"integration",
|
|
10
|
+
"api"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"homepage": "https://github.com/klicktipp/n8n-community-node-klicktipp",
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "KlickTipp Team",
|
|
16
|
+
"email": "github@team.klicktipp.com",
|
|
17
|
+
"url": "https://www.klicktipp.com/"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/klicktipp/n8n-community-node-klicktipp"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18.10",
|
|
25
|
+
"pnpm": ">=9.1"
|
|
26
|
+
},
|
|
27
|
+
"packageManager": "pnpm@9.1.4",
|
|
28
|
+
"main": "index.js",
|
|
29
|
+
"scripts": {
|
|
30
|
+
"preinstall": "npx only-allow pnpm",
|
|
31
|
+
"build": "tsc && gulp build:icons",
|
|
32
|
+
"dev": "tsc --watch",
|
|
33
|
+
"format": "prettier nodes --write",
|
|
34
|
+
"lint": "eslint nodes credentials package.json",
|
|
35
|
+
"lintfix": "eslint nodes credentials package.json --fix",
|
|
36
|
+
"prepublishOnly": "pnpm build && pnpm lint -c .eslintrc.prepublish.js nodes credentials package.json"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist"
|
|
40
|
+
],
|
|
41
|
+
"n8n": {
|
|
42
|
+
"n8nNodesApiVersion": 1,
|
|
43
|
+
"credentials": [
|
|
44
|
+
"dist/credentials/KlickTippApi.credentials.js"
|
|
45
|
+
],
|
|
46
|
+
"nodes": [
|
|
47
|
+
"dist/nodes/KlickTipp/KlickTipp.node.js"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/lodash": "^4.17.13",
|
|
52
|
+
"@types/node": "^22.8.6",
|
|
53
|
+
"@types/qs": "^6.9.16",
|
|
54
|
+
"@typescript-eslint/parser": "^7.15.0",
|
|
55
|
+
"eslint": "^8.56.0",
|
|
56
|
+
"eslint-plugin-n8n-nodes-base": "1.16.1",
|
|
57
|
+
"gulp": "^4.0.2",
|
|
58
|
+
"lodash": "^4.17.21",
|
|
59
|
+
"n8n-workflow": "*",
|
|
60
|
+
"prettier": "^3.3.2",
|
|
61
|
+
"typescript": "^5.5.3"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"n8n-workflow": "*"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"axios": "^1.7.7",
|
|
68
|
+
"https": "^1.0.0",
|
|
69
|
+
"node-cache": "^5.1.2",
|
|
70
|
+
"qs": "^6.13.0"
|
|
71
|
+
}
|
|
72
|
+
}
|