algolia 3.0.0.beta.5 → 3.0.0.beta.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7841f068eb004a49c57459769fc18f10f98714b3229b63f4223839e9d3e15ea6
4
- data.tar.gz: 6f72cc44d5c858418ae7deed49ad2eaf86458fac3e08b2710e40207dd3f1b5ab
3
+ metadata.gz: b052211b4a0ecb74c42f11d50147460cf98a1aae441095e4c421800d611c1f0c
4
+ data.tar.gz: ce30bdefbd8703da5fc943ebdd24126874c05ad78368212e19e70138eea52f9e
5
5
  SHA512:
6
- metadata.gz: 91fe14b759af3f8d02e351294d97e447b98c71489820e819f9665fb25ce1d7a640c046ea4657fcc87435c5ed9f9c8688277774b5a6c5ace91804912b5a0d8d2d
7
- data.tar.gz: fa78f348f10ae77b918a52b14768bfd52dedc504710fed6133908015724f27904739552e54403d571f3123f19b8f73722d094eea5e1fe48fd80af615e4931c4f
6
+ metadata.gz: 735dc36265137ffee7456a8cd0cfeb5c6607e56c71bb7595b9c113780661d24d48c2f9f37c8053dc9f5928097beb925a6211107c08f2a01d664e101c5795a346
7
+ data.tar.gz: ca760e5f13736c3ea825087a46bc9cc4013c98223700c5d140a412eac63559c746d62ca3d07aed6fef9663cf89ad0a349f9e627cd3fdea3608a70d619bdc470e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [3.0.0.beta.6](https://github.com/algolia/algoliasearch-client-ruby/compare/3.0.0.beta.5...3.0.0.beta.6)
2
+
3
+ - [e5cfcf0c4](https://github.com/algolia/api-clients-automation/commit/e5cfcf0c4) feat(clients): generate common LICENSE ([#3258](https://github.com/algolia/api-clients-automation/pull/3258)) by [@shortcuts](https://github.com/shortcuts/)
4
+ - [47dd4bb5b](https://github.com/algolia/api-clients-automation/commit/47dd4bb5b) fix(clients): update README snippets and contributing guides ([#3257](https://github.com/algolia/api-clients-automation/pull/3257)) by [@shortcuts](https://github.com/shortcuts/)
5
+ - [7a90e4532](https://github.com/algolia/api-clients-automation/commit/7a90e4532) feat(clients): add `saveObjects`, `deleteObjects` and `partialUpdateObjects` helpers ([#3180](https://github.com/algolia/api-clients-automation/pull/3180)) by [@shortcuts](https://github.com/shortcuts/)
6
+ - [5dbdb91e9](https://github.com/algolia/api-clients-automation/commit/5dbdb91e9) fix(specs): virtual is a fetchedIndex props ([#3255](https://github.com/algolia/api-clients-automation/pull/3255)) by [@shortcuts](https://github.com/shortcuts/)
7
+ - [0a6277937](https://github.com/algolia/api-clients-automation/commit/0a6277937) fix(specs): add virtual index settings and update renderingContent ([#3254](https://github.com/algolia/api-clients-automation/pull/3254)) by [@shortcuts](https://github.com/shortcuts/)
8
+ - [536a348f1](https://github.com/algolia/api-clients-automation/commit/536a348f1) fix(clients): chunked batch helper size property consistency ([#3253](https://github.com/algolia/api-clients-automation/pull/3253)) by [@Fluf22](https://github.com/Fluf22/)
9
+
1
10
  ## [3.0.0.beta.5](https://github.com/algolia/algoliasearch-client-ruby/compare/3.0.0.beta.4...3.0.0.beta.5)
2
11
 
3
12
  - [b7ae19f2b](https://github.com/algolia/api-clients-automation/commit/b7ae19f2b) feat(specs): add transformations endpoints to ingestion ([#3215](https://github.com/algolia/api-clients-automation/pull/3215)) by [@shortcuts](https://github.com/shortcuts/)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- algolia (3.0.0.beta.5)
4
+ algolia (3.0.0.beta.6)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-net_http_persistent (>= 0.15, < 3)
7
7
  net-http-persistent
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2013-Present Algolia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -51,12 +51,12 @@ For full documentation, visit the **[Algolia Ruby API Client](https://www.algoli
51
51
 
52
52
  ## ❓ Troubleshooting
53
53
 
54
- Encountering an issue? Before reaching out to support, we recommend heading to our [FAQ](https://www.algolia.com/doc/api-client/troubleshooting/faq/ruby/) where you will find answers for the most common issues and gotchas with the client.
54
+ Encountering an issue? Before reaching out to support, we recommend heading to our [FAQ](https://www.algolia.com/doc/api-client/troubleshooting/faq/ruby/) where you will find answers for the most common issues and gotchas with the client. You can also open [a GitHub issue](https://github.com/algolia/api-clients-automation/issues/new?assignees=&labels=&projects=&template=Bug_report.md)
55
55
 
56
- ## Upgrade from V1 to V2
56
+ ## Contributing
57
57
 
58
- If you were using the v1 and wish to update to v2, please follow our [Upgrade Guide](upgrade_guide.md)
58
+ This repository hosts the code of the generated Algolia API client for Ruby, if you'd like to contribute, head over to the [main repository](https://github.com/algolia/api-clients-automation). You can also find contributing guides on [our documentation website](https://api-clients-automation.netlify.app/docs/contributing/introduction).
59
59
 
60
60
  ## 📄 License
61
61
 
62
- Algolia Ruby API Client is an open-sourced software licensed under the [MIT license](LICENSE.md).
62
+ The Algolia Ruby API Client is an open-sourced software licensed under the [MIT license](LICENSE).
@@ -3178,6 +3178,64 @@ module Algolia
3178
3178
  valid_until - now
3179
3179
  end
3180
3180
 
3181
+ # Helper: Saves the given array of objects in the given index. The `chunked_batch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
3182
+ #
3183
+ # @param index_name [String]: The `index_name` to save `objects` in.
3184
+ # @param objects [Array]: The array of `objects` to store in the given Algolia `indexName`.
3185
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
3186
+ #
3187
+ # @return [BatchResponse]
3188
+ #
3189
+ def save_objects(index_name, objects, request_options = {})
3190
+ chunked_batch(
3191
+ index_name,
3192
+ objects,
3193
+ Search::Action::ADD_OBJECT,
3194
+ false,
3195
+ 1000,
3196
+ request_options
3197
+ )
3198
+ end
3199
+
3200
+ # Helper: Deletes every records for the given objectIDs. The `chunked_batch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
3201
+ #
3202
+ # @param index_name [String]: The `index_name` to delete `object_ids` from.
3203
+ # @param object_ids [Array]: The object_ids to delete.
3204
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
3205
+ #
3206
+ # @return [BatchResponse]
3207
+ #
3208
+ def delete_objects(index_name, object_ids, request_options = {})
3209
+ chunked_batch(
3210
+ index_name,
3211
+ object_ids.map { |id| { "objectID" => id } },
3212
+ Search::Action::DELETE_OBJECT,
3213
+ false,
3214
+ 1000,
3215
+ request_options
3216
+ )
3217
+ end
3218
+
3219
+ # Helper: Replaces object content of all the given objects according to their respective `object_id` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
3220
+ #
3221
+ # @param index_name [String]: The `index_name` to delete `object_ids` from.
3222
+ # @param objects [Array]: The objects to partially update.
3223
+ # @param create_if_not_exists [Boolean]: To be provided if non-existing objects are passed, otherwise, the call will fail.
3224
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
3225
+ #
3226
+ # @return [BatchResponse]
3227
+ #
3228
+ def partial_update_objects(index_name, objects, create_if_not_exists, request_options = {})
3229
+ chunked_batch(
3230
+ index_name,
3231
+ objects,
3232
+ create_if_not_exists ? Search::Action::PARTIAL_UPDATE_OBJECT : Search::Action::PARTIAL_UPDATE_OBJECT_NO_CREATE,
3233
+ false,
3234
+ 1000,
3235
+ request_options
3236
+ )
3237
+ end
3238
+
3181
3239
  # Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
3182
3240
  #
3183
3241
  # @param index_name [String] the `index_name` where the operation will be performed.
@@ -11,6 +11,9 @@ module Algolia
11
11
 
12
12
  attr_accessor :sort_remaining_by
13
13
 
14
+ # Hide facet values.
15
+ attr_accessor :hide
16
+
14
17
  class EnumAttributeValidator
15
18
  attr_reader :datatype
16
19
  attr_reader :allowable_values
@@ -37,7 +40,8 @@ module Algolia
37
40
  def self.attribute_map
38
41
  {
39
42
  :order => :order,
40
- :sort_remaining_by => :sortRemainingBy
43
+ :sort_remaining_by => :sortRemainingBy,
44
+ :hide => :hide
41
45
  }
42
46
  end
43
47
 
@@ -50,7 +54,8 @@ module Algolia
50
54
  def self.types_mapping
51
55
  {
52
56
  :order => :'Array<String>',
53
- :sort_remaining_by => :SortRemainingBy
57
+ :sort_remaining_by => :SortRemainingBy,
58
+ :hide => :'Array<String>'
54
59
  }
55
60
  end
56
61
 
@@ -85,6 +90,12 @@ module Algolia
85
90
  if attributes.key?(:sort_remaining_by)
86
91
  self.sort_remaining_by = attributes[:sort_remaining_by]
87
92
  end
93
+
94
+ if attributes.key?(:hide)
95
+ if (value = attributes[:hide]).is_a?(Array)
96
+ self.hide = value
97
+ end
98
+ end
88
99
  end
89
100
 
90
101
  # Checks equality by comparing each attribute.
@@ -94,7 +105,8 @@ module Algolia
94
105
 
95
106
  self.class == other.class &&
96
107
  order == other.order &&
97
- sort_remaining_by == other.sort_remaining_by
108
+ sort_remaining_by == other.sort_remaining_by &&
109
+ hide == other.hide
98
110
  end
99
111
 
100
112
  # @see the `==` method
@@ -106,7 +118,7 @@ module Algolia
106
118
  # Calculates hash code according to all attributes.
107
119
  # @return [Integer] Hash code
108
120
  def hash
109
- [order, sort_remaining_by].hash
121
+ [order, sort_remaining_by, hide].hash
110
122
  end
111
123
 
112
124
  # Builds the object from hash
@@ -39,6 +39,9 @@ module Algolia
39
39
  # Only present if the index is a primary index with replicas. Contains the names of all linked replicas.
40
40
  attr_accessor :replicas
41
41
 
42
+ # Only present if the index is a [virtual replica](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-an-index-alphabetically/#virtual-replicas).
43
+ attr_accessor :virtual
44
+
42
45
  # Attribute mapping from ruby-style variable name to JSON key.
43
46
  def self.attribute_map
44
47
  {
@@ -52,7 +55,8 @@ module Algolia
52
55
  :number_of_pending_tasks => :numberOfPendingTasks,
53
56
  :pending_task => :pendingTask,
54
57
  :primary => :primary,
55
- :replicas => :replicas
58
+ :replicas => :replicas,
59
+ :virtual => :virtual
56
60
  }
57
61
  end
58
62
 
@@ -74,7 +78,8 @@ module Algolia
74
78
  :number_of_pending_tasks => :Integer,
75
79
  :pending_task => :Boolean,
76
80
  :primary => :String,
77
- :replicas => :'Array<String>'
81
+ :replicas => :'Array<String>',
82
+ :virtual => :Boolean
78
83
  }
79
84
  end
80
85
 
@@ -163,6 +168,10 @@ module Algolia
163
168
  self.replicas = value
164
169
  end
165
170
  end
171
+
172
+ if attributes.key?(:virtual)
173
+ self.virtual = attributes[:virtual]
174
+ end
166
175
  end
167
176
 
168
177
  # Checks equality by comparing each attribute.
@@ -181,7 +190,8 @@ module Algolia
181
190
  number_of_pending_tasks == other.number_of_pending_tasks &&
182
191
  pending_task == other.pending_task &&
183
192
  primary == other.primary &&
184
- replicas == other.replicas
193
+ replicas == other.replicas &&
194
+ virtual == other.virtual
185
195
  end
186
196
 
187
197
  # @see the `==` method
@@ -193,7 +203,7 @@ module Algolia
193
203
  # Calculates hash code according to all attributes.
194
204
  # @return [Integer] Hash code
195
205
  def hash
196
- [name, created_at, updated_at, entries, data_size, file_size, last_build_time_s, number_of_pending_tasks, pending_task, primary, replicas].hash
206
+ [name, created_at, updated_at, entries, data_size, file_size, last_build_time_s, number_of_pending_tasks, pending_task, primary, replicas, virtual].hash
197
207
  end
198
208
 
199
209
  # Builds the object from hash
@@ -11,6 +11,9 @@ module Algolia
11
11
 
12
12
  attr_accessor :sort_remaining_by
13
13
 
14
+ # Hide facet values.
15
+ attr_accessor :hide
16
+
14
17
  class EnumAttributeValidator
15
18
  attr_reader :datatype
16
19
  attr_reader :allowable_values
@@ -37,7 +40,8 @@ module Algolia
37
40
  def self.attribute_map
38
41
  {
39
42
  :order => :order,
40
- :sort_remaining_by => :sortRemainingBy
43
+ :sort_remaining_by => :sortRemainingBy,
44
+ :hide => :hide
41
45
  }
42
46
  end
43
47
 
@@ -50,7 +54,8 @@ module Algolia
50
54
  def self.types_mapping
51
55
  {
52
56
  :order => :'Array<String>',
53
- :sort_remaining_by => :SortRemainingBy
57
+ :sort_remaining_by => :SortRemainingBy,
58
+ :hide => :'Array<String>'
54
59
  }
55
60
  end
56
61
 
@@ -85,6 +90,12 @@ module Algolia
85
90
  if attributes.key?(:sort_remaining_by)
86
91
  self.sort_remaining_by = attributes[:sort_remaining_by]
87
92
  end
93
+
94
+ if attributes.key?(:hide)
95
+ if (value = attributes[:hide]).is_a?(Array)
96
+ self.hide = value
97
+ end
98
+ end
88
99
  end
89
100
 
90
101
  # Checks equality by comparing each attribute.
@@ -94,7 +105,8 @@ module Algolia
94
105
 
95
106
  self.class == other.class &&
96
107
  order == other.order &&
97
- sort_remaining_by == other.sort_remaining_by
108
+ sort_remaining_by == other.sort_remaining_by &&
109
+ hide == other.hide
98
110
  end
99
111
 
100
112
  # @see the `==` method
@@ -106,7 +118,7 @@ module Algolia
106
118
  # Calculates hash code according to all attributes.
107
119
  # @return [Integer] Hash code
108
120
  def hash
109
- [order, sort_remaining_by].hash
121
+ [order, sort_remaining_by, hide].hash
110
122
  end
111
123
 
112
124
  # Builds the object from hash
@@ -1,5 +1,5 @@
1
1
  # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  module Algolia
4
- VERSION = '3.0.0.beta.5'.freeze
4
+ VERSION = '3.0.0.beta.6'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: algolia
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.beta.5
4
+ version: 3.0.0.beta.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://alg.li/support
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-21 00:00:00.000000000 Z
11
+ date: 2024-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -114,13 +114,11 @@ extra_rdoc_files: []
114
114
  files:
115
115
  - ".github/workflows/release.yml"
116
116
  - ".gitignore"
117
- - ".openapi-generator-ignore"
118
- - ".openapi-generator/FILES"
119
- - ".openapi-generator/VERSION"
120
117
  - ".rubocop.yml"
121
118
  - CHANGELOG.md
122
119
  - Gemfile
123
120
  - Gemfile.lock
121
+ - LICENSE
124
122
  - README.md
125
123
  - Rakefile
126
124
  - algolia.gemspec
@@ -1,11 +0,0 @@
1
- lib/algolia/api/usage_client.rb
2
- lib/algolia/models/usage/error_base.rb
3
- lib/algolia/models/usage/get_usage200_response.rb
4
- lib/algolia/models/usage/get_usage200_response_statistics_inner.rb
5
- lib/algolia/models/usage/get_usage400_response.rb
6
- lib/algolia/models/usage/get_usage400_response_error.rb
7
- lib/algolia/models/usage/get_usage400_response_error_errors_inner.rb
8
- lib/algolia/models/usage/granularity.rb
9
- lib/algolia/models/usage/statistic.rb
10
- lib/algolia/models/usage/statistic_value.rb
11
- lib/algolia/version.rb
@@ -1 +0,0 @@
1
- 7.6.0
@@ -1,23 +0,0 @@
1
- # OpenAPI Generator Ignore
2
- # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3
-
4
- # Use this file to prevent files from being overwritten by the generator.
5
- # The patterns follow closely to .gitignore or .dockerignore.
6
-
7
- # As an example, the C# client generator defines ApiClient.cs.
8
- # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9
- #ApiClient.cs
10
-
11
- # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
- #foo/*/qux
13
- # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
-
15
- # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
- #foo/**/qux
17
- # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
-
19
- # You can also negate patterns with an exclamation (!).
20
- # For example, you can ignore all files in a docs folder with the file extension .md:
21
- #docs/*.md
22
- # Then explicitly reverse the ignore rule for a single file:
23
- #!docs/README.md