trieve_ruby_client 0.3.4 → 0.4.0

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 (128) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +78 -81
  3. data/docs/AuthApi.md +29 -40
  4. data/docs/AuthQuery.md +22 -0
  5. data/docs/BatchQueuedChunkResponse.md +20 -0
  6. data/docs/ChunkApi.md +80 -214
  7. data/docs/ChunkData.md +42 -0
  8. data/docs/ChunkGroupApi.md +183 -174
  9. data/docs/CreateChunkData.md +41 -34
  10. data/docs/DatasetApi.md +37 -67
  11. data/docs/EventsApi.md +14 -19
  12. data/docs/FileApi.md +25 -45
  13. data/docs/GetEventsData.md +22 -0
  14. data/docs/HealthApi.md +6 -4
  15. data/docs/InvitationApi.md +7 -12
  16. data/docs/MessageApi.md +25 -45
  17. data/docs/OrganizationApi.md +37 -67
  18. data/docs/ReturnQueuedChunk.md +39 -10
  19. data/docs/SingleQueuedChunkResponse.md +20 -0
  20. data/docs/StripeApi.md +23 -25
  21. data/docs/TopicApi.md +25 -45
  22. data/docs/UserApi.md +19 -34
  23. data/lib/trieve_ruby_client/api/auth_api.rb +28 -35
  24. data/lib/trieve_ruby_client/api/chunk_api.rb +68 -143
  25. data/lib/trieve_ruby_client/api/chunk_group_api.rb +164 -76
  26. data/lib/trieve_ruby_client/api/dataset_api.rb +31 -31
  27. data/lib/trieve_ruby_client/api/events_api.rb +22 -17
  28. data/lib/trieve_ruby_client/api/file_api.rb +21 -21
  29. data/lib/trieve_ruby_client/api/health_api.rb +5 -1
  30. data/lib/trieve_ruby_client/api/invitation_api.rb +6 -6
  31. data/lib/trieve_ruby_client/api/message_api.rb +21 -21
  32. data/lib/trieve_ruby_client/api/organization_api.rb +31 -31
  33. data/lib/trieve_ruby_client/api/stripe_api.rb +19 -3
  34. data/lib/trieve_ruby_client/api/topic_api.rb +21 -21
  35. data/lib/trieve_ruby_client/api/user_api.rb +16 -16
  36. data/lib/trieve_ruby_client/api_client.rb +1 -1
  37. data/lib/trieve_ruby_client/api_error.rb +1 -1
  38. data/lib/trieve_ruby_client/configuration.rb +8 -11
  39. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
  40. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  41. data/lib/trieve_ruby_client/models/auth_query.rb +238 -0
  42. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +240 -0
  43. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  44. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
  45. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
  46. data/lib/trieve_ruby_client/models/chunk_data.rb +356 -0
  47. data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
  48. data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
  49. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  50. data/lib/trieve_ruby_client/models/chunk_metadata.rb +1 -1
  51. data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +1 -1
  52. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +1 -1
  53. data/lib/trieve_ruby_client/models/create_chunk_data.rb +79 -330
  54. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
  55. data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
  56. data/lib/trieve_ruby_client/models/create_message_data.rb +1 -1
  57. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  58. data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
  59. data/lib/trieve_ruby_client/models/dataset.rb +1 -1
  60. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  61. data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
  62. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  63. data/lib/trieve_ruby_client/models/delete_dataset_request.rb +1 -1
  64. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  65. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  66. data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
  67. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  68. data/lib/trieve_ruby_client/models/event.rb +1 -1
  69. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  70. data/lib/trieve_ruby_client/models/field_condition.rb +1 -1
  71. data/lib/trieve_ruby_client/models/file.rb +1 -1
  72. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  73. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +1 -1
  74. data/lib/trieve_ruby_client/models/get_events_data.rb +240 -0
  75. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  76. data/lib/trieve_ruby_client/models/group_data.rb +1 -1
  77. data/lib/trieve_ruby_client/models/group_score_chunk_dto.rb +1 -1
  78. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  79. data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
  80. data/lib/trieve_ruby_client/models/message.rb +1 -1
  81. data/lib/trieve_ruby_client/models/organization.rb +1 -1
  82. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  83. data/lib/trieve_ruby_client/models/range.rb +1 -1
  84. data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +1 -1
  85. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
  86. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
  87. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +75 -207
  88. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
  89. data/lib/trieve_ruby_client/models/search_chunk_data.rb +1 -1
  90. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  91. data/lib/trieve_ruby_client/models/search_groups_result.rb +1 -1
  92. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +1 -1
  93. data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +1 -1
  94. data/lib/trieve_ruby_client/models/search_within_group_data.rb +1 -1
  95. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
  96. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  97. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +238 -0
  98. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  99. data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
  100. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  101. data/lib/trieve_ruby_client/models/stripe_subscription.rb +1 -1
  102. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  103. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  104. data/lib/trieve_ruby_client/models/topic.rb +1 -1
  105. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  106. data/lib/trieve_ruby_client/models/update_chunk_data.rb +1 -1
  107. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
  108. data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
  109. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  110. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  111. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  112. data/lib/trieve_ruby_client/models/update_user_data.rb +1 -1
  113. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  114. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  115. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  116. data/lib/trieve_ruby_client/version.rb +2 -2
  117. data/lib/trieve_ruby_client.rb +6 -2
  118. data/openapi-generator.yaml +2 -2
  119. data/openapi.json +1280 -876
  120. data/spec/models/auth_query_spec.rb +48 -0
  121. data/spec/models/batch_queued_chunk_response_spec.rb +42 -0
  122. data/spec/models/chunk_data_spec.rb +108 -0
  123. data/spec/models/get_events_data_spec.rb +48 -0
  124. data/spec/models/single_queued_chunk_response_spec.rb +42 -0
  125. data/spec/spec_helper.rb +1 -1
  126. data/trieve_ruby_client-0.3.5.gem +0 -0
  127. data/trieve_ruby_client.gemspec +2 -2
  128. metadata +25 -3
@@ -1,42 +1,49 @@
1
1
  # TrieveRubyClient::CreateChunkData
2
2
 
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **chunk_html** | **String** | HTML content of the chunk. This can also be plaintext. The innerText of the HTML will be used to create the embedding vector. The point of using HTML is for convienience, as some users have applications where users submit HTML content. | [optional] |
8
- | **chunk_vector** | **Array<Float>** | Chunk_vector is a vector of floats which can be used instead of generating a new embedding. This is useful for when you are using a pre-embedded dataset. If this is not provided, the innerText of the chunk_html will be used to create the embedding. | [optional] |
9
- | **file_id** | **String** | File_uuid is the uuid of the file that the chunk is associated with. This is used to associate chunks with files. This is useful for when you want to delete a file and all of its associated chunks. | [optional] |
10
- | **group_ids** | **Array<String>** | Group ids are the ids of the groups that the chunk should be placed into. This is useful for when you want to create a chunk and add it to a group or multiple groups in one request. Necessary because this route queues the chunk for ingestion and the chunk may not exist yet immediately after response. | [optional] |
11
- | **group_tracking_ids** | **Array<String>** | Group tracking_ids are the tracking_ids of the groups that the chunk should be placed into. This is useful for when you want to create a chunk and add it to a group or multiple groups in one request. Necessary because this route queues the chunk for ingestion and the chunk may not exist yet immediately after response. | [optional] |
12
- | **link** | **String** | Link to the chunk. This can also be any string. Frequently, this is a link to the source of the chunk. The link value will not affect the embedding creation. | [optional] |
13
- | **metadata** | **Object** | Metadata is a JSON object which can be used to filter chunks. This is useful for when you want to filter chunks by arbitrary metadata. Unlike with tag filtering, there is a performance hit for filtering on metadata. | [optional] |
14
- | **split_avg** | **Boolean** | Split avg is a boolean which tells the server to split the text in the chunk_html into smaller chunks and average their resulting vectors. This is useful for when you want to create a chunk from a large piece of text and want to split it into smaller chunks to create a more fuzzy average dense vector. The sparse vector will be generated normally with no averaging. By default this is false. | [optional] |
15
- | **tag_set** | **Array<String>** | Tag set is a list of tags. This can be used to filter chunks by tag. Unlike with metadata filtering, HNSW indices will exist for each tag such that there is not a performance hit for filtering on them. | [optional] |
16
- | **time_stamp** | **String** | Time_stamp should be an ISO 8601 combined date and time without timezone. It is used for time window filtering and recency-biasing search results. | [optional] |
17
- | **tracking_id** | **String** | Tracking_id is a string which can be used to identify a chunk. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. | [optional] |
18
- | **upsert_by_tracking_id** | **Boolean** | Upsert when a chunk with the same tracking_id exists. By default this is false, and the request will fail if a chunk with the same tracking_id exists. If this is true, the chunk will be updated if a chunk with the same tracking_id exists. | [optional] |
19
- | **weight** | **Float** | Weight is a float which can be used to bias search results. This is useful for when you want to bias search results for a chunk. The magnitude only matters relative to other chunks in the chunk's dataset dataset. | [optional] |
20
-
21
- ## Example
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'trieve_ruby_client'
13
+
14
+ TrieveRubyClient::CreateChunkData.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'Array<ChunkData>',
18
+ # :'ChunkData'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
22
27
 
23
28
  ```ruby
24
29
  require 'trieve_ruby_client'
25
30
 
26
- instance = TrieveRubyClient::CreateChunkData.new(
27
- chunk_html: null,
28
- chunk_vector: null,
29
- file_id: null,
30
- group_ids: null,
31
- group_tracking_ids: null,
32
- link: null,
33
- metadata: null,
34
- split_avg: null,
35
- tag_set: null,
36
- time_stamp: null,
37
- tracking_id: null,
38
- upsert_by_tracking_id: null,
39
- weight: null
40
- )
31
+ TrieveRubyClient::CreateChunkData.build(data)
32
+ # => #<Array<ChunkData>:0x00007fdd4aab02a0>
33
+
34
+ TrieveRubyClient::CreateChunkData.build(data_that_doesnt_match)
35
+ # => nil
41
36
  ```
42
37
 
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `Array<ChunkData>`
47
+ - `ChunkData`
48
+ - `nil` (if no type matches)
49
+
data/docs/DatasetApi.md CHANGED
@@ -1,24 +1,24 @@
1
1
  # TrieveRubyClient::DatasetApi
2
2
 
3
- All URIs are relative to *http://localhost*
3
+ All URIs are relative to *http://localhost:8090*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**create_dataset**](DatasetApi.md#create_dataset) | **POST** /api/dataset | create_dataset |
8
- | [**delete_dataset**](DatasetApi.md#delete_dataset) | **DELETE** /api/dataset | delete_dataset |
9
- | [**get_client_dataset_config**](DatasetApi.md#get_client_dataset_config) | **GET** /api/dataset/envs | get_client_dataset_config |
10
- | [**get_dataset**](DatasetApi.md#get_dataset) | **GET** /api/dataset/{dataset_id} | get_dataset |
11
- | [**get_datasets_from_organization**](DatasetApi.md#get_datasets_from_organization) | **GET** /api/dataset/organization/{organization_id} | get_organization_datasets |
12
- | [**update_dataset**](DatasetApi.md#update_dataset) | **PUT** /api/dataset | update_dataset |
7
+ | [**create_dataset**](DatasetApi.md#create_dataset) | **POST** /api/dataset | Create dataset |
8
+ | [**delete_dataset**](DatasetApi.md#delete_dataset) | **DELETE** /api/dataset | Delete Dataset |
9
+ | [**get_client_dataset_config**](DatasetApi.md#get_client_dataset_config) | **GET** /api/dataset/envs | Get Client Configuration |
10
+ | [**get_dataset**](DatasetApi.md#get_dataset) | **GET** /api/dataset/{dataset_id} | Get Dataset |
11
+ | [**get_datasets_from_organization**](DatasetApi.md#get_datasets_from_organization) | **GET** /api/dataset/organization/{organization_id} | Get Datasets from Organization |
12
+ | [**update_dataset**](DatasetApi.md#update_dataset) | **PUT** /api/dataset | Update Dataset |
13
13
 
14
14
 
15
15
  ## create_dataset
16
16
 
17
17
  > <Dataset> create_dataset(tr_organization, create_dataset_request)
18
18
 
19
- create_dataset
19
+ Create dataset
20
20
 
21
- create_dataset Create a new dataset. The auth'ed user must be an owner of the organization to create a dataset.
21
+ Create dataset Create a new dataset. The auth'ed user must be an owner of the organization to create a dataset.
22
22
 
23
23
  ### Examples
24
24
 
@@ -27,11 +27,6 @@ require 'time'
27
27
  require 'trieve_ruby_client'
28
28
  # setup authorization
29
29
  TrieveRubyClient.configure do |config|
30
- # Configure API key authorization: Cookie
31
- config.api_key['Cookie'] = 'YOUR API KEY'
32
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
33
- # config.api_key_prefix['Cookie'] = 'Bearer'
34
-
35
30
  # Configure API key authorization: ApiKey
36
31
  config.api_key['ApiKey'] = 'YOUR API KEY'
37
32
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -43,7 +38,7 @@ tr_organization = 'tr_organization_example' # String | The organization id to us
43
38
  create_dataset_request = TrieveRubyClient::CreateDatasetRequest.new({client_configuration: 3.56, dataset_name: 'dataset_name_example', organization_id: 'organization_id_example', server_configuration: 3.56}) # CreateDatasetRequest | JSON request payload to create a new dataset
44
39
 
45
40
  begin
46
- # create_dataset
41
+ # Create dataset
47
42
  result = api_instance.create_dataset(tr_organization, create_dataset_request)
48
43
  p result
49
44
  rescue TrieveRubyClient::ApiError => e
@@ -59,7 +54,7 @@ This returns an Array which contains the response data, status code and headers.
59
54
 
60
55
  ```ruby
61
56
  begin
62
- # create_dataset
57
+ # Create dataset
63
58
  data, status_code, headers = api_instance.create_dataset_with_http_info(tr_organization, create_dataset_request)
64
59
  p status_code # => 2xx
65
60
  p headers # => { ... }
@@ -82,7 +77,7 @@ end
82
77
 
83
78
  ### Authorization
84
79
 
85
- [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
80
+ [ApiKey](../README.md#ApiKey)
86
81
 
87
82
  ### HTTP request headers
88
83
 
@@ -94,9 +89,9 @@ end
94
89
 
95
90
  > delete_dataset(tr_organization, delete_dataset_request)
96
91
 
97
- delete_dataset
92
+ Delete Dataset
98
93
 
99
- delete_dataset Delete a dataset. The auth'ed user must be an owner of the organization to delete a dataset.
94
+ Delete Dataset Delete a dataset. The auth'ed user must be an owner of the organization to delete a dataset.
100
95
 
101
96
  ### Examples
102
97
 
@@ -105,11 +100,6 @@ require 'time'
105
100
  require 'trieve_ruby_client'
106
101
  # setup authorization
107
102
  TrieveRubyClient.configure do |config|
108
- # Configure API key authorization: Cookie
109
- config.api_key['Cookie'] = 'YOUR API KEY'
110
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
111
- # config.api_key_prefix['Cookie'] = 'Bearer'
112
-
113
103
  # Configure API key authorization: ApiKey
114
104
  config.api_key['ApiKey'] = 'YOUR API KEY'
115
105
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -121,7 +111,7 @@ tr_organization = 'tr_organization_example' # String | The organization id to us
121
111
  delete_dataset_request = TrieveRubyClient::DeleteDatasetRequest.new({dataset_id: 'dataset_id_example'}) # DeleteDatasetRequest | JSON request payload to delete a dataset
122
112
 
123
113
  begin
124
- # delete_dataset
114
+ # Delete Dataset
125
115
  api_instance.delete_dataset(tr_organization, delete_dataset_request)
126
116
  rescue TrieveRubyClient::ApiError => e
127
117
  puts "Error when calling DatasetApi->delete_dataset: #{e}"
@@ -136,7 +126,7 @@ This returns an Array which contains the response data (`nil` in this case), sta
136
126
 
137
127
  ```ruby
138
128
  begin
139
- # delete_dataset
129
+ # Delete Dataset
140
130
  data, status_code, headers = api_instance.delete_dataset_with_http_info(tr_organization, delete_dataset_request)
141
131
  p status_code # => 2xx
142
132
  p headers # => { ... }
@@ -159,7 +149,7 @@ nil (empty response body)
159
149
 
160
150
  ### Authorization
161
151
 
162
- [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
152
+ [ApiKey](../README.md#ApiKey)
163
153
 
164
154
  ### HTTP request headers
165
155
 
@@ -171,9 +161,9 @@ nil (empty response body)
171
161
 
172
162
  > <ClientDatasetConfiguration> get_client_dataset_config(tr_dataset)
173
163
 
174
- get_client_dataset_config
164
+ Get Client Configuration
175
165
 
176
- get_client_dataset_config Get the client configuration for a dataset. Will use the TR-D
166
+ Get Client Configuration Get the client configuration for a dataset. Will use the TR-D
177
167
 
178
168
  ### Examples
179
169
 
@@ -182,11 +172,6 @@ require 'time'
182
172
  require 'trieve_ruby_client'
183
173
  # setup authorization
184
174
  TrieveRubyClient.configure do |config|
185
- # Configure API key authorization: Cookie
186
- config.api_key['Cookie'] = 'YOUR API KEY'
187
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
188
- # config.api_key_prefix['Cookie'] = 'Bearer'
189
-
190
175
  # Configure API key authorization: ApiKey
191
176
  config.api_key['ApiKey'] = 'YOUR API KEY'
192
177
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -197,7 +182,7 @@ api_instance = TrieveRubyClient::DatasetApi.new
197
182
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
198
183
 
199
184
  begin
200
- # get_client_dataset_config
185
+ # Get Client Configuration
201
186
  result = api_instance.get_client_dataset_config(tr_dataset)
202
187
  p result
203
188
  rescue TrieveRubyClient::ApiError => e
@@ -213,7 +198,7 @@ This returns an Array which contains the response data, status code and headers.
213
198
 
214
199
  ```ruby
215
200
  begin
216
- # get_client_dataset_config
201
+ # Get Client Configuration
217
202
  data, status_code, headers = api_instance.get_client_dataset_config_with_http_info(tr_dataset)
218
203
  p status_code # => 2xx
219
204
  p headers # => { ... }
@@ -235,7 +220,7 @@ end
235
220
 
236
221
  ### Authorization
237
222
 
238
- [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
223
+ [ApiKey](../README.md#ApiKey)
239
224
 
240
225
  ### HTTP request headers
241
226
 
@@ -247,9 +232,9 @@ end
247
232
 
248
233
  > <Dataset> get_dataset(tr_organization, tr_dataset, dataset_id)
249
234
 
250
- get_dataset
235
+ Get Dataset
251
236
 
252
- get_dataset Get a dataset by id. The auth'ed user must be an admin or owner of the organization to get a dataset.
237
+ Get Dataset Get a dataset by id. The auth'ed user must be an admin or owner of the organization to get a dataset.
253
238
 
254
239
  ### Examples
255
240
 
@@ -258,11 +243,6 @@ require 'time'
258
243
  require 'trieve_ruby_client'
259
244
  # setup authorization
260
245
  TrieveRubyClient.configure do |config|
261
- # Configure API key authorization: Cookie
262
- config.api_key['Cookie'] = 'YOUR API KEY'
263
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
264
- # config.api_key_prefix['Cookie'] = 'Bearer'
265
-
266
246
  # Configure API key authorization: ApiKey
267
247
  config.api_key['ApiKey'] = 'YOUR API KEY'
268
248
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -275,7 +255,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
275
255
  dataset_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the dataset you want to retrieve.
276
256
 
277
257
  begin
278
- # get_dataset
258
+ # Get Dataset
279
259
  result = api_instance.get_dataset(tr_organization, tr_dataset, dataset_id)
280
260
  p result
281
261
  rescue TrieveRubyClient::ApiError => e
@@ -291,7 +271,7 @@ This returns an Array which contains the response data, status code and headers.
291
271
 
292
272
  ```ruby
293
273
  begin
294
- # get_dataset
274
+ # Get Dataset
295
275
  data, status_code, headers = api_instance.get_dataset_with_http_info(tr_organization, tr_dataset, dataset_id)
296
276
  p status_code # => 2xx
297
277
  p headers # => { ... }
@@ -315,7 +295,7 @@ end
315
295
 
316
296
  ### Authorization
317
297
 
318
- [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
298
+ [ApiKey](../README.md#ApiKey)
319
299
 
320
300
  ### HTTP request headers
321
301
 
@@ -327,9 +307,9 @@ end
327
307
 
328
308
  > <Array<DatasetAndUsage>> get_datasets_from_organization(tr_organization, organization_id)
329
309
 
330
- get_organization_datasets
310
+ Get Datasets from Organization
331
311
 
332
- get_organization_datasets Get all datasets for an organization. The auth'ed user must be an admin or owner of the organization to get its datasets.
312
+ 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.
333
313
 
334
314
  ### Examples
335
315
 
@@ -338,11 +318,6 @@ require 'time'
338
318
  require 'trieve_ruby_client'
339
319
  # setup authorization
340
320
  TrieveRubyClient.configure do |config|
341
- # Configure API key authorization: Cookie
342
- config.api_key['Cookie'] = 'YOUR API KEY'
343
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
344
- # config.api_key_prefix['Cookie'] = 'Bearer'
345
-
346
321
  # Configure API key authorization: ApiKey
347
322
  config.api_key['ApiKey'] = 'YOUR API KEY'
348
323
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -354,7 +329,7 @@ tr_organization = 'tr_organization_example' # String | The organization id to us
354
329
  organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | id of the organization you want to retrieve datasets for
355
330
 
356
331
  begin
357
- # get_organization_datasets
332
+ # Get Datasets from Organization
358
333
  result = api_instance.get_datasets_from_organization(tr_organization, organization_id)
359
334
  p result
360
335
  rescue TrieveRubyClient::ApiError => e
@@ -370,7 +345,7 @@ This returns an Array which contains the response data, status code and headers.
370
345
 
371
346
  ```ruby
372
347
  begin
373
- # get_organization_datasets
348
+ # Get Datasets from Organization
374
349
  data, status_code, headers = api_instance.get_datasets_from_organization_with_http_info(tr_organization, organization_id)
375
350
  p status_code # => 2xx
376
351
  p headers # => { ... }
@@ -393,7 +368,7 @@ end
393
368
 
394
369
  ### Authorization
395
370
 
396
- [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
371
+ [ApiKey](../README.md#ApiKey)
397
372
 
398
373
  ### HTTP request headers
399
374
 
@@ -405,9 +380,9 @@ end
405
380
 
406
381
  > <Dataset> update_dataset(tr_organization, update_dataset_request)
407
382
 
408
- update_dataset
383
+ Update Dataset
409
384
 
410
- update_dataset Update a dataset. The auth'ed user must be an owner of the organization to update a dataset.
385
+ Update Dataset Update a dataset. The auth'ed user must be an owner of the organization to update a dataset.
411
386
 
412
387
  ### Examples
413
388
 
@@ -416,11 +391,6 @@ require 'time'
416
391
  require 'trieve_ruby_client'
417
392
  # setup authorization
418
393
  TrieveRubyClient.configure do |config|
419
- # Configure API key authorization: Cookie
420
- config.api_key['Cookie'] = 'YOUR API KEY'
421
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
422
- # config.api_key_prefix['Cookie'] = 'Bearer'
423
-
424
394
  # Configure API key authorization: ApiKey
425
395
  config.api_key['ApiKey'] = 'YOUR API KEY'
426
396
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -432,7 +402,7 @@ tr_organization = 'tr_organization_example' # String | The organization id to us
432
402
  update_dataset_request = TrieveRubyClient::UpdateDatasetRequest.new({dataset_id: 'dataset_id_example'}) # UpdateDatasetRequest | JSON request payload to update a dataset
433
403
 
434
404
  begin
435
- # update_dataset
405
+ # Update Dataset
436
406
  result = api_instance.update_dataset(tr_organization, update_dataset_request)
437
407
  p result
438
408
  rescue TrieveRubyClient::ApiError => e
@@ -448,7 +418,7 @@ This returns an Array which contains the response data, status code and headers.
448
418
 
449
419
  ```ruby
450
420
  begin
451
- # update_dataset
421
+ # Update Dataset
452
422
  data, status_code, headers = api_instance.update_dataset_with_http_info(tr_organization, update_dataset_request)
453
423
  p status_code # => 2xx
454
424
  p headers # => { ... }
@@ -471,7 +441,7 @@ end
471
441
 
472
442
  ### Authorization
473
443
 
474
- [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
444
+ [ApiKey](../README.md#ApiKey)
475
445
 
476
446
  ### HTTP request headers
477
447
 
data/docs/EventsApi.md CHANGED
@@ -1,19 +1,19 @@
1
1
  # TrieveRubyClient::EventsApi
2
2
 
3
- All URIs are relative to *http://localhost*
3
+ All URIs are relative to *http://localhost:8090*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**get_events**](EventsApi.md#get_events) | **GET** /api/events/{page} | get_events |
7
+ | [**get_events**](EventsApi.md#get_events) | **POST** /api/events | Get events for the dataset |
8
8
 
9
9
 
10
10
  ## get_events
11
11
 
12
- > <EventReturn> get_events(tr_dataset, page)
12
+ > <EventReturn> get_events(tr_dataset, get_events_data)
13
13
 
14
- get_events
14
+ Get events for the dataset
15
15
 
16
- get_events Get events for the auth'ed user. Currently, this is only for events belonging to the auth'ed user. Soon, we plan to associate events to datasets instead of users. Each page contains 10 events.
16
+ Get events for the dataset Get events for the auth'ed user. Currently, this is only for events belonging to the auth'ed user. Soon, we plan to associate events to datasets instead of users.
17
17
 
18
18
  ### Examples
19
19
 
@@ -22,11 +22,6 @@ require 'time'
22
22
  require 'trieve_ruby_client'
23
23
  # setup authorization
24
24
  TrieveRubyClient.configure do |config|
25
- # Configure API key authorization: Cookie
26
- config.api_key['Cookie'] = 'YOUR API KEY'
27
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
- # config.api_key_prefix['Cookie'] = 'Bearer'
29
-
30
25
  # Configure API key authorization: ApiKey
31
26
  config.api_key['ApiKey'] = 'YOUR API KEY'
32
27
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -35,11 +30,11 @@ end
35
30
 
36
31
  api_instance = TrieveRubyClient::EventsApi.new
37
32
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
38
- page = 789 # Integer | Page number of events to get
33
+ get_events_data = TrieveRubyClient::GetEventsData.new # GetEventsData | JSON request payload to get events for a dataset
39
34
 
40
35
  begin
41
- # get_events
42
- result = api_instance.get_events(tr_dataset, page)
36
+ # Get events for the dataset
37
+ result = api_instance.get_events(tr_dataset, get_events_data)
43
38
  p result
44
39
  rescue TrieveRubyClient::ApiError => e
45
40
  puts "Error when calling EventsApi->get_events: #{e}"
@@ -50,12 +45,12 @@ end
50
45
 
51
46
  This returns an Array which contains the response data, status code and headers.
52
47
 
53
- > <Array(<EventReturn>, Integer, Hash)> get_events_with_http_info(tr_dataset, page)
48
+ > <Array(<EventReturn>, Integer, Hash)> get_events_with_http_info(tr_dataset, get_events_data)
54
49
 
55
50
  ```ruby
56
51
  begin
57
- # get_events
58
- data, status_code, headers = api_instance.get_events_with_http_info(tr_dataset, page)
52
+ # Get events for the dataset
53
+ data, status_code, headers = api_instance.get_events_with_http_info(tr_dataset, get_events_data)
59
54
  p status_code # => 2xx
60
55
  p headers # => { ... }
61
56
  p data # => <EventReturn>
@@ -69,7 +64,7 @@ end
69
64
  | Name | Type | Description | Notes |
70
65
  | ---- | ---- | ----------- | ----- |
71
66
  | **tr_dataset** | **String** | The dataset id to use for the request | |
72
- | **page** | **Integer** | Page number of events to get | |
67
+ | **get_events_data** | [**GetEventsData**](GetEventsData.md) | JSON request payload to get events for a dataset | |
73
68
 
74
69
  ### Return type
75
70
 
@@ -77,10 +72,10 @@ end
77
72
 
78
73
  ### Authorization
79
74
 
80
- [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
75
+ [ApiKey](../README.md#ApiKey)
81
76
 
82
77
  ### HTTP request headers
83
78
 
84
- - **Content-Type**: Not defined
79
+ - **Content-Type**: application/json
85
80
  - **Accept**: application/json
86
81