n8n-nodes-repliz 1.0.42 → 1.0.43

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/README.md CHANGED
@@ -77,6 +77,9 @@ Supported post types: Text, Image, Video, Reel, Album, Link, Story, Document (a
77
77
  **Repliz Automation** `Gold+`
78
78
  Create and manage content automation rules. Operations: Get All, Create, Get, Update, Delete.
79
79
 
80
+ **Repliz Comment Sync** `Gold+`
81
+ Run the automation on a post's old and missed comments. Operations: Get All, Create, Update Status (pause or resume), Delete.
82
+
80
83
  **Repliz Template Automation** `Gold+`
81
84
  Create and manage reusable automation templates. Operations: Get All, Create, Get, Update, Delete.
82
85
 
@@ -0,0 +1,5 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class ReplizCommentSync implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReplizCommentSync = void 0;
4
+ const GenericFunctions_1 = require("../GenericFunctions");
5
+ class ReplizCommentSync {
6
+ constructor() {
7
+ this.description = {
8
+ displayName: 'Repliz Comment Sync',
9
+ name: 'replizCommentSync',
10
+ icon: 'file:repliz.svg',
11
+ group: ['transform'],
12
+ version: 1,
13
+ subtitle: '={{$parameter["operation"]}}',
14
+ description: 'Run the Repliz automation on the old and missed comments of a post (Gold+)',
15
+ defaults: { name: 'Repliz Comment Sync' },
16
+ inputs: ['main'],
17
+ outputs: ['main'],
18
+ credentials: [{ name: 'replizApi', required: true }],
19
+ properties: [
20
+ {
21
+ displayName: 'Operation',
22
+ name: 'operation',
23
+ type: 'options',
24
+ noDataExpression: true,
25
+ options: [
26
+ { name: 'Get All', value: 'getAll', description: 'Retrieve the active comment syncs', action: 'Get all comment syncs' },
27
+ { name: 'Create', value: 'create', description: 'Start syncing the old and missed comments of a post', action: 'Create a comment sync' },
28
+ { name: 'Update Status', value: 'updateStatus', description: 'Pause or resume a comment sync', action: 'Update a comment sync status' },
29
+ { name: 'Delete', value: 'delete', description: 'Stop a comment sync', action: 'Delete a comment sync' },
30
+ ],
31
+ default: 'getAll',
32
+ },
33
+ // Get All
34
+ { displayName: 'Return All', name: 'returnAll', type: 'boolean', displayOptions: { show: { operation: ['getAll'] } }, default: false, description: 'Whether to return all results or only up to a limit' },
35
+ { displayName: 'Limit', name: 'limit', type: 'number', displayOptions: { show: { operation: ['getAll'], returnAll: [false] } }, typeOptions: { minValue: 1, maxValue: 100 }, default: 20, description: 'Max number of results to return' },
36
+ {
37
+ displayName: 'Filters',
38
+ name: 'filters',
39
+ type: 'collection',
40
+ placeholder: 'Add Filter',
41
+ default: {},
42
+ displayOptions: { show: { operation: ['getAll'] } },
43
+ options: [
44
+ { displayName: 'Account IDs', name: 'accountIds', type: 'string', default: '', placeholder: 'id1,id2', description: 'Comma-separated list of account IDs' },
45
+ { displayName: 'Search', name: 'search', type: 'string', default: '', description: 'Matches the title, caption or URL of the post' },
46
+ ],
47
+ },
48
+ // Create
49
+ {
50
+ displayName: 'Content ID',
51
+ name: 'contentId',
52
+ type: 'string',
53
+ required: true,
54
+ displayOptions: { show: { operation: ['create'] } },
55
+ default: '',
56
+ description: 'The ID of the post on the platform, from Repliz Content. The automation runs on its old and missed top-level comments. A post has one comment sync.',
57
+ },
58
+ {
59
+ displayName: 'Account ID',
60
+ name: 'accountId',
61
+ type: 'string',
62
+ required: true,
63
+ displayOptions: { show: { operation: ['create'] } },
64
+ default: '',
65
+ description: 'The connected account that published the post: Instagram, Facebook, Threads, TikTok, YouTube or LinkedIn',
66
+ },
67
+ // Update Status / Delete
68
+ { displayName: 'Listener ID', name: 'listenerId', type: 'string', required: true, displayOptions: { show: { operation: ['updateStatus', 'delete'] } }, default: '', description: 'The ID of the comment sync, the listenerId from Create or the _id from Get All' },
69
+ {
70
+ displayName: 'Status',
71
+ name: 'status',
72
+ type: 'options',
73
+ required: true,
74
+ displayOptions: { show: { operation: ['updateStatus'] } },
75
+ options: [
76
+ { name: 'Pause', value: 'paused', description: 'Stop checking the post and keep its progress' },
77
+ { name: 'Resume', value: 'active', description: 'Continue checking the post right away' },
78
+ ],
79
+ default: 'paused',
80
+ },
81
+ ],
82
+ };
83
+ }
84
+ async execute() {
85
+ const items = this.getInputData();
86
+ const returnData = [];
87
+ for (let i = 0; i < items.length; i++) {
88
+ try {
89
+ const operation = this.getNodeParameter('operation', i);
90
+ let responseData;
91
+ if (operation === 'getAll') {
92
+ const returnAll = this.getNodeParameter('returnAll', i);
93
+ const filters = this.getNodeParameter('filters', i);
94
+ const qs = {};
95
+ if (filters.search)
96
+ qs.search = filters.search;
97
+ if (filters.accountIds)
98
+ qs.accountIds = filters.accountIds.split(',').map((s) => s.trim()).filter(Boolean);
99
+ if (returnAll) {
100
+ responseData = await GenericFunctions_1.replizApiRequestAllItems.call(this, 'GET', '/public/listener', {}, qs);
101
+ }
102
+ else {
103
+ const limit = this.getNodeParameter('limit', i);
104
+ responseData = await GenericFunctions_1.replizApiRequest.call(this, 'GET', '/public/listener', {}, { ...qs, page: 1, limit });
105
+ }
106
+ }
107
+ else if (operation === 'create') {
108
+ const contentId = this.getNodeParameter('contentId', i);
109
+ const accountId = this.getNodeParameter('accountId', i);
110
+ responseData = await GenericFunctions_1.replizApiRequest.call(this, 'POST', '/public/listener', { contentId, accountId });
111
+ }
112
+ else if (operation === 'updateStatus') {
113
+ const listenerId = this.getNodeParameter('listenerId', i);
114
+ const status = this.getNodeParameter('status', i);
115
+ await GenericFunctions_1.replizApiRequest.call(this, 'PUT', `/public/listener/${listenerId}/status`, { status });
116
+ responseData = { success: true, listenerId, status };
117
+ }
118
+ else if (operation === 'delete') {
119
+ const listenerId = this.getNodeParameter('listenerId', i);
120
+ await GenericFunctions_1.replizApiRequest.call(this, 'DELETE', `/public/listener/${listenerId}`);
121
+ responseData = { success: true, listenerId };
122
+ }
123
+ returnData.push(...this.helpers.returnJsonArray(responseData));
124
+ }
125
+ catch (error) {
126
+ if (this.continueOnFail()) {
127
+ returnData.push({ json: { error: error.message } });
128
+ continue;
129
+ }
130
+ throw error;
131
+ }
132
+ }
133
+ return [returnData];
134
+ }
135
+ }
136
+ exports.ReplizCommentSync = ReplizCommentSync;
137
+ //# sourceMappingURL=ReplizCommentSync.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReplizCommentSync.node.js","sourceRoot":"","sources":["../../../nodes/ReplizCommentSync/ReplizCommentSync.node.ts"],"names":[],"mappings":";;;AACA,0DAAiF;AAEjF,MAAa,iBAAiB;IAA9B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,4EAA4E;YACzF,QAAQ,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE;YACzC,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YACpD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,WAAW;oBACxB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,mCAAmC,EAAE,MAAM,EAAE,uBAAuB,EAAE;wBACvH,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,qDAAqD,EAAE,MAAM,EAAE,uBAAuB,EAAE;wBACxI,EAA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AAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,oBAAoB,UAAU,EAAE,CAAC,CAAC;oBAC9E,YAAY,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;gBAC9C,CAAC;gBAED,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;YAChE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAAC,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;oBAAC,SAAS;gBAAC,CAAC;gBACxG,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;QACD,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AA5HD,8CA4HC"}
@@ -0,0 +1,4 @@
1
+ <svg width="180" height="180" viewBox="0 0 180 180" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 90C0 40.2944 40.2944 0 90 0C139.706 0 180 40.2944 180 90C180 139.706 139.706 180 90 180C40.2944 180 0 139.706 0 90Z" fill="black"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M115 45C121.63 45 127.989 47.6339 132.678 52.3223C137.366 57.0107 140 63.3696 140 70V110C140 116.63 137.366 122.989 132.678 127.678C127.989 132.366 121.63 135 115 135H45C43.6739 135 42.4021 134.473 41.4645 133.536C40.5268 132.598 40 131.326 40 130V70C40 63.3696 42.6339 57.0107 47.3223 52.3223C52.0107 47.6339 58.3696 45 65 45H115ZM75 80C73.7753 80.0002 72.5933 80.4498 71.6781 81.2636C70.763 82.0774 70.1783 83.1987 70.035 84.415L70 85V95C70.0014 96.2744 70.4894 97.5002 71.3642 98.4268C72.2391 99.3535 73.4348 99.9112 74.707 99.9859C75.9792 100.061 77.2319 99.6466 78.2092 98.8287C79.1864 98.0107 79.8145 96.8505 79.965 95.585L80 95V85C80 83.6739 79.4732 82.4021 78.5355 81.4645C77.5978 80.5268 76.3261 80 75 80ZM105 80C103.674 80 102.402 80.5268 101.464 81.4645C100.527 82.4021 100 83.6739 100 85V95C100 96.3261 100.527 97.5979 101.464 98.5355C102.402 99.4732 103.674 100 105 100C106.326 100 107.598 99.4732 108.536 98.5355C109.473 97.5979 110 96.3261 110 95V85C110 83.6739 109.473 82.4021 108.536 81.4645C107.598 80.5268 106.326 80 105 80Z" fill="white"/>
4
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-repliz",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "description": "n8n community nodes for Repliz API — manage accounts, comments, chats, content, schedules, and platform addons.",
5
5
  "keywords": [
6
6
  "n8n-community-node-package"
@@ -47,6 +47,7 @@
47
47
  "dist/nodes/ReplizAddon/ReplizAddon.node.js",
48
48
  "dist/nodes/ReplizReport/ReplizReport.node.js",
49
49
  "dist/nodes/ReplizAutomation/ReplizAutomation.node.js",
50
+ "dist/nodes/ReplizCommentSync/ReplizCommentSync.node.js",
50
51
  "dist/nodes/ReplizTemplateAutomation/ReplizTemplateAutomation.node.js"
51
52
  ]
52
53
  },