trieve_ruby_client 0.8.2 → 0.10.7
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 +4 -4
- data/README.md +39 -30
- data/docs/ApiKeyRespBody.md +32 -0
- data/docs/AutocompleteData.md +42 -0
- data/docs/AutocompleteReqPayload.md +50 -0
- data/docs/BoostPhrase.md +20 -0
- data/docs/ChunkApi.md +140 -66
- data/docs/ChunkData.md +3 -1
- data/docs/ChunkFilter.md +3 -3
- data/docs/ChunkGroup.md +1 -1
- data/docs/ChunkGroupApi.md +35 -33
- data/docs/ChunkMetadata.md +5 -1
- data/docs/ChunkMetadataStringTagSet.md +46 -0
- data/docs/ChunkMetadataTypes.md +51 -0
- data/docs/ChunkReqPayload.md +50 -0
- data/docs/ClientDatasetConfiguration.md +0 -2
- data/docs/ConditionType.md +49 -0
- data/docs/ContentChunkMetadata.md +32 -0
- data/docs/CreateChunkGroupReqPayload.md +28 -0
- data/docs/CreateChunkReqPayloadEnum.md +49 -0
- data/docs/CreateDatasetRequest.md +2 -2
- data/docs/CreateMessageData.md +2 -2
- data/docs/CreateMessageReqPayload.md +42 -0
- data/docs/CreateTopicReqPayload.md +22 -0
- data/docs/Dataset.md +2 -0
- data/docs/DatasetApi.md +236 -12
- data/docs/DateRange.md +24 -0
- data/docs/EditMessageReqPayload.md +44 -0
- data/docs/FieldCondition.md +2 -0
- data/docs/File.md +1 -1
- data/docs/FileApi.md +7 -7
- data/docs/GenerateChunksRequest.md +2 -0
- data/docs/GetDatasetsPagination.md +20 -0
- data/docs/HasIDCondition.md +20 -0
- data/docs/InvitationApi.md +1 -1
- data/docs/MatchCondition.md +3 -1
- data/docs/MessageApi.md +42 -42
- data/docs/Organization.md +2 -0
- data/docs/OrganizationApi.md +24 -25
- data/docs/RangeCondition.md +1 -3
- data/docs/RegenerateMessageReqPayload.md +40 -0
- data/docs/RemoveChunkFromGroupReqPayload.md +18 -0
- data/docs/ScoreChunkDTO.md +3 -1
- data/docs/SearchChunkData.md +9 -3
- data/docs/SearchChunksReqPayload.md +54 -0
- data/docs/SearchOverGroupsData.md +10 -2
- data/docs/SearchWithinGroupData.md +12 -2
- data/docs/SetUserApiKeyRequest.md +4 -0
- data/docs/SlimChunkMetadata.md +4 -0
- data/docs/SuggestedQueriesReqPayload.md +18 -0
- data/docs/TopicApi.md +16 -16
- data/docs/UpdateChunkData.md +2 -0
- data/docs/UpdateChunkReqPayload.md +46 -0
- data/docs/UpdateDatasetRequest.md +2 -0
- data/docs/UpdateGroupByTrackingIDReqPayload.md +26 -0
- data/docs/UpdateTopicReqPayload.md +20 -0
- data/docs/UpdateUserOrgRoleData.md +1 -1
- data/docs/UploadFileReqPayload.md +40 -0
- data/docs/UserApi.md +7 -8
- data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
- data/lib/trieve_ruby_client/api/chunk_api.rb +158 -83
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +58 -51
- data/lib/trieve_ruby_client/api/dataset_api.rb +224 -15
- data/lib/trieve_ruby_client/api/events_api.rb +1 -1
- data/lib/trieve_ruby_client/api/file_api.rb +12 -12
- data/lib/trieve_ruby_client/api/health_api.rb +1 -1
- data/lib/trieve_ruby_client/api/invitation_api.rb +3 -3
- data/lib/trieve_ruby_client/api/message_api.rb +50 -50
- data/lib/trieve_ruby_client/api/organization_api.rb +27 -27
- data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
- data/lib/trieve_ruby_client/api/topic_api.rb +27 -27
- data/lib/trieve_ruby_client/api/user_api.rb +8 -8
- data/lib/trieve_ruby_client/api_client.rb +1 -1
- data/lib/trieve_ruby_client/api_error.rb +1 -1
- data/lib/trieve_ruby_client/configuration.rb +1 -1
- data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/api_key_resp_body.rb +325 -0
- data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
- data/lib/trieve_ruby_client/models/autocomplete_data.rb +378 -0
- data/lib/trieve_ruby_client/models/autocomplete_req_payload.rb +467 -0
- data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
- data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
- data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
- data/lib/trieve_ruby_client/models/boost_phrase.rb +240 -0
- data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_data.rb +16 -9
- data/lib/trieve_ruby_client/models/chunk_filter.rb +4 -4
- data/lib/trieve_ruby_client/models/chunk_group.rb +5 -3
- data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata.rb +28 -4
- data/lib/trieve_ruby_client/models/chunk_metadata_string_tag_set.rb +387 -0
- data/lib/trieve_ruby_client/models/chunk_metadata_types.rb +106 -0
- data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_req_payload.rb +400 -0
- data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +2 -18
- data/lib/trieve_ruby_client/models/condition_type.rb +105 -0
- data/lib/trieve_ruby_client/models/content_chunk_metadata.rb +299 -0
- data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_group_req_payload.rb +273 -0
- data/lib/trieve_ruby_client/models/create_chunk_req_payload_enum.rb +105 -0
- data/lib/trieve_ruby_client/models/create_dataset_request.rb +3 -3
- data/lib/trieve_ruby_client/models/create_message_data.rb +13 -13
- data/lib/trieve_ruby_client/models/create_message_req_payload.rb +378 -0
- data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_topic_req_payload.rb +244 -0
- data/lib/trieve_ruby_client/models/dataset.rb +18 -2
- data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
- data/lib/trieve_ruby_client/models/date_range.rb +245 -0
- data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
- data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/edit_message_req_payload.rb +395 -0
- data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/event.rb +1 -1
- data/lib/trieve_ruby_client/models/event_return.rb +1 -1
- data/lib/trieve_ruby_client/models/field_condition.rb +12 -2
- data/lib/trieve_ruby_client/models/file.rb +5 -3
- data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/generate_chunks_request.rb +13 -2
- data/lib/trieve_ruby_client/models/geo_info.rb +1 -1
- data/lib/trieve_ruby_client/models/geo_types.rb +1 -1
- data/lib/trieve_ruby_client/models/get_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/get_datasets_pagination.rb +225 -0
- data/lib/trieve_ruby_client/models/get_events_data.rb +1 -1
- data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/get_tracking_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/group_score_chunk.rb +1 -1
- data/lib/trieve_ruby_client/models/has_id_condition.rb +229 -0
- data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
- data/lib/trieve_ruby_client/models/location_bounding_box.rb +1 -1
- data/lib/trieve_ruby_client/models/location_polygon.rb +1 -1
- data/lib/trieve_ruby_client/models/location_radius.rb +1 -1
- data/lib/trieve_ruby_client/models/match_condition.rb +2 -1
- data/lib/trieve_ruby_client/models/message.rb +1 -1
- data/lib/trieve_ruby_client/models/organization.rb +18 -2
- data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
- data/lib/trieve_ruby_client/models/range.rb +1 -1
- data/lib/trieve_ruby_client/models/range_condition.rb +2 -3
- data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/regenerate_message_req_payload.rb +361 -0
- data/lib/trieve_ruby_client/models/remove_chunk_from_group_req_payload.rb +222 -0
- data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
- data/lib/trieve_ruby_client/models/score_chunk_dto.rb +15 -3
- data/lib/trieve_ruby_client/models/search_chunk_data.rb +40 -5
- data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunks_req_payload.rb +504 -0
- data/lib/trieve_ruby_client/models/search_over_groups_data.rb +93 -4
- data/lib/trieve_ruby_client/models/search_over_groups_results.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_data.rb +106 -4
- data/lib/trieve_ruby_client/models/search_within_group_results.rb +1 -1
- data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +28 -2
- data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
- data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +24 -2
- data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
- data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
- data/lib/trieve_ruby_client/models/suggested_queries_req_payload.rb +222 -0
- data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
- data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
- data/lib/trieve_ruby_client/models/topic.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_data.rb +15 -2
- data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_req_payload.rb +376 -0
- data/lib/trieve_ruby_client/models/update_dataset_request.rb +13 -2
- data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_group_by_tracking_id_req_payload.rb +268 -0
- data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_topic_req_payload.rb +239 -0
- data/lib/trieve_ruby_client/models/update_user_org_role_data.rb +2 -2
- data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
- data/lib/trieve_ruby_client/models/upload_file_req_payload.rb +368 -0
- data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
- data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
- data/lib/trieve_ruby_client/version.rb +2 -2
- data/lib/trieve_ruby_client.rb +25 -20
- data/openapi-generator.yaml +1 -1
- data/openapi.json +1 -7789
- data/spec/models/api_key_resp_body_spec.rb +78 -0
- data/spec/models/autocomplete_data_spec.rb +108 -0
- data/spec/models/autocomplete_req_payload_spec.rb +132 -0
- data/spec/models/boost_phrase_spec.rb +42 -0
- data/spec/models/chunk_metadata_string_tag_set_spec.rb +120 -0
- data/spec/models/chunk_metadata_types_spec.rb +32 -0
- data/spec/models/chunk_req_payload_spec.rb +132 -0
- data/spec/models/condition_type_spec.rb +32 -0
- data/spec/models/content_chunk_metadata_spec.rb +72 -0
- data/spec/models/create_chunk_group_req_payload_spec.rb +66 -0
- data/spec/models/create_chunk_req_payload_enum_spec.rb +32 -0
- data/spec/models/create_message_req_payload_spec.rb +108 -0
- data/spec/models/create_topic_req_payload_spec.rb +48 -0
- data/spec/models/date_range_spec.rb +54 -0
- data/spec/models/edit_message_req_payload_spec.rb +114 -0
- data/spec/models/get_datasets_pagination_spec.rb +42 -0
- data/spec/models/has_id_condition_spec.rb +42 -0
- data/spec/models/regenerate_message_req_payload_spec.rb +102 -0
- data/spec/models/remove_chunk_from_group_req_payload_spec.rb +36 -0
- data/spec/models/search_chunks_req_payload_spec.rb +144 -0
- data/spec/models/suggested_queries_req_payload_spec.rb +36 -0
- data/spec/models/update_chunk_req_payload_spec.rb +120 -0
- data/spec/models/update_group_by_tracking_id_req_payload_spec.rb +60 -0
- data/spec/models/update_topic_req_payload_spec.rb +42 -0
- data/spec/models/upload_file_req_payload_spec.rb +102 -0
- data/spec/spec_helper.rb +1 -1
- data/trieve_ruby_client-0.8.2.gem +0 -0
- data/trieve_ruby_client-0.8.5.gem +0 -0
- data/trieve_ruby_client.gemspec +1 -1
- metadata +104 -2
@@ -0,0 +1,244 @@
|
|
1
|
+
=begin
|
2
|
+
#Trieve API
|
3
|
+
|
4
|
+
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.10.7
|
7
|
+
Contact: developers@trieve.ai
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module TrieveRubyClient
|
17
|
+
class CreateTopicReqPayload
|
18
|
+
# The first message which will belong to the topic. The topic name is generated based on this message similar to how it works in the OpenAI chat UX if a name is not explicitly provided on the name request body key.
|
19
|
+
attr_accessor :first_user_message
|
20
|
+
|
21
|
+
# The name of the topic. If this is not provided, the topic name is generated from the first_user_message.
|
22
|
+
attr_accessor :name
|
23
|
+
|
24
|
+
# The owner_id of the topic. This is typically a browser fingerprint or your user's id. It is used to group topics together for a user.
|
25
|
+
attr_accessor :owner_id
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'first_user_message' => :'first_user_message',
|
31
|
+
:'name' => :'name',
|
32
|
+
:'owner_id' => :'owner_id'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'first_user_message' => :'String',
|
45
|
+
:'name' => :'String',
|
46
|
+
:'owner_id' => :'String'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# List of attributes with nullable: true
|
51
|
+
def self.openapi_nullable
|
52
|
+
Set.new([
|
53
|
+
:'first_user_message',
|
54
|
+
:'name',
|
55
|
+
])
|
56
|
+
end
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
60
|
+
def initialize(attributes = {})
|
61
|
+
if (!attributes.is_a?(Hash))
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::CreateTopicReqPayload` initialize method"
|
63
|
+
end
|
64
|
+
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
67
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::CreateTopicReqPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
69
|
+
end
|
70
|
+
h[k.to_sym] = v
|
71
|
+
}
|
72
|
+
|
73
|
+
if attributes.key?(:'first_user_message')
|
74
|
+
self.first_user_message = attributes[:'first_user_message']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'name')
|
78
|
+
self.name = attributes[:'name']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'owner_id')
|
82
|
+
self.owner_id = attributes[:'owner_id']
|
83
|
+
else
|
84
|
+
self.owner_id = nil
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
89
|
+
# @return Array for valid properties with the reasons
|
90
|
+
def list_invalid_properties
|
91
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
92
|
+
invalid_properties = Array.new
|
93
|
+
if @owner_id.nil?
|
94
|
+
invalid_properties.push('invalid value for "owner_id", owner_id cannot be nil.')
|
95
|
+
end
|
96
|
+
|
97
|
+
invalid_properties
|
98
|
+
end
|
99
|
+
|
100
|
+
# Check to see if the all the properties in the model are valid
|
101
|
+
# @return true if the model is valid
|
102
|
+
def valid?
|
103
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
104
|
+
return false if @owner_id.nil?
|
105
|
+
true
|
106
|
+
end
|
107
|
+
|
108
|
+
# Checks equality by comparing each attribute.
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def ==(o)
|
111
|
+
return true if self.equal?(o)
|
112
|
+
self.class == o.class &&
|
113
|
+
first_user_message == o.first_user_message &&
|
114
|
+
name == o.name &&
|
115
|
+
owner_id == o.owner_id
|
116
|
+
end
|
117
|
+
|
118
|
+
# @see the `==` method
|
119
|
+
# @param [Object] Object to be compared
|
120
|
+
def eql?(o)
|
121
|
+
self == o
|
122
|
+
end
|
123
|
+
|
124
|
+
# Calculates hash code according to all attributes.
|
125
|
+
# @return [Integer] Hash code
|
126
|
+
def hash
|
127
|
+
[first_user_message, name, owner_id].hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def self.build_from_hash(attributes)
|
134
|
+
return nil unless attributes.is_a?(Hash)
|
135
|
+
attributes = attributes.transform_keys(&:to_sym)
|
136
|
+
transformed_hash = {}
|
137
|
+
openapi_types.each_pair do |key, type|
|
138
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
139
|
+
transformed_hash["#{key}"] = nil
|
140
|
+
elsif type =~ /\AArray<(.*)>/i
|
141
|
+
# check to ensure the input is an array given that the attribute
|
142
|
+
# is documented as an array but the input is not
|
143
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
144
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
145
|
+
end
|
146
|
+
elsif !attributes[attribute_map[key]].nil?
|
147
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
148
|
+
end
|
149
|
+
end
|
150
|
+
new(transformed_hash)
|
151
|
+
end
|
152
|
+
|
153
|
+
# Deserializes the data based on type
|
154
|
+
# @param string type Data type
|
155
|
+
# @param string value Value to be deserialized
|
156
|
+
# @return [Object] Deserialized data
|
157
|
+
def self._deserialize(type, value)
|
158
|
+
case type.to_sym
|
159
|
+
when :Time
|
160
|
+
Time.parse(value)
|
161
|
+
when :Date
|
162
|
+
Date.parse(value)
|
163
|
+
when :String
|
164
|
+
value.to_s
|
165
|
+
when :Integer
|
166
|
+
value.to_i
|
167
|
+
when :Float
|
168
|
+
value.to_f
|
169
|
+
when :Boolean
|
170
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
171
|
+
true
|
172
|
+
else
|
173
|
+
false
|
174
|
+
end
|
175
|
+
when :Object
|
176
|
+
# generic object (usually a Hash), return directly
|
177
|
+
value
|
178
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
179
|
+
inner_type = Regexp.last_match[:inner_type]
|
180
|
+
value.map { |v| _deserialize(inner_type, v) }
|
181
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
182
|
+
k_type = Regexp.last_match[:k_type]
|
183
|
+
v_type = Regexp.last_match[:v_type]
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each do |k, v|
|
186
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
else # model
|
190
|
+
# models (e.g. Pet) or oneOf
|
191
|
+
klass = TrieveRubyClient.const_get(type)
|
192
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
# Returns the string representation of the object
|
197
|
+
# @return [String] String presentation of the object
|
198
|
+
def to_s
|
199
|
+
to_hash.to_s
|
200
|
+
end
|
201
|
+
|
202
|
+
# to_body is an alias to to_hash (backward compatibility)
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
204
|
+
def to_body
|
205
|
+
to_hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the object in the form of hash
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_hash
|
211
|
+
hash = {}
|
212
|
+
self.class.attribute_map.each_pair do |attr, param|
|
213
|
+
value = self.send(attr)
|
214
|
+
if value.nil?
|
215
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
216
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
217
|
+
end
|
218
|
+
|
219
|
+
hash[param] = _to_hash(value)
|
220
|
+
end
|
221
|
+
hash
|
222
|
+
end
|
223
|
+
|
224
|
+
# Outputs non-array value in the form of hash
|
225
|
+
# For object, use to_hash. Otherwise, just return the value
|
226
|
+
# @param [Object] value Any valid value
|
227
|
+
# @return [Hash] Returns the value in the form of hash
|
228
|
+
def _to_hash(value)
|
229
|
+
if value.is_a?(Array)
|
230
|
+
value.compact.map { |v| _to_hash(v) }
|
231
|
+
elsif value.is_a?(Hash)
|
232
|
+
{}.tap do |hash|
|
233
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
234
|
+
end
|
235
|
+
elsif value.respond_to? :to_hash
|
236
|
+
value.to_hash
|
237
|
+
else
|
238
|
+
value
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
end
|
243
|
+
|
244
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.10.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -19,6 +19,8 @@ module TrieveRubyClient
|
|
19
19
|
|
20
20
|
attr_accessor :created_at
|
21
21
|
|
22
|
+
attr_accessor :deleted
|
23
|
+
|
22
24
|
attr_accessor :id
|
23
25
|
|
24
26
|
attr_accessor :name
|
@@ -36,6 +38,7 @@ module TrieveRubyClient
|
|
36
38
|
{
|
37
39
|
:'client_configuration' => :'client_configuration',
|
38
40
|
:'created_at' => :'created_at',
|
41
|
+
:'deleted' => :'deleted',
|
39
42
|
:'id' => :'id',
|
40
43
|
:'name' => :'name',
|
41
44
|
:'organization_id' => :'organization_id',
|
@@ -55,6 +58,7 @@ module TrieveRubyClient
|
|
55
58
|
{
|
56
59
|
:'client_configuration' => :'Object',
|
57
60
|
:'created_at' => :'Time',
|
61
|
+
:'deleted' => :'Integer',
|
58
62
|
:'id' => :'String',
|
59
63
|
:'name' => :'String',
|
60
64
|
:'organization_id' => :'String',
|
@@ -100,6 +104,12 @@ module TrieveRubyClient
|
|
100
104
|
self.created_at = nil
|
101
105
|
end
|
102
106
|
|
107
|
+
if attributes.key?(:'deleted')
|
108
|
+
self.deleted = attributes[:'deleted']
|
109
|
+
else
|
110
|
+
self.deleted = nil
|
111
|
+
end
|
112
|
+
|
103
113
|
if attributes.key?(:'id')
|
104
114
|
self.id = attributes[:'id']
|
105
115
|
else
|
@@ -144,6 +154,10 @@ module TrieveRubyClient
|
|
144
154
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
145
155
|
end
|
146
156
|
|
157
|
+
if @deleted.nil?
|
158
|
+
invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
|
159
|
+
end
|
160
|
+
|
147
161
|
if @id.nil?
|
148
162
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
149
163
|
end
|
@@ -168,6 +182,7 @@ module TrieveRubyClient
|
|
168
182
|
def valid?
|
169
183
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
170
184
|
return false if @created_at.nil?
|
185
|
+
return false if @deleted.nil?
|
171
186
|
return false if @id.nil?
|
172
187
|
return false if @name.nil?
|
173
188
|
return false if @organization_id.nil?
|
@@ -182,6 +197,7 @@ module TrieveRubyClient
|
|
182
197
|
self.class == o.class &&
|
183
198
|
client_configuration == o.client_configuration &&
|
184
199
|
created_at == o.created_at &&
|
200
|
+
deleted == o.deleted &&
|
185
201
|
id == o.id &&
|
186
202
|
name == o.name &&
|
187
203
|
organization_id == o.organization_id &&
|
@@ -199,7 +215,7 @@ module TrieveRubyClient
|
|
199
215
|
# Calculates hash code according to all attributes.
|
200
216
|
# @return [Integer] Hash code
|
201
217
|
def hash
|
202
|
-
[client_configuration, created_at, id, name, organization_id, server_configuration, tracking_id, updated_at].hash
|
218
|
+
[client_configuration, created_at, deleted, id, name, organization_id, server_configuration, tracking_id, updated_at].hash
|
203
219
|
end
|
204
220
|
|
205
221
|
# Builds the object from hash
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.10.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.10.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.10.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -0,0 +1,245 @@
|
|
1
|
+
=begin
|
2
|
+
#Trieve API
|
3
|
+
|
4
|
+
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.10.7
|
7
|
+
Contact: developers@trieve.ai
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module TrieveRubyClient
|
17
|
+
class DateRange
|
18
|
+
attr_accessor :gt
|
19
|
+
|
20
|
+
attr_accessor :gte
|
21
|
+
|
22
|
+
attr_accessor :lt
|
23
|
+
|
24
|
+
attr_accessor :lte
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'gt' => :'gt',
|
30
|
+
:'gte' => :'gte',
|
31
|
+
:'lt' => :'lt',
|
32
|
+
:'lte' => :'lte'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'gt' => :'String',
|
45
|
+
:'gte' => :'String',
|
46
|
+
:'lt' => :'String',
|
47
|
+
:'lte' => :'String'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
:'gt',
|
55
|
+
:'gte',
|
56
|
+
:'lt',
|
57
|
+
:'lte'
|
58
|
+
])
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
if (!attributes.is_a?(Hash))
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::DateRange` initialize method"
|
66
|
+
end
|
67
|
+
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::DateRange`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
|
+
end
|
73
|
+
h[k.to_sym] = v
|
74
|
+
}
|
75
|
+
|
76
|
+
if attributes.key?(:'gt')
|
77
|
+
self.gt = attributes[:'gt']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'gte')
|
81
|
+
self.gte = attributes[:'gte']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'lt')
|
85
|
+
self.lt = attributes[:'lt']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'lte')
|
89
|
+
self.lte = attributes[:'lte']
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
94
|
+
# @return Array for valid properties with the reasons
|
95
|
+
def list_invalid_properties
|
96
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
97
|
+
invalid_properties = Array.new
|
98
|
+
invalid_properties
|
99
|
+
end
|
100
|
+
|
101
|
+
# Check to see if the all the properties in the model are valid
|
102
|
+
# @return true if the model is valid
|
103
|
+
def valid?
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
105
|
+
true
|
106
|
+
end
|
107
|
+
|
108
|
+
# Checks equality by comparing each attribute.
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def ==(o)
|
111
|
+
return true if self.equal?(o)
|
112
|
+
self.class == o.class &&
|
113
|
+
gt == o.gt &&
|
114
|
+
gte == o.gte &&
|
115
|
+
lt == o.lt &&
|
116
|
+
lte == o.lte
|
117
|
+
end
|
118
|
+
|
119
|
+
# @see the `==` method
|
120
|
+
# @param [Object] Object to be compared
|
121
|
+
def eql?(o)
|
122
|
+
self == o
|
123
|
+
end
|
124
|
+
|
125
|
+
# Calculates hash code according to all attributes.
|
126
|
+
# @return [Integer] Hash code
|
127
|
+
def hash
|
128
|
+
[gt, gte, lt, lte].hash
|
129
|
+
end
|
130
|
+
|
131
|
+
# Builds the object from hash
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
133
|
+
# @return [Object] Returns the model itself
|
134
|
+
def self.build_from_hash(attributes)
|
135
|
+
return nil unless attributes.is_a?(Hash)
|
136
|
+
attributes = attributes.transform_keys(&:to_sym)
|
137
|
+
transformed_hash = {}
|
138
|
+
openapi_types.each_pair do |key, type|
|
139
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
140
|
+
transformed_hash["#{key}"] = nil
|
141
|
+
elsif type =~ /\AArray<(.*)>/i
|
142
|
+
# check to ensure the input is an array given that the attribute
|
143
|
+
# is documented as an array but the input is not
|
144
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
145
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
146
|
+
end
|
147
|
+
elsif !attributes[attribute_map[key]].nil?
|
148
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
149
|
+
end
|
150
|
+
end
|
151
|
+
new(transformed_hash)
|
152
|
+
end
|
153
|
+
|
154
|
+
# Deserializes the data based on type
|
155
|
+
# @param string type Data type
|
156
|
+
# @param string value Value to be deserialized
|
157
|
+
# @return [Object] Deserialized data
|
158
|
+
def self._deserialize(type, value)
|
159
|
+
case type.to_sym
|
160
|
+
when :Time
|
161
|
+
Time.parse(value)
|
162
|
+
when :Date
|
163
|
+
Date.parse(value)
|
164
|
+
when :String
|
165
|
+
value.to_s
|
166
|
+
when :Integer
|
167
|
+
value.to_i
|
168
|
+
when :Float
|
169
|
+
value.to_f
|
170
|
+
when :Boolean
|
171
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
172
|
+
true
|
173
|
+
else
|
174
|
+
false
|
175
|
+
end
|
176
|
+
when :Object
|
177
|
+
# generic object (usually a Hash), return directly
|
178
|
+
value
|
179
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
180
|
+
inner_type = Regexp.last_match[:inner_type]
|
181
|
+
value.map { |v| _deserialize(inner_type, v) }
|
182
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
183
|
+
k_type = Regexp.last_match[:k_type]
|
184
|
+
v_type = Regexp.last_match[:v_type]
|
185
|
+
{}.tap do |hash|
|
186
|
+
value.each do |k, v|
|
187
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
else # model
|
191
|
+
# models (e.g. Pet) or oneOf
|
192
|
+
klass = TrieveRubyClient.const_get(type)
|
193
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
# Returns the string representation of the object
|
198
|
+
# @return [String] String presentation of the object
|
199
|
+
def to_s
|
200
|
+
to_hash.to_s
|
201
|
+
end
|
202
|
+
|
203
|
+
# to_body is an alias to to_hash (backward compatibility)
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
205
|
+
def to_body
|
206
|
+
to_hash
|
207
|
+
end
|
208
|
+
|
209
|
+
# Returns the object in the form of hash
|
210
|
+
# @return [Hash] Returns the object in the form of hash
|
211
|
+
def to_hash
|
212
|
+
hash = {}
|
213
|
+
self.class.attribute_map.each_pair do |attr, param|
|
214
|
+
value = self.send(attr)
|
215
|
+
if value.nil?
|
216
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
217
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
218
|
+
end
|
219
|
+
|
220
|
+
hash[param] = _to_hash(value)
|
221
|
+
end
|
222
|
+
hash
|
223
|
+
end
|
224
|
+
|
225
|
+
# Outputs non-array value in the form of hash
|
226
|
+
# For object, use to_hash. Otherwise, just return the value
|
227
|
+
# @param [Object] value Any valid value
|
228
|
+
# @return [Hash] Returns the value in the form of hash
|
229
|
+
def _to_hash(value)
|
230
|
+
if value.is_a?(Array)
|
231
|
+
value.compact.map { |v| _to_hash(v) }
|
232
|
+
elsif value.is_a?(Hash)
|
233
|
+
{}.tap do |hash|
|
234
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
235
|
+
end
|
236
|
+
elsif value.respond_to? :to_hash
|
237
|
+
value.to_hash
|
238
|
+
else
|
239
|
+
value
|
240
|
+
end
|
241
|
+
end
|
242
|
+
|
243
|
+
end
|
244
|
+
|
245
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.10.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.10.7
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.8.
|
6
|
+
The version of the OpenAPI document: 0.8.5
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|