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.
Files changed (219) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -30
  3. data/docs/ApiKeyRespBody.md +32 -0
  4. data/docs/AutocompleteData.md +42 -0
  5. data/docs/AutocompleteReqPayload.md +50 -0
  6. data/docs/BoostPhrase.md +20 -0
  7. data/docs/ChunkApi.md +140 -66
  8. data/docs/ChunkData.md +3 -1
  9. data/docs/ChunkFilter.md +3 -3
  10. data/docs/ChunkGroup.md +1 -1
  11. data/docs/ChunkGroupApi.md +35 -33
  12. data/docs/ChunkMetadata.md +5 -1
  13. data/docs/ChunkMetadataStringTagSet.md +46 -0
  14. data/docs/ChunkMetadataTypes.md +51 -0
  15. data/docs/ChunkReqPayload.md +50 -0
  16. data/docs/ClientDatasetConfiguration.md +0 -2
  17. data/docs/ConditionType.md +49 -0
  18. data/docs/ContentChunkMetadata.md +32 -0
  19. data/docs/CreateChunkGroupReqPayload.md +28 -0
  20. data/docs/CreateChunkReqPayloadEnum.md +49 -0
  21. data/docs/CreateDatasetRequest.md +2 -2
  22. data/docs/CreateMessageData.md +2 -2
  23. data/docs/CreateMessageReqPayload.md +42 -0
  24. data/docs/CreateTopicReqPayload.md +22 -0
  25. data/docs/Dataset.md +2 -0
  26. data/docs/DatasetApi.md +236 -12
  27. data/docs/DateRange.md +24 -0
  28. data/docs/EditMessageReqPayload.md +44 -0
  29. data/docs/FieldCondition.md +2 -0
  30. data/docs/File.md +1 -1
  31. data/docs/FileApi.md +7 -7
  32. data/docs/GenerateChunksRequest.md +2 -0
  33. data/docs/GetDatasetsPagination.md +20 -0
  34. data/docs/HasIDCondition.md +20 -0
  35. data/docs/InvitationApi.md +1 -1
  36. data/docs/MatchCondition.md +3 -1
  37. data/docs/MessageApi.md +42 -42
  38. data/docs/Organization.md +2 -0
  39. data/docs/OrganizationApi.md +24 -25
  40. data/docs/RangeCondition.md +1 -3
  41. data/docs/RegenerateMessageReqPayload.md +40 -0
  42. data/docs/RemoveChunkFromGroupReqPayload.md +18 -0
  43. data/docs/ScoreChunkDTO.md +3 -1
  44. data/docs/SearchChunkData.md +9 -3
  45. data/docs/SearchChunksReqPayload.md +54 -0
  46. data/docs/SearchOverGroupsData.md +10 -2
  47. data/docs/SearchWithinGroupData.md +12 -2
  48. data/docs/SetUserApiKeyRequest.md +4 -0
  49. data/docs/SlimChunkMetadata.md +4 -0
  50. data/docs/SuggestedQueriesReqPayload.md +18 -0
  51. data/docs/TopicApi.md +16 -16
  52. data/docs/UpdateChunkData.md +2 -0
  53. data/docs/UpdateChunkReqPayload.md +46 -0
  54. data/docs/UpdateDatasetRequest.md +2 -0
  55. data/docs/UpdateGroupByTrackingIDReqPayload.md +26 -0
  56. data/docs/UpdateTopicReqPayload.md +20 -0
  57. data/docs/UpdateUserOrgRoleData.md +1 -1
  58. data/docs/UploadFileReqPayload.md +40 -0
  59. data/docs/UserApi.md +7 -8
  60. data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
  61. data/lib/trieve_ruby_client/api/chunk_api.rb +158 -83
  62. data/lib/trieve_ruby_client/api/chunk_group_api.rb +58 -51
  63. data/lib/trieve_ruby_client/api/dataset_api.rb +224 -15
  64. data/lib/trieve_ruby_client/api/events_api.rb +1 -1
  65. data/lib/trieve_ruby_client/api/file_api.rb +12 -12
  66. data/lib/trieve_ruby_client/api/health_api.rb +1 -1
  67. data/lib/trieve_ruby_client/api/invitation_api.rb +3 -3
  68. data/lib/trieve_ruby_client/api/message_api.rb +50 -50
  69. data/lib/trieve_ruby_client/api/organization_api.rb +27 -27
  70. data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
  71. data/lib/trieve_ruby_client/api/topic_api.rb +27 -27
  72. data/lib/trieve_ruby_client/api/user_api.rb +8 -8
  73. data/lib/trieve_ruby_client/api_client.rb +1 -1
  74. data/lib/trieve_ruby_client/api_error.rb +1 -1
  75. data/lib/trieve_ruby_client/configuration.rb +1 -1
  76. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
  77. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  78. data/lib/trieve_ruby_client/models/api_key_resp_body.rb +325 -0
  79. data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
  80. data/lib/trieve_ruby_client/models/autocomplete_data.rb +378 -0
  81. data/lib/trieve_ruby_client/models/autocomplete_req_payload.rb +467 -0
  82. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
  83. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  84. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
  85. data/lib/trieve_ruby_client/models/boost_phrase.rb +240 -0
  86. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
  87. data/lib/trieve_ruby_client/models/chunk_data.rb +16 -9
  88. data/lib/trieve_ruby_client/models/chunk_filter.rb +4 -4
  89. data/lib/trieve_ruby_client/models/chunk_group.rb +5 -3
  90. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  91. data/lib/trieve_ruby_client/models/chunk_metadata.rb +28 -4
  92. data/lib/trieve_ruby_client/models/chunk_metadata_string_tag_set.rb +387 -0
  93. data/lib/trieve_ruby_client/models/chunk_metadata_types.rb +106 -0
  94. data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +1 -1
  95. data/lib/trieve_ruby_client/models/chunk_req_payload.rb +400 -0
  96. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +2 -18
  97. data/lib/trieve_ruby_client/models/condition_type.rb +105 -0
  98. data/lib/trieve_ruby_client/models/content_chunk_metadata.rb +299 -0
  99. data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
  100. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
  101. data/lib/trieve_ruby_client/models/create_chunk_group_req_payload.rb +273 -0
  102. data/lib/trieve_ruby_client/models/create_chunk_req_payload_enum.rb +105 -0
  103. data/lib/trieve_ruby_client/models/create_dataset_request.rb +3 -3
  104. data/lib/trieve_ruby_client/models/create_message_data.rb +13 -13
  105. data/lib/trieve_ruby_client/models/create_message_req_payload.rb +378 -0
  106. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  107. data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
  108. data/lib/trieve_ruby_client/models/create_topic_req_payload.rb +244 -0
  109. data/lib/trieve_ruby_client/models/dataset.rb +18 -2
  110. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  111. data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
  112. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  113. data/lib/trieve_ruby_client/models/date_range.rb +245 -0
  114. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  115. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  116. data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
  117. data/lib/trieve_ruby_client/models/edit_message_req_payload.rb +395 -0
  118. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  119. data/lib/trieve_ruby_client/models/event.rb +1 -1
  120. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  121. data/lib/trieve_ruby_client/models/field_condition.rb +12 -2
  122. data/lib/trieve_ruby_client/models/file.rb +5 -3
  123. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  124. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +13 -2
  125. data/lib/trieve_ruby_client/models/geo_info.rb +1 -1
  126. data/lib/trieve_ruby_client/models/geo_types.rb +1 -1
  127. data/lib/trieve_ruby_client/models/get_chunks_data.rb +1 -1
  128. data/lib/trieve_ruby_client/models/get_datasets_pagination.rb +225 -0
  129. data/lib/trieve_ruby_client/models/get_events_data.rb +1 -1
  130. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  131. data/lib/trieve_ruby_client/models/get_tracking_chunks_data.rb +1 -1
  132. data/lib/trieve_ruby_client/models/group_data.rb +1 -1
  133. data/lib/trieve_ruby_client/models/group_score_chunk.rb +1 -1
  134. data/lib/trieve_ruby_client/models/has_id_condition.rb +229 -0
  135. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  136. data/lib/trieve_ruby_client/models/location_bounding_box.rb +1 -1
  137. data/lib/trieve_ruby_client/models/location_polygon.rb +1 -1
  138. data/lib/trieve_ruby_client/models/location_radius.rb +1 -1
  139. data/lib/trieve_ruby_client/models/match_condition.rb +2 -1
  140. data/lib/trieve_ruby_client/models/message.rb +1 -1
  141. data/lib/trieve_ruby_client/models/organization.rb +18 -2
  142. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  143. data/lib/trieve_ruby_client/models/range.rb +1 -1
  144. data/lib/trieve_ruby_client/models/range_condition.rb +2 -3
  145. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
  146. data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +1 -1
  147. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
  148. data/lib/trieve_ruby_client/models/regenerate_message_req_payload.rb +361 -0
  149. data/lib/trieve_ruby_client/models/remove_chunk_from_group_req_payload.rb +222 -0
  150. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
  151. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +15 -3
  152. data/lib/trieve_ruby_client/models/search_chunk_data.rb +40 -5
  153. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  154. data/lib/trieve_ruby_client/models/search_chunks_req_payload.rb +504 -0
  155. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +93 -4
  156. data/lib/trieve_ruby_client/models/search_over_groups_results.rb +1 -1
  157. data/lib/trieve_ruby_client/models/search_within_group_data.rb +106 -4
  158. data/lib/trieve_ruby_client/models/search_within_group_results.rb +1 -1
  159. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +28 -2
  160. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  161. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
  162. data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +24 -2
  163. data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +1 -1
  164. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  165. data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
  166. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  167. data/lib/trieve_ruby_client/models/suggested_queries_req_payload.rb +222 -0
  168. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  169. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  170. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  171. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  172. data/lib/trieve_ruby_client/models/update_chunk_data.rb +15 -2
  173. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
  174. data/lib/trieve_ruby_client/models/update_chunk_req_payload.rb +376 -0
  175. data/lib/trieve_ruby_client/models/update_dataset_request.rb +13 -2
  176. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  177. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_req_payload.rb +268 -0
  178. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  179. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  180. data/lib/trieve_ruby_client/models/update_topic_req_payload.rb +239 -0
  181. data/lib/trieve_ruby_client/models/update_user_org_role_data.rb +2 -2
  182. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  183. data/lib/trieve_ruby_client/models/upload_file_req_payload.rb +368 -0
  184. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  185. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  186. data/lib/trieve_ruby_client/version.rb +2 -2
  187. data/lib/trieve_ruby_client.rb +25 -20
  188. data/openapi-generator.yaml +1 -1
  189. data/openapi.json +1 -7789
  190. data/spec/models/api_key_resp_body_spec.rb +78 -0
  191. data/spec/models/autocomplete_data_spec.rb +108 -0
  192. data/spec/models/autocomplete_req_payload_spec.rb +132 -0
  193. data/spec/models/boost_phrase_spec.rb +42 -0
  194. data/spec/models/chunk_metadata_string_tag_set_spec.rb +120 -0
  195. data/spec/models/chunk_metadata_types_spec.rb +32 -0
  196. data/spec/models/chunk_req_payload_spec.rb +132 -0
  197. data/spec/models/condition_type_spec.rb +32 -0
  198. data/spec/models/content_chunk_metadata_spec.rb +72 -0
  199. data/spec/models/create_chunk_group_req_payload_spec.rb +66 -0
  200. data/spec/models/create_chunk_req_payload_enum_spec.rb +32 -0
  201. data/spec/models/create_message_req_payload_spec.rb +108 -0
  202. data/spec/models/create_topic_req_payload_spec.rb +48 -0
  203. data/spec/models/date_range_spec.rb +54 -0
  204. data/spec/models/edit_message_req_payload_spec.rb +114 -0
  205. data/spec/models/get_datasets_pagination_spec.rb +42 -0
  206. data/spec/models/has_id_condition_spec.rb +42 -0
  207. data/spec/models/regenerate_message_req_payload_spec.rb +102 -0
  208. data/spec/models/remove_chunk_from_group_req_payload_spec.rb +36 -0
  209. data/spec/models/search_chunks_req_payload_spec.rb +144 -0
  210. data/spec/models/suggested_queries_req_payload_spec.rb +36 -0
  211. data/spec/models/update_chunk_req_payload_spec.rb +120 -0
  212. data/spec/models/update_group_by_tracking_id_req_payload_spec.rb +60 -0
  213. data/spec/models/update_topic_req_payload_spec.rb +42 -0
  214. data/spec/models/upload_file_req_payload_spec.rb +102 -0
  215. data/spec/spec_helper.rb +1 -1
  216. data/trieve_ruby_client-0.8.2.gem +0 -0
  217. data/trieve_ruby_client-0.8.5.gem +0 -0
  218. data/trieve_ruby_client.gemspec +1 -1
  219. metadata +104 -2
@@ -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.2
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
@@ -20,23 +20,23 @@ module TrieveRubyClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create Topic
23
- # Create Topic Create a new chat topic. Topics are attached to a owner_id's and act as a coordinator for conversation message history of gen-AI chat sessions.
23
+ # Create Topic Create a new chat topic. Topics are attached to a owner_id's and act as a coordinator for conversation message history of gen-AI chat sessions. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
24
24
  # @param tr_dataset [String] The dataset id to use for the request
25
- # @param create_topic_data [CreateTopicData] JSON request payload to create chat topic
25
+ # @param create_topic_req_payload [CreateTopicReqPayload] JSON request payload to create chat topic
26
26
  # @param [Hash] opts the optional parameters
27
27
  # @return [Topic]
28
- def create_topic(tr_dataset, create_topic_data, opts = {})
29
- data, _status_code, _headers = create_topic_with_http_info(tr_dataset, create_topic_data, opts)
28
+ def create_topic(tr_dataset, create_topic_req_payload, opts = {})
29
+ data, _status_code, _headers = create_topic_with_http_info(tr_dataset, create_topic_req_payload, opts)
30
30
  data
31
31
  end
32
32
 
33
33
  # Create Topic
34
- # Create Topic Create a new chat topic. Topics are attached to a owner_id's and act as a coordinator for conversation message history of gen-AI chat sessions.
34
+ # Create Topic Create a new chat topic. Topics are attached to a owner_id's and act as a coordinator for conversation message history of gen-AI chat sessions. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
35
35
  # @param tr_dataset [String] The dataset id to use for the request
36
- # @param create_topic_data [CreateTopicData] JSON request payload to create chat topic
36
+ # @param create_topic_req_payload [CreateTopicReqPayload] JSON request payload to create chat topic
37
37
  # @param [Hash] opts the optional parameters
38
38
  # @return [Array<(Topic, Integer, Hash)>] Topic data, response status code and response headers
39
- def create_topic_with_http_info(tr_dataset, create_topic_data, opts = {})
39
+ def create_topic_with_http_info(tr_dataset, create_topic_req_payload, opts = {})
40
40
  if @api_client.config.debugging
41
41
  @api_client.config.logger.debug 'Calling API: TopicApi.create_topic ...'
42
42
  end
@@ -44,9 +44,9 @@ module TrieveRubyClient
44
44
  if @api_client.config.client_side_validation && tr_dataset.nil?
45
45
  fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling TopicApi.create_topic"
46
46
  end
47
- # verify the required parameter 'create_topic_data' is set
48
- if @api_client.config.client_side_validation && create_topic_data.nil?
49
- fail ArgumentError, "Missing the required parameter 'create_topic_data' when calling TopicApi.create_topic"
47
+ # verify the required parameter 'create_topic_req_payload' is set
48
+ if @api_client.config.client_side_validation && create_topic_req_payload.nil?
49
+ fail ArgumentError, "Missing the required parameter 'create_topic_req_payload' when calling TopicApi.create_topic"
50
50
  end
51
51
  # resource path
52
52
  local_var_path = '/api/topic'
@@ -69,7 +69,7 @@ module TrieveRubyClient
69
69
  form_params = opts[:form_params] || {}
70
70
 
71
71
  # http body (model)
72
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_topic_data)
72
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_topic_req_payload)
73
73
 
74
74
  # return_type
75
75
  return_type = opts[:debug_return_type] || 'Topic'
@@ -95,7 +95,7 @@ module TrieveRubyClient
95
95
  end
96
96
 
97
97
  # Delete Topic
98
- # Delete Topic Delete an existing chat topic. When a topic is deleted, all associated chat messages are also deleted.
98
+ # Delete Topic Delete an existing chat topic. When a topic is deleted, all associated chat messages are also deleted. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
99
99
  # @param tr_dataset [String] The dataset id to use for the request
100
100
  # @param topic_id [String] The id of the topic you want to delete.
101
101
  # @param [Hash] opts the optional parameters
@@ -106,7 +106,7 @@ module TrieveRubyClient
106
106
  end
107
107
 
108
108
  # Delete Topic
109
- # Delete Topic Delete an existing chat topic. When a topic is deleted, all associated chat messages are also deleted.
109
+ # Delete Topic Delete an existing chat topic. When a topic is deleted, all associated chat messages are also deleted. Auth&#39;ed user or api key must have an admin or owner role for the specified dataset&#39;s organization.
110
110
  # @param tr_dataset [String] The dataset id to use for the request
111
111
  # @param topic_id [String] The id of the topic you want to delete.
112
112
  # @param [Hash] opts the optional parameters
@@ -165,7 +165,7 @@ module TrieveRubyClient
165
165
  end
166
166
 
167
167
  # Get All Topics for Owner ID
168
- # Get All Topics for Owner ID Get all topics belonging to an arbitary owner_id. This is useful for managing message history and chat sessions. It is common to use a browser fingerprint or your user's id as the owner_id.
168
+ # Get All Topics for Owner ID Get all topics belonging to an arbitary owner_id. This is useful for managing message history and chat sessions. It is common to use a browser fingerprint or your user's id as the owner_id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
169
169
  # @param owner_id [String] The owner_id to get topics of; A common approach is to use a browser fingerprint or your user&#39;s id
170
170
  # @param tr_dataset [String] The dataset id to use for the request
171
171
  # @param [Hash] opts the optional parameters
@@ -176,7 +176,7 @@ module TrieveRubyClient
176
176
  end
177
177
 
178
178
  # Get All Topics for Owner ID
179
- # Get All Topics for Owner ID Get all topics belonging to an arbitary owner_id. This is useful for managing message history and chat sessions. It is common to use a browser fingerprint or your user&#39;s id as the owner_id.
179
+ # Get All Topics for Owner ID Get all topics belonging to an arbitary owner_id. This is useful for managing message history and chat sessions. It is common to use a browser fingerprint or your user&#39;s id as the owner_id. Auth&#39;ed user or api key must have an admin or owner role for the specified dataset&#39;s organization.
180
180
  # @param owner_id [String] The owner_id to get topics of; A common approach is to use a browser fingerprint or your user&#39;s id
181
181
  # @param tr_dataset [String] The dataset id to use for the request
182
182
  # @param [Hash] opts the optional parameters
@@ -235,23 +235,23 @@ module TrieveRubyClient
235
235
  end
236
236
 
237
237
  # Update Topic
238
- # Update Topic Update an existing chat topic. Currently, only the name of the topic can be updated.
238
+ # Update Topic Update an existing chat topic. Currently, only the name of the topic can be updated. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
239
239
  # @param tr_dataset [String] The dataset id to use for the request
240
- # @param update_topic_data [UpdateTopicData] JSON request payload to update a chat topic
240
+ # @param update_topic_req_payload [UpdateTopicReqPayload] JSON request payload to update a chat topic
241
241
  # @param [Hash] opts the optional parameters
242
242
  # @return [nil]
243
- def update_topic(tr_dataset, update_topic_data, opts = {})
244
- update_topic_with_http_info(tr_dataset, update_topic_data, opts)
243
+ def update_topic(tr_dataset, update_topic_req_payload, opts = {})
244
+ update_topic_with_http_info(tr_dataset, update_topic_req_payload, opts)
245
245
  nil
246
246
  end
247
247
 
248
248
  # Update Topic
249
- # Update Topic Update an existing chat topic. Currently, only the name of the topic can be updated.
249
+ # Update Topic Update an existing chat topic. Currently, only the name of the topic can be updated. Auth&#39;ed user or api key must have an admin or owner role for the specified dataset&#39;s organization.
250
250
  # @param tr_dataset [String] The dataset id to use for the request
251
- # @param update_topic_data [UpdateTopicData] JSON request payload to update a chat topic
251
+ # @param update_topic_req_payload [UpdateTopicReqPayload] JSON request payload to update a chat topic
252
252
  # @param [Hash] opts the optional parameters
253
253
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
254
- def update_topic_with_http_info(tr_dataset, update_topic_data, opts = {})
254
+ def update_topic_with_http_info(tr_dataset, update_topic_req_payload, opts = {})
255
255
  if @api_client.config.debugging
256
256
  @api_client.config.logger.debug 'Calling API: TopicApi.update_topic ...'
257
257
  end
@@ -259,9 +259,9 @@ module TrieveRubyClient
259
259
  if @api_client.config.client_side_validation && tr_dataset.nil?
260
260
  fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling TopicApi.update_topic"
261
261
  end
262
- # verify the required parameter 'update_topic_data' is set
263
- if @api_client.config.client_side_validation && update_topic_data.nil?
264
- fail ArgumentError, "Missing the required parameter 'update_topic_data' when calling TopicApi.update_topic"
262
+ # verify the required parameter 'update_topic_req_payload' is set
263
+ if @api_client.config.client_side_validation && update_topic_req_payload.nil?
264
+ fail ArgumentError, "Missing the required parameter 'update_topic_req_payload' when calling TopicApi.update_topic"
265
265
  end
266
266
  # resource path
267
267
  local_var_path = '/api/topic'
@@ -284,7 +284,7 @@ module TrieveRubyClient
284
284
  form_params = opts[:form_params] || {}
285
285
 
286
286
  # http body (model)
287
- post_body = opts[:debug_body] || @api_client.object_to_http_body(update_topic_data)
287
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_topic_req_payload)
288
288
 
289
289
  # return_type
290
290
  return_type = opts[:debug_return_type]
@@ -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.2
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
@@ -23,17 +23,17 @@ module TrieveRubyClient
23
23
  # Delete User Api Key Delete an api key for the auth'ed user.
24
24
  # @param api_key_id [String] The id of the api key to delete
25
25
  # @param [Hash] opts the optional parameters
26
- # @return [Array<ApiKeyDTO>]
26
+ # @return [nil]
27
27
  def delete_user_api_key(api_key_id, opts = {})
28
- data, _status_code, _headers = delete_user_api_key_with_http_info(api_key_id, opts)
29
- data
28
+ delete_user_api_key_with_http_info(api_key_id, opts)
29
+ nil
30
30
  end
31
31
 
32
32
  # Delete User Api Key
33
33
  # Delete User Api Key Delete an api key for the auth&#39;ed user.
34
34
  # @param api_key_id [String] The id of the api key to delete
35
35
  # @param [Hash] opts the optional parameters
36
- # @return [Array<(Array<ApiKeyDTO>, Integer, Hash)>] Array<ApiKeyDTO> data, response status code and response headers
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
37
  def delete_user_api_key_with_http_info(api_key_id, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: UserApi.delete_user_api_key ...'
@@ -60,7 +60,7 @@ module TrieveRubyClient
60
60
  post_body = opts[:debug_body]
61
61
 
62
62
  # return_type
63
- return_type = opts[:debug_return_type] || 'Array<ApiKeyDTO>'
63
+ return_type = opts[:debug_return_type]
64
64
 
65
65
  # auth_names
66
66
  auth_names = opts[:debug_auth_names] || ['ApiKey']
@@ -151,7 +151,7 @@ module TrieveRubyClient
151
151
  end
152
152
 
153
153
  # Update User
154
- # Update User Update a user's information. If the user_id is not provided, the auth'ed user will be updated. If the user_id is provided, the auth'ed user must be an admin (1) or owner (2) of the organization.
154
+ # Update User Update a user's information. If the user_id is not provided, the auth'ed user will be updated. If the user_id is provided, the role of the auth'ed user or api key must be an admin (1) or owner (2) of the organization.
155
155
  # @param update_user_org_role_data [UpdateUserOrgRoleData] JSON request payload to update user information for the auth&#39;ed user
156
156
  # @param [Hash] opts the optional parameters
157
157
  # @return [nil]
@@ -161,7 +161,7 @@ module TrieveRubyClient
161
161
  end
162
162
 
163
163
  # Update User
164
- # Update User Update a user&#39;s information. If the user_id is not provided, the auth&#39;ed user will be updated. If the user_id is provided, the auth&#39;ed user must be an admin (1) or owner (2) of the organization.
164
+ # Update User Update a user&#39;s information. If the user_id is not provided, the auth&#39;ed user will be updated. If the user_id is provided, the role of the auth&#39;ed user or api key must be an admin (1) or owner (2) of the organization.
165
165
  # @param update_user_org_role_data [UpdateUserOrgRoleData] JSON request payload to update user information for the auth&#39;ed user
166
166
  # @param [Hash] opts the optional parameters
167
167
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -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.2
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.2
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.2
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.2
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.2
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
@@ -0,0 +1,325 @@
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 ApiKeyRespBody
18
+ attr_accessor :created_at
19
+
20
+ attr_accessor :dataset_ids
21
+
22
+ attr_accessor :id
23
+
24
+ attr_accessor :name
25
+
26
+ attr_accessor :organization_ids
27
+
28
+ attr_accessor :role
29
+
30
+ attr_accessor :updated_at
31
+
32
+ attr_accessor :user_id
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'created_at' => :'created_at',
38
+ :'dataset_ids' => :'dataset_ids',
39
+ :'id' => :'id',
40
+ :'name' => :'name',
41
+ :'organization_ids' => :'organization_ids',
42
+ :'role' => :'role',
43
+ :'updated_at' => :'updated_at',
44
+ :'user_id' => :'user_id'
45
+ }
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'created_at' => :'Time',
57
+ :'dataset_ids' => :'Array<String>',
58
+ :'id' => :'String',
59
+ :'name' => :'String',
60
+ :'organization_ids' => :'Array<String>',
61
+ :'role' => :'Integer',
62
+ :'updated_at' => :'Time',
63
+ :'user_id' => :'String'
64
+ }
65
+ end
66
+
67
+ # List of attributes with nullable: true
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ :'dataset_ids',
71
+ :'organization_ids',
72
+ ])
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ if (!attributes.is_a?(Hash))
79
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::ApiKeyRespBody` initialize method"
80
+ end
81
+
82
+ # check to see if the attribute exists and convert string to symbol for hash key
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!self.class.attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::ApiKeyRespBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'created_at')
91
+ self.created_at = attributes[:'created_at']
92
+ else
93
+ self.created_at = nil
94
+ end
95
+
96
+ if attributes.key?(:'dataset_ids')
97
+ if (value = attributes[:'dataset_ids']).is_a?(Array)
98
+ self.dataset_ids = value
99
+ end
100
+ end
101
+
102
+ if attributes.key?(:'id')
103
+ self.id = attributes[:'id']
104
+ else
105
+ self.id = nil
106
+ end
107
+
108
+ if attributes.key?(:'name')
109
+ self.name = attributes[:'name']
110
+ else
111
+ self.name = nil
112
+ end
113
+
114
+ if attributes.key?(:'organization_ids')
115
+ if (value = attributes[:'organization_ids']).is_a?(Array)
116
+ self.organization_ids = value
117
+ end
118
+ end
119
+
120
+ if attributes.key?(:'role')
121
+ self.role = attributes[:'role']
122
+ else
123
+ self.role = nil
124
+ end
125
+
126
+ if attributes.key?(:'updated_at')
127
+ self.updated_at = attributes[:'updated_at']
128
+ else
129
+ self.updated_at = nil
130
+ end
131
+
132
+ if attributes.key?(:'user_id')
133
+ self.user_id = attributes[:'user_id']
134
+ else
135
+ self.user_id = nil
136
+ end
137
+ end
138
+
139
+ # Show invalid properties with the reasons. Usually used together with valid?
140
+ # @return Array for valid properties with the reasons
141
+ def list_invalid_properties
142
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
143
+ invalid_properties = Array.new
144
+ if @created_at.nil?
145
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
146
+ end
147
+
148
+ if @id.nil?
149
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
150
+ end
151
+
152
+ if @name.nil?
153
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
154
+ end
155
+
156
+ if @role.nil?
157
+ invalid_properties.push('invalid value for "role", role cannot be nil.')
158
+ end
159
+
160
+ if @updated_at.nil?
161
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
162
+ end
163
+
164
+ if @user_id.nil?
165
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
166
+ end
167
+
168
+ invalid_properties
169
+ end
170
+
171
+ # Check to see if the all the properties in the model are valid
172
+ # @return true if the model is valid
173
+ def valid?
174
+ warn '[DEPRECATED] the `valid?` method is obsolete'
175
+ return false if @created_at.nil?
176
+ return false if @id.nil?
177
+ return false if @name.nil?
178
+ return false if @role.nil?
179
+ return false if @updated_at.nil?
180
+ return false if @user_id.nil?
181
+ true
182
+ end
183
+
184
+ # Checks equality by comparing each attribute.
185
+ # @param [Object] Object to be compared
186
+ def ==(o)
187
+ return true if self.equal?(o)
188
+ self.class == o.class &&
189
+ created_at == o.created_at &&
190
+ dataset_ids == o.dataset_ids &&
191
+ id == o.id &&
192
+ name == o.name &&
193
+ organization_ids == o.organization_ids &&
194
+ role == o.role &&
195
+ updated_at == o.updated_at &&
196
+ user_id == o.user_id
197
+ end
198
+
199
+ # @see the `==` method
200
+ # @param [Object] Object to be compared
201
+ def eql?(o)
202
+ self == o
203
+ end
204
+
205
+ # Calculates hash code according to all attributes.
206
+ # @return [Integer] Hash code
207
+ def hash
208
+ [created_at, dataset_ids, id, name, organization_ids, role, updated_at, user_id].hash
209
+ end
210
+
211
+ # Builds the object from hash
212
+ # @param [Hash] attributes Model attributes in the form of hash
213
+ # @return [Object] Returns the model itself
214
+ def self.build_from_hash(attributes)
215
+ return nil unless attributes.is_a?(Hash)
216
+ attributes = attributes.transform_keys(&:to_sym)
217
+ transformed_hash = {}
218
+ openapi_types.each_pair do |key, type|
219
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
220
+ transformed_hash["#{key}"] = nil
221
+ elsif type =~ /\AArray<(.*)>/i
222
+ # check to ensure the input is an array given that the attribute
223
+ # is documented as an array but the input is not
224
+ if attributes[attribute_map[key]].is_a?(Array)
225
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
226
+ end
227
+ elsif !attributes[attribute_map[key]].nil?
228
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
229
+ end
230
+ end
231
+ new(transformed_hash)
232
+ end
233
+
234
+ # Deserializes the data based on type
235
+ # @param string type Data type
236
+ # @param string value Value to be deserialized
237
+ # @return [Object] Deserialized data
238
+ def self._deserialize(type, value)
239
+ case type.to_sym
240
+ when :Time
241
+ Time.parse(value)
242
+ when :Date
243
+ Date.parse(value)
244
+ when :String
245
+ value.to_s
246
+ when :Integer
247
+ value.to_i
248
+ when :Float
249
+ value.to_f
250
+ when :Boolean
251
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
252
+ true
253
+ else
254
+ false
255
+ end
256
+ when :Object
257
+ # generic object (usually a Hash), return directly
258
+ value
259
+ when /\AArray<(?<inner_type>.+)>\z/
260
+ inner_type = Regexp.last_match[:inner_type]
261
+ value.map { |v| _deserialize(inner_type, v) }
262
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
263
+ k_type = Regexp.last_match[:k_type]
264
+ v_type = Regexp.last_match[:v_type]
265
+ {}.tap do |hash|
266
+ value.each do |k, v|
267
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
268
+ end
269
+ end
270
+ else # model
271
+ # models (e.g. Pet) or oneOf
272
+ klass = TrieveRubyClient.const_get(type)
273
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
274
+ end
275
+ end
276
+
277
+ # Returns the string representation of the object
278
+ # @return [String] String presentation of the object
279
+ def to_s
280
+ to_hash.to_s
281
+ end
282
+
283
+ # to_body is an alias to to_hash (backward compatibility)
284
+ # @return [Hash] Returns the object in the form of hash
285
+ def to_body
286
+ to_hash
287
+ end
288
+
289
+ # Returns the object in the form of hash
290
+ # @return [Hash] Returns the object in the form of hash
291
+ def to_hash
292
+ hash = {}
293
+ self.class.attribute_map.each_pair do |attr, param|
294
+ value = self.send(attr)
295
+ if value.nil?
296
+ is_nullable = self.class.openapi_nullable.include?(attr)
297
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
298
+ end
299
+
300
+ hash[param] = _to_hash(value)
301
+ end
302
+ hash
303
+ end
304
+
305
+ # Outputs non-array value in the form of hash
306
+ # For object, use to_hash. Otherwise, just return the value
307
+ # @param [Object] value Any valid value
308
+ # @return [Hash] Returns the value in the form of hash
309
+ def _to_hash(value)
310
+ if value.is_a?(Array)
311
+ value.compact.map { |v| _to_hash(v) }
312
+ elsif value.is_a?(Hash)
313
+ {}.tap do |hash|
314
+ value.each { |k, v| hash[k] = _to_hash(v) }
315
+ end
316
+ elsif value.respond_to? :to_hash
317
+ value.to_hash
318
+ else
319
+ value
320
+ end
321
+ end
322
+
323
+ end
324
+
325
+ 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.8.2
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