algolia 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/Bug_report.yml +58 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/algolia/api/ingestion_client.rb +9 -9
- data/lib/algolia/models/ingestion/{batch_request.rb → push_task_payload.rb} +13 -12
- data/lib/algolia/models/ingestion/{batch_write_params.rb → push_task_records.rb} +24 -26
- data/lib/algolia/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6967c1e0fee7827a095a00ec10e11f811a36f7aa0c5ba89a3126e12cd5f15cd2
|
4
|
+
data.tar.gz: 0362216040d62edf5d8f62e8fb0975ad4834ec0c29080e5c7f311ad5ee8b4524
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77792993a5628aac7de7e17979860282b645bbb0b04fd25dd57084a91618db3603c6cdebc0a2e920ae0a151e58b5fae16293e398f95a5e6237f37b3c956db16c
|
7
|
+
data.tar.gz: 1c347a72f02b6e0f8eb203876ff5a78f856e0b90c4bb175a73f714561708ee257d23bcc8cb818c42ca4bd97071dcc27e21461b3e2bf4233f168df6ddea43a739
|
@@ -0,0 +1,58 @@
|
|
1
|
+
name: Bug Report
|
2
|
+
description: File a bug report.
|
3
|
+
title: '[bug]: '
|
4
|
+
labels: ['bug', 'triage']
|
5
|
+
body:
|
6
|
+
- type: markdown
|
7
|
+
attributes:
|
8
|
+
value: |
|
9
|
+
## Please help us help you!
|
10
|
+
|
11
|
+
> [!IMPORTANT]
|
12
|
+
> This repository is fully generated and all pull request will be rejected.
|
13
|
+
> If you wish to contribute, please refer to the [contribution guidelines](https://github.com/algolia/api-clients-automation/blob/main/CONTRIBUTING.md) on the `api-clients-automation` repository.
|
14
|
+
|
15
|
+
Before filing your issue, ask yourself:
|
16
|
+
- Is there an issue already opened for this bug?
|
17
|
+
- Can I reproduce it?
|
18
|
+
|
19
|
+
If you are not sure about the origin of the issue, or if it impacts your customer experience, please contact [our support team](https://alg.li/support).
|
20
|
+
- type: textarea
|
21
|
+
attributes:
|
22
|
+
label: Description
|
23
|
+
description: A clear and concise description of what the bug is.
|
24
|
+
validations:
|
25
|
+
required: true
|
26
|
+
- type: dropdown
|
27
|
+
id: client
|
28
|
+
attributes:
|
29
|
+
label: Client
|
30
|
+
description: Which API are you targetting?
|
31
|
+
options:
|
32
|
+
- All
|
33
|
+
- AB testing
|
34
|
+
- Analytics
|
35
|
+
- Ingestion
|
36
|
+
- Insights
|
37
|
+
- Monitoring
|
38
|
+
- Personalization
|
39
|
+
- Query-Suggestions
|
40
|
+
- Recommend
|
41
|
+
- Search
|
42
|
+
- Usage
|
43
|
+
- Crawler
|
44
|
+
validations:
|
45
|
+
required: true
|
46
|
+
- type: input
|
47
|
+
id: version
|
48
|
+
attributes:
|
49
|
+
label: Version
|
50
|
+
description: The version of the client you are using.
|
51
|
+
validations:
|
52
|
+
required: true
|
53
|
+
- type: textarea
|
54
|
+
id: logs
|
55
|
+
attributes:
|
56
|
+
label: Relevant log output
|
57
|
+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
58
|
+
render: shell
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## [3.2.2](https://github.com/algolia/algoliasearch-client-ruby/compare/3.2.1...3.2.2)
|
2
|
+
|
3
|
+
- [327e08d4e](https://github.com/algolia/api-clients-automation/commit/327e08d4e) fix(specs): ingestion push task payload [skip-bc] ([#3607](https://github.com/algolia/api-clients-automation/pull/3607)) by [@shortcuts](https://github.com/shortcuts/)
|
4
|
+
|
1
5
|
## [3.2.1](https://github.com/algolia/algoliasearch-client-ruby/compare/3.2.0...3.2.1)
|
2
6
|
|
3
7
|
- [41f849e41](https://github.com/algolia/api-clients-automation/commit/41f849e41) fix(specs): partial update operation ([#3486](https://github.com/algolia/api-clients-automation/pull/3486)) by [@kai687](https://github.com/kai687/)
|
data/Gemfile.lock
CHANGED
@@ -2354,17 +2354,17 @@ module Algolia
|
|
2354
2354
|
# - deleteIndex
|
2355
2355
|
# - editSettings
|
2356
2356
|
# @param task_id [String] Unique identifier of a task. (required)
|
2357
|
-
# @param
|
2357
|
+
# @param push_task_payload [PushTaskPayload] Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
|
2358
2358
|
# @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)
|
2359
2359
|
# @return [Http::Response] the response
|
2360
|
-
def push_task_with_http_info(task_id,
|
2360
|
+
def push_task_with_http_info(task_id, push_task_payload, request_options = {})
|
2361
2361
|
# verify the required parameter 'task_id' is set
|
2362
2362
|
if @api_client.config.client_side_validation && task_id.nil?
|
2363
2363
|
raise ArgumentError, "Parameter `task_id` is required when calling `push_task`."
|
2364
2364
|
end
|
2365
|
-
# verify the required parameter '
|
2366
|
-
if @api_client.config.client_side_validation &&
|
2367
|
-
raise ArgumentError, "Parameter `
|
2365
|
+
# verify the required parameter 'push_task_payload' is set
|
2366
|
+
if @api_client.config.client_side_validation && push_task_payload.nil?
|
2367
|
+
raise ArgumentError, "Parameter `push_task_payload` is required when calling `push_task`."
|
2368
2368
|
end
|
2369
2369
|
|
2370
2370
|
path = "/2/tasks/{taskID}/push".sub("{" + "taskID" + "}", Transport.encode_uri(task_id.to_s))
|
@@ -2373,7 +2373,7 @@ module Algolia
|
|
2373
2373
|
header_params = {}
|
2374
2374
|
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
2375
2375
|
|
2376
|
-
post_body = request_options[:debug_body] || @api_client.object_to_http_body(
|
2376
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(push_task_payload)
|
2377
2377
|
|
2378
2378
|
new_options = request_options.merge(
|
2379
2379
|
:operation => :"IngestionClient.push_task",
|
@@ -2393,11 +2393,11 @@ module Algolia
|
|
2393
2393
|
# - deleteIndex
|
2394
2394
|
# - editSettings
|
2395
2395
|
# @param task_id [String] Unique identifier of a task. (required)
|
2396
|
-
# @param
|
2396
|
+
# @param push_task_payload [PushTaskPayload] Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
|
2397
2397
|
# @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)
|
2398
2398
|
# @return [RunResponse]
|
2399
|
-
def push_task(task_id,
|
2400
|
-
response = push_task_with_http_info(task_id,
|
2399
|
+
def push_task(task_id, push_task_payload, request_options = {})
|
2400
|
+
response = push_task_with_http_info(task_id, push_task_payload, request_options)
|
2401
2401
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::RunResponse")
|
2402
2402
|
end
|
2403
2403
|
|
@@ -5,11 +5,10 @@ require "time"
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Ingestion
|
8
|
-
class
|
8
|
+
class PushTaskPayload
|
9
9
|
attr_accessor :action
|
10
10
|
|
11
|
-
|
12
|
-
attr_accessor :body
|
11
|
+
attr_accessor :records
|
13
12
|
|
14
13
|
class EnumAttributeValidator
|
15
14
|
attr_reader :datatype
|
@@ -37,7 +36,7 @@ module Algolia
|
|
37
36
|
def self.attribute_map
|
38
37
|
{
|
39
38
|
:action => :action,
|
40
|
-
:
|
39
|
+
:records => :records
|
41
40
|
}
|
42
41
|
end
|
43
42
|
|
@@ -50,7 +49,7 @@ module Algolia
|
|
50
49
|
def self.types_mapping
|
51
50
|
{
|
52
51
|
:action => :"Action",
|
53
|
-
:
|
52
|
+
:records => :"Array<PushTaskRecords>"
|
54
53
|
}
|
55
54
|
end
|
56
55
|
|
@@ -67,7 +66,7 @@ module Algolia
|
|
67
66
|
if (!attributes.is_a?(Hash))
|
68
67
|
raise(
|
69
68
|
ArgumentError,
|
70
|
-
"The input argument (attributes) must be a hash in `Algolia::
|
69
|
+
"The input argument (attributes) must be a hash in `Algolia::PushTaskPayload` initialize method"
|
71
70
|
)
|
72
71
|
end
|
73
72
|
|
@@ -76,7 +75,7 @@ module Algolia
|
|
76
75
|
if (!self.class.attribute_map.key?(k.to_sym))
|
77
76
|
raise(
|
78
77
|
ArgumentError,
|
79
|
-
"`#{k}` is not a valid attribute in `Algolia::
|
78
|
+
"`#{k}` is not a valid attribute in `Algolia::PushTaskPayload`. Please check the name to make sure it's valid. List of attributes: " +
|
80
79
|
self.class.attribute_map.keys.inspect
|
81
80
|
)
|
82
81
|
end
|
@@ -90,10 +89,12 @@ module Algolia
|
|
90
89
|
self.action = nil
|
91
90
|
end
|
92
91
|
|
93
|
-
if attributes.key?(:
|
94
|
-
|
92
|
+
if attributes.key?(:records)
|
93
|
+
if (value = attributes[:records]).is_a?(Array)
|
94
|
+
self.records = value
|
95
|
+
end
|
95
96
|
else
|
96
|
-
self.
|
97
|
+
self.records = nil
|
97
98
|
end
|
98
99
|
end
|
99
100
|
|
@@ -103,7 +104,7 @@ module Algolia
|
|
103
104
|
return true if self.equal?(other)
|
104
105
|
self.class == other.class &&
|
105
106
|
action == other.action &&
|
106
|
-
|
107
|
+
records == other.records
|
107
108
|
end
|
108
109
|
|
109
110
|
# @see the `==` method
|
@@ -115,7 +116,7 @@ module Algolia
|
|
115
116
|
# Calculates hash code according to all attributes.
|
116
117
|
# @return [Integer] Hash code
|
117
118
|
def hash
|
118
|
-
[action,
|
119
|
+
[action, records].hash
|
119
120
|
end
|
120
121
|
|
121
122
|
# Builds the object from hash
|
@@ -5,14 +5,16 @@ require "time"
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Ingestion
|
8
|
-
|
9
|
-
|
10
|
-
attr_accessor :
|
8
|
+
class PushTaskRecords
|
9
|
+
# Unique record identifier.
|
10
|
+
attr_accessor :object_id
|
11
|
+
|
12
|
+
attr_accessor :additional_properties
|
11
13
|
|
12
14
|
# Attribute mapping from ruby-style variable name to JSON key.
|
13
15
|
def self.attribute_map
|
14
16
|
{
|
15
|
-
:
|
17
|
+
:object_id => :objectID
|
16
18
|
}
|
17
19
|
end
|
18
20
|
|
@@ -24,7 +26,7 @@ module Algolia
|
|
24
26
|
# Attribute type mapping.
|
25
27
|
def self.types_mapping
|
26
28
|
{
|
27
|
-
:
|
29
|
+
:object_id => :"String"
|
28
30
|
}
|
29
31
|
end
|
30
32
|
|
@@ -41,30 +43,19 @@ module Algolia
|
|
41
43
|
if (!attributes.is_a?(Hash))
|
42
44
|
raise(
|
43
45
|
ArgumentError,
|
44
|
-
"The input argument (attributes) must be a hash in `Algolia::
|
46
|
+
"The input argument (attributes) must be a hash in `Algolia::PushTaskRecords` initialize method"
|
45
47
|
)
|
46
48
|
end
|
47
49
|
|
48
|
-
|
49
|
-
|
50
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
51
|
-
raise(
|
52
|
-
ArgumentError,
|
53
|
-
"`#{k}` is not a valid attribute in `Algolia::BatchWriteParams`. Please check the name to make sure it's valid. List of attributes: " +
|
54
|
-
self.class.attribute_map.keys.inspect
|
55
|
-
)
|
56
|
-
end
|
57
|
-
|
58
|
-
h[k.to_sym] = v
|
59
|
-
}
|
60
|
-
|
61
|
-
if attributes.key?(:requests)
|
62
|
-
if (value = attributes[:requests]).is_a?(Array)
|
63
|
-
self.requests = value
|
64
|
-
end
|
50
|
+
if attributes.key?(:object_id)
|
51
|
+
self.object_id = attributes[:object_id]
|
65
52
|
else
|
66
|
-
self.
|
53
|
+
self.object_id = nil
|
67
54
|
end
|
55
|
+
|
56
|
+
# add extra attribute to additional_properties
|
57
|
+
self.additional_properties ||= {}
|
58
|
+
self.additional_properties.merge!(attributes.reject { |k, _| self.class.attribute_map.key?(k.to_sym) })
|
68
59
|
end
|
69
60
|
|
70
61
|
# Checks equality by comparing each attribute.
|
@@ -72,7 +63,7 @@ module Algolia
|
|
72
63
|
def ==(other)
|
73
64
|
return true if self.equal?(other)
|
74
65
|
self.class == other.class &&
|
75
|
-
|
66
|
+
object_id == other.object_id
|
76
67
|
end
|
77
68
|
|
78
69
|
# @see the `==` method
|
@@ -84,7 +75,7 @@ module Algolia
|
|
84
75
|
# Calculates hash code according to all attributes.
|
85
76
|
# @return [Integer] Hash code
|
86
77
|
def hash
|
87
|
-
[
|
78
|
+
[object_id].hash
|
88
79
|
end
|
89
80
|
|
90
81
|
# Builds the object from hash
|
@@ -110,6 +101,8 @@ module Algolia
|
|
110
101
|
end
|
111
102
|
end
|
112
103
|
|
104
|
+
# add extra attribute to transformed_hash
|
105
|
+
transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
|
113
106
|
new(transformed_hash)
|
114
107
|
end
|
115
108
|
|
@@ -189,6 +182,11 @@ module Algolia
|
|
189
182
|
hash[param] = _to_hash(value)
|
190
183
|
end
|
191
184
|
|
185
|
+
# also add attributes from additional_properties to hash
|
186
|
+
self.additional_properties&.each_pair do |k, v|
|
187
|
+
hash[k.to_sym] = _to_hash(v)
|
188
|
+
end
|
189
|
+
|
192
190
|
hash
|
193
191
|
end
|
194
192
|
|
data/lib/algolia/version.rb
CHANGED
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.2.
|
4
|
+
version: 3.2.2
|
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-08-
|
11
|
+
date: 2024-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -118,6 +118,7 @@ executables: []
|
|
118
118
|
extensions: []
|
119
119
|
extra_rdoc_files: []
|
120
120
|
files:
|
121
|
+
- ".github/ISSUE_TEMPLATE/Bug_report.yml"
|
121
122
|
- ".github/workflows/issue.yml"
|
122
123
|
- ".github/workflows/release.yml"
|
123
124
|
- ".gitignore"
|
@@ -244,8 +245,6 @@ files:
|
|
244
245
|
- lib/algolia/models/ingestion/authentication_type.rb
|
245
246
|
- lib/algolia/models/ingestion/authentication_update.rb
|
246
247
|
- lib/algolia/models/ingestion/authentication_update_response.rb
|
247
|
-
- lib/algolia/models/ingestion/batch_request.rb
|
248
|
-
- lib/algolia/models/ingestion/batch_write_params.rb
|
249
248
|
- lib/algolia/models/ingestion/big_commerce_channel.rb
|
250
249
|
- lib/algolia/models/ingestion/big_commerce_metafield.rb
|
251
250
|
- lib/algolia/models/ingestion/big_query_data_type.rb
|
@@ -296,6 +295,8 @@ files:
|
|
296
295
|
- lib/algolia/models/ingestion/platform.rb
|
297
296
|
- lib/algolia/models/ingestion/platform_none.rb
|
298
297
|
- lib/algolia/models/ingestion/platform_with_none.rb
|
298
|
+
- lib/algolia/models/ingestion/push_task_payload.rb
|
299
|
+
- lib/algolia/models/ingestion/push_task_records.rb
|
299
300
|
- lib/algolia/models/ingestion/record_type.rb
|
300
301
|
- lib/algolia/models/ingestion/run.rb
|
301
302
|
- lib/algolia/models/ingestion/run_list_response.rb
|