n8n-nodes-charlsondou-social-pro 0.2.21 → 0.2.23
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/SocialProFacebook.credentials.js +24 -1
- package/dist/credentials/SocialProLicense.credentials.js +30 -1
- package/dist/credentials/SocialProLinkedIn.credentials.js +24 -1
- package/dist/credentials/SocialProToken.credentials.js +22 -1
- package/dist/credentials/SocialProTwitter.credentials.js +47 -1
- package/dist/nodes/SocialPro/SocialPro.node.js +225 -1
- package/dist/nodes/SocialPro/facebook.js +185 -1
- package/dist/nodes/SocialPro/linkedin.js +133 -1
- package/dist/nodes/SocialPro/twitter.js +108 -1
- package/dist/nodes/SocialPro/utils.js +57 -1
- package/dist/nodes/ThreadsPublish/ThreadsPublish.node.js +508 -1
- package/package.json +4 -3
|
@@ -1 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SocialProFacebook = void 0;
|
|
4
|
+
class SocialProFacebook {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'socialProFacebook';
|
|
7
|
+
this.displayName = 'Social Pro Facebook/Instagram API';
|
|
8
|
+
this.documentationUrl = 'https://developers.facebook.com/docs/graph-api';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Access Token',
|
|
12
|
+
name: 'accessToken',
|
|
13
|
+
type: 'string',
|
|
14
|
+
typeOptions: {
|
|
15
|
+
password: true,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
required: true,
|
|
19
|
+
description: 'Long-lived User Access Token or Page Access Token',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.SocialProFacebook = SocialProFacebook;
|
|
@@ -1 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SocialProLicense = void 0;
|
|
4
|
+
class SocialProLicense {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'socialProLicense';
|
|
7
|
+
this.displayName = 'Charlsondou API Key';
|
|
8
|
+
this.documentationUrl = 'https://github.com/charlsondou/n8n-nodes-social-pro';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'License Server URL',
|
|
12
|
+
name: 'serverUrl', // Renamed from licenseServerUrl in Node to serverUrl in Credential
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: 'https://your-backend-app.zeabur.app',
|
|
15
|
+
required: true,
|
|
16
|
+
description: 'The base URL of your backend server (e.g. https://api.example.com)',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'License Key',
|
|
20
|
+
name: 'licenseKey',
|
|
21
|
+
type: 'string',
|
|
22
|
+
typeOptions: { password: true },
|
|
23
|
+
default: '',
|
|
24
|
+
required: true,
|
|
25
|
+
description: 'The License Key provided by Charlson Dou',
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.SocialProLicense = SocialProLicense;
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SocialProLinkedIn = void 0;
|
|
4
|
+
class SocialProLinkedIn {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'socialProLinkedIn';
|
|
7
|
+
this.displayName = 'Social Pro LinkedIn API';
|
|
8
|
+
this.documentationUrl = 'https://docs.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Access Token',
|
|
12
|
+
name: 'accessToken',
|
|
13
|
+
type: 'string',
|
|
14
|
+
typeOptions: {
|
|
15
|
+
password: true,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
required: true,
|
|
19
|
+
description: 'OAuth 2.0 Access Token with w_member_social, r_liteprofile permissions',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.SocialProLinkedIn = SocialProLinkedIn;
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SocialProToken = void 0;
|
|
4
|
+
class SocialProToken {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'socialProToken';
|
|
7
|
+
this.displayName = 'Social Pro Token';
|
|
8
|
+
this.documentationUrl = 'https://github.com/charlsondou/n8n-nodes-social-pro';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Access Token',
|
|
12
|
+
name: 'accessToken',
|
|
13
|
+
type: 'string',
|
|
14
|
+
typeOptions: { password: true },
|
|
15
|
+
default: '',
|
|
16
|
+
required: true,
|
|
17
|
+
description: 'The Access Token for the platform (Facebook/Instagram/Threads/LinkedIn/etc.)',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.SocialProToken = SocialProToken;
|
|
@@ -1 +1,47 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SocialProTwitter = void 0;
|
|
4
|
+
class SocialProTwitter {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'socialProTwitter';
|
|
7
|
+
this.displayName = 'Social Pro Twitter API';
|
|
8
|
+
this.documentationUrl = 'https://developer.twitter.com/en/docs/authentication/oauth-1-0a';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Consumer Key',
|
|
12
|
+
name: 'consumerKey',
|
|
13
|
+
type: 'string',
|
|
14
|
+
default: '',
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
displayName: 'Consumer Secret',
|
|
19
|
+
name: 'consumerSecret',
|
|
20
|
+
type: 'string',
|
|
21
|
+
typeOptions: {
|
|
22
|
+
password: true,
|
|
23
|
+
},
|
|
24
|
+
default: '',
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Access Token',
|
|
29
|
+
name: 'accessToken',
|
|
30
|
+
type: 'string',
|
|
31
|
+
default: '',
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Access Token Secret',
|
|
36
|
+
name: 'accessTokenSecret',
|
|
37
|
+
type: 'string',
|
|
38
|
+
typeOptions: {
|
|
39
|
+
password: true,
|
|
40
|
+
},
|
|
41
|
+
default: '',
|
|
42
|
+
required: true,
|
|
43
|
+
},
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.SocialProTwitter = SocialProTwitter;
|
|
@@ -1 +1,225 @@
|
|
|
1
|
-
function _0x55f1(_0x576fa9,_0x2c351b){_0x576fa9=_0x576fa9-(-0x15*0x1f+0x20df+0x5c3*-0x5);const _0x3865a5=_0x4a1f();let _0x94f11f=_0x3865a5[_0x576fa9];if(_0x55f1['QlXBrb']===undefined){var _0x454845=function(_0x281647){const _0x48ba55='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4c2992='',_0x3917c2='',_0xc7a7cd=_0x4c2992+_0x454845;for(let _0x109d3d=-0xc7f*-0x2+0x18da+-0x37*0xe8,_0x3d7172,_0x3462d5,_0x1aa62a=-0x1d13+0x1f40+0x22d*-0x1;_0x3462d5=_0x281647['charAt'](_0x1aa62a++);~_0x3462d5&&(_0x3d7172=_0x109d3d%(0x4*-0x66e+0x1876+0x146)?_0x3d7172*(-0x4e6+0x215*-0x1+0x3*0x269)+_0x3462d5:_0x3462d5,_0x109d3d++%(-0x5bb+0x1ef4+-0xef*0x1b))?_0x4c2992+=_0xc7a7cd['charCodeAt'](_0x1aa62a+(0x71+-0x9e*0x25+0x166f*0x1))-(0xe*-0x185+-0x1*-0xd0a+0x1*0x846)!==0x16c9+-0x3*-0x52a+-0x29*0xef?String['fromCharCode'](0x1*-0x647+-0x45d*-0x5+-0xe8b&_0x3d7172>>(-(-0x3*-0x886+-0x1*-0xabb+-0x244b)*_0x109d3d&0x1e64+-0x1*0x1559+-0x905)):_0x109d3d:0xf8e*0x1+0x1a7d+-0x2a0b){_0x3462d5=_0x48ba55['indexOf'](_0x3462d5);}for(let _0x16a1b6=-0x17c2+0x107*-0x5+0x1ce5,_0x5c4467=_0x4c2992['length'];_0x16a1b6<_0x5c4467;_0x16a1b6++){_0x3917c2+='%'+('00'+_0x4c2992['charCodeAt'](_0x16a1b6)['toString'](-0xaf5+0x1*0x238+0x8cd))['slice'](-(-0x1970+0x3*0x565+0x943));}return decodeURIComponent(_0x3917c2);};_0x55f1['qyDtCr']=_0x454845,_0x55f1['BbBgKN']={},_0x55f1['QlXBrb']=!![];}const _0x9ba101=_0x3865a5[-0x1dc9+-0x201a+-0x3de3*-0x1],_0x583a75=_0x576fa9+_0x9ba101,_0x2f110b=_0x55f1['BbBgKN'][_0x583a75];if(!_0x2f110b){const _0x3d07c2=function(_0x34c71a){this['hhgIky']=_0x34c71a,this['wfUTtv']=[-0xa83+0x3*0xb5+-0x7*-0x133,0x14d4*0x1+0x1d12+-0x31e6,-0x25f4+0x1801+0xdf3*0x1],this['oFrlPm']=function(){return'newState';},this['OirBpz']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['ptxHdm']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x3d07c2['prototype']['TZsEnt']=function(){const _0x4fb4a7=new RegExp(this['OirBpz']+this['ptxHdm']),_0x5d32f2=_0x4fb4a7['test'](this['oFrlPm']['toString']())?--this['wfUTtv'][0x2525+0x11f9+-0x371d*0x1]:--this['wfUTtv'][-0x113f+-0x1edc+0x301b];return this['xHNcmL'](_0x5d32f2);},_0x3d07c2['prototype']['xHNcmL']=function(_0x3c17de){if(!Boolean(~_0x3c17de))return _0x3c17de;return this['URPruS'](this['hhgIky']);},_0x3d07c2['prototype']['URPruS']=function(_0x31ba43){for(let _0x30de4b=0x2*-0xdf9+0x1c6+0x1a2c,_0x3afe0=this['wfUTtv']['length'];_0x30de4b<_0x3afe0;_0x30de4b++){this['wfUTtv']['push'](Math['round'](Math['random']())),_0x3afe0=this['wfUTtv']['length'];}return _0x31ba43(this['wfUTtv'][0x160b+0x1f*0x4d+-0x1f5e]);},new _0x3d07c2(_0x55f1)['TZsEnt'](),_0x94f11f=_0x55f1['qyDtCr'](_0x94f11f),_0x55f1['BbBgKN'][_0x583a75]=_0x94f11f;}else _0x94f11f=_0x2f110b;return _0x94f11f;}const _0xc8276a=_0x55f1;function _0x4a1f(){const _0x2e2ce9=['B3zLCIbPBwfNzq','twjLsem','CxvkDLy','BevPzMC','lI90D2L0DgvY','Aw5ZDgfNCMfT','nda5oteWn3vvELv6wa','ugnrBha','CgCIxq','zMrWD3a','Aw9UrxjYB3i','vhDPDhrLCI9yla','neffD0fSBq','zxHLy3v0zq','l3jLzwXZ','yMDlC1e','v2PHywG','BgvUz3rO','tgLUA2vKsw4','x19LC01VzhvSzq','sw1Hz2u','C3qGDg8Gy3jLyq','uKjKuKu','vhHcrvG','C3rYAw5N','tgDpq3m','r0n4uLu','DNrSy1O','z2v0tM9Kzq','Aw5RzwrjBG','BwvZC2fNzq','qxj0AwnSzsaOta','ANnVBG','vNrHtg8','mJy0uxryt0Tr','mtyWDxDItNrp','D2Dwr2S','yxPgAuO','rM9Yifr3Axr0zq','zxrcBfu','CLP0rKW','zsbvuKW','s2f4s0i','igfUzcbmAw5Rzq','C29JAwfSuhjV','shfmAMu','q0T2vNK','uKrLsfe','EefOuu8','q29UDgvUDcaOva','yM9VAW','DNPZA04','qxjYyxKGB2yGAq','AxrLBuLUzgv4','rMfJzwjVB2S','CIWGDxnHz2uGBW','Aw5NlG','z2v0tM9KzvbHCG','zejXyvC','C29JAwfSuhjVva','wKPbqvu','u29JAwfSifbYBW','CgXHDgzVCM0','DxLguvm','ywnLyM9VAYWGsq','y29UDgvUDa','ruHbt3y','shjuELy','CgXVywqUieuUzW','vw5RBM93BIbWBa','C29JAwfSuhjVta','uxz1yMi','Dg9tDhjPBMC','A1LRAK8','BgLUA2vKAw4','y29UDgv4Da','Evzer04','rwzJzMq','ywnLyM9VAW','twvKAweGrMLSzq','t3b0Aw9UywWGyW','rMLXA1q','rNHIuvO','vMLKzw8VuMvLBa','DNzZEva','u29JAwfSuhjV','C2vHCMnO','ndu0nZuXB09XAvLy','CLjXqLa','uKPeA2K','qxj0AwnSzsaOva','B2zUzgC','zLPvufy','DgHLihbVC3qUia','u0TAqKy','AgfUzgXLrMfJzq','wfvrtKq','ELjwC0u','D2L0DgvY','z2v0sw5WDxreyq','D2DYz3O','ywzbDLm','uMvLBhm','mtK1mMDZzKvYEG','B3b0Aw9UCW','B0f2qM8','mZaYotuWq3v0t2nd','Aw5Rl1rLEhqP','DhL2Cha','mta4zhbjvKTs','y29UC3rYDwn0BW','D1jSweS','tuL0zNy','u3bXt3O','vgHLihrLEhqGyW','rMDQsem','lI9MywnLyM9VAW','B3n3twG','u1jsBNe','q1jzr0i','q292zxiGsw1HzW','CYaOvvjmCYK','vxbsCxa','BNn0ywDYyw0Sia','CKDTyuW','ifvsthmGDg8GDq','yLf5A2K','DhDPDhrLCG','vMLKzw8','DfbrtxG','DgvY','zxj0Eq','wxr6yva','CuXwwu8','q2fYB3vZzwW','Du9oy3m','B3zVz3u','EMTQzLa','ug9ZDcbuExbL','zwfKihnWBgL0Da','AwnQrvC','mta1ndi2swXurLnp','DhjHBNnMB3jT','ExrituK','yxbWBhK','qxj0AwnSzq','BJHUlxDVCMTMBa','EK1Oz2K','z3nSBhC','r3rmwvm','vhfxzwe','C090q08','A2HqC2C','rfLmC2O','y29UDgLUDwvpBG','lIbBiMH0DhbZoG','BMXQB00','t0ThD2G','y2fSBa','zIaIpt09iIb0CG','y29Tl2LTzZeUAG','zMfJzwjVB2S','mteWntK2B05XtLHo','t291qu4','BLDzsgq','q2fYB3vZzwWP','ndi5ndrnuwzuEMu','qM9JBKm','BwvKAwfFzMLSzq','ChvZAa','Bvf6yMu','AgfUzgXLvhDPDa','EvDsqKy','vxDVCKq','vwfRvey','vhDPDhrLCIaVia','BuXzCfu','tgLUAYbvuKW','AwXmzg8','zMe6C2HHCMuTyq','BwfNzs92AwrLBW','q0HorNy','v053vLe','AuzzuKe','mJK0n0nzyMfcDa','EfDZrNq','rendCfG','z2Djwgm','swnHvgu','Cw9Ts2e','BNrLBNqGDg8GrG','ChfcqMK','rMfPBa','wLbfufu','BwfPBG','qNfHDge','yxjLicHMB3iGqq','tgLUAYb0BYbZAa','DhLWzq','y292zxjFDxjS','igzVCIb2AwrLBW','lY9LEgfTCgXLlG','C29JAwfSuhjVrG','y1HztvO','BeXithy','kcGOlISPkYKRkq','AgDsuK4','y0f0zeG','sw5ZDgfNCMfT','y0PktKG','Aejurgq','lI9SAw5RzwrPBG'];_0x4a1f=function(){return _0x2e2ce9;};return _0x4a1f();}(function(_0x3649a0,_0x8fd246){const _0x5db408=_0x55f1,_0x4dbe63=_0x3649a0();while(!![]){try{const _0x58dd6f=-parseInt(_0x5db408(0x1c1))/(-0x1a*0x115+0x368*-0x4+-0x1*-0x29c3)*(parseInt(_0x5db408(0x1ff))/(0x3b4+-0x73a+0x388))+-parseInt(_0x5db408(0x1f9))/(0x39*-0xad+0x47*0x8+0x2450)+parseInt(_0x5db408(0x1c5))/(-0x959*0x1+-0x40f+0x35b*0x4)+-parseInt(_0x5db408(0x189))/(0x16d*-0x5+0x661*-0x2+0x13e8)*(-parseInt(_0x5db408(0x18c))/(0x3e2+0x25fd+-0x29d9))+parseInt(_0x5db408(0x1d7))/(-0x7a5+0x1ee3*0x1+-0x1737)*(parseInt(_0x5db408(0x186))/(-0x15+0x1ca2*-0x1+-0x1*-0x1cbf))+-parseInt(_0x5db408(0x1ac))/(0xe3*0x11+-0x103d+0x133)*(-parseInt(_0x5db408(0x216))/(-0x1a32+-0x1af*-0x2+-0x1*-0x16de))+-parseInt(_0x5db408(0x24a))/(0x1*-0x434+-0x1f00+0x233f)*(-parseInt(_0x5db408(0x215))/(-0x4*0x106+-0x1*0x1ef8+0x1ac*0x15));if(_0x58dd6f===_0x8fd246)break;else _0x4dbe63['push'](_0x4dbe63['shift']());}catch(_0x10e6b1){_0x4dbe63['push'](_0x4dbe63['shift']());}}}(_0x4a1f,-0x561b*0xf+0x51ef7+0xacf83));const _0x215cca=(function(){const _0x69d936=_0x55f1,_0x5a95e8={'vtlcZ':function(_0x34a2ff,_0x2961bc){return _0x34a2ff!==_0x2961bc;},'zRVsE':function(_0x11d7f0,_0xfc51b3){return _0x11d7f0===_0xfc51b3;},'Qvubb':_0x69d936(0x1a3)};let _0x3ad745=!![];return function(_0x4a4146,_0x20c608){const _0x155251=_0x69d936,_0x4d11f1={'oAvBo':function(_0x258170,_0x332c31){const _0xff2aa7=_0x55f1;return _0x5a95e8[_0xff2aa7(0x20e)](_0x258170,_0x332c31);},'yVDGN':_0x155251(0x21a)};if(_0x5a95e8[_0x155251(0x254)](_0x5a95e8[_0x155251(0x23a)],_0x5a95e8[_0x155251(0x23a)])){const _0x4c64fd=_0x3ad745?function(){const _0x3a6884=_0x155251;if(_0x20c608){if(_0x4d11f1[_0x3a6884(0x188)](_0x4d11f1[_0x3a6884(0x23f)],_0x3a6884(0x21a))){const _0x527f23=_0x45fd1a[_0x3a6884(0x1af)](_0x5d0b93,arguments);return _0x2633dd=null,_0x527f23;}else{const _0x2f156a=_0x20c608[_0x3a6884(0x1af)](_0x4a4146,arguments);return _0x20c608=null,_0x2f156a;}}}:function(){};return _0x3ad745=![],_0x4c64fd;}else _0x27fe1a[_0x155251(0x1c8)]({'json':this[_0x155251(0x256)+'ta'](_0x429c11)[-0x352+0x1a5c+-0x170a][_0x155251(0x213)],'error':_0x4e09b9[_0x155251(0x211)]});};}()),_0x1c5af5=_0x215cca(this,function(){const _0x5d3270=_0x55f1;return _0x1c5af5[_0x5d3270(0x23b)]()[_0x5d3270(0x249)](_0x5d3270(0x1ec)+'+$')['toString']()[_0x5d3270(0x18d)+'r'](_0x1c5af5)[_0x5d3270(0x249)]('(((.+)+)+)'+'+$');});_0x1c5af5();'use strict';Object['defineProp'+_0xc8276a(0x1a2)](exports,_0xc8276a(0x206),{'value':!![]}),exports[_0xc8276a(0x248)]=void(0x5*-0x3c1+-0x17*-0x94+0x579);const n8n_workflow_1=require(_0xc8276a(0x1b1)+'ow'),facebook_1=require(_0xc8276a(0x193)),twitter_1=require(_0xc8276a(0x1f7)),linkedin_1=require(_0xc8276a(0x1f2));class SocialPro{constructor(){const _0x32ad50=_0xc8276a,_0x345f75={'gsllw':_0x32ad50(0x230),'afAvS':_0x32ad50(0x1d2)+'lt','SpqOz':_0x32ad50(0x1ad),'fZUXD':'Publish\x20co'+_0x32ad50(0x1dd)+_0x32ad50(0x233)+_0x32ad50(0x19a)+_0x32ad50(0x1fe)+'\x20and\x20Linke'+'dIn','ytHMI':_0x32ad50(0x1e1),'yWRBF':_0x32ad50(0x1e9)+_0x32ad50(0x241),'zkjfP':_0x32ad50(0x1c0),'sOtCO':_0x32ad50(0x1f8),'ggIXc':_0x32ad50(0x22e)+_0x32ad50(0x255),'UworD':_0x32ad50(0x19e),'fZUPV':_0x32ad50(0x239)+_0x32ad50(0x210),'FiqkT':_0x32ad50(0x23d),'nyxwh':'Platform','RBdRE':_0x32ad50(0x231),'CHNFv':_0x32ad50(0x187),'UakTF':_0x32ad50(0x1ef),'BOpcd':_0x32ad50(0x205),'xNnWI':_0x32ad50(0x1ce)+'X','SKZBF':_0x32ad50(0x1a9),'cAtdH':'type','kYkjO':_0x32ad50(0x212)+'ink/Text)','OouAN':_0x32ad50(0x1b0),'quJvV':_0x32ad50(0x207),'FxbQZ':_0x32ad50(0x19f),'VtaLo':_0x32ad50(0x1a5),'nljoM':_0x32ad50(0x246)+'s','khPsg':_0x32ad50(0x224)+'ext)','HMwaP':_0x32ad50(0x234),'qLVYO':_0x32ad50(0x20b),'cJJNH':_0x32ad50(0x1d0),'Wjaah':_0x32ad50(0x1e4)+_0x32ad50(0x1e3)+'rticle\x20or\x20'+'Carousel)','uyFQS':_0x32ad50(0x242)+_0x32ad50(0x198),'rZtFL':'media_file'+'s','wRlXK':'json','iFYRA':_0x32ad50(0x227)+_0x32ad50(0x1d3)+_0x32ad50(0x19c)+_0x32ad50(0x237)+_0x32ad50(0x1ba)+_0x32ad50(0x1e8)+_0x32ad50(0x1bf)+_0x32ad50(0x1fb)};this['descriptio'+'n']={'displayName':_0x345f75['gsllw'],'name':'socialPro','icon':_0x345f75[_0x32ad50(0x258)],'group':[_0x345f75[_0x32ad50(0x190)]],'version':0x1,'description':_0x345f75['fZUXD'],'defaults':{'name':_0x345f75[_0x32ad50(0x1b3)]},'inputs':[_0x345f75[_0x32ad50(0x1ae)]],'outputs':[_0x345f75['ytHMI']],'credentials':[{'name':_0x345f75[_0x32ad50(0x1cb)],'required':!![],'displayOptions':{'show':{'platform':[_0x345f75['zkjfP'],_0x345f75[_0x32ad50(0x1b6)]]}}},{'name':_0x345f75[_0x32ad50(0x1da)],'required':!![],'displayOptions':{'show':{'platform':[_0x345f75['UworD']]}}},{'name':_0x345f75[_0x32ad50(0x24f)],'required':!![],'displayOptions':{'show':{'platform':[_0x345f75[_0x32ad50(0x244)]]}}}],'properties':[{'displayName':_0x345f75['nyxwh'],'name':_0x345f75[_0x32ad50(0x209)],'type':_0x345f75[_0x32ad50(0x1d4)],'options':[{'name':'Facebook','value':_0x345f75[_0x32ad50(0x1a8)]},{'name':_0x345f75[_0x32ad50(0x1cd)],'value':_0x345f75[_0x32ad50(0x1b6)]},{'name':_0x345f75['BOpcd'],'value':_0x345f75[_0x32ad50(0x244)]},{'name':_0x345f75['xNnWI'],'value':_0x345f75[_0x32ad50(0x1cc)]}],'default':_0x32ad50(0x1c0),'noDataExpression':!![]},{'displayName':_0x345f75['SKZBF'],'name':_0x345f75[_0x32ad50(0x1ee)],'type':_0x32ad50(0x187),'displayOptions':{'show':{'platform':[_0x345f75[_0x32ad50(0x1a8)]]}},'options':[{'name':_0x345f75[_0x32ad50(0x23c)],'value':_0x345f75[_0x32ad50(0x1c2)]},{'name':_0x32ad50(0x207),'value':_0x345f75['quJvV']},{'name':_0x345f75[_0x32ad50(0x245)],'value':_0x32ad50(0x19f)},{'name':_0x32ad50(0x185),'value':_0x32ad50(0x185)},{'name':_0x345f75[_0x32ad50(0x214)],'value':_0x345f75[_0x32ad50(0x214)]}],'default':_0x345f75['OouAN'],'description':'Type\x20of\x20po'+_0x32ad50(0x208)+'te'},{'displayName':_0x345f75[_0x32ad50(0x251)],'name':_0x345f75[_0x32ad50(0x1ee)],'type':_0x345f75[_0x32ad50(0x1d4)],'displayOptions':{'show':{'platform':[_0x345f75[_0x32ad50(0x244)]]}},'options':[{'name':_0x32ad50(0x24d)+'ext/Link)','value':_0x32ad50(0x1b0)},{'name':_0x345f75['quJvV'],'value':_0x32ad50(0x207)},{'name':_0x345f75['FxbQZ'],'value':_0x32ad50(0x19f)}],'default':_0x32ad50(0x1b0)},{'displayName':_0x345f75[_0x32ad50(0x251)],'name':_0x32ad50(0x1e5),'type':_0x345f75['CHNFv'],'displayOptions':{'show':{'platform':[_0x345f75['sOtCO']]}},'options':[{'name':_0x345f75[_0x32ad50(0x1f5)],'value':_0x345f75['quJvV']},{'name':_0x345f75[_0x32ad50(0x1bb)],'value':_0x345f75[_0x32ad50(0x245)]},{'name':_0x345f75[_0x32ad50(0x214)],'value':_0x345f75[_0x32ad50(0x214)]}],'default':_0x345f75[_0x32ad50(0x1f5)]},{'displayName':_0x345f75[_0x32ad50(0x1b7)],'name':_0x345f75['HMwaP'],'type':_0x345f75[_0x32ad50(0x1a4)],'typeOptions':{'rows':0x4},'default':'','description':'The\x20text\x20c'+'ontent\x20of\x20'+_0x32ad50(0x250)+_0x32ad50(0x219)+_0x32ad50(0x22a)+_0x32ad50(0x1be)+'iggers\x20thr'+_0x32ad50(0x1aa)+_0x32ad50(0x22b)},{'displayName':_0x345f75[_0x32ad50(0x1f0)],'name':'link','type':_0x345f75[_0x32ad50(0x1a4)],'default':'','displayOptions':{'show':{'platform':[_0x345f75[_0x32ad50(0x1a8)],_0x32ad50(0x23d)],'type':[_0x345f75[_0x32ad50(0x1c2)],_0x345f75[_0x32ad50(0x214)]]}},'description':_0x345f75[_0x32ad50(0x203)]},{'displayName':_0x345f75[_0x32ad50(0x232)],'name':_0x345f75[_0x32ad50(0x21b)],'type':_0x345f75[_0x32ad50(0x18e)],'default':'[]','description':_0x345f75[_0x32ad50(0x1d6)]},{'displayName':_0x32ad50(0x197)+_0x32ad50(0x21c),'name':_0x32ad50(0x1e6),'type':_0x345f75[_0x32ad50(0x1a4)],'default':'','displayOptions':{'show':{'platform':[_0x32ad50(0x1c0),_0x345f75[_0x32ad50(0x1b6)]],'type':[_0x32ad50(0x185),_0x345f75[_0x32ad50(0x245)]]}},'description':_0x32ad50(0x243)+_0x32ad50(0x1f3)+_0x32ad50(0x1e7)+_0x32ad50(0x201)}]};}async[_0xc8276a(0x200)](){const _0x41218a=_0xc8276a,_0x124d41={'fdpwp':'(((.+)+)+)'+'+$','ilLdo':_0x41218a(0x230),'RDeHQ':_0x41218a(0x21f),'wgrgz':_0x41218a(0x1ad),'HqLje':'Publish\x20co'+_0x41218a(0x1dd)+_0x41218a(0x233)+_0x41218a(0x19a)+_0x41218a(0x1fe)+_0x41218a(0x21e)+'dIn','WGqGo':'main','lEifg':'socialProF'+_0x41218a(0x241),'oswMh':'facebook','DCCpX':'instagram','MItfv':_0x41218a(0x22e)+_0x41218a(0x255),'IcaTe':_0x41218a(0x19e),'tPQMx':_0x41218a(0x23d),'icjEW':_0x41218a(0x231),'RJDki':_0x41218a(0x187),'TJxZr':_0x41218a(0x229),'nWYHd':_0x41218a(0x1ef),'mPupv':'LinkedIn','XUQND':_0x41218a(0x1ce)+'X','TqWea':'type','ZPEPU':_0x41218a(0x212)+_0x41218a(0x18a),'hgRRN':_0x41218a(0x1b0),'Bqata':'Image','vzskN':'Video','rGmaL':_0x41218a(0x185),'SRRnq':_0x41218a(0x1a5),'ZJAAU':'Type\x20of\x20po'+_0x41218a(0x208)+'te','pqBBi':'Post\x20Type','GCxRU':'Article\x20(T'+'ext/Link)','dBqaW':_0x41218a(0x224)+'ext)','HrTzV':_0x41218a(0x234),'uONcs':_0x41218a(0x191)+'ontent\x20of\x20'+_0x41218a(0x250)+_0x41218a(0x219)+_0x41218a(0x22a)+_0x41218a(0x1be)+'iggers\x20thr'+'ead\x20splitt'+_0x41218a(0x22b),'cXYMZ':_0x41218a(0x1d0),'UpRqp':'link','xWsFt':_0x41218a(0x1e4)+'are\x20(for\x20A'+'rticle\x20or\x20'+_0x41218a(0x1c4),'KaxKB':'Media\x20File'+'s\x20(URLs)','GtLYS':_0x41218a(0x1c7)+'s','ovogu':_0x41218a(0x213),'wgVGk':_0x41218a(0x227)+_0x41218a(0x1d3)+_0x41218a(0x19c)+_0x41218a(0x237)+'.\x20[\x22https:'+_0x41218a(0x1e8)+_0x41218a(0x1bf)+_0x41218a(0x1fb),'BkSYe':_0x41218a(0x1e6),'OKGwh':_0x41218a(0x20b),'xAhQO':_0x41218a(0x243)+_0x41218a(0x1f3)+'\x20for\x20video'+_0x41218a(0x201),'vvsyP':function(_0x52c077,_0x57a79b){return _0x52c077<_0x57a79b;},'WNwVQ':function(_0x4e7820,_0x38a28e){return _0x4e7820!==_0x38a28e;},'zMhgi':'rRqBP','BocnC':function(_0x1f44eb,_0x2dee57){return _0x1f44eb===_0x2dee57;},'tyvpp':_0x41218a(0x221),'PcQlp':_0x41218a(0x240),'MbeHC':function(_0x1a2cc8,_0x36b092){return _0x1a2cc8===_0x36b092;},'TxBEX':function(_0x18a662,_0x4afd97){return _0x18a662===_0x4afd97;},'EHAOv':function(_0x19ac02,_0x38714e){return _0x19ac02===_0x38714e;},'lLHLv':function(_0x5564b5,_0xfec2f1){return _0x5564b5===_0xfec2f1;},'mQzbe':_0x41218a(0x24e),'bQyki':_0x41218a(0x1f1),'LgOCs':function(_0x5f5bd5,_0x49cd89){return _0x5f5bd5===_0x49cd89;},'bgKsQ':_0x41218a(0x1cf),'azFiJ':function(_0x182537,_0x4b709){return _0x182537===_0x4b709;},'qomKa':_0x41218a(0x192),'fwOBg':function(_0x171028,_0x2a576f){return _0x171028===_0x2a576f;},'DYLsj':_0x41218a(0x196)},_0x2a305d=this['getInputDa'+'ta'](),_0x2cb8e6=[];for(let _0x3897e4=0x28c*-0x6+-0x1*0x21e5+0x312d;_0x124d41[_0x41218a(0x247)](_0x3897e4,_0x2a305d[_0x41218a(0x204)]);_0x3897e4++){if(_0x124d41[_0x41218a(0x1d5)](_0x41218a(0x24b),_0x124d41[_0x41218a(0x1b2)])){if(this[_0x41218a(0x1b9)+_0x41218a(0x1df)]())_0x2b6bb6['push']({'json':this[_0x41218a(0x256)+'ta'](_0x49301d)[-0x349+-0xf*0x269+0x10*0x277][_0x41218a(0x213)],'error':_0x2e9469[_0x41218a(0x211)]});else{_0x2ee6cc['context']&&(_0x5ec4cd[_0x41218a(0x23e)]['itemIndex']=_0x10ff3b);throw _0x55a23f;}}else{const _0x4c7a52=_0x2a305d[_0x3897e4],_0x5150a4=this[_0x41218a(0x22c)+'ameter'](_0x124d41[_0x41218a(0x1ab)],_0x3897e4,'');try{if(_0x124d41[_0x41218a(0x1c6)](_0x124d41[_0x41218a(0x18b)],_0x124d41[_0x41218a(0x1fa)])){_0x4ba35d[_0x41218a(0x23e)]&&(_0x437081['context'][_0x41218a(0x228)]=_0x604a60);throw _0x10a3ed;}else{let _0x563475;if(_0x124d41[_0x41218a(0x1f4)](_0x5150a4,_0x124d41['oswMh'])||_0x124d41[_0x41218a(0x20a)](_0x5150a4,_0x124d41['DCCpX']))_0x563475=await facebook_1[_0x41218a(0x252)+_0x41218a(0x225)]['call'](this,_0x3897e4,_0x4c7a52);else{if(_0x124d41[_0x41218a(0x235)](_0x5150a4,_0x124d41[_0x41218a(0x1db)]))_0x563475=await twitter_1[_0x41218a(0x1ca)+_0x41218a(0x1a1)][_0x41218a(0x1bd)](this,_0x3897e4,_0x4c7a52);else{if(_0x124d41['MbeHC'](_0x5150a4,_0x41218a(0x23d)))_0x563475=await linkedin_1['handleLink'+'edIn']['call'](this,_0x3897e4,_0x4c7a52);else{if(_0x124d41[_0x41218a(0x1eb)](_0x124d41[_0x41218a(0x1c9)],_0x124d41[_0x41218a(0x19d)]))return _0x429897[_0x41218a(0x23b)]()[_0x41218a(0x249)](EDFLqz['fdpwp'])[_0x41218a(0x23b)]()['constructo'+'r'](_0x1078bb)[_0x41218a(0x249)](EDFLqz[_0x41218a(0x1fc)]);else throw new n8n_workflow_1['NodeOperat'+(_0x41218a(0x1fd))](this[_0x41218a(0x20f)](),_0x41218a(0x238)+'atform:\x20'+_0x5150a4,{'itemIndex':_0x3897e4});}}}_0x2cb8e6[_0x41218a(0x1c8)]({'json':_0x563475});}}catch(_0x4baa6f){if(_0x124d41[_0x41218a(0x20c)](_0x124d41[_0x41218a(0x202)],_0x124d41[_0x41218a(0x202)])){if(this[_0x41218a(0x1b9)+_0x41218a(0x1df)]())_0x124d41[_0x41218a(0x218)](_0x124d41[_0x41218a(0x1dc)],_0x124d41[_0x41218a(0x1dc)])?_0x2cb8e6[_0x41218a(0x1c8)]({'json':this[_0x41218a(0x256)+'ta'](_0x3897e4)[-0x1fe7*-0x1+-0x23*0xd7+-0x282]['json'],'error':_0x4baa6f['message']}):this['descriptio'+'n']={'displayName':_0x124d41[_0x41218a(0x1d1)],'name':_0x124d41[_0x41218a(0x222)],'icon':'fa:share-a'+'lt','group':[_0x124d41[_0x41218a(0x257)]],'version':0x1,'description':_0x124d41[_0x41218a(0x220)],'defaults':{'name':_0x124d41['ilLdo']},'inputs':[_0x41218a(0x1e1)],'outputs':[_0x124d41['WGqGo']],'credentials':[{'name':_0x124d41[_0x41218a(0x1f6)],'required':!![],'displayOptions':{'show':{'platform':[_0x124d41[_0x41218a(0x194)],_0x124d41[_0x41218a(0x1d9)]]}}},{'name':_0x124d41[_0x41218a(0x18f)],'required':!![],'displayOptions':{'show':{'platform':[_0x124d41['IcaTe']]}}},{'name':'socialProL'+'inkedIn','required':!![],'displayOptions':{'show':{'platform':[_0x124d41[_0x41218a(0x1a0)]]}}}],'properties':[{'displayName':'Platform','name':_0x124d41[_0x41218a(0x1ab)],'type':_0x124d41[_0x41218a(0x24c)],'options':[{'name':_0x124d41['TJxZr'],'value':_0x124d41[_0x41218a(0x194)]},{'name':_0x124d41[_0x41218a(0x1c3)],'value':_0x124d41[_0x41218a(0x1d9)]},{'name':_0x124d41['mPupv'],'value':_0x41218a(0x23d)},{'name':_0x124d41[_0x41218a(0x253)],'value':_0x124d41[_0x41218a(0x1db)]}],'default':_0x41218a(0x1c0),'noDataExpression':!![]},{'displayName':_0x41218a(0x1a9),'name':_0x124d41[_0x41218a(0x1b5)],'type':_0x124d41['RJDki'],'displayOptions':{'show':{'platform':[_0x41218a(0x1c0)]}},'options':[{'name':_0x124d41[_0x41218a(0x1e0)],'value':_0x124d41[_0x41218a(0x1ed)]},{'name':_0x124d41[_0x41218a(0x1e2)],'value':_0x124d41['Bqata']},{'name':_0x124d41[_0x41218a(0x226)],'value':_0x124d41[_0x41218a(0x226)]},{'name':_0x124d41['rGmaL'],'value':_0x124d41[_0x41218a(0x19b)]},{'name':_0x124d41[_0x41218a(0x195)],'value':_0x124d41['SRRnq']}],'default':_0x41218a(0x1b0),'description':_0x124d41[_0x41218a(0x22f)]},{'displayName':_0x124d41[_0x41218a(0x1de)],'name':_0x124d41[_0x41218a(0x1b5)],'type':_0x41218a(0x187),'displayOptions':{'show':{'platform':[_0x124d41[_0x41218a(0x1a0)]]}},'options':[{'name':_0x124d41[_0x41218a(0x20d)],'value':'Article'},{'name':_0x41218a(0x207),'value':_0x41218a(0x207)},{'name':_0x124d41[_0x41218a(0x226)],'value':_0x41218a(0x19f)}],'default':_0x124d41[_0x41218a(0x1ed)]},{'displayName':_0x124d41[_0x41218a(0x1de)],'name':_0x124d41[_0x41218a(0x1b5)],'type':_0x41218a(0x187),'displayOptions':{'show':{'platform':[_0x124d41[_0x41218a(0x1d9)]]}},'options':[{'name':_0x41218a(0x207),'value':_0x124d41[_0x41218a(0x1e2)]},{'name':_0x41218a(0x246)+'s','value':_0x124d41[_0x41218a(0x226)]},{'name':_0x124d41[_0x41218a(0x195)],'value':_0x124d41[_0x41218a(0x195)]}],'default':_0x124d41[_0x41218a(0x1e2)]},{'displayName':_0x124d41[_0x41218a(0x22d)],'name':_0x124d41[_0x41218a(0x236)],'type':_0x41218a(0x20b),'typeOptions':{'rows':0x4},'default':'','description':_0x124d41[_0x41218a(0x1a6)]},{'displayName':_0x124d41[_0x41218a(0x1ea)],'name':_0x124d41[_0x41218a(0x199)],'type':'string','default':'','displayOptions':{'show':{'platform':[_0x124d41[_0x41218a(0x194)],_0x124d41['tPQMx']],'type':[_0x124d41[_0x41218a(0x1ed)],_0x124d41[_0x41218a(0x195)]]}},'description':_0x124d41[_0x41218a(0x1d8)]},{'displayName':_0x124d41[_0x41218a(0x21d)],'name':_0x124d41[_0x41218a(0x1b4)],'type':_0x124d41[_0x41218a(0x1a7)],'default':'[]','description':_0x124d41[_0x41218a(0x217)]},{'displayName':_0x41218a(0x197)+'e\x20URL','name':_0x124d41['BkSYe'],'type':_0x124d41[_0x41218a(0x1bc)],'default':'','displayOptions':{'show':{'platform':[_0x124d41[_0x41218a(0x194)],_0x124d41[_0x41218a(0x1d9)]],'type':[_0x124d41[_0x41218a(0x19b)],_0x124d41['vzskN']]}},'description':_0x124d41[_0x41218a(0x223)]}]};else{if(_0x4baa6f['context']){if(_0x124d41['fwOBg'](_0x124d41[_0x41218a(0x1b8)],_0x124d41['DYLsj']))_0x4baa6f['context'][_0x41218a(0x228)]=_0x3897e4;else{if(_0x15d2ec){const _0x426b2a=_0x30650b[_0x41218a(0x1af)](_0x10a6a0,arguments);return _0x3c977c=null,_0x426b2a;}}}throw _0x4baa6f;}}else _0x2f966e[_0x41218a(0x23e)][_0x41218a(0x228)]=_0xb554fd;}}}return[_0x2cb8e6];}}exports[_0xc8276a(0x248)]=SocialPro;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SocialPro = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const facebook_1 = require("./facebook");
|
|
6
|
+
const twitter_1 = require("./twitter");
|
|
7
|
+
const linkedin_1 = require("./linkedin");
|
|
8
|
+
class SocialPro {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.description = {
|
|
11
|
+
displayName: 'Social Pro',
|
|
12
|
+
name: 'socialPro',
|
|
13
|
+
icon: 'fa:share-alt',
|
|
14
|
+
group: ['transform'],
|
|
15
|
+
version: 1,
|
|
16
|
+
description: 'Publish content to Facebook, Instagram, Twitter/X, and LinkedIn',
|
|
17
|
+
defaults: {
|
|
18
|
+
name: 'Social Pro',
|
|
19
|
+
},
|
|
20
|
+
inputs: ['main'],
|
|
21
|
+
outputs: ['main'],
|
|
22
|
+
credentials: [
|
|
23
|
+
{
|
|
24
|
+
name: 'socialProFacebook',
|
|
25
|
+
required: true,
|
|
26
|
+
displayOptions: {
|
|
27
|
+
show: {
|
|
28
|
+
platform: [
|
|
29
|
+
'facebook',
|
|
30
|
+
'instagram',
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'socialProTwitter',
|
|
37
|
+
required: true,
|
|
38
|
+
displayOptions: {
|
|
39
|
+
show: {
|
|
40
|
+
platform: [
|
|
41
|
+
'twitter',
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'socialProLinkedIn',
|
|
48
|
+
required: true,
|
|
49
|
+
displayOptions: {
|
|
50
|
+
show: {
|
|
51
|
+
platform: [
|
|
52
|
+
'linkedin',
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
properties: [
|
|
59
|
+
// ----------------------------------
|
|
60
|
+
// Platform Selection
|
|
61
|
+
// ----------------------------------
|
|
62
|
+
{
|
|
63
|
+
displayName: 'Platform',
|
|
64
|
+
name: 'platform',
|
|
65
|
+
type: 'options',
|
|
66
|
+
options: [
|
|
67
|
+
{
|
|
68
|
+
name: 'Facebook',
|
|
69
|
+
value: 'facebook',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'Instagram',
|
|
73
|
+
value: 'instagram',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'LinkedIn',
|
|
77
|
+
value: 'linkedin',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'Twitter / X',
|
|
81
|
+
value: 'twitter',
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
default: 'facebook',
|
|
85
|
+
noDataExpression: true,
|
|
86
|
+
},
|
|
87
|
+
// ----------------------------------
|
|
88
|
+
// Content & Media
|
|
89
|
+
// ----------------------------------
|
|
90
|
+
{
|
|
91
|
+
displayName: 'Post Type',
|
|
92
|
+
name: 'type',
|
|
93
|
+
type: 'options',
|
|
94
|
+
displayOptions: {
|
|
95
|
+
show: {
|
|
96
|
+
platform: ['facebook'],
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
options: [
|
|
100
|
+
{ name: 'Article (Link/Text)', value: 'Article' },
|
|
101
|
+
{ name: 'Image', value: 'Image' },
|
|
102
|
+
{ name: 'Video', value: 'Video' },
|
|
103
|
+
{ name: 'Reels', value: 'Reels' },
|
|
104
|
+
{ name: 'Carousel', value: 'Carousel' },
|
|
105
|
+
],
|
|
106
|
+
default: 'Article',
|
|
107
|
+
description: 'Type of post to create',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
displayName: 'Post Type',
|
|
111
|
+
name: 'type',
|
|
112
|
+
type: 'options',
|
|
113
|
+
displayOptions: {
|
|
114
|
+
show: {
|
|
115
|
+
platform: ['linkedin'],
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
options: [
|
|
119
|
+
{ name: 'Article (Text/Link)', value: 'Article' },
|
|
120
|
+
{ name: 'Image', value: 'Image' },
|
|
121
|
+
{ name: 'Video', value: 'Video' },
|
|
122
|
+
],
|
|
123
|
+
default: 'Article',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
displayName: 'Post Type',
|
|
127
|
+
name: 'type',
|
|
128
|
+
type: 'options',
|
|
129
|
+
displayOptions: {
|
|
130
|
+
show: {
|
|
131
|
+
platform: ['instagram'],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
options: [
|
|
135
|
+
{ name: 'Image', value: 'Image' },
|
|
136
|
+
{ name: 'Video/Reels', value: 'Video' },
|
|
137
|
+
{ name: 'Carousel', value: 'Carousel' },
|
|
138
|
+
],
|
|
139
|
+
default: 'Image',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
displayName: 'Content (Text)',
|
|
143
|
+
name: 'content',
|
|
144
|
+
type: 'string',
|
|
145
|
+
typeOptions: {
|
|
146
|
+
rows: 4,
|
|
147
|
+
},
|
|
148
|
+
default: '',
|
|
149
|
+
description: 'The text content of the post. For Twitter, usage of "===" triggers thread splitting.',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
displayName: 'Link URL',
|
|
153
|
+
name: 'link',
|
|
154
|
+
type: 'string',
|
|
155
|
+
default: '',
|
|
156
|
+
displayOptions: {
|
|
157
|
+
show: {
|
|
158
|
+
platform: ['facebook', 'linkedin'],
|
|
159
|
+
type: ['Article', 'Carousel'],
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
description: 'Link to share (for Article or Carousel)',
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
displayName: 'Media Files (URLs)',
|
|
166
|
+
name: 'media_files',
|
|
167
|
+
type: 'json', // User can input JSON array of strings
|
|
168
|
+
default: '[]',
|
|
169
|
+
description: 'Array of image/video URLs to upload. E.g. ["https://example.com/img1.jpg"]',
|
|
170
|
+
},
|
|
171
|
+
// Facebook/IG Specific options
|
|
172
|
+
{
|
|
173
|
+
displayName: 'Cover Image URL',
|
|
174
|
+
name: 'cover_url',
|
|
175
|
+
type: 'string',
|
|
176
|
+
default: '',
|
|
177
|
+
displayOptions: {
|
|
178
|
+
show: {
|
|
179
|
+
platform: ['facebook', 'instagram'],
|
|
180
|
+
type: ['Reels', 'Video'],
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
description: 'Optional cover image for video/reels',
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
async execute() {
|
|
189
|
+
const items = this.getInputData();
|
|
190
|
+
const returnData = [];
|
|
191
|
+
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
192
|
+
const item = items[itemIndex];
|
|
193
|
+
const platform = this.getNodeParameter('platform', itemIndex, '');
|
|
194
|
+
try {
|
|
195
|
+
let result;
|
|
196
|
+
if (platform === 'facebook' || platform === 'instagram') {
|
|
197
|
+
result = await facebook_1.handleFacebook.call(this, itemIndex, item);
|
|
198
|
+
}
|
|
199
|
+
else if (platform === 'twitter') {
|
|
200
|
+
result = await twitter_1.handleTwitter.call(this, itemIndex, item);
|
|
201
|
+
}
|
|
202
|
+
else if (platform === 'linkedin') {
|
|
203
|
+
result = await linkedin_1.handleLinkedIn.call(this, itemIndex, item);
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown platform: ${platform}`, { itemIndex });
|
|
207
|
+
}
|
|
208
|
+
returnData.push({ json: result });
|
|
209
|
+
}
|
|
210
|
+
catch (error) {
|
|
211
|
+
if (this.continueOnFail()) {
|
|
212
|
+
returnData.push({ json: this.getInputData(itemIndex)[0].json, error: error.message });
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
if (error.context) {
|
|
216
|
+
error.context.itemIndex = itemIndex;
|
|
217
|
+
}
|
|
218
|
+
throw error;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return [returnData];
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
exports.SocialPro = SocialPro;
|