init
This commit is contained in:
61
src/types/global.d.ts
vendored
Normal file
61
src/types/global.d.ts
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
// Type declarations for untyped modules
|
||||
|
||||
declare module 'xml2js' {
|
||||
export function parseStringPromise(
|
||||
xmlString: string,
|
||||
options?: any
|
||||
): Promise<any>;
|
||||
}
|
||||
|
||||
// Crypto for React Native
|
||||
interface Crypto {
|
||||
randomUUID(): string;
|
||||
}
|
||||
|
||||
declare global {
|
||||
var crypto: Crypto | undefined;
|
||||
}
|
||||
|
||||
// Notification Types
|
||||
export enum NotificationType {
|
||||
NEW_ARTICLE = 'NEW_ARTICLE',
|
||||
EPISODE_RELEASE = 'EPISODE_RELEASE',
|
||||
CUSTOM_ALERT = 'CUSTOM_ALERT',
|
||||
UPGRADE_PROMO = 'UPGRADE_PROMO',
|
||||
}
|
||||
|
||||
export interface NotificationConfig {
|
||||
id: string;
|
||||
type: NotificationType;
|
||||
title: string;
|
||||
body: string;
|
||||
data: Record<string, unknown>;
|
||||
urgency?: 'normal' | 'high';
|
||||
sound?: string;
|
||||
badge?: number;
|
||||
category?: string;
|
||||
threadId?: string;
|
||||
}
|
||||
|
||||
export interface PushNotificationConfig {
|
||||
enabled: boolean;
|
||||
notificationTypes: NotificationType[];
|
||||
foreground: NotificationConfig;
|
||||
critical: NotificationConfig;
|
||||
alert: NotificationConfig;
|
||||
badge: NotificationConfig;
|
||||
sound: NotificationConfig;
|
||||
vibration: NotificationConfig;
|
||||
}
|
||||
|
||||
// Account Settings
|
||||
export interface AccountSettings {
|
||||
email: string;
|
||||
notificationsEnabled: boolean;
|
||||
privacy: 'public' | 'private' | 'anonymous';
|
||||
language: string;
|
||||
timezone: string;
|
||||
theme: 'system' | 'light' | 'dark';
|
||||
}
|
||||
|
||||
export {};
|
||||
Reference in New Issue
Block a user