Skip to content

Commit 820b578

Browse files
algolia-botkai687shortcutsmillotp
committed
chore: generated code for commit 60e8e6d6. [skip ci]
algolia/api-clients-automation@60e8e6d Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Kai Welke <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 2905d3e commit 820b578

10 files changed

+56
-39
lines changed

Sources/Ingestion/IngestionClient.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ open class IngestionClient {
12721272
itemsPerPage: Int? = nil,
12731273
page: Int? = nil,
12741274
status: [EventStatus]? = nil,
1275-
type: [EventType]? = nil,
1275+
type: [IngestionEventType]? = nil,
12761276
sort: EventSortKeys? = nil,
12771277
order: OrderKeys? = nil,
12781278
startDate: String? = nil,
@@ -1331,7 +1331,7 @@ open class IngestionClient {
13311331
itemsPerPage: Int? = nil,
13321332
page: Int? = nil,
13331333
status: [EventStatus]? = nil,
1334-
type: [EventType]? = nil,
1334+
type: [IngestionEventType]? = nil,
13351335
sort: EventSortKeys? = nil,
13361336
order: OrderKeys? = nil,
13371337
startDate: String? = nil,

Sources/Ingestion/Models/Event.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public struct Event: Codable, JSONEncodable {
1515
/// The parent event, the cause of this event.
1616
public var parentID: String?
1717
public var status: EventStatus
18-
public var type: EventType
18+
public var type: IngestionEventType
1919
/// The extracted record batch size.
2020
public var batchSize: Int
2121
public var data: [String: AnyCodable]?
@@ -27,7 +27,7 @@ public struct Event: Codable, JSONEncodable {
2727
runID: String,
2828
parentID: String? = nil,
2929
status: EventStatus,
30-
type: EventType,
30+
type: IngestionEventType,
3131
batchSize: Int,
3232
data: [String: AnyCodable]? = nil,
3333
publishedAt: String

Sources/Ingestion/Models/EventType.swift renamed to Sources/Ingestion/Models/IngestionEventType.swift

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

9-
public enum EventType: String, Codable, CaseIterable {
9+
public enum IngestionEventType: String, Codable, CaseIterable {
1010
case fetch
1111
case record
1212
case log
1313
case transform
1414
}
1515

16-
extension EventType: Hashable {}
16+
extension IngestionEventType: Hashable {}

Sources/Personalization/Models/DeleteUserProfileResponse.swift

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

99
public struct DeleteUserProfileResponse: Codable, JSONEncodable {
10-
/// userToken representing the user for which to fetch the Personalization profile.
10+
/// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events.
11+
/// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
1112
public var userToken: String
12-
/// A date until which the data can safely be considered as deleted for the given user. Any data received after the
13-
/// `deletedUntil` date will start building a new user profile.
13+
/// Date and time when the user profile can be safely considered to be deleted. Any events received after the
14+
/// `deletedUntil` date start a new user profile.
1415
public var deletedUntil: String
1516

1617
public init(userToken: String, deletedUntil: String) {

Sources/Personalization/Models/EventScoring.swift

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

99
public struct EventScoring: Codable, JSONEncodable {
10-
/// The score for the event.
10+
/// Event score.
1111
public var score: Int
12-
/// The name of the event.
12+
/// Event name.
1313
public var eventName: String
14-
/// The type of the event.
15-
public var eventType: String
14+
public var eventType: PersonalizationEventType
1615

17-
public init(score: Int, eventName: String, eventType: String) {
16+
public init(score: Int, eventName: String, eventType: PersonalizationEventType) {
1817
self.score = score
1918
self.eventName = eventName
2019
self.eventType = eventType

Sources/Personalization/Models/FacetScoring.swift

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

99
public struct FacetScoring: Codable, JSONEncodable {
10-
/// The score for the event.
10+
/// Event score.
1111
public var score: Int
12-
/// The name of the facet.
12+
/// Facet attribute name.
1313
public var facetName: String
1414

1515
public init(score: Int, facetName: String) {

Sources/Personalization/Models/GetUserTokenResponse.swift

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

99
public struct GetUserTokenResponse: Codable, JSONEncodable {
10-
/// userToken representing the user for which to fetch the Personalization profile.
10+
/// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events.
11+
/// For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
1112
public var userToken: String
12-
/// Date of last event update. (ISO-8601 format).
13+
/// Date and time of the last event from this user, in RFC 3339 format.
1314
public var lastEventAt: String
14-
/// The userToken scores.
15+
/// Scores for different facet values. Scores represent the user affinity for a user profile towards specific facet
16+
/// values, given the personalization strategy and past events.
1517
public var scores: AnyCodable
1618

1719
public init(userToken: String, lastEventAt: String, scores: AnyCodable) {
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on
2+
// https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
import Foundation
5+
#if canImport(Core)
6+
import Core
7+
#endif
8+
9+
/// Event type.
10+
public enum PersonalizationEventType: String, Codable, CaseIterable {
11+
case click
12+
case conversion
13+
case view
14+
}
15+
16+
extension PersonalizationEventType: Hashable {}

Sources/Personalization/Models/PersonalizationStrategyParams.swift

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

99
public struct PersonalizationStrategyParams: Codable, JSONEncodable {
10-
/// Scores associated with the events.
10+
/// Scores associated with each event. The higher the scores, the higher the impact of those events on the
11+
/// personalization of search results.
1112
public var eventScoring: [EventScoring]
12-
/// Scores associated with the facets.
13+
/// Scores associated with each facet. The higher the scores, the higher the impact of those events on the
14+
/// personalization of search results.
1315
public var facetScoring: [FacetScoring]
14-
/// The impact that personalization has on search results: a number between 0 (personalization disabled) and 100
15-
/// (personalization fully enabled).
16+
/// Impact of personalization on the search results. If set to 0, personalization has no impact on the search
17+
/// results.
1618
public var personalizationImpact: Int
1719

1820
public init(eventScoring: [EventScoring], facetScoring: [FacetScoring], personalizationImpact: Int) {

Sources/Personalization/PersonalizationClient.swift

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ open class PersonalizationClient {
287287
)
288288
}
289289

290-
/// - parameter userToken: (path) userToken representing the user for which to fetch the Personalization profile.
290+
/// - parameter userToken: (path) Unique identifier representing a user for which to fetch the personalization
291+
/// profile.
291292
/// - returns: DeleteUserProfileResponse
292293
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
293294
open func deleteUserProfile(
@@ -306,14 +307,13 @@ open class PersonalizationClient {
306307
return body
307308
}
308309

309-
// Delete the user profile and all its associated data. Returns, as part of the response, a date until which the
310-
// data can safely be considered as deleted for the given user. This means if you send events for the given user
311-
// before this date, they will be ignored. Any data received after the deletedUntil date will start building a new
312-
// user profile. It might take a couple hours for the deletion request to be fully processed.
310+
// Deletes a user profile. The response includes a date and time when the user profile can safely be considered
311+
// deleted.
313312
// Required API Key ACLs:
314313
// - recommendation
315314
//
316-
// - parameter userToken: (path) userToken representing the user for which to fetch the Personalization profile.
315+
// - parameter userToken: (path) Unique identifier representing a user for which to fetch the personalization
316+
// profile.
317317
// - returns: RequestBuilder<DeleteUserProfileResponse>
318318

319319
open func deleteUserProfileWithHTTPInfo(
@@ -363,8 +363,7 @@ open class PersonalizationClient {
363363
return body
364364
}
365365

366-
// The strategy contains information on the events and facets that impact user profiles and personalized search
367-
// results.
366+
// Retrieves the current personalization strategy.
368367
// Required API Key ACLs:
369368
// - recommendation
370369
// - returns: RequestBuilder<PersonalizationStrategyParams>
@@ -389,7 +388,8 @@ open class PersonalizationClient {
389388
)
390389
}
391390

392-
/// - parameter userToken: (path) userToken representing the user for which to fetch the Personalization profile.
391+
/// - parameter userToken: (path) Unique identifier representing a user for which to fetch the personalization
392+
/// profile.
393393
/// - returns: GetUserTokenResponse
394394
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
395395
open func getUserTokenProfile(
@@ -408,15 +408,12 @@ open class PersonalizationClient {
408408
return body
409409
}
410410

411-
// Get the user profile built from Personalization strategy. The profile is structured by facet name used in the
412-
// strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet
413-
// value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The
414-
// last
415-
// processed event timestamp is provided using the ISO 8601 format for debugging purposes.
411+
// Retrieves a user profile and their affinities for different facets.
416412
// Required API Key ACLs:
417413
// - recommendation
418414
//
419-
// - parameter userToken: (path) userToken representing the user for which to fetch the Personalization profile.
415+
// - parameter userToken: (path) Unique identifier representing a user for which to fetch the personalization
416+
// profile.
420417
// - returns: RequestBuilder<GetUserTokenResponse>
421418

422419
open func getUserTokenProfileWithHTTPInfo(
@@ -471,7 +468,7 @@ open class PersonalizationClient {
471468
return body
472469
}
473470

474-
// A strategy defines the events and facets that impact user profiles and personalized search results.
471+
// Creates a new personalization strategy.
475472
// Required API Key ACLs:
476473
// - recommendation
477474
//

0 commit comments

Comments
 (0)