@umituz/react-native-notifications 1.5.4 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/types/global.d.ts +0 -258
package/package.json
CHANGED
package/src/types/global.d.ts
DELETED
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
declare const __DEV__: boolean;
|
|
2
|
-
|
|
3
|
-
declare global {
|
|
4
|
-
namespace React {
|
|
5
|
-
interface ReactElement {
|
|
6
|
-
type: any;
|
|
7
|
-
props: any;
|
|
8
|
-
key: any;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
interface ReactNode {
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare module 'react' {
|
|
18
|
-
export interface FunctionComponent<P = {}> {
|
|
19
|
-
(props: P): React.ReactElement | null;
|
|
20
|
-
displayName?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type FC<P = {}> = FunctionComponent<P>;
|
|
24
|
-
|
|
25
|
-
export function useState<S>(initialState: S | (() => S)): [S, (value: S | ((prevState: S) => S)) => void];
|
|
26
|
-
export function useEffect(effect: () => void | (() => void), deps?: any[]): void;
|
|
27
|
-
export function useCallback<T extends (...args: any[]) => any>(callback: T, deps: any[]): T;
|
|
28
|
-
export function useMemo<T>(factory: () => T, deps: any[]): T;
|
|
29
|
-
export function useRef<T>(initialValue: T): { current: T };
|
|
30
|
-
|
|
31
|
-
export interface ReactElement {
|
|
32
|
-
type: any;
|
|
33
|
-
props: any;
|
|
34
|
-
key: any;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface ReactNode {
|
|
38
|
-
[key: string]: any;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const createElement: any;
|
|
42
|
-
const Component: any;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
declare module '@react-native-async-storage/async-storage' {
|
|
46
|
-
export interface AsyncStorageStatic {
|
|
47
|
-
getItem(key: string): Promise<string | null>;
|
|
48
|
-
setItem(key: string, value: string): Promise<void>;
|
|
49
|
-
removeItem(key: string): Promise<void>;
|
|
50
|
-
clear(): Promise<void>;
|
|
51
|
-
getAllKeys(): Promise<string[]>;
|
|
52
|
-
multiGet(keys: string[]): Promise<[string, string | null][]>;
|
|
53
|
-
multiSet(keyValuePairs: [string, string][]): Promise<void>;
|
|
54
|
-
multiRemove(keys: string[]): Promise<void>;
|
|
55
|
-
}
|
|
56
|
-
const AsyncStorage: AsyncStorageStatic;
|
|
57
|
-
export default AsyncStorage;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
declare module 'expo-notifications' {
|
|
61
|
-
export interface NotificationContentInput {
|
|
62
|
-
title: string;
|
|
63
|
-
body: string;
|
|
64
|
-
data?: Record<string, any>;
|
|
65
|
-
sound?: string | boolean;
|
|
66
|
-
badge?: number;
|
|
67
|
-
categoryIdentifier?: string;
|
|
68
|
-
priority?: AndroidNotificationPriority;
|
|
69
|
-
vibrate?: number[];
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface NotificationRequestInput {
|
|
73
|
-
content: NotificationContentInput;
|
|
74
|
-
trigger?: NotificationTriggerInput | null;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface NotificationTriggerInput {
|
|
78
|
-
date?: Date;
|
|
79
|
-
repeats?: boolean;
|
|
80
|
-
channelId?: string;
|
|
81
|
-
hour?: number;
|
|
82
|
-
minute?: number;
|
|
83
|
-
weekday?: number;
|
|
84
|
-
day?: number;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export interface ScheduledNotification {
|
|
88
|
-
identifier: string;
|
|
89
|
-
content: NotificationContentInput;
|
|
90
|
-
trigger: NotificationTriggerInput;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export enum AndroidImportance {
|
|
94
|
-
DEFAULT = 'default',
|
|
95
|
-
HIGH = 'high',
|
|
96
|
-
MAX = 'max',
|
|
97
|
-
LOW = 'low',
|
|
98
|
-
MIN = 'min',
|
|
99
|
-
UNSPECIFIED = 'unspecified',
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export enum AndroidNotificationPriority {
|
|
103
|
-
DEFAULT = 'default',
|
|
104
|
-
HIGH = 'high',
|
|
105
|
-
LOW = 'low',
|
|
106
|
-
MAX = 'max',
|
|
107
|
-
MIN = 'min',
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export interface AndroidChannel {
|
|
111
|
-
name: string;
|
|
112
|
-
importance: AndroidImportance;
|
|
113
|
-
vibrationPattern?: number[];
|
|
114
|
-
sound?: string;
|
|
115
|
-
lightColor?: string;
|
|
116
|
-
enableVibrate?: boolean;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export interface NotificationPermissionsResponse {
|
|
120
|
-
status: 'granted' | 'denied' | 'undetermined';
|
|
121
|
-
granted?: boolean;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export function setNotificationHandler(handler: {
|
|
125
|
-
handleNotification: () => Promise<{
|
|
126
|
-
shouldShowAlert: boolean;
|
|
127
|
-
shouldPlaySound: boolean;
|
|
128
|
-
shouldSetBadge: boolean;
|
|
129
|
-
}>;
|
|
130
|
-
}): void;
|
|
131
|
-
|
|
132
|
-
export function scheduleNotificationAsync(request: NotificationRequestInput): Promise<string>;
|
|
133
|
-
export function cancelScheduledNotificationAsync(identifier: string): Promise<void>;
|
|
134
|
-
export function cancelAllScheduledNotificationsAsync(): Promise<void>;
|
|
135
|
-
export function getAllScheduledNotificationsAsync(): Promise<ScheduledNotification[]>;
|
|
136
|
-
export function dismissAllNotificationsAsync(): Promise<void>;
|
|
137
|
-
export function getPermissionsAsync(): Promise<NotificationPermissionsResponse>;
|
|
138
|
-
export function requestPermissionsAsync(): Promise<NotificationPermissionsResponse>;
|
|
139
|
-
export function setNotificationChannelAsync(id: string, channel: AndroidChannel): Promise<void>;
|
|
140
|
-
export function getBadgeCountAsync(): Promise<number>;
|
|
141
|
-
export function setBadgeCountAsync(count: number): Promise<void>;
|
|
142
|
-
export function getExpoPushTokenAsync(options?: any): Promise<{ data: string }>;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
declare module 'expo-device' {
|
|
146
|
-
export const isDevice: boolean;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
declare module 'react-native' {
|
|
150
|
-
export interface PlatformStatic {
|
|
151
|
-
OS: 'ios' | 'android';
|
|
152
|
-
Version: string | number;
|
|
153
|
-
isPad?: boolean;
|
|
154
|
-
isTVOS?: boolean;
|
|
155
|
-
select<T>(specifics: { ios?: T; android?: T; default?: T }): T;
|
|
156
|
-
}
|
|
157
|
-
export const Platform: PlatformStatic;
|
|
158
|
-
|
|
159
|
-
export interface StyleSheetStatic {
|
|
160
|
-
create<T>(styles: T): T;
|
|
161
|
-
}
|
|
162
|
-
export const StyleSheet: StyleSheetStatic;
|
|
163
|
-
|
|
164
|
-
export type StyleProp<T> = T | T[] | null | undefined;
|
|
165
|
-
export interface ViewStyle { [key: string]: any; }
|
|
166
|
-
export interface TextStyle { [key: string]: any; }
|
|
167
|
-
|
|
168
|
-
export const View: React.FC<any>;
|
|
169
|
-
export const Text: React.FC<any>;
|
|
170
|
-
export const TouchableOpacity: React.FC<any>;
|
|
171
|
-
export const TextInput: React.FC<any>;
|
|
172
|
-
export const ScrollView: React.FC<any>;
|
|
173
|
-
export const FlatList: React.FC<any>;
|
|
174
|
-
export const Switch: React.FC<any>;
|
|
175
|
-
export const ActivityIndicator: React.FC<any>;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
declare module 'zustand' {
|
|
179
|
-
export interface StoreApi<T> {
|
|
180
|
-
getState: () => T;
|
|
181
|
-
setState: (partial: T | Partial<T> | ((state: T) => T | Partial<T>), replace?: boolean) => void;
|
|
182
|
-
subscribe: (listener: (state: T, prevState: T) => void) => () => void;
|
|
183
|
-
destroy: () => void;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export function create<TState extends object>(
|
|
187
|
-
stateCreator: (
|
|
188
|
-
set: (
|
|
189
|
-
partial: TState | Partial<TState> | ((state: TState) => TState | Partial<TState>),
|
|
190
|
-
replace?: boolean,
|
|
191
|
-
) => void,
|
|
192
|
-
get: () => TState,
|
|
193
|
-
api: StoreApi<TState>,
|
|
194
|
-
) => TState,
|
|
195
|
-
): StoreApi<TState> & ((selector?: (state: TState) => any) => any);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
declare module '@umituz/react-native-design-system' {
|
|
199
|
-
export interface AtomicIconProps {
|
|
200
|
-
name: string;
|
|
201
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
202
|
-
color?: string;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export interface AtomicSwitchProps {
|
|
206
|
-
value: boolean;
|
|
207
|
-
onValueChange: (value: boolean) => void;
|
|
208
|
-
testID?: string;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export interface AtomicCardProps {
|
|
212
|
-
style?: any;
|
|
213
|
-
children?: React.ReactNode;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export interface AtomicTextProps {
|
|
217
|
-
type: 'bodySmall' | 'bodyMedium' | 'bodyLarge';
|
|
218
|
-
style?: any;
|
|
219
|
-
children?: React.ReactNode;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export interface ScreenLayoutProps {
|
|
223
|
-
testID?: string;
|
|
224
|
-
hideScrollIndicator?: boolean;
|
|
225
|
-
children?: React.ReactNode;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
export const AtomicIcon: React.FC<AtomicIconProps>;
|
|
229
|
-
export const AtomicSwitch: React.FC<AtomicSwitchProps>;
|
|
230
|
-
export const AtomicCard: React.FC<AtomicCardProps>;
|
|
231
|
-
export const AtomicText: React.FC<AtomicTextProps>;
|
|
232
|
-
export const ScreenLayout: React.FC<ScreenLayoutProps>;
|
|
233
|
-
|
|
234
|
-
export const STATIC_TOKENS: {
|
|
235
|
-
spacing: {
|
|
236
|
-
xs: number;
|
|
237
|
-
sm: number;
|
|
238
|
-
md: number;
|
|
239
|
-
lg: number;
|
|
240
|
-
xl: number;
|
|
241
|
-
};
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
export interface DesignTokens {
|
|
245
|
-
colors: {
|
|
246
|
-
primary: string;
|
|
247
|
-
textPrimary: string;
|
|
248
|
-
textSecondary: string;
|
|
249
|
-
surface: string;
|
|
250
|
-
surfaceSecondary: string;
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
declare module '@umituz/react-native-design-system' {
|
|
256
|
-
export function useAppDesignTokens(): import('@umituz/react-native-design-system').DesignTokens;
|
|
257
|
-
}
|
|
258
|
-
|