@quan-erp/shared-frontend-core 1.0.0

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.
Files changed (48) hide show
  1. package/README.md +92 -0
  2. package/dist/index.js +2921 -0
  3. package/dist/types/core/accelerometer.d.ts +47 -0
  4. package/dist/types/core/assets.d.ts +13 -0
  5. package/dist/types/core/backend-api.d.ts +2 -0
  6. package/dist/types/core/background-location.d.ts +1 -0
  7. package/dist/types/core/battery.d.ts +40 -0
  8. package/dist/types/core/bluetooth.d.ts +77 -0
  9. package/dist/types/core/camera.d.ts +83 -0
  10. package/dist/types/core/clipboard.d.ts +56 -0
  11. package/dist/types/core/database.d.ts +13 -0
  12. package/dist/types/core/device-class-tier.d.ts +19 -0
  13. package/dist/types/core/device-fingerprint.d.ts +29 -0
  14. package/dist/types/core/device.d.ts +33 -0
  15. package/dist/types/core/filesystem.d.ts +85 -0
  16. package/dist/types/core/firebase.d.ts +5 -0
  17. package/dist/types/core/gyroscope.d.ts +52 -0
  18. package/dist/types/core/index.d.ts +32 -0
  19. package/dist/types/core/location.d.ts +87 -0
  20. package/dist/types/core/microphone.d.ts +54 -0
  21. package/dist/types/core/morientation.d.ts +14 -0
  22. package/dist/types/core/motion-orientation.d.ts +25 -0
  23. package/dist/types/core/network.d.ts +15 -0
  24. package/dist/types/core/notification.d.ts +113 -0
  25. package/dist/types/core/number-formatter.d.ts +20 -0
  26. package/dist/types/core/orientation.d.ts +49 -0
  27. package/dist/types/core/permissions.d.ts +6 -0
  28. package/dist/types/core/platform.d.ts +27 -0
  29. package/dist/types/core/plugin-api.d.ts +33 -0
  30. package/dist/types/core/printer.d.ts +54 -0
  31. package/dist/types/core/safearea.d.ts +30 -0
  32. package/dist/types/core/shared-preferences.d.ts +61 -0
  33. package/dist/types/core/sqlite.d.ts +18 -0
  34. package/dist/types/core/system-locale.d.ts +24 -0
  35. package/dist/types/core/system.d.ts +109 -0
  36. package/dist/types/core/user-behavior.d.ts +24 -0
  37. package/dist/types/core/user-hand-behavior.d.ts +90 -0
  38. package/dist/types/core/vibration.d.ts +78 -0
  39. package/dist/types/dto/dto.d.ts +9 -0
  40. package/dist/types/dto/index.d.ts +2 -0
  41. package/dist/types/dto/pagination.dto.d.ts +29 -0
  42. package/dist/types/index.d.ts +4 -0
  43. package/dist/types/security/websecurity.d.ts +4 -0
  44. package/dist/types/utilities/index.d.ts +1 -0
  45. package/dist/types/utilities/plugin-expose.d.ts +5 -0
  46. package/dist/types/utilities/version.util.d.ts +53 -0
  47. package/external-global-rollup-config.json +61 -0
  48. package/package.json +73 -0
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Common interface defining geolocation and location watch tracking APIs.
3
+ */
4
+ export interface ILocation {
5
+ /** Requests native geolocation permissions on the device. */
6
+ requestPermission(): Promise<boolean>;
7
+ /** Retrieves the current geographical coordinates of the device. */
8
+ getCurrentPosition(): Promise<{
9
+ latitude: number;
10
+ longitude: number;
11
+ }>;
12
+ /** Subscribes to real-time location coordinate changes. */
13
+ watchPosition(callback: (pos: {
14
+ latitude: number;
15
+ longitude: number;
16
+ }) => void): Promise<string>;
17
+ /** Cancels an active location watch tracking session. */
18
+ clearWatch(watchId: string): void;
19
+ }
20
+ export declare class WebLocation implements ILocation {
21
+ private watchers;
22
+ private nextId;
23
+ requestPermission(): Promise<boolean>;
24
+ getCurrentPosition(): Promise<{
25
+ latitude: number;
26
+ longitude: number;
27
+ }>;
28
+ watchPosition(callback: (pos: {
29
+ latitude: number;
30
+ longitude: number;
31
+ }) => void): Promise<string>;
32
+ clearWatch(watchId: string): void;
33
+ }
34
+ export declare class CapacitorLocation extends WebLocation implements ILocation {
35
+ requestPermission(): Promise<boolean>;
36
+ getCurrentPosition(): Promise<{
37
+ latitude: number;
38
+ longitude: number;
39
+ }>;
40
+ watchPosition(callback: (pos: {
41
+ latitude: number;
42
+ longitude: number;
43
+ }) => void): Promise<string>;
44
+ clearWatch(watchId: string): void;
45
+ }
46
+ export declare class ElectronLocation extends WebLocation {
47
+ }
48
+ /**
49
+ * Cross-platform Geolocation utility that delegates location tracking and watch requests
50
+ * to native Capacitor plugins, Electron, or Web Geolocation APIs depending on the runtime environment.
51
+ */
52
+ export declare class Location implements ILocation {
53
+ private static _instance;
54
+ private impl;
55
+ private constructor();
56
+ /**
57
+ * Singleton instance of the Location utility.
58
+ */
59
+ static get instance(): Location;
60
+ /**
61
+ * Requests location tracking permissions on the current device.
62
+ * @returns A promise resolving to true if location access was granted.
63
+ */
64
+ requestPermission(): Promise<boolean>;
65
+ /**
66
+ * Obtains the current static geolocation coordinates.
67
+ * @returns A promise resolving to coordinates containing latitude and longitude.
68
+ */
69
+ getCurrentPosition(): Promise<{
70
+ latitude: number;
71
+ longitude: number;
72
+ }>;
73
+ /**
74
+ * Registers a continuous watch listener on the device's location coordinates.
75
+ * @param callback Callback function executed whenever location updates occur.
76
+ * @returns A promise resolving to a string watch ID which can be cleared.
77
+ */
78
+ watchPosition(callback: (pos: {
79
+ latitude: number;
80
+ longitude: number;
81
+ }) => void): Promise<string>;
82
+ /**
83
+ * Cancels an ongoing geolocation watch listener session.
84
+ * @param watchId The string ID of the watch listener to release.
85
+ */
86
+ clearWatch(watchId: string): void;
87
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Common interface defining system microphone hardware access and streaming APIs.
3
+ */
4
+ export interface IMicrophone {
5
+ /** Starts recording or capturing audio from the microphone sensor. */
6
+ start(): Promise<void>;
7
+ /** Stops the active microphone recording and releases media tracks. */
8
+ stop(): void;
9
+ /** Retrieves the currently active audio MediaStream. */
10
+ getStream(): MediaStream | null;
11
+ /** Requests microphone recording permissions from the user. */
12
+ requestPermission(): Promise<boolean>;
13
+ }
14
+ declare class WebMicrophone implements IMicrophone {
15
+ private stream;
16
+ requestPermission(): Promise<boolean>;
17
+ start(): Promise<void>;
18
+ stop(): void;
19
+ getStream(): MediaStream | null;
20
+ }
21
+ export declare class ElectronMicrophone extends WebMicrophone {
22
+ }
23
+ /**
24
+ * Cross-platform Microphone utility that delegates audio capture streams and recording permissions
25
+ * to Capacitor plugins, Electron, or browser MediaStream APIs depending on the environment.
26
+ */
27
+ export declare class Microphone implements IMicrophone {
28
+ private static _instance;
29
+ private impl;
30
+ private constructor();
31
+ /**
32
+ * Singleton instance of the Microphone utility.
33
+ */
34
+ static get instance(): Microphone;
35
+ /**
36
+ * Requests microphone permissions from the operating system or browser.
37
+ * @returns A promise resolving to true if permission was granted.
38
+ */
39
+ requestPermission(): Promise<boolean>;
40
+ /**
41
+ * Initiates the microphone sensor and binds it to an active audio MediaStream.
42
+ */
43
+ start(): Promise<void>;
44
+ /**
45
+ * Halts microphone streaming and closes all associated audio media tracks.
46
+ */
47
+ stop(): void;
48
+ /**
49
+ * Obtains the raw HTML5 MediaStream containing active audio tracks.
50
+ * @returns The active MediaStream or null if not streaming.
51
+ */
52
+ getStream(): MediaStream | null;
53
+ }
54
+ export {};
@@ -0,0 +1,14 @@
1
+ export interface IOrientation {
2
+ getOrientation(): "portrait" | "landscape";
3
+ onChange(callback: (orientation: "portrait" | "landscape") => void): void;
4
+ offChange(callback: (orientation: "portrait" | "landscape") => void): void;
5
+ }
6
+ export declare class Orientation implements IOrientation {
7
+ private static _instance;
8
+ private impl;
9
+ private constructor();
10
+ static get instance(): Orientation;
11
+ getOrientation(): "portrait" | "landscape";
12
+ onChange(callback: (orientation: "portrait" | "landscape") => void): void;
13
+ offChange(callback: (orientation: "portrait" | "landscape") => void): void;
14
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Common interface defining device motion orientation tracking APIs.
3
+ */
4
+ export interface IMotionOrientation {
5
+ /** Starts listening to device motion orientation changes (alpha, beta, gamma). */
6
+ start(callback: (data: {
7
+ alpha: number | null;
8
+ beta: number | null;
9
+ gamma: number | null;
10
+ }) => void): void;
11
+ /** Stops listening to device motion orientation changes. */
12
+ stop(): void;
13
+ /** Requests native orientation event permissions (especially for iOS Safari). */
14
+ requestOrientationPermission(): Promise<boolean>;
15
+ }
16
+ /**
17
+ * Cross-platform Motion Orientation helper class that yields platform-specific trackers.
18
+ */
19
+ export declare class MotionOrientation {
20
+ /**
21
+ * Creates and returns a new instance of IMotionOrientation optimized for the current platform.
22
+ * @returns A platform-specific instance of IMotionOrientation.
23
+ */
24
+ static getNewinstance(): IMotionOrientation;
25
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Cross-platform Network connection and status tracking utility.
3
+ */
4
+ export declare class Network {
5
+ /**
6
+ * Checks if the device is currently online.
7
+ * @returns A promise resolving to true if connected, false otherwise.
8
+ */
9
+ static isOnline(): Promise<boolean>;
10
+ /**
11
+ * Registers a listener to observe changes in the device's online/offline connection state.
12
+ * @param callback Callback function executed whenever network state changes.
13
+ */
14
+ static listenNetwork(callback: (online: boolean) => void): Promise<void>;
15
+ }
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Defines the contract for cross-platform notification services.
3
+ */
4
+ export interface INotifications {
5
+ /**
6
+ * Requests authorization/permission from the user to display notifications.
7
+ * @returns A promise resolving to `true` if permission was granted, `false` otherwise.
8
+ */
9
+ requestPermission(): Promise<boolean>;
10
+ /**
11
+ * Triggers or schedules a local system notification.
12
+ * @param title The title text of the notification.
13
+ * @param options Configuration options including message body and unique ID.
14
+ */
15
+ sendNotification(title: string, options?: {
16
+ body?: string;
17
+ id?: number;
18
+ }): Promise<void>;
19
+ }
20
+ /**
21
+ * Capacitor-specific implementation of INotifications for mobile platforms (Android/iOS).
22
+ * Uses `@capacitor/local-notifications` to schedule push-like local system notifications.
23
+ */
24
+ export declare class CapacitorNotifications implements INotifications {
25
+ private permissionGranted;
26
+ private channelCreated;
27
+ /**
28
+ * Requests notification permissions from the Capacitor local notification manager.
29
+ * @returns A promise resolving to `true` if display permissions are granted, `false` otherwise.
30
+ */
31
+ requestPermission(): Promise<boolean>;
32
+ /**
33
+ * Sends a local notification on mobile platforms.
34
+ * Automatically registers a default notification channel if not already created.
35
+ * @param title The notification title.
36
+ * @param options Additional options containing body string and custom channel ID.
37
+ */
38
+ sendNotification(title: string, options?: {
39
+ body?: string;
40
+ id?: number;
41
+ }): Promise<void>;
42
+ }
43
+ /**
44
+ * Electron-specific notification implementation for desktop environments.
45
+ * Delegates to the default system-level Chromium Notification API.
46
+ */
47
+ export declare class ElectronNotifications implements INotifications {
48
+ /**
49
+ * Requests notification permission. Electron apps usually have notification rights by default.
50
+ * @returns A promise resolving to `true`.
51
+ */
52
+ requestPermission(): Promise<boolean>;
53
+ /**
54
+ * Triggers a desktop notification using Chromium's HTML5 Notification API.
55
+ * @param title The title of the desktop notification.
56
+ * @param options Options containing the body of the notification.
57
+ */
58
+ sendNotification(title: string, options?: {
59
+ body?: string;
60
+ }): Promise<void>;
61
+ }
62
+ /**
63
+ * Standard browser/web notification implementation.
64
+ * Wraps browser-native HTML5 Web Notification API.
65
+ */
66
+ export declare class WebNotifications implements INotifications {
67
+ /**
68
+ * Requests permission using the standard browser Web Notification API.
69
+ * @returns A promise resolving to `true` if permission is granted, `false` otherwise.
70
+ */
71
+ requestPermission(): Promise<boolean>;
72
+ /**
73
+ * Triggers a standard browser notification when permitted.
74
+ * @param title The notification title.
75
+ * @param options Options containing the body of the notification.
76
+ */
77
+ sendNotification(title: string, options?: {
78
+ body?: string;
79
+ }): Promise<void>;
80
+ }
81
+ /**
82
+ * Singleton wrapper and router for cross-platform local notification features.
83
+ * Automatically delegates calls to the appropriate platform-specific implementation.
84
+ */
85
+ export declare class Notifications implements INotifications {
86
+ private static _instance;
87
+ private impl;
88
+ /**
89
+ * Private constructor to enforce singleton usage pattern.
90
+ * Selects and instantiates the underlying notification engine based on platform type.
91
+ */
92
+ private constructor();
93
+ /**
94
+ * Gets the current active global singleton instance of `Notifications`.
95
+ */
96
+ static get instance(): Notifications;
97
+ /**
98
+ * Requests authorization/permission from the user to display notifications.
99
+ * Delegates to the active platform implementation.
100
+ * @returns A promise resolving to `true` if permission was granted, `false` otherwise.
101
+ */
102
+ requestPermission(): Promise<boolean>;
103
+ /**
104
+ * Triggers or schedules a local notification.
105
+ * Delegates to the active platform implementation.
106
+ * @param title The title text of the notification.
107
+ * @param options Configuration options including message body and unique ID.
108
+ */
109
+ sendNotification(title: string, options?: {
110
+ body?: string;
111
+ id?: number;
112
+ }): Promise<void>;
113
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Utility class for high-performance locale-aware number and currency formatting.
3
+ * Features an internal cache to reuse Intl.NumberFormat instances across repetitive calls.
4
+ */
5
+ export declare class NumberFormatter {
6
+ /**
7
+ * Map cache key-value store holding instantiated Intl.NumberFormat objects.
8
+ */
9
+ private static formats;
10
+ /**
11
+ * Formats a numeric value according to the specified locale and formatting configuration.
12
+ * Caches the underlying Intl.NumberFormat instance based on a normalized cache key.
13
+ *
14
+ * @param num The numeric value to format.
15
+ * @param locale The RFC 5646 language tag representing the locale (e.g., 'en-US', 'my-MM'). Defaults to 'en-US'.
16
+ * @param options Standard ECMAScript Internationalization API number format options.
17
+ * @returns The formatted string representation of the number.
18
+ */
19
+ static format(num: number, locale?: string, options?: Intl.NumberFormatOptions): string;
20
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Defines the contract for monitoring and managing device screen orientation.
3
+ */
4
+ export interface IOrientation {
5
+ /**
6
+ * Retrieves the current device orientation.
7
+ * @returns Either 'portrait' or 'landscape'.
8
+ */
9
+ getOrientation(): "portrait" | "landscape";
10
+ /**
11
+ * Registers a callback listener to trigger when screen orientation changes.
12
+ * @param callback The function to invoke, receiving the new orientation string.
13
+ */
14
+ onChange(callback: (orientation: "portrait" | "landscape") => void): void;
15
+ /**
16
+ * Unregisters a previously registered orientation change listener.
17
+ * @param callback The listener function to remove.
18
+ */
19
+ offChange(callback: (orientation: "portrait" | "landscape") => void): void;
20
+ }
21
+ /**
22
+ * Singleton wrapper and router for managing screen and window orientation states across platforms.
23
+ */
24
+ export declare class Orientation implements IOrientation {
25
+ private static _instance;
26
+ private impl;
27
+ /**
28
+ * Enforces single instance behavior and resolves target device implementation at runtime.
29
+ */
30
+ private constructor();
31
+ /**
32
+ * Accesses the active, platform-resolved singleton orientation service.
33
+ */
34
+ static get instance(): Orientation;
35
+ /**
36
+ * Retrieves current viewport or physical device screen orientation.
37
+ */
38
+ getOrientation(): "portrait" | "landscape";
39
+ /**
40
+ * Subscribes a listener to orientation modification events.
41
+ * @param callback Callback receiving standard landscape/portrait codes.
42
+ */
43
+ onChange(callback: (orientation: "portrait" | "landscape") => void): void;
44
+ /**
45
+ * Unsubscribes a listener.
46
+ * @param callback Callback to remove.
47
+ */
48
+ offChange(callback: (orientation: "portrait" | "landscape") => void): void;
49
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Central system utility class for managing, requesting, and query-checking application permissions.
3
+ * Serves as a standard interface for handling high-security mobile device feature access (Camera, Location, Push, etc.).
4
+ */
5
+ export declare class Permissions {
6
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Utility service to identify the active application shell context (Desktop, Mobile, or Web).
3
+ * Used for dynamic feature detection and directing API requests to Capacitor, Electron, or browser-native APIs.
4
+ */
5
+ export declare class Platforms {
6
+ /**
7
+ * Determines if the application is running inside an Electron desktop window context.
8
+ * Checks if the `electron` IPC bridge object has been injected into the global `window` scope.
9
+ *
10
+ * @returns `true` if executed in an Electron shell environment, `false` otherwise.
11
+ */
12
+ static isDesktop(): boolean;
13
+ /**
14
+ * Determines if the application is running as a native mobile application (Android/iOS).
15
+ * Inspects the global Capacitor plugin bridge interface properties.
16
+ *
17
+ * @returns `true` if executed within a native mobile app container, `false` otherwise.
18
+ */
19
+ static isMobile(): boolean;
20
+ /**
21
+ * Determines if the application is running in a traditional web browser environment.
22
+ * Checks that neither Electron desktop bindings nor Capacitor native app plugins are initialized.
23
+ *
24
+ * @returns `true` if running strictly on a standard web page, `false` otherwise.
25
+ */
26
+ static isWeb(): boolean;
27
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Registry interface for dynamic runtime plugin interoperability and component exporting/importing.
3
+ * Allows plugins within the modular ERP system to expose functional APIs securely and consume external capabilities dynamically.
4
+ */
5
+ export declare class PluginAPI {
6
+ /**
7
+ * Exposes a specific API service from a plugin, registering it within the shared system registry.
8
+ * Prevents re-definition of keys once registered to ensure runtime immutability and prevent injection attacks.
9
+ *
10
+ * @param pluginName The unique namespace name of the exporting plugin.
11
+ * @param apiName The identifying key representing the exported service.
12
+ * @param value The functional API surface, class instance, or utility being shared.
13
+ * @throws Error if the plugin namespace and API key combination is already registered.
14
+ */
15
+ static expose<T>(pluginName: string, apiName: string, value: T): void;
16
+ /**
17
+ * Resolves and retrieves an exposed API service from another plugin namespace.
18
+ *
19
+ * @param pluginName The namespace of the target plugin.
20
+ * @param apiName The key identifying the requested API surface.
21
+ * @returns The resolved service instance cast to generic type T.
22
+ */
23
+ static use<T>(pluginName: string, apiName: string): T;
24
+ /**
25
+ * Gets the current raw internal registry map of all exposed APIs.
26
+ */
27
+ static get store(): any;
28
+ /**
29
+ * Lists the keys of all registered APIs in the system for inspection and debugging.
30
+ * @returns An array of API identifiers in the format: "pluginName|apiName".
31
+ */
32
+ static debug(): string[];
33
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Defines the contract for printing raw HTML templates across diverse system targets.
3
+ */
4
+ export interface IPrinter {
5
+ /**
6
+ * Renders and dispatches an HTML content string to a system printer interface.
7
+ * @param html The full HTML document structure or snippet to print.
8
+ */
9
+ printHTML(html: string): void;
10
+ }
11
+ /**
12
+ * Web-native printer helper using browser standard `window.print()` workflows.
13
+ * Opens a temporary hidden frame or window to present the content dialog to the user.
14
+ */
15
+ export declare class WebPrinter implements IPrinter {
16
+ /**
17
+ * Opens a temporary tab frame and initiates the native system print pop-up.
18
+ * @param html HTML text content to print.
19
+ */
20
+ printHTML(html: string): void;
21
+ }
22
+ /**
23
+ * Electron-specific printer helper to coordinate with physical native queues.
24
+ * Currently serves as a feature placeholder.
25
+ */
26
+ export declare class ElectronPrinter implements IPrinter {
27
+ /**
28
+ * Desktop platform custom print dispatcher.
29
+ * @param html HTML source code to print.
30
+ */
31
+ printHTML(html: string): Promise<void>;
32
+ }
33
+ /**
34
+ * Mobile-specific printer implementation utilizing native OS print spoolers.
35
+ * Currently serves as a feature placeholder.
36
+ */
37
+ export declare class MobilePrinter implements IPrinter {
38
+ /**
39
+ * Mobile platform custom print dispatcher.
40
+ * @param html HTML source code to print.
41
+ */
42
+ printHTML(html: string): Promise<void>;
43
+ }
44
+ /**
45
+ * Singleton wrapper and dynamic platform router for the system print engine services.
46
+ */
47
+ export declare class Printer {
48
+ private static _instance;
49
+ /**
50
+ * Retrieves the global active singleton printing service instance.
51
+ * Resolves the target implementation at runtime according to the platform profile.
52
+ */
53
+ static get instance(): IPrinter;
54
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Utility service to retrieve and query hardware display safe area offsets (notch/home insets).
3
+ * Useful for building responsive mobile headers, navbars, and viewport content padding.
4
+ */
5
+ export declare class SafeArea {
6
+ /**
7
+ * Retrieves the top safe area inset value in pixels.
8
+ * Maps to the CSS environment variable `safe-area-inset-top`.
9
+ * @returns The pixel height offset.
10
+ */
11
+ static getTop(): number;
12
+ /**
13
+ * Retrieves the bottom safe area inset value in pixels (e.g., home indicator bar).
14
+ * Maps to the CSS environment variable `safe-area-inset-bottom`.
15
+ * @returns The pixel height offset.
16
+ */
17
+ static getBottom(): number;
18
+ /**
19
+ * Retrieves the left safe area inset value in pixels (landscape notch alignment).
20
+ * Maps to the CSS environment variable `safe-area-inset-left`.
21
+ * @returns The pixel width offset.
22
+ */
23
+ static getLeft(): number;
24
+ /**
25
+ * Retrieves the right safe area inset value in pixels (landscape notch alignment).
26
+ * Maps to the CSS environment variable `safe-area-inset-right`.
27
+ * @returns The pixel width offset.
28
+ */
29
+ static getRight(): number;
30
+ }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Standard contract for cross-platform local storage and application preference engines.
3
+ */
4
+ export interface IStorage {
5
+ /**
6
+ * Persists a key-value string pair in local storage.
7
+ * @param key The identification key.
8
+ * @param value The string value to store.
9
+ */
10
+ setItem(key: string, value: string): Promise<void>;
11
+ /**
12
+ * Resolves a key value from local storage.
13
+ * @param key The identification key.
14
+ * @returns A promise resolving to the string value if found, or `null` if empty.
15
+ */
16
+ getItem(key: string): Promise<string | null>;
17
+ /**
18
+ * Deletes a key-value record from local storage.
19
+ * @param key The identification key to delete.
20
+ */
21
+ removeItem(key: string): Promise<void>;
22
+ /**
23
+ * Purges and clears all entries stored under this engine namespace.
24
+ */
25
+ clear(): Promise<void>;
26
+ }
27
+ /**
28
+ * Singleton wrapper and router for managing persistent configurations and keys across different runtime systems.
29
+ */
30
+ export declare class Storage implements IStorage {
31
+ private static _instance;
32
+ private impl;
33
+ /**
34
+ * Intitializes the target platform storage client implementation at runtime.
35
+ */
36
+ private constructor();
37
+ /**
38
+ * Accesses the active, platform-resolved singleton Storage engine service.
39
+ */
40
+ static get instance(): Storage;
41
+ /**
42
+ * Persists a key-value record in localized storage.
43
+ * @param key Identifer key.
44
+ * @param value Text payload.
45
+ */
46
+ setItem(key: string, value: string): Promise<void>;
47
+ /**
48
+ * Retrieves a key record from local storage.
49
+ * @param key Identifer key.
50
+ */
51
+ getItem(key: string): Promise<string | null>;
52
+ /**
53
+ * Deletes a key record from local storage.
54
+ * @param key Identifer key.
55
+ */
56
+ removeItem(key: string): Promise<void>;
57
+ /**
58
+ * Clears all persisted storage entries.
59
+ */
60
+ clear(): Promise<void>;
61
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Placeholder interface and configuration utilities for SQLite database connection management.
3
+ *
4
+ * > [!NOTE]
5
+ * > Local SQLite instance connections, initializations, and transactions on mobile and desktop platforms
6
+ * > are actively managed by the dynamic helper class `Database` and the functional accessor `getDB()`
7
+ * > implemented in `database.ts` (relying on `@capacitor-community/sqlite`).
8
+ */
9
+ export declare class SQLitePlaceholder {
10
+ /**
11
+ * Informational utility function that returns database module metadata.
12
+ * @returns An object containing sqlite configuration details.
13
+ */
14
+ static getMetadata(): {
15
+ name: string;
16
+ engine: string;
17
+ };
18
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Represents string locale identifiers (e.g. "en", "zh-CN", "my-MM").
3
+ */
4
+ export type Locales = string;
5
+ /**
6
+ * Defines the contract for fetching localized user system configuration parameters.
7
+ */
8
+ export interface ILocale {
9
+ /**
10
+ * Resolves the primary native system language code or locale identifier.
11
+ * @returns A promise resolving to the language string tag (e.g., 'en').
12
+ */
13
+ getDeviceLocale(): Promise<Locales>;
14
+ }
15
+ /**
16
+ * Singleton service wrapper and router for managing, retrieving, and query-caching system locale settings.
17
+ */
18
+ export declare class SystemLocale {
19
+ private static _instance;
20
+ /**
21
+ * Accesses the active global, platform-resolved singleton locale service instance.
22
+ */
23
+ static get instance(): ILocale;
24
+ }