trieve_ruby_client 0.8.0 → 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 (229) 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 +2 -0
  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 -3
  13. data/docs/ChunkMetadataStringTagSet.md +46 -0
  14. data/docs/ChunkMetadataTypes.md +51 -0
  15. data/docs/ChunkMetadataWithScore.md +0 -2
  16. data/docs/ChunkReqPayload.md +50 -0
  17. data/docs/ClientDatasetConfiguration.md +0 -2
  18. data/docs/ConditionType.md +49 -0
  19. data/docs/ContentChunkMetadata.md +32 -0
  20. data/docs/CreateChunkGroupReqPayload.md +28 -0
  21. data/docs/CreateChunkReqPayloadEnum.md +49 -0
  22. data/docs/CreateDatasetRequest.md +2 -2
  23. data/docs/CreateMessageData.md +2 -2
  24. data/docs/CreateMessageReqPayload.md +42 -0
  25. data/docs/CreateTopicReqPayload.md +22 -0
  26. data/docs/Dataset.md +2 -0
  27. data/docs/DatasetApi.md +236 -12
  28. data/docs/DateRange.md +24 -0
  29. data/docs/EditMessageReqPayload.md +44 -0
  30. data/docs/FieldCondition.md +2 -0
  31. data/docs/File.md +1 -1
  32. data/docs/FileApi.md +7 -7
  33. data/docs/GenerateChunksRequest.md +2 -0
  34. data/docs/GetDatasetsPagination.md +20 -0
  35. data/docs/GroupScoreSlimChunks.md +4 -0
  36. data/docs/HasIDCondition.md +20 -0
  37. data/docs/InvitationApi.md +1 -1
  38. data/docs/MatchCondition.md +3 -1
  39. data/docs/MessageApi.md +42 -42
  40. data/docs/Organization.md +2 -0
  41. data/docs/OrganizationApi.md +24 -25
  42. data/docs/RangeCondition.md +1 -3
  43. data/docs/RecommendChunksRequest.md +1 -1
  44. data/docs/RecommendGroupChunksRequest.md +1 -1
  45. data/docs/RegenerateMessageReqPayload.md +40 -0
  46. data/docs/RemoveChunkFromGroupReqPayload.md +18 -0
  47. data/docs/ScoreChunkDTO.md +3 -1
  48. data/docs/SearchChunkData.md +12 -6
  49. data/docs/SearchChunksReqPayload.md +54 -0
  50. data/docs/SearchOverGroupsData.md +12 -4
  51. data/docs/SearchWithinGroupData.md +16 -6
  52. data/docs/SetUserApiKeyRequest.md +4 -0
  53. data/docs/SlimChunkMetadata.md +4 -0
  54. data/docs/SuggestedQueriesReqPayload.md +18 -0
  55. data/docs/TopicApi.md +16 -16
  56. data/docs/UpdateChunkData.md +2 -0
  57. data/docs/UpdateChunkReqPayload.md +46 -0
  58. data/docs/UpdateDatasetRequest.md +2 -0
  59. data/docs/UpdateGroupByTrackingIDReqPayload.md +26 -0
  60. data/docs/UpdateTopicReqPayload.md +20 -0
  61. data/docs/UpdateUserOrgRoleData.md +1 -1
  62. data/docs/UploadFileReqPayload.md +40 -0
  63. data/docs/UserApi.md +7 -8
  64. data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
  65. data/lib/trieve_ruby_client/api/chunk_api.rb +158 -83
  66. data/lib/trieve_ruby_client/api/chunk_group_api.rb +58 -51
  67. data/lib/trieve_ruby_client/api/dataset_api.rb +224 -15
  68. data/lib/trieve_ruby_client/api/events_api.rb +1 -1
  69. data/lib/trieve_ruby_client/api/file_api.rb +12 -12
  70. data/lib/trieve_ruby_client/api/health_api.rb +1 -1
  71. data/lib/trieve_ruby_client/api/invitation_api.rb +3 -3
  72. data/lib/trieve_ruby_client/api/message_api.rb +50 -50
  73. data/lib/trieve_ruby_client/api/organization_api.rb +27 -27
  74. data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
  75. data/lib/trieve_ruby_client/api/topic_api.rb +27 -27
  76. data/lib/trieve_ruby_client/api/user_api.rb +8 -8
  77. data/lib/trieve_ruby_client/api_client.rb +1 -1
  78. data/lib/trieve_ruby_client/api_error.rb +1 -1
  79. data/lib/trieve_ruby_client/configuration.rb +1 -1
  80. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
  81. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  82. data/lib/trieve_ruby_client/models/api_key_resp_body.rb +325 -0
  83. data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
  84. data/lib/trieve_ruby_client/models/autocomplete_data.rb +378 -0
  85. data/lib/trieve_ruby_client/models/autocomplete_req_payload.rb +467 -0
  86. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
  87. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  88. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
  89. data/lib/trieve_ruby_client/models/boost_phrase.rb +240 -0
  90. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
  91. data/lib/trieve_ruby_client/models/chunk_data.rb +15 -2
  92. data/lib/trieve_ruby_client/models/chunk_filter.rb +4 -4
  93. data/lib/trieve_ruby_client/models/chunk_group.rb +5 -3
  94. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  95. data/lib/trieve_ruby_client/models/chunk_metadata.rb +28 -20
  96. data/lib/trieve_ruby_client/models/chunk_metadata_string_tag_set.rb +387 -0
  97. data/lib/trieve_ruby_client/models/chunk_metadata_types.rb +106 -0
  98. data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +2 -18
  99. data/lib/trieve_ruby_client/models/chunk_req_payload.rb +400 -0
  100. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +2 -18
  101. data/lib/trieve_ruby_client/models/condition_type.rb +105 -0
  102. data/lib/trieve_ruby_client/models/content_chunk_metadata.rb +299 -0
  103. data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
  104. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
  105. data/lib/trieve_ruby_client/models/create_chunk_group_req_payload.rb +273 -0
  106. data/lib/trieve_ruby_client/models/create_chunk_req_payload_enum.rb +105 -0
  107. data/lib/trieve_ruby_client/models/create_dataset_request.rb +3 -3
  108. data/lib/trieve_ruby_client/models/create_message_data.rb +13 -13
  109. data/lib/trieve_ruby_client/models/create_message_req_payload.rb +378 -0
  110. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  111. data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
  112. data/lib/trieve_ruby_client/models/create_topic_req_payload.rb +244 -0
  113. data/lib/trieve_ruby_client/models/dataset.rb +18 -2
  114. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  115. data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
  116. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  117. data/lib/trieve_ruby_client/models/date_range.rb +245 -0
  118. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  119. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  120. data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
  121. data/lib/trieve_ruby_client/models/edit_message_req_payload.rb +395 -0
  122. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  123. data/lib/trieve_ruby_client/models/event.rb +1 -1
  124. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  125. data/lib/trieve_ruby_client/models/field_condition.rb +12 -2
  126. data/lib/trieve_ruby_client/models/file.rb +5 -3
  127. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  128. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +13 -2
  129. data/lib/trieve_ruby_client/models/geo_info.rb +1 -1
  130. data/lib/trieve_ruby_client/models/geo_types.rb +1 -1
  131. data/lib/trieve_ruby_client/models/get_chunks_data.rb +1 -1
  132. data/lib/trieve_ruby_client/models/get_datasets_pagination.rb +225 -0
  133. data/lib/trieve_ruby_client/models/get_events_data.rb +1 -1
  134. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  135. data/lib/trieve_ruby_client/models/get_tracking_chunks_data.rb +1 -1
  136. data/lib/trieve_ruby_client/models/group_data.rb +1 -1
  137. data/lib/trieve_ruby_client/models/group_score_chunk.rb +1 -1
  138. data/lib/trieve_ruby_client/models/group_score_slim_chunks.rb +22 -2
  139. data/lib/trieve_ruby_client/models/has_id_condition.rb +229 -0
  140. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  141. data/lib/trieve_ruby_client/models/location_bounding_box.rb +1 -1
  142. data/lib/trieve_ruby_client/models/location_polygon.rb +1 -1
  143. data/lib/trieve_ruby_client/models/location_radius.rb +1 -1
  144. data/lib/trieve_ruby_client/models/match_condition.rb +2 -1
  145. data/lib/trieve_ruby_client/models/message.rb +1 -1
  146. data/lib/trieve_ruby_client/models/organization.rb +18 -2
  147. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  148. data/lib/trieve_ruby_client/models/range.rb +1 -1
  149. data/lib/trieve_ruby_client/models/range_condition.rb +2 -3
  150. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +2 -2
  151. data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +2 -2
  152. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
  153. data/lib/trieve_ruby_client/models/regenerate_message_req_payload.rb +361 -0
  154. data/lib/trieve_ruby_client/models/remove_chunk_from_group_req_payload.rb +222 -0
  155. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
  156. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +15 -3
  157. data/lib/trieve_ruby_client/models/score_slim_chunks.rb +1 -1
  158. data/lib/trieve_ruby_client/models/search_chunk_data.rb +49 -14
  159. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  160. data/lib/trieve_ruby_client/models/search_chunks_req_payload.rb +504 -0
  161. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +95 -6
  162. data/lib/trieve_ruby_client/models/search_over_groups_results.rb +1 -1
  163. data/lib/trieve_ruby_client/models/search_over_groups_slim_results.rb +1 -1
  164. data/lib/trieve_ruby_client/models/search_slim_chunk_query_response_body.rb +1 -1
  165. data/lib/trieve_ruby_client/models/search_within_group_data.rb +119 -17
  166. data/lib/trieve_ruby_client/models/search_within_group_results.rb +1 -1
  167. data/lib/trieve_ruby_client/models/search_within_group_slim_results.rb +1 -1
  168. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +28 -2
  169. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  170. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
  171. data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +24 -2
  172. data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +1 -1
  173. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  174. data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
  175. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  176. data/lib/trieve_ruby_client/models/suggested_queries_req_payload.rb +222 -0
  177. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  178. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  179. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  180. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  181. data/lib/trieve_ruby_client/models/update_chunk_data.rb +15 -2
  182. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
  183. data/lib/trieve_ruby_client/models/update_chunk_req_payload.rb +376 -0
  184. data/lib/trieve_ruby_client/models/update_dataset_request.rb +13 -2
  185. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  186. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_req_payload.rb +268 -0
  187. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  188. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  189. data/lib/trieve_ruby_client/models/update_topic_req_payload.rb +239 -0
  190. data/lib/trieve_ruby_client/models/update_user_org_role_data.rb +2 -2
  191. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  192. data/lib/trieve_ruby_client/models/upload_file_req_payload.rb +368 -0
  193. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  194. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  195. data/lib/trieve_ruby_client/version.rb +2 -2
  196. data/lib/trieve_ruby_client.rb +25 -20
  197. data/openapi-generator.yaml +1 -1
  198. data/openapi.json +1 -7784
  199. data/spec/models/api_key_resp_body_spec.rb +78 -0
  200. data/spec/models/autocomplete_data_spec.rb +108 -0
  201. data/spec/models/autocomplete_req_payload_spec.rb +132 -0
  202. data/spec/models/boost_phrase_spec.rb +42 -0
  203. data/spec/models/chunk_metadata_string_tag_set_spec.rb +120 -0
  204. data/spec/models/chunk_metadata_types_spec.rb +32 -0
  205. data/spec/models/chunk_req_payload_spec.rb +132 -0
  206. data/spec/models/condition_type_spec.rb +32 -0
  207. data/spec/models/content_chunk_metadata_spec.rb +72 -0
  208. data/spec/models/create_chunk_group_req_payload_spec.rb +66 -0
  209. data/spec/models/create_chunk_req_payload_enum_spec.rb +32 -0
  210. data/spec/models/create_message_req_payload_spec.rb +108 -0
  211. data/spec/models/create_topic_req_payload_spec.rb +48 -0
  212. data/spec/models/date_range_spec.rb +54 -0
  213. data/spec/models/edit_message_req_payload_spec.rb +114 -0
  214. data/spec/models/get_datasets_pagination_spec.rb +42 -0
  215. data/spec/models/has_id_condition_spec.rb +42 -0
  216. data/spec/models/regenerate_message_req_payload_spec.rb +102 -0
  217. data/spec/models/remove_chunk_from_group_req_payload_spec.rb +36 -0
  218. data/spec/models/search_chunks_req_payload_spec.rb +144 -0
  219. data/spec/models/suggested_queries_req_payload_spec.rb +36 -0
  220. data/spec/models/update_chunk_req_payload_spec.rb +120 -0
  221. data/spec/models/update_group_by_tracking_id_req_payload_spec.rb +60 -0
  222. data/spec/models/update_topic_req_payload_spec.rb +42 -0
  223. data/spec/models/upload_file_req_payload_spec.rb +102 -0
  224. data/spec/spec_helper.rb +1 -1
  225. data/trieve_ruby_client-0.8.0.gem +0 -0
  226. data/trieve_ruby_client-0.8.2.gem +0 -0
  227. data/trieve_ruby_client-0.8.5.gem +0 -0
  228. data/trieve_ruby_client.gemspec +1 -1
  229. metadata +105 -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.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
@@ -20,7 +20,7 @@ module TrieveRubyClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # Add Chunk to Group
23
- # Add Chunk to Group Route to add a chunk to a group.
23
+ # Add Chunk to Group Route to add a chunk to a group. 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
25
  # @param group_id [String] Id of the group to add the chunk to as a bookmark
26
26
  # @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
@@ -32,7 +32,7 @@ module TrieveRubyClient
32
32
  end
33
33
 
34
34
  # Add Chunk to Group
35
- # Add Chunk to Group Route to add a chunk to a group.
35
+ # Add Chunk to Group Route to add a chunk to a group. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
36
36
  # @param tr_dataset [String] The dataset id to use for the request
37
37
  # @param group_id [String] Id of the group to add the chunk to as a bookmark
38
38
  # @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
@@ -101,7 +101,7 @@ module TrieveRubyClient
101
101
  end
102
102
 
103
103
  # Add Chunk to Group by Tracking ID
104
- # Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id.
104
+ # Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
105
105
  # @param tr_dataset [String] The dataset id to use for the request
106
106
  # @param tracking_id [String] Id of the group to add the chunk to as a bookmark
107
107
  # @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
@@ -113,7 +113,7 @@ module TrieveRubyClient
113
113
  end
114
114
 
115
115
  # Add Chunk to Group by Tracking ID
116
- # Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id.
116
+ # Add Chunk to Group by Tracking ID Route to add a chunk to a group by tracking id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
117
117
  # @param tr_dataset [String] The dataset id to use for the request
118
118
  # @param tracking_id [String] Id of the group to add the chunk to as a bookmark
119
119
  # @param add_chunk_to_group_data [AddChunkToGroupData] JSON request payload to add a chunk to a group (bookmark it)
@@ -182,23 +182,23 @@ module TrieveRubyClient
182
182
  end
183
183
 
184
184
  # Create Chunk Group
185
- # Create Chunk Group Create a new chunk_group. This is a way to group chunks together. If you try to create a chunk_group with the same tracking_id as an existing chunk_group, this operation will fail.
185
+ # Create Chunk Group Create a new chunk_group. This is a way to group chunks together. If you try to create a chunk_group with the same tracking_id as an existing chunk_group, this operation will fail. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
186
186
  # @param tr_dataset [String] The dataset id to use for the request
187
- # @param create_chunk_group_data [CreateChunkGroupData] JSON request payload to cretea a chunkGroup
187
+ # @param create_chunk_group_req_payload [CreateChunkGroupReqPayload] JSON request payload to cretea a chunkGroup
188
188
  # @param [Hash] opts the optional parameters
189
189
  # @return [ChunkGroup]
190
- def create_chunk_group(tr_dataset, create_chunk_group_data, opts = {})
191
- data, _status_code, _headers = create_chunk_group_with_http_info(tr_dataset, create_chunk_group_data, opts)
190
+ def create_chunk_group(tr_dataset, create_chunk_group_req_payload, opts = {})
191
+ data, _status_code, _headers = create_chunk_group_with_http_info(tr_dataset, create_chunk_group_req_payload, opts)
192
192
  data
193
193
  end
194
194
 
195
195
  # Create Chunk Group
196
- # Create Chunk Group Create a new chunk_group. This is a way to group chunks together. If you try to create a chunk_group with the same tracking_id as an existing chunk_group, this operation will fail.
196
+ # Create Chunk Group Create a new chunk_group. This is a way to group chunks together. If you try to create a chunk_group with the same tracking_id as an existing chunk_group, this operation will fail. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
197
197
  # @param tr_dataset [String] The dataset id to use for the request
198
- # @param create_chunk_group_data [CreateChunkGroupData] JSON request payload to cretea a chunkGroup
198
+ # @param create_chunk_group_req_payload [CreateChunkGroupReqPayload] JSON request payload to cretea a chunkGroup
199
199
  # @param [Hash] opts the optional parameters
200
200
  # @return [Array<(ChunkGroup, Integer, Hash)>] ChunkGroup data, response status code and response headers
201
- def create_chunk_group_with_http_info(tr_dataset, create_chunk_group_data, opts = {})
201
+ def create_chunk_group_with_http_info(tr_dataset, create_chunk_group_req_payload, opts = {})
202
202
  if @api_client.config.debugging
203
203
  @api_client.config.logger.debug 'Calling API: ChunkGroupApi.create_chunk_group ...'
204
204
  end
@@ -206,9 +206,9 @@ module TrieveRubyClient
206
206
  if @api_client.config.client_side_validation && tr_dataset.nil?
207
207
  fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkGroupApi.create_chunk_group"
208
208
  end
209
- # verify the required parameter 'create_chunk_group_data' is set
210
- if @api_client.config.client_side_validation && create_chunk_group_data.nil?
211
- fail ArgumentError, "Missing the required parameter 'create_chunk_group_data' when calling ChunkGroupApi.create_chunk_group"
209
+ # verify the required parameter 'create_chunk_group_req_payload' is set
210
+ if @api_client.config.client_side_validation && create_chunk_group_req_payload.nil?
211
+ fail ArgumentError, "Missing the required parameter 'create_chunk_group_req_payload' when calling ChunkGroupApi.create_chunk_group"
212
212
  end
213
213
  # resource path
214
214
  local_var_path = '/api/chunk_group'
@@ -231,7 +231,7 @@ module TrieveRubyClient
231
231
  form_params = opts[:form_params] || {}
232
232
 
233
233
  # http body (model)
234
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_chunk_group_data)
234
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_chunk_group_req_payload)
235
235
 
236
236
  # return_type
237
237
  return_type = opts[:debug_return_type] || 'ChunkGroup'
@@ -257,7 +257,7 @@ module TrieveRubyClient
257
257
  end
258
258
 
259
259
  # Delete Group
260
- # Delete Group This will delete a chunk_group. If you set delete_chunks to true, it will also delete the chunks within the group.
260
+ # Delete Group This will delete a chunk_group. If you set delete_chunks to true, it will also delete the chunks within the group. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
261
261
  # @param tr_dataset [String] The dataset id to use for the request
262
262
  # @param group_id [String] Id of the group you want to fetch.
263
263
  # @param delete_chunks [Boolean] Delete the chunks within the group
@@ -269,7 +269,7 @@ module TrieveRubyClient
269
269
  end
270
270
 
271
271
  # Delete Group
272
- # Delete Group This will delete a chunk_group. If you set delete_chunks to true, it will also delete the chunks within the group.
272
+ # Delete Group This will delete a chunk_group. If you set delete_chunks to true, it will also delete the chunks within the group. Auth&#39;ed user or api key must have an admin or owner role for the specified dataset&#39;s organization.
273
273
  # @param tr_dataset [String] The dataset id to use for the request
274
274
  # @param group_id [String] Id of the group you want to fetch.
275
275
  # @param delete_chunks [Boolean] Delete the chunks within the group
@@ -334,23 +334,25 @@ module TrieveRubyClient
334
334
  end
335
335
 
336
336
  # Delete Group by Tracking ID
337
- # Delete Group by Tracking ID Delete a chunk_group with the given tracking id.
337
+ # Delete Group by Tracking ID Delete a chunk_group with the given tracking id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
338
338
  # @param tr_dataset [String] The dataset id to use for the request
339
339
  # @param tracking_id [String] Tracking id of the chunk_group to delete
340
+ # @param delete_chunks [Boolean] Delete the chunks within the group
340
341
  # @param [Hash] opts the optional parameters
341
342
  # @return [nil]
342
- def delete_group_by_tracking_id(tr_dataset, tracking_id, opts = {})
343
- delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts)
343
+ def delete_group_by_tracking_id(tr_dataset, tracking_id, delete_chunks, opts = {})
344
+ delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, delete_chunks, opts)
344
345
  nil
345
346
  end
346
347
 
347
348
  # Delete Group by Tracking ID
348
- # Delete Group by Tracking ID Delete a chunk_group with the given tracking id.
349
+ # Delete Group by Tracking ID Delete a chunk_group with the given tracking id. Auth&#39;ed user or api key must have an admin or owner role for the specified dataset&#39;s organization.
349
350
  # @param tr_dataset [String] The dataset id to use for the request
350
351
  # @param tracking_id [String] Tracking id of the chunk_group to delete
352
+ # @param delete_chunks [Boolean] Delete the chunks within the group
351
353
  # @param [Hash] opts the optional parameters
352
354
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
353
- def delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts = {})
355
+ def delete_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, delete_chunks, opts = {})
354
356
  if @api_client.config.debugging
355
357
  @api_client.config.logger.debug 'Calling API: ChunkGroupApi.delete_group_by_tracking_id ...'
356
358
  end
@@ -362,11 +364,16 @@ module TrieveRubyClient
362
364
  if @api_client.config.client_side_validation && tracking_id.nil?
363
365
  fail ArgumentError, "Missing the required parameter 'tracking_id' when calling ChunkGroupApi.delete_group_by_tracking_id"
364
366
  end
367
+ # verify the required parameter 'delete_chunks' is set
368
+ if @api_client.config.client_side_validation && delete_chunks.nil?
369
+ fail ArgumentError, "Missing the required parameter 'delete_chunks' when calling ChunkGroupApi.delete_group_by_tracking_id"
370
+ end
365
371
  # resource path
366
372
  local_var_path = '/api/chunk_group/tracking_id/{tracking_id}'.sub('{' + 'tracking_id' + '}', CGI.escape(tracking_id.to_s))
367
373
 
368
374
  # query parameters
369
375
  query_params = opts[:query_params] || {}
376
+ query_params[:'delete_chunks'] = delete_chunks
370
377
 
371
378
  # header parameters
372
379
  header_params = opts[:header_params] || {}
@@ -775,7 +782,7 @@ module TrieveRubyClient
775
782
  end
776
783
 
777
784
  # Get Recommended Groups
778
- # Get Recommended Groups Route to get recommended groups. This route will return groups which are similar to the groups in the request body.
785
+ # Get Recommended Groups Route to get recommended groups. This route will return groups which are similar to the groups in the request body. You must provide at least one positive group id or group tracking id.
779
786
  # @param tr_dataset [String] The dataset id to use for the request
780
787
  # @param recommend_group_chunks_request [RecommendGroupChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
781
788
  # @param [Hash] opts the optional parameters
@@ -786,7 +793,7 @@ module TrieveRubyClient
786
793
  end
787
794
 
788
795
  # Get Recommended Groups
789
- # Get Recommended Groups Route to get recommended groups. This route will return groups which are similar to the groups in the request body.
796
+ # Get Recommended Groups Route to get recommended groups. This route will return groups which are similar to the groups in the request body. You must provide at least one positive group id or group tracking id.
790
797
  # @param tr_dataset [String] The dataset id to use for the request
791
798
  # @param recommend_group_chunks_request [RecommendGroupChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
792
799
  # @param [Hash] opts the optional parameters
@@ -926,25 +933,25 @@ module TrieveRubyClient
926
933
  end
927
934
 
928
935
  # Remove Chunk from Group
929
- # Remove Chunk from Group Route to remove a chunk from a group.
936
+ # Remove Chunk from Group Route to remove a chunk from a group. Auth'ed user or api key must be an admin or owner of the dataset's organization to remove a chunk from a group.
930
937
  # @param tr_dataset [String] The dataset id to use for the request
931
- # @param group_id [String] Id of the group to remove the bookmark&#39;ed chunk from
932
- # @param create_chunk_group_data [CreateChunkGroupData] JSON request payload to cretea a chunkGroup
938
+ # @param group_id [String] Id of the group you want to remove the chunk from.
939
+ # @param remove_chunk_from_group_req_payload [RemoveChunkFromGroupReqPayload] JSON request payload to remove a chunk from a group
933
940
  # @param [Hash] opts the optional parameters
934
941
  # @return [nil]
935
- def remove_chunk_from_group(tr_dataset, group_id, create_chunk_group_data, opts = {})
936
- remove_chunk_from_group_with_http_info(tr_dataset, group_id, create_chunk_group_data, opts)
942
+ def remove_chunk_from_group(tr_dataset, group_id, remove_chunk_from_group_req_payload, opts = {})
943
+ remove_chunk_from_group_with_http_info(tr_dataset, group_id, remove_chunk_from_group_req_payload, opts)
937
944
  nil
938
945
  end
939
946
 
940
947
  # Remove Chunk from Group
941
- # Remove Chunk from Group Route to remove a chunk from a group.
948
+ # Remove Chunk from Group Route to remove a chunk from a group. Auth&#39;ed user or api key must be an admin or owner of the dataset&#39;s organization to remove a chunk from a group.
942
949
  # @param tr_dataset [String] The dataset id to use for the request
943
- # @param group_id [String] Id of the group to remove the bookmark&#39;ed chunk from
944
- # @param create_chunk_group_data [CreateChunkGroupData] JSON request payload to cretea a chunkGroup
950
+ # @param group_id [String] Id of the group you want to remove the chunk from.
951
+ # @param remove_chunk_from_group_req_payload [RemoveChunkFromGroupReqPayload] JSON request payload to remove a chunk from a group
945
952
  # @param [Hash] opts the optional parameters
946
953
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
947
- def remove_chunk_from_group_with_http_info(tr_dataset, group_id, create_chunk_group_data, opts = {})
954
+ def remove_chunk_from_group_with_http_info(tr_dataset, group_id, remove_chunk_from_group_req_payload, opts = {})
948
955
  if @api_client.config.debugging
949
956
  @api_client.config.logger.debug 'Calling API: ChunkGroupApi.remove_chunk_from_group ...'
950
957
  end
@@ -956,9 +963,9 @@ module TrieveRubyClient
956
963
  if @api_client.config.client_side_validation && group_id.nil?
957
964
  fail ArgumentError, "Missing the required parameter 'group_id' when calling ChunkGroupApi.remove_chunk_from_group"
958
965
  end
959
- # verify the required parameter 'create_chunk_group_data' is set
960
- if @api_client.config.client_side_validation && create_chunk_group_data.nil?
961
- fail ArgumentError, "Missing the required parameter 'create_chunk_group_data' when calling ChunkGroupApi.remove_chunk_from_group"
966
+ # verify the required parameter 'remove_chunk_from_group_req_payload' is set
967
+ if @api_client.config.client_side_validation && remove_chunk_from_group_req_payload.nil?
968
+ fail ArgumentError, "Missing the required parameter 'remove_chunk_from_group_req_payload' when calling ChunkGroupApi.remove_chunk_from_group"
962
969
  end
963
970
  # resource path
964
971
  local_var_path = '/api/chunk_group/chunk/{group_id}'.sub('{' + 'group_id' + '}', CGI.escape(group_id.to_s))
@@ -981,7 +988,7 @@ module TrieveRubyClient
981
988
  form_params = opts[:form_params] || {}
982
989
 
983
990
  # http body (model)
984
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_chunk_group_data)
991
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(remove_chunk_from_group_req_payload)
985
992
 
986
993
  # return_type
987
994
  return_type = opts[:debug_return_type]
@@ -1157,7 +1164,7 @@ module TrieveRubyClient
1157
1164
  end
1158
1165
 
1159
1166
  # Update Group
1160
- # Update Group Update a chunk_group. If you try to change the tracking_id to one that already exists, this operation will fail.
1167
+ # Update Group Update a chunk_group. If you try to change the tracking_id to one that already exists, this operation will fail. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
1161
1168
  # @param tr_dataset [String] The dataset id to use for the request
1162
1169
  # @param update_chunk_group_data [UpdateChunkGroupData] JSON request payload to update a chunkGroup
1163
1170
  # @param [Hash] opts the optional parameters
@@ -1168,7 +1175,7 @@ module TrieveRubyClient
1168
1175
  end
1169
1176
 
1170
1177
  # Update Group
1171
- # Update Group Update a chunk_group. If you try to change the tracking_id to one that already exists, this operation will fail.
1178
+ # Update Group Update a chunk_group. If you try to change the tracking_id to one that already exists, this operation will fail. Auth&#39;ed user or api key must have an admin or owner role for the specified dataset&#39;s organization.
1172
1179
  # @param tr_dataset [String] The dataset id to use for the request
1173
1180
  # @param update_chunk_group_data [UpdateChunkGroupData] JSON request payload to update a chunkGroup
1174
1181
  # @param [Hash] opts the optional parameters
@@ -1232,25 +1239,25 @@ module TrieveRubyClient
1232
1239
  end
1233
1240
 
1234
1241
  # Update Group by Tracking ID
1235
- # Update Group by Tracking ID Update a chunk_group with the given tracking id.
1242
+ # Update Group by Tracking ID Update a chunk_group with the given tracking id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
1236
1243
  # @param tr_dataset [String] The dataset id to use for the request
1237
1244
  # @param tracking_id [String] Tracking id of the chunk_group to update
1238
- # @param update_group_by_tracking_id_data [UpdateGroupByTrackingIDData] JSON request payload to update a chunkGroup
1245
+ # @param update_group_by_tracking_id_req_payload [UpdateGroupByTrackingIDReqPayload] JSON request payload to update a chunkGroup
1239
1246
  # @param [Hash] opts the optional parameters
1240
1247
  # @return [nil]
1241
- def update_group_by_tracking_id(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts = {})
1242
- update_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts)
1248
+ def update_group_by_tracking_id(tr_dataset, tracking_id, update_group_by_tracking_id_req_payload, opts = {})
1249
+ update_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_req_payload, opts)
1243
1250
  nil
1244
1251
  end
1245
1252
 
1246
1253
  # Update Group by Tracking ID
1247
- # Update Group by Tracking ID Update a chunk_group with the given tracking id.
1254
+ # Update Group by Tracking ID Update a chunk_group with the given tracking id. Auth&#39;ed user or api key must have an admin or owner role for the specified dataset&#39;s organization.
1248
1255
  # @param tr_dataset [String] The dataset id to use for the request
1249
1256
  # @param tracking_id [String] Tracking id of the chunk_group to update
1250
- # @param update_group_by_tracking_id_data [UpdateGroupByTrackingIDData] JSON request payload to update a chunkGroup
1257
+ # @param update_group_by_tracking_id_req_payload [UpdateGroupByTrackingIDReqPayload] JSON request payload to update a chunkGroup
1251
1258
  # @param [Hash] opts the optional parameters
1252
1259
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1253
- def update_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_data, opts = {})
1260
+ def update_group_by_tracking_id_with_http_info(tr_dataset, tracking_id, update_group_by_tracking_id_req_payload, opts = {})
1254
1261
  if @api_client.config.debugging
1255
1262
  @api_client.config.logger.debug 'Calling API: ChunkGroupApi.update_group_by_tracking_id ...'
1256
1263
  end
@@ -1262,9 +1269,9 @@ module TrieveRubyClient
1262
1269
  if @api_client.config.client_side_validation && tracking_id.nil?
1263
1270
  fail ArgumentError, "Missing the required parameter 'tracking_id' when calling ChunkGroupApi.update_group_by_tracking_id"
1264
1271
  end
1265
- # verify the required parameter 'update_group_by_tracking_id_data' is set
1266
- if @api_client.config.client_side_validation && update_group_by_tracking_id_data.nil?
1267
- fail ArgumentError, "Missing the required parameter 'update_group_by_tracking_id_data' when calling ChunkGroupApi.update_group_by_tracking_id"
1272
+ # verify the required parameter 'update_group_by_tracking_id_req_payload' is set
1273
+ if @api_client.config.client_side_validation && update_group_by_tracking_id_req_payload.nil?
1274
+ fail ArgumentError, "Missing the required parameter 'update_group_by_tracking_id_req_payload' when calling ChunkGroupApi.update_group_by_tracking_id"
1268
1275
  end
1269
1276
  # resource path
1270
1277
  local_var_path = '/api/chunk_group/tracking_id/{tracking_id}'.sub('{' + 'tracking_id' + '}', CGI.escape(tracking_id.to_s))
@@ -1287,7 +1294,7 @@ module TrieveRubyClient
1287
1294
  form_params = opts[:form_params] || {}
1288
1295
 
1289
1296
  # http body (model)
1290
- post_body = opts[:debug_body] || @api_client.object_to_http_body(update_group_by_tracking_id_data)
1297
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_group_by_tracking_id_req_payload)
1291
1298
 
1292
1299
  # return_type
1293
1300
  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.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,76 @@ module TrieveRubyClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Clear Dataset
23
+ # Clear Dataset Clears a dataset. The auth'ed user must be an owner of the organization to clear a dataset.
24
+ # @param tr_dataset [String] The dataset id to use for the request
25
+ # @param dataset_id [String] The id of the dataset you want to clear.
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [nil]
28
+ def clear_dataset(tr_dataset, dataset_id, opts = {})
29
+ clear_dataset_with_http_info(tr_dataset, dataset_id, opts)
30
+ nil
31
+ end
32
+
33
+ # Clear Dataset
34
+ # Clear Dataset Clears a dataset. The auth&#39;ed user must be an owner of the organization to clear a dataset.
35
+ # @param tr_dataset [String] The dataset id to use for the request
36
+ # @param dataset_id [String] The id of the dataset you want to clear.
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def clear_dataset_with_http_info(tr_dataset, dataset_id, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: DatasetApi.clear_dataset ...'
42
+ end
43
+ # verify the required parameter 'tr_dataset' is set
44
+ if @api_client.config.client_side_validation && tr_dataset.nil?
45
+ fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling DatasetApi.clear_dataset"
46
+ end
47
+ # verify the required parameter 'dataset_id' is set
48
+ if @api_client.config.client_side_validation && dataset_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'dataset_id' when calling DatasetApi.clear_dataset"
50
+ end
51
+ # resource path
52
+ local_var_path = '/api/dataset/clear/{dataset_id}'.sub('{' + 'dataset_id' + '}', CGI.escape(dataset_id.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
+ header_params[:'TR-Dataset'] = tr_dataset
62
+
63
+ # form parameters
64
+ form_params = opts[:form_params] || {}
65
+
66
+ # http body (model)
67
+ post_body = opts[:debug_body]
68
+
69
+ # return_type
70
+ return_type = opts[:debug_return_type]
71
+
72
+ # auth_names
73
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
74
+
75
+ new_options = opts.merge(
76
+ :operation => :"DatasetApi.clear_dataset",
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type
83
+ )
84
+
85
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: DatasetApi#clear_dataset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
22
92
  # Create dataset
23
93
  # Create dataset Create a new dataset. The auth'ed user must be an owner of the organization to create a dataset.
24
94
  # @param tr_organization [String] The organization id to use for the request
@@ -164,6 +234,76 @@ module TrieveRubyClient
164
234
  return data, status_code, headers
165
235
  end
166
236
 
237
+ # Delete Dataset by Tracking ID
238
+ # Delete Dataset by Tracking ID Delete a dataset by its tracking id. The auth'ed user must be an owner of the organization to delete a dataset.
239
+ # @param tr_dataset [String] The dataset id to use for the request
240
+ # @param tracking_id [String] The tracking id of the dataset you want to delete.
241
+ # @param [Hash] opts the optional parameters
242
+ # @return [nil]
243
+ def delete_dataset_by_tracking_id(tr_dataset, tracking_id, opts = {})
244
+ delete_dataset_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts)
245
+ nil
246
+ end
247
+
248
+ # Delete Dataset by Tracking ID
249
+ # Delete Dataset by Tracking ID Delete a dataset by its tracking id. The auth&#39;ed user must be an owner of the organization to delete a dataset.
250
+ # @param tr_dataset [String] The dataset id to use for the request
251
+ # @param tracking_id [String] The tracking id of the dataset you want to delete.
252
+ # @param [Hash] opts the optional parameters
253
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
254
+ def delete_dataset_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts = {})
255
+ if @api_client.config.debugging
256
+ @api_client.config.logger.debug 'Calling API: DatasetApi.delete_dataset_by_tracking_id ...'
257
+ end
258
+ # verify the required parameter 'tr_dataset' is set
259
+ if @api_client.config.client_side_validation && tr_dataset.nil?
260
+ fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling DatasetApi.delete_dataset_by_tracking_id"
261
+ end
262
+ # verify the required parameter 'tracking_id' is set
263
+ if @api_client.config.client_side_validation && tracking_id.nil?
264
+ fail ArgumentError, "Missing the required parameter 'tracking_id' when calling DatasetApi.delete_dataset_by_tracking_id"
265
+ end
266
+ # resource path
267
+ local_var_path = '/api/dataset/tracking_id/{tracking_id}'.sub('{' + 'tracking_id' + '}', CGI.escape(tracking_id.to_s))
268
+
269
+ # query parameters
270
+ query_params = opts[:query_params] || {}
271
+
272
+ # header parameters
273
+ header_params = opts[:header_params] || {}
274
+ # HTTP header 'Accept' (if needed)
275
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
276
+ header_params[:'TR-Dataset'] = tr_dataset
277
+
278
+ # form parameters
279
+ form_params = opts[:form_params] || {}
280
+
281
+ # http body (model)
282
+ post_body = opts[:debug_body]
283
+
284
+ # return_type
285
+ return_type = opts[:debug_return_type]
286
+
287
+ # auth_names
288
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
289
+
290
+ new_options = opts.merge(
291
+ :operation => :"DatasetApi.delete_dataset_by_tracking_id",
292
+ :header_params => header_params,
293
+ :query_params => query_params,
294
+ :form_params => form_params,
295
+ :body => post_body,
296
+ :auth_names => auth_names,
297
+ :return_type => return_type
298
+ )
299
+
300
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug "API called: DatasetApi#delete_dataset_by_tracking_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
303
+ end
304
+ return data, status_code, headers
305
+ end
306
+
167
307
  # Get Client Configuration
168
308
  # Get Client Configuration Get the client configuration for a dataset. Will use the TR-D
169
309
  # @param tr_dataset [String] The dataset id to use for the request
@@ -229,32 +369,26 @@ module TrieveRubyClient
229
369
  end
230
370
 
231
371
  # Get Dataset
232
- # Get Dataset Get a dataset by id. The auth'ed user must be an admin or owner of the organization to get a dataset.
233
- # @param tr_organization [String] The organization id to use for the request
372
+ # Get Dataset Get a dataset by id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
234
373
  # @param tr_dataset [String] The dataset id to use for the request
235
374
  # @param dataset_id [String] The id of the dataset you want to retrieve.
236
375
  # @param [Hash] opts the optional parameters
237
376
  # @return [Dataset]
238
- def get_dataset(tr_organization, tr_dataset, dataset_id, opts = {})
239
- data, _status_code, _headers = get_dataset_with_http_info(tr_organization, tr_dataset, dataset_id, opts)
377
+ def get_dataset(tr_dataset, dataset_id, opts = {})
378
+ data, _status_code, _headers = get_dataset_with_http_info(tr_dataset, dataset_id, opts)
240
379
  data
241
380
  end
242
381
 
243
382
  # Get Dataset
244
- # Get Dataset Get a dataset by id. The auth&#39;ed user must be an admin or owner of the organization to get a dataset.
245
- # @param tr_organization [String] The organization id to use for the request
383
+ # Get Dataset Get a dataset by id. Auth&#39;ed user or api key must have an admin or owner role for the specified dataset&#39;s organization.
246
384
  # @param tr_dataset [String] The dataset id to use for the request
247
385
  # @param dataset_id [String] The id of the dataset you want to retrieve.
248
386
  # @param [Hash] opts the optional parameters
249
387
  # @return [Array<(Dataset, Integer, Hash)>] Dataset data, response status code and response headers
250
- def get_dataset_with_http_info(tr_organization, tr_dataset, dataset_id, opts = {})
388
+ def get_dataset_with_http_info(tr_dataset, dataset_id, opts = {})
251
389
  if @api_client.config.debugging
252
390
  @api_client.config.logger.debug 'Calling API: DatasetApi.get_dataset ...'
253
391
  end
254
- # verify the required parameter 'tr_organization' is set
255
- if @api_client.config.client_side_validation && tr_organization.nil?
256
- fail ArgumentError, "Missing the required parameter 'tr_organization' when calling DatasetApi.get_dataset"
257
- end
258
392
  # verify the required parameter 'tr_dataset' is set
259
393
  if @api_client.config.client_side_validation && tr_dataset.nil?
260
394
  fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling DatasetApi.get_dataset"
@@ -273,7 +407,6 @@ module TrieveRubyClient
273
407
  header_params = opts[:header_params] || {}
274
408
  # HTTP header 'Accept' (if needed)
275
409
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
276
- header_params[:'TR-Organization'] = tr_organization
277
410
  header_params[:'TR-Dataset'] = tr_dataset
278
411
 
279
412
  # form parameters
@@ -306,10 +439,12 @@ module TrieveRubyClient
306
439
  end
307
440
 
308
441
  # Get Datasets from Organization
309
- # Get Datasets from Organization Get all datasets for an organization. The auth'ed user must be an admin or owner of the organization to get its datasets.
442
+ # Get Datasets from Organization Get all datasets for an organization. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
310
443
  # @param tr_organization [String] The organization id to use for the request
311
444
  # @param organization_id [String] id of the organization you want to retrieve datasets for
312
445
  # @param [Hash] opts the optional parameters
446
+ # @option opts [Integer] :limit The number of records to return
447
+ # @option opts [Integer] :offset The number of records to skip
313
448
  # @return [Array<DatasetAndUsage>]
314
449
  def get_datasets_from_organization(tr_organization, organization_id, opts = {})
315
450
  data, _status_code, _headers = get_datasets_from_organization_with_http_info(tr_organization, organization_id, opts)
@@ -317,10 +452,12 @@ module TrieveRubyClient
317
452
  end
318
453
 
319
454
  # Get Datasets from Organization
320
- # Get Datasets from Organization Get all datasets for an organization. The auth&#39;ed user must be an admin or owner of the organization to get its datasets.
455
+ # Get Datasets from Organization Get all datasets for an organization. Auth&#39;ed user or api key must have an admin or owner role for the specified dataset&#39;s organization.
321
456
  # @param tr_organization [String] The organization id to use for the request
322
457
  # @param organization_id [String] id of the organization you want to retrieve datasets for
323
458
  # @param [Hash] opts the optional parameters
459
+ # @option opts [Integer] :limit The number of records to return
460
+ # @option opts [Integer] :offset The number of records to skip
324
461
  # @return [Array<(Array<DatasetAndUsage>, Integer, Hash)>] Array<DatasetAndUsage> data, response status code and response headers
325
462
  def get_datasets_from_organization_with_http_info(tr_organization, organization_id, opts = {})
326
463
  if @api_client.config.debugging
@@ -339,6 +476,8 @@ module TrieveRubyClient
339
476
 
340
477
  # query parameters
341
478
  query_params = opts[:query_params] || {}
479
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
480
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
342
481
 
343
482
  # header parameters
344
483
  header_params = opts[:header_params] || {}
@@ -375,6 +514,76 @@ module TrieveRubyClient
375
514
  return data, status_code, headers
376
515
  end
377
516
 
517
+ # Get Usage By Dataset ID
518
+ # Get Usage By Dataset ID Get the usage for a dataset by its id.
519
+ # @param tr_dataset [String] The dataset id to use for the request
520
+ # @param dataset_id [String] The id of the dataset you want to retrieve usage for.
521
+ # @param [Hash] opts the optional parameters
522
+ # @return [DatasetUsageCount]
523
+ def get_usage_by_dataset_id(tr_dataset, dataset_id, opts = {})
524
+ data, _status_code, _headers = get_usage_by_dataset_id_with_http_info(tr_dataset, dataset_id, opts)
525
+ data
526
+ end
527
+
528
+ # Get Usage By Dataset ID
529
+ # Get Usage By Dataset ID Get the usage for a dataset by its id.
530
+ # @param tr_dataset [String] The dataset id to use for the request
531
+ # @param dataset_id [String] The id of the dataset you want to retrieve usage for.
532
+ # @param [Hash] opts the optional parameters
533
+ # @return [Array<(DatasetUsageCount, Integer, Hash)>] DatasetUsageCount data, response status code and response headers
534
+ def get_usage_by_dataset_id_with_http_info(tr_dataset, dataset_id, opts = {})
535
+ if @api_client.config.debugging
536
+ @api_client.config.logger.debug 'Calling API: DatasetApi.get_usage_by_dataset_id ...'
537
+ end
538
+ # verify the required parameter 'tr_dataset' is set
539
+ if @api_client.config.client_side_validation && tr_dataset.nil?
540
+ fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling DatasetApi.get_usage_by_dataset_id"
541
+ end
542
+ # verify the required parameter 'dataset_id' is set
543
+ if @api_client.config.client_side_validation && dataset_id.nil?
544
+ fail ArgumentError, "Missing the required parameter 'dataset_id' when calling DatasetApi.get_usage_by_dataset_id"
545
+ end
546
+ # resource path
547
+ local_var_path = '/api/dataset/usage/{dataset_id}'.sub('{' + 'dataset_id' + '}', CGI.escape(dataset_id.to_s))
548
+
549
+ # query parameters
550
+ query_params = opts[:query_params] || {}
551
+
552
+ # header parameters
553
+ header_params = opts[:header_params] || {}
554
+ # HTTP header 'Accept' (if needed)
555
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
556
+ header_params[:'TR-Dataset'] = tr_dataset
557
+
558
+ # form parameters
559
+ form_params = opts[:form_params] || {}
560
+
561
+ # http body (model)
562
+ post_body = opts[:debug_body]
563
+
564
+ # return_type
565
+ return_type = opts[:debug_return_type] || 'DatasetUsageCount'
566
+
567
+ # auth_names
568
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
569
+
570
+ new_options = opts.merge(
571
+ :operation => :"DatasetApi.get_usage_by_dataset_id",
572
+ :header_params => header_params,
573
+ :query_params => query_params,
574
+ :form_params => form_params,
575
+ :body => post_body,
576
+ :auth_names => auth_names,
577
+ :return_type => return_type
578
+ )
579
+
580
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
581
+ if @api_client.config.debugging
582
+ @api_client.config.logger.debug "API called: DatasetApi#get_usage_by_dataset_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
583
+ end
584
+ return data, status_code, headers
585
+ end
586
+
378
587
  # Update Dataset
379
588
  # Update Dataset Update a dataset. The auth'ed user must be an owner of the organization to update a dataset.
380
589
  # @param tr_organization [String] The organization id to use for the request
@@ -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.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