@getlatedev/node 0.1.23 → 0.1.25
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 +125 -127
- package/dist/index.d.mts +64 -527
- package/dist/index.d.ts +64 -527
- package/dist/index.js +0 -14
- package/dist/index.mjs +0 -14
- package/package.json +1 -1
- package/src/client.ts +0 -4
- package/src/generated/sdk.gen.ts +224 -753
- package/src/generated/types.gen.ts +63 -532
|
@@ -94,12 +94,7 @@ export type ApiKey = {
|
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
|
-
* Bluesky post settings
|
|
98
|
-
* - Supports text posts with up to 4 images per post
|
|
99
|
-
* - Videos supported (single video per post)
|
|
100
|
-
* - threadItems creates a reply chain (Bluesky thread)
|
|
101
|
-
* - Images exceeding Bluesky's 1MB limit are automatically compressed
|
|
102
|
-
* - Alt text for images is supported via mediaItem properties
|
|
97
|
+
* Bluesky post settings. Supports text posts with up to 4 images or a single video. threadItems creates a reply chain (Bluesky thread). Images exceeding 1MB are automatically compressed. Alt text supported via mediaItem properties.
|
|
103
98
|
*
|
|
104
99
|
*/
|
|
105
100
|
export type BlueskyPlatformData = {
|
|
@@ -132,13 +127,7 @@ export type ConnectionLog = {
|
|
|
132
127
|
accountId?: string;
|
|
133
128
|
platform?: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat';
|
|
134
129
|
/**
|
|
135
|
-
* Type of connection event:
|
|
136
|
-
* - `connect_success` - New account connected successfully
|
|
137
|
-
* - `connect_failed` - Connection attempt failed
|
|
138
|
-
* - `disconnect` - Account was disconnected
|
|
139
|
-
* - `reconnect_success` - Existing account reconnected successfully
|
|
140
|
-
* - `reconnect_failed` - Reconnection attempt failed
|
|
141
|
-
*
|
|
130
|
+
* Type of connection event: connect_success, connect_failed, disconnect, reconnect_success, reconnect_failed
|
|
142
131
|
*/
|
|
143
132
|
eventType?: 'connect_success' | 'connect_failed' | 'disconnect' | 'reconnect_success' | 'reconnect_failed';
|
|
144
133
|
/**
|
|
@@ -209,13 +198,7 @@ export type ConnectionLog = {
|
|
|
209
198
|
export type platform = 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat';
|
|
210
199
|
|
|
211
200
|
/**
|
|
212
|
-
* Type of connection event:
|
|
213
|
-
* - `connect_success` - New account connected successfully
|
|
214
|
-
* - `connect_failed` - Connection attempt failed
|
|
215
|
-
* - `disconnect` - Account was disconnected
|
|
216
|
-
* - `reconnect_success` - Existing account reconnected successfully
|
|
217
|
-
* - `reconnect_failed` - Reconnection attempt failed
|
|
218
|
-
*
|
|
201
|
+
* Type of connection event: connect_success, connect_failed, disconnect, reconnect_success, reconnect_failed
|
|
219
202
|
*/
|
|
220
203
|
export type eventType = 'connect_success' | 'connect_failed' | 'disconnect' | 'reconnect_success' | 'reconnect_failed';
|
|
221
204
|
|
|
@@ -248,14 +231,7 @@ export type ErrorResponse = {
|
|
|
248
231
|
};
|
|
249
232
|
|
|
250
233
|
/**
|
|
251
|
-
*
|
|
252
|
-
* - Posts cannot mix videos and images.
|
|
253
|
-
* - Multiple images supported via attached_media (up to 10 images for feed posts).
|
|
254
|
-
* - Multiple videos in the same post are not supported.
|
|
255
|
-
* - Stories require media (single image or video); text captions are not displayed with stories.
|
|
256
|
-
* - Stories are ephemeral (disappear after 24 hours).
|
|
257
|
-
* - Use pageId to post to multiple pages from the same account connection.
|
|
258
|
-
*
|
|
234
|
+
* Cannot mix videos and images. Up to 10 images for feed posts. Stories require single image or video (no captions, ephemeral 24h). Use pageId for multi-page posting.
|
|
259
235
|
*/
|
|
260
236
|
export type FacebookPlatformData = {
|
|
261
237
|
/**
|
|
@@ -365,14 +341,7 @@ export type FoodMenuSection = {
|
|
|
365
341
|
};
|
|
366
342
|
|
|
367
343
|
/**
|
|
368
|
-
* Google
|
|
369
|
-
* - Posts support text content and a single image (no videos)
|
|
370
|
-
* - Images must be publicly accessible URLs
|
|
371
|
-
* - Call-to-action buttons drive user engagement
|
|
372
|
-
* - Posts appear on your Google Business Profile and in Google Search/Maps
|
|
373
|
-
* - Use locationId to post to multiple locations from the same account connection
|
|
374
|
-
* - Language is auto-detected from content; override with languageCode if needed
|
|
375
|
-
*
|
|
344
|
+
* Posts support text and a single image (no videos). Images must be publicly accessible URLs. Optional call-to-action button. Posts appear on GBP, Google Search, and Maps. Use locationId for multi-location posting. Language is auto-detected; override with languageCode.
|
|
376
345
|
*/
|
|
377
346
|
export type GoogleBusinessPlatformData = {
|
|
378
347
|
/**
|
|
@@ -396,14 +365,7 @@ export type GoogleBusinessPlatformData = {
|
|
|
396
365
|
*/
|
|
397
366
|
callToAction?: {
|
|
398
367
|
/**
|
|
399
|
-
* Button action type:
|
|
400
|
-
* - LEARN_MORE: Link to more information
|
|
401
|
-
* - BOOK: Booking/reservation link
|
|
402
|
-
* - ORDER: Online ordering link
|
|
403
|
-
* - SHOP: E-commerce/shopping link
|
|
404
|
-
* - SIGN_UP: Registration/signup link
|
|
405
|
-
* - CALL: Phone call action
|
|
406
|
-
*
|
|
368
|
+
* Button action type: LEARN_MORE, BOOK, ORDER, SHOP, SIGN_UP, CALL
|
|
407
369
|
*/
|
|
408
370
|
type: 'LEARN_MORE' | 'BOOK' | 'ORDER' | 'SHOP' | 'SIGN_UP' | 'CALL';
|
|
409
371
|
/**
|
|
@@ -414,14 +376,7 @@ export type GoogleBusinessPlatformData = {
|
|
|
414
376
|
};
|
|
415
377
|
|
|
416
378
|
/**
|
|
417
|
-
* Button action type:
|
|
418
|
-
* - LEARN_MORE: Link to more information
|
|
419
|
-
* - BOOK: Booking/reservation link
|
|
420
|
-
* - ORDER: Online ordering link
|
|
421
|
-
* - SHOP: E-commerce/shopping link
|
|
422
|
-
* - SIGN_UP: Registration/signup link
|
|
423
|
-
* - CALL: Phone call action
|
|
424
|
-
*
|
|
379
|
+
* Button action type: LEARN_MORE, BOOK, ORDER, SHOP, SIGN_UP, CALL
|
|
425
380
|
*/
|
|
426
381
|
export type type = 'LEARN_MORE' | 'BOOK' | 'ORDER' | 'SHOP' | 'SIGN_UP' | 'CALL';
|
|
427
382
|
|
|
@@ -438,21 +393,7 @@ export type HashtagInfo = {
|
|
|
438
393
|
export type status = 'safe' | 'banned' | 'restricted' | 'unknown';
|
|
439
394
|
|
|
440
395
|
/**
|
|
441
|
-
*
|
|
442
|
-
* - Feed posts require images with aspect ratio between 0.8 (4:5 portrait) and 1.91 (1.91:1 landscape).
|
|
443
|
-
* - Images outside this range (e.g., 9:16 Stories/TikTok format) must use contentType 'story'.
|
|
444
|
-
* - Validation happens at post creation; invalid images are rejected immediately with helpful error messages.
|
|
445
|
-
* - Carousels support up to 10 media items.
|
|
446
|
-
* - Stories require media; no captions are published with Stories.
|
|
447
|
-
* - User tags: coordinates range from 0.0 to 1.0 representing position from top-left corner. For carousels, use `mediaIndex` to tag specific slides. Tagged users receive notifications.
|
|
448
|
-
*
|
|
449
|
-
* **Automatic Compression (similar to Bluesky):**
|
|
450
|
-
* - All images (story, post, carousel, thumbnails) exceeding 8 MB are automatically compressed using quality reduction and resizing.
|
|
451
|
-
* - Story videos exceeding 100 MB are automatically compressed.
|
|
452
|
-
* - Reel videos exceeding 300 MB are automatically compressed.
|
|
453
|
-
* - Compression uses Sharp (images) and FFmpeg (videos) to maintain quality while meeting size limits.
|
|
454
|
-
* - Original files are preserved; compressed versions are uploaded to blob storage automatically.
|
|
455
|
-
*
|
|
396
|
+
* Feed posts require aspect ratio 0.8-1.91; images outside this range must use contentType story. Carousels up to 10 items. Stories require media, no captions. User tag coordinates 0.0-1.0 from top-left. Images over 8 MB and videos over 100 MB (stories) or 300 MB (reels) are auto-compressed.
|
|
456
397
|
*/
|
|
457
398
|
export type InstagramPlatformData = {
|
|
458
399
|
/**
|
|
@@ -472,27 +413,16 @@ export type InstagramPlatformData = {
|
|
|
472
413
|
*/
|
|
473
414
|
firstComment?: string;
|
|
474
415
|
/**
|
|
475
|
-
* Trial Reels configuration. Trial reels are
|
|
476
|
-
* They can later be "graduated" (converted to regular reels visible to followers)
|
|
477
|
-
* either manually in the Instagram app or automatically based on performance.
|
|
478
|
-
* Only applies to Reels (video posts).
|
|
479
|
-
*
|
|
416
|
+
* Trial Reels configuration. Trial reels are shared to non-followers first and can later be graduated to regular reels manually or automatically based on performance. Only applies to Reels.
|
|
480
417
|
*/
|
|
481
418
|
trialParams?: {
|
|
482
419
|
/**
|
|
483
|
-
*
|
|
484
|
-
* - MANUAL: The trial reel can only be manually graduated from the native Instagram app.
|
|
485
|
-
* - SS_PERFORMANCE: The trial reel will be automatically graduated if it performs well with non-followers.
|
|
486
|
-
*
|
|
420
|
+
* MANUAL (graduate from Instagram app) or SS_PERFORMANCE (auto-graduate if performs well with non-followers)
|
|
487
421
|
*/
|
|
488
422
|
graduationStrategy?: 'MANUAL' | 'SS_PERFORMANCE';
|
|
489
423
|
};
|
|
490
424
|
/**
|
|
491
|
-
* Tag Instagram users in photos by username and position
|
|
492
|
-
* For carousel posts, use the optional `mediaIndex` field to specify which slide each tag applies to.
|
|
493
|
-
* Tags without `mediaIndex` default to the first image (index 0) for backwards compatibility.
|
|
494
|
-
* Tags targeting video items are silently skipped (Instagram only supports tagging on images).
|
|
495
|
-
*
|
|
425
|
+
* Tag Instagram users in photos by username and position. Not supported for stories or videos. For carousels, use mediaIndex to target specific slides (defaults to 0). Tags on video items are silently skipped.
|
|
496
426
|
*/
|
|
497
427
|
userTags?: Array<{
|
|
498
428
|
/**
|
|
@@ -508,34 +438,22 @@ export type InstagramPlatformData = {
|
|
|
508
438
|
*/
|
|
509
439
|
y: number;
|
|
510
440
|
/**
|
|
511
|
-
* Zero-based index of the carousel item to tag. Defaults to 0
|
|
512
|
-
* Only relevant for carousel posts. Tags targeting video items or out-of-range indices are ignored.
|
|
513
|
-
*
|
|
441
|
+
* Zero-based index of the carousel item to tag. Defaults to 0. Tags on video items or out-of-range indices are ignored.
|
|
514
442
|
*/
|
|
515
443
|
mediaIndex?: number;
|
|
516
444
|
}>;
|
|
517
445
|
/**
|
|
518
|
-
* Custom name for
|
|
519
|
-
* Only applies to Reels (video posts). Can only be set once - either during creation or
|
|
520
|
-
* later from the Instagram audio page in the app.
|
|
521
|
-
*
|
|
446
|
+
* Custom name for original audio in Reels. Replaces the default "Original Audio" label. Can only be set once.
|
|
522
447
|
*/
|
|
523
448
|
audioName?: string;
|
|
524
449
|
/**
|
|
525
|
-
* Millisecond offset from
|
|
526
|
-
* Only applies to Reels (video posts). If a custom thumbnail URL (instagramThumbnail
|
|
527
|
-
* in mediaItems) is provided, it takes priority and this offset is ignored.
|
|
528
|
-
* Defaults to 0 (first frame).
|
|
529
|
-
*
|
|
450
|
+
* Millisecond offset from video start for the Reel thumbnail. Ignored if a custom thumbnail URL is provided. Defaults to 0.
|
|
530
451
|
*/
|
|
531
452
|
thumbOffset?: number;
|
|
532
453
|
};
|
|
533
454
|
|
|
534
455
|
/**
|
|
535
|
-
*
|
|
536
|
-
* - MANUAL: The trial reel can only be manually graduated from the native Instagram app.
|
|
537
|
-
* - SS_PERFORMANCE: The trial reel will be automatically graduated if it performs well with non-followers.
|
|
538
|
-
*
|
|
456
|
+
* MANUAL (graduate from Instagram app) or SS_PERFORMANCE (auto-graduate if performs well with non-followers)
|
|
539
457
|
*/
|
|
540
458
|
export type graduationStrategy = 'MANUAL' | 'SS_PERFORMANCE';
|
|
541
459
|
|
|
@@ -631,14 +549,7 @@ export type LinkedInAggregateAnalyticsTotalResponse = {
|
|
|
631
549
|
export type aggregation3 = 'TOTAL';
|
|
632
550
|
|
|
633
551
|
/**
|
|
634
|
-
*
|
|
635
|
-
* - Multi-image posts support up to 20 images.
|
|
636
|
-
* - Multi-video posts are not supported.
|
|
637
|
-
* - Single PDF document posts are supported (max 100MB, ~300 pages). Documents cannot be mixed with other media.
|
|
638
|
-
* - Post ID is returned in the x-restli-id response header.
|
|
639
|
-
* - Link previews are automatically generated for URLs when no media is attached (can be disabled with disableLinkPreview).
|
|
640
|
-
* - Use organizationUrn to post to multiple organizations from the same account connection.
|
|
641
|
-
*
|
|
552
|
+
* Up to 20 images, no multi-video. Single PDF supported (max 100MB, ~300 pages, cannot mix with other media). Link previews auto-generated when no media attached (disable with disableLinkPreview). Use organizationUrn for multi-org posting.
|
|
642
553
|
*/
|
|
643
554
|
export type LinkedInPlatformData = {
|
|
644
555
|
/**
|
|
@@ -660,43 +571,8 @@ export type LinkedInPlatformData = {
|
|
|
660
571
|
};
|
|
661
572
|
|
|
662
573
|
/**
|
|
663
|
-
* Media referenced in posts. URLs must be publicly reachable over HTTPS
|
|
664
|
-
*
|
|
665
|
-
*
|
|
666
|
-
* **Uploading Media:**
|
|
667
|
-
* Use `POST /v1/media/presign` to get a presigned URL, then upload your file directly to cloud storage.
|
|
668
|
-
* Supports files up to 5GB. See the `/v1/media/presign` endpoint documentation for details.
|
|
669
|
-
*
|
|
670
|
-
* **Automatic Media Compression:**
|
|
671
|
-
* Late automatically compresses media that exceeds platform limits, so you don't need to worry about file size restrictions. Compression happens server-side during publishing.
|
|
672
|
-
*
|
|
673
|
-
* **Image compression by platform:**
|
|
674
|
-
* - Twitter/X: >5 MB
|
|
675
|
-
* - Instagram: >8 MB
|
|
676
|
-
* - Threads: >8 MB
|
|
677
|
-
* - Facebook: >10 MB
|
|
678
|
-
* - LinkedIn: >8 MB
|
|
679
|
-
* - TikTok: >20 MB
|
|
680
|
-
* - Pinterest: >32 MB
|
|
681
|
-
* - Reddit: >20 MB
|
|
682
|
-
* - Snapchat: >20 MB
|
|
683
|
-
* - Telegram: >10 MB
|
|
684
|
-
* - Bluesky: >1 MB
|
|
685
|
-
* - YouTube (thumbnails): >2 MB
|
|
686
|
-
* - Google Business: >5 MB
|
|
687
|
-
*
|
|
688
|
-
* **Video compression by platform:**
|
|
689
|
-
* - Twitter/X: >512 MB
|
|
690
|
-
* - Instagram Stories: >100 MB
|
|
691
|
-
* - Instagram Reels: >300 MB
|
|
692
|
-
* - Facebook: >4 GB
|
|
693
|
-
* - LinkedIn: >5 GB
|
|
694
|
-
* - TikTok: >4 GB
|
|
695
|
-
* - Pinterest: >2 GB
|
|
696
|
-
* - Snapchat: >500 MB
|
|
697
|
-
* - Telegram: >50 MB
|
|
698
|
-
*
|
|
699
|
-
* Note: Videos larger than 200 MB may not be compressed due to server timeout constraints. For best results, compress very large videos before uploading.
|
|
574
|
+
* Media referenced in posts. URLs must be publicly reachable over HTTPS. When using third-party storage, ensure signed links remain valid until upload completes.
|
|
575
|
+
* Use POST /v1/media/presign to get a presigned URL for direct cloud storage upload (up to 5GB). Late automatically compresses images and videos that exceed platform limits server-side during publishing. Videos larger than 200 MB may not be compressed due to timeout constraints.
|
|
700
576
|
*
|
|
701
577
|
*/
|
|
702
578
|
export type MediaItem = {
|
|
@@ -845,59 +721,26 @@ export type PlatformTarget = {
|
|
|
845
721
|
*/
|
|
846
722
|
publishedAt?: string;
|
|
847
723
|
/**
|
|
848
|
-
* Human-readable error message when status is
|
|
849
|
-
* Contains platform-specific error details explaining why the publish failed.
|
|
850
|
-
* Examples:
|
|
851
|
-
* - "Instagram access token has expired. Please reconnect your account."
|
|
852
|
-
* - "Post text exceeds the 500 character limit for Threads."
|
|
853
|
-
* - "You do not have enough karma to post in this subreddit."
|
|
854
|
-
* - "Video is too long for Reels. Facebook Reels must be 90 seconds or less."
|
|
855
|
-
*
|
|
724
|
+
* Human-readable error message when status is failed. Contains platform-specific error details explaining why the publish failed.
|
|
856
725
|
*/
|
|
857
726
|
errorMessage?: string;
|
|
858
727
|
/**
|
|
859
|
-
* Error category for programmatic handling:
|
|
860
|
-
* - auth_expired: Token expired or revoked, account needs reconnection
|
|
861
|
-
* - user_content: Content doesn't meet platform requirements (too long, wrong format, etc.)
|
|
862
|
-
* - user_abuse: Rate limits, spam detection, excessive posting
|
|
863
|
-
* - account_issue: Account configuration problems (missing board, inactive account)
|
|
864
|
-
* - platform_rejected: Platform rules violated (banned, suspended, policy violation)
|
|
865
|
-
* - platform_error: Platform-side issues (5xx errors, maintenance)
|
|
866
|
-
* - system_error: Late infrastructure issues (timeouts, network errors)
|
|
867
|
-
* - unknown: Unclassified error
|
|
868
|
-
*
|
|
728
|
+
* Error category for programmatic handling: auth_expired (token expired/revoked), user_content (wrong format/too long), user_abuse (rate limits/spam), account_issue (config problems), platform_rejected (policy violation), platform_error (5xx/maintenance), system_error (Late infra), unknown
|
|
869
729
|
*/
|
|
870
730
|
errorCategory?: 'auth_expired' | 'user_content' | 'user_abuse' | 'account_issue' | 'platform_rejected' | 'platform_error' | 'system_error' | 'unknown';
|
|
871
731
|
/**
|
|
872
|
-
* Who
|
|
873
|
-
* - user: User action required (fix content, reconnect account)
|
|
874
|
-
* - platform: Platform-side issue (outage, API change)
|
|
875
|
-
* - system: Late system issue (rare)
|
|
876
|
-
*
|
|
732
|
+
* Who caused the error: user (fix content/reconnect), platform (outage/API change), system (Late issue, rare)
|
|
877
733
|
*/
|
|
878
734
|
errorSource?: 'user' | 'platform' | 'system';
|
|
879
735
|
};
|
|
880
736
|
|
|
881
737
|
/**
|
|
882
|
-
* Error category for programmatic handling:
|
|
883
|
-
* - auth_expired: Token expired or revoked, account needs reconnection
|
|
884
|
-
* - user_content: Content doesn't meet platform requirements (too long, wrong format, etc.)
|
|
885
|
-
* - user_abuse: Rate limits, spam detection, excessive posting
|
|
886
|
-
* - account_issue: Account configuration problems (missing board, inactive account)
|
|
887
|
-
* - platform_rejected: Platform rules violated (banned, suspended, policy violation)
|
|
888
|
-
* - platform_error: Platform-side issues (5xx errors, maintenance)
|
|
889
|
-
* - system_error: Late infrastructure issues (timeouts, network errors)
|
|
890
|
-
* - unknown: Unclassified error
|
|
891
|
-
*
|
|
738
|
+
* Error category for programmatic handling: auth_expired (token expired/revoked), user_content (wrong format/too long), user_abuse (rate limits/spam), account_issue (config problems), platform_rejected (policy violation), platform_error (5xx/maintenance), system_error (Late infra), unknown
|
|
892
739
|
*/
|
|
893
740
|
export type errorCategory = 'auth_expired' | 'user_content' | 'user_abuse' | 'account_issue' | 'platform_rejected' | 'platform_error' | 'system_error' | 'unknown';
|
|
894
741
|
|
|
895
742
|
/**
|
|
896
|
-
* Who
|
|
897
|
-
* - user: User action required (fix content, reconnect account)
|
|
898
|
-
* - platform: Platform-side issue (outage, API change)
|
|
899
|
-
* - system: Late system issue (rare)
|
|
900
|
-
*
|
|
743
|
+
* Who caused the error: user (fix content/reconnect), platform (outage/API change), system (Late issue, rare)
|
|
901
744
|
*/
|
|
902
745
|
export type errorSource = 'user' | 'platform' | 'system';
|
|
903
746
|
|
|
@@ -916,11 +759,7 @@ export type Post = {
|
|
|
916
759
|
timezone?: string;
|
|
917
760
|
status?: 'draft' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
918
761
|
/**
|
|
919
|
-
* YouTube tag
|
|
920
|
-
* - No count cap; duplicates removed.
|
|
921
|
-
* - Each tag must be ≤ 100 chars.
|
|
922
|
-
* - Combined characters across all tags ≤ 500.
|
|
923
|
-
*
|
|
762
|
+
* YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates removed.
|
|
924
763
|
*/
|
|
925
764
|
tags?: Array<(string)>;
|
|
926
765
|
hashtags?: Array<(string)>;
|
|
@@ -990,14 +829,7 @@ export type PostLog = {
|
|
|
990
829
|
accountId?: string;
|
|
991
830
|
accountUsername?: string;
|
|
992
831
|
/**
|
|
993
|
-
* Type of action logged:
|
|
994
|
-
* - `publish` - Initial publish attempt
|
|
995
|
-
* - `retry` - Retry after failure
|
|
996
|
-
* - `media_upload` - Media upload step
|
|
997
|
-
* - `rate_limit_pause` - Account paused due to rate limits
|
|
998
|
-
* - `token_refresh` - Token was refreshed
|
|
999
|
-
* - `cancelled` - Post was cancelled
|
|
1000
|
-
*
|
|
832
|
+
* Type of action logged: publish (initial attempt), retry (after failure), media_upload, rate_limit_pause, token_refresh, cancelled
|
|
1001
833
|
*/
|
|
1002
834
|
action?: 'publish' | 'retry' | 'media_upload' | 'rate_limit_pause' | 'token_refresh' | 'cancelled';
|
|
1003
835
|
status?: 'success' | 'failed' | 'pending' | 'skipped';
|
|
@@ -1060,52 +892,12 @@ export type PostLog = {
|
|
|
1060
892
|
};
|
|
1061
893
|
|
|
1062
894
|
/**
|
|
1063
|
-
* Type of action logged:
|
|
1064
|
-
* - `publish` - Initial publish attempt
|
|
1065
|
-
* - `retry` - Retry after failure
|
|
1066
|
-
* - `media_upload` - Media upload step
|
|
1067
|
-
* - `rate_limit_pause` - Account paused due to rate limits
|
|
1068
|
-
* - `token_refresh` - Token was refreshed
|
|
1069
|
-
* - `cancelled` - Post was cancelled
|
|
1070
|
-
*
|
|
895
|
+
* Type of action logged: publish (initial attempt), retry (after failure), media_upload, rate_limit_pause, token_refresh, cancelled
|
|
1071
896
|
*/
|
|
1072
897
|
export type action = 'publish' | 'retry' | 'media_upload' | 'rate_limit_pause' | 'token_refresh' | 'cancelled';
|
|
1073
898
|
|
|
1074
899
|
export type status3 = 'success' | 'failed' | 'pending' | 'skipped';
|
|
1075
900
|
|
|
1076
|
-
export type PostLogDetail = PostLog & {
|
|
1077
|
-
/**
|
|
1078
|
-
* Populated post with full details
|
|
1079
|
-
*/
|
|
1080
|
-
postId?: {
|
|
1081
|
-
_id?: string;
|
|
1082
|
-
content?: string;
|
|
1083
|
-
status?: string;
|
|
1084
|
-
scheduledFor?: string;
|
|
1085
|
-
platforms?: Array<{
|
|
1086
|
-
[key: string]: unknown;
|
|
1087
|
-
}>;
|
|
1088
|
-
mediaItems?: Array<{
|
|
1089
|
-
[key: string]: unknown;
|
|
1090
|
-
}>;
|
|
1091
|
-
};
|
|
1092
|
-
/**
|
|
1093
|
-
* Populated account reference
|
|
1094
|
-
*/
|
|
1095
|
-
accountId?: {
|
|
1096
|
-
_id?: string;
|
|
1097
|
-
platform?: string;
|
|
1098
|
-
username?: string;
|
|
1099
|
-
displayName?: string;
|
|
1100
|
-
};
|
|
1101
|
-
/**
|
|
1102
|
-
* Additional metadata (e.g., rate limit info)
|
|
1103
|
-
*/
|
|
1104
|
-
metadata?: {
|
|
1105
|
-
[key: string]: unknown;
|
|
1106
|
-
};
|
|
1107
|
-
};
|
|
1108
|
-
|
|
1109
901
|
export type PostRetryResponse = {
|
|
1110
902
|
message?: string;
|
|
1111
903
|
post?: Post;
|
|
@@ -1129,9 +921,7 @@ export type Profile = {
|
|
|
1129
921
|
color?: string;
|
|
1130
922
|
isDefault?: boolean;
|
|
1131
923
|
/**
|
|
1132
|
-
* Only present when
|
|
1133
|
-
* exceeds the user's plan limit. Over-limit profiles cannot be used for posting
|
|
1134
|
-
* but can be managed (disconnected accounts, deleted).
|
|
924
|
+
* Only present when includeOverLimit=true is used. Indicates if this profile exceeds the user's plan limit. Over-limit profiles cannot be used for posting but can be managed (disconnected accounts, deleted).
|
|
1135
925
|
*
|
|
1136
926
|
*/
|
|
1137
927
|
isOverLimit?: boolean;
|
|
@@ -1232,15 +1022,7 @@ export type QueueUpdateResponse = {
|
|
|
1232
1022
|
};
|
|
1233
1023
|
|
|
1234
1024
|
/**
|
|
1235
|
-
*
|
|
1236
|
-
* - Posts are either "link" (with URL/media) or "self" (text-only)
|
|
1237
|
-
* - If media is provided, the first media item's URL is used as the link
|
|
1238
|
-
* - Use forceSelf to override and create a text post with the URL in the body
|
|
1239
|
-
* - Subreddit defaults to the account's configured subreddit if omitted
|
|
1240
|
-
* - Use the same accountId multiple times with different subreddit values in platformSpecificData to post to multiple subreddits
|
|
1241
|
-
* - Images are automatically compressed if they exceed Reddit's 20MB limit
|
|
1242
|
-
* - Some subreddits require a flair; if not provided, the API will attempt to use the first available flair as fallback
|
|
1243
|
-
*
|
|
1025
|
+
* Posts are either link (with URL/media) or self (text-only). If media is provided, the first item URL is used as the link; use forceSelf to override. Subreddit defaults to the account's configured one. Images over 20 MB are auto-compressed. Some subreddits require a flair; if missing, the first available flair is used as fallback.
|
|
1244
1026
|
*/
|
|
1245
1027
|
export type RedditPlatformData = {
|
|
1246
1028
|
/**
|
|
@@ -1271,46 +1053,20 @@ export type RedditPlatformData = {
|
|
|
1271
1053
|
};
|
|
1272
1054
|
|
|
1273
1055
|
/**
|
|
1274
|
-
*
|
|
1275
|
-
*
|
|
1276
|
-
*
|
|
1277
|
-
* - Snapchat requires a Public Profile to publish content
|
|
1278
|
-
* - Media is required for all content types (no text-only posts)
|
|
1279
|
-
* - Only one media item per post is supported
|
|
1280
|
-
* - Media is automatically encrypted using AES-256-CBC before upload
|
|
1281
|
-
*
|
|
1282
|
-
* **Content Types:**
|
|
1283
|
-
* - **Story** (default): Ephemeral content visible for 24 hours. No caption/text supported.
|
|
1284
|
-
* - **Saved Story**: Permanent story on your Public Profile. Uses post content as title (max 45 chars).
|
|
1285
|
-
* - **Spotlight**: Video content for Snapchat's entertainment feed. Supports description (max 160 chars) with hashtags.
|
|
1286
|
-
*
|
|
1287
|
-
* **Media Constraints:**
|
|
1288
|
-
* - Images: max 20 MB, JPEG/PNG format
|
|
1289
|
-
* - Videos: max 500 MB, MP4 format, 5-60 seconds duration, minimum 540x960px resolution
|
|
1290
|
-
* - Aspect ratio: 9:16 recommended
|
|
1291
|
-
*
|
|
1292
|
-
* **Analytics:**
|
|
1293
|
-
* - Views, screenshots, shares, unique viewers, completion rate available
|
|
1294
|
-
* - Analytics are fetched per content type (story/saved_story/spotlight)
|
|
1056
|
+
* Requires a Public Profile. Media required for all content types (single item only, auto-encrypted).
|
|
1057
|
+
* Content types: story (ephemeral 24h, no caption), saved_story (permanent, title max 45 chars), spotlight (video, description max 160 chars).
|
|
1058
|
+
* Images max 20 MB (JPEG/PNG), videos max 500 MB (MP4, 5-60s, min 540x960px).
|
|
1295
1059
|
*
|
|
1296
1060
|
*/
|
|
1297
1061
|
export type SnapchatPlatformData = {
|
|
1298
1062
|
/**
|
|
1299
|
-
*
|
|
1300
|
-
* - `story` - Ephemeral snap visible for 24 hours (default)
|
|
1301
|
-
* - `saved_story` - Permanent story saved to Public Profile
|
|
1302
|
-
* - `spotlight` - Video posted to Spotlight (Snapchat's TikTok-like feed)
|
|
1303
|
-
*
|
|
1063
|
+
* Content type: story (ephemeral 24h, default), saved_story (permanent on Public Profile), spotlight (video feed)
|
|
1304
1064
|
*/
|
|
1305
1065
|
contentType?: 'story' | 'saved_story' | 'spotlight';
|
|
1306
1066
|
};
|
|
1307
1067
|
|
|
1308
1068
|
/**
|
|
1309
|
-
*
|
|
1310
|
-
* - `story` - Ephemeral snap visible for 24 hours (default)
|
|
1311
|
-
* - `saved_story` - Permanent story saved to Public Profile
|
|
1312
|
-
* - `spotlight` - Video posted to Spotlight (Snapchat's TikTok-like feed)
|
|
1313
|
-
*
|
|
1069
|
+
* Content type: story (ephemeral 24h, default), saved_story (permanent on Public Profile), spotlight (video feed)
|
|
1314
1070
|
*/
|
|
1315
1071
|
export type contentType2 = 'story' | 'saved_story' | 'spotlight';
|
|
1316
1072
|
|
|
@@ -1349,18 +1105,7 @@ export type SocialAccount = {
|
|
|
1349
1105
|
};
|
|
1350
1106
|
|
|
1351
1107
|
/**
|
|
1352
|
-
*
|
|
1353
|
-
* - Supports text, images (up to 10), videos (up to 10), and mixed media albums
|
|
1354
|
-
* - Posts to channels display the channel name and logo as author
|
|
1355
|
-
* - Posts to groups display the bot name (Late) as author
|
|
1356
|
-
* - Message IDs are returned for analytics tracking
|
|
1357
|
-
* - Captions support up to 1024 characters for media posts, 4096 for text-only
|
|
1358
|
-
*
|
|
1359
|
-
* **Analytics:**
|
|
1360
|
-
* - **Not available via API.** The Telegram Bot API does not expose message analytics (views, forwards, reactions).
|
|
1361
|
-
* - View counts are only visible to channel admins directly in the Telegram app.
|
|
1362
|
-
* - This is a Telegram platform limitation that affects all third-party tools.
|
|
1363
|
-
*
|
|
1108
|
+
* Supports text, images (up to 10), videos (up to 10), and mixed media albums. Captions up to 1024 chars for media posts, 4096 for text-only. Channel posts show channel name as author; group posts show bot name. Analytics not available via Telegram Bot API.
|
|
1364
1109
|
*/
|
|
1365
1110
|
export type TelegramPlatformData = {
|
|
1366
1111
|
/**
|
|
@@ -1387,13 +1132,7 @@ export type TelegramPlatformData = {
|
|
|
1387
1132
|
export type parseMode = 'HTML' | 'Markdown' | 'MarkdownV2';
|
|
1388
1133
|
|
|
1389
1134
|
/**
|
|
1390
|
-
*
|
|
1391
|
-
* - Carousel posts support up to 10 images (no videos in carousels).
|
|
1392
|
-
* - Single posts support one image or one video.
|
|
1393
|
-
* - Videos must be H.264/AAC MP4 format, max 5 minutes duration.
|
|
1394
|
-
* - Images must be JPEG or PNG, max 8 MB each.
|
|
1395
|
-
* - threadItems creates a reply chain (Threads equivalent of Twitter threads).
|
|
1396
|
-
*
|
|
1135
|
+
* Carousels support up to 10 images (no videos). Single posts support one image or video. Videos must be H.264/AAC MP4, max 5 min. Images must be JPEG/PNG, max 8 MB. threadItems creates a reply chain.
|
|
1397
1136
|
*/
|
|
1398
1137
|
export type ThreadsPlatformData = {
|
|
1399
1138
|
/**
|
|
@@ -1406,25 +1145,11 @@ export type ThreadsPlatformData = {
|
|
|
1406
1145
|
};
|
|
1407
1146
|
|
|
1408
1147
|
/**
|
|
1409
|
-
*
|
|
1410
|
-
*
|
|
1411
|
-
* **Constraints:**
|
|
1412
|
-
* - Photo carousels support up to 35 images.
|
|
1413
|
-
* - **Title length limits**:
|
|
1414
|
-
* - Videos: up to 2200 chars (full content used as title)
|
|
1415
|
-
* - Photos: content is automatically truncated to 90 chars for title (hashtags/URLs stripped). Use 'description' field for longer text (up to 4000 chars).
|
|
1416
|
-
* - privacyLevel must be chosen from creator_info.privacy_level_options (no defaulting).
|
|
1417
|
-
* - allowDuet and allowStitch required for videos; allowComment for all.
|
|
1418
|
-
* - contentPreviewConfirmed and expressConsentGiven must be true before posting.
|
|
1419
|
-
*
|
|
1420
|
-
* **Note:** Both camelCase and snake_case field names are accepted for backwards compatibility.
|
|
1421
|
-
* The nested `tiktokSettings` object format is also still supported but deprecated.
|
|
1422
|
-
*
|
|
1148
|
+
* Photo carousels up to 35 images. Video titles up to 2200 chars; photo titles auto-truncated to 90 chars (use description field for longer text up to 4000 chars). privacyLevel must match creator_info options. allowDuet/allowStitch required for videos. contentPreviewConfirmed and expressConsentGiven must be true. Both camelCase and snake_case accepted.
|
|
1423
1149
|
*/
|
|
1424
1150
|
export type TikTokPlatformData = {
|
|
1425
1151
|
/**
|
|
1426
|
-
* When true,
|
|
1427
|
-
*
|
|
1152
|
+
* When true, sends the post to the TikTok Creator Inbox as a draft instead of publishing immediately.
|
|
1428
1153
|
*/
|
|
1429
1154
|
draft?: boolean;
|
|
1430
1155
|
/**
|
|
@@ -1484,9 +1209,7 @@ export type TikTokPlatformData = {
|
|
|
1484
1209
|
*/
|
|
1485
1210
|
videoMadeWithAi?: boolean;
|
|
1486
1211
|
/**
|
|
1487
|
-
* Optional long-form description for photo posts (max 4000 chars).
|
|
1488
|
-
* Recommended for photo posts when content exceeds 90 characters, as photo titles are automatically truncated to 90 chars (after stripping hashtags/URLs).
|
|
1489
|
-
*
|
|
1212
|
+
* Optional long-form description for photo posts (max 4000 chars). Recommended when content exceeds 90 chars, as photo titles are auto-truncated.
|
|
1490
1213
|
*/
|
|
1491
1214
|
description?: string;
|
|
1492
1215
|
};
|
|
@@ -1501,30 +1224,6 @@ export type commercialContentType = 'none' | 'brand_organic' | 'brand_content';
|
|
|
1501
1224
|
*/
|
|
1502
1225
|
export type mediaType = 'video' | 'photo';
|
|
1503
1226
|
|
|
1504
|
-
/**
|
|
1505
|
-
* **DEPRECATED**: Use flat properties directly in TikTokPlatformData instead.
|
|
1506
|
-
* This nested format is supported for backwards compatibility only.
|
|
1507
|
-
*
|
|
1508
|
-
* @deprecated
|
|
1509
|
-
*/
|
|
1510
|
-
export type TikTokSettings = {
|
|
1511
|
-
privacyLevel?: string;
|
|
1512
|
-
allowComment?: boolean;
|
|
1513
|
-
allowDuet?: boolean;
|
|
1514
|
-
allowStitch?: boolean;
|
|
1515
|
-
commercialContentType?: string;
|
|
1516
|
-
brandPartnerPromote?: boolean;
|
|
1517
|
-
isBrandOrganicPost?: boolean;
|
|
1518
|
-
contentPreviewConfirmed?: boolean;
|
|
1519
|
-
expressConsentGiven?: boolean;
|
|
1520
|
-
mediaType?: string;
|
|
1521
|
-
videoCoverTimestampMs?: number;
|
|
1522
|
-
photoCoverIndex?: number;
|
|
1523
|
-
autoAddMusic?: boolean;
|
|
1524
|
-
videoMadeWithAi?: boolean;
|
|
1525
|
-
description?: string;
|
|
1526
|
-
};
|
|
1527
|
-
|
|
1528
1227
|
export type TranscriptResponse = {
|
|
1529
1228
|
transcript?: string;
|
|
1530
1229
|
segments?: Array<TranscriptSegment>;
|
|
@@ -1941,16 +1640,7 @@ export type YouTubeDailyViewsResponse = {
|
|
|
1941
1640
|
};
|
|
1942
1641
|
|
|
1943
1642
|
/**
|
|
1944
|
-
*
|
|
1945
|
-
* - Videos ≤ 3 minutes are automatically detected as YouTube Shorts
|
|
1946
|
-
* - Videos > 3 minutes become regular YouTube videos
|
|
1947
|
-
* - Custom thumbnails supported for regular videos (via mediaItem.thumbnail)
|
|
1948
|
-
* - Custom thumbnails NOT supported for Shorts via API
|
|
1949
|
-
* - Scheduled videos are uploaded immediately as the specified visibility and published at scheduled time
|
|
1950
|
-
* - Visibility defaults to "public" if not specified
|
|
1951
|
-
* - madeForKids defaults to false (not child-directed)
|
|
1952
|
-
* - Set containsSyntheticMedia: true if your video contains AI-generated content
|
|
1953
|
-
*
|
|
1643
|
+
* Videos up to 3 min are auto-detected as Shorts, longer as regular videos. Custom thumbnails supported for regular videos only (via mediaItem.thumbnail). Scheduled videos are uploaded immediately with the specified visibility. madeForKids defaults to false.
|
|
1954
1644
|
*/
|
|
1955
1645
|
export type YouTubePlatformData = {
|
|
1956
1646
|
/**
|
|
@@ -1958,24 +1648,11 @@ export type YouTubePlatformData = {
|
|
|
1958
1648
|
*/
|
|
1959
1649
|
title?: string;
|
|
1960
1650
|
/**
|
|
1961
|
-
* Video visibility
|
|
1962
|
-
* - public: Anyone can search for and watch (default)
|
|
1963
|
-
* - unlisted: Only people with the link can watch
|
|
1964
|
-
* - private: Only you and people you specifically share with can watch
|
|
1965
|
-
*
|
|
1651
|
+
* Video visibility: public (default, anyone can watch), unlisted (link only), private (invite only)
|
|
1966
1652
|
*/
|
|
1967
1653
|
visibility?: 'public' | 'private' | 'unlisted';
|
|
1968
1654
|
/**
|
|
1969
|
-
* COPPA compliance
|
|
1970
|
-
* - true: Video is made for kids (child-directed content)
|
|
1971
|
-
* - false: Video is NOT made for kids (default)
|
|
1972
|
-
*
|
|
1973
|
-
* This field maps to YouTube's `selfDeclaredMadeForKids` setting. Videos marked as made for kids
|
|
1974
|
-
* have restricted features (no comments, no notifications, limited ad targeting).
|
|
1975
|
-
*
|
|
1976
|
-
* IMPORTANT: If not specified, defaults to false. YouTube requires this to be explicitly set,
|
|
1977
|
-
* otherwise the video may be blocked from views until configured in YouTube Studio.
|
|
1978
|
-
*
|
|
1655
|
+
* COPPA compliance flag. Set true for child-directed content (restricts comments, notifications, ad targeting). Defaults to false. YouTube may block views if not explicitly set.
|
|
1979
1656
|
*/
|
|
1980
1657
|
madeForKids?: boolean;
|
|
1981
1658
|
/**
|
|
@@ -1983,20 +1660,11 @@ export type YouTubePlatformData = {
|
|
|
1983
1660
|
*/
|
|
1984
1661
|
firstComment?: string;
|
|
1985
1662
|
/**
|
|
1986
|
-
* AI-generated content disclosure
|
|
1987
|
-
* that could be mistaken for real people, places, or events. This helps viewers understand when realistic
|
|
1988
|
-
* content has been created or altered using AI. YouTube may add a label to videos when this is set.
|
|
1989
|
-
* Added to YouTube Data API in October 2024.
|
|
1990
|
-
*
|
|
1663
|
+
* AI-generated content disclosure. Set true if the video contains synthetic content that could be mistaken for real. YouTube may add a label.
|
|
1991
1664
|
*/
|
|
1992
1665
|
containsSyntheticMedia?: boolean;
|
|
1993
1666
|
/**
|
|
1994
|
-
* YouTube video category ID. Defaults to
|
|
1995
|
-
* Common categories: 1 (Film & Animation), 2 (Autos & Vehicles), 10 (Music),
|
|
1996
|
-
* 15 (Pets & Animals), 17 (Sports), 20 (Gaming), 22 (People & Blogs),
|
|
1997
|
-
* 23 (Comedy), 24 (Entertainment), 25 (News & Politics), 26 (Howto & Style),
|
|
1998
|
-
* 27 (Education), 28 (Science & Technology).
|
|
1999
|
-
*
|
|
1667
|
+
* YouTube video category ID. Defaults to 22 (People & Blogs). Common: 1 (Film), 2 (Autos), 10 (Music), 15 (Pets), 17 (Sports), 20 (Gaming), 23 (Comedy), 24 (Entertainment), 25 (News), 26 (Howto), 27 (Education), 28 (Science & Tech).
|
|
2000
1668
|
*/
|
|
2001
1669
|
categoryId?: string;
|
|
2002
1670
|
};
|
|
@@ -2251,10 +1919,7 @@ export type GetAnalyticsData = {
|
|
|
2251
1919
|
*/
|
|
2252
1920
|
platform?: string;
|
|
2253
1921
|
/**
|
|
2254
|
-
* Returns analytics for a single post. Accepts both Late Post IDs
|
|
2255
|
-
* and External Post IDs (from this endpoint's list response). The API automatically
|
|
2256
|
-
* resolves Late Post IDs to their corresponding External Post analytics.
|
|
2257
|
-
*
|
|
1922
|
+
* Returns analytics for a single post. Accepts both Late Post IDs and External Post IDs. Late IDs are auto-resolved to External Post analytics.
|
|
2258
1923
|
*/
|
|
2259
1924
|
postId?: string;
|
|
2260
1925
|
/**
|
|
@@ -2266,11 +1931,7 @@ export type GetAnalyticsData = {
|
|
|
2266
1931
|
*/
|
|
2267
1932
|
sortBy?: 'date' | 'engagement';
|
|
2268
1933
|
/**
|
|
2269
|
-
* Filter by post source:
|
|
2270
|
-
* - `late` - Only posts scheduled/published via Late API
|
|
2271
|
-
* - `external` - Only posts synced from the platform (not posted via Late)
|
|
2272
|
-
* - `all` - All posts (default)
|
|
2273
|
-
*
|
|
1934
|
+
* Filter by post source: late (posted via Late API), external (synced from platform), all (default)
|
|
2274
1935
|
*/
|
|
2275
1936
|
source?: 'all' | 'late' | 'external';
|
|
2276
1937
|
/**
|
|
@@ -2518,9 +2179,7 @@ export type CreatePostData = {
|
|
|
2518
2179
|
body: {
|
|
2519
2180
|
title?: string;
|
|
2520
2181
|
/**
|
|
2521
|
-
* Post caption/text
|
|
2522
|
-
* Required for text-only posts. Can also be omitted if all platforms have customContent set.
|
|
2523
|
-
*
|
|
2182
|
+
* Post caption/text. Optional when media is attached or all platforms have customContent. Required for text-only posts.
|
|
2524
2183
|
*/
|
|
2525
2184
|
content?: string;
|
|
2526
2185
|
mediaItems?: Array<{
|
|
@@ -2549,11 +2208,7 @@ export type CreatePostData = {
|
|
|
2549
2208
|
isDraft?: boolean;
|
|
2550
2209
|
timezone?: string;
|
|
2551
2210
|
/**
|
|
2552
|
-
* Tags/keywords
|
|
2553
|
-
* - No count limit; duplicates are automatically removed
|
|
2554
|
-
* - Each tag must be ≤ 100 characters
|
|
2555
|
-
* - Combined total across all tags ≤ 500 characters (YouTube's limit)
|
|
2556
|
-
*
|
|
2211
|
+
* Tags/keywords. YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates auto-removed.
|
|
2557
2212
|
*/
|
|
2558
2213
|
tags?: Array<(string)>;
|
|
2559
2214
|
hashtags?: Array<(string)>;
|
|
@@ -2563,21 +2218,11 @@ export type CreatePostData = {
|
|
|
2563
2218
|
[key: string]: unknown;
|
|
2564
2219
|
};
|
|
2565
2220
|
/**
|
|
2566
|
-
* Root-level TikTok settings applied to all TikTok platforms
|
|
2567
|
-
* This is a convenience shorthand. Settings here are merged into each TikTok
|
|
2568
|
-
* platform's platformSpecificData, with platform-specific settings taking precedence.
|
|
2569
|
-
*
|
|
2221
|
+
* Root-level TikTok settings applied to all TikTok platforms. Merged into each platform's platformSpecificData, with platform-specific settings taking precedence.
|
|
2570
2222
|
*/
|
|
2571
2223
|
tiktokSettings?: TikTokPlatformData;
|
|
2572
2224
|
/**
|
|
2573
|
-
* Profile ID to schedule via queue.
|
|
2574
|
-
*
|
|
2575
|
-
* When provided (without `scheduledFor`), the post will be automatically assigned
|
|
2576
|
-
* to the next available slot from the profile's queue. The system uses distributed
|
|
2577
|
-
* locking to prevent race conditions when multiple posts are scheduled concurrently.
|
|
2578
|
-
* Do not call `/v1/queue/next-slot` and then use that time in `scheduledFor`.
|
|
2579
|
-
* That bypasses the queue system and can cause duplicate slot assignments.
|
|
2580
|
-
*
|
|
2225
|
+
* Profile ID to schedule via queue. When provided without scheduledFor, the post is auto-assigned to the next available slot. Do not call /v1/queue/next-slot and use that time in scheduledFor, as that bypasses queue locking.
|
|
2581
2226
|
*/
|
|
2582
2227
|
queuedFromProfile?: string;
|
|
2583
2228
|
/**
|
|
@@ -2628,10 +2273,7 @@ export type UpdatePostData = {
|
|
|
2628
2273
|
content?: string;
|
|
2629
2274
|
scheduledFor?: string;
|
|
2630
2275
|
/**
|
|
2631
|
-
* Root-level TikTok settings applied to all TikTok platforms
|
|
2632
|
-
* This is a convenience shorthand. Settings here are merged into each TikTok
|
|
2633
|
-
* platform's platformSpecificData, with platform-specific settings taking precedence.
|
|
2634
|
-
*
|
|
2276
|
+
* Root-level TikTok settings applied to all TikTok platforms. Merged into each platform's platformSpecificData, with platform-specific settings taking precedence.
|
|
2635
2277
|
*/
|
|
2636
2278
|
tiktokSettings?: TikTokPlatformData;
|
|
2637
2279
|
[key: string]: unknown | string | TikTokPlatformData;
|
|
@@ -2768,9 +2410,7 @@ export type GetUserError = ({
|
|
|
2768
2410
|
export type ListProfilesData = {
|
|
2769
2411
|
query?: {
|
|
2770
2412
|
/**
|
|
2771
|
-
* When true, includes profiles that exceed the user's plan limit.
|
|
2772
|
-
* Over-limit profiles will have `isOverLimit: true` in the response.
|
|
2773
|
-
* Useful for managing/deleting profiles after a plan downgrade.
|
|
2413
|
+
* When true, includes profiles that exceed the user's plan limit. Over-limit profiles will have isOverLimit: true in the response. Useful for managing/deleting profiles after a plan downgrade.
|
|
2774
2414
|
*
|
|
2775
2415
|
*/
|
|
2776
2416
|
includeOverLimit?: boolean;
|
|
@@ -3161,37 +2801,9 @@ export type GetConnectUrlData = {
|
|
|
3161
2801
|
*/
|
|
3162
2802
|
profileId: string;
|
|
3163
2803
|
/**
|
|
3164
|
-
*
|
|
3165
|
-
*
|
|
3166
|
-
*
|
|
3167
|
-
* After the user selects a Facebook Page, Late redirects here with:
|
|
3168
|
-
* `?connected=facebook&profileId=X&username=Y`
|
|
3169
|
-
*
|
|
3170
|
-
* **Headless Mode (Facebook, LinkedIn, Pinterest, Google Business Profile & Snapchat):**
|
|
3171
|
-
* Pass `headless=true` as a query parameter on this endpoint (not inside `redirect_url`), e.g.:
|
|
3172
|
-
* `GET /v1/connect/facebook?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true`
|
|
3173
|
-
* `GET /v1/connect/linkedin?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true`
|
|
3174
|
-
* `GET /v1/connect/pinterest?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true`
|
|
3175
|
-
* `GET /v1/connect/googlebusiness?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true`
|
|
3176
|
-
* `GET /v1/connect/snapchat?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true`
|
|
3177
|
-
*
|
|
3178
|
-
* After OAuth, the user is redirected directly to your `redirect_url` with OAuth data:
|
|
3179
|
-
* - **Facebook:** `?profileId=X&tempToken=Y&userProfile=Z&connect_token=CT&platform=facebook&step=select_page`
|
|
3180
|
-
* - **LinkedIn:** `?profileId=X&pendingDataToken=TOKEN&connect_token=CT&platform=linkedin&step=select_organization`
|
|
3181
|
-
* Use `GET /v1/connect/pending-data?token=TOKEN` to fetch tempToken, userProfile, organizations, refreshToken.
|
|
3182
|
-
* - **Pinterest:** `?profileId=X&tempToken=Y&userProfile=Z&connect_token=CT&platform=pinterest&step=select_board`
|
|
3183
|
-
* - **Google Business:** `?profileId=X&tempToken=Y&userProfile=Z&connect_token=CT&platform=googlebusiness&step=select_location`
|
|
3184
|
-
* - **Snapchat:** `?profileId=X&tempToken=Y&userProfile=Z&publicProfiles=PROFILES&connect_token=CT&platform=snapchat&step=select_public_profile`
|
|
3185
|
-
* (publicProfiles contains `id`, `display_name`, `username`, `profile_image_url`, `subscriber_count`)
|
|
3186
|
-
*
|
|
3187
|
-
* Then use the respective endpoints to build your custom UI:
|
|
3188
|
-
* - Facebook: `/v1/connect/facebook/select-page` (GET to fetch, POST to save)
|
|
3189
|
-
* - LinkedIn: `/v1/connect/linkedin/organizations` (GET to fetch logos), `/v1/connect/linkedin/select-organization` (POST to save)
|
|
3190
|
-
* - Pinterest: `/v1/connect/pinterest/select-board` (GET to fetch, POST to save)
|
|
3191
|
-
* - Google Business: `/v1/connect/googlebusiness/locations` (GET) and `/v1/connect/googlebusiness/select-location` (POST)
|
|
3192
|
-
* - Snapchat: `/v1/connect/snapchat/select-profile` (POST to save selected public profile)
|
|
3193
|
-
*
|
|
3194
|
-
* Example: `https://yourdomain.com/integrations/callback`
|
|
2804
|
+
* Your custom redirect URL after connection completes.
|
|
2805
|
+
* Standard mode: Late redirects here with ?connected={platform}&profileId=X&username=Y.
|
|
2806
|
+
* Headless mode: pass headless=true on this endpoint. User is redirected to your URL with OAuth data (profileId, tempToken, userProfile, connect_token, platform, step). See endpoint description for details.
|
|
3195
2807
|
*
|
|
3196
2808
|
*/
|
|
3197
2809
|
redirect_url?: string;
|
|
@@ -3390,8 +3002,7 @@ export type SelectGoogleBusinessLocationData = {
|
|
|
3390
3002
|
*/
|
|
3391
3003
|
tempToken: string;
|
|
3392
3004
|
/**
|
|
3393
|
-
* Decoded user profile object from the OAuth callback.
|
|
3394
|
-
* the refresh token needed for token refresh. Always include this field.
|
|
3005
|
+
* Decoded user profile object from the OAuth callback. Contains the refresh token needed for token refresh. Always include this field.
|
|
3395
3006
|
*
|
|
3396
3007
|
*/
|
|
3397
3008
|
userProfile?: {
|
|
@@ -3939,7 +3550,7 @@ export type DeleteGoogleBusinessPlaceActionError = (ErrorResponse);
|
|
|
3939
3550
|
export type GetPendingOAuthDataData = {
|
|
3940
3551
|
query: {
|
|
3941
3552
|
/**
|
|
3942
|
-
* The pending data token from the OAuth redirect URL (
|
|
3553
|
+
* The pending data token from the OAuth redirect URL (pendingDataToken parameter)
|
|
3943
3554
|
*/
|
|
3944
3555
|
token: string;
|
|
3945
3556
|
};
|
|
@@ -4330,9 +3941,7 @@ export type ConnectBlueskyCredentialsData = {
|
|
|
4330
3941
|
*/
|
|
4331
3942
|
appPassword: string;
|
|
4332
3943
|
/**
|
|
4333
|
-
* Required state parameter formatted as
|
|
4334
|
-
* - `userId`: Your Late user ID (get from `GET /v1/users` → `currentUserId`)
|
|
4335
|
-
* - `profileId`: The profile ID to connect the account to (get from `GET /v1/profiles`)
|
|
3944
|
+
* Required state parameter formatted as {userId}-{profileId}. userId is your Late user ID (from GET /v1/users, currentUserId field), profileId is the profile to connect the account to (from GET /v1/profiles).
|
|
4336
3945
|
*
|
|
4337
3946
|
*/
|
|
4338
3947
|
state: string;
|
|
@@ -4527,11 +4136,7 @@ export type GetLinkedInAggregateAnalyticsData = {
|
|
|
4527
4136
|
};
|
|
4528
4137
|
query?: {
|
|
4529
4138
|
/**
|
|
4530
|
-
* Type of aggregation
|
|
4531
|
-
* - `TOTAL` (default): Returns single totals for each metric
|
|
4532
|
-
* - `DAILY`: Returns daily breakdown of metrics
|
|
4533
|
-
*
|
|
4534
|
-
* Note: `MEMBERS_REACHED` metric is not available with `DAILY` aggregation.
|
|
4139
|
+
* Type of aggregation: TOTAL (default, returns single totals) or DAILY (returns daily breakdown). Note: MEMBERS_REACHED is not available with DAILY aggregation.
|
|
4535
4140
|
*
|
|
4536
4141
|
*/
|
|
4537
4142
|
aggregation?: 'TOTAL' | 'DAILY';
|
|
@@ -4678,16 +4283,12 @@ export type GetLinkedInMentionsData = {
|
|
|
4678
4283
|
};
|
|
4679
4284
|
query: {
|
|
4680
4285
|
/**
|
|
4681
|
-
* The exact display name as shown on LinkedIn.
|
|
4682
|
-
* - **Person mentions:** Required for clickable mentions. If not provided, a name is derived from the vanity URL which may not match exactly.
|
|
4683
|
-
* - **Organization mentions:** Optional. If not provided, the company name is automatically retrieved from LinkedIn.
|
|
4286
|
+
* The exact display name as shown on LinkedIn. Required for person mentions (for clickable mentions; if not provided, a name is derived from the vanity URL which may not match). Optional for organization mentions (company name is auto-retrieved from LinkedIn).
|
|
4684
4287
|
*
|
|
4685
4288
|
*/
|
|
4686
4289
|
displayName?: string;
|
|
4687
4290
|
/**
|
|
4688
|
-
* LinkedIn profile URL, company URL, or vanity name.
|
|
4689
|
-
* - Person: `miquelpalet`, `linkedin.com/in/miquelpalet`
|
|
4690
|
-
* - Organization: `company/microsoft`, `linkedin.com/company/microsoft`
|
|
4291
|
+
* LinkedIn profile URL, company URL, or vanity name. Person examples: miquelpalet, linkedin.com/in/miquelpalet. Organization examples: company/microsoft, linkedin.com/company/microsoft.
|
|
4691
4292
|
*
|
|
4692
4293
|
*/
|
|
4693
4294
|
url: string;
|
|
@@ -5219,73 +4820,6 @@ export type GetWebhookLogsError = ({
|
|
|
5219
4820
|
error?: string;
|
|
5220
4821
|
});
|
|
5221
4822
|
|
|
5222
|
-
export type ListLogsData = {
|
|
5223
|
-
query?: {
|
|
5224
|
-
/**
|
|
5225
|
-
* Filter by action type
|
|
5226
|
-
*/
|
|
5227
|
-
action?: 'publish' | 'retry' | 'media_upload' | 'rate_limit_pause' | 'token_refresh' | 'cancelled' | 'all';
|
|
5228
|
-
/**
|
|
5229
|
-
* Number of days to look back (max 7)
|
|
5230
|
-
*/
|
|
5231
|
-
days?: number;
|
|
5232
|
-
/**
|
|
5233
|
-
* Maximum number of logs to return (max 100)
|
|
5234
|
-
*/
|
|
5235
|
-
limit?: number;
|
|
5236
|
-
/**
|
|
5237
|
-
* Filter by platform
|
|
5238
|
-
*/
|
|
5239
|
-
platform?: 'tiktok' | 'instagram' | 'facebook' | 'youtube' | 'linkedin' | 'twitter' | 'threads' | 'pinterest' | 'reddit' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'all';
|
|
5240
|
-
/**
|
|
5241
|
-
* Number of logs to skip (for pagination)
|
|
5242
|
-
*/
|
|
5243
|
-
skip?: number;
|
|
5244
|
-
/**
|
|
5245
|
-
* Filter by log status
|
|
5246
|
-
*/
|
|
5247
|
-
status?: 'success' | 'failed' | 'pending' | 'skipped' | 'all';
|
|
5248
|
-
};
|
|
5249
|
-
};
|
|
5250
|
-
|
|
5251
|
-
export type ListLogsResponse = ({
|
|
5252
|
-
logs?: Array<PostLog>;
|
|
5253
|
-
pagination?: {
|
|
5254
|
-
/**
|
|
5255
|
-
* Total number of logs matching the query
|
|
5256
|
-
*/
|
|
5257
|
-
total?: number;
|
|
5258
|
-
limit?: number;
|
|
5259
|
-
skip?: number;
|
|
5260
|
-
/**
|
|
5261
|
-
* Total number of pages
|
|
5262
|
-
*/
|
|
5263
|
-
pages?: number;
|
|
5264
|
-
hasMore?: boolean;
|
|
5265
|
-
};
|
|
5266
|
-
});
|
|
5267
|
-
|
|
5268
|
-
export type ListLogsError = ({
|
|
5269
|
-
error?: string;
|
|
5270
|
-
});
|
|
5271
|
-
|
|
5272
|
-
export type GetLogData = {
|
|
5273
|
-
path: {
|
|
5274
|
-
/**
|
|
5275
|
-
* The log entry ID
|
|
5276
|
-
*/
|
|
5277
|
-
logId: string;
|
|
5278
|
-
};
|
|
5279
|
-
};
|
|
5280
|
-
|
|
5281
|
-
export type GetLogResponse = ({
|
|
5282
|
-
log?: PostLogDetail;
|
|
5283
|
-
});
|
|
5284
|
-
|
|
5285
|
-
export type GetLogError = ({
|
|
5286
|
-
error?: string;
|
|
5287
|
-
} | unknown);
|
|
5288
|
-
|
|
5289
4823
|
export type ListPostsLogsData = {
|
|
5290
4824
|
query?: {
|
|
5291
4825
|
/**
|
|
@@ -6112,10 +5646,7 @@ export type GetInboxPostCommentsData = {
|
|
|
6112
5646
|
path: {
|
|
6113
5647
|
/**
|
|
6114
5648
|
* The post identifier. Accepts a Late post ID (MongoDB ObjectId) which is automatically resolved to the platform-specific post ID, or a platform-specific post ID directly (e.g. tweet ID, Facebook Graph ID, YouTube video ID).
|
|
6115
|
-
*
|
|
6116
|
-
* **LinkedIn:** For your own posts, the full URN stored in Late (e.g., `urn:li:share:7429218977714745345`) is used automatically.
|
|
6117
|
-
* For third-party posts, pass either the full activity URN (e.g., `urn:li:activity:7422459067685855232`) or the raw numeric activity ID from the LinkedIn URL (automatically wrapped as `urn:li:activity:`).
|
|
6118
|
-
* Note: LinkedIn post URLs use activity IDs (`linkedin.com/feed/update/urn:li:activity:XXXX`).
|
|
5649
|
+
* LinkedIn: for your own posts, the full URN stored in Late is used automatically. For third-party posts, pass the full activity URN or the raw numeric activity ID from the LinkedIn URL (automatically wrapped as urn:li:activity:).
|
|
6119
5650
|
*
|
|
6120
5651
|
*/
|
|
6121
5652
|
postId: string;
|
|
@@ -6255,7 +5786,7 @@ export type ReplyToInboxPostData = {
|
|
|
6255
5786
|
/**
|
|
6256
5787
|
* The post identifier. Accepts a Late post ID or a platform-specific post ID.
|
|
6257
5788
|
*
|
|
6258
|
-
*
|
|
5789
|
+
* LinkedIn: for third-party posts, pass the full activity URN (e.g. urn:li:activity:7422459067685855232) or the raw numeric activity ID from the URL.
|
|
6259
5790
|
*
|
|
6260
5791
|
*/
|
|
6261
5792
|
postId: string;
|
|
@@ -6283,7 +5814,7 @@ export type DeleteInboxCommentData = {
|
|
|
6283
5814
|
/**
|
|
6284
5815
|
* The post identifier. Accepts a Late post ID or a platform-specific post ID.
|
|
6285
5816
|
*
|
|
6286
|
-
*
|
|
5817
|
+
* LinkedIn: for third-party posts, pass the full activity URN (e.g. urn:li:activity:7422459067685855232) or the raw numeric activity ID from the URL.
|
|
6287
5818
|
*
|
|
6288
5819
|
*/
|
|
6289
5820
|
postId: string;
|