-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.d.ts
More file actions
776 lines (682 loc) · 24.1 KB
/
Copy pathindex.d.ts
File metadata and controls
776 lines (682 loc) · 24.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
declare module 'upload-post' {
// ==================== Common Types ====================
/** Supported platforms for video upload */
export type VideoPlatform = 'tiktok' | 'instagram' | 'youtube' | 'linkedin' | 'facebook' | 'pinterest' | 'threads' | 'bluesky' | 'x' | 'google_business' | 'discord' | 'telegram';
/** Supported platforms for photo upload */
export type PhotoPlatform = 'tiktok' | 'instagram' | 'linkedin' | 'facebook' | 'pinterest' | 'threads' | 'reddit' | 'bluesky' | 'x' | 'google_business' | 'discord' | 'telegram';
/** Supported platforms for text upload */
export type TextPlatform = 'x' | 'linkedin' | 'facebook' | 'threads' | 'reddit' | 'bluesky' | 'google_business' | 'discord' | 'telegram';
/** TikTok privacy levels */
export type TikTokPrivacyLevel = 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | 'SELF_ONLY';
/** TikTok post modes */
export type TikTokPostMode = 'DIRECT_POST' | 'MEDIA_UPLOAD';
/** Instagram media types for video */
export type InstagramVideoMediaType = 'REELS' | 'STORIES';
/** Instagram media types for photos */
export type InstagramPhotoMediaType = 'IMAGE' | 'STORIES';
/** YouTube privacy status */
export type YouTubePrivacyStatus = 'public' | 'unlisted' | 'private';
/** YouTube license */
export type YouTubeLicense = 'youtube' | 'creativeCommon';
/** LinkedIn visibility */
export type LinkedInVisibility = 'PUBLIC' | 'CONNECTIONS' | 'LOGGED_IN' | 'CONTAINER';
/** Facebook video state */
export type FacebookVideoState = 'PUBLISHED' | 'DRAFT';
/** Facebook media type */
export type FacebookMediaType = 'REELS' | 'STORIES' | 'VIDEO';
/** X (Twitter) reply settings */
export type XReplySettings = 'everyone' | 'following' | 'mentionedUsers' | 'subscribers' | 'verified';
// ==================== Common Options ====================
export interface CommonUploadOptions {
/** Post title/caption. Required for YouTube, Reddit, and text posts. Optional for TikTok, Instagram, Facebook, LinkedIn, X, Threads, Bluesky, Pinterest. */
title?: string;
/** User identifier (profile name) */
user: string;
/** First comment to post after publishing */
firstComment?: string;
/** Alt text for accessibility */
altText?: string;
/** ISO date for scheduling (e.g., "2024-12-25T10:00:00Z") */
scheduledDate?: string;
/** Timezone for scheduled date (e.g., "Europe/Madrid") */
timezone?: string;
/** Add to posting queue instead of immediate post */
addToQueue?: boolean;
/** Maximum number of posts allowed per queue slot (overrides profile setting). Only used when addToQueue is true. */
maxPostsPerSlot?: number;
/** Process upload asynchronously (default: true) */
asyncUpload?: boolean;
/** If true, AI generates native per-platform title/description from the media and fills any field left empty */
autogenerate?: boolean;
/** Generate only the title with AI */
autogenerateTitle?: boolean;
/** Generate only the description with AI */
autogenerateDescription?: boolean;
/** Force the AI output language (ISO code); omit to auto-detect from the media */
autogenerateLanguage?: string;
// Platform-specific title overrides
blueskyTitle?: string;
instagramTitle?: string;
facebookTitle?: string;
tiktokTitle?: string;
linkedinTitle?: string;
xTitle?: string;
youtubeTitle?: string;
pinterestTitle?: string;
threadsTitle?: string;
// Platform-specific description overrides
description?: string;
linkedinDescription?: string;
youtubeDescription?: string;
facebookDescription?: string;
tiktokDescription?: string;
pinterestDescription?: string;
// Platform-specific first comment overrides
instagramFirstComment?: string;
facebookFirstComment?: string;
xFirstComment?: string;
threadsFirstComment?: string;
youtubeFirstComment?: string;
redditFirstComment?: string;
blueskyFirstComment?: string;
}
// ==================== TikTok Options ====================
export interface TikTokVideoOptions {
/** Privacy setting */
tiktokPrivacyLevel?: TikTokPrivacyLevel;
/** Disable duet */
tiktokDisableDuet?: boolean;
/** Disable comments */
tiktokDisableComment?: boolean;
/** Disable stitch */
tiktokDisableStitch?: boolean;
/** Timestamp in ms for video cover */
tiktokCoverTimestamp?: number;
/** AI-generated content flag */
tiktokIsAigc?: boolean;
/** Post mode */
tiktokPostMode?: TikTokPostMode;
/** Branded content toggle */
brandContentToggle?: boolean;
/** Brand organic toggle */
brandOrganicToggle?: boolean;
}
export interface TikTokPhotoOptions {
/** Auto add music */
tiktokAutoAddMusic?: boolean;
/** Disable comments */
tiktokDisableComment?: boolean;
/** Index of photo for cover (0-based) */
tiktokPhotoCoverIndex?: number;
/** Branded content toggle */
brandContentToggle?: boolean;
/** Brand organic toggle */
brandOrganicToggle?: boolean;
}
// ==================== Instagram Options ====================
export interface InstagramVideoOptions {
/** Media type */
instagramMediaType?: InstagramVideoMediaType;
/** Share to feed */
instagramShareToFeed?: boolean;
/** Comma-separated collaborator usernames */
instagramCollaborators?: string;
/** Custom cover: URL string, file path, Buffer, or ReadableStream */
instagramCoverUrl?: string | Buffer | NodeJS.ReadableStream;
/** Audio track name */
instagramAudioName?: string;
/** Comma-separated user tags */
instagramUserTags?: string;
/** Location ID */
instagramLocationId?: string;
/** Thumbnail offset */
instagramThumbOffset?: string;
}
export interface InstagramPhotoOptions {
/** Media type */
instagramMediaType?: InstagramPhotoMediaType;
/** Comma-separated collaborator usernames */
instagramCollaborators?: string;
/** Comma-separated user tags */
instagramUserTags?: string;
/** Location ID */
instagramLocationId?: string;
}
// ==================== YouTube Options ====================
export interface YouTubeOptions {
/** Video tags */
youtubeTags?: string | string[];
/** Category ID (e.g., "22" for People & Blogs) */
youtubeCategoryId?: string;
/** Privacy status */
youtubePrivacyStatus?: YouTubePrivacyStatus;
/** Allow embedding */
youtubeEmbeddable?: boolean;
/** Video license */
youtubeLicense?: YouTubeLicense;
/** Show public stats */
youtubePublicStatsViewable?: boolean;
/** Custom thumbnail URL */
youtubeThumbnailUrl?: string;
/** Made for kids flag (COPPA) */
youtubeSelfDeclaredMadeForKids?: boolean;
/** AI/synthetic content flag */
youtubeContainsSyntheticMedia?: boolean;
/** Title/description language (BCP-47) */
youtubeDefaultLanguage?: string;
/** Audio language (BCP-47) */
youtubeDefaultAudioLanguage?: string;
/** Comma-separated allowed country codes */
youtubeAllowedCountries?: string;
/** Comma-separated blocked country codes */
youtubeBlockedCountries?: string;
/** Paid product placement flag */
youtubeHasPaidProductPlacement?: boolean;
/** Recording date (ISO 8601) */
youtubeRecordingDate?: string;
/** Subtitle/caption files to upload. Each entry needs a language code and either a file path or URL. */
youtubeSubtitles?: Array<{
/** BCP-47 language code (e.g. "en", "es") */
language: string;
/** Display name for the subtitle track (e.g. "English", "Español") */
name?: string;
/** Path to the subtitle file (SRT, VTT, SBV, SUB, ASS, SSA, TTML) */
file?: string;
/** URL to the subtitle file */
url?: string;
}>;
}
// ==================== LinkedIn Options ====================
export interface LinkedInOptions {
/** Visibility setting */
linkedinVisibility?: LinkedInVisibility;
/** Page ID for organization posts */
targetLinkedinPageId?: string;
}
// ==================== Facebook Options ====================
export interface FacebookVideoOptions {
/** Facebook Page ID */
facebookPageId?: string;
/** Video state */
facebookVideoState?: FacebookVideoState;
/** Media type */
facebookMediaType?: FacebookMediaType;
/** Thumbnail URL for normal page videos (only when facebookMediaType is 'VIDEO') */
thumbnailUrl?: string;
}
export interface FacebookPhotoOptions {
/** Facebook Page ID */
facebookPageId?: string;
}
export interface FacebookTextOptions {
/** Facebook Page ID */
facebookPageId?: string;
/** URL to attach as link preview */
facebookLinkUrl?: string;
}
// ==================== Pinterest Options ====================
export interface PinterestVideoOptions {
/** Board ID */
pinterestBoardId?: string;
/** Destination link */
pinterestLink?: string;
/** Cover image URL */
pinterestCoverImageUrl?: string;
/** Cover image content type */
pinterestCoverImageContentType?: string;
/** Base64-encoded cover image data */
pinterestCoverImageData?: string;
/** Key frame time in ms for cover */
pinterestCoverImageKeyFrameTime?: number;
}
export interface PinterestPhotoOptions {
/** Board ID */
pinterestBoardId?: string;
/** Alt text */
pinterestAltText?: string;
/** Destination link */
pinterestLink?: string;
}
// ==================== X (Twitter) Options ====================
export interface XBaseOptions {
/** Who can reply */
xReplySettings?: XReplySettings;
/** Promoted-only post */
xNullcast?: boolean;
/** Geographic place ID */
xGeoPlaceId?: string;
/** Exclusive for super followers */
xForSuperFollowersOnly?: boolean;
/** Community ID */
xCommunityId?: string;
/** Share community post with followers */
xShareWithFollowers?: boolean;
/** Direct message deep link */
xDirectMessageDeepLink?: string;
/** Post long text as single post */
xLongTextAsPost?: boolean;
}
export interface XMediaOptions extends XBaseOptions {
/** User IDs to tag */
xTaggedUserIds?: string | string[];
/** Location place ID */
xPlaceId?: string;
/** Comma-separated image layout for thread (e.g. "4,4" or "2,3,1"). Each value 1-4, total must equal image count. */
xThreadImageLayout?: string;
}
export interface XTextOptions extends XBaseOptions {
/** URL to attach */
xPostUrl?: string;
/** Tweet ID to quote */
xQuoteTweetId?: string;
/** Poll options (2-4 options) */
xPollOptions?: string | string[];
/** Poll duration in minutes (5-10080) */
xPollDuration?: number;
/** Who can reply to poll */
xPollReplySettings?: XReplySettings;
/** Card URI for Twitter Cards */
xCardUri?: string;
}
// ==================== Threads Options ====================
export interface ThreadsOptions {
/** Post long text as single post (vs thread) */
threadsLongTextAsPost?: boolean;
/** Comma-separated list of how many media items per Threads post (e.g. "5,5"). Each value 1-10, total must equal file count. */
threadsThreadMediaLayout?: string;
}
// ==================== Reddit Options ====================
export interface RedditOptions {
/** Subreddit name (without r/) */
redditSubreddit?: string;
/** Flair template ID */
redditFlairId?: string;
}
// ==================== Combined Upload Options ====================
export interface UploadVideoOptions extends CommonUploadOptions,
TikTokVideoOptions,
InstagramVideoOptions,
YouTubeOptions,
LinkedInOptions,
FacebookVideoOptions,
PinterestVideoOptions,
XMediaOptions,
ThreadsOptions {
/** Target platforms */
platforms: VideoPlatform[];
}
export interface UploadPhotosOptions extends CommonUploadOptions,
TikTokPhotoOptions,
InstagramPhotoOptions,
LinkedInOptions,
FacebookPhotoOptions,
PinterestPhotoOptions,
XMediaOptions,
ThreadsOptions,
RedditOptions {
/** Target platforms */
platforms: PhotoPlatform[];
}
export interface LinkPreviewOptions {
/** Generic URL for link preview card (works for LinkedIn, Bluesky, Facebook). Platform-specific params take priority. */
linkUrl?: string;
/** URL for link preview card on LinkedIn */
linkedinLinkUrl?: string;
/** URL for external embed link preview on Bluesky */
blueskyLinkUrl?: string;
}
export interface UploadTextOptions extends CommonUploadOptions,
LinkedInOptions,
FacebookTextOptions,
XTextOptions,
ThreadsOptions,
RedditOptions,
LinkPreviewOptions {
/** Target platforms */
platforms: TextPlatform[];
}
export interface UploadDocumentOptions {
/** Post title/caption */
title: string;
/** User identifier (profile name) */
user: string;
/** Document description/commentary */
description?: string;
/** Visibility setting */
linkedinVisibility?: LinkedInVisibility;
/** Page ID for organization posts */
targetLinkedinPageId?: string;
/** ISO date for scheduling */
scheduledDate?: string;
/** Timezone for scheduled date */
timezone?: string;
/** Add to posting queue */
addToQueue?: boolean;
/** Maximum number of posts allowed per queue slot (overrides profile setting). Only used when addToQueue is true. */
maxPostsPerSlot?: number;
/** Process upload asynchronously */
asyncUpload?: boolean;
}
// ==================== Response Types ====================
export interface UploadResponse {
success: boolean;
request_id?: string;
message?: string;
data?: {
status?: string;
platforms?: Array<{
name: string;
url?: string;
error?: string;
}>;
[key: string]: any;
};
[key: string]: any;
}
export interface StatusResponse {
success: boolean;
status?: string;
request_id?: string;
data?: any;
[key: string]: any;
}
export interface HistoryResponse {
success: boolean;
uploads?: any[];
page?: number;
total?: number;
[key: string]: any;
}
export interface AnalyticsResponse {
success: boolean;
analytics?: any;
[key: string]: any;
}
export interface ScheduledResponse {
success: boolean;
scheduled?: any[];
[key: string]: any;
}
export interface UserProfile {
username: string;
social_accounts?: Record<string, any>;
created_at?: string;
}
export interface UsersResponse {
success: boolean;
profiles?: UserProfile[];
[key: string]: any;
}
export interface JwtResponse {
success: boolean;
jwt?: string;
connection_url?: string;
[key: string]: any;
}
export interface PagesResponse {
success: boolean;
pages?: Array<{ id: string; name?: string }>;
[key: string]: any;
}
export interface BoardsResponse {
success: boolean;
boards?: Array<{ id: string; name?: string }>;
[key: string]: any;
}
// ==================== Client Class ====================
/**
* Upload-Post API client
*
* Supports uploading to: TikTok, Instagram, YouTube, LinkedIn, Facebook,
* Pinterest, Threads, Reddit, Bluesky, X (Twitter), Discord, Telegram
*/
export class UploadPost {
/**
* Create a new Upload-Post client
* @param apiKey - Your API key from Upload-Post
*/
constructor(apiKey: string);
// Upload methods
/**
* Upload a video to social media platforms
* @param videoPathOrUrl - Path to video file or video URL
* @param options - Upload options
*/
upload(videoPathOrUrl: string, options: UploadVideoOptions): Promise<UploadResponse>;
/**
* Upload photos to social media platforms
* @param photosPathsOrUrls - Array of photo file paths or URLs
* @param options - Upload options
*/
uploadPhotos(photosPathsOrUrls: string[], options: UploadPhotosOptions): Promise<UploadResponse>;
/**
* Upload text posts to social media platforms
* @param options - Upload options
*/
uploadText(options: UploadTextOptions): Promise<UploadResponse>;
/**
* Upload a document to LinkedIn (PDF, PPT, PPTX, DOC, DOCX)
* @param documentPathOrUrl - Path to document file or document URL
* @param options - Upload options
*/
uploadDocument(documentPathOrUrl: string, options: UploadDocumentOptions): Promise<UploadResponse>;
// Status & History
/**
* Get the status of an async upload
* @param requestId - The request_id from an async upload
*/
getStatus(requestId: string): Promise<StatusResponse>;
/**
* Get the status of a scheduled or queued upload by job ID
* @param jobId - The job_id from a scheduled or queued upload
*/
getJobStatus(jobId: string): Promise<StatusResponse>;
/**
* Get upload history
* @param options - Query options
*/
getHistory(options?: { page?: number; limit?: number }): Promise<HistoryResponse>;
/**
* Get analytics for a profile
* @param profileUsername - Profile username
* @param options - Query options
*/
getAnalytics(profileUsername: string, options?: { platforms?: string[]; pageId?: string; pageUrn?: string }): Promise<AnalyticsResponse>;
/**
* Get total impressions for a profile from daily snapshots
* @param profileUsername - Profile username
* @param options - Query options
*/
getTotalImpressions(profileUsername: string, options?: {
period?: 'last_day' | 'last_week' | 'last_month' | 'last_3months' | 'last_year';
startDate?: string;
endDate?: string;
date?: string;
platforms?: string[];
breakdown?: boolean;
metrics?: string[];
}): Promise<{
success: boolean;
profile_username: string;
start_date: string;
end_date: string;
total_impressions?: number;
metrics?: Record<string, number>;
per_platform?: Record<string, number | Record<string, number>>;
per_day?: Record<string, number | Record<string, number>>;
platforms_filter?: string[];
}>;
/**
* Get analytics for a specific post across all platforms
* @param requestId - The request_id from the upload
*/
getPostAnalytics(requestId: string): Promise<{
success: boolean;
post: { request_id: string; profile_username: string; post_title: string; post_caption: string; media_type: string; upload_timestamp: string };
platforms: Record<string, {
success: boolean;
platform_post_id?: string;
post_url?: string;
post_metrics?: Record<string, number>;
post_metrics_source?: string;
post_metrics_error?: string;
profile_snapshot_at_post_date?: Record<string, number>;
profile_snapshot_latest?: Record<string, number>;
profile_snapshot_latest_date?: string;
error_message?: string;
}>;
}>;
/**
* Get available metrics configuration for all supported platforms
*/
getPlatformMetrics(): Promise<Record<string, {
primary_impressions_field: string;
available_metrics: string[];
metric_labels: Record<string, string>;
}>>;
/**
* Get recent media from a connected social account.
*
* @param options.pageUrn - LinkedIn only. Numeric org ID, full org URN, or "me" to force the personal profile.
*/
getMedia(
platform: 'instagram' | 'tiktok' | 'youtube' | 'linkedin' | 'facebook' | 'x' | 'threads' | 'pinterest' | 'bluesky' | 'reddit' | string,
user: string,
options?: { pageUrn?: string }
): Promise<{
success: boolean;
media: Array<{
id: string;
caption: string | null;
media_type: 'IMAGE' | 'VIDEO' | 'CAROUSEL_ALBUM' | 'TEXT' | string;
media_url: string | null;
permalink: string | null;
timestamp: string | null;
thumbnail_url: string | null;
}>;
}>;
// Scheduled Posts
/**
* List scheduled posts
*/
listScheduled(): Promise<ScheduledResponse>;
/**
* Cancel a scheduled post
* @param jobId - Scheduled job ID
*/
cancelScheduled(jobId: string): Promise<{ success: boolean }>;
/**
* Edit a scheduled post
* @param jobId - Scheduled job ID
* @param options - Edit options
*/
editScheduled(jobId: string, options: { scheduledDate?: string; timezone?: string }): Promise<{ success: boolean }>;
// User Management
/**
* List all users/profiles
*/
listUsers(): Promise<UsersResponse>;
/**
* Create a new user/profile
* @param username - Profile name to create
*/
createUser(username: string): Promise<{ success: boolean; username?: string }>;
/**
* Delete a user/profile
* @param username - Profile name to delete
*/
deleteUser(username: string): Promise<{ success: boolean }>;
/**
* Generate a JWT for platform integration
* @param username - Profile username
* @param options - JWT options
*/
generateJwt(username: string, options?: {
redirectUrl?: string;
logoImage?: string;
redirectButtonText?: string;
platforms?: string[];
showCalendar?: boolean;
readonlyCalendar?: boolean;
connectTitle?: string;
connectDescription?: string;
language?: 'en' | 'es' | 'de' | 'fr' | 'pt';
}): Promise<JwtResponse>;
/**
* Validate a JWT token
* @param jwt - JWT token to validate
*/
validateJwt(jwt: string): Promise<{ success: boolean; valid?: boolean }>;
/**
* Get user preferences (including calendar settings)
*/
getUserPreferences(): Promise<{ success: boolean; preferences?: { week_start_day?: number; [key: string]: any } }>;
/**
* Update user preferences (including calendar settings)
* @param options - Preferences options
*/
updateUserPreferences(options?: { weekStartDay?: number }): Promise<{ success: boolean; preferences?: { week_start_day?: number; [key: string]: any } }>;
/**
* Get notification configuration (including webhook settings)
*/
getNotificationConfig(): Promise<{ success: boolean; config?: { webhook_events?: string[]; webhook_url?: string; [key: string]: any } }>;
/**
* Update notification configuration (including webhook settings)
* @param options - Notification config options
*/
updateNotificationConfig(options?: { webhookEvents?: string[]; webhookUrl?: string }): Promise<{ success: boolean; config?: { webhook_events?: string[]; webhook_url?: string; [key: string]: any } }>;
// Instagram Comments
/**
* Get comments on an Instagram post
* @param user - Profile username
* @param options - Query options
*/
getPostComments(user: string, options?: { postId?: string; postUrl?: string }): Promise<{
success: boolean;
comments?: Array<{
id: string;
text: string;
timestamp: string;
user: { id: string; username: string };
}>;
}>;
/**
* Send a private reply (DM) to the author of an Instagram comment
* @param options - Reply options
*/
replyToComment(options: { user: string; commentId: string; message: string }): Promise<{
success: boolean;
recipient_id?: string;
message_id?: string;
message?: string;
error?: string;
}>;
/**
* Post a public reply to an Instagram comment (visible under the original comment)
* @param options - Reply options
*/
publicReplyToComment(options: { user: string; commentId: string; message: string }): Promise<{
success: boolean;
id?: string;
message?: string;
error?: string;
}>;
// Helper Endpoints
/**
* Get Facebook pages for a profile
* @param profile - Profile username
*/
getFacebookPages(profile?: string): Promise<PagesResponse>;
/**
* Get LinkedIn pages for a profile
* @param profile - Profile username
*/
getLinkedinPages(profile?: string): Promise<PagesResponse>;
/**
* Get Pinterest boards for a profile
* @param profile - Profile username
*/
getPinterestBoards(profile?: string): Promise<BoardsResponse>;
}
export default UploadPost;
}