n8n-nodes-ausses 0.1.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/dist/credentials/AussesPostgresApi.credentials.d.ts +8 -0
- package/dist/credentials/AussesPostgresApi.credentials.d.ts.map +1 -0
- package/dist/credentials/AussesPostgresApi.credentials.js +67 -0
- package/dist/credentials/AussesPostgresApi.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/InstagramMessenger/InstagramMessenger.node.d.ts +11 -0
- package/dist/nodes/InstagramMessenger/InstagramMessenger.node.d.ts.map +1 -0
- package/dist/nodes/InstagramMessenger/InstagramMessenger.node.js +240 -0
- package/dist/nodes/InstagramMessenger/InstagramMessenger.node.js.map +1 -0
- package/dist/nodes/InstagramMessenger/instagram.svg +15 -0
- package/package.json +40 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class AussesPostgresApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=AussesPostgresApi.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AussesPostgresApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/AussesPostgresApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,qBAAa,iBAAkB,YAAW,eAAe;IACvD,IAAI,SAAuB;IAC3B,WAAW,SAAwC;IACnD,gBAAgB,SAAsC;IACtD,UAAU,EAAE,eAAe,EAAE,CAsD3B;CACH"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AussesPostgresApi = void 0;
|
|
4
|
+
class AussesPostgresApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'aussesPostgresApi';
|
|
7
|
+
this.displayName = 'Ausses - Banco de Dados (Postgres)';
|
|
8
|
+
this.documentationUrl = 'https://www.postgresql.org/docs/';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Host',
|
|
12
|
+
name: 'host',
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: 'localhost',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
displayName: 'Porta',
|
|
18
|
+
name: 'port',
|
|
19
|
+
type: 'number',
|
|
20
|
+
default: 5432,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
displayName: 'Banco de Dados',
|
|
24
|
+
name: 'database',
|
|
25
|
+
type: 'string',
|
|
26
|
+
default: '',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
displayName: 'Usuário',
|
|
30
|
+
name: 'user',
|
|
31
|
+
type: 'string',
|
|
32
|
+
default: '',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Senha',
|
|
36
|
+
name: 'password',
|
|
37
|
+
type: 'string',
|
|
38
|
+
typeOptions: {
|
|
39
|
+
password: true,
|
|
40
|
+
},
|
|
41
|
+
default: '',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
displayName: 'Schema',
|
|
45
|
+
name: 'schema',
|
|
46
|
+
type: 'string',
|
|
47
|
+
default: 'public',
|
|
48
|
+
description: 'Schema onde a tabela de clientes está localizada',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
displayName: 'Tabela de Clientes',
|
|
52
|
+
name: 'clientTable',
|
|
53
|
+
type: 'string',
|
|
54
|
+
default: 'clientes',
|
|
55
|
+
description: 'Nome da tabela que contém os dados dos clientes (name, instagramId, tokenInstagram)',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
displayName: 'SSL',
|
|
59
|
+
name: 'ssl',
|
|
60
|
+
type: 'boolean',
|
|
61
|
+
default: false,
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.AussesPostgresApi = AussesPostgresApi;
|
|
67
|
+
//# sourceMappingURL=AussesPostgresApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AussesPostgresApi.credentials.js","sourceRoot":"","sources":["../../credentials/AussesPostgresApi.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,iBAAiB;IAA9B;QACE,SAAI,GAAG,mBAAmB,CAAC;QAC3B,gBAAW,GAAG,oCAAoC,CAAC;QACnD,qBAAgB,GAAG,kCAAkC,CAAC;QACtD,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,WAAW;aACrB;YACD;gBACE,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,IAAI;aACd;YACD;gBACE,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACZ;YACD;gBACE,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACZ;YACD;gBACE,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,EAAE;aACZ;YACD;gBACE,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,QAAQ;gBACjB,WAAW,EAAE,kDAAkD;aAChE;YACD;gBACE,WAAW,EAAE,oBAAoB;gBACjC,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,UAAU;gBACnB,WAAW,EAAE,qFAAqF;aACnG;YACD;gBACE,WAAW,EAAE,KAAK;gBAClB,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;aACf;SACF,CAAC;IACJ,CAAC;CAAA;AA3DD,8CA2DC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AussesPostgresApi = exports.InstagramMessenger = void 0;
|
|
4
|
+
var InstagramMessenger_node_1 = require("./nodes/InstagramMessenger/InstagramMessenger.node");
|
|
5
|
+
Object.defineProperty(exports, "InstagramMessenger", { enumerable: true, get: function () { return InstagramMessenger_node_1.InstagramMessenger; } });
|
|
6
|
+
var AussesPostgresApi_credentials_1 = require("./credentials/AussesPostgresApi.credentials");
|
|
7
|
+
Object.defineProperty(exports, "AussesPostgresApi", { enumerable: true, get: function () { return AussesPostgresApi_credentials_1.AussesPostgresApi; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,8FAAwF;AAA/E,6HAAA,kBAAkB,OAAA;AAC3B,6FAAgF;AAAvE,kIAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class InstagramMessenger implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
getClients(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=InstagramMessenger.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InstagramMessenger.node.d.ts","sourceRoot":"","sources":["../../../nodes/InstagramMessenger/InstagramMessenger.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EAIrB,MAAM,cAAc,CAAC;AAoBtB,qBAAa,kBAAmB,YAAW,SAAS;IAClD,WAAW,EAAE,oBAAoB,CA4G/B;IAIF,OAAO;;6BAEoB,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;;MAmBhF;IAII,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAgHxE"}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InstagramMessenger = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const pg_1 = require("pg");
|
|
6
|
+
// ─── Helpers ────────────────────────────────────────────────────────────────
|
|
7
|
+
async function getPgClient(credentials) {
|
|
8
|
+
const client = new pg_1.Client({
|
|
9
|
+
host: credentials.host,
|
|
10
|
+
port: credentials.port,
|
|
11
|
+
database: credentials.database,
|
|
12
|
+
user: credentials.user,
|
|
13
|
+
password: credentials.password,
|
|
14
|
+
ssl: credentials.ssl ? { rejectUnauthorized: false } : false,
|
|
15
|
+
});
|
|
16
|
+
await client.connect();
|
|
17
|
+
return client;
|
|
18
|
+
}
|
|
19
|
+
// ─── Node ────────────────────────────────────────────────────────────────────
|
|
20
|
+
class InstagramMessenger {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.description = {
|
|
23
|
+
displayName: 'Instagram Messenger',
|
|
24
|
+
name: 'instagramMessenger',
|
|
25
|
+
icon: 'file:instagram.svg',
|
|
26
|
+
group: ['output'],
|
|
27
|
+
version: 1,
|
|
28
|
+
subtitle: 'Envia mensagem via Instagram API',
|
|
29
|
+
description: 'Envia mensagens pelo Instagram usando as credenciais do cliente cadastrado no banco de dados.',
|
|
30
|
+
defaults: {
|
|
31
|
+
name: 'Instagram Messenger',
|
|
32
|
+
},
|
|
33
|
+
inputs: ['main'],
|
|
34
|
+
outputs: ['main'],
|
|
35
|
+
credentials: [
|
|
36
|
+
{
|
|
37
|
+
name: 'aussesPostgresApi',
|
|
38
|
+
required: true,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
properties: [
|
|
42
|
+
// ── Seleção de cliente ──────────────────────────────────────────────
|
|
43
|
+
{
|
|
44
|
+
displayName: 'Cliente',
|
|
45
|
+
name: 'clientName',
|
|
46
|
+
type: 'options',
|
|
47
|
+
typeOptions: {
|
|
48
|
+
loadOptionsMethod: 'getClients',
|
|
49
|
+
},
|
|
50
|
+
default: '',
|
|
51
|
+
required: true,
|
|
52
|
+
description: 'Selecione o cliente. O instagramId e o token serão preenchidos automaticamente a partir do banco de dados.',
|
|
53
|
+
},
|
|
54
|
+
// ── Destinatário ───────────────────────────────────────────────────
|
|
55
|
+
{
|
|
56
|
+
displayName: 'ID do Destinatário (recipient.id)',
|
|
57
|
+
name: 'recipientId',
|
|
58
|
+
type: 'string',
|
|
59
|
+
default: '',
|
|
60
|
+
required: true,
|
|
61
|
+
description: 'IGSID do usuário que vai receber a mensagem (recipient.id)',
|
|
62
|
+
placeholder: '17841400000000000',
|
|
63
|
+
},
|
|
64
|
+
// ── Mensagem ───────────────────────────────────────────────────────
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Tipo de Mensagem',
|
|
67
|
+
name: 'messageType',
|
|
68
|
+
type: 'options',
|
|
69
|
+
options: [
|
|
70
|
+
{
|
|
71
|
+
name: 'Texto',
|
|
72
|
+
value: 'text',
|
|
73
|
+
description: 'Envia uma mensagem de texto simples',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'Imagem',
|
|
77
|
+
value: 'image',
|
|
78
|
+
description: 'Envia uma imagem via URL',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
default: 'text',
|
|
82
|
+
required: true,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
displayName: 'Texto da Mensagem',
|
|
86
|
+
name: 'messageText',
|
|
87
|
+
type: 'string',
|
|
88
|
+
typeOptions: {
|
|
89
|
+
rows: 4,
|
|
90
|
+
},
|
|
91
|
+
default: '',
|
|
92
|
+
required: true,
|
|
93
|
+
displayOptions: {
|
|
94
|
+
show: {
|
|
95
|
+
messageType: ['text'],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
description: 'Conteúdo de message.text',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
displayName: 'URL da Imagem',
|
|
102
|
+
name: 'imageUrl',
|
|
103
|
+
type: 'string',
|
|
104
|
+
default: '',
|
|
105
|
+
required: true,
|
|
106
|
+
displayOptions: {
|
|
107
|
+
show: {
|
|
108
|
+
messageType: ['image'],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
placeholder: 'https://exemplo.com/imagem.jpg',
|
|
112
|
+
description: 'URL pública da imagem a ser enviada',
|
|
113
|
+
},
|
|
114
|
+
// ── Metadata (opcional) ────────────────────────────────────────────
|
|
115
|
+
{
|
|
116
|
+
displayName: 'Metadata (opcional)',
|
|
117
|
+
name: 'metadata',
|
|
118
|
+
type: 'string',
|
|
119
|
+
default: '',
|
|
120
|
+
required: false,
|
|
121
|
+
description: 'Valor de message.metadata — texto livre enviado junto da mensagem para rastreamento interno (máx. 1000 caracteres)',
|
|
122
|
+
placeholder: 'pedido_123 | campanha_verao',
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
};
|
|
126
|
+
// ── Load Options: popula o dropdown de clientes ───────────────────────────
|
|
127
|
+
this.methods = {
|
|
128
|
+
loadOptions: {
|
|
129
|
+
async getClients() {
|
|
130
|
+
const credentials = await this.getCredentials('aussesPostgresApi');
|
|
131
|
+
const schema = credentials.schema || 'public';
|
|
132
|
+
const table = credentials.clientTable || 'clientes';
|
|
133
|
+
const client = await getPgClient(credentials);
|
|
134
|
+
try {
|
|
135
|
+
const result = await client.query(`SELECT name FROM "${schema}"."${table}" ORDER BY name ASC`);
|
|
136
|
+
return result.rows.map((row) => ({
|
|
137
|
+
name: row.name,
|
|
138
|
+
value: row.name,
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
finally {
|
|
142
|
+
await client.end();
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
// ── Execute ───────────────────────────────────────────────────────────────
|
|
149
|
+
async execute() {
|
|
150
|
+
const items = this.getInputData();
|
|
151
|
+
const returnData = [];
|
|
152
|
+
const credentials = await this.getCredentials('aussesPostgresApi');
|
|
153
|
+
const schema = credentials.schema || 'public';
|
|
154
|
+
const table = credentials.clientTable || 'clientes';
|
|
155
|
+
for (let i = 0; i < items.length; i++) {
|
|
156
|
+
const clientName = this.getNodeParameter('clientName', i);
|
|
157
|
+
const recipientId = this.getNodeParameter('recipientId', i);
|
|
158
|
+
const messageType = this.getNodeParameter('messageType', i);
|
|
159
|
+
const metadata = this.getNodeParameter('metadata', i, '');
|
|
160
|
+
// ── 1. Buscar credenciais do cliente no banco ─────────────────────
|
|
161
|
+
let instagramId;
|
|
162
|
+
let token;
|
|
163
|
+
const pgClient = await getPgClient(credentials);
|
|
164
|
+
try {
|
|
165
|
+
const result = await pgClient.query(`SELECT "instagramId", "tokenInstagram"
|
|
166
|
+
FROM "${schema}"."${table}"
|
|
167
|
+
WHERE name = $1
|
|
168
|
+
LIMIT 1`, [clientName]);
|
|
169
|
+
if (result.rows.length === 0) {
|
|
170
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Cliente "${clientName}" não encontrado na tabela ${schema}.${table}`, { itemIndex: i });
|
|
171
|
+
}
|
|
172
|
+
instagramId = result.rows[0].instagramId;
|
|
173
|
+
token = result.rows[0].tokenInstagram;
|
|
174
|
+
if (!instagramId || !token) {
|
|
175
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Cliente "${clientName}" não possui instagramId ou tokenInstagram cadastrados`, { itemIndex: i });
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
finally {
|
|
179
|
+
await pgClient.end();
|
|
180
|
+
}
|
|
181
|
+
// ── 2. Montar body da requisição ──────────────────────────────────
|
|
182
|
+
let messagePayload;
|
|
183
|
+
if (messageType === 'text') {
|
|
184
|
+
const messageText = this.getNodeParameter('messageText', i);
|
|
185
|
+
messagePayload = { text: messageText };
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
const imageUrl = this.getNodeParameter('imageUrl', i);
|
|
189
|
+
messagePayload = {
|
|
190
|
+
attachment: {
|
|
191
|
+
type: 'image',
|
|
192
|
+
payload: { url: imageUrl },
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
if (metadata) {
|
|
197
|
+
messagePayload.metadata = metadata;
|
|
198
|
+
}
|
|
199
|
+
const body = {
|
|
200
|
+
recipient: { id: recipientId },
|
|
201
|
+
message: messagePayload,
|
|
202
|
+
};
|
|
203
|
+
// ── 3. Chamar a API do Instagram ──────────────────────────────────
|
|
204
|
+
const url = `https://graph.instagram.com/v22.0/${instagramId}/messages`;
|
|
205
|
+
let response;
|
|
206
|
+
try {
|
|
207
|
+
response = await this.helpers.httpRequest({
|
|
208
|
+
method: 'POST',
|
|
209
|
+
url,
|
|
210
|
+
headers: {
|
|
211
|
+
Authorization: `Bearer ${token}`,
|
|
212
|
+
'Content-Type': 'application/json',
|
|
213
|
+
},
|
|
214
|
+
body,
|
|
215
|
+
json: true,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error, {
|
|
220
|
+
message: `Erro ao enviar mensagem para o cliente "${clientName}": ${error.message}`,
|
|
221
|
+
itemIndex: i,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
// ── 4. Retornar resultado ─────────────────────────────────────────
|
|
225
|
+
returnData.push({
|
|
226
|
+
json: {
|
|
227
|
+
success: true,
|
|
228
|
+
client: clientName,
|
|
229
|
+
instagramId,
|
|
230
|
+
recipient: recipientId,
|
|
231
|
+
response: response,
|
|
232
|
+
},
|
|
233
|
+
pairedItem: { item: i },
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
return [returnData];
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
exports.InstagramMessenger = InstagramMessenger;
|
|
240
|
+
//# sourceMappingURL=InstagramMessenger.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InstagramMessenger.node.js","sourceRoot":"","sources":["../../../nodes/InstagramMessenger/InstagramMessenger.node.ts"],"names":[],"mappings":";;;AAAA,+CAUsB;AACtB,2BAA4B;AAE5B,+EAA+E;AAE/E,KAAK,UAAU,WAAW,CAAC,WAAoC;IAC7D,MAAM,MAAM,GAAG,IAAI,WAAM,CAAC;QACxB,IAAI,EAAE,WAAW,CAAC,IAAc;QAChC,IAAI,EAAE,WAAW,CAAC,IAAc;QAChC,QAAQ,EAAE,WAAW,CAAC,QA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;gBACd,IAAI,EAAE;oBACJ,OAAO,EAAE,IAAI;oBACb,MAAM,EAAE,UAAU;oBAClB,WAAW;oBACX,SAAS,EAAE,WAAW;oBACtB,QAAQ,EAAE,QAAsB;iBACjC;gBACD,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;aACxB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACtB,CAAC;CACF;AA1PD,gDA0PC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
|
|
2
|
+
<defs>
|
|
3
|
+
<radialGradient id="ig-grad" cx="30%" cy="107%" r="150%">
|
|
4
|
+
<stop offset="0%" stop-color="#fdf497"/>
|
|
5
|
+
<stop offset="5%" stop-color="#fdf497"/>
|
|
6
|
+
<stop offset="45%" stop-color="#fd5949"/>
|
|
7
|
+
<stop offset="60%" stop-color="#d6249f"/>
|
|
8
|
+
<stop offset="90%" stop-color="#285AEB"/>
|
|
9
|
+
</radialGradient>
|
|
10
|
+
</defs>
|
|
11
|
+
<rect width="24" height="24" rx="5.5" fill="url(#ig-grad)"/>
|
|
12
|
+
<rect x="6.5" y="6.5" width="11" height="11" rx="3" stroke="#fff" stroke-width="1.5" fill="none"/>
|
|
13
|
+
<circle cx="12" cy="12" r="2.8" stroke="#fff" stroke-width="1.5" fill="none"/>
|
|
14
|
+
<circle cx="17" cy="7" r="0.8" fill="#fff"/>
|
|
15
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "n8n-nodes-ausses",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Custom n8n nodes for Ausses - Instagram Messenger and more",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n-community-node-package"
|
|
7
|
+
],
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"author": "Ausses",
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc && npm run copy:icons",
|
|
13
|
+
"copy:icons": "copyfiles -u 1 \"nodes/**/*.svg\" dist/nodes/",
|
|
14
|
+
"dev": "tsc --watch",
|
|
15
|
+
"lint": "eslint nodes credentials --ext .ts",
|
|
16
|
+
"prepublishOnly": "npm run build"
|
|
17
|
+
},
|
|
18
|
+
"n8n": {
|
|
19
|
+
"n8nNodesApiVersion": 1,
|
|
20
|
+
"credentials": [
|
|
21
|
+
"dist/credentials/AussesPostgresApi.credentials.js"
|
|
22
|
+
],
|
|
23
|
+
"nodes": [
|
|
24
|
+
"dist/nodes/InstagramMessenger/InstagramMessenger.node.js"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/node": "^18.0.0",
|
|
29
|
+
"@types/pg": "^8.11.0",
|
|
30
|
+
"copyfiles": "^2.4.1",
|
|
31
|
+
"n8n-workflow": "^2.9.0",
|
|
32
|
+
"typescript": "^5.0.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"n8n-workflow": "*"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"pg": "^8.11.0"
|
|
39
|
+
}
|
|
40
|
+
}
|