late-sdk 0.0.684 → 0.0.685

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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -0
  3. data/docs/AccountsApi.md +76 -0
  4. data/docs/CommentAutomationAudience.md +22 -0
  5. data/docs/CommentAutomationFollowGate.md +22 -0
  6. data/docs/CommentAutomationsApi.md +1 -1
  7. data/docs/CreateCommentAutomation200ResponseAutomation.md +4 -0
  8. data/docs/CreateCommentAutomationRequest.md +5 -1
  9. data/docs/GetCommentAutomation200ResponseAutomation.md +4 -0
  10. data/docs/GetCommentAutomation200ResponseLogsInner.md +7 -1
  11. data/docs/GetInstagramFollowStatus200Response.md +34 -0
  12. data/docs/UpdateCommentAutomation200ResponseAutomation.md +4 -0
  13. data/docs/UpdateCommentAutomationRequest.md +4 -0
  14. data/docs/WebhookPayloadCommentCommentAuthor.md +3 -1
  15. data/docs/WebhookPayloadCommentCommentAuthorInstagramProfile.md +24 -0
  16. data/lib/zernio-sdk/api/accounts_api.rb +72 -0
  17. data/lib/zernio-sdk/api/comment_automations_api.rb +3 -3
  18. data/lib/zernio-sdk/models/comment_automation_audience.rb +237 -0
  19. data/lib/zernio-sdk/models/comment_automation_follow_gate.rb +226 -0
  20. data/lib/zernio-sdk/models/create_comment_automation200_response_automation.rb +19 -1
  21. data/lib/zernio-sdk/models/create_comment_automation_request.rb +22 -4
  22. data/lib/zernio-sdk/models/get_comment_automation200_response_automation.rb +19 -1
  23. data/lib/zernio-sdk/models/get_comment_automation200_response_logs_inner.rb +45 -4
  24. data/lib/zernio-sdk/models/get_instagram_follow_status200_response.rb +299 -0
  25. data/lib/zernio-sdk/models/update_comment_automation200_response_automation.rb +19 -1
  26. data/lib/zernio-sdk/models/update_comment_automation_request.rb +19 -1
  27. data/lib/zernio-sdk/models/webhook_payload_comment_comment_author.rb +14 -5
  28. data/lib/zernio-sdk/models/webhook_payload_comment_comment_author_instagram_profile.rb +181 -0
  29. data/lib/zernio-sdk/version.rb +1 -1
  30. data/lib/zernio-sdk.rb +4 -0
  31. data/openapi.yaml +162 -3
  32. data/spec/api/accounts_api_spec.rb +14 -0
  33. data/spec/api/comment_automations_api_spec.rb +1 -1
  34. data/spec/models/comment_automation_audience_spec.rb +56 -0
  35. data/spec/models/comment_automation_follow_gate_spec.rb +48 -0
  36. data/spec/models/create_comment_automation200_response_automation_spec.rb +12 -0
  37. data/spec/models/create_comment_automation_request_spec.rb +12 -0
  38. data/spec/models/get_comment_automation200_response_automation_spec.rb +12 -0
  39. data/spec/models/get_comment_automation200_response_logs_inner_spec.rb +23 -1
  40. data/spec/models/get_instagram_follow_status200_response_spec.rb +88 -0
  41. data/spec/models/update_comment_automation200_response_automation_spec.rb +12 -0
  42. data/spec/models/update_comment_automation_request_spec.rb +12 -0
  43. data/spec/models/webhook_payload_comment_comment_author_instagram_profile_spec.rb +54 -0
  44. data/spec/models/webhook_payload_comment_comment_author_spec.rb +6 -0
  45. data/zernio-sdk-0.0.685.gem +0 -0
  46. metadata +18 -2
  47. data/zernio-sdk-0.0.684.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 550c3cc0463ec0c6089af0d3420e1fe04d7dfb626bdde7b1c87f9054664ff307
4
- data.tar.gz: 49a3a122c78e25747c39fb4452ac951593a126e65d7bf224f6ec2c3553539437
3
+ metadata.gz: 0b50a43152d2db82a260e610f7406f4f21656d252cfba4797c4a6aa71479925b
4
+ data.tar.gz: b8aa82d53fef8d14baf0cd9a1204a9228a9afec0a0328d110a3605b4195c847b
5
5
  SHA512:
6
- metadata.gz: 11a79538fcdf3db3151b79737d8cfcc1a4612d7ea9807a23e422c5ac7739c81d0cd773421b70b83d3a243ca5a5ef6558d6777410a8201cce3a6c8d4a8eaeeecc
7
- data.tar.gz: 032edb43b2fbe1aa7a96b64f051767b7f3a3342defa6b17aee08c2371f711b82838bf334dbc192550a934a6e5412c1e6ac2ac9c1a68de5a73dae42dfab41c427
6
+ metadata.gz: e2bbc652dc88a41a6eb9ec396c97dae836f5075dd1a685dcb9c903e2bc8481f5b6277c67939a61e51f1928286347007009bad7553d55bed1da92ced66db88819
7
+ data.tar.gz: 338e379aa6567330d0d7980ff8f7d0d0b77d96824862e07acf9cd876ce9da3e021c2356220f0b3a4d29c79e74175e7d3abcc25341aad2cefa66d1d6c51d711ed
data/README.md CHANGED
@@ -87,6 +87,7 @@ Class | Method | HTTP request | Description
87
87
  *Zernio::AccountsApi* | [**get_account_health**](docs/AccountsApi.md#get_account_health) | **GET** /v1/accounts/{accountId}/health | Check account health
88
88
  *Zernio::AccountsApi* | [**get_all_accounts_health**](docs/AccountsApi.md#get_all_accounts_health) | **GET** /v1/accounts/health | Check accounts health
89
89
  *Zernio::AccountsApi* | [**get_follower_stats**](docs/AccountsApi.md#get_follower_stats) | **GET** /v1/accounts/follower-stats | Get follower stats
90
+ *Zernio::AccountsApi* | [**get_instagram_follow_status**](docs/AccountsApi.md#get_instagram_follow_status) | **GET** /v1/accounts/{accountId}/follow-status/{userId} | Check whether an Instagram user follows the account
90
91
  *Zernio::AccountsApi* | [**get_slack_settings**](docs/AccountsApi.md#get_slack_settings) | **GET** /v1/accounts/{accountId}/slack-settings | Get Slack account settings
91
92
  *Zernio::AccountsApi* | [**get_tik_tok_creator_info**](docs/AccountsApi.md#get_tik_tok_creator_info) | **GET** /v1/accounts/{accountId}/tiktok/creator-info | Get TikTok creator info
92
93
  *Zernio::AccountsApi* | [**list_accounts**](docs/AccountsApi.md#list_accounts) | **GET** /v1/accounts | List accounts
@@ -725,6 +726,8 @@ Class | Method | HTTP request | Description
725
726
  - [Zernio::CheckPhoneNumberPortabilityRequest](docs/CheckPhoneNumberPortabilityRequest.md)
726
727
  - [Zernio::CheckVerification200Response](docs/CheckVerification200Response.md)
727
728
  - [Zernio::CheckVerificationRequest](docs/CheckVerificationRequest.md)
729
+ - [Zernio::CommentAutomationAudience](docs/CommentAutomationAudience.md)
730
+ - [Zernio::CommentAutomationFollowGate](docs/CommentAutomationFollowGate.md)
728
731
  - [Zernio::CompleteGoogleBusinessVerificationRequest](docs/CompleteGoogleBusinessVerificationRequest.md)
729
732
  - [Zernio::CompleteTelegramConnect200Response](docs/CompleteTelegramConnect200Response.md)
730
733
  - [Zernio::CompleteWhatsAppPhoneSelection200Response](docs/CompleteWhatsAppPhoneSelection200Response.md)
@@ -1183,6 +1186,7 @@ Class | Method | HTTP request | Description
1183
1186
  - [Zernio::GetInboxVolume200ResponseTimeseriesInner](docs/GetInboxVolume200ResponseTimeseriesInner.md)
1184
1187
  - [Zernio::GetInboxVolume400Response](docs/GetInboxVolume400Response.md)
1185
1188
  - [Zernio::GetInstagramAccountInsights404Response](docs/GetInstagramAccountInsights404Response.md)
1189
+ - [Zernio::GetInstagramFollowStatus200Response](docs/GetInstagramFollowStatus200Response.md)
1186
1190
  - [Zernio::GetInstagramPublishingLimit200Response](docs/GetInstagramPublishingLimit200Response.md)
1187
1191
  - [Zernio::GetInstagramStoryInsights200Response](docs/GetInstagramStoryInsights200Response.md)
1188
1192
  - [Zernio::GetInstagramStoryInsights200ResponseData](docs/GetInstagramStoryInsights200ResponseData.md)
@@ -2107,6 +2111,7 @@ Class | Method | HTTP request | Description
2107
2111
  - [Zernio::WebhookPayloadCommentCommentAd](docs/WebhookPayloadCommentCommentAd.md)
2108
2112
  - [Zernio::WebhookPayloadCommentCommentAttachment](docs/WebhookPayloadCommentCommentAttachment.md)
2109
2113
  - [Zernio::WebhookPayloadCommentCommentAuthor](docs/WebhookPayloadCommentCommentAuthor.md)
2114
+ - [Zernio::WebhookPayloadCommentCommentAuthorInstagramProfile](docs/WebhookPayloadCommentCommentAuthorInstagramProfile.md)
2110
2115
  - [Zernio::WebhookPayloadCommentPost](docs/WebhookPayloadCommentPost.md)
2111
2116
  - [Zernio::WebhookPayloadConversationStarted](docs/WebhookPayloadConversationStarted.md)
2112
2117
  - [Zernio::WebhookPayloadConversationStartedConversation](docs/WebhookPayloadConversationStartedConversation.md)
data/docs/AccountsApi.md CHANGED
@@ -8,6 +8,7 @@ All URIs are relative to *https://zernio.com/api*
8
8
  | [**get_account_health**](AccountsApi.md#get_account_health) | **GET** /v1/accounts/{accountId}/health | Check account health |
9
9
  | [**get_all_accounts_health**](AccountsApi.md#get_all_accounts_health) | **GET** /v1/accounts/health | Check accounts health |
10
10
  | [**get_follower_stats**](AccountsApi.md#get_follower_stats) | **GET** /v1/accounts/follower-stats | Get follower stats |
11
+ | [**get_instagram_follow_status**](AccountsApi.md#get_instagram_follow_status) | **GET** /v1/accounts/{accountId}/follow-status/{userId} | Check whether an Instagram user follows the account |
11
12
  | [**get_slack_settings**](AccountsApi.md#get_slack_settings) | **GET** /v1/accounts/{accountId}/slack-settings | Get Slack account settings |
12
13
  | [**get_tik_tok_creator_info**](AccountsApi.md#get_tik_tok_creator_info) | **GET** /v1/accounts/{accountId}/tiktok/creator-info | Get TikTok creator info |
13
14
  | [**list_accounts**](AccountsApi.md#list_accounts) | **GET** /v1/accounts | List accounts |
@@ -308,6 +309,81 @@ end
308
309
  - **Accept**: application/json
309
310
 
310
311
 
312
+ ## get_instagram_follow_status
313
+
314
+ > <GetInstagramFollowStatus200Response> get_instagram_follow_status(account_id, user_id, opts)
315
+
316
+ Check whether an Instagram user follows the account
317
+
318
+ Resolves the follow relationship between an Instagram user and the connected account, plus their public profile counters. `userId` is the Instagram-scoped id (IGSID) Meta gives you on a webhook: `sender.id` on `message.received`, `comment.author.id` on `comment.received`. **Meta only answers for people who have MESSAGED the account.** Commenting grants no consent, so a commenter who has never DMed you is unresolvable - that is a platform rule, not a limitation of this endpoint. When it cannot be resolved the response is still `200` with `isFollower: null` and an `unavailableReason`, because \"unknown\" is a normal state to branch on: * `consent_required` - the user has never messaged this account. * `dm_access_disabled` - the account owner turned off Instagram Direct API access. * `not_messageable` - the id is not a messaging-scoped id. * `error` - a transient Graph API failure. To gate a comment automation on this, use the automation's `audience` rules instead of calling this per comment - they run the same lookup only on comments that actually match a keyword, and can ask the commenter to confirm with one tap. Answers are cached briefly per (account, user). Pass `refresh=true` right after asking someone to follow, so a follow from a moment ago is visible.
319
+
320
+ ### Examples
321
+
322
+ ```ruby
323
+ require 'time'
324
+ require 'zernio-sdk'
325
+ # setup authorization
326
+ Zernio.configure do |config|
327
+ # Configure Bearer authorization (JWT): bearerAuth
328
+ config.access_token = 'YOUR_BEARER_TOKEN'
329
+ end
330
+
331
+ api_instance = Zernio::AccountsApi.new
332
+ account_id = 'account_id_example' # String | Instagram account ID
333
+ user_id = 'user_id_example' # String | Instagram-scoped user id (IGSID) from a webhook payload
334
+ opts = {
335
+ refresh: true # Boolean | Bypass the cache and re-query Meta
336
+ }
337
+
338
+ begin
339
+ # Check whether an Instagram user follows the account
340
+ result = api_instance.get_instagram_follow_status(account_id, user_id, opts)
341
+ p result
342
+ rescue Zernio::ApiError => e
343
+ puts "Error when calling AccountsApi->get_instagram_follow_status: #{e}"
344
+ end
345
+ ```
346
+
347
+ #### Using the get_instagram_follow_status_with_http_info variant
348
+
349
+ This returns an Array which contains the response data, status code and headers.
350
+
351
+ > <Array(<GetInstagramFollowStatus200Response>, Integer, Hash)> get_instagram_follow_status_with_http_info(account_id, user_id, opts)
352
+
353
+ ```ruby
354
+ begin
355
+ # Check whether an Instagram user follows the account
356
+ data, status_code, headers = api_instance.get_instagram_follow_status_with_http_info(account_id, user_id, opts)
357
+ p status_code # => 2xx
358
+ p headers # => { ... }
359
+ p data # => <GetInstagramFollowStatus200Response>
360
+ rescue Zernio::ApiError => e
361
+ puts "Error when calling AccountsApi->get_instagram_follow_status_with_http_info: #{e}"
362
+ end
363
+ ```
364
+
365
+ ### Parameters
366
+
367
+ | Name | Type | Description | Notes |
368
+ | ---- | ---- | ----------- | ----- |
369
+ | **account_id** | **String** | Instagram account ID | |
370
+ | **user_id** | **String** | Instagram-scoped user id (IGSID) from a webhook payload | |
371
+ | **refresh** | **Boolean** | Bypass the cache and re-query Meta | [optional] |
372
+
373
+ ### Return type
374
+
375
+ [**GetInstagramFollowStatus200Response**](GetInstagramFollowStatus200Response.md)
376
+
377
+ ### Authorization
378
+
379
+ [bearerAuth](../README.md#bearerAuth)
380
+
381
+ ### HTTP request headers
382
+
383
+ - **Content-Type**: Not defined
384
+ - **Accept**: application/json
385
+
386
+
311
387
  ## get_slack_settings
312
388
 
313
389
  > <GetSlackSettings200Response> get_slack_settings(account_id)
@@ -0,0 +1,22 @@
1
+ # Zernio::CommentAutomationAudience
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **follower_status** | **String** | | [optional][default to &#39;any&#39;] |
8
+ | **min_follower_count** | **Integer** | Skip commenters with fewer followers than this. Omit for no size rule. | [optional] |
9
+ | **when_unknown** | **String** | What to do when Instagram will not reveal the follow relationship. * &#x60;send&#x60; (default) - deliver the DM anyway (fails open). * &#x60;skip&#x60; - stay silent. * &#x60;verify&#x60; - send &#x60;followGate.message&#x60; with a confirm button. Tapping it is a message, which grants consent, so the re-check on the tap resolves and the real DM (or &#x60;followGate.notFollowingMessage&#x60;) follows automatically. | [optional][default to &#39;send&#39;] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::CommentAutomationAudience.new(
17
+ follower_status: null,
18
+ min_follower_count: null,
19
+ when_unknown: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,22 @@
1
+ # Zernio::CommentAutomationFollowGate
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **message** | **String** | Confirmation DM sent when whenUnknown&#x3D;verify. | [optional] |
8
+ | **button_label** | **String** | Confirm button label. Defaults to \&quot;I&#39;m following\&quot;. | [optional] |
9
+ | **not_following_message** | **String** | Sent to a commenter we know does not follow (followerStatus&#x3D;follower). Omit to stay silent on a keyword comment; a confirm tap always gets an answer. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::CommentAutomationFollowGate.new(
17
+ message: null,
18
+ button_label: null,
19
+ not_following_message: null
20
+ )
21
+ ```
22
+
@@ -18,7 +18,7 @@ All URIs are relative to *https://zernio.com/api*
18
18
 
19
19
  Create comment-to-DM automation
20
20
 
21
- Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with `trigger: story_reply`, replies to your Instagram story with one), they automatically receive a DM. Triggers (`trigger`): * `comment` (default): fires on keyword comments on a post or reel. * `story_reply`: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set `platformPostId` to a story media id to scope to one story, or omit it to match replies to any story. Targeting (comment trigger): * Per-post: set `platformPostId` to scope to one specific post (only one active per-post automation is allowed per post). * Account-wide (\"any post\"): omit `platformPostId` (and `postId`). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post. Links in the DM's buttons can be click-tracked (`linkTracking`, on by default) and clickers optionally tagged (`clickTag`) for segmentation. Stats returned include delivered, read, and link clicks.
21
+ Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with `trigger: story_reply`, replies to your Instagram story with one), they automatically receive a DM. Triggers (`trigger`): * `comment` (default): fires on keyword comments on a post or reel. * `story_reply`: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set `platformPostId` to a story media id to scope to one story, or omit it to match replies to any story. Targeting (comment trigger): * Per-post: set `platformPostId` to scope to one specific post (only one active per-post automation is allowed per post). * Account-wide (\"any post\"): omit `platformPostId` (and `postId`). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post. Audience (`audience`, Instagram only): restrict the automation to followers or non-followers, and/or to accounts above a follower count. Instagram only reveals the follow relationship for people who have messaged the account, so `audience.whenUnknown` decides what happens for everyone else - including `verify`, which sends a one-tap confirmation DM (`followGate`) and then delivers the real DM automatically. People we already know follow you skip the tap entirely. Links in the DM's buttons can be click-tracked (`linkTracking`, on by default) and clickers optionally tagged (`clickTag`) for segmentation. Stats returned include delivered, read, and link clicks.
22
22
 
23
23
  ### Examples
24
24
 
@@ -20,6 +20,8 @@
20
20
  | **comment_reply_variations** | **Array&lt;String&gt;** | Alternate public replies rotated at random with commentReply. Omitted when none. | [optional] |
21
21
  | **link_tracking** | **Boolean** | | [optional] |
22
22
  | **click_tag** | **String** | | [optional] |
23
+ | **audience** | [**CommentAutomationAudience**](CommentAutomationAudience.md) | | [optional] |
24
+ | **follow_gate** | [**CommentAutomationFollowGate**](CommentAutomationFollowGate.md) | | [optional] |
23
25
  | **is_active** | **Boolean** | | [optional] |
24
26
  | **stats** | [**CreateCommentAutomation200ResponseAutomationStats**](CreateCommentAutomation200ResponseAutomationStats.md) | | [optional] |
25
27
  | **created_at** | **Time** | | [optional] |
@@ -46,6 +48,8 @@ instance = Zernio::CreateCommentAutomation200ResponseAutomation.new(
46
48
  comment_reply_variations: null,
47
49
  link_tracking: null,
48
50
  click_tag: null,
51
+ audience: null,
52
+ follow_gate: null,
49
53
  is_active: null,
50
54
  stats: null,
51
55
  created_at: null
@@ -22,6 +22,8 @@
22
22
  | **comment_reply_variations** | **Array&lt;String&gt;** | Optional alternate public replies, rotated at random alongside commentReply (picked independently of the DM). Up to 5. | [optional] |
23
23
  | **link_tracking** | **Boolean** | Wrap link buttons in the DM in a tracked redirect so clicks are counted (Link Clicks / CTR). Pass false to send links exactly as written. Defaults to on. | [optional][default to true] |
24
24
  | **click_tag** | **String** | Optional tag applied to a contact when they click a tracked link (requires linkTracking). Lets you segment clickers for broadcasts/sequences. | [optional] |
25
+ | **audience** | [**CommentAutomationAudience**](CommentAutomationAudience.md) | | [optional] |
26
+ | **follow_gate** | [**CommentAutomationFollowGate**](CommentAutomationFollowGate.md) | | [optional] |
25
27
 
26
28
  ## Example
27
29
 
@@ -46,7 +48,9 @@ instance = Zernio::CreateCommentAutomationRequest.new(
46
48
  dm_message_variations: null,
47
49
  comment_reply_variations: null,
48
50
  link_tracking: null,
49
- click_tag: null
51
+ click_tag: null,
52
+ audience: null,
53
+ follow_gate: null
50
54
  )
51
55
  ```
52
56
 
@@ -23,6 +23,8 @@
23
23
  | **comment_reply_variations** | **Array&lt;String&gt;** | Alternate public replies rotated at random with commentReply. Omitted when none. | [optional] |
24
24
  | **link_tracking** | **Boolean** | | [optional] |
25
25
  | **click_tag** | **String** | | [optional] |
26
+ | **audience** | [**CommentAutomationAudience**](CommentAutomationAudience.md) | | [optional] |
27
+ | **follow_gate** | [**CommentAutomationFollowGate**](CommentAutomationFollowGate.md) | | [optional] |
26
28
  | **is_active** | **Boolean** | | [optional] |
27
29
  | **stats** | [**CreateCommentAutomation200ResponseAutomationStats**](CreateCommentAutomation200ResponseAutomationStats.md) | | [optional] |
28
30
  | **created_at** | **Time** | | [optional] |
@@ -53,6 +55,8 @@ instance = Zernio::GetCommentAutomation200ResponseAutomation.new(
53
55
  comment_reply_variations: null,
54
56
  link_tracking: null,
55
57
  click_tag: null,
58
+ audience: null,
59
+ follow_gate: null,
56
60
  is_active: null,
57
61
  stats: null,
58
62
  created_at: null,
@@ -9,7 +9,10 @@
9
9
  | **commenter_id** | **String** | | [optional] |
10
10
  | **commenter_name** | **String** | | [optional] |
11
11
  | **comment_text** | **String** | | [optional] |
12
- | **status** | **String** | DM outcome | [optional] |
12
+ | **status** | **String** | DM outcome. &#39;gated&#39; &#x3D; the follow-gate confirmation DM went out and we are waiting for the tap; it flips to &#39;sent&#39; or &#39;skipped&#39; when they tap. | [optional] |
13
+ | **audience_outcome** | **String** | How the audience rule resolved. Absent on automations without one. | [optional] |
14
+ | **commenter_is_follower** | **Boolean** | Follow relationship at decision time. Absent when Instagram would not tell us (the commenter never messaged the account). | [optional] |
15
+ | **commenter_follower_count** | **Integer** | | [optional] |
13
16
  | **error** | **String** | DM error message if status is failed | [optional] |
14
17
  | **comment_reply_status** | **String** | Outcome of the optional public reply on the triggering comment. &#39;skipped&#39; if no commentReply was configured or if the DM failed (the public reply is not attempted in that case). | [optional] |
15
18
  | **comment_reply_error** | **String** | Public-reply error message if commentReplyStatus is failed | [optional] |
@@ -27,6 +30,9 @@ instance = Zernio::GetCommentAutomation200ResponseLogsInner.new(
27
30
  commenter_name: null,
28
31
  comment_text: null,
29
32
  status: null,
33
+ audience_outcome: null,
34
+ commenter_is_follower: null,
35
+ commenter_follower_count: null,
30
36
  error: null,
31
37
  comment_reply_status: null,
32
38
  comment_reply_error: null,
@@ -0,0 +1,34 @@
1
+ # Zernio::GetInstagramFollowStatus200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **user_id** | **String** | | |
8
+ | **account_id** | **String** | | |
9
+ | **is_follower** | **Boolean** | The user follows this account. Null &#x3D; unknown, never \&quot;no\&quot;. | |
10
+ | **is_followed_by_account** | **Boolean** | This account follows the user. | [optional] |
11
+ | **follower_count** | **Integer** | | [optional] |
12
+ | **is_verified** | **Boolean** | | [optional] |
13
+ | **username** | **String** | | [optional] |
14
+ | **name** | **String** | | [optional] |
15
+ | **unavailable_reason** | **String** | Why the follow relationship could not be resolved. Null when it was. | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'zernio-sdk'
21
+
22
+ instance = Zernio::GetInstagramFollowStatus200Response.new(
23
+ user_id: null,
24
+ account_id: null,
25
+ is_follower: null,
26
+ is_followed_by_account: null,
27
+ follower_count: null,
28
+ is_verified: null,
29
+ username: null,
30
+ name: null,
31
+ unavailable_reason: null
32
+ )
33
+ ```
34
+
@@ -15,6 +15,8 @@
15
15
  | **comment_reply** | **String** | | [optional] |
16
16
  | **dm_message_variations** | **Array&lt;String&gt;** | Alternate DM texts rotated at random with dmMessage. Omitted when none. | [optional] |
17
17
  | **comment_reply_variations** | **Array&lt;String&gt;** | Alternate public replies rotated at random with commentReply. Omitted when none. | [optional] |
18
+ | **audience** | [**CommentAutomationAudience**](CommentAutomationAudience.md) | | [optional] |
19
+ | **follow_gate** | [**CommentAutomationFollowGate**](CommentAutomationFollowGate.md) | | [optional] |
18
20
  | **is_active** | **Boolean** | | [optional] |
19
21
  | **updated_at** | **Time** | | [optional] |
20
22
 
@@ -35,6 +37,8 @@ instance = Zernio::UpdateCommentAutomation200ResponseAutomation.new(
35
37
  comment_reply: null,
36
38
  dm_message_variations: null,
37
39
  comment_reply_variations: null,
40
+ audience: null,
41
+ follow_gate: null,
38
42
  is_active: null,
39
43
  updated_at: null
40
44
  )
@@ -17,6 +17,8 @@
17
17
  | **comment_reply_variations** | **Array&lt;String&gt;** | Alternate public replies for random rotation. Pass [] to clear. | [optional] |
18
18
  | **link_tracking** | **Boolean** | Wrap link buttons in a tracked redirect to count clicks. Pass false to send links untouched. | [optional] |
19
19
  | **click_tag** | **String** | Tag applied to a contact when they click a tracked link (requires linkTracking). Empty string clears it. | [optional] |
20
+ | **audience** | [**CommentAutomationAudience**](CommentAutomationAudience.md) | | [optional] |
21
+ | **follow_gate** | [**CommentAutomationFollowGate**](CommentAutomationFollowGate.md) | | [optional] |
20
22
  | **is_active** | **Boolean** | | [optional] |
21
23
 
22
24
  ## Example
@@ -38,6 +40,8 @@ instance = Zernio::UpdateCommentAutomationRequest.new(
38
40
  comment_reply_variations: null,
39
41
  link_tracking: null,
40
42
  click_tag: null,
43
+ audience: null,
44
+ follow_gate: null,
41
45
  is_active: null
42
46
  )
43
47
  ```
@@ -8,6 +8,7 @@
8
8
  | **username** | **String** | | [optional] |
9
9
  | **name** | **String** | | [optional] |
10
10
  | **picture** | **String** | | [optional] |
11
+ | **instagram_profile** | [**WebhookPayloadCommentCommentAuthorInstagramProfile**](WebhookPayloadCommentCommentAuthorInstagramProfile.md) | | [optional] |
11
12
 
12
13
  ## Example
13
14
 
@@ -18,7 +19,8 @@ instance = Zernio::WebhookPayloadCommentCommentAuthor.new(
18
19
  id: null,
19
20
  username: null,
20
21
  name: null,
21
- picture: null
22
+ picture: null,
23
+ instagram_profile: null
22
24
  )
23
25
  ```
24
26
 
@@ -0,0 +1,24 @@
1
+ # Zernio::WebhookPayloadCommentCommentAuthorInstagramProfile
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **is_follower** | **Boolean** | The commenter follows this account. | [optional] |
8
+ | **is_following** | **Boolean** | This account follows the commenter. | [optional] |
9
+ | **follower_count** | **Integer** | | [optional] |
10
+ | **is_verified** | **Boolean** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::WebhookPayloadCommentCommentAuthorInstagramProfile.new(
18
+ is_follower: null,
19
+ is_following: null,
20
+ follower_count: null,
21
+ is_verified: null
22
+ )
23
+ ```
24
+
@@ -295,6 +295,78 @@ module Zernio
295
295
  return data, status_code, headers
296
296
  end
297
297
 
298
+ # Check whether an Instagram user follows the account
299
+ # Resolves the follow relationship between an Instagram user and the connected account, plus their public profile counters. `userId` is the Instagram-scoped id (IGSID) Meta gives you on a webhook: `sender.id` on `message.received`, `comment.author.id` on `comment.received`. **Meta only answers for people who have MESSAGED the account.** Commenting grants no consent, so a commenter who has never DMed you is unresolvable - that is a platform rule, not a limitation of this endpoint. When it cannot be resolved the response is still `200` with `isFollower: null` and an `unavailableReason`, because \"unknown\" is a normal state to branch on: * `consent_required` - the user has never messaged this account. * `dm_access_disabled` - the account owner turned off Instagram Direct API access. * `not_messageable` - the id is not a messaging-scoped id. * `error` - a transient Graph API failure. To gate a comment automation on this, use the automation's `audience` rules instead of calling this per comment - they run the same lookup only on comments that actually match a keyword, and can ask the commenter to confirm with one tap. Answers are cached briefly per (account, user). Pass `refresh=true` right after asking someone to follow, so a follow from a moment ago is visible.
300
+ # @param account_id [String] Instagram account ID
301
+ # @param user_id [String] Instagram-scoped user id (IGSID) from a webhook payload
302
+ # @param [Hash] opts the optional parameters
303
+ # @option opts [Boolean] :refresh Bypass the cache and re-query Meta
304
+ # @return [GetInstagramFollowStatus200Response]
305
+ def get_instagram_follow_status(account_id, user_id, opts = {})
306
+ data, _status_code, _headers = get_instagram_follow_status_with_http_info(account_id, user_id, opts)
307
+ data
308
+ end
309
+
310
+ # Check whether an Instagram user follows the account
311
+ # Resolves the follow relationship between an Instagram user and the connected account, plus their public profile counters. &#x60;userId&#x60; is the Instagram-scoped id (IGSID) Meta gives you on a webhook: &#x60;sender.id&#x60; on &#x60;message.received&#x60;, &#x60;comment.author.id&#x60; on &#x60;comment.received&#x60;. **Meta only answers for people who have MESSAGED the account.** Commenting grants no consent, so a commenter who has never DMed you is unresolvable - that is a platform rule, not a limitation of this endpoint. When it cannot be resolved the response is still &#x60;200&#x60; with &#x60;isFollower: null&#x60; and an &#x60;unavailableReason&#x60;, because \&quot;unknown\&quot; is a normal state to branch on: * &#x60;consent_required&#x60; - the user has never messaged this account. * &#x60;dm_access_disabled&#x60; - the account owner turned off Instagram Direct API access. * &#x60;not_messageable&#x60; - the id is not a messaging-scoped id. * &#x60;error&#x60; - a transient Graph API failure. To gate a comment automation on this, use the automation&#39;s &#x60;audience&#x60; rules instead of calling this per comment - they run the same lookup only on comments that actually match a keyword, and can ask the commenter to confirm with one tap. Answers are cached briefly per (account, user). Pass &#x60;refresh&#x3D;true&#x60; right after asking someone to follow, so a follow from a moment ago is visible.
312
+ # @param account_id [String] Instagram account ID
313
+ # @param user_id [String] Instagram-scoped user id (IGSID) from a webhook payload
314
+ # @param [Hash] opts the optional parameters
315
+ # @option opts [Boolean] :refresh Bypass the cache and re-query Meta
316
+ # @return [Array<(GetInstagramFollowStatus200Response, Integer, Hash)>] GetInstagramFollowStatus200Response data, response status code and response headers
317
+ def get_instagram_follow_status_with_http_info(account_id, user_id, opts = {})
318
+ if @api_client.config.debugging
319
+ @api_client.config.logger.debug 'Calling API: AccountsApi.get_instagram_follow_status ...'
320
+ end
321
+ # verify the required parameter 'account_id' is set
322
+ if @api_client.config.client_side_validation && account_id.nil?
323
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_instagram_follow_status"
324
+ end
325
+ # verify the required parameter 'user_id' is set
326
+ if @api_client.config.client_side_validation && user_id.nil?
327
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling AccountsApi.get_instagram_follow_status"
328
+ end
329
+ # resource path
330
+ local_var_path = '/v1/accounts/{accountId}/follow-status/{userId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
331
+
332
+ # query parameters
333
+ query_params = opts[:query_params] || {}
334
+ query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil?
335
+
336
+ # header parameters
337
+ header_params = opts[:header_params] || {}
338
+ # HTTP header 'Accept' (if needed)
339
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
340
+
341
+ # form parameters
342
+ form_params = opts[:form_params] || {}
343
+
344
+ # http body (model)
345
+ post_body = opts[:debug_body]
346
+
347
+ # return_type
348
+ return_type = opts[:debug_return_type] || 'GetInstagramFollowStatus200Response'
349
+
350
+ # auth_names
351
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
352
+
353
+ new_options = opts.merge(
354
+ :operation => :"AccountsApi.get_instagram_follow_status",
355
+ :header_params => header_params,
356
+ :query_params => query_params,
357
+ :form_params => form_params,
358
+ :body => post_body,
359
+ :auth_names => auth_names,
360
+ :return_type => return_type
361
+ )
362
+
363
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
364
+ if @api_client.config.debugging
365
+ @api_client.config.logger.debug "API called: AccountsApi#get_instagram_follow_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
366
+ end
367
+ return data, status_code, headers
368
+ end
369
+
298
370
  # Get Slack account settings
299
371
  # Returns the connected Slack channel details and the default message identity (name and avatar shown as the author on every post, with Slack's APP badge). The identity applies to messages only; the app's own Slack profile is global and cannot be changed per workspace.
300
372
  # @param account_id [String]
@@ -20,7 +20,7 @@ module Zernio
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create comment-to-DM automation
23
- # Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with `trigger: story_reply`, replies to your Instagram story with one), they automatically receive a DM. Triggers (`trigger`): * `comment` (default): fires on keyword comments on a post or reel. * `story_reply`: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set `platformPostId` to a story media id to scope to one story, or omit it to match replies to any story. Targeting (comment trigger): * Per-post: set `platformPostId` to scope to one specific post (only one active per-post automation is allowed per post). * Account-wide (\"any post\"): omit `platformPostId` (and `postId`). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post. Links in the DM's buttons can be click-tracked (`linkTracking`, on by default) and clickers optionally tagged (`clickTag`) for segmentation. Stats returned include delivered, read, and link clicks.
23
+ # Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with `trigger: story_reply`, replies to your Instagram story with one), they automatically receive a DM. Triggers (`trigger`): * `comment` (default): fires on keyword comments on a post or reel. * `story_reply`: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set `platformPostId` to a story media id to scope to one story, or omit it to match replies to any story. Targeting (comment trigger): * Per-post: set `platformPostId` to scope to one specific post (only one active per-post automation is allowed per post). * Account-wide (\"any post\"): omit `platformPostId` (and `postId`). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post. Audience (`audience`, Instagram only): restrict the automation to followers or non-followers, and/or to accounts above a follower count. Instagram only reveals the follow relationship for people who have messaged the account, so `audience.whenUnknown` decides what happens for everyone else - including `verify`, which sends a one-tap confirmation DM (`followGate`) and then delivers the real DM automatically. People we already know follow you skip the tap entirely. Links in the DM's buttons can be click-tracked (`linkTracking`, on by default) and clickers optionally tagged (`clickTag`) for segmentation. Stats returned include delivered, read, and link clicks.
24
24
  # @param create_comment_automation_request [CreateCommentAutomationRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [CreateCommentAutomation200Response]
@@ -30,7 +30,7 @@ module Zernio
30
30
  end
31
31
 
32
32
  # Create comment-to-DM automation
33
- # Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with &#x60;trigger: story_reply&#x60;, replies to your Instagram story with one), they automatically receive a DM. Triggers (&#x60;trigger&#x60;): * &#x60;comment&#x60; (default): fires on keyword comments on a post or reel. * &#x60;story_reply&#x60;: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set &#x60;platformPostId&#x60; to a story media id to scope to one story, or omit it to match replies to any story. Targeting (comment trigger): * Per-post: set &#x60;platformPostId&#x60; to scope to one specific post (only one active per-post automation is allowed per post). * Account-wide (\&quot;any post\&quot;): omit &#x60;platformPostId&#x60; (and &#x60;postId&#x60;). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post. Links in the DM&#39;s buttons can be click-tracked (&#x60;linkTracking&#x60;, on by default) and clickers optionally tagged (&#x60;clickTag&#x60;) for segmentation. Stats returned include delivered, read, and link clicks.
33
+ # Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with &#x60;trigger: story_reply&#x60;, replies to your Instagram story with one), they automatically receive a DM. Triggers (&#x60;trigger&#x60;): * &#x60;comment&#x60; (default): fires on keyword comments on a post or reel. * &#x60;story_reply&#x60;: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set &#x60;platformPostId&#x60; to a story media id to scope to one story, or omit it to match replies to any story. Targeting (comment trigger): * Per-post: set &#x60;platformPostId&#x60; to scope to one specific post (only one active per-post automation is allowed per post). * Account-wide (\&quot;any post\&quot;): omit &#x60;platformPostId&#x60; (and &#x60;postId&#x60;). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post. Audience (&#x60;audience&#x60;, Instagram only): restrict the automation to followers or non-followers, and/or to accounts above a follower count. Instagram only reveals the follow relationship for people who have messaged the account, so &#x60;audience.whenUnknown&#x60; decides what happens for everyone else - including &#x60;verify&#x60;, which sends a one-tap confirmation DM (&#x60;followGate&#x60;) and then delivers the real DM automatically. People we already know follow you skip the tap entirely. Links in the DM&#39;s buttons can be click-tracked (&#x60;linkTracking&#x60;, on by default) and clickers optionally tagged (&#x60;clickTag&#x60;) for segmentation. Stats returned include delivered, read, and link clicks.
34
34
  # @param create_comment_automation_request [CreateCommentAutomationRequest]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(CreateCommentAutomation200Response, Integer, Hash)>] CreateCommentAutomation200Response data, response status code and response headers
@@ -242,7 +242,7 @@ module Zernio
242
242
  if @api_client.config.client_side_validation && automation_id.nil?
243
243
  fail ArgumentError, "Missing the required parameter 'automation_id' when calling CommentAutomationsApi.list_comment_automation_logs"
244
244
  end
245
- allowable_values = ["sent", "failed", "skipped"]
245
+ allowable_values = ["sent", "failed", "skipped", "gated"]
246
246
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
247
247
  fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
248
248
  end