diff --git a/Sources/Spezi/Notifications/RegisterRemoteNotificationsAction.swift b/Sources/Spezi/Notifications/Spezi+RegisterRemoteNotificationsAction.swift similarity index 100% rename from Sources/Spezi/Notifications/RegisterRemoteNotificationsAction.swift rename to Sources/Spezi/Notifications/Spezi+RegisterRemoteNotificationsAction.swift diff --git a/Sources/Spezi/Notifications/Spezi+RequestNotificationAuthorization.swift b/Sources/Spezi/Notifications/Spezi+RequestNotificationAuthorization.swift deleted file mode 100644 index 273f298..0000000 --- a/Sources/Spezi/Notifications/Spezi+RequestNotificationAuthorization.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// This source file is part of the Stanford Spezi open-source project -// -// SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md) -// -// SPDX-License-Identifier: MIT -// - -import UserNotifications - - -extension Spezi { - /// An action to request notification authorization. - /// - /// Refer to ``Spezi/requestNotificationAuthorization`` for documentation. - public struct RequestNotificationAuthorizationAction { - /// Request notification authorization. - /// - Parameter options: The authorization options your app is requesting. - public func callAsFunction(options: UNAuthorizationOptions) async throws { - try await UNUserNotificationCenter.current().requestAuthorization(options: options) - } - } - - /// Request notification authorization. - /// - /// ```swift - /// struct MyModule: Module { - /// @Application(\.requestNotificationAuthorization) - /// private var requestNotificationAuthorization - /// - /// func notificationPermissionWhileOnboarding() async throws -> Bool { - /// try await requestNotificationAuthorization(options: [.alert, .badge, .sound]) - /// } - /// } - /// ``` - /// - /// ## Topics - /// ### Action - /// - ``RequestNotificationAuthorizationAction`` - public var requestNotificationAuthorization: RequestNotificationAuthorizationAction { - RequestNotificationAuthorizationAction() - } -} - - -extension Spezi.RequestNotificationAuthorizationAction: Sendable {}