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.
- checksums.yaml +4 -4
- data/Gemfile +9 -0
- data/README.md +106 -16
- data/Rakefile +10 -0
- data/agentcat-api.gemspec +40 -33
- data/docs/Error.md +18 -0
- data/docs/EventAcceptedResponse.md +18 -0
- data/docs/EventsApi.md +81 -0
- data/docs/NotificationsApi.md +76 -0
- data/docs/PublishEventRequest.md +68 -0
- data/docs/QueryTimeout.md +20 -0
- data/docs/UnsubscribeRequestRequest.md +18 -0
- data/docs/ValidationErrorValue.md +49 -0
- data/lib/agentcat-api/api/events_api.rb +86 -0
- data/lib/agentcat-api/api/notifications_api.rb +89 -0
- data/lib/agentcat-api/api_client.rb +437 -0
- data/lib/agentcat-api/api_error.rb +58 -0
- data/lib/agentcat-api/configuration.rb +392 -0
- data/lib/agentcat-api/models/error.rb +237 -0
- data/lib/agentcat-api/models/event_accepted_response.rb +222 -0
- data/lib/agentcat-api/models/publish_event_request.rb +525 -0
- data/lib/agentcat-api/models/query_timeout.rb +287 -0
- data/lib/agentcat-api/models/unsubscribe_request_request.rb +239 -0
- data/lib/agentcat-api/models/validation_error_value.rb +105 -0
- data/lib/agentcat-api/version.rb +15 -0
- data/lib/agentcat-api.rb +47 -0
- data/spec/api/events_api_spec.rb +47 -0
- data/spec/api/notifications_api_spec.rb +48 -0
- data/spec/models/error_spec.rb +36 -0
- data/spec/models/event_accepted_response_spec.rb +36 -0
- data/spec/models/publish_event_request_spec.rb +190 -0
- data/spec/models/query_timeout_spec.rb +46 -0
- data/spec/models/unsubscribe_request_request_spec.rb +36 -0
- data/spec/models/validation_error_value_spec.rb +32 -0
- data/spec/spec_helper.rb +111 -0
- metadata +123 -23
- data/LICENSE +0 -21
- data/lib/agentcat/api/version.rb +0 -7
- data/lib/agentcat/api.rb +0 -30
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 52e68f69b6df580017a5fcc27ca413bc0f93fbcce6c6dfe544b253921a9ba136
|
|
4
|
+
data.tar.gz: 971ec413f37b89def36bac8d203243b279cff39af5406ec86317efafc465bf41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d3bc7021a22563f40049948a73810096df6ffe72cdf97ab9543596cf63b213c645ad12e51ddb00e287f1bef4d707d437f2c9743b79d62f3417a33f92c55d8daf
|
|
7
|
+
data.tar.gz: afdd2d5f7605354efbf8b976570c13cce2805db2525bce87edde6217d2ed005d71bc59c57eaeb2bb3ef487df5af3b44de5adc83fcb4c072d2fbe47d734d4c0e9
|
data/Gemfile
ADDED
data/README.md
CHANGED
|
@@ -1,25 +1,115 @@
|
|
|
1
1
|
# agentcat-api
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
AgentCatApi - the Ruby gem for the AgentCat API
|
|
4
4
|
|
|
5
|
-
|
|
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
|
-
|
|
7
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
14
|
+
## Installation
|
|
16
15
|
|
|
17
|
-
|
|
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
|
-
|
|
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
data/agentcat-api.gemspec
CHANGED
|
@@ -1,34 +1,41 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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 'accepted'] |
|
|
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'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<String, String>** | 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
|