n8n-nodes-nashir 0.1.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nodes/NashirTikTok/NashirTikTok.node.d.ts.map +1 -1
- package/dist/nodes/NashirTikTok/NashirTikTok.node.js +50 -18
- package/dist/nodes/NashirTikTok/NashirTikTok.node.js.map +1 -1
- package/dist/nodes/NashirYouTube/NashirYouTube.node.d.ts.map +1 -1
- package/dist/nodes/NashirYouTube/NashirYouTube.node.js +95 -15
- package/dist/nodes/NashirYouTube/NashirYouTube.node.js.map +1 -1
- package/nodes/NashirTikTok/NashirTikTok.node.ts +68 -32
- package/nodes/NashirYouTube/NashirYouTube.node.ts +102 -16
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NashirTikTok.node.d.ts","sourceRoot":"","sources":["../../../nodes/NashirTikTok/NashirTikTok.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,MAAM,cAAc,CAAC;AAItB,qBAAa,YAAa,YAAW,SAAS;IAC7C,WAAW,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"NashirTikTok.node.d.ts","sourceRoot":"","sources":["../../../nodes/NashirTikTok/NashirTikTok.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,MAAM,cAAc,CAAC;AAItB,qBAAa,YAAa,YAAW,SAAS;IAC7C,WAAW,EAAE,oBAAoB,CA8K/B;IAEF,OAAO;;qCAE0B,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;;MAItF;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAoFvE"}
|
|
@@ -11,7 +11,7 @@ class NashirTikTok {
|
|
|
11
11
|
group: ['transform'],
|
|
12
12
|
version: 1,
|
|
13
13
|
subtitle: '={{$parameter["operation"]}}',
|
|
14
|
-
description: 'Publish and manage TikTok
|
|
14
|
+
description: 'Publish and manage TikTok posts (video & photo) via nashir.ai',
|
|
15
15
|
defaults: { name: 'Nashir TikTok', color: '#000000' },
|
|
16
16
|
inputs: ['main'],
|
|
17
17
|
outputs: ['main'],
|
|
@@ -25,11 +25,12 @@ class NashirTikTok {
|
|
|
25
25
|
options: [
|
|
26
26
|
{ name: 'Delete Post', value: 'deletePost', action: 'Delete a post' },
|
|
27
27
|
{ name: 'Get Posts', value: 'getPosts', action: 'Get posts' },
|
|
28
|
-
{ name: 'Publish
|
|
29
|
-
{ name: 'Schedule
|
|
28
|
+
{ name: 'Publish Media', value: 'publishVideo', action: 'Publish a video or photo now' },
|
|
29
|
+
{ name: 'Schedule Media', value: 'scheduleVideo', action: 'Schedule a video or photo' },
|
|
30
30
|
],
|
|
31
31
|
default: 'publishVideo',
|
|
32
32
|
},
|
|
33
|
+
// ── Account ──────────────────────────────────────────────────────────
|
|
33
34
|
{
|
|
34
35
|
displayName: 'Account',
|
|
35
36
|
name: 'account',
|
|
@@ -39,24 +40,27 @@ class NashirTikTok {
|
|
|
39
40
|
required: true,
|
|
40
41
|
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
41
42
|
},
|
|
43
|
+
// ── Media file ───────────────────────────────────────────────────────
|
|
42
44
|
{
|
|
43
|
-
displayName: '
|
|
45
|
+
displayName: 'Media Binary Property',
|
|
44
46
|
name: 'binaryPropertyName',
|
|
45
47
|
type: 'string',
|
|
46
48
|
default: 'data',
|
|
47
49
|
required: true,
|
|
48
|
-
description: 'Name of the binary property containing the video file',
|
|
50
|
+
description: 'Name of the binary property containing the video or photo file',
|
|
49
51
|
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
50
52
|
},
|
|
53
|
+
// ── Caption ──────────────────────────────────────────────────────────
|
|
51
54
|
{
|
|
52
55
|
displayName: 'Caption',
|
|
53
56
|
name: 'caption',
|
|
54
57
|
type: 'string',
|
|
55
58
|
typeOptions: { rows: 4 },
|
|
56
59
|
default: '',
|
|
57
|
-
description: '
|
|
60
|
+
description: 'Post caption. For TikTok the first line becomes the title (max 100 chars for video, 90 for photo).',
|
|
58
61
|
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
59
62
|
},
|
|
63
|
+
// ── Privacy ──────────────────────────────────────────────────────────
|
|
60
64
|
{
|
|
61
65
|
displayName: 'Privacy Level',
|
|
62
66
|
name: 'privacy_level',
|
|
@@ -67,10 +71,11 @@ class NashirTikTok {
|
|
|
67
71
|
{ name: 'Follower of Creator', value: 'FOLLOWER_OF_CREATOR' },
|
|
68
72
|
{ name: 'Self Only', value: 'SELF_ONLY' },
|
|
69
73
|
],
|
|
70
|
-
default: '',
|
|
74
|
+
default: 'PUBLIC_TO_EVERYONE',
|
|
71
75
|
required: true,
|
|
72
76
|
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
73
77
|
},
|
|
78
|
+
// ── Interactions ─────────────────────────────────────────────────────
|
|
74
79
|
{
|
|
75
80
|
displayName: 'Disable Comment',
|
|
76
81
|
name: 'disable_comment',
|
|
@@ -83,6 +88,7 @@ class NashirTikTok {
|
|
|
83
88
|
name: 'disable_duet',
|
|
84
89
|
type: 'boolean',
|
|
85
90
|
default: false,
|
|
91
|
+
description: 'Only applies to video posts — ignored for photo posts',
|
|
86
92
|
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
87
93
|
},
|
|
88
94
|
{
|
|
@@ -90,8 +96,10 @@ class NashirTikTok {
|
|
|
90
96
|
name: 'disable_stitch',
|
|
91
97
|
type: 'boolean',
|
|
92
98
|
default: false,
|
|
99
|
+
description: 'Only applies to video posts — ignored for photo posts',
|
|
93
100
|
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
94
101
|
},
|
|
102
|
+
// ── Brand / commercial content ────────────────────────────────────────
|
|
95
103
|
{
|
|
96
104
|
displayName: 'Brand Content',
|
|
97
105
|
name: 'brand_content_toggle',
|
|
@@ -105,7 +113,7 @@ class NashirTikTok {
|
|
|
105
113
|
name: 'brand_organic_toggle',
|
|
106
114
|
type: 'boolean',
|
|
107
115
|
default: false,
|
|
108
|
-
description: '
|
|
116
|
+
description: 'You are promoting yourself or your own business',
|
|
109
117
|
displayOptions: {
|
|
110
118
|
show: {
|
|
111
119
|
operation: ['publishVideo', 'scheduleVideo'],
|
|
@@ -114,11 +122,11 @@ class NashirTikTok {
|
|
|
114
122
|
},
|
|
115
123
|
},
|
|
116
124
|
{
|
|
117
|
-
displayName: 'Branded Content (
|
|
118
|
-
name: '
|
|
125
|
+
displayName: 'Branded Content (Paid Partnership)',
|
|
126
|
+
name: 'brand_branded_content_toggle',
|
|
119
127
|
type: 'boolean',
|
|
120
128
|
default: false,
|
|
121
|
-
description: '
|
|
129
|
+
description: 'You are promoting another brand\'s product or service (paid partnership)',
|
|
122
130
|
displayOptions: {
|
|
123
131
|
show: {
|
|
124
132
|
operation: ['publishVideo', 'scheduleVideo'],
|
|
@@ -126,6 +134,17 @@ class NashirTikTok {
|
|
|
126
134
|
},
|
|
127
135
|
},
|
|
128
136
|
},
|
|
137
|
+
// ── Carousel (photo posts only) ───────────────────────────────────────
|
|
138
|
+
{
|
|
139
|
+
displayName: 'Additional Carousel Image URLs',
|
|
140
|
+
name: 'carousel_images',
|
|
141
|
+
type: 'string',
|
|
142
|
+
default: '',
|
|
143
|
+
description: 'Comma-separated public URLs of additional images for a carousel post (photo posts only). ' +
|
|
144
|
+
'The main media file is always the first/cover image. Up to 34 additional images.',
|
|
145
|
+
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
146
|
+
},
|
|
147
|
+
// ── Schedule time ─────────────────────────────────────────────────────
|
|
129
148
|
{
|
|
130
149
|
displayName: 'Scheduled At',
|
|
131
150
|
name: 'scheduledAt',
|
|
@@ -134,6 +153,7 @@ class NashirTikTok {
|
|
|
134
153
|
required: true,
|
|
135
154
|
displayOptions: { show: { operation: ['scheduleVideo'] } },
|
|
136
155
|
},
|
|
156
|
+
// ── Delete ────────────────────────────────────────────────────────────
|
|
137
157
|
{
|
|
138
158
|
displayName: 'Post ID',
|
|
139
159
|
name: 'postId',
|
|
@@ -153,6 +173,7 @@ class NashirTikTok {
|
|
|
153
173
|
};
|
|
154
174
|
}
|
|
155
175
|
async execute() {
|
|
176
|
+
var _a;
|
|
156
177
|
const items = this.getInputData();
|
|
157
178
|
const returnData = [];
|
|
158
179
|
for (let i = 0; i < items.length; i++) {
|
|
@@ -171,24 +192,35 @@ class NashirTikTok {
|
|
|
171
192
|
const brand_organic_toggle = brand_content_toggle
|
|
172
193
|
? this.getNodeParameter('brand_organic_toggle', i, false)
|
|
173
194
|
: false;
|
|
174
|
-
const
|
|
175
|
-
? this.getNodeParameter('
|
|
195
|
+
const brand_branded_content_toggle = brand_content_toggle
|
|
196
|
+
? this.getNodeParameter('brand_branded_content_toggle', i, false)
|
|
176
197
|
: false;
|
|
177
|
-
const
|
|
198
|
+
const carousel_images_raw = this.getNodeParameter('carousel_images', i, '');
|
|
199
|
+
// Upload binary and auto-detect media type from mimeType
|
|
200
|
+
const binaryData = this.helpers.assertBinaryData(i, binaryProp);
|
|
201
|
+
const mimeType = (_a = binaryData.mimeType) !== null && _a !== void 0 ? _a : '';
|
|
202
|
+
const media_type = mimeType.startsWith('image/') ? 'PHOTO' : 'VIDEO';
|
|
203
|
+
const mediaUrl = await (0, api_1.nashirUploadBinary)(this, i, binaryProp);
|
|
204
|
+
// Parse optional carousel URLs
|
|
205
|
+
const carousel_images = carousel_images_raw
|
|
206
|
+
? carousel_images_raw.split(',').map((u) => u.trim()).filter(Boolean)
|
|
207
|
+
: undefined;
|
|
178
208
|
const body = {
|
|
179
209
|
content: caption,
|
|
180
210
|
platforms: ['tiktok'],
|
|
181
211
|
account_ids: [accountId],
|
|
182
|
-
image_url:
|
|
212
|
+
image_url: mediaUrl,
|
|
183
213
|
publish_now: operation === 'publishVideo',
|
|
184
214
|
tiktok_options: {
|
|
185
215
|
privacy_level,
|
|
186
216
|
disable_comment,
|
|
187
|
-
disable_duet,
|
|
188
|
-
disable_stitch,
|
|
217
|
+
disable_duet: media_type === 'VIDEO' ? disable_duet : false,
|
|
218
|
+
disable_stitch: media_type === 'VIDEO' ? disable_stitch : false,
|
|
189
219
|
brand_content_toggle,
|
|
190
220
|
brand_organic_toggle,
|
|
191
|
-
|
|
221
|
+
brand_branded_content_toggle,
|
|
222
|
+
media_type,
|
|
223
|
+
...((carousel_images === null || carousel_images === void 0 ? void 0 : carousel_images.length) ? { carousel_images } : {}),
|
|
192
224
|
},
|
|
193
225
|
};
|
|
194
226
|
if (operation === 'scheduleVideo') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NashirTikTok.node.js","sourceRoot":"","sources":["../../../nodes/NashirTikTok/NashirTikTok.node.ts"],"names":[],"mappings":";;;AAUA,uCAAmF;AAEnF,MAAa,YAAY;IAAzB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"NashirTikTok.node.js","sourceRoot":"","sources":["../../../nodes/NashirTikTok/NashirTikTok.node.ts"],"names":[],"mappings":";;;AAUA,uCAAmF;AAEnF,MAAa,YAAY;IAAzB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;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nE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,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;AA7QD,oCA6QC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NashirYouTube.node.d.ts","sourceRoot":"","sources":["../../../nodes/NashirYouTube/NashirYouTube.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,MAAM,cAAc,CAAC;AAItB,qBAAa,aAAc,YAAW,SAAS;IAC9C,WAAW,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"NashirYouTube.node.d.ts","sourceRoot":"","sources":["../../../nodes/NashirYouTube/NashirYouTube.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,oBAAoB,EACpB,MAAM,cAAc,CAAC;AAItB,qBAAa,aAAc,YAAW,SAAS;IAC9C,WAAW,EAAE,oBAAoB,CA4L/B;IAEF,OAAO;;sCAE2B,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;;MAIvF;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAgFvE"}
|
|
@@ -64,7 +64,32 @@ class NashirYouTube {
|
|
|
64
64
|
type: 'string',
|
|
65
65
|
typeOptions: { rows: 4 },
|
|
66
66
|
default: '',
|
|
67
|
-
description: 'Video description',
|
|
67
|
+
description: 'Video description (caption)',
|
|
68
|
+
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
displayName: 'Privacy',
|
|
72
|
+
name: 'privacy',
|
|
73
|
+
type: 'options',
|
|
74
|
+
options: [
|
|
75
|
+
{ name: 'Public', value: 'public' },
|
|
76
|
+
{ name: 'Unlisted', value: 'unlisted' },
|
|
77
|
+
{ name: 'Private', value: 'private' },
|
|
78
|
+
],
|
|
79
|
+
default: 'public',
|
|
80
|
+
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
displayName: 'Made for Kids (COPPA)',
|
|
84
|
+
name: 'madeForKids',
|
|
85
|
+
type: 'options',
|
|
86
|
+
options: [
|
|
87
|
+
{ name: 'No — not made for kids', value: 'false' },
|
|
88
|
+
{ name: 'Yes — made for kids', value: 'true' },
|
|
89
|
+
],
|
|
90
|
+
default: 'false',
|
|
91
|
+
required: true,
|
|
92
|
+
description: 'Required by YouTube/COPPA. Select whether this video is made for children.',
|
|
68
93
|
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
69
94
|
},
|
|
70
95
|
{
|
|
@@ -76,15 +101,56 @@ class NashirYouTube {
|
|
|
76
101
|
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
77
102
|
},
|
|
78
103
|
{
|
|
79
|
-
displayName: '
|
|
80
|
-
name: '
|
|
104
|
+
displayName: 'Category',
|
|
105
|
+
name: 'category',
|
|
81
106
|
type: 'options',
|
|
82
107
|
options: [
|
|
83
|
-
{ name: '
|
|
84
|
-
{ name: '
|
|
85
|
-
{ name: '
|
|
108
|
+
{ name: 'Autos & Vehicles', value: '2' },
|
|
109
|
+
{ name: 'Comedy', value: '23' },
|
|
110
|
+
{ name: 'Education', value: '27' },
|
|
111
|
+
{ name: 'Entertainment', value: '24' },
|
|
112
|
+
{ name: 'Film & Animation', value: '1' },
|
|
113
|
+
{ name: 'Gaming', value: '20' },
|
|
114
|
+
{ name: 'Howto & Style', value: '26' },
|
|
115
|
+
{ name: 'Music', value: '10' },
|
|
116
|
+
{ name: 'News & Politics', value: '25' },
|
|
117
|
+
{ name: 'Nonprofits & Activism', value: '29' },
|
|
118
|
+
{ name: 'People & Blogs', value: '22' },
|
|
119
|
+
{ name: 'Pets & Animals', value: '15' },
|
|
120
|
+
{ name: 'Science & Technology', value: '28' },
|
|
121
|
+
{ name: 'Sports', value: '17' },
|
|
122
|
+
{ name: 'Travel & Events', value: '19' },
|
|
86
123
|
],
|
|
87
|
-
default: '
|
|
124
|
+
default: '22',
|
|
125
|
+
description: 'YouTube video category',
|
|
126
|
+
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
displayName: 'License',
|
|
130
|
+
name: 'license',
|
|
131
|
+
type: 'options',
|
|
132
|
+
options: [
|
|
133
|
+
{ name: 'Standard YouTube License', value: 'youtube' },
|
|
134
|
+
{ name: 'Creative Commons — Attribution', value: 'creativeCommon' },
|
|
135
|
+
],
|
|
136
|
+
default: 'youtube',
|
|
137
|
+
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
displayName: 'Notify Subscribers',
|
|
141
|
+
name: 'notifySubscribers',
|
|
142
|
+
type: 'boolean',
|
|
143
|
+
default: true,
|
|
144
|
+
description: 'Whether to send a notification to subscribers when the video is published',
|
|
145
|
+
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
displayName: 'Default Language',
|
|
149
|
+
name: 'defaultLanguage',
|
|
150
|
+
type: 'string',
|
|
151
|
+
default: '',
|
|
152
|
+
placeholder: 'e.g. en, ar, fr',
|
|
153
|
+
description: 'BCP-47 language code for the video title and description (optional)',
|
|
88
154
|
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
89
155
|
},
|
|
90
156
|
{
|
|
@@ -133,22 +199,36 @@ class NashirYouTube {
|
|
|
133
199
|
const binaryProp = this.getNodeParameter('binaryPropertyName', i, 'data');
|
|
134
200
|
const title = this.getNodeParameter('title', i);
|
|
135
201
|
const description = this.getNodeParameter('description', i, '');
|
|
202
|
+
const privacy = this.getNodeParameter('privacy', i, 'public');
|
|
203
|
+
const madeForKids = this.getNodeParameter('madeForKids', i, 'false');
|
|
136
204
|
const tags = this.getNodeParameter('tags', i, '');
|
|
137
|
-
const
|
|
205
|
+
const category = this.getNodeParameter('category', i, '22');
|
|
206
|
+
const license = this.getNodeParameter('license', i, 'youtube');
|
|
207
|
+
const notifySubscribers = this.getNodeParameter('notifySubscribers', i, true);
|
|
208
|
+
const defaultLanguage = this.getNodeParameter('defaultLanguage', i, '');
|
|
138
209
|
const thumbnailProp = this.getNodeParameter('thumbnailBinaryPropertyName', i, '');
|
|
139
210
|
const videoUrl = await (0, api_1.nashirUploadBinary)(this, i, binaryProp);
|
|
211
|
+
const youtubeOptions = {
|
|
212
|
+
title,
|
|
213
|
+
privacy_status: privacy,
|
|
214
|
+
made_for_kids: madeForKids === 'true',
|
|
215
|
+
license,
|
|
216
|
+
notify_subscribers: notifySubscribers,
|
|
217
|
+
category_id: category,
|
|
218
|
+
};
|
|
219
|
+
if (tags) {
|
|
220
|
+
youtubeOptions.tags = tags.split(',').map((t) => t.trim()).filter(Boolean);
|
|
221
|
+
}
|
|
222
|
+
if (defaultLanguage) {
|
|
223
|
+
youtubeOptions.default_language = defaultLanguage;
|
|
224
|
+
}
|
|
140
225
|
const body = {
|
|
141
|
-
content:
|
|
142
|
-
description,
|
|
226
|
+
content: description,
|
|
143
227
|
platforms: ['youtube'],
|
|
144
228
|
account_ids: [accountId],
|
|
145
229
|
image_url: videoUrl,
|
|
146
|
-
|
|
147
|
-
publish_now: operation === 'uploadVideo',
|
|
230
|
+
youtube_options: youtubeOptions,
|
|
148
231
|
};
|
|
149
|
-
if (tags) {
|
|
150
|
-
body.tags = tags.split(',').map((t) => t.trim()).filter(Boolean);
|
|
151
|
-
}
|
|
152
232
|
if (thumbnailProp) {
|
|
153
233
|
body.thumbnail_url = await (0, api_1.nashirUploadBinary)(this, i, thumbnailProp);
|
|
154
234
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NashirYouTube.node.js","sourceRoot":"","sources":["../../../nodes/NashirYouTube/NashirYouTube.node.ts"],"names":[],"mappings":";;;AAUA,uCAAmF;AAEnF,MAAa,aAAa;IAA1B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,EAAE;YACtD,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,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,EAAE;wBACxE,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE;wBAChE,EAAE,IAAI,EAAE,gBAAgB,EAAE,KA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,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,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;AAvRD,sCAuRC"}
|
|
@@ -18,7 +18,7 @@ export class NashirTikTok implements INodeType {
|
|
|
18
18
|
group: ['transform'],
|
|
19
19
|
version: 1,
|
|
20
20
|
subtitle: '={{$parameter["operation"]}}',
|
|
21
|
-
description: 'Publish and manage TikTok
|
|
21
|
+
description: 'Publish and manage TikTok posts (video & photo) via nashir.ai',
|
|
22
22
|
defaults: { name: 'Nashir TikTok', color: '#000000' },
|
|
23
23
|
inputs: ['main'],
|
|
24
24
|
outputs: ['main'],
|
|
@@ -30,14 +30,15 @@ export class NashirTikTok implements INodeType {
|
|
|
30
30
|
type: 'options',
|
|
31
31
|
noDataExpression: true,
|
|
32
32
|
options: [
|
|
33
|
-
{ name: 'Delete Post',
|
|
34
|
-
{ name: 'Get Posts',
|
|
35
|
-
{ name: 'Publish
|
|
36
|
-
{ name: 'Schedule
|
|
33
|
+
{ name: 'Delete Post', value: 'deletePost', action: 'Delete a post' },
|
|
34
|
+
{ name: 'Get Posts', value: 'getPosts', action: 'Get posts' },
|
|
35
|
+
{ name: 'Publish Media', value: 'publishVideo', action: 'Publish a video or photo now' },
|
|
36
|
+
{ name: 'Schedule Media', value: 'scheduleVideo', action: 'Schedule a video or photo' },
|
|
37
37
|
],
|
|
38
38
|
default: 'publishVideo',
|
|
39
39
|
},
|
|
40
40
|
|
|
41
|
+
// ── Account ──────────────────────────────────────────────────────────
|
|
41
42
|
{
|
|
42
43
|
displayName: 'Account',
|
|
43
44
|
name: 'account',
|
|
@@ -48,41 +49,46 @@ export class NashirTikTok implements INodeType {
|
|
|
48
49
|
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
49
50
|
},
|
|
50
51
|
|
|
52
|
+
// ── Media file ───────────────────────────────────────────────────────
|
|
51
53
|
{
|
|
52
|
-
displayName: '
|
|
54
|
+
displayName: 'Media Binary Property',
|
|
53
55
|
name: 'binaryPropertyName',
|
|
54
56
|
type: 'string',
|
|
55
57
|
default: 'data',
|
|
56
58
|
required: true,
|
|
57
|
-
description: 'Name of the binary property containing the video file',
|
|
59
|
+
description: 'Name of the binary property containing the video or photo file',
|
|
58
60
|
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
59
61
|
},
|
|
60
62
|
|
|
63
|
+
// ── Caption ──────────────────────────────────────────────────────────
|
|
61
64
|
{
|
|
62
65
|
displayName: 'Caption',
|
|
63
66
|
name: 'caption',
|
|
64
67
|
type: 'string',
|
|
65
68
|
typeOptions: { rows: 4 },
|
|
66
69
|
default: '',
|
|
67
|
-
description:
|
|
70
|
+
description:
|
|
71
|
+
'Post caption. For TikTok the first line becomes the title (max 100 chars for video, 90 for photo).',
|
|
68
72
|
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
69
73
|
},
|
|
70
74
|
|
|
75
|
+
// ── Privacy ──────────────────────────────────────────────────────────
|
|
71
76
|
{
|
|
72
77
|
displayName: 'Privacy Level',
|
|
73
78
|
name: 'privacy_level',
|
|
74
79
|
type: 'options',
|
|
75
80
|
options: [
|
|
76
|
-
{ name: 'Public to Everyone',
|
|
81
|
+
{ name: 'Public to Everyone', value: 'PUBLIC_TO_EVERYONE' },
|
|
77
82
|
{ name: 'Mutual Follow Friends', value: 'MUTUAL_FOLLOW_FRIENDS' },
|
|
78
|
-
{ name: 'Follower of Creator',
|
|
79
|
-
{ name: 'Self Only',
|
|
83
|
+
{ name: 'Follower of Creator', value: 'FOLLOWER_OF_CREATOR' },
|
|
84
|
+
{ name: 'Self Only', value: 'SELF_ONLY' },
|
|
80
85
|
],
|
|
81
|
-
default: '',
|
|
86
|
+
default: 'PUBLIC_TO_EVERYONE',
|
|
82
87
|
required: true,
|
|
83
88
|
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
84
89
|
},
|
|
85
90
|
|
|
91
|
+
// ── Interactions ─────────────────────────────────────────────────────
|
|
86
92
|
{
|
|
87
93
|
displayName: 'Disable Comment',
|
|
88
94
|
name: 'disable_comment',
|
|
@@ -96,6 +102,7 @@ export class NashirTikTok implements INodeType {
|
|
|
96
102
|
name: 'disable_duet',
|
|
97
103
|
type: 'boolean',
|
|
98
104
|
default: false,
|
|
105
|
+
description: 'Only applies to video posts — ignored for photo posts',
|
|
99
106
|
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
100
107
|
},
|
|
101
108
|
|
|
@@ -104,9 +111,11 @@ export class NashirTikTok implements INodeType {
|
|
|
104
111
|
name: 'disable_stitch',
|
|
105
112
|
type: 'boolean',
|
|
106
113
|
default: false,
|
|
114
|
+
description: 'Only applies to video posts — ignored for photo posts',
|
|
107
115
|
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
108
116
|
},
|
|
109
117
|
|
|
118
|
+
// ── Brand / commercial content ────────────────────────────────────────
|
|
110
119
|
{
|
|
111
120
|
displayName: 'Brand Content',
|
|
112
121
|
name: 'brand_content_toggle',
|
|
@@ -121,7 +130,7 @@ export class NashirTikTok implements INodeType {
|
|
|
121
130
|
name: 'brand_organic_toggle',
|
|
122
131
|
type: 'boolean',
|
|
123
132
|
default: false,
|
|
124
|
-
description: '
|
|
133
|
+
description: 'You are promoting yourself or your own business',
|
|
125
134
|
displayOptions: {
|
|
126
135
|
show: {
|
|
127
136
|
operation: ['publishVideo', 'scheduleVideo'],
|
|
@@ -131,11 +140,11 @@ export class NashirTikTok implements INodeType {
|
|
|
131
140
|
},
|
|
132
141
|
|
|
133
142
|
{
|
|
134
|
-
displayName: 'Branded Content (
|
|
135
|
-
name: '
|
|
143
|
+
displayName: 'Branded Content (Paid Partnership)',
|
|
144
|
+
name: 'brand_branded_content_toggle',
|
|
136
145
|
type: 'boolean',
|
|
137
146
|
default: false,
|
|
138
|
-
description: '
|
|
147
|
+
description: 'You are promoting another brand\'s product or service (paid partnership)',
|
|
139
148
|
displayOptions: {
|
|
140
149
|
show: {
|
|
141
150
|
operation: ['publishVideo', 'scheduleVideo'],
|
|
@@ -144,6 +153,19 @@ export class NashirTikTok implements INodeType {
|
|
|
144
153
|
},
|
|
145
154
|
},
|
|
146
155
|
|
|
156
|
+
// ── Carousel (photo posts only) ───────────────────────────────────────
|
|
157
|
+
{
|
|
158
|
+
displayName: 'Additional Carousel Image URLs',
|
|
159
|
+
name: 'carousel_images',
|
|
160
|
+
type: 'string',
|
|
161
|
+
default: '',
|
|
162
|
+
description:
|
|
163
|
+
'Comma-separated public URLs of additional images for a carousel post (photo posts only). ' +
|
|
164
|
+
'The main media file is always the first/cover image. Up to 34 additional images.',
|
|
165
|
+
displayOptions: { show: { operation: ['publishVideo', 'scheduleVideo'] } },
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
// ── Schedule time ─────────────────────────────────────────────────────
|
|
147
169
|
{
|
|
148
170
|
displayName: 'Scheduled At',
|
|
149
171
|
name: 'scheduledAt',
|
|
@@ -153,6 +175,7 @@ export class NashirTikTok implements INodeType {
|
|
|
153
175
|
displayOptions: { show: { operation: ['scheduleVideo'] } },
|
|
154
176
|
},
|
|
155
177
|
|
|
178
|
+
// ── Delete ────────────────────────────────────────────────────────────
|
|
156
179
|
{
|
|
157
180
|
displayName: 'Post ID',
|
|
158
181
|
name: 'postId',
|
|
@@ -182,37 +205,50 @@ export class NashirTikTok implements INodeType {
|
|
|
182
205
|
let responseData: IDataObject | IDataObject[];
|
|
183
206
|
|
|
184
207
|
if (operation === 'publishVideo' || operation === 'scheduleVideo') {
|
|
185
|
-
const accountId
|
|
186
|
-
const binaryProp
|
|
187
|
-
const caption
|
|
188
|
-
const privacy_level
|
|
189
|
-
const disable_comment
|
|
190
|
-
const disable_duet
|
|
191
|
-
const disable_stitch
|
|
192
|
-
const brand_content_toggle
|
|
193
|
-
const brand_organic_toggle
|
|
208
|
+
const accountId = this.getNodeParameter('account', i) as string;
|
|
209
|
+
const binaryProp = this.getNodeParameter('binaryPropertyName', i, 'data') as string;
|
|
210
|
+
const caption = this.getNodeParameter('caption', i, '') as string;
|
|
211
|
+
const privacy_level = this.getNodeParameter('privacy_level', i) as string;
|
|
212
|
+
const disable_comment = this.getNodeParameter('disable_comment', i, false) as boolean;
|
|
213
|
+
const disable_duet = this.getNodeParameter('disable_duet', i, false) as boolean;
|
|
214
|
+
const disable_stitch = this.getNodeParameter('disable_stitch', i, false) as boolean;
|
|
215
|
+
const brand_content_toggle = this.getNodeParameter('brand_content_toggle', i, false) as boolean;
|
|
216
|
+
const brand_organic_toggle = brand_content_toggle
|
|
194
217
|
? (this.getNodeParameter('brand_organic_toggle', i, false) as boolean)
|
|
195
218
|
: false;
|
|
196
|
-
const
|
|
197
|
-
? (this.getNodeParameter('
|
|
219
|
+
const brand_branded_content_toggle = brand_content_toggle
|
|
220
|
+
? (this.getNodeParameter('brand_branded_content_toggle', i, false) as boolean)
|
|
198
221
|
: false;
|
|
222
|
+
const carousel_images_raw = this.getNodeParameter('carousel_images', i, '') as string;
|
|
223
|
+
|
|
224
|
+
// Upload binary and auto-detect media type from mimeType
|
|
225
|
+
const binaryData = this.helpers.assertBinaryData(i, binaryProp);
|
|
226
|
+
const mimeType = binaryData.mimeType ?? '';
|
|
227
|
+
const media_type: 'VIDEO' | 'PHOTO' = mimeType.startsWith('image/') ? 'PHOTO' : 'VIDEO';
|
|
228
|
+
|
|
229
|
+
const mediaUrl = await nashirUploadBinary(this, i, binaryProp);
|
|
199
230
|
|
|
200
|
-
|
|
231
|
+
// Parse optional carousel URLs
|
|
232
|
+
const carousel_images = carousel_images_raw
|
|
233
|
+
? carousel_images_raw.split(',').map((u) => u.trim()).filter(Boolean)
|
|
234
|
+
: undefined;
|
|
201
235
|
|
|
202
236
|
const body: IDataObject = {
|
|
203
237
|
content: caption,
|
|
204
238
|
platforms: ['tiktok'],
|
|
205
239
|
account_ids: [accountId],
|
|
206
|
-
image_url:
|
|
240
|
+
image_url: mediaUrl,
|
|
207
241
|
publish_now: operation === 'publishVideo',
|
|
208
242
|
tiktok_options: {
|
|
209
243
|
privacy_level,
|
|
210
244
|
disable_comment,
|
|
211
|
-
disable_duet,
|
|
212
|
-
disable_stitch,
|
|
245
|
+
disable_duet: media_type === 'VIDEO' ? disable_duet : false,
|
|
246
|
+
disable_stitch: media_type === 'VIDEO' ? disable_stitch : false,
|
|
213
247
|
brand_content_toggle,
|
|
214
248
|
brand_organic_toggle,
|
|
215
|
-
|
|
249
|
+
brand_branded_content_toggle,
|
|
250
|
+
media_type,
|
|
251
|
+
...(carousel_images?.length ? { carousel_images } : {}),
|
|
216
252
|
},
|
|
217
253
|
};
|
|
218
254
|
|
|
@@ -75,7 +75,34 @@ export class NashirYouTube implements INodeType {
|
|
|
75
75
|
type: 'string',
|
|
76
76
|
typeOptions: { rows: 4 },
|
|
77
77
|
default: '',
|
|
78
|
-
description: 'Video description',
|
|
78
|
+
description: 'Video description (caption)',
|
|
79
|
+
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
{
|
|
83
|
+
displayName: 'Privacy',
|
|
84
|
+
name: 'privacy',
|
|
85
|
+
type: 'options',
|
|
86
|
+
options: [
|
|
87
|
+
{ name: 'Public', value: 'public' },
|
|
88
|
+
{ name: 'Unlisted', value: 'unlisted' },
|
|
89
|
+
{ name: 'Private', value: 'private' },
|
|
90
|
+
],
|
|
91
|
+
default: 'public',
|
|
92
|
+
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
{
|
|
96
|
+
displayName: 'Made for Kids (COPPA)',
|
|
97
|
+
name: 'madeForKids',
|
|
98
|
+
type: 'options',
|
|
99
|
+
options: [
|
|
100
|
+
{ name: 'No — not made for kids', value: 'false' },
|
|
101
|
+
{ name: 'Yes — made for kids', value: 'true' },
|
|
102
|
+
],
|
|
103
|
+
default: 'false',
|
|
104
|
+
required: true,
|
|
105
|
+
description: 'Required by YouTube/COPPA. Select whether this video is made for children.',
|
|
79
106
|
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
80
107
|
},
|
|
81
108
|
|
|
@@ -89,15 +116,59 @@ export class NashirYouTube implements INodeType {
|
|
|
89
116
|
},
|
|
90
117
|
|
|
91
118
|
{
|
|
92
|
-
displayName: '
|
|
93
|
-
name: '
|
|
119
|
+
displayName: 'Category',
|
|
120
|
+
name: 'category',
|
|
94
121
|
type: 'options',
|
|
95
122
|
options: [
|
|
96
|
-
{ name: '
|
|
97
|
-
{ name: '
|
|
98
|
-
{ name: '
|
|
123
|
+
{ name: 'Autos & Vehicles', value: '2' },
|
|
124
|
+
{ name: 'Comedy', value: '23' },
|
|
125
|
+
{ name: 'Education', value: '27' },
|
|
126
|
+
{ name: 'Entertainment', value: '24' },
|
|
127
|
+
{ name: 'Film & Animation', value: '1' },
|
|
128
|
+
{ name: 'Gaming', value: '20' },
|
|
129
|
+
{ name: 'Howto & Style', value: '26' },
|
|
130
|
+
{ name: 'Music', value: '10' },
|
|
131
|
+
{ name: 'News & Politics', value: '25' },
|
|
132
|
+
{ name: 'Nonprofits & Activism', value: '29' },
|
|
133
|
+
{ name: 'People & Blogs', value: '22' },
|
|
134
|
+
{ name: 'Pets & Animals', value: '15' },
|
|
135
|
+
{ name: 'Science & Technology', value: '28' },
|
|
136
|
+
{ name: 'Sports', value: '17' },
|
|
137
|
+
{ name: 'Travel & Events', value: '19' },
|
|
99
138
|
],
|
|
100
|
-
default: '
|
|
139
|
+
default: '22',
|
|
140
|
+
description: 'YouTube video category',
|
|
141
|
+
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
{
|
|
145
|
+
displayName: 'License',
|
|
146
|
+
name: 'license',
|
|
147
|
+
type: 'options',
|
|
148
|
+
options: [
|
|
149
|
+
{ name: 'Standard YouTube License', value: 'youtube' },
|
|
150
|
+
{ name: 'Creative Commons — Attribution', value: 'creativeCommon' },
|
|
151
|
+
],
|
|
152
|
+
default: 'youtube',
|
|
153
|
+
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
{
|
|
157
|
+
displayName: 'Notify Subscribers',
|
|
158
|
+
name: 'notifySubscribers',
|
|
159
|
+
type: 'boolean',
|
|
160
|
+
default: true,
|
|
161
|
+
description: 'Whether to send a notification to subscribers when the video is published',
|
|
162
|
+
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
{
|
|
166
|
+
displayName: 'Default Language',
|
|
167
|
+
name: 'defaultLanguage',
|
|
168
|
+
type: 'string',
|
|
169
|
+
default: '',
|
|
170
|
+
placeholder: 'e.g. en, ar, fr',
|
|
171
|
+
description: 'BCP-47 language code for the video title and description (optional)',
|
|
101
172
|
displayOptions: { show: { operation: ['uploadVideo', 'scheduleVideo'] } },
|
|
102
173
|
},
|
|
103
174
|
|
|
@@ -152,26 +223,41 @@ export class NashirYouTube implements INodeType {
|
|
|
152
223
|
const binaryProp = this.getNodeParameter('binaryPropertyName', i, 'data') as string;
|
|
153
224
|
const title = this.getNodeParameter('title', i) as string;
|
|
154
225
|
const description = this.getNodeParameter('description', i, '') as string;
|
|
226
|
+
const privacy = this.getNodeParameter('privacy', i, 'public') as string;
|
|
227
|
+
const madeForKids = this.getNodeParameter('madeForKids', i, 'false') as string;
|
|
155
228
|
const tags = this.getNodeParameter('tags', i, '') as string;
|
|
156
|
-
const
|
|
229
|
+
const category = this.getNodeParameter('category', i, '22') as string;
|
|
230
|
+
const license = this.getNodeParameter('license', i, 'youtube') as string;
|
|
231
|
+
const notifySubscribers = this.getNodeParameter('notifySubscribers', i, true) as boolean;
|
|
232
|
+
const defaultLanguage = this.getNodeParameter('defaultLanguage', i, '') as string;
|
|
157
233
|
const thumbnailProp = this.getNodeParameter('thumbnailBinaryPropertyName', i, '') as string;
|
|
158
234
|
|
|
159
235
|
const videoUrl = await nashirUploadBinary(this, i, binaryProp);
|
|
160
236
|
|
|
237
|
+
const youtubeOptions: IDataObject = {
|
|
238
|
+
title,
|
|
239
|
+
privacy_status: privacy,
|
|
240
|
+
made_for_kids: madeForKids === 'true',
|
|
241
|
+
license,
|
|
242
|
+
notify_subscribers: notifySubscribers,
|
|
243
|
+
category_id: category,
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
if (tags) {
|
|
247
|
+
youtubeOptions.tags = tags.split(',').map((t) => t.trim()).filter(Boolean);
|
|
248
|
+
}
|
|
249
|
+
if (defaultLanguage) {
|
|
250
|
+
youtubeOptions.default_language = defaultLanguage;
|
|
251
|
+
}
|
|
252
|
+
|
|
161
253
|
const body: IDataObject = {
|
|
162
|
-
content:
|
|
163
|
-
description,
|
|
254
|
+
content: description,
|
|
164
255
|
platforms: ['youtube'],
|
|
165
256
|
account_ids: [accountId],
|
|
166
257
|
image_url: videoUrl,
|
|
167
|
-
|
|
168
|
-
publish_now: operation === 'uploadVideo',
|
|
258
|
+
youtube_options: youtubeOptions,
|
|
169
259
|
};
|
|
170
260
|
|
|
171
|
-
if (tags) {
|
|
172
|
-
body.tags = tags.split(',').map((t) => t.trim()).filter(Boolean);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
261
|
if (thumbnailProp) {
|
|
176
262
|
body.thumbnail_url = await nashirUploadBinary(this, i, thumbnailProp);
|
|
177
263
|
}
|
package/package.json
CHANGED