n8n-nodes-gofaxsms 0.1.1
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/README.md +41 -0
- package/dist/credentials/GoSmsApi.credentials.d.ts +8 -0
- package/dist/credentials/GoSmsApi.credentials.d.ts.map +1 -0
- package/dist/credentials/GoSmsApi.credentials.js +39 -0
- package/dist/credentials/GoSmsApi.credentials.js.map +1 -0
- package/dist/index.d.ts +4 -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/GoSms/GoSms.node.d.ts +6 -0
- package/dist/nodes/GoSms/GoSms.node.d.ts.map +1 -0
- package/dist/nodes/GoSms/GoSms.node.js +263 -0
- package/dist/nodes/GoSms/GoSms.node.js.map +1 -0
- package/dist/src/nodes/GoSms/GoSms.svg +10 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# n8n-nodes-gofaxsms
|
|
2
|
+
|
|
3
|
+
This is an n8n community node (`n8n-nodes-gofaxsms`) for the [GoFax REST API](https://restful-api.gofax.com.au/swagger/v1/swagger.json). It lets you send SMS messages, retrieve message details, list sender IDs, and check your account balance.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
1. In n8n, go to **Settings > Community Nodes**.
|
|
8
|
+
2. Select **Install**.
|
|
9
|
+
3. Enter `n8n-nodes-gofaxsms` as the npm package name.
|
|
10
|
+
4. Click **Install**.
|
|
11
|
+
|
|
12
|
+
## Credentials
|
|
13
|
+
|
|
14
|
+
Configure your GoFax credentials in n8n under **Credentials > GoFax SMS API**:
|
|
15
|
+
|
|
16
|
+
- **Username**: Your GoFax account username
|
|
17
|
+
- **Password**: Your GoFax account password
|
|
18
|
+
- **Base URL**: `https://restful-api.gofax.com.au`
|
|
19
|
+
|
|
20
|
+
Authentication uses username/password to obtain a session token automatically on each execution.
|
|
21
|
+
|
|
22
|
+
## Operations
|
|
23
|
+
|
|
24
|
+
### Message
|
|
25
|
+
|
|
26
|
+
| Operation | Description | Endpoint |
|
|
27
|
+
|------------------|--------------------------------------|------------------------------|
|
|
28
|
+
| Send | Send an SMS message | `PUT /v2.0/SMS` |
|
|
29
|
+
| Get Detail | Get SMS message detail by ID | `GET /v2.0/SMS/{smsId}` |
|
|
30
|
+
| List Sender IDs | List available SMS sender IDs | `GET /v2.0/SMS/SenderIds` |
|
|
31
|
+
|
|
32
|
+
### Account
|
|
33
|
+
|
|
34
|
+
| Operation | Description | Endpoint |
|
|
35
|
+
|----------------|-------------------------------|-----------------------------------|
|
|
36
|
+
| Get Balance | Get account credit balance | `GET /v2.0/Account/CreditBalance` |
|
|
37
|
+
|
|
38
|
+
## Resources
|
|
39
|
+
|
|
40
|
+
- [GoFax API Swagger Documentation](https://restful-api.gofax.com.au/swagger/v1/swagger.json)
|
|
41
|
+
- [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class GoSmsApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=GoSmsApi.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoSmsApi.credentials.d.ts","sourceRoot":"","sources":["../../src/credentials/GoSmsApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,qBAAa,QAAS,YAAW,eAAe;IAC9C,IAAI,SAAc;IAClB,WAAW,SAAmB;IAC9B,gBAAgB,SAA8D;IAC9E,UAAU,EAAE,eAAe,EAAE,CA0B3B;CACH"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GoSmsApi = void 0;
|
|
4
|
+
class GoSmsApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'goSmsApi';
|
|
7
|
+
this.displayName = 'GoFax SMS API';
|
|
8
|
+
this.documentationUrl = 'https://restful-api.gofax.com.au/swagger/v1/swagger.json';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Username',
|
|
12
|
+
name: 'username',
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: '',
|
|
15
|
+
required: true,
|
|
16
|
+
description: 'Your GoFax account username',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'Password',
|
|
20
|
+
name: 'password',
|
|
21
|
+
type: 'string',
|
|
22
|
+
typeOptions: { password: true },
|
|
23
|
+
default: '',
|
|
24
|
+
required: true,
|
|
25
|
+
description: 'Your GoFax account password',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Base URL',
|
|
29
|
+
name: 'baseUrl',
|
|
30
|
+
type: 'string',
|
|
31
|
+
default: 'https://restful-api.gofax.com.au',
|
|
32
|
+
required: true,
|
|
33
|
+
description: 'GoFax API base URL',
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.GoSmsApi = GoSmsApi;
|
|
39
|
+
//# sourceMappingURL=GoSmsApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoSmsApi.credentials.js","sourceRoot":"","sources":["../../src/credentials/GoSmsApi.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,QAAQ;IAArB;QACE,SAAI,GAAG,UAAU,CAAC;QAClB,gBAAW,GAAG,eAAe,CAAC;QAC9B,qBAAgB,GAAG,0DAA0D,CAAC;QAC9E,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,kCAAkC;gBAC3C,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,oBAAoB;aAClC;SACF,CAAC;IACJ,CAAC;CAAA;AA/BD,4BA+BC"}
|
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,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GoSmsApi = exports.GoSms = void 0;
|
|
4
|
+
const GoSms_node_1 = require("./nodes/GoSms/GoSms.node");
|
|
5
|
+
Object.defineProperty(exports, "GoSms", { enumerable: true, get: function () { return GoSms_node_1.GoSms; } });
|
|
6
|
+
const GoSmsApi_credentials_1 = require("./credentials/GoSmsApi.credentials");
|
|
7
|
+
Object.defineProperty(exports, "GoSmsApi", { enumerable: true, get: function () { return GoSmsApi_credentials_1.GoSmsApi; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yDAAiD;AAGxC,sFAHA,kBAAK,OAGA;AAFd,6EAA8D;AAE9C,yFAFP,+BAAQ,OAEO"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class GoSms implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=GoSms.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoSms.node.d.ts","sourceRoot":"","sources":["../../../src/nodes/GoSms/GoSms.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAErB,MAAM,cAAc,CAAC;AA2BtB,qBAAa,KAAM,YAAW,SAAS;IACrC,WAAW,EAAE,oBAAoB,CA8J/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAuFxE"}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GoSms = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
async function getAuthToken(helpers, baseUrl, username, password) {
|
|
6
|
+
const response = await helpers.httpRequest({
|
|
7
|
+
method: 'POST',
|
|
8
|
+
url: `${baseUrl}/v2.0/Account/Token`,
|
|
9
|
+
headers: {
|
|
10
|
+
'Content-Type': 'application/json',
|
|
11
|
+
},
|
|
12
|
+
body: {
|
|
13
|
+
Username: username,
|
|
14
|
+
Password: password,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
if (!response.Success) {
|
|
18
|
+
throw new Error('Authentication failed: ' + (response.Response || 'Invalid credentials'));
|
|
19
|
+
}
|
|
20
|
+
return response.Response;
|
|
21
|
+
}
|
|
22
|
+
class GoSms {
|
|
23
|
+
constructor() {
|
|
24
|
+
this.description = {
|
|
25
|
+
displayName: 'GoFax SMS',
|
|
26
|
+
name: 'goSms',
|
|
27
|
+
icon: 'file:../GoSms.svg',
|
|
28
|
+
group: ['transform'],
|
|
29
|
+
version: 1,
|
|
30
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
31
|
+
description: 'Interact with GoFax SMS API',
|
|
32
|
+
defaults: {
|
|
33
|
+
name: 'GoFax SMS',
|
|
34
|
+
},
|
|
35
|
+
inputs: ['main'],
|
|
36
|
+
outputs: ['main'],
|
|
37
|
+
credentials: [
|
|
38
|
+
{
|
|
39
|
+
name: 'goSmsApi',
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
properties: [
|
|
44
|
+
{
|
|
45
|
+
displayName: 'Resource',
|
|
46
|
+
name: 'resource',
|
|
47
|
+
type: 'options',
|
|
48
|
+
noDataExpression: true,
|
|
49
|
+
options: [
|
|
50
|
+
{
|
|
51
|
+
name: 'Message',
|
|
52
|
+
value: 'message',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'Account',
|
|
56
|
+
value: 'account',
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
default: 'message',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
displayName: 'Operation',
|
|
63
|
+
name: 'operation',
|
|
64
|
+
type: 'options',
|
|
65
|
+
noDataExpression: true,
|
|
66
|
+
displayOptions: {
|
|
67
|
+
show: {
|
|
68
|
+
resource: ['message'],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
options: [
|
|
72
|
+
{
|
|
73
|
+
name: 'Send',
|
|
74
|
+
value: 'send',
|
|
75
|
+
action: 'Send an SMS message',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'Get Detail',
|
|
79
|
+
value: 'getDetail',
|
|
80
|
+
action: 'Get SMS message detail',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'List Sender IDs',
|
|
84
|
+
value: 'listSenderIds',
|
|
85
|
+
action: 'List SMS sender IDs',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
default: 'send',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
displayName: 'Operation',
|
|
92
|
+
name: 'operation',
|
|
93
|
+
type: 'options',
|
|
94
|
+
noDataExpression: true,
|
|
95
|
+
displayOptions: {
|
|
96
|
+
show: {
|
|
97
|
+
resource: ['account'],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
options: [
|
|
101
|
+
{
|
|
102
|
+
name: 'Get Balance',
|
|
103
|
+
value: 'getBalance',
|
|
104
|
+
action: 'Get account credit balance',
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
default: 'getBalance',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
displayName: 'From',
|
|
111
|
+
name: 'from',
|
|
112
|
+
type: 'string',
|
|
113
|
+
default: '',
|
|
114
|
+
required: true,
|
|
115
|
+
displayOptions: {
|
|
116
|
+
show: {
|
|
117
|
+
resource: ['message'],
|
|
118
|
+
operation: ['send'],
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
description: 'Sender ID or phone number',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
displayName: 'To',
|
|
125
|
+
name: 'to',
|
|
126
|
+
type: 'string',
|
|
127
|
+
default: '',
|
|
128
|
+
required: true,
|
|
129
|
+
displayOptions: {
|
|
130
|
+
show: {
|
|
131
|
+
resource: ['message'],
|
|
132
|
+
operation: ['send'],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
description: 'Recipient phone number(s). Separate multiple numbers with commas.',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
displayName: 'Message',
|
|
139
|
+
name: 'body',
|
|
140
|
+
type: 'string',
|
|
141
|
+
default: '',
|
|
142
|
+
required: true,
|
|
143
|
+
typeOptions: {
|
|
144
|
+
rows: 4,
|
|
145
|
+
},
|
|
146
|
+
displayOptions: {
|
|
147
|
+
show: {
|
|
148
|
+
resource: ['message'],
|
|
149
|
+
operation: ['send'],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
description: 'The SMS message content',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
displayName: 'Client Reference',
|
|
156
|
+
name: 'clientReference',
|
|
157
|
+
type: 'string',
|
|
158
|
+
default: '',
|
|
159
|
+
displayOptions: {
|
|
160
|
+
show: {
|
|
161
|
+
resource: ['message'],
|
|
162
|
+
operation: ['send'],
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
description: 'Optional client reference for the message',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
displayName: 'SMS ID',
|
|
169
|
+
name: 'smsId',
|
|
170
|
+
type: 'number',
|
|
171
|
+
default: 0,
|
|
172
|
+
required: true,
|
|
173
|
+
displayOptions: {
|
|
174
|
+
show: {
|
|
175
|
+
resource: ['message'],
|
|
176
|
+
operation: ['getDetail'],
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
description: 'The ID of the SMS message to retrieve',
|
|
180
|
+
},
|
|
181
|
+
],
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
async execute() {
|
|
185
|
+
const items = this.getInputData();
|
|
186
|
+
const returnData = [];
|
|
187
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
188
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
189
|
+
const credentials = await this.getCredentials('goSmsApi');
|
|
190
|
+
const baseUrl = credentials.baseUrl;
|
|
191
|
+
const username = credentials.username;
|
|
192
|
+
const password = credentials.password;
|
|
193
|
+
const token = await getAuthToken(this.helpers, baseUrl, username, password);
|
|
194
|
+
const authHeaders = { 'Token Key Authentication': token };
|
|
195
|
+
for (let i = 0; i < items.length; i++) {
|
|
196
|
+
try {
|
|
197
|
+
if (resource === 'message') {
|
|
198
|
+
if (operation === 'send') {
|
|
199
|
+
const from = this.getNodeParameter('from', i);
|
|
200
|
+
const to = this.getNodeParameter('to', i);
|
|
201
|
+
const body = this.getNodeParameter('body', i);
|
|
202
|
+
const clientReference = this.getNodeParameter('clientReference', i);
|
|
203
|
+
const sms = {
|
|
204
|
+
To: to.split(',').map((s) => s.trim()),
|
|
205
|
+
From: from,
|
|
206
|
+
Body: body,
|
|
207
|
+
};
|
|
208
|
+
if (clientReference) {
|
|
209
|
+
sms.ClientReference = clientReference;
|
|
210
|
+
}
|
|
211
|
+
const response = await this.helpers.httpRequest({
|
|
212
|
+
method: 'PUT',
|
|
213
|
+
url: `${baseUrl}/v2.0/SMS`,
|
|
214
|
+
headers: {
|
|
215
|
+
...authHeaders,
|
|
216
|
+
'Content-Type': 'application/json',
|
|
217
|
+
},
|
|
218
|
+
body: sms,
|
|
219
|
+
});
|
|
220
|
+
returnData.push({ json: response });
|
|
221
|
+
}
|
|
222
|
+
else if (operation === 'getDetail') {
|
|
223
|
+
const smsId = this.getNodeParameter('smsId', i);
|
|
224
|
+
const response = await this.helpers.httpRequest({
|
|
225
|
+
method: 'GET',
|
|
226
|
+
url: `${baseUrl}/v2.0/SMS/${smsId}`,
|
|
227
|
+
headers: authHeaders,
|
|
228
|
+
});
|
|
229
|
+
returnData.push({ json: response });
|
|
230
|
+
}
|
|
231
|
+
else if (operation === 'listSenderIds') {
|
|
232
|
+
const response = await this.helpers.httpRequest({
|
|
233
|
+
method: 'GET',
|
|
234
|
+
url: `${baseUrl}/v2.0/SMS/SenderIds`,
|
|
235
|
+
headers: authHeaders,
|
|
236
|
+
});
|
|
237
|
+
returnData.push({ json: response });
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
else if (resource === 'account') {
|
|
241
|
+
if (operation === 'getBalance') {
|
|
242
|
+
const response = await this.helpers.httpRequest({
|
|
243
|
+
method: 'GET',
|
|
244
|
+
url: `${baseUrl}/v2.0/Account/CreditBalance`,
|
|
245
|
+
headers: authHeaders,
|
|
246
|
+
});
|
|
247
|
+
returnData.push({ json: response });
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
catch (error) {
|
|
252
|
+
if (this.continueOnFail()) {
|
|
253
|
+
returnData.push({ json: { error: error.message } });
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
return [returnData];
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
exports.GoSms = GoSms;
|
|
263
|
+
//# sourceMappingURL=GoSms.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoSms.node.js","sourceRoot":"","sources":["../../../src/nodes/GoSms/GoSms.node.ts"],"names":[],"mappings":";;;AAAA,+CAMsB;AAEtB,KAAK,UAAU,YAAY,CACzB,OAAqC,EACrC,OAAe,EACf,QAAgB,EAChB,QAAgB;IAEhB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC;QACzC,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,GAAG,OAAO,qBAAqB;QACpC,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE;YACJ,QAAQ,EAAE,QAAQ;YAClB,QAAQ,EAAE,QAAQ;SACnB;KACF,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,CAAC,QAAQ,CAAC,QAAQ,IAAI,qBAAqB,CAAC,CAAC,CAAC;IAC5F,CAAC;IAED,OAAO,QAAQ,CAAC,QAAkB,CAAC;AACrC,CAAC;AAED,MAAa,KAAK;IAAlB;QACE,gBAAW,GAAyB;YAClC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE;gBACR,IAAI,EAAE,WAAW;aAClB;YACD,MAAM,EAA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PD,sBAwPC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#4f46e5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<rect x="2" y="4" width="20" height="16" rx="2"/>
|
|
3
|
+
<path d="M12 11v4"/>
|
|
4
|
+
<path d="M12 7h.01"/>
|
|
5
|
+
<path d="M7 11v4"/>
|
|
6
|
+
<path d="M7 7h.01"/>
|
|
7
|
+
<path d="M17 11v4"/>
|
|
8
|
+
<path d="M17 7h.01"/>
|
|
9
|
+
<line x1="2" y1="15" x2="22" y2="15"/>
|
|
10
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "n8n-nodes-gofaxsms",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "n8n community node for GoFax API - send SMS messages and manage your account",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n-community-node-package",
|
|
7
|
+
"n8n",
|
|
8
|
+
"gofax",
|
|
9
|
+
"gosms",
|
|
10
|
+
"sms"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"homepage": "https://github.com/baitsops/n8n-gofaxsms#readme",
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "davidbluearc",
|
|
16
|
+
"email": "david.wales@blue-arc.com.au"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/baitsops/n8n-gofaxsms.git"
|
|
21
|
+
},
|
|
22
|
+
"main": "index.js",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc && copyfiles \"src/nodes/**/*.svg\" dist/",
|
|
25
|
+
"dev": "tsc --watch",
|
|
26
|
+
"format": "prettier --write src",
|
|
27
|
+
"lint": "eslint src",
|
|
28
|
+
"lintfix": "eslint src --fix",
|
|
29
|
+
"prepublishOnly": "npm run build"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist/**/*"
|
|
33
|
+
],
|
|
34
|
+
"n8n": {
|
|
35
|
+
"n8nNodesApiVersion": 1,
|
|
36
|
+
"credentials": [
|
|
37
|
+
"dist/credentials/GoSmsApi.credentials.js"
|
|
38
|
+
],
|
|
39
|
+
"nodes": [
|
|
40
|
+
"dist/nodes/GoSms/GoSms.node.js"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
45
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
46
|
+
"copyfiles": "^2.4.1",
|
|
47
|
+
"eslint": "^8.50.0",
|
|
48
|
+
"prettier": "^3.0.0",
|
|
49
|
+
"typescript": "^5.5.0"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"n8n-workflow": "^1.0.0"
|
|
53
|
+
}
|
|
54
|
+
}
|