@vizbeetv/homesso-sdk-qa 1.0.3 → 1.0.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/es5/index.cjs +74 -41
- package/es5/index.mjs +67 -34
- package/es6/index.cjs +64 -40
- package/es6/index.mjs +57 -33
- package/package.json +1 -1
- package/types/VizbeeHomeSSOManager.d.ts +12 -2
- package/types/index.d.ts +46 -22
- package/types/metrics/VizbeeMetricsManager.d.ts +3 -3
- package/types/model/VizbeeSenderSignInInfo.d.ts +1 -1
- package/types/model/VizbeeSignInInfo.d.ts +9 -2
- package/types/model/VizbeeSignInStatus.d.ts +9 -9
- package/types/types.d.ts +21 -4
- package/types/ui/VizbeeHomeSSOUIConfig.d.ts +9 -0
- package/types/ui/VizbeeHomeSSOUIManager.d.ts +2 -6
- package/types/utils/constants.d.ts +9 -0
- package/types/utils/http-client.d.ts +7 -7
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { VizbeeSignInState } from '../utils/constants';
|
|
2
2
|
declare abstract class VizbeeSignInStatus {
|
|
3
3
|
readonly signInType: string;
|
|
4
|
-
readonly customData: Record<string,
|
|
5
|
-
protected constructor(signInType: string, customData: Record<string,
|
|
4
|
+
readonly customData: Record<string, unknown> | null;
|
|
5
|
+
protected constructor(signInType: string, customData: Record<string, unknown> | null);
|
|
6
6
|
abstract getState(): VizbeeSignInState;
|
|
7
|
-
serialize(): Record<string,
|
|
7
|
+
serialize(): Record<string, unknown>;
|
|
8
8
|
}
|
|
9
9
|
export declare class ProgressStatus extends VizbeeSignInStatus {
|
|
10
10
|
readonly signInType: string;
|
|
11
|
-
readonly customData: Record<string,
|
|
12
|
-
constructor(signInType: string, customData?: Record<string,
|
|
11
|
+
readonly customData: Record<string, unknown> | null;
|
|
12
|
+
constructor(signInType: string, customData?: Record<string, unknown> | null);
|
|
13
13
|
getState(): VizbeeSignInState;
|
|
14
14
|
}
|
|
15
15
|
export declare class SuccessStatus extends VizbeeSignInStatus {
|
|
16
16
|
readonly signInType: string;
|
|
17
17
|
readonly userId: string | null;
|
|
18
|
-
readonly customData: Record<string,
|
|
19
|
-
constructor(signInType: string, userId?: string | null, customData?: Record<string,
|
|
18
|
+
readonly customData: Record<string, unknown> | null;
|
|
19
|
+
constructor(signInType: string, userId?: string | null, customData?: Record<string, unknown> | null);
|
|
20
20
|
getState(): VizbeeSignInState;
|
|
21
21
|
}
|
|
22
22
|
export declare class FailureStatus extends VizbeeSignInStatus {
|
|
@@ -24,8 +24,8 @@ export declare class FailureStatus extends VizbeeSignInStatus {
|
|
|
24
24
|
readonly isCancelled: boolean;
|
|
25
25
|
readonly reason: string | null;
|
|
26
26
|
readonly exception: Error | null;
|
|
27
|
-
readonly customData: Record<string,
|
|
28
|
-
constructor(signInType: string, isCancelled: boolean, reason?: string | null, exception?: Error | null, customData?: Record<string,
|
|
27
|
+
readonly customData: Record<string, unknown> | null;
|
|
28
|
+
constructor(signInType: string, isCancelled: boolean, reason?: string | null, exception?: Error | null, customData?: Record<string, unknown> | null);
|
|
29
29
|
getState(): VizbeeSignInState;
|
|
30
30
|
}
|
|
31
31
|
export {};
|
package/types/types.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface VizbeeSenderDevice {
|
|
|
20
20
|
*/
|
|
21
21
|
export interface IVizbeeMessagingClient {
|
|
22
22
|
addReceiver(namespace: string, callback: (payload: MessagePayload, namespace: string, device: VizbeeSenderDevice) => void): void;
|
|
23
|
-
send(payload: Record<string,
|
|
23
|
+
send(payload: Record<string, unknown>, namespace: string): Promise<void>;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Manages a communication session and provides access to messaging capabilities
|
|
@@ -49,6 +49,23 @@ export interface IVizbeeXMessages {
|
|
|
49
49
|
new (): IVizbeeBicastSessionManager;
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* The sign-in info object passed to the handler registered via
|
|
54
|
+
* VizbeeHomeSSOManager.setSignInHandler(). Contains the sign-in context
|
|
55
|
+
* received from the mobile sender device.
|
|
56
|
+
*/
|
|
57
|
+
export interface IVizbeeSignInInfo {
|
|
58
|
+
isSignedIn: boolean;
|
|
59
|
+
signInType: string;
|
|
60
|
+
deviceId?: string;
|
|
61
|
+
deviceType?: string;
|
|
62
|
+
customData?: Record<string, unknown>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Callback used inside the sign-in handler to report progress, success, or
|
|
66
|
+
* failure back to the HomeSSO SDK (and on to the mobile sender).
|
|
67
|
+
*/
|
|
68
|
+
export type StatusCallback = (status: ProgressStatus | SuccessStatus | FailureStatus) => void;
|
|
52
69
|
/**
|
|
53
70
|
* Interface for sign-in status callbacks
|
|
54
71
|
*/
|
|
@@ -69,9 +86,9 @@ export interface ISignInModalManager {
|
|
|
69
86
|
updateSignInStatus(state: VizbeeSignInState, preferences: VizbeeModalPreferences, isRemoteSignedIn: boolean): void;
|
|
70
87
|
}
|
|
71
88
|
export interface IVizbeeAnalyticsProvider {
|
|
72
|
-
logMetrics(eventName: string, properties: Record<string,
|
|
73
|
-
setCustomAttributes(customAttributes: Record<string,
|
|
89
|
+
logMetrics(eventName: string, properties: Record<string, unknown>): void;
|
|
90
|
+
setCustomAttributes(customAttributes: Record<string, unknown>): void;
|
|
74
91
|
}
|
|
75
92
|
export interface IVizbeeAttributesProvider {
|
|
76
|
-
getAttributes(): Promise<Record<string,
|
|
93
|
+
getAttributes(): Promise<Record<string, unknown>>;
|
|
77
94
|
}
|
|
@@ -125,6 +125,15 @@ export interface SuccessSignInPreferenceConfig {
|
|
|
125
125
|
enable: boolean;
|
|
126
126
|
options: SuccessSignInPreferenceOptions;
|
|
127
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Return type of VizbeeHomeSSOUIManager.getDefaultConfig().
|
|
130
|
+
* Contains the resolved (theme-applied) default options for each modal state.
|
|
131
|
+
*/
|
|
132
|
+
export interface VizbeeHomeSSODefaultConfig {
|
|
133
|
+
informational: InformationalSignInPreferenceOptions;
|
|
134
|
+
progress: ProgressSignInPreferenceOptions;
|
|
135
|
+
success: SuccessSignInPreferenceOptions;
|
|
136
|
+
}
|
|
128
137
|
/**
|
|
129
138
|
* Main configuration interface combining all UI components
|
|
130
139
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Manages UI configuration for Vizbee Home SSO implementation
|
|
3
3
|
* Handles theme customization and modal preferences for different sign-in states
|
|
4
4
|
*/
|
|
5
|
-
import { CommonModalPreferenceOptions, InformationalSignInPreferenceOptions, ProgressSignInPreferenceOptions, SuccessSignInPreferenceOptions, VizbeeHomeSSOTheme } from './VizbeeHomeSSOUIConfig';
|
|
5
|
+
import { CommonModalPreferenceOptions, InformationalSignInPreferenceOptions, ProgressSignInPreferenceOptions, SuccessSignInPreferenceOptions, VizbeeHomeSSODefaultConfig, VizbeeHomeSSOTheme } from './VizbeeHomeSSOUIConfig';
|
|
6
6
|
/**
|
|
7
7
|
* Singleton class responsible for managing UI configurations for Home SSO experience
|
|
8
8
|
* Handles theme customization and specific modal configurations for different sign-in states
|
|
@@ -49,11 +49,7 @@ export declare class VizbeeHomeSSOUIManager {
|
|
|
49
49
|
* Returns default configurations for all modal types
|
|
50
50
|
* @returns Object containing default configs for informational, progress, and success modals
|
|
51
51
|
*/
|
|
52
|
-
getDefaultConfig():
|
|
53
|
-
informational: InformationalSignInPreferenceOptions;
|
|
54
|
-
progress: ProgressSignInPreferenceOptions;
|
|
55
|
-
success: SuccessSignInPreferenceOptions;
|
|
56
|
-
};
|
|
52
|
+
getDefaultConfig(): VizbeeHomeSSODefaultConfig;
|
|
57
53
|
/**
|
|
58
54
|
* Updates the current theme configuration
|
|
59
55
|
* @param theme - Partial theme configuration to merge with current theme
|
|
@@ -18,6 +18,15 @@ export declare const VizbeeConstants: {
|
|
|
18
18
|
readonly EVENT_SUBTYPE_SIGN_IN_STATUS: "sign_in_status";
|
|
19
19
|
readonly VIZBEE_SESSION_READY: "vizbee-bicast-session-ready";
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Numeric session states reported by the Continuity SDK's bicast session manager.
|
|
23
|
+
* Mirrors SessionState in the VTV SDK — defined here so HomeSSO has no magic numbers.
|
|
24
|
+
*/
|
|
25
|
+
export declare const VizbeeSessionState: {
|
|
26
|
+
readonly NOT_CONNECTED: 1;
|
|
27
|
+
readonly CONNECTING: 2;
|
|
28
|
+
readonly CONNECTED: 3;
|
|
29
|
+
};
|
|
21
30
|
export declare enum VizbeeSignInState {
|
|
22
31
|
SIGN_IN_NOT_STARTED = "not_started",
|
|
23
32
|
SIGN_IN_IN_PROGRESS = "in_progress",
|
|
@@ -16,7 +16,7 @@ export interface RequestConfig extends RequestInit {
|
|
|
16
16
|
/**
|
|
17
17
|
* Standard HTTP response format with type safety
|
|
18
18
|
*/
|
|
19
|
-
export interface HttpResponse<T =
|
|
19
|
+
export interface HttpResponse<T = unknown> {
|
|
20
20
|
/** Response data of type T */
|
|
21
21
|
data: T;
|
|
22
22
|
/** HTTP status code */
|
|
@@ -32,14 +32,14 @@ export interface HttpResponse<T = any> {
|
|
|
32
32
|
export declare class HttpError extends Error {
|
|
33
33
|
message: string;
|
|
34
34
|
status?: number | undefined;
|
|
35
|
-
response?:
|
|
35
|
+
response?: unknown | undefined;
|
|
36
36
|
/**
|
|
37
37
|
* Creates a new HttpError instance
|
|
38
38
|
* @param message Error message
|
|
39
39
|
* @param status HTTP status code
|
|
40
40
|
* @param response Raw response data
|
|
41
41
|
*/
|
|
42
|
-
constructor(message: string, status?: number | undefined, response?:
|
|
42
|
+
constructor(message: string, status?: number | undefined, response?: unknown | undefined);
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* A feature-rich HTTP client with support for timeouts, retries, and type safety
|
|
@@ -59,7 +59,7 @@ export declare class HttpClient {
|
|
|
59
59
|
* @param config Request configuration
|
|
60
60
|
* @returns Promise resolving to typed response
|
|
61
61
|
*/
|
|
62
|
-
get<T =
|
|
62
|
+
get<T = unknown>(endpoint: string, config?: RequestConfig): Promise<HttpResponse<T>>;
|
|
63
63
|
/**
|
|
64
64
|
* Performs a POST request
|
|
65
65
|
* @param endpoint API endpoint
|
|
@@ -67,7 +67,7 @@ export declare class HttpClient {
|
|
|
67
67
|
* @param config Request configuration
|
|
68
68
|
* @returns Promise resolving to typed response
|
|
69
69
|
*/
|
|
70
|
-
post<T =
|
|
70
|
+
post<T = unknown>(endpoint: string, data?: unknown, config?: RequestConfig): Promise<HttpResponse<T>>;
|
|
71
71
|
/**
|
|
72
72
|
* Performs a PUT request
|
|
73
73
|
* @param endpoint API endpoint
|
|
@@ -75,14 +75,14 @@ export declare class HttpClient {
|
|
|
75
75
|
* @param config Request configuration
|
|
76
76
|
* @returns Promise resolving to typed response
|
|
77
77
|
*/
|
|
78
|
-
put<T =
|
|
78
|
+
put<T = unknown>(endpoint: string, data?: unknown, config?: RequestConfig): Promise<HttpResponse<T>>;
|
|
79
79
|
/**
|
|
80
80
|
* Performs a DELETE request
|
|
81
81
|
* @param endpoint API endpoint
|
|
82
82
|
* @param config Request configuration
|
|
83
83
|
* @returns Promise resolving to typed response
|
|
84
84
|
*/
|
|
85
|
-
delete<T =
|
|
85
|
+
delete<T = unknown>(endpoint: string, config?: RequestConfig): Promise<HttpResponse<T>>;
|
|
86
86
|
/**
|
|
87
87
|
* Executes a fetch request with timeout handling
|
|
88
88
|
* @throws {HttpError} When request times out
|