late-sdk 0.0.683 → 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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -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/ListCommentAutomationLogs200Response.md +3 -1
  13. data/docs/ListCommentAutomationLogs200ResponseMisses.md +22 -0
  14. data/docs/ListCommentAutomationLogs200ResponseMissesSamplesInner.md +24 -0
  15. data/docs/UpdateCommentAutomation200ResponseAutomation.md +4 -0
  16. data/docs/UpdateCommentAutomationRequest.md +4 -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 +15 -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/create_comment_automation200_response_automation.rb +19 -1
  24. data/lib/zernio-sdk/models/create_comment_automation_request.rb +22 -4
  25. data/lib/zernio-sdk/models/get_comment_automation200_response_automation.rb +19 -1
  26. data/lib/zernio-sdk/models/get_comment_automation200_response_logs_inner.rb +45 -4
  27. data/lib/zernio-sdk/models/get_instagram_follow_status200_response.rb +299 -0
  28. data/lib/zernio-sdk/models/list_comment_automation_logs200_response.rb +13 -4
  29. data/lib/zernio-sdk/models/list_comment_automation_logs200_response_misses.rb +171 -0
  30. data/lib/zernio-sdk/models/list_comment_automation_logs200_response_misses_samples_inner.rb +175 -0
  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 +19 -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 +6 -0
  37. data/openapi.yaml +181 -5
  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/create_comment_automation200_response_automation_spec.rb +12 -0
  43. data/spec/models/create_comment_automation_request_spec.rb +12 -0
  44. data/spec/models/get_comment_automation200_response_automation_spec.rb +12 -0
  45. data/spec/models/get_comment_automation200_response_logs_inner_spec.rb +23 -1
  46. data/spec/models/get_instagram_follow_status200_response_spec.rb +88 -0
  47. data/spec/models/list_comment_automation_logs200_response_misses_samples_inner_spec.rb +54 -0
  48. data/spec/models/list_comment_automation_logs200_response_misses_spec.rb +48 -0
  49. data/spec/models/list_comment_automation_logs200_response_spec.rb +6 -0
  50. data/spec/models/update_comment_automation200_response_automation_spec.rb +12 -0
  51. data/spec/models/update_comment_automation_request_spec.rb +12 -0
  52. data/spec/models/webhook_payload_comment_comment_author_instagram_profile_spec.rb +54 -0
  53. data/spec/models/webhook_payload_comment_comment_author_spec.rb +6 -0
  54. data/zernio-sdk-0.0.685.gem +0 -0
  55. metadata +26 -2
  56. data/zernio-sdk-0.0.683.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
@@ -15031,6 +15093,80 @@ paths:
15031
15093
  recommendations: []
15032
15094
  '401': { $ref: '#/components/responses/Unauthorized' }
15033
15095
  '404': { $ref: '#/components/responses/NotFound' }
15096
+ /v1/accounts/{accountId}/follow-status/{userId}:
15097
+ get:
15098
+ operationId: getInstagramFollowStatus
15099
+ tags: [Accounts]
15100
+ x-platforms: ["instagram"]
15101
+ summary: Check whether an Instagram user follows the account
15102
+ description: |
15103
+ Resolves the follow relationship between an Instagram user and the connected
15104
+ account, plus their public profile counters.
15105
+
15106
+ `userId` is the Instagram-scoped id (IGSID) Meta gives you on a webhook:
15107
+ `sender.id` on `message.received`, `comment.author.id` on `comment.received`.
15108
+
15109
+ **Meta only answers for people who have MESSAGED the account.** Commenting grants
15110
+ no consent, so a commenter who has never DMed you is unresolvable - that is a
15111
+ platform rule, not a limitation of this endpoint. When it cannot be resolved the
15112
+ response is still `200` with `isFollower: null` and an `unavailableReason`, because
15113
+ "unknown" is a normal state to branch on:
15114
+
15115
+ * `consent_required` - the user has never messaged this account.
15116
+ * `dm_access_disabled` - the account owner turned off Instagram Direct API access.
15117
+ * `not_messageable` - the id is not a messaging-scoped id.
15118
+ * `error` - a transient Graph API failure.
15119
+
15120
+ To gate a comment automation on this, use the automation's `audience` rules instead
15121
+ of calling this per comment - they run the same lookup only on comments that
15122
+ actually match a keyword, and can ask the commenter to confirm with one tap.
15123
+
15124
+ Answers are cached briefly per (account, user). Pass `refresh=true` right after
15125
+ asking someone to follow, so a follow from a moment ago is visible.
15126
+ security:
15127
+ - bearerAuth: []
15128
+ parameters:
15129
+ - { name: accountId, in: path, required: true, schema: { type: string }, description: Instagram account ID }
15130
+ - { name: userId, in: path, required: true, schema: { type: string }, description: 'Instagram-scoped user id (IGSID) from a webhook payload' }
15131
+ - { name: refresh, in: query, required: false, schema: { type: boolean }, description: Bypass the cache and re-query Meta }
15132
+ responses:
15133
+ '200':
15134
+ description: Follow status (fields are null when Meta would not resolve it)
15135
+ content:
15136
+ application/json:
15137
+ schema:
15138
+ type: object
15139
+ required: [userId, accountId, isFollower]
15140
+ properties:
15141
+ userId: { type: string }
15142
+ accountId: { type: string }
15143
+ isFollower:
15144
+ type: [boolean, "null"]
15145
+ description: 'The user follows this account. Null = unknown, never "no".'
15146
+ isFollowedByAccount:
15147
+ type: [boolean, "null"]
15148
+ description: This account follows the user.
15149
+ followerCount: { type: [integer, "null"] }
15150
+ isVerified: { type: [boolean, "null"] }
15151
+ username: { type: [string, "null"] }
15152
+ name: { type: [string, "null"] }
15153
+ unavailableReason:
15154
+ type: [string, "null"]
15155
+ enum: [consent_required, dm_access_disabled, not_messageable, error, null]
15156
+ description: 'Why the follow relationship could not be resolved. Null when it was.'
15157
+ example:
15158
+ userId: "1312733120229708"
15159
+ accountId: "6977a34e77637c5c857c816c"
15160
+ isFollower: true
15161
+ isFollowedByAccount: false
15162
+ followerCount: 25
15163
+ isVerified: false
15164
+ username: "to.bias8262"
15165
+ name: "Tobi Ma"
15166
+ unavailableReason: null
15167
+ '400': { $ref: '#/components/responses/BadRequest' }
15168
+ '401': { $ref: '#/components/responses/Unauthorized' }
15169
+ '404': { $ref: '#/components/responses/NotFound' }
15034
15170
  /v1/accounts/{accountId}/tiktok/creator-info:
15035
15171
  get:
15036
15172
  x-resource-group: "accounts"
@@ -35760,6 +35896,13 @@ paths:
35760
35896
  account-wide automations, each with its own keyword set, and they all run
35761
35897
  independently. Per-post automations take priority on their post.
35762
35898
 
35899
+ Audience (`audience`, Instagram only): restrict the automation to followers or
35900
+ non-followers, and/or to accounts above a follower count. Instagram only reveals the
35901
+ follow relationship for people who have messaged the account, so `audience.whenUnknown`
35902
+ decides what happens for everyone else - including `verify`, which sends a one-tap
35903
+ confirmation DM (`followGate`) and then delivers the real DM automatically. People we
35904
+ already know follow you skip the tap entirely.
35905
+
35763
35906
  Links in the DM's buttons can be click-tracked (`linkTracking`, on by default) and
35764
35907
  clickers optionally tagged (`clickTag`) for segmentation. Stats returned include
35765
35908
  delivered, read, and link clicks.
@@ -35806,6 +35949,8 @@ paths:
35806
35949
  description: "Optional alternate public replies, rotated at random alongside commentReply (picked independently of the DM). Up to 5."
35807
35950
  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
35951
  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." }
35952
+ audience: { $ref: '#/components/schemas/CommentAutomationAudience' }
35953
+ followGate: { $ref: '#/components/schemas/CommentAutomationFollowGate' }
35809
35954
  responses:
35810
35955
  '200':
35811
35956
  description: Automation created
@@ -35837,6 +35982,8 @@ paths:
35837
35982
  commentReplyVariations: { type: array, items: { type: string }, description: "Alternate public replies rotated at random with commentReply. Omitted when none." }
35838
35983
  linkTracking: { type: boolean }
35839
35984
  clickTag: { type: string }
35985
+ audience: { $ref: '#/components/schemas/CommentAutomationAudience' }
35986
+ followGate: { $ref: '#/components/schemas/CommentAutomationFollowGate' }
35840
35987
  isActive: { type: boolean }
35841
35988
  stats: { type: object, properties: { totalTriggered: { type: integer }, totalSent: { type: integer }, totalFailed: { type: integer } } }
35842
35989
  createdAt: { type: string, format: date-time }
@@ -35889,6 +36036,8 @@ paths:
35889
36036
  commentReplyVariations: { type: array, items: { type: string }, description: "Alternate public replies rotated at random with commentReply. Omitted when none." }
35890
36037
  linkTracking: { type: boolean }
35891
36038
  clickTag: { type: string }
36039
+ audience: { $ref: '#/components/schemas/CommentAutomationAudience' }
36040
+ followGate: { $ref: '#/components/schemas/CommentAutomationFollowGate' }
35892
36041
  isActive: { type: boolean }
35893
36042
  stats: { type: object, properties: { totalTriggered: { type: integer }, totalSent: { type: integer }, totalFailed: { type: integer } } }
35894
36043
  createdAt: { type: string, format: date-time }
@@ -35903,7 +36052,10 @@ paths:
35903
36052
  commenterId: { type: string }
35904
36053
  commenterName: { type: string }
35905
36054
  commentText: { type: string }
35906
- status: { type: string, enum: [sent, failed, skipped], description: DM outcome }
36055
+ status: { type: string, enum: [sent, failed, skipped, gated], description: "DM outcome. 'gated' = the follow-gate confirmation DM went out and we are waiting for the tap; it flips to 'sent' or 'skipped' when they tap." }
36056
+ audienceOutcome: { type: string, enum: [passed, blocked, gate_sent, gate_passed, gate_failed], description: "How the audience rule resolved. Absent on automations without one." }
36057
+ commenterIsFollower: { type: boolean, description: "Follow relationship at decision time. Absent when Instagram would not tell us (the commenter never messaged the account)." }
36058
+ commenterFollowerCount: { type: integer }
35907
36059
  error: { type: string, description: DM error message if status is failed }
35908
36060
  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
36061
  commentReplyError: { type: string, description: Public-reply error message if commentReplyStatus is failed }
@@ -35954,6 +36106,8 @@ paths:
35954
36106
  description: "Alternate public replies for random rotation. Pass [] to clear."
35955
36107
  linkTracking: { type: boolean, description: "Wrap link buttons in a tracked redirect to count clicks. Pass false to send links untouched." }
35956
36108
  clickTag: { type: string, description: "Tag applied to a contact when they click a tracked link (requires linkTracking). Empty string clears it." }
36109
+ audience: { $ref: '#/components/schemas/CommentAutomationAudience' }
36110
+ followGate: { $ref: '#/components/schemas/CommentAutomationFollowGate' }
35957
36111
  isActive: { type: boolean }
35958
36112
  responses:
35959
36113
  '200':
@@ -35981,6 +36135,8 @@ paths:
35981
36135
  commentReply: { type: string }
35982
36136
  dmMessageVariations: { type: array, items: { type: string }, description: "Alternate DM texts rotated at random with dmMessage. Omitted when none." }
35983
36137
  commentReplyVariations: { type: array, items: { type: string }, description: "Alternate public replies rotated at random with commentReply. Omitted when none." }
36138
+ audience: { $ref: '#/components/schemas/CommentAutomationAudience' }
36139
+ followGate: { $ref: '#/components/schemas/CommentAutomationFollowGate' }
35984
36140
  isActive: { type: boolean }
35985
36141
  updatedAt: { type: string, format: date-time }
35986
36142
  '401': { $ref: '#/components/responses/Unauthorized' }
@@ -36011,9 +36167,9 @@ paths:
36011
36167
  - bearerAuth: []
36012
36168
  parameters:
36013
36169
  - { 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 }
36015
- - { name: limit, in: query, schema: { type: integer, default: 50 } }
36016
- - { name: skip, in: query, schema: { type: integer, default: 0 } }
36170
+ - { name: status, in: query, schema: { type: string, enum: [sent, failed, skipped, gated] }, description: Filter by result status }
36171
+ - { name: limit, in: query, schema: { type: integer, default: 50, minimum: 1, maximum: 200 } }
36172
+ - { name: skip, in: query, schema: { type: integer, default: 0, minimum: 0 } }
36017
36173
  responses:
36018
36174
  '200':
36019
36175
  description: Trigger logs with pagination
@@ -36033,7 +36189,10 @@ paths:
36033
36189
  commenterId: { type: string }
36034
36190
  commenterName: { type: string }
36035
36191
  commentText: { type: string }
36036
- status: { type: string, enum: [sent, failed, skipped], description: DM outcome }
36192
+ status: { type: string, enum: [sent, failed, skipped, gated], description: "DM outcome. 'gated' = the follow-gate confirmation DM went out and we are waiting for the tap; it flips to 'sent' or 'skipped' when they tap." }
36193
+ audienceOutcome: { type: string, enum: [passed, blocked, gate_sent, gate_passed, gate_failed], description: "How the audience rule resolved. Absent on automations without one." }
36194
+ commenterIsFollower: { type: boolean, description: "Follow relationship at decision time. Absent when Instagram would not tell us (the commenter never messaged the account)." }
36195
+ commenterFollowerCount: { type: integer }
36037
36196
  error: { type: string, description: DM error message if status is failed }
36038
36197
  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
36198
  commentReplyError: { type: string, description: Public-reply error message if commentReplyStatus is failed }
@@ -36045,6 +36204,23 @@ paths:
36045
36204
  limit: { type: integer }
36046
36205
  skip: { type: integer }
36047
36206
  hasMore: { type: boolean }
36207
+ misses:
36208
+ type: object
36209
+ description: "Comments that reached this automation but matched none of its keywords. These produce no log entry, so this is the only signal that a keyword is catching nothing. Retained for a short window, then dropped."
36210
+ properties:
36211
+ total: { type: integer, description: Number of non-matching comments in the retention window }
36212
+ retentionDays: { type: integer, description: How many days of non-matching comments the total covers }
36213
+ samples:
36214
+ type: array
36215
+ description: A few of the most recent non-matching comments, for diagnosing a keyword setup.
36216
+ items:
36217
+ type: object
36218
+ properties:
36219
+ commentText: { type: string }
36220
+ commenterName: { type: string }
36221
+ excludedBy: { type: string, description: Set when an exclusion keyword vetoed an otherwise matching comment }
36222
+ at: { type: string, format: date-time }
36223
+ '400': { $ref: '#/components/responses/BadRequest' }
36048
36224
  '401': { $ref: '#/components/responses/Unauthorized' }
36049
36225
  '404': { $ref: '#/components/responses/NotFound' }
36050
36226
 
@@ -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. `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.
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's APP badge). The identity applies to messages only; the app'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 `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.
37
+ # 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.
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
@@ -131,6 +131,18 @@ describe Zernio::CreateCommentAutomation200ResponseAutomation do
131
131
  end
132
132
  end
133
133
 
134
+ describe 'test attribute "audience"' 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 "follow_gate"' 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
+
134
146
  describe 'test attribute "is_active"' do
135
147
  it 'should work' do
136
148
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -143,4 +143,16 @@ describe Zernio::CreateCommentAutomationRequest do
143
143
  end
144
144
  end
145
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
+
146
158
  end
@@ -149,6 +149,18 @@ describe Zernio::GetCommentAutomation200ResponseAutomation do
149
149
  end
150
150
  end
151
151
 
152
+ describe 'test attribute "audience"' 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 "follow_gate"' 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
+
152
164
  describe 'test attribute "is_active"' do
153
165
  it 'should work' do
154
166
  # 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', ["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/
@@ -0,0 +1,88 @@
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::GetInstagramFollowStatus200Response
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::GetInstagramFollowStatus200Response do
21
+ #let(:instance) { Zernio::GetInstagramFollowStatus200Response.new }
22
+
23
+ describe 'test an instance of GetInstagramFollowStatus200Response' do
24
+ it 'should create an instance of GetInstagramFollowStatus200Response' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::GetInstagramFollowStatus200Response)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "user_id"' 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 "account_id"' 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 "is_follower"' 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
+ describe 'test attribute "is_followed_by_account"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
+ end
52
+ end
53
+
54
+ describe 'test attribute "follower_count"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
60
+ describe 'test attribute "is_verified"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
+ end
64
+ end
65
+
66
+ describe 'test attribute "username"' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
69
+ end
70
+ end
71
+
72
+ describe 'test attribute "name"' do
73
+ it 'should work' do
74
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
75
+ end
76
+ end
77
+
78
+ describe 'test attribute "unavailable_reason"' do
79
+ it 'should work' do
80
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
81
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["consent_required", "dm_access_disabled", "not_messageable", "error"])
82
+ # validator.allowable_values.each do |value|
83
+ # expect { instance.unavailable_reason = value }.not_to raise_error
84
+ # end
85
+ end
86
+ end
87
+
88
+ end
@@ -0,0 +1,54 @@
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::ListCommentAutomationLogs200ResponseMissesSamplesInner
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::ListCommentAutomationLogs200ResponseMissesSamplesInner do
21
+ #let(:instance) { Zernio::ListCommentAutomationLogs200ResponseMissesSamplesInner.new }
22
+
23
+ describe 'test an instance of ListCommentAutomationLogs200ResponseMissesSamplesInner' do
24
+ it 'should create an instance of ListCommentAutomationLogs200ResponseMissesSamplesInner' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::ListCommentAutomationLogs200ResponseMissesSamplesInner)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "comment_text"' 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 "commenter_name"' 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 "excluded_by"' 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
+ describe 'test attribute "at"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
+ end
52
+ end
53
+
54
+ end