Skip to content

Commit

Permalink
Update OpenAPI Specification (#43)
Browse files Browse the repository at this point in the history
* Update OpenAPI Specification (composio.json)

* Regenerate SDKs

---------

Co-authored-by: konfig-bot[bot] <121480725+konfig-bot[bot]@users.noreply.github.com>
Co-authored-by: konfig-publisher <[email protected]>
  • Loading branch information
konfig-bot[bot] and konfig-publisher authored Nov 13, 2024
1 parent 160f43d commit 8ddf6f0
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .konfig/changesets/eight-clouds-like.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
ruby: patch
---

Regenerate SDKs
4 changes: 2 additions & 2 deletions STATISTICS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

| SDK Name | Lines of Code |
| -------- | ------------- |
| ruby | 59953 |
| **Total** | 59953 |
| ruby | 59995 |
| **Total** | 59995 |
6 changes: 6 additions & 0 deletions composio.json
Original file line number Diff line number Diff line change
Expand Up @@ -1914,6 +1914,12 @@
"properties": {
"text": {
"type": "string"
},
"customDescription": {
"type": "string"
},
"systemPrompt": {
"type": "string"
}
},
"type": "object",
Expand Down
6 changes: 6 additions & 0 deletions openapi-fixed.json
Original file line number Diff line number Diff line change
Expand Up @@ -4058,6 +4058,12 @@
"properties": {
"text": {
"type": "string"
},
"customDescription": {
"type": "string"
},
"systemPrompt": {
"type": "string"
}
},
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion ruby/.konfig/generate-id.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a7941cdc-1e92-4184-b914-7bf910cfd1e3
a948fac5-6993-491f-9a32-c1d0d78bb643
4 changes: 4 additions & 0 deletions ruby/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ Get the inputs for an action with NLA
result = composio.actions.get_action_inputs(
text: "string_example",
action_id: "'+j>6",
custom_description: "string_example",
system_prompt: "string_example",
)
p result
```
Expand All @@ -330,6 +332,8 @@ p result

##### text: `String`<a id="text-string"></a>
##### action_id: `String`<a id="action_id-string"></a>
##### customDescription: `String`<a id="customdescription-string"></a>
##### systemPrompt: `String`<a id="systemprompt-string"></a>
#### 🌐 Endpoint<a id="🌐-endpoint"></a>

`/api/v2/actions/{actionId}/execute/get.inputs` `POST`
Expand Down
12 changes: 10 additions & 2 deletions ruby/lib/composio/api/actions_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,15 @@ def get_action_by_id_with_http_info(action_id:, extra: {})
#
# @param text [String]
# @param action_id [String]
# @param custom_description [String]
# @param system_prompt [String]
# @param body [ActionGetNLAInputsReqDTO]
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
def get_action_inputs(text:, action_id:, extra: {})
def get_action_inputs(text:, action_id:, custom_description: SENTINEL, system_prompt: SENTINEL, extra: {})
_body = {}
_body[:text] = text if text != SENTINEL
_body[:customDescription] = custom_description if custom_description != SENTINEL
_body[:systemPrompt] = system_prompt if system_prompt != SENTINEL
extra[:action_get_nla_inputs_req_dto] = _body if !_body.empty?
api_response = get_action_inputs_with_http_info_impl(action_id, extra)
api_response.data
Expand All @@ -366,11 +370,15 @@ def get_action_inputs(text:, action_id:, extra: {})
#
# @param text [String]
# @param action_id [String]
# @param custom_description [String]
# @param system_prompt [String]
# @param body [ActionGetNLAInputsReqDTO]
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
def get_action_inputs_with_http_info(text:, action_id:, extra: {})
def get_action_inputs_with_http_info(text:, action_id:, custom_description: SENTINEL, system_prompt: SENTINEL, extra: {})
_body = {}
_body[:text] = text if text != SENTINEL
_body[:customDescription] = custom_description if custom_description != SENTINEL
_body[:systemPrompt] = system_prompt if system_prompt != SENTINEL
extra[:action_get_nla_inputs_req_dto] = _body if !_body.empty?
get_action_inputs_with_http_info_impl(action_id, extra)
end
Expand Down
26 changes: 22 additions & 4 deletions ruby/lib/composio/models/action_get_nla_inputs_req_dto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ module Composio
class ActionGetNLAInputsReqDTO
attr_accessor :text

attr_accessor :custom_description

attr_accessor :system_prompt

# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'text' => :'text'
:'text' => :'text',
:'custom_description' => :'customDescription',
:'system_prompt' => :'systemPrompt'
}
end

Expand All @@ -28,7 +34,9 @@ def self.acceptable_attributes
# Attribute type mapping.
def self.openapi_types
{
:'text' => :'String'
:'text' => :'String',
:'custom_description' => :'String',
:'system_prompt' => :'String'
}
end

Expand Down Expand Up @@ -56,6 +64,14 @@ def initialize(attributes = {})
if attributes.key?(:'text')
self.text = attributes[:'text']
end

if attributes.key?(:'custom_description')
self.custom_description = attributes[:'custom_description']
end

if attributes.key?(:'system_prompt')
self.system_prompt = attributes[:'system_prompt']
end
end

# Show invalid properties with the reasons. Usually used together with valid?
Expand All @@ -81,7 +97,9 @@ def valid?
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
text == o.text
text == o.text &&
custom_description == o.custom_description &&
system_prompt == o.system_prompt
end

# @see the `==` method
Expand All @@ -93,7 +111,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[text].hash
[text, custom_description, system_prompt].hash
end

# Builds the object from hash
Expand Down
12 changes: 12 additions & 0 deletions ruby/spec/models/action_get_nla_inputs_req_dto_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,16 @@
end
end

describe 'test attribute "custom_description"' do
it 'should work' do
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
end
end

describe 'test attribute "system_prompt"' do
it 'should work' do
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
end
end

end

0 comments on commit 8ddf6f0

Please sign in to comment.