diff --git a/Sources/StreamFeeds/Repositories/ActivitiesRepository.swift b/Sources/StreamFeeds/Repositories/ActivitiesRepository.swift index 1cf9b38..b04b997 100644 --- a/Sources/StreamFeeds/Repositories/ActivitiesRepository.swift +++ b/Sources/StreamFeeds/Repositories/ActivitiesRepository.swift @@ -123,7 +123,7 @@ final class ActivitiesRepository: Sendable { // MARK: - Reactions func addReaction(activityId: String, request: AddReactionRequest) async throws -> (reaction: FeedsReactionData, activity: ActivityData) { - let response = try await apiClient.addReaction(activityId: activityId, addReactionRequest: request) + let response = try await apiClient.addActivityReaction(activityId: activityId, addReactionRequest: request) return (response.reaction.toModel(), response.activity.toModel()) } diff --git a/Sources/StreamFeeds/generated/feeds/APIs/DefaultAPI.swift b/Sources/StreamFeeds/generated/feeds/APIs/DefaultAPI.swift index b12ab24..884d016 100644 --- a/Sources/StreamFeeds/generated/feeds/APIs/DefaultAPI.swift +++ b/Sources/StreamFeeds/generated/feeds/APIs/DefaultAPI.swift @@ -390,7 +390,7 @@ open class DefaultAPI: DefaultAPIEndpoints, @unchecked Sendable { } } - open func addReaction(activityId: String, addReactionRequest: AddReactionRequest) async throws -> AddReactionResponse { + open func addActivityReaction(activityId: String, addReactionRequest: AddReactionRequest) async throws -> AddReactionResponse { var path = "/api/v2/feeds/activities/{activity_id}/reactions" let activityIdPreEscape = "\(APIHelper.mapValueToPathItem(activityId))" @@ -1691,6 +1691,19 @@ open class DefaultAPI: DefaultAPIEndpoints, @unchecked Sendable { try self.jsonDecoder.decode(UnblockUsersResponse.self, from: $0) } } + + open func ownCapabilitiesBatch(ownCapabilitiesBatchRequest: OwnCapabilitiesBatchRequest) async throws -> OwnCapabilitiesBatchResponse { + let path = "/api/v2/feeds/feeds/own_capabilities/batch" + + let urlRequest = try makeRequest( + uriPath: path, + httpMethod: "POST", + request: ownCapabilitiesBatchRequest + ) + return try await send(request: urlRequest) { + try self.jsonDecoder.decode(OwnCapabilitiesBatchResponse.self, from: $0) + } + } } protocol DefaultAPIEndpoints { @@ -1730,7 +1743,7 @@ protocol DefaultAPIEndpoints { func deletePollVote(activityId: String, pollId: String, voteId: String, userId: String?) async throws -> PollVoteResponse - func addReaction(activityId: String, addReactionRequest: AddReactionRequest) async throws -> AddReactionResponse + func addActivityReaction(activityId: String, addReactionRequest: AddReactionRequest) async throws -> AddReactionResponse func queryActivityReactions(activityId: String, queryActivityReactionsRequest: QueryActivityReactionsRequest) async throws -> QueryActivityReactionsResponse @@ -1887,4 +1900,6 @@ protocol DefaultAPIEndpoints { func updateLiveLocation(updateLiveLocationRequest: UpdateLiveLocationRequest) async throws -> SharedLocationResponse func unblockUsers(unblockUsersRequest: UnblockUsersRequest) async throws -> UnblockUsersResponse + + func ownCapabilitiesBatch(ownCapabilitiesBatchRequest: OwnCapabilitiesBatchRequest) async throws -> OwnCapabilitiesBatchResponse } diff --git a/Sources/StreamFeeds/generated/feeds/models/APNS.swift b/Sources/StreamFeeds/generated/feeds/models/APNS.swift deleted file mode 100644 index 5e4004c..0000000 --- a/Sources/StreamFeeds/generated/feeds/models/APNS.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright © 2025 Stream.io Inc. All rights reserved. -// - -import Foundation -import StreamCore - -public final class APNS: @unchecked Sendable, Codable, JSONEncodable, Hashable { - public var body: String - public var contentAvailable: Int? - public var data: [String: RawJSON]? - public var mutableContent: Int? - public var sound: String? - public var title: String - - public init(body: String, contentAvailable: Int? = nil, data: [String: RawJSON]? = nil, mutableContent: Int? = nil, sound: String? = nil, title: String) { - self.body = body - self.contentAvailable = contentAvailable - self.data = data - self.mutableContent = mutableContent - self.sound = sound - self.title = title - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case body - case contentAvailable = "content-available" - case data - case mutableContent = "mutable-content" - case sound - case title - } - - public static func == (lhs: APNS, rhs: APNS) -> Bool { - lhs.body == rhs.body && - lhs.contentAvailable == rhs.contentAvailable && - lhs.data == rhs.data && - lhs.mutableContent == rhs.mutableContent && - lhs.sound == rhs.sound && - lhs.title == rhs.title - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(body) - hasher.combine(contentAvailable) - hasher.combine(data) - hasher.combine(mutableContent) - hasher.combine(sound) - hasher.combine(title) - } -} diff --git a/Sources/StreamFeeds/generated/feeds/models/ActionLog.swift b/Sources/StreamFeeds/generated/feeds/models/ActionLog.swift deleted file mode 100644 index e7560ae..0000000 --- a/Sources/StreamFeeds/generated/feeds/models/ActionLog.swift +++ /dev/null @@ -1,76 +0,0 @@ -// -// Copyright © 2025 Stream.io Inc. All rights reserved. -// - -import Foundation -import StreamCore - -public final class ActionLog: @unchecked Sendable, Codable, JSONEncodable, Hashable { - public var createdAt: Date - public var custom: [String: RawJSON] - public var id: String - public var reason: String - public var reporterType: String - public var reviewQueueItem: ReviewQueueItem? - public var reviewQueueItemId: String - public var targetUser: User? - public var targetUserId: String - public var type: String - public var user: User? - - public init(createdAt: Date, custom: [String: RawJSON], id: String, reason: String, reporterType: String, reviewQueueItem: ReviewQueueItem? = nil, reviewQueueItemId: String, targetUser: User? = nil, targetUserId: String, type: String, user: User? = nil) { - self.createdAt = createdAt - self.custom = custom - self.id = id - self.reason = reason - self.reporterType = reporterType - self.reviewQueueItem = reviewQueueItem - self.reviewQueueItemId = reviewQueueItemId - self.targetUser = targetUser - self.targetUserId = targetUserId - self.type = type - self.user = user - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case createdAt = "created_at" - case custom - case id - case reason - case reporterType = "reporter_type" - case reviewQueueItem = "review_queue_item" - case reviewQueueItemId = "review_queue_item_id" - case targetUser = "target_user" - case targetUserId = "target_user_id" - case type - case user - } - - public static func == (lhs: ActionLog, rhs: ActionLog) -> Bool { - lhs.createdAt == rhs.createdAt && - lhs.custom == rhs.custom && - lhs.id == rhs.id && - lhs.reason == rhs.reason && - lhs.reporterType == rhs.reporterType && - lhs.reviewQueueItem == rhs.reviewQueueItem && - lhs.reviewQueueItemId == rhs.reviewQueueItemId && - lhs.targetUser == rhs.targetUser && - lhs.targetUserId == rhs.targetUserId && - lhs.type == rhs.type && - lhs.user == rhs.user - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(createdAt) - hasher.combine(custom) - hasher.combine(id) - hasher.combine(reason) - hasher.combine(reporterType) - hasher.combine(reviewQueueItem) - hasher.combine(reviewQueueItemId) - hasher.combine(targetUser) - hasher.combine(targetUserId) - hasher.combine(type) - hasher.combine(user) - } -} diff --git a/Sources/StreamFeeds/generated/feeds/models/ActionLogResponse.swift b/Sources/StreamFeeds/generated/feeds/models/ActionLogResponse.swift index 59548ef..a3ddcc7 100644 --- a/Sources/StreamFeeds/generated/feeds/models/ActionLogResponse.swift +++ b/Sources/StreamFeeds/generated/feeds/models/ActionLogResponse.swift @@ -6,6 +6,7 @@ import Foundation import StreamCore public final class ActionLogResponse: @unchecked Sendable, Codable, JSONEncodable, Hashable { + public var aiProviders: [String] public var createdAt: Date public var custom: [String: RawJSON] public var id: String @@ -17,7 +18,8 @@ public final class ActionLogResponse: @unchecked Sendable, Codable, JSONEncodabl public var user: UserResponse? public var userId: String - public init(createdAt: Date, custom: [String: RawJSON], id: String, reason: String, reviewQueueItem: ReviewQueueItemResponse? = nil, targetUser: UserResponse? = nil, targetUserId: String, type: String, user: UserResponse? = nil, userId: String) { + public init(aiProviders: [String], createdAt: Date, custom: [String: RawJSON], id: String, reason: String, reviewQueueItem: ReviewQueueItemResponse? = nil, targetUser: UserResponse? = nil, targetUserId: String, type: String, user: UserResponse? = nil, userId: String) { + self.aiProviders = aiProviders self.createdAt = createdAt self.custom = custom self.id = id @@ -31,6 +33,7 @@ public final class ActionLogResponse: @unchecked Sendable, Codable, JSONEncodabl } public enum CodingKeys: String, CodingKey, CaseIterable { + case aiProviders = "ai_providers" case createdAt = "created_at" case custom case id @@ -44,7 +47,8 @@ public final class ActionLogResponse: @unchecked Sendable, Codable, JSONEncodabl } public static func == (lhs: ActionLogResponse, rhs: ActionLogResponse) -> Bool { - lhs.createdAt == rhs.createdAt && + lhs.aiProviders == rhs.aiProviders && + lhs.createdAt == rhs.createdAt && lhs.custom == rhs.custom && lhs.id == rhs.id && lhs.reason == rhs.reason && @@ -57,6 +61,7 @@ public final class ActionLogResponse: @unchecked Sendable, Codable, JSONEncodabl } public func hash(into hasher: inout Hasher) { + hasher.combine(aiProviders) hasher.combine(createdAt) hasher.combine(custom) hasher.combine(id) diff --git a/Sources/StreamFeeds/generated/feeds/models/ActivityFeedbackEvent.swift b/Sources/StreamFeeds/generated/feeds/models/ActivityFeedbackEvent.swift new file mode 100644 index 0000000..79349d0 --- /dev/null +++ b/Sources/StreamFeeds/generated/feeds/models/ActivityFeedbackEvent.swift @@ -0,0 +1,50 @@ +// +// Copyright © 2025 Stream.io Inc. All rights reserved. +// + +import Foundation +import StreamCore + +public final class ActivityFeedbackEvent: @unchecked Sendable, Event, Codable, JSONEncodable, Hashable { + public var activityFeedback: ActivityFeedbackEventPayload + public var createdAt: Date + public var custom: [String: RawJSON] + public var receivedAt: Date? + public var type: String = "feeds.activity.feedback" + public var user: UserResponseCommonFields? + + public init(activityFeedback: ActivityFeedbackEventPayload, createdAt: Date, custom: [String: RawJSON], receivedAt: Date? = nil, user: UserResponseCommonFields? = nil) { + self.activityFeedback = activityFeedback + self.createdAt = createdAt + self.custom = custom + self.receivedAt = receivedAt + self.user = user + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case activityFeedback = "activity_feedback" + case createdAt = "created_at" + case custom + case receivedAt = "received_at" + case type + case user + } + + public static func == (lhs: ActivityFeedbackEvent, rhs: ActivityFeedbackEvent) -> Bool { + lhs.activityFeedback == rhs.activityFeedback && + lhs.createdAt == rhs.createdAt && + lhs.custom == rhs.custom && + lhs.receivedAt == rhs.receivedAt && + lhs.type == rhs.type && + lhs.user == rhs.user + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(activityFeedback) + hasher.combine(createdAt) + hasher.combine(custom) + hasher.combine(receivedAt) + hasher.combine(type) + hasher.combine(user) + } +} diff --git a/Sources/StreamFeeds/generated/feeds/models/ActivityFeedbackEventPayload.swift b/Sources/StreamFeeds/generated/feeds/models/ActivityFeedbackEventPayload.swift new file mode 100644 index 0000000..3742ba8 --- /dev/null +++ b/Sources/StreamFeeds/generated/feeds/models/ActivityFeedbackEventPayload.swift @@ -0,0 +1,68 @@ +// +// Copyright © 2025 Stream.io Inc. All rights reserved. +// + +import Foundation +import StreamCore + +public final class ActivityFeedbackEventPayload: @unchecked Sendable, Codable, JSONEncodable, Hashable { + + public enum ActivityFeedbackEventPayloadAction: String, Sendable, Codable, CaseIterable { + case hide = "hide" + case showLess = "show_less" + case showMore = "show_more" + case unknown = "_unknown" + + public init(from decoder: Decoder) throws { + let container = try decoder.singleValueContainer() + if let decodedValue = try? container.decode(String.self), + let value = Self(rawValue: decodedValue) { + self = value + } else { + self = .unknown + } + } + } + public var action: ActivityFeedbackEventPayloadAction + public var activityId: String + public var createdAt: Date + public var updatedAt: Date + public var user: UserResponse + public var value: String + + public init(action: ActivityFeedbackEventPayloadAction, activityId: String, createdAt: Date, updatedAt: Date, user: UserResponse, value: String) { + self.action = action + self.activityId = activityId + self.createdAt = createdAt + self.updatedAt = updatedAt + self.user = user + self.value = value + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case action + case activityId = "activity_id" + case createdAt = "created_at" + case updatedAt = "updated_at" + case user + case value + } + + public static func == (lhs: ActivityFeedbackEventPayload, rhs: ActivityFeedbackEventPayload) -> Bool { + lhs.action == rhs.action && + lhs.activityId == rhs.activityId && + lhs.createdAt == rhs.createdAt && + lhs.updatedAt == rhs.updatedAt && + lhs.user == rhs.user && + lhs.value == rhs.value + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(action) + hasher.combine(activityId) + hasher.combine(createdAt) + hasher.combine(updatedAt) + hasher.combine(user) + hasher.combine(value) + } +} diff --git a/Sources/StreamFeeds/generated/feeds/models/ActivityFeedbackRequest.swift b/Sources/StreamFeeds/generated/feeds/models/ActivityFeedbackRequest.swift index 0ca43cc..29b0d26 100644 --- a/Sources/StreamFeeds/generated/feeds/models/ActivityFeedbackRequest.swift +++ b/Sources/StreamFeeds/generated/feeds/models/ActivityFeedbackRequest.swift @@ -7,40 +7,30 @@ import StreamCore public final class ActivityFeedbackRequest: @unchecked Sendable, Codable, JSONEncodable, Hashable { public var hide: Bool? - public var muteUser: Bool? - public var reason: String? - public var report: Bool? public var showLess: Bool? + public var showMore: Bool? - public init(hide: Bool? = nil, muteUser: Bool? = nil, reason: String? = nil, report: Bool? = nil, showLess: Bool? = nil) { + public init(hide: Bool? = nil, showLess: Bool? = nil, showMore: Bool? = nil) { self.hide = hide - self.muteUser = muteUser - self.reason = reason - self.report = report self.showLess = showLess + self.showMore = showMore } public enum CodingKeys: String, CodingKey, CaseIterable { case hide - case muteUser = "mute_user" - case reason - case report case showLess = "show_less" + case showMore = "show_more" } public static func == (lhs: ActivityFeedbackRequest, rhs: ActivityFeedbackRequest) -> Bool { lhs.hide == rhs.hide && - lhs.muteUser == rhs.muteUser && - lhs.reason == rhs.reason && - lhs.report == rhs.report && - lhs.showLess == rhs.showLess + lhs.showLess == rhs.showLess && + lhs.showMore == rhs.showMore } public func hash(into hasher: inout Hasher) { hasher.combine(hide) - hasher.combine(muteUser) - hasher.combine(reason) - hasher.combine(report) hasher.combine(showLess) + hasher.combine(showMore) } } diff --git a/Sources/StreamFeeds/generated/feeds/models/ActivitySelectorConfig.swift b/Sources/StreamFeeds/generated/feeds/models/ActivitySelectorConfig.swift index 17265db..90fa456 100644 --- a/Sources/StreamFeeds/generated/feeds/models/ActivitySelectorConfig.swift +++ b/Sources/StreamFeeds/generated/feeds/models/ActivitySelectorConfig.swift @@ -7,13 +7,15 @@ import StreamCore public final class ActivitySelectorConfig: @unchecked Sendable, Codable, JSONEncodable, Hashable { public var cutoffTime: Date + public var cutoffWindow: String? public var filter: [String: RawJSON]? public var minPopularity: Int? public var sort: [SortParam]? public var type: String? - public init(cutoffTime: Date, filter: [String: RawJSON]? = nil, minPopularity: Int? = nil, sort: [SortParam]? = nil) { + public init(cutoffTime: Date, cutoffWindow: String? = nil, filter: [String: RawJSON]? = nil, minPopularity: Int? = nil, sort: [SortParam]? = nil) { self.cutoffTime = cutoffTime + self.cutoffWindow = cutoffWindow self.filter = filter self.minPopularity = minPopularity self.sort = sort @@ -21,22 +23,25 @@ public final class ActivitySelectorConfig: @unchecked Sendable, Codable, JSONEnc public enum CodingKeys: String, CodingKey, CaseIterable { case cutoffTime = "cutoff_time" + case cutoffWindow = "cutoff_window" case filter case minPopularity = "min_popularity" case sort case type - } +} public static func == (lhs: ActivitySelectorConfig, rhs: ActivitySelectorConfig) -> Bool { lhs.cutoffTime == rhs.cutoffTime && - lhs.filter == rhs.filter && - lhs.minPopularity == rhs.minPopularity && - lhs.sort == rhs.sort && - lhs.type == rhs.type + lhs.cutoffWindow == rhs.cutoffWindow && + lhs.filter == rhs.filter && + lhs.minPopularity == rhs.minPopularity && + lhs.sort == rhs.sort && + lhs.type == rhs.type } public func hash(into hasher: inout Hasher) { hasher.combine(cutoffTime) + hasher.combine(cutoffWindow) hasher.combine(filter) hasher.combine(minPopularity) hasher.combine(sort) diff --git a/Sources/StreamFeeds/generated/feeds/models/AggregatedActivityResponse.swift b/Sources/StreamFeeds/generated/feeds/models/AggregatedActivityResponse.swift index 213bf96..213b904 100644 --- a/Sources/StreamFeeds/generated/feeds/models/AggregatedActivityResponse.swift +++ b/Sources/StreamFeeds/generated/feeds/models/AggregatedActivityResponse.swift @@ -10,16 +10,18 @@ public final class AggregatedActivityResponse: @unchecked Sendable, Codable, JSO public var activityCount: Int public var createdAt: Date public var group: String + public var isWatched: Bool? public var score: Float public var updatedAt: Date public var userCount: Int public var userCountTruncated: Bool - public init(activities: [ActivityResponse], activityCount: Int, createdAt: Date, group: String, score: Float, updatedAt: Date, userCount: Int, userCountTruncated: Bool) { + public init(activities: [ActivityResponse], activityCount: Int, createdAt: Date, group: String, isWatched: Bool? = nil, score: Float, updatedAt: Date, userCount: Int, userCountTruncated: Bool) { self.activities = activities self.activityCount = activityCount self.createdAt = createdAt self.group = group + self.isWatched = isWatched self.score = score self.updatedAt = updatedAt self.userCount = userCount @@ -31,6 +33,7 @@ public final class AggregatedActivityResponse: @unchecked Sendable, Codable, JSO case activityCount = "activity_count" case createdAt = "created_at" case group + case isWatched = "is_watched" case score case updatedAt = "updated_at" case userCount = "user_count" @@ -39,13 +42,14 @@ public final class AggregatedActivityResponse: @unchecked Sendable, Codable, JSO public static func == (lhs: AggregatedActivityResponse, rhs: AggregatedActivityResponse) -> Bool { lhs.activities == rhs.activities && - lhs.activityCount == rhs.activityCount && - lhs.createdAt == rhs.createdAt && - lhs.group == rhs.group && - lhs.score == rhs.score && - lhs.updatedAt == rhs.updatedAt && - lhs.userCount == rhs.userCount && - lhs.userCountTruncated == rhs.userCountTruncated + lhs.activityCount == rhs.activityCount && + lhs.createdAt == rhs.createdAt && + lhs.group == rhs.group && + lhs.isWatched == rhs.isWatched && + lhs.score == rhs.score && + lhs.updatedAt == rhs.updatedAt && + lhs.userCount == rhs.userCount && + lhs.userCountTruncated == rhs.userCountTruncated } public func hash(into hasher: inout Hasher) { @@ -53,6 +57,7 @@ public final class AggregatedActivityResponse: @unchecked Sendable, Codable, JSO hasher.combine(activityCount) hasher.combine(createdAt) hasher.combine(group) + hasher.combine(isWatched) hasher.combine(score) hasher.combine(updatedAt) hasher.combine(userCount) diff --git a/Sources/StreamFeeds/generated/feeds/models/AppResponseFields.swift b/Sources/StreamFeeds/generated/feeds/models/AppResponseFields.swift index 1f7ecc3..aade4c8 100644 --- a/Sources/StreamFeeds/generated/feeds/models/AppResponseFields.swift +++ b/Sources/StreamFeeds/generated/feeds/models/AppResponseFields.swift @@ -9,38 +9,48 @@ public final class AppResponseFields: @unchecked Sendable, Codable, JSONEncodabl public var asyncUrlEnrichEnabled: Bool public var autoTranslationEnabled: Bool public var fileUploadConfig: FileUploadConfig + public var id: Int public var imageUploadConfig: FileUploadConfig public var name: String + public var placement: String - public init(asyncUrlEnrichEnabled: Bool, autoTranslationEnabled: Bool, fileUploadConfig: FileUploadConfig, imageUploadConfig: FileUploadConfig, name: String) { + public init(asyncUrlEnrichEnabled: Bool, autoTranslationEnabled: Bool, fileUploadConfig: FileUploadConfig, id: Int, imageUploadConfig: FileUploadConfig, name: String, placement: String) { self.asyncUrlEnrichEnabled = asyncUrlEnrichEnabled self.autoTranslationEnabled = autoTranslationEnabled self.fileUploadConfig = fileUploadConfig + self.id = id self.imageUploadConfig = imageUploadConfig self.name = name + self.placement = placement } public enum CodingKeys: String, CodingKey, CaseIterable { case asyncUrlEnrichEnabled = "async_url_enrich_enabled" case autoTranslationEnabled = "auto_translation_enabled" case fileUploadConfig = "file_upload_config" + case id case imageUploadConfig = "image_upload_config" case name + case placement } public static func == (lhs: AppResponseFields, rhs: AppResponseFields) -> Bool { lhs.asyncUrlEnrichEnabled == rhs.asyncUrlEnrichEnabled && - lhs.autoTranslationEnabled == rhs.autoTranslationEnabled && - lhs.fileUploadConfig == rhs.fileUploadConfig && - lhs.imageUploadConfig == rhs.imageUploadConfig && - lhs.name == rhs.name + lhs.autoTranslationEnabled == rhs.autoTranslationEnabled && + lhs.fileUploadConfig == rhs.fileUploadConfig && + lhs.id == rhs.id && + lhs.imageUploadConfig == rhs.imageUploadConfig && + lhs.name == rhs.name && + lhs.placement == rhs.placement } public func hash(into hasher: inout Hasher) { hasher.combine(asyncUrlEnrichEnabled) hasher.combine(autoTranslationEnabled) hasher.combine(fileUploadConfig) + hasher.combine(id) hasher.combine(imageUploadConfig) hasher.combine(name) + hasher.combine(placement) } } diff --git a/Sources/StreamFeeds/generated/feeds/models/BlockActionRequest.swift b/Sources/StreamFeeds/generated/feeds/models/BlockActionRequest.swift new file mode 100644 index 0000000..aaf5d28 --- /dev/null +++ b/Sources/StreamFeeds/generated/feeds/models/BlockActionRequest.swift @@ -0,0 +1,26 @@ +// +// Copyright © 2025 Stream.io Inc. All rights reserved. +// + +import Foundation +import StreamCore + +public final class BlockActionRequest: @unchecked Sendable, Codable, JSONEncodable, Hashable { + public var reason: String? + + public init(reason: String? = nil) { + self.reason = reason + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case reason + } + + public static func == (lhs: BlockActionRequest, rhs: BlockActionRequest) -> Bool { + lhs.reason == rhs.reason + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(reason) + } +} diff --git a/Sources/StreamFeeds/generated/feeds/models/EntityCreator.swift b/Sources/StreamFeeds/generated/feeds/models/EntityCreator.swift deleted file mode 100644 index 2850963..0000000 --- a/Sources/StreamFeeds/generated/feeds/models/EntityCreator.swift +++ /dev/null @@ -1,126 +0,0 @@ -// -// Copyright © 2025 Stream.io Inc. All rights reserved. -// - -import Foundation -import StreamCore - -public final class EntityCreator: @unchecked Sendable, Codable, JSONEncodable, Hashable { - public var avgResponseTime: Int? - public var banCount: Int - public var banExpires: Date? - public var banned: Bool - public var createdAt: Date? - public var custom: [String: RawJSON] - public var deactivatedAt: Date? - public var deletedAt: Date? - public var deletedContentCount: Int - public var id: String - public var invisible: Bool? - public var language: String? - public var lastActive: Date? - public var lastEngagedAt: Date? - public var online: Bool - public var privacySettings: PrivacySettings? - public var revokeTokensIssuedBefore: Date? - public var role: String - public var teams: [String]? - public var teamsRole: [String: String] - public var updatedAt: Date? - - public init(avgResponseTime: Int? = nil, banCount: Int, banExpires: Date? = nil, banned: Bool, createdAt: Date? = nil, custom: [String: RawJSON], deactivatedAt: Date? = nil, deletedAt: Date? = nil, deletedContentCount: Int, id: String, invisible: Bool? = nil, language: String? = nil, lastActive: Date? = nil, lastEngagedAt: Date? = nil, online: Bool, privacySettings: PrivacySettings? = nil, revokeTokensIssuedBefore: Date? = nil, role: String, teams: [String]? = nil, teamsRole: [String: String], updatedAt: Date? = nil) { - self.avgResponseTime = avgResponseTime - self.banCount = banCount - self.banExpires = banExpires - self.banned = banned - self.createdAt = createdAt - self.custom = custom - self.deactivatedAt = deactivatedAt - self.deletedAt = deletedAt - self.deletedContentCount = deletedContentCount - self.id = id - self.invisible = invisible - self.language = language - self.lastActive = lastActive - self.lastEngagedAt = lastEngagedAt - self.online = online - self.privacySettings = privacySettings - self.revokeTokensIssuedBefore = revokeTokensIssuedBefore - self.role = role - self.teams = teams - self.teamsRole = teamsRole - self.updatedAt = updatedAt - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case avgResponseTime = "avg_response_time" - case banCount = "ban_count" - case banExpires = "ban_expires" - case banned - case createdAt = "created_at" - case custom - case deactivatedAt = "deactivated_at" - case deletedAt = "deleted_at" - case deletedContentCount = "deleted_content_count" - case id - case invisible - case language - case lastActive = "last_active" - case lastEngagedAt = "last_engaged_at" - case online - case privacySettings = "privacy_settings" - case revokeTokensIssuedBefore = "revoke_tokens_issued_before" - case role - case teams - case teamsRole = "teams_role" - case updatedAt = "updated_at" - } - - public static func == (lhs: EntityCreator, rhs: EntityCreator) -> Bool { - lhs.avgResponseTime == rhs.avgResponseTime && - lhs.banCount == rhs.banCount && - lhs.banExpires == rhs.banExpires && - lhs.banned == rhs.banned && - lhs.createdAt == rhs.createdAt && - lhs.custom == rhs.custom && - lhs.deactivatedAt == rhs.deactivatedAt && - lhs.deletedAt == rhs.deletedAt && - lhs.deletedContentCount == rhs.deletedContentCount && - lhs.id == rhs.id && - lhs.invisible == rhs.invisible && - lhs.language == rhs.language && - lhs.lastActive == rhs.lastActive && - lhs.lastEngagedAt == rhs.lastEngagedAt && - lhs.online == rhs.online && - lhs.privacySettings == rhs.privacySettings && - lhs.revokeTokensIssuedBefore == rhs.revokeTokensIssuedBefore && - lhs.role == rhs.role && - lhs.teams == rhs.teams && - lhs.teamsRole == rhs.teamsRole && - lhs.updatedAt == rhs.updatedAt - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(avgResponseTime) - hasher.combine(banCount) - hasher.combine(banExpires) - hasher.combine(banned) - hasher.combine(createdAt) - hasher.combine(custom) - hasher.combine(deactivatedAt) - hasher.combine(deletedAt) - hasher.combine(deletedContentCount) - hasher.combine(id) - hasher.combine(invisible) - hasher.combine(language) - hasher.combine(lastActive) - hasher.combine(lastEngagedAt) - hasher.combine(online) - hasher.combine(privacySettings) - hasher.combine(revokeTokensIssuedBefore) - hasher.combine(role) - hasher.combine(teams) - hasher.combine(teamsRole) - hasher.combine(updatedAt) - } -} diff --git a/Sources/StreamFeeds/generated/feeds/models/EntityCreatorResponse.swift b/Sources/StreamFeeds/generated/feeds/models/EntityCreatorResponse.swift index 0ecd27f..827e78d 100644 --- a/Sources/StreamFeeds/generated/feeds/models/EntityCreatorResponse.swift +++ b/Sources/StreamFeeds/generated/feeds/models/EntityCreatorResponse.swift @@ -1,7 +1,3 @@ -// -// Copyright © 2025 Stream.io Inc. All rights reserved. -// - import Foundation import StreamCore @@ -52,52 +48,52 @@ public final class EntityCreatorResponse: @unchecked Sendable, Codable, JSONEnco self.updatedAt = updatedAt } - public enum CodingKeys: String, CodingKey, CaseIterable { - case avgResponseTime = "avg_response_time" - case banCount = "ban_count" - case banned - case blockedUserIds = "blocked_user_ids" - case createdAt = "created_at" - case custom - case deactivatedAt = "deactivated_at" - case deletedAt = "deleted_at" - case deletedContentCount = "deleted_content_count" - case flaggedCount = "flagged_count" - case id - case image - case language - case lastActive = "last_active" - case name - case online - case revokeTokensIssuedBefore = "revoke_tokens_issued_before" - case role - case teams - case teamsRole = "teams_role" - case updatedAt = "updated_at" - } +public enum CodingKeys: String, CodingKey, CaseIterable { + case avgResponseTime = "avg_response_time" + case banCount = "ban_count" + case banned + case blockedUserIds = "blocked_user_ids" + case createdAt = "created_at" + case custom + case deactivatedAt = "deactivated_at" + case deletedAt = "deleted_at" + case deletedContentCount = "deleted_content_count" + case flaggedCount = "flagged_count" + case id + case image + case language + case lastActive = "last_active" + case name + case online + case revokeTokensIssuedBefore = "revoke_tokens_issued_before" + case role + case teams + case teamsRole = "teams_role" + case updatedAt = "updated_at" +} public static func == (lhs: EntityCreatorResponse, rhs: EntityCreatorResponse) -> Bool { lhs.avgResponseTime == rhs.avgResponseTime && - lhs.banCount == rhs.banCount && - lhs.banned == rhs.banned && - lhs.blockedUserIds == rhs.blockedUserIds && - lhs.createdAt == rhs.createdAt && - lhs.custom == rhs.custom && - lhs.deactivatedAt == rhs.deactivatedAt && - lhs.deletedAt == rhs.deletedAt && - lhs.deletedContentCount == rhs.deletedContentCount && - lhs.flaggedCount == rhs.flaggedCount && - lhs.id == rhs.id && - lhs.image == rhs.image && - lhs.language == rhs.language && - lhs.lastActive == rhs.lastActive && - lhs.name == rhs.name && - lhs.online == rhs.online && - lhs.revokeTokensIssuedBefore == rhs.revokeTokensIssuedBefore && - lhs.role == rhs.role && - lhs.teams == rhs.teams && - lhs.teamsRole == rhs.teamsRole && - lhs.updatedAt == rhs.updatedAt + lhs.banCount == rhs.banCount && + lhs.banned == rhs.banned && + lhs.blockedUserIds == rhs.blockedUserIds && + lhs.createdAt == rhs.createdAt && + lhs.custom == rhs.custom && + lhs.deactivatedAt == rhs.deactivatedAt && + lhs.deletedAt == rhs.deletedAt && + lhs.deletedContentCount == rhs.deletedContentCount && + lhs.flaggedCount == rhs.flaggedCount && + lhs.id == rhs.id && + lhs.image == rhs.image && + lhs.language == rhs.language && + lhs.lastActive == rhs.lastActive && + lhs.name == rhs.name && + lhs.online == rhs.online && + lhs.revokeTokensIssuedBefore == rhs.revokeTokensIssuedBefore && + lhs.role == rhs.role && + lhs.teams == rhs.teams && + lhs.teamsRole == rhs.teamsRole && + lhs.updatedAt == rhs.updatedAt } public func hash(into hasher: inout Hasher) { diff --git a/Sources/StreamFeeds/generated/feeds/models/EventNotificationSettings.swift b/Sources/StreamFeeds/generated/feeds/models/EventNotificationSettings.swift deleted file mode 100644 index 039942d..0000000 --- a/Sources/StreamFeeds/generated/feeds/models/EventNotificationSettings.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// Copyright © 2025 Stream.io Inc. All rights reserved. -// - -import Foundation -import StreamCore - -public final class EventNotificationSettings: @unchecked Sendable, Codable, JSONEncodable, Hashable { - public var apns: APNS - public var enabled: Bool - public var fcm: FCM - - public init(apns: APNS, enabled: Bool, fcm: FCM) { - self.apns = apns - self.enabled = enabled - self.fcm = fcm - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case apns - case enabled - case fcm - } - - public static func == (lhs: EventNotificationSettings, rhs: EventNotificationSettings) -> Bool { - lhs.apns == rhs.apns && - lhs.enabled == rhs.enabled && - lhs.fcm == rhs.fcm - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(apns) - hasher.combine(enabled) - hasher.combine(fcm) - } -} diff --git a/Sources/StreamFeeds/generated/feeds/models/ExternalStorage.swift b/Sources/StreamFeeds/generated/feeds/models/ExternalStorage.swift deleted file mode 100644 index b528112..0000000 --- a/Sources/StreamFeeds/generated/feeds/models/ExternalStorage.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// Copyright © 2025 Stream.io Inc. All rights reserved. -// - -import Foundation -import StreamCore - -public final class ExternalStorage: @unchecked Sendable, Codable, JSONEncodable, Hashable { - public var absAccountName: String? - public var absClientId: String? - public var absClientSecret: String? - public var absTenantId: String? - public var bucket: String? - public var gcsCredentials: String? - public var path: String? - public var s3ApiKey: String? - public var s3CustomEndpoint: String? - public var s3Region: String? - public var s3SecretKey: String? - public var storageName: String? - public var storageType: Int? - - public init(absAccountName: String? = nil, absClientId: String? = nil, absClientSecret: String? = nil, absTenantId: String? = nil, bucket: String? = nil, gcsCredentials: String? = nil, path: String? = nil, s3ApiKey: String? = nil, s3CustomEndpoint: String? = nil, s3Region: String? = nil, s3SecretKey: String? = nil, storageName: String? = nil, storageType: Int? = nil) { - self.absAccountName = absAccountName - self.absClientId = absClientId - self.absClientSecret = absClientSecret - self.absTenantId = absTenantId - self.bucket = bucket - self.gcsCredentials = gcsCredentials - self.path = path - self.s3ApiKey = s3ApiKey - self.s3CustomEndpoint = s3CustomEndpoint - self.s3Region = s3Region - self.s3SecretKey = s3SecretKey - self.storageName = storageName - self.storageType = storageType - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case absAccountName = "abs_account_name" - case absClientId = "abs_client_id" - case absClientSecret = "abs_client_secret" - case absTenantId = "abs_tenant_id" - case bucket - case gcsCredentials = "gcs_credentials" - case path - case s3ApiKey = "s3_api_key" - case s3CustomEndpoint = "s3_custom_endpoint" - case s3Region = "s3_region" - case s3SecretKey = "s3_secret_key" - case storageName = "storage_name" - case storageType = "storage_type" - } - - public static func == (lhs: ExternalStorage, rhs: ExternalStorage) -> Bool { - lhs.absAccountName == rhs.absAccountName && - lhs.absClientId == rhs.absClientId && - lhs.absClientSecret == rhs.absClientSecret && - lhs.absTenantId == rhs.absTenantId && - lhs.bucket == rhs.bucket && - lhs.gcsCredentials == rhs.gcsCredentials && - lhs.path == rhs.path && - lhs.s3ApiKey == rhs.s3ApiKey && - lhs.s3CustomEndpoint == rhs.s3CustomEndpoint && - lhs.s3Region == rhs.s3Region && - lhs.s3SecretKey == rhs.s3SecretKey && - lhs.storageName == rhs.storageName && - lhs.storageType == rhs.storageType - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(absAccountName) - hasher.combine(absClientId) - hasher.combine(absClientSecret) - hasher.combine(absTenantId) - hasher.combine(bucket) - hasher.combine(gcsCredentials) - hasher.combine(path) - hasher.combine(s3ApiKey) - hasher.combine(s3CustomEndpoint) - hasher.combine(s3Region) - hasher.combine(s3SecretKey) - hasher.combine(storageName) - hasher.combine(storageType) - } -} diff --git a/Sources/StreamFeeds/generated/feeds/models/FCM.swift b/Sources/StreamFeeds/generated/feeds/models/FCM.swift deleted file mode 100644 index 6952673..0000000 --- a/Sources/StreamFeeds/generated/feeds/models/FCM.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright © 2025 Stream.io Inc. All rights reserved. -// - -import Foundation -import StreamCore - -public final class FCM: @unchecked Sendable, Codable, JSONEncodable, Hashable { - public var data: [String: RawJSON]? - - public init(data: [String: RawJSON]? = nil) { - self.data = data - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case data - } - - public static func == (lhs: FCM, rhs: FCM) -> Bool { - lhs.data == rhs.data - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(data) - } -} diff --git a/Sources/StreamFeeds/generated/feeds/models/FeedOwnCapability.swift b/Sources/StreamFeeds/generated/feeds/models/FeedOwnCapability.swift index 4bd35df..69478de 100644 --- a/Sources/StreamFeeds/generated/feeds/models/FeedOwnCapability.swift +++ b/Sources/StreamFeeds/generated/feeds/models/FeedOwnCapability.swift @@ -20,13 +20,13 @@ public enum FeedOwnCapability: String, Sendable, Codable, CaseIterable { case deleteOwnActivityReaction = "delete-own-activity-reaction" case deleteOwnComment = "delete-own-comment" case deleteOwnCommentReaction = "delete-own-comment-reaction" - case follow + case follow = "follow" case pinActivity = "pin-activity" case queryFeedMembers = "query-feed-members" case queryFollows = "query-follows" case readActivities = "read-activities" case readFeed = "read-feed" - case unfollow + case unfollow = "unfollow" case updateAnyActivity = "update-any-activity" case updateAnyComment = "update-any-comment" case updateFeed = "update-feed" diff --git a/Sources/StreamFeeds/generated/feeds/models/FeedSuggestionResponse.swift b/Sources/StreamFeeds/generated/feeds/models/FeedSuggestionResponse.swift new file mode 100644 index 0000000..452991a --- /dev/null +++ b/Sources/StreamFeeds/generated/feeds/models/FeedSuggestionResponse.swift @@ -0,0 +1,127 @@ +import Foundation +import StreamCore + +public final class FeedSuggestionResponse: @unchecked Sendable, Codable, JSONEncodable, Hashable { + public var algorithmScores: [String: Float]? + public var createdAt: Date + public var createdBy: UserResponse + public var custom: [String: RawJSON]? + public var deletedAt: Date? + public var description: String + public var feed: String + public var filterTags: [String]? + public var followerCount: Int + public var followingCount: Int + public var groupId: String + public var id: String + public var memberCount: Int + public var name: String + public var ownCapabilities: [FeedOwnCapability]? + public var ownFollows: [FollowResponse]? + public var ownMembership: FeedMemberResponse? + public var pinCount: Int + public var reason: String? + public var recommendationScore: Float? + public var updatedAt: Date + public var visibility: String? + + public init(algorithmScores: [String: Float]? = nil, createdAt: Date, createdBy: UserResponse, custom: [String: RawJSON]? = nil, deletedAt: Date? = nil, description: String, feed: String, filterTags: [String]? = nil, followerCount: Int, followingCount: Int, groupId: String, id: String, memberCount: Int, name: String, ownCapabilities: [FeedOwnCapability]? = nil, ownFollows: [FollowResponse]? = nil, ownMembership: FeedMemberResponse? = nil, pinCount: Int, reason: String? = nil, recommendationScore: Float? = nil, updatedAt: Date, visibility: String? = nil) { + self.algorithmScores = algorithmScores + self.createdAt = createdAt + self.createdBy = createdBy + self.custom = custom + self.deletedAt = deletedAt + self.description = description + self.feed = feed + self.filterTags = filterTags + self.followerCount = followerCount + self.followingCount = followingCount + self.groupId = groupId + self.id = id + self.memberCount = memberCount + self.name = name + self.ownCapabilities = ownCapabilities + self.ownFollows = ownFollows + self.ownMembership = ownMembership + self.pinCount = pinCount + self.reason = reason + self.recommendationScore = recommendationScore + self.updatedAt = updatedAt + self.visibility = visibility + } + +public enum CodingKeys: String, CodingKey, CaseIterable { + case algorithmScores = "algorithm_scores" + case createdAt = "created_at" + case createdBy = "created_by" + case custom + case deletedAt = "deleted_at" + case description + case feed + case filterTags = "filter_tags" + case followerCount = "follower_count" + case followingCount = "following_count" + case groupId = "group_id" + case id + case memberCount = "member_count" + case name + case ownCapabilities = "own_capabilities" + case ownFollows = "own_follows" + case ownMembership = "own_membership" + case pinCount = "pin_count" + case reason + case recommendationScore = "recommendation_score" + case updatedAt = "updated_at" + case visibility +} + + public static func == (lhs: FeedSuggestionResponse, rhs: FeedSuggestionResponse) -> Bool { + lhs.algorithmScores == rhs.algorithmScores && + lhs.createdAt == rhs.createdAt && + lhs.createdBy == rhs.createdBy && + lhs.custom == rhs.custom && + lhs.deletedAt == rhs.deletedAt && + lhs.description == rhs.description && + lhs.feed == rhs.feed && + lhs.filterTags == rhs.filterTags && + lhs.followerCount == rhs.followerCount && + lhs.followingCount == rhs.followingCount && + lhs.groupId == rhs.groupId && + lhs.id == rhs.id && + lhs.memberCount == rhs.memberCount && + lhs.name == rhs.name && + lhs.ownCapabilities == rhs.ownCapabilities && + lhs.ownFollows == rhs.ownFollows && + lhs.ownMembership == rhs.ownMembership && + lhs.pinCount == rhs.pinCount && + lhs.reason == rhs.reason && + lhs.recommendationScore == rhs.recommendationScore && + lhs.updatedAt == rhs.updatedAt && + lhs.visibility == rhs.visibility + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(algorithmScores) + hasher.combine(createdAt) + hasher.combine(createdBy) + hasher.combine(custom) + hasher.combine(deletedAt) + hasher.combine(description) + hasher.combine(feed) + hasher.combine(filterTags) + hasher.combine(followerCount) + hasher.combine(followingCount) + hasher.combine(groupId) + hasher.combine(id) + hasher.combine(memberCount) + hasher.combine(name) + hasher.combine(ownCapabilities) + hasher.combine(ownFollows) + hasher.combine(ownMembership) + hasher.combine(pinCount) + hasher.combine(reason) + hasher.combine(recommendationScore) + hasher.combine(updatedAt) + hasher.combine(visibility) + } +} diff --git a/Sources/StreamFeeds/generated/feeds/models/FeedsEvent.swift b/Sources/StreamFeeds/generated/feeds/models/FeedsEvent.swift index 74c77f2..e2c46c6 100644 --- a/Sources/StreamFeeds/generated/feeds/models/FeedsEvent.swift +++ b/Sources/StreamFeeds/generated/feeds/models/FeedsEvent.swift @@ -13,6 +13,7 @@ public enum FeedsEvent: Codable, Hashable { case typeAppUpdatedEvent(AppUpdatedEvent) case typeActivityAddedEvent(ActivityAddedEvent) case typeActivityDeletedEvent(ActivityDeletedEvent) + case typeActivityFeedbackEvent(ActivityFeedbackEvent) case typeActivityMarkEvent(ActivityMarkEvent) case typeActivityPinnedEvent(ActivityPinnedEvent) case typeActivityReactionAddedEvent(ActivityReactionAddedEvent) @@ -50,15 +51,15 @@ public enum FeedsEvent: Codable, Hashable { case typePollVoteCastedFeedEvent(PollVoteCastedFeedEvent) case typePollVoteChangedFeedEvent(PollVoteChangedFeedEvent) case typePollVoteRemovedFeedEvent(PollVoteRemovedFeedEvent) + case typeStoriesFeedUpdatedEvent(StoriesFeedUpdatedEvent) case typeHealthCheckEvent(HealthCheckEvent) case typeModerationCustomActionEvent(ModerationCustomActionEvent) - case typeModerationFlaggedEvent(ModerationFlaggedEvent) case typeModerationMarkReviewedEvent(ModerationMarkReviewedEvent) + case typeUserUpdatedEvent(UserUpdatedEvent) case typeUserBannedEvent(UserBannedEvent) case typeUserDeactivatedEvent(UserDeactivatedEvent) case typeUserMutedEvent(UserMutedEvent) case typeUserReactivatedEvent(UserReactivatedEvent) - case typeUserUpdatedEvent(UserUpdatedEvent) case typeConnectedEvent(ConnectedEvent) case typeConnectionErrorEvent(ConnectionErrorEvent) @@ -148,8 +149,6 @@ public enum FeedsEvent: Codable, Hashable { value.type case .typeModerationCustomActionEvent(let value): value.type - case .typeModerationFlaggedEvent(let value): - value.type case .typeModerationMarkReviewedEvent(let value): value.type case .typeUserBannedEvent(let value): @@ -166,6 +165,10 @@ public enum FeedsEvent: Codable, Hashable { value.type case let .typeConnectionErrorEvent(value): value.type + case let .typeActivityFeedbackEvent(value): + value.type + case let .typeStoriesFeedUpdatedEvent(value): + value.type } } @@ -255,8 +258,6 @@ public enum FeedsEvent: Codable, Hashable { value case .typeModerationCustomActionEvent(let value): value - case .typeModerationFlaggedEvent(let value): - value case .typeModerationMarkReviewedEvent(let value): value case .typeUserBannedEvent(let value): @@ -273,6 +274,10 @@ public enum FeedsEvent: Codable, Hashable { value case .typeConnectionErrorEvent(let value): value + case .typeActivityFeedbackEvent(let value): + value + case .typeStoriesFeedUpdatedEvent(let value): + value } } @@ -363,8 +368,6 @@ public enum FeedsEvent: Codable, Hashable { try container.encode(value) case .typeModerationCustomActionEvent(let value): try container.encode(value) - case .typeModerationFlaggedEvent(let value): - try container.encode(value) case .typeModerationMarkReviewedEvent(let value): try container.encode(value) case .typeUserBannedEvent(let value): @@ -381,6 +384,10 @@ public enum FeedsEvent: Codable, Hashable { try container.encode(value) case .typeConnectionErrorEvent(let value): try container.encode(value) + case .typeActivityFeedbackEvent(let value): + try container.encode(value) + case .typeStoriesFeedUpdatedEvent(let value): + try container.encode(value) } } @@ -396,6 +403,9 @@ public enum FeedsEvent: Codable, Hashable { } else if dto.type == "feeds.activity.deleted" { let value = try container.decode(ActivityDeletedEvent.self) self = .typeActivityDeletedEvent(value) + } else if dto.type == "feeds.activity.feedback" { + let value = try container.decode(ActivityFeedbackEvent.self) + self = .typeActivityFeedbackEvent(value) } else if dto.type == "feeds.activity.marked" { let value = try container.decode(ActivityMarkEvent.self) self = .typeActivityMarkEvent(value) @@ -507,15 +517,15 @@ public enum FeedsEvent: Codable, Hashable { } else if dto.type == "feeds.poll.vote_removed" { let value = try container.decode(PollVoteRemovedFeedEvent.self) self = .typePollVoteRemovedFeedEvent(value) + } else if dto.type == "feeds.stories_feed.updated" { + let value = try container.decode(StoriesFeedUpdatedEvent.self) + self = .typeStoriesFeedUpdatedEvent(value) } else if dto.type == "health.check" { let value = try container.decode(HealthCheckEvent.self) self = .typeHealthCheckEvent(value) } else if dto.type == "moderation.custom_action" { let value = try container.decode(ModerationCustomActionEvent.self) self = .typeModerationCustomActionEvent(value) - } else if dto.type == "moderation.flagged" { - let value = try container.decode(ModerationFlaggedEvent.self) - self = .typeModerationFlaggedEvent(value) } else if dto.type == "moderation.mark_reviewed" { let value = try container.decode(ModerationMarkReviewedEvent.self) self = .typeModerationMarkReviewedEvent(value) diff --git a/Sources/StreamFeeds/generated/feeds/models/Flag.swift b/Sources/StreamFeeds/generated/feeds/models/Flag.swift deleted file mode 100644 index 4115bfa..0000000 --- a/Sources/StreamFeeds/generated/feeds/models/Flag.swift +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright © 2025 Stream.io Inc. All rights reserved. -// - -import Foundation -import StreamCore - -public final class Flag: @unchecked Sendable, Codable, JSONEncodable, Hashable { - public var createdAt: Date - public var custom: [String: RawJSON]? - public var entityCreatorId: String? - public var entityId: String - public var entityType: String - public var isStreamedContent: Bool? - public var labels: [String]? - public var moderationPayload: ModerationPayload? - public var moderationPayloadHash: String? - public var reason: String? - public var result: [[String: RawJSON]] - public var reviewQueueItem: ReviewQueueItem? - public var reviewQueueItemId: String? - public var type: String? - public var updatedAt: Date - public var user: User? - - public init(createdAt: Date, custom: [String: RawJSON]? = nil, entityCreatorId: String? = nil, entityId: String, entityType: String, isStreamedContent: Bool? = nil, labels: [String]? = nil, moderationPayload: ModerationPayload? = nil, moderationPayloadHash: String? = nil, reason: String? = nil, result: [[String: RawJSON]], reviewQueueItem: ReviewQueueItem? = nil, reviewQueueItemId: String? = nil, updatedAt: Date, user: User? = nil) { - self.createdAt = createdAt - self.custom = custom - self.entityCreatorId = entityCreatorId - self.entityId = entityId - self.entityType = entityType - self.isStreamedContent = isStreamedContent - self.labels = labels - self.moderationPayload = moderationPayload - self.moderationPayloadHash = moderationPayloadHash - self.reason = reason - self.result = result - self.reviewQueueItem = reviewQueueItem - self.reviewQueueItemId = reviewQueueItemId - self.updatedAt = updatedAt - self.user = user - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case createdAt = "created_at" - case custom - case entityCreatorId = "entity_creator_id" - case entityId = "entity_id" - case entityType = "entity_type" - case isStreamedContent = "is_streamed_content" - case labels - case moderationPayload = "moderation_payload" - case moderationPayloadHash = "moderation_payload_hash" - case reason - case result - case reviewQueueItem = "review_queue_item" - case reviewQueueItemId = "review_queue_item_id" - case type - case updatedAt = "updated_at" - case user - } - - public static func == (lhs: Flag, rhs: Flag) -> Bool { - lhs.createdAt == rhs.createdAt && - lhs.custom == rhs.custom && - lhs.entityCreatorId == rhs.entityCreatorId && - lhs.entityId == rhs.entityId && - lhs.entityType == rhs.entityType && - lhs.isStreamedContent == rhs.isStreamedContent && - lhs.labels == rhs.labels && - lhs.moderationPayload == rhs.moderationPayload && - lhs.moderationPayloadHash == rhs.moderationPayloadHash && - lhs.reason == rhs.reason && - lhs.result == rhs.result && - lhs.reviewQueueItem == rhs.reviewQueueItem && - lhs.reviewQueueItemId == rhs.reviewQueueItemId && - lhs.type == rhs.type && - lhs.updatedAt == rhs.updatedAt && - lhs.user == rhs.user - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(createdAt) - hasher.combine(custom) - hasher.combine(entityCreatorId) - hasher.combine(entityId) - hasher.combine(entityType) - hasher.combine(isStreamedContent) - hasher.combine(labels) - hasher.combine(moderationPayload) - hasher.combine(moderationPayloadHash) - hasher.combine(reason) - hasher.combine(result) - hasher.combine(reviewQueueItem) - hasher.combine(reviewQueueItemId) - hasher.combine(type) - hasher.combine(updatedAt) - hasher.combine(user) - } -} diff --git a/Sources/StreamFeeds/generated/feeds/models/MemberLookup.swift b/Sources/StreamFeeds/generated/feeds/models/MemberLookup.swift deleted file mode 100644 index 5862249..0000000 --- a/Sources/StreamFeeds/generated/feeds/models/MemberLookup.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright © 2025 Stream.io Inc. All rights reserved. -// - -import Foundation -import StreamCore - -public final class MemberLookup: @unchecked Sendable, Codable, JSONEncodable, Hashable { - public var limit: Int - - public init(limit: Int) { - self.limit = limit - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case limit = "Limit" - } - - public static func == (lhs: MemberLookup, rhs: MemberLookup) -> Bool { - lhs.limit == rhs.limit - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(limit) - } -} diff --git a/Sources/StreamFeeds/generated/feeds/models/ModerationCustomActionEvent.swift b/Sources/StreamFeeds/generated/feeds/models/ModerationCustomActionEvent.swift index 830ccba..dff3e2e 100644 --- a/Sources/StreamFeeds/generated/feeds/models/ModerationCustomActionEvent.swift +++ b/Sources/StreamFeeds/generated/feeds/models/ModerationCustomActionEvent.swift @@ -5,36 +5,51 @@ import Foundation import StreamCore -public final class ModerationCustomActionEvent: @unchecked Sendable, Event, Codable, JSONEncodable, Hashable { +public final class ModerationCustomActionEvent: @unchecked Sendable, Event, Codable, JSONEncodable, Hashable { + public var actionId: String + public var actionOptions: [String: RawJSON]? public var createdAt: Date - public var item: ReviewQueueItem? + public var custom: [String: RawJSON] + public var receivedAt: Date? + public var reviewQueueItem: ReviewQueueItemResponse public var type: String = "moderation.custom_action" - public var user: User? - public init(createdAt: Date, item: ReviewQueueItem? = nil, user: User? = nil) { + public init(actionId: String, actionOptions: [String: RawJSON]? = nil, createdAt: Date, custom: [String: RawJSON], receivedAt: Date? = nil, reviewQueueItem: ReviewQueueItemResponse) { + self.actionId = actionId + self.actionOptions = actionOptions self.createdAt = createdAt - self.item = item - self.user = user + self.custom = custom + self.receivedAt = receivedAt + self.reviewQueueItem = reviewQueueItem } public enum CodingKeys: String, CodingKey, CaseIterable { + case actionId = "action_id" + case actionOptions = "action_options" case createdAt = "created_at" - case item + case custom + case receivedAt = "received_at" + case reviewQueueItem = "review_queue_item" case type - case user } public static func == (lhs: ModerationCustomActionEvent, rhs: ModerationCustomActionEvent) -> Bool { + lhs.actionId == rhs.actionId && + lhs.actionOptions == rhs.actionOptions && lhs.createdAt == rhs.createdAt && - lhs.item == rhs.item && - lhs.type == rhs.type && - lhs.user == rhs.user + lhs.custom == rhs.custom && + lhs.receivedAt == rhs.receivedAt && + lhs.reviewQueueItem == rhs.reviewQueueItem && + lhs.type == rhs.type } public func hash(into hasher: inout Hasher) { + hasher.combine(actionId) + hasher.combine(actionOptions) hasher.combine(createdAt) - hasher.combine(item) + hasher.combine(custom) + hasher.combine(receivedAt) + hasher.combine(reviewQueueItem) hasher.combine(type) - hasher.combine(user) } } diff --git a/Sources/StreamFeeds/generated/feeds/models/ModerationMarkReviewedEvent.swift b/Sources/StreamFeeds/generated/feeds/models/ModerationMarkReviewedEvent.swift index 57b8843..6264f34 100644 --- a/Sources/StreamFeeds/generated/feeds/models/ModerationMarkReviewedEvent.swift +++ b/Sources/StreamFeeds/generated/feeds/models/ModerationMarkReviewedEvent.swift @@ -7,11 +7,11 @@ import StreamCore public final class ModerationMarkReviewedEvent: @unchecked Sendable, Event, Codable, JSONEncodable, Hashable { public var createdAt: Date - public var item: ReviewQueueItem? + public var item: ReviewQueueItemResponse? public var type: String = "moderation.mark_reviewed" public var user: User? - public init(createdAt: Date, item: ReviewQueueItem? = nil, user: User? = nil) { + public init(createdAt: Date, item: ReviewQueueItemResponse? = nil, user: User? = nil) { self.createdAt = createdAt self.item = item self.user = user diff --git a/Sources/StreamFeeds/generated/feeds/models/OwnCapabilitiesBatchRequest.swift b/Sources/StreamFeeds/generated/feeds/models/OwnCapabilitiesBatchRequest.swift new file mode 100644 index 0000000..b818b64 --- /dev/null +++ b/Sources/StreamFeeds/generated/feeds/models/OwnCapabilitiesBatchRequest.swift @@ -0,0 +1,26 @@ +// +// Copyright © 2025 Stream.io Inc. All rights reserved. +// + +import Foundation +import StreamCore + +public final class OwnCapabilitiesBatchRequest: @unchecked Sendable, Codable, JSONEncodable, Hashable { + public var feeds: [String] + + public init(feeds: [String]) { + self.feeds = feeds + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case feeds + } + + public static func == (lhs: OwnCapabilitiesBatchRequest, rhs: OwnCapabilitiesBatchRequest) -> Bool { + lhs.feeds == rhs.feeds + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(feeds) + } +} diff --git a/Sources/StreamFeeds/generated/feeds/models/OwnCapabilitiesBatchResponse.swift b/Sources/StreamFeeds/generated/feeds/models/OwnCapabilitiesBatchResponse.swift new file mode 100644 index 0000000..211a46b --- /dev/null +++ b/Sources/StreamFeeds/generated/feeds/models/OwnCapabilitiesBatchResponse.swift @@ -0,0 +1,31 @@ +// +// Copyright © 2025 Stream.io Inc. All rights reserved. +// + +import Foundation +import StreamCore + +public final class OwnCapabilitiesBatchResponse: @unchecked Sendable, Codable, JSONEncodable, Hashable { + public var capabilities: [String: [FeedOwnCapability]] + public var duration: String + + public init(capabilities: [String: [FeedOwnCapability]], duration: String) { + self.capabilities = capabilities + self.duration = duration + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case capabilities + case duration + } + + public static func == (lhs: OwnCapabilitiesBatchResponse, rhs: OwnCapabilitiesBatchResponse) -> Bool { + lhs.capabilities == rhs.capabilities && + lhs.duration == rhs.duration + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(capabilities) + hasher.combine(duration) + } +} diff --git a/Sources/StreamFeeds/generated/feeds/models/ReviewQueueItem.swift b/Sources/StreamFeeds/generated/feeds/models/ReviewQueueItem.swift deleted file mode 100644 index ac9f3e2..0000000 --- a/Sources/StreamFeeds/generated/feeds/models/ReviewQueueItem.swift +++ /dev/null @@ -1,176 +0,0 @@ -// -// Copyright © 2025 Stream.io Inc. All rights reserved. -// - -import Foundation -import StreamCore - -public final class ReviewQueueItem: @unchecked Sendable, Codable, JSONEncodable, Hashable { - public var actions: [ActionLog] - public var activity: EnrichedActivity? - public var aiTextSeverity: String - public var assignedTo: User? - public var bans: [Ban] - public var bounceCount: Int - public var configKey: String - public var contentChanged: Bool - public var createdAt: Date - public var entityCreator: EntityCreator? - public var entityId: String - public var entityType: String - public var feedsV2Activity: EnrichedActivity? - public var flagLabels: [String] - public var flagTypes: [String] - public var flags: [Flag] - public var flagsCount: Int - public var hasImage: Bool - public var hasText: Bool - public var hasVideo: Bool - public var id: String - public var languages: [String] - public var moderationPayload: ModerationPayload? - public var moderationPayloadHash: String - public var recommendedAction: String - public var reporterIds: [String] - public var reviewedBy: String - public var severity: Int - public var status: String - public var teams: [String] - public var updatedAt: Date - - public init(actions: [ActionLog], activity: EnrichedActivity? = nil, aiTextSeverity: String, assignedTo: User? = nil, bans: [Ban], bounceCount: Int, configKey: String, contentChanged: Bool, createdAt: Date, entityCreator: EntityCreator? = nil, entityId: String, entityType: String, feedsV2Activity: EnrichedActivity? = nil, flagLabels: [String], flagTypes: [String], flags: [Flag], flagsCount: Int, hasImage: Bool, hasText: Bool, hasVideo: Bool, id: String, languages: [String], moderationPayload: ModerationPayload? = nil, moderationPayloadHash: String, recommendedAction: String, reporterIds: [String], reviewedBy: String, severity: Int, status: String, teams: [String], updatedAt: Date) { - self.actions = actions - self.activity = activity - self.aiTextSeverity = aiTextSeverity - self.assignedTo = assignedTo - self.bans = bans - self.bounceCount = bounceCount - self.configKey = configKey - self.contentChanged = contentChanged - self.createdAt = createdAt - self.entityCreator = entityCreator - self.entityId = entityId - self.entityType = entityType - self.feedsV2Activity = feedsV2Activity - self.flagLabels = flagLabels - self.flagTypes = flagTypes - self.flags = flags - self.flagsCount = flagsCount - self.hasImage = hasImage - self.hasText = hasText - self.hasVideo = hasVideo - self.id = id - self.languages = languages - self.moderationPayload = moderationPayload - self.moderationPayloadHash = moderationPayloadHash - self.recommendedAction = recommendedAction - self.reporterIds = reporterIds - self.reviewedBy = reviewedBy - self.severity = severity - self.status = status - self.teams = teams - self.updatedAt = updatedAt - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case actions - case activity - case aiTextSeverity = "ai_text_severity" - case assignedTo = "assigned_to" - case bans - case bounceCount = "bounce_count" - case configKey = "config_key" - case contentChanged = "content_changed" - case createdAt = "created_at" - case entityCreator = "entity_creator" - case entityId = "entity_id" - case entityType = "entity_type" - case feedsV2Activity = "feeds_v2_activity" - case flagLabels = "flag_labels" - case flagTypes = "flag_types" - case flags - case flagsCount = "flags_count" - case hasImage = "has_image" - case hasText = "has_text" - case hasVideo = "has_video" - case id - case languages - case moderationPayload = "moderation_payload" - case moderationPayloadHash = "moderation_payload_hash" - case recommendedAction = "recommended_action" - case reporterIds = "reporter_ids" - case reviewedBy = "reviewed_by" - case severity - case status - case teams - case updatedAt = "updated_at" - } - - public static func == (lhs: ReviewQueueItem, rhs: ReviewQueueItem) -> Bool { - lhs.actions == rhs.actions && - lhs.activity == rhs.activity && - lhs.aiTextSeverity == rhs.aiTextSeverity && - lhs.assignedTo == rhs.assignedTo && - lhs.bans == rhs.bans && - lhs.bounceCount == rhs.bounceCount && - lhs.configKey == rhs.configKey && - lhs.contentChanged == rhs.contentChanged && - lhs.createdAt == rhs.createdAt && - lhs.entityCreator == rhs.entityCreator && - lhs.entityId == rhs.entityId && - lhs.entityType == rhs.entityType && - lhs.feedsV2Activity == rhs.feedsV2Activity && - lhs.flagLabels == rhs.flagLabels && - lhs.flagTypes == rhs.flagTypes && - lhs.flags == rhs.flags && - lhs.flagsCount == rhs.flagsCount && - lhs.hasImage == rhs.hasImage && - lhs.hasText == rhs.hasText && - lhs.hasVideo == rhs.hasVideo && - lhs.id == rhs.id && - lhs.languages == rhs.languages && - lhs.moderationPayload == rhs.moderationPayload && - lhs.moderationPayloadHash == rhs.moderationPayloadHash && - lhs.recommendedAction == rhs.recommendedAction && - lhs.reporterIds == rhs.reporterIds && - lhs.reviewedBy == rhs.reviewedBy && - lhs.severity == rhs.severity && - lhs.status == rhs.status && - lhs.teams == rhs.teams && - lhs.updatedAt == rhs.updatedAt - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(actions) - hasher.combine(activity) - hasher.combine(aiTextSeverity) - hasher.combine(assignedTo) - hasher.combine(bans) - hasher.combine(bounceCount) - hasher.combine(configKey) - hasher.combine(contentChanged) - hasher.combine(createdAt) - hasher.combine(entityCreator) - hasher.combine(entityId) - hasher.combine(entityType) - hasher.combine(feedsV2Activity) - hasher.combine(flagLabels) - hasher.combine(flagTypes) - hasher.combine(flags) - hasher.combine(flagsCount) - hasher.combine(hasImage) - hasher.combine(hasText) - hasher.combine(hasVideo) - hasher.combine(id) - hasher.combine(languages) - hasher.combine(moderationPayload) - hasher.combine(moderationPayloadHash) - hasher.combine(recommendedAction) - hasher.combine(reporterIds) - hasher.combine(reviewedBy) - hasher.combine(severity) - hasher.combine(status) - hasher.combine(teams) - hasher.combine(updatedAt) - } -} diff --git a/Sources/StreamFeeds/generated/feeds/models/ShadowBlockActionRequest.swift b/Sources/StreamFeeds/generated/feeds/models/ShadowBlockActionRequest.swift new file mode 100644 index 0000000..8870738 --- /dev/null +++ b/Sources/StreamFeeds/generated/feeds/models/ShadowBlockActionRequest.swift @@ -0,0 +1,22 @@ +import Foundation +import StreamCore + +public final class ShadowBlockActionRequest: @unchecked Sendable, Codable, JSONEncodable, Hashable { + public var reason: String? + + public init(reason: String? = nil) { + self.reason = reason + } + +public enum CodingKeys: String, CodingKey, CaseIterable { + case reason +} + + public static func == (lhs: ShadowBlockActionRequest, rhs: ShadowBlockActionRequest) -> Bool { + lhs.reason == rhs.reason + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(reason) + } +} diff --git a/Sources/StreamFeeds/generated/feeds/models/SpeechSegmentConfig.swift b/Sources/StreamFeeds/generated/feeds/models/SpeechSegmentConfig.swift new file mode 100644 index 0000000..5fb5e86 --- /dev/null +++ b/Sources/StreamFeeds/generated/feeds/models/SpeechSegmentConfig.swift @@ -0,0 +1,27 @@ +import Foundation +import StreamCore + +public final class SpeechSegmentConfig: @unchecked Sendable, Codable, JSONEncodable, Hashable { + public var maxSpeechCaptionMs: Int? + public var silenceDurationMs: Int? + + public init(maxSpeechCaptionMs: Int? = nil, silenceDurationMs: Int? = nil) { + self.maxSpeechCaptionMs = maxSpeechCaptionMs + self.silenceDurationMs = silenceDurationMs + } + +public enum CodingKeys: String, CodingKey, CaseIterable { + case maxSpeechCaptionMs = "max_speech_caption_ms" + case silenceDurationMs = "silence_duration_ms" +} + + public static func == (lhs: SpeechSegmentConfig, rhs: SpeechSegmentConfig) -> Bool { + lhs.maxSpeechCaptionMs == rhs.maxSpeechCaptionMs && + lhs.silenceDurationMs == rhs.silenceDurationMs + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(maxSpeechCaptionMs) + hasher.combine(silenceDurationMs) + } +} diff --git a/Sources/StreamFeeds/generated/feeds/models/StoriesConfig.swift b/Sources/StreamFeeds/generated/feeds/models/StoriesConfig.swift index 519adc3..6ad907c 100644 --- a/Sources/StreamFeeds/generated/feeds/models/StoriesConfig.swift +++ b/Sources/StreamFeeds/generated/feeds/models/StoriesConfig.swift @@ -6,42 +6,26 @@ import Foundation import StreamCore public final class StoriesConfig: @unchecked Sendable, Codable, JSONEncodable, Hashable { - public enum StoriesConfigExpirationBehaviour: String, Sendable, Codable, CaseIterable { - case hideForEveryone = "hide_for_everyone" - case visibleForAuthor = "visible_for_author" - case unknown = "_unknown" - - public init(from decoder: Decoder) throws { - let container = try decoder.singleValueContainer() - if let decodedValue = try? container.decode(String.self), - let value = Self(rawValue: decodedValue) { - self = value - } else { - self = .unknown - } - } - } - - public var expirationBehaviour: StoriesConfigExpirationBehaviour? public var skipWatched: Bool? + public var trackWatched: Bool? - public init(expirationBehaviour: StoriesConfigExpirationBehaviour? = nil, skipWatched: Bool? = nil) { - self.expirationBehaviour = expirationBehaviour + public init(skipWatched: Bool? = nil, trackWatched: Bool? = nil) { self.skipWatched = skipWatched + self.trackWatched = trackWatched } public enum CodingKeys: String, CodingKey, CaseIterable { - case expirationBehaviour = "expiration_behaviour" case skipWatched = "skip_watched" + case trackWatched = "track_watched" } public static func == (lhs: StoriesConfig, rhs: StoriesConfig) -> Bool { - lhs.expirationBehaviour == rhs.expirationBehaviour && - lhs.skipWatched == rhs.skipWatched + lhs.skipWatched == rhs.skipWatched && + lhs.trackWatched == rhs.trackWatched } public func hash(into hasher: inout Hasher) { - hasher.combine(expirationBehaviour) hasher.combine(skipWatched) + hasher.combine(trackWatched) } } diff --git a/Sources/StreamFeeds/generated/feeds/models/StoriesFeedUpdatedEvent.swift b/Sources/StreamFeeds/generated/feeds/models/StoriesFeedUpdatedEvent.swift new file mode 100644 index 0000000..893a77f --- /dev/null +++ b/Sources/StreamFeeds/generated/feeds/models/StoriesFeedUpdatedEvent.swift @@ -0,0 +1,65 @@ +// +// Copyright © 2025 Stream.io Inc. All rights reserved. +// + +import Foundation +import StreamCore + +public final class StoriesFeedUpdatedEvent: @unchecked Sendable, Event, Codable, JSONEncodable, Hashable { + public var activities: [ActivityResponse]? + public var aggregatedActivities: [AggregatedActivityResponse]? + public var createdAt: Date + public var custom: [String: RawJSON] + public var feedVisibility: String? + public var fid: String + public var receivedAt: Date? + public var type: String = "feeds.stories_feed.updated" + public var user: UserResponseCommonFields? + + public init(activities: [ActivityResponse]? = nil, aggregatedActivities: [AggregatedActivityResponse]? = nil, createdAt: Date, custom: [String: RawJSON], feedVisibility: String? = nil, fid: String, receivedAt: Date? = nil, user: UserResponseCommonFields? = nil) { + self.activities = activities + self.aggregatedActivities = aggregatedActivities + self.createdAt = createdAt + self.custom = custom + self.feedVisibility = feedVisibility + self.fid = fid + self.receivedAt = receivedAt + self.user = user + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case activities + case aggregatedActivities = "aggregated_activities" + case createdAt = "created_at" + case custom + case feedVisibility = "feed_visibility" + case fid + case receivedAt = "received_at" + case type + case user + } + + public static func == (lhs: StoriesFeedUpdatedEvent, rhs: StoriesFeedUpdatedEvent) -> Bool { + lhs.activities == rhs.activities && + lhs.aggregatedActivities == rhs.aggregatedActivities && + lhs.createdAt == rhs.createdAt && + lhs.custom == rhs.custom && + lhs.feedVisibility == rhs.feedVisibility && + lhs.fid == rhs.fid && + lhs.receivedAt == rhs.receivedAt && + lhs.type == rhs.type && + lhs.user == rhs.user + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(activities) + hasher.combine(aggregatedActivities) + hasher.combine(createdAt) + hasher.combine(custom) + hasher.combine(feedVisibility) + hasher.combine(fid) + hasher.combine(receivedAt) + hasher.combine(type) + hasher.combine(user) + } +}