Skip to content

0.74 changes #815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 100 additions & 20 deletions src/apis/PushNotificationIOS.res
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,32 @@ external localNotification: (
unit,
) => localNotification = ""

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external presentLocalNotification: localNotification => unit = "presentLocalNotification"

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external scheduleLocalNotification: localNotification => unit = "scheduleLocalNotification"

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external cancelAllLocalNotifications: unit => unit = "cancelAllLocalNotifications"

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external removeAllDeliveredNotifications: unit => unit = "removeAllDeliveredNotifications"

type deliveredNotification = {
Expand All @@ -78,26 +94,50 @@ type deliveredNotification = {
userInfo: Js.Nullable.t<Js.Json.t>,
}

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external getDeliveredNotifications: (array<deliveredNotification> => unit) => unit =
"getDeliveredNotifications"

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external removeDeliveredNotifications: (~identifiers: array<string>) => unit =
"removeDeliveredNotifications"

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external setApplicationIconBadgeNumber: int => unit = "setApplicationIconBadgeNumber"

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external getApplicationIconBadgeNumber: (int => unit) => unit = "getApplicationIconBadgeNumber"

// multiple externals
@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external cancelLocalNotifications: unit => unit = "cancelLocalNotifications"

// multiple externals
@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external cancelLocalNotificationsWithUserInfo: Js.Json.t => unit = "cancelLocalNotifications"

type formattedLocalNotification = {
Expand All @@ -110,7 +150,11 @@ type formattedLocalNotification = {
userInfo: Js.Nullable.t<Js.Json.t>,
}

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external getScheduledLocalNotifications: (array<formattedLocalNotification> => unit) => unit =
"getScheduledLocalNotifications"

Expand All @@ -120,7 +164,11 @@ type registrationError<'a> = {
details: Js.t<'a>,
}

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external addEventListener: @string
[
| #notification(Notification.t => unit)
Expand All @@ -129,7 +177,11 @@ external addEventListener: @string
| #registrationError(registrationError<'a> => unit)
] => unit = "addEventListener"

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external removeEventListener: @string
[
| #notification(Notification.t => unit)
Expand Down Expand Up @@ -165,18 +217,34 @@ external requestPermissionsOptions: (
) => requestPermissionsOptions = ""

// multiple externals
@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external requestPermissions: unit => Js.Promise.t<permissions> = "requestPermissions"

// multiple externals
@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external requestPermissionsWithOptions: requestPermissionsOptions => Js.Promise.t<permissions> =
"requestPermissions"

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external abandonPermissions: unit => unit = "abandonPermissions"

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external checkPermissions: (unit => checkedPermissions) => unit = "checkPermissions"

type fetchResult = {
Expand All @@ -193,12 +261,24 @@ external fetchResult: (
unit,
) => fetchResult = ""

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external finish: fetchResult => unit = "fetchResult"

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external getInitialNotification: unit => Js.Promise.t<Js.Nullable.t<Notification.t>> =
"getInitialNotification"

@module("react-native") @scope("PushNotificationIOS")
@deprecated(
"PushNotificationIOS is deprecated, migrate to @react-native-community/push-notification-ios"
)
@module("react-native")
@scope("PushNotificationIOS")
external getAuthorizationStatus: (float => unit) => unit = "getAuthorizationStatus"
3 changes: 2 additions & 1 deletion src/apis/Style.res
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ type overflow = [#visible | #hidden | #scroll]

type flexWrap = [#wrap | #nowrap]

type position = [#absolute | #relative]
type position = [#absolute | #relative | #static]

type alignContent = [
| #"flex-start"
Expand All @@ -112,6 +112,7 @@ type alignContent = [
| #stretch
| #"space-around"
| #"space-between"
| #"space-evenly"
]

type alignItems = [
Expand Down
3 changes: 2 additions & 1 deletion src/apis/Style.resi
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ type overflow = [#visible | #hidden | #scroll]

type flexWrap = [#wrap | #nowrap]

type position = [#absolute | #relative]
type position = [#absolute | #relative | #static]

type alignContent = [
| #"flex-start"
Expand All @@ -100,6 +100,7 @@ type alignContent = [
| #stretch
| #"space-around"
| #"space-between"
| #"space-evenly"
]

type alignItems = [
Expand Down
Loading