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
data/docs/TopicApi.md CHANGED
@@ -1,22 +1,22 @@
1
1
  # TrieveRubyClient::TopicApi
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_topic**](TopicApi.md#create_topic) | **POST** /api/topic | create_topic |
8
- | [**delete_topic**](TopicApi.md#delete_topic) | **DELETE** /api/topic | delete_topic |
9
- | [**get_all_topics_for_user**](TopicApi.md#get_all_topics_for_user) | **GET** /api/topic/user/{user_id} | get_all_topics_for_user |
10
- | [**update_topic**](TopicApi.md#update_topic) | **PUT** /api/topic | update_topic |
7
+ | [**create_topic**](TopicApi.md#create_topic) | **POST** /api/topic | Create Topic |
8
+ | [**delete_topic**](TopicApi.md#delete_topic) | **DELETE** /api/topic | Delete Topic |
9
+ | [**get_all_topics_for_user**](TopicApi.md#get_all_topics_for_user) | **GET** /api/topic/user/{user_id} | Get All Topics for User |
10
+ | [**update_topic**](TopicApi.md#update_topic) | **PUT** /api/topic | Update Topic |
11
11
 
12
12
 
13
13
  ## create_topic
14
14
 
15
15
  > <Topic> create_topic(tr_dataset, create_topic_data)
16
16
 
17
- create_topic
17
+ Create Topic
18
18
 
19
- create_topic Create a new chat topic. Topics are attached to a user and act as a coordinator for memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon.
19
+ Create Topic Create a new chat topic. Topics are attached to a user and act as a coordinator for memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon.
20
20
 
21
21
  ### Examples
22
22
 
@@ -25,11 +25,6 @@ require 'time'
25
25
  require 'trieve_ruby_client'
26
26
  # setup authorization
27
27
  TrieveRubyClient.configure do |config|
28
- # Configure API key authorization: Cookie
29
- config.api_key['Cookie'] = 'YOUR API KEY'
30
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
31
- # config.api_key_prefix['Cookie'] = 'Bearer'
32
-
33
28
  # Configure API key authorization: ApiKey
34
29
  config.api_key['ApiKey'] = 'YOUR API KEY'
35
30
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -41,7 +36,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
41
36
  create_topic_data = TrieveRubyClient::CreateTopicData.new # CreateTopicData | JSON request payload to create chat topic
42
37
 
43
38
  begin
44
- # create_topic
39
+ # Create Topic
45
40
  result = api_instance.create_topic(tr_dataset, create_topic_data)
46
41
  p result
47
42
  rescue TrieveRubyClient::ApiError => e
@@ -57,7 +52,7 @@ This returns an Array which contains the response data, status code and headers.
57
52
 
58
53
  ```ruby
59
54
  begin
60
- # create_topic
55
+ # Create Topic
61
56
  data, status_code, headers = api_instance.create_topic_with_http_info(tr_dataset, create_topic_data)
62
57
  p status_code # => 2xx
63
58
  p headers # => { ... }
@@ -80,7 +75,7 @@ end
80
75
 
81
76
  ### Authorization
82
77
 
83
- [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
78
+ [ApiKey](../README.md#ApiKey)
84
79
 
85
80
  ### HTTP request headers
86
81
 
@@ -92,9 +87,9 @@ end
92
87
 
93
88
  > delete_topic(tr_dataset, delete_topic_data)
94
89
 
95
- delete_topic
90
+ Delete Topic
96
91
 
97
- delete_topic Delete an existing chat topic. When a topic is deleted, all associated chat messages are also deleted.
92
+ Delete Topic Delete an existing chat topic. When a topic is deleted, all associated chat messages are also deleted.
98
93
 
99
94
  ### Examples
100
95
 
@@ -103,11 +98,6 @@ require 'time'
103
98
  require 'trieve_ruby_client'
104
99
  # setup authorization
105
100
  TrieveRubyClient.configure do |config|
106
- # Configure API key authorization: Cookie
107
- config.api_key['Cookie'] = 'YOUR API KEY'
108
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
109
- # config.api_key_prefix['Cookie'] = 'Bearer'
110
-
111
101
  # Configure API key authorization: ApiKey
112
102
  config.api_key['ApiKey'] = 'YOUR API KEY'
113
103
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -119,7 +109,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
119
109
  delete_topic_data = TrieveRubyClient::DeleteTopicData.new({topic_id: 'topic_id_example'}) # DeleteTopicData | JSON request payload to delete a chat topic
120
110
 
121
111
  begin
122
- # delete_topic
112
+ # Delete Topic
123
113
  api_instance.delete_topic(tr_dataset, delete_topic_data)
124
114
  rescue TrieveRubyClient::ApiError => e
125
115
  puts "Error when calling TopicApi->delete_topic: #{e}"
@@ -134,7 +124,7 @@ This returns an Array which contains the response data (`nil` in this case), sta
134
124
 
135
125
  ```ruby
136
126
  begin
137
- # delete_topic
127
+ # Delete Topic
138
128
  data, status_code, headers = api_instance.delete_topic_with_http_info(tr_dataset, delete_topic_data)
139
129
  p status_code # => 2xx
140
130
  p headers # => { ... }
@@ -157,7 +147,7 @@ nil (empty response body)
157
147
 
158
148
  ### Authorization
159
149
 
160
- [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
150
+ [ApiKey](../README.md#ApiKey)
161
151
 
162
152
  ### HTTP request headers
163
153
 
@@ -169,9 +159,9 @@ nil (empty response body)
169
159
 
170
160
  > <Array<Topic>> get_all_topics_for_user(user_id, tr_dataset)
171
161
 
172
- get_all_topics_for_user
162
+ Get All Topics for User
173
163
 
174
- get_all_topics_for_user Get all topics belonging to a the auth'ed user. Soon, we plan to allow specification of the user for this route and include pagination.
164
+ Get All Topics for User Get all topics belonging to a the auth'ed user. Soon, we plan to allow specification of the user for this route and include pagination.
175
165
 
176
166
  ### Examples
177
167
 
@@ -180,11 +170,6 @@ require 'time'
180
170
  require 'trieve_ruby_client'
181
171
  # setup authorization
182
172
  TrieveRubyClient.configure do |config|
183
- # Configure API key authorization: Cookie
184
- config.api_key['Cookie'] = 'YOUR API KEY'
185
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
186
- # config.api_key_prefix['Cookie'] = 'Bearer'
187
-
188
173
  # Configure API key authorization: ApiKey
189
174
  config.api_key['ApiKey'] = 'YOUR API KEY'
190
175
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -196,7 +181,7 @@ user_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the user t
196
181
  tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
197
182
 
198
183
  begin
199
- # get_all_topics_for_user
184
+ # Get All Topics for User
200
185
  result = api_instance.get_all_topics_for_user(user_id, tr_dataset)
201
186
  p result
202
187
  rescue TrieveRubyClient::ApiError => e
@@ -212,7 +197,7 @@ This returns an Array which contains the response data, status code and headers.
212
197
 
213
198
  ```ruby
214
199
  begin
215
- # get_all_topics_for_user
200
+ # Get All Topics for User
216
201
  data, status_code, headers = api_instance.get_all_topics_for_user_with_http_info(user_id, tr_dataset)
217
202
  p status_code # => 2xx
218
203
  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
  > update_topic(tr_dataset, update_topic_data)
249
234
 
250
- update_topic
235
+ Update Topic
251
236
 
252
- update_topic Update an existing chat topic. Currently, only the name of the topic can be updated.
237
+ Update Topic Update an existing chat topic. Currently, only the name of the topic can be updated.
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)
@@ -274,7 +254,7 @@ tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the reque
274
254
  update_topic_data = TrieveRubyClient::UpdateTopicData.new({name: 'name_example', topic_id: 'topic_id_example'}) # UpdateTopicData | JSON request payload to update a chat topic
275
255
 
276
256
  begin
277
- # update_topic
257
+ # Update Topic
278
258
  api_instance.update_topic(tr_dataset, update_topic_data)
279
259
  rescue TrieveRubyClient::ApiError => e
280
260
  puts "Error when calling TopicApi->update_topic: #{e}"
@@ -289,7 +269,7 @@ This returns an Array which contains the response data (`nil` in this case), sta
289
269
 
290
270
  ```ruby
291
271
  begin
292
- # update_topic
272
+ # Update Topic
293
273
  data, status_code, headers = api_instance.update_topic_with_http_info(tr_dataset, update_topic_data)
294
274
  p status_code # => 2xx
295
275
  p headers # => { ... }
@@ -312,7 +292,7 @@ nil (empty response body)
312
292
 
313
293
  ### Authorization
314
294
 
315
- [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
295
+ [ApiKey](../README.md#ApiKey)
316
296
 
317
297
  ### HTTP request headers
318
298
 
data/docs/UserApi.md CHANGED
@@ -1,21 +1,21 @@
1
1
  # TrieveRubyClient::UserApi
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
- | [**delete_user_api_key**](UserApi.md#delete_user_api_key) | **DELETE** /api/user/delete_api_key | delete_user_api_key |
8
- | [**set_user_api_key**](UserApi.md#set_user_api_key) | **POST** /api/user/set_api_key | set_user_api_key |
9
- | [**update_user**](UserApi.md#update_user) | **PUT** /api/user | update_user |
7
+ | [**delete_user_api_key**](UserApi.md#delete_user_api_key) | **DELETE** /api/user/delete_api_key | Delete User Api Key |
8
+ | [**set_user_api_key**](UserApi.md#set_user_api_key) | **POST** /api/user/set_api_key | Set User Api Key |
9
+ | [**update_user**](UserApi.md#update_user) | **PUT** /api/user | Update User |
10
10
 
11
11
 
12
12
  ## delete_user_api_key
13
13
 
14
14
  > <Array<ApiKeyDTO>> delete_user_api_key(delete_user_api_key_request)
15
15
 
16
- delete_user_api_key
16
+ Delete User Api Key
17
17
 
18
- delete_user_api_key Delete an api key for the auth'ed user.
18
+ Delete User Api Key Delete an api key for the auth'ed user.
19
19
 
20
20
  ### Examples
21
21
 
@@ -24,11 +24,6 @@ require 'time'
24
24
  require 'trieve_ruby_client'
25
25
  # setup authorization
26
26
  TrieveRubyClient.configure do |config|
27
- # Configure API key authorization: Cookie
28
- config.api_key['Cookie'] = 'YOUR API KEY'
29
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
- # config.api_key_prefix['Cookie'] = 'Bearer'
31
-
32
27
  # Configure API key authorization: ApiKey
33
28
  config.api_key['ApiKey'] = 'YOUR API KEY'
34
29
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -39,7 +34,7 @@ api_instance = TrieveRubyClient::UserApi.new
39
34
  delete_user_api_key_request = TrieveRubyClient::DeleteUserApiKeyRequest.new({api_key_id: 'api_key_id_example'}) # DeleteUserApiKeyRequest | JSON request payload to delete a user api key
40
35
 
41
36
  begin
42
- # delete_user_api_key
37
+ # Delete User Api Key
43
38
  result = api_instance.delete_user_api_key(delete_user_api_key_request)
44
39
  p result
45
40
  rescue TrieveRubyClient::ApiError => e
@@ -55,7 +50,7 @@ This returns an Array which contains the response data, status code and headers.
55
50
 
56
51
  ```ruby
57
52
  begin
58
- # delete_user_api_key
53
+ # Delete User Api Key
59
54
  data, status_code, headers = api_instance.delete_user_api_key_with_http_info(delete_user_api_key_request)
60
55
  p status_code # => 2xx
61
56
  p headers # => { ... }
@@ -77,7 +72,7 @@ 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
 
@@ -89,9 +84,9 @@ end
89
84
 
90
85
  > <SetUserApiKeyResponse> set_user_api_key(set_user_api_key_request)
91
86
 
92
- set_user_api_key
87
+ Set User Api Key
93
88
 
94
- set_user_api_key Create a new api key for the auth'ed user. Successful response will contain the newly created api key. If a write role is assigned the api key will have permission level of the auth'ed user who calls this endpoint.
89
+ Set User Api Key Create a new api key for the auth'ed user. Successful response will contain the newly created api key. If a write role is assigned the api key will have permission level of the auth'ed user who calls this endpoint.
95
90
 
96
91
  ### Examples
97
92
 
@@ -100,11 +95,6 @@ require 'time'
100
95
  require 'trieve_ruby_client'
101
96
  # setup authorization
102
97
  TrieveRubyClient.configure do |config|
103
- # Configure API key authorization: Cookie
104
- config.api_key['Cookie'] = 'YOUR API KEY'
105
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
106
- # config.api_key_prefix['Cookie'] = 'Bearer'
107
-
108
98
  # Configure API key authorization: ApiKey
109
99
  config.api_key['ApiKey'] = 'YOUR API KEY'
110
100
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -115,7 +105,7 @@ api_instance = TrieveRubyClient::UserApi.new
115
105
  set_user_api_key_request = TrieveRubyClient::SetUserApiKeyRequest.new({name: 'name_example', role: 37}) # SetUserApiKeyRequest | JSON request payload to create a new user api key
116
106
 
117
107
  begin
118
- # set_user_api_key
108
+ # Set User Api Key
119
109
  result = api_instance.set_user_api_key(set_user_api_key_request)
120
110
  p result
121
111
  rescue TrieveRubyClient::ApiError => e
@@ -131,7 +121,7 @@ This returns an Array which contains the response data, status code and headers.
131
121
 
132
122
  ```ruby
133
123
  begin
134
- # set_user_api_key
124
+ # Set User Api Key
135
125
  data, status_code, headers = api_instance.set_user_api_key_with_http_info(set_user_api_key_request)
136
126
  p status_code # => 2xx
137
127
  p headers # => { ... }
@@ -153,7 +143,7 @@ end
153
143
 
154
144
  ### Authorization
155
145
 
156
- [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
146
+ [ApiKey](../README.md#ApiKey)
157
147
 
158
148
  ### HTTP request headers
159
149
 
@@ -165,9 +155,9 @@ end
165
155
 
166
156
  > <SlimUser> update_user(update_user_data)
167
157
 
168
- update_user
158
+ Update User
169
159
 
170
- 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.
160
+ 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.
171
161
 
172
162
  ### Examples
173
163
 
@@ -176,11 +166,6 @@ require 'time'
176
166
  require 'trieve_ruby_client'
177
167
  # setup authorization
178
168
  TrieveRubyClient.configure do |config|
179
- # Configure API key authorization: Cookie
180
- config.api_key['Cookie'] = 'YOUR API KEY'
181
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
182
- # config.api_key_prefix['Cookie'] = 'Bearer'
183
-
184
169
  # Configure API key authorization: ApiKey
185
170
  config.api_key['ApiKey'] = 'YOUR API KEY'
186
171
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -191,7 +176,7 @@ api_instance = TrieveRubyClient::UserApi.new
191
176
  update_user_data = TrieveRubyClient::UpdateUserData.new({organization_id: 'organization_id_example'}) # UpdateUserData | JSON request payload to update user information for the auth'ed user
192
177
 
193
178
  begin
194
- # update_user
179
+ # Update User
195
180
  result = api_instance.update_user(update_user_data)
196
181
  p result
197
182
  rescue TrieveRubyClient::ApiError => e
@@ -207,7 +192,7 @@ This returns an Array which contains the response data, status code and headers.
207
192
 
208
193
  ```ruby
209
194
  begin
210
- # update_user
195
+ # Update User
211
196
  data, status_code, headers = api_instance.update_user_with_http_info(update_user_data)
212
197
  p status_code # => 2xx
213
198
  p headers # => { ... }
@@ -229,7 +214,7 @@ end
229
214
 
230
215
  ### Authorization
231
216
 
232
- [Cookie](../README.md#Cookie), [ApiKey](../README.md#ApiKey)
217
+ [ApiKey](../README.md#ApiKey)
233
218
 
234
219
  ### HTTP request headers
235
220
 
@@ -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.3.4
6
+ The version of the OpenAPI document: 0.4.0
7
7
  Contact: developers@trieve.ai
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.4.0
@@ -19,8 +19,8 @@ module TrieveRubyClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # openid_callback
23
- # openid_callback This is the callback route for the OAuth provider, it should not be called directly. Redirects to browser with set-cookie header.
22
+ # OpenID Connect callback
23
+ # OpenID Connect callback This is the callback route for the OAuth provider, it should not be called directly. Redirects to browser with set-cookie header.
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @return [SlimUser]
26
26
  def callback(opts = {})
@@ -28,8 +28,8 @@ module TrieveRubyClient
28
28
  data
29
29
  end
30
30
 
31
- # openid_callback
32
- # openid_callback This is the callback route for the OAuth provider, it should not be called directly. Redirects to browser with set-cookie header.
31
+ # OpenID Connect callback
32
+ # OpenID Connect callback This is the callback route for the OAuth provider, it should not be called directly. Redirects to browser with set-cookie header.
33
33
  # @param [Hash] opts the optional parameters
34
34
  # @return [Array<(SlimUser, Integer, Hash)>] SlimUser data, response status code and response headers
35
35
  def callback_with_http_info(opts = {})
@@ -76,8 +76,8 @@ module TrieveRubyClient
76
76
  return data, status_code, headers
77
77
  end
78
78
 
79
- # get_me
80
- # get_me Get the user corresponding to your current auth credentials.
79
+ # Get Me
80
+ # Get Me Get the user corresponding to your current auth credentials.
81
81
  # @param [Hash] opts the optional parameters
82
82
  # @return [SlimUser]
83
83
  def get_me(opts = {})
@@ -85,8 +85,8 @@ module TrieveRubyClient
85
85
  data
86
86
  end
87
87
 
88
- # get_me
89
- # get_me Get the user corresponding to your current auth credentials.
88
+ # Get Me
89
+ # Get Me Get the user corresponding to your current auth credentials.
90
90
  # @param [Hash] opts the optional parameters
91
91
  # @return [Array<(SlimUser, Integer, Hash)>] SlimUser data, response status code and response headers
92
92
  def get_me_with_http_info(opts = {})
@@ -114,7 +114,7 @@ module TrieveRubyClient
114
114
  return_type = opts[:debug_return_type] || 'SlimUser'
115
115
 
116
116
  # auth_names
117
- auth_names = opts[:debug_auth_names] || ['Cookie', 'ApiKey']
117
+ auth_names = opts[:debug_auth_names] || ['ApiKey']
118
118
 
119
119
  new_options = opts.merge(
120
120
  :operation => :"AuthApi.get_me",
@@ -133,50 +133,43 @@ module TrieveRubyClient
133
133
  return data, status_code, headers
134
134
  end
135
135
 
136
- # login
137
- # login This will redirect you to the OAuth provider for authentication with email/pass, SSO, Google, Github, etc.
136
+ # Login
137
+ # Login This will redirect you to the OAuth provider for authentication with email/pass, SSO, Google, Github, etc.
138
+ # @param content [AuthQuery] Query parameters for login to be included as kv pairs after ? on the request URL.
138
139
  # @param [Hash] opts the optional parameters
139
- # @option opts [String] :inv_code Code sent via email as a result of successful call to send_invitation
140
- # @option opts [String] :organization_id ID of organization to authenticate into
141
- # @option opts [String] :redirect_uri URL to redirect to after successful login
142
140
  # @return [nil]
143
- def login(opts = {})
144
- login_with_http_info(opts)
141
+ def login(content, opts = {})
142
+ login_with_http_info(content, opts)
145
143
  nil
146
144
  end
147
145
 
148
- # login
149
- # login This will redirect you to the OAuth provider for authentication with email/pass, SSO, Google, Github, etc.
146
+ # Login
147
+ # Login This will redirect you to the OAuth provider for authentication with email/pass, SSO, Google, Github, etc.
148
+ # @param content [AuthQuery] Query parameters for login to be included as kv pairs after ? on the request URL.
150
149
  # @param [Hash] opts the optional parameters
151
- # @option opts [String] :inv_code Code sent via email as a result of successful call to send_invitation
152
- # @option opts [String] :organization_id ID of organization to authenticate into
153
- # @option opts [String] :redirect_uri URL to redirect to after successful login
154
150
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
155
- def login_with_http_info(opts = {})
151
+ def login_with_http_info(content, opts = {})
156
152
  if @api_client.config.debugging
157
153
  @api_client.config.logger.debug 'Calling API: AuthApi.login ...'
158
154
  end
155
+ # verify the required parameter 'content' is set
156
+ if @api_client.config.client_side_validation && content.nil?
157
+ fail ArgumentError, "Missing the required parameter 'content' when calling AuthApi.login"
158
+ end
159
159
  # resource path
160
160
  local_var_path = '/api/auth'
161
161
 
162
162
  # query parameters
163
163
  query_params = opts[:query_params] || {}
164
+ query_params[:'content'] = content
164
165
 
165
166
  # header parameters
166
167
  header_params = opts[:header_params] || {}
167
168
  # HTTP header 'Accept' (if needed)
168
169
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
169
- # HTTP header 'Content-Type'
170
- content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
171
- if !content_type.nil?
172
- header_params['Content-Type'] = content_type
173
- end
174
170
 
175
171
  # form parameters
176
172
  form_params = opts[:form_params] || {}
177
- form_params['inv_code'] = opts[:'inv_code'] if !opts[:'inv_code'].nil?
178
- form_params['organization_id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
179
- form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
180
173
 
181
174
  # http body (model)
182
175
  post_body = opts[:debug_body]
@@ -204,8 +197,8 @@ module TrieveRubyClient
204
197
  return data, status_code, headers
205
198
  end
206
199
 
207
- # logout
208
- # logout Invalidate your current auth credential stored typically stored in a cookie. This does not invalidate your API key.
200
+ # Logout
201
+ # Logout Invalidate your current auth credential stored typically stored in a cookie. This does not invalidate your API key.
209
202
  # @param [Hash] opts the optional parameters
210
203
  # @return [nil]
211
204
  def logout(opts = {})
@@ -213,8 +206,8 @@ module TrieveRubyClient
213
206
  nil
214
207
  end
215
208
 
216
- # logout
217
- # logout Invalidate your current auth credential stored typically stored in a cookie. This does not invalidate your API key.
209
+ # Logout
210
+ # Logout Invalidate your current auth credential stored typically stored in a cookie. This does not invalidate your API key.
218
211
  # @param [Hash] opts the optional parameters
219
212
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
220
213
  def logout_with_http_info(opts = {})