late-sdk 0.0.684 → 0.0.686

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 (55) 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 +2 -2
  7. data/docs/ConversionEvent.md +1 -1
  8. data/docs/ConversionEventUser.md +2 -0
  9. data/docs/CreateCommentAutomation200ResponseAutomation.md +8 -0
  10. data/docs/CreateCommentAutomationRequest.md +9 -1
  11. data/docs/GetCommentAutomation200ResponseAutomation.md +8 -0
  12. data/docs/GetCommentAutomation200ResponseLogsInner.md +9 -1
  13. data/docs/GetInstagramFollowStatus200Response.md +34 -0
  14. data/docs/ListCommentAutomations200ResponseAutomationsInner.md +4 -0
  15. data/docs/UpdateCommentAutomation200ResponseAutomation.md +4 -0
  16. data/docs/UpdateCommentAutomationRequest.md +8 -0
  17. data/docs/WebhookPayloadCommentCommentAuthor.md +3 -1
  18. data/docs/WebhookPayloadCommentCommentAuthorInstagramProfile.md +24 -0
  19. data/lib/zernio-sdk/api/accounts_api.rb +72 -0
  20. data/lib/zernio-sdk/api/comment_automations_api.rb +3 -3
  21. data/lib/zernio-sdk/models/comment_automation_audience.rb +237 -0
  22. data/lib/zernio-sdk/models/comment_automation_follow_gate.rb +226 -0
  23. data/lib/zernio-sdk/models/conversion_event.rb +1 -1
  24. data/lib/zernio-sdk/models/conversion_event_user.rb +11 -1
  25. data/lib/zernio-sdk/models/create_comment_automation200_response_automation.rb +39 -1
  26. data/lib/zernio-sdk/models/create_comment_automation_request.rb +98 -4
  27. data/lib/zernio-sdk/models/get_comment_automation200_response_automation.rb +39 -1
  28. data/lib/zernio-sdk/models/get_comment_automation200_response_logs_inner.rb +55 -4
  29. data/lib/zernio-sdk/models/get_instagram_follow_status200_response.rb +299 -0
  30. data/lib/zernio-sdk/models/list_comment_automations200_response_automations_inner.rb +21 -1
  31. data/lib/zernio-sdk/models/update_comment_automation200_response_automation.rb +19 -1
  32. data/lib/zernio-sdk/models/update_comment_automation_request.rb +95 -1
  33. data/lib/zernio-sdk/models/webhook_payload_comment_comment_author.rb +14 -5
  34. data/lib/zernio-sdk/models/webhook_payload_comment_comment_author_instagram_profile.rb +181 -0
  35. data/lib/zernio-sdk/version.rb +1 -1
  36. data/lib/zernio-sdk.rb +4 -0
  37. data/openapi.yaml +189 -4
  38. data/spec/api/accounts_api_spec.rb +14 -0
  39. data/spec/api/comment_automations_api_spec.rb +1 -1
  40. data/spec/models/comment_automation_audience_spec.rb +56 -0
  41. data/spec/models/comment_automation_follow_gate_spec.rb +48 -0
  42. data/spec/models/conversion_event_user_spec.rb +6 -0
  43. data/spec/models/create_comment_automation200_response_automation_spec.rb +24 -0
  44. data/spec/models/create_comment_automation_request_spec.rb +24 -0
  45. data/spec/models/get_comment_automation200_response_automation_spec.rb +24 -0
  46. data/spec/models/get_comment_automation200_response_logs_inner_spec.rb +29 -1
  47. data/spec/models/get_instagram_follow_status200_response_spec.rb +88 -0
  48. data/spec/models/list_comment_automations200_response_automations_inner_spec.rb +12 -0
  49. data/spec/models/update_comment_automation200_response_automation_spec.rb +12 -0
  50. data/spec/models/update_comment_automation_request_spec.rb +24 -0
  51. data/spec/models/webhook_payload_comment_comment_author_instagram_profile_spec.rb +54 -0
  52. data/spec/models/webhook_payload_comment_comment_author_spec.rb +6 -0
  53. data/zernio-sdk-0.0.686.gem +0 -0
  54. metadata +1579 -1563
  55. data/zernio-sdk-0.0.684.gem +0 -0
data/openapi.yaml CHANGED
@@ -1404,6 +1404,49 @@ components:
1404
1404
  type: object
1405
1405
  additionalProperties: true
1406
1406
  description: Additional structured context (e.g. field-level validation errors).
1407
+ CommentAutomationAudience:
1408
+ type: object
1409
+ description: |
1410
+ Who a comment automation answers. Instagram only - Meta exposes the follow
1411
+ relationship on no other platform, and only for people who have MESSAGED the
1412
+ account (a comment grants no consent). `whenUnknown` is therefore the important
1413
+ setting: it decides what happens for a first-time commenter.
1414
+ properties:
1415
+ followerStatus:
1416
+ type: string
1417
+ enum: [any, follower, non_follower]
1418
+ default: any
1419
+ minFollowerCount:
1420
+ type: integer
1421
+ minimum: 0
1422
+ description: 'Skip commenters with fewer followers than this. Omit for no size rule.'
1423
+ whenUnknown:
1424
+ type: string
1425
+ enum: [send, skip, verify]
1426
+ default: send
1427
+ description: |
1428
+ What to do when Instagram will not reveal the follow relationship.
1429
+ * `send` (default) - deliver the DM anyway (fails open).
1430
+ * `skip` - stay silent.
1431
+ * `verify` - send `followGate.message` with a confirm button. Tapping it is a
1432
+ message, which grants consent, so the re-check on the tap resolves and the
1433
+ real DM (or `followGate.notFollowingMessage`) follows automatically.
1434
+ CommentAutomationFollowGate:
1435
+ type: object
1436
+ description: 'Copy for the follow gate. Sensible defaults are used for any field left empty.'
1437
+ properties:
1438
+ message:
1439
+ type: string
1440
+ maxLength: 640
1441
+ description: 'Confirmation DM sent when whenUnknown=verify.'
1442
+ buttonLabel:
1443
+ type: string
1444
+ maxLength: 20
1445
+ description: 'Confirm button label. Defaults to "I''m following".'
1446
+ notFollowingMessage:
1447
+ type: string
1448
+ maxLength: 1000
1449
+ description: 'Sent to a commenter we know does not follow (followerStatus=follower). Omit to stay silent on a keyword comment; a confirm tap always gets an answer.'
1407
1450
  DmButton:
1408
1451
  type: object
1409
1452
  description: |
@@ -2670,6 +2713,25 @@ components:
2670
2713
  type: string
2671
2714
  picture:
2672
2715
  type: [string, "null"]
2716
+ instagramProfile:
2717
+ type: object
2718
+ description: |
2719
+ Instagram only, best-effort. Present ONLY for commenters who have
2720
+ messaged the account before: Meta gates the follow relationship behind
2721
+ messaging consent, and commenting does not grant it. Absent otherwise -
2722
+ treat a missing object as "unknown", never as "not a follower". To check
2723
+ on demand, call GET /v1/accounts/{accountId}/follow-status/{userId}.
2724
+ properties:
2725
+ isFollower:
2726
+ type: [boolean, "null"]
2727
+ description: The commenter follows this account.
2728
+ isFollowing:
2729
+ type: [boolean, "null"]
2730
+ description: This account follows the commenter.
2731
+ followerCount:
2732
+ type: [integer, "null"]
2733
+ isVerified:
2734
+ type: [boolean, "null"]
2673
2735
  createdAt:
2674
2736
  type: string
2675
2737
  format: date-time
@@ -7624,6 +7686,14 @@ components:
7624
7686
  zip: { type: string, description: "Meta advanced matching (zp). US uses first 5 digits; hashed server-side. Meta only." }
7625
7687
  dob: { type: string, description: "Meta advanced matching (db). YYYYMMDD; hashed server-side. Meta only." }
7626
7688
  gender: { type: string, description: "Meta advanced matching (ge). 'f' or 'm'; hashed server-side. Meta only." }
7689
+ leadId:
7690
+ type: string
7691
+ description: |
7692
+ Meta lead ID from a Lead Ad submission, as a string. Required
7693
+ for Conversion Leads CRM events: send it with
7694
+ `actionSource: 'crm'` and
7695
+ `platformData: { event_source: 'crm', lead_event_source: '<CRM name>' }`.
7696
+ Forwarded unhashed to Meta's `user_data.lead_id`. Meta only.
7627
7697
  clickIds:
7628
7698
  type: object
7629
7699
  description: Platform click identifiers captured from the originating ad click.
@@ -7664,7 +7734,13 @@ components:
7664
7734
  platformData:
7665
7735
  type: object
7666
7736
  additionalProperties: true
7667
- description: Escape hatch for platform-specific fields we haven't normalized. Forwarded as-is.
7737
+ description: |
7738
+ Escape hatch for platform-specific fields we haven't normalized.
7739
+ On Meta, keys are shallow-merged into `custom_data` only: fields
7740
+ Zernio already builds (`value`, `currency`, `contents`,
7741
+ `num_items`) always win on collision, and `user_data` (hashed
7742
+ match keys) is never touched. Use first-class fields (e.g.
7743
+ `user.leadId`) for anything that must reach `user_data`.
7668
7744
 
7669
7745
  ConversionDestination:
7670
7746
  type: object
@@ -15031,6 +15107,80 @@ paths:
15031
15107
  recommendations: []
15032
15108
  '401': { $ref: '#/components/responses/Unauthorized' }
15033
15109
  '404': { $ref: '#/components/responses/NotFound' }
15110
+ /v1/accounts/{accountId}/follow-status/{userId}:
15111
+ get:
15112
+ operationId: getInstagramFollowStatus
15113
+ tags: [Accounts]
15114
+ x-platforms: ["instagram"]
15115
+ summary: Check whether an Instagram user follows the account
15116
+ description: |
15117
+ Resolves the follow relationship between an Instagram user and the connected
15118
+ account, plus their public profile counters.
15119
+
15120
+ `userId` is the Instagram-scoped id (IGSID) Meta gives you on a webhook:
15121
+ `sender.id` on `message.received`, `comment.author.id` on `comment.received`.
15122
+
15123
+ **Meta only answers for people who have MESSAGED the account.** Commenting grants
15124
+ no consent, so a commenter who has never DMed you is unresolvable - that is a
15125
+ platform rule, not a limitation of this endpoint. When it cannot be resolved the
15126
+ response is still `200` with `isFollower: null` and an `unavailableReason`, because
15127
+ "unknown" is a normal state to branch on:
15128
+
15129
+ * `consent_required` - the user has never messaged this account.
15130
+ * `dm_access_disabled` - the account owner turned off Instagram Direct API access.
15131
+ * `not_messageable` - the id is not a messaging-scoped id.
15132
+ * `error` - a transient Graph API failure.
15133
+
15134
+ To gate a comment automation on this, use the automation's `audience` rules instead
15135
+ of calling this per comment - they run the same lookup only on comments that
15136
+ actually match a keyword, and can ask the commenter to confirm with one tap.
15137
+
15138
+ Answers are cached briefly per (account, user). Pass `refresh=true` right after
15139
+ asking someone to follow, so a follow from a moment ago is visible.
15140
+ security:
15141
+ - bearerAuth: []
15142
+ parameters:
15143
+ - { name: accountId, in: path, required: true, schema: { type: string }, description: Instagram account ID }
15144
+ - { name: userId, in: path, required: true, schema: { type: string }, description: 'Instagram-scoped user id (IGSID) from a webhook payload' }
15145
+ - { name: refresh, in: query, required: false, schema: { type: boolean }, description: Bypass the cache and re-query Meta }
15146
+ responses:
15147
+ '200':
15148
+ description: Follow status (fields are null when Meta would not resolve it)
15149
+ content:
15150
+ application/json:
15151
+ schema:
15152
+ type: object
15153
+ required: [userId, accountId, isFollower]
15154
+ properties:
15155
+ userId: { type: string }
15156
+ accountId: { type: string }
15157
+ isFollower:
15158
+ type: [boolean, "null"]
15159
+ description: 'The user follows this account. Null = unknown, never "no".'
15160
+ isFollowedByAccount:
15161
+ type: [boolean, "null"]
15162
+ description: This account follows the user.
15163
+ followerCount: { type: [integer, "null"] }
15164
+ isVerified: { type: [boolean, "null"] }
15165
+ username: { type: [string, "null"] }
15166
+ name: { type: [string, "null"] }
15167
+ unavailableReason:
15168
+ type: [string, "null"]
15169
+ enum: [consent_required, dm_access_disabled, not_messageable, error, null]
15170
+ description: 'Why the follow relationship could not be resolved. Null when it was.'
15171
+ example:
15172
+ userId: "1312733120229708"
15173
+ accountId: "6977a34e77637c5c857c816c"
15174
+ isFollower: true
15175
+ isFollowedByAccount: false
15176
+ followerCount: 25
15177
+ isVerified: false
15178
+ username: "to.bias8262"
15179
+ name: "Tobi Ma"
15180
+ unavailableReason: null
15181
+ '400': { $ref: '#/components/responses/BadRequest' }
15182
+ '401': { $ref: '#/components/responses/Unauthorized' }
15183
+ '404': { $ref: '#/components/responses/NotFound' }
15034
15184
  /v1/accounts/{accountId}/tiktok/creator-info:
15035
15185
  get:
15036
15186
  x-resource-group: "accounts"
@@ -35720,6 +35870,8 @@ paths:
35720
35870
  commentReplyVariations: { type: array, items: { type: string }, description: "Alternate public replies rotated at random with commentReply. Omitted when none." }
35721
35871
  linkTracking: { type: boolean, description: "Whether link buttons in the DM are wrapped in a tracked redirect to count clicks." }
35722
35872
  clickTag: { type: string, description: "Tag applied to a contact when they click a tracked link." }
35873
+ dmDelaySeconds: { type: integer, description: "Seconds waited after the trigger before the DM is sent. Absent when the DM goes out immediately." }
35874
+ commentReplyDelaySeconds: { type: integer, description: "Seconds waited before the public reply is posted. Absent when it follows the DM immediately." }
35723
35875
  isActive: { type: boolean }
35724
35876
  stats:
35725
35877
  type: object
@@ -35760,6 +35912,13 @@ paths:
35760
35912
  account-wide automations, each with its own keyword set, and they all run
35761
35913
  independently. Per-post automations take priority on their post.
35762
35914
 
35915
+ Audience (`audience`, Instagram only): restrict the automation to followers or
35916
+ non-followers, and/or to accounts above a follower count. Instagram only reveals the
35917
+ follow relationship for people who have messaged the account, so `audience.whenUnknown`
35918
+ decides what happens for everyone else - including `verify`, which sends a one-tap
35919
+ confirmation DM (`followGate`) and then delivers the real DM automatically. People we
35920
+ already know follow you skip the tap entirely.
35921
+
35763
35922
  Links in the DM's buttons can be click-tracked (`linkTracking`, on by default) and
35764
35923
  clickers optionally tagged (`clickTag`) for segmentation. Stats returned include
35765
35924
  delivered, read, and link clicks.
@@ -35806,6 +35965,10 @@ paths:
35806
35965
  description: "Optional alternate public replies, rotated at random alongside commentReply (picked independently of the DM). Up to 5."
35807
35966
  linkTracking: { type: boolean, default: true, description: "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." }
35808
35967
  clickTag: { type: string, description: "Optional tag applied to a contact when they click a tracked link (requires linkTracking). Lets you segment clickers for broadcasts/sequences." }
35968
+ dmDelaySeconds: { type: integer, minimum: 0, maximum: 86400, description: "Seconds to wait after the trigger before sending the DM. Omit or send 0 to reply immediately (the default). Max 86400 (24h). The trigger is still matched and deduplicated the moment the comment arrives, so a delay only moves when the response is sent." }
35969
+ commentReplyDelaySeconds: { type: integer, minimum: 0, maximum: 86400, description: "Seconds to wait before posting the public comment reply. Omit or send 0 to post it right after the DM (the default). The reply never goes out before the DM, so a value below dmDelaySeconds is raised to it. Ignored when trigger=story_reply, which has no public reply." }
35970
+ audience: { $ref: '#/components/schemas/CommentAutomationAudience' }
35971
+ followGate: { $ref: '#/components/schemas/CommentAutomationFollowGate' }
35809
35972
  responses:
35810
35973
  '200':
35811
35974
  description: Automation created
@@ -35837,6 +36000,10 @@ paths:
35837
36000
  commentReplyVariations: { type: array, items: { type: string }, description: "Alternate public replies rotated at random with commentReply. Omitted when none." }
35838
36001
  linkTracking: { type: boolean }
35839
36002
  clickTag: { type: string }
36003
+ dmDelaySeconds: { type: integer, description: "Seconds waited after the trigger before the DM is sent. Absent when the DM goes out immediately." }
36004
+ commentReplyDelaySeconds: { type: integer, description: "Seconds waited before the public reply is posted. Absent when it follows the DM immediately." }
36005
+ audience: { $ref: '#/components/schemas/CommentAutomationAudience' }
36006
+ followGate: { $ref: '#/components/schemas/CommentAutomationFollowGate' }
35840
36007
  isActive: { type: boolean }
35841
36008
  stats: { type: object, properties: { totalTriggered: { type: integer }, totalSent: { type: integer }, totalFailed: { type: integer } } }
35842
36009
  createdAt: { type: string, format: date-time }
@@ -35889,6 +36056,10 @@ paths:
35889
36056
  commentReplyVariations: { type: array, items: { type: string }, description: "Alternate public replies rotated at random with commentReply. Omitted when none." }
35890
36057
  linkTracking: { type: boolean }
35891
36058
  clickTag: { type: string }
36059
+ dmDelaySeconds: { type: integer, description: "Seconds waited after the trigger before the DM is sent. Absent when the DM goes out immediately." }
36060
+ commentReplyDelaySeconds: { type: integer, description: "Seconds waited before the public reply is posted. Absent when it follows the DM immediately." }
36061
+ audience: { $ref: '#/components/schemas/CommentAutomationAudience' }
36062
+ followGate: { $ref: '#/components/schemas/CommentAutomationFollowGate' }
35892
36063
  isActive: { type: boolean }
35893
36064
  stats: { type: object, properties: { totalTriggered: { type: integer }, totalSent: { type: integer }, totalFailed: { type: integer } } }
35894
36065
  createdAt: { type: string, format: date-time }
@@ -35903,10 +36074,14 @@ paths:
35903
36074
  commenterId: { type: string }
35904
36075
  commenterName: { type: string }
35905
36076
  commentText: { type: string }
35906
- status: { type: string, enum: [sent, failed, skipped], description: DM outcome }
36077
+ status: { type: string, enum: [pending, sent, failed, skipped, gated], description: "DM outcome. 'pending' = the automation has a dmDelaySeconds and the response is queued but not sent yet. 'gated' = the follow-gate confirmation DM went out and we are waiting for the tap; it flips to 'sent' or 'skipped' when they tap." }
36078
+ audienceOutcome: { type: string, enum: [passed, blocked, gate_sent, gate_passed, gate_failed], description: "How the audience rule resolved. Absent on automations without one." }
36079
+ commenterIsFollower: { type: boolean, description: "Follow relationship at decision time. Absent when Instagram would not tell us (the commenter never messaged the account)." }
36080
+ commenterFollowerCount: { type: integer }
35907
36081
  error: { type: string, description: DM error message if status is failed }
35908
36082
  commentReplyStatus: { type: string, enum: [sent, failed, skipped], description: "Outcome of the optional public reply on the triggering comment. 'skipped' if no commentReply was configured or if the DM failed (the public reply is not attempted in that case)." }
35909
36083
  commentReplyError: { type: string, description: Public-reply error message if commentReplyStatus is failed }
36084
+ nextDueAt: { type: string, format: date-time, description: "When the next queued send fires. Present only while something is still pending." }
35910
36085
  createdAt: { type: string, format: date-time }
35911
36086
  '401': { $ref: '#/components/responses/Unauthorized' }
35912
36087
  '404': { $ref: '#/components/responses/NotFound' }
@@ -35954,6 +36129,10 @@ paths:
35954
36129
  description: "Alternate public replies for random rotation. Pass [] to clear."
35955
36130
  linkTracking: { type: boolean, description: "Wrap link buttons in a tracked redirect to count clicks. Pass false to send links untouched." }
35956
36131
  clickTag: { type: string, description: "Tag applied to a contact when they click a tracked link (requires linkTracking). Empty string clears it." }
36132
+ dmDelaySeconds: { type: integer, minimum: 0, maximum: 86400, description: "Seconds to wait after the trigger before sending the DM. Send 0 to clear the delay and reply immediately." }
36133
+ commentReplyDelaySeconds: { type: integer, minimum: 0, maximum: 86400, description: "Seconds to wait before posting the public comment reply. Send 0 to clear it. The reply never goes out before the DM." }
36134
+ audience: { $ref: '#/components/schemas/CommentAutomationAudience' }
36135
+ followGate: { $ref: '#/components/schemas/CommentAutomationFollowGate' }
35957
36136
  isActive: { type: boolean }
35958
36137
  responses:
35959
36138
  '200':
@@ -35981,6 +36160,8 @@ paths:
35981
36160
  commentReply: { type: string }
35982
36161
  dmMessageVariations: { type: array, items: { type: string }, description: "Alternate DM texts rotated at random with dmMessage. Omitted when none." }
35983
36162
  commentReplyVariations: { type: array, items: { type: string }, description: "Alternate public replies rotated at random with commentReply. Omitted when none." }
36163
+ audience: { $ref: '#/components/schemas/CommentAutomationAudience' }
36164
+ followGate: { $ref: '#/components/schemas/CommentAutomationFollowGate' }
35984
36165
  isActive: { type: boolean }
35985
36166
  updatedAt: { type: string, format: date-time }
35986
36167
  '401': { $ref: '#/components/responses/Unauthorized' }
@@ -36011,7 +36192,7 @@ paths:
36011
36192
  - bearerAuth: []
36012
36193
  parameters:
36013
36194
  - { name: automationId, in: path, required: true, schema: { type: string } }
36014
- - { name: status, in: query, schema: { type: string, enum: [sent, failed, skipped] }, description: Filter by result status }
36195
+ - { name: status, in: query, schema: { type: string, enum: [pending, sent, failed, skipped, gated] }, description: Filter by result status }
36015
36196
  - { name: limit, in: query, schema: { type: integer, default: 50, minimum: 1, maximum: 200 } }
36016
36197
  - { name: skip, in: query, schema: { type: integer, default: 0, minimum: 0 } }
36017
36198
  responses:
@@ -36033,10 +36214,14 @@ paths:
36033
36214
  commenterId: { type: string }
36034
36215
  commenterName: { type: string }
36035
36216
  commentText: { type: string }
36036
- status: { type: string, enum: [sent, failed, skipped], description: DM outcome }
36217
+ status: { type: string, enum: [pending, sent, failed, skipped, gated], description: "DM outcome. 'pending' = the automation has a dmDelaySeconds and the response is queued but not sent yet. 'gated' = the follow-gate confirmation DM went out and we are waiting for the tap; it flips to 'sent' or 'skipped' when they tap." }
36218
+ audienceOutcome: { type: string, enum: [passed, blocked, gate_sent, gate_passed, gate_failed], description: "How the audience rule resolved. Absent on automations without one." }
36219
+ commenterIsFollower: { type: boolean, description: "Follow relationship at decision time. Absent when Instagram would not tell us (the commenter never messaged the account)." }
36220
+ commenterFollowerCount: { type: integer }
36037
36221
  error: { type: string, description: DM error message if status is failed }
36038
36222
  commentReplyStatus: { type: string, enum: [sent, failed, skipped], description: "Outcome of the optional public reply on the triggering comment. 'skipped' if no commentReply was configured or if the DM failed (the public reply is not attempted in that case)." }
36039
36223
  commentReplyError: { type: string, description: Public-reply error message if commentReplyStatus is failed }
36224
+ nextDueAt: { type: string, format: date-time, description: "When the next queued send fires. Present only while something is still pending." }
36040
36225
  createdAt: { type: string, format: date-time }
36041
36226
  pagination:
36042
36227
  type: object
@@ -86,6 +86,20 @@ describe 'AccountsApi' do
86
86
  end
87
87
  end
88
88
 
89
+ # unit tests for get_instagram_follow_status
90
+ # Check whether an Instagram user follows the account
91
+ # 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.
92
+ # @param account_id Instagram account ID
93
+ # @param user_id Instagram-scoped user id (IGSID) from a webhook payload
94
+ # @param [Hash] opts the optional parameters
95
+ # @option opts [Boolean] :refresh Bypass the cache and re-query Meta
96
+ # @return [GetInstagramFollowStatus200Response]
97
+ describe 'get_instagram_follow_status test' do
98
+ it 'should work' do
99
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
100
+ end
101
+ end
102
+
89
103
  # unit tests for get_slack_settings
90
104
  # Get Slack account settings
91
105
  # Returns the connected Slack channel details and the default message identity (name and avatar shown as the author on every post, with Slack&#39;s APP badge). The identity applies to messages only; the app&#39;s own Slack profile is global and cannot be changed per workspace.
@@ -34,7 +34,7 @@ describe 'CommentAutomationsApi' do
34
34
 
35
35
  # unit tests for create_comment_automation
36
36
  # Create comment-to-DM automation
37
- # 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.
37
+ # 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.
38
38
  # @param create_comment_automation_request
39
39
  # @param [Hash] opts the optional parameters
40
40
  # @return [CreateCommentAutomation200Response]
@@ -0,0 +1,56 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Zernio::CommentAutomationAudience
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::CommentAutomationAudience do
21
+ #let(:instance) { Zernio::CommentAutomationAudience.new }
22
+
23
+ describe 'test an instance of CommentAutomationAudience' do
24
+ it 'should create an instance of CommentAutomationAudience' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::CommentAutomationAudience)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "follower_status"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["any", "follower", "non_follower"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.follower_status = value }.not_to raise_error
36
+ # end
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "min_follower_count"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "when_unknown"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
49
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["send", "skip", "verify"])
50
+ # validator.allowable_values.each do |value|
51
+ # expect { instance.when_unknown = value }.not_to raise_error
52
+ # end
53
+ end
54
+ end
55
+
56
+ end
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Zernio::CommentAutomationFollowGate
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::CommentAutomationFollowGate do
21
+ #let(:instance) { Zernio::CommentAutomationFollowGate.new }
22
+
23
+ describe 'test an instance of CommentAutomationFollowGate' do
24
+ it 'should create an instance of CommentAutomationFollowGate' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::CommentAutomationFollowGate)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "message"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "button_label"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "not_following_message"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ end
@@ -105,6 +105,12 @@ describe Zernio::ConversionEventUser do
105
105
  end
106
106
  end
107
107
 
108
+ describe 'test attribute "lead_id"' do
109
+ it 'should work' do
110
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
111
+ end
112
+ end
113
+
108
114
  describe 'test attribute "click_ids"' do
109
115
  it 'should work' do
110
116
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -131,6 +131,30 @@ describe Zernio::CreateCommentAutomation200ResponseAutomation do
131
131
  end
132
132
  end
133
133
 
134
+ describe 'test attribute "dm_delay_seconds"' do
135
+ it 'should work' do
136
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
137
+ end
138
+ end
139
+
140
+ describe 'test attribute "comment_reply_delay_seconds"' do
141
+ it 'should work' do
142
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
143
+ end
144
+ end
145
+
146
+ describe 'test attribute "audience"' do
147
+ it 'should work' do
148
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
149
+ end
150
+ end
151
+
152
+ describe 'test attribute "follow_gate"' do
153
+ it 'should work' do
154
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
155
+ end
156
+ end
157
+
134
158
  describe 'test attribute "is_active"' do
135
159
  it 'should work' do
136
160
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -143,4 +143,28 @@ describe Zernio::CreateCommentAutomationRequest do
143
143
  end
144
144
  end
145
145
 
146
+ describe 'test attribute "dm_delay_seconds"' do
147
+ it 'should work' do
148
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
149
+ end
150
+ end
151
+
152
+ describe 'test attribute "comment_reply_delay_seconds"' do
153
+ it 'should work' do
154
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
155
+ end
156
+ end
157
+
158
+ describe 'test attribute "audience"' do
159
+ it 'should work' do
160
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
161
+ end
162
+ end
163
+
164
+ describe 'test attribute "follow_gate"' do
165
+ it 'should work' do
166
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
167
+ end
168
+ end
169
+
146
170
  end
@@ -149,6 +149,30 @@ describe Zernio::GetCommentAutomation200ResponseAutomation do
149
149
  end
150
150
  end
151
151
 
152
+ describe 'test attribute "dm_delay_seconds"' do
153
+ it 'should work' do
154
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
155
+ end
156
+ end
157
+
158
+ describe 'test attribute "comment_reply_delay_seconds"' do
159
+ it 'should work' do
160
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
161
+ end
162
+ end
163
+
164
+ describe 'test attribute "audience"' do
165
+ it 'should work' do
166
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
167
+ end
168
+ end
169
+
170
+ describe 'test attribute "follow_gate"' do
171
+ it 'should work' do
172
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
173
+ end
174
+ end
175
+
152
176
  describe 'test attribute "is_active"' do
153
177
  it 'should work' do
154
178
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -60,13 +60,35 @@ describe Zernio::GetCommentAutomation200ResponseLogsInner do
60
60
  describe 'test attribute "status"' do
61
61
  it 'should work' do
62
62
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["sent", "failed", "skipped"])
63
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "sent", "failed", "skipped", "gated"])
64
64
  # validator.allowable_values.each do |value|
65
65
  # expect { instance.status = value }.not_to raise_error
66
66
  # end
67
67
  end
68
68
  end
69
69
 
70
+ describe 'test attribute "audience_outcome"' do
71
+ it 'should work' do
72
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
73
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["passed", "blocked", "gate_sent", "gate_passed", "gate_failed"])
74
+ # validator.allowable_values.each do |value|
75
+ # expect { instance.audience_outcome = value }.not_to raise_error
76
+ # end
77
+ end
78
+ end
79
+
80
+ describe 'test attribute "commenter_is_follower"' do
81
+ it 'should work' do
82
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
83
+ end
84
+ end
85
+
86
+ describe 'test attribute "commenter_follower_count"' do
87
+ it 'should work' do
88
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
89
+ end
90
+ end
91
+
70
92
  describe 'test attribute "error"' do
71
93
  it 'should work' do
72
94
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -89,6 +111,12 @@ describe Zernio::GetCommentAutomation200ResponseLogsInner do
89
111
  end
90
112
  end
91
113
 
114
+ describe 'test attribute "next_due_at"' do
115
+ it 'should work' do
116
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
117
+ end
118
+ end
119
+
92
120
  describe 'test attribute "created_at"' do
93
121
  it 'should work' do
94
122
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/