Skip to content

Commit

Permalink
fix apnpush type used before init
Browse files Browse the repository at this point in the history
  • Loading branch information
Garma00 committed Jun 19, 2024
1 parent c35afc5 commit f2ba055
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions utils/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ export const INotificationTemplate = t.interface({

export type INotificationTemplate = t.TypeOf<typeof INotificationTemplate>;

/**
* APNS apns-push-type available values
*
* @see https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns
*/
export enum APNSPushType {
ALERT = "alert",
BACKGROUND = "background",
VOIP = "voip",
COMPLICATION = "complication",
FILEPROVIDER = "fileprovider",
MDM = "mdm"
}

const createNotification = (body: NotifyMessagePayload) => (
platform: Platform
): TE.TaskEither<
Expand Down Expand Up @@ -145,20 +159,6 @@ const createNotification = (body: NotifyMessagePayload) => (
}
};

/**
* APNS apns-push-type available values
*
* @see https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns
*/
export enum APNSPushType {
ALERT = "alert",
BACKGROUND = "background",
VOIP = "voip",
COMPLICATION = "complication",
FILEPROVIDER = "fileprovider",
MDM = "mdm"
}

export const nhResultSuccess = t.interface({
kind: t.literal("SUCCESS")
});
Expand Down

0 comments on commit f2ba055

Please sign in to comment.