agentcat-api 0.0.1 → 0.0.3

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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/README.md +101 -16
  4. data/Rakefile +10 -0
  5. data/agentcat-api.gemspec +40 -33
  6. data/docs/AlertsApi.md +141 -0
  7. data/docs/EmailChannelVerifyRequest.md +18 -0
  8. data/docs/EmailChannelVerifyResponse.md +20 -0
  9. data/docs/Error.md +18 -0
  10. data/docs/EventAcceptedResponse.md +18 -0
  11. data/docs/EventsApi.md +81 -0
  12. data/docs/NotificationsApi.md +143 -0
  13. data/docs/PublishEventRequest.md +72 -0
  14. data/docs/QueryTimeout.md +20 -0
  15. data/docs/UnsubscribeRequestRequest.md +18 -0
  16. data/docs/ValidationErrorValue.md +49 -0
  17. data/lib/agentcat-api/api/alerts_api.rb +142 -0
  18. data/lib/agentcat-api/api/events_api.rb +86 -0
  19. data/lib/agentcat-api/api/notifications_api.rb +154 -0
  20. data/lib/agentcat-api/api_client.rb +437 -0
  21. data/lib/agentcat-api/api_error.rb +58 -0
  22. data/lib/agentcat-api/configuration.rb +392 -0
  23. data/lib/agentcat-api/models/email_channel_verify_request.rb +239 -0
  24. data/lib/agentcat-api/models/email_channel_verify_response.rb +263 -0
  25. data/lib/agentcat-api/models/error.rb +237 -0
  26. data/lib/agentcat-api/models/event_accepted_response.rb +222 -0
  27. data/lib/agentcat-api/models/publish_event_request.rb +545 -0
  28. data/lib/agentcat-api/models/query_timeout.rb +287 -0
  29. data/lib/agentcat-api/models/unsubscribe_request_request.rb +239 -0
  30. data/lib/agentcat-api/models/validation_error_value.rb +105 -0
  31. data/lib/agentcat-api/version.rb +15 -0
  32. data/lib/agentcat-api.rb +50 -0
  33. data/spec/api/alerts_api_spec.rb +59 -0
  34. data/spec/api/events_api_spec.rb +47 -0
  35. data/spec/api/notifications_api_spec.rb +60 -0
  36. data/spec/models/email_channel_verify_request_spec.rb +36 -0
  37. data/spec/models/email_channel_verify_response_spec.rb +42 -0
  38. data/spec/models/error_spec.rb +36 -0
  39. data/spec/models/event_accepted_response_spec.rb +36 -0
  40. data/spec/models/publish_event_request_spec.rb +202 -0
  41. data/spec/models/query_timeout_spec.rb +46 -0
  42. data/spec/models/unsubscribe_request_request_spec.rb +36 -0
  43. data/spec/models/validation_error_value_spec.rb +32 -0
  44. data/spec/spec_helper.rb +111 -0
  45. metadata +135 -23
  46. data/LICENSE +0 -21
  47. data/lib/agentcat/api/version.rb +0 -7
  48. data/lib/agentcat/api.rb +0 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7b1f5c728d7bc6339e19c754b402ec14c931a78f1df1a9f8b4b4a37d67ca81f
4
- data.tar.gz: 1f1d0fb4638e40f7c76f56bb1777a0744b13707bc6ec2445892d5f4aa908b421
3
+ metadata.gz: 97ea1ee39dc1549a89892802359082a491dc2e9e3e061d220556d008fa8f5ebd
4
+ data.tar.gz: 4c01fdb5762f7e56a69318a9f65324e7fab96b6914ef510b96d365f6bc57ed9c
5
5
  SHA512:
6
- metadata.gz: 9f1c04b046ec3570efca0237b376600d9b126bfcfd04b451edf6064ab49b1699ca878a01edcf6adf799a49ba3af50ce45d6a7f6520bf7425da1a63cf35505386
7
- data.tar.gz: 779e1403ab7454d5cef82b0e4bfad2aeb74a0570e3502c1ea81f46c0779b47b933607659898837892e23d2c54e123df93b39bd3b8d831dcb9f91fa2e3a3c940d
6
+ metadata.gz: 66ed1a79a53443690e64f7f3c158d4f5d1171afb6df69b007a1421fa4ed958978be27338dae309fb4501aab708a6b8123474e9fa6316cca513fdec1eb9406517
7
+ data.tar.gz: 75d2fd41e39e5f14cb963ad417ff1fe6ca5b01e7692702222ec6e41d35a64d9d668faf27b8953d933486c8d330cdad84433557fa27008a5bd5492f8d54521e1f
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/README.md CHANGED
@@ -1,25 +1,110 @@
1
1
  # agentcat-api
2
2
 
3
- Generated HTTP client for the [AgentCat](https://agentcat.com) API.
3
+ AgentCatApi - the Ruby gem for the AgentCat API
4
4
 
5
- > **Status: placeholder.** This gem reserves the `agentcat-api` name for the
6
- > generated Ruby API client, which will ship as `1.0.0`. It has no functionality
7
- > yet — do not depend on it.
5
+ API for AgentCat application
8
6
 
9
- ## You probably want `agentcat` instead
7
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
10
8
 
11
- This is the low-level generated transport, produced from the AgentCat OpenAPI
12
- specification. It is consumed by the [`agentcat`](https://rubygems.org/gems/agentcat)
13
- gem, which is the supported integration surface for MCP server authors.
9
+ - API version: v1
10
+ - Package version: 0.0.3
11
+ - Generator version: 7.14.0
12
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
14
13
 
15
- Its siblings in other languages:
14
+ ## Installation
16
15
 
17
- | Language | Generated client |
18
- | ---------- | --------------------------------------------------------------------------- |
19
- | TypeScript | [`agentcat-api`](https://www.npmjs.com/package/agentcat-api) |
20
- | Python | [`agentcat-api`](https://pypi.org/project/agentcat-api/) |
21
- | Go | [`agentcat-go-api`](https://github.com/agentcathq/agentcat-go-api) |
16
+ ### Build a gem
22
17
 
23
- ## License
18
+ To build the Ruby code into a gem:
19
+
20
+ ```shell
21
+ gem build agentcat-api.gemspec
22
+ ```
23
+
24
+ Then either install the gem locally:
25
+
26
+ ```shell
27
+ gem install ./agentcat-api-0.0.3.gem
28
+ ```
29
+
30
+ (for development, run `gem install --dev ./agentcat-api-0.0.3.gem` to install the development dependencies)
31
+
32
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
+
34
+ Finally add this to the Gemfile:
35
+
36
+ gem 'agentcat-api', '~> 0.0.3'
37
+
38
+ ### Install from Git
39
+
40
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
41
+
42
+ gem 'agentcat-api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
43
+
44
+ ### Include the Ruby code directly
45
+
46
+ Include the Ruby code directly using `-I` as follows:
47
+
48
+ ```shell
49
+ ruby -Ilib script.rb
50
+ ```
51
+
52
+ ## Getting Started
53
+
54
+ Please follow the [installation](#installation) procedure and then run the following code:
55
+
56
+ ```ruby
57
+ # Load the gem
58
+ require 'agentcat-api'
59
+
60
+ api_instance = AgentCatApi::AlertsApi.new
61
+ opts = {
62
+ token: 'token_example' # String |
63
+ }
64
+
65
+ begin
66
+ #Show the confirmation page for removing an email address from one alert rule
67
+ result = api_instance.unsubscribe_alert_get(opts)
68
+ p result
69
+ rescue AgentCatApi::ApiError => e
70
+ puts "Exception when calling AlertsApi->unsubscribe_alert_get: #{e}"
71
+ end
72
+
73
+ ```
74
+
75
+ ## Documentation for API Endpoints
76
+
77
+ All URIs are relative to *https://api.agentcat.com*
78
+
79
+ Class | Method | HTTP request | Description
80
+ ------------ | ------------- | ------------- | -------------
81
+ *AgentCatApi::AlertsApi* | [**unsubscribe_alert_get**](docs/AlertsApi.md#unsubscribe_alert_get) | **GET** /v1/public/alerts/unsubscribe | Show the confirmation page for removing an email address from one alert rule
82
+ *AgentCatApi::AlertsApi* | [**unsubscribe_alert_post**](docs/AlertsApi.md#unsubscribe_alert_post) | **POST** /v1/public/alerts/unsubscribe | Remove an email address from one alert rule (List-Unsubscribe-Post and the confirmation form)
83
+ *AgentCatApi::EventsApi* | [**publish_event**](docs/EventsApi.md#publish_event) | **POST** /v1/public/events/ | Publish analytics event
84
+ *AgentCatApi::NotificationsApi* | [**unsubscribe_notification**](docs/NotificationsApi.md#unsubscribe_notification) | **POST** /v1/public/notifications/unsubscribe | Disable an email notification type for the token's user
85
+ *AgentCatApi::NotificationsApi* | [**verify_email_channel**](docs/NotificationsApi.md#verify_email_channel) | **POST** /v1/public/notifications/channels/verify | Activate an email channel from its verification link
86
+
87
+
88
+ ## Documentation for Models
89
+
90
+ - [AgentCatApi::EmailChannelVerifyRequest](docs/EmailChannelVerifyRequest.md)
91
+ - [AgentCatApi::EmailChannelVerifyResponse](docs/EmailChannelVerifyResponse.md)
92
+ - [AgentCatApi::Error](docs/Error.md)
93
+ - [AgentCatApi::EventAcceptedResponse](docs/EventAcceptedResponse.md)
94
+ - [AgentCatApi::PublishEventRequest](docs/PublishEventRequest.md)
95
+ - [AgentCatApi::QueryTimeout](docs/QueryTimeout.md)
96
+ - [AgentCatApi::UnsubscribeRequestRequest](docs/UnsubscribeRequestRequest.md)
97
+ - [AgentCatApi::ValidationErrorValue](docs/ValidationErrorValue.md)
98
+
99
+
100
+ ## Documentation for Authorization
101
+
102
+
103
+ Authentication schemes defined for the API:
104
+ ### tokenAuth
105
+
106
+
107
+ - **Type**: API key
108
+ - **API key parameter name**: Authorization
109
+ - **Location**: HTTP header
24
110
 
25
- MIT © AgentCat, Inc.
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
data/agentcat-api.gemspec CHANGED
@@ -1,34 +1,41 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/agentcat/api/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "agentcat-api"
7
- spec.version = AgentCat::API::VERSION
8
- spec.authors = ["AgentCat, Inc."]
9
- spec.email = ["support@agentcat.com"]
10
-
11
- spec.summary = "AgentCat API - generated Ruby client (placeholder)"
12
- spec.description = "Generated HTTP client for the AgentCat API, consumed by the " \
13
- "agentcat gem. This release reserves the gem name for the " \
14
- "generated client, which is in active development. Use the " \
15
- "agentcat gem instead."
16
- spec.homepage = "https://agentcat.com"
17
- spec.license = "MIT"
18
-
19
- spec.required_ruby_version = ">= 2.7.0"
20
-
21
- spec.metadata = {
22
- "homepage_uri" => "https://agentcat.com",
23
- "source_code_uri" => "https://github.com/agentcathq/agentcat-ruby-api",
24
- "bug_tracker_uri" => "https://github.com/agentcathq/agentcat-ruby-api/issues",
25
- "documentation_uri" => "https://docs.agentcat.com",
26
- "rubygems_mfa_required" => "true"
27
- }
28
-
29
- # Deliberately scoped under lib/agentcat/api/ only: the `agentcat` gem owns
30
- # lib/agentcat.rb and lib/agentcat/version.rb, and shipping either path here
31
- # would shadow it on the load path.
32
- spec.files = %w[README.md LICENSE agentcat-api.gemspec] + Dir["lib/agentcat/api.rb", "lib/agentcat/api/**/*.rb"]
33
- spec.require_paths = ["lib"]
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #AgentCat API
5
+
6
+ #API for AgentCat application
7
+
8
+ The version of the OpenAPI document: v1
9
+
10
+ Generated by: https://openapi-generator.tech
11
+ Generator version: 7.14.0
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "agentcat-api/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "agentcat-api"
20
+ s.version = AgentCatApi::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["AgentCat"]
23
+ s.email = ["hi@agentcat.com"]
24
+ s.homepage = "https://agentcat.com"
25
+ s.summary = 'AgentCat API - Ruby SDK'
26
+ s.description = 'Generated HTTP client for the AgentCat API, consumed by the agentcat gem.'
27
+ s.license = "MIT"
28
+ s.required_ruby_version = ">= 2.7"
29
+ s.metadata = {}
30
+
31
+ s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0'
32
+ s.add_runtime_dependency 'faraday-multipart'
33
+ s.add_runtime_dependency 'marcel'
34
+
35
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
36
+
37
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
38
+ s.test_files = `find spec/*`.split("\n")
39
+ s.executables = []
40
+ s.require_paths = ["lib"]
34
41
  end
data/docs/AlertsApi.md ADDED
@@ -0,0 +1,141 @@
1
+ # AgentCatApi::AlertsApi
2
+
3
+ All URIs are relative to *https://api.agentcat.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**unsubscribe_alert_get**](AlertsApi.md#unsubscribe_alert_get) | **GET** /v1/public/alerts/unsubscribe | Show the confirmation page for removing an email address from one alert rule |
8
+ | [**unsubscribe_alert_post**](AlertsApi.md#unsubscribe_alert_post) | **POST** /v1/public/alerts/unsubscribe | Remove an email address from one alert rule (List-Unsubscribe-Post and the confirmation form) |
9
+
10
+
11
+ ## unsubscribe_alert_get
12
+
13
+ > String unsubscribe_alert_get(opts)
14
+
15
+ Show the confirmation page for removing an email address from one alert rule
16
+
17
+ GET, the link in the email, shows a confirmation page and changes nothing, because mail scanners fetch links. POST removes the address from the rule; the page's form and the List-Unsubscribe-Post header both send it. POST is idempotent.
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'agentcat-api'
24
+
25
+ api_instance = AgentCatApi::AlertsApi.new
26
+ opts = {
27
+ token: 'token_example' # String |
28
+ }
29
+
30
+ begin
31
+ # Show the confirmation page for removing an email address from one alert rule
32
+ result = api_instance.unsubscribe_alert_get(opts)
33
+ p result
34
+ rescue AgentCatApi::ApiError => e
35
+ puts "Error when calling AlertsApi->unsubscribe_alert_get: #{e}"
36
+ end
37
+ ```
38
+
39
+ #### Using the unsubscribe_alert_get_with_http_info variant
40
+
41
+ This returns an Array which contains the response data, status code and headers.
42
+
43
+ > <Array(String, Integer, Hash)> unsubscribe_alert_get_with_http_info(opts)
44
+
45
+ ```ruby
46
+ begin
47
+ # Show the confirmation page for removing an email address from one alert rule
48
+ data, status_code, headers = api_instance.unsubscribe_alert_get_with_http_info(opts)
49
+ p status_code # => 2xx
50
+ p headers # => { ... }
51
+ p data # => String
52
+ rescue AgentCatApi::ApiError => e
53
+ puts "Error when calling AlertsApi->unsubscribe_alert_get_with_http_info: #{e}"
54
+ end
55
+ ```
56
+
57
+ ### Parameters
58
+
59
+ | Name | Type | Description | Notes |
60
+ | ---- | ---- | ----------- | ----- |
61
+ | **token** | **String** | | [optional] |
62
+
63
+ ### Return type
64
+
65
+ **String**
66
+
67
+ ### Authorization
68
+
69
+ No authorization required
70
+
71
+ ### HTTP request headers
72
+
73
+ - **Content-Type**: Not defined
74
+ - **Accept**: text/html, text/plain, application/json
75
+
76
+
77
+ ## unsubscribe_alert_post
78
+
79
+ > String unsubscribe_alert_post(opts)
80
+
81
+ Remove an email address from one alert rule (List-Unsubscribe-Post and the confirmation form)
82
+
83
+ GET, the link in the email, shows a confirmation page and changes nothing, because mail scanners fetch links. POST removes the address from the rule; the page's form and the List-Unsubscribe-Post header both send it. POST is idempotent.
84
+
85
+ ### Examples
86
+
87
+ ```ruby
88
+ require 'time'
89
+ require 'agentcat-api'
90
+
91
+ api_instance = AgentCatApi::AlertsApi.new
92
+ opts = {
93
+ token: 'token_example' # String |
94
+ }
95
+
96
+ begin
97
+ # Remove an email address from one alert rule (List-Unsubscribe-Post and the confirmation form)
98
+ result = api_instance.unsubscribe_alert_post(opts)
99
+ p result
100
+ rescue AgentCatApi::ApiError => e
101
+ puts "Error when calling AlertsApi->unsubscribe_alert_post: #{e}"
102
+ end
103
+ ```
104
+
105
+ #### Using the unsubscribe_alert_post_with_http_info variant
106
+
107
+ This returns an Array which contains the response data, status code and headers.
108
+
109
+ > <Array(String, Integer, Hash)> unsubscribe_alert_post_with_http_info(opts)
110
+
111
+ ```ruby
112
+ begin
113
+ # Remove an email address from one alert rule (List-Unsubscribe-Post and the confirmation form)
114
+ data, status_code, headers = api_instance.unsubscribe_alert_post_with_http_info(opts)
115
+ p status_code # => 2xx
116
+ p headers # => { ... }
117
+ p data # => String
118
+ rescue AgentCatApi::ApiError => e
119
+ puts "Error when calling AlertsApi->unsubscribe_alert_post_with_http_info: #{e}"
120
+ end
121
+ ```
122
+
123
+ ### Parameters
124
+
125
+ | Name | Type | Description | Notes |
126
+ | ---- | ---- | ----------- | ----- |
127
+ | **token** | **String** | | [optional] |
128
+
129
+ ### Return type
130
+
131
+ **String**
132
+
133
+ ### Authorization
134
+
135
+ No authorization required
136
+
137
+ ### HTTP request headers
138
+
139
+ - **Content-Type**: Not defined
140
+ - **Accept**: text/plain, application/json
141
+
@@ -0,0 +1,18 @@
1
+ # AgentCatApi::EmailChannelVerifyRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **token** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'agentcat-api'
13
+
14
+ instance = AgentCatApi::EmailChannelVerifyRequest.new(
15
+ token: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # AgentCatApi::EmailChannelVerifyResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **Boolean** | | |
8
+ | **channel_id** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'agentcat-api'
14
+
15
+ instance = AgentCatApi::EmailChannelVerifyResponse.new(
16
+ success: null,
17
+ channel_id: null
18
+ )
19
+ ```
20
+
data/docs/Error.md ADDED
@@ -0,0 +1,18 @@
1
+ # AgentCatApi::Error
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **detail** | **String** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'agentcat-api'
13
+
14
+ instance = AgentCatApi::Error.new(
15
+ detail: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # AgentCatApi::EventAcceptedResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **status** | **String** | | [optional][default to &#39;accepted&#39;] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'agentcat-api'
13
+
14
+ instance = AgentCatApi::EventAcceptedResponse.new(
15
+ status: null
16
+ )
17
+ ```
18
+
data/docs/EventsApi.md ADDED
@@ -0,0 +1,81 @@
1
+ # AgentCatApi::EventsApi
2
+
3
+ All URIs are relative to *https://api.agentcat.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**publish_event**](EventsApi.md#publish_event) | **POST** /v1/public/events/ | Publish analytics event |
8
+
9
+
10
+ ## publish_event
11
+
12
+ > <EventAcceptedResponse> publish_event(opts)
13
+
14
+ Publish analytics event
15
+
16
+ Submit analytics events for a project. Returns immediately with 202 Accepted.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'agentcat-api'
23
+ # setup authorization
24
+ AgentCatApi.configure do |config|
25
+ # Configure API key authorization: tokenAuth
26
+ config.api_key['Authorization'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ # config.api_key_prefix['Authorization'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = AgentCatApi::EventsApi.new
32
+ opts = {
33
+ publish_event_request: AgentCatApi::PublishEventRequest.new({project_id: 'project_id_example'}) # PublishEventRequest |
34
+ }
35
+
36
+ begin
37
+ # Publish analytics event
38
+ result = api_instance.publish_event(opts)
39
+ p result
40
+ rescue AgentCatApi::ApiError => e
41
+ puts "Error when calling EventsApi->publish_event: #{e}"
42
+ end
43
+ ```
44
+
45
+ #### Using the publish_event_with_http_info variant
46
+
47
+ This returns an Array which contains the response data, status code and headers.
48
+
49
+ > <Array(<EventAcceptedResponse>, Integer, Hash)> publish_event_with_http_info(opts)
50
+
51
+ ```ruby
52
+ begin
53
+ # Publish analytics event
54
+ data, status_code, headers = api_instance.publish_event_with_http_info(opts)
55
+ p status_code # => 2xx
56
+ p headers # => { ... }
57
+ p data # => <EventAcceptedResponse>
58
+ rescue AgentCatApi::ApiError => e
59
+ puts "Error when calling EventsApi->publish_event_with_http_info: #{e}"
60
+ end
61
+ ```
62
+
63
+ ### Parameters
64
+
65
+ | Name | Type | Description | Notes |
66
+ | ---- | ---- | ----------- | ----- |
67
+ | **publish_event_request** | [**PublishEventRequest**](PublishEventRequest.md) | | [optional] |
68
+
69
+ ### Return type
70
+
71
+ [**EventAcceptedResponse**](EventAcceptedResponse.md)
72
+
73
+ ### Authorization
74
+
75
+ [tokenAuth](../README.md#tokenAuth)
76
+
77
+ ### HTTP request headers
78
+
79
+ - **Content-Type**: application/json
80
+ - **Accept**: application/json
81
+
@@ -0,0 +1,143 @@
1
+ # AgentCatApi::NotificationsApi
2
+
3
+ All URIs are relative to *https://api.agentcat.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**unsubscribe_notification**](NotificationsApi.md#unsubscribe_notification) | **POST** /v1/public/notifications/unsubscribe | Disable an email notification type for the token&#39;s user |
8
+ | [**verify_email_channel**](NotificationsApi.md#verify_email_channel) | **POST** /v1/public/notifications/channels/verify | Activate an email channel from its verification link |
9
+
10
+
11
+ ## unsubscribe_notification
12
+
13
+ > String unsubscribe_notification(opts)
14
+
15
+ Disable an email notification type for the token's user
16
+
17
+ Anonymous endpoint reached from email unsubscribe links and the List-Unsubscribe header POST. The token encodes the user and the notification type to disable. Response bodies are plain text.
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'agentcat-api'
24
+
25
+ api_instance = AgentCatApi::NotificationsApi.new
26
+ opts = {
27
+ token: 'token_example', # String | Signed unsubscribe token. May also be passed in the request body.
28
+ unsubscribe_request_request: AgentCatApi::UnsubscribeRequestRequest.new # UnsubscribeRequestRequest |
29
+ }
30
+
31
+ begin
32
+ # Disable an email notification type for the token's user
33
+ result = api_instance.unsubscribe_notification(opts)
34
+ p result
35
+ rescue AgentCatApi::ApiError => e
36
+ puts "Error when calling NotificationsApi->unsubscribe_notification: #{e}"
37
+ end
38
+ ```
39
+
40
+ #### Using the unsubscribe_notification_with_http_info variant
41
+
42
+ This returns an Array which contains the response data, status code and headers.
43
+
44
+ > <Array(String, Integer, Hash)> unsubscribe_notification_with_http_info(opts)
45
+
46
+ ```ruby
47
+ begin
48
+ # Disable an email notification type for the token's user
49
+ data, status_code, headers = api_instance.unsubscribe_notification_with_http_info(opts)
50
+ p status_code # => 2xx
51
+ p headers # => { ... }
52
+ p data # => String
53
+ rescue AgentCatApi::ApiError => e
54
+ puts "Error when calling NotificationsApi->unsubscribe_notification_with_http_info: #{e}"
55
+ end
56
+ ```
57
+
58
+ ### Parameters
59
+
60
+ | Name | Type | Description | Notes |
61
+ | ---- | ---- | ----------- | ----- |
62
+ | **token** | **String** | Signed unsubscribe token. May also be passed in the request body. | [optional] |
63
+ | **unsubscribe_request_request** | [**UnsubscribeRequestRequest**](UnsubscribeRequestRequest.md) | | [optional] |
64
+
65
+ ### Return type
66
+
67
+ **String**
68
+
69
+ ### Authorization
70
+
71
+ No authorization required
72
+
73
+ ### HTTP request headers
74
+
75
+ - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
76
+ - **Accept**: text/plain, application/json
77
+
78
+
79
+ ## verify_email_channel
80
+
81
+ > <EmailChannelVerifyResponse> verify_email_channel(opts)
82
+
83
+ Activate an email channel from its verification link
84
+
85
+ ### Examples
86
+
87
+ ```ruby
88
+ require 'time'
89
+ require 'agentcat-api'
90
+
91
+ api_instance = AgentCatApi::NotificationsApi.new
92
+ opts = {
93
+ token: 'token_example', # String |
94
+ email_channel_verify_request: AgentCatApi::EmailChannelVerifyRequest.new # EmailChannelVerifyRequest |
95
+ }
96
+
97
+ begin
98
+ # Activate an email channel from its verification link
99
+ result = api_instance.verify_email_channel(opts)
100
+ p result
101
+ rescue AgentCatApi::ApiError => e
102
+ puts "Error when calling NotificationsApi->verify_email_channel: #{e}"
103
+ end
104
+ ```
105
+
106
+ #### Using the verify_email_channel_with_http_info variant
107
+
108
+ This returns an Array which contains the response data, status code and headers.
109
+
110
+ > <Array(<EmailChannelVerifyResponse>, Integer, Hash)> verify_email_channel_with_http_info(opts)
111
+
112
+ ```ruby
113
+ begin
114
+ # Activate an email channel from its verification link
115
+ data, status_code, headers = api_instance.verify_email_channel_with_http_info(opts)
116
+ p status_code # => 2xx
117
+ p headers # => { ... }
118
+ p data # => <EmailChannelVerifyResponse>
119
+ rescue AgentCatApi::ApiError => e
120
+ puts "Error when calling NotificationsApi->verify_email_channel_with_http_info: #{e}"
121
+ end
122
+ ```
123
+
124
+ ### Parameters
125
+
126
+ | Name | Type | Description | Notes |
127
+ | ---- | ---- | ----------- | ----- |
128
+ | **token** | **String** | | [optional] |
129
+ | **email_channel_verify_request** | [**EmailChannelVerifyRequest**](EmailChannelVerifyRequest.md) | | [optional] |
130
+
131
+ ### Return type
132
+
133
+ [**EmailChannelVerifyResponse**](EmailChannelVerifyResponse.md)
134
+
135
+ ### Authorization
136
+
137
+ No authorization required
138
+
139
+ ### HTTP request headers
140
+
141
+ - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
142
+ - **Accept**: application/json
143
+