@myinterview/widget-react 1.0.61-experimental → 1.0.61
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/CountDown.d.ts +1 -3
- package/dist/cjs/components/Errors.d.ts +2 -2
- package/dist/cjs/components/Explanation.d.ts +1 -2
- package/dist/cjs/components/Question.d.ts +3 -2
- package/dist/cjs/components/QuestionItem.d.ts +2 -2
- package/dist/cjs/components/QuestionsList.d.ts +2 -2
- package/dist/cjs/components/RecorderModal.d.ts +4 -2
- package/dist/cjs/components/VideoCamera.d.ts +2 -3
- package/dist/cjs/components/ui/StartRecordingButton.d.ts +0 -1
- package/dist/cjs/i18n/config.d.ts +0 -28
- package/dist/cjs/index.js +11865 -2251
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/candidateSessionInterface.d.ts +1 -1
- package/dist/cjs/interfaces/configInterface.d.ts +6 -6
- package/dist/cjs/interfaces/jobInterface.d.ts +3 -43
- package/dist/cjs/interfaces/recorderInterface.d.ts +2 -6
- package/dist/cjs/interfaces/uploaderInterface.d.ts +3 -5
- package/dist/cjs/interfaces/videoInterface.d.ts +1 -25
- package/dist/cjs/interfaces/widgetInterface.d.ts +10 -22
- package/dist/cjs/services/session.service.d.ts +1 -1
- package/dist/cjs/services/video.service.d.ts +3 -3
- package/dist/cjs/utils/constants.utils.d.ts +0 -1
- package/dist/cjs/utils/device.utils.d.ts +1 -1
- package/dist/cjs/utils/formatters.utils.d.ts +1 -1
- package/dist/esm/components/CountDown.d.ts +1 -3
- package/dist/esm/components/Errors.d.ts +2 -2
- package/dist/esm/components/Explanation.d.ts +1 -2
- package/dist/esm/components/Question.d.ts +3 -2
- package/dist/esm/components/QuestionItem.d.ts +2 -2
- package/dist/esm/components/QuestionsList.d.ts +2 -2
- package/dist/esm/components/RecorderModal.d.ts +4 -2
- package/dist/esm/components/VideoCamera.d.ts +2 -3
- package/dist/esm/components/ui/StartRecordingButton.d.ts +0 -1
- package/dist/esm/i18n/config.d.ts +0 -28
- package/dist/esm/index.js +11865 -2251
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/candidateSessionInterface.d.ts +1 -1
- package/dist/esm/interfaces/configInterface.d.ts +6 -6
- package/dist/esm/interfaces/jobInterface.d.ts +3 -43
- package/dist/esm/interfaces/recorderInterface.d.ts +2 -6
- package/dist/esm/interfaces/uploaderInterface.d.ts +3 -5
- package/dist/esm/interfaces/videoInterface.d.ts +1 -25
- package/dist/esm/interfaces/widgetInterface.d.ts +10 -22
- package/dist/esm/services/session.service.d.ts +1 -1
- package/dist/esm/services/video.service.d.ts +3 -3
- package/dist/esm/utils/constants.utils.d.ts +0 -1
- package/dist/esm/utils/device.utils.d.ts +1 -1
- package/dist/esm/utils/formatters.utils.d.ts +1 -1
- package/dist/index.d.ts +9 -68
- package/package.json +9 -9
- package/dist/cjs/components/AnswerInstructions.d.ts +0 -7
- package/dist/cjs/components/AssessmentController.d.ts +0 -12
- package/dist/cjs/components/AssessmentFreeText.d.ts +0 -8
- package/dist/cjs/components/AssessmentMultiSelect.d.ts +0 -9
- package/dist/cjs/components/AssessmentSingleSelect.d.ts +0 -9
- package/dist/cjs/components/CharactersLimit.d.ts +0 -7
- package/dist/cjs/components/QuestionParamaters.d.ts +0 -9
- package/dist/cjs/components/ui/DotSeparator.d.ts +0 -2
- package/dist/cjs/interfaces/countDownInterface.d.ts +0 -23
- package/dist/cjs/machines/acceleratorMachines/counterMachine.d.ts +0 -5
- package/dist/esm/components/AnswerInstructions.d.ts +0 -7
- package/dist/esm/components/AssessmentController.d.ts +0 -12
- package/dist/esm/components/AssessmentFreeText.d.ts +0 -8
- package/dist/esm/components/AssessmentMultiSelect.d.ts +0 -9
- package/dist/esm/components/AssessmentSingleSelect.d.ts +0 -9
- package/dist/esm/components/CharactersLimit.d.ts +0 -7
- package/dist/esm/components/QuestionParamaters.d.ts +0 -9
- package/dist/esm/components/ui/DotSeparator.d.ts +0 -2
- package/dist/esm/interfaces/countDownInterface.d.ts +0 -23
- package/dist/esm/machines/acceleratorMachines/counterMachine.d.ts +0 -5
|
@@ -31,7 +31,7 @@ export declare const enum CandidateSessionWarnings {
|
|
|
31
31
|
OverconstrainedError = "OverconstrainedError",
|
|
32
32
|
SecurityError = "SecurityError"
|
|
33
33
|
}
|
|
34
|
-
export
|
|
34
|
+
export type CandidateSessionSourceType = 'direct' | 'email' | 'sms' | 'email_reminder' | 'sms_reminder';
|
|
35
35
|
export declare const enum CandidateSessionSourceMap {
|
|
36
36
|
direct_start_inter = "direct",
|
|
37
37
|
reminder_start_inter = "email_reminder",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { ICandidate } from './candidateInterface';
|
|
3
3
|
import { ICompany } from './companyInterface';
|
|
4
|
-
import {
|
|
4
|
+
import { IClientJob, IClientQuestion, IJob, IQuestion } from './jobInterface';
|
|
5
5
|
import { IVideo } from './videoInterface';
|
|
6
|
-
export
|
|
6
|
+
export type IMessageType = 'completed' | 'deadline' | 'applied' | 'inactiveJob';
|
|
7
7
|
export interface IOnFinish {
|
|
8
8
|
redirectUrl?: string;
|
|
9
9
|
video_id: string;
|
|
@@ -11,7 +11,7 @@ export interface IOnFinish {
|
|
|
11
11
|
export interface IOnError {
|
|
12
12
|
messageType: IMessageType;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type IEnv = 'dev' | 'staging' | 'production' | 'development' | 'local';
|
|
15
15
|
interface IConfig {
|
|
16
16
|
auth: string;
|
|
17
17
|
onWidgetClicked?: () => void;
|
|
@@ -20,7 +20,7 @@ interface IConfig {
|
|
|
20
20
|
onWidgetClose?: () => void;
|
|
21
21
|
openAnimation?: boolean;
|
|
22
22
|
debug?: boolean;
|
|
23
|
-
practiceQuestions?:
|
|
23
|
+
practiceQuestions?: IQuestion[];
|
|
24
24
|
overlay?: string;
|
|
25
25
|
introVideo?: string;
|
|
26
26
|
welcomeTitle?: string;
|
|
@@ -31,7 +31,7 @@ interface IConfig {
|
|
|
31
31
|
hideIntercom?: boolean;
|
|
32
32
|
disablePractice?: boolean;
|
|
33
33
|
}
|
|
34
|
-
export
|
|
34
|
+
export type IClientConfig = Omit<IConfig, 'practiceQuestions'> & {
|
|
35
35
|
practiceQuestions?: IClientQuestion[];
|
|
36
36
|
};
|
|
37
37
|
export interface IWidgetConfig {
|
|
@@ -47,7 +47,7 @@ export interface IWidgetConfig {
|
|
|
47
47
|
styleUrls?: string | string[];
|
|
48
48
|
fontsUrls?: string | string[];
|
|
49
49
|
}
|
|
50
|
-
export
|
|
50
|
+
export type IClientWidgetConfig = Omit<IWidgetConfig, 'job' | 'config'> & {
|
|
51
51
|
job: IClientJob;
|
|
52
52
|
config: IClientConfig;
|
|
53
53
|
};
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
export declare const enum ANSWER_TYPES {
|
|
2
|
-
VIDEO = "video",
|
|
3
|
-
TEXT = "text",
|
|
4
|
-
MULTIPLE = "multiple_choice",
|
|
5
|
-
SINGLE = "single_choice"
|
|
6
|
-
}
|
|
7
1
|
export interface IQuestion {
|
|
8
2
|
question: string;
|
|
9
3
|
numOfRetakes: number;
|
|
@@ -13,44 +7,11 @@ export interface IQuestion {
|
|
|
13
7
|
videoQuestion?: string;
|
|
14
8
|
description?: string;
|
|
15
9
|
}
|
|
16
|
-
export
|
|
17
|
-
answerType?: `${ANSWER_TYPES.VIDEO}`;
|
|
18
|
-
}
|
|
19
|
-
export interface IQuestionTextAnswer extends IQuestion {
|
|
20
|
-
answerType: `${ANSWER_TYPES.TEXT}`;
|
|
21
|
-
config?: {
|
|
22
|
-
minChars: number;
|
|
23
|
-
maxChars?: number;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export interface IMultipleChoiceOptionDefinition {
|
|
27
|
-
id: string;
|
|
28
|
-
label: string;
|
|
29
|
-
}
|
|
30
|
-
export interface IQuestionChoiceAnswer extends IQuestion {
|
|
31
|
-
config?: {
|
|
32
|
-
shuffle?: boolean;
|
|
33
|
-
answers: IMultipleChoiceOptionDefinition[];
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export interface IQuestionMultipleAnswer extends IQuestionChoiceAnswer {
|
|
37
|
-
answerType: `${ANSWER_TYPES.MULTIPLE}`;
|
|
38
|
-
config?: {
|
|
39
|
-
minAnswers?: number;
|
|
40
|
-
maxAnswers?: number;
|
|
41
|
-
} & IQuestionChoiceAnswer['config'];
|
|
42
|
-
}
|
|
43
|
-
export interface IQuestionSingleAnswer extends IQuestionChoiceAnswer {
|
|
44
|
-
answerType: `${ANSWER_TYPES.SINGLE}`;
|
|
45
|
-
}
|
|
46
|
-
declare type leanQuestion<T> = Omit<T, 'numOfRetakes' | 'partDuration' | 'thinkingTime'> & {
|
|
10
|
+
export type IClientQuestion = Omit<IQuestion, 'numOfRetakes' | 'partDuration' | 'thinkingTime'> & {
|
|
47
11
|
attempts?: number;
|
|
48
12
|
duration?: number;
|
|
49
13
|
thinkingTime?: number;
|
|
50
14
|
};
|
|
51
|
-
export declare type ALL_JOB_QUESTIONS_TYPE = IQuestionDefault | IQuestionTextAnswer | IQuestionMultipleAnswer | IQuestionSingleAnswer;
|
|
52
|
-
export declare type ASSESSMENT_QUESTIONS_TYPE = Exclude<ALL_JOB_QUESTIONS_TYPE, IQuestionDefault>;
|
|
53
|
-
export declare type IClientQuestion = leanQuestion<IQuestionDefault> | leanQuestion<IQuestionTextAnswer> | leanQuestion<IQuestionMultipleAnswer> | leanQuestion<IQuestionSingleAnswer>;
|
|
54
15
|
export interface IJob {
|
|
55
16
|
language?: string;
|
|
56
17
|
transcriptLanguage?: string;
|
|
@@ -58,7 +19,7 @@ export interface IJob {
|
|
|
58
19
|
company?: string;
|
|
59
20
|
job_id?: string;
|
|
60
21
|
logo?: string;
|
|
61
|
-
questions?:
|
|
22
|
+
questions?: IQuestion[];
|
|
62
23
|
old_jobID?: string;
|
|
63
24
|
termsUrl?: string;
|
|
64
25
|
privacyUrl?: string;
|
|
@@ -66,7 +27,6 @@ export interface IJob {
|
|
|
66
27
|
company_id?: string;
|
|
67
28
|
jobID?: string;
|
|
68
29
|
}
|
|
69
|
-
export
|
|
30
|
+
export type IClientJob = Omit<IJob, 'questions'> & {
|
|
70
31
|
questions?: IClientQuestion[];
|
|
71
32
|
};
|
|
72
|
-
export {};
|
|
@@ -5,8 +5,8 @@ export declare const enum SPEED_TEST_LEVEL {
|
|
|
5
5
|
MEDIUM = 1,
|
|
6
6
|
HIGH = 2
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
8
|
+
export type mediaDeviceType = 'video' | 'audio';
|
|
9
|
+
type ConstrainProps = {
|
|
10
10
|
video: {
|
|
11
11
|
width: {
|
|
12
12
|
min?: number;
|
|
@@ -23,7 +23,6 @@ interface FacingMode {
|
|
|
23
23
|
export interface RecorderInterface {
|
|
24
24
|
facingMode: FacingMode;
|
|
25
25
|
microphoneRef: ActorRef<DoneInvokeEvent<any>> | null;
|
|
26
|
-
countDownRef: ActorRef<DoneInvokeEvent<any>> | null;
|
|
27
26
|
mediaStream?: MediaStream;
|
|
28
27
|
mediaRecorder?: MediaRecorder;
|
|
29
28
|
videoDevices: MediaDeviceInfo[];
|
|
@@ -61,8 +60,6 @@ export declare const enum STATES {
|
|
|
61
60
|
RECORDER_SENDING_BLOBS = "recorderSendingBlobs"
|
|
62
61
|
}
|
|
63
62
|
export declare const enum ACTIONS {
|
|
64
|
-
STOP_COUNT_DOWN_ACTOR = "STOP_COUNT_DOWN_ACTOR",
|
|
65
|
-
INIT_COUNT_DOWN_ACTOR = "INIT_COUNT_DOWN_ACTOR",
|
|
66
63
|
SESSION_EVENT = "SESSION_EVENT",
|
|
67
64
|
SENTRY = "SENTRY",
|
|
68
65
|
CONSOLE_LOG = "CONSOLE_LOG",
|
|
@@ -96,7 +93,6 @@ export declare const enum ACTIONS {
|
|
|
96
93
|
SET_MIC_ERROR = "SET_MIC_ERROR"
|
|
97
94
|
}
|
|
98
95
|
export declare const enum EVENTS {
|
|
99
|
-
SEND_RECORDER_TO_WAITING_STATE = "SEND_RECORDER_TO_WAITING_STATE",
|
|
100
96
|
CHANGE_VIDEO_DEVICE = "CHANGE_VIDEO_DEVICE",
|
|
101
97
|
CHANGE_AUDIO_DEVICE = "CHANGE_AUDIO_DEVICE",
|
|
102
98
|
START_RECORDING = "START_RECORDING",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IVideoFile } from './videoInterface';
|
|
2
2
|
interface ILastUploadChunkl {
|
|
3
3
|
loaded: number;
|
|
4
4
|
timeStamp: number;
|
|
@@ -11,11 +11,10 @@ export interface InitialState {
|
|
|
11
11
|
uploadSpeed: number;
|
|
12
12
|
lastUploadChunk: ILastUploadChunkl;
|
|
13
13
|
videoId: string;
|
|
14
|
-
videoFile:
|
|
14
|
+
videoFile: IVideoFile;
|
|
15
15
|
}
|
|
16
16
|
export declare const enum STATES {
|
|
17
17
|
IDLE = "idle",
|
|
18
|
-
UPLOAD_CONTROLLER = "uploadController",
|
|
19
18
|
UPLOADING = "uploading",
|
|
20
19
|
GET_SIGNED_URL = "getSignedUrl",
|
|
21
20
|
UPLOAD_TO_S3 = "uploadToS3",
|
|
@@ -35,7 +34,6 @@ export declare const enum ACTIONS {
|
|
|
35
34
|
SENTRY = "sentry"
|
|
36
35
|
}
|
|
37
36
|
export declare const enum GUARDS {
|
|
38
|
-
CAN_UPLOAD = "canUplaod"
|
|
39
|
-
IS_ASSESSMENT_QUESTION = "isAssessmentQuestion"
|
|
37
|
+
CAN_UPLOAD = "canUplaod"
|
|
40
38
|
}
|
|
41
39
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ANSWER_TYPES } from './jobInterface';
|
|
2
1
|
export interface IVideoPlatformOS {
|
|
3
2
|
architecture: number;
|
|
4
3
|
family: string;
|
|
@@ -26,29 +25,6 @@ export interface IVideoFile {
|
|
|
26
25
|
question?: string;
|
|
27
26
|
selectedTake?: number;
|
|
28
27
|
}
|
|
29
|
-
export interface IVideoFileDefault extends IVideoFile {
|
|
30
|
-
answerType?: ANSWER_TYPES.VIDEO;
|
|
31
|
-
}
|
|
32
|
-
export interface IMultipleAnswer {
|
|
33
|
-
id: string;
|
|
34
|
-
label: string;
|
|
35
|
-
selected: boolean;
|
|
36
|
-
}
|
|
37
|
-
export interface IVideoFileTextAnswer extends IVideoFile {
|
|
38
|
-
answerType: ANSWER_TYPES.TEXT;
|
|
39
|
-
answer: string;
|
|
40
|
-
}
|
|
41
|
-
export interface IVideoFileMultipleAnswer extends IVideoFile {
|
|
42
|
-
answerType: ANSWER_TYPES.MULTIPLE;
|
|
43
|
-
answer: IMultipleAnswer[];
|
|
44
|
-
}
|
|
45
|
-
export interface IVideoFileSingleAnswer extends IVideoFile {
|
|
46
|
-
answerType: ANSWER_TYPES.SINGLE;
|
|
47
|
-
answer: IMultipleAnswer[];
|
|
48
|
-
}
|
|
49
|
-
export declare type ALL_VIDEO_FILE_TYPES = IVideoFileDefault | IVideoFileTextAnswer | IVideoFileMultipleAnswer | IVideoFileSingleAnswer;
|
|
50
|
-
export declare type ASSESSMENT_VIDEO_FILE_TYPES = Exclude<ALL_VIDEO_FILE_TYPES, IVideoFileDefault>;
|
|
51
|
-
export declare type CURRENT_QUESTION_ANSWER_TYPES = ASSESSMENT_VIDEO_FILE_TYPES['answer'];
|
|
52
28
|
export interface IVideo {
|
|
53
29
|
video_id?: string;
|
|
54
30
|
bandwidth?: string;
|
|
@@ -61,7 +37,7 @@ export interface IVideo {
|
|
|
61
37
|
quality?: string;
|
|
62
38
|
referrer?: string;
|
|
63
39
|
cvUrl?: string;
|
|
64
|
-
videos?:
|
|
40
|
+
videos?: IVideoFile[];
|
|
65
41
|
processTime?: number;
|
|
66
42
|
files?: string[];
|
|
67
43
|
personalInfo?: Record<string, string>;
|
|
@@ -3,9 +3,9 @@ import { ActorRef, BaseActionObject, DoneInvokeEvent, Event, EventData, ResolveT
|
|
|
3
3
|
import { IWidgetConfig } from './configInterface';
|
|
4
4
|
import { CAMERA_STATES_MESSAGES, INTERNET_STATES_MESSAGES, MICROPHONE_STATES_MESSAGES } from '../utils/messages.utils';
|
|
5
5
|
import { TAKE_TYPES } from './storageInterface';
|
|
6
|
-
import {
|
|
6
|
+
import { IQuestion } from './jobInterface';
|
|
7
7
|
import { IVideoError } from '../utils/errors.utils';
|
|
8
|
-
|
|
8
|
+
type IUploaderRef = {
|
|
9
9
|
[uploaderRef: string]: ActorRef<DoneInvokeEvent<any>>;
|
|
10
10
|
};
|
|
11
11
|
export declare const VIDEO_ERROR_MESSAGES: {
|
|
@@ -13,10 +13,10 @@ export declare const VIDEO_ERROR_MESSAGES: {
|
|
|
13
13
|
REDIRECT: "REDIRECT";
|
|
14
14
|
NO_ERROR: "";
|
|
15
15
|
};
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
16
|
+
export type ICameraStateKey = keyof typeof CAMERA_STATES_MESSAGES;
|
|
17
|
+
export type IMicrophoneStateKey = keyof typeof MICROPHONE_STATES_MESSAGES;
|
|
18
|
+
export type IInternetStateKey = keyof typeof INTERNET_STATES_MESSAGES;
|
|
19
|
+
export type IVideoCorruptedMessagesKey = keyof typeof VIDEO_ERROR_MESSAGES;
|
|
20
20
|
export declare const CAMERA_STATES: {
|
|
21
21
|
[K in ICameraStateKey]: K;
|
|
22
22
|
};
|
|
@@ -47,7 +47,7 @@ interface IChecksMessage {
|
|
|
47
47
|
export interface InitialState {
|
|
48
48
|
speedTestResult: number;
|
|
49
49
|
widgetConfig: IWidgetConfig;
|
|
50
|
-
questions:
|
|
50
|
+
questions: IQuestion[];
|
|
51
51
|
isConnected: boolean;
|
|
52
52
|
videoRef: RefObject<HTMLVideoElement>;
|
|
53
53
|
networkRef: ActorRef<DoneInvokeEvent<any>> | null;
|
|
@@ -55,8 +55,6 @@ export interface InitialState {
|
|
|
55
55
|
storageRef: ActorRef<DoneInvokeEvent<any>> | null;
|
|
56
56
|
previewRef: ActorRef<DoneInvokeEvent<any>> | null;
|
|
57
57
|
uploaderRefs: IUploaderRef;
|
|
58
|
-
countDownRef: ActorRef<DoneInvokeEvent<any>> | null;
|
|
59
|
-
timer: number;
|
|
60
58
|
currentQuestion: number;
|
|
61
59
|
currentTake: number;
|
|
62
60
|
selectedTake: number | null;
|
|
@@ -73,6 +71,7 @@ export interface InitialState {
|
|
|
73
71
|
error: IVideoError | null;
|
|
74
72
|
failedRecordingAttempts: number;
|
|
75
73
|
failedRecordingMessage: IVideoCorruptedMessagesKey;
|
|
74
|
+
isResumed: boolean;
|
|
76
75
|
}
|
|
77
76
|
export interface IWidgetMachineProps {
|
|
78
77
|
widgetMachine: State<InitialState, DoneInvokeEvent<any>, any, {
|
|
@@ -105,11 +104,8 @@ export declare const enum STATES {
|
|
|
105
104
|
INTERVIEW__EXPLANATION = "interviewExplanation",
|
|
106
105
|
INTERVIEW__QUESTION = "interviewQuestion",
|
|
107
106
|
INTERVIEW__VIDEO_QUESTION = "interviewVideoQuestion",
|
|
108
|
-
INTERVIEW__ANSWER_SELECTOR = "interviewAnswerSelector",
|
|
109
|
-
INTERVIEW__ASSESSMENT = "interviewAssessment",
|
|
110
107
|
INTERVIEW__RECORDING = "interviewRecording",
|
|
111
108
|
PREVIEW = "preview",
|
|
112
|
-
NEXT_QUESTION_MIDDLEWARE = "nextQuestionMiddleware",
|
|
113
109
|
RE_INIT_RECORDER = "reInitRecorder",
|
|
114
110
|
RE_INIT_RECORDER__NEXT_RETAKE = "reInitRecorderNextRetake",
|
|
115
111
|
RE_INIT_RECORDER__NEXT_QUESTION = "reInitRecorderNextQuestion",
|
|
@@ -133,10 +129,8 @@ export declare const enum ACTIONS {
|
|
|
133
129
|
SPAWN_UPLOADER = "spawnUploader",
|
|
134
130
|
SPAWN_STORAGE = "spawnStorage",
|
|
135
131
|
SPAWN_PREVIEW = "spawnPreview",
|
|
136
|
-
SPAWN_COUNT_DOWN = "spawnCountDown",
|
|
137
132
|
STOP_RECORDER = "stopRecorder",
|
|
138
133
|
STOP_PREVIEW = "stopPreview",
|
|
139
|
-
STOP_COUNT_DOWN = "stopCountDown",
|
|
140
134
|
STORE_TAKE = "storeTake",
|
|
141
135
|
GET_TAKE = "getTake",
|
|
142
136
|
GET_TAKES = "getTakes",
|
|
@@ -146,10 +140,8 @@ export declare const enum ACTIONS {
|
|
|
146
140
|
UPDATE_TOTAL_UPLOADED_FILES_SIZE = "updateTotalUploadedFileSize",
|
|
147
141
|
UPDATE_QUESTION_NUMBER = "updateQuestionNumber",
|
|
148
142
|
UPDATE_RETAKES_NUMBER = "updateRetakesNumber",
|
|
149
|
-
UPDATE_TIMER = "updateTimer",
|
|
150
143
|
UPDATE_AXION_AUTH = "updateAxiosAuth",
|
|
151
144
|
RECORDER_RE_INIT = "recorderReInit",
|
|
152
|
-
DEACTIVATE_RECORDER = "deactivateRecorder",
|
|
153
145
|
RECORDER_RE_INIT_AUTO_START = "recorderReInitAutoStart",
|
|
154
146
|
UPDATE_RECORDER_PARAMS = "updateRecorderParams",
|
|
155
147
|
UPDATE_TOTAL_UPLOADED = "updateTotalUploaded",
|
|
@@ -184,8 +176,7 @@ export declare const enum EVENTS {
|
|
|
184
176
|
UPLOADER_PROGRESS = "UPLOADER_PROGRESS",
|
|
185
177
|
UPLOADER_FINISHED = "UPLOADER_FINISHED",
|
|
186
178
|
RECORDER_ERROR = "RECORDER_ERROR",
|
|
187
|
-
RETRY = "RETRY"
|
|
188
|
-
UPDATE_TIMER = "UPDATE_TIMER"
|
|
179
|
+
RETRY = "RETRY"
|
|
189
180
|
}
|
|
190
181
|
export declare const enum SERVICES {
|
|
191
182
|
UPDATE_VIDEO_OBJECT_CALL = "updateVideoObjectCall",
|
|
@@ -209,10 +200,7 @@ export declare const enum GUARDS {
|
|
|
209
200
|
IS_NO_SOUND_ERROR = "isNoSoundError",
|
|
210
201
|
IS_VIDEO_CORRUPTED = "isVideoCorrupted",
|
|
211
202
|
IS_AUDIO_ERROR = "isAudioError",
|
|
212
|
-
IS_VIDEO_ERROR = "isVideoError"
|
|
213
|
-
THERE_ARE_NO_VIDEO_QUESTIONS_TYPE = "thereAreNoVideoQuestionType",
|
|
214
|
-
IS_RECORDER_READY = "isRecorderReady",
|
|
215
|
-
IS_ASSESSMENT_QUESTION = "isAssessmentQuestion"
|
|
203
|
+
IS_VIDEO_ERROR = "isVideoError"
|
|
216
204
|
}
|
|
217
205
|
export declare const enum TAGS {
|
|
218
206
|
SETUP = "setup",
|
|
@@ -27,7 +27,7 @@ export declare function getSessionIdFromCache(): string | undefined | null;
|
|
|
27
27
|
*/
|
|
28
28
|
export declare function deleteSession(): void;
|
|
29
29
|
/** ehehehe this is a type that takes 2 types and matches all the keys of type V from type K */
|
|
30
|
-
|
|
30
|
+
type KeysMatching<T, V> = {
|
|
31
31
|
[K in keyof T]-?: T[K] extends (V | undefined) ? K : never;
|
|
32
32
|
}[keyof T];
|
|
33
33
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IWidgetConfigRequest, IWidgetConfigResponse } from '../interfaces/configInterface';
|
|
2
|
-
import { IVideo,
|
|
2
|
+
import { IVideo, IVideoFile } from '../interfaces/videoInterface';
|
|
3
3
|
export declare const createVideo: (widgetConfig: IWidgetConfigRequest) => Promise<IWidgetConfigResponse>;
|
|
4
4
|
export declare const getVideo: (videoId: string) => Promise<IWidgetConfigResponse>;
|
|
5
|
-
export declare const updateVideo: ({ video_id,
|
|
6
|
-
export declare const updateVideoFile: (videoId: string, videoFile:
|
|
5
|
+
export declare const updateVideo: ({ video_id, completed, uploaded, bandwidth }: IVideo) => Promise<IWidgetConfigResponse>;
|
|
6
|
+
export declare const updateVideoFile: (videoId: string, videoFile: IVideoFile) => Promise<IWidgetConfigResponse>;
|
|
7
7
|
export declare const getUploadUrl: (videoId: string, fileName: string, typeExtension: string) => Promise<IWidgetConfigResponse>;
|
|
@@ -11,5 +11,4 @@ export declare const VIDEO_INACTIVE_TIMEOUT = 2000;
|
|
|
11
11
|
export declare const MICROPHONE_NO_SOUND_ERROR_CODE = 777;
|
|
12
12
|
export declare const MAX_FAILED_RECORDING_ATTEMPTS = 2;
|
|
13
13
|
export declare const MICROPHONE_RETAKE_COUNT = 100;
|
|
14
|
-
export declare const SECONDS_LEFT_HIGHLIGHT = 10;
|
|
15
14
|
export declare const FONT_URL = "https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700&display=swap";
|
|
@@ -4,7 +4,7 @@ export declare const isSupportedIosDevice: boolean;
|
|
|
4
4
|
export declare const isSupportedDevice: boolean;
|
|
5
5
|
declare const PLATFORMS_OPTIONS: readonly ["ANDROID", "IOS", "MACBOOK", "WINDOWS"];
|
|
6
6
|
declare const BROWSERS_OPTIONS: readonly ["CHROME", "SAFARI", "FIREFOX", "SAMSUNG"];
|
|
7
|
-
|
|
7
|
+
type DEVICE_TYPE = {
|
|
8
8
|
PLATFORM: typeof PLATFORMS_OPTIONS[number];
|
|
9
9
|
BROWSER: typeof BROWSERS_OPTIONS[number];
|
|
10
10
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const twoDigitsNumber: (num: number) => string;
|
|
2
2
|
export declare const timeFormatter: (number: number) => string;
|
|
3
3
|
export declare const timeLeftInMinutesFormatter: (number: number) => string;
|
|
4
|
-
export declare const timerCountDown: (number: number) => string
|
|
4
|
+
export declare const timerCountDown: (number: number) => string;
|
|
5
5
|
export declare const formattedDuration: (number: number) => string;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
interface CountDownProps {
|
|
3
3
|
countDown: number;
|
|
4
|
-
forceMobileCounter?: boolean;
|
|
5
|
-
numberOfSecondsToHighlight?: number;
|
|
6
4
|
}
|
|
7
|
-
export declare const CountDown: ({ countDown
|
|
5
|
+
export declare const CountDown: ({ countDown }: CountDownProps) => JSX.Element;
|
|
8
6
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IVideoCorruptedMessagesKey } from '../interfaces/widgetInterface';
|
|
3
3
|
import { IDeviceSelectorList } from './DeviceSelectorList';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type VIDEO_ERRORS = Exclude<IVideoCorruptedMessagesKey, 'NO_ERROR'>;
|
|
5
|
+
export type MODAL_ERROR_KEY = 'MEDIA_PERMISSION' | 'NO_SOUND' | 'CONNECTION' | VIDEO_ERRORS;
|
|
6
6
|
interface IProps extends Partial<IDeviceSelectorList> {
|
|
7
7
|
errorType: MODAL_ERROR_KEY;
|
|
8
8
|
onDisplayPermissionSteps?: () => void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IQuestion } from '../interfaces/jobInterface';
|
|
3
3
|
interface IProps {
|
|
4
|
-
questionObj:
|
|
4
|
+
questionObj: IQuestion;
|
|
5
|
+
currentQuestion: number;
|
|
5
6
|
isInner?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const Question: React.FC<IProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IQuestion } from '../interfaces/jobInterface';
|
|
3
3
|
import { VIDEO_STATUS } from '../interfaces/videoInterface';
|
|
4
4
|
interface IProps {
|
|
5
|
-
questionObj:
|
|
5
|
+
questionObj: IQuestion;
|
|
6
6
|
questionNumber: number;
|
|
7
7
|
currentQuestion: number;
|
|
8
8
|
isPracticeMode: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IQuestion } from '../interfaces/jobInterface';
|
|
3
3
|
import { VIDEO_STATUS } from '../interfaces/videoInterface';
|
|
4
4
|
interface IProps {
|
|
5
|
-
questions:
|
|
5
|
+
questions: IQuestion[];
|
|
6
6
|
currentQuestion: number;
|
|
7
7
|
isPracticeMode: boolean;
|
|
8
8
|
questionsStatus: VIDEO_STATUS[];
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IQuestion } from '../interfaces/jobInterface';
|
|
3
3
|
import { IDeviceSelectorList } from './DeviceSelectorList';
|
|
4
4
|
import { MODAL_ERROR_KEY } from './Errors';
|
|
5
5
|
interface IProps extends IDeviceSelectorList {
|
|
6
6
|
errorType: MODAL_ERROR_KEY | null;
|
|
7
7
|
onDisplayPermissionSteps: () => void;
|
|
8
8
|
onReInitRecorder: () => void;
|
|
9
|
-
|
|
9
|
+
currentQuestion: number;
|
|
10
|
+
numberOfQuestions: number;
|
|
11
|
+
currentQuestionObj: IQuestion | undefined;
|
|
10
12
|
isRecording: boolean;
|
|
11
13
|
}
|
|
12
14
|
export declare const RecorderModal: React.FC<IProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActorRef, DoneInvokeEvent } from 'xstate';
|
|
3
|
-
import {
|
|
3
|
+
import { IQuestion } from '../interfaces/jobInterface';
|
|
4
4
|
import { IDeviceSelectorProps } from './DeviceSelector';
|
|
5
5
|
import { MODAL_ERROR_KEY } from './Errors';
|
|
6
6
|
interface IProps extends IDeviceSelectorProps {
|
|
@@ -17,7 +17,7 @@ interface IProps extends IDeviceSelectorProps {
|
|
|
17
17
|
canStartRecording: boolean;
|
|
18
18
|
currentQuestion: number;
|
|
19
19
|
numberOfQuestions: number;
|
|
20
|
-
currentQuestionObj:
|
|
20
|
+
currentQuestionObj: IQuestion | undefined;
|
|
21
21
|
isRecording: boolean;
|
|
22
22
|
durations: number;
|
|
23
23
|
recordingTime: number;
|
|
@@ -25,7 +25,6 @@ interface IProps extends IDeviceSelectorProps {
|
|
|
25
25
|
countdown: number;
|
|
26
26
|
isQuestionDisplayed: boolean;
|
|
27
27
|
myinterviewRef: React.RefObject<HTMLDivElement>;
|
|
28
|
-
isAssessment: boolean;
|
|
29
28
|
}
|
|
30
29
|
export declare const VideoCamera: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLVideoElement>>;
|
|
31
30
|
export {};
|