@getlatedev/node 0.1.25 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -610,7 +610,7 @@ type ErrorResponse = {
610
610
  };
611
611
  };
612
612
  /**
613
- * 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.
613
+ * Up to 10 images for feed posts, cannot mix videos and images. Stories require single image or video (ephemeral 24h, no captions). Use pageId for multi-page posting.
614
614
  */
615
615
  type FacebookPlatformData = {
616
616
  /**
@@ -622,10 +622,7 @@ type FacebookPlatformData = {
622
622
  */
623
623
  firstComment?: string;
624
624
  /**
625
- * Target Facebook Page ID for multi-page posting.
626
- * If omitted, uses the selected/default page on the connection.
627
- * Use GET /api/v1/accounts/{id}/facebook-page to list available pages.
628
- *
625
+ * Target Facebook Page ID for multi-page posting. If omitted, uses the default page. Use GET /v1/accounts/{id}/facebook-page to list pages.
629
626
  */
630
627
  pageId?: string;
631
628
  };
@@ -711,23 +708,15 @@ type FoodMenuSection = {
711
708
  items?: Array<FoodMenuItem>;
712
709
  };
713
710
  /**
714
- * 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.
711
+ * 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.
715
712
  */
716
713
  type GoogleBusinessPlatformData = {
717
714
  /**
718
- * Target Google Business location ID for multi-location posting.
719
- * Format: "locations/123456789"
720
- * If omitted, uses the selected/default location on the connection.
721
- * Use GET /api/v1/accounts/{id}/gmb-locations to list available locations.
722
- *
715
+ * Target GBP location ID (e.g. "locations/123456789"). If omitted, uses the default location. Use GET /v1/accounts/{id}/gmb-locations to list locations.
723
716
  */
724
717
  locationId?: string;
725
718
  /**
726
- * BCP 47 language code for the post content (e.g., "en", "de", "es", "fr").
727
- * If omitted, the language is automatically detected from the post text.
728
- * Setting this explicitly is recommended when auto-detection may not be accurate
729
- * (e.g., very short posts, mixed-language content, or transliterated text).
730
- *
719
+ * BCP 47 language code (e.g. "en", "de", "es"). Auto-detected if omitted. Set explicitly for short or mixed-language posts.
731
720
  */
732
721
  languageCode?: string;
733
722
  /**
@@ -758,7 +747,7 @@ type HashtagInfo = {
758
747
  };
759
748
  type status = 'safe' | 'banned' | 'restricted' | 'unknown';
760
749
  /**
761
- * 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.
750
+ * 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.
762
751
  */
763
752
  type InstagramPlatformData = {
764
753
  /**
@@ -834,9 +823,7 @@ type LinkedInAggregateAnalyticsDailyResponse = {
834
823
  endDate?: string;
835
824
  } | null;
836
825
  /**
837
- * Daily breakdown of each metric. Each metric contains an array of date/count pairs.
838
- * Note: 'reach' (MEMBERS_REACHED) is not available with DAILY aggregation per LinkedIn API limitations.
839
- *
826
+ * Daily breakdown of each metric as date/count pairs. Reach not available with DAILY aggregation.
840
827
  */
841
828
  analytics?: {
842
829
  impressions?: Array<{
@@ -908,15 +895,11 @@ type LinkedInAggregateAnalyticsTotalResponse = {
908
895
  };
909
896
  type aggregation3 = 'TOTAL';
910
897
  /**
911
- * 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.
898
+ * 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.
912
899
  */
913
900
  type LinkedInPlatformData = {
914
901
  /**
915
- * Target LinkedIn Organization URN for multi-organization posting.
916
- * Format: "urn:li:organization:123456789"
917
- * If omitted, uses the selected/default organization on the connection.
918
- * Use GET /api/v1/accounts/{id}/linkedin-organizations to list available organizations.
919
- *
902
+ * 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.
920
903
  */
921
904
  organizationUrn?: string;
922
905
  /**
@@ -929,9 +912,7 @@ type LinkedInPlatformData = {
929
912
  disableLinkPreview?: boolean;
930
913
  };
931
914
  /**
932
- * Media referenced in posts. URLs must be publicly reachable over HTTPS. When using third-party storage, ensure signed links remain valid until upload completes.
933
- * 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.
934
- *
915
+ * 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).
935
916
  */
936
917
  type MediaItem = {
937
918
  type?: 'image' | 'video' | 'gif' | 'document';
@@ -1058,11 +1039,7 @@ type PlatformTarget = {
1058
1039
  */
1059
1040
  platformPostId?: string;
1060
1041
  /**
1061
- * Public URL of the published post on the platform.
1062
- * Populated after successful publish. For immediate posts (publishNow=true),
1063
- * this is included in the response. For scheduled posts, fetch the post
1064
- * via GET /v1/posts/{postId} after the scheduled time.
1065
- *
1042
+ * 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.
1066
1043
  */
1067
1044
  platformPostUrl?: string;
1068
1045
  /**
@@ -1254,8 +1231,7 @@ type Profile = {
1254
1231
  color?: string;
1255
1232
  isDefault?: boolean;
1256
1233
  /**
1257
- * 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).
1258
- *
1234
+ * Only present when includeOverLimit=true. Indicates if this profile exceeds the plan limit.
1259
1235
  */
1260
1236
  isOverLimit?: boolean;
1261
1237
  createdAt?: string;
@@ -1342,14 +1318,11 @@ type QueueUpdateResponse = {
1342
1318
  reshuffledCount?: number;
1343
1319
  };
1344
1320
  /**
1345
- * 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.
1321
+ * 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.
1346
1322
  */
1347
1323
  type RedditPlatformData = {
1348
1324
  /**
1349
- * Target subreddit name (without "r/" prefix).
1350
- * Overrides the default subreddit configured on the account connection.
1351
- * Use GET /api/v1/accounts/{id}/reddit-subreddits to list available subreddits.
1352
- *
1325
+ * Target subreddit name (without "r/" prefix). Overrides the default. Use GET /v1/accounts/{id}/reddit-subreddits to list options.
1353
1326
  */
1354
1327
  subreddit?: string;
1355
1328
  /**
@@ -1365,17 +1338,12 @@ type RedditPlatformData = {
1365
1338
  */
1366
1339
  forceSelf?: boolean;
1367
1340
  /**
1368
- * Flair ID for the post. Required by some subreddits.
1369
- * Use GET /api/v1/accounts/{id}/reddit-flairs?subreddit=name to list available flairs.
1370
- *
1341
+ * Flair ID for the post. Required by some subreddits. Use GET /v1/accounts/{id}/reddit-flairs?subreddit=name to list flairs.
1371
1342
  */
1372
1343
  flairId?: string;
1373
1344
  };
1374
1345
  /**
1375
- * Requires a Public Profile. Media required for all content types (single item only, auto-encrypted).
1376
- * Content types: story (ephemeral 24h, no caption), saved_story (permanent, title max 45 chars), spotlight (video, description max 160 chars).
1377
- * Images max 20 MB (JPEG/PNG), videos max 500 MB (MP4, 5-60s, min 540x960px).
1378
- *
1346
+ * 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).
1379
1347
  */
1380
1348
  type SnapchatPlatformData = {
1381
1349
  /**
@@ -1394,20 +1362,7 @@ type SocialAccount = {
1394
1362
  username?: string;
1395
1363
  displayName?: string;
1396
1364
  /**
1397
- * Full profile URL for the connected account. Available for all platforms:
1398
- * - Twitter/X: https://x.com/{username}
1399
- * - Instagram: https://instagram.com/{username}
1400
- * - TikTok: https://tiktok.com/@{username}
1401
- * - YouTube: https://youtube.com/@{handle} or https://youtube.com/channel/{id}
1402
- * - LinkedIn Personal: https://www.linkedin.com/in/{vanityName}/
1403
- * - LinkedIn Organization: https://www.linkedin.com/company/{vanityName}/
1404
- * - Threads: https://threads.net/@{username}
1405
- * - Pinterest: https://pinterest.com/{username}
1406
- * - Reddit: https://reddit.com/user/{username}
1407
- * - Bluesky: https://bsky.app/profile/{handle}
1408
- * - Facebook: https://facebook.com/{username} or https://facebook.com/{pageId}
1409
- * - Google Business: Google Maps URL for the business location
1410
- *
1365
+ * Full profile URL for the connected account on its platform.
1411
1366
  */
1412
1367
  profileUrl?: string;
1413
1368
  isActive?: boolean;
@@ -1421,7 +1376,7 @@ type SocialAccount = {
1421
1376
  followersLastUpdated?: string;
1422
1377
  };
1423
1378
  /**
1424
- * 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.
1379
+ * Text, images (up to 10), videos (up to 10), and mixed media albums. Captions up to 1024 chars for media, 4096 for text-only.
1425
1380
  */
1426
1381
  type TelegramPlatformData = {
1427
1382
  /**
@@ -1446,7 +1401,7 @@ type TelegramPlatformData = {
1446
1401
  */
1447
1402
  type parseMode = 'HTML' | 'Markdown' | 'MarkdownV2';
1448
1403
  /**
1449
- * 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.
1404
+ * 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.
1450
1405
  */
1451
1406
  type ThreadsPlatformData = {
1452
1407
  /**
@@ -1458,7 +1413,7 @@ type ThreadsPlatformData = {
1458
1413
  }>;
1459
1414
  };
1460
1415
  /**
1461
- * 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.
1416
+ * 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.
1462
1417
  */
1463
1418
  type TikTokPlatformData = {
1464
1419
  /**
@@ -1920,7 +1875,7 @@ type YouTubeDailyViewsResponse = {
1920
1875
  };
1921
1876
  };
1922
1877
  /**
1923
- * 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.
1878
+ * Videos under 3 min auto-detected as Shorts. Custom thumbnails for regular videos only. Scheduled videos are uploaded immediately with the specified visibility.
1924
1879
  */
1925
1880
  type YouTubePlatformData = {
1926
1881
  /**
@@ -2604,8 +2559,7 @@ type GetUserError = ({
2604
2559
  type ListProfilesData = {
2605
2560
  query?: {
2606
2561
  /**
2607
- * 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.
2608
- *
2562
+ * When true, includes over-limit profiles (marked with isOverLimit: true).
2609
2563
  */
2610
2564
  includeOverLimit?: boolean;
2611
2565
  };
@@ -2668,9 +2622,7 @@ type DeleteProfileError = (unknown | {
2668
2622
  type ListAccountsData = {
2669
2623
  query?: {
2670
2624
  /**
2671
- * When true, includes accounts from profiles that exceed the user's plan limit.
2672
- * Useful for disconnecting accounts from over-limit profiles so they can be deleted.
2673
- *
2625
+ * When true, includes accounts from over-limit profiles.
2674
2626
  */
2675
2627
  includeOverLimit?: boolean;
2676
2628
  /**
@@ -2951,10 +2903,7 @@ type GetConnectUrlData = {
2951
2903
  */
2952
2904
  profileId: string;
2953
2905
  /**
2954
- * Your custom redirect URL after connection completes.
2955
- * Standard mode: Late redirects here with ?connected={platform}&profileId=X&username=Y.
2956
- * 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.
2957
- *
2906
+ * Your custom redirect URL after connection completes. Standard mode appends ?connected={platform}&profileId=X&username=Y. Headless mode appends OAuth data params.
2958
2907
  */
2959
2908
  redirect_url?: string;
2960
2909
  };
@@ -3137,8 +3086,7 @@ type SelectGoogleBusinessLocationData = {
3137
3086
  */
3138
3087
  tempToken: string;
3139
3088
  /**
3140
- * Decoded user profile object from the OAuth callback. Contains the refresh token needed for token refresh. Always include this field.
3141
- *
3089
+ * Decoded user profile from the OAuth callback. Contains the refresh token. Always include this field.
3142
3090
  */
3143
3091
  userProfile?: {
3144
3092
  id?: string;
@@ -3316,10 +3264,7 @@ type GetGoogleBusinessLocationDetailsData = {
3316
3264
  };
3317
3265
  query?: {
3318
3266
  /**
3319
- * Comma-separated fields to return. Defaults to common fields.
3320
- * Available: name, title, phoneNumbers, categories, storefrontAddress, websiteUri,
3321
- * regularHours, specialHours, serviceArea, profile, openInfo, metadata, moreHours
3322
- *
3267
+ * Comma-separated fields to return. Available: name, title, phoneNumbers, categories, storefrontAddress, websiteUri, regularHours, specialHours, serviceArea, profile, openInfo, metadata, moreHours.
3323
3268
  */
3324
3269
  readMask?: string;
3325
3270
  };
@@ -4013,8 +3958,7 @@ type ConnectBlueskyCredentialsData = {
4013
3958
  */
4014
3959
  appPassword: string;
4015
3960
  /**
4016
- * 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).
4017
- *
3961
+ * Required state formatted as {userId}-{profileId}. Get userId from GET /v1/users and profileId from GET /v1/profiles.
4018
3962
  */
4019
3963
  state: string;
4020
3964
  /**
@@ -4066,10 +4010,7 @@ type GetTelegramConnectStatusError = (unknown | {
4066
4010
  type InitiateTelegramConnectData = {
4067
4011
  body: {
4068
4012
  /**
4069
- * The Telegram chat ID. Can be:
4070
- * - Numeric ID (e.g., "-1001234567890")
4071
- * - Username with @ prefix (e.g., "@mychannel")
4072
- *
4013
+ * The Telegram chat ID. Numeric ID (e.g. "-1001234567890") or username with @ prefix (e.g. "@mychannel").
4073
4014
  */
4074
4015
  chatId: string;
4075
4016
  /**
@@ -4187,27 +4128,19 @@ type GetLinkedInAggregateAnalyticsData = {
4187
4128
  };
4188
4129
  query?: {
4189
4130
  /**
4190
- * Type of aggregation: TOTAL (default, returns single totals) or DAILY (returns daily breakdown). Note: MEMBERS_REACHED is not available with DAILY aggregation.
4191
- *
4131
+ * TOTAL (default, lifetime totals) or DAILY (time series). MEMBERS_REACHED not available with DAILY.
4192
4132
  */
4193
4133
  aggregation?: 'TOTAL' | 'DAILY';
4194
4134
  /**
4195
- * End date for analytics data in YYYY-MM-DD format (exclusive).
4196
- * If provided without startDate, startDate defaults to 30 days before endDate.
4197
- *
4135
+ * End date (YYYY-MM-DD, exclusive). Defaults to today if omitted.
4198
4136
  */
4199
4137
  endDate?: string;
4200
4138
  /**
4201
- * Comma-separated list of metrics to fetch. If omitted, fetches all available metrics.
4202
- * Valid values: IMPRESSION, MEMBERS_REACHED, REACTION, COMMENT, RESHARE
4203
- *
4139
+ * Comma-separated metrics: IMPRESSION, MEMBERS_REACHED, REACTION, COMMENT, RESHARE. Omit for all.
4204
4140
  */
4205
4141
  metrics?: string;
4206
4142
  /**
4207
- * Start date for analytics data in YYYY-MM-DD format.
4208
- * If provided without endDate, endDate defaults to today.
4209
- * If omitted entirely, returns lifetime analytics.
4210
- *
4143
+ * Start date (YYYY-MM-DD). If omitted, returns lifetime analytics.
4211
4144
  */
4212
4145
  startDate?: string;
4213
4146
  };
@@ -4325,13 +4258,11 @@ type GetLinkedInMentionsData = {
4325
4258
  };
4326
4259
  query: {
4327
4260
  /**
4328
- * 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).
4329
- *
4261
+ * Exact display name as shown on LinkedIn. Required for person mentions to be clickable. Optional for org mentions.
4330
4262
  */
4331
4263
  displayName?: string;
4332
4264
  /**
4333
- * LinkedIn profile URL, company URL, or vanity name. Person examples: miquelpalet, linkedin.com/in/miquelpalet. Organization examples: company/microsoft, linkedin.com/company/microsoft.
4334
- *
4265
+ * LinkedIn profile URL, company URL, or vanity name.
4335
4266
  */
4336
4267
  url: string;
4337
4268
  };
@@ -5571,9 +5502,7 @@ type ListInboxCommentsError = ({
5571
5502
  type GetInboxPostCommentsData = {
5572
5503
  path: {
5573
5504
  /**
5574
- * 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).
5575
- * 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:).
5576
- *
5505
+ * Late post ID or platform-specific post ID. Late IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID.
5577
5506
  */
5578
5507
  postId: string;
5579
5508
  };
@@ -5707,10 +5636,7 @@ type ReplyToInboxPostData = {
5707
5636
  };
5708
5637
  path: {
5709
5638
  /**
5710
- * The post identifier. Accepts a Late post ID or a platform-specific post ID.
5711
- *
5712
- * 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.
5713
- *
5639
+ * Late post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.
5714
5640
  */
5715
5641
  postId: string;
5716
5642
  };
@@ -5732,10 +5658,7 @@ type ReplyToInboxPostError = ({
5732
5658
  type DeleteInboxCommentData = {
5733
5659
  path: {
5734
5660
  /**
5735
- * The post identifier. Accepts a Late post ID or a platform-specific post ID.
5736
- *
5737
- * 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.
5738
- *
5661
+ * Late post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.
5739
5662
  */
5740
5663
  postId: string;
5741
5664
  };