n8n-nodes-paymenter 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 +21 -0
- package/dist/credentials/PaymenterApi.credentials.d.ts +15 -0
- package/dist/credentials/PaymenterApi.credentials.d.ts.map +1 -0
- package/dist/credentials/PaymenterApi.credentials.js +42 -0
- package/dist/credentials/PaymenterApi.credentials.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/Paymenter/Paymenter.node.d.ts +6 -0
- package/dist/nodes/Paymenter/Paymenter.node.d.ts.map +1 -0
- package/dist/nodes/Paymenter/Paymenter.node.js +436 -0
- package/dist/nodes/Paymenter/Paymenter.node.js.map +1 -0
- package/package.json +71 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Your Name
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class PaymenterApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
test: {
|
|
8
|
+
request: {
|
|
9
|
+
baseURL: string;
|
|
10
|
+
url: string;
|
|
11
|
+
method: any;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=PaymenterApi.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymenterApi.credentials.d.ts","sourceRoot":"","sources":["../../src/credentials/PaymenterApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,eAAe,EACf,eAAe,EAGf,MAAM,cAAc,CAAC;AAEtB,qBAAa,YAAa,YAAW,eAAe;IACnD,IAAI,SAAkB;IACtB,WAAW,SAAmB;IAC9B,gBAAgB,SAAiC;IACjD,UAAU,EAAE,eAAe,EAAE,CAsB3B;IAEF,IAAI;;;;oBAIe,GAAG;;MAEpB;CACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaymenterApi = void 0;
|
|
4
|
+
class PaymenterApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'paymenterApi';
|
|
7
|
+
this.displayName = 'Paymenter API';
|
|
8
|
+
this.documentationUrl = 'https://docs.paymenter.org/';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'API URL',
|
|
12
|
+
name: 'apiUrl',
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: 'https://paymenter.example.com',
|
|
15
|
+
placeholder: 'https://your-paymenter-instance.com',
|
|
16
|
+
description: 'The base URL of your Paymenter instance',
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'API Token',
|
|
21
|
+
name: 'apiToken',
|
|
22
|
+
type: 'string',
|
|
23
|
+
typeOptions: {
|
|
24
|
+
password: true,
|
|
25
|
+
},
|
|
26
|
+
default: '',
|
|
27
|
+
placeholder: 'Your API Bearer Token',
|
|
28
|
+
description: 'Bearer token for API authentication',
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
this.test = {
|
|
33
|
+
request: {
|
|
34
|
+
baseURL: '={{$credentials.apiUrl}}',
|
|
35
|
+
url: '/v1/admin/affiliates',
|
|
36
|
+
method: 'GET',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.PaymenterApi = PaymenterApi;
|
|
42
|
+
//# sourceMappingURL=PaymenterApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymenterApi.credentials.js","sourceRoot":"","sources":["../../src/credentials/PaymenterApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,YAAY;IAAzB;QACC,SAAI,GAAG,cAAc,CAAC;QACtB,gBAAW,GAAG,eAAe,CAAC;QAC9B,qBAAgB,GAAG,6BAA6B,CAAC;QACjD,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,+BAA+B;gBACxC,WAAW,EAAE,qCAAqC;gBAClD,WAAW,EAAE,yCAAyC;gBACtD,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,uBAAuB;gBACpC,WAAW,EAAE,qCAAqC;gBAClD,QAAQ,EAAE,IAAI;aACd;SACD,CAAC;QAEF,SAAI,GAAG;YACN,OAAO,EAAE;gBACR,OAAO,EAAE,0BAA0B;gBACnC,GAAG,EAAE,sBAAsB;gBAC3B,MAAM,EAAE,KAAY;aACpB;SACD,CAAC;IACH,CAAC;CAAA;AAnCD,oCAmCC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,YAAY,IAAI,WAAW,EAAE,MAAM,wCAAwC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.credentials = exports.node = void 0;
|
|
4
|
+
var Paymenter_node_1 = require("./nodes/Paymenter/Paymenter.node");
|
|
5
|
+
Object.defineProperty(exports, "node", { enumerable: true, get: function () { return Paymenter_node_1.Paymenter; } });
|
|
6
|
+
var PaymenterApi_credentials_1 = require("./credentials/PaymenterApi.credentials");
|
|
7
|
+
Object.defineProperty(exports, "credentials", { enumerable: true, get: function () { return PaymenterApi_credentials_1.PaymenterApi; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAA5D,sGAAA,SAAS,OAAQ;AAC1B,mFAAqF;AAA5E,uHAAA,YAAY,OAAe"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class Paymenter implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=Paymenter.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Paymenter.node.d.ts","sourceRoot":"","sources":["../../../src/nodes/Paymenter/Paymenter.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAGpB,MAAM,cAAc,CAAC;AAEtB,qBAAa,SAAU,YAAW,SAAS;IAC1C,WAAW,EAAE,oBAAoB,CAiT/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CA8IvE"}
|
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Paymenter = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
class Paymenter {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.description = {
|
|
8
|
+
displayName: 'Paymenter',
|
|
9
|
+
name: 'paymenter',
|
|
10
|
+
icon: 'file:paymenter.svg',
|
|
11
|
+
group: ['transform'],
|
|
12
|
+
version: 1,
|
|
13
|
+
subtitle: '={{$node.parameters.resource}}: {{$node.parameters.operation}}',
|
|
14
|
+
description: 'Interact with Paymenter API',
|
|
15
|
+
defaults: {
|
|
16
|
+
name: 'Paymenter',
|
|
17
|
+
color: '#5E72E4',
|
|
18
|
+
},
|
|
19
|
+
inputs: ['main'],
|
|
20
|
+
outputs: ['main'],
|
|
21
|
+
credentials: [
|
|
22
|
+
{
|
|
23
|
+
name: 'paymenterApi',
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
properties: [
|
|
28
|
+
{
|
|
29
|
+
displayName: 'Resource',
|
|
30
|
+
name: 'resource',
|
|
31
|
+
type: 'options',
|
|
32
|
+
noDataExpression: true,
|
|
33
|
+
options: [
|
|
34
|
+
{
|
|
35
|
+
name: 'Affiliates',
|
|
36
|
+
value: 'affiliates',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Categories',
|
|
40
|
+
value: 'categories',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Credits',
|
|
44
|
+
value: 'credits',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Invoice Items',
|
|
48
|
+
value: 'invoiceItems',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'Invoices',
|
|
52
|
+
value: 'invoices',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'Orders',
|
|
56
|
+
value: 'orders',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Products',
|
|
60
|
+
value: 'products',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'Services',
|
|
64
|
+
value: 'services',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'Ticket Messages',
|
|
68
|
+
value: 'ticketMessages',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Tickets',
|
|
72
|
+
value: 'tickets',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'Users',
|
|
76
|
+
value: 'users',
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
default: 'affiliates',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
displayName: 'Operation',
|
|
83
|
+
name: 'operation',
|
|
84
|
+
type: 'options',
|
|
85
|
+
noDataExpression: true,
|
|
86
|
+
displayOptions: {
|
|
87
|
+
show: {
|
|
88
|
+
resource: ['affiliates', 'credits', 'invoiceItems', 'invoices', 'orders', 'services', 'tickets', 'users'],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
options: [
|
|
92
|
+
{
|
|
93
|
+
name: 'Create',
|
|
94
|
+
value: 'create',
|
|
95
|
+
description: 'Create a new resource',
|
|
96
|
+
action: 'Create resource',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'Delete',
|
|
100
|
+
value: 'delete',
|
|
101
|
+
description: 'Delete a resource',
|
|
102
|
+
action: 'Delete resource',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: 'Get',
|
|
106
|
+
value: 'get',
|
|
107
|
+
description: 'Retrieve a specific resource',
|
|
108
|
+
action: 'Get resource',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'List',
|
|
112
|
+
value: 'list',
|
|
113
|
+
description: 'List all resources',
|
|
114
|
+
action: 'List resources',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: 'Update',
|
|
118
|
+
value: 'update',
|
|
119
|
+
description: 'Update a resource',
|
|
120
|
+
action: 'Update resource',
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
default: 'list',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
displayName: 'Operation',
|
|
127
|
+
name: 'operation',
|
|
128
|
+
type: 'options',
|
|
129
|
+
noDataExpression: true,
|
|
130
|
+
displayOptions: {
|
|
131
|
+
show: {
|
|
132
|
+
resource: ['categories', 'products'],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
options: [
|
|
136
|
+
{
|
|
137
|
+
name: 'Get',
|
|
138
|
+
value: 'get',
|
|
139
|
+
description: 'Retrieve a specific resource',
|
|
140
|
+
action: 'Get resource',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'List',
|
|
144
|
+
value: 'list',
|
|
145
|
+
description: 'List all resources',
|
|
146
|
+
action: 'List resources',
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
default: 'list',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
displayName: 'Operation',
|
|
153
|
+
name: 'operation',
|
|
154
|
+
type: 'options',
|
|
155
|
+
noDataExpression: true,
|
|
156
|
+
displayOptions: {
|
|
157
|
+
show: {
|
|
158
|
+
resource: ['ticketMessages'],
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
options: [
|
|
162
|
+
{
|
|
163
|
+
name: 'Create',
|
|
164
|
+
value: 'create',
|
|
165
|
+
description: 'Create a new resource',
|
|
166
|
+
action: 'Create resource',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'Delete',
|
|
170
|
+
value: 'delete',
|
|
171
|
+
description: 'Delete a resource',
|
|
172
|
+
action: 'Delete resource',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'Get',
|
|
176
|
+
value: 'get',
|
|
177
|
+
description: 'Retrieve a specific resource',
|
|
178
|
+
action: 'Get resource',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: 'List',
|
|
182
|
+
value: 'list',
|
|
183
|
+
description: 'List all resources',
|
|
184
|
+
action: 'List resources',
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
default: 'list',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
displayName: 'Resource ID',
|
|
191
|
+
name: 'resourceId',
|
|
192
|
+
type: 'string',
|
|
193
|
+
required: true,
|
|
194
|
+
default: '',
|
|
195
|
+
placeholder: 'Enter resource ID',
|
|
196
|
+
description: 'The ID of the resource to retrieve, update, or delete',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
displayName: 'Body Parameters',
|
|
200
|
+
name: 'bodyParameters',
|
|
201
|
+
placeholder: 'Add body parameter',
|
|
202
|
+
description: 'The body parameters for create/update operations',
|
|
203
|
+
type: 'fixedCollection',
|
|
204
|
+
displayOptions: {
|
|
205
|
+
show: {
|
|
206
|
+
operation: ['create', 'update'],
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
typeOptions: {
|
|
210
|
+
multipleValues: true,
|
|
211
|
+
},
|
|
212
|
+
default: {},
|
|
213
|
+
options: [
|
|
214
|
+
{
|
|
215
|
+
name: 'parameters',
|
|
216
|
+
displayName: 'Parameters',
|
|
217
|
+
values: [
|
|
218
|
+
{
|
|
219
|
+
displayName: 'Key',
|
|
220
|
+
name: 'key',
|
|
221
|
+
type: 'string',
|
|
222
|
+
default: '',
|
|
223
|
+
placeholder: 'Parameter key',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
displayName: 'Value',
|
|
227
|
+
name: 'value',
|
|
228
|
+
type: 'string',
|
|
229
|
+
default: '',
|
|
230
|
+
placeholder: 'Parameter value',
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
displayName: 'Query Parameters',
|
|
238
|
+
name: 'queryParameters',
|
|
239
|
+
placeholder: 'Add query parameter',
|
|
240
|
+
description: 'Additional query parameters (pagination, filtering, sorting, includes)',
|
|
241
|
+
type: 'fixedCollection',
|
|
242
|
+
displayOptions: {
|
|
243
|
+
show: {
|
|
244
|
+
operation: ['list'],
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
typeOptions: {
|
|
248
|
+
multipleValues: true,
|
|
249
|
+
},
|
|
250
|
+
default: {},
|
|
251
|
+
options: [
|
|
252
|
+
{
|
|
253
|
+
name: 'parameters',
|
|
254
|
+
displayName: 'Parameters',
|
|
255
|
+
values: [
|
|
256
|
+
{
|
|
257
|
+
displayName: 'Key',
|
|
258
|
+
name: 'key',
|
|
259
|
+
type: 'string',
|
|
260
|
+
default: '',
|
|
261
|
+
placeholder: 'e.g., per_page, page, sort, include',
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
displayName: 'Value',
|
|
265
|
+
name: 'value',
|
|
266
|
+
type: 'string',
|
|
267
|
+
default: '',
|
|
268
|
+
placeholder: 'Parameter value',
|
|
269
|
+
},
|
|
270
|
+
],
|
|
271
|
+
},
|
|
272
|
+
],
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
displayName: 'Return All',
|
|
276
|
+
name: 'returnAll',
|
|
277
|
+
type: 'boolean',
|
|
278
|
+
displayOptions: {
|
|
279
|
+
show: {
|
|
280
|
+
operation: ['list'],
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
default: false,
|
|
284
|
+
description: 'If true, fetches all results by paginating through all pages',
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
displayName: 'Limit',
|
|
288
|
+
name: 'limit',
|
|
289
|
+
type: 'number',
|
|
290
|
+
displayOptions: {
|
|
291
|
+
show: {
|
|
292
|
+
operation: ['list'],
|
|
293
|
+
returnAll: [false],
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
typeOptions: {
|
|
297
|
+
minValue: 1,
|
|
298
|
+
maxValue: 100,
|
|
299
|
+
},
|
|
300
|
+
default: 50,
|
|
301
|
+
description: 'Number of results to return',
|
|
302
|
+
},
|
|
303
|
+
],
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
async execute() {
|
|
307
|
+
const items = this.getInputData();
|
|
308
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
309
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
310
|
+
const credentials = await this.getCredentials('paymenterApi');
|
|
311
|
+
const apiUrl = credentials.apiUrl;
|
|
312
|
+
const apiToken = credentials.apiToken;
|
|
313
|
+
const resourceMap = {
|
|
314
|
+
affiliates: 'affiliates',
|
|
315
|
+
categories: 'categories',
|
|
316
|
+
credits: 'credits',
|
|
317
|
+
invoiceItems: 'invoice-items',
|
|
318
|
+
invoices: 'invoices',
|
|
319
|
+
orders: 'orders',
|
|
320
|
+
products: 'products',
|
|
321
|
+
services: 'services',
|
|
322
|
+
ticketMessages: 'ticket-messages',
|
|
323
|
+
tickets: 'tickets',
|
|
324
|
+
users: 'users',
|
|
325
|
+
};
|
|
326
|
+
const resourceEndpoint = resourceMap[resource];
|
|
327
|
+
const results = [];
|
|
328
|
+
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
329
|
+
try {
|
|
330
|
+
let response;
|
|
331
|
+
const options = {
|
|
332
|
+
headers: {
|
|
333
|
+
'Authorization': `Bearer ${apiToken}`,
|
|
334
|
+
'Content-Type': 'application/json',
|
|
335
|
+
'Accept': 'application/json',
|
|
336
|
+
},
|
|
337
|
+
method: 'GET',
|
|
338
|
+
uri: '',
|
|
339
|
+
json: true,
|
|
340
|
+
};
|
|
341
|
+
if (operation === 'list') {
|
|
342
|
+
const returnAll = this.getNodeParameter('returnAll', itemIndex);
|
|
343
|
+
const queryParams = this.getNodeParameter('queryParameters', itemIndex, {});
|
|
344
|
+
const limit = this.getNodeParameter('limit', itemIndex, 50);
|
|
345
|
+
let url = `${apiUrl}/v1/admin/${resourceEndpoint}?`;
|
|
346
|
+
const params = [];
|
|
347
|
+
if (queryParams.parameters) {
|
|
348
|
+
for (const param of queryParams.parameters) {
|
|
349
|
+
params.push(`${param.key}=${encodeURIComponent(param.value)}`);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
if (!params.some(p => p.startsWith('per_page'))) {
|
|
353
|
+
params.push(`per_page=${returnAll ? 100 : limit}`);
|
|
354
|
+
}
|
|
355
|
+
url += params.join('&');
|
|
356
|
+
options.uri = url;
|
|
357
|
+
response = await this.helpers.request(options);
|
|
358
|
+
if (returnAll && response.meta && response.meta.per_page && response.meta.total) {
|
|
359
|
+
const allData = response.data || [];
|
|
360
|
+
let currentPage = response.meta.current_page || 1;
|
|
361
|
+
const perPage = response.meta.per_page;
|
|
362
|
+
const total = response.meta.total;
|
|
363
|
+
const totalPages = Math.ceil(total / perPage);
|
|
364
|
+
while (currentPage < totalPages) {
|
|
365
|
+
currentPage++;
|
|
366
|
+
const pageUrl = `${apiUrl}/v1/admin/${resourceEndpoint}?page=${currentPage}&per_page=${perPage}`;
|
|
367
|
+
const pageOptions = { ...options, uri: pageUrl };
|
|
368
|
+
const pageResponse = await this.helpers.request(pageOptions);
|
|
369
|
+
if (pageResponse.data) {
|
|
370
|
+
allData.push(...pageResponse.data);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
response.data = allData;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
else if (operation === 'get') {
|
|
377
|
+
const resourceId = this.getNodeParameter('resourceId', itemIndex);
|
|
378
|
+
options.uri = `${apiUrl}/v1/admin/${resourceEndpoint}/${resourceId}`;
|
|
379
|
+
}
|
|
380
|
+
else if (operation === 'create') {
|
|
381
|
+
const bodyParams = this.getNodeParameter('bodyParameters', itemIndex, {});
|
|
382
|
+
options.method = 'POST';
|
|
383
|
+
options.uri = `${apiUrl}/v1/admin/${resourceEndpoint}`;
|
|
384
|
+
if (bodyParams.parameters) {
|
|
385
|
+
const body = {};
|
|
386
|
+
for (const param of bodyParams.parameters) {
|
|
387
|
+
body[param.key] = param.value;
|
|
388
|
+
}
|
|
389
|
+
options.body = body;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
else if (operation === 'update') {
|
|
393
|
+
const resourceId = this.getNodeParameter('resourceId', itemIndex);
|
|
394
|
+
const bodyParams = this.getNodeParameter('bodyParameters', itemIndex, {});
|
|
395
|
+
options.method = 'PUT';
|
|
396
|
+
options.uri = `${apiUrl}/v1/admin/${resourceEndpoint}/${resourceId}`;
|
|
397
|
+
if (bodyParams.parameters) {
|
|
398
|
+
const body = {};
|
|
399
|
+
for (const param of bodyParams.parameters) {
|
|
400
|
+
body[param.key] = param.value;
|
|
401
|
+
}
|
|
402
|
+
options.body = body;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
else if (operation === 'delete') {
|
|
406
|
+
const resourceId = this.getNodeParameter('resourceId', itemIndex);
|
|
407
|
+
options.method = 'DELETE';
|
|
408
|
+
options.uri = `${apiUrl}/v1/admin/${resourceEndpoint}/${resourceId}`;
|
|
409
|
+
}
|
|
410
|
+
response = await this.helpers.request(options);
|
|
411
|
+
results.push({
|
|
412
|
+
json: response,
|
|
413
|
+
pairedItem: { item: itemIndex },
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
catch (error) {
|
|
417
|
+
if (this.continueOnFail()) {
|
|
418
|
+
results.push({
|
|
419
|
+
json: {
|
|
420
|
+
error: error instanceof Error ? error.message : 'Unknown error occurred',
|
|
421
|
+
},
|
|
422
|
+
pairedItem: { item: itemIndex },
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
else {
|
|
426
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error instanceof Error ? error.message : 'Unknown error occurred', {
|
|
427
|
+
itemIndex,
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
return [results];
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
exports.Paymenter = Paymenter;
|
|
436
|
+
//# sourceMappingURL=Paymenter.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Paymenter.node.js","sourceRoot":"","sources":["../../../src/nodes/Paymenter/Paymenter.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAEtB,MAAa,SAAS;IAAtB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,gEAAgE;YAC1E,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE;gBACT,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,SAAS;aAChB;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBAC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C;CACD;AAlcD,8BAkcC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "n8n-nodes-paymenter",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "n8n node for Paymenter - Payment and subscription management API",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n",
|
|
7
|
+
"paymenter",
|
|
8
|
+
"payment",
|
|
9
|
+
"subscription",
|
|
10
|
+
"billing",
|
|
11
|
+
"automation",
|
|
12
|
+
"node"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"author": "Your Name <your.email@example.com>",
|
|
16
|
+
"homepage": "https://github.com/yourusername/n8n-paymenter",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/yourusername/n8n-paymenter.git"
|
|
20
|
+
},
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/yourusername/n8n-paymenter/issues"
|
|
23
|
+
},
|
|
24
|
+
"main": "dist/index.js",
|
|
25
|
+
"types": "dist/index.d.ts",
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"dev": "npm run build -- --watch",
|
|
31
|
+
"build": "tsc",
|
|
32
|
+
"lint": "eslint . --ext .ts || true",
|
|
33
|
+
"lint:fix": "eslint . --ext .ts --fix || true",
|
|
34
|
+
"test": "echo 'Tests would run here'",
|
|
35
|
+
"test:watch": "echo 'Watch tests would run here'",
|
|
36
|
+
"prepare": "npm run build",
|
|
37
|
+
"publish-npm": "npm run build && npm publish"
|
|
38
|
+
},
|
|
39
|
+
"n8n": {
|
|
40
|
+
"nodes": [
|
|
41
|
+
"dist/nodes/Paymenter/Paymenter.node.js"
|
|
42
|
+
],
|
|
43
|
+
"credentials": [
|
|
44
|
+
"dist/credentials/PaymenterApi.credentials.js"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/node": "^20.0.0",
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
50
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
51
|
+
"eslint": "^8.45.0",
|
|
52
|
+
"typescript": "^5.0.0"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"n8n-core": ">=0.195.0",
|
|
56
|
+
"n8n-workflow": ">=0.195.0"
|
|
57
|
+
},
|
|
58
|
+
"peerDependenciesMeta": {
|
|
59
|
+
"n8n-core": {
|
|
60
|
+
"optional": false
|
|
61
|
+
},
|
|
62
|
+
"n8n-workflow": {
|
|
63
|
+
"optional": false
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {},
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">=18.0.0",
|
|
69
|
+
"npm": ">=8.0.0"
|
|
70
|
+
}
|
|
71
|
+
}
|