From d7990a73fb378aeac764eed21f78bb7530435476 Mon Sep 17 00:00:00 2001 From: Firefox Sync Engineering Date: Wed, 8 Apr 2026 08:19:51 +0000 Subject: [PATCH 1/4] (Local AS flow) Nightly auto-update (151.0.20260408050141) --- MozillaRustComponents/Package.swift | 10 ++-- .../Generated/Metrics/Metrics.swift | 2 +- .../Generated/Metrics/Metrics.swift | 2 +- .../Generated/logins.swift | 17 +----- .../Generated/places.swift | 58 ------------------- .../Generated/sync15.swift | 24 +++++++- 6 files changed, 30 insertions(+), 83 deletions(-) diff --git a/MozillaRustComponents/Package.swift b/MozillaRustComponents/Package.swift index 839e17d89d36..952e8a8339fd 100644 --- a/MozillaRustComponents/Package.swift +++ b/MozillaRustComponents/Package.swift @@ -1,13 +1,13 @@ // swift-tools-version: 5.10 import PackageDescription -let checksum = "bcef62cf6e4e41837dfc3272143eda00bedfe74c2e32a2eb106acf45fe8995a9" -let version = "151.0.20260402050248" -let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260402050248/artifacts/public/build/MozillaRustComponents.xcframework.zip" +let checksum = "e8bf5c2b6c588a6f2bb8599dfba4718901998318647080308520839c28ddeb4a" +let version = "151.0.20260408050141" +let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260408050141/artifacts/public/build/MozillaRustComponents.xcframework.zip" // Focus xcframework -let focusChecksum = "c45c063bb420e588a1f63f472ca8ba387c245b8fd51627523685ef1194b18a5d" -let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260402050248/artifacts/public/build/FocusRustComponents.xcframework.zip" +let focusChecksum = "e5509a7cdfe81ebfa278e7ae5cbc2a58c64f798c73e7f7008cd038433e6e45fd" +let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260408050141/artifacts/public/build/FocusRustComponents.xcframework.zip" let package = Package( name: "MozillaRustComponentsSwift", diff --git a/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift b/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift index 74567e0b13ee..034b945c2f54 100644 --- a/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift +++ b/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift @@ -23,7 +23,7 @@ extension GleanMetrics { // Intentionally left private, no external user can instantiate a new global object. } - public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 2, hour: 5, minute: 23, second: 49)) + public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 8, hour: 5, minute: 35, second: 43)) } enum NimbusEvents { diff --git a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift index 3f5fc6bb69d5..24f388350053 100644 --- a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift +++ b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift @@ -23,7 +23,7 @@ extension GleanMetrics { // Intentionally left private, no external user can instantiate a new global object. } - public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 2, hour: 5, minute: 23, second: 47)) + public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 8, hour: 5, minute: 35, second: 40)) } enum AdsClient { diff --git a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/logins.swift b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/logins.swift index a4d2fc238919..509f7bbe0cfc 100644 --- a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/logins.swift +++ b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/logins.swift @@ -2307,11 +2307,6 @@ public enum LoginsApiError: Swift.Error, Equatable, Hashable, Foundation.Localiz */ case Interrupted(reason: String ) - /** - * Sync reported that authentication failed and the user should re-enter their FxA password. - */ - case SyncAuthInvalid(reason: String - ) /** * something internal went wrong which doesn't have a public error value * because the consuming app can not reasonably take any action to resolve it. @@ -2374,10 +2369,7 @@ public struct FfiConverterTypeLoginsApiError: FfiConverterRustBuffer { case 11: return .Interrupted( reason: try FfiConverterString.read(from: &buf) ) - case 12: return .SyncAuthInvalid( - reason: try FfiConverterString.read(from: &buf) - ) - case 13: return .UnexpectedLoginsApiError( + case 12: return .UnexpectedLoginsApiError( reason: try FfiConverterString.read(from: &buf) ) @@ -2443,13 +2435,8 @@ public struct FfiConverterTypeLoginsApiError: FfiConverterRustBuffer { FfiConverterString.write(reason, into: &buf) - case let .SyncAuthInvalid(reason): - writeInt(&buf, Int32(12)) - FfiConverterString.write(reason, into: &buf) - - case let .UnexpectedLoginsApiError(reason): - writeInt(&buf, Int32(13)) + writeInt(&buf, Int32(12)) FfiConverterString.write(reason, into: &buf) } diff --git a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/places.swift b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/places.swift index d886e8e5d2ad..a9a607749da1 100644 --- a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/places.swift +++ b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/places.swift @@ -566,18 +566,10 @@ fileprivate struct FfiConverterString: FfiConverter { public protocol PlacesApiProtocol: AnyObject, Sendable { - func bookmarksReset() throws - - func bookmarksSync(keyId: String, accessToken: String, syncKey: String, tokenserverUrl: Url) throws -> String - - func historySync(keyId: String, accessToken: String, syncKey: String, tokenserverUrl: Url) throws -> String - func newConnection(connType: ConnectionType) throws -> PlacesConnection func registerWithSyncManager() - func resetHistory() throws - } open class PlacesApi: PlacesApiProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -632,37 +624,6 @@ open class PlacesApi: PlacesApiProtocol, @unchecked Sendable { -open func bookmarksReset()throws {try rustCallWithError(FfiConverterTypePlacesApiError_lift) { - uniffi_places_fn_method_placesapi_bookmarks_reset( - self.uniffiCloneHandle(),$0 - ) -} -} - -open func bookmarksSync(keyId: String, accessToken: String, syncKey: String, tokenserverUrl: Url)throws -> String { - return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypePlacesApiError_lift) { - uniffi_places_fn_method_placesapi_bookmarks_sync( - self.uniffiCloneHandle(), - FfiConverterString.lower(keyId), - FfiConverterString.lower(accessToken), - FfiConverterString.lower(syncKey), - FfiConverterTypeUrl_lower(tokenserverUrl),$0 - ) -}) -} - -open func historySync(keyId: String, accessToken: String, syncKey: String, tokenserverUrl: Url)throws -> String { - return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypePlacesApiError_lift) { - uniffi_places_fn_method_placesapi_history_sync( - self.uniffiCloneHandle(), - FfiConverterString.lower(keyId), - FfiConverterString.lower(accessToken), - FfiConverterString.lower(syncKey), - FfiConverterTypeUrl_lower(tokenserverUrl),$0 - ) -}) -} - open func newConnection(connType: ConnectionType)throws -> PlacesConnection { return try FfiConverterTypePlacesConnection_lift(try rustCallWithError(FfiConverterTypePlacesApiError_lift) { uniffi_places_fn_method_placesapi_new_connection( @@ -679,13 +640,6 @@ open func registerWithSyncManager() {try! rustCall() { } } -open func resetHistory()throws {try rustCallWithError(FfiConverterTypePlacesApiError_lift) { - uniffi_places_fn_method_placesapi_reset_history( - self.uniffiCloneHandle(),$0 - ) -} -} - } @@ -4481,24 +4435,12 @@ private let initializationResult: InitializationResult = { if (uniffi_places_checksum_func_places_api_new() != 61152) { return InitializationResult.apiChecksumMismatch } - if (uniffi_places_checksum_method_placesapi_bookmarks_reset() != 9496) { - return InitializationResult.apiChecksumMismatch - } - if (uniffi_places_checksum_method_placesapi_bookmarks_sync() != 10687) { - return InitializationResult.apiChecksumMismatch - } - if (uniffi_places_checksum_method_placesapi_history_sync() != 37447) { - return InitializationResult.apiChecksumMismatch - } if (uniffi_places_checksum_method_placesapi_new_connection() != 496) { return InitializationResult.apiChecksumMismatch } if (uniffi_places_checksum_method_placesapi_register_with_sync_manager() != 34707) { return InitializationResult.apiChecksumMismatch } - if (uniffi_places_checksum_method_placesapi_reset_history() != 11417) { - return InitializationResult.apiChecksumMismatch - } if (uniffi_places_checksum_method_placesconnection_accept_result() != 5027) { return InitializationResult.apiChecksumMismatch } diff --git a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/sync15.swift b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/sync15.swift index 5fa9151d3ef7..c713bdaa2d51 100644 --- a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/sync15.swift +++ b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/sync15.swift @@ -462,10 +462,28 @@ fileprivate struct FfiConverterString: FfiConverter { /** * Enumeration for the different types of device. * - * Firefox Accounts separates devices into broad categories for display purposes, - * such as distinguishing a desktop PC from a mobile phone. Upon signin, the - * application should inspect the device it is running on and select an appropriate + * Firefox Accounts and the broader Sync universe separates devices into broad categories for + * various purposes, such as distinguishing a desktop PC from a mobile phone. + * Upon signin, the application should inspect the device it is running on and select an appropriate * [`DeviceType`] to include in its device registration record. + * + * A special variant in this enum, [`DeviceType::Unknown`] is used to capture + * the string values we don't recognise. It also has a custom serde serializer and deserializer + * which implements the following semantics: + * * deserializing a `DeviceType` which uses a string value we don't recognise or null will return + * `DeviceType::Unknown` rather than returning an error. + * * serializing `DeviceType::Unknown` will serialize `null`. + * + * This has a few important implications: + * * In general, `Option` should be avoided, and a plain `DeviceType` used instead, + * because in that case, `None` would be semantically identical to `DeviceType::Unknown` and + * as mentioned above, `null` already deserializes as `DeviceType::Unknown`. + * * Any unknown device types can not be round-tripped via this enum - eg, if you deserialize + * a struct holding a `DeviceType` string value we don't recognize, then re-serialize it, the + * original string value is lost. We don't consider this a problem because in practice, we only + * upload records with *this* device's type, not the type of other devices, and it's reasonable + * to assume that this module knows about all valid device types for the device type it is + * deployed on. */ public enum DeviceType: Equatable, Hashable { From 70e0516b9af32c5fd33ce7a5692104b8d6fe1517 Mon Sep 17 00:00:00 2001 From: Firefox Sync Engineering Date: Thu, 9 Apr 2026 08:26:09 +0000 Subject: [PATCH 2/4] (Local AS flow) Nightly auto-update (151.0.20260409050312) --- MozillaRustComponents/Package.swift | 10 +-- .../Generated/Metrics/Metrics.swift | 2 +- .../Generated/ads_client.swift | 83 ++++++++++++++++++- .../Generated/Metrics/Metrics.swift | 2 +- .../Generated/ads_client.swift | 83 ++++++++++++++++++- 5 files changed, 165 insertions(+), 15 deletions(-) diff --git a/MozillaRustComponents/Package.swift b/MozillaRustComponents/Package.swift index 952e8a8339fd..9fac4a1c4821 100644 --- a/MozillaRustComponents/Package.swift +++ b/MozillaRustComponents/Package.swift @@ -1,13 +1,13 @@ // swift-tools-version: 5.10 import PackageDescription -let checksum = "e8bf5c2b6c588a6f2bb8599dfba4718901998318647080308520839c28ddeb4a" -let version = "151.0.20260408050141" -let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260408050141/artifacts/public/build/MozillaRustComponents.xcframework.zip" +let checksum = "a4f82d293ffec9c79d99ca089e14fbf65e592e23d92890c2dab2e867f693dbfa" +let version = "151.0.20260409050312" +let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260409050312/artifacts/public/build/MozillaRustComponents.xcframework.zip" // Focus xcframework -let focusChecksum = "e5509a7cdfe81ebfa278e7ae5cbc2a58c64f798c73e7f7008cd038433e6e45fd" -let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260408050141/artifacts/public/build/FocusRustComponents.xcframework.zip" +let focusChecksum = "3d9d7925152406677c5f1924ea5cbb06fdd7047078ca900e9bf5dcb6b68ce8c9" +let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260409050312/artifacts/public/build/FocusRustComponents.xcframework.zip" let package = Package( name: "MozillaRustComponentsSwift", diff --git a/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift b/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift index 034b945c2f54..9a4ea4692b71 100644 --- a/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift +++ b/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift @@ -23,7 +23,7 @@ extension GleanMetrics { // Intentionally left private, no external user can instantiate a new global object. } - public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 8, hour: 5, minute: 35, second: 43)) + public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 9, hour: 5, minute: 25, second: 26)) } enum NimbusEvents { diff --git a/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/ads_client.swift b/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/ads_client.swift index aff42ff64245..10d5fb75a163 100644 --- a/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/ads_client.swift +++ b/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/ads_client.swift @@ -538,7 +538,7 @@ public protocol MozAdsClientProtocol: AnyObject, Sendable { func recordImpression(impressionUrl: String) throws - func reportAd(reportUrl: String) throws + func reportAd(reportUrl: String, reason: MozAdsReportReason) throws func requestImageAds(mozAdRequests: [MozAdsPlacementRequest], options: MozAdsRequestOptions?) throws -> [String: MozAdsImage] @@ -623,10 +623,11 @@ open func recordImpression(impressionUrl: String)throws {try rustCallWithError } } -open func reportAd(reportUrl: String)throws {try rustCallWithError(FfiConverterTypeMozAdsClientApiError_lift) { +open func reportAd(reportUrl: String, reason: MozAdsReportReason)throws {try rustCallWithError(FfiConverterTypeMozAdsClientApiError_lift) { uniffi_ads_client_fn_method_mozadsclient_report_ad( self.uniffiCloneHandle(), - FfiConverterString.lower(reportUrl),$0 + FfiConverterString.lower(reportUrl), + FfiConverterTypeMozAdsReportReason_lower(reason),$0 ) } } @@ -2291,6 +2292,80 @@ public func FfiConverterTypeMozAdsIABContentTaxonomy_lower(_ value: MozAdsIabCon } +// Note that we don't yet support `indirect` for enums. +// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. + +public enum MozAdsReportReason: Equatable, Hashable { + + case inappropriate + case notInterested + case seenTooManyTimes + + + + + +} + +#if compiler(>=6) +extension MozAdsReportReason: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeMozAdsReportReason: FfiConverterRustBuffer { + typealias SwiftType = MozAdsReportReason + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsReportReason { + let variant: Int32 = try readInt(&buf) + switch variant { + + case 1: return .inappropriate + + case 2: return .notInterested + + case 3: return .seenTooManyTimes + + default: throw UniffiInternalError.unexpectedEnumCase + } + } + + public static func write(_ value: MozAdsReportReason, into buf: inout [UInt8]) { + switch value { + + + case .inappropriate: + writeInt(&buf, Int32(1)) + + + case .notInterested: + writeInt(&buf, Int32(2)) + + + case .seenTooManyTimes: + writeInt(&buf, Int32(3)) + + } + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeMozAdsReportReason_lift(_ buf: RustBuffer) throws -> MozAdsReportReason { + return try FfiConverterTypeMozAdsReportReason.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeMozAdsReportReason_lower(_ value: MozAdsReportReason) -> RustBuffer { + return FfiConverterTypeMozAdsReportReason.lower(value) +} + + #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -2707,7 +2782,7 @@ private let initializationResult: InitializationResult = { if (uniffi_ads_client_checksum_method_mozadsclient_record_impression() != 43275) { return InitializationResult.apiChecksumMismatch } - if (uniffi_ads_client_checksum_method_mozadsclient_report_ad() != 6019) { + if (uniffi_ads_client_checksum_method_mozadsclient_report_ad() != 18252) { return InitializationResult.apiChecksumMismatch } if (uniffi_ads_client_checksum_method_mozadsclient_request_image_ads() != 2157) { diff --git a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift index 24f388350053..0a5b0141ada8 100644 --- a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift +++ b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift @@ -23,7 +23,7 @@ extension GleanMetrics { // Intentionally left private, no external user can instantiate a new global object. } - public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 8, hour: 5, minute: 35, second: 40)) + public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 9, hour: 5, minute: 25, second: 24)) } enum AdsClient { diff --git a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/ads_client.swift b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/ads_client.swift index aff42ff64245..10d5fb75a163 100644 --- a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/ads_client.swift +++ b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/ads_client.swift @@ -538,7 +538,7 @@ public protocol MozAdsClientProtocol: AnyObject, Sendable { func recordImpression(impressionUrl: String) throws - func reportAd(reportUrl: String) throws + func reportAd(reportUrl: String, reason: MozAdsReportReason) throws func requestImageAds(mozAdRequests: [MozAdsPlacementRequest], options: MozAdsRequestOptions?) throws -> [String: MozAdsImage] @@ -623,10 +623,11 @@ open func recordImpression(impressionUrl: String)throws {try rustCallWithError } } -open func reportAd(reportUrl: String)throws {try rustCallWithError(FfiConverterTypeMozAdsClientApiError_lift) { +open func reportAd(reportUrl: String, reason: MozAdsReportReason)throws {try rustCallWithError(FfiConverterTypeMozAdsClientApiError_lift) { uniffi_ads_client_fn_method_mozadsclient_report_ad( self.uniffiCloneHandle(), - FfiConverterString.lower(reportUrl),$0 + FfiConverterString.lower(reportUrl), + FfiConverterTypeMozAdsReportReason_lower(reason),$0 ) } } @@ -2291,6 +2292,80 @@ public func FfiConverterTypeMozAdsIABContentTaxonomy_lower(_ value: MozAdsIabCon } +// Note that we don't yet support `indirect` for enums. +// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. + +public enum MozAdsReportReason: Equatable, Hashable { + + case inappropriate + case notInterested + case seenTooManyTimes + + + + + +} + +#if compiler(>=6) +extension MozAdsReportReason: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeMozAdsReportReason: FfiConverterRustBuffer { + typealias SwiftType = MozAdsReportReason + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsReportReason { + let variant: Int32 = try readInt(&buf) + switch variant { + + case 1: return .inappropriate + + case 2: return .notInterested + + case 3: return .seenTooManyTimes + + default: throw UniffiInternalError.unexpectedEnumCase + } + } + + public static func write(_ value: MozAdsReportReason, into buf: inout [UInt8]) { + switch value { + + + case .inappropriate: + writeInt(&buf, Int32(1)) + + + case .notInterested: + writeInt(&buf, Int32(2)) + + + case .seenTooManyTimes: + writeInt(&buf, Int32(3)) + + } + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeMozAdsReportReason_lift(_ buf: RustBuffer) throws -> MozAdsReportReason { + return try FfiConverterTypeMozAdsReportReason.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeMozAdsReportReason_lower(_ value: MozAdsReportReason) -> RustBuffer { + return FfiConverterTypeMozAdsReportReason.lower(value) +} + + #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -2707,7 +2782,7 @@ private let initializationResult: InitializationResult = { if (uniffi_ads_client_checksum_method_mozadsclient_record_impression() != 43275) { return InitializationResult.apiChecksumMismatch } - if (uniffi_ads_client_checksum_method_mozadsclient_report_ad() != 6019) { + if (uniffi_ads_client_checksum_method_mozadsclient_report_ad() != 18252) { return InitializationResult.apiChecksumMismatch } if (uniffi_ads_client_checksum_method_mozadsclient_request_image_ads() != 2157) { From 35808b806f407b28366d3b6ee649fab8330d6c4b Mon Sep 17 00:00:00 2001 From: Firefox Sync Engineering Date: Fri, 10 Apr 2026 08:26:38 +0000 Subject: [PATCH 3/4] (Local AS flow) Nightly auto-update (151.0.20260410050312) --- MozillaRustComponents/Package.swift | 10 +++++----- .../Generated/Metrics/Metrics.swift | 2 +- .../Generated/Metrics/Metrics.swift | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/MozillaRustComponents/Package.swift b/MozillaRustComponents/Package.swift index 9fac4a1c4821..54718a130420 100644 --- a/MozillaRustComponents/Package.swift +++ b/MozillaRustComponents/Package.swift @@ -1,13 +1,13 @@ // swift-tools-version: 5.10 import PackageDescription -let checksum = "a4f82d293ffec9c79d99ca089e14fbf65e592e23d92890c2dab2e867f693dbfa" -let version = "151.0.20260409050312" -let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260409050312/artifacts/public/build/MozillaRustComponents.xcframework.zip" +let checksum = "fee4b7f291cf2979110c38987d364da74a44e9ebd0fd8a5c8148a7ab7be33541" +let version = "151.0.20260410050312" +let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260410050312/artifacts/public/build/MozillaRustComponents.xcframework.zip" // Focus xcframework -let focusChecksum = "3d9d7925152406677c5f1924ea5cbb06fdd7047078ca900e9bf5dcb6b68ce8c9" -let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260409050312/artifacts/public/build/FocusRustComponents.xcframework.zip" +let focusChecksum = "37b96ccc5115faf3418c24817917b6645c8936a841b7958865a4088f451d6e6a" +let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260410050312/artifacts/public/build/FocusRustComponents.xcframework.zip" let package = Package( name: "MozillaRustComponentsSwift", diff --git a/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift b/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift index 9a4ea4692b71..2f9beaad9b80 100644 --- a/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift +++ b/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift @@ -23,7 +23,7 @@ extension GleanMetrics { // Intentionally left private, no external user can instantiate a new global object. } - public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 9, hour: 5, minute: 25, second: 26)) + public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 10, hour: 5, minute: 36, second: 29)) } enum NimbusEvents { diff --git a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift index 0a5b0141ada8..879f68a9633b 100644 --- a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift +++ b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift @@ -23,7 +23,7 @@ extension GleanMetrics { // Intentionally left private, no external user can instantiate a new global object. } - public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 9, hour: 5, minute: 25, second: 24)) + public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 10, hour: 5, minute: 36, second: 27)) } enum AdsClient { From c33aaed09f677e0d01ff8cfa62d7fb461ba4fe76 Mon Sep 17 00:00:00 2001 From: Firefox Sync Engineering Date: Sat, 11 Apr 2026 08:09:03 +0000 Subject: [PATCH 4/4] (Local AS flow) Nightly auto-update (151.0.20260411050228) --- MozillaRustComponents/Package.swift | 10 +- .../Generated/Metrics/Metrics.swift | 2 +- .../Generated/ads_client.swift | 200 +++++++++--------- .../Generated/Metrics/Metrics.swift | 2 +- .../Generated/ads_client.swift | 200 +++++++++--------- 5 files changed, 207 insertions(+), 207 deletions(-) diff --git a/MozillaRustComponents/Package.swift b/MozillaRustComponents/Package.swift index 54718a130420..a613e8953cdd 100644 --- a/MozillaRustComponents/Package.swift +++ b/MozillaRustComponents/Package.swift @@ -1,13 +1,13 @@ // swift-tools-version: 5.10 import PackageDescription -let checksum = "fee4b7f291cf2979110c38987d364da74a44e9ebd0fd8a5c8148a7ab7be33541" -let version = "151.0.20260410050312" -let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260410050312/artifacts/public/build/MozillaRustComponents.xcframework.zip" +let checksum = "e885fb0ea485412703bb73fd0fb32200aef1322d5f23cb5cf2af04678b5f8c27" +let version = "151.0.20260411050228" +let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260411050228/artifacts/public/build/MozillaRustComponents.xcframework.zip" // Focus xcframework -let focusChecksum = "37b96ccc5115faf3418c24817917b6645c8936a841b7958865a4088f451d6e6a" -let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260410050312/artifacts/public/build/FocusRustComponents.xcframework.zip" +let focusChecksum = "4d935fe0e304e24f8b81757388e51c7c9e78a655a3efd3725023b0d369602f45" +let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.151.20260411050228/artifacts/public/build/FocusRustComponents.xcframework.zip" let package = Package( name: "MozillaRustComponentsSwift", diff --git a/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift b/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift index 2f9beaad9b80..9eae3cc27564 100644 --- a/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift +++ b/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/Metrics/Metrics.swift @@ -23,7 +23,7 @@ extension GleanMetrics { // Intentionally left private, no external user can instantiate a new global object. } - public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 10, hour: 5, minute: 36, second: 29)) + public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 11, hour: 5, minute: 24, second: 17)) } enum NimbusEvents { diff --git a/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/ads_client.swift b/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/ads_client.swift index 10d5fb75a163..7f6558c5879e 100644 --- a/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/ads_client.swift +++ b/MozillaRustComponents/Sources/FocusRustComponentsWrapper/Generated/ads_client.swift @@ -1218,7 +1218,7 @@ public struct MozAdsCacheConfig: Equatable, Hashable { // Default memberwise initializers are never public by default, so we // declare one manually. - public init(dbPath: String, defaultCacheTtlSeconds: UInt64?, maxSizeMib: UInt64?) { + public init(dbPath: String, defaultCacheTtlSeconds: UInt64? = nil, maxSizeMib: UInt64? = nil) { self.dbPath = dbPath self.defaultCacheTtlSeconds = defaultCacheTtlSeconds self.maxSizeMib = maxSizeMib @@ -1269,6 +1269,60 @@ public func FfiConverterTypeMozAdsCacheConfig_lower(_ value: MozAdsCacheConfig) } +public struct MozAdsCachePolicy: Equatable, Hashable { + public var mode: MozAdsCacheMode + public var ttlSeconds: UInt64? + + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init(mode: MozAdsCacheMode, ttlSeconds: UInt64? = nil) { + self.mode = mode + self.ttlSeconds = ttlSeconds + } + + + + +} + +#if compiler(>=6) +extension MozAdsCachePolicy: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeMozAdsCachePolicy: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsCachePolicy { + return + try MozAdsCachePolicy( + mode: FfiConverterTypeMozAdsCacheMode.read(from: &buf), + ttlSeconds: FfiConverterOptionUInt64.read(from: &buf) + ) + } + + public static func write(_ value: MozAdsCachePolicy, into buf: inout [UInt8]) { + FfiConverterTypeMozAdsCacheMode.write(value.mode, into: &buf) + FfiConverterOptionUInt64.write(value.ttlSeconds, into: &buf) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeMozAdsCachePolicy_lift(_ buf: RustBuffer) throws -> MozAdsCachePolicy { + return try FfiConverterTypeMozAdsCachePolicy.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeMozAdsCachePolicy_lower(_ value: MozAdsCachePolicy) -> RustBuffer { + return FfiConverterTypeMozAdsCachePolicy.lower(value) +} + + public struct MozAdsCallbacks: Equatable, Hashable { public var click: AdsClientUrl public var impression: AdsClientUrl @@ -1328,14 +1382,14 @@ public func FfiConverterTypeMozAdsCallbacks_lower(_ value: MozAdsCallbacks) -> R public struct MozAdsContentCategory: Equatable, Hashable { - public var taxonomy: MozAdsIabContentTaxonomy public var categories: [String] + public var taxonomy: MozAdsIabContentTaxonomy // Default memberwise initializers are never public by default, so we // declare one manually. - public init(taxonomy: MozAdsIabContentTaxonomy, categories: [String]) { - self.taxonomy = taxonomy + public init(categories: [String], taxonomy: MozAdsIabContentTaxonomy) { self.categories = categories + self.taxonomy = taxonomy } @@ -1354,14 +1408,14 @@ public struct FfiConverterTypeMozAdsContentCategory: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsContentCategory { return try MozAdsContentCategory( - taxonomy: FfiConverterTypeMozAdsIABContentTaxonomy.read(from: &buf), - categories: FfiConverterSequenceString.read(from: &buf) + categories: FfiConverterSequenceString.read(from: &buf), + taxonomy: FfiConverterTypeMozAdsIABContentTaxonomy.read(from: &buf) ) } public static func write(_ value: MozAdsContentCategory, into buf: inout [UInt8]) { - FfiConverterTypeMozAdsIABContentTaxonomy.write(value.taxonomy, into: &buf) FfiConverterSequenceString.write(value.categories, into: &buf) + FfiConverterTypeMozAdsIABContentTaxonomy.write(value.taxonomy, into: &buf) } } @@ -1382,14 +1436,14 @@ public func FfiConverterTypeMozAdsContentCategory_lower(_ value: MozAdsContentCa public struct MozAdsIabContent: Equatable, Hashable { - public var taxonomy: MozAdsIabContentTaxonomy public var categoryIds: [String] + public var taxonomy: MozAdsIabContentTaxonomy // Default memberwise initializers are never public by default, so we // declare one manually. - public init(taxonomy: MozAdsIabContentTaxonomy, categoryIds: [String]) { - self.taxonomy = taxonomy + public init(categoryIds: [String], taxonomy: MozAdsIabContentTaxonomy) { self.categoryIds = categoryIds + self.taxonomy = taxonomy } @@ -1408,14 +1462,14 @@ public struct FfiConverterTypeMozAdsIABContent: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsIabContent { return try MozAdsIabContent( - taxonomy: FfiConverterTypeMozAdsIABContentTaxonomy.read(from: &buf), - categoryIds: FfiConverterSequenceString.read(from: &buf) + categoryIds: FfiConverterSequenceString.read(from: &buf), + taxonomy: FfiConverterTypeMozAdsIABContentTaxonomy.read(from: &buf) ) } public static func write(_ value: MozAdsIabContent, into buf: inout [UInt8]) { - FfiConverterTypeMozAdsIABContentTaxonomy.write(value.taxonomy, into: &buf) FfiConverterSequenceString.write(value.categoryIds, into: &buf) + FfiConverterTypeMozAdsIABContentTaxonomy.write(value.taxonomy, into: &buf) } } @@ -1506,14 +1560,14 @@ public func FfiConverterTypeMozAdsImage_lower(_ value: MozAdsImage) -> RustBuffe public struct MozAdsPlacementRequest: Equatable, Hashable { - public var placementId: String public var iabContent: MozAdsIabContent? + public var placementId: String // Default memberwise initializers are never public by default, so we // declare one manually. - public init(placementId: String, iabContent: MozAdsIabContent?) { - self.placementId = placementId + public init(iabContent: MozAdsIabContent? = nil, placementId: String) { self.iabContent = iabContent + self.placementId = placementId } @@ -1532,14 +1586,14 @@ public struct FfiConverterTypeMozAdsPlacementRequest: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsPlacementRequest { return try MozAdsPlacementRequest( - placementId: FfiConverterString.read(from: &buf), - iabContent: FfiConverterOptionTypeMozAdsIABContent.read(from: &buf) + iabContent: FfiConverterOptionTypeMozAdsIABContent.read(from: &buf), + placementId: FfiConverterString.read(from: &buf) ) } public static func write(_ value: MozAdsPlacementRequest, into buf: inout [UInt8]) { - FfiConverterString.write(value.placementId, into: &buf) FfiConverterOptionTypeMozAdsIABContent.write(value.iabContent, into: &buf) + FfiConverterString.write(value.placementId, into: &buf) } } @@ -1561,15 +1615,15 @@ public func FfiConverterTypeMozAdsPlacementRequest_lower(_ value: MozAdsPlacemen public struct MozAdsPlacementRequestWithCount: Equatable, Hashable { public var count: UInt32 - public var placementId: String public var iabContent: MozAdsIabContent? + public var placementId: String // Default memberwise initializers are never public by default, so we // declare one manually. - public init(count: UInt32, placementId: String, iabContent: MozAdsIabContent?) { + public init(count: UInt32, iabContent: MozAdsIabContent? = nil, placementId: String) { self.count = count - self.placementId = placementId self.iabContent = iabContent + self.placementId = placementId } @@ -1589,15 +1643,15 @@ public struct FfiConverterTypeMozAdsPlacementRequestWithCount: FfiConverterRustB return try MozAdsPlacementRequestWithCount( count: FfiConverterUInt32.read(from: &buf), - placementId: FfiConverterString.read(from: &buf), - iabContent: FfiConverterOptionTypeMozAdsIABContent.read(from: &buf) + iabContent: FfiConverterOptionTypeMozAdsIABContent.read(from: &buf), + placementId: FfiConverterString.read(from: &buf) ) } public static func write(_ value: MozAdsPlacementRequestWithCount, into buf: inout [UInt8]) { FfiConverterUInt32.write(value.count, into: &buf) - FfiConverterString.write(value.placementId, into: &buf) FfiConverterOptionTypeMozAdsIABContent.write(value.iabContent, into: &buf) + FfiConverterString.write(value.placementId, into: &buf) } } @@ -1617,66 +1671,12 @@ public func FfiConverterTypeMozAdsPlacementRequestWithCount_lower(_ value: MozAd } -public struct MozAdsRequestCachePolicy: Equatable, Hashable { - public var mode: MozAdsCacheMode - public var ttlSeconds: UInt64? - - // Default memberwise initializers are never public by default, so we - // declare one manually. - public init(mode: MozAdsCacheMode, ttlSeconds: UInt64?) { - self.mode = mode - self.ttlSeconds = ttlSeconds - } - - - - -} - -#if compiler(>=6) -extension MozAdsRequestCachePolicy: Sendable {} -#endif - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public struct FfiConverterTypeMozAdsRequestCachePolicy: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsRequestCachePolicy { - return - try MozAdsRequestCachePolicy( - mode: FfiConverterTypeMozAdsCacheMode.read(from: &buf), - ttlSeconds: FfiConverterOptionUInt64.read(from: &buf) - ) - } - - public static func write(_ value: MozAdsRequestCachePolicy, into buf: inout [UInt8]) { - FfiConverterTypeMozAdsCacheMode.write(value.mode, into: &buf) - FfiConverterOptionUInt64.write(value.ttlSeconds, into: &buf) - } -} - - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeMozAdsRequestCachePolicy_lift(_ buf: RustBuffer) throws -> MozAdsRequestCachePolicy { - return try FfiConverterTypeMozAdsRequestCachePolicy.lift(buf) -} - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeMozAdsRequestCachePolicy_lower(_ value: MozAdsRequestCachePolicy) -> RustBuffer { - return FfiConverterTypeMozAdsRequestCachePolicy.lower(value) -} - - public struct MozAdsRequestOptions: Equatable, Hashable { - public var cachePolicy: MozAdsRequestCachePolicy? + public var cachePolicy: MozAdsCachePolicy? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(cachePolicy: MozAdsRequestCachePolicy?) { + public init(cachePolicy: MozAdsCachePolicy?) { self.cachePolicy = cachePolicy } @@ -1696,12 +1696,12 @@ public struct FfiConverterTypeMozAdsRequestOptions: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsRequestOptions { return try MozAdsRequestOptions( - cachePolicy: FfiConverterOptionTypeMozAdsRequestCachePolicy.read(from: &buf) + cachePolicy: FfiConverterOptionTypeMozAdsCachePolicy.read(from: &buf) ) } public static func write(_ value: MozAdsRequestOptions, into buf: inout [UInt8]) { - FfiConverterOptionTypeMozAdsRequestCachePolicy.write(value.cachePolicy, into: &buf) + FfiConverterOptionTypeMozAdsCachePolicy.write(value.cachePolicy, into: &buf) } } @@ -1870,16 +1870,16 @@ public func FfiConverterTypeMozAdsSpocFrequencyCaps_lower(_ value: MozAdsSpocFre public struct MozAdsSpocRanking: Equatable, Hashable { - public var priority: UInt32 - public var personalizationModels: [String: UInt32] public var itemScore: Double + public var personalizationModels: [String: UInt32] + public var priority: UInt32 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(priority: UInt32, personalizationModels: [String: UInt32], itemScore: Double) { - self.priority = priority - self.personalizationModels = personalizationModels + public init(itemScore: Double, personalizationModels: [String: UInt32], priority: UInt32) { self.itemScore = itemScore + self.personalizationModels = personalizationModels + self.priority = priority } @@ -1898,16 +1898,16 @@ public struct FfiConverterTypeMozAdsSpocRanking: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsSpocRanking { return try MozAdsSpocRanking( - priority: FfiConverterUInt32.read(from: &buf), + itemScore: FfiConverterDouble.read(from: &buf), personalizationModels: FfiConverterDictionaryStringUInt32.read(from: &buf), - itemScore: FfiConverterDouble.read(from: &buf) + priority: FfiConverterUInt32.read(from: &buf) ) } public static func write(_ value: MozAdsSpocRanking, into buf: inout [UInt8]) { - FfiConverterUInt32.write(value.priority, into: &buf) - FfiConverterDictionaryStringUInt32.write(value.personalizationModels, into: &buf) FfiConverterDouble.write(value.itemScore, into: &buf) + FfiConverterDictionaryStringUInt32.write(value.personalizationModels, into: &buf) + FfiConverterUInt32.write(value.priority, into: &buf) } } @@ -2417,8 +2417,8 @@ fileprivate struct FfiConverterOptionString: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -fileprivate struct FfiConverterOptionTypeMozAdsIABContent: FfiConverterRustBuffer { - typealias SwiftType = MozAdsIabContent? +fileprivate struct FfiConverterOptionTypeMozAdsCachePolicy: FfiConverterRustBuffer { + typealias SwiftType = MozAdsCachePolicy? public static func write(_ value: SwiftType, into buf: inout [UInt8]) { guard let value = value else { @@ -2426,13 +2426,13 @@ fileprivate struct FfiConverterOptionTypeMozAdsIABContent: FfiConverterRustBuffe return } writeInt(&buf, Int8(1)) - FfiConverterTypeMozAdsIABContent.write(value, into: &buf) + FfiConverterTypeMozAdsCachePolicy.write(value, into: &buf) } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { switch try readInt(&buf) as Int8 { case 0: return nil - case 1: return try FfiConverterTypeMozAdsIABContent.read(from: &buf) + case 1: return try FfiConverterTypeMozAdsCachePolicy.read(from: &buf) default: throw UniffiInternalError.unexpectedOptionalTag } } @@ -2441,8 +2441,8 @@ fileprivate struct FfiConverterOptionTypeMozAdsIABContent: FfiConverterRustBuffe #if swift(>=5.8) @_documentation(visibility: private) #endif -fileprivate struct FfiConverterOptionTypeMozAdsRequestCachePolicy: FfiConverterRustBuffer { - typealias SwiftType = MozAdsRequestCachePolicy? +fileprivate struct FfiConverterOptionTypeMozAdsIABContent: FfiConverterRustBuffer { + typealias SwiftType = MozAdsIabContent? public static func write(_ value: SwiftType, into buf: inout [UInt8]) { guard let value = value else { @@ -2450,13 +2450,13 @@ fileprivate struct FfiConverterOptionTypeMozAdsRequestCachePolicy: FfiConverterR return } writeInt(&buf, Int8(1)) - FfiConverterTypeMozAdsRequestCachePolicy.write(value, into: &buf) + FfiConverterTypeMozAdsIABContent.write(value, into: &buf) } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { switch try readInt(&buf) as Int8 { case 0: return nil - case 1: return try FfiConverterTypeMozAdsRequestCachePolicy.read(from: &buf) + case 1: return try FfiConverterTypeMozAdsIABContent.read(from: &buf) default: throw UniffiInternalError.unexpectedOptionalTag } } diff --git a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift index 879f68a9633b..ad5273e47cd8 100644 --- a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift +++ b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/Metrics/Metrics.swift @@ -23,7 +23,7 @@ extension GleanMetrics { // Intentionally left private, no external user can instantiate a new global object. } - public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 10, hour: 5, minute: 36, second: 27)) + public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2026, month: 4, day: 11, hour: 5, minute: 24, second: 14)) } enum AdsClient { diff --git a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/ads_client.swift b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/ads_client.swift index 10d5fb75a163..7f6558c5879e 100644 --- a/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/ads_client.swift +++ b/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/ads_client.swift @@ -1218,7 +1218,7 @@ public struct MozAdsCacheConfig: Equatable, Hashable { // Default memberwise initializers are never public by default, so we // declare one manually. - public init(dbPath: String, defaultCacheTtlSeconds: UInt64?, maxSizeMib: UInt64?) { + public init(dbPath: String, defaultCacheTtlSeconds: UInt64? = nil, maxSizeMib: UInt64? = nil) { self.dbPath = dbPath self.defaultCacheTtlSeconds = defaultCacheTtlSeconds self.maxSizeMib = maxSizeMib @@ -1269,6 +1269,60 @@ public func FfiConverterTypeMozAdsCacheConfig_lower(_ value: MozAdsCacheConfig) } +public struct MozAdsCachePolicy: Equatable, Hashable { + public var mode: MozAdsCacheMode + public var ttlSeconds: UInt64? + + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init(mode: MozAdsCacheMode, ttlSeconds: UInt64? = nil) { + self.mode = mode + self.ttlSeconds = ttlSeconds + } + + + + +} + +#if compiler(>=6) +extension MozAdsCachePolicy: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeMozAdsCachePolicy: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsCachePolicy { + return + try MozAdsCachePolicy( + mode: FfiConverterTypeMozAdsCacheMode.read(from: &buf), + ttlSeconds: FfiConverterOptionUInt64.read(from: &buf) + ) + } + + public static func write(_ value: MozAdsCachePolicy, into buf: inout [UInt8]) { + FfiConverterTypeMozAdsCacheMode.write(value.mode, into: &buf) + FfiConverterOptionUInt64.write(value.ttlSeconds, into: &buf) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeMozAdsCachePolicy_lift(_ buf: RustBuffer) throws -> MozAdsCachePolicy { + return try FfiConverterTypeMozAdsCachePolicy.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeMozAdsCachePolicy_lower(_ value: MozAdsCachePolicy) -> RustBuffer { + return FfiConverterTypeMozAdsCachePolicy.lower(value) +} + + public struct MozAdsCallbacks: Equatable, Hashable { public var click: AdsClientUrl public var impression: AdsClientUrl @@ -1328,14 +1382,14 @@ public func FfiConverterTypeMozAdsCallbacks_lower(_ value: MozAdsCallbacks) -> R public struct MozAdsContentCategory: Equatable, Hashable { - public var taxonomy: MozAdsIabContentTaxonomy public var categories: [String] + public var taxonomy: MozAdsIabContentTaxonomy // Default memberwise initializers are never public by default, so we // declare one manually. - public init(taxonomy: MozAdsIabContentTaxonomy, categories: [String]) { - self.taxonomy = taxonomy + public init(categories: [String], taxonomy: MozAdsIabContentTaxonomy) { self.categories = categories + self.taxonomy = taxonomy } @@ -1354,14 +1408,14 @@ public struct FfiConverterTypeMozAdsContentCategory: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsContentCategory { return try MozAdsContentCategory( - taxonomy: FfiConverterTypeMozAdsIABContentTaxonomy.read(from: &buf), - categories: FfiConverterSequenceString.read(from: &buf) + categories: FfiConverterSequenceString.read(from: &buf), + taxonomy: FfiConverterTypeMozAdsIABContentTaxonomy.read(from: &buf) ) } public static func write(_ value: MozAdsContentCategory, into buf: inout [UInt8]) { - FfiConverterTypeMozAdsIABContentTaxonomy.write(value.taxonomy, into: &buf) FfiConverterSequenceString.write(value.categories, into: &buf) + FfiConverterTypeMozAdsIABContentTaxonomy.write(value.taxonomy, into: &buf) } } @@ -1382,14 +1436,14 @@ public func FfiConverterTypeMozAdsContentCategory_lower(_ value: MozAdsContentCa public struct MozAdsIabContent: Equatable, Hashable { - public var taxonomy: MozAdsIabContentTaxonomy public var categoryIds: [String] + public var taxonomy: MozAdsIabContentTaxonomy // Default memberwise initializers are never public by default, so we // declare one manually. - public init(taxonomy: MozAdsIabContentTaxonomy, categoryIds: [String]) { - self.taxonomy = taxonomy + public init(categoryIds: [String], taxonomy: MozAdsIabContentTaxonomy) { self.categoryIds = categoryIds + self.taxonomy = taxonomy } @@ -1408,14 +1462,14 @@ public struct FfiConverterTypeMozAdsIABContent: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsIabContent { return try MozAdsIabContent( - taxonomy: FfiConverterTypeMozAdsIABContentTaxonomy.read(from: &buf), - categoryIds: FfiConverterSequenceString.read(from: &buf) + categoryIds: FfiConverterSequenceString.read(from: &buf), + taxonomy: FfiConverterTypeMozAdsIABContentTaxonomy.read(from: &buf) ) } public static func write(_ value: MozAdsIabContent, into buf: inout [UInt8]) { - FfiConverterTypeMozAdsIABContentTaxonomy.write(value.taxonomy, into: &buf) FfiConverterSequenceString.write(value.categoryIds, into: &buf) + FfiConverterTypeMozAdsIABContentTaxonomy.write(value.taxonomy, into: &buf) } } @@ -1506,14 +1560,14 @@ public func FfiConverterTypeMozAdsImage_lower(_ value: MozAdsImage) -> RustBuffe public struct MozAdsPlacementRequest: Equatable, Hashable { - public var placementId: String public var iabContent: MozAdsIabContent? + public var placementId: String // Default memberwise initializers are never public by default, so we // declare one manually. - public init(placementId: String, iabContent: MozAdsIabContent?) { - self.placementId = placementId + public init(iabContent: MozAdsIabContent? = nil, placementId: String) { self.iabContent = iabContent + self.placementId = placementId } @@ -1532,14 +1586,14 @@ public struct FfiConverterTypeMozAdsPlacementRequest: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsPlacementRequest { return try MozAdsPlacementRequest( - placementId: FfiConverterString.read(from: &buf), - iabContent: FfiConverterOptionTypeMozAdsIABContent.read(from: &buf) + iabContent: FfiConverterOptionTypeMozAdsIABContent.read(from: &buf), + placementId: FfiConverterString.read(from: &buf) ) } public static func write(_ value: MozAdsPlacementRequest, into buf: inout [UInt8]) { - FfiConverterString.write(value.placementId, into: &buf) FfiConverterOptionTypeMozAdsIABContent.write(value.iabContent, into: &buf) + FfiConverterString.write(value.placementId, into: &buf) } } @@ -1561,15 +1615,15 @@ public func FfiConverterTypeMozAdsPlacementRequest_lower(_ value: MozAdsPlacemen public struct MozAdsPlacementRequestWithCount: Equatable, Hashable { public var count: UInt32 - public var placementId: String public var iabContent: MozAdsIabContent? + public var placementId: String // Default memberwise initializers are never public by default, so we // declare one manually. - public init(count: UInt32, placementId: String, iabContent: MozAdsIabContent?) { + public init(count: UInt32, iabContent: MozAdsIabContent? = nil, placementId: String) { self.count = count - self.placementId = placementId self.iabContent = iabContent + self.placementId = placementId } @@ -1589,15 +1643,15 @@ public struct FfiConverterTypeMozAdsPlacementRequestWithCount: FfiConverterRustB return try MozAdsPlacementRequestWithCount( count: FfiConverterUInt32.read(from: &buf), - placementId: FfiConverterString.read(from: &buf), - iabContent: FfiConverterOptionTypeMozAdsIABContent.read(from: &buf) + iabContent: FfiConverterOptionTypeMozAdsIABContent.read(from: &buf), + placementId: FfiConverterString.read(from: &buf) ) } public static func write(_ value: MozAdsPlacementRequestWithCount, into buf: inout [UInt8]) { FfiConverterUInt32.write(value.count, into: &buf) - FfiConverterString.write(value.placementId, into: &buf) FfiConverterOptionTypeMozAdsIABContent.write(value.iabContent, into: &buf) + FfiConverterString.write(value.placementId, into: &buf) } } @@ -1617,66 +1671,12 @@ public func FfiConverterTypeMozAdsPlacementRequestWithCount_lower(_ value: MozAd } -public struct MozAdsRequestCachePolicy: Equatable, Hashable { - public var mode: MozAdsCacheMode - public var ttlSeconds: UInt64? - - // Default memberwise initializers are never public by default, so we - // declare one manually. - public init(mode: MozAdsCacheMode, ttlSeconds: UInt64?) { - self.mode = mode - self.ttlSeconds = ttlSeconds - } - - - - -} - -#if compiler(>=6) -extension MozAdsRequestCachePolicy: Sendable {} -#endif - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public struct FfiConverterTypeMozAdsRequestCachePolicy: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsRequestCachePolicy { - return - try MozAdsRequestCachePolicy( - mode: FfiConverterTypeMozAdsCacheMode.read(from: &buf), - ttlSeconds: FfiConverterOptionUInt64.read(from: &buf) - ) - } - - public static func write(_ value: MozAdsRequestCachePolicy, into buf: inout [UInt8]) { - FfiConverterTypeMozAdsCacheMode.write(value.mode, into: &buf) - FfiConverterOptionUInt64.write(value.ttlSeconds, into: &buf) - } -} - - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeMozAdsRequestCachePolicy_lift(_ buf: RustBuffer) throws -> MozAdsRequestCachePolicy { - return try FfiConverterTypeMozAdsRequestCachePolicy.lift(buf) -} - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeMozAdsRequestCachePolicy_lower(_ value: MozAdsRequestCachePolicy) -> RustBuffer { - return FfiConverterTypeMozAdsRequestCachePolicy.lower(value) -} - - public struct MozAdsRequestOptions: Equatable, Hashable { - public var cachePolicy: MozAdsRequestCachePolicy? + public var cachePolicy: MozAdsCachePolicy? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(cachePolicy: MozAdsRequestCachePolicy?) { + public init(cachePolicy: MozAdsCachePolicy?) { self.cachePolicy = cachePolicy } @@ -1696,12 +1696,12 @@ public struct FfiConverterTypeMozAdsRequestOptions: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsRequestOptions { return try MozAdsRequestOptions( - cachePolicy: FfiConverterOptionTypeMozAdsRequestCachePolicy.read(from: &buf) + cachePolicy: FfiConverterOptionTypeMozAdsCachePolicy.read(from: &buf) ) } public static func write(_ value: MozAdsRequestOptions, into buf: inout [UInt8]) { - FfiConverterOptionTypeMozAdsRequestCachePolicy.write(value.cachePolicy, into: &buf) + FfiConverterOptionTypeMozAdsCachePolicy.write(value.cachePolicy, into: &buf) } } @@ -1870,16 +1870,16 @@ public func FfiConverterTypeMozAdsSpocFrequencyCaps_lower(_ value: MozAdsSpocFre public struct MozAdsSpocRanking: Equatable, Hashable { - public var priority: UInt32 - public var personalizationModels: [String: UInt32] public var itemScore: Double + public var personalizationModels: [String: UInt32] + public var priority: UInt32 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(priority: UInt32, personalizationModels: [String: UInt32], itemScore: Double) { - self.priority = priority - self.personalizationModels = personalizationModels + public init(itemScore: Double, personalizationModels: [String: UInt32], priority: UInt32) { self.itemScore = itemScore + self.personalizationModels = personalizationModels + self.priority = priority } @@ -1898,16 +1898,16 @@ public struct FfiConverterTypeMozAdsSpocRanking: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MozAdsSpocRanking { return try MozAdsSpocRanking( - priority: FfiConverterUInt32.read(from: &buf), + itemScore: FfiConverterDouble.read(from: &buf), personalizationModels: FfiConverterDictionaryStringUInt32.read(from: &buf), - itemScore: FfiConverterDouble.read(from: &buf) + priority: FfiConverterUInt32.read(from: &buf) ) } public static func write(_ value: MozAdsSpocRanking, into buf: inout [UInt8]) { - FfiConverterUInt32.write(value.priority, into: &buf) - FfiConverterDictionaryStringUInt32.write(value.personalizationModels, into: &buf) FfiConverterDouble.write(value.itemScore, into: &buf) + FfiConverterDictionaryStringUInt32.write(value.personalizationModels, into: &buf) + FfiConverterUInt32.write(value.priority, into: &buf) } } @@ -2417,8 +2417,8 @@ fileprivate struct FfiConverterOptionString: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -fileprivate struct FfiConverterOptionTypeMozAdsIABContent: FfiConverterRustBuffer { - typealias SwiftType = MozAdsIabContent? +fileprivate struct FfiConverterOptionTypeMozAdsCachePolicy: FfiConverterRustBuffer { + typealias SwiftType = MozAdsCachePolicy? public static func write(_ value: SwiftType, into buf: inout [UInt8]) { guard let value = value else { @@ -2426,13 +2426,13 @@ fileprivate struct FfiConverterOptionTypeMozAdsIABContent: FfiConverterRustBuffe return } writeInt(&buf, Int8(1)) - FfiConverterTypeMozAdsIABContent.write(value, into: &buf) + FfiConverterTypeMozAdsCachePolicy.write(value, into: &buf) } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { switch try readInt(&buf) as Int8 { case 0: return nil - case 1: return try FfiConverterTypeMozAdsIABContent.read(from: &buf) + case 1: return try FfiConverterTypeMozAdsCachePolicy.read(from: &buf) default: throw UniffiInternalError.unexpectedOptionalTag } } @@ -2441,8 +2441,8 @@ fileprivate struct FfiConverterOptionTypeMozAdsIABContent: FfiConverterRustBuffe #if swift(>=5.8) @_documentation(visibility: private) #endif -fileprivate struct FfiConverterOptionTypeMozAdsRequestCachePolicy: FfiConverterRustBuffer { - typealias SwiftType = MozAdsRequestCachePolicy? +fileprivate struct FfiConverterOptionTypeMozAdsIABContent: FfiConverterRustBuffer { + typealias SwiftType = MozAdsIabContent? public static func write(_ value: SwiftType, into buf: inout [UInt8]) { guard let value = value else { @@ -2450,13 +2450,13 @@ fileprivate struct FfiConverterOptionTypeMozAdsRequestCachePolicy: FfiConverterR return } writeInt(&buf, Int8(1)) - FfiConverterTypeMozAdsRequestCachePolicy.write(value, into: &buf) + FfiConverterTypeMozAdsIABContent.write(value, into: &buf) } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { switch try readInt(&buf) as Int8 { case 0: return nil - case 1: return try FfiConverterTypeMozAdsRequestCachePolicy.read(from: &buf) + case 1: return try FfiConverterTypeMozAdsIABContent.read(from: &buf) default: throw UniffiInternalError.unexpectedOptionalTag } }