agora-appbuilder-core 4.1.24-beta.2 → 4.1.24-beta.3
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
CHANGED
|
@@ -21,6 +21,7 @@ export {customize, $config};
|
|
|
21
21
|
export * from './action-library';
|
|
22
22
|
export * from './app-state';
|
|
23
23
|
export * from './customEvents';
|
|
24
|
+
export * from './logger';
|
|
24
25
|
export * from './sub-components';
|
|
25
26
|
export * from './typeDefinition';
|
|
26
27
|
export * from './utils';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CustomizationLogType,
|
|
3
|
+
LogSource,
|
|
4
|
+
logger,
|
|
5
|
+
} from '../src/logger/AppBuilderLogger';
|
|
6
|
+
|
|
7
|
+
export type CustomizationLogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
8
|
+
export type CustomizationLogData = Record<string, unknown>;
|
|
9
|
+
export type CustomizationLogEvent = {
|
|
10
|
+
type: CustomizationLogType;
|
|
11
|
+
event: string;
|
|
12
|
+
data?: CustomizationLogData;
|
|
13
|
+
level?: CustomizationLogLevel;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Sends a customization event through the active App Builder log transport.
|
|
18
|
+
* The logger adds the current session, room, user, platform, and SDK context.
|
|
19
|
+
* Callers must redact credentials and other sensitive values before logging.
|
|
20
|
+
*/
|
|
21
|
+
export const logCustomizationEvent = ({
|
|
22
|
+
type,
|
|
23
|
+
event,
|
|
24
|
+
data,
|
|
25
|
+
level = 'info',
|
|
26
|
+
}: CustomizationLogEvent) => {
|
|
27
|
+
if (data) {
|
|
28
|
+
logger[level](LogSource.CustomizationAPI, type, event, data);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
logger[level](LogSource.CustomizationAPI, type, event);
|
|
33
|
+
};
|
|
@@ -77,8 +77,8 @@ const DefaultConfig = {
|
|
|
77
77
|
CHAT_ORG_NAME: "",
|
|
78
78
|
CHAT_APP_NAME: "",
|
|
79
79
|
CHAT_URL: "",
|
|
80
|
-
CLI_VERSION: "3.1.24-beta.
|
|
81
|
-
CORE_VERSION: "4.1.24-beta.
|
|
80
|
+
CLI_VERSION: "3.1.24-beta.3",
|
|
81
|
+
CORE_VERSION: "4.1.24-beta.3",
|
|
82
82
|
DISABLE_LANDSCAPE_MODE: false,
|
|
83
83
|
STT_AUTO_START: false,
|
|
84
84
|
CLOUD_RECORDING_AUTO_START: false,
|
|
@@ -137,6 +137,15 @@ const AuthProvider = (props: AuthProviderProps) => {
|
|
|
137
137
|
}
|
|
138
138
|
}, [store?.token]);
|
|
139
139
|
|
|
140
|
+
// A running native app is already authenticated when it receives a URL
|
|
141
|
+
// event, so there may be no later token change to consume returnTo.
|
|
142
|
+
useEffect(() => {
|
|
143
|
+
if (authenticated && returnTo && (isAndroid() || isIOS())) {
|
|
144
|
+
history.push(returnTo);
|
|
145
|
+
setReturnTo('');
|
|
146
|
+
}
|
|
147
|
+
}, [authenticated, history, returnTo]);
|
|
148
|
+
|
|
140
149
|
const deepLinkUrl = (link: string | null) => {
|
|
141
150
|
if (link !== null) {
|
|
142
151
|
if (lifecycle?.onDeepLink?.(link)) {
|
|
@@ -38,6 +38,8 @@ export declare const StatusTypes: {
|
|
|
38
38
|
|
|
39
39
|
export type StatusType = (typeof StatusTypes)[keyof typeof StatusTypes];
|
|
40
40
|
|
|
41
|
+
export type CustomizationLogType = string;
|
|
42
|
+
|
|
41
43
|
export enum LogSource {
|
|
42
44
|
AgoraSDK = 'Agora-SDK',
|
|
43
45
|
/** Logs related to all features */
|
|
@@ -107,10 +109,7 @@ type LogType = {
|
|
|
107
109
|
| 'recording_delete'
|
|
108
110
|
| 'ban_user';
|
|
109
111
|
[LogSource.Events]: 'CUSTOM_EVENTS' | 'RTM_EVENTS';
|
|
110
|
-
[LogSource.CustomizationAPI]:
|
|
111
|
-
| 'Log'
|
|
112
|
-
| 'AI_AGENT_CUSTOMIZATION'
|
|
113
|
-
| 'EXTERNAL_CUSTOMIZATION';
|
|
112
|
+
[LogSource.CustomizationAPI]: CustomizationLogType;
|
|
114
113
|
[LogSource.SDK]: 'Log' | 'Event';
|
|
115
114
|
};
|
|
116
115
|
|