@postpeer/node 0.8.1 → 0.8.2

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.cts CHANGED
@@ -502,6 +502,19 @@ type LinkedInConfigurations = {
502
502
  * Post visibility. "PUBLIC" = visible to everyone, "CONNECTIONS" = visible to connections only. Defaults to "PUBLIC".
503
503
  */
504
504
  visibility?: 'PUBLIC' | 'CONNECTIONS';
505
+ /**
506
+ * Tag company pages in the post text. Each entry maps an exact substring of `content` to the organization URN to mention; LinkedIn renders it as a clickable @mention. Only company pages can be mentioned, not personal profiles.
507
+ */
508
+ mentions?: Array<{
509
+ /**
510
+ * Exact substring within the post content to turn into a clickable mention (e.g. "Acme Corp"). Case-sensitive, must appear exactly once in content.
511
+ */
512
+ text: string;
513
+ /**
514
+ * LinkedIn URN of the company page to mention, e.g. "urn:li:organization:12345". LinkedIn's API only supports mentioning organization/company pages, not personal profiles.
515
+ */
516
+ urn: string;
517
+ }>;
505
518
  /**
506
519
  * URL for an article/link post. When provided, the post becomes a link share with a preview card.
507
520
  */
@@ -519,6 +532,16 @@ type LinkedInConfigurations = {
519
532
  */
520
533
  documentTitle?: string;
521
534
  };
535
+ type LinkedInMention = {
536
+ /**
537
+ * Exact substring within the post content to turn into a clickable mention (e.g. "Acme Corp"). Case-sensitive, must appear exactly once in content.
538
+ */
539
+ text: string;
540
+ /**
541
+ * LinkedIn URN of the company page to mention, e.g. "urn:li:organization:12345". LinkedIn's API only supports mentioning organization/company pages, not personal profiles.
542
+ */
543
+ urn: string;
544
+ };
522
545
  /**
523
546
  * Pass this object in platformSpecificData when posting to Bluesky.
524
547
  */
@@ -550,9 +573,13 @@ type FacebookConfigurations = {
550
573
  videoThumbnailUrl?: string;
551
574
  };
552
575
  /**
553
- * Pass this object in platformSpecificData when posting to Instagram Business accounts. All fields are optional and apply to Reels/video posts; image posts ignore them.
576
+ * Pass this object in platformSpecificData when posting to Instagram. Use contentType to publish Stories; the remaining fields customize Reels.
554
577
  */
555
578
  type InstagramConfigurations = {
579
+ /**
580
+ * Set to "story" to publish an Instagram Story. Omit for the existing behavior: images publish to Feed and videos publish as Reels.
581
+ */
582
+ contentType?: 'story';
556
583
  /**
557
584
  * Reels-only. When true (default), the Reel also appears in the account's main feed grid. Set false to publish to Reels only.
558
585
  */
@@ -2562,6 +2589,209 @@ type PatchV1PostsScheduledByPostIdResponses = {
2562
2589
  };
2563
2590
  };
2564
2591
  type PatchV1PostsScheduledByPostIdResponse = PatchV1PostsScheduledByPostIdResponses[keyof PatchV1PostsScheduledByPostIdResponses];
2592
+ type PutV1PostsScheduledByPostIdData = {
2593
+ body: {
2594
+ /**
2595
+ * New post text body
2596
+ */
2597
+ content: string;
2598
+ /**
2599
+ * Replacement media attachments (images, videos, GIFs)
2600
+ */
2601
+ mediaItems?: Array<{
2602
+ type: 'image' | 'video' | 'gif' | 'document';
2603
+ url: string;
2604
+ /**
2605
+ * Thumbnail image URL for video items. Supported on YouTube regular videos (not Shorts). JPEG, PNG, or GIF, max 2 MB, min 640 px wide.
2606
+ */
2607
+ thumbnail?: string;
2608
+ }>;
2609
+ /**
2610
+ * Replacement target platform accounts to publish to
2611
+ */
2612
+ platforms: Array<{
2613
+ platform: 'twitter';
2614
+ /**
2615
+ * Integration._id — find yours via GET /connect/integrations
2616
+ */
2617
+ accountId: string;
2618
+ /**
2619
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2620
+ */
2621
+ content?: string;
2622
+ platformSpecificData?: TwitterConfigurations;
2623
+ } | {
2624
+ platform: 'instagram';
2625
+ /**
2626
+ * Integration._id — find yours via GET /connect/integrations
2627
+ */
2628
+ accountId: string;
2629
+ /**
2630
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2631
+ */
2632
+ content?: string;
2633
+ platformSpecificData?: InstagramConfigurations;
2634
+ } | {
2635
+ platform: 'youtube';
2636
+ /**
2637
+ * Integration._id — find yours via GET /connect/integrations
2638
+ */
2639
+ accountId: string;
2640
+ /**
2641
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2642
+ */
2643
+ content?: string;
2644
+ platformSpecificData?: YouTubeConfigurations;
2645
+ } | {
2646
+ platform: 'tiktok';
2647
+ /**
2648
+ * Integration._id — find yours via GET /connect/integrations
2649
+ */
2650
+ accountId: string;
2651
+ /**
2652
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2653
+ */
2654
+ content?: string;
2655
+ platformSpecificData?: TikTokConfigurations;
2656
+ } | {
2657
+ platform: 'pinterest';
2658
+ /**
2659
+ * Integration._id — find yours via GET /connect/integrations
2660
+ */
2661
+ accountId: string;
2662
+ /**
2663
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2664
+ */
2665
+ content?: string;
2666
+ platformSpecificData?: PinterestConfigurations;
2667
+ } | {
2668
+ platform: 'linkedin';
2669
+ /**
2670
+ * Integration._id — find yours via GET /connect/integrations
2671
+ */
2672
+ accountId: string;
2673
+ /**
2674
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2675
+ */
2676
+ content?: string;
2677
+ platformSpecificData?: LinkedInConfigurations;
2678
+ } | {
2679
+ platform: 'bluesky';
2680
+ /**
2681
+ * Integration._id — find yours via GET /connect/integrations
2682
+ */
2683
+ accountId: string;
2684
+ /**
2685
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2686
+ */
2687
+ content?: string;
2688
+ platformSpecificData?: BlueskyConfigurations;
2689
+ } | {
2690
+ platform: 'facebook';
2691
+ /**
2692
+ * Integration._id — find yours via GET /connect/integrations
2693
+ */
2694
+ accountId: string;
2695
+ /**
2696
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2697
+ */
2698
+ content?: string;
2699
+ platformSpecificData?: FacebookConfigurations;
2700
+ } | {
2701
+ platform: 'threads';
2702
+ /**
2703
+ * Integration._id — find yours via GET /connect/integrations
2704
+ */
2705
+ accountId: string;
2706
+ /**
2707
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2708
+ */
2709
+ content?: string;
2710
+ platformSpecificData?: ThreadsConfigurations;
2711
+ } | {
2712
+ platform: 'googlebusiness';
2713
+ /**
2714
+ * Integration._id — find yours via GET /connect/integrations
2715
+ */
2716
+ accountId: string;
2717
+ /**
2718
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2719
+ */
2720
+ content?: string;
2721
+ platformSpecificData?: GoogleBusinessConfigurations;
2722
+ }>;
2723
+ /**
2724
+ * New ISO 8601 datetime. Omit to keep the current scheduled time.
2725
+ */
2726
+ scheduledFor?: string;
2727
+ /**
2728
+ * IANA timezone for the scheduled time. Omit to keep the current one.
2729
+ */
2730
+ timezone?: string;
2731
+ };
2732
+ path: {
2733
+ postId: string;
2734
+ };
2735
+ query?: never;
2736
+ url: '/v1/posts/scheduled/{postId}';
2737
+ };
2738
+ type PutV1PostsScheduledByPostIdErrors = {
2739
+ /**
2740
+ * Default Response
2741
+ */
2742
+ 400: {
2743
+ success: boolean;
2744
+ message: string;
2745
+ };
2746
+ /**
2747
+ * Default Response
2748
+ */
2749
+ 402: {
2750
+ success: boolean;
2751
+ message: string;
2752
+ };
2753
+ /**
2754
+ * Default Response
2755
+ */
2756
+ 403: {
2757
+ success: boolean;
2758
+ message: string;
2759
+ };
2760
+ /**
2761
+ * Default Response
2762
+ */
2763
+ 404: {
2764
+ success: boolean;
2765
+ message: string;
2766
+ };
2767
+ /**
2768
+ * Default Response
2769
+ */
2770
+ 409: {
2771
+ success: boolean;
2772
+ message: string;
2773
+ };
2774
+ /**
2775
+ * Default Response
2776
+ */
2777
+ 503: {
2778
+ success: boolean;
2779
+ message: string;
2780
+ };
2781
+ };
2782
+ type PutV1PostsScheduledByPostIdError = PutV1PostsScheduledByPostIdErrors[keyof PutV1PostsScheduledByPostIdErrors];
2783
+ type PutV1PostsScheduledByPostIdResponses = {
2784
+ /**
2785
+ * Default Response
2786
+ */
2787
+ 200: {
2788
+ success: boolean;
2789
+ message: string;
2790
+ postId: string;
2791
+ scheduledFor: string;
2792
+ };
2793
+ };
2794
+ type PutV1PostsScheduledByPostIdResponse = PutV1PostsScheduledByPostIdResponses[keyof PutV1PostsScheduledByPostIdResponses];
2565
2795
  type PostV1MediaUploadData = {
2566
2796
  body: {
2567
2797
  filename: string;
@@ -3303,6 +3533,12 @@ declare class Scheduled extends HeyApiClient {
3303
3533
  * Reschedule a post to a new time
3304
3534
  */
3305
3535
  reschedule<ThrowOnError extends boolean = false>(options: Options<PatchV1PostsScheduledByPostIdData, ThrowOnError>): RequestResult<PatchV1PostsScheduledByPostIdResponses, PatchV1PostsScheduledByPostIdErrors, ThrowOnError>;
3536
+ /**
3537
+ * Edit a scheduled post (content, media, platforms, time)
3538
+ *
3539
+ * Replaces the editable fields of a scheduled post: text content, media attachments, target platforms + platform-specific data, and optionally the scheduled time/timezone. Re-validates each platform and reconciles the credit difference. Only works while the post is still scheduled.
3540
+ */
3541
+ edit<ThrowOnError extends boolean = false>(options: Options<PutV1PostsScheduledByPostIdData, ThrowOnError>): RequestResult<PutV1PostsScheduledByPostIdResponses, PutV1PostsScheduledByPostIdErrors, ThrowOnError>;
3306
3542
  }
3307
3543
  declare class Posts extends HeyApiClient {
3308
3544
  /**
@@ -3479,6 +3715,6 @@ declare class APIUserAbortError extends APIConnectionError {
3479
3715
  constructor(options?: ErrorOptions);
3480
3716
  }
3481
3717
 
3482
- declare const VERSION = "0.8.1";
3718
+ declare const VERSION = "0.8.2";
3483
3719
 
3484
- export { APIConnectionError, APIConnectionTimeoutError, APIError, APIUserAbortError, AuthenticationError, BadRequestError, type BlueskyConfigurations, type ClientOptions, ConflictError, type DeleteV1AppsByIdData, type DeleteV1AppsByIdError, type DeleteV1AppsByIdErrors, type DeleteV1AppsByIdResponse, type DeleteV1AppsByIdResponses, type DeleteV1ConnectIntegrationsByIdData, type DeleteV1ConnectIntegrationsByIdError, type DeleteV1ConnectIntegrationsByIdErrors, type DeleteV1ConnectIntegrationsByIdResponse, type DeleteV1ConnectIntegrationsByIdResponses, type DeleteV1NotificationsByIdData, type DeleteV1NotificationsByIdError, type DeleteV1NotificationsByIdErrors, type DeleteV1NotificationsByIdResponse, type DeleteV1NotificationsByIdResponses, type DeleteV1PostsByPostIdData, type DeleteV1PostsByPostIdError, type DeleteV1PostsByPostIdErrors, type DeleteV1PostsByPostIdResponse, type DeleteV1PostsByPostIdResponses, type DeleteV1PostsScheduledByPostIdData, type DeleteV1PostsScheduledByPostIdError, type DeleteV1PostsScheduledByPostIdErrors, type DeleteV1PostsScheduledByPostIdResponse, type DeleteV1PostsScheduledByPostIdResponses, type DeleteV1ProfilesByIdData, type DeleteV1ProfilesByIdError, type DeleteV1ProfilesByIdErrors, type DeleteV1ProfilesByIdResponse, type DeleteV1ProfilesByIdResponses, type ErrorResponse, type FacebookConfigurations, type GetV1AnalyticsData, type GetV1AnalyticsError, type GetV1AnalyticsErrors, type GetV1AnalyticsResponse, type GetV1AnalyticsResponses, type GetV1AppsByIdData, type GetV1AppsByIdError, type GetV1AppsByIdErrors, type GetV1AppsByIdResponse, type GetV1AppsByIdResponses, type GetV1AppsData, type GetV1AppsResponse, type GetV1AppsResponses, type GetV1ConnectByPlatformData, type GetV1ConnectByPlatformError, type GetV1ConnectByPlatformErrors, type GetV1ConnectByPlatformResponse, type GetV1ConnectByPlatformResponses, type GetV1ConnectIntegrationsData, type GetV1ConnectIntegrationsResponse, type GetV1ConnectIntegrationsResponses, type GetV1ConnectLinkedinSelectionByTokenData, type GetV1ConnectLinkedinSelectionByTokenError, type GetV1ConnectLinkedinSelectionByTokenErrors, type GetV1ConnectLinkedinSelectionByTokenResponse, type GetV1ConnectLinkedinSelectionByTokenResponses, type GetV1HealthAuthData, type GetV1HealthAuthResponse, type GetV1HealthAuthResponses, type GetV1HealthData, type GetV1HealthResponse, type GetV1HealthResponses, type GetV1NotificationsByIdData, type GetV1NotificationsByIdError, type GetV1NotificationsByIdErrors, type GetV1NotificationsByIdResponse, type GetV1NotificationsByIdResponses, type GetV1NotificationsData, type GetV1NotificationsResponse, type GetV1NotificationsResponses, type GetV1PinterestBoardsData, type GetV1PinterestBoardsError, type GetV1PinterestBoardsErrors, type GetV1PinterestBoardsResponse, type GetV1PinterestBoardsResponses, type GetV1PlatformsData, type GetV1PlatformsResponse, type GetV1PlatformsResponses, type GetV1PostsByPostIdData, type GetV1PostsByPostIdError, type GetV1PostsByPostIdErrors, type GetV1PostsByPostIdResponse, type GetV1PostsByPostIdResponses, type GetV1PostsData, type GetV1PostsError, type GetV1PostsErrors, type GetV1PostsResponse, type GetV1PostsResponses, type GetV1PostsScheduledData, type GetV1PostsScheduledResponse, type GetV1PostsScheduledResponses, type GetV1ProfilesByIdData, type GetV1ProfilesByIdError, type GetV1ProfilesByIdErrors, type GetV1ProfilesByIdResponse, type GetV1ProfilesByIdResponses, type GetV1ProfilesData, type GetV1ProfilesResponse, type GetV1ProfilesResponses, type GetV1TiktokCreatorInfoData, type GetV1TiktokCreatorInfoError, type GetV1TiktokCreatorInfoErrors, type GetV1TiktokCreatorInfoResponse, type GetV1TiktokCreatorInfoResponses, type GetV1UsageData, type GetV1UsageError, type GetV1UsageErrors, type GetV1UsageResponse, type GetV1UsageResponses, type GoogleBusinessConfigurations, type InstagramConfigurations, InternalServerError, type LinkedInConfigurations, NotFoundError, type PatchV1AppsByIdData, type PatchV1AppsByIdError, type PatchV1AppsByIdErrors, type PatchV1AppsByIdResponse, type PatchV1AppsByIdResponses, type PatchV1NotificationsByIdData, type PatchV1NotificationsByIdError, type PatchV1NotificationsByIdErrors, type PatchV1NotificationsByIdResponse, type PatchV1NotificationsByIdResponses, type PatchV1PostsScheduledByPostIdData, type PatchV1PostsScheduledByPostIdError, type PatchV1PostsScheduledByPostIdErrors, type PatchV1PostsScheduledByPostIdResponse, type PatchV1PostsScheduledByPostIdResponses, type PatchV1ProfilesByIdData, type PatchV1ProfilesByIdError, type PatchV1ProfilesByIdErrors, type PatchV1ProfilesByIdResponse, type PatchV1ProfilesByIdResponses, PermissionDeniedError, type PinterestConfigurations, type Platform, type PostPayload, PostPeer, PostPeerError, type PostV1AiImageData, type PostV1AiImageError, type PostV1AiImageErrors, type PostV1AiImageResponse, type PostV1AiImageResponses, type PostV1AiWriteData, type PostV1AiWriteError, type PostV1AiWriteErrors, type PostV1AiWriteResponse, type PostV1AiWriteResponses, type PostV1AppsData, type PostV1AppsError, type PostV1AppsErrors, type PostV1AppsResponse, type PostV1AppsResponses, type PostV1ConnectBlueskyAuthData, type PostV1ConnectBlueskyAuthError, type PostV1ConnectBlueskyAuthErrors, type PostV1ConnectLinkedinSelectionByTokenData, type PostV1ConnectLinkedinSelectionByTokenError, type PostV1ConnectLinkedinSelectionByTokenErrors, type PostV1ConnectLinkedinSelectionByTokenResponse, type PostV1ConnectLinkedinSelectionByTokenResponses, type PostV1MediaUploadData, type PostV1MediaUploadError, type PostV1MediaUploadErrors, type PostV1MediaUploadResponse, type PostV1MediaUploadResponses, type PostV1NotificationsData, type PostV1NotificationsError, type PostV1NotificationsErrors, type PostV1NotificationsResponse, type PostV1NotificationsResponses, type PostV1NotificationsTestData, type PostV1NotificationsTestError, type PostV1NotificationsTestErrors, type PostV1NotificationsTestResponse, type PostV1NotificationsTestResponses, type PostV1PostsData, type PostV1PostsError, type PostV1PostsErrors, type PostV1PostsResponse, type PostV1PostsResponses, type PostV1ProfilesData, type PostV1ProfilesResponse, type PostV1ProfilesResponses, RateLimitError, type SortOrder, type Status, type ThreadsConfigurations, type TikTokConfigurations, type TwitterConfigurations, UnprocessableEntityError, VERSION, type YouTubeConfigurations, PostPeer as default };
3720
+ export { APIConnectionError, APIConnectionTimeoutError, APIError, APIUserAbortError, AuthenticationError, BadRequestError, type BlueskyConfigurations, type ClientOptions, ConflictError, type DeleteV1AppsByIdData, type DeleteV1AppsByIdError, type DeleteV1AppsByIdErrors, type DeleteV1AppsByIdResponse, type DeleteV1AppsByIdResponses, type DeleteV1ConnectIntegrationsByIdData, type DeleteV1ConnectIntegrationsByIdError, type DeleteV1ConnectIntegrationsByIdErrors, type DeleteV1ConnectIntegrationsByIdResponse, type DeleteV1ConnectIntegrationsByIdResponses, type DeleteV1NotificationsByIdData, type DeleteV1NotificationsByIdError, type DeleteV1NotificationsByIdErrors, type DeleteV1NotificationsByIdResponse, type DeleteV1NotificationsByIdResponses, type DeleteV1PostsByPostIdData, type DeleteV1PostsByPostIdError, type DeleteV1PostsByPostIdErrors, type DeleteV1PostsByPostIdResponse, type DeleteV1PostsByPostIdResponses, type DeleteV1PostsScheduledByPostIdData, type DeleteV1PostsScheduledByPostIdError, type DeleteV1PostsScheduledByPostIdErrors, type DeleteV1PostsScheduledByPostIdResponse, type DeleteV1PostsScheduledByPostIdResponses, type DeleteV1ProfilesByIdData, type DeleteV1ProfilesByIdError, type DeleteV1ProfilesByIdErrors, type DeleteV1ProfilesByIdResponse, type DeleteV1ProfilesByIdResponses, type ErrorResponse, type FacebookConfigurations, type GetV1AnalyticsData, type GetV1AnalyticsError, type GetV1AnalyticsErrors, type GetV1AnalyticsResponse, type GetV1AnalyticsResponses, type GetV1AppsByIdData, type GetV1AppsByIdError, type GetV1AppsByIdErrors, type GetV1AppsByIdResponse, type GetV1AppsByIdResponses, type GetV1AppsData, type GetV1AppsResponse, type GetV1AppsResponses, type GetV1ConnectByPlatformData, type GetV1ConnectByPlatformError, type GetV1ConnectByPlatformErrors, type GetV1ConnectByPlatformResponse, type GetV1ConnectByPlatformResponses, type GetV1ConnectIntegrationsData, type GetV1ConnectIntegrationsResponse, type GetV1ConnectIntegrationsResponses, type GetV1ConnectLinkedinSelectionByTokenData, type GetV1ConnectLinkedinSelectionByTokenError, type GetV1ConnectLinkedinSelectionByTokenErrors, type GetV1ConnectLinkedinSelectionByTokenResponse, type GetV1ConnectLinkedinSelectionByTokenResponses, type GetV1HealthAuthData, type GetV1HealthAuthResponse, type GetV1HealthAuthResponses, type GetV1HealthData, type GetV1HealthResponse, type GetV1HealthResponses, type GetV1NotificationsByIdData, type GetV1NotificationsByIdError, type GetV1NotificationsByIdErrors, type GetV1NotificationsByIdResponse, type GetV1NotificationsByIdResponses, type GetV1NotificationsData, type GetV1NotificationsResponse, type GetV1NotificationsResponses, type GetV1PinterestBoardsData, type GetV1PinterestBoardsError, type GetV1PinterestBoardsErrors, type GetV1PinterestBoardsResponse, type GetV1PinterestBoardsResponses, type GetV1PlatformsData, type GetV1PlatformsResponse, type GetV1PlatformsResponses, type GetV1PostsByPostIdData, type GetV1PostsByPostIdError, type GetV1PostsByPostIdErrors, type GetV1PostsByPostIdResponse, type GetV1PostsByPostIdResponses, type GetV1PostsData, type GetV1PostsError, type GetV1PostsErrors, type GetV1PostsResponse, type GetV1PostsResponses, type GetV1PostsScheduledData, type GetV1PostsScheduledResponse, type GetV1PostsScheduledResponses, type GetV1ProfilesByIdData, type GetV1ProfilesByIdError, type GetV1ProfilesByIdErrors, type GetV1ProfilesByIdResponse, type GetV1ProfilesByIdResponses, type GetV1ProfilesData, type GetV1ProfilesResponse, type GetV1ProfilesResponses, type GetV1TiktokCreatorInfoData, type GetV1TiktokCreatorInfoError, type GetV1TiktokCreatorInfoErrors, type GetV1TiktokCreatorInfoResponse, type GetV1TiktokCreatorInfoResponses, type GetV1UsageData, type GetV1UsageError, type GetV1UsageErrors, type GetV1UsageResponse, type GetV1UsageResponses, type GoogleBusinessConfigurations, type InstagramConfigurations, InternalServerError, type LinkedInConfigurations, type LinkedInMention, NotFoundError, type PatchV1AppsByIdData, type PatchV1AppsByIdError, type PatchV1AppsByIdErrors, type PatchV1AppsByIdResponse, type PatchV1AppsByIdResponses, type PatchV1NotificationsByIdData, type PatchV1NotificationsByIdError, type PatchV1NotificationsByIdErrors, type PatchV1NotificationsByIdResponse, type PatchV1NotificationsByIdResponses, type PatchV1PostsScheduledByPostIdData, type PatchV1PostsScheduledByPostIdError, type PatchV1PostsScheduledByPostIdErrors, type PatchV1PostsScheduledByPostIdResponse, type PatchV1PostsScheduledByPostIdResponses, type PatchV1ProfilesByIdData, type PatchV1ProfilesByIdError, type PatchV1ProfilesByIdErrors, type PatchV1ProfilesByIdResponse, type PatchV1ProfilesByIdResponses, PermissionDeniedError, type PinterestConfigurations, type Platform, type PostPayload, PostPeer, PostPeerError, type PostV1AiImageData, type PostV1AiImageError, type PostV1AiImageErrors, type PostV1AiImageResponse, type PostV1AiImageResponses, type PostV1AiWriteData, type PostV1AiWriteError, type PostV1AiWriteErrors, type PostV1AiWriteResponse, type PostV1AiWriteResponses, type PostV1AppsData, type PostV1AppsError, type PostV1AppsErrors, type PostV1AppsResponse, type PostV1AppsResponses, type PostV1ConnectBlueskyAuthData, type PostV1ConnectBlueskyAuthError, type PostV1ConnectBlueskyAuthErrors, type PostV1ConnectLinkedinSelectionByTokenData, type PostV1ConnectLinkedinSelectionByTokenError, type PostV1ConnectLinkedinSelectionByTokenErrors, type PostV1ConnectLinkedinSelectionByTokenResponse, type PostV1ConnectLinkedinSelectionByTokenResponses, type PostV1MediaUploadData, type PostV1MediaUploadError, type PostV1MediaUploadErrors, type PostV1MediaUploadResponse, type PostV1MediaUploadResponses, type PostV1NotificationsData, type PostV1NotificationsError, type PostV1NotificationsErrors, type PostV1NotificationsResponse, type PostV1NotificationsResponses, type PostV1NotificationsTestData, type PostV1NotificationsTestError, type PostV1NotificationsTestErrors, type PostV1NotificationsTestResponse, type PostV1NotificationsTestResponses, type PostV1PostsData, type PostV1PostsError, type PostV1PostsErrors, type PostV1PostsResponse, type PostV1PostsResponses, type PostV1ProfilesData, type PostV1ProfilesResponse, type PostV1ProfilesResponses, type PutV1PostsScheduledByPostIdData, type PutV1PostsScheduledByPostIdError, type PutV1PostsScheduledByPostIdErrors, type PutV1PostsScheduledByPostIdResponse, type PutV1PostsScheduledByPostIdResponses, RateLimitError, type SortOrder, type Status, type ThreadsConfigurations, type TikTokConfigurations, type TwitterConfigurations, UnprocessableEntityError, VERSION, type YouTubeConfigurations, PostPeer as default };
package/dist/index.d.ts CHANGED
@@ -502,6 +502,19 @@ type LinkedInConfigurations = {
502
502
  * Post visibility. "PUBLIC" = visible to everyone, "CONNECTIONS" = visible to connections only. Defaults to "PUBLIC".
503
503
  */
504
504
  visibility?: 'PUBLIC' | 'CONNECTIONS';
505
+ /**
506
+ * Tag company pages in the post text. Each entry maps an exact substring of `content` to the organization URN to mention; LinkedIn renders it as a clickable @mention. Only company pages can be mentioned, not personal profiles.
507
+ */
508
+ mentions?: Array<{
509
+ /**
510
+ * Exact substring within the post content to turn into a clickable mention (e.g. "Acme Corp"). Case-sensitive, must appear exactly once in content.
511
+ */
512
+ text: string;
513
+ /**
514
+ * LinkedIn URN of the company page to mention, e.g. "urn:li:organization:12345". LinkedIn's API only supports mentioning organization/company pages, not personal profiles.
515
+ */
516
+ urn: string;
517
+ }>;
505
518
  /**
506
519
  * URL for an article/link post. When provided, the post becomes a link share with a preview card.
507
520
  */
@@ -519,6 +532,16 @@ type LinkedInConfigurations = {
519
532
  */
520
533
  documentTitle?: string;
521
534
  };
535
+ type LinkedInMention = {
536
+ /**
537
+ * Exact substring within the post content to turn into a clickable mention (e.g. "Acme Corp"). Case-sensitive, must appear exactly once in content.
538
+ */
539
+ text: string;
540
+ /**
541
+ * LinkedIn URN of the company page to mention, e.g. "urn:li:organization:12345". LinkedIn's API only supports mentioning organization/company pages, not personal profiles.
542
+ */
543
+ urn: string;
544
+ };
522
545
  /**
523
546
  * Pass this object in platformSpecificData when posting to Bluesky.
524
547
  */
@@ -550,9 +573,13 @@ type FacebookConfigurations = {
550
573
  videoThumbnailUrl?: string;
551
574
  };
552
575
  /**
553
- * Pass this object in platformSpecificData when posting to Instagram Business accounts. All fields are optional and apply to Reels/video posts; image posts ignore them.
576
+ * Pass this object in platformSpecificData when posting to Instagram. Use contentType to publish Stories; the remaining fields customize Reels.
554
577
  */
555
578
  type InstagramConfigurations = {
579
+ /**
580
+ * Set to "story" to publish an Instagram Story. Omit for the existing behavior: images publish to Feed and videos publish as Reels.
581
+ */
582
+ contentType?: 'story';
556
583
  /**
557
584
  * Reels-only. When true (default), the Reel also appears in the account's main feed grid. Set false to publish to Reels only.
558
585
  */
@@ -2562,6 +2589,209 @@ type PatchV1PostsScheduledByPostIdResponses = {
2562
2589
  };
2563
2590
  };
2564
2591
  type PatchV1PostsScheduledByPostIdResponse = PatchV1PostsScheduledByPostIdResponses[keyof PatchV1PostsScheduledByPostIdResponses];
2592
+ type PutV1PostsScheduledByPostIdData = {
2593
+ body: {
2594
+ /**
2595
+ * New post text body
2596
+ */
2597
+ content: string;
2598
+ /**
2599
+ * Replacement media attachments (images, videos, GIFs)
2600
+ */
2601
+ mediaItems?: Array<{
2602
+ type: 'image' | 'video' | 'gif' | 'document';
2603
+ url: string;
2604
+ /**
2605
+ * Thumbnail image URL for video items. Supported on YouTube regular videos (not Shorts). JPEG, PNG, or GIF, max 2 MB, min 640 px wide.
2606
+ */
2607
+ thumbnail?: string;
2608
+ }>;
2609
+ /**
2610
+ * Replacement target platform accounts to publish to
2611
+ */
2612
+ platforms: Array<{
2613
+ platform: 'twitter';
2614
+ /**
2615
+ * Integration._id — find yours via GET /connect/integrations
2616
+ */
2617
+ accountId: string;
2618
+ /**
2619
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2620
+ */
2621
+ content?: string;
2622
+ platformSpecificData?: TwitterConfigurations;
2623
+ } | {
2624
+ platform: 'instagram';
2625
+ /**
2626
+ * Integration._id — find yours via GET /connect/integrations
2627
+ */
2628
+ accountId: string;
2629
+ /**
2630
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2631
+ */
2632
+ content?: string;
2633
+ platformSpecificData?: InstagramConfigurations;
2634
+ } | {
2635
+ platform: 'youtube';
2636
+ /**
2637
+ * Integration._id — find yours via GET /connect/integrations
2638
+ */
2639
+ accountId: string;
2640
+ /**
2641
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2642
+ */
2643
+ content?: string;
2644
+ platformSpecificData?: YouTubeConfigurations;
2645
+ } | {
2646
+ platform: 'tiktok';
2647
+ /**
2648
+ * Integration._id — find yours via GET /connect/integrations
2649
+ */
2650
+ accountId: string;
2651
+ /**
2652
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2653
+ */
2654
+ content?: string;
2655
+ platformSpecificData?: TikTokConfigurations;
2656
+ } | {
2657
+ platform: 'pinterest';
2658
+ /**
2659
+ * Integration._id — find yours via GET /connect/integrations
2660
+ */
2661
+ accountId: string;
2662
+ /**
2663
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2664
+ */
2665
+ content?: string;
2666
+ platformSpecificData?: PinterestConfigurations;
2667
+ } | {
2668
+ platform: 'linkedin';
2669
+ /**
2670
+ * Integration._id — find yours via GET /connect/integrations
2671
+ */
2672
+ accountId: string;
2673
+ /**
2674
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2675
+ */
2676
+ content?: string;
2677
+ platformSpecificData?: LinkedInConfigurations;
2678
+ } | {
2679
+ platform: 'bluesky';
2680
+ /**
2681
+ * Integration._id — find yours via GET /connect/integrations
2682
+ */
2683
+ accountId: string;
2684
+ /**
2685
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2686
+ */
2687
+ content?: string;
2688
+ platformSpecificData?: BlueskyConfigurations;
2689
+ } | {
2690
+ platform: 'facebook';
2691
+ /**
2692
+ * Integration._id — find yours via GET /connect/integrations
2693
+ */
2694
+ accountId: string;
2695
+ /**
2696
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2697
+ */
2698
+ content?: string;
2699
+ platformSpecificData?: FacebookConfigurations;
2700
+ } | {
2701
+ platform: 'threads';
2702
+ /**
2703
+ * Integration._id — find yours via GET /connect/integrations
2704
+ */
2705
+ accountId: string;
2706
+ /**
2707
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2708
+ */
2709
+ content?: string;
2710
+ platformSpecificData?: ThreadsConfigurations;
2711
+ } | {
2712
+ platform: 'googlebusiness';
2713
+ /**
2714
+ * Integration._id — find yours via GET /connect/integrations
2715
+ */
2716
+ accountId: string;
2717
+ /**
2718
+ * Optional per-platform text override. Use when you want to change the text for this platform because different platforms talk differently. When omitted, the top-level `content` is used.
2719
+ */
2720
+ content?: string;
2721
+ platformSpecificData?: GoogleBusinessConfigurations;
2722
+ }>;
2723
+ /**
2724
+ * New ISO 8601 datetime. Omit to keep the current scheduled time.
2725
+ */
2726
+ scheduledFor?: string;
2727
+ /**
2728
+ * IANA timezone for the scheduled time. Omit to keep the current one.
2729
+ */
2730
+ timezone?: string;
2731
+ };
2732
+ path: {
2733
+ postId: string;
2734
+ };
2735
+ query?: never;
2736
+ url: '/v1/posts/scheduled/{postId}';
2737
+ };
2738
+ type PutV1PostsScheduledByPostIdErrors = {
2739
+ /**
2740
+ * Default Response
2741
+ */
2742
+ 400: {
2743
+ success: boolean;
2744
+ message: string;
2745
+ };
2746
+ /**
2747
+ * Default Response
2748
+ */
2749
+ 402: {
2750
+ success: boolean;
2751
+ message: string;
2752
+ };
2753
+ /**
2754
+ * Default Response
2755
+ */
2756
+ 403: {
2757
+ success: boolean;
2758
+ message: string;
2759
+ };
2760
+ /**
2761
+ * Default Response
2762
+ */
2763
+ 404: {
2764
+ success: boolean;
2765
+ message: string;
2766
+ };
2767
+ /**
2768
+ * Default Response
2769
+ */
2770
+ 409: {
2771
+ success: boolean;
2772
+ message: string;
2773
+ };
2774
+ /**
2775
+ * Default Response
2776
+ */
2777
+ 503: {
2778
+ success: boolean;
2779
+ message: string;
2780
+ };
2781
+ };
2782
+ type PutV1PostsScheduledByPostIdError = PutV1PostsScheduledByPostIdErrors[keyof PutV1PostsScheduledByPostIdErrors];
2783
+ type PutV1PostsScheduledByPostIdResponses = {
2784
+ /**
2785
+ * Default Response
2786
+ */
2787
+ 200: {
2788
+ success: boolean;
2789
+ message: string;
2790
+ postId: string;
2791
+ scheduledFor: string;
2792
+ };
2793
+ };
2794
+ type PutV1PostsScheduledByPostIdResponse = PutV1PostsScheduledByPostIdResponses[keyof PutV1PostsScheduledByPostIdResponses];
2565
2795
  type PostV1MediaUploadData = {
2566
2796
  body: {
2567
2797
  filename: string;
@@ -3303,6 +3533,12 @@ declare class Scheduled extends HeyApiClient {
3303
3533
  * Reschedule a post to a new time
3304
3534
  */
3305
3535
  reschedule<ThrowOnError extends boolean = false>(options: Options<PatchV1PostsScheduledByPostIdData, ThrowOnError>): RequestResult<PatchV1PostsScheduledByPostIdResponses, PatchV1PostsScheduledByPostIdErrors, ThrowOnError>;
3536
+ /**
3537
+ * Edit a scheduled post (content, media, platforms, time)
3538
+ *
3539
+ * Replaces the editable fields of a scheduled post: text content, media attachments, target platforms + platform-specific data, and optionally the scheduled time/timezone. Re-validates each platform and reconciles the credit difference. Only works while the post is still scheduled.
3540
+ */
3541
+ edit<ThrowOnError extends boolean = false>(options: Options<PutV1PostsScheduledByPostIdData, ThrowOnError>): RequestResult<PutV1PostsScheduledByPostIdResponses, PutV1PostsScheduledByPostIdErrors, ThrowOnError>;
3306
3542
  }
3307
3543
  declare class Posts extends HeyApiClient {
3308
3544
  /**
@@ -3479,6 +3715,6 @@ declare class APIUserAbortError extends APIConnectionError {
3479
3715
  constructor(options?: ErrorOptions);
3480
3716
  }
3481
3717
 
3482
- declare const VERSION = "0.8.1";
3718
+ declare const VERSION = "0.8.2";
3483
3719
 
3484
- export { APIConnectionError, APIConnectionTimeoutError, APIError, APIUserAbortError, AuthenticationError, BadRequestError, type BlueskyConfigurations, type ClientOptions, ConflictError, type DeleteV1AppsByIdData, type DeleteV1AppsByIdError, type DeleteV1AppsByIdErrors, type DeleteV1AppsByIdResponse, type DeleteV1AppsByIdResponses, type DeleteV1ConnectIntegrationsByIdData, type DeleteV1ConnectIntegrationsByIdError, type DeleteV1ConnectIntegrationsByIdErrors, type DeleteV1ConnectIntegrationsByIdResponse, type DeleteV1ConnectIntegrationsByIdResponses, type DeleteV1NotificationsByIdData, type DeleteV1NotificationsByIdError, type DeleteV1NotificationsByIdErrors, type DeleteV1NotificationsByIdResponse, type DeleteV1NotificationsByIdResponses, type DeleteV1PostsByPostIdData, type DeleteV1PostsByPostIdError, type DeleteV1PostsByPostIdErrors, type DeleteV1PostsByPostIdResponse, type DeleteV1PostsByPostIdResponses, type DeleteV1PostsScheduledByPostIdData, type DeleteV1PostsScheduledByPostIdError, type DeleteV1PostsScheduledByPostIdErrors, type DeleteV1PostsScheduledByPostIdResponse, type DeleteV1PostsScheduledByPostIdResponses, type DeleteV1ProfilesByIdData, type DeleteV1ProfilesByIdError, type DeleteV1ProfilesByIdErrors, type DeleteV1ProfilesByIdResponse, type DeleteV1ProfilesByIdResponses, type ErrorResponse, type FacebookConfigurations, type GetV1AnalyticsData, type GetV1AnalyticsError, type GetV1AnalyticsErrors, type GetV1AnalyticsResponse, type GetV1AnalyticsResponses, type GetV1AppsByIdData, type GetV1AppsByIdError, type GetV1AppsByIdErrors, type GetV1AppsByIdResponse, type GetV1AppsByIdResponses, type GetV1AppsData, type GetV1AppsResponse, type GetV1AppsResponses, type GetV1ConnectByPlatformData, type GetV1ConnectByPlatformError, type GetV1ConnectByPlatformErrors, type GetV1ConnectByPlatformResponse, type GetV1ConnectByPlatformResponses, type GetV1ConnectIntegrationsData, type GetV1ConnectIntegrationsResponse, type GetV1ConnectIntegrationsResponses, type GetV1ConnectLinkedinSelectionByTokenData, type GetV1ConnectLinkedinSelectionByTokenError, type GetV1ConnectLinkedinSelectionByTokenErrors, type GetV1ConnectLinkedinSelectionByTokenResponse, type GetV1ConnectLinkedinSelectionByTokenResponses, type GetV1HealthAuthData, type GetV1HealthAuthResponse, type GetV1HealthAuthResponses, type GetV1HealthData, type GetV1HealthResponse, type GetV1HealthResponses, type GetV1NotificationsByIdData, type GetV1NotificationsByIdError, type GetV1NotificationsByIdErrors, type GetV1NotificationsByIdResponse, type GetV1NotificationsByIdResponses, type GetV1NotificationsData, type GetV1NotificationsResponse, type GetV1NotificationsResponses, type GetV1PinterestBoardsData, type GetV1PinterestBoardsError, type GetV1PinterestBoardsErrors, type GetV1PinterestBoardsResponse, type GetV1PinterestBoardsResponses, type GetV1PlatformsData, type GetV1PlatformsResponse, type GetV1PlatformsResponses, type GetV1PostsByPostIdData, type GetV1PostsByPostIdError, type GetV1PostsByPostIdErrors, type GetV1PostsByPostIdResponse, type GetV1PostsByPostIdResponses, type GetV1PostsData, type GetV1PostsError, type GetV1PostsErrors, type GetV1PostsResponse, type GetV1PostsResponses, type GetV1PostsScheduledData, type GetV1PostsScheduledResponse, type GetV1PostsScheduledResponses, type GetV1ProfilesByIdData, type GetV1ProfilesByIdError, type GetV1ProfilesByIdErrors, type GetV1ProfilesByIdResponse, type GetV1ProfilesByIdResponses, type GetV1ProfilesData, type GetV1ProfilesResponse, type GetV1ProfilesResponses, type GetV1TiktokCreatorInfoData, type GetV1TiktokCreatorInfoError, type GetV1TiktokCreatorInfoErrors, type GetV1TiktokCreatorInfoResponse, type GetV1TiktokCreatorInfoResponses, type GetV1UsageData, type GetV1UsageError, type GetV1UsageErrors, type GetV1UsageResponse, type GetV1UsageResponses, type GoogleBusinessConfigurations, type InstagramConfigurations, InternalServerError, type LinkedInConfigurations, NotFoundError, type PatchV1AppsByIdData, type PatchV1AppsByIdError, type PatchV1AppsByIdErrors, type PatchV1AppsByIdResponse, type PatchV1AppsByIdResponses, type PatchV1NotificationsByIdData, type PatchV1NotificationsByIdError, type PatchV1NotificationsByIdErrors, type PatchV1NotificationsByIdResponse, type PatchV1NotificationsByIdResponses, type PatchV1PostsScheduledByPostIdData, type PatchV1PostsScheduledByPostIdError, type PatchV1PostsScheduledByPostIdErrors, type PatchV1PostsScheduledByPostIdResponse, type PatchV1PostsScheduledByPostIdResponses, type PatchV1ProfilesByIdData, type PatchV1ProfilesByIdError, type PatchV1ProfilesByIdErrors, type PatchV1ProfilesByIdResponse, type PatchV1ProfilesByIdResponses, PermissionDeniedError, type PinterestConfigurations, type Platform, type PostPayload, PostPeer, PostPeerError, type PostV1AiImageData, type PostV1AiImageError, type PostV1AiImageErrors, type PostV1AiImageResponse, type PostV1AiImageResponses, type PostV1AiWriteData, type PostV1AiWriteError, type PostV1AiWriteErrors, type PostV1AiWriteResponse, type PostV1AiWriteResponses, type PostV1AppsData, type PostV1AppsError, type PostV1AppsErrors, type PostV1AppsResponse, type PostV1AppsResponses, type PostV1ConnectBlueskyAuthData, type PostV1ConnectBlueskyAuthError, type PostV1ConnectBlueskyAuthErrors, type PostV1ConnectLinkedinSelectionByTokenData, type PostV1ConnectLinkedinSelectionByTokenError, type PostV1ConnectLinkedinSelectionByTokenErrors, type PostV1ConnectLinkedinSelectionByTokenResponse, type PostV1ConnectLinkedinSelectionByTokenResponses, type PostV1MediaUploadData, type PostV1MediaUploadError, type PostV1MediaUploadErrors, type PostV1MediaUploadResponse, type PostV1MediaUploadResponses, type PostV1NotificationsData, type PostV1NotificationsError, type PostV1NotificationsErrors, type PostV1NotificationsResponse, type PostV1NotificationsResponses, type PostV1NotificationsTestData, type PostV1NotificationsTestError, type PostV1NotificationsTestErrors, type PostV1NotificationsTestResponse, type PostV1NotificationsTestResponses, type PostV1PostsData, type PostV1PostsError, type PostV1PostsErrors, type PostV1PostsResponse, type PostV1PostsResponses, type PostV1ProfilesData, type PostV1ProfilesResponse, type PostV1ProfilesResponses, RateLimitError, type SortOrder, type Status, type ThreadsConfigurations, type TikTokConfigurations, type TwitterConfigurations, UnprocessableEntityError, VERSION, type YouTubeConfigurations, PostPeer as default };
3720
+ export { APIConnectionError, APIConnectionTimeoutError, APIError, APIUserAbortError, AuthenticationError, BadRequestError, type BlueskyConfigurations, type ClientOptions, ConflictError, type DeleteV1AppsByIdData, type DeleteV1AppsByIdError, type DeleteV1AppsByIdErrors, type DeleteV1AppsByIdResponse, type DeleteV1AppsByIdResponses, type DeleteV1ConnectIntegrationsByIdData, type DeleteV1ConnectIntegrationsByIdError, type DeleteV1ConnectIntegrationsByIdErrors, type DeleteV1ConnectIntegrationsByIdResponse, type DeleteV1ConnectIntegrationsByIdResponses, type DeleteV1NotificationsByIdData, type DeleteV1NotificationsByIdError, type DeleteV1NotificationsByIdErrors, type DeleteV1NotificationsByIdResponse, type DeleteV1NotificationsByIdResponses, type DeleteV1PostsByPostIdData, type DeleteV1PostsByPostIdError, type DeleteV1PostsByPostIdErrors, type DeleteV1PostsByPostIdResponse, type DeleteV1PostsByPostIdResponses, type DeleteV1PostsScheduledByPostIdData, type DeleteV1PostsScheduledByPostIdError, type DeleteV1PostsScheduledByPostIdErrors, type DeleteV1PostsScheduledByPostIdResponse, type DeleteV1PostsScheduledByPostIdResponses, type DeleteV1ProfilesByIdData, type DeleteV1ProfilesByIdError, type DeleteV1ProfilesByIdErrors, type DeleteV1ProfilesByIdResponse, type DeleteV1ProfilesByIdResponses, type ErrorResponse, type FacebookConfigurations, type GetV1AnalyticsData, type GetV1AnalyticsError, type GetV1AnalyticsErrors, type GetV1AnalyticsResponse, type GetV1AnalyticsResponses, type GetV1AppsByIdData, type GetV1AppsByIdError, type GetV1AppsByIdErrors, type GetV1AppsByIdResponse, type GetV1AppsByIdResponses, type GetV1AppsData, type GetV1AppsResponse, type GetV1AppsResponses, type GetV1ConnectByPlatformData, type GetV1ConnectByPlatformError, type GetV1ConnectByPlatformErrors, type GetV1ConnectByPlatformResponse, type GetV1ConnectByPlatformResponses, type GetV1ConnectIntegrationsData, type GetV1ConnectIntegrationsResponse, type GetV1ConnectIntegrationsResponses, type GetV1ConnectLinkedinSelectionByTokenData, type GetV1ConnectLinkedinSelectionByTokenError, type GetV1ConnectLinkedinSelectionByTokenErrors, type GetV1ConnectLinkedinSelectionByTokenResponse, type GetV1ConnectLinkedinSelectionByTokenResponses, type GetV1HealthAuthData, type GetV1HealthAuthResponse, type GetV1HealthAuthResponses, type GetV1HealthData, type GetV1HealthResponse, type GetV1HealthResponses, type GetV1NotificationsByIdData, type GetV1NotificationsByIdError, type GetV1NotificationsByIdErrors, type GetV1NotificationsByIdResponse, type GetV1NotificationsByIdResponses, type GetV1NotificationsData, type GetV1NotificationsResponse, type GetV1NotificationsResponses, type GetV1PinterestBoardsData, type GetV1PinterestBoardsError, type GetV1PinterestBoardsErrors, type GetV1PinterestBoardsResponse, type GetV1PinterestBoardsResponses, type GetV1PlatformsData, type GetV1PlatformsResponse, type GetV1PlatformsResponses, type GetV1PostsByPostIdData, type GetV1PostsByPostIdError, type GetV1PostsByPostIdErrors, type GetV1PostsByPostIdResponse, type GetV1PostsByPostIdResponses, type GetV1PostsData, type GetV1PostsError, type GetV1PostsErrors, type GetV1PostsResponse, type GetV1PostsResponses, type GetV1PostsScheduledData, type GetV1PostsScheduledResponse, type GetV1PostsScheduledResponses, type GetV1ProfilesByIdData, type GetV1ProfilesByIdError, type GetV1ProfilesByIdErrors, type GetV1ProfilesByIdResponse, type GetV1ProfilesByIdResponses, type GetV1ProfilesData, type GetV1ProfilesResponse, type GetV1ProfilesResponses, type GetV1TiktokCreatorInfoData, type GetV1TiktokCreatorInfoError, type GetV1TiktokCreatorInfoErrors, type GetV1TiktokCreatorInfoResponse, type GetV1TiktokCreatorInfoResponses, type GetV1UsageData, type GetV1UsageError, type GetV1UsageErrors, type GetV1UsageResponse, type GetV1UsageResponses, type GoogleBusinessConfigurations, type InstagramConfigurations, InternalServerError, type LinkedInConfigurations, type LinkedInMention, NotFoundError, type PatchV1AppsByIdData, type PatchV1AppsByIdError, type PatchV1AppsByIdErrors, type PatchV1AppsByIdResponse, type PatchV1AppsByIdResponses, type PatchV1NotificationsByIdData, type PatchV1NotificationsByIdError, type PatchV1NotificationsByIdErrors, type PatchV1NotificationsByIdResponse, type PatchV1NotificationsByIdResponses, type PatchV1PostsScheduledByPostIdData, type PatchV1PostsScheduledByPostIdError, type PatchV1PostsScheduledByPostIdErrors, type PatchV1PostsScheduledByPostIdResponse, type PatchV1PostsScheduledByPostIdResponses, type PatchV1ProfilesByIdData, type PatchV1ProfilesByIdError, type PatchV1ProfilesByIdErrors, type PatchV1ProfilesByIdResponse, type PatchV1ProfilesByIdResponses, PermissionDeniedError, type PinterestConfigurations, type Platform, type PostPayload, PostPeer, PostPeerError, type PostV1AiImageData, type PostV1AiImageError, type PostV1AiImageErrors, type PostV1AiImageResponse, type PostV1AiImageResponses, type PostV1AiWriteData, type PostV1AiWriteError, type PostV1AiWriteErrors, type PostV1AiWriteResponse, type PostV1AiWriteResponses, type PostV1AppsData, type PostV1AppsError, type PostV1AppsErrors, type PostV1AppsResponse, type PostV1AppsResponses, type PostV1ConnectBlueskyAuthData, type PostV1ConnectBlueskyAuthError, type PostV1ConnectBlueskyAuthErrors, type PostV1ConnectLinkedinSelectionByTokenData, type PostV1ConnectLinkedinSelectionByTokenError, type PostV1ConnectLinkedinSelectionByTokenErrors, type PostV1ConnectLinkedinSelectionByTokenResponse, type PostV1ConnectLinkedinSelectionByTokenResponses, type PostV1MediaUploadData, type PostV1MediaUploadError, type PostV1MediaUploadErrors, type PostV1MediaUploadResponse, type PostV1MediaUploadResponses, type PostV1NotificationsData, type PostV1NotificationsError, type PostV1NotificationsErrors, type PostV1NotificationsResponse, type PostV1NotificationsResponses, type PostV1NotificationsTestData, type PostV1NotificationsTestError, type PostV1NotificationsTestErrors, type PostV1NotificationsTestResponse, type PostV1NotificationsTestResponses, type PostV1PostsData, type PostV1PostsError, type PostV1PostsErrors, type PostV1PostsResponse, type PostV1PostsResponses, type PostV1ProfilesData, type PostV1ProfilesResponse, type PostV1ProfilesResponses, type PutV1PostsScheduledByPostIdData, type PutV1PostsScheduledByPostIdError, type PutV1PostsScheduledByPostIdErrors, type PutV1PostsScheduledByPostIdResponse, type PutV1PostsScheduledByPostIdResponses, RateLimitError, type SortOrder, type Status, type ThreadsConfigurations, type TikTokConfigurations, type TwitterConfigurations, UnprocessableEntityError, VERSION, type YouTubeConfigurations, PostPeer as default };
package/dist/index.js CHANGED
@@ -1196,6 +1196,22 @@ var Scheduled = class extends HeyApiClient {
1196
1196
  }
1197
1197
  });
1198
1198
  }
1199
+ /**
1200
+ * Edit a scheduled post (content, media, platforms, time)
1201
+ *
1202
+ * Replaces the editable fields of a scheduled post: text content, media attachments, target platforms + platform-specific data, and optionally the scheduled time/timezone. Re-validates each platform and reconciles the credit difference. Only works while the post is still scheduled.
1203
+ */
1204
+ edit(options) {
1205
+ return (options.client ?? this.client).put({
1206
+ security: [{ name: "x-access-key", type: "apiKey" }],
1207
+ url: "/v1/posts/scheduled/{postId}",
1208
+ ...options,
1209
+ headers: {
1210
+ "Content-Type": "application/json",
1211
+ ...options.headers
1212
+ }
1213
+ });
1214
+ }
1199
1215
  };
1200
1216
  var Posts = class extends HeyApiClient {
1201
1217
  static {
@@ -1576,7 +1592,7 @@ var createAPIError = /* @__PURE__ */ __name((response, body) => {
1576
1592
  }, "createAPIError");
1577
1593
 
1578
1594
  // src/version.ts
1579
- var VERSION = "0.8.1";
1595
+ var VERSION = "0.8.2";
1580
1596
 
1581
1597
  // src/client.ts
1582
1598
  var DEFAULT_BASE_URL = "https://api.postpeer.dev";