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,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: ['subscriber'],
|
|
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', `/subscriber`);
|
|
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/subscriber/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,YAAY,CAAC;QACxB,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,aAAa,CAAC,CAAC;QACvE,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,48 @@
|
|
|
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
|
+
{
|
|
9
|
+
displayName: 'Email',
|
|
10
|
+
name: 'email',
|
|
11
|
+
type: 'string',
|
|
12
|
+
default: '',
|
|
13
|
+
placeholder: 'Enter email address (required)',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
displayName: 'Autoresponder',
|
|
17
|
+
name: 'autoresponderId',
|
|
18
|
+
type: 'string',
|
|
19
|
+
default: '',
|
|
20
|
+
placeholder: 'Enter the ID of the autoresponder (optional)',
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
const displayOptions = {
|
|
24
|
+
show: {
|
|
25
|
+
resource: ['subscriber'],
|
|
26
|
+
operation: ['resendAutoresponder'],
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
exports.description = (0, utilities_1.updateDisplayOptions)(displayOptions, exports.properties);
|
|
30
|
+
async function execute(index) {
|
|
31
|
+
const email = this.getNodeParameter('email', index);
|
|
32
|
+
const autoresponderId = this.getNodeParameter('autoresponderId', index);
|
|
33
|
+
if (!email) {
|
|
34
|
+
return utilities_1.handleError.call(this, 'The email address is required.');
|
|
35
|
+
}
|
|
36
|
+
const body = {
|
|
37
|
+
email,
|
|
38
|
+
...(autoresponderId && { autoresponder: autoresponderId }),
|
|
39
|
+
};
|
|
40
|
+
try {
|
|
41
|
+
await transport_1.apiRequest.call(this, 'POST', '/subscriber/resend', body);
|
|
42
|
+
return this.helpers.returnJsonArray({ success: true });
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
return utilities_1.handleError.call(this, error);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=resend-autoresponder.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resend-autoresponder.operation.js","sourceRoot":"","sources":["../../../../../nodes/KlickTipp/actions/subscriber/resend-autoresponder.operation.ts"],"names":[],"mappings":";;;AAiCA,0BAoBC;AApDD,+CAA6C;AAC7C,qDAG+B;AAElB,QAAA,UAAU,GAAsB;IAC3C;QACE,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gCAAgC;KAC9C;IACD;QACE,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,8CAA8C;KAC5D;CACF,CAAC;AAEF,MAAM,cAAc,GAAG;IACrB,IAAI,EAAE;QACJ,QAAQ,EAAE,CAAC,YAAY,CAAC;QACxB,SAAS,EAAE,CAAC,qBAAqB,CAAC;KACnC;CACF,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,gCAAoB,EAAC,cAAc,EAAE,kBAAU,CAAC,CAAC;AAErE,KAAK,UAAU,OAAO,CAA0B,KAAa;IAClE,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAW,CAAC;IAC9D,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,KAAK,CAAW,CAAC;IAElF,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,uBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,gCAAgC,CAAC,CAAC;IAClE,CAAC;IAGD,MAAM,IAAI,GAAgB;QACxB,KAAK;QACL,GAAG,CAAC,eAAe,IAAI,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;KAC3D,CAAC;IAEF,IAAI,CAAC;QACH,MAAM,sBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,oBAAoB,EAAE,IAAI,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,uBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvC,CAAC;AACH,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,36 @@
|
|
|
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
|
+
{
|
|
9
|
+
displayName: 'Email',
|
|
10
|
+
name: 'email',
|
|
11
|
+
type: 'string',
|
|
12
|
+
default: '',
|
|
13
|
+
placeholder: 'Enter email address (required)',
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
const displayOptions = {
|
|
17
|
+
show: {
|
|
18
|
+
resource: ['subscriber'],
|
|
19
|
+
operation: ['search'],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
exports.description = (0, utilities_1.updateDisplayOptions)(displayOptions, exports.properties);
|
|
23
|
+
async function execute(index) {
|
|
24
|
+
const email = this.getNodeParameter('email', index);
|
|
25
|
+
if (!email) {
|
|
26
|
+
return utilities_1.handleError.call(this, 'The email address is required.');
|
|
27
|
+
}
|
|
28
|
+
try {
|
|
29
|
+
const responseData = await transport_1.apiRequest.call(this, 'POST', '/subscriber/search', { email });
|
|
30
|
+
return utilities_1.handleResponse.call(this, responseData, index);
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
return utilities_1.handleError.call(this, error);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=search.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.operation.js","sourceRoot":"","sources":["../../../../../nodes/KlickTipp/actions/subscriber/search.operation.ts"],"names":[],"mappings":";;;AAuBA,0BAaC;AAnCD,+CAA6C;AAC7C,qDAA0F;AAE7E,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gCAAgC;KAC7C;CACD,CAAC;AAEF,MAAM,cAAc,GAAG;IACtB,IAAI,EAAE;QACL,QAAQ,EAAE,CAAC,YAAY,CAAC;QACxB,SAAS,EAAE,CAAC,QAAQ,CAAC;KACrB;CACD,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,gCAAoB,EAAC,cAAc,EAAE,kBAAU,CAAC,CAAC;AAErE,KAAK,UAAU,OAAO,CAA0B,KAAa;IACnE,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAW,CAAC;IAE9D,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,uBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,gCAAgC,CAAC,CAAC;IACjE,CAAC;IAED,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,MAAM,sBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,oBAAoB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1F,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,94 @@
|
|
|
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
|
+
{
|
|
9
|
+
displayName: 'Email',
|
|
10
|
+
name: 'email',
|
|
11
|
+
type: 'string',
|
|
12
|
+
default: '',
|
|
13
|
+
placeholder: 'Enter email address (required)',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
displayName: 'SMS Number',
|
|
17
|
+
name: 'smsNumber',
|
|
18
|
+
type: 'string',
|
|
19
|
+
default: '',
|
|
20
|
+
placeholder: 'Enter SMS number (optional)',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
displayName: 'Data Fields',
|
|
24
|
+
name: 'fields',
|
|
25
|
+
type: 'fixedCollection',
|
|
26
|
+
typeOptions: {
|
|
27
|
+
multipleValues: true,
|
|
28
|
+
},
|
|
29
|
+
default: {},
|
|
30
|
+
description: 'Select the data field (optional)',
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'dataFields',
|
|
34
|
+
displayName: 'Data Field',
|
|
35
|
+
values: [
|
|
36
|
+
{
|
|
37
|
+
displayName: 'Field Name',
|
|
38
|
+
name: 'fieldId',
|
|
39
|
+
type: 'options',
|
|
40
|
+
typeOptions: {
|
|
41
|
+
loadOptionsMethod: 'getFields',
|
|
42
|
+
},
|
|
43
|
+
default: '',
|
|
44
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Field Value',
|
|
48
|
+
name: 'fieldValue',
|
|
49
|
+
type: 'string',
|
|
50
|
+
default: '',
|
|
51
|
+
description: 'Enter the value for the selected field',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
const displayOptions = {
|
|
59
|
+
show: {
|
|
60
|
+
resource: ['subscriber'],
|
|
61
|
+
operation: ['signIn'],
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
exports.description = (0, utilities_1.updateDisplayOptions)(displayOptions, exports.properties);
|
|
65
|
+
async function execute(index) {
|
|
66
|
+
const credentials = await this.getCredentials('klickTippApi');
|
|
67
|
+
if (!credentials) {
|
|
68
|
+
throw new Error('Missing credentials. Please check that your KlickTipp API credentials are configured correctly.');
|
|
69
|
+
}
|
|
70
|
+
const email = this.getNodeParameter('email', index);
|
|
71
|
+
const smsNumber = this.getNodeParameter('smsNumber', index);
|
|
72
|
+
const fields = this.getNodeParameter('fields', index);
|
|
73
|
+
const apiKey = credentials.apiKey;
|
|
74
|
+
if (!email) {
|
|
75
|
+
return utilities_1.handleError.call(this, 'The email address is required.');
|
|
76
|
+
}
|
|
77
|
+
if (!apiKey) {
|
|
78
|
+
return utilities_1.handleError.call(this, 'The API key is required.');
|
|
79
|
+
}
|
|
80
|
+
const body = {
|
|
81
|
+
email,
|
|
82
|
+
apikey: apiKey,
|
|
83
|
+
...(smsNumber && { smsNumber }),
|
|
84
|
+
...((fields === null || fields === void 0 ? void 0 : fields.dataFields) && { fields: (0, utilities_1.transformDataFields)(fields.dataFields) }),
|
|
85
|
+
};
|
|
86
|
+
try {
|
|
87
|
+
const responseData = await transport_1.apiRequest.call(this, 'POST', '/subscriber/signin', body);
|
|
88
|
+
return utilities_1.handleResponse.call(this, responseData, index);
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
return utilities_1.handleError.call(this, error);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=sign-in.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-in.operation.js","sourceRoot":"","sources":["../../../../../nodes/KlickTipp/actions/subscriber/sign-in.operation.ts"],"names":[],"mappings":";;;AAuEA,0BAoCC;AA1GD,+CAA6C;AAC7C,qDAK+B;AAElB,QAA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AC;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,48 @@
|
|
|
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
|
+
{
|
|
9
|
+
displayName: 'Email',
|
|
10
|
+
name: 'email',
|
|
11
|
+
type: 'string',
|
|
12
|
+
default: '',
|
|
13
|
+
placeholder: 'Enter email address (required)',
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
const displayOptions = {
|
|
17
|
+
show: {
|
|
18
|
+
resource: ['subscriber'],
|
|
19
|
+
operation: ['signOff'],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
exports.description = (0, utilities_1.updateDisplayOptions)(displayOptions, exports.properties);
|
|
23
|
+
async function execute(index) {
|
|
24
|
+
const credentials = await this.getCredentials('klickTippApi');
|
|
25
|
+
if (!credentials) {
|
|
26
|
+
return utilities_1.handleError.call(this, 'Missing credentials. Please check that your KlickTipp API credentials are configured correctly');
|
|
27
|
+
}
|
|
28
|
+
const apiKey = credentials.apiKey;
|
|
29
|
+
const email = this.getNodeParameter('email', index);
|
|
30
|
+
if (!email) {
|
|
31
|
+
return utilities_1.handleError.call(this, 'The email address is required.');
|
|
32
|
+
}
|
|
33
|
+
if (!apiKey) {
|
|
34
|
+
return utilities_1.handleError.call(this, 'The API key is required.');
|
|
35
|
+
}
|
|
36
|
+
const body = {
|
|
37
|
+
email,
|
|
38
|
+
apikey: apiKey,
|
|
39
|
+
};
|
|
40
|
+
try {
|
|
41
|
+
const responseData = await transport_1.apiRequest.call(this, 'POST', '/subscriber/signoff', body);
|
|
42
|
+
return utilities_1.handleResponse.call(this, responseData, index);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
return utilities_1.handleError.call(this, error);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=sign-off.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-off.operation.js","sourceRoot":"","sources":["../../../../../nodes/KlickTipp/actions/subscriber/sign-off.operation.ts"],"names":[],"mappings":";;;AAuBA,0BA+BC;AArDD,+CAA6C;AA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,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,48 @@
|
|
|
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
|
+
{
|
|
9
|
+
displayName: 'Email',
|
|
10
|
+
name: 'email',
|
|
11
|
+
type: 'string',
|
|
12
|
+
default: '',
|
|
13
|
+
placeholder: 'Enter email address (required)',
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
const displayOptions = {
|
|
17
|
+
show: {
|
|
18
|
+
resource: ['subscriber'],
|
|
19
|
+
operation: ['signOut'],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
exports.description = (0, utilities_1.updateDisplayOptions)(displayOptions, exports.properties);
|
|
23
|
+
async function execute(index) {
|
|
24
|
+
const credentials = await this.getCredentials('klickTippApi');
|
|
25
|
+
if (!credentials) {
|
|
26
|
+
return utilities_1.handleError.call(this, 'Missing credentials. Please check that your KlickTipp API credentials are configured correctly');
|
|
27
|
+
}
|
|
28
|
+
const apiKey = credentials.apiKey;
|
|
29
|
+
const email = this.getNodeParameter('email', index);
|
|
30
|
+
if (!email) {
|
|
31
|
+
return utilities_1.handleError.call(this, 'The email address is required.');
|
|
32
|
+
}
|
|
33
|
+
if (!apiKey) {
|
|
34
|
+
return utilities_1.handleError.call(this, 'The API key is required.');
|
|
35
|
+
}
|
|
36
|
+
const body = {
|
|
37
|
+
email,
|
|
38
|
+
apikey: apiKey,
|
|
39
|
+
};
|
|
40
|
+
try {
|
|
41
|
+
const responseData = await transport_1.apiRequest.call(this, 'POST', '/subscriber/signout', body);
|
|
42
|
+
return utilities_1.handleResponse.call(this, responseData, index);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
return utilities_1.handleError.call(this, error);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=sign-out.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-out.operation.js","sourceRoot":"","sources":["../../../../../nodes/KlickTipp/actions/subscriber/sign-out.operation.ts"],"names":[],"mappings":";;;AAuBA,0BA+BC;AArDD,+CAA6C;AAC7C,qDAA0F;AAE7E,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gCAAgC;KAC7C;CACD,CAAC;AAEF,MAAM,cAAc,GAAG;IACtB,IAAI,EAAE;QACL,QAAQ,EAAE,CAAC,YAAY,CAAC;QACxB,SAAS,EAAE,CAAC,SAAS,CAAC;KACtB;CACD,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,gCAAoB,EAAC,cAAc,EAAE,kBAAU,CAAC,CAAC;AAErE,KAAK,UAAU,OAAO,CAA0B,KAAa;IACnE,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IAC9D,IAAI,CAAC,WAAW,EAAE,CAAC;QAClB,OAAO,uBAAW,CAAC,IAAI,CACtB,IAAI,EACJ,gGAAgG,CAChG,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAG,WAAW,CAAC,MAAgB,CAAC;IAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAW,CAAC;IAE9D,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,uBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,gCAAgC,CAAC,CAAC;IACjE,CAAC;IAED,IAAI,CAAC,MAAM,EAAE,CAAC;QACb,OAAO,uBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,0BAA0B,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,IAAI,GAAgB;QACzB,KAAK;QACL,MAAM,EAAE,MAAM;KACd,CAAC;IAEF,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,MAAM,sBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,qBAAqB,EAAE,IAAI,CAAC,CAAC;QACtF,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,109 @@
|
|
|
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
|
+
{
|
|
9
|
+
displayName: 'Email',
|
|
10
|
+
name: 'email',
|
|
11
|
+
type: 'string',
|
|
12
|
+
default: '',
|
|
13
|
+
placeholder: 'Enter email address (required)',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
displayName: 'SMS Number',
|
|
17
|
+
name: 'smsNumber',
|
|
18
|
+
type: 'string',
|
|
19
|
+
default: '',
|
|
20
|
+
placeholder: 'Enter SMS number (optional)',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
displayName: 'Opt-in Process',
|
|
24
|
+
name: 'listId',
|
|
25
|
+
type: 'options',
|
|
26
|
+
typeOptions: {
|
|
27
|
+
loadOptionsMethod: 'getOptInProcesses',
|
|
28
|
+
},
|
|
29
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
30
|
+
default: '',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Tag ID',
|
|
34
|
+
name: 'tagId',
|
|
35
|
+
type: 'options',
|
|
36
|
+
typeOptions: {
|
|
37
|
+
loadOptionsMethod: 'getTags',
|
|
38
|
+
},
|
|
39
|
+
default: '',
|
|
40
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Data Fields',
|
|
44
|
+
name: 'fields',
|
|
45
|
+
type: 'fixedCollection',
|
|
46
|
+
typeOptions: {
|
|
47
|
+
multipleValues: true,
|
|
48
|
+
},
|
|
49
|
+
default: {},
|
|
50
|
+
description: 'Select the data field (optional)',
|
|
51
|
+
options: [
|
|
52
|
+
{
|
|
53
|
+
name: 'dataFields',
|
|
54
|
+
displayName: 'Data Field',
|
|
55
|
+
values: [
|
|
56
|
+
{
|
|
57
|
+
displayName: 'Field Name',
|
|
58
|
+
name: 'fieldId',
|
|
59
|
+
type: 'options',
|
|
60
|
+
typeOptions: {
|
|
61
|
+
loadOptionsMethod: 'getFields',
|
|
62
|
+
},
|
|
63
|
+
default: '',
|
|
64
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
displayName: 'Field Value',
|
|
68
|
+
name: 'fieldValue',
|
|
69
|
+
type: 'string',
|
|
70
|
+
default: '',
|
|
71
|
+
description: 'Enter the value for the selected field',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
const displayOptions = {
|
|
79
|
+
show: {
|
|
80
|
+
resource: ['subscriber'],
|
|
81
|
+
operation: ['subscribe'],
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
exports.description = (0, utilities_1.updateDisplayOptions)(displayOptions, exports.properties);
|
|
85
|
+
async function execute(index) {
|
|
86
|
+
const email = this.getNodeParameter('email', index);
|
|
87
|
+
const listId = this.getNodeParameter('listId', index);
|
|
88
|
+
const tagId = this.getNodeParameter('tagId', index);
|
|
89
|
+
const smsNumber = this.getNodeParameter('smsNumber', index);
|
|
90
|
+
const fields = this.getNodeParameter('fields', index);
|
|
91
|
+
if (!email) {
|
|
92
|
+
return utilities_1.handleError.call(this, 'The email address is required.');
|
|
93
|
+
}
|
|
94
|
+
const body = {
|
|
95
|
+
email,
|
|
96
|
+
...(listId && { listid: listId }),
|
|
97
|
+
...(tagId && { tagid: tagId }),
|
|
98
|
+
...(smsNumber && { smsnumber: smsNumber }),
|
|
99
|
+
...((fields === null || fields === void 0 ? void 0 : fields.dataFields) && { fields: (0, utilities_1.transformDataFields)(fields.dataFields) }),
|
|
100
|
+
};
|
|
101
|
+
try {
|
|
102
|
+
const responseData = await transport_1.apiRequest.call(this, 'POST', '/subscriber', body);
|
|
103
|
+
return utilities_1.handleResponse.call(this, responseData, index);
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
return utilities_1.handleError.call(this, error);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=subscribe.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscribe.operation.js","sourceRoot":"","sources":["../../../../../nodes/KlickTipp/actions/subscriber/subscribe.operation.ts"],"names":[],"mappings":";;;AA6FA,0BA0BC;AAtHD,+CAA6C;AAC7C,qDAK+B;AAElB,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gCAAgC;KAC7C;IACD;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,6BAA6B;KAC1C;IACD;QAEC,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,mBAAmB;SACtC;QACD,WAAW,EAAE,yHAAyH;QACtI,OAAO,EAAE,EAAE;KACX;IACD;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,yH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,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAgB,CAAC;IAErE,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,uBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,gCAAgC,CAAC,CAAC;IACjE,CAAC;IAGD,MAAM,IAAI,GAAgB;QACzB,KAAK;QACL,GAAG,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QACjC,GAAG,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC9B,GAAG,CAAC,SAAS,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;QAC1C,GAAG,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,KAAI,EAAE,MAAM,EAAE,IAAA,+BAAmB,EAAC,MAAM,CAAC,UAA2B,CAAC,EAAE,CAAC;KAC9F,CAAC;IAEF,IAAI,CAAC;QACJ,MAAM,YAAY,GAAG,MAAM,sBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;QAC9E,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[]>;
|