Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/requests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_url(request_options: nil, environment:)
end
# @return [Hash{String => String}]
def get_headers
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.13.7' }
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.13.8' }
headers["X-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
headers
end
Expand Down Expand Up @@ -107,7 +107,7 @@ def get_url(request_options: nil, environment:)
end
# @return [Hash{String => String}]
def get_headers
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.13.7' }
headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'vellum_ai', "X-Fern-SDK-Version": '1.13.8' }
headers["X-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
headers
end
Expand Down
2 changes: 2 additions & 0 deletions lib/types_export.rb
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@
require_relative "vellum_ai/types/vellum_image"
require_relative "vellum_ai/types/vellum_image_request"
require_relative "vellum_ai/types/vellum_node_execution_event"
require_relative "vellum_ai/types/vellum_sdk_error_raw_data"
require_relative "vellum_ai/types/vellum_sdk_error"
require_relative "vellum_ai/types/vellum_sdk_error_code_enum"
require_relative "vellum_ai/types/workflow_execution_span"
Expand All @@ -651,6 +652,7 @@
require_relative "vellum_ai/types/workflow_event_error"
require_relative "vellum_ai/types/workflow_initialization_error"
require_relative "vellum_ai/types/workflow_error"
require_relative "vellum_ai/types/workflow_event_error_raw_data"
require_relative "vellum_ai/types/workflow_event_execution_read"
require_relative "vellum_ai/types/workflow_execution_actual"
require_relative "vellum_ai/types/workflow_execution_detail"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class DeploymentsListRequestStatus

ACTIVE = "ACTIVE"
ARCHIVED = "ARCHIVED"
PENDING_DELETION = "PENDING_DELETION"

end
end
Expand Down
8 changes: 8 additions & 0 deletions lib/vellum_ai/document_indexes/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def initialize(request_client:)
# specified
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param request_options [Vellum::RequestOptions]
# @return [Vellum::PaginatedDocumentIndexReadList]
# @example
Expand Down Expand Up @@ -74,6 +75,7 @@ def list(limit: nil, offset: nil, ordering: nil, search: nil, status: nil, reque
# @param status [Vellum::EntityStatus] The current status of the document index
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param indexing_config [Hash] Request of type Vellum::DocumentIndexIndexingConfigRequest, as a Hash
# * :vectorizer (Hash)
# * :chunking (Hash)
Expand Down Expand Up @@ -156,6 +158,7 @@ def retrieve(id:, mask_indexing_config: nil, request_options: nil)
# @param status [Vellum::EntityStatus] The current status of the document index
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param request_options [Vellum::RequestOptions]
# @return [Vellum::DocumentIndexRead]
# @example
Expand Down Expand Up @@ -229,6 +232,7 @@ def destroy(id:, request_options: nil)
# @param status [Vellum::EntityStatus] The current status of the document index
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param request_options [Vellum::RequestOptions]
# @return [Vellum::DocumentIndexRead]
# @example
Expand Down Expand Up @@ -357,6 +361,7 @@ def initialize(request_client:)
# specified
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param request_options [Vellum::RequestOptions]
# @return [Vellum::PaginatedDocumentIndexReadList]
# @example
Expand Down Expand Up @@ -397,6 +402,7 @@ def list(limit: nil, offset: nil, ordering: nil, search: nil, status: nil, reque
# @param status [Vellum::EntityStatus] The current status of the document index
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param indexing_config [Hash] Request of type Vellum::DocumentIndexIndexingConfigRequest, as a Hash
# * :vectorizer (Hash)
# * :chunking (Hash)
Expand Down Expand Up @@ -483,6 +489,7 @@ def retrieve(id:, mask_indexing_config: nil, request_options: nil)
# @param status [Vellum::EntityStatus] The current status of the document index
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param request_options [Vellum::RequestOptions]
# @return [Vellum::DocumentIndexRead]
# @example
Expand Down Expand Up @@ -560,6 +567,7 @@ def destroy(id:, request_options: nil)
# @param status [Vellum::EntityStatus] The current status of the document index
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param request_options [Vellum::RequestOptions]
# @return [Vellum::DocumentIndexRead]
# @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class DocumentIndexesListRequestStatus

ACTIVE = "ACTIVE"
ARCHIVED = "ARCHIVED"
PENDING_DELETION = "PENDING_DELETION"

end
end
Expand Down
2 changes: 2 additions & 0 deletions lib/vellum_ai/folder_entities/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def initialize(request_client:)
# status specified.
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param limit [Integer] Number of results to return per page.
# @param offset [Integer] The initial index from which to return the results.
# @param ordering [String] Which field to use when ordering the results.
Expand Down Expand Up @@ -125,6 +126,7 @@ def initialize(request_client:)
# status specified.
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param limit [Integer] Number of results to return per page.
# @param offset [Integer] The initial index from which to return the results.
# @param ordering [String] Which field to use when ordering the results.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class FolderEntitiesListRequestEntityStatus

ACTIVE = "ACTIVE"
ARCHIVED = "ARCHIVED"
PENDING_DELETION = "PENDING_DELETION"

end
end
Expand Down
2 changes: 2 additions & 0 deletions lib/vellum_ai/types/deployment_read.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class DeploymentRead
# @return [Vellum::EntityStatus] The current status of the deployment
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
attr_reader :status
# @return [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
attr_reader :environment
Expand Down Expand Up @@ -49,6 +50,7 @@ class DeploymentRead
# @param status [Vellum::EntityStatus] The current status of the deployment
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param environment [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
# @param last_deployed_on [DateTime]
# @param input_variables [Array<Vellum::VellumVariable>]
Expand Down
2 changes: 2 additions & 0 deletions lib/vellum_ai/types/document_index_read.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class DocumentIndexRead
# @return [Vellum::EntityStatus] The current status of the document index
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
attr_reader :status
# @return [Vellum::DocumentIndexIndexingConfig]
attr_reader :indexing_config
Expand All @@ -36,6 +37,7 @@ class DocumentIndexRead
# @param status [Vellum::EntityStatus] The current status of the document index
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param indexing_config [Vellum::DocumentIndexIndexingConfig]
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
# @return [Vellum::DocumentIndexRead]
Expand Down
2 changes: 2 additions & 0 deletions lib/vellum_ai/types/entity_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
module Vellum
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
class EntityStatus

ACTIVE = "ACTIVE"
ARCHIVED = "ARCHIVED"
PENDING_DELETION = "PENDING_DELETION"

end
end
2 changes: 2 additions & 0 deletions lib/vellum_ai/types/integration_name.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ module Vellum
# * `SUPABASE` - Supabase
# * `TAVILY` - Tavily
# * `TELEGRAM` - Telegram
# * `TIKTOK` - TikTok
# * `TODOIST` - Todoist
# * `WEBFLOW` - Webflow
# * `YOUSEARCH` - You Search
Expand Down Expand Up @@ -187,6 +188,7 @@ class IntegrationName
SUPABASE = "SUPABASE"
TAVILY = "TAVILY"
TELEGRAM = "TELEGRAM"
TIKTOK = "TIKTOK"
TODOIST = "TODOIST"
WEBFLOW = "WEBFLOW"
YOUSEARCH = "YOUSEARCH"
Expand Down
2 changes: 2 additions & 0 deletions lib/vellum_ai/types/slim_deployment_read.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class SlimDeploymentRead
# @return [Vellum::EntityStatus] The current status of the deployment
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
attr_reader :status
# @return [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
attr_reader :environment
Expand All @@ -45,6 +46,7 @@ class SlimDeploymentRead
# @param status [Vellum::EntityStatus] The current status of the deployment
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param environment [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
# @param last_deployed_on [DateTime]
# @param input_variables [Array<Vellum::VellumVariable>]
Expand Down
2 changes: 2 additions & 0 deletions lib/vellum_ai/types/slim_workflow_deployment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class SlimWorkflowDeployment
# @return [Vellum::EntityStatus] The current status of the workflow deployment
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
attr_reader :status
# @return [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
attr_reader :environment
Expand Down Expand Up @@ -47,6 +48,7 @@ class SlimWorkflowDeployment
# @param status [Vellum::EntityStatus] The current status of the workflow deployment
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param environment [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
# @param created [DateTime]
# @param last_deployed_on [DateTime]
Expand Down
24 changes: 15 additions & 9 deletions lib/vellum_ai/types/vellum_sdk_error.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
require_relative "vellum_sdk_error_raw_data"
require_relative "vellum_sdk_error_code_enum"
require "ostruct"
require "json"
Expand All @@ -7,10 +8,10 @@ module Vellum
class VellumSdkError
# @return [String]
attr_reader :message
# @return [Vellum::VellumSdkErrorRawData]
attr_reader :raw_data
# @return [Vellum::VellumSdkErrorCodeEnum]
attr_reader :code
# @return [Hash{String => Object}]
attr_reader :raw_data
# @return [OpenStruct] Additional properties unmapped to the current class definition
attr_reader :additional_properties
# @return [Object]
Expand All @@ -20,16 +21,16 @@ class VellumSdkError
OMIT = Object.new

# @param message [String]
# @param raw_data [Vellum::VellumSdkErrorRawData]
# @param code [Vellum::VellumSdkErrorCodeEnum]
# @param raw_data [Hash{String => Object}]
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
# @return [Vellum::VellumSdkError]
def initialize(message:, code:, raw_data: OMIT, additional_properties: nil)
def initialize(message:, raw_data: OMIT, code:, additional_properties: nil)
@message = message
@code = code
@raw_data = raw_data if raw_data != OMIT
@code = code
@additional_properties = additional_properties
@_field_set = { "message": message, "code": code, "raw_data": raw_data }.reject do | _k, v |
@_field_set = { "message": message, "raw_data": raw_data, "code": code }.reject do | _k, v |
v == OMIT
end
end
Expand All @@ -41,12 +42,17 @@ def self.from_json(json_object:)
struct = JSON.parse(json_object, object_class: OpenStruct)
parsed_json = JSON.parse(json_object)
message = parsed_json["message"]
unless parsed_json["raw_data"].nil?
raw_data = parsed_json["raw_data"].to_json
raw_data = Vellum::VellumSdkErrorRawData.from_json(json_object: raw_data)
else
raw_data = nil
end
code = parsed_json["code"]
raw_data = parsed_json["raw_data"]
new(
message: message,
code: code,
raw_data: raw_data,
code: code,
additional_properties: struct
)
end
Expand All @@ -64,8 +70,8 @@ def to_json
# @return [Void]
def self.validate_raw(obj:)
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
obj.raw_data.nil? || Vellum::VellumSdkErrorRawData.validate_raw(obj: obj.raw_data)
obj.code.is_a?(Vellum::VellumSdkErrorCodeEnum) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
obj.raw_data&.is_a?(Hash) != false || raise("Passed value for field obj.raw_data is not the expected type, validation failed.")
end
end
end
56 changes: 56 additions & 0 deletions lib/vellum_ai/types/vellum_sdk_error_raw_data.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# frozen_string_literal: true
require "json"

module Vellum
class VellumSdkErrorRawData


# Deserialize a JSON object to an instance of VellumSdkErrorRawData
#
# @param json_object [String]
# @return [Vellum::VellumSdkErrorRawData]
def self.from_json(json_object:)
struct = JSON.parse(json_object, object_class: OpenStruct)
begin
struct.is_a?(Hash) != false || raise("Passed value for field struct is not the expected type, validation failed.")
unless struct.nil?
return struct
else
return nil
end
rescue StandardError
# noop
end
begin
struct.is_a?(String) != false || raise("Passed value for field struct is not the expected type, validation failed.")
unless struct.nil?
return struct
else
return nil
end
rescue StandardError
# noop
end
return struct
end
# Leveraged for Union-type generation, validate_raw attempts to parse the given
# hash and check each fields type against the current object's property
# definitions.
#
# @param obj [Object]
# @return [Void]
def self.validate_raw(obj:)
begin
return obj.is_a?(Hash) != false || raise("Passed value for field obj is not the expected type, validation failed.")
rescue StandardError
# noop
end
begin
return obj.is_a?(String) != false || raise("Passed value for field obj is not the expected type, validation failed.")
rescue StandardError
# noop
end
raise("Passed value matched no type within the union, validation failed.")
end
end
end
2 changes: 2 additions & 0 deletions lib/vellum_ai/types/workflow_deployment_read.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class WorkflowDeploymentRead
# @return [Vellum::EntityStatus] The current status of the workflow deployment
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
attr_reader :status
# @return [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
attr_reader :environment
Expand Down Expand Up @@ -54,6 +55,7 @@ class WorkflowDeploymentRead
# @param status [Vellum::EntityStatus] The current status of the workflow deployment
# * `ACTIVE` - Active
# * `ARCHIVED` - Archived
# * `PENDING_DELETION` - Pending Deletion
# @param environment [Vellum::EnvironmentEnum] Deprecated. The value returned will always be 'PRODUCTION'.
# @param created [DateTime]
# @param last_deployed_on [DateTime]
Expand Down
Loading