vellum_ai 1.0.10 → 1.1.0

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: f8beeed77c738535a6a6f505405bc8c88a3032262dcd6d5f8545b073b8fc5592
4
- data.tar.gz: 6b47975f39629e0737157418346a36eac419d522f106979b8a1d37b54421d45b
3
+ metadata.gz: f1ce392851f3954d22fc190375a79ad6e6be7c4a4ddba37e480bc3371778fd07
4
+ data.tar.gz: 0acd90b7226e7a97f2f1f0c664bd619634be849fa3c7d0a34a807ccdbe10f4ba
5
5
  SHA512:
6
- metadata.gz: 6d3536b044bae4a9170745f9843480b78f7d834eab71be8d53557f94c1fc4143b639a514da7dc1423cdef354e8e8a470ee27d221b60e21fe02b46f1cc337da07
7
- data.tar.gz: 470c4934557a3d40b620db89107afef95531a5962005b7a4ee2edbc5495ca8aa3a68eba4e5e7fcbb5b725b1299d2982e6bce363994cecca00d05147344678c5f
6
+ metadata.gz: b77453010b580189abfff9c5f2e4cfd9833bb8811fa80558acbc3d53f2d484f5d2c289106423c9584e30e200847c37307a6e033435504ba1a64d05d24d5224f9
7
+ data.tar.gz: 4696a3cb37c761f71396f897687d8824f0e59ca47fe33fad04a2b8ecd4b6d69d85d68eaf61135331e2e0ee5585322e8e0e370c207c7fe736baa9da3b774fe23d
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.0.10' }
59
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.1.0' }
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.0.10' }
110
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.1.0' }
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
@@ -152,6 +152,7 @@ require_relative "vellum_ai/types/execution_string_vellum_value"
152
152
  require_relative "vellum_ai/types/execution_thinking_vellum_value"
153
153
  require_relative "vellum_ai/types/execution_vellum_value"
154
154
  require_relative "vellum_ai/types/external_input_descriptor"
155
+ require_relative "vellum_ai/types/external_parent_context"
155
156
  require_relative "vellum_ai/types/external_test_case_execution"
156
157
  require_relative "vellum_ai/types/external_test_case_execution_request"
157
158
  require_relative "vellum_ai/types/fast_embed_vectorizer_baai_bge_small_en_v_15"
@@ -0,0 +1,87 @@
1
+ # frozen_string_literal: true
2
+ require_relative "parent_context"
3
+ require_relative "span_link"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Vellum
8
+ class ExternalParentContext
9
+ # @return [Vellum::ParentContext]
10
+ attr_reader :parent
11
+ # @return [Array<Vellum::SpanLink>]
12
+ attr_reader :links
13
+ # @return [String]
14
+ attr_reader :type
15
+ # @return [String]
16
+ attr_reader :span_id
17
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
18
+ attr_reader :additional_properties
19
+ # @return [Object]
20
+ attr_reader :_field_set
21
+ protected :_field_set
22
+
23
+ OMIT = Object.new
24
+
25
+ # @param parent [Vellum::ParentContext]
26
+ # @param links [Array<Vellum::SpanLink>]
27
+ # @param type [String]
28
+ # @param span_id [String]
29
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
30
+ # @return [Vellum::ExternalParentContext]
31
+ def initialize(parent: OMIT, links: OMIT, type:, span_id:, additional_properties: nil)
32
+ @parent = parent if parent != OMIT
33
+ @links = links if links != OMIT
34
+ @type = type
35
+ @span_id = span_id
36
+ @additional_properties = additional_properties
37
+ @_field_set = { "parent": parent, "links": links, "type": type, "span_id": span_id }.reject do | _k, v |
38
+ v == OMIT
39
+ end
40
+ end
41
+ # Deserialize a JSON object to an instance of ExternalParentContext
42
+ #
43
+ # @param json_object [String]
44
+ # @return [Vellum::ExternalParentContext]
45
+ def self.from_json(json_object:)
46
+ struct = JSON.parse(json_object, object_class: OpenStruct)
47
+ parsed_json = JSON.parse(json_object)
48
+ unless parsed_json["parent"].nil?
49
+ parent = parsed_json["parent"].to_json
50
+ parent = Vellum::ParentContext.from_json(json_object: parent)
51
+ else
52
+ parent = nil
53
+ end
54
+ links = parsed_json["links"]&.map do | item |
55
+ item = item.to_json
56
+ Vellum::SpanLink.from_json(json_object: item)
57
+ end
58
+ type = parsed_json["type"]
59
+ span_id = parsed_json["span_id"]
60
+ new(
61
+ parent: parent,
62
+ links: links,
63
+ type: type,
64
+ span_id: span_id,
65
+ additional_properties: struct
66
+ )
67
+ end
68
+ # Serialize an instance of ExternalParentContext to a JSON object
69
+ #
70
+ # @return [String]
71
+ def to_json
72
+ @_field_set&.to_json
73
+ end
74
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
75
+ # hash and check each fields type against the current object's property
76
+ # definitions.
77
+ #
78
+ # @param obj [Object]
79
+ # @return [Void]
80
+ def self.validate_raw(obj:)
81
+ obj.parent.nil? || Vellum::ParentContext.validate_raw(obj: obj.parent)
82
+ obj.links&.is_a?(Array) != false || raise("Passed value for field obj.links is not the expected type, validation failed.")
83
+ obj.type.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
84
+ obj.span_id.is_a?(String) != false || raise("Passed value for field obj.span_id is not the expected type, validation failed.")
85
+ end
86
+ end
87
+ end
@@ -4,6 +4,8 @@ require "json"
4
4
 
5
5
  module Vellum
6
6
  class NodeExecutionSpanAttributes
7
+ # @return [String]
8
+ attr_reader :label
7
9
  # @return [String]
8
10
  attr_reader :node_id
9
11
  # @return [OpenStruct] Additional properties unmapped to the current class definition
@@ -14,13 +16,15 @@ module Vellum
14
16
 
15
17
  OMIT = Object.new
16
18
 
19
+ # @param label [String]
17
20
  # @param node_id [String]
18
21
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
19
22
  # @return [Vellum::NodeExecutionSpanAttributes]
20
- def initialize(node_id:, additional_properties: nil)
23
+ def initialize(label:, node_id:, additional_properties: nil)
24
+ @label = label
21
25
  @node_id = node_id
22
26
  @additional_properties = additional_properties
23
- @_field_set = { "node_id": node_id }
27
+ @_field_set = { "label": label, "node_id": node_id }
24
28
  end
25
29
  # Deserialize a JSON object to an instance of NodeExecutionSpanAttributes
26
30
  #
@@ -29,8 +33,13 @@ module Vellum
29
33
  def self.from_json(json_object:)
30
34
  struct = JSON.parse(json_object, object_class: OpenStruct)
31
35
  parsed_json = JSON.parse(json_object)
36
+ label = parsed_json["label"]
32
37
  node_id = parsed_json["node_id"]
33
- new(node_id: node_id, additional_properties: struct)
38
+ new(
39
+ label: label,
40
+ node_id: node_id,
41
+ additional_properties: struct
42
+ )
34
43
  end
35
44
  # Serialize an instance of NodeExecutionSpanAttributes to a JSON object
36
45
  #
@@ -45,6 +54,7 @@ module Vellum
45
54
  # @param obj [Object]
46
55
  # @return [Void]
47
56
  def self.validate_raw(obj:)
57
+ obj.label.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.")
48
58
  obj.node_id.is_a?(String) != false || raise("Passed value for field obj.node_id is not the expected type, validation failed.")
49
59
  end
50
60
  end
@@ -6,6 +6,7 @@ require_relative "workflow_deployment_parent_context"
6
6
  require_relative "workflow_sandbox_parent_context"
7
7
  require_relative "prompt_deployment_parent_context"
8
8
  require_relative "api_request_parent_context"
9
+ require_relative "external_parent_context"
9
10
 
10
11
  module Vellum
11
12
  class ParentContext
@@ -73,6 +74,16 @@ end
73
74
  return Vellum::ApiRequestParentContext.from_json(json_object: struct)
74
75
  else
75
76
  return nil
77
+ end
78
+ rescue StandardError
79
+ # noop
80
+ end
81
+ begin
82
+ Vellum::ExternalParentContext.validate_raw(obj: struct)
83
+ unless struct.nil?
84
+ return Vellum::ExternalParentContext.from_json(json_object: struct)
85
+ else
86
+ return nil
76
87
  end
77
88
  rescue StandardError
78
89
  # noop
@@ -116,6 +127,11 @@ end
116
127
  rescue StandardError
117
128
  # noop
118
129
  end
130
+ begin
131
+ return Vellum::ExternalParentContext.validate_raw(obj: obj)
132
+ rescue StandardError
133
+ # noop
134
+ end
119
135
  raise("Passed value matched no type within the union, validation failed.")
120
136
  end
121
137
  end
@@ -6,6 +6,8 @@ module Vellum
6
6
  class WorkflowExecutionSpanAttributes
7
7
  # @return [String]
8
8
  attr_reader :label
9
+ # @return [String]
10
+ attr_reader :workflow_id
9
11
  # @return [OpenStruct] Additional properties unmapped to the current class definition
10
12
  attr_reader :additional_properties
11
13
  # @return [Object]
@@ -15,12 +17,14 @@ module Vellum
15
17
  OMIT = Object.new
16
18
 
17
19
  # @param label [String]
20
+ # @param workflow_id [String]
18
21
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
19
22
  # @return [Vellum::WorkflowExecutionSpanAttributes]
20
- def initialize(label:, additional_properties: nil)
23
+ def initialize(label:, workflow_id:, additional_properties: nil)
21
24
  @label = label
25
+ @workflow_id = workflow_id
22
26
  @additional_properties = additional_properties
23
- @_field_set = { "label": label }
27
+ @_field_set = { "label": label, "workflow_id": workflow_id }
24
28
  end
25
29
  # Deserialize a JSON object to an instance of WorkflowExecutionSpanAttributes
26
30
  #
@@ -30,7 +34,12 @@ module Vellum
30
34
  struct = JSON.parse(json_object, object_class: OpenStruct)
31
35
  parsed_json = JSON.parse(json_object)
32
36
  label = parsed_json["label"]
33
- new(label: label, additional_properties: struct)
37
+ workflow_id = parsed_json["workflow_id"]
38
+ new(
39
+ label: label,
40
+ workflow_id: workflow_id,
41
+ additional_properties: struct
42
+ )
34
43
  end
35
44
  # Serialize an instance of WorkflowExecutionSpanAttributes to a JSON object
36
45
  #
@@ -46,6 +55,7 @@ module Vellum
46
55
  # @return [Void]
47
56
  def self.validate_raw(obj:)
48
57
  obj.label.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.")
58
+ obj.workflow_id.is_a?(String) != false || raise("Passed value for field obj.workflow_id is not the expected type, validation failed.")
49
59
  end
50
60
  end
51
61
  end
@@ -9,6 +9,8 @@ require_relative "../types/workflow_deployment_history_item"
9
9
  require_relative "types/list_workflow_release_tags_request_source"
10
10
  require_relative "../types/paginated_workflow_release_tag_read_list"
11
11
  require_relative "../types/workflow_release_tag_read"
12
+ require_relative "../types/workflow_deployment_release"
13
+ require "async"
12
14
  require "async"
13
15
  require "async"
14
16
  require "async"
@@ -329,6 +331,46 @@ end
329
331
  end
330
332
  Vellum::WorkflowReleaseTagRead.from_json(json_object: response.body)
331
333
  end
334
+ # Retrieve a specific Workflow Deployment Release by either its UUID or the name
335
+ # of a Release Tag that points to it.
336
+ #
337
+ # @param id [String] Either the Workflow Deployment's ID or its unique name
338
+ # @param release_id_or_release_tag [String] Either the UUID of Workflow Deployment Release you'd like to retrieve, or the
339
+ # name of a Release Tag that's pointing to the Workflow Deployment Release you'd
340
+ # like to retrieve.
341
+ # @param request_options [Vellum::RequestOptions]
342
+ # @return [Vellum::WorkflowDeploymentRelease]
343
+ # @example
344
+ # api = Vellum::Client.new(
345
+ # base_url: "https://api.example.com",
346
+ # environment: Vellum::Environment::PRODUCTION,
347
+ # api_key: "YOUR_API_KEY"
348
+ # )
349
+ # api.workflow_deployments.retrieve_workflow_deployment_release(id: "id", release_id_or_release_tag: "release_id_or_release_tag")
350
+ def retrieve_workflow_deployment_release(id:, release_id_or_release_tag:, request_options: nil)
351
+ response = @request_client.conn.get do | req |
352
+ unless request_options&.timeout_in_seconds.nil?
353
+ req.options.timeout = request_options.timeout_in_seconds
354
+ end
355
+ unless request_options&.api_key.nil?
356
+ req.headers["X-API-KEY"] = request_options.api_key
357
+ end
358
+ unless request_options&.api_version.nil?
359
+ req.headers["X-API-Version"] = request_options.api_version
360
+ else
361
+ req.headers["X-API-Version"] = "2025-07-30"
362
+ end
363
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
364
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
365
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
366
+ end
367
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
368
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
369
+ end
370
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflow-deployments/#{id}/releases/#{release_id_or_release_tag}"
371
+ end
372
+ Vellum::WorkflowDeploymentRelease.from_json(json_object: response.body)
373
+ end
332
374
  end
333
375
  class AsyncWorkflowDeploymentsClient
334
376
  # @return [Vellum::AsyncRequestClient]
@@ -655,5 +697,47 @@ end
655
697
  Vellum::WorkflowReleaseTagRead.from_json(json_object: response.body)
656
698
  end
657
699
  end
700
+ # Retrieve a specific Workflow Deployment Release by either its UUID or the name
701
+ # of a Release Tag that points to it.
702
+ #
703
+ # @param id [String] Either the Workflow Deployment's ID or its unique name
704
+ # @param release_id_or_release_tag [String] Either the UUID of Workflow Deployment Release you'd like to retrieve, or the
705
+ # name of a Release Tag that's pointing to the Workflow Deployment Release you'd
706
+ # like to retrieve.
707
+ # @param request_options [Vellum::RequestOptions]
708
+ # @return [Vellum::WorkflowDeploymentRelease]
709
+ # @example
710
+ # api = Vellum::Client.new(
711
+ # base_url: "https://api.example.com",
712
+ # environment: Vellum::Environment::PRODUCTION,
713
+ # api_key: "YOUR_API_KEY"
714
+ # )
715
+ # api.workflow_deployments.retrieve_workflow_deployment_release(id: "id", release_id_or_release_tag: "release_id_or_release_tag")
716
+ def retrieve_workflow_deployment_release(id:, release_id_or_release_tag:, request_options: nil)
717
+ Async do
718
+ response = @request_client.conn.get do | req |
719
+ unless request_options&.timeout_in_seconds.nil?
720
+ req.options.timeout = request_options.timeout_in_seconds
721
+ end
722
+ unless request_options&.api_key.nil?
723
+ req.headers["X-API-KEY"] = request_options.api_key
724
+ end
725
+ unless request_options&.api_version.nil?
726
+ req.headers["X-API-Version"] = request_options.api_version
727
+ else
728
+ req.headers["X-API-Version"] = "2025-07-30"
729
+ end
730
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
731
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
732
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
733
+ end
734
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
735
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
736
+ end
737
+ req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflow-deployments/#{id}/releases/#{release_id_or_release_tag}"
738
+ end
739
+ Vellum::WorkflowDeploymentRelease.from_json(json_object: response.body)
740
+ end
741
+ end
658
742
  end
659
743
  end
data/lib/vellum_ai.rb CHANGED
@@ -17,7 +17,6 @@ require_relative "vellum_ai/sandboxes/client"
17
17
  require_relative "vellum_ai/test_suite_runs/client"
18
18
  require_relative "vellum_ai/test_suites/client"
19
19
  require_relative "vellum_ai/workflow_deployments/client"
20
- require_relative "vellum_ai/release_reviews/client"
21
20
  require_relative "vellum_ai/workflow_executions/client"
22
21
  require_relative "vellum_ai/workflow_sandboxes/client"
23
22
  require_relative "vellum_ai/workflows/client"
@@ -78,8 +77,6 @@ module Vellum
78
77
  attr_reader :test_suites
79
78
  # @return [Vellum::WorkflowDeploymentsClient]
80
79
  attr_reader :workflow_deployments
81
- # @return [Vellum::ReleaseReviewsClient]
82
- attr_reader :release_reviews
83
80
  # @return [Vellum::WorkflowExecutionsClient]
84
81
  attr_reader :workflow_executions
85
82
  # @return [Vellum::WorkflowSandboxesClient]
@@ -122,7 +119,6 @@ module Vellum
122
119
  @test_suite_runs = Vellum::TestSuiteRunsClient.new(request_client: @request_client)
123
120
  @test_suites = Vellum::TestSuitesClient.new(request_client: @request_client)
124
121
  @workflow_deployments = Vellum::WorkflowDeploymentsClient.new(request_client: @request_client)
125
- @release_reviews = Vellum::ReleaseReviewsClient.new(request_client: @request_client)
126
122
  @workflow_executions = Vellum::WorkflowExecutionsClient.new(request_client: @request_client)
127
123
  @workflow_sandboxes = Vellum::WorkflowSandboxesClient.new(request_client: @request_client)
128
124
  @workflows = Vellum::WorkflowsClient.new(request_client: @request_client)
@@ -534,8 +530,6 @@ end
534
530
  attr_reader :test_suites
535
531
  # @return [Vellum::AsyncWorkflowDeploymentsClient]
536
532
  attr_reader :workflow_deployments
537
- # @return [Vellum::AsyncReleaseReviewsClient]
538
- attr_reader :release_reviews
539
533
  # @return [Vellum::AsyncWorkflowExecutionsClient]
540
534
  attr_reader :workflow_executions
541
535
  # @return [Vellum::AsyncWorkflowSandboxesClient]
@@ -578,7 +572,6 @@ end
578
572
  @test_suite_runs = Vellum::AsyncTestSuiteRunsClient.new(request_client: @async_request_client)
579
573
  @test_suites = Vellum::AsyncTestSuitesClient.new(request_client: @async_request_client)
580
574
  @workflow_deployments = Vellum::AsyncWorkflowDeploymentsClient.new(request_client: @async_request_client)
581
- @release_reviews = Vellum::AsyncReleaseReviewsClient.new(request_client: @async_request_client)
582
575
  @workflow_executions = Vellum::AsyncWorkflowExecutionsClient.new(request_client: @async_request_client)
583
576
  @workflow_sandboxes = Vellum::AsyncWorkflowSandboxesClient.new(request_client: @async_request_client)
584
577
  @workflows = Vellum::AsyncWorkflowsClient.new(request_client: @async_request_client)
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.0.10
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vellum
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-08-03 00:00:00.000000000 Z
11
+ date: 2025-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -151,7 +151,6 @@ files:
151
151
  - lib/vellum_ai/ml_models/client.rb
152
152
  - lib/vellum_ai/organizations/client.rb
153
153
  - lib/vellum_ai/prompts/client.rb
154
- - lib/vellum_ai/release_reviews/client.rb
155
154
  - lib/vellum_ai/sandboxes/client.rb
156
155
  - lib/vellum_ai/test_suite_runs/client.rb
157
156
  - lib/vellum_ai/test_suites/client.rb
@@ -274,6 +273,7 @@ files:
274
273
  - lib/vellum_ai/types/execution_thinking_vellum_value.rb
275
274
  - lib/vellum_ai/types/execution_vellum_value.rb
276
275
  - lib/vellum_ai/types/external_input_descriptor.rb
276
+ - lib/vellum_ai/types/external_parent_context.rb
277
277
  - lib/vellum_ai/types/external_test_case_execution.rb
278
278
  - lib/vellum_ai/types/external_test_case_execution_request.rb
279
279
  - lib/vellum_ai/types/fast_embed_vectorizer_baai_bge_small_en_v_15.rb
@@ -1,112 +0,0 @@
1
- # frozen_string_literal: true
2
- require_relative "../../requests"
3
- require_relative "../types/workflow_deployment_release"
4
- require "async"
5
- require_relative "../../requests"
6
-
7
- module Vellum
8
- class ReleaseReviewsClient
9
- # @return [Vellum::RequestClient]
10
- attr_reader :request_client
11
-
12
-
13
- # @param request_client [Vellum::RequestClient]
14
- # @return [Vellum::ReleaseReviewsClient]
15
- def initialize(request_client:)
16
- @request_client = request_client
17
- end
18
- # Retrieve a specific Workflow Deployment Release by either its UUID or the name
19
- # of a Release Tag that points to it.
20
- #
21
- # @param id [String] Either the Workflow Deployment's ID or its unique name
22
- # @param release_id_or_release_tag [String] Either the UUID of Workflow Deployment Release you'd like to retrieve, or the
23
- # name of a Release Tag that's pointing to the Workflow Deployment Release you'd
24
- # like to retrieve.
25
- # @param request_options [Vellum::RequestOptions]
26
- # @return [Vellum::WorkflowDeploymentRelease]
27
- # @example
28
- # api = Vellum::Client.new(
29
- # base_url: "https://api.example.com",
30
- # environment: Vellum::Environment::PRODUCTION,
31
- # api_key: "YOUR_API_KEY"
32
- # )
33
- # api.release_reviews.retrieve_workflow_deployment_release(id: "id", release_id_or_release_tag: "release_id_or_release_tag")
34
- def retrieve_workflow_deployment_release(id:, release_id_or_release_tag:, request_options: nil)
35
- response = @request_client.conn.get do | req |
36
- unless request_options&.timeout_in_seconds.nil?
37
- req.options.timeout = request_options.timeout_in_seconds
38
- end
39
- unless request_options&.api_key.nil?
40
- req.headers["X-API-KEY"] = request_options.api_key
41
- end
42
- unless request_options&.api_version.nil?
43
- req.headers["X-API-Version"] = request_options.api_version
44
- else
45
- req.headers["X-API-Version"] = "2025-07-30"
46
- end
47
- req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
48
- unless request_options.nil? || request_options&.additional_query_parameters.nil?
49
- req.params = { **(request_options&.additional_query_parameters || {}) }.compact
50
- end
51
- unless request_options.nil? || request_options&.additional_body_parameters.nil?
52
- req.body = { **(request_options&.additional_body_parameters || {}) }.compact
53
- end
54
- req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflow-deployments/#{id}/releases/#{release_id_or_release_tag}"
55
- end
56
- Vellum::WorkflowDeploymentRelease.from_json(json_object: response.body)
57
- end
58
- end
59
- class AsyncReleaseReviewsClient
60
- # @return [Vellum::AsyncRequestClient]
61
- attr_reader :request_client
62
-
63
-
64
- # @param request_client [Vellum::RequestClient]
65
- # @return [Vellum::AsyncReleaseReviewsClient]
66
- def initialize(request_client:)
67
- @request_client = request_client
68
- end
69
- # Retrieve a specific Workflow Deployment Release by either its UUID or the name
70
- # of a Release Tag that points to it.
71
- #
72
- # @param id [String] Either the Workflow Deployment's ID or its unique name
73
- # @param release_id_or_release_tag [String] Either the UUID of Workflow Deployment Release you'd like to retrieve, or the
74
- # name of a Release Tag that's pointing to the Workflow Deployment Release you'd
75
- # like to retrieve.
76
- # @param request_options [Vellum::RequestOptions]
77
- # @return [Vellum::WorkflowDeploymentRelease]
78
- # @example
79
- # api = Vellum::Client.new(
80
- # base_url: "https://api.example.com",
81
- # environment: Vellum::Environment::PRODUCTION,
82
- # api_key: "YOUR_API_KEY"
83
- # )
84
- # api.release_reviews.retrieve_workflow_deployment_release(id: "id", release_id_or_release_tag: "release_id_or_release_tag")
85
- def retrieve_workflow_deployment_release(id:, release_id_or_release_tag:, request_options: nil)
86
- Async do
87
- response = @request_client.conn.get do | req |
88
- unless request_options&.timeout_in_seconds.nil?
89
- req.options.timeout = request_options.timeout_in_seconds
90
- end
91
- unless request_options&.api_key.nil?
92
- req.headers["X-API-KEY"] = request_options.api_key
93
- end
94
- unless request_options&.api_version.nil?
95
- req.headers["X-API-Version"] = request_options.api_version
96
- else
97
- req.headers["X-API-Version"] = "2025-07-30"
98
- end
99
- req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
100
- unless request_options.nil? || request_options&.additional_query_parameters.nil?
101
- req.params = { **(request_options&.additional_query_parameters || {}) }.compact
102
- end
103
- unless request_options.nil? || request_options&.additional_body_parameters.nil?
104
- req.body = { **(request_options&.additional_body_parameters || {}) }.compact
105
- end
106
- req.url "#{@request_client.get_url(environment: Default, request_options: request_options)}/v1/workflow-deployments/#{id}/releases/#{release_id_or_release_tag}"
107
- end
108
- Vellum::WorkflowDeploymentRelease.from_json(json_object: response.body)
109
- end
110
- end
111
- end
112
- end