Skip to content

Commit f126829

Browse files
feat(facet ordering): Dynamic facet ordering support (#739)
1 parent a207699 commit f126829

30 files changed

+291
-49
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ let package = Package(
3939
targets: ["AlgoliaSearchClient"])
4040
],
4141
dependencies: [
42-
.package(url:"https://github.com/apple/swift-log.git", from: "1.4.0")
42+
.package(url: "https://github.com/apple/swift-log.git", from: "1.4.0")
4343
] + extraPackageDependencies,
4444
targets: [
4545
.target(

Sources/AlgoliaSearchClient/Command/AlgoliaCommand.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
protocol AlgoliaCommand {
11-
11+
1212
associatedtype Path: PathComponent
1313

1414
var method: HTTPMethod { get }
@@ -20,9 +20,9 @@ protocol AlgoliaCommand {
2020
}
2121

2222
extension AlgoliaCommand {
23-
23+
2424
var body: Data? {
2525
return nil
2626
}
27-
27+
2828
}

Sources/AlgoliaSearchClient/Command/Command+Advanced.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ extension Command {
2424
}
2525

2626
}
27-
27+
2828
struct AppTaskStatus: AlgoliaCommand {
2929

3030
let method: HTTPMethod = .get
@@ -39,7 +39,6 @@ extension Command {
3939

4040
}
4141

42-
4342
struct GetLogs: AlgoliaCommand {
4443

4544
let method: HTTPMethod = .get

Sources/AlgoliaSearchClient/Command/Command+Custom.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import FoundationNetworking
1111
#endif
1212

1313
extension Command {
14-
14+
1515
struct Custom: AlgoliaCommand {
16-
16+
1717
let method: HTTPMethod
1818
let callType: CallType
1919
let path: Path
2020
let body: Data?
2121
let requestOptions: RequestOptions?
22-
22+
2323
init(method: HTTPMethod,
2424
callType: CallType,
2525
path: Path,
@@ -32,7 +32,6 @@ extension Command {
3232
self.requestOptions = requestOptions
3333
}
3434

35-
3635
init(callType: CallType,
3736
urlRequest: URLRequest,
3837
requestOptions: RequestOptions?) throws {
@@ -48,11 +47,11 @@ extension Command {
4847
self.body = urlRequest.httpBody
4948
self.requestOptions = requestOptions
5049
}
51-
50+
5251
enum AlgoliaCommandError: Error {
5352
case invalidHTTPMethod
5453
case invalidPath
5554
}
5655
}
57-
56+
5857
}

Sources/AlgoliaSearchClient/Command/Command+Personalization.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extension Command {
1212
enum Personalization {
1313

1414
struct Get: AlgoliaCommand {
15-
15+
1616
let method: HTTPMethod = .get
1717
let callType: CallType = .read
1818
let path: PersonalizationRoute = .strategies >>> .personalization

Sources/AlgoliaSearchClient/Helpers/FoundationConvenience/Data+JSONString.swift

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

1010
extension Data {
11-
11+
1212
var jsonString: String? {
1313
return (try? JSONSerialization.jsonObject(with: self, options: .allowFragments))
1414
.flatMap {
@@ -22,5 +22,5 @@ extension Data {
2222
}
2323
.flatMap { String(data: $0, encoding: .utf8) }
2424
}
25-
25+
2626
}

Sources/AlgoliaSearchClient/Models/Analytics/ABTest/Response/ABTestResponse+Variant.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010
extension ABTestResponse {
1111

1212
public struct Variant: Codable {
13-
13+
1414
public let indexName: IndexName
1515

1616
public let trafficPercentage: Int

Sources/AlgoliaSearchClient/Models/Common/CommonParameters.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public protocol CommonParameters {
148148
- [Documentation](https://www.algolia.com/doc/api-reference/api-parameters/queryLanguages/?language=swift)
149149
*/
150150
var queryLanguages: [Language]? { get set }
151-
151+
152152
/**
153153
Enable word segmentation (also called decompounding) at query time for
154154
compatible languages.
@@ -276,7 +276,7 @@ public protocol CommonParameters {
276276
- [Documentation](https://www.algolia.com/doc/api-reference/api-parameters/attributeCriteriaComputedByMinProximity/?language=swift)
277277
*/
278278
var attributeCriteriaComputedByMinProximity: Bool? { get set }
279-
279+
280280
/**
281281
The relevancy threshold to apply to search in a virtual index [0-100]. A Bigger
282282
value means fewer, but more relevant results, smaller value means more, but
@@ -285,5 +285,5 @@ public protocol CommonParameters {
285285
- [Documentation](https://www.algolia.com/doc/api-reference/api-parameters/?language=swift)
286286
*/
287287
var relevancyStrictness: Int? { get set }
288-
288+
289289
}

Sources/AlgoliaSearchClient/Models/Internal/Path/Path.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct Path: PathComponent {
2222
}
2323

2424
init(_ rawValue: String) { self.rawValue = rawValue }
25-
25+
2626
static var indexesV1: Self { .init("/1/indexes") }
2727
static var settings: Self { .init("/settings") }
2828
static var clustersV1: Self { .init("/1/clusters") }

Sources/AlgoliaSearchClient/Models/Internal/Path/PathComponent.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ protocol PathComponent {
1818
}
1919

2020
extension Never: PathComponent {
21-
21+
2222
var rawValue: String {
2323
return ""
2424
}
@@ -31,7 +31,7 @@ extension Never: PathComponent {
3131
set {
3232
}
3333
}
34-
34+
3535
}
3636

3737
extension PathComponent {

0 commit comments

Comments
 (0)