vellum_ai 1.12.9 → 1.12.11

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: '029663fe47808fb95f9c217bb9549b7705611aa23671baac9d049d23f7f4d5d6'
4
- data.tar.gz: 6050e4b8921ca1b4ecbaaabb04a676378edf4d766b10e38b24d50dfcde0c8e0a
3
+ metadata.gz: da7a03f01e2de350ca42be0bdf06f24e061bc4733bd93d8c718ab38581c59254
4
+ data.tar.gz: f823104a1537d53bec8301559ba146211e39df776eca4c2cafe07e97b9f90206
5
5
  SHA512:
6
- metadata.gz: 9f4a7929ad92558e45a975ea540900ef4d232898c221ab326a0036091b5049c74dd073d7892145fe0936adb3ffbba85c42574b6a4c5eb362071bf3d43faf8f81
7
- data.tar.gz: 863c92142214ccb03844d26a4fb9a8a9c0ec6f3527868534d91c48229163178d809740126960357ddad266ac434a84ba100e180d5643148ec9aaf23bbdbe703c
6
+ metadata.gz: 7a31adda123e076e267d304da02dcc6d2e90c5340dd475172b1806da00f83a90a7cd4c09596eb4b96d0ed5710acfcb178fc006808354d0305ed768b3432ae27f
7
+ data.tar.gz: 0e2467731e8649922af303fa63b7b0f7742c4e8c12408cc958a9f1b6d6ad95201abecd64dc14a5575c23b3004bd9f74f2fe5028decf76a81a0ef1a5f135462d0
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Vellum.
3
+ Copyright (c) 2026 Vellum.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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.12.9' }
59
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.12.11' }
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.12.9' }
110
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.12.11' }
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
@@ -68,6 +68,8 @@ require_relative "vellum_ai/types/chat_message_content_request"
68
68
  require_relative "vellum_ai/types/chat_message_prompt_block"
69
69
  require_relative "vellum_ai/types/chat_message_request"
70
70
  require_relative "vellum_ai/types/chat_message_role"
71
+ require_relative "vellum_ai/types/check_workflow_execution_status_error"
72
+ require_relative "vellum_ai/types/check_workflow_execution_status_response"
71
73
  require_relative "vellum_ai/types/code_execution_node_array_result"
72
74
  require_relative "vellum_ai/types/code_execution_node_chat_history_result"
73
75
  require_relative "vellum_ai/types/code_execution_node_error_result"
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+ require_relative "workflow_execution_event_error_code"
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Vellum
7
+ class CheckWorkflowExecutionStatusError
8
+ # @return [String]
9
+ attr_reader :message
10
+ # @return [Vellum::WorkflowExecutionEventErrorCode]
11
+ attr_reader :code
12
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
13
+ attr_reader :additional_properties
14
+ # @return [Object]
15
+ attr_reader :_field_set
16
+ protected :_field_set
17
+
18
+ OMIT = Object.new
19
+
20
+ # @param message [String]
21
+ # @param code [Vellum::WorkflowExecutionEventErrorCode]
22
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
23
+ # @return [Vellum::CheckWorkflowExecutionStatusError]
24
+ def initialize(message: OMIT, code: OMIT, additional_properties: nil)
25
+ @message = message if message != OMIT
26
+ @code = code if code != OMIT
27
+ @additional_properties = additional_properties
28
+ @_field_set = { "message": message, "code": code }.reject do | _k, v |
29
+ v == OMIT
30
+ end
31
+ end
32
+ # Deserialize a JSON object to an instance of CheckWorkflowExecutionStatusError
33
+ #
34
+ # @param json_object [String]
35
+ # @return [Vellum::CheckWorkflowExecutionStatusError]
36
+ def self.from_json(json_object:)
37
+ struct = JSON.parse(json_object, object_class: OpenStruct)
38
+ parsed_json = JSON.parse(json_object)
39
+ message = parsed_json["message"]
40
+ code = parsed_json["code"]
41
+ new(
42
+ message: message,
43
+ code: code,
44
+ additional_properties: struct
45
+ )
46
+ end
47
+ # Serialize an instance of CheckWorkflowExecutionStatusError to a JSON object
48
+ #
49
+ # @return [String]
50
+ def to_json
51
+ @_field_set&.to_json
52
+ end
53
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
54
+ # hash and check each fields type against the current object's property
55
+ # definitions.
56
+ #
57
+ # @param obj [Object]
58
+ # @return [Void]
59
+ def self.validate_raw(obj:)
60
+ obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
61
+ obj.code&.is_a?(Vellum::WorkflowExecutionEventErrorCode) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+ require_relative "workflow_result_event_state"
3
+ require_relative "check_workflow_execution_status_error"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Vellum
8
+ # Response serializer for workflow execution status check.
9
+ class CheckWorkflowExecutionStatusResponse
10
+ # @return [Vellum::WorkflowResultEventState]
11
+ attr_reader :status
12
+ # @return [Hash{String => Object}]
13
+ attr_reader :outputs
14
+ # @return [Vellum::CheckWorkflowExecutionStatusError]
15
+ attr_reader :error
16
+ # @return [String]
17
+ attr_reader :execution_id
18
+ # @return [String]
19
+ attr_reader :execution_detail_url
20
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
21
+ attr_reader :additional_properties
22
+ # @return [Object]
23
+ attr_reader :_field_set
24
+ protected :_field_set
25
+
26
+ OMIT = Object.new
27
+
28
+ # @param status [Vellum::WorkflowResultEventState]
29
+ # @param outputs [Hash{String => Object}]
30
+ # @param error [Vellum::CheckWorkflowExecutionStatusError]
31
+ # @param execution_id [String]
32
+ # @param execution_detail_url [String]
33
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
34
+ # @return [Vellum::CheckWorkflowExecutionStatusResponse]
35
+ def initialize(status:, outputs: OMIT, error: OMIT, execution_id:, execution_detail_url: OMIT, additional_properties: nil)
36
+ @status = status
37
+ @outputs = outputs if outputs != OMIT
38
+ @error = error if error != OMIT
39
+ @execution_id = execution_id
40
+ @execution_detail_url = execution_detail_url if execution_detail_url != OMIT
41
+ @additional_properties = additional_properties
42
+ @_field_set = { "status": status, "outputs": outputs, "error": error, "execution_id": execution_id, "execution_detail_url": execution_detail_url }.reject do | _k, v |
43
+ v == OMIT
44
+ end
45
+ end
46
+ # Deserialize a JSON object to an instance of CheckWorkflowExecutionStatusResponse
47
+ #
48
+ # @param json_object [String]
49
+ # @return [Vellum::CheckWorkflowExecutionStatusResponse]
50
+ def self.from_json(json_object:)
51
+ struct = JSON.parse(json_object, object_class: OpenStruct)
52
+ parsed_json = JSON.parse(json_object)
53
+ status = parsed_json["status"]
54
+ outputs = parsed_json["outputs"]
55
+ unless parsed_json["error"].nil?
56
+ error = parsed_json["error"].to_json
57
+ error = Vellum::CheckWorkflowExecutionStatusError.from_json(json_object: error)
58
+ else
59
+ error = nil
60
+ end
61
+ execution_id = parsed_json["execution_id"]
62
+ execution_detail_url = parsed_json["execution_detail_url"]
63
+ new(
64
+ status: status,
65
+ outputs: outputs,
66
+ error: error,
67
+ execution_id: execution_id,
68
+ execution_detail_url: execution_detail_url,
69
+ additional_properties: struct
70
+ )
71
+ end
72
+ # Serialize an instance of CheckWorkflowExecutionStatusResponse to a JSON object
73
+ #
74
+ # @return [String]
75
+ def to_json
76
+ @_field_set&.to_json
77
+ end
78
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
79
+ # hash and check each fields type against the current object's property
80
+ # definitions.
81
+ #
82
+ # @param obj [Object]
83
+ # @return [Void]
84
+ def self.validate_raw(obj:)
85
+ obj.status.is_a?(Vellum::WorkflowResultEventState) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
86
+ obj.outputs&.is_a?(Hash) != false || raise("Passed value for field obj.outputs is not the expected type, validation failed.")
87
+ obj.error.nil? || Vellum::CheckWorkflowExecutionStatusError.validate_raw(obj: obj.error)
88
+ obj.execution_id.is_a?(String) != false || raise("Passed value for field obj.execution_id is not the expected type, validation failed.")
89
+ obj.execution_detail_url&.is_a?(String) != false || raise("Passed value for field obj.execution_detail_url is not the expected type, validation failed.")
90
+ end
91
+ end
92
+ end
@@ -77,6 +77,7 @@ module Vellum
77
77
  # * `SHARE_POINT` - SharePoint
78
78
  # * `SHOPIFY` - Shopify
79
79
  # * `SHORTCUT` - Shortcut
80
+ # * `SLACKBOT` - Slackbot
80
81
  # * `SPOTIFY` - Spotify
81
82
  # * `STRIPE` - Stripe
82
83
  # * `SUPABASE` - Supabase
@@ -178,6 +179,7 @@ module Vellum
178
179
  SHARE_POINT = "SHARE_POINT"
179
180
  SHOPIFY = "SHOPIFY"
180
181
  SHORTCUT = "SHORTCUT"
182
+ SLACKBOT = "SLACKBOT"
181
183
  SPOTIFY = "SPOTIFY"
182
184
  STRIPE = "STRIPE"
183
185
  SUPABASE = "SUPABASE"
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  require_relative "../../requests"
3
3
  require_relative "../types/workflow_resolved_state"
4
+ require_relative "../types/check_workflow_execution_status_response"
4
5
  require_relative "../types/workflow_push_deployment_config_request"
5
6
  require_relative "../types/dataset_row_push_request"
6
7
  require_relative "../types/workflow_push_response"
@@ -11,6 +12,7 @@ require "async"
11
12
  require "async"
12
13
  require "async"
13
14
  require "async"
15
+ require "async"
14
16
  require_relative "../../requests"
15
17
 
16
18
  module Vellum
@@ -98,6 +100,44 @@ end
98
100
  end
99
101
  Vellum::WorkflowResolvedState.from_json(json_object: response.body)
100
102
  end
103
+ # Checks if a workflow execution is currently executing (not fulfilled, not
104
+ # rejected, and has no end time).
105
+ # Uses the ClickHouse Prime summary materialized view.
106
+ #
107
+ # @param execution_id [String]
108
+ # @param request_options [Vellum::RequestOptions]
109
+ # @return [Vellum::CheckWorkflowExecutionStatusResponse]
110
+ # @example
111
+ # api = Vellum::Client.new(
112
+ # base_url: "https://api.example.com",
113
+ # environment: Vellum::Environment::PRODUCTION,
114
+ # api_key: "YOUR_API_KEY"
115
+ # )
116
+ # api.workflows.workflow_execution_status(execution_id: "execution_id")
117
+ def workflow_execution_status(execution_id:, request_options: nil)
118
+ response = @request_client.conn.get do | req |
119
+ unless request_options&.timeout_in_seconds.nil?
120
+ req.options.timeout = request_options.timeout_in_seconds
121
+ end
122
+ unless request_options&.api_key.nil?
123
+ req.headers["X-API-KEY"] = request_options.api_key
124
+ end
125
+ unless request_options&.api_version.nil?
126
+ req.headers["X-API-Version"] = request_options.api_version
127
+ else
128
+ req.headers["X-API-Version"] = "2025-07-30"
129
+ end
130
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
131
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
132
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
133
+ end
134
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
135
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
136
+ end
137
+ req.url "#{@request_client.get_url(environment: Predict, request_options: request_options)}/v1/workflows/executions/#{execution_id}/status"
138
+ end
139
+ Vellum::CheckWorkflowExecutionStatusResponse.from_json(json_object: response.body)
140
+ end
101
141
  # @param exec_config [String] The execution configuration of the workflow. If not provided, it will be derived
102
142
  # from the artifact.
103
143
  # @param workflow_sandbox_id [String]
@@ -274,6 +314,46 @@ end
274
314
  Vellum::WorkflowResolvedState.from_json(json_object: response.body)
275
315
  end
276
316
  end
317
+ # Checks if a workflow execution is currently executing (not fulfilled, not
318
+ # rejected, and has no end time).
319
+ # Uses the ClickHouse Prime summary materialized view.
320
+ #
321
+ # @param execution_id [String]
322
+ # @param request_options [Vellum::RequestOptions]
323
+ # @return [Vellum::CheckWorkflowExecutionStatusResponse]
324
+ # @example
325
+ # api = Vellum::Client.new(
326
+ # base_url: "https://api.example.com",
327
+ # environment: Vellum::Environment::PRODUCTION,
328
+ # api_key: "YOUR_API_KEY"
329
+ # )
330
+ # api.workflows.workflow_execution_status(execution_id: "execution_id")
331
+ def workflow_execution_status(execution_id:, request_options: nil)
332
+ Async do
333
+ response = @request_client.conn.get do | req |
334
+ unless request_options&.timeout_in_seconds.nil?
335
+ req.options.timeout = request_options.timeout_in_seconds
336
+ end
337
+ unless request_options&.api_key.nil?
338
+ req.headers["X-API-KEY"] = request_options.api_key
339
+ end
340
+ unless request_options&.api_version.nil?
341
+ req.headers["X-API-Version"] = request_options.api_version
342
+ else
343
+ req.headers["X-API-Version"] = "2025-07-30"
344
+ end
345
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
346
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
347
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
348
+ end
349
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
350
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
351
+ end
352
+ req.url "#{@request_client.get_url(environment: Predict, request_options: request_options)}/v1/workflows/executions/#{execution_id}/status"
353
+ end
354
+ Vellum::CheckWorkflowExecutionStatusResponse.from_json(json_object: response.body)
355
+ end
356
+ end
277
357
  # @param exec_config [String] The execution configuration of the workflow. If not provided, it will be derived
278
358
  # from the artifact.
279
359
  # @param workflow_sandbox_id [String]
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.12.9
4
+ version: 1.12.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vellum
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-01-06 00:00:00.000000000 Z
11
+ date: 2026-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -203,6 +203,8 @@ files:
203
203
  - lib/vellum_ai/types/chat_message_prompt_block.rb
204
204
  - lib/vellum_ai/types/chat_message_request.rb
205
205
  - lib/vellum_ai/types/chat_message_role.rb
206
+ - lib/vellum_ai/types/check_workflow_execution_status_error.rb
207
+ - lib/vellum_ai/types/check_workflow_execution_status_response.rb
206
208
  - lib/vellum_ai/types/code_execution_node_array_result.rb
207
209
  - lib/vellum_ai/types/code_execution_node_chat_history_result.rb
208
210
  - lib/vellum_ai/types/code_execution_node_error_result.rb