late-sdk 0.0.664 → 0.0.665
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/docs/CreateInboxConversationRequest.md +1 -1
- data/docs/ListSlackMembers200Response.md +18 -0
- data/docs/ListSlackMembers200ResponseMembersInner.md +24 -0
- data/docs/MessagesApi.md +1 -1
- data/docs/SlackApi.md +83 -0
- data/lib/zernio-sdk/api/messages_api.rb +2 -2
- data/lib/zernio-sdk/api/slack_api.rb +103 -0
- data/lib/zernio-sdk/models/create_inbox_conversation_request.rb +1 -1
- data/lib/zernio-sdk/models/list_slack_members200_response.rb +149 -0
- data/lib/zernio-sdk/models/list_slack_members200_response_members_inner.rb +180 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +52 -2
- data/spec/api/messages_api_spec.rb +1 -1
- data/spec/api/slack_api_spec.rb +49 -0
- data/spec/models/list_slack_members200_response_members_inner_spec.rb +54 -0
- data/spec/models/list_slack_members200_response_spec.rb +36 -0
- data/zernio-sdk-0.0.665.gem +0 -0
- metadata +14 -2
- data/zernio-sdk-0.0.664.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b0cc330c893727d678434989de1bb9061a62d7393fb95962b7420b9df4147ea0
|
|
4
|
+
data.tar.gz: aeda8af28875160bd38d553d255982dafc26a73b5ac13f21c9f84562c9fc1755
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3d76846f709cba19df098f13fd5938afa5c9bfdc97734ea9c208b362925879085c055b324ec37bd3baa76062f3f1e16368cc75ebb9e118d3af7ac952d49e0f5d
|
|
7
|
+
data.tar.gz: 87ce582abe3122e309ccab15e889c7ebaf183f280eb2edf1d3da422026a6043549d37466cc5ea6ae61fbb2afe46c1b7701ce0281bc7e2645a6440a2817c0808e
|
data/README.md
CHANGED
|
@@ -459,6 +459,7 @@ Class | Method | HTTP request | Description
|
|
|
459
459
|
*Zernio::SequencesApi* | [**pause_sequence**](docs/SequencesApi.md#pause_sequence) | **POST** /v1/sequences/{sequenceId}/pause | Pause sequence
|
|
460
460
|
*Zernio::SequencesApi* | [**unenroll_contact**](docs/SequencesApi.md#unenroll_contact) | **DELETE** /v1/sequences/{sequenceId}/enroll/{contactId} | Unenroll contact
|
|
461
461
|
*Zernio::SequencesApi* | [**update_sequence**](docs/SequencesApi.md#update_sequence) | **PATCH** /v1/sequences/{sequenceId} | Update sequence
|
|
462
|
+
*Zernio::SlackApi* | [**list_slack_members**](docs/SlackApi.md#list_slack_members) | **GET** /v1/accounts/{accountId}/slack-members | List Slack workspace members
|
|
462
463
|
*Zernio::TrackingTagsApi* | [**add_tracking_tag_shared_account**](docs/TrackingTagsApi.md#add_tracking_tag_shared_account) | **POST** /v1/accounts/{accountId}/tracking-tags/{tagId}/shared-accounts | Share with an ad account
|
|
463
464
|
*Zernio::TrackingTagsApi* | [**create_tracking_tag**](docs/TrackingTagsApi.md#create_tracking_tag) | **POST** /v1/accounts/{accountId}/tracking-tags | Create a tracking tag
|
|
464
465
|
*Zernio::TrackingTagsApi* | [**get_ad_tracking_tags**](docs/TrackingTagsApi.md#get_ad_tracking_tags) | **GET** /v1/ads/{adId}/tracking-tags | Get ad tracking tags
|
|
@@ -1513,6 +1514,8 @@ Class | Method | HTTP request | Description
|
|
|
1513
1514
|
- [Zernio::ListSequenceEnrollments200ResponseEnrollmentsInner](docs/ListSequenceEnrollments200ResponseEnrollmentsInner.md)
|
|
1514
1515
|
- [Zernio::ListSequences200Response](docs/ListSequences200Response.md)
|
|
1515
1516
|
- [Zernio::ListSequences200ResponseSequencesInner](docs/ListSequences200ResponseSequencesInner.md)
|
|
1517
|
+
- [Zernio::ListSlackMembers200Response](docs/ListSlackMembers200Response.md)
|
|
1518
|
+
- [Zernio::ListSlackMembers200ResponseMembersInner](docs/ListSlackMembers200ResponseMembersInner.md)
|
|
1516
1519
|
- [Zernio::ListSmsOptOuts200Response](docs/ListSmsOptOuts200Response.md)
|
|
1517
1520
|
- [Zernio::ListSmsOptOuts200ResponseOptOutsInner](docs/ListSmsOptOuts200ResponseOptOutsInner.md)
|
|
1518
1521
|
- [Zernio::ListSmsRegistrations200Response](docs/ListSmsRegistrations200Response.md)
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **account_id** | **String** | The social account ID to send from | |
|
|
8
|
-
| **participant_id** | **String** | Recipient identifier. For X this is the numeric user ID; for WhatsApp, the recipient phone number in international format (digits, country code included). Provide either this or participantUsername. | [optional] |
|
|
8
|
+
| **participant_id** | **String** | Recipient identifier. For X this is the numeric user ID; for WhatsApp and SMS, the recipient phone number in international format (digits, country code included); for Slack, the workspace member id (e.g. U01ABCDEF). Provide either this or participantUsername. | [optional] |
|
|
9
9
|
| **participant_username** | **String** | Recipient handle/username — an X or Bluesky handle (with or without @) or a Reddit username (with or without u/). Resolved via lookup. Provide either this or participantId. | [optional] |
|
|
10
10
|
| **message** | **String** | Text content of the message. At least one of message, attachment, or (for WhatsApp) templateName is required. Required when category is set (a Direct Send utility message is a text message). | [optional] |
|
|
11
11
|
| **skip_dm_check** | **Boolean** | X/Twitter only. Skip the receives_your_dm eligibility check before sending. Use if you have already verified the recipient accepts DMs. | [optional][default to false] |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::ListSlackMembers200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **members** | [**Array<ListSlackMembers200ResponseMembersInner>**](ListSlackMembers200ResponseMembersInner.md) | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::ListSlackMembers200Response.new(
|
|
15
|
+
members: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::ListSlackMembers200ResponseMembersInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | Slack member id (pass as participantId to start a DM). | [optional] |
|
|
8
|
+
| **name** | **String** | Display name | [optional] |
|
|
9
|
+
| **username** | **String** | Slack handle | [optional] |
|
|
10
|
+
| **picture** | **String** | Avatar URL | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::ListSlackMembers200ResponseMembersInner.new(
|
|
18
|
+
id: null,
|
|
19
|
+
name: null,
|
|
20
|
+
username: null,
|
|
21
|
+
picture: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
data/docs/MessagesApi.md
CHANGED
|
@@ -99,7 +99,7 @@ end
|
|
|
99
99
|
|
|
100
100
|
Create conversation
|
|
101
101
|
|
|
102
|
-
Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, and
|
|
102
|
+
Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
103
103
|
|
|
104
104
|
### Examples
|
|
105
105
|
|
data/docs/SlackApi.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Zernio::SlackApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://zernio.com/api*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**list_slack_members**](SlackApi.md#list_slack_members) | **GET** /v1/accounts/{accountId}/slack-members | List Slack workspace members |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## list_slack_members
|
|
11
|
+
|
|
12
|
+
> <ListSlackMembers200Response> list_slack_members(account_id, opts)
|
|
13
|
+
|
|
14
|
+
List Slack workspace members
|
|
15
|
+
|
|
16
|
+
Members of the connected Slack workspace that can receive a direct message, for populating a recipient picker. Bots, deactivated members and Slackbot are excluded. Start a DM by passing a member id as `participantId` to POST /v1/inbox/conversations.
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'time'
|
|
22
|
+
require 'zernio-sdk'
|
|
23
|
+
# setup authorization
|
|
24
|
+
Zernio.configure do |config|
|
|
25
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
26
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
api_instance = Zernio::SlackApi.new
|
|
30
|
+
account_id = 'account_id_example' # String |
|
|
31
|
+
opts = {
|
|
32
|
+
query: 'query_example', # String | Case-insensitive filter over display name and handle.
|
|
33
|
+
limit: 56 # Integer |
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
begin
|
|
37
|
+
# List Slack workspace members
|
|
38
|
+
result = api_instance.list_slack_members(account_id, opts)
|
|
39
|
+
p result
|
|
40
|
+
rescue Zernio::ApiError => e
|
|
41
|
+
puts "Error when calling SlackApi->list_slack_members: #{e}"
|
|
42
|
+
end
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Using the list_slack_members_with_http_info variant
|
|
46
|
+
|
|
47
|
+
This returns an Array which contains the response data, status code and headers.
|
|
48
|
+
|
|
49
|
+
> <Array(<ListSlackMembers200Response>, Integer, Hash)> list_slack_members_with_http_info(account_id, opts)
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
begin
|
|
53
|
+
# List Slack workspace members
|
|
54
|
+
data, status_code, headers = api_instance.list_slack_members_with_http_info(account_id, opts)
|
|
55
|
+
p status_code # => 2xx
|
|
56
|
+
p headers # => { ... }
|
|
57
|
+
p data # => <ListSlackMembers200Response>
|
|
58
|
+
rescue Zernio::ApiError => e
|
|
59
|
+
puts "Error when calling SlackApi->list_slack_members_with_http_info: #{e}"
|
|
60
|
+
end
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Parameters
|
|
64
|
+
|
|
65
|
+
| Name | Type | Description | Notes |
|
|
66
|
+
| ---- | ---- | ----------- | ----- |
|
|
67
|
+
| **account_id** | **String** | | |
|
|
68
|
+
| **query** | **String** | Case-insensitive filter over display name and handle. | [optional] |
|
|
69
|
+
| **limit** | **Integer** | | [optional][default to 50] |
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
[**ListSlackMembers200Response**](ListSlackMembers200Response.md)
|
|
74
|
+
|
|
75
|
+
### Authorization
|
|
76
|
+
|
|
77
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
78
|
+
|
|
79
|
+
### HTTP request headers
|
|
80
|
+
|
|
81
|
+
- **Content-Type**: Not defined
|
|
82
|
+
- **Accept**: application/json
|
|
83
|
+
|
|
@@ -100,7 +100,7 @@ module Zernio
|
|
|
100
100
|
end
|
|
101
101
|
|
|
102
102
|
# Create conversation
|
|
103
|
-
# Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, and
|
|
103
|
+
# Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
104
104
|
# @param create_inbox_conversation_request [CreateInboxConversationRequest]
|
|
105
105
|
# @param [Hash] opts the optional parameters
|
|
106
106
|
# @return [CreateInboxConversation201Response]
|
|
@@ -110,7 +110,7 @@ module Zernio
|
|
|
110
110
|
end
|
|
111
111
|
|
|
112
112
|
# Create conversation
|
|
113
|
-
# Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, and
|
|
113
|
+
# Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
114
114
|
# @param create_inbox_conversation_request [CreateInboxConversationRequest]
|
|
115
115
|
# @param [Hash] opts the optional parameters
|
|
116
116
|
# @return [Array<(CreateInboxConversation201Response, Integer, Hash)>] CreateInboxConversation201Response data, response status code and response headers
|
|
@@ -0,0 +1,103 @@
|
|
|
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 'cgi'
|
|
14
|
+
|
|
15
|
+
module Zernio
|
|
16
|
+
class SlackApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List Slack workspace members
|
|
23
|
+
# Members of the connected Slack workspace that can receive a direct message, for populating a recipient picker. Bots, deactivated members and Slackbot are excluded. Start a DM by passing a member id as `participantId` to POST /v1/inbox/conversations.
|
|
24
|
+
# @param account_id [String]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :query Case-insensitive filter over display name and handle.
|
|
27
|
+
# @option opts [Integer] :limit (default to 50)
|
|
28
|
+
# @return [ListSlackMembers200Response]
|
|
29
|
+
def list_slack_members(account_id, opts = {})
|
|
30
|
+
data, _status_code, _headers = list_slack_members_with_http_info(account_id, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# List Slack workspace members
|
|
35
|
+
# Members of the connected Slack workspace that can receive a direct message, for populating a recipient picker. Bots, deactivated members and Slackbot are excluded. Start a DM by passing a member id as `participantId` to POST /v1/inbox/conversations.
|
|
36
|
+
# @param account_id [String]
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @option opts [String] :query Case-insensitive filter over display name and handle.
|
|
39
|
+
# @option opts [Integer] :limit (default to 50)
|
|
40
|
+
# @return [Array<(ListSlackMembers200Response, Integer, Hash)>] ListSlackMembers200Response data, response status code and response headers
|
|
41
|
+
def list_slack_members_with_http_info(account_id, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: SlackApi.list_slack_members ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'account_id' is set
|
|
46
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling SlackApi.list_slack_members"
|
|
48
|
+
end
|
|
49
|
+
if @api_client.config.client_side_validation && !opts[:'query'].nil? && opts[:'query'].to_s.length > 100
|
|
50
|
+
fail ArgumentError, 'invalid value for "opts[:"query"]" when calling SlackApi.list_slack_members, the character length must be smaller than or equal to 100.'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 2000
|
|
54
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SlackApi.list_slack_members, must be smaller than or equal to 2000.'
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
58
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SlackApi.list_slack_members, must be greater than or equal to 1.'
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# resource path
|
|
62
|
+
local_var_path = '/v1/accounts/{accountId}/slack-members'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
63
|
+
|
|
64
|
+
# query parameters
|
|
65
|
+
query_params = opts[:query_params] || {}
|
|
66
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
|
67
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
68
|
+
|
|
69
|
+
# header parameters
|
|
70
|
+
header_params = opts[:header_params] || {}
|
|
71
|
+
# HTTP header 'Accept' (if needed)
|
|
72
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
73
|
+
|
|
74
|
+
# form parameters
|
|
75
|
+
form_params = opts[:form_params] || {}
|
|
76
|
+
|
|
77
|
+
# http body (model)
|
|
78
|
+
post_body = opts[:debug_body]
|
|
79
|
+
|
|
80
|
+
# return_type
|
|
81
|
+
return_type = opts[:debug_return_type] || 'ListSlackMembers200Response'
|
|
82
|
+
|
|
83
|
+
# auth_names
|
|
84
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
85
|
+
|
|
86
|
+
new_options = opts.merge(
|
|
87
|
+
:operation => :"SlackApi.list_slack_members",
|
|
88
|
+
:header_params => header_params,
|
|
89
|
+
:query_params => query_params,
|
|
90
|
+
:form_params => form_params,
|
|
91
|
+
:body => post_body,
|
|
92
|
+
:auth_names => auth_names,
|
|
93
|
+
:return_type => return_type
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
97
|
+
if @api_client.config.debugging
|
|
98
|
+
@api_client.config.logger.debug "API called: SlackApi#list_slack_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
99
|
+
end
|
|
100
|
+
return data, status_code, headers
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
@@ -18,7 +18,7 @@ module Zernio
|
|
|
18
18
|
# The social account ID to send from
|
|
19
19
|
attr_accessor :account_id
|
|
20
20
|
|
|
21
|
-
# Recipient identifier. For X this is the numeric user ID; for WhatsApp, the recipient phone number in international format (digits, country code included). Provide either this or participantUsername.
|
|
21
|
+
# Recipient identifier. For X this is the numeric user ID; for WhatsApp and SMS, the recipient phone number in international format (digits, country code included); for Slack, the workspace member id (e.g. U01ABCDEF). Provide either this or participantUsername.
|
|
22
22
|
attr_accessor :participant_id
|
|
23
23
|
|
|
24
24
|
# Recipient handle/username — an X or Bluesky handle (with or without @) or a Reddit username (with or without u/). Resolved via lookup. Provide either this or participantId.
|
|
@@ -0,0 +1,149 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class ListSlackMembers200Response < ApiModelBase
|
|
18
|
+
attr_accessor :members
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'members' => :'members'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'members' => :'Array<ListSlackMembers200ResponseMembersInner>'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListSlackMembers200Response` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListSlackMembers200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'members')
|
|
67
|
+
if (value = attributes[:'members']).is_a?(Array)
|
|
68
|
+
self.members = value
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
invalid_properties
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Check to see if the all the properties in the model are valid
|
|
82
|
+
# @return true if the model is valid
|
|
83
|
+
def valid?
|
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
members == o.members
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# @see the `==` method
|
|
97
|
+
# @param [Object] Object to be compared
|
|
98
|
+
def eql?(o)
|
|
99
|
+
self == o
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Calculates hash code according to all attributes.
|
|
103
|
+
# @return [Integer] Hash code
|
|
104
|
+
def hash
|
|
105
|
+
[members].hash
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Builds the object from hash
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
# @return [Object] Returns the model itself
|
|
111
|
+
def self.build_from_hash(attributes)
|
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
|
113
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
114
|
+
transformed_hash = {}
|
|
115
|
+
openapi_types.each_pair do |key, type|
|
|
116
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
117
|
+
transformed_hash["#{key}"] = nil
|
|
118
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
119
|
+
# check to ensure the input is an array given that the attribute
|
|
120
|
+
# is documented as an array but the input is not
|
|
121
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
122
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
123
|
+
end
|
|
124
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
125
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
new(transformed_hash)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Returns the object in the form of hash
|
|
132
|
+
# @return [Hash] Returns the object in the form of hash
|
|
133
|
+
def to_hash
|
|
134
|
+
hash = {}
|
|
135
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
136
|
+
value = self.send(attr)
|
|
137
|
+
if value.nil?
|
|
138
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
139
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
hash[param] = _to_hash(value)
|
|
143
|
+
end
|
|
144
|
+
hash
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
end
|
|
@@ -0,0 +1,180 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class ListSlackMembers200ResponseMembersInner < ApiModelBase
|
|
18
|
+
# Slack member id (pass as participantId to start a DM).
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Display name
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# Slack handle
|
|
25
|
+
attr_accessor :username
|
|
26
|
+
|
|
27
|
+
# Avatar URL
|
|
28
|
+
attr_accessor :picture
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'id' => :'id',
|
|
34
|
+
:'name' => :'name',
|
|
35
|
+
:'username' => :'username',
|
|
36
|
+
:'picture' => :'picture'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns attribute mapping this model knows about
|
|
41
|
+
def self.acceptable_attribute_map
|
|
42
|
+
attribute_map
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
acceptable_attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'id' => :'String',
|
|
54
|
+
:'name' => :'String',
|
|
55
|
+
:'username' => :'String',
|
|
56
|
+
:'picture' => :'String'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
:'username',
|
|
64
|
+
:'picture'
|
|
65
|
+
])
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Initializes the object
|
|
69
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
70
|
+
def initialize(attributes = {})
|
|
71
|
+
if (!attributes.is_a?(Hash))
|
|
72
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListSlackMembers200ResponseMembersInner` initialize method"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
76
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
77
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
78
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListSlackMembers200ResponseMembersInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
80
|
+
end
|
|
81
|
+
h[k.to_sym] = v
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'id')
|
|
85
|
+
self.id = attributes[:'id']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'name')
|
|
89
|
+
self.name = attributes[:'name']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'username')
|
|
93
|
+
self.username = attributes[:'username']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'picture')
|
|
97
|
+
self.picture = attributes[:'picture']
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
102
|
+
# @return Array for valid properties with the reasons
|
|
103
|
+
def list_invalid_properties
|
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
|
+
invalid_properties = Array.new
|
|
106
|
+
invalid_properties
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Check to see if the all the properties in the model are valid
|
|
110
|
+
# @return true if the model is valid
|
|
111
|
+
def valid?
|
|
112
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
113
|
+
true
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Checks equality by comparing each attribute.
|
|
117
|
+
# @param [Object] Object to be compared
|
|
118
|
+
def ==(o)
|
|
119
|
+
return true if self.equal?(o)
|
|
120
|
+
self.class == o.class &&
|
|
121
|
+
id == o.id &&
|
|
122
|
+
name == o.name &&
|
|
123
|
+
username == o.username &&
|
|
124
|
+
picture == o.picture
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# @see the `==` method
|
|
128
|
+
# @param [Object] Object to be compared
|
|
129
|
+
def eql?(o)
|
|
130
|
+
self == o
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Calculates hash code according to all attributes.
|
|
134
|
+
# @return [Integer] Hash code
|
|
135
|
+
def hash
|
|
136
|
+
[id, name, username, picture].hash
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Builds the object from hash
|
|
140
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
141
|
+
# @return [Object] Returns the model itself
|
|
142
|
+
def self.build_from_hash(attributes)
|
|
143
|
+
return nil unless attributes.is_a?(Hash)
|
|
144
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
145
|
+
transformed_hash = {}
|
|
146
|
+
openapi_types.each_pair do |key, type|
|
|
147
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
148
|
+
transformed_hash["#{key}"] = nil
|
|
149
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
150
|
+
# check to ensure the input is an array given that the attribute
|
|
151
|
+
# is documented as an array but the input is not
|
|
152
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
153
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
154
|
+
end
|
|
155
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
156
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
new(transformed_hash)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Returns the object in the form of hash
|
|
163
|
+
# @return [Hash] Returns the object in the form of hash
|
|
164
|
+
def to_hash
|
|
165
|
+
hash = {}
|
|
166
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
167
|
+
value = self.send(attr)
|
|
168
|
+
if value.nil?
|
|
169
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
170
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
hash[param] = _to_hash(value)
|
|
174
|
+
end
|
|
175
|
+
hash
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -921,6 +921,8 @@ require 'zernio-sdk/models/list_sequence_enrollments200_response'
|
|
|
921
921
|
require 'zernio-sdk/models/list_sequence_enrollments200_response_enrollments_inner'
|
|
922
922
|
require 'zernio-sdk/models/list_sequences200_response'
|
|
923
923
|
require 'zernio-sdk/models/list_sequences200_response_sequences_inner'
|
|
924
|
+
require 'zernio-sdk/models/list_slack_members200_response'
|
|
925
|
+
require 'zernio-sdk/models/list_slack_members200_response_members_inner'
|
|
924
926
|
require 'zernio-sdk/models/list_sms_opt_outs200_response'
|
|
925
927
|
require 'zernio-sdk/models/list_sms_opt_outs200_response_opt_outs_inner'
|
|
926
928
|
require 'zernio-sdk/models/list_sms_registrations200_response'
|
|
@@ -1636,6 +1638,7 @@ require 'zernio-sdk/api/reddit_search_api'
|
|
|
1636
1638
|
require 'zernio-sdk/api/reviews_api'
|
|
1637
1639
|
require 'zernio-sdk/api/sms_api'
|
|
1638
1640
|
require 'zernio-sdk/api/sequences_api'
|
|
1641
|
+
require 'zernio-sdk/api/slack_api'
|
|
1639
1642
|
require 'zernio-sdk/api/tracking_tags_api'
|
|
1640
1643
|
require 'zernio-sdk/api/twitter_engagement_api'
|
|
1641
1644
|
require 'zernio-sdk/api/usage_api'
|
data/openapi.yaml
CHANGED
|
@@ -20948,6 +20948,53 @@ paths:
|
|
|
20948
20948
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
20949
20949
|
'404': { description: Account not found }
|
|
20950
20950
|
|
|
20951
|
+
/v1/accounts/{accountId}/slack-members:
|
|
20952
|
+
get:
|
|
20953
|
+
operationId: listSlackMembers
|
|
20954
|
+
tags: [Slack]
|
|
20955
|
+
summary: List Slack workspace members
|
|
20956
|
+
description: 'Members of the connected Slack workspace that can receive a direct message, for populating a recipient picker. Bots, deactivated members and Slackbot are excluded. Start a DM by passing a member id as `participantId` to POST /v1/inbox/conversations.'
|
|
20957
|
+
parameters:
|
|
20958
|
+
- name: accountId
|
|
20959
|
+
in: path
|
|
20960
|
+
required: true
|
|
20961
|
+
schema: { type: string }
|
|
20962
|
+
- name: query
|
|
20963
|
+
in: query
|
|
20964
|
+
required: false
|
|
20965
|
+
description: 'Case-insensitive filter over display name and handle.'
|
|
20966
|
+
schema: { type: string, maxLength: 100 }
|
|
20967
|
+
- name: limit
|
|
20968
|
+
in: query
|
|
20969
|
+
required: false
|
|
20970
|
+
schema: { type: integer, minimum: 1, maximum: 2000, default: 50 }
|
|
20971
|
+
responses:
|
|
20972
|
+
'200':
|
|
20973
|
+
description: Workspace members
|
|
20974
|
+
content:
|
|
20975
|
+
application/json:
|
|
20976
|
+
schema:
|
|
20977
|
+
type: object
|
|
20978
|
+
properties:
|
|
20979
|
+
members:
|
|
20980
|
+
type: array
|
|
20981
|
+
items:
|
|
20982
|
+
type: object
|
|
20983
|
+
properties:
|
|
20984
|
+
id: { type: string, description: 'Slack member id (pass as participantId to start a DM).' }
|
|
20985
|
+
name: { type: string, description: Display name }
|
|
20986
|
+
username: { type: [string, "null"], description: Slack handle }
|
|
20987
|
+
picture: { type: [string, "null"], description: Avatar URL }
|
|
20988
|
+
example:
|
|
20989
|
+
members:
|
|
20990
|
+
- id: "U01ABCDEF"
|
|
20991
|
+
name: "Maria García"
|
|
20992
|
+
username: "maria"
|
|
20993
|
+
picture: "https://avatars.slack-edge.com/maria.png"
|
|
20994
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
20995
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
20996
|
+
'404': { description: Slack account not found }
|
|
20997
|
+
|
|
20951
20998
|
/v1/discord/dms:
|
|
20952
20999
|
post:
|
|
20953
21000
|
operationId: sendDiscordDirectMessage
|
|
@@ -22900,7 +22947,9 @@ paths:
|
|
|
22900
22947
|
description: |
|
|
22901
22948
|
Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread.
|
|
22902
22949
|
|
|
22903
|
-
Supported platforms: X/Twitter, Bluesky, Reddit, and
|
|
22950
|
+
Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED.
|
|
22951
|
+
|
|
22952
|
+
Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace.
|
|
22904
22953
|
|
|
22905
22954
|
WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below.
|
|
22906
22955
|
|
|
@@ -22924,7 +22973,7 @@ paths:
|
|
|
22924
22973
|
description: The social account ID to send from
|
|
22925
22974
|
participantId:
|
|
22926
22975
|
type: string
|
|
22927
|
-
description: Recipient identifier. For X this is the numeric user ID; for WhatsApp, the recipient phone number in international format (digits, country code included). Provide either this or participantUsername.
|
|
22976
|
+
description: 'Recipient identifier. For X this is the numeric user ID; for WhatsApp and SMS, the recipient phone number in international format (digits, country code included); for Slack, the workspace member id (e.g. U01ABCDEF). Provide either this or participantUsername.'
|
|
22928
22977
|
participantUsername:
|
|
22929
22978
|
type: string
|
|
22930
22979
|
description: Recipient handle/username — an X or Bluesky handle (with or without @) or a Reddit username (with or without u/). Resolved via lookup. Provide either this or participantId.
|
|
@@ -39588,6 +39637,7 @@ paths:
|
|
|
39588
39637
|
'400': { $ref: '#/components/responses/BadRequest' }
|
|
39589
39638
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
39590
39639
|
'403': { description: Ads add-on required. }
|
|
39640
|
+
'422': { description: "Meta rejected the lead form with error code 3. The Facebook Page normally needs a Page admin to accept the Lead Ads Terms of Service." }
|
|
39591
39641
|
|
|
39592
39642
|
/v1/ads/lead-forms/{formId}:
|
|
39593
39643
|
get:
|
|
@@ -48,7 +48,7 @@ describe 'MessagesApi' do
|
|
|
48
48
|
|
|
49
49
|
# unit tests for create_inbox_conversation
|
|
50
50
|
# Create conversation
|
|
51
|
-
# Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, and
|
|
51
|
+
# Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. Slack: pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. WhatsApp: this is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. Calling this for a number you already have a thread with simply sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Template fields are accepted on the JSON body only, not on multipart requests. Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. X API tier requirement: DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. Rate limits (X/Twitter only): X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
52
52
|
# @param create_inbox_conversation_request
|
|
53
53
|
# @param [Hash] opts the optional parameters
|
|
54
54
|
# @return [CreateInboxConversation201Response]
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
|
|
16
|
+
# Unit tests for Zernio::SlackApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'SlackApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = Zernio::SlackApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of SlackApi' do
|
|
30
|
+
it 'should create an instance of SlackApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(Zernio::SlackApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for list_slack_members
|
|
36
|
+
# List Slack workspace members
|
|
37
|
+
# Members of the connected Slack workspace that can receive a direct message, for populating a recipient picker. Bots, deactivated members and Slackbot are excluded. Start a DM by passing a member id as `participantId` to POST /v1/inbox/conversations.
|
|
38
|
+
# @param account_id
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @option opts [String] :query Case-insensitive filter over display name and handle.
|
|
41
|
+
# @option opts [Integer] :limit
|
|
42
|
+
# @return [ListSlackMembers200Response]
|
|
43
|
+
describe 'list_slack_members test' do
|
|
44
|
+
it 'should work' do
|
|
45
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
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::ListSlackMembers200ResponseMembersInner
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::ListSlackMembers200ResponseMembersInner do
|
|
21
|
+
#let(:instance) { Zernio::ListSlackMembers200ResponseMembersInner.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ListSlackMembers200ResponseMembersInner' do
|
|
24
|
+
it 'should create an instance of ListSlackMembers200ResponseMembersInner' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::ListSlackMembers200ResponseMembersInner)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "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 "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 "username"' 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 "picture"' 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
|
|
@@ -0,0 +1,36 @@
|
|
|
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::ListSlackMembers200Response
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::ListSlackMembers200Response do
|
|
21
|
+
#let(:instance) { Zernio::ListSlackMembers200Response.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ListSlackMembers200Response' do
|
|
24
|
+
it 'should create an instance of ListSlackMembers200Response' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::ListSlackMembers200Response)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "members"' 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
|
+
end
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: late-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.665
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -1000,6 +1000,8 @@ files:
|
|
|
1000
1000
|
- docs/ListSequenceEnrollments200ResponseEnrollmentsInner.md
|
|
1001
1001
|
- docs/ListSequences200Response.md
|
|
1002
1002
|
- docs/ListSequences200ResponseSequencesInner.md
|
|
1003
|
+
- docs/ListSlackMembers200Response.md
|
|
1004
|
+
- docs/ListSlackMembers200ResponseMembersInner.md
|
|
1003
1005
|
- docs/ListSmsOptOuts200Response.md
|
|
1004
1006
|
- docs/ListSmsOptOuts200ResponseOptOutsInner.md
|
|
1005
1007
|
- docs/ListSmsRegistrations200Response.md
|
|
@@ -1321,6 +1323,7 @@ files:
|
|
|
1321
1323
|
- docs/ShareSmsRegistration200Response.md
|
|
1322
1324
|
- docs/ShareSmsRegistrationRequest.md
|
|
1323
1325
|
- docs/SharedAdAccount.md
|
|
1326
|
+
- docs/SlackApi.md
|
|
1324
1327
|
- docs/SlackPlatformData.md
|
|
1325
1328
|
- docs/SnapchatPlatformData.md
|
|
1326
1329
|
- docs/SocialAccount.md
|
|
@@ -1746,6 +1749,7 @@ files:
|
|
|
1746
1749
|
- lib/zernio-sdk/api/reddit_search_api.rb
|
|
1747
1750
|
- lib/zernio-sdk/api/reviews_api.rb
|
|
1748
1751
|
- lib/zernio-sdk/api/sequences_api.rb
|
|
1752
|
+
- lib/zernio-sdk/api/slack_api.rb
|
|
1749
1753
|
- lib/zernio-sdk/api/sms_api.rb
|
|
1750
1754
|
- lib/zernio-sdk/api/tracking_tags_api.rb
|
|
1751
1755
|
- lib/zernio-sdk/api/twitter_engagement_api.rb
|
|
@@ -2670,6 +2674,8 @@ files:
|
|
|
2670
2674
|
- lib/zernio-sdk/models/list_sequence_enrollments200_response_enrollments_inner.rb
|
|
2671
2675
|
- lib/zernio-sdk/models/list_sequences200_response.rb
|
|
2672
2676
|
- lib/zernio-sdk/models/list_sequences200_response_sequences_inner.rb
|
|
2677
|
+
- lib/zernio-sdk/models/list_slack_members200_response.rb
|
|
2678
|
+
- lib/zernio-sdk/models/list_slack_members200_response_members_inner.rb
|
|
2673
2679
|
- lib/zernio-sdk/models/list_sms_opt_outs200_response.rb
|
|
2674
2680
|
- lib/zernio-sdk/models/list_sms_opt_outs200_response_opt_outs_inner.rb
|
|
2675
2681
|
- lib/zernio-sdk/models/list_sms_registrations200_response.rb
|
|
@@ -3385,6 +3391,7 @@ files:
|
|
|
3385
3391
|
- spec/api/reddit_search_api_spec.rb
|
|
3386
3392
|
- spec/api/reviews_api_spec.rb
|
|
3387
3393
|
- spec/api/sequences_api_spec.rb
|
|
3394
|
+
- spec/api/slack_api_spec.rb
|
|
3388
3395
|
- spec/api/sms_api_spec.rb
|
|
3389
3396
|
- spec/api/tracking_tags_api_spec.rb
|
|
3390
3397
|
- spec/api/twitter_engagement_api_spec.rb
|
|
@@ -4304,6 +4311,8 @@ files:
|
|
|
4304
4311
|
- spec/models/list_sequence_enrollments200_response_spec.rb
|
|
4305
4312
|
- spec/models/list_sequences200_response_sequences_inner_spec.rb
|
|
4306
4313
|
- spec/models/list_sequences200_response_spec.rb
|
|
4314
|
+
- spec/models/list_slack_members200_response_members_inner_spec.rb
|
|
4315
|
+
- spec/models/list_slack_members200_response_spec.rb
|
|
4307
4316
|
- spec/models/list_sms_opt_outs200_response_opt_outs_inner_spec.rb
|
|
4308
4317
|
- spec/models/list_sms_opt_outs200_response_spec.rb
|
|
4309
4318
|
- spec/models/list_sms_registrations200_response_registrations_inner_spec.rb
|
|
@@ -4970,7 +4979,7 @@ files:
|
|
|
4970
4979
|
- spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
|
|
4971
4980
|
- spec/models/you_tube_video_retention_response_spec.rb
|
|
4972
4981
|
- spec/spec_helper.rb
|
|
4973
|
-
- zernio-sdk-0.0.
|
|
4982
|
+
- zernio-sdk-0.0.665.gem
|
|
4974
4983
|
- zernio-sdk.gemspec
|
|
4975
4984
|
homepage: https://openapi-generator.tech
|
|
4976
4985
|
licenses:
|
|
@@ -5000,6 +5009,7 @@ test_files:
|
|
|
5000
5009
|
- spec/api/usage_api_spec.rb
|
|
5001
5010
|
- spec/api/whats_app_flows_api_spec.rb
|
|
5002
5011
|
- spec/api/broadcasts_api_spec.rb
|
|
5012
|
+
- spec/api/slack_api_spec.rb
|
|
5003
5013
|
- spec/api/api_keys_api_spec.rb
|
|
5004
5014
|
- spec/api/whats_app_calling_api_spec.rb
|
|
5005
5015
|
- spec/api/ad_campaigns_api_spec.rb
|
|
@@ -5511,6 +5521,7 @@ test_files:
|
|
|
5511
5521
|
- spec/models/pin_discord_message200_response_spec.rb
|
|
5512
5522
|
- spec/models/analytics_overview_data_staleness_spec.rb
|
|
5513
5523
|
- spec/models/get_google_business_verifications200_response_voice_of_merchant_state_verify_spec.rb
|
|
5524
|
+
- spec/models/list_slack_members200_response_spec.rb
|
|
5514
5525
|
- spec/models/list_inbox_conversations200_response_data_inner_instagram_profile_spec.rb
|
|
5515
5526
|
- spec/models/get_ad_insights_report200_response_spec.rb
|
|
5516
5527
|
- spec/models/create_sequence_request_steps_inner_template_variable_mapping_value_spec.rb
|
|
@@ -6170,6 +6181,7 @@ test_files:
|
|
|
6170
6181
|
- spec/models/assign_google_business_location_request_spec.rb
|
|
6171
6182
|
- spec/models/get_google_business_location_details200_response_categories_spec.rb
|
|
6172
6183
|
- spec/models/linked_in_ads_platform_data_follower_spec.rb
|
|
6184
|
+
- spec/models/list_slack_members200_response_members_inner_spec.rb
|
|
6173
6185
|
- spec/models/get_inbox_post_comments200_response_pagination_spec.rb
|
|
6174
6186
|
- spec/models/instagram_account_insights_response_metrics_value_values_inner_spec.rb
|
|
6175
6187
|
- spec/models/send_conversions200_response_spec.rb
|
data/zernio-sdk-0.0.664.gem
DELETED
|
Binary file
|