late-sdk 0.0.716 → 0.0.718
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.
- checksums.yaml +4 -4
- data/README.md +81 -0
- data/docs/AccountsApi.md +142 -1
- data/docs/AdCampaignsApi.md +22 -10
- data/docs/AdCreative.md +2 -0
- data/docs/AdDailyMetrics.md +1 -1
- data/docs/AdEngagementCounts.md +4 -4
- data/docs/AdInsightsApi.md +164 -0
- data/docs/AdMetrics.md +1 -1
- data/docs/AdTargetingApi.md +3 -3
- data/docs/AdTreeCampaign.md +1 -1
- data/docs/AddBroadcastRecipientsRequest.md +1 -1
- data/docs/AnalyticsListResponsePostsInner.md +1 -1
- data/docs/AnalyticsListResponsePostsInnerMediaItemsInner.md +24 -0
- data/docs/AnalyticsSinglePostResponseMediaItemsInner.md +7 -3
- data/docs/BillingSnapshot.md +2 -0
- data/docs/BillingSnapshotPlan.md +3 -1
- data/docs/Blog.md +24 -0
- data/docs/BlogArticle.md +44 -0
- data/docs/BlogArticleImage.md +20 -0
- data/docs/BlogsApi.md +747 -0
- data/docs/BlueskyPlatformData.md +2 -0
- data/docs/BoostPostRequest.md +2 -2
- data/docs/CampaignAnalyticsResponseAnalyticsDailyInner.md +1 -1
- data/docs/CommentsApi.md +8 -8
- data/docs/ConnectApi.md +149 -1
- data/docs/ConnectShopifyWithToken200Response.md +18 -0
- data/docs/ConnectShopifyWithToken200ResponseAccount.md +26 -0
- data/docs/ConnectShopifyWithTokenRequest.md +22 -0
- data/docs/CreateBlog201Response.md +20 -0
- data/docs/CreateBlogArticle201Response.md +20 -0
- data/docs/CreateBlogArticleRequest.md +36 -0
- data/docs/CreateBlogArticleRequestImage.md +20 -0
- data/docs/CreateBlogArticleRequestSeo.md +20 -0
- data/docs/CreateBlogRequest.md +20 -0
- data/docs/CreateCallAdRequest.md +1 -1
- data/docs/CreateInboxConversationRequest.md +2 -0
- data/docs/CreateMessagingAdRequest.md +1 -1
- data/docs/CreatePostRequest.md +1 -1
- data/docs/CreateStandaloneAdRequest.md +10 -6
- data/docs/CreateStandaloneAdRequestPromotedObject.md +2 -2
- data/docs/CreateStandaloneAdRequestVideo.md +1 -1
- data/docs/CtwaAdRequestBody.md +1 -1
- data/docs/ExternalPostMediaItem.md +7 -3
- data/docs/ExternalPostSummary.md +0 -2
- data/docs/ExternalPostSummaryAnalytics.md +1 -1
- data/docs/GetAccountHealth200Response.md +3 -1
- data/docs/GetAccountHealth200ResponsePlatformConnection.md +24 -0
- data/docs/GetAccountHealth200ResponsePlatformConnectionMetaError.md +22 -0
- data/docs/GetAdAnalytics202Response.md +1 -1
- data/docs/GetAdTree202Response.md +1 -1
- data/docs/GetAdsTimeline202Response.md +1 -1
- data/docs/GetBlueskySettings200Response.md +18 -0
- data/docs/GetCampaignAnalytics202Response.md +1 -1
- data/docs/GetInboxPostComments200ResponseCommentsInner.md +4 -2
- data/docs/GetLinkedInPostAnalytics200ResponseAnalytics.md +1 -1
- data/docs/GetPhoneNumberKycForm200Response.md +3 -1
- data/docs/GetWhatsAppNumberKycForm200Response.md +3 -1
- data/docs/LinkedInAggregateAnalyticsTotalResponseAnalytics.md +1 -1
- data/docs/LinkedInPlatformData.md +4 -2
- data/docs/LinkedInPlatformDataPoll.md +22 -0
- data/docs/ListAds202Response.md +1 -1
- data/docs/ListBlogArticles200Response.md +22 -0
- data/docs/ListBlogs200Response.md +22 -0
- data/docs/ListInboxConversations200ResponseDataInnerMetadata.md +3 -3
- data/docs/ListLeads200ResponseLeadsInner.md +3 -3
- data/docs/ListLocalServicesLeadConversations200Response.md +22 -0
- data/docs/ListLocalServicesLeadConversations200ResponseDataInner.md +28 -0
- data/docs/ListLocalServicesLeadConversations200ResponseDataInnerMessage.md +20 -0
- data/docs/ListLocalServicesLeadConversations200ResponseDataInnerPhoneCall.md +20 -0
- data/docs/ListLocalServicesLeads200Response.md +22 -0
- data/docs/ListLocalServicesLeads200ResponseDataInner.md +38 -0
- data/docs/ListLocalServicesLeads200ResponseDataInnerContact.md +22 -0
- data/docs/ListPhoneNumbers200ResponseConnectedInner.md +3 -1
- data/docs/ListPhoneNumbers200ResponseNumbersInner.md +2 -0
- data/docs/ListWhatsAppAccountEvents200Response.md +18 -0
- data/docs/ListWhatsAppAccountEvents200ResponseEventsInner.md +28 -0
- data/docs/MessagesApi.md +4 -4
- data/docs/OnVerificationApprovedRequest.md +1 -1
- data/docs/OnVerificationFailedRequest.md +1 -1
- data/docs/OnWhatsAppAutomaticEventRequest.md +1 -1
- data/docs/OnWhatsAppNumberActionRequiredRequest.md +1 -1
- data/docs/OnWhatsAppNumberActivatedRequest.md +1 -1
- data/docs/OnWhatsAppNumberDeclinedRequest.md +1 -1
- data/docs/OnWhatsAppNumberKycSubmittedRequest.md +1 -1
- data/docs/OnWhatsAppNumberReactivatedRequest.md +1 -1
- data/docs/OnWhatsAppNumberReleasedRequest.md +1 -1
- data/docs/OnWhatsAppNumberSuspendedRequest.md +1 -1
- data/docs/OnWhatsAppNumberVerificationRequiredRequest.md +1 -1
- data/docs/PlatformTarget.md +2 -2
- data/docs/PostAnalytics.md +3 -3
- data/docs/PostsApi.md +1 -1
- data/docs/SMSApi.md +1 -1
- data/docs/SearchAdTargeting200ResponseResultsInner.md +1 -1
- data/docs/SendInboxMessageRequest.md +4 -2
- data/docs/SubmitPhoneNumberKycRequest.md +1 -1
- data/docs/SubmitPhoneNumberKycRequestAddress.md +2 -0
- data/docs/SubmitWhatsAppNumberKycRequest.md +1 -1
- data/docs/TwitterPlatformData.md +2 -0
- data/docs/UpdateAdCampaignStatus200Response.md +6 -6
- data/docs/UpdateAdSet200Response.md +7 -3
- data/docs/UpdateAdSetRequest.md +1 -1
- data/docs/UpdateAdSetStatus200Response.md +9 -3
- data/docs/UpdateBlogArticleRequest.md +36 -0
- data/docs/UpdateBlogRequest.md +20 -0
- data/docs/UpdateBlueskySettingsRequest.md +18 -0
- data/docs/ValidatePhoneNumberKycAddressRequest.md +2 -0
- data/docs/WebhookEventsApi.md +138 -0
- data/docs/WebhookPayloadAccountAdsInitialSyncCompleted.md +1 -1
- data/docs/WebhookPayloadAccountConnected.md +1 -1
- data/docs/WebhookPayloadAccountDisconnected.md +1 -1
- data/docs/WebhookPayloadAdStatusChanged.md +1 -1
- data/docs/WebhookPayloadCallEnded.md +1 -1
- data/docs/WebhookPayloadCallEndedCall.md +4 -0
- data/docs/WebhookPayloadCallFailed.md +1 -1
- data/docs/WebhookPayloadCallPermissionRequest.md +1 -1
- data/docs/WebhookPayloadCallReceived.md +1 -1
- data/docs/WebhookPayloadComment.md +1 -1
- data/docs/WebhookPayloadCommentCommentAuthor.md +2 -0
- data/docs/WebhookPayloadConversationStarted.md +1 -1
- data/docs/WebhookPayloadExternalPost.md +1 -1
- data/docs/WebhookPayloadLead.md +1 -1
- data/docs/WebhookPayloadMessage.md +1 -1
- data/docs/WebhookPayloadMessageDeleted.md +1 -1
- data/docs/WebhookPayloadMessageDeliveryStatus.md +1 -1
- data/docs/WebhookPayloadMessageEdited.md +1 -1
- data/docs/WebhookPayloadMessageMetadata.md +5 -1
- data/docs/WebhookPayloadMessageMetadataReferral.md +5 -3
- data/docs/WebhookPayloadMessageMetadataUnsupported.md +22 -0
- data/docs/WebhookPayloadMessageSent.md +1 -1
- data/docs/WebhookPayloadPost.md +1 -1
- data/docs/WebhookPayloadPostPlatform.md +1 -1
- data/docs/WebhookPayloadReaction.md +1 -1
- data/docs/WebhookPayloadReferral.md +30 -0
- data/docs/WebhookPayloadReferralReferral.md +28 -0
- data/docs/WebhookPayloadReferralReferralAdsContextData.md +28 -0
- data/docs/WebhookPayloadReferralSender.md +20 -0
- data/docs/WebhookPayloadReviewNew.md +1 -1
- data/docs/WebhookPayloadReviewUpdated.md +1 -1
- data/docs/WebhookPayloadTest.md +1 -1
- data/docs/WebhookPayloadWhatsAppTemplateCategoryUpdated.md +26 -0
- data/docs/WebhookPayloadWhatsAppTemplateCategoryUpdatedTemplate.md +32 -0
- data/docs/WebhookPayloadWhatsAppTemplateStatusUpdated.md +1 -1
- data/docs/WhatsAppApi.md +74 -0
- data/docs/WorkflowNode.md +3 -1
- data/docs/XArticle.md +24 -0
- data/docs/XArticleBlock.md +28 -0
- data/docs/XArticleBlockData.md +24 -0
- data/docs/XArticleContentState.md +20 -0
- data/docs/XArticleCover.md +20 -0
- data/docs/XArticleEntity.md +57 -0
- data/docs/XArticleEntityOneOf.md +20 -0
- data/docs/XArticleEntityOneOf1.md +20 -0
- data/docs/XArticleEntityOneOf1Value.md +22 -0
- data/docs/XArticleEntityOneOf1ValueData.md +18 -0
- data/docs/XArticleEntityOneOf2.md +20 -0
- data/docs/XArticleEntityOneOf2Value.md +22 -0
- data/docs/XArticleEntityOneOf2ValueData.md +22 -0
- data/docs/XArticleEntityOneOf3.md +20 -0
- data/docs/XArticleEntityOneOf3Value.md +22 -0
- data/docs/XArticleEntityOneOf3ValueData.md +18 -0
- data/docs/XArticleEntityOneOf4.md +20 -0
- data/docs/XArticleEntityOneOf4Value.md +22 -0
- data/docs/XArticleEntityOneOf4ValueData.md +18 -0
- data/docs/XArticleEntityOneOf5.md +20 -0
- data/docs/XArticleEntityOneOf5Value.md +22 -0
- data/docs/XArticleEntityOneOfValue.md +22 -0
- data/docs/XArticleEntityOneOfValueData.md +18 -0
- data/docs/XArticleEntityRange.md +22 -0
- data/docs/XArticleInlineStyleRange.md +22 -0
- data/docs/XArticleTextRange.md +22 -0
- data/docs/YouTubeVideoRetentionResponse.md +1 -1
- data/docs/YouTubeVideoRetentionResponseRetentionCurveInner.md +2 -2
- data/lib/zernio-sdk/api/accounts_api.rb +139 -2
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +35 -8
- data/lib/zernio-sdk/api/ad_insights_api.rb +165 -0
- data/lib/zernio-sdk/api/ad_targeting_api.rb +5 -5
- data/lib/zernio-sdk/api/blogs_api.rb +845 -0
- data/lib/zernio-sdk/api/comments_api.rb +10 -10
- data/lib/zernio-sdk/api/connect_api.rb +149 -0
- data/lib/zernio-sdk/api/messages_api.rb +4 -4
- data/lib/zernio-sdk/api/posts_api.rb +2 -2
- data/lib/zernio-sdk/api/sms_api.rb +2 -2
- data/lib/zernio-sdk/api/webhook_events_api.rb +132 -0
- data/lib/zernio-sdk/api/whats_app_api.rb +75 -0
- data/lib/zernio-sdk/models/account_with_follower_stats.rb +2 -2
- data/lib/zernio-sdk/models/ad_creative.rb +12 -1
- data/lib/zernio-sdk/models/ad_daily_metrics.rb +1 -1
- data/lib/zernio-sdk/models/ad_engagement_counts.rb +5 -5
- data/lib/zernio-sdk/models/ad_metrics.rb +1 -1
- data/lib/zernio-sdk/models/ad_tree_campaign.rb +1 -1
- data/lib/zernio-sdk/models/add_broadcast_recipients_request.rb +1 -1
- data/lib/zernio-sdk/models/analytics_list_response_posts_inner.rb +1 -1
- data/lib/zernio-sdk/models/analytics_list_response_posts_inner_media_items_inner.rb +211 -0
- data/lib/zernio-sdk/models/analytics_single_post_response_media_items_inner.rb +52 -6
- data/lib/zernio-sdk/models/billing_snapshot.rb +14 -3
- data/lib/zernio-sdk/models/billing_snapshot_plan.rb +14 -4
- data/lib/zernio-sdk/models/blog.rb +211 -0
- data/lib/zernio-sdk/models/blog_article.rb +315 -0
- data/lib/zernio-sdk/models/blog_article_image.rb +158 -0
- data/lib/zernio-sdk/models/bluesky_platform_data.rb +42 -2
- data/lib/zernio-sdk/models/boost_post_request.rb +30 -1
- data/lib/zernio-sdk/models/campaign_analytics_response_analytics_daily_inner.rb +1 -1
- data/lib/zernio-sdk/models/connect_shopify_with_token200_response.rb +147 -0
- data/lib/zernio-sdk/models/connect_shopify_with_token200_response_account.rb +218 -0
- data/lib/zernio-sdk/models/connect_shopify_with_token_request.rb +219 -0
- data/lib/zernio-sdk/models/create_blog201_response.rb +190 -0
- data/lib/zernio-sdk/models/create_blog_article201_response.rb +190 -0
- data/lib/zernio-sdk/models/create_blog_article_request.rb +262 -0
- data/lib/zernio-sdk/models/create_blog_article_request_image.rb +174 -0
- data/lib/zernio-sdk/models/create_blog_article_request_seo.rb +157 -0
- data/lib/zernio-sdk/models/create_blog_request.rb +202 -0
- data/lib/zernio-sdk/models/create_call_ad_request.rb +1 -1
- data/lib/zernio-sdk/models/create_inbox_conversation_request.rb +13 -1
- data/lib/zernio-sdk/models/create_messaging_ad_request.rb +1 -1
- data/lib/zernio-sdk/models/create_post_request.rb +1 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +67 -6
- data/lib/zernio-sdk/models/create_standalone_ad_request_creatives_inner_video.rb +1 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request_promoted_object.rb +3 -3
- data/lib/zernio-sdk/models/create_standalone_ad_request_video.rb +1 -1
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +1 -1
- data/lib/zernio-sdk/models/external_post_media_item.rb +48 -16
- data/lib/zernio-sdk/models/external_post_summary.rb +1 -11
- data/lib/zernio-sdk/models/external_post_summary_analytics.rb +1 -0
- data/lib/zernio-sdk/models/facebook_settings.rb +5 -5
- data/lib/zernio-sdk/models/get_account_health200_response.rb +13 -4
- data/lib/zernio-sdk/models/get_account_health200_response_platform_connection.rb +213 -0
- data/lib/zernio-sdk/models/get_account_health200_response_platform_connection_meta_error.rb +168 -0
- data/lib/zernio-sdk/models/get_ad_analytics202_response.rb +6 -29
- data/lib/zernio-sdk/models/get_ad_tree202_response.rb +6 -29
- data/lib/zernio-sdk/models/get_ads_timeline202_response.rb +6 -29
- data/lib/zernio-sdk/models/get_bluesky_settings200_response.rb +150 -0
- data/lib/zernio-sdk/models/get_campaign_analytics202_response.rb +6 -29
- data/lib/zernio-sdk/models/get_inbox_post_comments200_response_comments_inner.rb +13 -2
- data/lib/zernio-sdk/models/get_linked_in_post_analytics200_response_analytics.rb +1 -1
- data/lib/zernio-sdk/models/get_phone_number_kyc_form200_response.rb +14 -4
- data/lib/zernio-sdk/models/get_whats_app_number_kyc_form200_response.rb +14 -4
- data/lib/zernio-sdk/models/inbox_webhook_message.rb +2 -2
- data/lib/zernio-sdk/models/linked_in_aggregate_analytics_total_response_analytics.rb +1 -1
- data/lib/zernio-sdk/models/linked_in_platform_data.rb +15 -6
- data/lib/zernio-sdk/models/linked_in_platform_data_poll.rb +277 -0
- data/lib/zernio-sdk/models/list_ads202_response.rb +6 -29
- data/lib/zernio-sdk/models/list_blog_articles200_response.rb +203 -0
- data/lib/zernio-sdk/models/list_blogs200_response.rb +203 -0
- data/lib/zernio-sdk/models/list_broadcast_recipients200_response_recipients_inner.rb +1 -0
- data/lib/zernio-sdk/models/list_inbox_conversations200_response_data_inner_metadata.rb +4 -4
- data/lib/zernio-sdk/models/list_leads200_response_leads_inner.rb +3 -2
- data/lib/zernio-sdk/models/list_local_services_lead_conversations200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_local_services_lead_conversations200_response_data_inner.rb +198 -0
- data/lib/zernio-sdk/models/list_local_services_lead_conversations200_response_data_inner_message.rb +160 -0
- data/lib/zernio-sdk/models/list_local_services_lead_conversations200_response_data_inner_phone_call.rb +159 -0
- data/lib/zernio-sdk/models/list_local_services_leads200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_local_services_leads200_response_data_inner.rb +249 -0
- data/lib/zernio-sdk/models/list_local_services_leads200_response_data_inner_contact.rb +169 -0
- data/lib/zernio-sdk/models/list_phone_numbers200_response_connected_inner.rb +15 -5
- data/lib/zernio-sdk/models/list_phone_numbers200_response_numbers_inner.rb +11 -1
- data/lib/zernio-sdk/models/list_sequence_enrollments200_response_enrollments_inner.rb +3 -0
- data/lib/zernio-sdk/models/list_whats_app_account_events200_response.rb +149 -0
- data/lib/zernio-sdk/models/list_whats_app_account_events200_response_events_inner.rb +228 -0
- data/lib/zernio-sdk/models/on_verification_approved_request.rb +1 -0
- data/lib/zernio-sdk/models/on_verification_failed_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_automatic_event_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_action_required_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_activated_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_declined_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_kyc_submitted_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_reactivated_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_released_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_suspended_request.rb +1 -0
- data/lib/zernio-sdk/models/on_whats_app_number_verification_required_request.rb +1 -0
- data/lib/zernio-sdk/models/platform_target.rb +5 -4
- data/lib/zernio-sdk/models/post_analytics.rb +2 -1
- data/lib/zernio-sdk/models/search_ad_targeting200_response_results_inner.rb +1 -1
- data/lib/zernio-sdk/models/send_inbox_message_request.rb +15 -3
- data/lib/zernio-sdk/models/social_account.rb +2 -2
- data/lib/zernio-sdk/models/submit_phone_number_kyc_request.rb +1 -1
- data/lib/zernio-sdk/models/submit_phone_number_kyc_request_address.rb +11 -1
- data/lib/zernio-sdk/models/submit_whats_app_number_kyc_request.rb +1 -1
- data/lib/zernio-sdk/models/twitter_platform_data.rb +11 -2
- data/lib/zernio-sdk/models/update_ad_campaign_status200_response.rb +50 -15
- data/lib/zernio-sdk/models/update_ad_set200_response.rb +26 -1
- data/lib/zernio-sdk/models/update_ad_set_request.rb +1 -1
- data/lib/zernio-sdk/models/update_ad_set_status200_response.rb +72 -4
- data/lib/zernio-sdk/models/update_blog_article_request.rb +257 -0
- data/lib/zernio-sdk/models/update_blog_request.rb +196 -0
- data/lib/zernio-sdk/models/update_bluesky_settings_request.rb +176 -0
- data/lib/zernio-sdk/models/validate_phone_number_kyc_address_request.rb +11 -1
- data/lib/zernio-sdk/models/webhook_payload_account_ads_initial_sync_completed.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_account_connected.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_account_disconnected.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_ad_status_changed.rb +1 -1
- data/lib/zernio-sdk/models/webhook_payload_call_ended.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_call_ended_call.rb +23 -1
- data/lib/zernio-sdk/models/webhook_payload_call_failed.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_call_permission_request.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_call_received.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_comment.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_comment_comment_author.rb +11 -1
- data/lib/zernio-sdk/models/webhook_payload_conversation_started.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_external_post.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_lead.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message_deleted.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message_delivery_status.rb +2 -1
- data/lib/zernio-sdk/models/webhook_payload_message_edited.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_message_message.rb +2 -2
- data/lib/zernio-sdk/models/webhook_payload_message_metadata.rb +23 -4
- data/lib/zernio-sdk/models/webhook_payload_message_metadata_referral.rb +15 -5
- data/lib/zernio-sdk/models/webhook_payload_message_metadata_unsupported.rb +169 -0
- data/lib/zernio-sdk/models/webhook_payload_message_sent.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_post.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_post_platform.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_reaction.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_reaction_reaction_sender.rb +1 -1
- data/lib/zernio-sdk/models/webhook_payload_referral.rb +347 -0
- data/lib/zernio-sdk/models/webhook_payload_referral_referral.rb +198 -0
- data/lib/zernio-sdk/models/webhook_payload_referral_referral_ads_context_data.rb +193 -0
- data/lib/zernio-sdk/models/webhook_payload_referral_sender.rb +176 -0
- data/lib/zernio-sdk/models/webhook_payload_review_new.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_review_updated.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_test.rb +1 -0
- data/lib/zernio-sdk/models/webhook_payload_whats_app_template_category_updated.rb +295 -0
- data/lib/zernio-sdk/models/webhook_payload_whats_app_template_category_updated_template.rb +353 -0
- data/lib/zernio-sdk/models/webhook_payload_whats_app_template_status_updated.rb +1 -1
- data/lib/zernio-sdk/models/workflow_node.rb +42 -4
- data/lib/zernio-sdk/models/x_article.rb +255 -0
- data/lib/zernio-sdk/models/x_article_block.rb +273 -0
- data/lib/zernio-sdk/models/x_article_block_data.rb +182 -0
- data/lib/zernio-sdk/models/x_article_content_state.rb +204 -0
- data/lib/zernio-sdk/models/x_article_cover.rb +204 -0
- data/lib/zernio-sdk/models/x_article_entity.rb +109 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of1.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of1_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of1_value_data.rb +164 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of2.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of2_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of2_value_data.rb +214 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of3.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of3_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of3_value_data.rb +173 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of4.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of4_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of4_value_data.rb +164 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of5.rb +199 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of5_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of_value.rb +242 -0
- data/lib/zernio-sdk/models/x_article_entity_one_of_value_data.rb +173 -0
- data/lib/zernio-sdk/models/x_article_entity_range.rb +245 -0
- data/lib/zernio-sdk/models/x_article_inline_style_range.rb +259 -0
- data/lib/zernio-sdk/models/x_article_text_range.rb +237 -0
- data/lib/zernio-sdk/models/you_tube_video_retention_response.rb +1 -1
- data/lib/zernio-sdk/models/you_tube_video_retention_response_retention_curve_inner.rb +2 -2
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +65 -0
- data/openapi.yaml +1956 -165
- data/spec/api/accounts_api_spec.rb +26 -1
- data/spec/api/ad_campaigns_api_spec.rb +9 -4
- data/spec/api/ad_insights_api_spec.rb +34 -0
- data/spec/api/ad_targeting_api_spec.rb +2 -2
- data/spec/api/blogs_api_spec.rb +174 -0
- data/spec/api/comments_api_spec.rb +5 -5
- data/spec/api/connect_api_spec.rb +27 -0
- data/spec/api/messages_api_spec.rb +2 -2
- data/spec/api/posts_api_spec.rb +1 -1
- data/spec/api/sms_api_spec.rb +1 -1
- data/spec/api/whats_app_api_spec.rb +13 -0
- data/spec/models/account_with_follower_stats_spec.rb +1 -1
- data/spec/models/ad_creative_spec.rb +6 -0
- data/spec/models/analytics_list_response_posts_inner_media_items_inner_spec.rb +58 -0
- data/spec/models/analytics_single_post_response_media_items_inner_spec.rb +20 -0
- data/spec/models/billing_snapshot_plan_spec.rb +6 -0
- data/spec/models/billing_snapshot_spec.rb +7 -1
- data/spec/models/blog_article_image_spec.rb +42 -0
- data/spec/models/blog_article_spec.rb +118 -0
- data/spec/models/blog_spec.rb +58 -0
- data/spec/models/bluesky_platform_data_spec.rb +6 -0
- data/spec/models/connect_shopify_with_token200_response_account_spec.rb +64 -0
- data/spec/models/connect_shopify_with_token200_response_spec.rb +36 -0
- data/spec/models/connect_shopify_with_token_request_spec.rb +48 -0
- data/spec/models/create_blog201_response_spec.rb +46 -0
- data/spec/models/create_blog_article201_response_spec.rb +46 -0
- data/spec/models/create_blog_article_request_image_spec.rb +42 -0
- data/spec/models/create_blog_article_request_seo_spec.rb +42 -0
- data/spec/models/create_blog_article_request_spec.rb +90 -0
- data/spec/models/create_blog_request_spec.rb +42 -0
- data/spec/models/create_inbox_conversation_request_spec.rb +6 -0
- data/spec/models/create_standalone_ad_request_spec.rb +16 -0
- data/spec/models/create_webhook_settings_request_spec.rb +1 -1
- data/spec/models/external_post_media_item_spec.rb +20 -0
- data/spec/models/external_post_summary_spec.rb +0 -6
- data/spec/models/get_account_health200_response_platform_connection_meta_error_spec.rb +48 -0
- data/spec/models/get_account_health200_response_platform_connection_spec.rb +58 -0
- data/spec/models/get_account_health200_response_spec.rb +6 -0
- data/spec/models/get_ad_analytics202_response_spec.rb +0 -4
- data/spec/models/get_ad_tree202_response_spec.rb +0 -4
- data/spec/models/get_ads_timeline202_response_spec.rb +0 -4
- data/spec/models/get_bluesky_settings200_response_spec.rb +36 -0
- data/spec/models/get_campaign_analytics202_response_spec.rb +0 -4
- data/spec/models/get_inbox_post_comments200_response_comments_inner_spec.rb +6 -0
- data/spec/models/get_phone_number_kyc_form200_response_spec.rb +6 -0
- data/spec/models/get_whats_app_number_kyc_form200_response_spec.rb +6 -0
- data/spec/models/inbox_webhook_message_spec.rb +1 -1
- data/spec/models/linked_in_platform_data_poll_spec.rb +52 -0
- data/spec/models/linked_in_platform_data_spec.rb +6 -0
- data/spec/models/list_ads202_response_spec.rb +0 -4
- data/spec/models/list_blog_articles200_response_spec.rb +52 -0
- data/spec/models/list_blogs200_response_spec.rb +52 -0
- data/spec/models/list_local_services_lead_conversations200_response_data_inner_message_spec.rb +42 -0
- data/spec/models/list_local_services_lead_conversations200_response_data_inner_phone_call_spec.rb +42 -0
- data/spec/models/list_local_services_lead_conversations200_response_data_inner_spec.rb +66 -0
- data/spec/models/list_local_services_lead_conversations200_response_spec.rb +48 -0
- data/spec/models/list_local_services_leads200_response_data_inner_contact_spec.rb +48 -0
- data/spec/models/list_local_services_leads200_response_data_inner_spec.rb +96 -0
- data/spec/models/list_local_services_leads200_response_spec.rb +48 -0
- data/spec/models/list_phone_numbers200_response_connected_inner_spec.rb +6 -0
- data/spec/models/list_phone_numbers200_response_numbers_inner_spec.rb +6 -0
- data/spec/models/list_whats_app_account_events200_response_events_inner_spec.rb +70 -0
- data/spec/models/list_whats_app_account_events200_response_spec.rb +36 -0
- data/spec/models/platform_target_spec.rb +1 -1
- data/spec/models/send_inbox_message_request_spec.rb +6 -0
- data/spec/models/social_account_spec.rb +1 -1
- data/spec/models/submit_phone_number_kyc_request_address_spec.rb +6 -0
- data/spec/models/twitter_platform_data_spec.rb +6 -0
- data/spec/models/update_ad_campaign_status200_response_spec.rb +8 -4
- data/spec/models/update_ad_set200_response_spec.rb +12 -0
- data/spec/models/update_ad_set_status200_response_spec.rb +22 -0
- data/spec/models/update_blog_article_request_spec.rb +90 -0
- data/spec/models/update_blog_request_spec.rb +42 -0
- data/spec/models/update_bluesky_settings_request_spec.rb +36 -0
- data/spec/models/update_webhook_settings_request_spec.rb +1 -1
- data/spec/models/validate_phone_number_kyc_address_request_spec.rb +6 -0
- data/spec/models/webhook_payload_call_ended_call_spec.rb +12 -0
- data/spec/models/webhook_payload_comment_comment_author_spec.rb +6 -0
- data/spec/models/webhook_payload_message_message_spec.rb +1 -1
- data/spec/models/webhook_payload_message_metadata_referral_spec.rb +6 -0
- data/spec/models/webhook_payload_message_metadata_spec.rb +12 -0
- data/spec/models/webhook_payload_message_metadata_unsupported_spec.rb +48 -0
- data/spec/models/webhook_payload_referral_referral_ads_context_data_spec.rb +66 -0
- data/spec/models/webhook_payload_referral_referral_spec.rb +66 -0
- data/spec/models/webhook_payload_referral_sender_spec.rb +42 -0
- data/spec/models/webhook_payload_referral_spec.rb +76 -0
- data/spec/models/webhook_payload_whats_app_template_category_updated_spec.rb +64 -0
- data/spec/models/webhook_payload_whats_app_template_category_updated_template_spec.rb +94 -0
- data/spec/models/webhook_spec.rb +1 -1
- data/spec/models/workflow_node_spec.rb +6 -0
- data/spec/models/x_article_block_data_spec.rb +54 -0
- data/spec/models/x_article_block_spec.rb +70 -0
- data/spec/models/x_article_content_state_spec.rb +42 -0
- data/spec/models/x_article_cover_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of1_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of1_value_data_spec.rb +36 -0
- data/spec/models/x_article_entity_one_of1_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of2_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of2_value_data_spec.rb +48 -0
- data/spec/models/x_article_entity_one_of2_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of3_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of3_value_data_spec.rb +36 -0
- data/spec/models/x_article_entity_one_of3_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of4_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of4_value_data_spec.rb +36 -0
- data/spec/models/x_article_entity_one_of4_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of5_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of5_value_spec.rb +56 -0
- data/spec/models/x_article_entity_one_of_spec.rb +42 -0
- data/spec/models/x_article_entity_one_of_value_data_spec.rb +36 -0
- data/spec/models/x_article_entity_one_of_value_spec.rb +56 -0
- data/spec/models/x_article_entity_range_spec.rb +48 -0
- data/spec/models/x_article_entity_spec.rb +32 -0
- data/spec/models/x_article_inline_style_range_spec.rb +52 -0
- data/spec/models/x_article_spec.rb +58 -0
- data/spec/models/x_article_text_range_spec.rb +48 -0
- data/zernio-sdk-0.0.718.gem +0 -0
- metadata +1867 -1607
- data/zernio-sdk-0.0.716.gem +0 -0
|
@@ -23,7 +23,7 @@ module Zernio
|
|
|
23
23
|
# Delete a comment on a post. Supported by Facebook, Instagram, Bluesky, Reddit, YouTube, and LinkedIn. Requires accountId and commentId query parameters.
|
|
24
24
|
# @param post_id [String] Zernio post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.
|
|
25
25
|
# @param account_id [String]
|
|
26
|
-
# @param comment_id [String]
|
|
26
|
+
# @param comment_id [String] For LinkedIn, accepts either the numeric comment ID or the composite comment URN returned by the comments listing (e.g. urn:li:comment:(threadUrn,id))
|
|
27
27
|
# @param [Hash] opts the optional parameters
|
|
28
28
|
# @return [DeleteInboxComment200Response]
|
|
29
29
|
def delete_inbox_comment(post_id, account_id, comment_id, opts = {})
|
|
@@ -35,7 +35,7 @@ module Zernio
|
|
|
35
35
|
# Delete a comment on a post. Supported by Facebook, Instagram, Bluesky, Reddit, YouTube, and LinkedIn. Requires accountId and commentId query parameters.
|
|
36
36
|
# @param post_id [String] Zernio post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.
|
|
37
37
|
# @param account_id [String]
|
|
38
|
-
# @param comment_id [String]
|
|
38
|
+
# @param comment_id [String] For LinkedIn, accepts either the numeric comment ID or the composite comment URN returned by the comments listing (e.g. urn:li:comment:(threadUrn,id))
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [Array<(DeleteInboxComment200Response, Integer, Hash)>] DeleteInboxComment200Response data, response status code and response headers
|
|
41
41
|
def delete_inbox_comment_with_http_info(post_id, account_id, comment_id, opts = {})
|
|
@@ -177,13 +177,13 @@ module Zernio
|
|
|
177
177
|
end
|
|
178
178
|
|
|
179
179
|
# Get post comments
|
|
180
|
-
# Fetch comments for a specific post. Requires accountId query parameter.
|
|
181
|
-
# @param post_id [String] Zernio post ID or platform-specific post ID. Zernio IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID.
|
|
180
|
+
# Fetch comments for a specific post. Requires accountId query parameter. On Facebook and Instagram, passing a COMMENT id as `postId` is also supported and returns that comment's replies instead of the post's top-level comments. This is not available on YouTube, where `postId` must be a video id.
|
|
181
|
+
# @param post_id [String] Zernio post ID or platform-specific post ID. Zernio IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID. On Facebook and Instagram, a comment ID is also accepted here and returns that comment's replies.
|
|
182
182
|
# @param account_id [String]
|
|
183
183
|
# @param [Hash] opts the optional parameters
|
|
184
184
|
# @option opts [String] :subreddit (Reddit only) Subreddit name
|
|
185
185
|
# @option opts [Integer] :limit Maximum number of comments to return (default to 25)
|
|
186
|
-
# @option opts [String] :cursor Pagination cursor
|
|
186
|
+
# @option opts [String] :cursor Pagination cursor, returned by a previous call as `pagination.cursor`. This is the platform's own opaque paging value passed through verbatim: never construct, decode or validate it client-side.
|
|
187
187
|
# @option opts [String] :comment_id (Reddit only) Get replies to a specific comment
|
|
188
188
|
# @return [GetInboxPostComments200Response]
|
|
189
189
|
def get_inbox_post_comments(post_id, account_id, opts = {})
|
|
@@ -192,13 +192,13 @@ module Zernio
|
|
|
192
192
|
end
|
|
193
193
|
|
|
194
194
|
# Get post comments
|
|
195
|
-
# Fetch comments for a specific post. Requires accountId query parameter.
|
|
196
|
-
# @param post_id [String] Zernio post ID or platform-specific post ID. Zernio IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID.
|
|
195
|
+
# Fetch comments for a specific post. Requires accountId query parameter. On Facebook and Instagram, passing a COMMENT id as `postId` is also supported and returns that comment's replies instead of the post's top-level comments. This is not available on YouTube, where `postId` must be a video id.
|
|
196
|
+
# @param post_id [String] Zernio post ID or platform-specific post ID. Zernio IDs are auto-resolved. LinkedIn third-party posts accept full activity URN or numeric ID. On Facebook and Instagram, a comment ID is also accepted here and returns that comment's replies.
|
|
197
197
|
# @param account_id [String]
|
|
198
198
|
# @param [Hash] opts the optional parameters
|
|
199
199
|
# @option opts [String] :subreddit (Reddit only) Subreddit name
|
|
200
200
|
# @option opts [Integer] :limit Maximum number of comments to return (default to 25)
|
|
201
|
-
# @option opts [String] :cursor Pagination cursor
|
|
201
|
+
# @option opts [String] :cursor Pagination cursor, returned by a previous call as `pagination.cursor`. This is the platform's own opaque paging value passed through verbatim: never construct, decode or validate it client-side.
|
|
202
202
|
# @option opts [String] :comment_id (Reddit only) Get replies to a specific comment
|
|
203
203
|
# @return [Array<(GetInboxPostComments200Response, Integer, Hash)>] GetInboxPostComments200Response data, response status code and response headers
|
|
204
204
|
def get_inbox_post_comments_with_http_info(post_id, account_id, opts = {})
|
|
@@ -501,7 +501,7 @@ module Zernio
|
|
|
501
501
|
end
|
|
502
502
|
|
|
503
503
|
# List commented posts
|
|
504
|
-
# Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts. For users with the Ads add-on (Metronome plans always qualify), the user's Meta ads (boosted/dark posts) are included too. There's one row per (ad, placement-with-comments): an ad that runs on both Facebook feed and Instagram feed produces up to two rows (the Page dark post and the IG media have separate comment threads), each flagged `isAd: true` with `adId` and `placement` (`id` is `{adId}:{placement}`). Use `?platform=metaads` to return *only* ad rows; passing `facebook`/`instagram` returns *organic* posts only (no ads); omitting `platform` returns both. Fetch a row's thread from GET /v1/ads/{adId}/comments?placement={placement}. Ad comment counts are read with the Marketing API token (Facebook side) or the connected Instagram account's token (Instagram side); a row whose count can't be read is omitted. Pagination walks each account's platform listing. Following `nextCursor` reaches past the first page on Facebook
|
|
504
|
+
# Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts. For users with the Ads add-on (Metronome plans always qualify), the user's Meta ads (boosted/dark posts) are included too. There's one row per (ad, placement-with-comments): an ad that runs on both Facebook feed and Instagram feed produces up to two rows (the Page dark post and the IG media have separate comment threads), each flagged `isAd: true` with `adId` and `placement` (`id` is `{adId}:{placement}`). Use `?platform=metaads` to return *only* ad rows; passing `facebook`/`instagram` returns *organic* posts only (no ads); omitting `platform` returns both. Fetch a row's thread from GET /v1/ads/{adId}/comments?placement={placement}. Ad comment counts are read with the Marketing API token (Facebook side) or the connected Instagram account's token (Instagram side); a row whose count can't be read is omitted. Pagination walks each account's platform listing. Following `nextCursor` reaches past the first page on Facebook, Instagram, Threads, LinkedIn and YouTube, since they are the platforms that support a server-side date window; on the others the listing stops at its first page. Cursor pagination is only coherent for the default sort (`sortBy=date`, `sortOrder=desc`): with `sortOrder=asc`, or with `sortBy=comments`, the cursor filter does not match the sort order and the second page is unreliable. `nextCursor` is opaque: pass it back verbatim, never construct or parse it, its composition may change without notice. Because each page re-queries a live window, results can still shift between requests, so dedupe by `id` on the client. `commentCount` semantics differ by platform: YouTube's includes replies, Facebook's counts top-level comments only.
|
|
505
505
|
# @param [Hash] opts the optional parameters
|
|
506
506
|
# @option opts [String] :profile_id Filter by profile ID
|
|
507
507
|
# @option opts [String] :platform Filter by platform. `metaads` is a synthetic value meaning the user's ads (boosted/dark posts) only; `facebook`/`instagram` return organic posts only.
|
|
@@ -519,7 +519,7 @@ module Zernio
|
|
|
519
519
|
end
|
|
520
520
|
|
|
521
521
|
# List commented posts
|
|
522
|
-
# Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts. For users with the Ads add-on (Metronome plans always qualify), the user's Meta ads (boosted/dark posts) are included too. There's one row per (ad, placement-with-comments): an ad that runs on both Facebook feed and Instagram feed produces up to two rows (the Page dark post and the IG media have separate comment threads), each flagged `isAd: true` with `adId` and `placement` (`id` is `{adId}:{placement}`). Use `?platform=metaads` to return *only* ad rows; passing `facebook`/`instagram` returns *organic* posts only (no ads); omitting `platform` returns both. Fetch a row's thread from GET /v1/ads/{adId}/comments?placement={placement}. Ad comment counts are read with the Marketing API token (Facebook side) or the connected Instagram account's token (Instagram side); a row whose count can't be read is omitted. Pagination walks each account's platform listing. Following `nextCursor` reaches past the first page on Facebook
|
|
522
|
+
# Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts. For users with the Ads add-on (Metronome plans always qualify), the user's Meta ads (boosted/dark posts) are included too. There's one row per (ad, placement-with-comments): an ad that runs on both Facebook feed and Instagram feed produces up to two rows (the Page dark post and the IG media have separate comment threads), each flagged `isAd: true` with `adId` and `placement` (`id` is `{adId}:{placement}`). Use `?platform=metaads` to return *only* ad rows; passing `facebook`/`instagram` returns *organic* posts only (no ads); omitting `platform` returns both. Fetch a row's thread from GET /v1/ads/{adId}/comments?placement={placement}. Ad comment counts are read with the Marketing API token (Facebook side) or the connected Instagram account's token (Instagram side); a row whose count can't be read is omitted. Pagination walks each account's platform listing. Following `nextCursor` reaches past the first page on Facebook, Instagram, Threads, LinkedIn and YouTube, since they are the platforms that support a server-side date window; on the others the listing stops at its first page. Cursor pagination is only coherent for the default sort (`sortBy=date`, `sortOrder=desc`): with `sortOrder=asc`, or with `sortBy=comments`, the cursor filter does not match the sort order and the second page is unreliable. `nextCursor` is opaque: pass it back verbatim, never construct or parse it, its composition may change without notice. Because each page re-queries a live window, results can still shift between requests, so dedupe by `id` on the client. `commentCount` semantics differ by platform: YouTube's includes replies, Facebook's counts top-level comments only.
|
|
523
523
|
# @param [Hash] opts the optional parameters
|
|
524
524
|
# @option opts [String] :profile_id Filter by profile ID
|
|
525
525
|
# @option opts [String] :platform Filter by platform. `metaads` is a synthetic value meaning the user's ads (boosted/dark posts) only; `facebook`/`instagram` return organic posts only.
|
|
@@ -525,6 +525,74 @@ module Zernio
|
|
|
525
525
|
return data, status_code, headers
|
|
526
526
|
end
|
|
527
527
|
|
|
528
|
+
# Connect a Shopify store with a custom-app Admin token
|
|
529
|
+
# Token-paste alternative to the OAuth flow: connect a store using the Admin API access token of a custom app the merchant created in their own Shopify admin (Settings → Apps and sales channels → Develop apps, with the `read_content`/`write_content` scopes). Use this when the one-click OAuth connect is unavailable or when your users prefer not to install a third-party app on their store. The token is validated against the store before anything is saved; custom-app tokens do not expire. Connecting the same profile to a store again replaces the stored token in place.
|
|
530
|
+
# @param connect_shopify_with_token_request [ConnectShopifyWithTokenRequest]
|
|
531
|
+
# @param [Hash] opts the optional parameters
|
|
532
|
+
# @return [ConnectShopifyWithToken200Response]
|
|
533
|
+
def connect_shopify_with_token(connect_shopify_with_token_request, opts = {})
|
|
534
|
+
data, _status_code, _headers = connect_shopify_with_token_with_http_info(connect_shopify_with_token_request, opts)
|
|
535
|
+
data
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
# Connect a Shopify store with a custom-app Admin token
|
|
539
|
+
# Token-paste alternative to the OAuth flow: connect a store using the Admin API access token of a custom app the merchant created in their own Shopify admin (Settings → Apps and sales channels → Develop apps, with the `read_content`/`write_content` scopes). Use this when the one-click OAuth connect is unavailable or when your users prefer not to install a third-party app on their store. The token is validated against the store before anything is saved; custom-app tokens do not expire. Connecting the same profile to a store again replaces the stored token in place.
|
|
540
|
+
# @param connect_shopify_with_token_request [ConnectShopifyWithTokenRequest]
|
|
541
|
+
# @param [Hash] opts the optional parameters
|
|
542
|
+
# @return [Array<(ConnectShopifyWithToken200Response, Integer, Hash)>] ConnectShopifyWithToken200Response data, response status code and response headers
|
|
543
|
+
def connect_shopify_with_token_with_http_info(connect_shopify_with_token_request, opts = {})
|
|
544
|
+
if @api_client.config.debugging
|
|
545
|
+
@api_client.config.logger.debug 'Calling API: ConnectApi.connect_shopify_with_token ...'
|
|
546
|
+
end
|
|
547
|
+
# verify the required parameter 'connect_shopify_with_token_request' is set
|
|
548
|
+
if @api_client.config.client_side_validation && connect_shopify_with_token_request.nil?
|
|
549
|
+
fail ArgumentError, "Missing the required parameter 'connect_shopify_with_token_request' when calling ConnectApi.connect_shopify_with_token"
|
|
550
|
+
end
|
|
551
|
+
# resource path
|
|
552
|
+
local_var_path = '/v1/connect/shopify/token'
|
|
553
|
+
|
|
554
|
+
# query parameters
|
|
555
|
+
query_params = opts[:query_params] || {}
|
|
556
|
+
|
|
557
|
+
# header parameters
|
|
558
|
+
header_params = opts[:header_params] || {}
|
|
559
|
+
# HTTP header 'Accept' (if needed)
|
|
560
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
561
|
+
# HTTP header 'Content-Type'
|
|
562
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
563
|
+
if !content_type.nil?
|
|
564
|
+
header_params['Content-Type'] = content_type
|
|
565
|
+
end
|
|
566
|
+
|
|
567
|
+
# form parameters
|
|
568
|
+
form_params = opts[:form_params] || {}
|
|
569
|
+
|
|
570
|
+
# http body (model)
|
|
571
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(connect_shopify_with_token_request)
|
|
572
|
+
|
|
573
|
+
# return_type
|
|
574
|
+
return_type = opts[:debug_return_type] || 'ConnectShopifyWithToken200Response'
|
|
575
|
+
|
|
576
|
+
# auth_names
|
|
577
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
578
|
+
|
|
579
|
+
new_options = opts.merge(
|
|
580
|
+
:operation => :"ConnectApi.connect_shopify_with_token",
|
|
581
|
+
:header_params => header_params,
|
|
582
|
+
:query_params => query_params,
|
|
583
|
+
:form_params => form_params,
|
|
584
|
+
:body => post_body,
|
|
585
|
+
:auth_names => auth_names,
|
|
586
|
+
:return_type => return_type
|
|
587
|
+
)
|
|
588
|
+
|
|
589
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
590
|
+
if @api_client.config.debugging
|
|
591
|
+
@api_client.config.logger.debug "API called: ConnectApi#connect_shopify_with_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
592
|
+
end
|
|
593
|
+
return data, status_code, headers
|
|
594
|
+
end
|
|
595
|
+
|
|
528
596
|
# Connect WhatsApp via credentials
|
|
529
597
|
# Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number)
|
|
530
598
|
# @param connect_whats_app_credentials_request [ConnectWhatsAppCredentialsRequest]
|
|
@@ -675,6 +743,7 @@ module Zernio
|
|
|
675
743
|
# @option opts [String] :redirect_url Your custom redirect URL after connection completes. Accepts an http(s) URL, a custom app scheme for mobile deeplinks (e.g. myapp://callback), or a relative path. Result params are appended with the URL API, so an existing query string is preserved. Standard mode appends connected={platform}&profileId=X&accountId=Y&username=Z. Headless mode appends OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.
|
|
676
744
|
# @option opts [Boolean] :headless When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Zernio's default account selection UI. Use this to build a custom connect experience. (default to false)
|
|
677
745
|
# @option opts [String] :login_method Instagram only. Which of the two Instagram connection methods to use. Ignored for every other platform. `instagram_login` (the default, and what you get if you omit this): the Instagram Login dialog. The user authorizes their Instagram professional account directly, no Facebook Page required. `facebook_login`: the Facebook Login dialog, i.e. \"Instagram API with Facebook Login\". The user authorizes a Facebook Page that has a linked Instagram professional account, and every API call for that account then runs through the Page. Use this when the customer manages Instagram through a Page and expects the Facebook consent screen. Because the user has to pick which Page to connect, the callback continues at the account-selection step, `/v1/connect/instagram/select-account`. `facebook_login` supports `headless=true` like the other selection platforms: the callback redirects to your `redirect_url` with `profileId`, `tempToken`, `platform=instagram`, `step=select_account` and `connect_token`, which you pass into the select-account endpoints to finish. The default `instagram_login` has no selection step, so it connects the account directly. (default to 'instagram_login')
|
|
746
|
+
# @option opts [String] :onboarding WhatsApp only. Ignored for every other platform. Controls which screen Meta's Embedded Signup popup shows. If omitted, the connection defaults to coexistence (same as `business_app` below), preserving existing behavior for numbers already on the WhatsApp Business app. `api`: standard Embedded Signup, showing Meta's WABA/number picker. Use this to connect a phone number already on Cloud API elsewhere. `business_app`: coexistence, i.e. 'Connect existing WhatsApp Business app' (a number shared between Cloud API and the consumer WhatsApp Business app).
|
|
678
747
|
# @return [GetConnectUrl200Response]
|
|
679
748
|
def get_connect_url(platform, profile_id, opts = {})
|
|
680
749
|
data, _status_code, _headers = get_connect_url_with_http_info(platform, profile_id, opts)
|
|
@@ -689,6 +758,7 @@ module Zernio
|
|
|
689
758
|
# @option opts [String] :redirect_url Your custom redirect URL after connection completes. Accepts an http(s) URL, a custom app scheme for mobile deeplinks (e.g. myapp://callback), or a relative path. Result params are appended with the URL API, so an existing query string is preserved. Standard mode appends connected={platform}&profileId=X&accountId=Y&username=Z. Headless mode appends OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId.
|
|
690
759
|
# @option opts [Boolean] :headless When true, the user is redirected to your redirect_url with raw OAuth data (code, state) instead of Zernio's default account selection UI. Use this to build a custom connect experience. (default to false)
|
|
691
760
|
# @option opts [String] :login_method Instagram only. Which of the two Instagram connection methods to use. Ignored for every other platform. `instagram_login` (the default, and what you get if you omit this): the Instagram Login dialog. The user authorizes their Instagram professional account directly, no Facebook Page required. `facebook_login`: the Facebook Login dialog, i.e. \"Instagram API with Facebook Login\". The user authorizes a Facebook Page that has a linked Instagram professional account, and every API call for that account then runs through the Page. Use this when the customer manages Instagram through a Page and expects the Facebook consent screen. Because the user has to pick which Page to connect, the callback continues at the account-selection step, `/v1/connect/instagram/select-account`. `facebook_login` supports `headless=true` like the other selection platforms: the callback redirects to your `redirect_url` with `profileId`, `tempToken`, `platform=instagram`, `step=select_account` and `connect_token`, which you pass into the select-account endpoints to finish. The default `instagram_login` has no selection step, so it connects the account directly. (default to 'instagram_login')
|
|
761
|
+
# @option opts [String] :onboarding WhatsApp only. Ignored for every other platform. Controls which screen Meta's Embedded Signup popup shows. If omitted, the connection defaults to coexistence (same as `business_app` below), preserving existing behavior for numbers already on the WhatsApp Business app. `api`: standard Embedded Signup, showing Meta's WABA/number picker. Use this to connect a phone number already on Cloud API elsewhere. `business_app`: coexistence, i.e. 'Connect existing WhatsApp Business app' (a number shared between Cloud API and the consumer WhatsApp Business app).
|
|
692
762
|
# @return [Array<(GetConnectUrl200Response, Integer, Hash)>] GetConnectUrl200Response data, response status code and response headers
|
|
693
763
|
def get_connect_url_with_http_info(platform, profile_id, opts = {})
|
|
694
764
|
if @api_client.config.debugging
|
|
@@ -711,6 +781,10 @@ module Zernio
|
|
|
711
781
|
if @api_client.config.client_side_validation && opts[:'login_method'] && !allowable_values.include?(opts[:'login_method'])
|
|
712
782
|
fail ArgumentError, "invalid value for \"login_method\", must be one of #{allowable_values}"
|
|
713
783
|
end
|
|
784
|
+
allowable_values = ["api", "business_app"]
|
|
785
|
+
if @api_client.config.client_side_validation && opts[:'onboarding'] && !allowable_values.include?(opts[:'onboarding'])
|
|
786
|
+
fail ArgumentError, "invalid value for \"onboarding\", must be one of #{allowable_values}"
|
|
787
|
+
end
|
|
714
788
|
# resource path
|
|
715
789
|
local_var_path = '/v1/connect/{platform}'.sub('{' + 'platform' + '}', CGI.escape(platform.to_s))
|
|
716
790
|
|
|
@@ -720,6 +794,7 @@ module Zernio
|
|
|
720
794
|
query_params[:'redirect_url'] = opts[:'redirect_url'] if !opts[:'redirect_url'].nil?
|
|
721
795
|
query_params[:'headless'] = opts[:'headless'] if !opts[:'headless'].nil?
|
|
722
796
|
query_params[:'loginMethod'] = opts[:'login_method'] if !opts[:'login_method'].nil?
|
|
797
|
+
query_params[:'onboarding'] = opts[:'onboarding'] if !opts[:'onboarding'].nil?
|
|
723
798
|
|
|
724
799
|
# header parameters
|
|
725
800
|
header_params = opts[:header_params] || {}
|
|
@@ -1228,6 +1303,80 @@ module Zernio
|
|
|
1228
1303
|
return data, status_code, headers
|
|
1229
1304
|
end
|
|
1230
1305
|
|
|
1306
|
+
# Get Shopify OAuth connect URL
|
|
1307
|
+
# Initiate the Shopify OAuth flow for a store. Shopify is a connect-only platform: the connected account does not publish social posts, it powers the Blogs API (`/v1/accounts/{accountId}/blogs`). Returns an `authUrl` to redirect the merchant to; after they approve the install, Shopify redirects their browser to Zernio's callback, the account is created on the profile (platform `shopify`), and the browser is redirected to `redirect_url` (or the Zernio dashboard when omitted). Requested scopes are `read_content` and `write_content` (content only; no customer or order data). Connecting the same profile to a store again refreshes the stored token in place.
|
|
1308
|
+
# @param profile_id [String] Your Zernio profile ID (get from /v1/profiles).
|
|
1309
|
+
# @param shop [String] The myshopify.com store domain to connect, e.g. `your-store.myshopify.com` (the bare `your-store` prefix is accepted too).
|
|
1310
|
+
# @param [Hash] opts the optional parameters
|
|
1311
|
+
# @option opts [String] :redirect_url Your custom redirect URL after connection completes. Accepts an http(s) URL, a custom app scheme for mobile deeplinks (e.g. myapp://callback), or a relative path. On failure an `error` query param is appended.
|
|
1312
|
+
# @return [GetConnectUrl200Response]
|
|
1313
|
+
def get_shopify_connect_url(profile_id, shop, opts = {})
|
|
1314
|
+
data, _status_code, _headers = get_shopify_connect_url_with_http_info(profile_id, shop, opts)
|
|
1315
|
+
data
|
|
1316
|
+
end
|
|
1317
|
+
|
|
1318
|
+
# Get Shopify OAuth connect URL
|
|
1319
|
+
# Initiate the Shopify OAuth flow for a store. Shopify is a connect-only platform: the connected account does not publish social posts, it powers the Blogs API (`/v1/accounts/{accountId}/blogs`). Returns an `authUrl` to redirect the merchant to; after they approve the install, Shopify redirects their browser to Zernio's callback, the account is created on the profile (platform `shopify`), and the browser is redirected to `redirect_url` (or the Zernio dashboard when omitted). Requested scopes are `read_content` and `write_content` (content only; no customer or order data). Connecting the same profile to a store again refreshes the stored token in place.
|
|
1320
|
+
# @param profile_id [String] Your Zernio profile ID (get from /v1/profiles).
|
|
1321
|
+
# @param shop [String] The myshopify.com store domain to connect, e.g. `your-store.myshopify.com` (the bare `your-store` prefix is accepted too).
|
|
1322
|
+
# @param [Hash] opts the optional parameters
|
|
1323
|
+
# @option opts [String] :redirect_url Your custom redirect URL after connection completes. Accepts an http(s) URL, a custom app scheme for mobile deeplinks (e.g. myapp://callback), or a relative path. On failure an `error` query param is appended.
|
|
1324
|
+
# @return [Array<(GetConnectUrl200Response, Integer, Hash)>] GetConnectUrl200Response data, response status code and response headers
|
|
1325
|
+
def get_shopify_connect_url_with_http_info(profile_id, shop, opts = {})
|
|
1326
|
+
if @api_client.config.debugging
|
|
1327
|
+
@api_client.config.logger.debug 'Calling API: ConnectApi.get_shopify_connect_url ...'
|
|
1328
|
+
end
|
|
1329
|
+
# verify the required parameter 'profile_id' is set
|
|
1330
|
+
if @api_client.config.client_side_validation && profile_id.nil?
|
|
1331
|
+
fail ArgumentError, "Missing the required parameter 'profile_id' when calling ConnectApi.get_shopify_connect_url"
|
|
1332
|
+
end
|
|
1333
|
+
# verify the required parameter 'shop' is set
|
|
1334
|
+
if @api_client.config.client_side_validation && shop.nil?
|
|
1335
|
+
fail ArgumentError, "Missing the required parameter 'shop' when calling ConnectApi.get_shopify_connect_url"
|
|
1336
|
+
end
|
|
1337
|
+
# resource path
|
|
1338
|
+
local_var_path = '/v1/connect/shopify'
|
|
1339
|
+
|
|
1340
|
+
# query parameters
|
|
1341
|
+
query_params = opts[:query_params] || {}
|
|
1342
|
+
query_params[:'profileId'] = profile_id
|
|
1343
|
+
query_params[:'shop'] = shop
|
|
1344
|
+
query_params[:'redirect_url'] = opts[:'redirect_url'] if !opts[:'redirect_url'].nil?
|
|
1345
|
+
|
|
1346
|
+
# header parameters
|
|
1347
|
+
header_params = opts[:header_params] || {}
|
|
1348
|
+
# HTTP header 'Accept' (if needed)
|
|
1349
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1350
|
+
|
|
1351
|
+
# form parameters
|
|
1352
|
+
form_params = opts[:form_params] || {}
|
|
1353
|
+
|
|
1354
|
+
# http body (model)
|
|
1355
|
+
post_body = opts[:debug_body]
|
|
1356
|
+
|
|
1357
|
+
# return_type
|
|
1358
|
+
return_type = opts[:debug_return_type] || 'GetConnectUrl200Response'
|
|
1359
|
+
|
|
1360
|
+
# auth_names
|
|
1361
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1362
|
+
|
|
1363
|
+
new_options = opts.merge(
|
|
1364
|
+
:operation => :"ConnectApi.get_shopify_connect_url",
|
|
1365
|
+
:header_params => header_params,
|
|
1366
|
+
:query_params => query_params,
|
|
1367
|
+
:form_params => form_params,
|
|
1368
|
+
:body => post_body,
|
|
1369
|
+
:auth_names => auth_names,
|
|
1370
|
+
:return_type => return_type
|
|
1371
|
+
)
|
|
1372
|
+
|
|
1373
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1374
|
+
if @api_client.config.debugging
|
|
1375
|
+
@api_client.config.logger.debug "API called: ConnectApi#get_shopify_connect_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1376
|
+
end
|
|
1377
|
+
return data, status_code, headers
|
|
1378
|
+
end
|
|
1379
|
+
|
|
1231
1380
|
# Get subreddit rules
|
|
1232
1381
|
# Returns a subreddit's posting rules plus Reddit's site-wide rules, so you can check them before submitting and avoid a removal. Use this alongside `POST /v1/tools/validate/subreddit`, which only confirms that a subreddit exists and reports its basic posting settings.
|
|
1233
1382
|
# @param account_id [String] The ID of the Reddit account
|
|
@@ -399,7 +399,7 @@ module Zernio
|
|
|
399
399
|
# @param account_id [String] Social account ID
|
|
400
400
|
# @param [Hash] opts the optional parameters
|
|
401
401
|
# @option opts [Integer] :limit Number of messages to return per page. Default 100, max 100. (default to 100)
|
|
402
|
-
# @option opts [String] :cursor Opaque pagination cursor. Pass `pagination.nextCursor` from a prior response.
|
|
402
|
+
# @option opts [String] :cursor Opaque pagination cursor. Pass `pagination.nextCursor` from a prior response verbatim: a cursor we cannot parse returns 400 rather than silently restarting from the first page.
|
|
403
403
|
# @option opts [String] :sort_order Order of returned messages. Default `asc` (oldest first, chat style). Twitter, Instagram, Telegram, WhatsApp and Reddit honor this order across cursor pages. For Facebook and Bluesky, only intra-page ordering is affected — pages always walk newest→oldest. See `sortOrderApplied` in the response. (default to 'asc')
|
|
404
404
|
# @return [GetInboxConversationMessages200Response]
|
|
405
405
|
def get_inbox_conversation_messages(conversation_id, account_id, opts = {})
|
|
@@ -413,7 +413,7 @@ module Zernio
|
|
|
413
413
|
# @param account_id [String] Social account ID
|
|
414
414
|
# @param [Hash] opts the optional parameters
|
|
415
415
|
# @option opts [Integer] :limit Number of messages to return per page. Default 100, max 100. (default to 100)
|
|
416
|
-
# @option opts [String] :cursor Opaque pagination cursor. Pass `pagination.nextCursor` from a prior response.
|
|
416
|
+
# @option opts [String] :cursor Opaque pagination cursor. Pass `pagination.nextCursor` from a prior response verbatim: a cursor we cannot parse returns 400 rather than silently restarting from the first page.
|
|
417
417
|
# @option opts [String] :sort_order Order of returned messages. Default `asc` (oldest first, chat style). Twitter, Instagram, Telegram, WhatsApp and Reddit honor this order across cursor pages. For Facebook and Bluesky, only intra-page ordering is affected — pages always walk newest→oldest. See `sortOrderApplied` in the response. (default to 'asc')
|
|
418
418
|
# @return [Array<(GetInboxConversationMessages200Response, Integer, Hash)>] GetInboxConversationMessages200Response data, response status code and response headers
|
|
419
419
|
def get_inbox_conversation_messages_with_http_info(conversation_id, account_id, opts = {})
|
|
@@ -834,7 +834,7 @@ module Zernio
|
|
|
834
834
|
# @option opts [String] :platform Filter by platform (searchable platforms only)
|
|
835
835
|
# @option opts [String] :account_id Filter by specific social account ID
|
|
836
836
|
# @option opts [Integer] :limit Maximum number of conversations to return (default to 20)
|
|
837
|
-
# @option opts [String] :cursor
|
|
837
|
+
# @option opts [String] :cursor Opaque pagination cursor. Pass back pagination.nextCursor verbatim; do not construct one.
|
|
838
838
|
# @return [SearchInboxConversations200Response]
|
|
839
839
|
def search_inbox_conversations(query, opts = {})
|
|
840
840
|
data, _status_code, _headers = search_inbox_conversations_with_http_info(query, opts)
|
|
@@ -850,7 +850,7 @@ module Zernio
|
|
|
850
850
|
# @option opts [String] :platform Filter by platform (searchable platforms only)
|
|
851
851
|
# @option opts [String] :account_id Filter by specific social account ID
|
|
852
852
|
# @option opts [Integer] :limit Maximum number of conversations to return (default to 20)
|
|
853
|
-
# @option opts [String] :cursor
|
|
853
|
+
# @option opts [String] :cursor Opaque pagination cursor. Pass back pagination.nextCursor verbatim; do not construct one.
|
|
854
854
|
# @return [Array<(SearchInboxConversations200Response, Integer, Hash)>] SearchInboxConversations200Response data, response status code and response headers
|
|
855
855
|
def search_inbox_conversations_with_http_info(query, opts = {})
|
|
856
856
|
if @api_client.config.debugging
|
|
@@ -88,7 +88,7 @@ module Zernio
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# Create post
|
|
91
|
-
# Create and optionally publish a post. Immediate posts (`publishNow: true`) include `platformPostUrl` in the response. Content is optional when media is attached
|
|
91
|
+
# Create and optionally publish a post. Immediate posts (`publishNow: true`) include `platformPostUrl` in the response. Content is optional when media is attached, all platforms have `customContent`, every platform entry is an X Article (`platformSpecificData.article`), or every platform entry is a LinkedIn plain repost (`platformSpecificData.reshareUrl` with no text). See each platform's schema for media constraints. ## Idempotency Two layers of duplicate-protection apply, so safe-to-retry callers (network blips, n8n / Zapier retries, etc.) don't accidentally double-post. **1. Same-request idempotency (5-minute window).** Pass an `x-request-id` header to mark a logical request. If a second request arrives with the same `x-request-id` while the first is in-flight (or within ~5 minutes of completion), we return **HTTP 200** with the original post in the `existingPost` field — no new post is created. The official Zernio SDKs auto-generate a unique `x-request-id` per call. If you're using a generic HTTP client (curl, n8n's HTTP node, Zapier, custom code), either: - Set a unique `x-request-id` per logical call (recommended — UUIDv4 is fine) - Or simply omit the header — we'll treat each request as new **Common pitfall**: if your workflow tool uses a single execution-level request ID and reuses it across multiple HTTP nodes (e.g. one ID for the whole run, shared across 6 different platform calls), every call after the first will look like a retry of the first and return its post. Generate a fresh ID per node. **2. Content-hash dedup (24-hour window).** Independently, we hash `(platform, accountId, content + media URLs)` and reject duplicates within 24 hours with **HTTP 409**. This catches genuine \"same content posted twice to the same account\" cases regardless of `x-request-id`. Returns `error`, `accountId`, `platform`, and `existingPostId` so you can find the original. To intentionally re-post identical content within 24h, change something (the caption, the media, the account) — the dedup is keyed on the full content fingerprint. Order: same-`x-request-id` retries (200) are checked first; if no idempotency match, the content-hash dedup (409) runs.
|
|
92
92
|
# @param create_post_request [CreatePostRequest]
|
|
93
93
|
# @param [Hash] opts the optional parameters
|
|
94
94
|
# @option opts [String] :x_request_id Optional client-generated request identifier for safe retry (idempotency). When two requests carry the same value, the second is treated as a retry of the first and returns the original post (HTTP 200) instead of creating a duplicate. Window is ~5 minutes from the first request. Generate a UUID per logical call. SDKs do this automatically; HTTP clients should set it themselves or omit it. See the operation description for the full idempotency contract.
|
|
@@ -99,7 +99,7 @@ module Zernio
|
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
# Create post
|
|
102
|
-
# Create and optionally publish a post. Immediate posts (`publishNow: true`) include `platformPostUrl` in the response. Content is optional when media is attached
|
|
102
|
+
# Create and optionally publish a post. Immediate posts (`publishNow: true`) include `platformPostUrl` in the response. Content is optional when media is attached, all platforms have `customContent`, every platform entry is an X Article (`platformSpecificData.article`), or every platform entry is a LinkedIn plain repost (`platformSpecificData.reshareUrl` with no text). See each platform's schema for media constraints. ## Idempotency Two layers of duplicate-protection apply, so safe-to-retry callers (network blips, n8n / Zapier retries, etc.) don't accidentally double-post. **1. Same-request idempotency (5-minute window).** Pass an `x-request-id` header to mark a logical request. If a second request arrives with the same `x-request-id` while the first is in-flight (or within ~5 minutes of completion), we return **HTTP 200** with the original post in the `existingPost` field — no new post is created. The official Zernio SDKs auto-generate a unique `x-request-id` per call. If you're using a generic HTTP client (curl, n8n's HTTP node, Zapier, custom code), either: - Set a unique `x-request-id` per logical call (recommended — UUIDv4 is fine) - Or simply omit the header — we'll treat each request as new **Common pitfall**: if your workflow tool uses a single execution-level request ID and reuses it across multiple HTTP nodes (e.g. one ID for the whole run, shared across 6 different platform calls), every call after the first will look like a retry of the first and return its post. Generate a fresh ID per node. **2. Content-hash dedup (24-hour window).** Independently, we hash `(platform, accountId, content + media URLs)` and reject duplicates within 24 hours with **HTTP 409**. This catches genuine \"same content posted twice to the same account\" cases regardless of `x-request-id`. Returns `error`, `accountId`, `platform`, and `existingPostId` so you can find the original. To intentionally re-post identical content within 24h, change something (the caption, the media, the account) — the dedup is keyed on the full content fingerprint. Order: same-`x-request-id` retries (200) are checked first; if no idempotency match, the content-hash dedup (409) runs.
|
|
103
103
|
# @param create_post_request [CreatePostRequest]
|
|
104
104
|
# @param [Hash] opts the optional parameters
|
|
105
105
|
# @option opts [String] :x_request_id Optional client-generated request identifier for safe retry (idempotency). When two requests carry the same value, the second is treated as a retry of the first and returns the original post (HTTP 200) instead of creating a duplicate. Window is ~5 minutes from the first request. Generate a UUID per logical call. SDKs do this automatically; HTTP clients should set it themselves or omit it. See the operation description for the full idempotency contract.
|
|
@@ -1069,7 +1069,7 @@ module Zernio
|
|
|
1069
1069
|
end
|
|
1070
1070
|
|
|
1071
1071
|
# Send an SMS/MMS
|
|
1072
|
-
# Sends an SMS (or MMS when `mediaUrls` is set) from one of your SMS-enabled numbers. At least one of `text` / `mediaUrls` is required. Both numbers are normalized to E.164, so `from` matches regardless of formatting and replies thread into the same inbox conversation. US numbers must have an approved carrier registration (`/v1/sms/registrations`) before messages deliver. **Idempotency:** send an `Idempotency-Key` header to make retries safe: same key + same body replays the original response instead of sending a second message; same key + different body returns 422; a key still in flight returns 409.
|
|
1072
|
+
# Sends an SMS (or MMS when `mediaUrls` is set) from one of your SMS-enabled numbers. At least one of `text` / `mediaUrls` is required. Both numbers are normalized to E.164, so `from` matches regardless of formatting and replies thread into the same inbox conversation. US numbers must have an approved carrier registration (`/v1/sms/registrations`) before messages deliver. **Replies and delivery status arrive as webhooks**, not by polling: an inbound reply fires `message.received` with `platform: \"sms\"`, the first message of a new thread also fires `conversation.started`, and this message's own outcome fires `message.delivered` or `message.failed` (the latter carrying the carrier's error code). **Opted-out recipients:** a send to a number that replied STOP is refused with `409`, never silently dropped. **Idempotency:** send an `Idempotency-Key` header to make retries safe: same key + same body replays the original response instead of sending a second message; same key + different body returns 422; a key still in flight returns 409.
|
|
1073
1073
|
# @param send_sms_request [SendSmsRequest]
|
|
1074
1074
|
# @param [Hash] opts the optional parameters
|
|
1075
1075
|
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
@@ -1080,7 +1080,7 @@ module Zernio
|
|
|
1080
1080
|
end
|
|
1081
1081
|
|
|
1082
1082
|
# Send an SMS/MMS
|
|
1083
|
-
# Sends an SMS (or MMS when `mediaUrls` is set) from one of your SMS-enabled numbers. At least one of `text` / `mediaUrls` is required. Both numbers are normalized to E.164, so `from` matches regardless of formatting and replies thread into the same inbox conversation. US numbers must have an approved carrier registration (`/v1/sms/registrations`) before messages deliver. **Idempotency:** send an `Idempotency-Key` header to make retries safe: same key + same body replays the original response instead of sending a second message; same key + different body returns 422; a key still in flight returns 409.
|
|
1083
|
+
# Sends an SMS (or MMS when `mediaUrls` is set) from one of your SMS-enabled numbers. At least one of `text` / `mediaUrls` is required. Both numbers are normalized to E.164, so `from` matches regardless of formatting and replies thread into the same inbox conversation. US numbers must have an approved carrier registration (`/v1/sms/registrations`) before messages deliver. **Replies and delivery status arrive as webhooks**, not by polling: an inbound reply fires `message.received` with `platform: \"sms\"`, the first message of a new thread also fires `conversation.started`, and this message's own outcome fires `message.delivered` or `message.failed` (the latter carrying the carrier's error code). **Opted-out recipients:** a send to a number that replied STOP is refused with `409`, never silently dropped. **Idempotency:** send an `Idempotency-Key` header to make retries safe: same key + same body replays the original response instead of sending a second message; same key + different body returns 422; a key still in flight returns 409.
|
|
1084
1084
|
# @param send_sms_request [SendSmsRequest]
|
|
1085
1085
|
# @param [Hash] opts the optional parameters
|
|
1086
1086
|
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
@@ -2131,6 +2131,72 @@ module Zernio
|
|
|
2131
2131
|
return data, status_code, headers
|
|
2132
2132
|
end
|
|
2133
2133
|
|
|
2134
|
+
# Referral received event
|
|
2135
|
+
# Fired when someone opens an EXISTING Instagram or Messenger thread through an attributable entry point - an ig.me / m.me link with a `ref` parameter, or (Messenger) a returning Click-to-Message ad click - which Meta delivers as a standalone referral with no message attached. A referral that rides an inbound message (first message of a thread, icebreaker taps, returning ad clicks on Instagram) arrives on `message.received` under `metadata.referral` instead; the two never fire for the same click. The first referral captured on a conversation is also persisted on it (see `metadata` on `GET /v1/inbox/conversations`). Requires the Inbox add-on.
|
|
2136
|
+
# @param webhook_payload_referral [WebhookPayloadReferral]
|
|
2137
|
+
# @param [Hash] opts the optional parameters
|
|
2138
|
+
# @return [nil]
|
|
2139
|
+
def on_referral_received(webhook_payload_referral, opts = {})
|
|
2140
|
+
on_referral_received_with_http_info(webhook_payload_referral, opts)
|
|
2141
|
+
nil
|
|
2142
|
+
end
|
|
2143
|
+
|
|
2144
|
+
# Referral received event
|
|
2145
|
+
# Fired when someone opens an EXISTING Instagram or Messenger thread through an attributable entry point - an ig.me / m.me link with a `ref` parameter, or (Messenger) a returning Click-to-Message ad click - which Meta delivers as a standalone referral with no message attached. A referral that rides an inbound message (first message of a thread, icebreaker taps, returning ad clicks on Instagram) arrives on `message.received` under `metadata.referral` instead; the two never fire for the same click. The first referral captured on a conversation is also persisted on it (see `metadata` on `GET /v1/inbox/conversations`). Requires the Inbox add-on.
|
|
2146
|
+
# @param webhook_payload_referral [WebhookPayloadReferral]
|
|
2147
|
+
# @param [Hash] opts the optional parameters
|
|
2148
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2149
|
+
def on_referral_received_with_http_info(webhook_payload_referral, opts = {})
|
|
2150
|
+
if @api_client.config.debugging
|
|
2151
|
+
@api_client.config.logger.debug 'Calling API: WebhookEventsApi.on_referral_received ...'
|
|
2152
|
+
end
|
|
2153
|
+
# verify the required parameter 'webhook_payload_referral' is set
|
|
2154
|
+
if @api_client.config.client_side_validation && webhook_payload_referral.nil?
|
|
2155
|
+
fail ArgumentError, "Missing the required parameter 'webhook_payload_referral' when calling WebhookEventsApi.on_referral_received"
|
|
2156
|
+
end
|
|
2157
|
+
# resource path
|
|
2158
|
+
local_var_path = '/referral.received'
|
|
2159
|
+
|
|
2160
|
+
# query parameters
|
|
2161
|
+
query_params = opts[:query_params] || {}
|
|
2162
|
+
|
|
2163
|
+
# header parameters
|
|
2164
|
+
header_params = opts[:header_params] || {}
|
|
2165
|
+
# HTTP header 'Content-Type'
|
|
2166
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2167
|
+
if !content_type.nil?
|
|
2168
|
+
header_params['Content-Type'] = content_type
|
|
2169
|
+
end
|
|
2170
|
+
|
|
2171
|
+
# form parameters
|
|
2172
|
+
form_params = opts[:form_params] || {}
|
|
2173
|
+
|
|
2174
|
+
# http body (model)
|
|
2175
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(webhook_payload_referral)
|
|
2176
|
+
|
|
2177
|
+
# return_type
|
|
2178
|
+
return_type = opts[:debug_return_type]
|
|
2179
|
+
|
|
2180
|
+
# auth_names
|
|
2181
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2182
|
+
|
|
2183
|
+
new_options = opts.merge(
|
|
2184
|
+
:operation => :"WebhookEventsApi.on_referral_received",
|
|
2185
|
+
:header_params => header_params,
|
|
2186
|
+
:query_params => query_params,
|
|
2187
|
+
:form_params => form_params,
|
|
2188
|
+
:body => post_body,
|
|
2189
|
+
:auth_names => auth_names,
|
|
2190
|
+
:return_type => return_type
|
|
2191
|
+
)
|
|
2192
|
+
|
|
2193
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2194
|
+
if @api_client.config.debugging
|
|
2195
|
+
@api_client.config.logger.debug "API called: WebhookEventsApi#on_referral_received\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2196
|
+
end
|
|
2197
|
+
return data, status_code, headers
|
|
2198
|
+
end
|
|
2199
|
+
|
|
2134
2200
|
# Review new event
|
|
2135
2201
|
# Fired when a new review is posted on a connected account. Currently supported for Google Business Profile (real-time via Pub/Sub). Requires the Inbox add-on.
|
|
2136
2202
|
# @param webhook_payload_review_new [WebhookPayloadReviewNew]
|
|
@@ -3055,6 +3121,72 @@ module Zernio
|
|
|
3055
3121
|
return data, status_code, headers
|
|
3056
3122
|
end
|
|
3057
3123
|
|
|
3124
|
+
# WhatsApp template category updated event
|
|
3125
|
+
# Fired when Meta reclassifies a WhatsApp Business template's category after approval. Forwarded from Meta's `template_category_update` webhook field on the WhatsApp Business Account. Category drives Meta's per-conversation tariff and whether the template is subject to the recipient's marketing opt-out. `template.changeType` is `scheduled` (24h advance notice) or `applied`; `template.category` is always the category right now.
|
|
3126
|
+
# @param webhook_payload_whats_app_template_category_updated [WebhookPayloadWhatsAppTemplateCategoryUpdated]
|
|
3127
|
+
# @param [Hash] opts the optional parameters
|
|
3128
|
+
# @return [nil]
|
|
3129
|
+
def on_whats_app_template_category_updated(webhook_payload_whats_app_template_category_updated, opts = {})
|
|
3130
|
+
on_whats_app_template_category_updated_with_http_info(webhook_payload_whats_app_template_category_updated, opts)
|
|
3131
|
+
nil
|
|
3132
|
+
end
|
|
3133
|
+
|
|
3134
|
+
# WhatsApp template category updated event
|
|
3135
|
+
# Fired when Meta reclassifies a WhatsApp Business template's category after approval. Forwarded from Meta's `template_category_update` webhook field on the WhatsApp Business Account. Category drives Meta's per-conversation tariff and whether the template is subject to the recipient's marketing opt-out. `template.changeType` is `scheduled` (24h advance notice) or `applied`; `template.category` is always the category right now.
|
|
3136
|
+
# @param webhook_payload_whats_app_template_category_updated [WebhookPayloadWhatsAppTemplateCategoryUpdated]
|
|
3137
|
+
# @param [Hash] opts the optional parameters
|
|
3138
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
3139
|
+
def on_whats_app_template_category_updated_with_http_info(webhook_payload_whats_app_template_category_updated, opts = {})
|
|
3140
|
+
if @api_client.config.debugging
|
|
3141
|
+
@api_client.config.logger.debug 'Calling API: WebhookEventsApi.on_whats_app_template_category_updated ...'
|
|
3142
|
+
end
|
|
3143
|
+
# verify the required parameter 'webhook_payload_whats_app_template_category_updated' is set
|
|
3144
|
+
if @api_client.config.client_side_validation && webhook_payload_whats_app_template_category_updated.nil?
|
|
3145
|
+
fail ArgumentError, "Missing the required parameter 'webhook_payload_whats_app_template_category_updated' when calling WebhookEventsApi.on_whats_app_template_category_updated"
|
|
3146
|
+
end
|
|
3147
|
+
# resource path
|
|
3148
|
+
local_var_path = '/whatsapp.template.category_updated'
|
|
3149
|
+
|
|
3150
|
+
# query parameters
|
|
3151
|
+
query_params = opts[:query_params] || {}
|
|
3152
|
+
|
|
3153
|
+
# header parameters
|
|
3154
|
+
header_params = opts[:header_params] || {}
|
|
3155
|
+
# HTTP header 'Content-Type'
|
|
3156
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3157
|
+
if !content_type.nil?
|
|
3158
|
+
header_params['Content-Type'] = content_type
|
|
3159
|
+
end
|
|
3160
|
+
|
|
3161
|
+
# form parameters
|
|
3162
|
+
form_params = opts[:form_params] || {}
|
|
3163
|
+
|
|
3164
|
+
# http body (model)
|
|
3165
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(webhook_payload_whats_app_template_category_updated)
|
|
3166
|
+
|
|
3167
|
+
# return_type
|
|
3168
|
+
return_type = opts[:debug_return_type]
|
|
3169
|
+
|
|
3170
|
+
# auth_names
|
|
3171
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3172
|
+
|
|
3173
|
+
new_options = opts.merge(
|
|
3174
|
+
:operation => :"WebhookEventsApi.on_whats_app_template_category_updated",
|
|
3175
|
+
:header_params => header_params,
|
|
3176
|
+
:query_params => query_params,
|
|
3177
|
+
:form_params => form_params,
|
|
3178
|
+
:body => post_body,
|
|
3179
|
+
:auth_names => auth_names,
|
|
3180
|
+
:return_type => return_type
|
|
3181
|
+
)
|
|
3182
|
+
|
|
3183
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3184
|
+
if @api_client.config.debugging
|
|
3185
|
+
@api_client.config.logger.debug "API called: WebhookEventsApi#on_whats_app_template_category_updated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3186
|
+
end
|
|
3187
|
+
return data, status_code, headers
|
|
3188
|
+
end
|
|
3189
|
+
|
|
3058
3190
|
# WhatsApp template status updated event
|
|
3059
3191
|
# Fired when Meta finishes (re)reviewing a WhatsApp Business template attached to a connected WABA. Forwarded from Meta's `message_template_status_update` webhook field on the WhatsApp Business Account. Consumers branch on `template.status` (APPROVED, REJECTED, PENDING, PAUSED, DISABLED, IN_APPEAL, PENDING_DELETION). Meta does not include the previous status or the template's category in this event.
|
|
3060
3192
|
# @param webhook_payload_whats_app_template_status_updated [WebhookPayloadWhatsAppTemplateStatusUpdated]
|
|
@@ -1474,6 +1474,81 @@ module Zernio
|
|
|
1474
1474
|
return data, status_code, headers
|
|
1475
1475
|
end
|
|
1476
1476
|
|
|
1477
|
+
# List account notifications
|
|
1478
|
+
# Returns Meta-originated events recorded for a WhatsApp account, newest first: template review outcomes (approved, rejected, paused, category changes) and WABA status changes (restricted, disabled, reinstated, disconnected). Events are captured from Meta webhooks as they happen; the feed starts at the account's first recorded event and is not backfilled. Complements the push events `whatsapp.template.status_updated` and `account.disconnected` with a pollable history.
|
|
1479
|
+
# @param account_id [String] WhatsApp social account ID
|
|
1480
|
+
# @param [Hash] opts the optional parameters
|
|
1481
|
+
# @option opts [Integer] :limit Maximum events to return (default to 50)
|
|
1482
|
+
# @return [ListWhatsAppAccountEvents200Response]
|
|
1483
|
+
def list_whats_app_account_events(account_id, opts = {})
|
|
1484
|
+
data, _status_code, _headers = list_whats_app_account_events_with_http_info(account_id, opts)
|
|
1485
|
+
data
|
|
1486
|
+
end
|
|
1487
|
+
|
|
1488
|
+
# List account notifications
|
|
1489
|
+
# Returns Meta-originated events recorded for a WhatsApp account, newest first: template review outcomes (approved, rejected, paused, category changes) and WABA status changes (restricted, disabled, reinstated, disconnected). Events are captured from Meta webhooks as they happen; the feed starts at the account's first recorded event and is not backfilled. Complements the push events `whatsapp.template.status_updated` and `account.disconnected` with a pollable history.
|
|
1490
|
+
# @param account_id [String] WhatsApp social account ID
|
|
1491
|
+
# @param [Hash] opts the optional parameters
|
|
1492
|
+
# @option opts [Integer] :limit Maximum events to return (default to 50)
|
|
1493
|
+
# @return [Array<(ListWhatsAppAccountEvents200Response, Integer, Hash)>] ListWhatsAppAccountEvents200Response data, response status code and response headers
|
|
1494
|
+
def list_whats_app_account_events_with_http_info(account_id, opts = {})
|
|
1495
|
+
if @api_client.config.debugging
|
|
1496
|
+
@api_client.config.logger.debug 'Calling API: WhatsAppApi.list_whats_app_account_events ...'
|
|
1497
|
+
end
|
|
1498
|
+
# verify the required parameter 'account_id' is set
|
|
1499
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1500
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppApi.list_whats_app_account_events"
|
|
1501
|
+
end
|
|
1502
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
1503
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WhatsAppApi.list_whats_app_account_events, must be smaller than or equal to 200.'
|
|
1504
|
+
end
|
|
1505
|
+
|
|
1506
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1507
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WhatsAppApi.list_whats_app_account_events, must be greater than or equal to 1.'
|
|
1508
|
+
end
|
|
1509
|
+
|
|
1510
|
+
# resource path
|
|
1511
|
+
local_var_path = '/v1/whatsapp/account-events'
|
|
1512
|
+
|
|
1513
|
+
# query parameters
|
|
1514
|
+
query_params = opts[:query_params] || {}
|
|
1515
|
+
query_params[:'accountId'] = account_id
|
|
1516
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1517
|
+
|
|
1518
|
+
# header parameters
|
|
1519
|
+
header_params = opts[:header_params] || {}
|
|
1520
|
+
# HTTP header 'Accept' (if needed)
|
|
1521
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1522
|
+
|
|
1523
|
+
# form parameters
|
|
1524
|
+
form_params = opts[:form_params] || {}
|
|
1525
|
+
|
|
1526
|
+
# http body (model)
|
|
1527
|
+
post_body = opts[:debug_body]
|
|
1528
|
+
|
|
1529
|
+
# return_type
|
|
1530
|
+
return_type = opts[:debug_return_type] || 'ListWhatsAppAccountEvents200Response'
|
|
1531
|
+
|
|
1532
|
+
# auth_names
|
|
1533
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1534
|
+
|
|
1535
|
+
new_options = opts.merge(
|
|
1536
|
+
:operation => :"WhatsAppApi.list_whats_app_account_events",
|
|
1537
|
+
:header_params => header_params,
|
|
1538
|
+
:query_params => query_params,
|
|
1539
|
+
:form_params => form_params,
|
|
1540
|
+
:body => post_body,
|
|
1541
|
+
:auth_names => auth_names,
|
|
1542
|
+
:return_type => return_type
|
|
1543
|
+
)
|
|
1544
|
+
|
|
1545
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1546
|
+
if @api_client.config.debugging
|
|
1547
|
+
@api_client.config.logger.debug "API called: WhatsAppApi#list_whats_app_account_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1548
|
+
end
|
|
1549
|
+
return data, status_code, headers
|
|
1550
|
+
end
|
|
1551
|
+
|
|
1477
1552
|
# List conversion events
|
|
1478
1553
|
# Returns the most recent conversion events sent through `POST /v1/whatsapp/conversions` for the given WhatsApp account. Sourced from delivery logs (Axiom `late` dataset), so the visible window is bounded by log retention (about 30 days). Useful for rendering a \"recent activity\" panel on the conversions setup tab without standing up a parallel persistence layer. Per-event payload mirrors the structured log we write on every successful send: `eventName`, `conversationId`, `eventsReceived`, `eventsFailed`, `traceId`, `durationMs`, and the wall-clock `timestamp`.
|
|
1479
1554
|
# @param account_id [String] WhatsApp social account ID
|