@myinterview/widget-react 1.1.7 → 1.1.9
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/dist/cjs/components/VideoQuestion.d.ts +3 -1
- package/dist/cjs/index.js +3023 -1281
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/configInterface.d.ts +3 -0
- package/dist/cjs/interfaces/recorderInterface.d.ts +2 -1
- package/dist/cjs/interfaces/widgetInterface.d.ts +2 -0
- package/dist/cjs/services/event.service.d.ts +52 -0
- package/dist/cjs/utils/recorderErrors.utils.d.ts +28 -4
- package/dist/esm/components/VideoQuestion.d.ts +3 -1
- package/dist/esm/index.js +3023 -1281
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/configInterface.d.ts +3 -0
- package/dist/esm/interfaces/recorderInterface.d.ts +2 -1
- package/dist/esm/interfaces/widgetInterface.d.ts +2 -0
- package/dist/esm/services/event.service.d.ts +52 -0
- package/dist/esm/utils/recorderErrors.utils.d.ts +28 -4
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -30,6 +30,7 @@ interface IConfig {
|
|
|
30
30
|
hideHeader?: boolean;
|
|
31
31
|
hideIntercom?: boolean;
|
|
32
32
|
disablePractice?: boolean;
|
|
33
|
+
event_id?: string;
|
|
33
34
|
}
|
|
34
35
|
export type IClientConfig = Omit<IConfig, 'practiceQuestions'> & {
|
|
35
36
|
practiceQuestions?: IClientQuestion[];
|
|
@@ -38,6 +39,7 @@ export interface IWidgetConfig {
|
|
|
38
39
|
video?: IVideo;
|
|
39
40
|
candidate: ICandidate;
|
|
40
41
|
job?: IJob;
|
|
42
|
+
event_id?: string;
|
|
41
43
|
company?: ICompany;
|
|
42
44
|
config: IConfig;
|
|
43
45
|
disabled?: boolean;
|
|
@@ -55,6 +57,7 @@ export interface IWidgetConfigResponse {
|
|
|
55
57
|
video: IVideo;
|
|
56
58
|
candidate: ICandidate;
|
|
57
59
|
job: IJob;
|
|
60
|
+
event_id?: string;
|
|
58
61
|
}
|
|
59
62
|
export interface IWidgetConfigRequest {
|
|
60
63
|
video?: IVideo;
|
|
@@ -93,7 +93,8 @@ export declare const enum ACTIONS {
|
|
|
93
93
|
RESET_MACHINE = "RESET_MACHINE",
|
|
94
94
|
UPDATE_MACHINE_FOR_NEW_QUESTION = "UPDATE_MACHINE_FOR_NEW_QUESTION",
|
|
95
95
|
SET_MEDIA_RECORDER = "SET_MEDIA_RECORDER",
|
|
96
|
-
SET_MIC_ERROR = "SET_MIC_ERROR"
|
|
96
|
+
SET_MIC_ERROR = "SET_MIC_ERROR",
|
|
97
|
+
SET_PERMISSION_LISTENER = "SET_PERMISSION_LISTENER"
|
|
97
98
|
}
|
|
98
99
|
export declare const enum EVENTS {
|
|
99
100
|
SEND_RECORDER_TO_WAITING_STATE = "SEND_RECORDER_TO_WAITING_STATE",
|
|
@@ -162,6 +162,8 @@ export declare const enum ACTIONS {
|
|
|
162
162
|
SENTRY = "sentry",
|
|
163
163
|
SET_SESSION = "setSession",
|
|
164
164
|
SESSION_EVENT = "sessionEvent",
|
|
165
|
+
SET_EVENT_ID = "setEventId",
|
|
166
|
+
EMIT_TRACKING_EVENT = "emitTrackingEvent",
|
|
165
167
|
REVOKE_MEMORY = "revokeMemory",
|
|
166
168
|
UPDATE_VIDEO_OBJECT = "updateVideoObject",
|
|
167
169
|
UPDATE_VIDEO_PART = "updateVideoPart",
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export declare enum BANDWIDTH_CONNECTION {
|
|
2
|
+
GOOD = "good",
|
|
3
|
+
SLOW = "slow",
|
|
4
|
+
VERY_SLOW = "very_slow"
|
|
5
|
+
}
|
|
6
|
+
export declare const enum EVENT_TYPES {
|
|
7
|
+
PAGE_OPEN = "pageOpen",
|
|
8
|
+
FORM_FILLED = "formFilled",
|
|
9
|
+
START_INTERVIEW = "startInterview",
|
|
10
|
+
DOCUMENT_UPLOADED = "documentUploaded",
|
|
11
|
+
TOP_TIPS_CLICKED = "topTipsClicked",
|
|
12
|
+
TOP_TIPS_LIKED = "topTipsLiked",
|
|
13
|
+
TOP_TIPS_DISLIKED = "topTipsDisliked",
|
|
14
|
+
INTRO_VIDEO_PLAYED = "introVideoPlayed",
|
|
15
|
+
OPEN_WIDGET = "openWidget",
|
|
16
|
+
WELCOME_STATE_START_BUTTON = "welcomeStateStartButton",
|
|
17
|
+
WELCOME_STATE_TOP_TIPS = "welcomeStateTopTips",
|
|
18
|
+
WELCOME_STATE_VIDEO_FULLY_WATCHED = "welcomeStateVideoFullyWatched",
|
|
19
|
+
PERMISSION_DENIED = "permissionsDenied",
|
|
20
|
+
PERMISSION_GRANTED = "permissionsGranted",
|
|
21
|
+
CAMRTA_INITIALIZED = "cameraInitialized",
|
|
22
|
+
MIC_INITIALIZED = "micInitialized",
|
|
23
|
+
BANDWIDTH_CHECK = "bandwidthCheck",
|
|
24
|
+
VIDEO_QUESTION_WATCHED = "videoQuestionWatched",
|
|
25
|
+
VIDEO_QUESTION_PLAY = "videoQuestionPlay",
|
|
26
|
+
VIDEO_QUESTION_PAUSE = "videoQuestionPause",
|
|
27
|
+
PRACTICE_CLICKED = "practiceClicked",
|
|
28
|
+
PRACTICE_STARTED = "practiceStarted",
|
|
29
|
+
PRACTICE_ENDED = "practiceEnded",
|
|
30
|
+
PRACTICE_FINISHED = "practiceFinished",
|
|
31
|
+
PRACTICE_SKIPPED = "practiceSkipped",
|
|
32
|
+
START_CLICKED = "startClicked",
|
|
33
|
+
MINIMIZE_WIDGET = "minimizeWidget",
|
|
34
|
+
QUESTION_STARTED = "questionStarted",
|
|
35
|
+
QUESTION_ENDED = "questionEnded",
|
|
36
|
+
RETAKE_CLICKED = "retakeClicked",
|
|
37
|
+
NO_SOUND = "noSound",
|
|
38
|
+
CAMERA_CHANGED = "cameraChanged",
|
|
39
|
+
MICROPHONE_CHANGED = "microphoneChanged",
|
|
40
|
+
SOUND_RESTORED = "soundRestored",
|
|
41
|
+
TIMES_UP = "timesUp",
|
|
42
|
+
COMPLETED_INTERVIEW = "completedInterview"
|
|
43
|
+
}
|
|
44
|
+
export type IEventType = `${EVENT_TYPES}`;
|
|
45
|
+
export interface ITrackEvent {
|
|
46
|
+
eventType: IEventType;
|
|
47
|
+
extraData?: any;
|
|
48
|
+
}
|
|
49
|
+
declare let event_id: string | undefined;
|
|
50
|
+
export declare const updateEventId: (eventId: typeof event_id) => void;
|
|
51
|
+
export declare const emitTrackEvent: (eventData: ITrackEvent) => void;
|
|
52
|
+
export {};
|
|
@@ -21,9 +21,33 @@ export declare const ERROR_ENUM: {
|
|
|
21
21
|
VideoCorrupted: string;
|
|
22
22
|
};
|
|
23
23
|
export declare const recorderErrors: {
|
|
24
|
-
[x: string]: {
|
|
25
|
-
type: string;
|
|
26
|
-
message:
|
|
27
|
-
name: string;
|
|
24
|
+
readonly [x: string]: {
|
|
25
|
+
readonly type: string;
|
|
26
|
+
readonly message: "User denies permission, or matching media is not available";
|
|
27
|
+
readonly name: string;
|
|
28
|
+
} | {
|
|
29
|
+
readonly type: string;
|
|
30
|
+
readonly message: "Problem occurred which prevented the device from being used.";
|
|
31
|
+
readonly name: string;
|
|
32
|
+
} | {
|
|
33
|
+
readonly type: string;
|
|
34
|
+
readonly message: "No camera exists with this resolution or higher. Also it can be an issue with other params";
|
|
35
|
+
readonly name: string;
|
|
36
|
+
} | {
|
|
37
|
+
readonly type: string;
|
|
38
|
+
readonly message: "The list of constraints specified is empty";
|
|
39
|
+
readonly name: string;
|
|
40
|
+
} | {
|
|
41
|
+
readonly type: string;
|
|
42
|
+
readonly message: "no sound from your mic";
|
|
43
|
+
readonly name: string;
|
|
44
|
+
} | {
|
|
45
|
+
readonly type: string;
|
|
46
|
+
readonly message: "Oops, something unexpected happened.";
|
|
47
|
+
readonly name: string;
|
|
48
|
+
} | {
|
|
49
|
+
readonly type: string;
|
|
50
|
+
readonly message: "Something went wrong with this video, please try again";
|
|
51
|
+
readonly name: string;
|
|
28
52
|
};
|
|
29
53
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ITrackEvent } from '../services/event.service';
|
|
2
3
|
interface IProps {
|
|
3
4
|
src: string;
|
|
4
5
|
isThinkingTime: boolean;
|
|
5
|
-
onVideoEnds: () => void;
|
|
6
|
+
onVideoEnds: (count: number) => void;
|
|
6
7
|
hidden?: boolean;
|
|
7
8
|
isWidgetMinimized: boolean;
|
|
9
|
+
onVideoStateChanged?: (eventData: ITrackEvent) => void;
|
|
8
10
|
}
|
|
9
11
|
export declare const VideoQuestion: React.FC<IProps>;
|
|
10
12
|
export {};
|