Skip to content

Commit 5d87d3a

Browse files
algolia-botrenovate[bot]shortcutsmillotp
committed
chore(deps): dependencies 2024-08-19 (generated)
algolia/api-clients-automation#3530 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Algolia Bot <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: shortcuts <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 737fa9e commit 5d87d3a

12 files changed

+36
-36
lines changed

Sources/Analytics/Models/CurrenciesValue.swift renamed to Sources/Analytics/Models/CurrencyCode.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
#endif
88

99
/// Currency code.
10-
public struct CurrenciesValue: Codable, JSONEncodable {
10+
public struct CurrencyCode: Codable, JSONEncodable {
1111
/// Currency code.
1212
public var currency: String?
1313
/// Revenue associated with this search in this currency.
@@ -32,14 +32,14 @@ public struct CurrenciesValue: Codable, JSONEncodable {
3232
}
3333
}
3434

35-
extension CurrenciesValue: Equatable {
36-
public static func ==(lhs: CurrenciesValue, rhs: CurrenciesValue) -> Bool {
35+
extension CurrencyCode: Equatable {
36+
public static func ==(lhs: CurrencyCode, rhs: CurrencyCode) -> Bool {
3737
lhs.currency == rhs.currency &&
3838
lhs.revenue == rhs.revenue
3939
}
4040
}
4141

42-
extension CurrenciesValue: Hashable {
42+
extension CurrencyCode: Hashable {
4343
public func hash(into hasher: inout Hasher) {
4444
hasher.combine(self.currency?.hashValue)
4545
hasher.combine(self.revenue?.hashValue)

Sources/Analytics/Models/DailyRevenue.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import Foundation
88

99
public struct DailyRevenue: Codable, JSONEncodable {
1010
/// Revenue associated with this search, broken-down by currencies.
11-
public var currencies: [String: CurrenciesValue]
11+
public var currencies: [String: CurrencyCode]
1212
/// Date in the format YYYY-MM-DD.
1313
public var date: String
1414

15-
public init(currencies: [String: CurrenciesValue], date: String) {
15+
public init(currencies: [String: CurrencyCode], date: String) {
1616
self.currencies = currencies
1717
self.date = date
1818
}

Sources/Analytics/Models/GetRevenue.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import Foundation
88

99
public struct GetRevenue: Codable, JSONEncodable {
1010
/// Revenue associated with this search, broken-down by currencies.
11-
public var currencies: [String: CurrenciesValue]
11+
public var currencies: [String: CurrencyCode]
1212
/// Daily revenue.
1313
public var dates: [DailyRevenue]
1414

15-
public init(currencies: [String: CurrenciesValue], dates: [DailyRevenue]) {
15+
public init(currencies: [String: CurrencyCode], dates: [DailyRevenue]) {
1616
self.currencies = currencies
1717
self.dates = dates
1818
}

Sources/Analytics/Models/TopHitWithRevenueAnalytics.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public struct TopHitWithRevenueAnalytics: Codable, JSONEncodable {
3636
/// Number of purchase events from this search.
3737
public var purchaseCount: Int
3838
/// Revenue associated with this search, broken-down by currencies.
39-
public var currencies: [String: CurrenciesValue]
39+
public var currencies: [String: CurrencyCode]
4040

4141
public init(
4242
hit: String,
@@ -50,7 +50,7 @@ public struct TopHitWithRevenueAnalytics: Codable, JSONEncodable {
5050
addToCartCount: Int,
5151
purchaseRate: Double?,
5252
purchaseCount: Int,
53-
currencies: [String: CurrenciesValue]
53+
currencies: [String: CurrencyCode]
5454
) {
5555
self.hit = hit
5656
self.count = count

Sources/Analytics/Models/TopSearchWithRevenueAnalytics.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public struct TopSearchWithRevenueAnalytics: Codable, JSONEncodable {
3232
/// Number of results (hits).
3333
public var nbHits: Int
3434
/// Revenue associated with this search, broken-down by currencies.
35-
public var currencies: [String: CurrenciesValue]
35+
public var currencies: [String: CurrencyCode]
3636
/// Add-to-cart rate, calculated as number of tracked searches with at least one add-to-cart event divided by the
3737
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
3838
/// true.
@@ -56,7 +56,7 @@ public struct TopSearchWithRevenueAnalytics: Codable, JSONEncodable {
5656
clickCount: Int,
5757
conversionCount: Int,
5858
nbHits: Int,
59-
currencies: [String: CurrenciesValue],
59+
currencies: [String: CurrencyCode],
6060
addToCartRate: Double?,
6161
addToCartCount: Int,
6262
purchaseRate: Double?,

Sources/Recommend/Models/RecommendBaseSearchResponse.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public struct RecommendBaseSearchResponse: Codable, JSONEncodable {
2828
/// Facet counts.
2929
public var facets: [String: [String: Int]]?
3030
/// Statistics for numerical facets.
31-
public var facetsStats: [String: RecommendFacetsStats]?
31+
public var facetsStats: [String: RecommendFacetStats]?
3232
/// Index name used for the query.
3333
public var index: String?
3434
/// Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query.
@@ -69,7 +69,7 @@ public struct RecommendBaseSearchResponse: Codable, JSONEncodable {
6969
exhaustiveNbHits: Bool? = nil,
7070
exhaustiveTypo: Bool? = nil,
7171
facets: [String: [String: Int]]? = nil,
72-
facetsStats: [String: RecommendFacetsStats]? = nil,
72+
facetsStats: [String: RecommendFacetStats]? = nil,
7373
index: String? = nil,
7474
indexUsed: String? = nil,
7575
message: String? = nil,
@@ -172,7 +172,7 @@ public struct RecommendBaseSearchResponse: Codable, JSONEncodable {
172172

173173
self.facets = dictionary["facets"]?.value as? [String: [String: Int]]
174174

175-
self.facetsStats = dictionary["facetsStats"]?.value as? [String: RecommendFacetsStats]
175+
self.facetsStats = dictionary["facetsStats"]?.value as? [String: RecommendFacetStats]
176176

177177
self.index = dictionary["index"]?.value as? String
178178

@@ -264,7 +264,7 @@ public struct RecommendBaseSearchResponse: Codable, JSONEncodable {
264264
self.exhaustiveNbHits = try container.decodeIfPresent(Bool.self, forKey: .exhaustiveNbHits)
265265
self.exhaustiveTypo = try container.decodeIfPresent(Bool.self, forKey: .exhaustiveTypo)
266266
self.facets = try container.decodeIfPresent([String: [String: Int]].self, forKey: .facets)
267-
self.facetsStats = try container.decodeIfPresent([String: RecommendFacetsStats].self, forKey: .facetsStats)
267+
self.facetsStats = try container.decodeIfPresent([String: RecommendFacetStats].self, forKey: .facetsStats)
268268
self.index = try container.decodeIfPresent(String.self, forKey: .index)
269269
self.indexUsed = try container.decodeIfPresent(String.self, forKey: .indexUsed)
270270
self.message = try container.decodeIfPresent(String.self, forKey: .message)

Sources/Recommend/Models/RecommendFacetsStats.swift renamed to Sources/Recommend/Models/RecommendFacetStats.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Foundation
66
import Core
77
#endif
88

9-
public struct RecommendFacetsStats: Codable, JSONEncodable {
9+
public struct RecommendFacetStats: Codable, JSONEncodable {
1010
/// Minimum value in the results.
1111
public var min: Double?
1212
/// Maximum value in the results.
@@ -41,16 +41,16 @@ public struct RecommendFacetsStats: Codable, JSONEncodable {
4141
}
4242
}
4343

44-
extension RecommendFacetsStats: Equatable {
45-
public static func ==(lhs: RecommendFacetsStats, rhs: RecommendFacetsStats) -> Bool {
44+
extension RecommendFacetStats: Equatable {
45+
public static func ==(lhs: RecommendFacetStats, rhs: RecommendFacetStats) -> Bool {
4646
lhs.min == rhs.min &&
4747
lhs.max == rhs.max &&
4848
lhs.avg == rhs.avg &&
4949
lhs.sum == rhs.sum
5050
}
5151
}
5252

53-
extension RecommendFacetsStats: Hashable {
53+
extension RecommendFacetStats: Hashable {
5454
public func hash(into hasher: inout Hasher) {
5555
hasher.combine(self.min?.hashValue)
5656
hasher.combine(self.max?.hashValue)

Sources/Recommend/Models/RecommendationsResults.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public struct RecommendationsResults: Codable, JSONEncodable {
2828
/// Facet counts.
2929
public var facets: [String: [String: Int]]?
3030
/// Statistics for numerical facets.
31-
public var facetsStats: [String: RecommendFacetsStats]?
31+
public var facetsStats: [String: RecommendFacetStats]?
3232
/// Index name used for the query.
3333
public var index: String?
3434
/// Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query.
@@ -78,7 +78,7 @@ public struct RecommendationsResults: Codable, JSONEncodable {
7878
exhaustiveNbHits: Bool? = nil,
7979
exhaustiveTypo: Bool? = nil,
8080
facets: [String: [String: Int]]? = nil,
81-
facetsStats: [String: RecommendFacetsStats]? = nil,
81+
facetsStats: [String: RecommendFacetStats]? = nil,
8282
index: String? = nil,
8383
indexUsed: String? = nil,
8484
message: String? = nil,

Sources/Search/Models/BrowseResponse.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public struct BrowseResponse<T: Codable>: Codable, JSONEncodable {
2828
/// Facet counts.
2929
public var facets: [String: [String: Int]]?
3030
/// Statistics for numerical facets.
31-
public var facetsStats: [String: SearchFacetsStats]?
31+
public var facetsStats: [String: SearchFacetStats]?
3232
/// Index name used for the query.
3333
public var index: String?
3434
/// Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query.
@@ -87,7 +87,7 @@ public struct BrowseResponse<T: Codable>: Codable, JSONEncodable {
8787
exhaustiveNbHits: Bool? = nil,
8888
exhaustiveTypo: Bool? = nil,
8989
facets: [String: [String: Int]]? = nil,
90-
facetsStats: [String: SearchFacetsStats]? = nil,
90+
facetsStats: [String: SearchFacetStats]? = nil,
9191
index: String? = nil,
9292
indexUsed: String? = nil,
9393
message: String? = nil,

Sources/Search/Models/SearchBaseSearchResponse.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public struct SearchBaseSearchResponse: Codable, JSONEncodable {
2828
/// Facet counts.
2929
public var facets: [String: [String: Int]]?
3030
/// Statistics for numerical facets.
31-
public var facetsStats: [String: SearchFacetsStats]?
31+
public var facetsStats: [String: SearchFacetStats]?
3232
/// Index name used for the query.
3333
public var index: String?
3434
/// Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query.
@@ -69,7 +69,7 @@ public struct SearchBaseSearchResponse: Codable, JSONEncodable {
6969
exhaustiveNbHits: Bool? = nil,
7070
exhaustiveTypo: Bool? = nil,
7171
facets: [String: [String: Int]]? = nil,
72-
facetsStats: [String: SearchFacetsStats]? = nil,
72+
facetsStats: [String: SearchFacetStats]? = nil,
7373
index: String? = nil,
7474
indexUsed: String? = nil,
7575
message: String? = nil,
@@ -172,7 +172,7 @@ public struct SearchBaseSearchResponse: Codable, JSONEncodable {
172172

173173
self.facets = dictionary["facets"]?.value as? [String: [String: Int]]
174174

175-
self.facetsStats = dictionary["facetsStats"]?.value as? [String: SearchFacetsStats]
175+
self.facetsStats = dictionary["facetsStats"]?.value as? [String: SearchFacetStats]
176176

177177
self.index = dictionary["index"]?.value as? String
178178

@@ -264,7 +264,7 @@ public struct SearchBaseSearchResponse: Codable, JSONEncodable {
264264
self.exhaustiveNbHits = try container.decodeIfPresent(Bool.self, forKey: .exhaustiveNbHits)
265265
self.exhaustiveTypo = try container.decodeIfPresent(Bool.self, forKey: .exhaustiveTypo)
266266
self.facets = try container.decodeIfPresent([String: [String: Int]].self, forKey: .facets)
267-
self.facetsStats = try container.decodeIfPresent([String: SearchFacetsStats].self, forKey: .facetsStats)
267+
self.facetsStats = try container.decodeIfPresent([String: SearchFacetStats].self, forKey: .facetsStats)
268268
self.index = try container.decodeIfPresent(String.self, forKey: .index)
269269
self.indexUsed = try container.decodeIfPresent(String.self, forKey: .indexUsed)
270270
self.message = try container.decodeIfPresent(String.self, forKey: .message)

Sources/Search/Models/SearchFacetsStats.swift renamed to Sources/Search/Models/SearchFacetStats.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Foundation
66
import Core
77
#endif
88

9-
public struct SearchFacetsStats: Codable, JSONEncodable {
9+
public struct SearchFacetStats: Codable, JSONEncodable {
1010
/// Minimum value in the results.
1111
public var min: Double?
1212
/// Maximum value in the results.
@@ -41,16 +41,16 @@ public struct SearchFacetsStats: Codable, JSONEncodable {
4141
}
4242
}
4343

44-
extension SearchFacetsStats: Equatable {
45-
public static func ==(lhs: SearchFacetsStats, rhs: SearchFacetsStats) -> Bool {
44+
extension SearchFacetStats: Equatable {
45+
public static func ==(lhs: SearchFacetStats, rhs: SearchFacetStats) -> Bool {
4646
lhs.min == rhs.min &&
4747
lhs.max == rhs.max &&
4848
lhs.avg == rhs.avg &&
4949
lhs.sum == rhs.sum
5050
}
5151
}
5252

53-
extension SearchFacetsStats: Hashable {
53+
extension SearchFacetStats: Hashable {
5454
public func hash(into hasher: inout Hasher) {
5555
hasher.combine(self.min?.hashValue)
5656
hasher.combine(self.max?.hashValue)

Sources/Search/Models/SearchResponse.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public struct SearchResponse<T: Codable>: Codable, JSONEncodable {
2828
/// Facet counts.
2929
public var facets: [String: [String: Int]]?
3030
/// Statistics for numerical facets.
31-
public var facetsStats: [String: SearchFacetsStats]?
31+
public var facetsStats: [String: SearchFacetStats]?
3232
/// Index name used for the query.
3333
public var index: String?
3434
/// Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query.
@@ -84,7 +84,7 @@ public struct SearchResponse<T: Codable>: Codable, JSONEncodable {
8484
exhaustiveNbHits: Bool? = nil,
8585
exhaustiveTypo: Bool? = nil,
8686
facets: [String: [String: Int]]? = nil,
87-
facetsStats: [String: SearchFacetsStats]? = nil,
87+
facetsStats: [String: SearchFacetStats]? = nil,
8888
index: String? = nil,
8989
indexUsed: String? = nil,
9090
message: String? = nil,
@@ -208,7 +208,7 @@ public struct SearchResponse<T: Codable>: Codable, JSONEncodable {
208208

209209
self.facets = dictionary["facets"]?.value as? [String: [String: Int]]
210210

211-
self.facetsStats = dictionary["facetsStats"]?.value as? [String: SearchFacetsStats]
211+
self.facetsStats = dictionary["facetsStats"]?.value as? [String: SearchFacetStats]
212212

213213
self.index = dictionary["index"]?.value as? String
214214

@@ -335,7 +335,7 @@ public struct SearchResponse<T: Codable>: Codable, JSONEncodable {
335335
self.exhaustiveNbHits = try container.decodeIfPresent(Bool.self, forKey: .exhaustiveNbHits)
336336
self.exhaustiveTypo = try container.decodeIfPresent(Bool.self, forKey: .exhaustiveTypo)
337337
self.facets = try container.decodeIfPresent([String: [String: Int]].self, forKey: .facets)
338-
self.facetsStats = try container.decodeIfPresent([String: SearchFacetsStats].self, forKey: .facetsStats)
338+
self.facetsStats = try container.decodeIfPresent([String: SearchFacetStats].self, forKey: .facetsStats)
339339
self.index = try container.decodeIfPresent(String.self, forKey: .index)
340340
self.indexUsed = try container.decodeIfPresent(String.self, forKey: .indexUsed)
341341
self.message = try container.decodeIfPresent(String.self, forKey: .message)

0 commit comments

Comments
 (0)