@botim/botim-cli 0.1.6 → 0.1.7

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 (92) hide show
  1. package/dist/cli.js +3 -3
  2. package/dist/cli.mjs +2 -2
  3. package/package.json +2 -3
  4. package/dist/templates/templates/react/README.md +0 -48
  5. package/dist/templates/templates/react/docs/code-patterns.md +0 -139
  6. package/dist/templates/templates/react/docs/core-rules.md +0 -69
  7. package/dist/templates/templates/react/docs/figma-workflow.md +0 -81
  8. package/dist/templates/templates/react/docs/validation.md +0 -59
  9. package/dist/templates/templates/react/eslint.config.ts +0 -57
  10. package/dist/templates/templates/react/index.html +0 -12
  11. package/dist/templates/templates/react/package-lock.json +0 -12197
  12. package/dist/templates/templates/react/package.json +0 -102
  13. package/dist/templates/templates/react/scripts/setup.sh +0 -304
  14. package/dist/templates/templates/react/src/api/http-client.ts +0 -8
  15. package/dist/templates/templates/react/src/api/modules/example.ts +0 -12
  16. package/dist/templates/templates/react/src/app.tsx +0 -27
  17. package/dist/templates/templates/react/src/components/not-found-content/index.ts +0 -2
  18. package/dist/templates/templates/react/src/components/not-found-content/not-found-content.tsx +0 -24
  19. package/dist/templates/templates/react/src/components/welcome-card/index.ts +0 -1
  20. package/dist/templates/templates/react/src/components/welcome-card/welcome-card.tsx +0 -10
  21. package/dist/templates/templates/react/src/hooks/use-document-title.ts +0 -11
  22. package/dist/templates/templates/react/src/i18n/index.ts +0 -40
  23. package/dist/templates/templates/react/src/i18n/languages/en.json +0 -10
  24. package/dist/templates/templates/react/src/main.tsx +0 -27
  25. package/dist/templates/templates/react/src/modules/common/README.md +0 -7
  26. package/dist/templates/templates/react/src/modules/common/constants.ts +0 -3
  27. package/dist/templates/templates/react/src/modules/core/README.md +0 -7
  28. package/dist/templates/templates/react/src/modules/core/api/error.ts +0 -6
  29. package/dist/templates/templates/react/src/modules/core/app-providers.tsx +0 -18
  30. package/dist/templates/templates/react/src/modules/core/index.ts +0 -2
  31. package/dist/templates/templates/react/src/pages/home/index.tsx +0 -13
  32. package/dist/templates/templates/react/src/pages/not-found/index.tsx +0 -7
  33. package/dist/templates/templates/react/src/routes.tsx +0 -18
  34. package/dist/templates/templates/react/src/stores/home-store.ts +0 -11
  35. package/dist/templates/templates/react/src/styles/font.css +0 -1
  36. package/dist/templates/templates/react/src/styles/global-style.tsx +0 -27
  37. package/dist/templates/templates/react/src/styles/tailwind.css +0 -4
  38. package/dist/templates/templates/react/src/styles/utility-classes.ts +0 -13
  39. package/dist/templates/templates/react/src/theme/index.tsx +0 -24
  40. package/dist/templates/templates/react/src/theme/types.ts +0 -10
  41. package/dist/templates/templates/react/src/types/global.d.ts +0 -139
  42. package/dist/templates/templates/react/src/types/shims-global.d.ts +0 -97
  43. package/dist/templates/templates/react/src/utils/currency.ts +0 -6
  44. package/dist/templates/templates/react/src/utils/date.ts +0 -5
  45. package/dist/templates/templates/react/src/utils/guard.ts +0 -4
  46. package/dist/templates/templates/react/src/vite-env.d.ts +0 -1
  47. package/dist/templates/templates/react/tsconfig.json +0 -39
  48. package/dist/templates/templates/react/tsconfig.node.json +0 -11
  49. package/dist/templates/templates/react/types/global.d.ts +0 -131
  50. package/dist/templates/templates/react/vite.config.ts +0 -179
  51. package/dist/templates/templates/vue/README.md +0 -19
  52. package/dist/templates/templates/vue/eslint.config.ts +0 -44
  53. package/dist/templates/templates/vue/index.html +0 -12
  54. package/dist/templates/templates/vue/package-lock.json +0 -5774
  55. package/dist/templates/templates/vue/package.json +0 -39
  56. package/dist/templates/templates/vue/src/api/http-client.ts +0 -11
  57. package/dist/templates/templates/vue/src/api/modules/example.ts +0 -12
  58. package/dist/templates/templates/vue/src/app.vue +0 -23
  59. package/dist/templates/templates/vue/src/components/card/index.vue +0 -14
  60. package/dist/templates/templates/vue/src/components/layout/index.ts +0 -1
  61. package/dist/templates/templates/vue/src/components/layout/page-layout.vue +0 -43
  62. package/dist/templates/templates/vue/src/components/layout/styles.ts +0 -5
  63. package/dist/templates/templates/vue/src/components/typography/heading.vue +0 -21
  64. package/dist/templates/templates/vue/src/components/typography/index.ts +0 -1
  65. package/dist/templates/templates/vue/src/hooks/use-document-title.ts +0 -23
  66. package/dist/templates/templates/vue/src/i18n/index.ts +0 -31
  67. package/dist/templates/templates/vue/src/i18n/languages/en.json +0 -10
  68. package/dist/templates/templates/vue/src/main.ts +0 -12
  69. package/dist/templates/templates/vue/src/modules/common/README.md +0 -7
  70. package/dist/templates/templates/vue/src/modules/common/constants.ts +0 -3
  71. package/dist/templates/templates/vue/src/modules/core/README.md +0 -7
  72. package/dist/templates/templates/vue/src/modules/core/api/error.ts +0 -6
  73. package/dist/templates/templates/vue/src/modules/core/app-providers.ts +0 -17
  74. package/dist/templates/templates/vue/src/modules/core/index.ts +0 -2
  75. package/dist/templates/templates/vue/src/pages/home/index.vue +0 -28
  76. package/dist/templates/templates/vue/src/pages/not-found/index.vue +0 -13
  77. package/dist/templates/templates/vue/src/routes.ts +0 -19
  78. package/dist/templates/templates/vue/src/stores/home-store.ts +0 -12
  79. package/dist/templates/templates/vue/src/styles/font.css +0 -1
  80. package/dist/templates/templates/vue/src/styles/global-style.ts +0 -63
  81. package/dist/templates/templates/vue/src/styles/utility-classes.ts +0 -1
  82. package/dist/templates/templates/vue/src/theme/index.ts +0 -33
  83. package/dist/templates/templates/vue/src/theme/types.ts +0 -10
  84. package/dist/templates/templates/vue/src/types/global.d.ts +0 -9
  85. package/dist/templates/templates/vue/src/utils/currency.ts +0 -6
  86. package/dist/templates/templates/vue/src/utils/date.ts +0 -5
  87. package/dist/templates/templates/vue/src/utils/guard.ts +0 -4
  88. package/dist/templates/templates/vue/src/vite-env.d.ts +0 -1
  89. package/dist/templates/templates/vue/tsconfig.json +0 -36
  90. package/dist/templates/templates/vue/tsconfig.node.json +0 -9
  91. package/dist/templates/templates/vue/types/global.d.ts +0 -7
  92. package/dist/templates/templates/vue/vite.config.ts +0 -74
@@ -1,18 +0,0 @@
1
- import { lazy } from 'react';
2
- import { createHashRouter, RouteObject } from 'react-router-dom';
3
- import HomePage from './pages/home';
4
-
5
- const NotFoundPage = lazy(async () => import('./pages/not-found'));
6
-
7
- const routes: RouteObject[] = [
8
- {
9
- path: '/',
10
- element: <HomePage />
11
- },
12
- {
13
- path: '*',
14
- element: <NotFoundPage />
15
- }
16
- ];
17
-
18
- export const router = createHashRouter(routes);
@@ -1,11 +0,0 @@
1
- import { create } from 'zustand';
2
-
3
- export type HomeState = {
4
- message: string;
5
- setMessage: (value: string) => void;
6
- };
7
-
8
- export const useHomeStore = create<HomeState>((set) => ({
9
- message: 'Welcome to your new mini application',
10
- setMessage: (value) => set({ message: value })
11
- }));
@@ -1 +0,0 @@
1
- /* Add @font-face declarations or external font imports here */
@@ -1,27 +0,0 @@
1
- import { css, Global, useTheme } from '@emotion/react';
2
- import type { AppTheme } from '@theme/types';
3
-
4
- const createGlobalStyles = (theme: AppTheme) => css`
5
- :root {
6
- color-scheme: light;
7
- }
8
-
9
- *,
10
- *::before,
11
- *::after {
12
- box-sizing: border-box;
13
- }
14
-
15
- body {
16
- margin: 0;
17
- font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
18
- background: ${theme.colors.background};
19
- color: ${theme.colors.text};
20
- }
21
- `;
22
-
23
- export function GlobalStyle(): JSX.Element {
24
- const theme = useTheme() as AppTheme;
25
-
26
- return <Global styles={createGlobalStyles(theme)} />;
27
- }
@@ -1,4 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
@@ -1,13 +0,0 @@
1
- import { css } from '@emotion/react';
2
-
3
- export const visuallyHidden = css`
4
- position: absolute;
5
- width: 1px;
6
- height: 1px;
7
- padding: 0;
8
- margin: -1px;
9
- overflow: hidden;
10
- clip: rect(0, 0, 0, 0);
11
- white-space: nowrap;
12
- border: 0;
13
- `;
@@ -1,24 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
- import { ThemeProvider } from '@emotion/react';
3
- import type { AppTheme } from './types';
4
-
5
- const baseTheme: AppTheme = {
6
- colors: {
7
- background: '#f8fafc',
8
- surface: '#ffffff',
9
- text: '#0f172a',
10
- primary: '#2563eb',
11
- muted: '#64748b'
12
- },
13
- spacing: (value: number) => `${value * 4}px`
14
- };
15
-
16
- export function AppThemeProvider({ children }: PropsWithChildren): JSX.Element {
17
- return <ThemeProvider theme={baseTheme}>{children}</ThemeProvider>;
18
- }
19
-
20
- declare module '@emotion/react' {
21
- export interface Theme extends AppTheme {}
22
- }
23
-
24
- export type { AppTheme };
@@ -1,10 +0,0 @@
1
- export type AppTheme = {
2
- colors: {
3
- background: string;
4
- surface: string;
5
- text: string;
6
- primary: string;
7
- muted: string;
8
- };
9
- spacing: (value: number) => string;
10
- };
@@ -1,139 +0,0 @@
1
- // declare namespace App {
2
- // interface WindowVariables {
3
- // example?: string;
4
- // }
5
- // }
6
-
7
- // declare interface Window {
8
- // app?: App.WindowVariables;
9
- // }
10
-
11
- // // Type definitions for @botim/framework
12
- // // This fixes the module resolution issue where exports don't properly expose types
13
- // declare module '@botim/framework' {
14
- // // Core types
15
- // export interface BridgeInstance {
16
- // // Lifecycle
17
- // onLaunch: (cb: () => void) => void;
18
- // onRestart: (callback: () => void) => void;
19
-
20
- // // Auth & User
21
- // getUserInfo: () => Promise<any>;
22
- // getMpAuthCode: () => Promise<any>;
23
- // doLogin: () => Promise<any>;
24
-
25
- // // Navigation
26
- // closeCurrent: () => void;
27
- // closeAll: () => void;
28
- // navigateTo: (options: { url: string; payload?: Record<string, string> } | string) => void;
29
- // redirectTo: (url: string) => void;
30
- // navigateBack: () => void;
31
- // reLaunch: () => void;
32
-
33
- // // Storage
34
- // getStorageSync: (key: string) => string | undefined;
35
- // setStorageSync: (key: string, value: string) => void;
36
-
37
- // // Page & Query
38
- // getPageQuery: (name: string) => string | undefined;
39
-
40
- // // Device & Platform
41
- // isiOS: () => boolean;
42
- // isAndroid: () => boolean;
43
- // isRtl: () => boolean;
44
- // getNetworkType: () => Promise<any>;
45
- // getClientInfo: () => DeviceInfo;
46
- // getDisplayInfoSync: () => DisplayInfo;
47
- // allowContentOffSet: (options: { isNotAllow: boolean }) => void;
48
- // checkAPILevel: (version: string | number) => boolean;
49
-
50
- // // Location
51
- // getLocation: (options: LocationOptions) => void;
52
-
53
- // // Native Bridge
54
- // nativeCall: (options: {
55
- // method: string;
56
- // parameters: string[];
57
- // callback: {
58
- // success: (res: any) => void;
59
- // fail: (error: any) => void;
60
- // };
61
- // }) => void;
62
-
63
- // // Keyboard
64
- // onKeyboardPop: (callback: (val: { data: { keyboardHeight: number; keyboardStatus: number } }) => void) => void;
65
-
66
- // // App & Theming
67
- // App: () => { theme: { container: string }; [key: string]: unknown };
68
-
69
- // // Analytics & Payment
70
- // mpTrack: (options: Record<string, unknown>) => void;
71
- // requestPayment: (
72
- // options: Record<string, unknown>,
73
- // callback: { success: (res: unknown) => void; fail: (error: unknown) => void }
74
- // ) => void;
75
-
76
- // // Catch-all for other properties
77
- // [k: string]: unknown;
78
- // }
79
-
80
- // // Location Types
81
- // export interface LocationOptions {
82
- // altitude?: boolean;
83
- // isHighAccuracy?: boolean;
84
- // expireTime?: number;
85
- // success?: (result: LocationResult) => void;
86
- // fail?: (error: LocationError) => void;
87
- // complete?: () => void;
88
- // }
89
-
90
- // export interface LocationResult {
91
- // latitude: number;
92
- // longitude: number;
93
- // speed: number;
94
- // accuracy: number;
95
- // altitude: number;
96
- // verticalAccuracy: number;
97
- // horizontalAccuracy: number;
98
- // }
99
-
100
- // export interface LocationError {
101
- // errorCode: number;
102
- // errorMessage?: string;
103
- // message?: string;
104
- // }
105
-
106
- // // Device Info
107
- // export interface DeviceInfo {
108
- // appVersion: string;
109
- // versionCode: string;
110
- // deviceType: string;
111
- // osVersion: string;
112
- // manufacturer: string;
113
- // model: string;
114
- // localTimezone: string;
115
- // MP_E_SIM: string;
116
- // canBack: string;
117
- // }
118
-
119
- // // Display Info
120
- // export interface DisplayInfo {
121
- // darkMode: 0 | 1;
122
- // hasNotch: 0 | 1;
123
- // notchHeight: string;
124
- // }
125
-
126
- // // Framework types
127
- // export interface BotimFramework {
128
- // Run: (success: ($rootScope: any, BOT: BridgeInstance) => void, showLog: boolean) => void;
129
- // }
130
-
131
- // export interface FrameworkConfig {
132
- // showLog: boolean;
133
- // }
134
-
135
- // // Main exports
136
- // export function useBOT(): BridgeInstance;
137
- // export function useFramework(config?: FrameworkConfig): Promise<BridgeInstance>;
138
- // export function getNetworkType(): Promise<string>;
139
- // }
@@ -1,97 +0,0 @@
1
-
2
- // Type definitions for @botim/bootstrap-mp
3
- import { AppDisplayInfoType } from '@/stores/types';
4
- import { ClientInfo } from '@/modules/core/utils/common/types';
5
-
6
- // Type definitions for @botim/framework
7
- declare module '@botim/framework' {
8
- import { BridgeInstance } from '@botim/framework/dist/types';
9
-
10
- interface BotimFramework {
11
- Run: (success: ($rootScope: any, BOT: BridgeInstance) => void, showLog: boolean) => void;
12
- }
13
-
14
- interface FrameworkConfig {
15
- showLog: boolean;
16
- }
17
-
18
- // Properly typed useBOT function instead of returning 'any'
19
- function useBOT(): BridgeInstance;
20
-
21
- function useFramework(config?: FrameworkConfig): Promise<BridgeInstance>;
22
-
23
- // Utility functions exported directly from the module
24
- function getNetworkType(): Promise<string>;
25
- }
26
-
27
- // Re-export BridgeInstance interface for convenience
28
- declare module '@botim/framework/dist/types' {
29
-
30
- interface BridgeInstance {
31
- // Original methods
32
- onLaunch: (cb: () => void) => void;
33
- getUserInfo: () => Promise<any>;
34
- getMpAuthCode: () => Promise<any>;
35
- doLogin: () => Promise<any>;
36
- getNetworkType: () => Promise<any>;
37
-
38
- // Navigation methods
39
- closeCurrent: () => void;
40
- navigateTo: ({ url, payload }: { url: string, payload?: Record<PropertyKey, string> }) => void;
41
- navigateTo: (url: string) => void;
42
-
43
- redirectTo: (url: string) => void;
44
- navigateBack: () => void;
45
- reLaunch: () => void;
46
-
47
- // Storage methods
48
- getStorageSync: (key: string) => string | undefined;
49
- setStorageSync: (key: string, value: string) => void;
50
-
51
- // Page and app methods
52
- getPageQuery: (name: string) => string | undefined;
53
-
54
- // Device and platform methods
55
- isiOS: () => boolean;
56
- allowContentOffSet: (options: { isNotAllow: boolean }) => void;
57
- checkAPILevel: (version: string | number) => boolean;
58
- getClientInfo: () => ClientInfo;
59
-
60
- // Native bridge methods
61
- nativeCall: (options: {
62
- method: string;
63
- parameters: string[];
64
- callback: {
65
- success: (res: any) => void;
66
- fail: (error: any) => void;
67
- };
68
- }) => void;
69
-
70
-
71
- // Display information related
72
- getDisplayInfoSync: () => AppDisplayInfoType;
73
-
74
- // Platform and device related
75
- isRtl: () => boolean;
76
- isiOS: () => boolean;
77
- isAndroid: () => boolean;
78
- allowContentOffSet: (options: { isNotAllow: boolean }) => void;
79
-
80
- // Keyboard related
81
- onKeyboardPop: (callback: (val: { data: { keyboardHeight: number, keyboardStatus: number } }) => void) => void;
82
-
83
- // App related
84
- App: () => { theme: { container: string }; [key: PropertyKey]: unknown };
85
-
86
- mpTrack: (options: Record<PropertyKey, unknown>) => void;
87
-
88
- closeAll: () => void;
89
-
90
- requestPayment: (options: Record<PropertyKey, unknown>, callback: { success: (res: unknown) => void, fail: (error: unknown) => void }) => void;
91
-
92
- onRestart: (callback: () => void) => void;
93
-
94
- // Catch-all for other properties
95
- [k: string]: unknown;
96
- }
97
- }
@@ -1,6 +0,0 @@
1
- export function formatCurrency(amount: number, currency = 'USD'): string {
2
- return new Intl.NumberFormat('en-US', {
3
- style: 'currency',
4
- currency
5
- }).format(amount);
6
- }
@@ -1,5 +0,0 @@
1
- import dayjs from 'dayjs';
2
-
3
- export function formatDate(value: string | number | Date, format = 'YYYY-MM-DD'): string {
4
- return dayjs(value).format(format);
5
- }
@@ -1,4 +0,0 @@
1
- export function assert(condition: unknown, message: string): asserts condition {
2
- if (!condition)
3
- throw new Error(message);
4
- }
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />
@@ -1,39 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
5
- "module": "ESNext",
6
- "moduleResolution": "Bundler",
7
- "allowSyntheticDefaultImports": true,
8
- "allowImportingTsExtensions": true,
9
- "useDefineForClassFields": true,
10
- "resolveJsonModule": true,
11
- "esModuleInterop": true,
12
- "skipLibCheck": true,
13
- "strict": true,
14
- "noUnusedLocals": true,
15
- "noUnusedParameters": true,
16
- "noFallthroughCasesInSwitch": true,
17
- "types": [],
18
- "noEmit": true,
19
- "jsx": "react-jsx",
20
- "jsxImportSource": "@emotion/react",
21
- "baseUrl": ".",
22
- "paths": {
23
- "@/*": ["src/*"],
24
- "@modules/*": ["src/modules/*"],
25
- "@components/*": ["src/components/*"],
26
- "@hooks/*": ["src/hooks/*"],
27
- "@i18n/*": ["src/i18n/*"],
28
- "@pages/*": ["src/pages/*"],
29
- "@stores/*": ["src/stores/*"],
30
- "@styles/*": ["src/styles/*"],
31
- "@theme/*": ["src/theme/*"],
32
- "@utils/*": ["src/utils/*"]
33
- },
34
- "sourceMap": true
35
- },
36
- "include": ["src", "types"],
37
- "exclude": ["node_modules", "dist"],
38
- "references": [{ "path": "./tsconfig.node.json" }]
39
- }
@@ -1,11 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "skipLibCheck": true,
5
- "module": "ESNext",
6
- "moduleResolution": "Bundler",
7
- "allowSyntheticDefaultImports": true,
8
- "types": ["node"]
9
- },
10
- "include": ["vite.config.ts", "eslint.config.ts"]
11
- }
@@ -1,131 +0,0 @@
1
- declare module 'eslint-plugin-jsx-a11y';
2
-
3
- // Type definitions for @botim/framework
4
- // This fixes the module resolution issue where exports don't properly expose types
5
- declare module '@botim/framework' {
6
- // Core types
7
- export interface BridgeInstance {
8
- // Lifecycle
9
- onLaunch: (cb: () => void) => void;
10
- onRestart: (callback: () => void) => void;
11
-
12
- // Auth & User
13
- getUserInfo: () => Promise<any>;
14
- getMpAuthCode: () => Promise<any>;
15
- doLogin: () => Promise<any>;
16
-
17
- // Navigation
18
- closeCurrent: () => void;
19
- closeAll: () => void;
20
- navigateTo: (options: { url: string; payload?: Record<string, string> } | string) => void;
21
- redirectTo: (url: string) => void;
22
- navigateBack: () => void;
23
- reLaunch: () => void;
24
-
25
- // Storage
26
- getStorageSync: (key: string) => string | undefined;
27
- setStorageSync: (key: string, value: string) => void;
28
-
29
- // Page & Query
30
- getPageQuery: (name: string) => string | undefined;
31
-
32
- // Device & Platform
33
- isiOS: () => boolean;
34
- isAndroid: () => boolean;
35
- isRtl: () => boolean;
36
- getNetworkType: () => Promise<any>;
37
- getClientInfo: () => DeviceInfo;
38
- getDisplayInfoSync: () => DisplayInfo;
39
- allowContentOffSet: (options: { isNotAllow: boolean }) => void;
40
- checkAPILevel: (version: string | number) => boolean;
41
-
42
- // Location
43
- getLocation: (options: LocationOptions) => void;
44
-
45
- // Native Bridge
46
- nativeCall: (options: {
47
- method: string;
48
- parameters: string[];
49
- callback: {
50
- success: (res: any) => void;
51
- fail: (error: any) => void;
52
- };
53
- }) => void;
54
-
55
- // Keyboard
56
- onKeyboardPop: (callback: (val: { data: { keyboardHeight: number; keyboardStatus: number } }) => void) => void;
57
-
58
- // App & Theming
59
- App: () => { theme: { container: string }; [key: string]: unknown };
60
-
61
- // Analytics & Payment
62
- mpTrack: (options: Record<string, unknown>) => void;
63
- requestPayment: (
64
- options: Record<string, unknown>,
65
- callback: { success: (res: unknown) => void; fail: (error: unknown) => void }
66
- ) => void;
67
-
68
- // Catch-all for other properties
69
- [k: string]: unknown;
70
- }
71
-
72
- // Location Types
73
- export interface LocationOptions {
74
- altitude?: boolean;
75
- isHighAccuracy?: boolean;
76
- expireTime?: number;
77
- success?: (result: LocationResult) => void;
78
- fail?: (error: LocationError) => void;
79
- complete?: () => void;
80
- }
81
-
82
- export interface LocationResult {
83
- latitude: number;
84
- longitude: number;
85
- speed: number;
86
- accuracy: number;
87
- altitude: number;
88
- verticalAccuracy: number;
89
- horizontalAccuracy: number;
90
- }
91
-
92
- export interface LocationError {
93
- errorCode: number;
94
- errorMessage?: string;
95
- message?: string;
96
- }
97
-
98
- // Device Info
99
- export interface DeviceInfo {
100
- appVersion: string;
101
- versionCode: string;
102
- deviceType: string;
103
- osVersion: string;
104
- manufacturer: string;
105
- model: string;
106
- localTimezone: string;
107
- MP_E_SIM: string;
108
- canBack: string;
109
- }
110
-
111
- // Display Info
112
- export interface DisplayInfo {
113
- darkMode: 0 | 1;
114
- hasNotch: 0 | 1;
115
- notchHeight: string;
116
- }
117
-
118
- // Framework types
119
- export interface BotimFramework {
120
- Run: (success: ($rootScope: any, BOT: BridgeInstance) => void, showLog: boolean) => void;
121
- }
122
-
123
- export interface FrameworkConfig {
124
- showLog?: boolean;
125
- }
126
-
127
- // Main exports
128
- export function useBOT(): BridgeInstance;
129
- export function useFramework(config?: FrameworkConfig): Promise<BridgeInstance>;
130
- export function getNetworkType(): Promise<string>;
131
- }