@postpeer/node 0.8.4 → 0.8.5
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/CHANGELOG.md +5 -0
- package/dist/index.cjs +95 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +519 -2
- package/dist/index.d.ts +519 -2
- package/dist/index.js +95 -1
- package/dist/index.js.map +1 -1
- package/package.json +16 -14
package/dist/index.d.ts
CHANGED
|
@@ -3395,6 +3395,483 @@ type GetV1AnalyticsResponses = {
|
|
|
3395
3395
|
};
|
|
3396
3396
|
};
|
|
3397
3397
|
type GetV1AnalyticsResponse = GetV1AnalyticsResponses[keyof GetV1AnalyticsResponses];
|
|
3398
|
+
type GetV1CommentsData = {
|
|
3399
|
+
body?: never;
|
|
3400
|
+
path?: never;
|
|
3401
|
+
query: {
|
|
3402
|
+
/**
|
|
3403
|
+
* Platform to fetch comments from.
|
|
3404
|
+
*/
|
|
3405
|
+
platform: 'facebook' | 'instagram' | 'threads';
|
|
3406
|
+
/**
|
|
3407
|
+
* Integration ID of the connected account.
|
|
3408
|
+
*/
|
|
3409
|
+
accountId: string;
|
|
3410
|
+
/**
|
|
3411
|
+
* Platform post ID to fetch comments for.
|
|
3412
|
+
*/
|
|
3413
|
+
postId: string;
|
|
3414
|
+
/**
|
|
3415
|
+
* Max comments to return.
|
|
3416
|
+
*/
|
|
3417
|
+
limit?: number;
|
|
3418
|
+
/**
|
|
3419
|
+
* Pagination cursor from a previous response.
|
|
3420
|
+
*/
|
|
3421
|
+
after?: string;
|
|
3422
|
+
};
|
|
3423
|
+
url: '/v1/comments/';
|
|
3424
|
+
};
|
|
3425
|
+
type GetV1CommentsErrors = {
|
|
3426
|
+
/**
|
|
3427
|
+
* Default Response
|
|
3428
|
+
*/
|
|
3429
|
+
400: {
|
|
3430
|
+
success: boolean;
|
|
3431
|
+
message: string;
|
|
3432
|
+
};
|
|
3433
|
+
/**
|
|
3434
|
+
* Default Response
|
|
3435
|
+
*/
|
|
3436
|
+
404: {
|
|
3437
|
+
success: boolean;
|
|
3438
|
+
message: string;
|
|
3439
|
+
};
|
|
3440
|
+
/**
|
|
3441
|
+
* Default Response
|
|
3442
|
+
*/
|
|
3443
|
+
502: {
|
|
3444
|
+
success: boolean;
|
|
3445
|
+
message: string;
|
|
3446
|
+
};
|
|
3447
|
+
};
|
|
3448
|
+
type GetV1CommentsError = GetV1CommentsErrors[keyof GetV1CommentsErrors];
|
|
3449
|
+
type GetV1CommentsResponses = {
|
|
3450
|
+
/**
|
|
3451
|
+
* Default Response
|
|
3452
|
+
*/
|
|
3453
|
+
200: {
|
|
3454
|
+
success: boolean;
|
|
3455
|
+
comments: Array<{
|
|
3456
|
+
/**
|
|
3457
|
+
* Platform comment ID
|
|
3458
|
+
*/
|
|
3459
|
+
id: string;
|
|
3460
|
+
text: string | null;
|
|
3461
|
+
author: {
|
|
3462
|
+
id: string | null;
|
|
3463
|
+
name: string | null;
|
|
3464
|
+
};
|
|
3465
|
+
timestamp: string | null;
|
|
3466
|
+
likeCount: number | null;
|
|
3467
|
+
hidden: boolean | null;
|
|
3468
|
+
replies?: Array<{
|
|
3469
|
+
id: string;
|
|
3470
|
+
text: string | null;
|
|
3471
|
+
author: {
|
|
3472
|
+
id: string | null;
|
|
3473
|
+
name: string | null;
|
|
3474
|
+
};
|
|
3475
|
+
timestamp: string | null;
|
|
3476
|
+
likeCount: number | null;
|
|
3477
|
+
}>;
|
|
3478
|
+
}>;
|
|
3479
|
+
/**
|
|
3480
|
+
* Pass as `after` in the next request to paginate.
|
|
3481
|
+
*/
|
|
3482
|
+
nextCursor: string | null;
|
|
3483
|
+
};
|
|
3484
|
+
};
|
|
3485
|
+
type GetV1CommentsResponse = GetV1CommentsResponses[keyof GetV1CommentsResponses];
|
|
3486
|
+
type PostV1CommentsData = {
|
|
3487
|
+
body: {
|
|
3488
|
+
/**
|
|
3489
|
+
* Platform to post the comment on.
|
|
3490
|
+
*/
|
|
3491
|
+
platform: 'facebook' | 'instagram' | 'threads';
|
|
3492
|
+
/**
|
|
3493
|
+
* Integration ID.
|
|
3494
|
+
*/
|
|
3495
|
+
accountId: string;
|
|
3496
|
+
/**
|
|
3497
|
+
* Platform post/media ID. Provide this to create a top-level comment on Instagram or Facebook, or a top-level post on Threads.
|
|
3498
|
+
*/
|
|
3499
|
+
postId?: string;
|
|
3500
|
+
/**
|
|
3501
|
+
* Platform comment ID to reply to. Provide this to reply to an existing comment.
|
|
3502
|
+
*/
|
|
3503
|
+
commentId?: string;
|
|
3504
|
+
/**
|
|
3505
|
+
* Comment text.
|
|
3506
|
+
*/
|
|
3507
|
+
text: string;
|
|
3508
|
+
};
|
|
3509
|
+
path?: never;
|
|
3510
|
+
query?: never;
|
|
3511
|
+
url: '/v1/comments/';
|
|
3512
|
+
};
|
|
3513
|
+
type PostV1CommentsErrors = {
|
|
3514
|
+
/**
|
|
3515
|
+
* Default Response
|
|
3516
|
+
*/
|
|
3517
|
+
400: {
|
|
3518
|
+
success: boolean;
|
|
3519
|
+
message: string;
|
|
3520
|
+
};
|
|
3521
|
+
/**
|
|
3522
|
+
* Default Response
|
|
3523
|
+
*/
|
|
3524
|
+
404: {
|
|
3525
|
+
success: boolean;
|
|
3526
|
+
message: string;
|
|
3527
|
+
};
|
|
3528
|
+
/**
|
|
3529
|
+
* Default Response
|
|
3530
|
+
*/
|
|
3531
|
+
502: {
|
|
3532
|
+
success: boolean;
|
|
3533
|
+
message: string;
|
|
3534
|
+
};
|
|
3535
|
+
};
|
|
3536
|
+
type PostV1CommentsError = PostV1CommentsErrors[keyof PostV1CommentsErrors];
|
|
3537
|
+
type PostV1CommentsResponses = {
|
|
3538
|
+
/**
|
|
3539
|
+
* Default Response
|
|
3540
|
+
*/
|
|
3541
|
+
200: {
|
|
3542
|
+
success: boolean;
|
|
3543
|
+
/**
|
|
3544
|
+
* ID of the created comment or reply.
|
|
3545
|
+
*/
|
|
3546
|
+
commentId: string;
|
|
3547
|
+
};
|
|
3548
|
+
};
|
|
3549
|
+
type PostV1CommentsResponse = PostV1CommentsResponses[keyof PostV1CommentsResponses];
|
|
3550
|
+
type DeleteV1CommentsByCommentIdData = {
|
|
3551
|
+
body?: never;
|
|
3552
|
+
path: {
|
|
3553
|
+
/**
|
|
3554
|
+
* Platform comment ID to delete.
|
|
3555
|
+
*/
|
|
3556
|
+
commentId: string;
|
|
3557
|
+
};
|
|
3558
|
+
query: {
|
|
3559
|
+
platform: 'facebook' | 'instagram' | 'threads';
|
|
3560
|
+
/**
|
|
3561
|
+
* Integration ID.
|
|
3562
|
+
*/
|
|
3563
|
+
accountId: string;
|
|
3564
|
+
};
|
|
3565
|
+
url: '/v1/comments/{commentId}';
|
|
3566
|
+
};
|
|
3567
|
+
type DeleteV1CommentsByCommentIdErrors = {
|
|
3568
|
+
/**
|
|
3569
|
+
* Default Response
|
|
3570
|
+
*/
|
|
3571
|
+
400: {
|
|
3572
|
+
success: boolean;
|
|
3573
|
+
message: string;
|
|
3574
|
+
};
|
|
3575
|
+
/**
|
|
3576
|
+
* Default Response
|
|
3577
|
+
*/
|
|
3578
|
+
404: {
|
|
3579
|
+
success: boolean;
|
|
3580
|
+
message: string;
|
|
3581
|
+
};
|
|
3582
|
+
/**
|
|
3583
|
+
* Default Response
|
|
3584
|
+
*/
|
|
3585
|
+
502: {
|
|
3586
|
+
success: boolean;
|
|
3587
|
+
message: string;
|
|
3588
|
+
};
|
|
3589
|
+
};
|
|
3590
|
+
type DeleteV1CommentsByCommentIdError = DeleteV1CommentsByCommentIdErrors[keyof DeleteV1CommentsByCommentIdErrors];
|
|
3591
|
+
type DeleteV1CommentsByCommentIdResponses = {
|
|
3592
|
+
/**
|
|
3593
|
+
* Default Response
|
|
3594
|
+
*/
|
|
3595
|
+
200: {
|
|
3596
|
+
success: boolean;
|
|
3597
|
+
};
|
|
3598
|
+
};
|
|
3599
|
+
type DeleteV1CommentsByCommentIdResponse = DeleteV1CommentsByCommentIdResponses[keyof DeleteV1CommentsByCommentIdResponses];
|
|
3600
|
+
type PatchV1CommentsByCommentIdData = {
|
|
3601
|
+
body: {
|
|
3602
|
+
platform: 'facebook' | 'instagram' | 'threads';
|
|
3603
|
+
/**
|
|
3604
|
+
* Integration ID.
|
|
3605
|
+
*/
|
|
3606
|
+
accountId: string;
|
|
3607
|
+
/**
|
|
3608
|
+
* true to hide, false to unhide.
|
|
3609
|
+
*/
|
|
3610
|
+
hidden: boolean;
|
|
3611
|
+
};
|
|
3612
|
+
path: {
|
|
3613
|
+
/**
|
|
3614
|
+
* Platform comment ID to delete.
|
|
3615
|
+
*/
|
|
3616
|
+
commentId: string;
|
|
3617
|
+
};
|
|
3618
|
+
query?: never;
|
|
3619
|
+
url: '/v1/comments/{commentId}';
|
|
3620
|
+
};
|
|
3621
|
+
type PatchV1CommentsByCommentIdErrors = {
|
|
3622
|
+
/**
|
|
3623
|
+
* Default Response
|
|
3624
|
+
*/
|
|
3625
|
+
400: {
|
|
3626
|
+
success: boolean;
|
|
3627
|
+
message: string;
|
|
3628
|
+
};
|
|
3629
|
+
/**
|
|
3630
|
+
* Default Response
|
|
3631
|
+
*/
|
|
3632
|
+
404: {
|
|
3633
|
+
success: boolean;
|
|
3634
|
+
message: string;
|
|
3635
|
+
};
|
|
3636
|
+
/**
|
|
3637
|
+
* Default Response
|
|
3638
|
+
*/
|
|
3639
|
+
502: {
|
|
3640
|
+
success: boolean;
|
|
3641
|
+
message: string;
|
|
3642
|
+
};
|
|
3643
|
+
};
|
|
3644
|
+
type PatchV1CommentsByCommentIdError = PatchV1CommentsByCommentIdErrors[keyof PatchV1CommentsByCommentIdErrors];
|
|
3645
|
+
type PatchV1CommentsByCommentIdResponses = {
|
|
3646
|
+
/**
|
|
3647
|
+
* Default Response
|
|
3648
|
+
*/
|
|
3649
|
+
200: {
|
|
3650
|
+
success: boolean;
|
|
3651
|
+
};
|
|
3652
|
+
};
|
|
3653
|
+
type PatchV1CommentsByCommentIdResponse = PatchV1CommentsByCommentIdResponses[keyof PatchV1CommentsByCommentIdResponses];
|
|
3654
|
+
type GetV1MessagesData = {
|
|
3655
|
+
body?: never;
|
|
3656
|
+
path?: never;
|
|
3657
|
+
query: {
|
|
3658
|
+
/**
|
|
3659
|
+
* Platform to fetch conversations from.
|
|
3660
|
+
*/
|
|
3661
|
+
platform: 'instagram';
|
|
3662
|
+
/**
|
|
3663
|
+
* Integration ID of the connected account.
|
|
3664
|
+
*/
|
|
3665
|
+
accountId: string;
|
|
3666
|
+
/**
|
|
3667
|
+
* Max conversations to return.
|
|
3668
|
+
*/
|
|
3669
|
+
limit?: number;
|
|
3670
|
+
/**
|
|
3671
|
+
* Pagination cursor from a previous response.
|
|
3672
|
+
*/
|
|
3673
|
+
after?: string;
|
|
3674
|
+
};
|
|
3675
|
+
url: '/v1/messages/';
|
|
3676
|
+
};
|
|
3677
|
+
type GetV1MessagesErrors = {
|
|
3678
|
+
/**
|
|
3679
|
+
* Default Response
|
|
3680
|
+
*/
|
|
3681
|
+
400: {
|
|
3682
|
+
success: boolean;
|
|
3683
|
+
message: string;
|
|
3684
|
+
};
|
|
3685
|
+
/**
|
|
3686
|
+
* Default Response
|
|
3687
|
+
*/
|
|
3688
|
+
404: {
|
|
3689
|
+
success: boolean;
|
|
3690
|
+
message: string;
|
|
3691
|
+
};
|
|
3692
|
+
/**
|
|
3693
|
+
* Default Response
|
|
3694
|
+
*/
|
|
3695
|
+
502: {
|
|
3696
|
+
success: boolean;
|
|
3697
|
+
message: string;
|
|
3698
|
+
};
|
|
3699
|
+
};
|
|
3700
|
+
type GetV1MessagesError = GetV1MessagesErrors[keyof GetV1MessagesErrors];
|
|
3701
|
+
type GetV1MessagesResponses = {
|
|
3702
|
+
/**
|
|
3703
|
+
* Default Response
|
|
3704
|
+
*/
|
|
3705
|
+
200: {
|
|
3706
|
+
success: boolean;
|
|
3707
|
+
/**
|
|
3708
|
+
* Participant ID of the connected account in conversations.
|
|
3709
|
+
*/
|
|
3710
|
+
selfId: string;
|
|
3711
|
+
/**
|
|
3712
|
+
* Username of the connected account.
|
|
3713
|
+
*/
|
|
3714
|
+
selfUsername: string | null;
|
|
3715
|
+
conversations: Array<{
|
|
3716
|
+
/**
|
|
3717
|
+
* Platform conversation ID
|
|
3718
|
+
*/
|
|
3719
|
+
id: string;
|
|
3720
|
+
participants: Array<{
|
|
3721
|
+
id: string | null;
|
|
3722
|
+
name: string | null;
|
|
3723
|
+
username: string | null;
|
|
3724
|
+
/**
|
|
3725
|
+
* Temporary Instagram profile picture URL.
|
|
3726
|
+
*/
|
|
3727
|
+
profilePictureUrl: string | null;
|
|
3728
|
+
}>;
|
|
3729
|
+
/**
|
|
3730
|
+
* Most recent message in the conversation.
|
|
3731
|
+
*/
|
|
3732
|
+
lastMessage: {
|
|
3733
|
+
/**
|
|
3734
|
+
* Platform message ID
|
|
3735
|
+
*/
|
|
3736
|
+
id: string;
|
|
3737
|
+
text: string | null;
|
|
3738
|
+
from: {
|
|
3739
|
+
id: string | null;
|
|
3740
|
+
name: string | null;
|
|
3741
|
+
};
|
|
3742
|
+
timestamp: string | null;
|
|
3743
|
+
} | null;
|
|
3744
|
+
updatedTime: string | null;
|
|
3745
|
+
}>;
|
|
3746
|
+
/**
|
|
3747
|
+
* Pass as `after` in the next request to paginate.
|
|
3748
|
+
*/
|
|
3749
|
+
nextCursor: string | null;
|
|
3750
|
+
};
|
|
3751
|
+
};
|
|
3752
|
+
type GetV1MessagesResponse = GetV1MessagesResponses[keyof GetV1MessagesResponses];
|
|
3753
|
+
type PostV1MessagesData = {
|
|
3754
|
+
body: {
|
|
3755
|
+
platform: 'instagram';
|
|
3756
|
+
/**
|
|
3757
|
+
* Integration ID.
|
|
3758
|
+
*/
|
|
3759
|
+
accountId: string;
|
|
3760
|
+
/**
|
|
3761
|
+
* Platform ID of the recipient.
|
|
3762
|
+
*/
|
|
3763
|
+
recipientId: string;
|
|
3764
|
+
/**
|
|
3765
|
+
* Message text.
|
|
3766
|
+
*/
|
|
3767
|
+
text: string;
|
|
3768
|
+
};
|
|
3769
|
+
path?: never;
|
|
3770
|
+
query?: never;
|
|
3771
|
+
url: '/v1/messages/';
|
|
3772
|
+
};
|
|
3773
|
+
type PostV1MessagesErrors = {
|
|
3774
|
+
/**
|
|
3775
|
+
* Default Response
|
|
3776
|
+
*/
|
|
3777
|
+
400: {
|
|
3778
|
+
success: boolean;
|
|
3779
|
+
message: string;
|
|
3780
|
+
};
|
|
3781
|
+
/**
|
|
3782
|
+
* Default Response
|
|
3783
|
+
*/
|
|
3784
|
+
404: {
|
|
3785
|
+
success: boolean;
|
|
3786
|
+
message: string;
|
|
3787
|
+
};
|
|
3788
|
+
/**
|
|
3789
|
+
* Default Response
|
|
3790
|
+
*/
|
|
3791
|
+
502: {
|
|
3792
|
+
success: boolean;
|
|
3793
|
+
message: string;
|
|
3794
|
+
};
|
|
3795
|
+
};
|
|
3796
|
+
type PostV1MessagesError = PostV1MessagesErrors[keyof PostV1MessagesErrors];
|
|
3797
|
+
type PostV1MessagesResponses = {
|
|
3798
|
+
/**
|
|
3799
|
+
* Default Response
|
|
3800
|
+
*/
|
|
3801
|
+
200: {
|
|
3802
|
+
success: boolean;
|
|
3803
|
+
/**
|
|
3804
|
+
* ID of the sent message.
|
|
3805
|
+
*/
|
|
3806
|
+
messageId: string;
|
|
3807
|
+
};
|
|
3808
|
+
};
|
|
3809
|
+
type PostV1MessagesResponse = PostV1MessagesResponses[keyof PostV1MessagesResponses];
|
|
3810
|
+
type GetV1MessagesByConversationIdData = {
|
|
3811
|
+
body?: never;
|
|
3812
|
+
path: {
|
|
3813
|
+
/**
|
|
3814
|
+
* Platform conversation ID.
|
|
3815
|
+
*/
|
|
3816
|
+
conversationId: string;
|
|
3817
|
+
};
|
|
3818
|
+
query: {
|
|
3819
|
+
platform: 'instagram';
|
|
3820
|
+
/**
|
|
3821
|
+
* Integration ID.
|
|
3822
|
+
*/
|
|
3823
|
+
accountId: string;
|
|
3824
|
+
limit?: number;
|
|
3825
|
+
after?: string;
|
|
3826
|
+
};
|
|
3827
|
+
url: '/v1/messages/{conversationId}';
|
|
3828
|
+
};
|
|
3829
|
+
type GetV1MessagesByConversationIdErrors = {
|
|
3830
|
+
/**
|
|
3831
|
+
* Default Response
|
|
3832
|
+
*/
|
|
3833
|
+
400: {
|
|
3834
|
+
success: boolean;
|
|
3835
|
+
message: string;
|
|
3836
|
+
};
|
|
3837
|
+
/**
|
|
3838
|
+
* Default Response
|
|
3839
|
+
*/
|
|
3840
|
+
404: {
|
|
3841
|
+
success: boolean;
|
|
3842
|
+
message: string;
|
|
3843
|
+
};
|
|
3844
|
+
/**
|
|
3845
|
+
* Default Response
|
|
3846
|
+
*/
|
|
3847
|
+
502: {
|
|
3848
|
+
success: boolean;
|
|
3849
|
+
message: string;
|
|
3850
|
+
};
|
|
3851
|
+
};
|
|
3852
|
+
type GetV1MessagesByConversationIdError = GetV1MessagesByConversationIdErrors[keyof GetV1MessagesByConversationIdErrors];
|
|
3853
|
+
type GetV1MessagesByConversationIdResponses = {
|
|
3854
|
+
/**
|
|
3855
|
+
* Default Response
|
|
3856
|
+
*/
|
|
3857
|
+
200: {
|
|
3858
|
+
success: boolean;
|
|
3859
|
+
messages: Array<{
|
|
3860
|
+
/**
|
|
3861
|
+
* Platform message ID
|
|
3862
|
+
*/
|
|
3863
|
+
id: string;
|
|
3864
|
+
text: string | null;
|
|
3865
|
+
from: {
|
|
3866
|
+
id: string | null;
|
|
3867
|
+
name: string | null;
|
|
3868
|
+
};
|
|
3869
|
+
timestamp: string | null;
|
|
3870
|
+
}>;
|
|
3871
|
+
nextCursor: string | null;
|
|
3872
|
+
};
|
|
3873
|
+
};
|
|
3874
|
+
type GetV1MessagesByConversationIdResponse = GetV1MessagesByConversationIdResponses[keyof GetV1MessagesByConversationIdResponses];
|
|
3398
3875
|
type GetV1UsageData = {
|
|
3399
3876
|
body?: never;
|
|
3400
3877
|
path?: never;
|
|
@@ -4033,6 +4510,46 @@ declare class PostPeer$1 extends HeyApiClient {
|
|
|
4033
4510
|
* Reassigns an existing integration to another profile in the same project. Pass profileId=null to leave the integration unassigned. OAuth credentials and existing posts are unchanged.
|
|
4034
4511
|
*/
|
|
4035
4512
|
moveIntegration<ThrowOnError extends boolean = false>(options: Options<PatchV1ConnectIntegrationsByIdData, ThrowOnError>): RequestResult<PatchV1ConnectIntegrationsByIdResponses, PatchV1ConnectIntegrationsByIdErrors, ThrowOnError>;
|
|
4513
|
+
/**
|
|
4514
|
+
* List comments on a post
|
|
4515
|
+
*
|
|
4516
|
+
* Fetch comments (and first-level replies) on a post from a connected Facebook Page, Instagram Business account, or Threads account. Requires the account to have the relevant Meta permissions approved (pages_read_user_content for Facebook, instagram_business_manage_comments for Instagram, threads_manage_replies for Threads).
|
|
4517
|
+
*/
|
|
4518
|
+
listComments<ThrowOnError extends boolean = false>(options: Options<GetV1CommentsData, ThrowOnError>): RequestResult<GetV1CommentsResponses, GetV1CommentsErrors, ThrowOnError>;
|
|
4519
|
+
/**
|
|
4520
|
+
* Create a comment or reply
|
|
4521
|
+
*
|
|
4522
|
+
* Post a top-level comment on an Instagram or Facebook post, or a top-level post on Threads (provide `postId`), or reply to an existing comment on Facebook, Instagram, or Threads (provide `commentId`).
|
|
4523
|
+
*/
|
|
4524
|
+
createComment<ThrowOnError extends boolean = false>(options: Options<PostV1CommentsData, ThrowOnError>): RequestResult<PostV1CommentsResponses, PostV1CommentsErrors, ThrowOnError>;
|
|
4525
|
+
/**
|
|
4526
|
+
* Delete a comment
|
|
4527
|
+
*
|
|
4528
|
+
* Delete a comment on a Facebook Page post or Instagram Business post. Not supported on Threads (the API does not allow deleting others' replies).
|
|
4529
|
+
*/
|
|
4530
|
+
deleteComment<ThrowOnError extends boolean = false>(options: Options<DeleteV1CommentsByCommentIdData, ThrowOnError>): RequestResult<DeleteV1CommentsByCommentIdResponses, DeleteV1CommentsByCommentIdErrors, ThrowOnError>;
|
|
4531
|
+
/**
|
|
4532
|
+
* Hide or unhide a comment
|
|
4533
|
+
*
|
|
4534
|
+
* Hide or unhide a comment on an Instagram Business post. Pass `hidden: true` to hide, `hidden: false` to unhide. Instagram only.
|
|
4535
|
+
*/
|
|
4536
|
+
hideComment<ThrowOnError extends boolean = false>(options: Options<PatchV1CommentsByCommentIdData, ThrowOnError>): RequestResult<PatchV1CommentsByCommentIdResponses, PatchV1CommentsByCommentIdErrors, ThrowOnError>;
|
|
4537
|
+
/**
|
|
4538
|
+
* List conversations
|
|
4539
|
+
*
|
|
4540
|
+
* List DM conversations for a connected Instagram Business account. Requires instagram_business_manage_messages.
|
|
4541
|
+
*/
|
|
4542
|
+
listConversations<ThrowOnError extends boolean = false>(options: Options<GetV1MessagesData, ThrowOnError>): RequestResult<GetV1MessagesResponses, GetV1MessagesErrors, ThrowOnError>;
|
|
4543
|
+
/**
|
|
4544
|
+
* Send a message
|
|
4545
|
+
*
|
|
4546
|
+
* Send a DM reply on Instagram.
|
|
4547
|
+
*/
|
|
4548
|
+
sendMessage<ThrowOnError extends boolean = false>(options: Options<PostV1MessagesData, ThrowOnError>): RequestResult<PostV1MessagesResponses, PostV1MessagesErrors, ThrowOnError>;
|
|
4549
|
+
/**
|
|
4550
|
+
* Get messages in a conversation
|
|
4551
|
+
*/
|
|
4552
|
+
getConversationMessages<ThrowOnError extends boolean = false>(options: Options<GetV1MessagesByConversationIdData, ThrowOnError>): RequestResult<GetV1MessagesByConversationIdResponses, GetV1MessagesByConversationIdErrors, ThrowOnError>;
|
|
4036
4553
|
private _health?;
|
|
4037
4554
|
get health(): Health;
|
|
4038
4555
|
private _connect?;
|
|
@@ -4130,6 +4647,6 @@ declare class APIUserAbortError extends APIConnectionError {
|
|
|
4130
4647
|
constructor(options?: ErrorOptions);
|
|
4131
4648
|
}
|
|
4132
4649
|
|
|
4133
|
-
declare const VERSION = "0.8.
|
|
4650
|
+
declare const VERSION = "0.8.5";
|
|
4134
4651
|
|
|
4135
|
-
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 GetV1ConnectFacebookSelectionByTokenData, type GetV1ConnectFacebookSelectionByTokenError, type GetV1ConnectFacebookSelectionByTokenErrors, type GetV1ConnectFacebookSelectionByTokenResponse, type GetV1ConnectFacebookSelectionByTokenResponses, type GetV1ConnectIntegrationsByIdData, type GetV1ConnectIntegrationsByIdError, type GetV1ConnectIntegrationsByIdErrors, type GetV1ConnectIntegrationsByIdResponse, type GetV1ConnectIntegrationsByIdResponses, 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 PatchV1ConnectIntegrationsByIdData, type PatchV1ConnectIntegrationsByIdError, type PatchV1ConnectIntegrationsByIdErrors, type PatchV1ConnectIntegrationsByIdResponse, type PatchV1ConnectIntegrationsByIdResponses, 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 PostV1ConnectFacebookSelectionByTokenData, type PostV1ConnectFacebookSelectionByTokenError, type PostV1ConnectFacebookSelectionByTokenErrors, type PostV1ConnectFacebookSelectionByTokenResponse, type PostV1ConnectFacebookSelectionByTokenResponses, 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 };
|
|
4652
|
+
export { APIConnectionError, APIConnectionTimeoutError, APIError, APIUserAbortError, AuthenticationError, BadRequestError, type BlueskyConfigurations, type ClientOptions, ConflictError, type DeleteV1AppsByIdData, type DeleteV1AppsByIdError, type DeleteV1AppsByIdErrors, type DeleteV1AppsByIdResponse, type DeleteV1AppsByIdResponses, type DeleteV1CommentsByCommentIdData, type DeleteV1CommentsByCommentIdError, type DeleteV1CommentsByCommentIdErrors, type DeleteV1CommentsByCommentIdResponse, type DeleteV1CommentsByCommentIdResponses, 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 GetV1CommentsData, type GetV1CommentsError, type GetV1CommentsErrors, type GetV1CommentsResponse, type GetV1CommentsResponses, type GetV1ConnectByPlatformData, type GetV1ConnectByPlatformError, type GetV1ConnectByPlatformErrors, type GetV1ConnectByPlatformResponse, type GetV1ConnectByPlatformResponses, type GetV1ConnectFacebookSelectionByTokenData, type GetV1ConnectFacebookSelectionByTokenError, type GetV1ConnectFacebookSelectionByTokenErrors, type GetV1ConnectFacebookSelectionByTokenResponse, type GetV1ConnectFacebookSelectionByTokenResponses, type GetV1ConnectIntegrationsByIdData, type GetV1ConnectIntegrationsByIdError, type GetV1ConnectIntegrationsByIdErrors, type GetV1ConnectIntegrationsByIdResponse, type GetV1ConnectIntegrationsByIdResponses, 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 GetV1MessagesByConversationIdData, type GetV1MessagesByConversationIdError, type GetV1MessagesByConversationIdErrors, type GetV1MessagesByConversationIdResponse, type GetV1MessagesByConversationIdResponses, type GetV1MessagesData, type GetV1MessagesError, type GetV1MessagesErrors, type GetV1MessagesResponse, type GetV1MessagesResponses, 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 PatchV1CommentsByCommentIdData, type PatchV1CommentsByCommentIdError, type PatchV1CommentsByCommentIdErrors, type PatchV1CommentsByCommentIdResponse, type PatchV1CommentsByCommentIdResponses, type PatchV1ConnectIntegrationsByIdData, type PatchV1ConnectIntegrationsByIdError, type PatchV1ConnectIntegrationsByIdErrors, type PatchV1ConnectIntegrationsByIdResponse, type PatchV1ConnectIntegrationsByIdResponses, 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 PostV1CommentsData, type PostV1CommentsError, type PostV1CommentsErrors, type PostV1CommentsResponse, type PostV1CommentsResponses, type PostV1ConnectBlueskyAuthData, type PostV1ConnectBlueskyAuthError, type PostV1ConnectBlueskyAuthErrors, type PostV1ConnectFacebookSelectionByTokenData, type PostV1ConnectFacebookSelectionByTokenError, type PostV1ConnectFacebookSelectionByTokenErrors, type PostV1ConnectFacebookSelectionByTokenResponse, type PostV1ConnectFacebookSelectionByTokenResponses, type PostV1ConnectLinkedinSelectionByTokenData, type PostV1ConnectLinkedinSelectionByTokenError, type PostV1ConnectLinkedinSelectionByTokenErrors, type PostV1ConnectLinkedinSelectionByTokenResponse, type PostV1ConnectLinkedinSelectionByTokenResponses, type PostV1MediaUploadData, type PostV1MediaUploadError, type PostV1MediaUploadErrors, type PostV1MediaUploadResponse, type PostV1MediaUploadResponses, type PostV1MessagesData, type PostV1MessagesError, type PostV1MessagesErrors, type PostV1MessagesResponse, type PostV1MessagesResponses, 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
|
@@ -1459,6 +1459,100 @@ var PostPeer = class _PostPeer extends HeyApiClient {
|
|
|
1459
1459
|
}
|
|
1460
1460
|
});
|
|
1461
1461
|
}
|
|
1462
|
+
/**
|
|
1463
|
+
* List comments on a post
|
|
1464
|
+
*
|
|
1465
|
+
* Fetch comments (and first-level replies) on a post from a connected Facebook Page, Instagram Business account, or Threads account. Requires the account to have the relevant Meta permissions approved (pages_read_user_content for Facebook, instagram_business_manage_comments for Instagram, threads_manage_replies for Threads).
|
|
1466
|
+
*/
|
|
1467
|
+
listComments(options) {
|
|
1468
|
+
return (options.client ?? this.client).get({
|
|
1469
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1470
|
+
url: "/v1/comments/",
|
|
1471
|
+
...options
|
|
1472
|
+
});
|
|
1473
|
+
}
|
|
1474
|
+
/**
|
|
1475
|
+
* Create a comment or reply
|
|
1476
|
+
*
|
|
1477
|
+
* Post a top-level comment on an Instagram or Facebook post, or a top-level post on Threads (provide `postId`), or reply to an existing comment on Facebook, Instagram, or Threads (provide `commentId`).
|
|
1478
|
+
*/
|
|
1479
|
+
createComment(options) {
|
|
1480
|
+
return (options.client ?? this.client).post({
|
|
1481
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1482
|
+
url: "/v1/comments/",
|
|
1483
|
+
...options,
|
|
1484
|
+
headers: {
|
|
1485
|
+
"Content-Type": "application/json",
|
|
1486
|
+
...options.headers
|
|
1487
|
+
}
|
|
1488
|
+
});
|
|
1489
|
+
}
|
|
1490
|
+
/**
|
|
1491
|
+
* Delete a comment
|
|
1492
|
+
*
|
|
1493
|
+
* Delete a comment on a Facebook Page post or Instagram Business post. Not supported on Threads (the API does not allow deleting others' replies).
|
|
1494
|
+
*/
|
|
1495
|
+
deleteComment(options) {
|
|
1496
|
+
return (options.client ?? this.client).delete({
|
|
1497
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1498
|
+
url: "/v1/comments/{commentId}",
|
|
1499
|
+
...options
|
|
1500
|
+
});
|
|
1501
|
+
}
|
|
1502
|
+
/**
|
|
1503
|
+
* Hide or unhide a comment
|
|
1504
|
+
*
|
|
1505
|
+
* Hide or unhide a comment on an Instagram Business post. Pass `hidden: true` to hide, `hidden: false` to unhide. Instagram only.
|
|
1506
|
+
*/
|
|
1507
|
+
hideComment(options) {
|
|
1508
|
+
return (options.client ?? this.client).patch({
|
|
1509
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1510
|
+
url: "/v1/comments/{commentId}",
|
|
1511
|
+
...options,
|
|
1512
|
+
headers: {
|
|
1513
|
+
"Content-Type": "application/json",
|
|
1514
|
+
...options.headers
|
|
1515
|
+
}
|
|
1516
|
+
});
|
|
1517
|
+
}
|
|
1518
|
+
/**
|
|
1519
|
+
* List conversations
|
|
1520
|
+
*
|
|
1521
|
+
* List DM conversations for a connected Instagram Business account. Requires instagram_business_manage_messages.
|
|
1522
|
+
*/
|
|
1523
|
+
listConversations(options) {
|
|
1524
|
+
return (options.client ?? this.client).get({
|
|
1525
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1526
|
+
url: "/v1/messages/",
|
|
1527
|
+
...options
|
|
1528
|
+
});
|
|
1529
|
+
}
|
|
1530
|
+
/**
|
|
1531
|
+
* Send a message
|
|
1532
|
+
*
|
|
1533
|
+
* Send a DM reply on Instagram.
|
|
1534
|
+
*/
|
|
1535
|
+
sendMessage(options) {
|
|
1536
|
+
return (options.client ?? this.client).post({
|
|
1537
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1538
|
+
url: "/v1/messages/",
|
|
1539
|
+
...options,
|
|
1540
|
+
headers: {
|
|
1541
|
+
"Content-Type": "application/json",
|
|
1542
|
+
...options.headers
|
|
1543
|
+
}
|
|
1544
|
+
});
|
|
1545
|
+
}
|
|
1546
|
+
/**
|
|
1547
|
+
* Get messages in a conversation
|
|
1548
|
+
*/
|
|
1549
|
+
getConversationMessages(options) {
|
|
1550
|
+
return (options.client ?? this.client).get({
|
|
1551
|
+
security: [{ name: "x-access-key", type: "apiKey" }],
|
|
1552
|
+
url: "/v1/messages/{conversationId}",
|
|
1553
|
+
...options
|
|
1554
|
+
});
|
|
1555
|
+
}
|
|
1462
1556
|
_health;
|
|
1463
1557
|
get health() {
|
|
1464
1558
|
return this._health ??= new Health({ client: this.client });
|
|
@@ -1652,7 +1746,7 @@ var createAPIError = /* @__PURE__ */ __name((response, body) => {
|
|
|
1652
1746
|
}, "createAPIError");
|
|
1653
1747
|
|
|
1654
1748
|
// src/version.ts
|
|
1655
|
-
var VERSION = "0.8.
|
|
1749
|
+
var VERSION = "0.8.5";
|
|
1656
1750
|
|
|
1657
1751
|
// src/client.ts
|
|
1658
1752
|
var DEFAULT_BASE_URL = "https://api.postpeer.dev";
|