agentcat-api 0.0.3 → 0.0.4
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 +7 -4
- data/docs/PublishServerInfoRequest.md +28 -0
- data/docs/ServerInfoAcceptedResponse.md +18 -0
- data/docs/ServerInfoApi.md +74 -0
- data/lib/agentcat-api/api/server_info_api.rb +86 -0
- data/lib/agentcat-api/models/publish_event_request.rb +2 -2
- data/lib/agentcat-api/models/publish_server_info_request.rb +307 -0
- data/lib/agentcat-api/models/server_info_accepted_response.rb +222 -0
- data/lib/agentcat-api/version.rb +1 -1
- data/lib/agentcat-api.rb +3 -0
- data/spec/api/server_info_api_spec.rb +47 -0
- data/spec/models/publish_event_request_spec.rb +1 -1
- data/spec/models/publish_server_info_request_spec.rb +66 -0
- data/spec/models/server_info_accepted_response_spec.rb +36 -0
- metadata +21 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c44f067b368b15d59a06bad1d9b46b53803443f2576c24e93171f84f484c8030
|
|
4
|
+
data.tar.gz: bf2d93a296638b69aa7e07b35f84ec13cf849f9e5c5ab24680e40064f3989b3c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2685e4443f5ab8e1863ee5508f5f7a91078c9143ced82b58be220adb30112b03ca3769cbaa4a630f99166fd8c47233c82977959736a1f661a315848de729f517
|
|
7
|
+
data.tar.gz: 40eb1dd3a4a0f0f1b03619ac6d1f7bad5f48a52ea8f25a704690e5ed920fb94ed71c93b18f18400208c820a90b5293c53c138672a75c5dc7b8c41ea6786c4b25
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ API for AgentCat application
|
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: v1
|
|
10
|
-
- Package version: 0.0.
|
|
10
|
+
- Package version: 0.0.4
|
|
11
11
|
- Generator version: 7.14.0
|
|
12
12
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
13
13
|
|
|
@@ -24,16 +24,16 @@ gem build agentcat-api.gemspec
|
|
|
24
24
|
Then either install the gem locally:
|
|
25
25
|
|
|
26
26
|
```shell
|
|
27
|
-
gem install ./agentcat-api-0.0.
|
|
27
|
+
gem install ./agentcat-api-0.0.4.gem
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
(for development, run `gem install --dev ./agentcat-api-0.0.
|
|
30
|
+
(for development, run `gem install --dev ./agentcat-api-0.0.4.gem` to install the development dependencies)
|
|
31
31
|
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
33
33
|
|
|
34
34
|
Finally add this to the Gemfile:
|
|
35
35
|
|
|
36
|
-
gem 'agentcat-api', '~> 0.0.
|
|
36
|
+
gem 'agentcat-api', '~> 0.0.4'
|
|
37
37
|
|
|
38
38
|
### Install from Git
|
|
39
39
|
|
|
@@ -83,6 +83,7 @@ Class | Method | HTTP request | Description
|
|
|
83
83
|
*AgentCatApi::EventsApi* | [**publish_event**](docs/EventsApi.md#publish_event) | **POST** /v1/public/events/ | Publish analytics event
|
|
84
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
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
|
+
*AgentCatApi::ServerInfoApi* | [**publish_server_info**](docs/ServerInfoApi.md#publish_server_info) | **POST** /v1/public/server-info/ | Publish MCP server info
|
|
86
87
|
|
|
87
88
|
|
|
88
89
|
## Documentation for Models
|
|
@@ -92,7 +93,9 @@ Class | Method | HTTP request | Description
|
|
|
92
93
|
- [AgentCatApi::Error](docs/Error.md)
|
|
93
94
|
- [AgentCatApi::EventAcceptedResponse](docs/EventAcceptedResponse.md)
|
|
94
95
|
- [AgentCatApi::PublishEventRequest](docs/PublishEventRequest.md)
|
|
96
|
+
- [AgentCatApi::PublishServerInfoRequest](docs/PublishServerInfoRequest.md)
|
|
95
97
|
- [AgentCatApi::QueryTimeout](docs/QueryTimeout.md)
|
|
98
|
+
- [AgentCatApi::ServerInfoAcceptedResponse](docs/ServerInfoAcceptedResponse.md)
|
|
96
99
|
- [AgentCatApi::UnsubscribeRequestRequest](docs/UnsubscribeRequestRequest.md)
|
|
97
100
|
- [AgentCatApi::ValidationErrorValue](docs/ValidationErrorValue.md)
|
|
98
101
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# AgentCatApi::PublishServerInfoRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **project_id** | **String** | ID of the project that the MCP server reports to. | |
|
|
8
|
+
| **server_name** | **String** | Name of the MCP server. Send the same value as server_name on events. | [optional] |
|
|
9
|
+
| **server_version** | **String** | Version of the MCP server, as on events. | [optional] |
|
|
10
|
+
| **server_title** | **String** | Display title of the MCP server. | [optional] |
|
|
11
|
+
| **instructions** | **String** | Instructions that the MCP server gives to agents. AgentCat keeps the first 100,000 characters. | [optional] |
|
|
12
|
+
| **features** | **Object** | What the MCP server offers to agents. Each key is a list type of the MCP specification (tools, resources, resourceTemplates, prompts) with the items as the server lists them. Send every item with its full description. AgentCat stores keys that it does not know. | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'agentcat-api'
|
|
18
|
+
|
|
19
|
+
instance = AgentCatApi::PublishServerInfoRequest.new(
|
|
20
|
+
project_id: null,
|
|
21
|
+
server_name: null,
|
|
22
|
+
server_version: null,
|
|
23
|
+
server_title: null,
|
|
24
|
+
instructions: null,
|
|
25
|
+
features: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# AgentCatApi::ServerInfoAcceptedResponse
|
|
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::ServerInfoAcceptedResponse.new(
|
|
15
|
+
status: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# AgentCatApi::ServerInfoApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.agentcat.com*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**publish_server_info**](ServerInfoApi.md#publish_server_info) | **POST** /v1/public/server-info/ | Publish MCP server info |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## publish_server_info
|
|
11
|
+
|
|
12
|
+
> <ServerInfoAcceptedResponse> publish_server_info(opts)
|
|
13
|
+
|
|
14
|
+
Publish MCP server info
|
|
15
|
+
|
|
16
|
+
Tell AgentCat what an MCP server offers to agents: its name, version, title, instructions and its lists of tools, resources, resource templates and prompts. Send it when the server starts and then once an hour. The body can hold 1,000,000 bytes at most. AgentCat counts each non-ASCII character as 6 bytes, and an emoji as 12 bytes. AgentCat keeps one row per server name per day and drops repeats. Returns immediately with 202 Accepted.
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'time'
|
|
22
|
+
require 'agentcat-api'
|
|
23
|
+
|
|
24
|
+
api_instance = AgentCatApi::ServerInfoApi.new
|
|
25
|
+
opts = {
|
|
26
|
+
publish_server_info_request: AgentCatApi::PublishServerInfoRequest.new({project_id: 'project_id_example'}) # PublishServerInfoRequest |
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
begin
|
|
30
|
+
# Publish MCP server info
|
|
31
|
+
result = api_instance.publish_server_info(opts)
|
|
32
|
+
p result
|
|
33
|
+
rescue AgentCatApi::ApiError => e
|
|
34
|
+
puts "Error when calling ServerInfoApi->publish_server_info: #{e}"
|
|
35
|
+
end
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Using the publish_server_info_with_http_info variant
|
|
39
|
+
|
|
40
|
+
This returns an Array which contains the response data, status code and headers.
|
|
41
|
+
|
|
42
|
+
> <Array(<ServerInfoAcceptedResponse>, Integer, Hash)> publish_server_info_with_http_info(opts)
|
|
43
|
+
|
|
44
|
+
```ruby
|
|
45
|
+
begin
|
|
46
|
+
# Publish MCP server info
|
|
47
|
+
data, status_code, headers = api_instance.publish_server_info_with_http_info(opts)
|
|
48
|
+
p status_code # => 2xx
|
|
49
|
+
p headers # => { ... }
|
|
50
|
+
p data # => <ServerInfoAcceptedResponse>
|
|
51
|
+
rescue AgentCatApi::ApiError => e
|
|
52
|
+
puts "Error when calling ServerInfoApi->publish_server_info_with_http_info: #{e}"
|
|
53
|
+
end
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Parameters
|
|
57
|
+
|
|
58
|
+
| Name | Type | Description | Notes |
|
|
59
|
+
| ---- | ---- | ----------- | ----- |
|
|
60
|
+
| **publish_server_info_request** | [**PublishServerInfoRequest**](PublishServerInfoRequest.md) | | [optional] |
|
|
61
|
+
|
|
62
|
+
### Return type
|
|
63
|
+
|
|
64
|
+
[**ServerInfoAcceptedResponse**](ServerInfoAcceptedResponse.md)
|
|
65
|
+
|
|
66
|
+
### Authorization
|
|
67
|
+
|
|
68
|
+
No authorization required
|
|
69
|
+
|
|
70
|
+
### HTTP request headers
|
|
71
|
+
|
|
72
|
+
- **Content-Type**: application/json
|
|
73
|
+
- **Accept**: application/json
|
|
74
|
+
|
|
@@ -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 ServerInfoApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Publish MCP server info
|
|
23
|
+
# Tell AgentCat what an MCP server offers to agents: its name, version, title, instructions and its lists of tools, resources, resource templates and prompts. Send it when the server starts and then once an hour. The body can hold 1,000,000 bytes at most. AgentCat counts each non-ASCII character as 6 bytes, and an emoji as 12 bytes. AgentCat keeps one row per server name per day and drops repeats. Returns immediately with 202 Accepted.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [PublishServerInfoRequest] :publish_server_info_request
|
|
26
|
+
# @return [ServerInfoAcceptedResponse]
|
|
27
|
+
def publish_server_info(opts = {})
|
|
28
|
+
data, _status_code, _headers = publish_server_info_with_http_info(opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Publish MCP server info
|
|
33
|
+
# Tell AgentCat what an MCP server offers to agents: its name, version, title, instructions and its lists of tools, resources, resource templates and prompts. Send it when the server starts and then once an hour. The body can hold 1,000,000 bytes at most. AgentCat counts each non-ASCII character as 6 bytes, and an emoji as 12 bytes. AgentCat keeps one row per server name per day and drops repeats. Returns immediately with 202 Accepted.
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @option opts [PublishServerInfoRequest] :publish_server_info_request
|
|
36
|
+
# @return [Array<(ServerInfoAcceptedResponse, Integer, Hash)>] ServerInfoAcceptedResponse data, response status code and response headers
|
|
37
|
+
def publish_server_info_with_http_info(opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ServerInfoApi.publish_server_info ...'
|
|
40
|
+
end
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = '/v1/public/server-info/'
|
|
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_server_info_request'])
|
|
62
|
+
|
|
63
|
+
# return_type
|
|
64
|
+
return_type = opts[:debug_return_type] || 'ServerInfoAcceptedResponse'
|
|
65
|
+
|
|
66
|
+
# auth_names
|
|
67
|
+
auth_names = opts[:debug_auth_names] || []
|
|
68
|
+
|
|
69
|
+
new_options = opts.merge(
|
|
70
|
+
:operation => :"ServerInfoApi.publish_server_info",
|
|
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: ServerInfoApi#publish_server_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -356,7 +356,7 @@ module AgentCatApi
|
|
|
356
356
|
def valid?
|
|
357
357
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
358
358
|
return false if @project_id.nil?
|
|
359
|
-
event_type_validator = EnumAttributeValidator.new('String', ["mcp:ping", "mcp:initialize", "mcp:completion/complete", "mcp:logging/setLevel", "mcp:prompts/get", "mcp:prompts/list", "mcp:resources/list", "mcp:resources/templates/list", "mcp:resources/read", "mcp:resources/subscribe", "mcp:resources/unsubscribe", "mcp:tools/call", "mcp:tools/list", "mcp:tasks/get", "mcp:tasks/result", "mcp:tasks/list", "mcp:tasks/cancel", "agentcat:identify"])
|
|
359
|
+
event_type_validator = EnumAttributeValidator.new('String', ["mcp:ping", "mcp:initialize", "mcp:completion/complete", "mcp:logging/setLevel", "mcp:prompts/get", "mcp:prompts/list", "mcp:resources/list", "mcp:resources/templates/list", "mcp:resources/read", "mcp:resources/subscribe", "mcp:resources/unsubscribe", "mcp:tools/call", "mcp:tools/list", "mcp:tasks/get", "mcp:tasks/result", "mcp:tasks/list", "mcp:tasks/cancel", "agentcat:identify", "agentcat:custom"])
|
|
360
360
|
return false unless event_type_validator.valid?(@event_type)
|
|
361
361
|
true
|
|
362
362
|
end
|
|
@@ -374,7 +374,7 @@ module AgentCatApi
|
|
|
374
374
|
# Custom attribute writer method checking allowed values (enum).
|
|
375
375
|
# @param [Object] event_type Object to be assigned
|
|
376
376
|
def event_type=(event_type)
|
|
377
|
-
validator = EnumAttributeValidator.new('String', ["mcp:ping", "mcp:initialize", "mcp:completion/complete", "mcp:logging/setLevel", "mcp:prompts/get", "mcp:prompts/list", "mcp:resources/list", "mcp:resources/templates/list", "mcp:resources/read", "mcp:resources/subscribe", "mcp:resources/unsubscribe", "mcp:tools/call", "mcp:tools/list", "mcp:tasks/get", "mcp:tasks/result", "mcp:tasks/list", "mcp:tasks/cancel", "agentcat:identify"])
|
|
377
|
+
validator = EnumAttributeValidator.new('String', ["mcp:ping", "mcp:initialize", "mcp:completion/complete", "mcp:logging/setLevel", "mcp:prompts/get", "mcp:prompts/list", "mcp:resources/list", "mcp:resources/templates/list", "mcp:resources/read", "mcp:resources/subscribe", "mcp:resources/unsubscribe", "mcp:tools/call", "mcp:tools/list", "mcp:tasks/get", "mcp:tasks/result", "mcp:tasks/list", "mcp:tasks/cancel", "agentcat:identify", "agentcat:custom"])
|
|
378
378
|
unless validator.valid?(event_type)
|
|
379
379
|
fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}."
|
|
380
380
|
end
|
|
@@ -0,0 +1,307 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module AgentCatApi
|
|
17
|
+
class PublishServerInfoRequest
|
|
18
|
+
# ID of the project that the MCP server reports to.
|
|
19
|
+
attr_accessor :project_id
|
|
20
|
+
|
|
21
|
+
# Name of the MCP server. Send the same value as server_name on events.
|
|
22
|
+
attr_accessor :server_name
|
|
23
|
+
|
|
24
|
+
# Version of the MCP server, as on events.
|
|
25
|
+
attr_accessor :server_version
|
|
26
|
+
|
|
27
|
+
# Display title of the MCP server.
|
|
28
|
+
attr_accessor :server_title
|
|
29
|
+
|
|
30
|
+
# Instructions that the MCP server gives to agents. AgentCat keeps the first 100,000 characters.
|
|
31
|
+
attr_accessor :instructions
|
|
32
|
+
|
|
33
|
+
# What the MCP server offers to agents. Each key is a list type of the MCP specification (tools, resources, resourceTemplates, prompts) with the items as the server lists them. Send every item with its full description. AgentCat stores keys that it does not know.
|
|
34
|
+
attr_accessor :features
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'project_id' => :'project_id',
|
|
40
|
+
:'server_name' => :'server_name',
|
|
41
|
+
:'server_version' => :'server_version',
|
|
42
|
+
:'server_title' => :'server_title',
|
|
43
|
+
:'instructions' => :'instructions',
|
|
44
|
+
:'features' => :'features'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns attribute mapping this model knows about
|
|
49
|
+
def self.acceptable_attribute_map
|
|
50
|
+
attribute_map
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns all the JSON keys this model knows about
|
|
54
|
+
def self.acceptable_attributes
|
|
55
|
+
acceptable_attribute_map.values
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Attribute type mapping.
|
|
59
|
+
def self.openapi_types
|
|
60
|
+
{
|
|
61
|
+
:'project_id' => :'String',
|
|
62
|
+
:'server_name' => :'String',
|
|
63
|
+
:'server_version' => :'String',
|
|
64
|
+
:'server_title' => :'String',
|
|
65
|
+
:'instructions' => :'String',
|
|
66
|
+
:'features' => :'Object'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Initializes the object
|
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
if (!attributes.is_a?(Hash))
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AgentCatApi::PublishServerInfoRequest` initialize method"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
86
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AgentCatApi::PublishServerInfoRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
88
|
+
end
|
|
89
|
+
h[k.to_sym] = v
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'project_id')
|
|
93
|
+
self.project_id = attributes[:'project_id']
|
|
94
|
+
else
|
|
95
|
+
self.project_id = nil
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'server_name')
|
|
99
|
+
self.server_name = attributes[:'server_name']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'server_version')
|
|
103
|
+
self.server_version = attributes[:'server_version']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'server_title')
|
|
107
|
+
self.server_title = attributes[:'server_title']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'instructions')
|
|
111
|
+
self.instructions = attributes[:'instructions']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'features')
|
|
115
|
+
self.features = attributes[:'features']
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
120
|
+
# @return Array for valid properties with the reasons
|
|
121
|
+
def list_invalid_properties
|
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
123
|
+
invalid_properties = Array.new
|
|
124
|
+
if @project_id.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "project_id", project_id cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if !@server_name.nil? && @server_name.to_s.length > 255
|
|
129
|
+
invalid_properties.push('invalid value for "server_name", the character length must be smaller than or equal to 255.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
invalid_properties
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Check to see if the all the properties in the model are valid
|
|
136
|
+
# @return true if the model is valid
|
|
137
|
+
def valid?
|
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
139
|
+
return false if @project_id.nil?
|
|
140
|
+
return false if !@server_name.nil? && @server_name.to_s.length > 255
|
|
141
|
+
true
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Custom attribute writer method with validation
|
|
145
|
+
# @param [Object] project_id Value to be assigned
|
|
146
|
+
def project_id=(project_id)
|
|
147
|
+
if project_id.nil?
|
|
148
|
+
fail ArgumentError, 'project_id cannot be nil'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
@project_id = project_id
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Custom attribute writer method with validation
|
|
155
|
+
# @param [Object] server_name Value to be assigned
|
|
156
|
+
def server_name=(server_name)
|
|
157
|
+
if server_name.nil?
|
|
158
|
+
fail ArgumentError, 'server_name cannot be nil'
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if server_name.to_s.length > 255
|
|
162
|
+
fail ArgumentError, 'invalid value for "server_name", the character length must be smaller than or equal to 255.'
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
@server_name = server_name
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Checks equality by comparing each attribute.
|
|
169
|
+
# @param [Object] Object to be compared
|
|
170
|
+
def ==(o)
|
|
171
|
+
return true if self.equal?(o)
|
|
172
|
+
self.class == o.class &&
|
|
173
|
+
project_id == o.project_id &&
|
|
174
|
+
server_name == o.server_name &&
|
|
175
|
+
server_version == o.server_version &&
|
|
176
|
+
server_title == o.server_title &&
|
|
177
|
+
instructions == o.instructions &&
|
|
178
|
+
features == o.features
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# @see the `==` method
|
|
182
|
+
# @param [Object] Object to be compared
|
|
183
|
+
def eql?(o)
|
|
184
|
+
self == o
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Calculates hash code according to all attributes.
|
|
188
|
+
# @return [Integer] Hash code
|
|
189
|
+
def hash
|
|
190
|
+
[project_id, server_name, server_version, server_title, instructions, features].hash
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Builds the object from hash
|
|
194
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
195
|
+
# @return [Object] Returns the model itself
|
|
196
|
+
def self.build_from_hash(attributes)
|
|
197
|
+
return nil unless attributes.is_a?(Hash)
|
|
198
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
199
|
+
transformed_hash = {}
|
|
200
|
+
openapi_types.each_pair do |key, type|
|
|
201
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
202
|
+
transformed_hash["#{key}"] = nil
|
|
203
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
204
|
+
# check to ensure the input is an array given that the attribute
|
|
205
|
+
# is documented as an array but the input is not
|
|
206
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
207
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
208
|
+
end
|
|
209
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
210
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
new(transformed_hash)
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Deserializes the data based on type
|
|
217
|
+
# @param string type Data type
|
|
218
|
+
# @param string value Value to be deserialized
|
|
219
|
+
# @return [Object] Deserialized data
|
|
220
|
+
def self._deserialize(type, value)
|
|
221
|
+
case type.to_sym
|
|
222
|
+
when :Time
|
|
223
|
+
Time.parse(value)
|
|
224
|
+
when :Date
|
|
225
|
+
Date.parse(value)
|
|
226
|
+
when :String
|
|
227
|
+
value.to_s
|
|
228
|
+
when :Integer
|
|
229
|
+
value.to_i
|
|
230
|
+
when :Float
|
|
231
|
+
value.to_f
|
|
232
|
+
when :Boolean
|
|
233
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
234
|
+
true
|
|
235
|
+
else
|
|
236
|
+
false
|
|
237
|
+
end
|
|
238
|
+
when :Object
|
|
239
|
+
# generic object (usually a Hash), return directly
|
|
240
|
+
value
|
|
241
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
242
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
243
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
244
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
245
|
+
k_type = Regexp.last_match[:k_type]
|
|
246
|
+
v_type = Regexp.last_match[:v_type]
|
|
247
|
+
{}.tap do |hash|
|
|
248
|
+
value.each do |k, v|
|
|
249
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
else # model
|
|
253
|
+
# models (e.g. Pet) or oneOf
|
|
254
|
+
klass = AgentCatApi.const_get(type)
|
|
255
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
256
|
+
end
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Returns the string representation of the object
|
|
260
|
+
# @return [String] String presentation of the object
|
|
261
|
+
def to_s
|
|
262
|
+
to_hash.to_s
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
266
|
+
# @return [Hash] Returns the object in the form of hash
|
|
267
|
+
def to_body
|
|
268
|
+
to_hash
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Returns the object in the form of hash
|
|
272
|
+
# @return [Hash] Returns the object in the form of hash
|
|
273
|
+
def to_hash
|
|
274
|
+
hash = {}
|
|
275
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
276
|
+
value = self.send(attr)
|
|
277
|
+
if value.nil?
|
|
278
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
279
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
hash[param] = _to_hash(value)
|
|
283
|
+
end
|
|
284
|
+
hash
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Outputs non-array value in the form of hash
|
|
288
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
289
|
+
# @param [Object] value Any valid value
|
|
290
|
+
# @return [Hash] Returns the value in the form of hash
|
|
291
|
+
def _to_hash(value)
|
|
292
|
+
if value.is_a?(Array)
|
|
293
|
+
value.compact.map { |v| _to_hash(v) }
|
|
294
|
+
elsif value.is_a?(Hash)
|
|
295
|
+
{}.tap do |hash|
|
|
296
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
297
|
+
end
|
|
298
|
+
elsif value.respond_to? :to_hash
|
|
299
|
+
value.to_hash
|
|
300
|
+
else
|
|
301
|
+
value
|
|
302
|
+
end
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
end
|
|
@@ -0,0 +1,222 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module AgentCatApi
|
|
17
|
+
class ServerInfoAcceptedResponse
|
|
18
|
+
attr_accessor :status
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'status' => :'status'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'status' => :'String'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AgentCatApi::ServerInfoAcceptedResponse` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AgentCatApi::ServerInfoAcceptedResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'status')
|
|
67
|
+
self.status = attributes[:'status']
|
|
68
|
+
else
|
|
69
|
+
self.status = 'accepted'
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
invalid_properties
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Check to see if the all the properties in the model are valid
|
|
82
|
+
# @return true if the model is valid
|
|
83
|
+
def valid?
|
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
status == o.status
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# @see the `==` method
|
|
97
|
+
# @param [Object] Object to be compared
|
|
98
|
+
def eql?(o)
|
|
99
|
+
self == o
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Calculates hash code according to all attributes.
|
|
103
|
+
# @return [Integer] Hash code
|
|
104
|
+
def hash
|
|
105
|
+
[status].hash
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Builds the object from hash
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
# @return [Object] Returns the model itself
|
|
111
|
+
def self.build_from_hash(attributes)
|
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
|
113
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
114
|
+
transformed_hash = {}
|
|
115
|
+
openapi_types.each_pair do |key, type|
|
|
116
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
117
|
+
transformed_hash["#{key}"] = nil
|
|
118
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
119
|
+
# check to ensure the input is an array given that the attribute
|
|
120
|
+
# is documented as an array but the input is not
|
|
121
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
122
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
123
|
+
end
|
|
124
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
125
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
new(transformed_hash)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Deserializes the data based on type
|
|
132
|
+
# @param string type Data type
|
|
133
|
+
# @param string value Value to be deserialized
|
|
134
|
+
# @return [Object] Deserialized data
|
|
135
|
+
def self._deserialize(type, value)
|
|
136
|
+
case type.to_sym
|
|
137
|
+
when :Time
|
|
138
|
+
Time.parse(value)
|
|
139
|
+
when :Date
|
|
140
|
+
Date.parse(value)
|
|
141
|
+
when :String
|
|
142
|
+
value.to_s
|
|
143
|
+
when :Integer
|
|
144
|
+
value.to_i
|
|
145
|
+
when :Float
|
|
146
|
+
value.to_f
|
|
147
|
+
when :Boolean
|
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
149
|
+
true
|
|
150
|
+
else
|
|
151
|
+
false
|
|
152
|
+
end
|
|
153
|
+
when :Object
|
|
154
|
+
# generic object (usually a Hash), return directly
|
|
155
|
+
value
|
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
|
162
|
+
{}.tap do |hash|
|
|
163
|
+
value.each do |k, v|
|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
else # model
|
|
168
|
+
# models (e.g. Pet) or oneOf
|
|
169
|
+
klass = AgentCatApi.const_get(type)
|
|
170
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the string representation of the object
|
|
175
|
+
# @return [String] String presentation of the object
|
|
176
|
+
def to_s
|
|
177
|
+
to_hash.to_s
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
181
|
+
# @return [Hash] Returns the object in the form of hash
|
|
182
|
+
def to_body
|
|
183
|
+
to_hash
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Returns the object in the form of hash
|
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
|
188
|
+
def to_hash
|
|
189
|
+
hash = {}
|
|
190
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
191
|
+
value = self.send(attr)
|
|
192
|
+
if value.nil?
|
|
193
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
194
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
hash[param] = _to_hash(value)
|
|
198
|
+
end
|
|
199
|
+
hash
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Outputs non-array value in the form of hash
|
|
203
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
204
|
+
# @param [Object] value Any valid value
|
|
205
|
+
# @return [Hash] Returns the value in the form of hash
|
|
206
|
+
def _to_hash(value)
|
|
207
|
+
if value.is_a?(Array)
|
|
208
|
+
value.compact.map { |v| _to_hash(v) }
|
|
209
|
+
elsif value.is_a?(Hash)
|
|
210
|
+
{}.tap do |hash|
|
|
211
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
212
|
+
end
|
|
213
|
+
elsif value.respond_to? :to_hash
|
|
214
|
+
value.to_hash
|
|
215
|
+
else
|
|
216
|
+
value
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
end
|
data/lib/agentcat-api/version.rb
CHANGED
data/lib/agentcat-api.rb
CHANGED
|
@@ -22,7 +22,9 @@ require 'agentcat-api/models/email_channel_verify_response'
|
|
|
22
22
|
require 'agentcat-api/models/error'
|
|
23
23
|
require 'agentcat-api/models/event_accepted_response'
|
|
24
24
|
require 'agentcat-api/models/publish_event_request'
|
|
25
|
+
require 'agentcat-api/models/publish_server_info_request'
|
|
25
26
|
require 'agentcat-api/models/query_timeout'
|
|
27
|
+
require 'agentcat-api/models/server_info_accepted_response'
|
|
26
28
|
require 'agentcat-api/models/unsubscribe_request_request'
|
|
27
29
|
require 'agentcat-api/models/validation_error_value'
|
|
28
30
|
|
|
@@ -30,6 +32,7 @@ require 'agentcat-api/models/validation_error_value'
|
|
|
30
32
|
require 'agentcat-api/api/alerts_api'
|
|
31
33
|
require 'agentcat-api/api/events_api'
|
|
32
34
|
require 'agentcat-api/api/notifications_api'
|
|
35
|
+
require 'agentcat-api/api/server_info_api'
|
|
33
36
|
|
|
34
37
|
module AgentCatApi
|
|
35
38
|
class << self
|
|
@@ -0,0 +1,47 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for AgentCatApi::ServerInfoApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'ServerInfoApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = AgentCatApi::ServerInfoApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of ServerInfoApi' do
|
|
30
|
+
it 'should create an instance of ServerInfoApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(AgentCatApi::ServerInfoApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for publish_server_info
|
|
36
|
+
# Publish MCP server info
|
|
37
|
+
# Tell AgentCat what an MCP server offers to agents: its name, version, title, instructions and its lists of tools, resources, resource templates and prompts. Send it when the server starts and then once an hour. The body can hold 1,000,000 bytes at most. AgentCat counts each non-ASCII character as 6 bytes, and an emoji as 12 bytes. AgentCat keeps one row per server name per day and drops repeats. Returns immediately with 202 Accepted.
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [PublishServerInfoRequest] :publish_server_info_request
|
|
40
|
+
# @return [ServerInfoAcceptedResponse]
|
|
41
|
+
describe 'publish_server_info test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
end
|
|
@@ -60,7 +60,7 @@ describe AgentCatApi::PublishEventRequest do
|
|
|
60
60
|
describe 'test attribute "event_type"' do
|
|
61
61
|
it 'should work' do
|
|
62
62
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["mcp:ping", "mcp:initialize", "mcp:completion/complete", "mcp:logging/setLevel", "mcp:prompts/get", "mcp:prompts/list", "mcp:resources/list", "mcp:resources/templates/list", "mcp:resources/read", "mcp:resources/subscribe", "mcp:resources/unsubscribe", "mcp:tools/call", "mcp:tools/list", "mcp:tasks/get", "mcp:tasks/result", "mcp:tasks/list", "mcp:tasks/cancel", "agentcat:identify"])
|
|
63
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["mcp:ping", "mcp:initialize", "mcp:completion/complete", "mcp:logging/setLevel", "mcp:prompts/get", "mcp:prompts/list", "mcp:resources/list", "mcp:resources/templates/list", "mcp:resources/read", "mcp:resources/subscribe", "mcp:resources/unsubscribe", "mcp:tools/call", "mcp:tools/list", "mcp:tasks/get", "mcp:tasks/result", "mcp:tasks/list", "mcp:tasks/cancel", "agentcat:identify", "agentcat:custom"])
|
|
64
64
|
# validator.allowable_values.each do |value|
|
|
65
65
|
# expect { instance.event_type = value }.not_to raise_error
|
|
66
66
|
# end
|
|
@@ -0,0 +1,66 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for AgentCatApi::PublishServerInfoRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe AgentCatApi::PublishServerInfoRequest do
|
|
21
|
+
let(:instance) { AgentCatApi::PublishServerInfoRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of PublishServerInfoRequest' do
|
|
24
|
+
it 'should create an instance of PublishServerInfoRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(AgentCatApi::PublishServerInfoRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "project_id"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "server_name"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "server_version"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "server_title"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe 'test attribute "instructions"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
describe 'test attribute "features"' do
|
|
61
|
+
it 'should work' do
|
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for AgentCatApi::ServerInfoAcceptedResponse
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe AgentCatApi::ServerInfoAcceptedResponse do
|
|
21
|
+
let(:instance) { AgentCatApi::ServerInfoAcceptedResponse.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ServerInfoAcceptedResponse' do
|
|
24
|
+
it 'should create an instance of ServerInfoAcceptedResponse' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(AgentCatApi::ServerInfoAcceptedResponse)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "status"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: agentcat-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- AgentCat
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: faraday
|
|
@@ -98,13 +97,17 @@ files:
|
|
|
98
97
|
- docs/EventsApi.md
|
|
99
98
|
- docs/NotificationsApi.md
|
|
100
99
|
- docs/PublishEventRequest.md
|
|
100
|
+
- docs/PublishServerInfoRequest.md
|
|
101
101
|
- docs/QueryTimeout.md
|
|
102
|
+
- docs/ServerInfoAcceptedResponse.md
|
|
103
|
+
- docs/ServerInfoApi.md
|
|
102
104
|
- docs/UnsubscribeRequestRequest.md
|
|
103
105
|
- docs/ValidationErrorValue.md
|
|
104
106
|
- lib/agentcat-api.rb
|
|
105
107
|
- lib/agentcat-api/api/alerts_api.rb
|
|
106
108
|
- lib/agentcat-api/api/events_api.rb
|
|
107
109
|
- lib/agentcat-api/api/notifications_api.rb
|
|
110
|
+
- lib/agentcat-api/api/server_info_api.rb
|
|
108
111
|
- lib/agentcat-api/api_client.rb
|
|
109
112
|
- lib/agentcat-api/api_error.rb
|
|
110
113
|
- lib/agentcat-api/configuration.rb
|
|
@@ -113,19 +116,24 @@ files:
|
|
|
113
116
|
- lib/agentcat-api/models/error.rb
|
|
114
117
|
- lib/agentcat-api/models/event_accepted_response.rb
|
|
115
118
|
- lib/agentcat-api/models/publish_event_request.rb
|
|
119
|
+
- lib/agentcat-api/models/publish_server_info_request.rb
|
|
116
120
|
- lib/agentcat-api/models/query_timeout.rb
|
|
121
|
+
- lib/agentcat-api/models/server_info_accepted_response.rb
|
|
117
122
|
- lib/agentcat-api/models/unsubscribe_request_request.rb
|
|
118
123
|
- lib/agentcat-api/models/validation_error_value.rb
|
|
119
124
|
- lib/agentcat-api/version.rb
|
|
120
125
|
- spec/api/alerts_api_spec.rb
|
|
121
126
|
- spec/api/events_api_spec.rb
|
|
122
127
|
- spec/api/notifications_api_spec.rb
|
|
128
|
+
- spec/api/server_info_api_spec.rb
|
|
123
129
|
- spec/models/email_channel_verify_request_spec.rb
|
|
124
130
|
- spec/models/email_channel_verify_response_spec.rb
|
|
125
131
|
- spec/models/error_spec.rb
|
|
126
132
|
- spec/models/event_accepted_response_spec.rb
|
|
127
133
|
- spec/models/publish_event_request_spec.rb
|
|
134
|
+
- spec/models/publish_server_info_request_spec.rb
|
|
128
135
|
- spec/models/query_timeout_spec.rb
|
|
136
|
+
- spec/models/server_info_accepted_response_spec.rb
|
|
129
137
|
- spec/models/unsubscribe_request_request_spec.rb
|
|
130
138
|
- spec/models/validation_error_value_spec.rb
|
|
131
139
|
- spec/spec_helper.rb
|
|
@@ -133,7 +141,6 @@ homepage: https://agentcat.com
|
|
|
133
141
|
licenses:
|
|
134
142
|
- MIT
|
|
135
143
|
metadata: {}
|
|
136
|
-
post_install_message:
|
|
137
144
|
rdoc_options: []
|
|
138
145
|
require_paths:
|
|
139
146
|
- lib
|
|
@@ -148,20 +155,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
148
155
|
- !ruby/object:Gem::Version
|
|
149
156
|
version: '0'
|
|
150
157
|
requirements: []
|
|
151
|
-
rubygems_version: 3.
|
|
152
|
-
signing_key:
|
|
158
|
+
rubygems_version: 3.6.7
|
|
153
159
|
specification_version: 4
|
|
154
160
|
summary: AgentCat API - Ruby SDK
|
|
155
161
|
test_files:
|
|
156
162
|
- spec/api/alerts_api_spec.rb
|
|
157
|
-
- spec/api/notifications_api_spec.rb
|
|
158
163
|
- spec/api/events_api_spec.rb
|
|
164
|
+
- spec/api/notifications_api_spec.rb
|
|
165
|
+
- spec/api/server_info_api_spec.rb
|
|
166
|
+
- spec/models/email_channel_verify_request_spec.rb
|
|
167
|
+
- spec/models/email_channel_verify_response_spec.rb
|
|
168
|
+
- spec/models/error_spec.rb
|
|
169
|
+
- spec/models/event_accepted_response_spec.rb
|
|
159
170
|
- spec/models/publish_event_request_spec.rb
|
|
171
|
+
- spec/models/publish_server_info_request_spec.rb
|
|
160
172
|
- spec/models/query_timeout_spec.rb
|
|
161
|
-
- spec/models/
|
|
162
|
-
- spec/models/validation_error_value_spec.rb
|
|
173
|
+
- spec/models/server_info_accepted_response_spec.rb
|
|
163
174
|
- spec/models/unsubscribe_request_request_spec.rb
|
|
164
|
-
- spec/models/
|
|
165
|
-
- spec/models/email_channel_verify_request_spec.rb
|
|
166
|
-
- spec/models/event_accepted_response_spec.rb
|
|
175
|
+
- spec/models/validation_error_value_spec.rb
|
|
167
176
|
- spec/spec_helper.rb
|