@getlatedev/node 0.1.25 → 0.1.27

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.
@@ -231,30 +231,31 @@ export type ErrorResponse = {
231
231
  };
232
232
 
233
233
  /**
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.
234
+ * Feed posts support up to 10 images (no mixed video+image). Stories require single media (24h, no captions). Reels require single vertical video (9:16, 3-60s).
235
235
  */
236
236
  export type FacebookPlatformData = {
237
237
  /**
238
- * Set to 'story' to publish as a Facebook Page Story (24-hour ephemeral content). Requires media.
238
+ * Set to 'story' for Page Stories (24h ephemeral) or 'reel' for Reels (short vertical video). Defaults to feed post if omitted.
239
239
  */
240
- contentType?: 'story';
240
+ contentType?: 'story' | 'reel';
241
241
  /**
242
- * Optional first comment to post immediately after publishing (feed posts only, not stories)
242
+ * Reel title (only for contentType=reel). Separate from the caption/content field.
243
+ */
244
+ title?: string;
245
+ /**
246
+ * Optional first comment to post immediately after publishing (feed posts only, not stories or reels)
243
247
  */
244
248
  firstComment?: string;
245
249
  /**
246
- * Target Facebook Page ID for multi-page posting.
247
- * If omitted, uses the selected/default page on the connection.
248
- * Use GET /api/v1/accounts/{id}/facebook-page to list available pages.
249
- *
250
+ * Target Facebook Page ID for multi-page posting. If omitted, uses the default page. Use GET /v1/accounts/{id}/facebook-page to list pages.
250
251
  */
251
252
  pageId?: string;
252
253
  };
253
254
 
254
255
  /**
255
- * Set to 'story' to publish as a Facebook Page Story (24-hour ephemeral content). Requires media.
256
+ * Set to 'story' for Page Stories (24h ephemeral) or 'reel' for Reels (short vertical video). Defaults to feed post if omitted.
256
257
  */
257
- export type contentType = 'story';
258
+ export type contentType = 'story' | 'reel';
258
259
 
259
260
  export type FollowerStatsResponse = {
260
261
  accounts?: Array<AccountWithFollowerStats>;
@@ -341,23 +342,15 @@ export type FoodMenuSection = {
341
342
  };
342
343
 
343
344
  /**
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.
345
+ * Text and single image only (no videos). Optional call-to-action button. Posts appear on GBP, Google Search, and Maps. Use locationId for multi-location posting.
345
346
  */
346
347
  export type GoogleBusinessPlatformData = {
347
348
  /**
348
- * Target Google Business location ID for multi-location posting.
349
- * Format: "locations/123456789"
350
- * If omitted, uses the selected/default location on the connection.
351
- * Use GET /api/v1/accounts/{id}/gmb-locations to list available locations.
352
- *
349
+ * Target GBP location ID (e.g. "locations/123456789"). If omitted, uses the default location. Use GET /v1/accounts/{id}/gmb-locations to list locations.
353
350
  */
354
351
  locationId?: string;
355
352
  /**
356
- * BCP 47 language code for the post content (e.g., "en", "de", "es", "fr").
357
- * If omitted, the language is automatically detected from the post text.
358
- * Setting this explicitly is recommended when auto-detection may not be accurate
359
- * (e.g., very short posts, mixed-language content, or transliterated text).
360
- *
353
+ * BCP 47 language code (e.g. "en", "de", "es"). Auto-detected if omitted. Set explicitly for short or mixed-language posts.
361
354
  */
362
355
  languageCode?: string;
363
356
  /**
@@ -393,7 +386,7 @@ export type HashtagInfo = {
393
386
  export type status = 'safe' | 'banned' | 'restricted' | 'unknown';
394
387
 
395
388
  /**
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.
389
+ * Feed aspect ratio 0.8-1.91, 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 platform limits are auto-compressed.
397
390
  */
398
391
  export type InstagramPlatformData = {
399
392
  /**
@@ -452,6 +445,11 @@ export type InstagramPlatformData = {
452
445
  thumbOffset?: number;
453
446
  };
454
447
 
448
+ /**
449
+ * Set to 'story' to publish as a Story. Default posts become Reels or feed depending on media.
450
+ */
451
+ export type contentType2 = 'story';
452
+
455
453
  /**
456
454
  * MANUAL (graduate from Instagram app) or SS_PERFORMANCE (auto-graduate if performs well with non-followers)
457
455
  */
@@ -471,9 +469,7 @@ export type LinkedInAggregateAnalyticsDailyResponse = {
471
469
  endDate?: string;
472
470
  } | null;
473
471
  /**
474
- * Daily breakdown of each metric. Each metric contains an array of date/count pairs.
475
- * Note: 'reach' (MEMBERS_REACHED) is not available with DAILY aggregation per LinkedIn API limitations.
476
- *
472
+ * Daily breakdown of each metric as date/count pairs. Reach not available with DAILY aggregation.
477
473
  */
478
474
  analytics?: {
479
475
  impressions?: Array<{
@@ -549,15 +545,11 @@ export type LinkedInAggregateAnalyticsTotalResponse = {
549
545
  export type aggregation3 = 'TOTAL';
550
546
 
551
547
  /**
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.
548
+ * Up to 20 images, no multi-video. Single PDF supported (max 100MB). Link previews auto-generated when no media attached. Use organizationUrn for multi-org posting.
553
549
  */
554
550
  export type LinkedInPlatformData = {
555
551
  /**
556
- * Target LinkedIn Organization URN for multi-organization posting.
557
- * Format: "urn:li:organization:123456789"
558
- * If omitted, uses the selected/default organization on the connection.
559
- * Use GET /api/v1/accounts/{id}/linkedin-organizations to list available organizations.
560
- *
552
+ * Target LinkedIn Organization URN (e.g. "urn:li:organization:123456789"). If omitted, uses the default org. Use GET /v1/accounts/{id}/linkedin-organizations to list orgs.
561
553
  */
562
554
  organizationUrn?: string;
563
555
  /**
@@ -571,9 +563,7 @@ export type LinkedInPlatformData = {
571
563
  };
572
564
 
573
565
  /**
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.
576
- *
566
+ * Media referenced in posts. URLs must be publicly reachable over HTTPS. Use POST /v1/media/presign for uploads up to 5GB. Late auto-compresses images and videos that exceed platform limits (videos over 200 MB may not be compressed).
577
567
  */
578
568
  export type MediaItem = {
579
569
  type?: 'image' | 'video' | 'gif' | 'document';
@@ -709,11 +699,7 @@ export type PlatformTarget = {
709
699
  */
710
700
  platformPostId?: string;
711
701
  /**
712
- * Public URL of the published post on the platform.
713
- * Populated after successful publish. For immediate posts (publishNow=true),
714
- * this is included in the response. For scheduled posts, fetch the post
715
- * via GET /v1/posts/{postId} after the scheduled time.
716
- *
702
+ * Public URL of the published post. Included in the response for immediate posts; for scheduled posts, fetch via GET /v1/posts/{postId} after publish time.
717
703
  */
718
704
  platformPostUrl?: string;
719
705
  /**
@@ -921,8 +907,7 @@ export type Profile = {
921
907
  color?: string;
922
908
  isDefault?: boolean;
923
909
  /**
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).
925
- *
910
+ * Only present when includeOverLimit=true. Indicates if this profile exceeds the plan limit.
926
911
  */
927
912
  isOverLimit?: boolean;
928
913
  createdAt?: string;
@@ -1022,14 +1007,11 @@ export type QueueUpdateResponse = {
1022
1007
  };
1023
1008
 
1024
1009
  /**
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.
1010
+ * Posts are either link (with URL/media) or self (text-only). Use forceSelf to override. Subreddit defaults to the account's configured one. Some subreddits require a flair.
1026
1011
  */
1027
1012
  export type RedditPlatformData = {
1028
1013
  /**
1029
- * Target subreddit name (without "r/" prefix).
1030
- * Overrides the default subreddit configured on the account connection.
1031
- * Use GET /api/v1/accounts/{id}/reddit-subreddits to list available subreddits.
1032
- *
1014
+ * Target subreddit name (without "r/" prefix). Overrides the default. Use GET /v1/accounts/{id}/reddit-subreddits to list options.
1033
1015
  */
1034
1016
  subreddit?: string;
1035
1017
  /**
@@ -1045,18 +1027,13 @@ export type RedditPlatformData = {
1045
1027
  */
1046
1028
  forceSelf?: boolean;
1047
1029
  /**
1048
- * Flair ID for the post. Required by some subreddits.
1049
- * Use GET /api/v1/accounts/{id}/reddit-flairs?subreddit=name to list available flairs.
1050
- *
1030
+ * Flair ID for the post. Required by some subreddits. Use GET /v1/accounts/{id}/reddit-flairs?subreddit=name to list flairs.
1051
1031
  */
1052
1032
  flairId?: string;
1053
1033
  };
1054
1034
 
1055
1035
  /**
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).
1059
- *
1036
+ * Requires a Public Profile. Single media item only. Content types: story (ephemeral 24h), saved_story (permanent, title max 45 chars), spotlight (video, max 160 chars).
1060
1037
  */
1061
1038
  export type SnapchatPlatformData = {
1062
1039
  /**
@@ -1068,7 +1045,7 @@ export type SnapchatPlatformData = {
1068
1045
  /**
1069
1046
  * Content type: story (ephemeral 24h, default), saved_story (permanent on Public Profile), spotlight (video feed)
1070
1047
  */
1071
- export type contentType2 = 'story' | 'saved_story' | 'spotlight';
1048
+ export type contentType3 = 'story' | 'saved_story' | 'spotlight';
1072
1049
 
1073
1050
  export type SocialAccount = {
1074
1051
  _id?: string;
@@ -1077,20 +1054,7 @@ export type SocialAccount = {
1077
1054
  username?: string;
1078
1055
  displayName?: string;
1079
1056
  /**
1080
- * Full profile URL for the connected account. Available for all platforms:
1081
- * - Twitter/X: https://x.com/{username}
1082
- * - Instagram: https://instagram.com/{username}
1083
- * - TikTok: https://tiktok.com/@{username}
1084
- * - YouTube: https://youtube.com/@{handle} or https://youtube.com/channel/{id}
1085
- * - LinkedIn Personal: https://www.linkedin.com/in/{vanityName}/
1086
- * - LinkedIn Organization: https://www.linkedin.com/company/{vanityName}/
1087
- * - Threads: https://threads.net/@{username}
1088
- * - Pinterest: https://pinterest.com/{username}
1089
- * - Reddit: https://reddit.com/user/{username}
1090
- * - Bluesky: https://bsky.app/profile/{handle}
1091
- * - Facebook: https://facebook.com/{username} or https://facebook.com/{pageId}
1092
- * - Google Business: Google Maps URL for the business location
1093
- *
1057
+ * Full profile URL for the connected account on its platform.
1094
1058
  */
1095
1059
  profileUrl?: string;
1096
1060
  isActive?: boolean;
@@ -1105,7 +1069,7 @@ export type SocialAccount = {
1105
1069
  };
1106
1070
 
1107
1071
  /**
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.
1072
+ * Text, images (up to 10), videos (up to 10), and mixed media albums. Captions up to 1024 chars for media, 4096 for text-only.
1109
1073
  */
1110
1074
  export type TelegramPlatformData = {
1111
1075
  /**
@@ -1132,7 +1096,7 @@ export type TelegramPlatformData = {
1132
1096
  export type parseMode = 'HTML' | 'Markdown' | 'MarkdownV2';
1133
1097
 
1134
1098
  /**
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.
1099
+ * Up to 10 images per carousel (no videos). Videos must be H.264/AAC MP4, max 5 min. Images JPEG/PNG, max 8 MB. Use threadItems for reply chains.
1136
1100
  */
1137
1101
  export type ThreadsPlatformData = {
1138
1102
  /**
@@ -1145,7 +1109,7 @@ export type ThreadsPlatformData = {
1145
1109
  };
1146
1110
 
1147
1111
  /**
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.
1112
+ * Photo carousels up to 35 images. Video titles up to 2200 chars, photo titles truncated to 90 chars. privacyLevel must match creator_info options. Both camelCase and snake_case accepted.
1149
1113
  */
1150
1114
  export type TikTokPlatformData = {
1151
1115
  /**
@@ -1640,7 +1604,7 @@ export type YouTubeDailyViewsResponse = {
1640
1604
  };
1641
1605
 
1642
1606
  /**
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.
1607
+ * Videos under 3 min auto-detected as Shorts. Custom thumbnails for regular videos only. Scheduled videos are uploaded immediately with the specified visibility.
1644
1608
  */
1645
1609
  export type YouTubePlatformData = {
1646
1610
  /**
@@ -2410,8 +2374,7 @@ export type GetUserError = ({
2410
2374
  export type ListProfilesData = {
2411
2375
  query?: {
2412
2376
  /**
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.
2414
- *
2377
+ * When true, includes over-limit profiles (marked with isOverLimit: true).
2415
2378
  */
2416
2379
  includeOverLimit?: boolean;
2417
2380
  };
@@ -2489,9 +2452,7 @@ export type DeleteProfileError = (unknown | {
2489
2452
  export type ListAccountsData = {
2490
2453
  query?: {
2491
2454
  /**
2492
- * When true, includes accounts from profiles that exceed the user's plan limit.
2493
- * Useful for disconnecting accounts from over-limit profiles so they can be deleted.
2494
- *
2455
+ * When true, includes accounts from over-limit profiles.
2495
2456
  */
2496
2457
  includeOverLimit?: boolean;
2497
2458
  /**
@@ -2801,10 +2762,7 @@ export type GetConnectUrlData = {
2801
2762
  */
2802
2763
  profileId: string;
2803
2764
  /**
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.
2807
- *
2765
+ * Your custom redirect URL after connection completes. Standard mode appends ?connected={platform}&profileId=X&username=Y. Headless mode appends OAuth data params.
2808
2766
  */
2809
2767
  redirect_url?: string;
2810
2768
  };
@@ -3002,8 +2960,7 @@ export type SelectGoogleBusinessLocationData = {
3002
2960
  */
3003
2961
  tempToken: string;
3004
2962
  /**
3005
- * Decoded user profile object from the OAuth callback. Contains the refresh token needed for token refresh. Always include this field.
3006
- *
2963
+ * Decoded user profile from the OAuth callback. Contains the refresh token. Always include this field.
3007
2964
  */
3008
2965
  userProfile?: {
3009
2966
  id?: string;
@@ -3193,10 +3150,7 @@ export type GetGoogleBusinessLocationDetailsData = {
3193
3150
  };
3194
3151
  query?: {
3195
3152
  /**
3196
- * Comma-separated fields to return. Defaults to common fields.
3197
- * Available: name, title, phoneNumbers, categories, storefrontAddress, websiteUri,
3198
- * regularHours, specialHours, serviceArea, profile, openInfo, metadata, moreHours
3199
- *
3153
+ * Comma-separated fields to return. Available: name, title, phoneNumbers, categories, storefrontAddress, websiteUri, regularHours, specialHours, serviceArea, profile, openInfo, metadata, moreHours.
3200
3154
  */
3201
3155
  readMask?: string;
3202
3156
  };
@@ -3941,8 +3895,7 @@ export type ConnectBlueskyCredentialsData = {
3941
3895
  */
3942
3896
  appPassword: string;
3943
3897
  /**
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).
3945
- *
3898
+ * Required state formatted as {userId}-{profileId}. Get userId from GET /v1/users and profileId from GET /v1/profiles.
3946
3899
  */
3947
3900
  state: string;
3948
3901
  /**
@@ -4000,10 +3953,7 @@ export type GetTelegramConnectStatusError = (unknown | {
4000
3953
  export type InitiateTelegramConnectData = {
4001
3954
  body: {
4002
3955
  /**
4003
- * The Telegram chat ID. Can be:
4004
- * - Numeric ID (e.g., "-1001234567890")
4005
- * - Username with @ prefix (e.g., "@mychannel")
4006
- *
3956
+ * The Telegram chat ID. Numeric ID (e.g. "-1001234567890") or username with @ prefix (e.g. "@mychannel").
4007
3957
  */
4008
3958
  chatId: string;
4009
3959
  /**
@@ -4136,27 +4086,19 @@ export type GetLinkedInAggregateAnalyticsData = {
4136
4086
  };
4137
4087
  query?: {
4138
4088
  /**
4139
- * Type of aggregation: TOTAL (default, returns single totals) or DAILY (returns daily breakdown). Note: MEMBERS_REACHED is not available with DAILY aggregation.
4140
- *
4089
+ * TOTAL (default, lifetime totals) or DAILY (time series). MEMBERS_REACHED not available with DAILY.
4141
4090
  */
4142
4091
  aggregation?: 'TOTAL' | 'DAILY';
4143
4092
  /**
4144
- * End date for analytics data in YYYY-MM-DD format (exclusive).
4145
- * If provided without startDate, startDate defaults to 30 days before endDate.
4146
- *
4093
+ * End date (YYYY-MM-DD, exclusive). Defaults to today if omitted.
4147
4094
  */
4148
4095
  endDate?: string;
4149
4096
  /**
4150
- * Comma-separated list of metrics to fetch. If omitted, fetches all available metrics.
4151
- * Valid values: IMPRESSION, MEMBERS_REACHED, REACTION, COMMENT, RESHARE
4152
- *
4097
+ * Comma-separated metrics: IMPRESSION, MEMBERS_REACHED, REACTION, COMMENT, RESHARE. Omit for all.
4153
4098
  */
4154
4099
  metrics?: string;
4155
4100
  /**
4156
- * Start date for analytics data in YYYY-MM-DD format.
4157
- * If provided without endDate, endDate defaults to today.
4158
- * If omitted entirely, returns lifetime analytics.
4159
- *
4101
+ * Start date (YYYY-MM-DD). If omitted, returns lifetime analytics.
4160
4102
  */
4161
4103
  startDate?: string;
4162
4104
  };
@@ -4283,13 +4225,11 @@ export type GetLinkedInMentionsData = {
4283
4225
  };
4284
4226
  query: {
4285
4227
  /**
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).
4287
- *
4228
+ * Exact display name as shown on LinkedIn. Required for person mentions to be clickable. Optional for org mentions.
4288
4229
  */
4289
4230
  displayName?: string;
4290
4231
  /**
4291
- * LinkedIn profile URL, company URL, or vanity name. Person examples: miquelpalet, linkedin.com/in/miquelpalet. Organization examples: company/microsoft, linkedin.com/company/microsoft.
4292
- *
4232
+ * LinkedIn profile URL, company URL, or vanity name.
4293
4233
  */
4294
4234
  url: string;
4295
4235
  };
@@ -5645,9 +5585,7 @@ export type ListInboxCommentsError = ({
5645
5585
  export type GetInboxPostCommentsData = {
5646
5586
  path: {
5647
5587
  /**
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).
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:).
5650
- *
5588
+ * Late post ID or platform-specific post ID. Late IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID.
5651
5589
  */
5652
5590
  postId: string;
5653
5591
  };
@@ -5784,10 +5722,7 @@ export type ReplyToInboxPostData = {
5784
5722
  };
5785
5723
  path: {
5786
5724
  /**
5787
- * The post identifier. Accepts a Late post ID or a platform-specific post ID.
5788
- *
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.
5790
- *
5725
+ * Late post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.
5791
5726
  */
5792
5727
  postId: string;
5793
5728
  };
@@ -5812,10 +5747,7 @@ export type ReplyToInboxPostError = ({
5812
5747
  export type DeleteInboxCommentData = {
5813
5748
  path: {
5814
5749
  /**
5815
- * The post identifier. Accepts a Late post ID or a platform-specific post ID.
5816
- *
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.
5818
- *
5750
+ * Late post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.
5819
5751
  */
5820
5752
  postId: string;
5821
5753
  };