Skip to content

Commit 185acea

Browse files
algolia-botgazconroyGary Conroykai687
committed
fix(specs): extend Analytics descriptions (generated)
algolia/api-clients-automation#4360 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: gazconroy <[email protected]> Co-authored-by: Gary Conroy <[email protected]> Co-authored-by: Kai Welke <[email protected]>
1 parent 4460361 commit 185acea

21 files changed

+154
-90
lines changed

Sources/Analytics/AnalyticsClient.swift

Lines changed: 97 additions & 43 deletions
Large diffs are not rendered by default.

Sources/Analytics/Models/DailyAddToCartRates.swift

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

99
public struct DailyAddToCartRates: Codable, JSONEncodable {
10-
/// Add-to-cart rate, calculated as number of tracked searches with at least one add-to-cart event divided by the
11-
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
10+
/// Add-to-cart rate: calculated as the number of tracked searches with at least one add-to-cart event divided by
11+
/// the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
1212
/// true.
1313
public var rate: Double?
1414
/// Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.

Sources/Analytics/Models/DailyClickThroughRates.swift

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

99
public struct DailyClickThroughRates: Codable, JSONEncodable {
10-
/// Click-through rate, calculated as number of tracked searches with at least one click event divided by the number
11-
/// of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true.
10+
/// Click-through rate: calculated as the number of tracked searches with at least one click event divided by the
11+
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
12+
/// true.
1213
public var rate: Double?
1314
/// Number of clicks associated with this search.
1415
public var clickCount: Int

Sources/Analytics/Models/DailyConversionRates.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
#endif
88

99
public struct DailyConversionRates: Codable, JSONEncodable {
10-
/// Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the
10+
/// Conversion rate: calculated as the number of tracked searches with at least one conversion event divided by the
1111
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
1212
/// true.
1313
public var rate: Double?

Sources/Analytics/Models/DailyNoClickRates.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
#endif
88

99
public struct DailyNoClickRates: Codable, JSONEncodable {
10-
/// No click rate, calculated as number of tracked searches without any click divided by the number of tracked
10+
/// No click rate: calculated as the number of tracked searches without clicks divided by the number of tracked
1111
/// searches.
1212
public var rate: Double
1313
/// Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.

Sources/Analytics/Models/DailyNoResultsRates.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public struct DailyNoResultsRates: Codable, JSONEncodable {
1313
public var noResultCount: Int
1414
/// Number of searches.
1515
public var count: Int
16-
/// No results rate, calculated as number of searches with zero results divided by the total number of searches.
16+
/// No results rate: calculated as the number of searches with zero results divided by the total number of searches.
1717
public var rate: Double
1818

1919
public init(date: String, noResultCount: Int, count: Int, rate: Double) {

Sources/Analytics/Models/DailyPurchaseRates.swift

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

99
public struct DailyPurchaseRates: Codable, JSONEncodable {
10-
/// Purchase rate, calculated as number of tracked searches with at least one purchase event divided by the number
11-
/// of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true.
10+
/// Purchase rate: calculated as the number of tracked searches with at least one purchase event divided by the
11+
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
12+
/// true.
1213
public var rate: Double?
1314
/// Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
1415
public var trackedSearchCount: Int

Sources/Analytics/Models/DailyRevenue.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
#endif
88

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

Sources/Analytics/Models/GetAddToCartRateResponse.swift

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

99
public struct GetAddToCartRateResponse: Codable, JSONEncodable {
10-
/// Add-to-cart rate, calculated as number of tracked searches with at least one add-to-cart event divided by the
11-
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
10+
/// Add-to-cart rate: calculated as the number of tracked searches with at least one add-to-cart event divided by
11+
/// the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
1212
/// true.
1313
public var rate: Double?
1414
/// Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.

Sources/Analytics/Models/GetClickThroughRateResponse.swift

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

99
public struct GetClickThroughRateResponse: Codable, JSONEncodable {
10-
/// Click-through rate, calculated as number of tracked searches with at least one click event divided by the number
11-
/// of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true.
10+
/// Click-through rate: calculated as the number of tracked searches with at least one click event divided by the
11+
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
12+
/// true.
1213
public var rate: Double?
1314
/// Number of clicks associated with this search.
1415
public var clickCount: Int

Sources/Analytics/Models/GetConversionRateResponse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
#endif
88

99
public struct GetConversionRateResponse: Codable, JSONEncodable {
10-
/// Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the
10+
/// Conversion rate: calculated as the number of tracked searches with at least one conversion event divided by the
1111
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
1212
/// true.
1313
public var rate: Double?

Sources/Analytics/Models/GetNoClickRateResponse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
#endif
88

99
public struct GetNoClickRateResponse: Codable, JSONEncodable {
10-
/// No click rate, calculated as number of tracked searches without any click divided by the number of tracked
10+
/// No click rate: calculated as the number of tracked searches without clicks divided by the number of tracked
1111
/// searches.
1212
public var rate: Double
1313
/// Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.

Sources/Analytics/Models/GetNoResultsRateResponse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
#endif
88

99
public struct GetNoResultsRateResponse: Codable, JSONEncodable {
10-
/// No results rate, calculated as number of searches with zero results divided by the total number of searches.
10+
/// No results rate: calculated as the number of searches with zero results divided by the total number of searches.
1111
public var rate: Double
1212
/// Number of searches.
1313
public var count: Int

Sources/Analytics/Models/GetPurchaseRateResponse.swift

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

99
public struct GetPurchaseRateResponse: Codable, JSONEncodable {
10-
/// Purchase rate, calculated as number of tracked searches with at least one purchase event divided by the number
11-
/// of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true.
10+
/// Purchase rate: calculated as the number of tracked searches with at least one purchase event divided by the
11+
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
12+
/// true.
1213
public var rate: Double?
1314
/// Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
1415
public var trackedSearchCount: Int

Sources/Analytics/Models/GetRevenue.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
#endif
88

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

Sources/Analytics/Models/GetTopFiltersNoResultsResponse.swift

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

99
public struct GetTopFiltersNoResultsResponse: Codable, JSONEncodable {
10-
/// Filters for searches without any results. If null, the search term specified with the `search` parameter is not
11-
/// a search without results, or the `search` parameter is absent from the request.
10+
/// Filters for searches without any results. If null, the search term specified with the `search` parameter isn't a
11+
/// search without results, or the `search` parameter is absent from the request.
1212
public var values: [GetTopFiltersNoResultsValues]?
1313

1414
public init(values: [GetTopFiltersNoResultsValues]?) {

Sources/Analytics/Models/TopHit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
#endif
88

99
public struct TopHit: Codable, JSONEncodable {
10-
/// Object ID of a record that's returned as a search result.
10+
/// Object ID of a record returned as a search result.
1111
public var hit: String
1212
/// Number of occurrences.
1313
public var count: Int

Sources/Analytics/Models/TopHitWithAnalytics.swift

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

99
public struct TopHitWithAnalytics: Codable, JSONEncodable {
10-
/// Object ID of a record that's returned as a search result.
10+
/// Object ID of a record returned as a search result.
1111
public var hit: String
1212
/// Number of occurrences.
1313
public var count: Int
14-
/// Click-through rate, calculated as number of tracked searches with at least one click event divided by the number
15-
/// of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true.
14+
/// Click-through rate: calculated as the number of tracked searches with at least one click event divided by the
15+
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
16+
/// true.
1617
public var clickThroughRate: Double?
17-
/// Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the
18+
/// Conversion rate: calculated as the number of tracked searches with at least one conversion event divided by the
1819
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
1920
/// true.
2021
public var conversionRate: Double?

Sources/Analytics/Models/TopHitWithRevenueAnalytics.swift

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

99
public struct TopHitWithRevenueAnalytics: Codable, JSONEncodable {
10-
/// Object ID of a record that's returned as a search result.
10+
/// Object ID of a record returned as a search result.
1111
public var hit: String
1212
/// Number of occurrences.
1313
public var count: Int
14-
/// Click-through rate, calculated as number of tracked searches with at least one click event divided by the number
15-
/// of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true.
14+
/// Click-through rate: calculated as the number of tracked searches with at least one click event divided by the
15+
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
16+
/// true.
1617
public var clickThroughRate: Double?
17-
/// Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the
18+
/// Conversion rate: calculated as the number of tracked searches with at least one conversion event divided by the
1819
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
1920
/// true.
2021
public var conversionRate: Double?
@@ -24,18 +25,19 @@ public struct TopHitWithRevenueAnalytics: Codable, JSONEncodable {
2425
public var clickCount: Int
2526
/// Number of conversions from this search.
2627
public var conversionCount: Int
27-
/// Add-to-cart rate, calculated as number of tracked searches with at least one add-to-cart event divided by the
28-
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
28+
/// Add-to-cart rate: calculated as the number of tracked searches with at least one add-to-cart event divided by
29+
/// the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
2930
/// true.
3031
public var addToCartRate: Double?
3132
/// Number of add-to-cart events from this search.
3233
public var addToCartCount: Int
33-
/// Purchase rate, calculated as number of tracked searches with at least one purchase event divided by the number
34-
/// of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true.
34+
/// Purchase rate: calculated as the number of tracked searches with at least one purchase event divided by the
35+
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
36+
/// true.
3537
public var purchaseRate: Double?
3638
/// Number of purchase events from this search.
3739
public var purchaseCount: Int
38-
/// Revenue associated with this search, broken-down by currencies.
40+
/// Revenue associated with this search: broken down by currency.
3941
public var currencies: [String: CurrencyCode]
4042

4143
public init(

Sources/Analytics/Models/TopSearchWithAnalytics.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ public struct TopSearchWithAnalytics: Codable, JSONEncodable {
1111
public var search: String
1212
/// Number of searches.
1313
public var count: Int
14-
/// Click-through rate, calculated as number of tracked searches with at least one click event divided by the number
15-
/// of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true.
14+
/// Click-through rate: calculated as the number of tracked searches with at least one click event divided by the
15+
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
16+
/// true.
1617
public var clickThroughRate: Double?
1718
/// Average position of a clicked search result in the list of search results. If null, Algolia didn't receive any
1819
/// search requests with `clickAnalytics` set to true.
1920
public var averageClickPosition: Double?
2021
/// List of positions in the search results and clicks associated with this search.
2122
public var clickPositions: [ClickPosition]
22-
/// Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the
23+
/// Conversion rate: calculated as the number of tracked searches with at least one conversion event divided by the
2324
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
2425
/// true.
2526
public var conversionRate: Double?

Sources/Analytics/Models/TopSearchWithRevenueAnalytics.swift

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ public struct TopSearchWithRevenueAnalytics: Codable, JSONEncodable {
1111
public var search: String
1212
/// Number of searches.
1313
public var count: Int
14-
/// Click-through rate, calculated as number of tracked searches with at least one click event divided by the number
15-
/// of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true.
14+
/// Click-through rate: calculated as the number of tracked searches with at least one click event divided by the
15+
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
16+
/// true.
1617
public var clickThroughRate: Double?
1718
/// Average position of a clicked search result in the list of search results. If null, Algolia didn't receive any
1819
/// search requests with `clickAnalytics` set to true.
1920
public var averageClickPosition: Double?
2021
/// List of positions in the search results and clicks associated with this search.
2122
public var clickPositions: [ClickPosition]
22-
/// Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the
23+
/// Conversion rate: calculated as the number of tracked searches with at least one conversion event divided by the
2324
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
2425
/// true.
2526
public var conversionRate: Double?
@@ -31,16 +32,17 @@ public struct TopSearchWithRevenueAnalytics: Codable, JSONEncodable {
3132
public var conversionCount: Int
3233
/// Number of results (hits).
3334
public var nbHits: Int
34-
/// Revenue associated with this search, broken-down by currencies.
35+
/// Revenue associated with this search: broken down by currency.
3536
public var currencies: [String: CurrencyCode]
36-
/// Add-to-cart rate, calculated as number of tracked searches with at least one add-to-cart event divided by the
37-
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
37+
/// Add-to-cart rate: calculated as the number of tracked searches with at least one add-to-cart event divided by
38+
/// the number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
3839
/// true.
3940
public var addToCartRate: Double?
4041
/// Number of add-to-cart events from this search.
4142
public var addToCartCount: Int
42-
/// Purchase rate, calculated as number of tracked searches with at least one purchase event divided by the number
43-
/// of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to true.
43+
/// Purchase rate: calculated as the number of tracked searches with at least one purchase event divided by the
44+
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
45+
/// true.
4446
public var purchaseRate: Double?
4547
/// Number of purchase events from this search.
4648
public var purchaseCount: Int

0 commit comments

Comments
 (0)