vellum_ai 1.9.7 → 1.9.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62f3d8d769081bc5dce68f44efa833a5492a977eeb66b03c54e8c04c2a0d4b65
4
- data.tar.gz: dc91c9a40c1ae16607308e4f4ab6a4f45ccc900c27b76cac433e5100cad013ac
3
+ metadata.gz: 64809a6c595bffb7c1cf0e9e28f127d3c491d5b7cc24fee4256dcc2be4be49f8
4
+ data.tar.gz: 17bdf50b54dc2f90f5d29ad2eef7e19f524f4c733c8f6461d125df7afd1fa5be
5
5
  SHA512:
6
- metadata.gz: 8144531326fc3d4183f4faccb45a85a8bfdd72446f5c7e95f7ea5eb090e8796f730d4c1cfbf616c43494a5d8a9c0e0dc256237b7e2f56aa49e7b5e1915da7646
7
- data.tar.gz: cdfe39cb1f800bbaf452f1bb56efb8e1766be15a178839f03ed08d817cc96c6bcdbd5700811c87507bcc11e0e5b7b2ac2b5908ed24f5e2fc396c89ed03d97e37
6
+ metadata.gz: 32c1b69259435af41572613efc2239fe8e849de104c882789ec62fcf8790b6bcbdb2c9537984fb49eaf50a1c022c6834821ab8dbd8ac8c7ca6df6a72c83c6973
7
+ data.tar.gz: ff04732500d3b3e3f772014a629c5cb60537a6575549e52c8787aab1042d7990bbd70b253faf8b5e0df27dc75939a15e191c7e459da015c3b93b0f44717a4b8f
data/lib/requests.rb CHANGED
@@ -56,7 +56,7 @@ end
56
56
  end
57
57
  # @return [Hash{String => String}]
58
58
  def get_headers
59
- headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.9.7' }
59
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.9.9' }
60
60
  headers["X-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
61
61
  headers
62
62
  end
@@ -107,7 +107,7 @@ end
107
107
  end
108
108
  # @return [Hash{String => String}]
109
109
  def get_headers
110
- headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.9.7' }
110
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.9.9' }
111
111
  headers["X-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
112
112
  headers
113
113
  end
data/lib/types_export.rb CHANGED
@@ -702,5 +702,6 @@ require_relative "vellum_ai/types/workflow_result_event_output_data"
702
702
  require_relative "vellum_ai/types/workflow_sandbox_display_data"
703
703
  require_relative "vellum_ai/types/workflow_sandbox_example"
704
704
  require_relative "vellum_ai/types/workflow_stream_event"
705
+ require_relative "vellum_ai/types/workspace_display_config"
705
706
  require_relative "vellum_ai/types/workspace_read"
706
707
  require_relative "vellum_ai/types/workspace_secret_read"
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+ require "ostruct"
3
+ require "json"
4
+
5
+ module Vellum
6
+ class WorkspaceDisplayConfig
7
+ # @return [String]
8
+ attr_reader :color
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 color [String]
18
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
19
+ # @return [Vellum::WorkspaceDisplayConfig]
20
+ def initialize(color: OMIT, additional_properties: nil)
21
+ @color = color if color != OMIT
22
+ @additional_properties = additional_properties
23
+ @_field_set = { "color": color }.reject do | _k, v |
24
+ v == OMIT
25
+ end
26
+ end
27
+ # Deserialize a JSON object to an instance of WorkspaceDisplayConfig
28
+ #
29
+ # @param json_object [String]
30
+ # @return [Vellum::WorkspaceDisplayConfig]
31
+ def self.from_json(json_object:)
32
+ struct = JSON.parse(json_object, object_class: OpenStruct)
33
+ parsed_json = JSON.parse(json_object)
34
+ color = parsed_json["color"]
35
+ new(color: color, additional_properties: struct)
36
+ end
37
+ # Serialize an instance of WorkspaceDisplayConfig to a JSON object
38
+ #
39
+ # @return [String]
40
+ def to_json
41
+ @_field_set&.to_json
42
+ end
43
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
44
+ # hash and check each fields type against the current object's property
45
+ # definitions.
46
+ #
47
+ # @param obj [Object]
48
+ # @return [Void]
49
+ def self.validate_raw(obj:)
50
+ obj.color&.is_a?(String) != false || raise("Passed value for field obj.color is not the expected type, validation failed.")
51
+ end
52
+ end
53
+ end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  require "date"
3
+ require_relative "workspace_display_config"
3
4
  require "ostruct"
4
5
  require "json"
5
6
 
@@ -13,6 +14,8 @@ module Vellum
13
14
  attr_reader :label
14
15
  # @return [DateTime]
15
16
  attr_reader :created
17
+ # @return [Vellum::WorkspaceDisplayConfig]
18
+ attr_reader :display_config
16
19
  # @return [OpenStruct] Additional properties unmapped to the current class definition
17
20
  attr_reader :additional_properties
18
21
  # @return [Object]
@@ -25,15 +28,19 @@ module Vellum
25
28
  # @param name [String] The name of the Workspace.
26
29
  # @param label [String]
27
30
  # @param created [DateTime]
31
+ # @param display_config [Vellum::WorkspaceDisplayConfig]
28
32
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
29
33
  # @return [Vellum::WorkspaceRead]
30
- def initialize(id:, name:, label:, created:, additional_properties: nil)
34
+ def initialize(id:, name:, label:, created:, display_config: OMIT, additional_properties: nil)
31
35
  @id = id
32
36
  @name = name
33
37
  @label = label
34
38
  @created = created
39
+ @display_config = display_config if display_config != OMIT
35
40
  @additional_properties = additional_properties
36
- @_field_set = { "id": id, "name": name, "label": label, "created": created }
41
+ @_field_set = { "id": id, "name": name, "label": label, "created": created, "display_config": display_config }.reject do | _k, v |
42
+ v == OMIT
43
+ end
37
44
  end
38
45
  # Deserialize a JSON object to an instance of WorkspaceRead
39
46
  #
@@ -50,11 +57,18 @@ module Vellum
50
57
  else
51
58
  nil
52
59
  end
60
+ unless parsed_json["display_config"].nil?
61
+ display_config = parsed_json["display_config"].to_json
62
+ display_config = Vellum::WorkspaceDisplayConfig.from_json(json_object: display_config)
63
+ else
64
+ display_config = nil
65
+ end
53
66
  new(
54
67
  id: id,
55
68
  name: name,
56
69
  label: label,
57
70
  created: created,
71
+ display_config: display_config,
58
72
  additional_properties: struct
59
73
  )
60
74
  end
@@ -75,6 +89,7 @@ end
75
89
  obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
76
90
  obj.label.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.")
77
91
  obj.created.is_a?(DateTime) != false || raise("Passed value for field obj.created is not the expected type, validation failed.")
92
+ obj.display_config.nil? || Vellum::WorkspaceDisplayConfig.validate_raw(obj: obj.display_config)
78
93
  end
79
94
  end
80
95
  end
@@ -57,7 +57,7 @@ module Vellum
57
57
  unless request_options.nil? || request_options&.additional_body_parameters.nil?
58
58
  req.body = { **(request_options&.additional_body_parameters || {}) }.compact
59
59
  end
60
- req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflows/#{id}/pull"
60
+ req.url "#{@request_client.get_url(environment: Predict, request_options: request_options)}/v1/workflows/#{id}/pull"
61
61
  end
62
62
  end
63
63
  # Retrieve the current state of a workflow execution.
@@ -140,6 +140,7 @@ end
140
140
  # Serialize files
141
141
  #
142
142
  # @param files [Hash{String => Object}]
143
+ # @param module_ [String]
143
144
  # @param request_options [Vellum::RequestOptions]
144
145
  # @return [Hash{String => Object}]
145
146
  # @example
@@ -149,7 +150,7 @@ end
149
150
  # api_key: "YOUR_API_KEY"
150
151
  # )
151
152
  # api.workflows.serialize_workflow_files(files: { "files": {"key":"value"} })
152
- def serialize_workflow_files(files:, request_options: nil)
153
+ def serialize_workflow_files(files:, module_: nil, request_options: nil)
153
154
  response = @request_client.conn.post do | req |
154
155
  unless request_options&.timeout_in_seconds.nil?
155
156
  req.options.timeout = request_options.timeout_in_seconds
@@ -166,7 +167,7 @@ end
166
167
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
167
168
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
168
169
  end
169
- req.body = { **(request_options&.additional_body_parameters || {}), files: files }.compact
170
+ req.body = { **(request_options&.additional_body_parameters || {}), files: files, module: module_ }.compact
170
171
  req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflows/serialize"
171
172
  end
172
173
  parsed_json = JSON.parse(response.body)
@@ -218,7 +219,7 @@ end
218
219
  unless request_options.nil? || request_options&.additional_body_parameters.nil?
219
220
  req.body = { **(request_options&.additional_body_parameters || {}) }.compact
220
221
  end
221
- req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflows/#{id}/pull"
222
+ req.url "#{@request_client.get_url(environment: Predict, request_options: request_options)}/v1/workflows/#{id}/pull"
222
223
  end
223
224
  end
224
225
  end
@@ -306,6 +307,7 @@ end
306
307
  # Serialize files
307
308
  #
308
309
  # @param files [Hash{String => Object}]
310
+ # @param module_ [String]
309
311
  # @param request_options [Vellum::RequestOptions]
310
312
  # @return [Hash{String => Object}]
311
313
  # @example
@@ -315,7 +317,7 @@ end
315
317
  # api_key: "YOUR_API_KEY"
316
318
  # )
317
319
  # api.workflows.serialize_workflow_files(files: { "files": {"key":"value"} })
318
- def serialize_workflow_files(files:, request_options: nil)
320
+ def serialize_workflow_files(files:, module_: nil, request_options: nil)
319
321
  Async do
320
322
  response = @request_client.conn.post do | req |
321
323
  unless request_options&.timeout_in_seconds.nil?
@@ -333,7 +335,7 @@ end
333
335
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
334
336
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
335
337
  end
336
- req.body = { **(request_options&.additional_body_parameters || {}), files: files }.compact
338
+ req.body = { **(request_options&.additional_body_parameters || {}), files: files, module: module_ }.compact
337
339
  req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflows/serialize"
338
340
  end
339
341
  parsed_json = JSON.parse(response.body)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vellum_ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.7
4
+ version: 1.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vellum
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-11-04 00:00:00.000000000 Z
11
+ date: 2025-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -855,6 +855,7 @@ files:
855
855
  - lib/vellum_ai/types/workflow_sandbox_example.rb
856
856
  - lib/vellum_ai/types/workflow_sandbox_parent_context.rb
857
857
  - lib/vellum_ai/types/workflow_stream_event.rb
858
+ - lib/vellum_ai/types/workspace_display_config.rb
858
859
  - lib/vellum_ai/types/workspace_read.rb
859
860
  - lib/vellum_ai/types/workspace_secret_read.rb
860
861
  - lib/vellum_ai/workflow_deployments/client.rb