vellum_ai 1.5.4 → 1.5.5

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.
@@ -3,6 +3,10 @@ require_relative "../../requests"
3
3
  require_relative "../types/components_schemas_composio_tool_definition"
4
4
  require_relative "../types/components_schemas_composio_execute_tool_request"
5
5
  require_relative "../types/components_schemas_composio_execute_tool_response"
6
+ require_relative "../types/paginated_slim_integration_read_list"
7
+ require_relative "../types/integration_read"
8
+ require "async"
9
+ require "async"
6
10
  require "async"
7
11
  require "async"
8
12
  require_relative "../../requests"
@@ -18,8 +22,8 @@ module Vellum
18
22
  def initialize(request_client:)
19
23
  @request_client = request_client
20
24
  end
21
- # @param integration [String] The integration name
22
- # @param provider [String] The integration provider name
25
+ # @param integration_name [String] The integration name
26
+ # @param integration_provider [String] The integration provider name
23
27
  # @param tool_name [String] The tool's unique name, as specified by the integration provider
24
28
  # @param request_options [Vellum::RequestOptions]
25
29
  # @return [Vellum::COMPONENTS_SCHEMAS_COMPOSIO_TOOL_DEFINITION]
@@ -30,11 +34,11 @@ module Vellum
30
34
  # api_key: "YOUR_API_KEY"
31
35
  # )
32
36
  # api.integrations.retrieve_integration_tool_definition(
33
- # integration: "integration",
34
- # provider: "provider",
37
+ # integration_name: "integration_name",
38
+ # integration_provider: "integration_provider",
35
39
  # tool_name: "tool_name"
36
40
  # )
37
- def retrieve_integration_tool_definition(integration:, provider:, tool_name:, request_options: nil)
41
+ def retrieve_integration_tool_definition(integration_name:, integration_provider:, tool_name:, request_options: nil)
38
42
  response = @request_client.conn.get do | req |
39
43
  unless request_options&.timeout_in_seconds.nil?
40
44
  req.options.timeout = request_options.timeout_in_seconds
@@ -54,12 +58,12 @@ module Vellum
54
58
  unless request_options.nil? || request_options&.additional_body_parameters.nil?
55
59
  req.body = { **(request_options&.additional_body_parameters || {}) }.compact
56
60
  end
57
- req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/integrations/v1/providers/#{integration}/integrations/#{provider}/tools/#{tool_name}"
61
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/integrations/v1/providers/#{integration_name}/integrations/#{integration_provider}/tools/#{tool_name}"
58
62
  end
59
63
  Vellum::ComposioToolDefinition.from_json(json_object: response.body)
60
64
  end
61
- # @param integration [String] The integration name
62
- # @param provider [String] The integration provider name
65
+ # @param integration_name [String] The integration name
66
+ # @param integration_provider [String] The integration provider name
63
67
  # @param tool_name [String] The tool's unique name, as specified by the integration provider
64
68
  # @param request [Hash] Request of type Vellum::COMPONENTS_SCHEMAS_COMPOSIO_EXECUTE_TOOL_REQUEST, as a Hash
65
69
  # * :provider (String)
@@ -73,12 +77,12 @@ end
73
77
  # api_key: "YOUR_API_KEY"
74
78
  # )
75
79
  # api.integrations.execute_integration_tool(
76
- # integration: "integration",
77
- # provider: "provider",
80
+ # integration_name: "integration_name",
81
+ # integration_provider: "integration_provider",
78
82
  # tool_name: "tool_name",
79
83
  # request: { provider: "COMPOSIO", arguments: { "arguments": {"key":"value"} } }
80
84
  # )
81
- def execute_integration_tool(integration:, provider:, tool_name:, request:, request_options: nil)
85
+ def execute_integration_tool(integration_name:, integration_provider:, tool_name:, request:, request_options: nil)
82
86
  response = @request_client.conn.post do | req |
83
87
  unless request_options&.timeout_in_seconds.nil?
84
88
  req.options.timeout = request_options.timeout_in_seconds
@@ -96,10 +100,84 @@ end
96
100
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
97
101
  end
98
102
  req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
99
- req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/integrations/v1/providers/#{integration}/integrations/#{provider}/tools/#{tool_name}/execute"
103
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/integrations/v1/providers/#{integration_name}/integrations/#{integration_provider}/tools/#{tool_name}/execute"
100
104
  end
101
105
  Vellum::ComposioExecuteToolResponse.from_json(json_object: response.body)
102
106
  end
107
+ # List all integrations
108
+ #
109
+ # @param integration_provider [String] * `COMPOSIO` - Composio
110
+ # @param limit [Integer] Number of results to return per page.
111
+ # @param offset [Integer] The initial index from which to return the results.
112
+ # @param ordering [String] Which field to use when ordering the results.
113
+ # @param search [String] A search term.
114
+ # @param request_options [Vellum::RequestOptions]
115
+ # @return [Vellum::PaginatedSlimIntegrationReadList]
116
+ # @example
117
+ # api = Vellum::Client.new(
118
+ # base_url: "https://api.example.com",
119
+ # environment: Vellum::Environment::PRODUCTION,
120
+ # api_key: "YOUR_API_KEY"
121
+ # )
122
+ # api.integrations.list
123
+ def list(integration_provider: nil, limit: nil, offset: nil, ordering: nil, search: nil, request_options: nil)
124
+ response = @request_client.conn.get do | req |
125
+ unless request_options&.timeout_in_seconds.nil?
126
+ req.options.timeout = request_options.timeout_in_seconds
127
+ end
128
+ unless request_options&.api_key.nil?
129
+ req.headers["X-API-KEY"] = request_options.api_key
130
+ end
131
+ unless request_options&.api_version.nil?
132
+ req.headers["X-API-Version"] = request_options.api_version
133
+ else
134
+ req.headers["X-API-Version"] = "2025-07-30"
135
+ end
136
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
137
+ req.params = { **(request_options&.additional_query_parameters || {}), "integration_provider": integration_provider, "limit": limit, "offset": offset, "ordering": ordering, "search": search }.compact
138
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
139
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
140
+ end
141
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/integrations"
142
+ end
143
+ Vellum::PaginatedSlimIntegrationReadList.from_json(json_object: response.body)
144
+ end
145
+ # Retrieve an integration
146
+ #
147
+ # @param id [String] A UUID string identifying this integration.
148
+ # @param request_options [Vellum::RequestOptions]
149
+ # @return [Vellum::IntegrationRead]
150
+ # @example
151
+ # api = Vellum::Client.new(
152
+ # base_url: "https://api.example.com",
153
+ # environment: Vellum::Environment::PRODUCTION,
154
+ # api_key: "YOUR_API_KEY"
155
+ # )
156
+ # api.integrations.retrieve(id: "id")
157
+ def retrieve(id:, request_options: nil)
158
+ response = @request_client.conn.get do | req |
159
+ unless request_options&.timeout_in_seconds.nil?
160
+ req.options.timeout = request_options.timeout_in_seconds
161
+ end
162
+ unless request_options&.api_key.nil?
163
+ req.headers["X-API-KEY"] = request_options.api_key
164
+ end
165
+ unless request_options&.api_version.nil?
166
+ req.headers["X-API-Version"] = request_options.api_version
167
+ else
168
+ req.headers["X-API-Version"] = "2025-07-30"
169
+ end
170
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
171
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
172
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
173
+ end
174
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
175
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
176
+ end
177
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/integrations/#{id}"
178
+ end
179
+ Vellum::IntegrationRead.from_json(json_object: response.body)
180
+ end
103
181
  end
104
182
  class AsyncIntegrationsClient
105
183
  # @return [Vellum::AsyncRequestClient]
@@ -111,8 +189,8 @@ end
111
189
  def initialize(request_client:)
112
190
  @request_client = request_client
113
191
  end
114
- # @param integration [String] The integration name
115
- # @param provider [String] The integration provider name
192
+ # @param integration_name [String] The integration name
193
+ # @param integration_provider [String] The integration provider name
116
194
  # @param tool_name [String] The tool's unique name, as specified by the integration provider
117
195
  # @param request_options [Vellum::RequestOptions]
118
196
  # @return [Vellum::COMPONENTS_SCHEMAS_COMPOSIO_TOOL_DEFINITION]
@@ -123,11 +201,11 @@ end
123
201
  # api_key: "YOUR_API_KEY"
124
202
  # )
125
203
  # api.integrations.retrieve_integration_tool_definition(
126
- # integration: "integration",
127
- # provider: "provider",
204
+ # integration_name: "integration_name",
205
+ # integration_provider: "integration_provider",
128
206
  # tool_name: "tool_name"
129
207
  # )
130
- def retrieve_integration_tool_definition(integration:, provider:, tool_name:, request_options: nil)
208
+ def retrieve_integration_tool_definition(integration_name:, integration_provider:, tool_name:, request_options: nil)
131
209
  Async do
132
210
  response = @request_client.conn.get do | req |
133
211
  unless request_options&.timeout_in_seconds.nil?
@@ -148,13 +226,13 @@ end
148
226
  unless request_options.nil? || request_options&.additional_body_parameters.nil?
149
227
  req.body = { **(request_options&.additional_body_parameters || {}) }.compact
150
228
  end
151
- req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/integrations/v1/providers/#{integration}/integrations/#{provider}/tools/#{tool_name}"
229
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/integrations/v1/providers/#{integration_name}/integrations/#{integration_provider}/tools/#{tool_name}"
152
230
  end
153
231
  Vellum::ComposioToolDefinition.from_json(json_object: response.body)
154
232
  end
155
233
  end
156
- # @param integration [String] The integration name
157
- # @param provider [String] The integration provider name
234
+ # @param integration_name [String] The integration name
235
+ # @param integration_provider [String] The integration provider name
158
236
  # @param tool_name [String] The tool's unique name, as specified by the integration provider
159
237
  # @param request [Hash] Request of type Vellum::COMPONENTS_SCHEMAS_COMPOSIO_EXECUTE_TOOL_REQUEST, as a Hash
160
238
  # * :provider (String)
@@ -168,12 +246,12 @@ end
168
246
  # api_key: "YOUR_API_KEY"
169
247
  # )
170
248
  # api.integrations.execute_integration_tool(
171
- # integration: "integration",
172
- # provider: "provider",
249
+ # integration_name: "integration_name",
250
+ # integration_provider: "integration_provider",
173
251
  # tool_name: "tool_name",
174
252
  # request: { provider: "COMPOSIO", arguments: { "arguments": {"key":"value"} } }
175
253
  # )
176
- def execute_integration_tool(integration:, provider:, tool_name:, request:, request_options: nil)
254
+ def execute_integration_tool(integration_name:, integration_provider:, tool_name:, request:, request_options: nil)
177
255
  Async do
178
256
  response = @request_client.conn.post do | req |
179
257
  unless request_options&.timeout_in_seconds.nil?
@@ -192,10 +270,88 @@ end
192
270
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
193
271
  end
194
272
  req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
195
- req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/integrations/v1/providers/#{integration}/integrations/#{provider}/tools/#{tool_name}/execute"
273
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/integrations/v1/providers/#{integration_name}/integrations/#{integration_provider}/tools/#{tool_name}/execute"
196
274
  end
197
275
  Vellum::ComposioExecuteToolResponse.from_json(json_object: response.body)
198
276
  end
199
277
  end
278
+ # List all integrations
279
+ #
280
+ # @param integration_provider [String] * `COMPOSIO` - Composio
281
+ # @param limit [Integer] Number of results to return per page.
282
+ # @param offset [Integer] The initial index from which to return the results.
283
+ # @param ordering [String] Which field to use when ordering the results.
284
+ # @param search [String] A search term.
285
+ # @param request_options [Vellum::RequestOptions]
286
+ # @return [Vellum::PaginatedSlimIntegrationReadList]
287
+ # @example
288
+ # api = Vellum::Client.new(
289
+ # base_url: "https://api.example.com",
290
+ # environment: Vellum::Environment::PRODUCTION,
291
+ # api_key: "YOUR_API_KEY"
292
+ # )
293
+ # api.integrations.list
294
+ def list(integration_provider: nil, limit: nil, offset: nil, ordering: nil, search: nil, request_options: nil)
295
+ Async do
296
+ response = @request_client.conn.get do | req |
297
+ unless request_options&.timeout_in_seconds.nil?
298
+ req.options.timeout = request_options.timeout_in_seconds
299
+ end
300
+ unless request_options&.api_key.nil?
301
+ req.headers["X-API-KEY"] = request_options.api_key
302
+ end
303
+ unless request_options&.api_version.nil?
304
+ req.headers["X-API-Version"] = request_options.api_version
305
+ else
306
+ req.headers["X-API-Version"] = "2025-07-30"
307
+ end
308
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
309
+ req.params = { **(request_options&.additional_query_parameters || {}), "integration_provider": integration_provider, "limit": limit, "offset": offset, "ordering": ordering, "search": search }.compact
310
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
311
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
312
+ end
313
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/integrations"
314
+ end
315
+ Vellum::PaginatedSlimIntegrationReadList.from_json(json_object: response.body)
316
+ end
317
+ end
318
+ # Retrieve an integration
319
+ #
320
+ # @param id [String] A UUID string identifying this integration.
321
+ # @param request_options [Vellum::RequestOptions]
322
+ # @return [Vellum::IntegrationRead]
323
+ # @example
324
+ # api = Vellum::Client.new(
325
+ # base_url: "https://api.example.com",
326
+ # environment: Vellum::Environment::PRODUCTION,
327
+ # api_key: "YOUR_API_KEY"
328
+ # )
329
+ # api.integrations.retrieve(id: "id")
330
+ def retrieve(id:, request_options: nil)
331
+ Async do
332
+ response = @request_client.conn.get do | req |
333
+ unless request_options&.timeout_in_seconds.nil?
334
+ req.options.timeout = request_options.timeout_in_seconds
335
+ end
336
+ unless request_options&.api_key.nil?
337
+ req.headers["X-API-KEY"] = request_options.api_key
338
+ end
339
+ unless request_options&.api_version.nil?
340
+ req.headers["X-API-Version"] = request_options.api_version
341
+ else
342
+ req.headers["X-API-Version"] = "2025-07-30"
343
+ end
344
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
345
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
346
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
347
+ end
348
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
349
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
350
+ end
351
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/integrations/#{id}"
352
+ end
353
+ Vellum::IntegrationRead.from_json(json_object: response.body)
354
+ end
355
+ end
200
356
  end
201
357
  end
@@ -93,12 +93,11 @@ end
93
93
  end
94
94
  # @param id [String] A UUID string identifying this test suite run.
95
95
  # @param expand [String] The response fields to expand for more information.
96
- # - 'results.metric_results.metric_label' expands the metric label for each metric
97
- # result.
98
- # - 'results.metric_results.metric_definition' expands the metric definition for
96
+ # - 'metric_results.metric_label' expands the metric label for each metric result.
97
+ # - 'metric_results.metric_definition' expands the metric definition for each
98
+ # metric result.
99
+ # - 'metric_results.metric_definition.name' expands the metric definition name for
99
100
  # each metric result.
100
- # - 'results.metric_results.metric_definition.name' expands the metric definition
101
- # name for each metric result.
102
101
  # @param limit [Integer] Number of results to return per page.
103
102
  # @param offset [Integer] The initial index from which to return the results.
104
103
  # @param request_options [Vellum::RequestOptions]
@@ -221,12 +220,11 @@ end
221
220
  end
222
221
  # @param id [String] A UUID string identifying this test suite run.
223
222
  # @param expand [String] The response fields to expand for more information.
224
- # - 'results.metric_results.metric_label' expands the metric label for each metric
225
- # result.
226
- # - 'results.metric_results.metric_definition' expands the metric definition for
223
+ # - 'metric_results.metric_label' expands the metric label for each metric result.
224
+ # - 'metric_results.metric_definition' expands the metric definition for each
225
+ # metric result.
226
+ # - 'metric_results.metric_definition.name' expands the metric definition name for
227
227
  # each metric result.
228
- # - 'results.metric_results.metric_definition.name' expands the metric definition
229
- # name for each metric result.
230
228
  # @param limit [Integer] Number of results to return per page.
231
229
  # @param offset [Integer] The initial index from which to return the results.
232
230
  # @param request_options [Vellum::RequestOptions]
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+ require_relative "composio_integration_exec_config"
3
+
4
+ module Vellum
5
+ COMPONENTS_SCHEMAS_COMPOSIO_INTEGRATION_EXEC_CONFIG = Vellum::ComposioIntegrationExecConfig
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+ require_relative "slim_composio_tool_definition"
3
+
4
+ module Vellum
5
+ COMPONENTS_SCHEMAS_SLIM_COMPOSIO_TOOL_DEFINITION = Vellum::SlimComposioToolDefinition
6
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+ require "ostruct"
3
+ require "json"
4
+
5
+ module Vellum
6
+ class ComposioIntegrationExecConfig
7
+ # @return [String]
8
+ attr_reader :type
9
+ # @return [String]
10
+ attr_reader :slug
11
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
12
+ attr_reader :additional_properties
13
+ # @return [Object]
14
+ attr_reader :_field_set
15
+ protected :_field_set
16
+
17
+ OMIT = Object.new
18
+
19
+ # @param type [String]
20
+ # @param slug [String]
21
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
22
+ # @return [Vellum::ComposioIntegrationExecConfig]
23
+ def initialize(type:, slug:, additional_properties: nil)
24
+ @type = type
25
+ @slug = slug
26
+ @additional_properties = additional_properties
27
+ @_field_set = { "type": type, "slug": slug }
28
+ end
29
+ # Deserialize a JSON object to an instance of ComposioIntegrationExecConfig
30
+ #
31
+ # @param json_object [String]
32
+ # @return [Vellum::ComposioIntegrationExecConfig]
33
+ def self.from_json(json_object:)
34
+ struct = JSON.parse(json_object, object_class: OpenStruct)
35
+ parsed_json = JSON.parse(json_object)
36
+ type = parsed_json["type"]
37
+ slug = parsed_json["slug"]
38
+ new(
39
+ type: type,
40
+ slug: slug,
41
+ additional_properties: struct
42
+ )
43
+ end
44
+ # Serialize an instance of ComposioIntegrationExecConfig to a JSON object
45
+ #
46
+ # @return [String]
47
+ def to_json
48
+ @_field_set&.to_json
49
+ end
50
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
51
+ # hash and check each fields type against the current object's property
52
+ # definitions.
53
+ #
54
+ # @param obj [Object]
55
+ # @return [Void]
56
+ def self.validate_raw(obj:)
57
+ obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
58
+ obj.slug.is_a?(String) != false || raise("Passed value for field obj.slug is not the expected type, validation failed.")
59
+ end
60
+ end
61
+ end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ require_relative "tool_definition_integration"
2
3
  require "ostruct"
3
4
  require "json"
4
5
 
@@ -7,12 +8,16 @@ module Vellum
7
8
  class ComposioToolDefinition
8
9
  # @return [String]
9
10
  attr_reader :provider
11
+ # @return [Vellum::ToolDefinitionIntegration]
12
+ attr_reader :integration
10
13
  # @return [String]
11
14
  attr_reader :name
12
15
  # @return [String]
13
16
  attr_reader :description
14
17
  # @return [Hash{String => Object}]
15
- attr_reader :parameters
18
+ attr_reader :input_parameters
19
+ # @return [Hash{String => Object}]
20
+ attr_reader :output_parameters
16
21
  # @return [OpenStruct] Additional properties unmapped to the current class definition
17
22
  attr_reader :additional_properties
18
23
  # @return [Object]
@@ -22,18 +27,22 @@ module Vellum
22
27
  OMIT = Object.new
23
28
 
24
29
  # @param provider [String]
30
+ # @param integration [Vellum::ToolDefinitionIntegration]
25
31
  # @param name [String]
26
32
  # @param description [String]
27
- # @param parameters [Hash{String => Object}]
33
+ # @param input_parameters [Hash{String => Object}]
34
+ # @param output_parameters [Hash{String => Object}]
28
35
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
29
36
  # @return [Vellum::ComposioToolDefinition]
30
- def initialize(provider:, name:, description:, parameters:, additional_properties: nil)
37
+ def initialize(provider:, integration:, name:, description:, input_parameters:, output_parameters:, additional_properties: nil)
31
38
  @provider = provider
39
+ @integration = integration
32
40
  @name = name
33
41
  @description = description
34
- @parameters = parameters
42
+ @input_parameters = input_parameters
43
+ @output_parameters = output_parameters
35
44
  @additional_properties = additional_properties
36
- @_field_set = { "provider": provider, "name": name, "description": description, "parameters": parameters }
45
+ @_field_set = { "provider": provider, "integration": integration, "name": name, "description": description, "input_parameters": input_parameters, "output_parameters": output_parameters }
37
46
  end
38
47
  # Deserialize a JSON object to an instance of ComposioToolDefinition
39
48
  #
@@ -43,14 +52,23 @@ module Vellum
43
52
  struct = JSON.parse(json_object, object_class: OpenStruct)
44
53
  parsed_json = JSON.parse(json_object)
45
54
  provider = parsed_json["provider"]
55
+ unless parsed_json["integration"].nil?
56
+ integration = parsed_json["integration"].to_json
57
+ integration = Vellum::ToolDefinitionIntegration.from_json(json_object: integration)
58
+ else
59
+ integration = nil
60
+ end
46
61
  name = parsed_json["name"]
47
62
  description = parsed_json["description"]
48
- parameters = parsed_json["parameters"]
63
+ input_parameters = parsed_json["input_parameters"]
64
+ output_parameters = parsed_json["output_parameters"]
49
65
  new(
50
66
  provider: provider,
67
+ integration: integration,
51
68
  name: name,
52
69
  description: description,
53
- parameters: parameters,
70
+ input_parameters: input_parameters,
71
+ output_parameters: output_parameters,
54
72
  additional_properties: struct
55
73
  )
56
74
  end
@@ -68,9 +86,11 @@ module Vellum
68
86
  # @return [Void]
69
87
  def self.validate_raw(obj:)
70
88
  obj.provider.is_a?(String) != false || raise("Passed value for field obj.provider is not the expected type, validation failed.")
89
+ Vellum::ToolDefinitionIntegration.validate_raw(obj: obj.integration)
71
90
  obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
72
91
  obj.description.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
73
- obj.parameters.is_a?(Hash) != false || raise("Passed value for field obj.parameters is not the expected type, validation failed.")
92
+ obj.input_parameters.is_a?(Hash) != false || raise("Passed value for field obj.input_parameters is not the expected type, validation failed.")
93
+ obj.output_parameters.is_a?(Hash) != false || raise("Passed value for field obj.output_parameters is not the expected type, validation failed.")
74
94
  end
75
95
  end
76
96
  end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+ require "ostruct"
3
+ require "json"
4
+
5
+ module Vellum
6
+ class IntegrationAuthConfigIntegrationCredential
7
+ # @return [String]
8
+ attr_reader :id
9
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
10
+ attr_reader :additional_properties
11
+ # @return [Object]
12
+ attr_reader :_field_set
13
+ protected :_field_set
14
+
15
+ OMIT = Object.new
16
+
17
+ # @param id [String]
18
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
19
+ # @return [Vellum::IntegrationAuthConfigIntegrationCredential]
20
+ def initialize(id: OMIT, additional_properties: nil)
21
+ @id = id if id != OMIT
22
+ @additional_properties = additional_properties
23
+ @_field_set = { "id": id }.reject do | _k, v |
24
+ v == OMIT
25
+ end
26
+ end
27
+ # Deserialize a JSON object to an instance of
28
+ # IntegrationAuthConfigIntegrationCredential
29
+ #
30
+ # @param json_object [String]
31
+ # @return [Vellum::IntegrationAuthConfigIntegrationCredential]
32
+ def self.from_json(json_object:)
33
+ struct = JSON.parse(json_object, object_class: OpenStruct)
34
+ parsed_json = JSON.parse(json_object)
35
+ id = parsed_json["id"]
36
+ new(id: id, additional_properties: struct)
37
+ end
38
+ # Serialize an instance of IntegrationAuthConfigIntegrationCredential to a JSON
39
+ # object
40
+ #
41
+ # @return [String]
42
+ def to_json
43
+ @_field_set&.to_json
44
+ end
45
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
46
+ # hash and check each fields type against the current object's property
47
+ # definitions.
48
+ #
49
+ # @param obj [Object]
50
+ # @return [Void]
51
+ def self.validate_raw(obj:)
52
+ obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vellum
4
+ # * `ENVIRONMENT` - ENVIRONMENT
5
+ # * `USER` - USER
6
+ class IntegrationCredentialAccessType
7
+
8
+ ENVIRONMENT = "ENVIRONMENT"
9
+ USER = "USER"
10
+
11
+ end
12
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vellum
4
+ # * `SLACK` - Slack
5
+ # * `NOTION` - Notion
6
+ # * `GOOGLE` - Google
7
+ # * `CALENDLY` - Calendly
8
+ # * `HUBSPOT` - Hubspot
9
+ # * `LINEAR` - Linear
10
+ # * `GITHUB` - Github
11
+ # * `GOOGLE_SHEETS` - Google Sheets
12
+ # * `GOOGLE_CALENDAR` - Google Calendar
13
+ # * `GOOGLE_DRIVE` - Google Drive
14
+ # * `GMAIL` - Gmail
15
+ class IntegrationName
16
+
17
+ SLACK = "SLACK"
18
+ NOTION = "NOTION"
19
+ GOOGLE = "GOOGLE"
20
+ CALENDLY = "CALENDLY"
21
+ HUBSPOT = "HUBSPOT"
22
+ LINEAR = "LINEAR"
23
+ GITHUB = "GITHUB"
24
+ GOOGLE_SHEETS = "GOOGLE_SHEETS"
25
+ GOOGLE_CALENDAR = "GOOGLE_CALENDAR"
26
+ GOOGLE_DRIVE = "GOOGLE_DRIVE"
27
+ GMAIL = "GMAIL"
28
+
29
+ end
30
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vellum
4
+ INTEGRATION_PROVIDER = String
5
+ end