@posty5/social-publisher-post 2.0.0 → 4.0.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/README.md CHANGED
@@ -1,957 +1,986 @@
1
- # @posty5/social-publisher-post
2
-
3
- Official Posty5 SDK for managing social media publishing posts. Publish videos to YouTube Shorts, TikTok, Facebook Reels, and Instagram Reels with a unified, developer-friendly API.
4
-
5
- ---
6
-
7
- ## 🌟 What is Posty5?
8
-
9
- **Posty5** is a comprehensive suite of free online tools designed to enhance your digital marketing and social media presence. With over 4+ powerful tools and counting, Posty5 provides everything you need to:
10
-
11
- - 🔗 **Shorten URLs** - Create memorable, trackable short links
12
- - 📱 **Generate QR Codes** - Transform URLs, WiFi credentials, contact cards, and more into scannable codes
13
- - 🌐 **Host HTML Pages** - Deploy static HTML pages with dynamic variables and form submission handling
14
- - 📢 **Automate Social Media** - Schedule and manage social media posts across multiple platforms
15
- - 📊 **Track Performance** - Monitor and analyze your digital marketing efforts
16
-
17
- Posty5 empowers businesses, marketers, and developers to streamline their online workflows—all from a unified control panel.
18
-
19
- **Learn more:** [https://posty5.com](https://posty5.com)
20
-
21
- ---
22
-
23
- ## 📦 About This Package
24
-
25
- `@posty5/social-publisher-post` is the **post management client** for the Posty5 Social Media Publisher. This package enables you to programmatically publish short-form videos to multiple social media platforms simultaneously from a single API call.
26
-
27
- ### What are Social Publisher Posts?
28
-
29
- Posts represent video publishing jobs that distribute your content across YouTube Shorts, TikTok, Facebook Reels, and Instagram Reels. Each post handles the entire publishing workflow: video upload, platform-specific configuration, scheduling, and status tracking.
30
-
31
- ### Key Capabilities
32
-
33
- - **Multi-Platform Publishing** - Publish to YouTube, TikTok, Facebook, and Instagram in one API call
34
- - **Flexible Video Sources** - Upload files, provide URLs, or repost from other platforms (auto-detected)
35
- - **Smart Thumbnail Handling** - Upload files or provide URLs for thumbnail images
36
- - **Platform-Specific Configuration** - Customize titles, descriptions, captions, tags, and privacy settings per platform
37
- - **Schedule Publishing** - Publish immediately or schedule for optimal engagement times
38
- - **Repost Detection** - Automatically detect and repost from Facebook, TikTok, and YouTube Shorts URLs
39
- - **Post Status Tracking** - Monitor publishing progress and platform-specific status
40
- - **Tag & Reference System** - Organize posts using custom tags and reference IDs
41
- - **Pagination & Filtering** - Search posts by workspace, status, tag, or reference ID
42
-
43
- ### Why Use This Package?
44
-
45
- - **Time Saving**: Publish to 4 platforms with a single API call instead of managing each separately
46
- - **Automated Workflow**: Integrate multi-platform publishing into your content pipeline
47
- - **Content Repurposing**: Automatically repost viral content from other platforms
48
- - **Consistent Branding**: Apply platform-optimized metadata while maintaining brand voice
49
- - **Progress Tracking**: Monitor post status and handle errors programmatically
50
-
51
- ### Supported Platforms
52
-
53
- | Platform | Content Type | Custom Thumbnails | Max File Size |
54
- | --------- | ------------ | ----------------- | ------------- |
55
- | YouTube | Shorts | ✅ Yes | 2 GB |
56
- | TikTok | Videos | ❌ No | 2 GB |
57
- | Facebook | Reels | ❌ No | 2 GB |
58
- | Instagram | Reels | ❌ No | 2 GB |
59
-
60
- ---
61
-
62
- ## 📥 Installation
63
-
64
- Install via npm:
65
-
66
- ```bash
67
- npm install @posty5/social-publisher-post @posty5/core
68
- ```
69
-
70
- ---
71
-
72
- ## 🚀 Quick Start
73
-
74
- ```typescript
75
- import { HttpClient } from "@posty5/core";
76
- import { SocialPublisherPostClient } from "@posty5/social-publisher-post";
77
-
78
- // Initialize the HTTP client with your API key
79
- const httpClient = new HttpClient({
80
- apiKey: "your-api-key", // Get from studio.posty5.com/account/settings?tab=APIKeys
81
- debug: true, // Optional: Enable debug logging
82
- });
83
-
84
- // Create post client
85
- const client = new SocialPublisherPostClient(httpClient);
86
-
87
- // Publish video to YouTube Shorts
88
- const postId = await client.publishShortVideo({
89
- workspaceId: "workspace-123", // Your workspace ID
90
- video: videoFile, // File object or URL string
91
- thumbnail: thumbFile, // Optional: File or URL
92
- platforms: ["youtube"], // Target platforms
93
- youtube: {
94
- title: "My First YouTube Short",
95
- description: "Published using Posty5 SDK",
96
- tags: ["shorts", "video", "tutorial"],
97
- },
98
- });
99
-
100
- console.log("Post created:", postId);
101
-
102
- // Check post status
103
- const status = await client.getStatus(postId);
104
- console.log("Publishing status:", status.currentStatus);
105
- console.log("YouTube:", status.youtube?.postInfo.currentStatus);
106
- ```
107
-
108
- ---
109
-
110
- ## 📚 API Reference & Examples
111
-
112
- ### publishShortVideo()
113
-
114
- Publish a short video to one or more social media platforms. This is the main method for creating publishing posts. It automatically detects video source type (File upload, URL, or platform-specific repost URL) and handles all upload logic.
115
-
116
- **Parameters:**
117
-
118
- - `options` (IPublishOptions): Publishing configuration
119
- - `workspaceId` (string, required): Workspace ID containing connected social accounts
120
- - `video` (File | string, required): Video source - File object, direct URL, or platform URL (Facebook/TikTok/YouTube)
121
- - `thumbnail` (File | string, optional): Thumbnail image - File object or URL string
122
- - `platforms` (Array<'youtube' | 'tiktok' | 'facebook' | 'instagram'>, required): Target platforms
123
- - `youtube` (IYouTubeConfig, optional): YouTube configuration - required if 'youtube' in platforms
124
- - `tiktok` (ITikTokConfig, optional): TikTok configuration - required if 'tiktok' in platforms
125
- - `facebook` (IFacebookPageConfig, optional): Facebook configuration - required if 'facebook' in platforms
126
- - `instagram` (IInstagramConfig, optional): Instagram configuration - required if 'instagram' in platforms
127
- - `schedule` ('now' | Date, optional): Publish immediately (default) or schedule for specific date/time
128
- - `tag` (string, optional): Custom tag for filtering
129
- - `refId` (string, optional): Your internal reference ID
130
-
131
- **Returns:** `Promise<string>` - Created post ID
132
-
133
- **Example - Upload Video File:**
134
-
135
- ```typescript
136
- import * as fs from "fs";
137
-
138
- // Read video and thumbnail files
139
- const videoFile = fs.readFileSync("./video.mp4");
140
- const thumbFile = fs.readFileSync("./thumbnail.jpg");
141
-
142
- // Create File objects
143
- const video = new File([videoFile], "video.mp4", { type: "video/mp4" });
144
- const thumbnail = new File([thumbFile], "thumb.jpg", { type: "image/jpeg" });
145
-
146
- // Publish to YouTube only
147
- const postId = await client.publishShortVideo({
148
- workspaceId: "workspace-123",
149
- video: video,
150
- thumbnail: thumbnail,
151
- platforms: ["youtube"],
152
- youtube: {
153
- title: "Product Launch Video",
154
- description: "Introducing our new product line for 2024",
155
- tags: ["product", "launch", "2024"],
156
- madeForKids: false,
157
- },
158
- tag: "product-launch", // Custom tag for filtering
159
- refId: "PROD-LAUNCH-001", // Your internal reference
160
- });
161
-
162
- console.log("Published to YouTube:", postId);
163
- ```
164
-
165
- **Example - Video URL with Thumbnail URL:**
166
-
167
- ```typescript
168
- // Publish using URLs (no file upload needed)
169
- const postId = await client.publishShortVideo({
170
- workspaceId: "workspace-123",
171
- video: "https://cdn.example.com/videos/promo.mp4", // Direct video URL
172
- thumbnail: "https://cdn.example.com/images/thumb.jpg", // Direct thumbnail URL
173
- platforms: ["youtube", "tiktok"],
174
- youtube: {
175
- title: "Summer Sale Announcement",
176
- description: "Check out our summer collection",
177
- tags: ["sale", "summer", "fashion"],
178
- },
179
- tiktok: {
180
- caption: "Summer sale is here! 🔥 #SummerSale #Fashion",
181
- privacy_level: "public",
182
- disable_duet: false,
183
- disable_stitch: false,
184
- disable_comment: false,
185
- },
186
- });
187
-
188
- console.log("Published to YouTube and TikTok:", postId);
189
- ```
190
-
191
- **Example - Multi-Platform Publishing:**
192
-
193
- ```typescript
194
- // Publish to all 4 platforms simultaneously
195
- const postId = await client.publishShortVideo({
196
- workspaceId: "workspace-123",
197
- video: videoFile,
198
- thumbnail: thumbFile,
199
- platforms: ["youtube", "tiktok", "facebook", "instagram"],
200
-
201
- // YouTube configuration
202
- youtube: {
203
- title: "How to Use Our Product",
204
- description: "Step-by-step tutorial for beginners",
205
- tags: ["tutorial", "howto", "guide"],
206
- },
207
-
208
- // TikTok configuration
209
- tiktok: {
210
- caption: "Easy tutorial! Try it yourself 🎯 #Tutorial #LearnTikTok",
211
- privacy_level: "public",
212
- disable_duet: false,
213
- disable_stitch: false,
214
- disable_comment: false,
215
- },
216
-
217
- // Facebook configuration
218
- facebook: {
219
- title: "Product Tutorial",
220
- description: "Learn how to use our product in under 60 seconds",
221
- },
222
-
223
- // Instagram configuration
224
- instagram: {
225
- description: "Quick product tutorial 📱 #ProductTutorial",
226
- share_to_feed: true,
227
- },
228
- });
229
-
230
- console.log("Published to all platforms:", postId);
231
- ```
232
-
233
- **Example - Repost from TikTok:**
234
-
235
- ```typescript
236
- // Automatically detect and repost from TikTok
237
- const postId = await client.publishShortVideo({
238
- workspaceId: "workspace-123",
239
- video: "https://www.tiktok.com/@username/video/1234567890", // TikTok URL
240
- platforms: ["youtube"], // Repost to YouTube
241
- youtube: {
242
- title: "Viral TikTok Repost",
243
- description: "Sharing this viral moment from TikTok",
244
- tags: ["tiktok", "viral", "repost"],
245
- },
246
- });
247
-
248
- console.log("Reposted from TikTok to YouTube:", postId);
249
- ```
250
-
251
- **Example - Repost from YouTube Shorts:**
252
-
253
- ```typescript
254
- // Repost YouTube Shorts to TikTok
255
- const postId = await client.publishShortVideo({
256
- workspaceId: "workspace-123",
257
- video: "https://www.youtube.com/shorts/abc123", // YouTube Shorts URL
258
- platforms: ["tiktok"],
259
- tiktok: {
260
- caption: "Check out this YouTube Short! #YouTubeShorts",
261
- privacy_level: "public",
262
- disable_duet: false,
263
- disable_stitch: false,
264
- disable_comment: false,
265
- },
266
- });
267
-
268
- console.log("Reposted from YouTube to TikTok:", postId);
269
- ```
270
-
271
- **Example - Repost from Facebook:**
272
-
273
- ```typescript
274
- // Repost Facebook video to other platforms
275
- const postId = await client.publishShortVideo({
276
- workspaceId: "workspace-123",
277
- video: "https://www.facebook.com/reel/1234567890", // Facebook Reel URL
278
- platforms: ["youtube", "tiktok"],
279
- youtube: {
280
- title: "Facebook Viral Moment",
281
- description: "Reposting this viral moment from Facebook",
282
- tags: ["facebook", "viral", "repost"],
283
- },
284
- tiktok: {
285
- caption: "Viral moment from Facebook! #Viral",
286
- privacy_level: "public",
287
- disable_duet: false,
288
- disable_stitch: false,
289
- disable_comment: false,
290
- },
291
- });
292
-
293
- console.log("Reposted from Facebook:", postId);
294
- ```
295
-
296
- **Example - Scheduled Publishing:**
297
-
298
- ```typescript
299
- // Schedule video for future publication
300
- const publishDate = new Date("2024-12-25T12:00:00Z"); // Christmas at noon
301
-
302
- const postId = await client.publishShortVideo({
303
- workspaceId: "workspace-123",
304
- video: videoFile,
305
- platforms: ["youtube", "tiktok"],
306
- schedule: publishDate, // Schedule for specific date/time
307
- youtube: {
308
- title: "Merry Christmas! 🎄",
309
- description: "Holiday greetings from our team",
310
- tags: ["christmas", "holiday", "greetings"],
311
- },
312
- tiktok: {
313
- caption: "Merry Christmas everyone! 🎅🎄 #Christmas",
314
- privacy_level: "public",
315
- disable_duet: false,
316
- disable_stitch: false,
317
- disable_comment: false,
318
- },
319
- });
320
-
321
- console.log("Scheduled for", publishDate, "- Post ID:", postId);
322
- ```
323
-
324
- ---
325
-
326
- ### list()
327
-
328
- Search and retrieve publishing posts with pagination and filtering options.
329
-
330
- **Parameters:**
331
-
332
- - `params` (IListParams, optional): Search and filter options
333
- - `workspaceId` (string, optional): Filter by workspace ID
334
- - `currentStatus` (string, optional): Filter by post status ('pending', 'processing', 'done', 'error', etc.)
335
- - `tag` (string, optional): Filter by custom tag
336
- - `refId` (string, optional): Filter by reference ID
337
- - `pagination` (IPaginationParams, optional): Pagination settings
338
- - `page` (number): Page number (default: 1)
339
- - `pageSize` (number): Items per page (default: 10)
340
-
341
- **Returns:** `Promise<ISearchSocialPublisherPostResponse>` - Paginated post list
342
-
343
- **Response Structure:**
344
-
345
- ```typescript
346
- {
347
- items: Array<{
348
- _id: string; // Post ID
349
- numbering: string; // Post number (e.g., "T-12345")
350
- caption: string; // Post caption/title
351
- createdAt: Date; // Creation timestamp
352
- currentStatus: string; // Overall post status
353
- isAllowYoutube: boolean; // YouTube enabled
354
- isAllowFacebookPage: boolean; // Facebook enabled
355
- isAllowInstagram: boolean; // Instagram enabled
356
- isAllowTiktok: boolean; // TikTok enabled
357
- workspaceName: string; // Workspace name
358
- scheduleType: "schedule" | "now"; // Schedule type
359
- scheduleScheduledAt: Date | null; // Scheduled date
360
- scheduleExecutedAt: Date | null; // Execution date
361
- refId: string; // Reference ID
362
- tag: string; // Custom tag
363
- apiKeyName: string; // API key name
364
- }>;
365
- pagination: {
366
- page: number; // Current page
367
- pageSize: number; // Items per page
368
- totalCount: number; // Total posts
369
- totalPages: number; // Total pages
370
- }
371
- }
372
- ```
373
-
374
- **Example:**
375
-
376
- ```typescript
377
- // Get all posts with pagination
378
- const posts = await client.list(
379
- {},
380
- {
381
- page: 1,
382
- pageSize: 20,
383
- },
384
- );
385
-
386
- console.log(`Total posts: ${posts.pagination.totalCount}`);
387
- console.log(`Showing page ${posts.pagination.page} of ${posts.pagination.totalPages}`);
388
-
389
- // Display posts
390
- posts.items.forEach((post) => {
391
- console.log(`${post.numbering}: ${post.caption}`);
392
- console.log(` Status: ${post.currentStatus}`);
393
- console.log(
394
- ` Platforms: ${[post.isAllowYoutube && "YouTube", post.isAllowTiktok && "TikTok", post.isAllowFacebookPage && "Facebook", post.isAllowInstagram && "Instagram"].filter(Boolean).join(", ")}`,
395
- );
396
- });
397
-
398
- // Filter by workspace
399
- const workspacePosts = await client.list(
400
- {
401
- workspaceId: "workspace-123",
402
- },
403
- {
404
- page: 1,
405
- pageSize: 50,
406
- },
407
- );
408
-
409
- console.log(`Workspace has ${workspacePosts.items.length} posts`);
410
-
411
- // Filter by status
412
- const pendingPosts = await client.list(
413
- {
414
- currentStatus: "pending",
415
- },
416
- {
417
- page: 1,
418
- pageSize: 10,
419
- },
420
- );
421
-
422
- console.log(`Pending posts: ${pendingPosts.pagination.totalCount}`);
423
-
424
- // Filter by tag
425
- const campaignPosts = await client.list(
426
- {
427
- tag: "summer-campaign",
428
- },
429
- {
430
- page: 1,
431
- pageSize: 100,
432
- },
433
- );
434
-
435
- console.log(`Campaign posts: ${campaignPosts.items.length}`);
436
-
437
- // Filter by reference ID
438
- const specificPost = await client.list(
439
- {
440
- refId: "PROD-001",
441
- },
442
- {
443
- page: 1,
444
- pageSize: 1,
445
- },
446
- );
447
-
448
- if (specificPost.items.length > 0) {
449
- console.log("Found post:", specificPost.items[0].caption);
450
- }
451
- ```
452
-
453
- ---
454
-
455
- ### getStatus()
456
-
457
- Retrieve detailed status information for a specific publishing post, including platform-specific progress and post URLs.
458
-
459
- **Parameters:**
460
-
461
- - `id` (string): Post ID
462
-
463
- **Returns:** `Promise<ISocialPublisherPostStatusResponse>` - Detailed post status
464
-
465
- **Response Structure:**
466
-
467
- ```typescript
468
- {
469
- _id: string; // Post ID
470
- numbering: string; // Post number
471
- caption: string; // Post caption
472
- currentStatus: string; // Overall status
473
- createdAt: Date; // Creation time
474
- startedAt: Date; // Start time
475
-
476
- // Platform-specific details
477
- youtube?: {
478
- tags: string[];
479
- postInfo: {
480
- isAllow: boolean; // Platform enabled
481
- currentStatus: string; // Platform status
482
- videoURL: string; // Published video URL
483
- socialPublisherAccount: { // Account details
484
- name: string;
485
- thumbnail: string;
486
- platformAccountId: string;
487
- };
488
- };
489
- };
490
-
491
- tiktok?: { /* Similar structure */ };
492
- facebook?: { /* Similar structure */ };
493
- instagram?: { /* Similar structure */ };
494
-
495
- // Workspace info
496
- workspace: {
497
- _id: string;
498
- name: string;
499
- description: string;
500
- };
501
-
502
- // Schedule info
503
- schedule: {
504
- type: 'schedule' | 'now';
505
- scheduledAt: Date;
506
- executedAt: Date;
507
- };
508
- }
509
- ```
510
-
511
- **Example:**
512
-
513
- ```typescript
514
- // Get post status
515
- const status = await client.getStatus("post-id-here");
516
-
517
- console.log("Post:", status.numbering);
518
- console.log("Overall Status:", status.currentStatus);
519
- console.log("Created:", status.createdAt);
520
-
521
- // Check YouTube status
522
- if (status.youtube) {
523
- console.log("\nYouTube:");
524
- console.log(" Status:", status.youtube.postInfo.currentStatus);
525
- console.log(" Channel:", status.youtube.postInfo.socialPublisherAccount.name);
526
-
527
- if (status.youtube.postInfo.videoURL) {
528
- console.log(" Video URL:", status.youtube.postInfo.videoURL);
529
- }
530
- }
531
-
532
- // Check TikTok status
533
- if (status.tiktok) {
534
- console.log("\nTikTok:");
535
- console.log(" Status:", status.tiktok.postInfo.currentStatus);
536
- console.log(" Account:", status.tiktok.postInfo.socialPublisherAccount.name);
537
-
538
- if (status.tiktok.postInfo.videoURL) {
539
- console.log(" Video URL:", status.tiktok.postInfo.videoURL);
540
- }
541
- }
542
-
543
- // Check Facebook status
544
- if (status.facebook) {
545
- console.log("\nFacebook:");
546
- console.log(" Status:", status.facebook.postInfo.currentStatus);
547
- console.log(" Page:", status.facebook.postInfo.socialPublisherAccount.name);
548
- }
549
-
550
- // Check Instagram status
551
- if (status.instagram) {
552
- console.log("\nInstagram:");
553
- console.log(" Status:", status.instagram.postInfo.currentStatus);
554
- console.log(" Account:", status.instagram.postInfo.socialPublisherAccount.name);
555
- }
556
-
557
- // Handle errors
558
- if (status.currentStatus === "error") {
559
- console.error("Post failed!");
560
-
561
- // Check which platforms failed
562
- const failures = [];
563
- if (status.youtube?.postInfo.currentStatus === "error") failures.push("YouTube");
564
- if (status.tiktok?.postInfo.currentStatus === "error") failures.push("TikTok");
565
- if (status.facebook?.postInfo.currentStatus === "error") failures.push("Facebook");
566
- if (status.instagram?.postInfo.currentStatus === "error") failures.push("Instagram");
567
-
568
- console.error("Failed platforms:", failures.join(", "));
569
- }
570
-
571
- // Monitor post progress
572
- async function waitForCompletion(postId: string, maxWaitMs = 300000) {
573
- const startTime = Date.now();
574
-
575
- while (Date.now() - startTime < maxWaitMs) {
576
- const status = await client.getStatus(postId);
577
-
578
- console.log(`Status: ${status.currentStatus}`);
579
-
580
- if (status.currentStatus === "done") {
581
- console.log("✓ Publishing complete!");
582
- return status;
583
- }
584
-
585
- if (status.currentStatus === "error") {
586
- throw new Error("Publishing failed");
587
- }
588
-
589
- // Wait 5 seconds before checking again
590
- await new Promise((resolve) => setTimeout(resolve, 5000));
591
- }
592
-
593
- throw new Error("Timeout waiting for post completion");
594
- }
595
-
596
- const finalStatus = await waitForCompletion("post-id");
597
- console.log("All platforms published successfully");
598
- ```
599
-
600
- ---
601
-
602
- ### getDefaultSettings()
603
-
604
- Retrieve default configuration settings for social media publishing, including platform limits and default values.
605
-
606
- **Parameters:** None
607
-
608
- **Returns:** `Promise<IDefaultSettingsResponse>` - Default settings configuration
609
-
610
- **Example:**
611
-
612
- ```typescript
613
- // Get default settings
614
- const settings = await client.getDefaultSettings();
615
-
616
- console.log("Default Settings:", settings);
617
-
618
- // Use defaults in your application
619
- console.log("Max video size:", client.maxVideoUploadSizeBytes, "bytes");
620
- console.log("Max thumbnail size:", client.maxImageUploadSizeBytes, "bytes");
621
- ```
622
-
623
- ---
624
-
625
- ### getNextAndPrevious()
626
-
627
- Get the IDs of the next and previous posts for navigation purposes.
628
-
629
- **Parameters:**
630
-
631
- - `id` (string): Current post ID
632
-
633
- **Returns:** `Promise<ISocialPublisherPostNextPreviousResponse>` - Next and previous post IDs
634
-
635
- **Response Structure:**
636
-
637
- ```typescript
638
- {
639
- nextId?: string; // Next post ID (if exists)
640
- previousId?: string; // Previous post ID (if exists)
641
- }
642
- ```
643
-
644
- **Example:**
645
-
646
- ```typescript
647
- // Get navigation IDs
648
- const navigation = await client.getNextAndPrevious("current-post-id");
649
-
650
- if (navigation.nextId) {
651
- console.log("Next post:", navigation.nextId);
652
-
653
- // Navigate to next post
654
- const nextPost = await client.getStatus(navigation.nextId);
655
- console.log("Next post caption:", nextPost.caption);
656
- }
657
-
658
- if (navigation.previousId) {
659
- console.log("Previous post:", navigation.previousId);
660
-
661
- // Navigate to previous post
662
- const prevPost = await client.getStatus(navigation.previousId);
663
- console.log("Previous post caption:", prevPost.caption);
664
- }
665
-
666
- // Build post navigation
667
- async function navigateForward(startPostId: string, count: number) {
668
- const posts = [];
669
- let currentId = startPostId;
670
-
671
- for (let i = 0; i < count; i++) {
672
- const status = await client.getStatus(currentId);
673
- posts.push(status);
674
-
675
- const nav = await client.getNextAndPrevious(currentId);
676
- if (!nav.nextId) break;
677
-
678
- currentId = nav.nextId;
679
- }
680
-
681
- return posts;
682
- }
683
-
684
- const next5Posts = await navigateForward("post-id", 5);
685
- console.log(`Retrieved ${next5Posts.length} posts`);
686
- ```
687
-
688
- ---
689
-
690
- ## 🔄 Complete Workflow Example
691
-
692
- ```typescript
693
- import { HttpClient } from "@posty5/core";
694
- import { SocialPublisherPostClient } from "@posty5/social-publisher-post";
695
- import * as fs from "fs";
696
-
697
- // Initialize client
698
- const httpClient = new HttpClient({
699
- apiKey: process.env.POSTY5_API_KEY!,
700
- debug: false,
701
- });
702
-
703
- const client = new SocialPublisherPostClient(httpClient);
704
-
705
- async function publishVideoWorkflow() {
706
- try {
707
- // 1. Prepare video and thumbnail
708
- console.log("Preparing media files...");
709
- const videoBuffer = fs.readFileSync("./content/video.mp4");
710
- const thumbBuffer = fs.readFileSync("./content/thumbnail.jpg");
711
-
712
- const video = new File([videoBuffer], "video.mp4", { type: "video/mp4" });
713
- const thumbnail = new File([thumbBuffer], "thumb.jpg", { type: "image/jpeg" });
714
-
715
- // 2. Publish to multiple platforms
716
- console.log("Publishing video...");
717
- const postId = await client.publishShortVideo({
718
- workspaceId: "workspace-123",
719
- video: video,
720
- thumbnail: thumbnail,
721
- platforms: ["youtube", "tiktok"],
722
- youtube: {
723
- title: "Product Demo 2024",
724
- description: "Check out our latest product features",
725
- tags: ["product", "demo", "2024"],
726
- },
727
- tiktok: {
728
- caption: "New product alert! 🚀 #Product #Tech",
729
- privacy_level: "public",
730
- disable_duet: false,
731
- disable_stitch: false,
732
- disable_comment: false,
733
- },
734
- tag: "product-demo",
735
- refId: "DEMO-2024-001",
736
- });
737
-
738
- console.log("✓ Post created:", postId);
739
-
740
- // 3. Monitor publishing progress
741
- console.log("\nMonitoring progress...");
742
- let attempts = 0;
743
- const maxAttempts = 60; // 5 minutes (5 second intervals)
744
-
745
- while (attempts < maxAttempts) {
746
- const status = await client.getStatus(postId);
747
-
748
- console.log(` Status: ${status.currentStatus}`);
749
-
750
- // Check individual platforms
751
- if (status.youtube) {
752
- console.log(` YouTube: ${status.youtube.postInfo.currentStatus}`);
753
- }
754
- if (status.tiktok) {
755
- console.log(` TikTok: ${status.tiktok.postInfo.currentStatus}`);
756
- }
757
-
758
- // Check if completed
759
- if (status.currentStatus === "done") {
760
- console.log("\n✓ Publishing complete!");
761
-
762
- // Get video URLs
763
- if (status.youtube?.postInfo.videoURL) {
764
- console.log(" YouTube URL:", status.youtube.postInfo.videoURL);
765
- }
766
- if (status.tiktok?.postInfo.videoURL) {
767
- console.log(" TikTok URL:", status.tiktok.postInfo.videoURL);
768
- }
769
-
770
- return status;
771
- }
772
-
773
- // Check for errors
774
- if (status.currentStatus === "error") {
775
- console.error("\n✗ Publishing failed");
776
- throw new Error("Post failed");
777
- }
778
-
779
- // Wait before checking again
780
- await new Promise((resolve) => setTimeout(resolve, 5000));
781
- attempts++;
782
- }
783
-
784
- throw new Error("Timeout: Post did not complete within 5 minutes");
785
- } catch (error) {
786
- console.error("Error:", error.message);
787
- throw error;
788
- }
789
- }
790
-
791
- // Run the workflow
792
- publishVideoWorkflow()
793
- .then(() => console.log("\nWorkflow completed successfully"))
794
- .catch((err) => console.error("\nWorkflow failed:", err));
795
- ```
796
-
797
- ---
798
-
799
- ## 📘 TypeScript Support
800
-
801
- Full TypeScript support with exported interfaces:
802
-
803
- ```typescript
804
- import {
805
- // Client
806
- SocialPublisherPostClient,
807
-
808
- // Publishing options
809
- IPublishOptions,
810
-
811
- // Platform configurations
812
- IYouTubeConfig,
813
- ITikTokConfig,
814
- IFacebookPageConfig,
815
- IInstagramConfig,
816
-
817
- // Schedule configuration
818
- IScheduleConfig,
819
-
820
- // Search parameters
821
- IListParams,
822
-
823
- // Response interfaces
824
- ISocialPublisherPostStatusResponse,
825
- ISearchSocialPublisherPostResponse,
826
- ISocialPublisherPostNextPreviousResponse,
827
- IDefaultSettingsResponse,
828
-
829
- // Response types
830
- ISocialPublisherPostResponse,
831
- ISocialPublisherWorkspace,
832
- ISocialPublisherAccount,
833
-
834
- // Status types
835
- SocialPublisherPostStatusType, // 'pending' | 'processing' | 'done' | 'error' | ...
836
- SocialPublisherPostSourceType, // 'video-file' | 'video-url' | 'facebook-video' | ...
837
- SocialPublisherAccountStatusType, // 'active' | 'inactive' | 'authenticationExpired'
838
- } from "@posty5/social-publisher-post";
839
- ```
840
-
841
- ### Platform Configuration Types
842
-
843
- **YouTube Configuration:**
844
-
845
- ```typescript
846
- interface IYouTubeConfig {
847
- title: string; // Video title (required)
848
- description: string; // Video description (required)
849
- tags: string[]; // Video tags (required)
850
- madeForKids?: boolean; // Mark as made for kids (optional)
851
- defaultLanguage?: string; // Default language code (optional)
852
- defaultAudioLanguage?: string; // Audio language code (optional)
853
- categoryId?: string; // YouTube category ID (optional)
854
- localizationLanguages?: string[]; // Localization languages (optional)
855
- }
856
- ```
857
-
858
- **TikTok Configuration:**
859
-
860
- ```typescript
861
- interface ITikTokConfig {
862
- caption: string; // Video caption (required)
863
- privacy_level: string; // 'public' | 'SELF_ONLY' | 'MUTUAL_FOLLOW_FRIENDS' (required)
864
- disable_duet: boolean; // Disable duet feature (required)
865
- disable_stitch: boolean; // Disable stitch feature (required)
866
- disable_comment: boolean; // Disable comments (required)
867
- }
868
- ```
869
-
870
- **Facebook Configuration:**
871
-
872
- ```typescript
873
- interface IFacebookPageConfig {
874
- description: string; // Post description (required)
875
- title?: string; // Post title (optional)
876
- }
877
- ```
878
-
879
- **Instagram Configuration:**
880
-
881
- ```typescript
882
- interface IInstagramConfig {
883
- description: string; // Post description (required)
884
- share_to_feed?: boolean; // Share to feed (optional)
885
- is_published_to_both_feed_and_story?: boolean; // Publish to both (optional)
886
- }
887
- ```
888
-
889
- ---
890
-
891
- ## 📦 Related Packages
892
-
893
- This SDK ecosystem contains the following tool packages:
894
-
895
- | Package | Description | Version | GitHub | NPM |
896
- | --- | --- | --- | --- | --- |
897
- | @posty5/short-link | URL shortener client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-short-link) | [📦 NPM](https://www.npmjs.com/package/@posty5/short-link) |
898
- | @posty5/qr-code | QR code generator client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-qr-code) | [📦 NPM](https://www.npmjs.com/package/@posty5/qr-code) |
899
- | @posty5/html-hosting | HTML hosting client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-html-hosting) | [📦 NPM](https://www.npmjs.com/package/@posty5/html-hosting) |
900
- | @posty5/html-hosting-variables | HTML hosting variables client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-html-hosting-variables) | [📦 NPM](https://www.npmjs.com/package/@posty5/html-hosting-variables) |
901
- | @posty5/html-hosting-form-submission | Form submission client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-html-hosting-form-submission) | [📦 NPM](https://www.npmjs.com/package/@posty5/html-hosting-form-submission) |
902
- | @posty5/social-publisher-workspace | Social publisher workspace client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-social-publisher-workspace) | [📦 NPM](https://www.npmjs.com/package/@posty5/social-publisher-workspace) |
903
- | @posty5/social-publisher-post | Social publisher post client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-social-publisher-post) | [📦 NPM](https://www.npmjs.com/package/@posty5/social-publisher-post) |
904
-
905
- ---
906
-
907
- ## 💻 Node.js Compatibility
908
-
909
- - **Node.js**: >= 16.0.0
910
- - **Module Systems**: ESM and CommonJS
911
- - **TypeScript**: Full type definitions included
912
-
913
- ---
914
-
915
- ## 🆘 Support
916
-
917
- We're here to help you succeed with Posty5!
918
-
919
- ### Get Help
920
-
921
- - **Documentation**: [https://guide.posty5.com](https://guide.posty5.com)
922
- - **Contact Us**: [https://posty5.com/contact-us](https://posty5.com/contact-us)
923
- - **GitHub Issues**: [Report bugs or request features](https://github.com/Posty5/npm-sdk/issues)
924
- - **API Status**: Check API status and uptime at [https://status.posty5.com](https://status.posty5.com)
925
-
926
- ### Common Issues
927
-
928
- 1. **Authentication Errors**
929
- - Ensure your API key is valid and active
930
- - Get your API key from [studio.posty5.com/account/settings?tab=APIKeys](studio.posty5.com/account/settings?tab=APIKeys)
931
-
932
- 2. **Network Errors**
933
- - Check your internet connection
934
- - Verify firewall settings allow connections to `api.posty5.com`
935
-
936
- 3. **Rate Limiting**
937
- - The SDK includes automatic retry logic
938
- - Check your API plan limits in the dashboard
939
-
940
- ---
941
-
942
- ## 📄 License
943
-
944
- MIT License - see [LICENSE](./LICENSE) file for details.
945
-
946
- ---
947
-
948
- ## 🔗 Useful Links
949
-
950
- - **Website**: [https://posty5.com](https://posty5.com)
951
- - **Dashboard**: [studio.posty5.com/account/settings?tab=APIKeys](studio.posty5.com/account/settings?tab=APIKeys)
952
- - **API Documentation**: [https://docs.posty5.com](https://docs.posty5.com)
953
- - **GitHub**: [https://github.com/Posty5/npm-sdk](https://github.com/Posty5/npm-sdk)
954
-
955
- ---
956
-
957
- Made with ❤️ by the Posty5 team
1
+ # @posty5/social-publisher-post
2
+
3
+ Official Posty5 SDK for managing social media publishing posts. Publish videos to YouTube Shorts, TikTok, Facebook Reels, and Instagram Reels with a unified, developer-friendly API.
4
+
5
+ ---
6
+
7
+ ## 🌟 What is Posty5?
8
+
9
+ **Posty5** is a comprehensive suite of free online tools designed to enhance your digital marketing and social media presence. With over 4+ powerful tools and counting, Posty5 provides everything you need to:
10
+
11
+ - 🔗 **Shorten URLs** - Create memorable, trackable short links
12
+ - 📱 **Generate QR Codes** - Transform URLs, WiFi credentials, contact cards, and more into scannable codes
13
+ - 🌐 **Host HTML Pages** - Deploy static HTML pages with dynamic variables and form submission handling
14
+ - 📢 **Automate Social Media** - Schedule and manage social media posts across multiple platforms
15
+ - 📊 **Track Performance** - Monitor and analyze your digital marketing efforts
16
+
17
+ Posty5 empowers businesses, marketers, and developers to streamline their online workflows—all from a unified control panel.
18
+
19
+ **Learn more:** [https://posty5.com](https://posty5.com)
20
+
21
+ ---
22
+
23
+ ## 📦 About This Package
24
+
25
+ `@posty5/social-publisher-post` is the **post management client** for the Posty5 Social Media Publisher. This package enables you to programmatically publish short-form videos to multiple social media platforms simultaneously from a single API call.
26
+
27
+ ### What are Social Publisher Posts?
28
+
29
+ Posts represent video publishing jobs that distribute your content across YouTube Shorts, TikTok, Facebook Reels, and Instagram Reels. Each post handles the entire publishing workflow: video upload, platform-specific configuration, scheduling, and status tracking.
30
+
31
+ ### Key Capabilities
32
+
33
+ - **Multi-Platform Publishing** - Publish to YouTube, TikTok, Facebook, and Instagram in one API call
34
+ - **Flexible Video Sources** - Upload files, provide URLs, or repost from other platforms (auto-detected)
35
+ - **Smart Thumbnail Handling** - Upload files or provide URLs for thumbnail images
36
+ - **Platform-Specific Configuration** - Customize titles, descriptions, captions, tags, and privacy settings per platform
37
+ - **Schedule Publishing** - Publish immediately or schedule for optimal engagement times
38
+ - **Repost Detection** - Automatically detect and repost from Facebook, TikTok, and YouTube Shorts URLs
39
+ - **Post Status Tracking** - Monitor publishing progress and platform-specific status
40
+ - **Tag & Reference System** - Organize posts using custom tags and reference IDs
41
+ - **Pagination & Filtering** - Search posts by workspace, status, tag, or reference ID
42
+
43
+ ### Why Use This Package?
44
+
45
+ - **Time Saving**: Publish to 4 platforms with a single API call instead of managing each separately
46
+ - **Automated Workflow**: Integrate multi-platform publishing into your content pipeline
47
+ - **Content Repurposing**: Automatically repost viral content from other platforms
48
+ - **Consistent Branding**: Apply platform-optimized metadata while maintaining brand voice
49
+ - **Progress Tracking**: Monitor post status and handle errors programmatically
50
+
51
+ ### Supported Platforms
52
+
53
+ | Platform | Content Type | Custom Thumbnails | Max File Size |
54
+ | --------- | ------------ | ----------------- | ------------- |
55
+ | YouTube | Shorts | ✅ Yes | 2 GB |
56
+ | TikTok | Videos | ❌ No | 2 GB |
57
+ | Facebook | Reels | ❌ No | 2 GB |
58
+ | Instagram | Reels | ❌ No | 2 GB |
59
+
60
+ ---
61
+
62
+ ## 📥 Installation
63
+
64
+ Install via npm:
65
+
66
+ ```bash
67
+ npm install @posty5/social-publisher-post @posty5/core
68
+ ```
69
+
70
+ ---
71
+
72
+ ## 🚀 Quick Start
73
+
74
+ ```typescript
75
+ import { HttpClient } from "@posty5/core";
76
+ import { SocialPublisherPostClient } from "@posty5/social-publisher-post";
77
+
78
+ // Initialize the HTTP client with your API key
79
+ const httpClient = new HttpClient({
80
+ apiKey: "your-api-key", // Get from studio.posty5.com/account/settings?tab=APIKeys
81
+ debug: true, // Optional: Enable debug logging
82
+ });
83
+
84
+ // Create post client
85
+ const client = new SocialPublisherPostClient(httpClient);
86
+
87
+ // Publish video to YouTube Shorts
88
+ const postId = await client.publishShortVideo({
89
+ workspaceId: "workspace-123", // Your workspace ID
90
+ video: videoFile, // File object or URL string
91
+ thumbnail: thumbFile, // Optional: File or URL
92
+ youtube: {
93
+ title: "My First YouTube Short",
94
+ description: "Published using Posty5 SDK",
95
+ tags: ["shorts", "video", "tutorial"],
96
+ },
97
+ });
98
+
99
+ console.log("Post created:", postId);
100
+
101
+ // Check post status
102
+ const status = await client.getStatus(postId);
103
+ console.log("Publishing status:", status.currentStatus);
104
+ console.log("YouTube:", status.youtube?.postInfo.currentStatus);
105
+ ```
106
+
107
+ ---
108
+
109
+ ## 📚 API Reference & Examples
110
+
111
+ ### publishShortVideo()
112
+
113
+ Publish a short video to one or more social media platforms. This is the main method for creating publishing posts. It automatically detects video source type (File upload, URL, or platform-specific repost URL) and handles all upload logic.
114
+
115
+ **Parameters:**
116
+
117
+ - `options` (IPublishOptions): Publishing configuration
118
+ - `workspaceId` (string, required): Workspace ID containing connected social accounts
119
+ - `video` (File | string, required): Video source - File object, direct URL, or platform URL (Facebook/TikTok/YouTube)
120
+ - `thumbnail` (File | string, optional): Thumbnail image - File object or URL string
121
+ - `youtube` (IYouTubeConfig, optional): YouTube configuration — **required** if the workspace has a YouTube account connected
122
+ - `tiktok` (ITikTokConfig, optional): TikTok configuration — **required** if the workspace has a TikTok account connected
123
+ - `facebook` (IFacebookPageConfig, optional): Facebook configuration — **required** if the workspace has a Facebook Page connected
124
+ - `instagram` (IInstagramConfig, optional): Instagram configuration — **required** if the workspace has an Instagram account connected
125
+ - `schedule` ('now' | Date, optional): Publish immediately (default) or schedule for specific date/time
126
+ - `tag` (string, optional): Custom tag for filtering
127
+ - `refId` (string, optional): Your internal reference ID
128
+
129
+ > **Where publish targets come from.** The workspace's connected accounts are
130
+ > the single source of truth — connect / disconnect accounts on the workspace
131
+ > page in the Posty5 dashboard to choose which platforms a post lands on. The
132
+ > SDK forwards whichever config blocks you supply; the server matches them
133
+ > against the workspace.
134
+
135
+ **Returns:** `Promise<string>` - Created post ID
136
+
137
+ **Example - Upload Video File:**
138
+
139
+ ```typescript
140
+ import * as fs from "fs";
141
+
142
+ // Read video and thumbnail files
143
+ const videoFile = fs.readFileSync("./video.mp4");
144
+ const thumbFile = fs.readFileSync("./thumbnail.jpg");
145
+
146
+ // Create File objects
147
+ const video = new File([videoFile], "video.mp4", { type: "video/mp4" });
148
+ const thumbnail = new File([thumbFile], "thumb.jpg", { type: "image/jpeg" });
149
+
150
+ // Publish to YouTube only
151
+ const postId = await client.publishShortVideo({
152
+ workspaceId: "workspace-123",
153
+ video: video,
154
+ thumbnail: thumbnail,
155
+ youtube: {
156
+ title: "Product Launch Video",
157
+ description: "Introducing our new product line for 2024",
158
+ tags: ["product", "launch", "2024"],
159
+ madeForKids: false,
160
+ },
161
+ tag: "product-launch", // Custom tag for filtering
162
+ refId: "PROD-LAUNCH-001", // Your internal reference
163
+ });
164
+
165
+ console.log("Published to YouTube:", postId);
166
+ ```
167
+
168
+ **Example - Video URL with Thumbnail URL:**
169
+
170
+ ```typescript
171
+ // Publish using URLs (no file upload needed)
172
+ const postId = await client.publishShortVideo({
173
+ workspaceId: "workspace-123",
174
+ video: "https://cdn.example.com/videos/promo.mp4", // Direct video URL
175
+ thumbnail: "https://cdn.example.com/images/thumb.jpg", // Direct thumbnail URL
176
+ youtube: {
177
+ title: "Summer Sale Announcement",
178
+ description: "Check out our summer collection",
179
+ tags: ["sale", "summer", "fashion"],
180
+ },
181
+ tiktok: {
182
+ caption: "Summer sale is here! 🔥 #SummerSale #Fashion",
183
+ privacy_level: "public",
184
+ disable_duet: false,
185
+ disable_stitch: false,
186
+ disable_comment: false,
187
+ },
188
+ });
189
+
190
+ console.log("Published to YouTube and TikTok:", postId);
191
+ ```
192
+
193
+ **Example - Auto-Comment After Publish (Pro plan, +1 credit):**
194
+
195
+ ```typescript
196
+ // Publish a video and queue a comment for each platform.
197
+ // TikTok comments are not supported — the platform will always
198
+ // report `commentInfo.currentStatus === "notSupported"`.
199
+ const postId = await client.publishShortVideo({
200
+ workspaceId: "workspace-123",
201
+ video: videoFile,
202
+ youtube: { title: "Launch day", description: "We shipped!", tags: ["launch"] },
203
+ facebook: { description: "We shipped!" },
204
+ instagram: { description: "We shipped! 🚀" },
205
+ comment: {
206
+ text: "Drop your favourite feature below 👇",
207
+ postToFacebook: true,
208
+ postToInstagram: true,
209
+ postToYoutube: true,
210
+ // postToTiktok defaults to false — TikTok does not support API comments
211
+ },
212
+ });
213
+
214
+ // Later, poll status to see how each comment landed:
215
+ const status = await client.getStatus(postId);
216
+ console.log("YouTube comment:", status.youtube?.commentInfo?.currentStatus);
217
+ console.log("Facebook comment URL:", status.facebook?.commentInfo?.commentURL);
218
+ console.log("TikTok comment:", status.tiktok?.commentInfo?.currentStatus); // "notSupported"
219
+ ```
220
+
221
+ **Example - Multi-Platform Publishing:**
222
+
223
+ ```typescript
224
+ // Publish to all 4 platforms simultaneously
225
+ const postId = await client.publishShortVideo({
226
+ workspaceId: "workspace-123",
227
+ video: videoFile,
228
+ thumbnail: thumbFile,
229
+
230
+ // YouTube configuration
231
+ youtube: {
232
+ title: "How to Use Our Product",
233
+ description: "Step-by-step tutorial for beginners",
234
+ tags: ["tutorial", "howto", "guide"],
235
+ },
236
+
237
+ // TikTok configuration
238
+ tiktok: {
239
+ caption: "Easy tutorial! Try it yourself 🎯 #Tutorial #LearnTikTok",
240
+ privacy_level: "public",
241
+ disable_duet: false,
242
+ disable_stitch: false,
243
+ disable_comment: false,
244
+ },
245
+
246
+ // Facebook configuration
247
+ facebook: {
248
+ title: "Product Tutorial",
249
+ description: "Learn how to use our product in under 60 seconds",
250
+ },
251
+
252
+ // Instagram configuration
253
+ instagram: {
254
+ description: "Quick product tutorial 📱 #ProductTutorial",
255
+ share_to_feed: true,
256
+ },
257
+ });
258
+
259
+ console.log("Published to all platforms:", postId);
260
+ ```
261
+
262
+ **Example - Repost from TikTok:**
263
+
264
+ ```typescript
265
+ // Automatically detect and repost from TikTok
266
+ const postId = await client.publishShortVideo({
267
+ workspaceId: "workspace-123",
268
+ video: "https://www.tiktok.com/@username/video/1234567890", // TikTok URL
269
+ youtube: {
270
+ title: "Viral TikTok Repost",
271
+ description: "Sharing this viral moment from TikTok",
272
+ tags: ["tiktok", "viral", "repost"],
273
+ },
274
+ });
275
+
276
+ console.log("Reposted from TikTok to YouTube:", postId);
277
+ ```
278
+
279
+ **Example - Repost from YouTube Shorts:**
280
+
281
+ ```typescript
282
+ // Repost YouTube Shorts to TikTok
283
+ const postId = await client.publishShortVideo({
284
+ workspaceId: "workspace-123",
285
+ video: "https://www.youtube.com/shorts/abc123", // YouTube Shorts URL
286
+ tiktok: {
287
+ caption: "Check out this YouTube Short! #YouTubeShorts",
288
+ privacy_level: "public",
289
+ disable_duet: false,
290
+ disable_stitch: false,
291
+ disable_comment: false,
292
+ },
293
+ });
294
+
295
+ console.log("Reposted from YouTube to TikTok:", postId);
296
+ ```
297
+
298
+ **Example - Repost from Facebook:**
299
+
300
+ ```typescript
301
+ // Repost Facebook video to other platforms
302
+ const postId = await client.publishShortVideo({
303
+ workspaceId: "workspace-123",
304
+ video: "https://www.facebook.com/reel/1234567890", // Facebook Reel URL
305
+ youtube: {
306
+ title: "Facebook Viral Moment",
307
+ description: "Reposting this viral moment from Facebook",
308
+ tags: ["facebook", "viral", "repost"],
309
+ },
310
+ tiktok: {
311
+ caption: "Viral moment from Facebook! #Viral",
312
+ privacy_level: "public",
313
+ disable_duet: false,
314
+ disable_stitch: false,
315
+ disable_comment: false,
316
+ },
317
+ });
318
+
319
+ console.log("Reposted from Facebook:", postId);
320
+ ```
321
+
322
+ **Example - Scheduled Publishing:**
323
+
324
+ ```typescript
325
+ // Schedule video for future publication
326
+ const publishDate = new Date("2024-12-25T12:00:00Z"); // Christmas at noon
327
+
328
+ const postId = await client.publishShortVideo({
329
+ workspaceId: "workspace-123",
330
+ video: videoFile,
331
+ schedule: publishDate, // Schedule for specific date/time
332
+ youtube: {
333
+ title: "Merry Christmas! 🎄",
334
+ description: "Holiday greetings from our team",
335
+ tags: ["christmas", "holiday", "greetings"],
336
+ },
337
+ tiktok: {
338
+ caption: "Merry Christmas everyone! 🎅🎄 #Christmas",
339
+ privacy_level: "public",
340
+ disable_duet: false,
341
+ disable_stitch: false,
342
+ disable_comment: false,
343
+ },
344
+ });
345
+
346
+ console.log("Scheduled for", publishDate, "- Post ID:", postId);
347
+ ```
348
+
349
+ ---
350
+
351
+ ### list()
352
+
353
+ Search and retrieve publishing posts with pagination and filtering options.
354
+
355
+ **Parameters:**
356
+
357
+ - `params` (IListParams, optional): Search and filter options
358
+ - `workspaceId` (string, optional): Filter by workspace ID
359
+ - `currentStatus` (string, optional): Filter by post status ('pending', 'processing', 'done', 'error', etc.)
360
+ - `tag` (string, optional): Filter by custom tag
361
+ - `refId` (string, optional): Filter by reference ID
362
+ - `pagination` (IPaginationParams, optional): Pagination settings
363
+ - `page` (number): Page number (default: 1)
364
+ - `pageSize` (number): Items per page (default: 10)
365
+
366
+ **Returns:** `Promise<ISearchSocialPublisherPostResponse>` - Paginated post list
367
+
368
+ **Response Structure:**
369
+
370
+ ```typescript
371
+ {
372
+ items: Array<{
373
+ _id: string; // Post ID
374
+ numbering: string; // Post number (e.g., "T-12345")
375
+ caption: string; // Post caption/title
376
+ createdAt: Date; // Creation timestamp
377
+ currentStatus: string; // Overall post status
378
+ isAllowYoutube: boolean; // YouTube enabled
379
+ isAllowFacebookPage: boolean; // Facebook enabled
380
+ isAllowInstagram: boolean; // Instagram enabled
381
+ isAllowTiktok: boolean; // TikTok enabled
382
+ workspaceName: string; // Workspace name
383
+ scheduleType: "schedule" | "now"; // Schedule type
384
+ scheduleScheduledAt: Date | null; // Scheduled date
385
+ scheduleExecutedAt: Date | null; // Execution date
386
+ refId: string; // Reference ID
387
+ tag: string; // Custom tag
388
+ apiKeyName: string; // API key name
389
+ }>;
390
+ pagination: {
391
+ page: number; // Current page
392
+ pageSize: number; // Items per page
393
+ totalCount: number; // Total posts
394
+ totalPages: number; // Total pages
395
+ }
396
+ }
397
+ ```
398
+
399
+ **Example:**
400
+
401
+ ```typescript
402
+ // Get all posts with pagination
403
+ const posts = await client.list(
404
+ {},
405
+ {
406
+ page: 1,
407
+ pageSize: 20,
408
+ },
409
+ );
410
+
411
+ console.log(`Total posts: ${posts.pagination.totalCount}`);
412
+ console.log(`Showing page ${posts.pagination.page} of ${posts.pagination.totalPages}`);
413
+
414
+ // Display posts
415
+ posts.items.forEach((post) => {
416
+ console.log(`${post.numbering}: ${post.caption}`);
417
+ console.log(` Status: ${post.currentStatus}`);
418
+ console.log(
419
+ ` Platforms: ${[post.isAllowYoutube && "YouTube", post.isAllowTiktok && "TikTok", post.isAllowFacebookPage && "Facebook", post.isAllowInstagram && "Instagram"].filter(Boolean).join(", ")}`,
420
+ );
421
+ });
422
+
423
+ // Filter by workspace
424
+ const workspacePosts = await client.list(
425
+ {
426
+ workspaceId: "workspace-123",
427
+ },
428
+ {
429
+ page: 1,
430
+ pageSize: 50,
431
+ },
432
+ );
433
+
434
+ console.log(`Workspace has ${workspacePosts.items.length} posts`);
435
+
436
+ // Filter by status
437
+ const pendingPosts = await client.list(
438
+ {
439
+ currentStatus: "pending",
440
+ },
441
+ {
442
+ page: 1,
443
+ pageSize: 10,
444
+ },
445
+ );
446
+
447
+ console.log(`Pending posts: ${pendingPosts.pagination.totalCount}`);
448
+
449
+ // Filter by tag
450
+ const campaignPosts = await client.list(
451
+ {
452
+ tag: "summer-campaign",
453
+ },
454
+ {
455
+ page: 1,
456
+ pageSize: 100,
457
+ },
458
+ );
459
+
460
+ console.log(`Campaign posts: ${campaignPosts.items.length}`);
461
+
462
+ // Filter by reference ID
463
+ const specificPost = await client.list(
464
+ {
465
+ refId: "PROD-001",
466
+ },
467
+ {
468
+ page: 1,
469
+ pageSize: 1,
470
+ },
471
+ );
472
+
473
+ if (specificPost.items.length > 0) {
474
+ console.log("Found post:", specificPost.items[0].caption);
475
+ }
476
+ ```
477
+
478
+ ---
479
+
480
+ ### getStatus()
481
+
482
+ Retrieve detailed status information for a specific publishing post, including platform-specific progress and post URLs.
483
+
484
+ **Parameters:**
485
+
486
+ - `id` (string): Post ID
487
+
488
+ **Returns:** `Promise<ISocialPublisherPostStatusResponse>` - Detailed post status
489
+
490
+ **Response Structure:**
491
+
492
+ ```typescript
493
+ {
494
+ _id: string; // Post ID
495
+ numbering: string; // Post number
496
+ caption: string; // Post caption
497
+ currentStatus: string; // Overall status
498
+ createdAt: Date; // Creation time
499
+ startedAt: Date; // Start time
500
+
501
+ // Platform-specific details
502
+ youtube?: {
503
+ tags: string[];
504
+ postInfo: {
505
+ isAllow: boolean; // Platform enabled
506
+ currentStatus: string; // Platform status
507
+ videoURL: string; // Published video URL
508
+ socialPublisherAccount: { // Account details
509
+ name: string;
510
+ thumbnail: string;
511
+ platformAccountId: string;
512
+ };
513
+ };
514
+ };
515
+
516
+ tiktok?: { /* Similar structure */ };
517
+ facebook?: { /* Similar structure */ };
518
+ instagram?: { /* Similar structure */ };
519
+
520
+ // Workspace info
521
+ workspace: {
522
+ _id: string;
523
+ name: string;
524
+ description: string;
525
+ };
526
+
527
+ // Schedule info
528
+ schedule: {
529
+ type: 'schedule' | 'now';
530
+ scheduledAt: Date;
531
+ executedAt: Date;
532
+ };
533
+ }
534
+ ```
535
+
536
+ **Example:**
537
+
538
+ ```typescript
539
+ // Get post status
540
+ const status = await client.getStatus("post-id-here");
541
+
542
+ console.log("Post:", status.numbering);
543
+ console.log("Overall Status:", status.currentStatus);
544
+ console.log("Created:", status.createdAt);
545
+
546
+ // Check YouTube status
547
+ if (status.youtube) {
548
+ console.log("\nYouTube:");
549
+ console.log(" Status:", status.youtube.postInfo.currentStatus);
550
+ console.log(" Channel:", status.youtube.postInfo.socialPublisherAccount.name);
551
+
552
+ if (status.youtube.postInfo.videoURL) {
553
+ console.log(" Video URL:", status.youtube.postInfo.videoURL);
554
+ }
555
+ }
556
+
557
+ // Check TikTok status
558
+ if (status.tiktok) {
559
+ console.log("\nTikTok:");
560
+ console.log(" Status:", status.tiktok.postInfo.currentStatus);
561
+ console.log(" Account:", status.tiktok.postInfo.socialPublisherAccount.name);
562
+
563
+ if (status.tiktok.postInfo.videoURL) {
564
+ console.log(" Video URL:", status.tiktok.postInfo.videoURL);
565
+ }
566
+ }
567
+
568
+ // Check Facebook status
569
+ if (status.facebook) {
570
+ console.log("\nFacebook:");
571
+ console.log(" Status:", status.facebook.postInfo.currentStatus);
572
+ console.log(" Page:", status.facebook.postInfo.socialPublisherAccount.name);
573
+ }
574
+
575
+ // Check Instagram status
576
+ if (status.instagram) {
577
+ console.log("\nInstagram:");
578
+ console.log(" Status:", status.instagram.postInfo.currentStatus);
579
+ console.log(" Account:", status.instagram.postInfo.socialPublisherAccount.name);
580
+ }
581
+
582
+ // Handle errors
583
+ if (status.currentStatus === "error") {
584
+ console.error("Post failed!");
585
+
586
+ // Check which platforms failed
587
+ const failures = [];
588
+ if (status.youtube?.postInfo.currentStatus === "error") failures.push("YouTube");
589
+ if (status.tiktok?.postInfo.currentStatus === "error") failures.push("TikTok");
590
+ if (status.facebook?.postInfo.currentStatus === "error") failures.push("Facebook");
591
+ if (status.instagram?.postInfo.currentStatus === "error") failures.push("Instagram");
592
+
593
+ console.error("Failed platforms:", failures.join(", "));
594
+ }
595
+
596
+ // Monitor post progress
597
+ async function waitForCompletion(postId: string, maxWaitMs = 300000) {
598
+ const startTime = Date.now();
599
+
600
+ while (Date.now() - startTime < maxWaitMs) {
601
+ const status = await client.getStatus(postId);
602
+
603
+ console.log(`Status: ${status.currentStatus}`);
604
+
605
+ if (status.currentStatus === "done") {
606
+ console.log("✓ Publishing complete!");
607
+ return status;
608
+ }
609
+
610
+ if (status.currentStatus === "error") {
611
+ throw new Error("Publishing failed");
612
+ }
613
+
614
+ // Wait 5 seconds before checking again
615
+ await new Promise((resolve) => setTimeout(resolve, 5000));
616
+ }
617
+
618
+ throw new Error("Timeout waiting for post completion");
619
+ }
620
+
621
+ const finalStatus = await waitForCompletion("post-id");
622
+ console.log("All platforms published successfully");
623
+ ```
624
+
625
+ ---
626
+
627
+ ### getDefaultSettings()
628
+
629
+ Retrieve default configuration settings for social media publishing, including platform limits and default values.
630
+
631
+ **Parameters:** None
632
+
633
+ **Returns:** `Promise<IDefaultSettingsResponse>` - Default settings configuration
634
+
635
+ **Example:**
636
+
637
+ ```typescript
638
+ // Get default settings
639
+ const settings = await client.getDefaultSettings();
640
+
641
+ console.log("Default Settings:", settings);
642
+
643
+ // Use defaults in your application
644
+ console.log("Max video size:", client.maxVideoUploadSizeBytes, "bytes");
645
+ console.log("Max thumbnail size:", client.maxImageUploadSizeBytes, "bytes");
646
+ ```
647
+
648
+ ---
649
+
650
+ ### getNextAndPrevious()
651
+
652
+ Get the IDs of the next and previous posts for navigation purposes.
653
+
654
+ **Parameters:**
655
+
656
+ - `id` (string): Current post ID
657
+
658
+ **Returns:** `Promise<ISocialPublisherPostNextPreviousResponse>` - Next and previous post IDs
659
+
660
+ **Response Structure:**
661
+
662
+ ```typescript
663
+ {
664
+ nextId?: string; // Next post ID (if exists)
665
+ previousId?: string; // Previous post ID (if exists)
666
+ }
667
+ ```
668
+
669
+ **Example:**
670
+
671
+ ```typescript
672
+ // Get navigation IDs
673
+ const navigation = await client.getNextAndPrevious("current-post-id");
674
+
675
+ if (navigation.nextId) {
676
+ console.log("Next post:", navigation.nextId);
677
+
678
+ // Navigate to next post
679
+ const nextPost = await client.getStatus(navigation.nextId);
680
+ console.log("Next post caption:", nextPost.caption);
681
+ }
682
+
683
+ if (navigation.previousId) {
684
+ console.log("Previous post:", navigation.previousId);
685
+
686
+ // Navigate to previous post
687
+ const prevPost = await client.getStatus(navigation.previousId);
688
+ console.log("Previous post caption:", prevPost.caption);
689
+ }
690
+
691
+ // Build post navigation
692
+ async function navigateForward(startPostId: string, count: number) {
693
+ const posts = [];
694
+ let currentId = startPostId;
695
+
696
+ for (let i = 0; i < count; i++) {
697
+ const status = await client.getStatus(currentId);
698
+ posts.push(status);
699
+
700
+ const nav = await client.getNextAndPrevious(currentId);
701
+ if (!nav.nextId) break;
702
+
703
+ currentId = nav.nextId;
704
+ }
705
+
706
+ return posts;
707
+ }
708
+
709
+ const next5Posts = await navigateForward("post-id", 5);
710
+ console.log(`Retrieved ${next5Posts.length} posts`);
711
+ ```
712
+
713
+ ---
714
+
715
+ ## 🔄 Complete Workflow Example
716
+
717
+ ```typescript
718
+ import { HttpClient } from "@posty5/core";
719
+ import { SocialPublisherPostClient } from "@posty5/social-publisher-post";
720
+ import * as fs from "fs";
721
+
722
+ // Initialize client
723
+ const httpClient = new HttpClient({
724
+ apiKey: process.env.POSTY5_API_KEY!,
725
+ debug: false,
726
+ });
727
+
728
+ const client = new SocialPublisherPostClient(httpClient);
729
+
730
+ async function publishVideoWorkflow() {
731
+ try {
732
+ // 1. Prepare video and thumbnail
733
+ console.log("Preparing media files...");
734
+ const videoBuffer = fs.readFileSync("./content/video.mp4");
735
+ const thumbBuffer = fs.readFileSync("./content/thumbnail.jpg");
736
+
737
+ const video = new File([videoBuffer], "video.mp4", { type: "video/mp4" });
738
+ const thumbnail = new File([thumbBuffer], "thumb.jpg", { type: "image/jpeg" });
739
+
740
+ // 2. Publish to multiple platforms
741
+ console.log("Publishing video...");
742
+ const postId = await client.publishShortVideo({
743
+ workspaceId: "workspace-123",
744
+ video: video,
745
+ thumbnail: thumbnail,
746
+ youtube: {
747
+ title: "Product Demo 2024",
748
+ description: "Check out our latest product features",
749
+ tags: ["product", "demo", "2024"],
750
+ },
751
+ tiktok: {
752
+ caption: "New product alert! 🚀 #Product #Tech",
753
+ privacy_level: "public",
754
+ disable_duet: false,
755
+ disable_stitch: false,
756
+ disable_comment: false,
757
+ },
758
+ tag: "product-demo",
759
+ refId: "DEMO-2024-001",
760
+ });
761
+
762
+ console.log("✓ Post created:", postId);
763
+
764
+ // 3. Monitor publishing progress
765
+ console.log("\nMonitoring progress...");
766
+ let attempts = 0;
767
+ const maxAttempts = 60; // 5 minutes (5 second intervals)
768
+
769
+ while (attempts < maxAttempts) {
770
+ const status = await client.getStatus(postId);
771
+
772
+ console.log(` Status: ${status.currentStatus}`);
773
+
774
+ // Check individual platforms
775
+ if (status.youtube) {
776
+ console.log(` YouTube: ${status.youtube.postInfo.currentStatus}`);
777
+ }
778
+ if (status.tiktok) {
779
+ console.log(` TikTok: ${status.tiktok.postInfo.currentStatus}`);
780
+ }
781
+
782
+ // Check if completed
783
+ if (status.currentStatus === "done") {
784
+ console.log("\n✓ Publishing complete!");
785
+
786
+ // Get video URLs
787
+ if (status.youtube?.postInfo.videoURL) {
788
+ console.log(" YouTube URL:", status.youtube.postInfo.videoURL);
789
+ }
790
+ if (status.tiktok?.postInfo.videoURL) {
791
+ console.log(" TikTok URL:", status.tiktok.postInfo.videoURL);
792
+ }
793
+
794
+ return status;
795
+ }
796
+
797
+ // Check for errors
798
+ if (status.currentStatus === "error") {
799
+ console.error("\n✗ Publishing failed");
800
+ throw new Error("Post failed");
801
+ }
802
+
803
+ // Wait before checking again
804
+ await new Promise((resolve) => setTimeout(resolve, 5000));
805
+ attempts++;
806
+ }
807
+
808
+ throw new Error("Timeout: Post did not complete within 5 minutes");
809
+ } catch (error) {
810
+ console.error("Error:", error.message);
811
+ throw error;
812
+ }
813
+ }
814
+
815
+ // Run the workflow
816
+ publishVideoWorkflow()
817
+ .then(() => console.log("\nWorkflow completed successfully"))
818
+ .catch((err) => console.error("\nWorkflow failed:", err));
819
+ ```
820
+
821
+ ---
822
+
823
+ ## 📘 TypeScript Support
824
+
825
+ Full TypeScript support with exported interfaces:
826
+
827
+ ```typescript
828
+ import {
829
+ // Client
830
+ SocialPublisherPostClient,
831
+
832
+ // Publishing options
833
+ IPublishOptions,
834
+
835
+ // Platform configurations
836
+ IYouTubeConfig,
837
+ ITikTokConfig,
838
+ IFacebookPageConfig,
839
+ IInstagramConfig,
840
+
841
+ // Schedule configuration
842
+ IScheduleConfig,
843
+
844
+ // Optional post-publish comment (Pro plan, +1 credit)
845
+ ICommentRequest,
846
+ ICommentInfoDTO,
847
+ CommentStatusType, // 'pending' | 'processing' | 'done' | 'error' | 'skipped' | 'notSupported'
848
+
849
+ // Search parameters
850
+ IListParams,
851
+
852
+ // Response interfaces
853
+ ISocialPublisherPostStatusResponse,
854
+ ISearchSocialPublisherPostResponse,
855
+ ISocialPublisherPostNextPreviousResponse,
856
+ IDefaultSettingsResponse,
857
+
858
+ // Response types
859
+ ISocialPublisherPostResponse,
860
+ ISocialPublisherWorkspace,
861
+ ISocialPublisherAccount,
862
+
863
+ // Status types
864
+ SocialPublisherPostStatusType, // 'pending' | 'processing' | 'done' | 'error' | ...
865
+ SocialPublisherPostSourceType, // 'video-file' | 'video-url' | 'facebook-video' | ...
866
+ SocialPublisherAccountStatusType, // 'active' | 'inactive' | 'authenticationExpired'
867
+ } from "@posty5/social-publisher-post";
868
+ ```
869
+
870
+ ### Platform Configuration Types
871
+
872
+ **YouTube Configuration:**
873
+
874
+ ```typescript
875
+ interface IYouTubeConfig {
876
+ title: string; // Video title (required)
877
+ description: string; // Video description (required)
878
+ tags: string[]; // Video tags (required)
879
+ madeForKids?: boolean; // Mark as made for kids (optional)
880
+ defaultLanguage?: string; // Default language code (optional)
881
+ defaultAudioLanguage?: string; // Audio language code (optional)
882
+ categoryId?: string; // YouTube category ID (optional)
883
+ localizationLanguages?: string[]; // Localization languages (optional)
884
+ }
885
+ ```
886
+
887
+ **TikTok Configuration:**
888
+
889
+ ```typescript
890
+ interface ITikTokConfig {
891
+ caption: string; // Video caption (required)
892
+ privacy_level: string; // 'public' | 'SELF_ONLY' | 'MUTUAL_FOLLOW_FRIENDS' (required)
893
+ disable_duet: boolean; // Disable duet feature (required)
894
+ disable_stitch: boolean; // Disable stitch feature (required)
895
+ disable_comment: boolean; // Disable comments (required)
896
+ }
897
+ ```
898
+
899
+ **Facebook Configuration:**
900
+
901
+ ```typescript
902
+ interface IFacebookPageConfig {
903
+ description: string; // Post description (required)
904
+ title?: string; // Post title (optional)
905
+ }
906
+ ```
907
+
908
+ **Instagram Configuration:**
909
+
910
+ ```typescript
911
+ interface IInstagramConfig {
912
+ description: string; // Post description (required)
913
+ share_to_feed?: boolean; // Share to feed (optional)
914
+ is_published_to_both_feed_and_story?: boolean; // Publish to both (optional)
915
+ }
916
+ ```
917
+
918
+ ---
919
+
920
+ ## 📦 Related Packages
921
+
922
+ This SDK ecosystem contains the following tool packages:
923
+
924
+ | Package | Description | Version | GitHub | NPM |
925
+ | --- | --- | --- | --- | --- |
926
+ | @posty5/short-link | URL shortener client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-short-link) | [📦 NPM](https://www.npmjs.com/package/@posty5/short-link) |
927
+ | @posty5/qr-code | QR code generator client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-qr-code) | [📦 NPM](https://www.npmjs.com/package/@posty5/qr-code) |
928
+ | @posty5/html-hosting | HTML hosting client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-html-hosting) | [📦 NPM](https://www.npmjs.com/package/@posty5/html-hosting) |
929
+ | @posty5/html-hosting-variables | HTML hosting variables client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-html-hosting-variables) | [📦 NPM](https://www.npmjs.com/package/@posty5/html-hosting-variables) |
930
+ | @posty5/html-hosting-form-submission | Form submission client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-html-hosting-form-submission) | [📦 NPM](https://www.npmjs.com/package/@posty5/html-hosting-form-submission) |
931
+ | @posty5/social-publisher-workspace | Social publisher workspace client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-social-publisher-workspace) | [📦 NPM](https://www.npmjs.com/package/@posty5/social-publisher-workspace) |
932
+ | @posty5/social-publisher-post | Social publisher post client | 1.0.2 | [📖 Docs](https://github.com/Posty5/npm-sdk/tree/main/posty5-social-publisher-post) | [📦 NPM](https://www.npmjs.com/package/@posty5/social-publisher-post) |
933
+
934
+ ---
935
+
936
+ ## 💻 Node.js Compatibility
937
+
938
+ - **Node.js**: >= 16.0.0
939
+ - **Module Systems**: ESM and CommonJS
940
+ - **TypeScript**: Full type definitions included
941
+
942
+ ---
943
+
944
+ ## 🆘 Support
945
+
946
+ We're here to help you succeed with Posty5!
947
+
948
+ ### Get Help
949
+
950
+ - **Documentation**: [https://guide.posty5.com](https://guide.posty5.com)
951
+ - **Contact Us**: [https://posty5.com/contact-us](https://posty5.com/contact-us)
952
+ - **GitHub Issues**: [Report bugs or request features](https://github.com/Posty5/npm-sdk/issues)
953
+ - **API Status**: Check API status and uptime at [https://status.posty5.com](https://status.posty5.com)
954
+
955
+ ### Common Issues
956
+
957
+ 1. **Authentication Errors**
958
+ - Ensure your API key is valid and active
959
+ - Get your API key from [studio.posty5.com/account/settings?tab=APIKeys](studio.posty5.com/account/settings?tab=APIKeys)
960
+
961
+ 2. **Network Errors**
962
+ - Check your internet connection
963
+ - Verify firewall settings allow connections to `api.posty5.com`
964
+
965
+ 3. **Rate Limiting**
966
+ - The SDK includes automatic retry logic
967
+ - Check your API plan limits in the dashboard
968
+
969
+ ---
970
+
971
+ ## 📄 License
972
+
973
+ MIT License - see [LICENSE](./LICENSE) file for details.
974
+
975
+ ---
976
+
977
+ ## 🔗 Useful Links
978
+
979
+ - **Website**: [https://posty5.com](https://posty5.com)
980
+ - **Dashboard**: [studio.posty5.com/account/settings?tab=APIKeys](studio.posty5.com/account/settings?tab=APIKeys)
981
+ - **API Documentation**: [https://docs.posty5.com](https://docs.posty5.com)
982
+ - **GitHub**: [https://github.com/Posty5/npm-sdk](https://github.com/Posty5/npm-sdk)
983
+
984
+ ---
985
+
986
+ Made with ❤️ by the Posty5 team