@growsalesai/n8n-nodes-sendflow 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.
@@ -0,0 +1,9 @@
1
+ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class SendflowApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SendflowApi = void 0;
4
+ class SendflowApi {
5
+ constructor() {
6
+ this.name = 'sendflowApi';
7
+ this.displayName = 'SendFlow API';
8
+ this.documentationUrl = 'https://sendflow.pro/sendapi';
9
+ this.properties = [
10
+ {
11
+ displayName: 'API Key',
12
+ name: 'apiKey',
13
+ type: 'string',
14
+ typeOptions: { password: true },
15
+ default: '',
16
+ required: true,
17
+ description: 'API Key do SendFlow (Authorization: Bearer)',
18
+ },
19
+ ];
20
+ this.authenticate = {
21
+ type: 'generic',
22
+ properties: {
23
+ headers: {
24
+ Authorization: '=Bearer {{$credentials.apiKey}}',
25
+ },
26
+ },
27
+ };
28
+ this.test = {
29
+ request: {
30
+ baseURL: 'https://sendflow.pro/sendapi',
31
+ url: '/releases',
32
+ method: 'GET',
33
+ },
34
+ };
35
+ }
36
+ }
37
+ exports.SendflowApi = SendflowApi;
38
+ //# sourceMappingURL=SendflowApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SendflowApi.credentials.js","sourceRoot":"","sources":["../../credentials/SendflowApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,aAAa,CAAC;QAErB,gBAAW,GAAG,cAAc,CAAC;QAE7B,qBAAgB,GAAG,8BAA8B,CAAC;QAElD,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,6CAA6C;aAC1D;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,8BAA8B;gBACvC,GAAG,EAAE,WAAW;gBAChB,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AAnCD,kCAmCC"}
@@ -0,0 +1,2 @@
1
+ import type { IDataObject, IExecuteFunctions, ILoadOptionsFunctions, IHttpRequestMethods } from 'n8n-workflow';
2
+ export declare function sendflowApiRequest(this: IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, endpoint: string, body?: IDataObject, qs?: IDataObject): Promise<IDataObject>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendflowApiRequest = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const BASE_URL = 'https://sendflow.pro/sendapi';
6
+ async function sendflowApiRequest(method, endpoint, body = {}, qs = {}) {
7
+ const options = {
8
+ method,
9
+ uri: `${BASE_URL}${endpoint}`,
10
+ json: true,
11
+ };
12
+ if (Object.keys(body).length) {
13
+ options.body = body;
14
+ }
15
+ if (Object.keys(qs).length) {
16
+ options.qs = qs;
17
+ }
18
+ try {
19
+ return await this.helpers.requestWithAuthentication.call(this, 'sendflowApi', options);
20
+ }
21
+ catch (error) {
22
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
23
+ }
24
+ }
25
+ exports.sendflowApiRequest = sendflowApiRequest;
26
+ //# sourceMappingURL=GenericFunctions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../nodes/Sendflow/GenericFunctions.ts"],"names":[],"mappings":";;;AAOA,+CAA4C;AAE5C,MAAM,QAAQ,GAAG,8BAA8B,CAAC;AAEzC,KAAK,UAAU,kBAAkB,CAEvC,MAA2B,EAC3B,QAAgB,EAChB,OAAoB,EAAE,EACtB,KAAkB,EAAE;IAEpB,MAAM,OAAO,GAAgB;QAC5B,MAAM;QACN,GAAG,EAAE,GAAG,QAAQ,GAAG,QAAQ,EAAE;QAC7B,IAAI,EAAE,IAAI;KACV,CAAC;IAEF,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE;QAC7B,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;KACpB;IAED,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;QAC3B,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;KAChB;IAED,IAAI;QACH,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;KACvF;IAAC,OAAO,KAAK,EAAE;QACf,MAAM,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAmB,CAAC,CAAC;KAC5D;AACF,CAAC;AA1BD,gDA0BC"}
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Sendflow implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Sendflow = void 0;
4
+ const GenericFunctions_1 = require("./GenericFunctions");
5
+ const descriptions_1 = require("./descriptions");
6
+ class Sendflow {
7
+ constructor() {
8
+ this.description = {
9
+ displayName: 'SendFlow',
10
+ name: 'sendflow',
11
+ icon: 'file:sendflow.svg',
12
+ group: ['transform'],
13
+ version: 1,
14
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
15
+ description: 'Gerencie campanhas WhatsApp via SendFlow API',
16
+ defaults: {
17
+ name: 'SendFlow',
18
+ },
19
+ inputs: ['main'],
20
+ outputs: ['main'],
21
+ credentials: [
22
+ {
23
+ name: 'sendflowApi',
24
+ required: true,
25
+ },
26
+ ],
27
+ properties: [
28
+ {
29
+ displayName: 'Resource',
30
+ name: 'resource',
31
+ type: 'options',
32
+ noDataExpression: true,
33
+ options: [
34
+ { name: 'Analytics', value: 'analytics' },
35
+ { name: 'Campaign', value: 'campaign' },
36
+ { name: 'Group', value: 'group' },
37
+ ],
38
+ default: 'campaign',
39
+ },
40
+ ...descriptions_1.campaignOperations,
41
+ ...descriptions_1.campaignFields,
42
+ ...descriptions_1.groupOperations,
43
+ ...descriptions_1.groupFields,
44
+ ...descriptions_1.analyticsOperations,
45
+ ...descriptions_1.analyticsFields,
46
+ ],
47
+ };
48
+ }
49
+ async execute() {
50
+ const items = this.getInputData();
51
+ const returnData = [];
52
+ const resource = this.getNodeParameter('resource', 0);
53
+ const operation = this.getNodeParameter('operation', 0);
54
+ for (let i = 0; i < items.length; i++) {
55
+ try {
56
+ if (resource === 'campaign') {
57
+ await executeCampaign.call(this, operation, i, returnData);
58
+ }
59
+ else if (resource === 'group') {
60
+ await executeGroup.call(this, operation, i, returnData);
61
+ }
62
+ else if (resource === 'analytics') {
63
+ await executeAnalytics.call(this, operation, i, returnData);
64
+ }
65
+ }
66
+ catch (error) {
67
+ if (this.continueOnFail()) {
68
+ returnData.push({ error: error.message });
69
+ continue;
70
+ }
71
+ throw error;
72
+ }
73
+ }
74
+ return [this.helpers.returnJsonArray(returnData)];
75
+ }
76
+ }
77
+ exports.Sendflow = Sendflow;
78
+ // ─── Campaign handlers ────────────────────────────────────────────────────────
79
+ async function executeCampaign(operation, i, returnData) {
80
+ if (operation === 'getAll') {
81
+ const response = await GenericFunctions_1.sendflowApiRequest.call(this, 'GET', '/releases');
82
+ const items = Array.isArray(response) ? response : [response];
83
+ returnData.push(...items);
84
+ return;
85
+ }
86
+ if (operation === 'create') {
87
+ const name = this.getNodeParameter('name', i);
88
+ const type = this.getNodeParameter('type', i);
89
+ const additionalFields = this.getNodeParameter('additionalFields', i);
90
+ const body = { name, type };
91
+ if (additionalFields.projectId)
92
+ body.projectId = additionalFields.projectId;
93
+ const response = await GenericFunctions_1.sendflowApiRequest.call(this, 'POST', '/releases', body);
94
+ returnData.push(response);
95
+ return;
96
+ }
97
+ const releaseId = this.getNodeParameter('releaseId', i);
98
+ if (operation === 'get') {
99
+ const response = await GenericFunctions_1.sendflowApiRequest.call(this, 'GET', `/releases/${releaseId}`);
100
+ returnData.push(response);
101
+ return;
102
+ }
103
+ if (operation === 'delete') {
104
+ await GenericFunctions_1.sendflowApiRequest.call(this, 'DELETE', `/releases/${releaseId}`);
105
+ returnData.push({ success: true, releaseId });
106
+ return;
107
+ }
108
+ if (operation === 'updateRedirectLink') {
109
+ const slug = this.getNodeParameter('slug', i);
110
+ const response = await GenericFunctions_1.sendflowApiRequest.call(this, 'PATCH', `/releases/${releaseId}/redirect-link`, { slug });
111
+ returnData.push(response);
112
+ return;
113
+ }
114
+ if (operation === 'removeDuplicatedParticipants') {
115
+ const response = await GenericFunctions_1.sendflowApiRequest.call(this, 'POST', `/releases/${releaseId}/remove-duplicated-participants`);
116
+ returnData.push(response);
117
+ return;
118
+ }
119
+ if (operation === 'update') {
120
+ const updateFields = this.getNodeParameter('updateFields', i);
121
+ const groupConfig = this.getNodeParameter('groupConfig', i);
122
+ const body = { ...updateFields };
123
+ if (body.accountIds) {
124
+ body.accountIds = body.accountIds
125
+ .split(',')
126
+ .map((s) => s.trim())
127
+ .filter(Boolean);
128
+ }
129
+ if (Object.keys(groupConfig).length) {
130
+ const group = { ...groupConfig };
131
+ if (typeof group.admins === 'string') {
132
+ try {
133
+ group.admins = JSON.parse(group.admins);
134
+ }
135
+ catch {
136
+ group.admins = [];
137
+ }
138
+ }
139
+ body.group = group;
140
+ }
141
+ const response = await GenericFunctions_1.sendflowApiRequest.call(this, 'PUT', `/releases/${releaseId}`, body);
142
+ returnData.push(response);
143
+ }
144
+ }
145
+ // ─── Group handlers ───────────────────────────────────────────────────────────
146
+ async function executeGroup(operation, i, returnData) {
147
+ if (operation === 'getAll') {
148
+ const releaseId = this.getNodeParameter('releaseId', i);
149
+ const response = await GenericFunctions_1.sendflowApiRequest.call(this, 'GET', `/releases/${releaseId}/groups`);
150
+ const items = Array.isArray(response) ? response : [response];
151
+ returnData.push(...items);
152
+ }
153
+ }
154
+ // ─── Analytics handlers ───────────────────────────────────────────────────────
155
+ async function executeAnalytics(operation, i, returnData) {
156
+ const releaseId = this.getNodeParameter('releaseId', i);
157
+ if (operation === 'get') {
158
+ const response = await GenericFunctions_1.sendflowApiRequest.call(this, 'GET', `/releases/${releaseId}/analytics`);
159
+ returnData.push(response);
160
+ return;
161
+ }
162
+ if (operation === 'getLeadScoring') {
163
+ const response = await GenericFunctions_1.sendflowApiRequest.call(this, 'GET', `/releases/${releaseId}/leadscoring`);
164
+ returnData.push(response);
165
+ return;
166
+ }
167
+ if (operation === 'downloadLeadScoring') {
168
+ const response = await GenericFunctions_1.sendflowApiRequest.call(this, 'GET', `/releases/${releaseId}/leadscoring/download`);
169
+ returnData.push({ downloadUrl: response });
170
+ }
171
+ }
172
+ //# sourceMappingURL=Sendflow.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sendflow.node.js","sourceRoot":"","sources":["../../../nodes/Sendflow/Sendflow.node.ts"],"names":[],"mappings":";;;AAQA,yDAAwD;AACxD,iDAOwB;AAExB,MAAa,QAAQ;IAArB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,UAAU;YACvB,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,CAAC,IAAI,CAC7C,IAAI,EACJ,KAAK,EACL,aAAa,SAAS,cAAc,CACpC,CAAC;QACF,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1B,OAAO;KACP;IAED,IAAI,SAAS,KAAK,qBAAqB,EAAE;QACxC,MAAM,QAAQ,GAAG,MAAM,qCAAkB,CAAC,IAAI,CAC7C,IAAI,EACJ,KAAK,EACL,aAAa,SAAS,uBAAuB,CAC7C,CAAC;QACF,UAAU,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC;KAC3C;AACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const analyticsOperations: INodeProperties[];
3
+ export declare const analyticsFields: INodeProperties[];
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.analyticsFields = exports.analyticsOperations = void 0;
4
+ exports.analyticsOperations = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: { resource: ['analytics'] },
12
+ },
13
+ options: [
14
+ {
15
+ name: 'Download Lead Scoring',
16
+ value: 'downloadLeadScoring',
17
+ description: 'Obter URL de download do arquivo de lead scoring (formato Excel)',
18
+ action: 'Download lead scoring of a campaign',
19
+ },
20
+ {
21
+ name: 'Get',
22
+ value: 'get',
23
+ description: 'Buscar métricas e dados de performance da campanha',
24
+ action: 'Get analytics of a campaign',
25
+ },
26
+ {
27
+ name: 'Get Lead Scoring',
28
+ value: 'getLeadScoring',
29
+ description: 'Gerar lead scoring para a campanha',
30
+ action: 'Get lead scoring of a campaign',
31
+ },
32
+ ],
33
+ default: 'get',
34
+ },
35
+ ];
36
+ exports.analyticsFields = [
37
+ {
38
+ displayName: 'Campaign ID',
39
+ name: 'releaseId',
40
+ type: 'string',
41
+ required: true,
42
+ displayOptions: {
43
+ show: {
44
+ resource: ['analytics'],
45
+ operation: ['get', 'getLeadScoring', 'downloadLeadScoring'],
46
+ },
47
+ },
48
+ default: '',
49
+ description: 'ID da campanha',
50
+ },
51
+ ];
52
+ //# sourceMappingURL=AnalyticsDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnalyticsDescription.js","sourceRoot":"","sources":["../../../../nodes/Sendflow/descriptions/AnalyticsDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAsB;IACrD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE;SACjC;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,uBAAuB;gBAC7B,KAAK,EAAE,qBAAqB;gBAC5B,WAAW,EAAE,kEAAkE;gBAC/E,MAAM,EAAE,qCAAqC;aAC7C;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,oDAAoD;gBACjE,MAAM,EAAE,6BAA6B;aACrC;YACD;gBACC,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,gBAAgB;gBACvB,WAAW,EAAE,oCAAoC;gBACjD,MAAM,EAAE,gCAAgC;aACxC;SACD;QACD,OAAO,EAAE,KAAK;KACd;CACD,CAAC;AAEW,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,WAAW,CAAC;gBACvB,SAAS,EAAE,CAAC,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,CAAC;aAC3D;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gBAAgB;KAC7B;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const campaignOperations: INodeProperties[];
3
+ export declare const campaignFields: INodeProperties[];
@@ -0,0 +1,318 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.campaignFields = exports.campaignOperations = void 0;
4
+ exports.campaignOperations = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: { resource: ['campaign'] },
12
+ },
13
+ options: [
14
+ {
15
+ name: 'Create',
16
+ value: 'create',
17
+ description: 'Criar uma nova campanha',
18
+ action: 'Create a campaign',
19
+ },
20
+ {
21
+ name: 'Delete',
22
+ value: 'delete',
23
+ description: 'Deletar uma campanha permanentemente',
24
+ action: 'Delete a campaign',
25
+ },
26
+ {
27
+ name: 'Get',
28
+ value: 'get',
29
+ description: 'Buscar uma campanha pelo ID',
30
+ action: 'Get a campaign',
31
+ },
32
+ {
33
+ name: 'Get All',
34
+ value: 'getAll',
35
+ description: 'Listar todas as campanhas do usuário',
36
+ action: 'Get all campaigns',
37
+ },
38
+ {
39
+ name: 'Remove Duplicated Participants',
40
+ value: 'removeDuplicatedParticipants',
41
+ description: 'Criar ação para remover participantes duplicados',
42
+ action: 'Remove duplicated participants from a campaign',
43
+ },
44
+ {
45
+ name: 'Update',
46
+ value: 'update',
47
+ description: 'Atualizar configurações de uma campanha',
48
+ action: 'Update a campaign',
49
+ },
50
+ {
51
+ name: 'Update Redirect Link',
52
+ value: 'updateRedirectLink',
53
+ description: 'Atualizar o slug de redirecionamento da campanha',
54
+ action: 'Update redirect link of a campaign',
55
+ },
56
+ ],
57
+ default: 'getAll',
58
+ },
59
+ ];
60
+ exports.campaignFields = [
61
+ // ─── Campaign ID (operations that require it) ────────────────────────────────
62
+ {
63
+ displayName: 'Campaign ID',
64
+ name: 'releaseId',
65
+ type: 'string',
66
+ required: true,
67
+ displayOptions: {
68
+ show: {
69
+ resource: ['campaign'],
70
+ operation: ['get', 'update', 'delete', 'updateRedirectLink', 'removeDuplicatedParticipants'],
71
+ },
72
+ },
73
+ default: '',
74
+ description: 'ID da campanha',
75
+ },
76
+ // ─── Create: required fields ─────────────────────────────────────────────────
77
+ {
78
+ displayName: 'Name',
79
+ name: 'name',
80
+ type: 'string',
81
+ required: true,
82
+ displayOptions: {
83
+ show: { resource: ['campaign'], operation: ['create'] },
84
+ },
85
+ default: '',
86
+ description: 'Nome da campanha',
87
+ },
88
+ {
89
+ displayName: 'Type',
90
+ name: 'type',
91
+ type: 'options',
92
+ required: true,
93
+ displayOptions: {
94
+ show: { resource: ['campaign'], operation: ['create'] },
95
+ },
96
+ options: [
97
+ { name: 'WhatsRelease', value: 'WhatsRelease' },
98
+ { name: 'WhatsList', value: 'WhatsList' },
99
+ { name: 'WhatsViralCampaign', value: 'WhatsViralCampaign' },
100
+ ],
101
+ default: 'WhatsRelease',
102
+ description: 'Tipo da campanha',
103
+ },
104
+ {
105
+ displayName: 'Additional Fields',
106
+ name: 'additionalFields',
107
+ type: 'collection',
108
+ placeholder: 'Add Field',
109
+ default: {},
110
+ displayOptions: {
111
+ show: { resource: ['campaign'], operation: ['create'] },
112
+ },
113
+ options: [
114
+ {
115
+ displayName: 'Project ID',
116
+ name: 'projectId',
117
+ type: 'string',
118
+ default: '',
119
+ description: 'ID do projeto ao qual a campanha pertence',
120
+ },
121
+ ],
122
+ },
123
+ // ─── Update Redirect Link ─────────────────────────────────────────────────────
124
+ {
125
+ displayName: 'Slug',
126
+ name: 'slug',
127
+ type: 'string',
128
+ required: true,
129
+ displayOptions: {
130
+ show: { resource: ['campaign'], operation: ['updateRedirectLink'] },
131
+ },
132
+ default: '',
133
+ description: 'Slug de redirecionamento (convertido para minúsculas e sem espaços)',
134
+ },
135
+ // ─── Update: general fields ───────────────────────────────────────────────────
136
+ {
137
+ displayName: 'Update Fields',
138
+ name: 'updateFields',
139
+ type: 'collection',
140
+ placeholder: 'Add Field',
141
+ default: {},
142
+ displayOptions: {
143
+ show: { resource: ['campaign'], operation: ['update'] },
144
+ },
145
+ options: [
146
+ {
147
+ displayName: 'Account IDs',
148
+ name: 'accountIds',
149
+ type: 'string',
150
+ default: '',
151
+ description: 'IDs de contas separados por vírgula',
152
+ },
153
+ {
154
+ displayName: 'Archived',
155
+ name: 'archived',
156
+ type: 'boolean',
157
+ default: false,
158
+ description: 'Whether to archive the campaign',
159
+ },
160
+ {
161
+ displayName: 'Deep Linking',
162
+ name: 'deepLinking',
163
+ type: 'boolean',
164
+ default: false,
165
+ description: 'Whether to enable deep linking',
166
+ },
167
+ {
168
+ displayName: 'Name',
169
+ name: 'name',
170
+ type: 'string',
171
+ default: '',
172
+ description: 'Novo nome da campanha',
173
+ },
174
+ {
175
+ displayName: 'Position',
176
+ name: 'position',
177
+ type: 'number',
178
+ default: 0,
179
+ description: 'Posição da campanha na listagem',
180
+ },
181
+ {
182
+ displayName: 'Project ID',
183
+ name: 'projectId',
184
+ type: 'string',
185
+ default: '',
186
+ description: 'ID do projeto (use vazio para remover)',
187
+ },
188
+ {
189
+ displayName: 'Type',
190
+ name: 'type',
191
+ type: 'options',
192
+ options: [
193
+ { name: 'WhatsRelease', value: 'WhatsRelease' },
194
+ { name: 'WhatsList', value: 'WhatsList' },
195
+ { name: 'WhatsViralCampaign', value: 'WhatsViralCampaign' },
196
+ ],
197
+ default: 'WhatsRelease',
198
+ description: 'Tipo da campanha',
199
+ },
200
+ ],
201
+ },
202
+ // ─── Update: group configuration ─────────────────────────────────────────────
203
+ {
204
+ displayName: 'Group Configuration',
205
+ name: 'groupConfig',
206
+ type: 'collection',
207
+ placeholder: 'Add Group Config',
208
+ default: {},
209
+ displayOptions: {
210
+ show: { resource: ['campaign'], operation: ['update'] },
211
+ },
212
+ options: [
213
+ {
214
+ displayName: 'Admins (JSON Array)',
215
+ name: 'admins',
216
+ type: 'json',
217
+ default: '[]',
218
+ description: 'Array de admins no formato [{"name":"Nome","number":"5511..."}]',
219
+ },
220
+ {
221
+ displayName: 'Close Group After Opening',
222
+ name: 'createOpenGroupAndCloseAfter',
223
+ type: 'boolean',
224
+ default: false,
225
+ description: 'Whether to open the group and close it automatically after',
226
+ },
227
+ {
228
+ displayName: 'Community Enabled',
229
+ name: 'communityEnabled',
230
+ type: 'boolean',
231
+ default: false,
232
+ description: 'Whether to enable community features in the group',
233
+ },
234
+ {
235
+ displayName: 'Count Start',
236
+ name: 'countStart',
237
+ type: 'number',
238
+ default: 1,
239
+ description: 'Número inicial para contagem dos grupos',
240
+ },
241
+ {
242
+ displayName: 'Disabled Group Spawn',
243
+ name: 'disabledGroupSpawn',
244
+ type: 'boolean',
245
+ default: false,
246
+ description: 'Whether to disable automatic group spawning',
247
+ },
248
+ {
249
+ displayName: 'Disappearing Messages (seconds)',
250
+ name: 'disappearingMessagesInChat',
251
+ type: 'number',
252
+ default: 0,
253
+ description: 'Tempo em segundos para mensagens desaparecerem (0 = desabilitado)',
254
+ },
255
+ {
256
+ displayName: 'Fixed Description',
257
+ name: 'fixedDescription',
258
+ type: 'string',
259
+ default: '',
260
+ description: 'Descrição fixa do grupo',
261
+ },
262
+ {
263
+ displayName: 'Group Creation Mode',
264
+ name: 'groupCreationMode',
265
+ type: 'options',
266
+ options: [
267
+ { name: 'Normal', value: 'normal' },
268
+ { name: 'Safe', value: 'safe' },
269
+ ],
270
+ default: 'normal',
271
+ description: 'Modo de criação dos grupos',
272
+ },
273
+ {
274
+ displayName: 'Image URL',
275
+ name: 'image',
276
+ type: 'string',
277
+ default: '',
278
+ description: 'URL da imagem do grupo',
279
+ },
280
+ {
281
+ displayName: 'Limit',
282
+ name: 'limit',
283
+ type: 'number',
284
+ default: 256,
285
+ description: 'Limite de participantes por grupo',
286
+ },
287
+ {
288
+ displayName: 'Margin',
289
+ name: 'margin',
290
+ type: 'number',
291
+ default: 0,
292
+ description: 'Margem de segurança antes de criar novo grupo',
293
+ },
294
+ {
295
+ displayName: 'Name',
296
+ name: 'name',
297
+ type: 'string',
298
+ default: '',
299
+ description: 'Nome base dos grupos criados',
300
+ },
301
+ {
302
+ displayName: 'Number Placed on Start',
303
+ name: 'numberplacedonstart',
304
+ type: 'boolean',
305
+ default: false,
306
+ description: 'Whether to place the number at the start of the group name',
307
+ },
308
+ {
309
+ displayName: 'Only Admins Speak',
310
+ name: 'onlyAdminsSpeak',
311
+ type: 'boolean',
312
+ default: false,
313
+ description: 'Whether to restrict messages to admins only',
314
+ },
315
+ ],
316
+ },
317
+ ];
318
+ //# sourceMappingURL=CampaignDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CampaignDescription.js","sourceRoot":"","sources":["../../../../nodes/Sendflow/descriptions/CampaignDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAsB;IACpD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE;SAChC;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,yBAAyB;gBACtC,MAAM,EAAE,mBAAmB;aAC3B;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,sCAAsC;gBACnD,MAAM,EAAE,mBAAmB;aAC3B;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,6BAA6B;gBAC1C,MAAM,EAAE,gBAAgB;aACxB;YACD;gBACC,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,sCAAsC;gBACnD,MAAM,EAAE,mBAAmB;aAC3B;YACD;gBACC,IAAI,EAAE,gCAAgC;gBACtC,KAAK,EAAE,8BAA8B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ations: INodeProperties[];
3
+ export declare const groupFields: INodeProperties[];
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.groupFields = exports.groupOperations = void 0;
4
+ exports.groupOperations = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: { resource: ['group'] },
12
+ },
13
+ options: [
14
+ {
15
+ name: 'Get All',
16
+ value: 'getAll',
17
+ description: 'Listar todos os grupos de uma campanha com dados de participantes',
18
+ action: 'Get all groups of a campaign',
19
+ },
20
+ ],
21
+ default: 'getAll',
22
+ },
23
+ ];
24
+ exports.groupFields = [
25
+ {
26
+ displayName: 'Campaign ID',
27
+ name: 'releaseId',
28
+ type: 'string',
29
+ required: true,
30
+ displayOptions: {
31
+ show: { resource: ['group'], operation: ['getAll'] },
32
+ },
33
+ default: '',
34
+ description: 'ID da campanha para buscar os grupos',
35
+ },
36
+ ];
37
+ //# sourceMappingURL=GroupDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GroupDescription.js","sourceRoot":"","sources":["../../../../nodes/Sendflow/descriptions/GroupDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE;SAC7B;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,mEAAmE;gBAChF,MAAM,EAAE,8BAA8B;aACtC;SACD;QACD,OAAO,EAAE,QAAQ;KACjB;CACD,CAAC;AAEW,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SACpD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,sCAAsC;KACnD;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { campaignOperations, campaignFields } from './CampaignDescription';
2
+ export { groupOperations, groupFields } from './GroupDescription';
3
+ export { analyticsOperations, analyticsFields } from './AnalyticsDescription';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.analyticsFields = exports.analyticsOperations = exports.groupFields = exports.groupOperations = exports.campaignFields = exports.campaignOperations = void 0;
4
+ var CampaignDescription_1 = require("./CampaignDescription");
5
+ Object.defineProperty(exports, "campaignOperations", { enumerable: true, get: function () { return CampaignDescription_1.campaignOperations; } });
6
+ Object.defineProperty(exports, "campaignFields", { enumerable: true, get: function () { return CampaignDescription_1.campaignFields; } });
7
+ var GroupDescription_1 = require("./GroupDescription");
8
+ Object.defineProperty(exports, "groupOperations", { enumerable: true, get: function () { return GroupDescription_1.groupOperations; } });
9
+ Object.defineProperty(exports, "groupFields", { enumerable: true, get: function () { return GroupDescription_1.groupFields; } });
10
+ var AnalyticsDescription_1 = require("./AnalyticsDescription");
11
+ Object.defineProperty(exports, "analyticsOperations", { enumerable: true, get: function () { return AnalyticsDescription_1.analyticsOperations; } });
12
+ Object.defineProperty(exports, "analyticsFields", { enumerable: true, get: function () { return AnalyticsDescription_1.analyticsFields; } });
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/Sendflow/descriptions/index.ts"],"names":[],"mappings":";;;AAAA,6DAA2E;AAAlE,yHAAA,kBAAkB,OAAA;AAAE,qHAAA,cAAc,OAAA;AAC3C,uDAAkE;AAAzD,mHAAA,eAAe,OAAA;AAAE,+GAAA,WAAW,OAAA;AACrC,+DAA8E;AAArE,2HAAA,mBAAmB,OAAA;AAAE,uHAAA,eAAe,OAAA"}
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
2
+ <rect width="100" height="100" rx="18" fill="#25D366"/>
3
+ <path d="M50 14C30.7 14 15 27.9 15 45c0 9.6 4.9 18.3 12.8 24.1L25.5 82l13.2-4.8C42.2 78.4 46 79 50 79c19.3 0 35-13.9 35-31S69.3 14 50 14z" fill="#ffffff"/>
4
+ <circle cx="35" cy="47" r="5" fill="#25D366"/>
5
+ <circle cx="50" cy="47" r="5" fill="#25D366"/>
6
+ <circle cx="65" cy="47" r="5" fill="#25D366"/>
7
+ </svg>
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@growsalesai/n8n-nodes-sendflow",
3
+ "version": "0.1.0",
4
+ "description": "n8n community node for SendFlow API - WhatsApp campaign management",
5
+ "keywords": [
6
+ "n8n-community-node-package"
7
+ ],
8
+ "license": "MIT",
9
+ "homepage": "https://sendflow.pro",
10
+ "author": {
11
+ "name": "GrowSales",
12
+ "email": "growsales.ai@gmail.com"
13
+ },
14
+ "main": "index.js",
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "scripts": {
19
+ "build": "tsc && gulp build:icons",
20
+ "dev": "tsc --watch",
21
+ "format": "prettier nodes credentials --write",
22
+ "prepublishOnly": "npm run build"
23
+ },
24
+ "files": [
25
+ "dist"
26
+ ],
27
+ "n8n": {
28
+ "n8nNodesApiVersion": 1,
29
+ "credentials": [
30
+ "dist/credentials/SendflowApi.credentials.js"
31
+ ],
32
+ "nodes": [
33
+ "dist/nodes/Sendflow/Sendflow.node.js"
34
+ ]
35
+ },
36
+ "devDependencies": {
37
+ "@types/node": "^18.0.0",
38
+ "gulp": "^4.0.0",
39
+ "n8n-workflow": "*",
40
+ "prettier": "^3.0.0",
41
+ "typescript": "~5.1.6"
42
+ },
43
+ "peerDependencies": {
44
+ "n8n-workflow": "*"
45
+ }
46
+ }