n8n-nodes-nashir 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/credentials/NashirApi.credentials.ts +49 -0
- package/dist/credentials/NashirApi.credentials.d.ts +10 -0
- package/dist/credentials/NashirApi.credentials.d.ts.map +1 -0
- package/dist/credentials/NashirApi.credentials.js +47 -0
- package/dist/credentials/NashirApi.credentials.js.map +1 -0
- package/dist/nodes/NashirFacebook/NashirFacebook.node.d.ts +11 -0
- package/dist/nodes/NashirFacebook/NashirFacebook.node.d.ts.map +1 -0
- package/dist/nodes/NashirFacebook/NashirFacebook.node.js +227 -0
- package/dist/nodes/NashirFacebook/NashirFacebook.node.js.map +1 -0
- package/dist/nodes/NashirInstagram/NashirInstagram.node.d.ts +11 -0
- package/dist/nodes/NashirInstagram/NashirInstagram.node.d.ts.map +1 -0
- package/dist/nodes/NashirInstagram/NashirInstagram.node.js +204 -0
- package/dist/nodes/NashirInstagram/NashirInstagram.node.js.map +1 -0
- package/dist/nodes/NashirLinkedIn/NashirLinkedIn.node.d.ts +11 -0
- package/dist/nodes/NashirLinkedIn/NashirLinkedIn.node.d.ts.map +1 -0
- package/dist/nodes/NashirLinkedIn/NashirLinkedIn.node.js +156 -0
- package/dist/nodes/NashirLinkedIn/NashirLinkedIn.node.js.map +1 -0
- package/dist/nodes/NashirTelegram/NashirTelegram.node.d.ts +11 -0
- package/dist/nodes/NashirTelegram/NashirTelegram.node.d.ts.map +1 -0
- package/dist/nodes/NashirTelegram/NashirTelegram.node.js +150 -0
- package/dist/nodes/NashirTelegram/NashirTelegram.node.js.map +1 -0
- package/dist/nodes/NashirTikTok/NashirTikTok.node.d.ts +11 -0
- package/dist/nodes/NashirTikTok/NashirTikTok.node.d.ts.map +1 -0
- package/dist/nodes/NashirTikTok/NashirTikTok.node.js +164 -0
- package/dist/nodes/NashirTikTok/NashirTikTok.node.js.map +1 -0
- package/dist/nodes/NashirWhatsApp/NashirWhatsApp.node.d.ts +11 -0
- package/dist/nodes/NashirWhatsApp/NashirWhatsApp.node.d.ts.map +1 -0
- package/dist/nodes/NashirWhatsApp/NashirWhatsApp.node.js +165 -0
- package/dist/nodes/NashirWhatsApp/NashirWhatsApp.node.js.map +1 -0
- package/dist/nodes/NashirYouTube/NashirYouTube.node.d.ts +11 -0
- package/dist/nodes/NashirYouTube/NashirYouTube.node.d.ts.map +1 -0
- package/dist/nodes/NashirYouTube/NashirYouTube.node.js +182 -0
- package/dist/nodes/NashirYouTube/NashirYouTube.node.js.map +1 -0
- package/dist/nodes/shared/api.d.ts +17 -0
- package/dist/nodes/shared/api.d.ts.map +1 -0
- package/dist/nodes/shared/api.js +102 -0
- package/dist/nodes/shared/api.js.map +1 -0
- package/nodes/NashirFacebook/NashirFacebook.node.ts +243 -0
- package/nodes/NashirFacebook/facebook.svg +3 -0
- package/nodes/NashirInstagram/NashirInstagram.node.ts +220 -0
- package/nodes/NashirInstagram/instagram.svg +14 -0
- package/nodes/NashirLinkedIn/NashirLinkedIn.node.ts +174 -0
- package/nodes/NashirLinkedIn/linkedin.svg +3 -0
- package/nodes/NashirTelegram/NashirTelegram.node.ts +168 -0
- package/nodes/NashirTelegram/telegram.svg +3 -0
- package/nodes/NashirTikTok/NashirTikTok.node.ts +183 -0
- package/nodes/NashirTikTok/tiktok.svg +3 -0
- package/nodes/NashirWhatsApp/NashirWhatsApp.node.ts +180 -0
- package/nodes/NashirWhatsApp/whatsapp.svg +3 -0
- package/nodes/NashirYouTube/NashirYouTube.node.ts +204 -0
- package/nodes/NashirYouTube/youtube.svg +3 -0
- package/nodes/shared/api.ts +125 -0
- package/package.json +53 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IAuthenticateGeneric,
|
|
3
|
+
ICredentialTestRequest,
|
|
4
|
+
ICredentialType,
|
|
5
|
+
INodeProperties,
|
|
6
|
+
} from 'n8n-workflow';
|
|
7
|
+
|
|
8
|
+
export class NashirApi implements ICredentialType {
|
|
9
|
+
name = 'nashirApi';
|
|
10
|
+
displayName = 'Nashir API';
|
|
11
|
+
documentationUrl = 'https://nashir.ai/docs/api';
|
|
12
|
+
properties: INodeProperties[] = [
|
|
13
|
+
{
|
|
14
|
+
displayName: 'API Key',
|
|
15
|
+
name: 'apiKey',
|
|
16
|
+
type: 'string',
|
|
17
|
+
typeOptions: { password: true },
|
|
18
|
+
default: '',
|
|
19
|
+
required: true,
|
|
20
|
+
description: 'Get your key from nashir.ai → Settings → API',
|
|
21
|
+
placeholder: 'nsh_xxxxxxxxxxxxxxxx',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
displayName: 'Base URL',
|
|
25
|
+
name: 'baseUrl',
|
|
26
|
+
type: 'string',
|
|
27
|
+
default: 'https://nashir.ai',
|
|
28
|
+
required: false,
|
|
29
|
+
description: 'Base URL for the Nashir API (leave default unless self-hosted)',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
authenticate: IAuthenticateGeneric = {
|
|
34
|
+
type: 'generic',
|
|
35
|
+
properties: {
|
|
36
|
+
headers: {
|
|
37
|
+
Authorization: '=Bearer {{$credentials.apiKey}}',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
test: ICredentialTestRequest = {
|
|
43
|
+
request: {
|
|
44
|
+
baseURL: '={{$credentials.baseUrl}}',
|
|
45
|
+
url: '/api/v1/accounts',
|
|
46
|
+
method: 'GET',
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class NashirApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=NashirApi.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NashirApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/NashirApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,MAAM,cAAc,CAAC;AAEtB,qBAAa,SAAU,YAAW,eAAe;IAChD,IAAI,SAAe;IACnB,WAAW,SAAgB;IAC3B,gBAAgB,SAAgC;IAChD,UAAU,EAAE,eAAe,EAAE,CAmB3B;IAEF,YAAY,EAAE,oBAAoB,CAOhC;IAEF,IAAI,EAAE,sBAAsB,CAM1B;CACF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NashirApi = void 0;
|
|
4
|
+
class NashirApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'nashirApi';
|
|
7
|
+
this.displayName = 'Nashir API';
|
|
8
|
+
this.documentationUrl = 'https://nashir.ai/docs/api';
|
|
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: 'Get your key from nashir.ai → Settings → API',
|
|
18
|
+
placeholder: 'nsh_xxxxxxxxxxxxxxxx',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Base URL',
|
|
22
|
+
name: 'baseUrl',
|
|
23
|
+
type: 'string',
|
|
24
|
+
default: 'https://nashir.ai',
|
|
25
|
+
required: false,
|
|
26
|
+
description: 'Base URL for the Nashir API (leave default unless self-hosted)',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
this.authenticate = {
|
|
30
|
+
type: 'generic',
|
|
31
|
+
properties: {
|
|
32
|
+
headers: {
|
|
33
|
+
Authorization: '=Bearer {{$credentials.apiKey}}',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
this.test = {
|
|
38
|
+
request: {
|
|
39
|
+
baseURL: '={{$credentials.baseUrl}}',
|
|
40
|
+
url: '/api/v1/accounts',
|
|
41
|
+
method: 'GET',
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.NashirApi = NashirApi;
|
|
47
|
+
//# sourceMappingURL=NashirApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NashirApi.credentials.js","sourceRoot":"","sources":["../../credentials/NashirApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,SAAS;IAAtB;QACC,SAAI,GAAG,WAAW,CAAC;QACnB,gBAAW,GAAG,YAAY,CAAC;QAC3B,qBAAgB,GAAG,4BAA4B,CAAC;QAChD,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,8CAA8C;gBAC3D,WAAW,EAAE,sBAAsB;aACnC;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mBAAmB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,gEAAgE;aAC7E;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,2BAA2B;gBACpC,GAAG,EAAE,kBAAkB;gBACvB,MAAM,EAAE,KAAK;aACb;SACD,CAAC;IACH,CAAC;CAAA;AAzCD,8BAyCC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class NashirFacebook implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
loadFacebookAccounts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=NashirFacebook.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NashirFacebook.node.d.ts","sourceRoot":"","sources":["../../../nodes/NashirFacebook/NashirFacebook.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,MAAM,cAAc,CAAC;AAItB,qBAAa,cAAe,YAAW,SAAS;IAC/C,WAAW,EAAE,oBAAoB,CAoJ/B;IAEF,OAAO;;uCAE4B,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;;MAIxF;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAuEvE"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NashirFacebook = void 0;
|
|
4
|
+
const api_1 = require("../shared/api");
|
|
5
|
+
class NashirFacebook {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.description = {
|
|
8
|
+
displayName: 'Nashir Facebook',
|
|
9
|
+
name: 'nashirFacebook',
|
|
10
|
+
icon: 'file:facebook.svg',
|
|
11
|
+
group: ['transform'],
|
|
12
|
+
version: 1,
|
|
13
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
14
|
+
description: 'Publish and manage Facebook content via nashir.ai',
|
|
15
|
+
defaults: { name: 'Nashir Facebook', color: '#1877F2' },
|
|
16
|
+
inputs: ['main'],
|
|
17
|
+
outputs: ['main'],
|
|
18
|
+
credentials: [{ name: 'nashirApi', required: true }],
|
|
19
|
+
properties: [
|
|
20
|
+
// ── Operation ───────────────────────────────────────────────────────────
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Operation',
|
|
23
|
+
name: 'operation',
|
|
24
|
+
type: 'options',
|
|
25
|
+
noDataExpression: true,
|
|
26
|
+
options: [
|
|
27
|
+
{ name: 'Delete Post', value: 'deletePost', action: 'Delete a post' },
|
|
28
|
+
{ name: 'Get Comments', value: 'getComments', action: 'Get comments' },
|
|
29
|
+
{ name: 'Get Messages', value: 'getMessages', action: 'Get messages' },
|
|
30
|
+
{ name: 'Get Posts', value: 'getPosts', action: 'Get posts' },
|
|
31
|
+
{ name: 'Publish Post', value: 'publishPost', action: 'Publish a post now' },
|
|
32
|
+
{ name: 'Reply to Comment', value: 'replyComment', action: 'Reply to a comment' },
|
|
33
|
+
{ name: 'Reply to Message', value: 'replyMessage', action: 'Reply to a message' },
|
|
34
|
+
{ name: 'Schedule Post', value: 'schedulePost', action: 'Schedule a post' },
|
|
35
|
+
],
|
|
36
|
+
default: 'publishPost',
|
|
37
|
+
},
|
|
38
|
+
// ── Account (publish / schedule) ────────────────────────────────────────
|
|
39
|
+
{
|
|
40
|
+
displayName: 'Account',
|
|
41
|
+
name: 'account',
|
|
42
|
+
type: 'options',
|
|
43
|
+
typeOptions: { loadOptionsMethod: 'loadFacebookAccounts' },
|
|
44
|
+
default: '',
|
|
45
|
+
required: true,
|
|
46
|
+
description: 'Facebook page or account to post from',
|
|
47
|
+
displayOptions: { show: { operation: ['publishPost', 'schedulePost'] } },
|
|
48
|
+
},
|
|
49
|
+
// ── Content ─────────────────────────────────────────────────────────────
|
|
50
|
+
{
|
|
51
|
+
displayName: 'Content',
|
|
52
|
+
name: 'content',
|
|
53
|
+
type: 'string',
|
|
54
|
+
typeOptions: { rows: 4 },
|
|
55
|
+
default: '',
|
|
56
|
+
required: true,
|
|
57
|
+
description: 'Post text content',
|
|
58
|
+
displayOptions: { show: { operation: ['publishPost', 'schedulePost'] } },
|
|
59
|
+
},
|
|
60
|
+
// ── Post Type ───────────────────────────────────────────────────────────
|
|
61
|
+
{
|
|
62
|
+
displayName: 'Post Type',
|
|
63
|
+
name: 'postType',
|
|
64
|
+
type: 'options',
|
|
65
|
+
options: [
|
|
66
|
+
{ name: 'Feed Post', value: 'feed' },
|
|
67
|
+
{ name: 'Story', value: 'story' },
|
|
68
|
+
{ name: 'Reel', value: 'reel' },
|
|
69
|
+
],
|
|
70
|
+
default: 'feed',
|
|
71
|
+
displayOptions: { show: { operation: ['publishPost', 'schedulePost'] } },
|
|
72
|
+
},
|
|
73
|
+
// ── Media ───────────────────────────────────────────────────────────────
|
|
74
|
+
{
|
|
75
|
+
displayName: 'Media Binary Property',
|
|
76
|
+
name: 'binaryPropertyName',
|
|
77
|
+
type: 'string',
|
|
78
|
+
default: 'data',
|
|
79
|
+
description: 'Name of the binary property containing the media file to upload',
|
|
80
|
+
displayOptions: { show: { operation: ['publishPost', 'schedulePost'], hasMedia: [true] } },
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
displayName: 'Attach Media?',
|
|
84
|
+
name: 'hasMedia',
|
|
85
|
+
type: 'boolean',
|
|
86
|
+
default: false,
|
|
87
|
+
description: 'Whether to attach a media file to this post',
|
|
88
|
+
displayOptions: { show: { operation: ['publishPost', 'schedulePost'] } },
|
|
89
|
+
},
|
|
90
|
+
// ── Link URL ────────────────────────────────────────────────────────────
|
|
91
|
+
{
|
|
92
|
+
displayName: 'Link URL',
|
|
93
|
+
name: 'linkUrl',
|
|
94
|
+
type: 'string',
|
|
95
|
+
default: '',
|
|
96
|
+
description: 'Optional link preview URL to include in the post',
|
|
97
|
+
displayOptions: { show: { operation: ['publishPost', 'schedulePost'] } },
|
|
98
|
+
},
|
|
99
|
+
// ── Scheduled At ────────────────────────────────────────────────────────
|
|
100
|
+
{
|
|
101
|
+
displayName: 'Scheduled At',
|
|
102
|
+
name: 'scheduledAt',
|
|
103
|
+
type: 'dateTime',
|
|
104
|
+
default: '',
|
|
105
|
+
required: true,
|
|
106
|
+
description: 'Date and time to publish the post',
|
|
107
|
+
displayOptions: { show: { operation: ['schedulePost'] } },
|
|
108
|
+
},
|
|
109
|
+
// ── Post ID (delete) ────────────────────────────────────────────────────
|
|
110
|
+
{
|
|
111
|
+
displayName: 'Post ID',
|
|
112
|
+
name: 'postId',
|
|
113
|
+
type: 'string',
|
|
114
|
+
default: '',
|
|
115
|
+
required: true,
|
|
116
|
+
displayOptions: { show: { operation: ['deletePost'] } },
|
|
117
|
+
},
|
|
118
|
+
// ── Comment ID (reply) ──────────────────────────────────────────────────
|
|
119
|
+
{
|
|
120
|
+
displayName: 'Comment ID',
|
|
121
|
+
name: 'commentId',
|
|
122
|
+
type: 'string',
|
|
123
|
+
default: '',
|
|
124
|
+
required: true,
|
|
125
|
+
displayOptions: { show: { operation: ['replyComment'] } },
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
displayName: 'Reply Text',
|
|
129
|
+
name: 'replyText',
|
|
130
|
+
type: 'string',
|
|
131
|
+
typeOptions: { rows: 3 },
|
|
132
|
+
default: '',
|
|
133
|
+
required: true,
|
|
134
|
+
displayOptions: { show: { operation: ['replyComment', 'replyMessage'] } },
|
|
135
|
+
},
|
|
136
|
+
// ── Message ID (reply) ──────────────────────────────────────────────────
|
|
137
|
+
{
|
|
138
|
+
displayName: 'Message ID',
|
|
139
|
+
name: 'messageId',
|
|
140
|
+
type: 'string',
|
|
141
|
+
default: '',
|
|
142
|
+
required: true,
|
|
143
|
+
displayOptions: { show: { operation: ['replyMessage'] } },
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
};
|
|
147
|
+
this.methods = {
|
|
148
|
+
loadOptions: {
|
|
149
|
+
async loadFacebookAccounts() {
|
|
150
|
+
return (0, api_1.loadAccounts)(this, 'facebook');
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
async execute() {
|
|
156
|
+
const items = this.getInputData();
|
|
157
|
+
const returnData = [];
|
|
158
|
+
for (let i = 0; i < items.length; i++) {
|
|
159
|
+
try {
|
|
160
|
+
const operation = this.getNodeParameter('operation', i);
|
|
161
|
+
let responseData;
|
|
162
|
+
if (operation === 'publishPost' || operation === 'schedulePost') {
|
|
163
|
+
const accountId = this.getNodeParameter('account', i);
|
|
164
|
+
const content = this.getNodeParameter('content', i);
|
|
165
|
+
const postType = this.getNodeParameter('postType', i);
|
|
166
|
+
const hasMedia = this.getNodeParameter('hasMedia', i, false);
|
|
167
|
+
const linkUrl = this.getNodeParameter('linkUrl', i, '');
|
|
168
|
+
const body = {
|
|
169
|
+
content,
|
|
170
|
+
platforms: ['facebook'],
|
|
171
|
+
account_ids: [accountId],
|
|
172
|
+
post_type: postType,
|
|
173
|
+
publish_now: operation === 'publishPost',
|
|
174
|
+
};
|
|
175
|
+
if (hasMedia) {
|
|
176
|
+
const binaryProp = this.getNodeParameter('binaryPropertyName', i, 'data');
|
|
177
|
+
const uploadedUrl = await (0, api_1.nashirUploadBinary)(this, i, binaryProp);
|
|
178
|
+
body.image_url = uploadedUrl;
|
|
179
|
+
}
|
|
180
|
+
if (linkUrl)
|
|
181
|
+
body.link_url = linkUrl;
|
|
182
|
+
if (operation === 'schedulePost') {
|
|
183
|
+
const scheduledAt = this.getNodeParameter('scheduledAt', i);
|
|
184
|
+
body.scheduled_at = scheduledAt;
|
|
185
|
+
}
|
|
186
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'POST', '/posts', body);
|
|
187
|
+
}
|
|
188
|
+
else if (operation === 'getPosts') {
|
|
189
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'GET', '/posts', undefined, { platform: 'facebook' });
|
|
190
|
+
}
|
|
191
|
+
else if (operation === 'deletePost') {
|
|
192
|
+
const postId = this.getNodeParameter('postId', i);
|
|
193
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'DELETE', `/posts/${postId}`);
|
|
194
|
+
}
|
|
195
|
+
else if (operation === 'getComments') {
|
|
196
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'GET', '/comments', undefined, { platform: 'facebook' });
|
|
197
|
+
}
|
|
198
|
+
else if (operation === 'replyComment') {
|
|
199
|
+
const commentId = this.getNodeParameter('commentId', i);
|
|
200
|
+
const replyText = this.getNodeParameter('replyText', i);
|
|
201
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'POST', `/comments/${commentId}/reply`, { message: replyText });
|
|
202
|
+
}
|
|
203
|
+
else if (operation === 'getMessages') {
|
|
204
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'GET', '/messages', undefined, { platform: 'facebook' });
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
// replyMessage
|
|
208
|
+
const messageId = this.getNodeParameter('messageId', i);
|
|
209
|
+
const replyText = this.getNodeParameter('replyText', i);
|
|
210
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'POST', `/messages/${messageId}/reply`, { message: replyText });
|
|
211
|
+
}
|
|
212
|
+
const rows = Array.isArray(responseData) ? responseData : [responseData];
|
|
213
|
+
returnData.push(...rows.map((d) => ({ json: d, pairedItem: i })));
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
if (this.continueOnFail()) {
|
|
217
|
+
returnData.push({ json: { error: error.message }, pairedItem: i });
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
throw error;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return [returnData];
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
exports.NashirFacebook = NashirFacebook;
|
|
227
|
+
//# sourceMappingURL=NashirFacebook.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NashirFacebook.node.js","sourceRoot":"","sources":["../../../nodes/NashirFacebook/NashirFacebook.node.ts"],"names":[],"mappings":";;;AAUA,uCAAmF;AAEnF,MAAa,cAAc;IAA3B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,mDAAmD;YAChE,QAAQ,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,EAAE;YACvD,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,2EAA2E;gBAC3E;oBACC,WAAW,EAAE,WAAW;oBACxB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE;wBACrE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE;wBACtE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE;wBACtE,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EAAE,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;oBAC9E,SAAS;gBACV,CAAC;gBACD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAtOD,wCAsOC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class NashirInstagram implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
loadInstagramAccounts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=NashirInstagram.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NashirInstagram.node.d.ts","sourceRoot":"","sources":["../../../nodes/NashirInstagram/NashirInstagram.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,MAAM,cAAc,CAAC;AAItB,qBAAa,eAAgB,YAAW,SAAS;IAChD,WAAW,EAAE,oBAAoB,CAkI/B;IAEF,OAAO;;wCAE6B,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;;MAIzF;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAkEvE"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NashirInstagram = void 0;
|
|
4
|
+
const api_1 = require("../shared/api");
|
|
5
|
+
class NashirInstagram {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.description = {
|
|
8
|
+
displayName: 'Nashir Instagram',
|
|
9
|
+
name: 'nashirInstagram',
|
|
10
|
+
icon: 'file:instagram.svg',
|
|
11
|
+
group: ['transform'],
|
|
12
|
+
version: 1,
|
|
13
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
14
|
+
description: 'Publish and manage Instagram content via nashir.ai',
|
|
15
|
+
defaults: { name: 'Nashir Instagram', color: '#E1306C' },
|
|
16
|
+
inputs: ['main'],
|
|
17
|
+
outputs: ['main'],
|
|
18
|
+
credentials: [{ name: 'nashirApi', required: true }],
|
|
19
|
+
properties: [
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Operation',
|
|
22
|
+
name: 'operation',
|
|
23
|
+
type: 'options',
|
|
24
|
+
noDataExpression: true,
|
|
25
|
+
options: [
|
|
26
|
+
{ name: 'Delete Post', value: 'deletePost', action: 'Delete a post' },
|
|
27
|
+
{ name: 'Get Comments', value: 'getComments', action: 'Get comments' },
|
|
28
|
+
{ name: 'Get Messages', value: 'getMessages', action: 'Get messages' },
|
|
29
|
+
{ name: 'Get Posts', value: 'getPosts', action: 'Get posts' },
|
|
30
|
+
{ name: 'Publish Post', value: 'publishPost', action: 'Publish a post now' },
|
|
31
|
+
{ name: 'Reply to Comment', value: 'replyComment', action: 'Reply to a comment' },
|
|
32
|
+
{ name: 'Reply to Message', value: 'replyMessage', action: 'Reply to a message' },
|
|
33
|
+
{ name: 'Schedule Post', value: 'schedulePost', action: 'Schedule a post' },
|
|
34
|
+
],
|
|
35
|
+
default: 'publishPost',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
displayName: 'Account',
|
|
39
|
+
name: 'account',
|
|
40
|
+
type: 'options',
|
|
41
|
+
typeOptions: { loadOptionsMethod: 'loadInstagramAccounts' },
|
|
42
|
+
default: '',
|
|
43
|
+
required: true,
|
|
44
|
+
displayOptions: { show: { operation: ['publishPost', 'schedulePost'] } },
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Content',
|
|
48
|
+
name: 'content',
|
|
49
|
+
type: 'string',
|
|
50
|
+
typeOptions: { rows: 4 },
|
|
51
|
+
default: '',
|
|
52
|
+
required: true,
|
|
53
|
+
description: 'Caption / post text',
|
|
54
|
+
displayOptions: { show: { operation: ['publishPost', 'schedulePost'] } },
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
displayName: 'Post Type',
|
|
58
|
+
name: 'postType',
|
|
59
|
+
type: 'options',
|
|
60
|
+
options: [
|
|
61
|
+
{ name: 'Feed Post', value: 'feed' },
|
|
62
|
+
{ name: 'Reel', value: 'reel' },
|
|
63
|
+
{ name: 'Story', value: 'story' },
|
|
64
|
+
{ name: 'Carousel', value: 'carousel' },
|
|
65
|
+
],
|
|
66
|
+
default: 'feed',
|
|
67
|
+
displayOptions: { show: { operation: ['publishPost', 'schedulePost'] } },
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
displayName: 'Media Binary Property',
|
|
71
|
+
name: 'binaryPropertyName',
|
|
72
|
+
type: 'string',
|
|
73
|
+
default: 'data',
|
|
74
|
+
required: true,
|
|
75
|
+
description: 'Name of the binary property containing the media file (required for all Instagram posts)',
|
|
76
|
+
displayOptions: { show: { operation: ['publishPost', 'schedulePost'] } },
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
displayName: 'Alt Text',
|
|
80
|
+
name: 'altText',
|
|
81
|
+
type: 'string',
|
|
82
|
+
default: '',
|
|
83
|
+
description: 'Accessibility alt text for the media',
|
|
84
|
+
displayOptions: { show: { operation: ['publishPost', 'schedulePost'] } },
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
displayName: 'Scheduled At',
|
|
88
|
+
name: 'scheduledAt',
|
|
89
|
+
type: 'dateTime',
|
|
90
|
+
default: '',
|
|
91
|
+
required: true,
|
|
92
|
+
displayOptions: { show: { operation: ['schedulePost'] } },
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
displayName: 'Post ID',
|
|
96
|
+
name: 'postId',
|
|
97
|
+
type: 'string',
|
|
98
|
+
default: '',
|
|
99
|
+
required: true,
|
|
100
|
+
displayOptions: { show: { operation: ['deletePost'] } },
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
displayName: 'Comment ID',
|
|
104
|
+
name: 'commentId',
|
|
105
|
+
type: 'string',
|
|
106
|
+
default: '',
|
|
107
|
+
required: true,
|
|
108
|
+
displayOptions: { show: { operation: ['replyComment'] } },
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
displayName: 'Reply Text',
|
|
112
|
+
name: 'replyText',
|
|
113
|
+
type: 'string',
|
|
114
|
+
typeOptions: { rows: 3 },
|
|
115
|
+
default: '',
|
|
116
|
+
required: true,
|
|
117
|
+
displayOptions: { show: { operation: ['replyComment', 'replyMessage'] } },
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
displayName: 'Message ID',
|
|
121
|
+
name: 'messageId',
|
|
122
|
+
type: 'string',
|
|
123
|
+
default: '',
|
|
124
|
+
required: true,
|
|
125
|
+
displayOptions: { show: { operation: ['replyMessage'] } },
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
};
|
|
129
|
+
this.methods = {
|
|
130
|
+
loadOptions: {
|
|
131
|
+
async loadInstagramAccounts() {
|
|
132
|
+
return (0, api_1.loadAccounts)(this, 'instagram');
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
async execute() {
|
|
138
|
+
const items = this.getInputData();
|
|
139
|
+
const returnData = [];
|
|
140
|
+
for (let i = 0; i < items.length; i++) {
|
|
141
|
+
try {
|
|
142
|
+
const operation = this.getNodeParameter('operation', i);
|
|
143
|
+
let responseData;
|
|
144
|
+
if (operation === 'publishPost' || operation === 'schedulePost') {
|
|
145
|
+
const accountId = this.getNodeParameter('account', i);
|
|
146
|
+
const content = this.getNodeParameter('content', i);
|
|
147
|
+
const postType = this.getNodeParameter('postType', i);
|
|
148
|
+
const binaryProp = this.getNodeParameter('binaryPropertyName', i, 'data');
|
|
149
|
+
const altText = this.getNodeParameter('altText', i, '');
|
|
150
|
+
const uploadedUrl = await (0, api_1.nashirUploadBinary)(this, i, binaryProp);
|
|
151
|
+
const body = {
|
|
152
|
+
content,
|
|
153
|
+
platforms: ['instagram'],
|
|
154
|
+
account_ids: [accountId],
|
|
155
|
+
post_type: postType,
|
|
156
|
+
image_url: uploadedUrl,
|
|
157
|
+
publish_now: operation === 'publishPost',
|
|
158
|
+
};
|
|
159
|
+
if (altText)
|
|
160
|
+
body.alt_text = altText;
|
|
161
|
+
if (operation === 'schedulePost') {
|
|
162
|
+
body.scheduled_at = this.getNodeParameter('scheduledAt', i);
|
|
163
|
+
}
|
|
164
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'POST', '/posts', body);
|
|
165
|
+
}
|
|
166
|
+
else if (operation === 'getPosts') {
|
|
167
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'GET', '/posts', undefined, { platform: 'instagram' });
|
|
168
|
+
}
|
|
169
|
+
else if (operation === 'deletePost') {
|
|
170
|
+
const postId = this.getNodeParameter('postId', i);
|
|
171
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'DELETE', `/posts/${postId}`);
|
|
172
|
+
}
|
|
173
|
+
else if (operation === 'getComments') {
|
|
174
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'GET', '/comments', undefined, { platform: 'instagram' });
|
|
175
|
+
}
|
|
176
|
+
else if (operation === 'replyComment') {
|
|
177
|
+
const commentId = this.getNodeParameter('commentId', i);
|
|
178
|
+
const replyText = this.getNodeParameter('replyText', i);
|
|
179
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'POST', `/comments/${commentId}/reply`, { message: replyText });
|
|
180
|
+
}
|
|
181
|
+
else if (operation === 'getMessages') {
|
|
182
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'GET', '/messages', undefined, { platform: 'instagram' });
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
const messageId = this.getNodeParameter('messageId', i);
|
|
186
|
+
const replyText = this.getNodeParameter('replyText', i);
|
|
187
|
+
responseData = await (0, api_1.nashirApiRequest)(this, 'POST', `/messages/${messageId}/reply`, { message: replyText });
|
|
188
|
+
}
|
|
189
|
+
const rows = Array.isArray(responseData) ? responseData : [responseData];
|
|
190
|
+
returnData.push(...rows.map((d) => ({ json: d, pairedItem: i })));
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
if (this.continueOnFail()) {
|
|
194
|
+
returnData.push({ json: { error: error.message }, pairedItem: i });
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
throw error;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return [returnData];
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
exports.NashirInstagram = NashirInstagram;
|
|
204
|
+
//# sourceMappingURL=NashirInstagram.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NashirInstagram.node.js","sourceRoot":"","sources":["../../../nodes/NashirInstagram/NashirInstagram.node.ts"],"names":[],"mappings":";;;AAUA,uCAAmF;AAEnF,MAAa,eAAe;IAA5B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,oDAAoD;YACjE,QAAQ,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,EAAE;YACxD,MAAM,EAAE,CAAC,M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E,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;oBAC9E,SAAS;gBACV,CAAC;gBACD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AA/MD,0CA+MC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class NashirLinkedIn implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
loadLinkedInAccounts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=NashirLinkedIn.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NashirLinkedIn.node.d.ts","sourceRoot":"","sources":["../../../nodes/NashirLinkedIn/NashirLinkedIn.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,MAAM,cAAc,CAAC;AAItB,qBAAa,cAAe,YAAW,SAAS;IAC/C,WAAW,EAAE,oBAAoB,CAiG/B;IAEF,OAAO;;uCAE4B,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;;MAIxF;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAqDvE"}
|