@getlatedev/node 0.1.43 → 0.1.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -0
- package/dist/index.d.mts +1242 -1
- package/dist/index.d.ts +1242 -1
- package/dist/index.js +241 -0
- package/dist/index.mjs +241 -0
- package/package.json +1 -1
- package/src/client.ts +78 -0
- package/src/generated/sdk.gen.ts +417 -1
- package/src/generated/types.gen.ts +1298 -1
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
3
|
import { createClient, createConfig, type OptionsLegacyParser, formDataBodySerializer } from '@hey-api/client-fetch';
|
|
4
|
-
import type { DownloadYouTubeVideoData, DownloadYouTubeVideoError, DownloadYouTubeVideoResponse, GetYouTubeTranscriptData, GetYouTubeTranscriptError, GetYouTubeTranscriptResponse, DownloadInstagramMediaData, DownloadInstagramMediaError, DownloadInstagramMediaResponse, CheckInstagramHashtagsData, CheckInstagramHashtagsError, CheckInstagramHashtagsResponse, DownloadTikTokVideoData, DownloadTikTokVideoError, DownloadTikTokVideoResponse, DownloadTwitterMediaData, DownloadTwitterMediaError, DownloadTwitterMediaResponse, DownloadFacebookVideoData, DownloadFacebookVideoError, DownloadFacebookVideoResponse, DownloadLinkedInVideoData, DownloadLinkedInVideoError, DownloadLinkedInVideoResponse, DownloadBlueskyMediaData, DownloadBlueskyMediaError, DownloadBlueskyMediaResponse, ValidatePostLengthData, ValidatePostLengthError, ValidatePostLengthResponse, ValidatePostData, ValidatePostError, ValidatePostResponse, ValidateMediaData, ValidateMediaError, ValidateMediaResponse, ValidateSubredditData, ValidateSubredditError, ValidateSubredditResponse, GetAnalyticsData, GetAnalyticsError, GetAnalyticsResponse, GetYouTubeDailyViewsData, GetYouTubeDailyViewsError, GetYouTubeDailyViewsResponse, GetDailyMetricsData, GetDailyMetricsError, GetDailyMetricsResponse, GetBestTimeToPostData, GetBestTimeToPostError, GetBestTimeToPostResponse, GetContentDecayData, GetContentDecayError, GetContentDecayResponse, GetPostingFrequencyData, GetPostingFrequencyError, GetPostingFrequencyResponse, GetPostTimelineData, GetPostTimelineError, GetPostTimelineResponse, ListAccountGroupsError, ListAccountGroupsResponse, CreateAccountGroupData, CreateAccountGroupError, CreateAccountGroupResponse, UpdateAccountGroupData, UpdateAccountGroupError, UpdateAccountGroupResponse, DeleteAccountGroupData, DeleteAccountGroupError, DeleteAccountGroupResponse, GetMediaPresignedUrlData, GetMediaPresignedUrlError, GetMediaPresignedUrlResponse, SearchRedditData, SearchRedditError, SearchRedditResponse, GetRedditFeedData, GetRedditFeedError, GetRedditFeedResponse, GetUsageStatsError, GetUsageStatsResponse, ListPostsData, ListPostsError, ListPostsResponse, CreatePostData, CreatePostError, CreatePostResponse, GetPostData, GetPostError, GetPostResponse, UpdatePostData, UpdatePostError, UpdatePostResponse, DeletePostData, DeletePostError, DeletePostResponse, BulkUploadPostsData, BulkUploadPostsError, BulkUploadPostsResponse, RetryPostData, RetryPostError, RetryPostResponse, UnpublishPostData, UnpublishPostError, UnpublishPostResponse, ListUsersError, ListUsersResponse, GetUserData, GetUserError, GetUserResponse, ListProfilesData, ListProfilesError, ListProfilesResponse, CreateProfileData, CreateProfileError, CreateProfileResponse, GetProfileData, GetProfileError, GetProfileResponse, UpdateProfileData, UpdateProfileError, UpdateProfileResponse, DeleteProfileData, DeleteProfileError, DeleteProfileResponse, ListAccountsData, ListAccountsError, ListAccountsResponse, GetFollowerStatsData, GetFollowerStatsError, GetFollowerStatsResponse, UpdateAccountData, UpdateAccountError, UpdateAccountResponse, DeleteAccountData, DeleteAccountError, DeleteAccountResponse, GetAllAccountsHealthData, GetAllAccountsHealthError, GetAllAccountsHealthResponse, GetAccountHealthData, GetAccountHealthError, GetAccountHealthResponse, ListApiKeysError, ListApiKeysResponse, CreateApiKeyData, CreateApiKeyError, CreateApiKeyResponse, DeleteApiKeyData, DeleteApiKeyError, DeleteApiKeyResponse, CreateInviteTokenData, CreateInviteTokenError, CreateInviteTokenResponse, GetConnectUrlData, GetConnectUrlError, GetConnectUrlResponse, HandleOAuthCallbackData, HandleOAuthCallbackError, HandleOAuthCallbackResponse, ListFacebookPagesData, ListFacebookPagesError, ListFacebookPagesResponse, SelectFacebookPageData, SelectFacebookPageError, SelectFacebookPageResponse, ListGoogleBusinessLocationsData, ListGoogleBusinessLocationsError, ListGoogleBusinessLocationsResponse, SelectGoogleBusinessLocationData, SelectGoogleBusinessLocationError, SelectGoogleBusinessLocationResponse, GetGoogleBusinessReviewsData, GetGoogleBusinessReviewsError, GetGoogleBusinessReviewsResponse, GetGoogleBusinessFoodMenusData, GetGoogleBusinessFoodMenusError, GetGoogleBusinessFoodMenusResponse, UpdateGoogleBusinessFoodMenusData, UpdateGoogleBusinessFoodMenusError, UpdateGoogleBusinessFoodMenusResponse, GetGoogleBusinessLocationDetailsData, GetGoogleBusinessLocationDetailsError, GetGoogleBusinessLocationDetailsResponse, UpdateGoogleBusinessLocationDetailsData, UpdateGoogleBusinessLocationDetailsError, UpdateGoogleBusinessLocationDetailsResponse, ListGoogleBusinessMediaData, ListGoogleBusinessMediaError, ListGoogleBusinessMediaResponse, CreateGoogleBusinessMediaData, CreateGoogleBusinessMediaError, CreateGoogleBusinessMediaResponse, DeleteGoogleBusinessMediaData, DeleteGoogleBusinessMediaError, DeleteGoogleBusinessMediaResponse, GetGoogleBusinessAttributesData, GetGoogleBusinessAttributesError, GetGoogleBusinessAttributesResponse, UpdateGoogleBusinessAttributesData, UpdateGoogleBusinessAttributesError, UpdateGoogleBusinessAttributesResponse, ListGoogleBusinessPlaceActionsData, ListGoogleBusinessPlaceActionsError, ListGoogleBusinessPlaceActionsResponse, CreateGoogleBusinessPlaceActionData, CreateGoogleBusinessPlaceActionError, CreateGoogleBusinessPlaceActionResponse, DeleteGoogleBusinessPlaceActionData, DeleteGoogleBusinessPlaceActionError, DeleteGoogleBusinessPlaceActionResponse, GetPendingOAuthDataData, GetPendingOAuthDataError, GetPendingOAuthDataResponse, ListLinkedInOrganizationsData, ListLinkedInOrganizationsError, ListLinkedInOrganizationsResponse, SelectLinkedInOrganizationData, SelectLinkedInOrganizationError, SelectLinkedInOrganizationResponse, ListPinterestBoardsForSelectionData, ListPinterestBoardsForSelectionError, ListPinterestBoardsForSelectionResponse, SelectPinterestBoardData, SelectPinterestBoardError, SelectPinterestBoardResponse, ListSnapchatProfilesData, ListSnapchatProfilesError, ListSnapchatProfilesResponse, SelectSnapchatProfileData, SelectSnapchatProfileError, SelectSnapchatProfileResponse, ConnectBlueskyCredentialsData, ConnectBlueskyCredentialsError, ConnectBlueskyCredentialsResponse, GetTelegramConnectStatusData, GetTelegramConnectStatusError, GetTelegramConnectStatusResponse, InitiateTelegramConnectData, InitiateTelegramConnectError, InitiateTelegramConnectResponse, CompleteTelegramConnectData, CompleteTelegramConnectError, CompleteTelegramConnectResponse, GetFacebookPagesData, GetFacebookPagesError, GetFacebookPagesResponse, UpdateFacebookPageData, UpdateFacebookPageError, UpdateFacebookPageResponse, GetLinkedInOrganizationsData, GetLinkedInOrganizationsError, GetLinkedInOrganizationsResponse, GetLinkedInAggregateAnalyticsData, GetLinkedInAggregateAnalyticsError, GetLinkedInAggregateAnalyticsResponse, GetLinkedInPostAnalyticsData, GetLinkedInPostAnalyticsError, GetLinkedInPostAnalyticsResponse, GetLinkedInPostReactionsData, GetLinkedInPostReactionsError, GetLinkedInPostReactionsResponse, UpdateLinkedInOrganizationData, UpdateLinkedInOrganizationError, UpdateLinkedInOrganizationResponse, GetLinkedInMentionsData, GetLinkedInMentionsError, GetLinkedInMentionsResponse, GetPinterestBoardsData, GetPinterestBoardsError, GetPinterestBoardsResponse, UpdatePinterestBoardsData, UpdatePinterestBoardsError, UpdatePinterestBoardsResponse, GetGmbLocationsData, GetGmbLocationsError, GetGmbLocationsResponse, UpdateGmbLocationData, UpdateGmbLocationError, UpdateGmbLocationResponse, GetRedditSubredditsData, GetRedditSubredditsError, GetRedditSubredditsResponse, UpdateRedditSubredditsData, UpdateRedditSubredditsError, UpdateRedditSubredditsResponse, GetRedditFlairsData, GetRedditFlairsError, GetRedditFlairsResponse, ListQueueSlotsData, ListQueueSlotsError, ListQueueSlotsResponse, CreateQueueSlotData, CreateQueueSlotError, CreateQueueSlotResponse, UpdateQueueSlotData, UpdateQueueSlotError, UpdateQueueSlotResponse, DeleteQueueSlotData, DeleteQueueSlotError, DeleteQueueSlotResponse, PreviewQueueData, PreviewQueueError, PreviewQueueResponse, GetNextQueueSlotData, GetNextQueueSlotError, GetNextQueueSlotResponse, GetWebhookSettingsError, GetWebhookSettingsResponse, CreateWebhookSettingsData, CreateWebhookSettingsError, CreateWebhookSettingsResponse, UpdateWebhookSettingsData, UpdateWebhookSettingsError, UpdateWebhookSettingsResponse, DeleteWebhookSettingsData, DeleteWebhookSettingsError, DeleteWebhookSettingsResponse, TestWebhookData, TestWebhookError, TestWebhookResponse, GetWebhookLogsData, GetWebhookLogsError, GetWebhookLogsResponse, ListPostsLogsData, ListPostsLogsError, ListPostsLogsResponse, ListConnectionLogsData, ListConnectionLogsError, ListConnectionLogsResponse, GetPostLogsData, GetPostLogsError, GetPostLogsResponse, ListInboxConversationsData, ListInboxConversationsError, ListInboxConversationsResponse, GetInboxConversationData, GetInboxConversationError, GetInboxConversationResponse, UpdateInboxConversationData, UpdateInboxConversationError, UpdateInboxConversationResponse, GetInboxConversationMessagesData, GetInboxConversationMessagesError, GetInboxConversationMessagesResponse, SendInboxMessageData, SendInboxMessageError, SendInboxMessageResponse, EditInboxMessageData, EditInboxMessageError, EditInboxMessageResponse, GetMessengerMenuData, GetMessengerMenuError, GetMessengerMenuResponse, SetMessengerMenuData, SetMessengerMenuError, SetMessengerMenuResponse, DeleteMessengerMenuData, DeleteMessengerMenuError, DeleteMessengerMenuResponse, GetInstagramIceBreakersData, GetInstagramIceBreakersError, GetInstagramIceBreakersResponse, SetInstagramIceBreakersData, SetInstagramIceBreakersError, SetInstagramIceBreakersResponse, DeleteInstagramIceBreakersData, DeleteInstagramIceBreakersError, DeleteInstagramIceBreakersResponse, GetTelegramCommandsData, GetTelegramCommandsError, GetTelegramCommandsResponse, SetTelegramCommandsData, SetTelegramCommandsError, SetTelegramCommandsResponse, DeleteTelegramCommandsData, DeleteTelegramCommandsError, DeleteTelegramCommandsResponse, ListInboxCommentsData, ListInboxCommentsError, ListInboxCommentsResponse, GetInboxPostCommentsData, GetInboxPostCommentsError, GetInboxPostCommentsResponse, ReplyToInboxPostData, ReplyToInboxPostError, ReplyToInboxPostResponse, DeleteInboxCommentData, DeleteInboxCommentError, DeleteInboxCommentResponse, HideInboxCommentData, HideInboxCommentError, HideInboxCommentResponse, UnhideInboxCommentData, UnhideInboxCommentError, UnhideInboxCommentResponse, LikeInboxCommentData, LikeInboxCommentError, LikeInboxCommentResponse, UnlikeInboxCommentData, UnlikeInboxCommentError, UnlikeInboxCommentResponse, SendPrivateReplyToCommentData, SendPrivateReplyToCommentError, SendPrivateReplyToCommentResponse, ListInboxReviewsData, ListInboxReviewsError, ListInboxReviewsResponse, ReplyToInboxReviewData, ReplyToInboxReviewError, ReplyToInboxReviewResponse, DeleteInboxReviewReplyData, DeleteInboxReviewReplyError, DeleteInboxReviewReplyResponse } from './types.gen';
|
|
4
|
+
import type { DownloadYouTubeVideoData, DownloadYouTubeVideoError, DownloadYouTubeVideoResponse, GetYouTubeTranscriptData, GetYouTubeTranscriptError, GetYouTubeTranscriptResponse, DownloadInstagramMediaData, DownloadInstagramMediaError, DownloadInstagramMediaResponse, CheckInstagramHashtagsData, CheckInstagramHashtagsError, CheckInstagramHashtagsResponse, DownloadTikTokVideoData, DownloadTikTokVideoError, DownloadTikTokVideoResponse, DownloadTwitterMediaData, DownloadTwitterMediaError, DownloadTwitterMediaResponse, DownloadFacebookVideoData, DownloadFacebookVideoError, DownloadFacebookVideoResponse, DownloadLinkedInVideoData, DownloadLinkedInVideoError, DownloadLinkedInVideoResponse, DownloadBlueskyMediaData, DownloadBlueskyMediaError, DownloadBlueskyMediaResponse, ValidatePostLengthData, ValidatePostLengthError, ValidatePostLengthResponse, ValidatePostData, ValidatePostError, ValidatePostResponse, ValidateMediaData, ValidateMediaError, ValidateMediaResponse, ValidateSubredditData, ValidateSubredditError, ValidateSubredditResponse, GetAnalyticsData, GetAnalyticsError, GetAnalyticsResponse, GetYouTubeDailyViewsData, GetYouTubeDailyViewsError, GetYouTubeDailyViewsResponse, GetDailyMetricsData, GetDailyMetricsError, GetDailyMetricsResponse, GetBestTimeToPostData, GetBestTimeToPostError, GetBestTimeToPostResponse, GetContentDecayData, GetContentDecayError, GetContentDecayResponse, GetPostingFrequencyData, GetPostingFrequencyError, GetPostingFrequencyResponse, GetPostTimelineData, GetPostTimelineError, GetPostTimelineResponse, ListAccountGroupsError, ListAccountGroupsResponse, CreateAccountGroupData, CreateAccountGroupError, CreateAccountGroupResponse, UpdateAccountGroupData, UpdateAccountGroupError, UpdateAccountGroupResponse, DeleteAccountGroupData, DeleteAccountGroupError, DeleteAccountGroupResponse, GetMediaPresignedUrlData, GetMediaPresignedUrlError, GetMediaPresignedUrlResponse, SearchRedditData, SearchRedditError, SearchRedditResponse, GetRedditFeedData, GetRedditFeedError, GetRedditFeedResponse, GetUsageStatsError, GetUsageStatsResponse, ListPostsData, ListPostsError, ListPostsResponse, CreatePostData, CreatePostError, CreatePostResponse, GetPostData, GetPostError, GetPostResponse, UpdatePostData, UpdatePostError, UpdatePostResponse, DeletePostData, DeletePostError, DeletePostResponse, BulkUploadPostsData, BulkUploadPostsError, BulkUploadPostsResponse, RetryPostData, RetryPostError, RetryPostResponse, UnpublishPostData, UnpublishPostError, UnpublishPostResponse, ListUsersError, ListUsersResponse, GetUserData, GetUserError, GetUserResponse, ListProfilesData, ListProfilesError, ListProfilesResponse, CreateProfileData, CreateProfileError, CreateProfileResponse, GetProfileData, GetProfileError, GetProfileResponse, UpdateProfileData, UpdateProfileError, UpdateProfileResponse, DeleteProfileData, DeleteProfileError, DeleteProfileResponse, ListAccountsData, ListAccountsError, ListAccountsResponse, GetFollowerStatsData, GetFollowerStatsError, GetFollowerStatsResponse, UpdateAccountData, UpdateAccountError, UpdateAccountResponse, DeleteAccountData, DeleteAccountError, DeleteAccountResponse, GetAllAccountsHealthData, GetAllAccountsHealthError, GetAllAccountsHealthResponse, GetAccountHealthData, GetAccountHealthError, GetAccountHealthResponse, ListApiKeysError, ListApiKeysResponse, CreateApiKeyData, CreateApiKeyError, CreateApiKeyResponse, DeleteApiKeyData, DeleteApiKeyError, DeleteApiKeyResponse, CreateInviteTokenData, CreateInviteTokenError, CreateInviteTokenResponse, GetConnectUrlData, GetConnectUrlError, GetConnectUrlResponse, HandleOAuthCallbackData, HandleOAuthCallbackError, HandleOAuthCallbackResponse, ListFacebookPagesData, ListFacebookPagesError, ListFacebookPagesResponse, SelectFacebookPageData, SelectFacebookPageError, SelectFacebookPageResponse, ListGoogleBusinessLocationsData, ListGoogleBusinessLocationsError, ListGoogleBusinessLocationsResponse, SelectGoogleBusinessLocationData, SelectGoogleBusinessLocationError, SelectGoogleBusinessLocationResponse, GetGoogleBusinessReviewsData, GetGoogleBusinessReviewsError, GetGoogleBusinessReviewsResponse, GetGoogleBusinessFoodMenusData, GetGoogleBusinessFoodMenusError, GetGoogleBusinessFoodMenusResponse, UpdateGoogleBusinessFoodMenusData, UpdateGoogleBusinessFoodMenusError, UpdateGoogleBusinessFoodMenusResponse, GetGoogleBusinessLocationDetailsData, GetGoogleBusinessLocationDetailsError, GetGoogleBusinessLocationDetailsResponse, UpdateGoogleBusinessLocationDetailsData, UpdateGoogleBusinessLocationDetailsError, UpdateGoogleBusinessLocationDetailsResponse, ListGoogleBusinessMediaData, ListGoogleBusinessMediaError, ListGoogleBusinessMediaResponse, CreateGoogleBusinessMediaData, CreateGoogleBusinessMediaError, CreateGoogleBusinessMediaResponse, DeleteGoogleBusinessMediaData, DeleteGoogleBusinessMediaError, DeleteGoogleBusinessMediaResponse, GetGoogleBusinessAttributesData, GetGoogleBusinessAttributesError, GetGoogleBusinessAttributesResponse, UpdateGoogleBusinessAttributesData, UpdateGoogleBusinessAttributesError, UpdateGoogleBusinessAttributesResponse, ListGoogleBusinessPlaceActionsData, ListGoogleBusinessPlaceActionsError, ListGoogleBusinessPlaceActionsResponse, CreateGoogleBusinessPlaceActionData, CreateGoogleBusinessPlaceActionError, CreateGoogleBusinessPlaceActionResponse, DeleteGoogleBusinessPlaceActionData, DeleteGoogleBusinessPlaceActionError, DeleteGoogleBusinessPlaceActionResponse, GetPendingOAuthDataData, GetPendingOAuthDataError, GetPendingOAuthDataResponse, ListLinkedInOrganizationsData, ListLinkedInOrganizationsError, ListLinkedInOrganizationsResponse, SelectLinkedInOrganizationData, SelectLinkedInOrganizationError, SelectLinkedInOrganizationResponse, ListPinterestBoardsForSelectionData, ListPinterestBoardsForSelectionError, ListPinterestBoardsForSelectionResponse, SelectPinterestBoardData, SelectPinterestBoardError, SelectPinterestBoardResponse, ListSnapchatProfilesData, ListSnapchatProfilesError, ListSnapchatProfilesResponse, SelectSnapchatProfileData, SelectSnapchatProfileError, SelectSnapchatProfileResponse, ConnectBlueskyCredentialsData, ConnectBlueskyCredentialsError, ConnectBlueskyCredentialsResponse, GetTelegramConnectStatusData, GetTelegramConnectStatusError, GetTelegramConnectStatusResponse, InitiateTelegramConnectData, InitiateTelegramConnectError, InitiateTelegramConnectResponse, CompleteTelegramConnectData, CompleteTelegramConnectError, CompleteTelegramConnectResponse, GetFacebookPagesData, GetFacebookPagesError, GetFacebookPagesResponse, UpdateFacebookPageData, UpdateFacebookPageError, UpdateFacebookPageResponse, GetLinkedInOrganizationsData, GetLinkedInOrganizationsError, GetLinkedInOrganizationsResponse, GetLinkedInAggregateAnalyticsData, GetLinkedInAggregateAnalyticsError, GetLinkedInAggregateAnalyticsResponse, GetLinkedInPostAnalyticsData, GetLinkedInPostAnalyticsError, GetLinkedInPostAnalyticsResponse, GetLinkedInPostReactionsData, GetLinkedInPostReactionsError, GetLinkedInPostReactionsResponse, UpdateLinkedInOrganizationData, UpdateLinkedInOrganizationError, UpdateLinkedInOrganizationResponse, GetLinkedInMentionsData, GetLinkedInMentionsError, GetLinkedInMentionsResponse, GetPinterestBoardsData, GetPinterestBoardsError, GetPinterestBoardsResponse, UpdatePinterestBoardsData, UpdatePinterestBoardsError, UpdatePinterestBoardsResponse, GetGmbLocationsData, GetGmbLocationsError, GetGmbLocationsResponse, UpdateGmbLocationData, UpdateGmbLocationError, UpdateGmbLocationResponse, GetRedditSubredditsData, GetRedditSubredditsError, GetRedditSubredditsResponse, UpdateRedditSubredditsData, UpdateRedditSubredditsError, UpdateRedditSubredditsResponse, GetRedditFlairsData, GetRedditFlairsError, GetRedditFlairsResponse, ListQueueSlotsData, ListQueueSlotsError, ListQueueSlotsResponse, CreateQueueSlotData, CreateQueueSlotError, CreateQueueSlotResponse, UpdateQueueSlotData, UpdateQueueSlotError, UpdateQueueSlotResponse, DeleteQueueSlotData, DeleteQueueSlotError, DeleteQueueSlotResponse, PreviewQueueData, PreviewQueueError, PreviewQueueResponse, GetNextQueueSlotData, GetNextQueueSlotError, GetNextQueueSlotResponse, GetWebhookSettingsError, GetWebhookSettingsResponse, CreateWebhookSettingsData, CreateWebhookSettingsError, CreateWebhookSettingsResponse, UpdateWebhookSettingsData, UpdateWebhookSettingsError, UpdateWebhookSettingsResponse, DeleteWebhookSettingsData, DeleteWebhookSettingsError, DeleteWebhookSettingsResponse, TestWebhookData, TestWebhookError, TestWebhookResponse, GetWebhookLogsData, GetWebhookLogsError, GetWebhookLogsResponse, ListPostsLogsData, ListPostsLogsError, ListPostsLogsResponse, ListConnectionLogsData, ListConnectionLogsError, ListConnectionLogsResponse, GetPostLogsData, GetPostLogsError, GetPostLogsResponse, ListInboxConversationsData, ListInboxConversationsError, ListInboxConversationsResponse, GetInboxConversationData, GetInboxConversationError, GetInboxConversationResponse, UpdateInboxConversationData, UpdateInboxConversationError, UpdateInboxConversationResponse, GetInboxConversationMessagesData, GetInboxConversationMessagesError, GetInboxConversationMessagesResponse, SendInboxMessageData, SendInboxMessageError, SendInboxMessageResponse, EditInboxMessageData, EditInboxMessageError, EditInboxMessageResponse, GetMessengerMenuData, GetMessengerMenuError, GetMessengerMenuResponse, SetMessengerMenuData, SetMessengerMenuError, SetMessengerMenuResponse, DeleteMessengerMenuData, DeleteMessengerMenuError, DeleteMessengerMenuResponse, GetInstagramIceBreakersData, GetInstagramIceBreakersError, GetInstagramIceBreakersResponse, SetInstagramIceBreakersData, SetInstagramIceBreakersError, SetInstagramIceBreakersResponse, DeleteInstagramIceBreakersData, DeleteInstagramIceBreakersError, DeleteInstagramIceBreakersResponse, GetTelegramCommandsData, GetTelegramCommandsError, GetTelegramCommandsResponse, SetTelegramCommandsData, SetTelegramCommandsError, SetTelegramCommandsResponse, DeleteTelegramCommandsData, DeleteTelegramCommandsError, DeleteTelegramCommandsResponse, ListInboxCommentsData, ListInboxCommentsError, ListInboxCommentsResponse, GetInboxPostCommentsData, GetInboxPostCommentsError, GetInboxPostCommentsResponse, ReplyToInboxPostData, ReplyToInboxPostError, ReplyToInboxPostResponse, DeleteInboxCommentData, DeleteInboxCommentError, DeleteInboxCommentResponse, HideInboxCommentData, HideInboxCommentError, HideInboxCommentResponse, UnhideInboxCommentData, UnhideInboxCommentError, UnhideInboxCommentResponse, LikeInboxCommentData, LikeInboxCommentError, LikeInboxCommentResponse, UnlikeInboxCommentData, UnlikeInboxCommentError, UnlikeInboxCommentResponse, SendPrivateReplyToCommentData, SendPrivateReplyToCommentError, SendPrivateReplyToCommentResponse, ListInboxReviewsData, ListInboxReviewsError, ListInboxReviewsResponse, ReplyToInboxReviewData, ReplyToInboxReviewError, ReplyToInboxReviewResponse, DeleteInboxReviewReplyData, DeleteInboxReviewReplyError, DeleteInboxReviewReplyResponse, SendWhatsAppBulkData, SendWhatsAppBulkError, SendWhatsAppBulkResponse, GetWhatsAppContactsData, GetWhatsAppContactsError, GetWhatsAppContactsResponse, CreateWhatsAppContactData, CreateWhatsAppContactError, CreateWhatsAppContactResponse, GetWhatsAppContactData, GetWhatsAppContactError, GetWhatsAppContactResponse, UpdateWhatsAppContactData, UpdateWhatsAppContactError, UpdateWhatsAppContactResponse, DeleteWhatsAppContactData, DeleteWhatsAppContactError, DeleteWhatsAppContactResponse, ImportWhatsAppContactsData, ImportWhatsAppContactsError, ImportWhatsAppContactsResponse, BulkUpdateWhatsAppContactsData, BulkUpdateWhatsAppContactsError, BulkUpdateWhatsAppContactsResponse, BulkDeleteWhatsAppContactsData, BulkDeleteWhatsAppContactsError, BulkDeleteWhatsAppContactsResponse, GetWhatsAppGroupsData, GetWhatsAppGroupsError, GetWhatsAppGroupsResponse, RenameWhatsAppGroupData, RenameWhatsAppGroupError, RenameWhatsAppGroupResponse, DeleteWhatsAppGroupData, DeleteWhatsAppGroupError, DeleteWhatsAppGroupResponse, GetWhatsAppTemplatesData, GetWhatsAppTemplatesError, GetWhatsAppTemplatesResponse, CreateWhatsAppTemplateData, CreateWhatsAppTemplateError, CreateWhatsAppTemplateResponse, GetWhatsAppTemplateData, GetWhatsAppTemplateError, GetWhatsAppTemplateResponse, UpdateWhatsAppTemplateData, UpdateWhatsAppTemplateError, UpdateWhatsAppTemplateResponse, DeleteWhatsAppTemplateData, DeleteWhatsAppTemplateError, DeleteWhatsAppTemplateResponse, GetWhatsAppBroadcastsData, GetWhatsAppBroadcastsError, GetWhatsAppBroadcastsResponse, CreateWhatsAppBroadcastData, CreateWhatsAppBroadcastError, CreateWhatsAppBroadcastResponse, GetWhatsAppBroadcastData, GetWhatsAppBroadcastError, GetWhatsAppBroadcastResponse, DeleteWhatsAppBroadcastData, DeleteWhatsAppBroadcastError, DeleteWhatsAppBroadcastResponse, SendWhatsAppBroadcastData, SendWhatsAppBroadcastError, SendWhatsAppBroadcastResponse, ScheduleWhatsAppBroadcastData, ScheduleWhatsAppBroadcastError, ScheduleWhatsAppBroadcastResponse, CancelWhatsAppBroadcastScheduleData, CancelWhatsAppBroadcastScheduleError, CancelWhatsAppBroadcastScheduleResponse, GetWhatsAppBroadcastRecipientsData, GetWhatsAppBroadcastRecipientsError, GetWhatsAppBroadcastRecipientsResponse, AddWhatsAppBroadcastRecipientsData, AddWhatsAppBroadcastRecipientsError, AddWhatsAppBroadcastRecipientsResponse, RemoveWhatsAppBroadcastRecipientsData, RemoveWhatsAppBroadcastRecipientsError, RemoveWhatsAppBroadcastRecipientsResponse, GetWhatsAppBusinessProfileData, GetWhatsAppBusinessProfileError, GetWhatsAppBusinessProfileResponse, UpdateWhatsAppBusinessProfileData, UpdateWhatsAppBusinessProfileError, UpdateWhatsAppBusinessProfileResponse, GetWhatsAppPhoneNumbersData, GetWhatsAppPhoneNumbersError, GetWhatsAppPhoneNumbersResponse, PurchaseWhatsAppPhoneNumberData, PurchaseWhatsAppPhoneNumberError, PurchaseWhatsAppPhoneNumberResponse, GetWhatsAppPhoneNumberData, GetWhatsAppPhoneNumberError, GetWhatsAppPhoneNumberResponse, ReleaseWhatsAppPhoneNumberData, ReleaseWhatsAppPhoneNumberError, ReleaseWhatsAppPhoneNumberResponse } from './types.gen';
|
|
5
5
|
|
|
6
6
|
export const client = createClient(createConfig());
|
|
7
7
|
|
|
@@ -1683,4 +1683,420 @@ export const deleteInboxReviewReply = <ThrowOnError extends boolean = false>(opt
|
|
|
1683
1683
|
...options,
|
|
1684
1684
|
url: '/v1/inbox/reviews/{reviewId}/reply'
|
|
1685
1685
|
});
|
|
1686
|
+
};
|
|
1687
|
+
|
|
1688
|
+
/**
|
|
1689
|
+
* Bulk send template messages
|
|
1690
|
+
* Send a template message to multiple recipients in a single request. Maximum 100 recipients per request.
|
|
1691
|
+
* Only template messages are supported for bulk sending (not free-form text).
|
|
1692
|
+
*
|
|
1693
|
+
* Each recipient can have optional per-recipient template variables for personalization.
|
|
1694
|
+
* Returns detailed results for each recipient.
|
|
1695
|
+
*
|
|
1696
|
+
*/
|
|
1697
|
+
export const sendWhatsAppBulk = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SendWhatsAppBulkData, ThrowOnError>) => {
|
|
1698
|
+
return (options?.client ?? client).post<SendWhatsAppBulkResponse, SendWhatsAppBulkError, ThrowOnError>({
|
|
1699
|
+
...options,
|
|
1700
|
+
url: '/v1/whatsapp/bulk'
|
|
1701
|
+
});
|
|
1702
|
+
};
|
|
1703
|
+
|
|
1704
|
+
/**
|
|
1705
|
+
* List contacts
|
|
1706
|
+
* List WhatsApp contacts for an account. Supports filtering by tags, groups, opt-in status,
|
|
1707
|
+
* and text search. Returns contacts sorted by name with available filter options.
|
|
1708
|
+
*
|
|
1709
|
+
*/
|
|
1710
|
+
export const getWhatsAppContacts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetWhatsAppContactsData, ThrowOnError>) => {
|
|
1711
|
+
return (options?.client ?? client).get<GetWhatsAppContactsResponse, GetWhatsAppContactsError, ThrowOnError>({
|
|
1712
|
+
...options,
|
|
1713
|
+
url: '/v1/whatsapp/contacts'
|
|
1714
|
+
});
|
|
1715
|
+
};
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
* Create contact
|
|
1719
|
+
* Create a new WhatsApp contact. Phone number must be unique per account
|
|
1720
|
+
* and in E.164 format (e.g., +1234567890).
|
|
1721
|
+
*
|
|
1722
|
+
*/
|
|
1723
|
+
export const createWhatsAppContact = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateWhatsAppContactData, ThrowOnError>) => {
|
|
1724
|
+
return (options?.client ?? client).post<CreateWhatsAppContactResponse, CreateWhatsAppContactError, ThrowOnError>({
|
|
1725
|
+
...options,
|
|
1726
|
+
url: '/v1/whatsapp/contacts'
|
|
1727
|
+
});
|
|
1728
|
+
};
|
|
1729
|
+
|
|
1730
|
+
/**
|
|
1731
|
+
* Get contact
|
|
1732
|
+
* Retrieve a single WhatsApp contact by ID with full details.
|
|
1733
|
+
*/
|
|
1734
|
+
export const getWhatsAppContact = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetWhatsAppContactData, ThrowOnError>) => {
|
|
1735
|
+
return (options?.client ?? client).get<GetWhatsAppContactResponse, GetWhatsAppContactError, ThrowOnError>({
|
|
1736
|
+
...options,
|
|
1737
|
+
url: '/v1/whatsapp/contacts/{contactId}'
|
|
1738
|
+
});
|
|
1739
|
+
};
|
|
1740
|
+
|
|
1741
|
+
/**
|
|
1742
|
+
* Update contact
|
|
1743
|
+
* Update an existing WhatsApp contact. All fields are optional; only provided fields will be updated.
|
|
1744
|
+
* Custom fields are merged with existing values. Set a custom field to null to remove it.
|
|
1745
|
+
*
|
|
1746
|
+
*/
|
|
1747
|
+
export const updateWhatsAppContact = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateWhatsAppContactData, ThrowOnError>) => {
|
|
1748
|
+
return (options?.client ?? client).put<UpdateWhatsAppContactResponse, UpdateWhatsAppContactError, ThrowOnError>({
|
|
1749
|
+
...options,
|
|
1750
|
+
url: '/v1/whatsapp/contacts/{contactId}'
|
|
1751
|
+
});
|
|
1752
|
+
};
|
|
1753
|
+
|
|
1754
|
+
/**
|
|
1755
|
+
* Delete contact
|
|
1756
|
+
* Permanently delete a WhatsApp contact.
|
|
1757
|
+
*/
|
|
1758
|
+
export const deleteWhatsAppContact = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteWhatsAppContactData, ThrowOnError>) => {
|
|
1759
|
+
return (options?.client ?? client).delete<DeleteWhatsAppContactResponse, DeleteWhatsAppContactError, ThrowOnError>({
|
|
1760
|
+
...options,
|
|
1761
|
+
url: '/v1/whatsapp/contacts/{contactId}'
|
|
1762
|
+
});
|
|
1763
|
+
};
|
|
1764
|
+
|
|
1765
|
+
/**
|
|
1766
|
+
* Bulk import contacts
|
|
1767
|
+
* Import up to 1000 contacts at once. Each contact requires a phone number and name.
|
|
1768
|
+
* Duplicates are skipped by default. Supports default tags and groups applied to all imported contacts.
|
|
1769
|
+
*
|
|
1770
|
+
*/
|
|
1771
|
+
export const importWhatsAppContacts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ImportWhatsAppContactsData, ThrowOnError>) => {
|
|
1772
|
+
return (options?.client ?? client).post<ImportWhatsAppContactsResponse, ImportWhatsAppContactsError, ThrowOnError>({
|
|
1773
|
+
...options,
|
|
1774
|
+
url: '/v1/whatsapp/contacts/import'
|
|
1775
|
+
});
|
|
1776
|
+
};
|
|
1777
|
+
|
|
1778
|
+
/**
|
|
1779
|
+
* Bulk update contacts
|
|
1780
|
+
* Perform bulk operations on multiple contacts (max 500 per request). Supported actions:
|
|
1781
|
+
* addTags, removeTags, addGroups, removeGroups, optIn, optOut, block, unblock.
|
|
1782
|
+
*
|
|
1783
|
+
*/
|
|
1784
|
+
export const bulkUpdateWhatsAppContacts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<BulkUpdateWhatsAppContactsData, ThrowOnError>) => {
|
|
1785
|
+
return (options?.client ?? client).post<BulkUpdateWhatsAppContactsResponse, BulkUpdateWhatsAppContactsError, ThrowOnError>({
|
|
1786
|
+
...options,
|
|
1787
|
+
url: '/v1/whatsapp/contacts/bulk'
|
|
1788
|
+
});
|
|
1789
|
+
};
|
|
1790
|
+
|
|
1791
|
+
/**
|
|
1792
|
+
* Bulk delete contacts
|
|
1793
|
+
* Permanently delete multiple contacts at once (max 500 per request).
|
|
1794
|
+
*/
|
|
1795
|
+
export const bulkDeleteWhatsAppContacts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<BulkDeleteWhatsAppContactsData, ThrowOnError>) => {
|
|
1796
|
+
return (options?.client ?? client).delete<BulkDeleteWhatsAppContactsResponse, BulkDeleteWhatsAppContactsError, ThrowOnError>({
|
|
1797
|
+
...options,
|
|
1798
|
+
url: '/v1/whatsapp/contacts/bulk'
|
|
1799
|
+
});
|
|
1800
|
+
};
|
|
1801
|
+
|
|
1802
|
+
/**
|
|
1803
|
+
* List contact groups
|
|
1804
|
+
* List all contact groups for a WhatsApp account with contact counts.
|
|
1805
|
+
* Groups are derived from the groups field on contacts, not stored as separate documents.
|
|
1806
|
+
*
|
|
1807
|
+
*/
|
|
1808
|
+
export const getWhatsAppGroups = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetWhatsAppGroupsData, ThrowOnError>) => {
|
|
1809
|
+
return (options?.client ?? client).get<GetWhatsAppGroupsResponse, GetWhatsAppGroupsError, ThrowOnError>({
|
|
1810
|
+
...options,
|
|
1811
|
+
url: '/v1/whatsapp/groups'
|
|
1812
|
+
});
|
|
1813
|
+
};
|
|
1814
|
+
|
|
1815
|
+
/**
|
|
1816
|
+
* Rename group
|
|
1817
|
+
* Rename a contact group. This updates the group name on all contacts that belong to the group.
|
|
1818
|
+
*/
|
|
1819
|
+
export const renameWhatsAppGroup = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RenameWhatsAppGroupData, ThrowOnError>) => {
|
|
1820
|
+
return (options?.client ?? client).post<RenameWhatsAppGroupResponse, RenameWhatsAppGroupError, ThrowOnError>({
|
|
1821
|
+
...options,
|
|
1822
|
+
url: '/v1/whatsapp/groups'
|
|
1823
|
+
});
|
|
1824
|
+
};
|
|
1825
|
+
|
|
1826
|
+
/**
|
|
1827
|
+
* Delete group
|
|
1828
|
+
* Delete a contact group. This removes the group from all contacts but does not delete the contacts themselves.
|
|
1829
|
+
*/
|
|
1830
|
+
export const deleteWhatsAppGroup = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteWhatsAppGroupData, ThrowOnError>) => {
|
|
1831
|
+
return (options?.client ?? client).delete<DeleteWhatsAppGroupResponse, DeleteWhatsAppGroupError, ThrowOnError>({
|
|
1832
|
+
...options,
|
|
1833
|
+
url: '/v1/whatsapp/groups'
|
|
1834
|
+
});
|
|
1835
|
+
};
|
|
1836
|
+
|
|
1837
|
+
/**
|
|
1838
|
+
* List templates
|
|
1839
|
+
* List all message templates for the WhatsApp Business Account (WABA) associated with the given account.
|
|
1840
|
+
* Templates are fetched directly from the WhatsApp Cloud API.
|
|
1841
|
+
*
|
|
1842
|
+
*/
|
|
1843
|
+
export const getWhatsAppTemplates = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetWhatsAppTemplatesData, ThrowOnError>) => {
|
|
1844
|
+
return (options?.client ?? client).get<GetWhatsAppTemplatesResponse, GetWhatsAppTemplatesError, ThrowOnError>({
|
|
1845
|
+
...options,
|
|
1846
|
+
url: '/v1/whatsapp/templates'
|
|
1847
|
+
});
|
|
1848
|
+
};
|
|
1849
|
+
|
|
1850
|
+
/**
|
|
1851
|
+
* Create template
|
|
1852
|
+
* Create a new message template. Template names must be lowercase, start with a letter,
|
|
1853
|
+
* and contain only letters, numbers, and underscores. Templates are submitted to Meta for review.
|
|
1854
|
+
*
|
|
1855
|
+
*/
|
|
1856
|
+
export const createWhatsAppTemplate = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateWhatsAppTemplateData, ThrowOnError>) => {
|
|
1857
|
+
return (options?.client ?? client).post<CreateWhatsAppTemplateResponse, CreateWhatsAppTemplateError, ThrowOnError>({
|
|
1858
|
+
...options,
|
|
1859
|
+
url: '/v1/whatsapp/templates'
|
|
1860
|
+
});
|
|
1861
|
+
};
|
|
1862
|
+
|
|
1863
|
+
/**
|
|
1864
|
+
* Get template
|
|
1865
|
+
* Retrieve a single message template by name.
|
|
1866
|
+
*/
|
|
1867
|
+
export const getWhatsAppTemplate = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetWhatsAppTemplateData, ThrowOnError>) => {
|
|
1868
|
+
return (options?.client ?? client).get<GetWhatsAppTemplateResponse, GetWhatsAppTemplateError, ThrowOnError>({
|
|
1869
|
+
...options,
|
|
1870
|
+
url: '/v1/whatsapp/templates/{templateName}'
|
|
1871
|
+
});
|
|
1872
|
+
};
|
|
1873
|
+
|
|
1874
|
+
/**
|
|
1875
|
+
* Update template
|
|
1876
|
+
* Update a message template's components. Only certain fields can be updated depending on
|
|
1877
|
+
* the template's current approval state. Approved templates can only have components updated.
|
|
1878
|
+
*
|
|
1879
|
+
*/
|
|
1880
|
+
export const updateWhatsAppTemplate = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateWhatsAppTemplateData, ThrowOnError>) => {
|
|
1881
|
+
return (options?.client ?? client).patch<UpdateWhatsAppTemplateResponse, UpdateWhatsAppTemplateError, ThrowOnError>({
|
|
1882
|
+
...options,
|
|
1883
|
+
url: '/v1/whatsapp/templates/{templateName}'
|
|
1884
|
+
});
|
|
1885
|
+
};
|
|
1886
|
+
|
|
1887
|
+
/**
|
|
1888
|
+
* Delete template
|
|
1889
|
+
* Permanently delete a message template by name.
|
|
1890
|
+
*/
|
|
1891
|
+
export const deleteWhatsAppTemplate = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteWhatsAppTemplateData, ThrowOnError>) => {
|
|
1892
|
+
return (options?.client ?? client).delete<DeleteWhatsAppTemplateResponse, DeleteWhatsAppTemplateError, ThrowOnError>({
|
|
1893
|
+
...options,
|
|
1894
|
+
url: '/v1/whatsapp/templates/{templateName}'
|
|
1895
|
+
});
|
|
1896
|
+
};
|
|
1897
|
+
|
|
1898
|
+
/**
|
|
1899
|
+
* List broadcasts
|
|
1900
|
+
* List all WhatsApp broadcasts for an account. Returns broadcasts sorted by creation date
|
|
1901
|
+
* (newest first) without the full recipients list for performance.
|
|
1902
|
+
*
|
|
1903
|
+
*/
|
|
1904
|
+
export const getWhatsAppBroadcasts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetWhatsAppBroadcastsData, ThrowOnError>) => {
|
|
1905
|
+
return (options?.client ?? client).get<GetWhatsAppBroadcastsResponse, GetWhatsAppBroadcastsError, ThrowOnError>({
|
|
1906
|
+
...options,
|
|
1907
|
+
url: '/v1/whatsapp/broadcasts'
|
|
1908
|
+
});
|
|
1909
|
+
};
|
|
1910
|
+
|
|
1911
|
+
/**
|
|
1912
|
+
* Create broadcast
|
|
1913
|
+
* Create a new draft broadcast. Optionally include initial recipients.
|
|
1914
|
+
* After creation, add recipients and then send or schedule the broadcast.
|
|
1915
|
+
*
|
|
1916
|
+
*/
|
|
1917
|
+
export const createWhatsAppBroadcast = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateWhatsAppBroadcastData, ThrowOnError>) => {
|
|
1918
|
+
return (options?.client ?? client).post<CreateWhatsAppBroadcastResponse, CreateWhatsAppBroadcastError, ThrowOnError>({
|
|
1919
|
+
...options,
|
|
1920
|
+
url: '/v1/whatsapp/broadcasts'
|
|
1921
|
+
});
|
|
1922
|
+
};
|
|
1923
|
+
|
|
1924
|
+
/**
|
|
1925
|
+
* Get broadcast
|
|
1926
|
+
* Retrieve detailed information about a single broadcast including delivery statistics.
|
|
1927
|
+
*/
|
|
1928
|
+
export const getWhatsAppBroadcast = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetWhatsAppBroadcastData, ThrowOnError>) => {
|
|
1929
|
+
return (options?.client ?? client).get<GetWhatsAppBroadcastResponse, GetWhatsAppBroadcastError, ThrowOnError>({
|
|
1930
|
+
...options,
|
|
1931
|
+
url: '/v1/whatsapp/broadcasts/{broadcastId}'
|
|
1932
|
+
});
|
|
1933
|
+
};
|
|
1934
|
+
|
|
1935
|
+
/**
|
|
1936
|
+
* Delete broadcast
|
|
1937
|
+
* Delete a broadcast. Only draft or cancelled broadcasts can be deleted.
|
|
1938
|
+
*/
|
|
1939
|
+
export const deleteWhatsAppBroadcast = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteWhatsAppBroadcastData, ThrowOnError>) => {
|
|
1940
|
+
return (options?.client ?? client).delete<DeleteWhatsAppBroadcastResponse, DeleteWhatsAppBroadcastError, ThrowOnError>({
|
|
1941
|
+
...options,
|
|
1942
|
+
url: '/v1/whatsapp/broadcasts/{broadcastId}'
|
|
1943
|
+
});
|
|
1944
|
+
};
|
|
1945
|
+
|
|
1946
|
+
/**
|
|
1947
|
+
* Send broadcast
|
|
1948
|
+
* Start sending a broadcast immediately. The broadcast must be in draft or scheduled status
|
|
1949
|
+
* and have at least one recipient. Messages are sent sequentially with rate limiting.
|
|
1950
|
+
*
|
|
1951
|
+
*/
|
|
1952
|
+
export const sendWhatsAppBroadcast = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SendWhatsAppBroadcastData, ThrowOnError>) => {
|
|
1953
|
+
return (options?.client ?? client).post<SendWhatsAppBroadcastResponse, SendWhatsAppBroadcastError, ThrowOnError>({
|
|
1954
|
+
...options,
|
|
1955
|
+
url: '/v1/whatsapp/broadcasts/{broadcastId}/send'
|
|
1956
|
+
});
|
|
1957
|
+
};
|
|
1958
|
+
|
|
1959
|
+
/**
|
|
1960
|
+
* Schedule broadcast
|
|
1961
|
+
* Schedule a draft broadcast for future sending. The scheduled time must be in the future
|
|
1962
|
+
* and no more than 30 days in advance. The broadcast must be in draft status and have recipients.
|
|
1963
|
+
*
|
|
1964
|
+
*/
|
|
1965
|
+
export const scheduleWhatsAppBroadcast = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ScheduleWhatsAppBroadcastData, ThrowOnError>) => {
|
|
1966
|
+
return (options?.client ?? client).post<ScheduleWhatsAppBroadcastResponse, ScheduleWhatsAppBroadcastError, ThrowOnError>({
|
|
1967
|
+
...options,
|
|
1968
|
+
url: '/v1/whatsapp/broadcasts/{broadcastId}/schedule'
|
|
1969
|
+
});
|
|
1970
|
+
};
|
|
1971
|
+
|
|
1972
|
+
/**
|
|
1973
|
+
* Cancel scheduled broadcast
|
|
1974
|
+
* Cancel a scheduled broadcast and return it to draft status. Only broadcasts in
|
|
1975
|
+
* scheduled status can be cancelled.
|
|
1976
|
+
*
|
|
1977
|
+
*/
|
|
1978
|
+
export const cancelWhatsAppBroadcastSchedule = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CancelWhatsAppBroadcastScheduleData, ThrowOnError>) => {
|
|
1979
|
+
return (options?.client ?? client).delete<CancelWhatsAppBroadcastScheduleResponse, CancelWhatsAppBroadcastScheduleError, ThrowOnError>({
|
|
1980
|
+
...options,
|
|
1981
|
+
url: '/v1/whatsapp/broadcasts/{broadcastId}/schedule'
|
|
1982
|
+
});
|
|
1983
|
+
};
|
|
1984
|
+
|
|
1985
|
+
/**
|
|
1986
|
+
* List recipients
|
|
1987
|
+
* List recipients of a broadcast with their delivery status. Supports filtering
|
|
1988
|
+
* by delivery status and pagination.
|
|
1989
|
+
*
|
|
1990
|
+
*/
|
|
1991
|
+
export const getWhatsAppBroadcastRecipients = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetWhatsAppBroadcastRecipientsData, ThrowOnError>) => {
|
|
1992
|
+
return (options?.client ?? client).get<GetWhatsAppBroadcastRecipientsResponse, GetWhatsAppBroadcastRecipientsError, ThrowOnError>({
|
|
1993
|
+
...options,
|
|
1994
|
+
url: '/v1/whatsapp/broadcasts/{broadcastId}/recipients'
|
|
1995
|
+
});
|
|
1996
|
+
};
|
|
1997
|
+
|
|
1998
|
+
/**
|
|
1999
|
+
* Add recipients
|
|
2000
|
+
* Add recipients to a draft broadcast. Maximum 1000 recipients per request.
|
|
2001
|
+
* Duplicate phone numbers are automatically skipped.
|
|
2002
|
+
*
|
|
2003
|
+
*/
|
|
2004
|
+
export const addWhatsAppBroadcastRecipients = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<AddWhatsAppBroadcastRecipientsData, ThrowOnError>) => {
|
|
2005
|
+
return (options?.client ?? client).patch<AddWhatsAppBroadcastRecipientsResponse, AddWhatsAppBroadcastRecipientsError, ThrowOnError>({
|
|
2006
|
+
...options,
|
|
2007
|
+
url: '/v1/whatsapp/broadcasts/{broadcastId}/recipients'
|
|
2008
|
+
});
|
|
2009
|
+
};
|
|
2010
|
+
|
|
2011
|
+
/**
|
|
2012
|
+
* Remove recipients
|
|
2013
|
+
* Remove recipients from a draft broadcast by phone number.
|
|
2014
|
+
*/
|
|
2015
|
+
export const removeWhatsAppBroadcastRecipients = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RemoveWhatsAppBroadcastRecipientsData, ThrowOnError>) => {
|
|
2016
|
+
return (options?.client ?? client).delete<RemoveWhatsAppBroadcastRecipientsResponse, RemoveWhatsAppBroadcastRecipientsError, ThrowOnError>({
|
|
2017
|
+
...options,
|
|
2018
|
+
url: '/v1/whatsapp/broadcasts/{broadcastId}/recipients'
|
|
2019
|
+
});
|
|
2020
|
+
};
|
|
2021
|
+
|
|
2022
|
+
/**
|
|
2023
|
+
* Get business profile
|
|
2024
|
+
* Retrieve the WhatsApp Business profile for the account (about, address, description, email, websites, etc.).
|
|
2025
|
+
*/
|
|
2026
|
+
export const getWhatsAppBusinessProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetWhatsAppBusinessProfileData, ThrowOnError>) => {
|
|
2027
|
+
return (options?.client ?? client).get<GetWhatsAppBusinessProfileResponse, GetWhatsAppBusinessProfileError, ThrowOnError>({
|
|
2028
|
+
...options,
|
|
2029
|
+
url: '/v1/whatsapp/business-profile'
|
|
2030
|
+
});
|
|
2031
|
+
};
|
|
2032
|
+
|
|
2033
|
+
/**
|
|
2034
|
+
* Update business profile
|
|
2035
|
+
* Update the WhatsApp Business profile. All fields are optional; only provided fields will be updated.
|
|
2036
|
+
* Constraints: about max 139 chars, description max 512 chars, max 2 websites.
|
|
2037
|
+
*
|
|
2038
|
+
*/
|
|
2039
|
+
export const updateWhatsAppBusinessProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateWhatsAppBusinessProfileData, ThrowOnError>) => {
|
|
2040
|
+
return (options?.client ?? client).post<UpdateWhatsAppBusinessProfileResponse, UpdateWhatsAppBusinessProfileError, ThrowOnError>({
|
|
2041
|
+
...options,
|
|
2042
|
+
url: '/v1/whatsapp/business-profile'
|
|
2043
|
+
});
|
|
2044
|
+
};
|
|
2045
|
+
|
|
2046
|
+
/**
|
|
2047
|
+
* List phone numbers
|
|
2048
|
+
* List all WhatsApp phone numbers purchased by the authenticated user.
|
|
2049
|
+
* By default, released numbers are excluded.
|
|
2050
|
+
*
|
|
2051
|
+
*/
|
|
2052
|
+
export const getWhatsAppPhoneNumbers = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetWhatsAppPhoneNumbersData, ThrowOnError>) => {
|
|
2053
|
+
return (options?.client ?? client).get<GetWhatsAppPhoneNumbersResponse, GetWhatsAppPhoneNumbersError, ThrowOnError>({
|
|
2054
|
+
...options,
|
|
2055
|
+
url: '/v1/whatsapp/phone-numbers'
|
|
2056
|
+
});
|
|
2057
|
+
};
|
|
2058
|
+
|
|
2059
|
+
/**
|
|
2060
|
+
* Purchase phone number
|
|
2061
|
+
* Initiate purchasing a WhatsApp phone number. Payment-first flow: the user does not pick
|
|
2062
|
+
* a specific number. The system either creates a Stripe Checkout Session (first number)
|
|
2063
|
+
* or increments the existing subscription quantity and provisions inline (subsequent numbers).
|
|
2064
|
+
*
|
|
2065
|
+
* Requires a paid plan. The maximum number of phone numbers is determined by the user's plan.
|
|
2066
|
+
*
|
|
2067
|
+
*/
|
|
2068
|
+
export const purchaseWhatsAppPhoneNumber = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<PurchaseWhatsAppPhoneNumberData, ThrowOnError>) => {
|
|
2069
|
+
return (options?.client ?? client).post<PurchaseWhatsAppPhoneNumberResponse, PurchaseWhatsAppPhoneNumberError, ThrowOnError>({
|
|
2070
|
+
...options,
|
|
2071
|
+
url: '/v1/whatsapp/phone-numbers/purchase'
|
|
2072
|
+
});
|
|
2073
|
+
};
|
|
2074
|
+
|
|
2075
|
+
/**
|
|
2076
|
+
* Get phone number
|
|
2077
|
+
* Retrieve the current status of a purchased phone number. Used to poll for
|
|
2078
|
+
* Meta pre-verification completion after purchase.
|
|
2079
|
+
*
|
|
2080
|
+
*/
|
|
2081
|
+
export const getWhatsAppPhoneNumber = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetWhatsAppPhoneNumberData, ThrowOnError>) => {
|
|
2082
|
+
return (options?.client ?? client).get<GetWhatsAppPhoneNumberResponse, GetWhatsAppPhoneNumberError, ThrowOnError>({
|
|
2083
|
+
...options,
|
|
2084
|
+
url: '/v1/whatsapp/phone-numbers/{phoneNumberId}'
|
|
2085
|
+
});
|
|
2086
|
+
};
|
|
2087
|
+
|
|
2088
|
+
/**
|
|
2089
|
+
* Release phone number
|
|
2090
|
+
* Release a purchased phone number. This will:
|
|
2091
|
+
* 1. Disconnect any linked WhatsApp social account
|
|
2092
|
+
* 2. Decrement the Stripe subscription quantity (or cancel if last number)
|
|
2093
|
+
* 3. Release the number from Telnyx
|
|
2094
|
+
* 4. Mark the number as released
|
|
2095
|
+
*
|
|
2096
|
+
*/
|
|
2097
|
+
export const releaseWhatsAppPhoneNumber = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ReleaseWhatsAppPhoneNumberData, ThrowOnError>) => {
|
|
2098
|
+
return (options?.client ?? client).delete<ReleaseWhatsAppPhoneNumberResponse, ReleaseWhatsAppPhoneNumberError, ThrowOnError>({
|
|
2099
|
+
...options,
|
|
2100
|
+
url: '/v1/whatsapp/phone-numbers/{phoneNumberId}'
|
|
2101
|
+
});
|
|
1686
2102
|
};
|