agentcat-api 0.0.1 → 0.0.2

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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/README.md +106 -16
  4. data/Rakefile +10 -0
  5. data/agentcat-api.gemspec +40 -33
  6. data/docs/Error.md +18 -0
  7. data/docs/EventAcceptedResponse.md +18 -0
  8. data/docs/EventsApi.md +81 -0
  9. data/docs/NotificationsApi.md +76 -0
  10. data/docs/PublishEventRequest.md +68 -0
  11. data/docs/QueryTimeout.md +20 -0
  12. data/docs/UnsubscribeRequestRequest.md +18 -0
  13. data/docs/ValidationErrorValue.md +49 -0
  14. data/lib/agentcat-api/api/events_api.rb +86 -0
  15. data/lib/agentcat-api/api/notifications_api.rb +89 -0
  16. data/lib/agentcat-api/api_client.rb +437 -0
  17. data/lib/agentcat-api/api_error.rb +58 -0
  18. data/lib/agentcat-api/configuration.rb +392 -0
  19. data/lib/agentcat-api/models/error.rb +237 -0
  20. data/lib/agentcat-api/models/event_accepted_response.rb +222 -0
  21. data/lib/agentcat-api/models/publish_event_request.rb +525 -0
  22. data/lib/agentcat-api/models/query_timeout.rb +287 -0
  23. data/lib/agentcat-api/models/unsubscribe_request_request.rb +239 -0
  24. data/lib/agentcat-api/models/validation_error_value.rb +105 -0
  25. data/lib/agentcat-api/version.rb +15 -0
  26. data/lib/agentcat-api.rb +47 -0
  27. data/spec/api/events_api_spec.rb +47 -0
  28. data/spec/api/notifications_api_spec.rb +48 -0
  29. data/spec/models/error_spec.rb +36 -0
  30. data/spec/models/event_accepted_response_spec.rb +36 -0
  31. data/spec/models/publish_event_request_spec.rb +190 -0
  32. data/spec/models/query_timeout_spec.rb +46 -0
  33. data/spec/models/unsubscribe_request_request_spec.rb +36 -0
  34. data/spec/models/validation_error_value_spec.rb +32 -0
  35. data/spec/spec_helper.rb +111 -0
  36. metadata +123 -23
  37. data/LICENSE +0 -21
  38. data/lib/agentcat/api/version.rb +0 -7
  39. 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: 52e68f69b6df580017a5fcc27ca413bc0f93fbcce6c6dfe544b253921a9ba136
4
+ data.tar.gz: 971ec413f37b89def36bac8d203243b279cff39af5406ec86317efafc465bf41
5
5
  SHA512:
6
- metadata.gz: 9f1c04b046ec3570efca0237b376600d9b126bfcfd04b451edf6064ab49b1699ca878a01edcf6adf799a49ba3af50ce45d6a7f6520bf7425da1a63cf35505386
7
- data.tar.gz: 779e1403ab7454d5cef82b0e4bfad2aeb74a0570e3502c1ea81f46c0779b47b933607659898837892e23d2c54e123df93b39bd3b8d831dcb9f91fa2e3a3c940d
6
+ metadata.gz: d3bc7021a22563f40049948a73810096df6ffe72cdf97ab9543596cf63b213c645ad12e51ddb00e287f1bef4d707d437f2c9743b79d62f3417a33f92c55d8daf
7
+ data.tar.gz: afdd2d5f7605354efbf8b976570c13cce2805db2525bce87edde6217d2ed005d71bc59c57eaeb2bb3ef487df5af3b44de5adc83fcb4c072d2fbe47d734d4c0e9
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,115 @@
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.2
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.2.gem
28
+ ```
29
+
30
+ (for development, run `gem install --dev ./agentcat-api-0.0.2.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.2'
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
+ # Setup authorization
61
+ AgentCatApi.configure do |config|
62
+ # Configure API key authorization: tokenAuth
63
+ config.api_key['Authorization'] = 'YOUR API KEY'
64
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
65
+ # config.api_key_prefix['Authorization'] = 'Bearer'
66
+ # Configure faraday connection
67
+ config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
68
+ end
69
+
70
+ api_instance = AgentCatApi::EventsApi.new
71
+ opts = {
72
+ publish_event_request: AgentCatApi::PublishEventRequest.new({project_id: 'project_id_example'}) # PublishEventRequest |
73
+ }
74
+
75
+ begin
76
+ #Publish analytics event
77
+ result = api_instance.publish_event(opts)
78
+ p result
79
+ rescue AgentCatApi::ApiError => e
80
+ puts "Exception when calling EventsApi->publish_event: #{e}"
81
+ end
82
+
83
+ ```
84
+
85
+ ## Documentation for API Endpoints
86
+
87
+ All URIs are relative to *https://api.agentcat.com*
88
+
89
+ Class | Method | HTTP request | Description
90
+ ------------ | ------------- | ------------- | -------------
91
+ *AgentCatApi::EventsApi* | [**publish_event**](docs/EventsApi.md#publish_event) | **POST** /v1/public/events/ | Publish analytics event
92
+ *AgentCatApi::NotificationsApi* | [**unsubscribe_notification**](docs/NotificationsApi.md#unsubscribe_notification) | **POST** /v1/public/notifications/unsubscribe | Disable an email notification type for the token's user
93
+
94
+
95
+ ## Documentation for Models
96
+
97
+ - [AgentCatApi::Error](docs/Error.md)
98
+ - [AgentCatApi::EventAcceptedResponse](docs/EventAcceptedResponse.md)
99
+ - [AgentCatApi::PublishEventRequest](docs/PublishEventRequest.md)
100
+ - [AgentCatApi::QueryTimeout](docs/QueryTimeout.md)
101
+ - [AgentCatApi::UnsubscribeRequestRequest](docs/UnsubscribeRequestRequest.md)
102
+ - [AgentCatApi::ValidationErrorValue](docs/ValidationErrorValue.md)
103
+
104
+
105
+ ## Documentation for Authorization
106
+
107
+
108
+ Authentication schemes defined for the API:
109
+ ### tokenAuth
110
+
111
+
112
+ - **Type**: API key
113
+ - **API key parameter name**: Authorization
114
+ - **Location**: HTTP header
24
115
 
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/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,76 @@
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
+
9
+
10
+ ## unsubscribe_notification
11
+
12
+ > String unsubscribe_notification(opts)
13
+
14
+ Disable an email notification type for the token's user
15
+
16
+ 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.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'agentcat-api'
23
+
24
+ api_instance = AgentCatApi::NotificationsApi.new
25
+ opts = {
26
+ token: 'token_example', # String | Signed unsubscribe token. May also be passed in the request body.
27
+ unsubscribe_request_request: AgentCatApi::UnsubscribeRequestRequest.new # UnsubscribeRequestRequest |
28
+ }
29
+
30
+ begin
31
+ # Disable an email notification type for the token's user
32
+ result = api_instance.unsubscribe_notification(opts)
33
+ p result
34
+ rescue AgentCatApi::ApiError => e
35
+ puts "Error when calling NotificationsApi->unsubscribe_notification: #{e}"
36
+ end
37
+ ```
38
+
39
+ #### Using the unsubscribe_notification_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_notification_with_http_info(opts)
44
+
45
+ ```ruby
46
+ begin
47
+ # Disable an email notification type for the token's user
48
+ data, status_code, headers = api_instance.unsubscribe_notification_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 NotificationsApi->unsubscribe_notification_with_http_info: #{e}"
54
+ end
55
+ ```
56
+
57
+ ### Parameters
58
+
59
+ | Name | Type | Description | Notes |
60
+ | ---- | ---- | ----------- | ----- |
61
+ | **token** | **String** | Signed unsubscribe token. May also be passed in the request body. | [optional] |
62
+ | **unsubscribe_request_request** | [**UnsubscribeRequestRequest**](UnsubscribeRequestRequest.md) | | [optional] |
63
+
64
+ ### Return type
65
+
66
+ **String**
67
+
68
+ ### Authorization
69
+
70
+ No authorization required
71
+
72
+ ### HTTP request headers
73
+
74
+ - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
75
+ - **Accept**: text/plain, application/json
76
+
@@ -0,0 +1,68 @@
1
+ # AgentCatApi::PublishEventRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | ID of the event, typically auto-generated by the AgentCat Agent | [optional] |
8
+ | **project_id** | **String** | ID of the project this event belongs to | |
9
+ | **session_id** | **String** | ID of the session this event belongs to. Null for stateless mode (server assigns session). | [optional] |
10
+ | **actor_id** | **String** | Optional actor ID | [optional] |
11
+ | **event_id** | **String** | Optional custom event ID (must be unique) | [optional] |
12
+ | **event_type** | **String** | Type of event (e.g., mcp:tools/call, agentcat:identify) | [optional] |
13
+ | **is_error** | **Boolean** | Whether this event represents an error | [optional] |
14
+ | **error** | **Object** | Error details if is_error is true | [optional] |
15
+ | **resource_name** | **String** | Name of the resource accessed (for resource events) | [optional] |
16
+ | **duration** | **Integer** | Duration of the operation in milliseconds | [optional] |
17
+ | **timestamp** | **Time** | Agent-provided timestamp of when the event occurred | [optional] |
18
+ | **user_intent** | **String** | Captured explanation of why the actor made this request | [optional] |
19
+ | **parameters** | **Object** | Parameters sent with the request | [optional] |
20
+ | **response** | **Object** | Response data from the operation | [optional] |
21
+ | **identify_actor_given_id** | **String** | Actor ID for agentcat:identify events | [optional] |
22
+ | **identify_actor_name** | **String** | Actor name for agentcat:identify events | [optional] |
23
+ | **identify_data** | **Object** | Additional data for agentcat:identify events | [optional] |
24
+ | **tags** | **Hash&lt;String, String&gt;** | Custom string key-value pairs. Keys: max 32 chars, alphanumeric/underscore/period/colon/dash/dollar-sign only. Values: max 200 chars, no newlines. Max 50 entries. | [optional] |
25
+ | **properties** | **Object** | Custom structured data. Keys are strings, values can be string, number, boolean, array, object, or null (null values are filtered out). | [optional] |
26
+ | **ip_address** | **String** | IP address of the client | [optional] |
27
+ | **sdk_language** | **String** | Programming language of the SDK used | [optional] |
28
+ | **agentcat_version** | **String** | Version of AgentCat being used | [optional] |
29
+ | **server_name** | **String** | Name of the MCP server | [optional] |
30
+ | **server_version** | **String** | Version of the MCP server | [optional] |
31
+ | **client_name** | **String** | Name of the MCP client | [optional] |
32
+ | **client_version** | **String** | Version of the MCP client | [optional] |
33
+
34
+ ## Example
35
+
36
+ ```ruby
37
+ require 'agentcat-api'
38
+
39
+ instance = AgentCatApi::PublishEventRequest.new(
40
+ id: null,
41
+ project_id: null,
42
+ session_id: null,
43
+ actor_id: null,
44
+ event_id: null,
45
+ event_type: null,
46
+ is_error: null,
47
+ error: null,
48
+ resource_name: null,
49
+ duration: null,
50
+ timestamp: null,
51
+ user_intent: null,
52
+ parameters: null,
53
+ response: null,
54
+ identify_actor_given_id: null,
55
+ identify_actor_name: null,
56
+ identify_data: null,
57
+ tags: null,
58
+ properties: null,
59
+ ip_address: null,
60
+ sdk_language: null,
61
+ agentcat_version: null,
62
+ server_name: null,
63
+ server_version: null,
64
+ client_name: null,
65
+ client_version: null
66
+ )
67
+ ```
68
+
@@ -0,0 +1,20 @@
1
+ # AgentCatApi::QueryTimeout
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **detail** | **String** | | |
8
+ | **code** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'agentcat-api'
14
+
15
+ instance = AgentCatApi::QueryTimeout.new(
16
+ detail: null,
17
+ code: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # AgentCatApi::UnsubscribeRequestRequest
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::UnsubscribeRequestRequest.new(
15
+ token: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,49 @@
1
+ # AgentCatApi::ValidationErrorValue
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'agentcat-api'
13
+
14
+ AgentCatApi::ValidationErrorValue.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'Array<String>',
18
+ # :'String'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'agentcat-api'
30
+
31
+ AgentCatApi::ValidationErrorValue.build(data)
32
+ # => #<Array<String>:0x00007fdd4aab02a0>
33
+
34
+ AgentCatApi::ValidationErrorValue.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `Array<String>`
47
+ - `String`
48
+ - `nil` (if no type matches)
49
+
@@ -0,0 +1,86 @@
1
+ =begin
2
+ #AgentCat API
3
+
4
+ #API for AgentCat application
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module AgentCatApi
16
+ class EventsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Publish analytics event
23
+ # Submit analytics events for a project. Returns immediately with 202 Accepted.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [PublishEventRequest] :publish_event_request
26
+ # @return [EventAcceptedResponse]
27
+ def publish_event(opts = {})
28
+ data, _status_code, _headers = publish_event_with_http_info(opts)
29
+ data
30
+ end
31
+
32
+ # Publish analytics event
33
+ # Submit analytics events for a project. Returns immediately with 202 Accepted.
34
+ # @param [Hash] opts the optional parameters
35
+ # @option opts [PublishEventRequest] :publish_event_request
36
+ # @return [Array<(EventAcceptedResponse, Integer, Hash)>] EventAcceptedResponse data, response status code and response headers
37
+ def publish_event_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: EventsApi.publish_event ...'
40
+ end
41
+ # resource path
42
+ local_var_path = '/v1/public/events/'
43
+
44
+ # query parameters
45
+ query_params = opts[:query_params] || {}
46
+
47
+ # header parameters
48
+ header_params = opts[:header_params] || {}
49
+ # HTTP header 'Accept' (if needed)
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
51
+ # HTTP header 'Content-Type'
52
+ content_type = @api_client.select_header_content_type(['application/json'])
53
+ if !content_type.nil?
54
+ header_params['Content-Type'] = content_type
55
+ end
56
+
57
+ # form parameters
58
+ form_params = opts[:form_params] || {}
59
+
60
+ # http body (model)
61
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'publish_event_request'])
62
+
63
+ # return_type
64
+ return_type = opts[:debug_return_type] || 'EventAcceptedResponse'
65
+
66
+ # auth_names
67
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
68
+
69
+ new_options = opts.merge(
70
+ :operation => :"EventsApi.publish_event",
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: EventsApi#publish_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+ end
86
+ end