zyphr 0.1.19 → 0.1.21
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 +47 -6
- data/docs/AuthEmailTemplate.md +42 -0
- data/docs/AuthEmailTemplateDefault.md +26 -0
- data/docs/AuthEmailTemplateDefaultResponse.md +20 -0
- data/docs/AuthEmailTemplateDeleteResponse.md +20 -0
- data/docs/{SuccessResultData.md → AuthEmailTemplateDeleteResponseData.md} +2 -2
- data/docs/AuthEmailTemplateListResponse.md +20 -0
- data/docs/AuthEmailTemplatePreviewDraft.md +28 -0
- data/docs/AuthEmailTemplatePreviewRequest.md +20 -0
- data/docs/AuthEmailTemplatePreviewResponse.md +20 -0
- data/docs/AuthEmailTemplatePreviewResult.md +26 -0
- data/docs/AuthEmailTemplateResponse.md +20 -0
- data/docs/AuthEmailTemplateTestRequest.md +20 -0
- data/docs/AuthEmailTemplateTestResponse.md +20 -0
- data/docs/AuthEmailTemplateTestResult.md +20 -0
- data/docs/AuthEmailTemplateVersion.md +38 -0
- data/docs/AuthEmailTemplateVersionsResponse.md +20 -0
- data/docs/AuthEmailTemplatesApi.md +782 -0
- data/docs/AuthEmailType.md +15 -0
- data/docs/BulkUpsertAuthEmailTemplatesRequest.md +22 -0
- data/docs/BulkUpsertAuthEmailTemplatesResponse.md +20 -0
- data/docs/ResubscribeResponse.md +1 -1
- data/docs/SendSlackMessageRequest.md +40 -0
- data/docs/SendSlackMessageResponse.md +20 -0
- data/docs/SendSlackMessageResult.md +28 -0
- data/docs/SlackApi.md +233 -0
- data/docs/SlackMessage.md +50 -0
- data/docs/SlackMessageListResponse.md +20 -0
- data/docs/SlackMessageListResponseMeta.md +24 -0
- data/docs/SlackMessageResponse.md +20 -0
- data/docs/SlackMessageStatus.md +15 -0
- data/docs/SlackMessageSummary.md +38 -0
- data/docs/SuccessResult.md +1 -1
- data/docs/UpsertAuthEmailTemplateRequest.md +34 -0
- data/lib/zyphr/api/auth_email_templates_api.rb +688 -0
- data/lib/zyphr/api/slack_api.rb +233 -0
- data/lib/zyphr/models/auth_email_template.rb +372 -0
- data/lib/zyphr/models/auth_email_template_default.rb +281 -0
- data/lib/zyphr/models/auth_email_template_default_response.rb +229 -0
- data/lib/zyphr/models/auth_email_template_delete_response.rb +229 -0
- data/lib/zyphr/models/{success_result_data.rb → auth_email_template_delete_response_data.rb} +3 -3
- data/lib/zyphr/models/auth_email_template_list_response.rb +231 -0
- data/lib/zyphr/models/auth_email_template_preview_draft.rb +272 -0
- data/lib/zyphr/models/auth_email_template_preview_request.rb +232 -0
- data/lib/zyphr/models/auth_email_template_preview_response.rb +229 -0
- data/lib/zyphr/models/auth_email_template_preview_result.rb +258 -0
- data/lib/zyphr/models/auth_email_template_response.rb +229 -0
- data/lib/zyphr/models/auth_email_template_test_request.rb +249 -0
- data/lib/zyphr/models/auth_email_template_test_response.rb +229 -0
- data/lib/zyphr/models/auth_email_template_test_result.rb +229 -0
- data/lib/zyphr/models/auth_email_template_version.rb +352 -0
- data/lib/zyphr/models/auth_email_template_versions_response.rb +231 -0
- data/lib/zyphr/models/auth_email_type.rb +41 -0
- data/lib/zyphr/models/bulk_upsert_auth_email_templates_request.rb +239 -0
- data/lib/zyphr/models/bulk_upsert_auth_email_templates_response.rb +231 -0
- data/lib/zyphr/models/resubscribe_response.rb +1 -1
- data/lib/zyphr/models/send_slack_message_request.rb +340 -0
- data/lib/zyphr/models/send_slack_message_response.rb +229 -0
- data/lib/zyphr/models/send_slack_message_result.rb +289 -0
- data/lib/zyphr/models/slack_message.rb +406 -0
- data/lib/zyphr/models/slack_message_list_response.rb +231 -0
- data/lib/zyphr/models/slack_message_list_response_meta.rb +254 -0
- data/lib/zyphr/models/slack_message_response.rb +229 -0
- data/lib/zyphr/models/slack_message_status.rb +43 -0
- data/lib/zyphr/models/slack_message_summary.rb +340 -0
- data/lib/zyphr/models/success_result.rb +1 -1
- data/lib/zyphr/models/upsert_auth_email_template_request.rb +335 -0
- data/lib/zyphr.rb +31 -1
- data/spec/api/auth_email_templates_api_spec.rb +157 -0
- data/spec/api/slack_api_spec.rb +75 -0
- data/spec/models/auth_email_template_default_response_spec.rb +42 -0
- data/spec/models/auth_email_template_default_spec.rb +60 -0
- data/spec/models/{success_result_data_spec.rb → auth_email_template_delete_response_data_spec.rb} +6 -6
- data/spec/models/auth_email_template_delete_response_spec.rb +42 -0
- data/spec/models/auth_email_template_list_response_spec.rb +42 -0
- data/spec/models/auth_email_template_preview_draft_spec.rb +66 -0
- data/spec/models/auth_email_template_preview_request_spec.rb +42 -0
- data/spec/models/auth_email_template_preview_response_spec.rb +42 -0
- data/spec/models/auth_email_template_preview_result_spec.rb +60 -0
- data/spec/models/auth_email_template_response_spec.rb +42 -0
- data/spec/models/auth_email_template_spec.rb +112 -0
- data/spec/models/auth_email_template_test_request_spec.rb +42 -0
- data/spec/models/auth_email_template_test_response_spec.rb +42 -0
- data/spec/models/auth_email_template_test_result_spec.rb +42 -0
- data/spec/models/auth_email_template_version_spec.rb +100 -0
- data/spec/models/auth_email_template_versions_response_spec.rb +42 -0
- data/spec/models/auth_email_type_spec.rb +30 -0
- data/spec/models/bulk_upsert_auth_email_templates_request_spec.rb +48 -0
- data/spec/models/bulk_upsert_auth_email_templates_response_spec.rb +42 -0
- data/spec/models/send_slack_message_request_spec.rb +102 -0
- data/spec/models/send_slack_message_response_spec.rb +42 -0
- data/spec/models/send_slack_message_result_spec.rb +66 -0
- data/spec/models/slack_message_list_response_meta_spec.rb +54 -0
- data/spec/models/slack_message_list_response_spec.rb +42 -0
- data/spec/models/slack_message_response_spec.rb +42 -0
- data/spec/models/slack_message_spec.rb +132 -0
- data/spec/models/slack_message_status_spec.rb +30 -0
- data/spec/models/slack_message_summary_spec.rb +96 -0
- data/spec/models/upsert_auth_email_template_request_spec.rb +88 -0
- data/zyphr.gemspec +1 -1
- metadata +126 -6
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zyphr::BulkUpsertAuthEmailTemplatesRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **magic_link** | [**UpsertAuthEmailTemplateRequest**](UpsertAuthEmailTemplateRequest.md) | | [optional] |
|
|
8
|
+
| **password_reset** | [**UpsertAuthEmailTemplateRequest**](UpsertAuthEmailTemplateRequest.md) | | [optional] |
|
|
9
|
+
| **email_verification** | [**UpsertAuthEmailTemplateRequest**](UpsertAuthEmailTemplateRequest.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zyphr'
|
|
15
|
+
|
|
16
|
+
instance = Zyphr::BulkUpsertAuthEmailTemplatesRequest.new(
|
|
17
|
+
magic_link: null,
|
|
18
|
+
password_reset: null,
|
|
19
|
+
email_verification: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zyphr::BulkUpsertAuthEmailTemplatesResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**Hash<String, AuthEmailTemplate>**](AuthEmailTemplate.md) | | [optional] |
|
|
8
|
+
| **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zyphr'
|
|
14
|
+
|
|
15
|
+
instance = Zyphr::BulkUpsertAuthEmailTemplatesResponse.new(
|
|
16
|
+
data: null,
|
|
17
|
+
meta: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
data/docs/ResubscribeResponse.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **data** | [**
|
|
7
|
+
| **data** | [**AuthEmailTemplateDeleteResponseData**](AuthEmailTemplateDeleteResponseData.md) | | [optional] |
|
|
8
8
|
| **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
|
|
9
9
|
|
|
10
10
|
## Example
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Zyphr::SendSlackMessageRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **connection_id** | **String** | ID of the Slack connection to send through. Defaults to the project's active connection. | [optional] |
|
|
8
|
+
| **channel** | **String** | Slack channel ID (e.g. `C0123456789`). Falls back to the connection's default channel. | [optional] |
|
|
9
|
+
| **text** | **String** | Message text. Supports Slack markdown when `mrkdwn` is true. | [optional] |
|
|
10
|
+
| **blocks** | **Array<Hash<String, Object>>** | Slack Block Kit blocks for rich formatting. | [optional] |
|
|
11
|
+
| **attachments** | **Array<Hash<String, Object>>** | Slack message attachments (legacy formatting). | [optional] |
|
|
12
|
+
| **thread_ts** | **String** | Thread timestamp to reply in a thread. | [optional] |
|
|
13
|
+
| **reply_broadcast** | **Boolean** | Also post thread replies to the channel. | [optional] |
|
|
14
|
+
| **unfurl_links** | **Boolean** | Enable link previews. | [optional] |
|
|
15
|
+
| **unfurl_media** | **Boolean** | Enable media previews. | [optional] |
|
|
16
|
+
| **mrkdwn** | **Boolean** | Enable Slack markdown processing. | [optional] |
|
|
17
|
+
| **metadata** | **Hash<String, Object>** | Custom metadata to attach to the message. | [optional] |
|
|
18
|
+
| **tags** | **Array<String>** | Tags for message categorisation. | [optional] |
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'zyphr'
|
|
24
|
+
|
|
25
|
+
instance = Zyphr::SendSlackMessageRequest.new(
|
|
26
|
+
connection_id: null,
|
|
27
|
+
channel: C0123456789,
|
|
28
|
+
text: Deploy completed successfully,
|
|
29
|
+
blocks: null,
|
|
30
|
+
attachments: null,
|
|
31
|
+
thread_ts: null,
|
|
32
|
+
reply_broadcast: null,
|
|
33
|
+
unfurl_links: null,
|
|
34
|
+
unfurl_media: null,
|
|
35
|
+
mrkdwn: null,
|
|
36
|
+
metadata: null,
|
|
37
|
+
tags: null
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zyphr::SendSlackMessageResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**SendSlackMessageResult**](SendSlackMessageResult.md) | | [optional] |
|
|
8
|
+
| **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zyphr'
|
|
14
|
+
|
|
15
|
+
instance = Zyphr::SendSlackMessageResponse.new(
|
|
16
|
+
data: null,
|
|
17
|
+
meta: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Zyphr::SendSlackMessageResult
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [optional] |
|
|
8
|
+
| **channel_id** | **String** | | [optional] |
|
|
9
|
+
| **message_ts** | **String** | | [optional] |
|
|
10
|
+
| **status** | [**SlackMessageStatus**](SlackMessageStatus.md) | | [optional] |
|
|
11
|
+
| **created_at** | **Time** | | [optional] |
|
|
12
|
+
| **sent_at** | **Time** | | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'zyphr'
|
|
18
|
+
|
|
19
|
+
instance = Zyphr::SendSlackMessageResult.new(
|
|
20
|
+
id: null,
|
|
21
|
+
channel_id: null,
|
|
22
|
+
message_ts: null,
|
|
23
|
+
status: null,
|
|
24
|
+
created_at: null,
|
|
25
|
+
sent_at: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
data/docs/SlackApi.md
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# Zyphr::SlackApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.zyphr.dev/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_slack_message**](SlackApi.md#get_slack_message) | **GET** /slack/messages/{id} | Get a Slack message |
|
|
8
|
+
| [**list_slack_messages**](SlackApi.md#list_slack_messages) | **GET** /slack/messages | List Slack messages |
|
|
9
|
+
| [**send_slack_message**](SlackApi.md#send_slack_message) | **POST** /slack/send | Send a Slack message |
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## get_slack_message
|
|
13
|
+
|
|
14
|
+
> <SlackMessageResponse> get_slack_message(id)
|
|
15
|
+
|
|
16
|
+
Get a Slack message
|
|
17
|
+
|
|
18
|
+
Retrieve a single Slack message by ID, including its full block/attachment payload and status timestamps.
|
|
19
|
+
|
|
20
|
+
### Examples
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'time'
|
|
24
|
+
require 'zyphr'
|
|
25
|
+
# setup authorization
|
|
26
|
+
Zyphr.configure do |config|
|
|
27
|
+
# Configure API key authorization: ApiKeyAuth
|
|
28
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
29
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
30
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
api_instance = Zyphr::SlackApi.new
|
|
34
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
35
|
+
|
|
36
|
+
begin
|
|
37
|
+
# Get a Slack message
|
|
38
|
+
result = api_instance.get_slack_message(id)
|
|
39
|
+
p result
|
|
40
|
+
rescue Zyphr::ApiError => e
|
|
41
|
+
puts "Error when calling SlackApi->get_slack_message: #{e}"
|
|
42
|
+
end
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Using the get_slack_message_with_http_info variant
|
|
46
|
+
|
|
47
|
+
This returns an Array which contains the response data, status code and headers.
|
|
48
|
+
|
|
49
|
+
> <Array(<SlackMessageResponse>, Integer, Hash)> get_slack_message_with_http_info(id)
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
begin
|
|
53
|
+
# Get a Slack message
|
|
54
|
+
data, status_code, headers = api_instance.get_slack_message_with_http_info(id)
|
|
55
|
+
p status_code # => 2xx
|
|
56
|
+
p headers # => { ... }
|
|
57
|
+
p data # => <SlackMessageResponse>
|
|
58
|
+
rescue Zyphr::ApiError => e
|
|
59
|
+
puts "Error when calling SlackApi->get_slack_message_with_http_info: #{e}"
|
|
60
|
+
end
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Parameters
|
|
64
|
+
|
|
65
|
+
| Name | Type | Description | Notes |
|
|
66
|
+
| ---- | ---- | ----------- | ----- |
|
|
67
|
+
| **id** | **String** | | |
|
|
68
|
+
|
|
69
|
+
### Return type
|
|
70
|
+
|
|
71
|
+
[**SlackMessageResponse**](SlackMessageResponse.md)
|
|
72
|
+
|
|
73
|
+
### Authorization
|
|
74
|
+
|
|
75
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
76
|
+
|
|
77
|
+
### HTTP request headers
|
|
78
|
+
|
|
79
|
+
- **Content-Type**: Not defined
|
|
80
|
+
- **Accept**: application/json
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## list_slack_messages
|
|
84
|
+
|
|
85
|
+
> <SlackMessageListResponse> list_slack_messages(opts)
|
|
86
|
+
|
|
87
|
+
List Slack messages
|
|
88
|
+
|
|
89
|
+
List Slack messages sent through the project, with optional filtering by connection, channel, and status.
|
|
90
|
+
|
|
91
|
+
### Examples
|
|
92
|
+
|
|
93
|
+
```ruby
|
|
94
|
+
require 'time'
|
|
95
|
+
require 'zyphr'
|
|
96
|
+
# setup authorization
|
|
97
|
+
Zyphr.configure do |config|
|
|
98
|
+
# Configure API key authorization: ApiKeyAuth
|
|
99
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
100
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
101
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
api_instance = Zyphr::SlackApi.new
|
|
105
|
+
opts = {
|
|
106
|
+
connection_id: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String | Filter by Slack connection ID.
|
|
107
|
+
channel_id: 'channel_id_example', # String | Filter by Slack channel ID.
|
|
108
|
+
status: 'queued', # String | Filter by message status.
|
|
109
|
+
limit: 56, # Integer |
|
|
110
|
+
offset: 56 # Integer |
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
begin
|
|
114
|
+
# List Slack messages
|
|
115
|
+
result = api_instance.list_slack_messages(opts)
|
|
116
|
+
p result
|
|
117
|
+
rescue Zyphr::ApiError => e
|
|
118
|
+
puts "Error when calling SlackApi->list_slack_messages: #{e}"
|
|
119
|
+
end
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
#### Using the list_slack_messages_with_http_info variant
|
|
123
|
+
|
|
124
|
+
This returns an Array which contains the response data, status code and headers.
|
|
125
|
+
|
|
126
|
+
> <Array(<SlackMessageListResponse>, Integer, Hash)> list_slack_messages_with_http_info(opts)
|
|
127
|
+
|
|
128
|
+
```ruby
|
|
129
|
+
begin
|
|
130
|
+
# List Slack messages
|
|
131
|
+
data, status_code, headers = api_instance.list_slack_messages_with_http_info(opts)
|
|
132
|
+
p status_code # => 2xx
|
|
133
|
+
p headers # => { ... }
|
|
134
|
+
p data # => <SlackMessageListResponse>
|
|
135
|
+
rescue Zyphr::ApiError => e
|
|
136
|
+
puts "Error when calling SlackApi->list_slack_messages_with_http_info: #{e}"
|
|
137
|
+
end
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Parameters
|
|
141
|
+
|
|
142
|
+
| Name | Type | Description | Notes |
|
|
143
|
+
| ---- | ---- | ----------- | ----- |
|
|
144
|
+
| **connection_id** | **String** | Filter by Slack connection ID. | [optional] |
|
|
145
|
+
| **channel_id** | **String** | Filter by Slack channel ID. | [optional] |
|
|
146
|
+
| **status** | **String** | Filter by message status. | [optional] |
|
|
147
|
+
| **limit** | **Integer** | | [optional][default to 50] |
|
|
148
|
+
| **offset** | **Integer** | | [optional][default to 0] |
|
|
149
|
+
|
|
150
|
+
### Return type
|
|
151
|
+
|
|
152
|
+
[**SlackMessageListResponse**](SlackMessageListResponse.md)
|
|
153
|
+
|
|
154
|
+
### Authorization
|
|
155
|
+
|
|
156
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
157
|
+
|
|
158
|
+
### HTTP request headers
|
|
159
|
+
|
|
160
|
+
- **Content-Type**: Not defined
|
|
161
|
+
- **Accept**: application/json
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
## send_slack_message
|
|
165
|
+
|
|
166
|
+
> <SendSlackMessageResponse> send_slack_message(send_slack_message_request)
|
|
167
|
+
|
|
168
|
+
Send a Slack message
|
|
169
|
+
|
|
170
|
+
Send a message to a Slack channel through a connected Slack workspace. Either `text` or `blocks` must be provided. If `connection_id` is omitted, the project's active Slack connection is used. If `channel` is omitted, the connection's default channel is used.
|
|
171
|
+
|
|
172
|
+
### Examples
|
|
173
|
+
|
|
174
|
+
```ruby
|
|
175
|
+
require 'time'
|
|
176
|
+
require 'zyphr'
|
|
177
|
+
# setup authorization
|
|
178
|
+
Zyphr.configure do |config|
|
|
179
|
+
# Configure API key authorization: ApiKeyAuth
|
|
180
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
181
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
182
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
api_instance = Zyphr::SlackApi.new
|
|
186
|
+
send_slack_message_request = Zyphr::SendSlackMessageRequest.new # SendSlackMessageRequest |
|
|
187
|
+
|
|
188
|
+
begin
|
|
189
|
+
# Send a Slack message
|
|
190
|
+
result = api_instance.send_slack_message(send_slack_message_request)
|
|
191
|
+
p result
|
|
192
|
+
rescue Zyphr::ApiError => e
|
|
193
|
+
puts "Error when calling SlackApi->send_slack_message: #{e}"
|
|
194
|
+
end
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
#### Using the send_slack_message_with_http_info variant
|
|
198
|
+
|
|
199
|
+
This returns an Array which contains the response data, status code and headers.
|
|
200
|
+
|
|
201
|
+
> <Array(<SendSlackMessageResponse>, Integer, Hash)> send_slack_message_with_http_info(send_slack_message_request)
|
|
202
|
+
|
|
203
|
+
```ruby
|
|
204
|
+
begin
|
|
205
|
+
# Send a Slack message
|
|
206
|
+
data, status_code, headers = api_instance.send_slack_message_with_http_info(send_slack_message_request)
|
|
207
|
+
p status_code # => 2xx
|
|
208
|
+
p headers # => { ... }
|
|
209
|
+
p data # => <SendSlackMessageResponse>
|
|
210
|
+
rescue Zyphr::ApiError => e
|
|
211
|
+
puts "Error when calling SlackApi->send_slack_message_with_http_info: #{e}"
|
|
212
|
+
end
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Parameters
|
|
216
|
+
|
|
217
|
+
| Name | Type | Description | Notes |
|
|
218
|
+
| ---- | ---- | ----------- | ----- |
|
|
219
|
+
| **send_slack_message_request** | [**SendSlackMessageRequest**](SendSlackMessageRequest.md) | | |
|
|
220
|
+
|
|
221
|
+
### Return type
|
|
222
|
+
|
|
223
|
+
[**SendSlackMessageResponse**](SendSlackMessageResponse.md)
|
|
224
|
+
|
|
225
|
+
### Authorization
|
|
226
|
+
|
|
227
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
228
|
+
|
|
229
|
+
### HTTP request headers
|
|
230
|
+
|
|
231
|
+
- **Content-Type**: application/json
|
|
232
|
+
- **Accept**: application/json
|
|
233
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Zyphr::SlackMessage
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [optional] |
|
|
8
|
+
| **slack_connection_id** | **String** | | [optional] |
|
|
9
|
+
| **channel_id** | **String** | | [optional] |
|
|
10
|
+
| **channel_name** | **String** | | [optional] |
|
|
11
|
+
| **text** | **String** | | [optional] |
|
|
12
|
+
| **blocks** | **Array<Hash<String, Object>>** | | [optional] |
|
|
13
|
+
| **attachments** | **Array<Hash<String, Object>>** | | [optional] |
|
|
14
|
+
| **message_ts** | **String** | | [optional] |
|
|
15
|
+
| **thread_ts** | **String** | | [optional] |
|
|
16
|
+
| **status** | [**SlackMessageStatus**](SlackMessageStatus.md) | | [optional] |
|
|
17
|
+
| **status_reason** | **String** | | [optional] |
|
|
18
|
+
| **tags** | **Array<String>** | | [optional] |
|
|
19
|
+
| **metadata** | **Hash<String, Object>** | | [optional] |
|
|
20
|
+
| **created_at** | **Time** | | [optional] |
|
|
21
|
+
| **queued_at** | **Time** | | [optional] |
|
|
22
|
+
| **sent_at** | **Time** | | [optional] |
|
|
23
|
+
| **failed_at** | **Time** | | [optional] |
|
|
24
|
+
|
|
25
|
+
## Example
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
require 'zyphr'
|
|
29
|
+
|
|
30
|
+
instance = Zyphr::SlackMessage.new(
|
|
31
|
+
id: null,
|
|
32
|
+
slack_connection_id: null,
|
|
33
|
+
channel_id: null,
|
|
34
|
+
channel_name: null,
|
|
35
|
+
text: null,
|
|
36
|
+
blocks: null,
|
|
37
|
+
attachments: null,
|
|
38
|
+
message_ts: null,
|
|
39
|
+
thread_ts: null,
|
|
40
|
+
status: null,
|
|
41
|
+
status_reason: null,
|
|
42
|
+
tags: null,
|
|
43
|
+
metadata: null,
|
|
44
|
+
created_at: null,
|
|
45
|
+
queued_at: null,
|
|
46
|
+
sent_at: null,
|
|
47
|
+
failed_at: null
|
|
48
|
+
)
|
|
49
|
+
```
|
|
50
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zyphr::SlackMessageListResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**Array<SlackMessageSummary>**](SlackMessageSummary.md) | | [optional] |
|
|
8
|
+
| **meta** | [**SlackMessageListResponseMeta**](SlackMessageListResponseMeta.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zyphr'
|
|
14
|
+
|
|
15
|
+
instance = Zyphr::SlackMessageListResponse.new(
|
|
16
|
+
data: null,
|
|
17
|
+
meta: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zyphr::SlackMessageListResponseMeta
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **request_id** | **String** | | [optional] |
|
|
8
|
+
| **total** | **Integer** | | [optional] |
|
|
9
|
+
| **limit** | **Integer** | | [optional] |
|
|
10
|
+
| **offset** | **Integer** | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zyphr'
|
|
16
|
+
|
|
17
|
+
instance = Zyphr::SlackMessageListResponseMeta.new(
|
|
18
|
+
request_id: req_abc123,
|
|
19
|
+
total: null,
|
|
20
|
+
limit: null,
|
|
21
|
+
offset: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zyphr::SlackMessageResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**SlackMessage**](SlackMessage.md) | | [optional] |
|
|
8
|
+
| **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zyphr'
|
|
14
|
+
|
|
15
|
+
instance = Zyphr::SlackMessageResponse.new(
|
|
16
|
+
data: null,
|
|
17
|
+
meta: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Zyphr::SlackMessageSummary
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [optional] |
|
|
8
|
+
| **slack_connection_id** | **String** | | [optional] |
|
|
9
|
+
| **channel_id** | **String** | | [optional] |
|
|
10
|
+
| **channel_name** | **String** | | [optional] |
|
|
11
|
+
| **text** | **String** | | [optional] |
|
|
12
|
+
| **message_ts** | **String** | | [optional] |
|
|
13
|
+
| **status** | [**SlackMessageStatus**](SlackMessageStatus.md) | | [optional] |
|
|
14
|
+
| **status_reason** | **String** | | [optional] |
|
|
15
|
+
| **tags** | **Array<String>** | | [optional] |
|
|
16
|
+
| **created_at** | **Time** | | [optional] |
|
|
17
|
+
| **sent_at** | **Time** | | [optional] |
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'zyphr'
|
|
23
|
+
|
|
24
|
+
instance = Zyphr::SlackMessageSummary.new(
|
|
25
|
+
id: null,
|
|
26
|
+
slack_connection_id: null,
|
|
27
|
+
channel_id: null,
|
|
28
|
+
channel_name: null,
|
|
29
|
+
text: null,
|
|
30
|
+
message_ts: null,
|
|
31
|
+
status: null,
|
|
32
|
+
status_reason: null,
|
|
33
|
+
tags: null,
|
|
34
|
+
created_at: null,
|
|
35
|
+
sent_at: null
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
data/docs/SuccessResult.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **data** | [**
|
|
7
|
+
| **data** | [**AuthEmailTemplateDeleteResponseData**](AuthEmailTemplateDeleteResponseData.md) | | [optional] |
|
|
8
8
|
| **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
|
|
9
9
|
|
|
10
10
|
## Example
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Zyphr::UpsertAuthEmailTemplateRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **subject** | **String** | | [optional] |
|
|
8
|
+
| **html** | **String** | | [optional] |
|
|
9
|
+
| **text** | **String** | | [optional] |
|
|
10
|
+
| **mjml_source** | **String** | | [optional] |
|
|
11
|
+
| **design_json** | **Hash<String, Object>** | | [optional] |
|
|
12
|
+
| **editor_type** | **String** | | [optional] |
|
|
13
|
+
| **from_name** | **String** | | [optional] |
|
|
14
|
+
| **reply_to** | **String** | | [optional] |
|
|
15
|
+
| **is_enabled** | **Boolean** | | [optional] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'zyphr'
|
|
21
|
+
|
|
22
|
+
instance = Zyphr::UpsertAuthEmailTemplateRequest.new(
|
|
23
|
+
subject: null,
|
|
24
|
+
html: null,
|
|
25
|
+
text: null,
|
|
26
|
+
mjml_source: null,
|
|
27
|
+
design_json: null,
|
|
28
|
+
editor_type: null,
|
|
29
|
+
from_name: null,
|
|
30
|
+
reply_to: null,
|
|
31
|
+
is_enabled: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|