@myinterview/widget-react 1.0.311 → 1.1.0
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/App.d.ts +3 -0
- package/dist/cjs/components/AnswerInstructions.d.ts +7 -0
- package/dist/cjs/components/AssessmentController.d.ts +12 -0
- package/dist/cjs/components/AssessmentFreeText.d.ts +7 -0
- package/dist/cjs/components/AssessmentMultiSelect.d.ts +9 -0
- package/dist/cjs/components/AssessmentSingleSelect.d.ts +9 -0
- package/dist/cjs/components/CharactersLimit.d.ts +7 -0
- package/dist/cjs/components/CountDown.d.ts +8 -0
- package/dist/cjs/components/Counter.d.ts +8 -0
- package/dist/cjs/components/DeviceSelector.d.ts +11 -0
- package/dist/cjs/components/DeviceSelectorList.d.ts +9 -0
- package/dist/cjs/components/DeviceSelectorListNative.d.ts +6 -0
- package/dist/cjs/components/Error.d.ts +8 -0
- package/dist/cjs/components/ErrorBoundaries.d.ts +9 -0
- package/dist/cjs/components/Errors.d.ts +12 -0
- package/dist/cjs/components/Explanation.d.ts +8 -0
- package/dist/cjs/components/Footer.d.ts +2 -0
- package/dist/cjs/components/Header.d.ts +10 -0
- package/dist/cjs/components/InnerView.d.ts +15 -0
- package/dist/cjs/components/Main.d.ts +11 -0
- package/dist/cjs/components/OuterView.d.ts +8 -0
- package/dist/cjs/components/PermissionSteps.d.ts +6 -0
- package/dist/cjs/components/PracticeModeInfo.d.ts +2 -0
- package/dist/cjs/components/PreviewItem.d.ts +20 -0
- package/dist/cjs/components/PreviewList.d.ts +18 -0
- package/dist/cjs/components/Question.d.ts +8 -0
- package/dist/cjs/components/QuestionItem.d.ts +12 -0
- package/dist/cjs/components/QuestionParamaters.d.ts +9 -0
- package/dist/cjs/components/QuestionsList.d.ts +11 -0
- package/dist/cjs/components/RecorderModal.d.ts +13 -0
- package/dist/cjs/components/Setup.d.ts +7 -0
- package/dist/cjs/components/SetupChecks.d.ts +14 -0
- package/dist/cjs/components/SliderModal.d.ts +8 -0
- package/dist/cjs/components/TopTips.d.ts +2 -0
- package/dist/cjs/components/Upload.d.ts +13 -0
- package/dist/cjs/components/VideoCamera.d.ts +31 -0
- package/dist/cjs/components/VideoQuestion.d.ts +10 -0
- package/dist/cjs/components/VideoTimeBar.d.ts +9 -0
- package/dist/cjs/components/WelcomePage.d.ts +16 -0
- package/dist/cjs/components/Widget.d.ts +3 -0
- package/dist/cjs/components/icons/ClockIcon.d.ts +2 -0
- package/dist/cjs/components/icons/Loading.d.ts +2 -0
- package/dist/cjs/components/icons/NoCameraMic.d.ts +2 -0
- package/dist/cjs/components/icons/PlayIcon.d.ts +6 -0
- package/dist/cjs/components/icons/Retake.d.ts +2 -0
- package/dist/cjs/components/icons/RotateScreenIcon.d.ts +2 -0
- package/dist/cjs/components/ui/DotSeparator.d.ts +2 -0
- package/dist/cjs/components/ui/Loader.d.ts +2 -0
- package/dist/cjs/components/ui/MicrophoneIndicator.d.ts +7 -0
- package/dist/cjs/components/ui/MinimizeButton.d.ts +6 -0
- package/dist/cjs/components/ui/PracticeMode.d.ts +2 -0
- package/dist/cjs/components/ui/Progress.d.ts +6 -0
- package/dist/cjs/components/ui/QuestionDuration.d.ts +6 -0
- package/dist/cjs/components/ui/QuestionNumber.d.ts +7 -0
- package/dist/cjs/components/ui/RecordingButton.d.ts +6 -0
- package/dist/cjs/components/ui/RotateScreen.d.ts +2 -0
- package/dist/cjs/components/ui/Signal.d.ts +9 -0
- package/dist/cjs/components/ui/StartNowButton.d.ts +6 -0
- package/dist/cjs/components/ui/StartRecordingButton.d.ts +11 -0
- package/dist/cjs/components/ui/StopRecordingButton.d.ts +7 -0
- package/dist/cjs/components/ui/UnsupportedModal.d.ts +6 -0
- package/dist/cjs/config/index.d.ts +7 -0
- package/dist/cjs/config/local.env.d.ts +6 -0
- package/dist/cjs/config/prod.env.d.ts +6 -0
- package/dist/cjs/config/staging.env.d.ts +6 -0
- package/dist/cjs/i18n/config.d.ts +1490 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js +36599 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/interfaces/candidateInterface.d.ts +14 -0
- package/dist/cjs/interfaces/candidateSessionInterface.d.ts +83 -0
- package/dist/cjs/interfaces/companyInterface.d.ts +4 -0
- package/dist/cjs/interfaces/configInterface.d.ts +64 -0
- package/dist/cjs/interfaces/countDownInterface.d.ts +23 -0
- package/dist/cjs/interfaces/jobInterface.d.ts +72 -0
- package/dist/cjs/interfaces/microphoneInterface.d.ts +41 -0
- package/dist/cjs/interfaces/networkInterface.d.ts +9 -0
- package/dist/cjs/interfaces/previewInterface.d.ts +14 -0
- package/dist/cjs/interfaces/recorderInterface.d.ts +203 -0
- package/dist/cjs/interfaces/storageInterface.d.ts +29 -0
- package/dist/cjs/interfaces/uploaderInterface.d.ts +41 -0
- package/dist/cjs/interfaces/videoInterface.d.ts +84 -0
- package/dist/cjs/interfaces/widgetInterface.d.ts +231 -0
- package/dist/cjs/machines/acceleratorMachines/accUploaderMachine.d.ts +6 -0
- package/dist/cjs/machines/acceleratorMachines/accWidgetMachine.d.ts +6 -0
- package/dist/cjs/machines/acceleratorMachines/counterMachine.d.ts +5 -0
- package/dist/cjs/machines/acceleratorMachines/microphoneMachine.d.ts +6 -0
- package/dist/cjs/machines/acceleratorMachines/networkMachine.d.ts +5 -0
- package/dist/cjs/machines/acceleratorMachines/previewMachine.d.ts +6 -0
- package/dist/cjs/machines/acceleratorMachines/recorderMachineV2.d.ts +6 -0
- package/dist/cjs/machines/acceleratorMachines/storageMachine.d.ts +6 -0
- package/dist/cjs/reportWebVitals.d.ts +3 -0
- package/dist/cjs/services/axiosInstances.service.d.ts +4 -0
- package/dist/cjs/services/s3.service.d.ts +1 -0
- package/dist/cjs/services/session.service.d.ts +57 -0
- package/dist/cjs/services/speedTest.service.d.ts +2 -0
- package/dist/cjs/services/video.service.d.ts +7 -0
- package/dist/cjs/setupTests.d.ts +1 -0
- package/dist/cjs/utils/authToken.utils.d.ts +7 -0
- package/dist/cjs/utils/constants.utils.d.ts +21 -0
- package/dist/cjs/utils/convertor.utils.d.ts +2 -0
- package/dist/cjs/utils/debug.utils.d.ts +19 -0
- package/dist/cjs/utils/device.utils.d.ts +12 -0
- package/dist/cjs/utils/errors.utils.d.ts +9 -0
- package/dist/cjs/utils/formatters.utils.d.ts +5 -0
- package/dist/cjs/utils/languages.utils.d.ts +1 -0
- package/dist/cjs/utils/messages.utils.d.ts +16 -0
- package/dist/cjs/utils/recorderErrors.utils.d.ts +29 -0
- package/dist/cjs/utils/sentry.utils.d.ts +6 -0
- package/dist/cjs/utils/statusCodes.utils.d.ts +13 -0
- package/dist/cjs/workers/microphone.worker.d.ts +2 -0
- package/dist/cjs/workers/worker-builder.d.ts +3 -0
- package/dist/esm/App.d.ts +1 -0
- package/dist/esm/components/AnswerInstructions.d.ts +7 -0
- package/dist/esm/components/AssessmentController.d.ts +12 -0
- package/dist/esm/components/AssessmentFreeText.d.ts +7 -0
- package/dist/esm/components/AssessmentMultiSelect.d.ts +9 -0
- package/dist/esm/components/AssessmentSingleSelect.d.ts +9 -0
- package/dist/esm/components/CharactersLimit.d.ts +7 -0
- package/dist/esm/components/CountDown.d.ts +3 -1
- package/dist/esm/components/DeviceSelector.d.ts +3 -2
- package/dist/esm/components/Errors.d.ts +2 -2
- package/dist/esm/components/Explanation.d.ts +2 -1
- package/dist/esm/components/InnerView.d.ts +1 -0
- package/dist/esm/components/Main.d.ts +2 -0
- package/dist/esm/components/PracticeModeInfo.d.ts +1 -7
- package/dist/esm/components/PreviewItem.d.ts +4 -0
- package/dist/esm/components/PreviewList.d.ts +1 -0
- package/dist/esm/components/Question.d.ts +2 -3
- package/dist/esm/components/QuestionItem.d.ts +2 -2
- package/dist/esm/components/QuestionParamaters.d.ts +9 -0
- package/dist/esm/components/QuestionsList.d.ts +2 -2
- package/dist/esm/components/RecorderModal.d.ts +2 -4
- package/dist/esm/components/Setup.d.ts +1 -0
- package/dist/esm/components/VideoCamera.d.ts +4 -2
- package/dist/esm/components/Widget.d.ts +0 -3
- package/dist/esm/components/ui/DotSeparator.d.ts +2 -0
- package/dist/esm/components/ui/StartRecordingButton.d.ts +1 -0
- package/dist/esm/i18n/config.d.ts +349 -0
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +6327 -12129
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/candidateSessionInterface.d.ts +1 -1
- package/dist/esm/interfaces/configInterface.d.ts +12 -6
- package/dist/esm/interfaces/countDownInterface.d.ts +23 -0
- package/dist/esm/interfaces/jobInterface.d.ts +43 -3
- package/dist/esm/interfaces/microphoneInterface.d.ts +3 -0
- package/dist/esm/interfaces/recorderInterface.d.ts +8 -3
- package/dist/esm/interfaces/uploaderInterface.d.ts +5 -3
- package/dist/esm/interfaces/videoInterface.d.ts +30 -1
- package/dist/esm/interfaces/widgetInterface.d.ts +28 -10
- package/dist/esm/machines/acceleratorMachines/counterMachine.d.ts +5 -0
- package/dist/esm/services/session.service.d.ts +1 -1
- package/dist/esm/services/video.service.d.ts +4 -4
- package/dist/esm/utils/constants.utils.d.ts +8 -0
- package/dist/esm/utils/convertor.utils.d.ts +2 -0
- package/dist/esm/utils/device.utils.d.ts +1 -1
- package/dist/esm/utils/formatters.utils.d.ts +1 -1
- package/dist/esm/utils/languages.utils.d.ts +1 -0
- package/dist/esm/utils/recorderErrors.utils.d.ts +1 -0
- package/dist/esm/utils/sentry.utils.d.ts +3 -1
- package/dist/esm/workers/microphone.worker.d.ts +2 -0
- package/dist/esm/workers/worker-builder.d.ts +3 -0
- package/dist/index.d.ts +82 -19
- package/package.json +121 -16
- package/dist/esm/utils/practiceQuestions.utils.d.ts +0 -2
|
@@ -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 { IClientJob, IClientQuestion, IJob
|
|
4
|
+
import { ALL_JOB_QUESTIONS_TYPE, IClientJob, IClientQuestion, IJob } 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,15 +11,16 @@ 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;
|
|
18
18
|
onFinish?: (data: IOnFinish) => void;
|
|
19
19
|
onError?: (data: IOnError) => void;
|
|
20
|
+
onWidgetClose?: () => void;
|
|
20
21
|
openAnimation?: boolean;
|
|
21
22
|
debug?: boolean;
|
|
22
|
-
practiceQuestions?:
|
|
23
|
+
practiceQuestions?: ALL_JOB_QUESTIONS_TYPE[];
|
|
23
24
|
overlay?: string;
|
|
24
25
|
introVideo?: string;
|
|
25
26
|
welcomeTitle?: string;
|
|
@@ -27,8 +28,10 @@ interface IConfig {
|
|
|
27
28
|
env?: IEnv;
|
|
28
29
|
minimizable?: boolean;
|
|
29
30
|
hideHeader?: boolean;
|
|
31
|
+
hideIntercom?: boolean;
|
|
32
|
+
disablePractice?: boolean;
|
|
30
33
|
}
|
|
31
|
-
export
|
|
34
|
+
export type IClientConfig = Omit<IConfig, 'practiceQuestions'> & {
|
|
32
35
|
practiceQuestions?: IClientQuestion[];
|
|
33
36
|
};
|
|
34
37
|
export interface IWidgetConfig {
|
|
@@ -40,8 +43,11 @@ export interface IWidgetConfig {
|
|
|
40
43
|
disabled?: boolean;
|
|
41
44
|
buttonText?: string;
|
|
42
45
|
buttonStyle?: CSSProperties;
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
styleUrls?: string | string[];
|
|
48
|
+
fontsUrls?: string | string[];
|
|
43
49
|
}
|
|
44
|
-
export
|
|
50
|
+
export type IClientWidgetConfig = Omit<IWidgetConfig, 'job' | 'config'> & {
|
|
45
51
|
job: IClientJob;
|
|
46
52
|
config: IClientConfig;
|
|
47
53
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface CounterInterface {
|
|
2
|
+
counterRef: any;
|
|
3
|
+
ms: number;
|
|
4
|
+
isAutoStart: boolean;
|
|
5
|
+
callback: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const enum GUARDS {
|
|
8
|
+
IS_AUTO_START = "isAutoStart"
|
|
9
|
+
}
|
|
10
|
+
export declare const enum STATES {
|
|
11
|
+
IDLE = "idle",
|
|
12
|
+
COUNTING = "counting",
|
|
13
|
+
PAUSED = "paused"
|
|
14
|
+
}
|
|
15
|
+
export declare const enum ACTIONS {
|
|
16
|
+
TICK = "tick",
|
|
17
|
+
INIT_OBSERVER = "initObserver"
|
|
18
|
+
}
|
|
19
|
+
export declare const enum EVENTS {
|
|
20
|
+
TICK = "TICK",
|
|
21
|
+
START = "START",
|
|
22
|
+
PAUSE = "PAUSE"
|
|
23
|
+
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export declare const enum ANSWER_TYPES {
|
|
2
|
+
VIDEO = "video",
|
|
3
|
+
TEXT = "text",
|
|
4
|
+
MULTIPLE = "multiple_choice",
|
|
5
|
+
SINGLE = "single_choice"
|
|
6
|
+
}
|
|
1
7
|
export interface IQuestion {
|
|
2
8
|
question: string;
|
|
3
9
|
numOfRetakes: number;
|
|
@@ -7,11 +13,44 @@ export interface IQuestion {
|
|
|
7
13
|
videoQuestion?: string;
|
|
8
14
|
description?: string;
|
|
9
15
|
}
|
|
10
|
-
export
|
|
16
|
+
export interface IQuestionDefault extends IQuestion {
|
|
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
|
+
type leanQuestion<T> = Omit<T, 'numOfRetakes' | 'partDuration' | 'thinkingTime'> & {
|
|
11
47
|
attempts?: number;
|
|
12
48
|
duration?: number;
|
|
13
49
|
thinkingTime?: number;
|
|
14
50
|
};
|
|
51
|
+
export type ALL_JOB_QUESTIONS_TYPE = IQuestionDefault | IQuestionTextAnswer | IQuestionMultipleAnswer | IQuestionSingleAnswer;
|
|
52
|
+
export type ASSESSMENT_QUESTIONS_TYPE = Exclude<ALL_JOB_QUESTIONS_TYPE, IQuestionDefault>;
|
|
53
|
+
export type IClientQuestion = leanQuestion<IQuestionDefault> | leanQuestion<IQuestionTextAnswer> | leanQuestion<IQuestionMultipleAnswer> | leanQuestion<IQuestionSingleAnswer>;
|
|
15
54
|
export interface IJob {
|
|
16
55
|
language?: string;
|
|
17
56
|
transcriptLanguage?: string;
|
|
@@ -19,7 +58,7 @@ export interface IJob {
|
|
|
19
58
|
company?: string;
|
|
20
59
|
job_id?: string;
|
|
21
60
|
logo?: string;
|
|
22
|
-
questions?:
|
|
61
|
+
questions?: ALL_JOB_QUESTIONS_TYPE[];
|
|
23
62
|
old_jobID?: string;
|
|
24
63
|
termsUrl?: string;
|
|
25
64
|
privacyUrl?: string;
|
|
@@ -27,6 +66,7 @@ export interface IJob {
|
|
|
27
66
|
company_id?: string;
|
|
28
67
|
jobID?: string;
|
|
29
68
|
}
|
|
30
|
-
export
|
|
69
|
+
export type IClientJob = Omit<IJob, 'questions'> & {
|
|
31
70
|
questions?: IClientQuestion[];
|
|
32
71
|
};
|
|
72
|
+
export {};
|
|
@@ -2,6 +2,7 @@ export interface InitialState {
|
|
|
2
2
|
mediaStream: MediaStream | null;
|
|
3
3
|
micData: number;
|
|
4
4
|
retakes: number;
|
|
5
|
+
webWorker: Worker | null;
|
|
5
6
|
}
|
|
6
7
|
export declare const enum STATES {
|
|
7
8
|
INACTIVE = "inactive",
|
|
@@ -11,6 +12,8 @@ export declare const enum STATES {
|
|
|
11
12
|
DATA_CHECK = "dataCheck"
|
|
12
13
|
}
|
|
13
14
|
export declare const enum ACTIONS {
|
|
15
|
+
COLLECT_BREADCRUMB = "collectBreadcrumb",
|
|
16
|
+
INIT_WEB_WORKER = "initWebWorker",
|
|
14
17
|
CONSOLE_LOG = "consoleLog",
|
|
15
18
|
SET_MEDIA_STREAM = "setMediaStream",
|
|
16
19
|
UPDATE_MIC = "updateMic",
|
|
@@ -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,6 +23,7 @@ interface FacingMode {
|
|
|
23
23
|
export interface RecorderInterface {
|
|
24
24
|
facingMode: FacingMode;
|
|
25
25
|
microphoneRef: ActorRef<DoneInvokeEvent<any>> | null;
|
|
26
|
+
countDownRef: ActorRef<DoneInvokeEvent<any>> | null;
|
|
26
27
|
mediaStream?: MediaStream;
|
|
27
28
|
mediaRecorder?: MediaRecorder;
|
|
28
29
|
videoDevices: MediaDeviceInfo[];
|
|
@@ -60,6 +61,8 @@ export declare const enum STATES {
|
|
|
60
61
|
RECORDER_SENDING_BLOBS = "recorderSendingBlobs"
|
|
61
62
|
}
|
|
62
63
|
export declare const enum ACTIONS {
|
|
64
|
+
STOP_COUNT_DOWN_ACTOR = "STOP_COUNT_DOWN_ACTOR",
|
|
65
|
+
INIT_COUNT_DOWN_ACTOR = "INIT_COUNT_DOWN_ACTOR",
|
|
63
66
|
SESSION_EVENT = "SESSION_EVENT",
|
|
64
67
|
SENTRY = "SENTRY",
|
|
65
68
|
CONSOLE_LOG = "CONSOLE_LOG",
|
|
@@ -93,6 +96,7 @@ export declare const enum ACTIONS {
|
|
|
93
96
|
SET_MIC_ERROR = "SET_MIC_ERROR"
|
|
94
97
|
}
|
|
95
98
|
export declare const enum EVENTS {
|
|
99
|
+
SEND_RECORDER_TO_WAITING_STATE = "SEND_RECORDER_TO_WAITING_STATE",
|
|
96
100
|
CHANGE_VIDEO_DEVICE = "CHANGE_VIDEO_DEVICE",
|
|
97
101
|
CHANGE_AUDIO_DEVICE = "CHANGE_AUDIO_DEVICE",
|
|
98
102
|
START_RECORDING = "START_RECORDING",
|
|
@@ -124,7 +128,8 @@ export declare const enum GUARDS {
|
|
|
124
128
|
IS_NOT_ALLOWED_ERROR = "isNotAllowedError",
|
|
125
129
|
IS_ERROR_WITH_WRONG_PARAMS = "isErrorWithWrongParams",
|
|
126
130
|
IS_AUTO_START = "isAutoStart",
|
|
127
|
-
IS_QUALITY_CHANGED = "isQualityChanged"
|
|
131
|
+
IS_QUALITY_CHANGED = "isQualityChanged",
|
|
132
|
+
IS_VIDEO_CORRUPTED = "isVideoCorrupted"
|
|
128
133
|
}
|
|
129
134
|
export declare const mediaConstrains: {
|
|
130
135
|
hd: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ALL_VIDEO_FILE_TYPES } from './videoInterface';
|
|
2
2
|
interface ILastUploadChunkl {
|
|
3
3
|
loaded: number;
|
|
4
4
|
timeStamp: number;
|
|
@@ -11,10 +11,11 @@ export interface InitialState {
|
|
|
11
11
|
uploadSpeed: number;
|
|
12
12
|
lastUploadChunk: ILastUploadChunkl;
|
|
13
13
|
videoId: string;
|
|
14
|
-
videoFile:
|
|
14
|
+
videoFile: ALL_VIDEO_FILE_TYPES;
|
|
15
15
|
}
|
|
16
16
|
export declare const enum STATES {
|
|
17
17
|
IDLE = "idle",
|
|
18
|
+
UPLOAD_CONTROLLER = "uploadController",
|
|
18
19
|
UPLOADING = "uploading",
|
|
19
20
|
GET_SIGNED_URL = "getSignedUrl",
|
|
20
21
|
UPLOAD_TO_S3 = "uploadToS3",
|
|
@@ -34,6 +35,7 @@ export declare const enum ACTIONS {
|
|
|
34
35
|
SENTRY = "sentry"
|
|
35
36
|
}
|
|
36
37
|
export declare const enum GUARDS {
|
|
37
|
-
CAN_UPLOAD = "canUplaod"
|
|
38
|
+
CAN_UPLOAD = "canUplaod",
|
|
39
|
+
IS_ASSESSMENT_QUESTION = "isAssessmentQuestion"
|
|
38
40
|
}
|
|
39
41
|
export {};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { ANSWER_TYPES } from './jobInterface';
|
|
2
|
+
export interface IVideoDimensions {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
}
|
|
1
6
|
export interface IVideoPlatformOS {
|
|
2
7
|
architecture: number;
|
|
3
8
|
family: string;
|
|
@@ -24,7 +29,31 @@ export interface IVideoFile {
|
|
|
24
29
|
uploadUrl?: string;
|
|
25
30
|
question?: string;
|
|
26
31
|
selectedTake?: number;
|
|
32
|
+
originalDimensions?: IVideoDimensions;
|
|
33
|
+
}
|
|
34
|
+
export interface IVideoFileDefault extends IVideoFile {
|
|
35
|
+
answerType?: ANSWER_TYPES.VIDEO;
|
|
36
|
+
}
|
|
37
|
+
export interface IMultipleAnswer {
|
|
38
|
+
id: string;
|
|
39
|
+
label: string;
|
|
40
|
+
selected: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface IVideoFileTextAnswer extends IVideoFile {
|
|
43
|
+
answerType: ANSWER_TYPES.TEXT;
|
|
44
|
+
answer: string;
|
|
45
|
+
}
|
|
46
|
+
export interface IVideoFileMultipleAnswer extends IVideoFile {
|
|
47
|
+
answerType: ANSWER_TYPES.MULTIPLE;
|
|
48
|
+
answer: IMultipleAnswer[];
|
|
49
|
+
}
|
|
50
|
+
export interface IVideoFileSingleAnswer extends IVideoFile {
|
|
51
|
+
answerType: ANSWER_TYPES.SINGLE;
|
|
52
|
+
answer: IMultipleAnswer[];
|
|
27
53
|
}
|
|
54
|
+
export type ALL_VIDEO_FILE_TYPES = IVideoFileDefault | IVideoFileTextAnswer | IVideoFileMultipleAnswer | IVideoFileSingleAnswer;
|
|
55
|
+
export type ASSESSMENT_VIDEO_FILE_TYPES = Exclude<ALL_VIDEO_FILE_TYPES, IVideoFileDefault>;
|
|
56
|
+
export type CURRENT_QUESTION_ANSWER_TYPES = ASSESSMENT_VIDEO_FILE_TYPES['answer'];
|
|
28
57
|
export interface IVideo {
|
|
29
58
|
video_id?: string;
|
|
30
59
|
bandwidth?: string;
|
|
@@ -37,7 +66,7 @@ export interface IVideo {
|
|
|
37
66
|
quality?: string;
|
|
38
67
|
referrer?: string;
|
|
39
68
|
cvUrl?: string;
|
|
40
|
-
videos
|
|
69
|
+
videos?: ALL_VIDEO_FILE_TYPES[];
|
|
41
70
|
processTime?: number;
|
|
42
71
|
files?: string[];
|
|
43
72
|
personalInfo?: Record<string, string>;
|
|
@@ -3,9 +3,10 @@ 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 { ALL_JOB_QUESTIONS_TYPE } from './jobInterface';
|
|
7
7
|
import { IVideoError } from '../utils/errors.utils';
|
|
8
|
-
|
|
8
|
+
import { IVideoDimensions } from './videoInterface';
|
|
9
|
+
type IUploaderRef = {
|
|
9
10
|
[uploaderRef: string]: ActorRef<DoneInvokeEvent<any>>;
|
|
10
11
|
};
|
|
11
12
|
export declare const VIDEO_ERROR_MESSAGES: {
|
|
@@ -13,10 +14,10 @@ export declare const VIDEO_ERROR_MESSAGES: {
|
|
|
13
14
|
REDIRECT: "REDIRECT";
|
|
14
15
|
NO_ERROR: "";
|
|
15
16
|
};
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
17
|
+
export type ICameraStateKey = keyof typeof CAMERA_STATES_MESSAGES;
|
|
18
|
+
export type IMicrophoneStateKey = keyof typeof MICROPHONE_STATES_MESSAGES;
|
|
19
|
+
export type IInternetStateKey = keyof typeof INTERNET_STATES_MESSAGES;
|
|
20
|
+
export type IVideoCorruptedMessagesKey = keyof typeof VIDEO_ERROR_MESSAGES;
|
|
20
21
|
export declare const CAMERA_STATES: {
|
|
21
22
|
[K in ICameraStateKey]: K;
|
|
22
23
|
};
|
|
@@ -47,7 +48,7 @@ interface IChecksMessage {
|
|
|
47
48
|
export interface InitialState {
|
|
48
49
|
speedTestResult: number;
|
|
49
50
|
widgetConfig: IWidgetConfig;
|
|
50
|
-
questions:
|
|
51
|
+
questions: ALL_JOB_QUESTIONS_TYPE[];
|
|
51
52
|
isConnected: boolean;
|
|
52
53
|
videoRef: RefObject<HTMLVideoElement>;
|
|
53
54
|
networkRef: ActorRef<DoneInvokeEvent<any>> | null;
|
|
@@ -55,6 +56,8 @@ export interface InitialState {
|
|
|
55
56
|
storageRef: ActorRef<DoneInvokeEvent<any>> | null;
|
|
56
57
|
previewRef: ActorRef<DoneInvokeEvent<any>> | null;
|
|
57
58
|
uploaderRefs: IUploaderRef;
|
|
59
|
+
countDownRef: ActorRef<DoneInvokeEvent<any>> | null;
|
|
60
|
+
timer: number;
|
|
58
61
|
currentQuestion: number;
|
|
59
62
|
currentTake: number;
|
|
60
63
|
selectedTake: number | null;
|
|
@@ -71,6 +74,8 @@ export interface InitialState {
|
|
|
71
74
|
error: IVideoError | null;
|
|
72
75
|
failedRecordingAttempts: number;
|
|
73
76
|
failedRecordingMessage: IVideoCorruptedMessagesKey;
|
|
77
|
+
isResumed: boolean;
|
|
78
|
+
videoDimensions: IVideoDimensions;
|
|
74
79
|
}
|
|
75
80
|
export interface IWidgetMachineProps {
|
|
76
81
|
widgetMachine: State<InitialState, DoneInvokeEvent<any>, any, {
|
|
@@ -103,8 +108,11 @@ export declare const enum STATES {
|
|
|
103
108
|
INTERVIEW__EXPLANATION = "interviewExplanation",
|
|
104
109
|
INTERVIEW__QUESTION = "interviewQuestion",
|
|
105
110
|
INTERVIEW__VIDEO_QUESTION = "interviewVideoQuestion",
|
|
111
|
+
INTERVIEW__ANSWER_SELECTOR = "interviewAnswerSelector",
|
|
112
|
+
INTERVIEW__ASSESSMENT = "interviewAssessment",
|
|
106
113
|
INTERVIEW__RECORDING = "interviewRecording",
|
|
107
114
|
PREVIEW = "preview",
|
|
115
|
+
NEXT_QUESTION_MIDDLEWARE = "nextQuestionMiddleware",
|
|
108
116
|
RE_INIT_RECORDER = "reInitRecorder",
|
|
109
117
|
RE_INIT_RECORDER__NEXT_RETAKE = "reInitRecorderNextRetake",
|
|
110
118
|
RE_INIT_RECORDER__NEXT_QUESTION = "reInitRecorderNextQuestion",
|
|
@@ -128,8 +136,10 @@ export declare const enum ACTIONS {
|
|
|
128
136
|
SPAWN_UPLOADER = "spawnUploader",
|
|
129
137
|
SPAWN_STORAGE = "spawnStorage",
|
|
130
138
|
SPAWN_PREVIEW = "spawnPreview",
|
|
139
|
+
SPAWN_COUNT_DOWN = "spawnCountDown",
|
|
131
140
|
STOP_RECORDER = "stopRecorder",
|
|
132
141
|
STOP_PREVIEW = "stopPreview",
|
|
142
|
+
STOP_COUNT_DOWN = "stopCountDown",
|
|
133
143
|
STORE_TAKE = "storeTake",
|
|
134
144
|
GET_TAKE = "getTake",
|
|
135
145
|
GET_TAKES = "getTakes",
|
|
@@ -139,8 +149,10 @@ export declare const enum ACTIONS {
|
|
|
139
149
|
UPDATE_TOTAL_UPLOADED_FILES_SIZE = "updateTotalUploadedFileSize",
|
|
140
150
|
UPDATE_QUESTION_NUMBER = "updateQuestionNumber",
|
|
141
151
|
UPDATE_RETAKES_NUMBER = "updateRetakesNumber",
|
|
152
|
+
UPDATE_TIMER = "updateTimer",
|
|
142
153
|
UPDATE_AXION_AUTH = "updateAxiosAuth",
|
|
143
154
|
RECORDER_RE_INIT = "recorderReInit",
|
|
155
|
+
DEACTIVATE_RECORDER = "deactivateRecorder",
|
|
144
156
|
RECORDER_RE_INIT_AUTO_START = "recorderReInitAutoStart",
|
|
145
157
|
UPDATE_RECORDER_PARAMS = "updateRecorderParams",
|
|
146
158
|
UPDATE_TOTAL_UPLOADED = "updateTotalUploaded",
|
|
@@ -154,7 +166,8 @@ export declare const enum ACTIONS {
|
|
|
154
166
|
UPDATE_VIDEO_PART = "updateVideoPart",
|
|
155
167
|
INCREASE_FAILED_RECORDING_ATTEMPTS = "increaseFailedRecordingAttempts",
|
|
156
168
|
RESET_FAILED_RECORDING_ATTEMPTS = "resetFailedRecordingAttempts",
|
|
157
|
-
CLEAR_VIDEO_ERROR = "clearVideoError"
|
|
169
|
+
CLEAR_VIDEO_ERROR = "clearVideoError",
|
|
170
|
+
UPDATE_VIDEO_DIMENSIONS = "updateVideoDimensions"
|
|
158
171
|
}
|
|
159
172
|
export declare const enum EVENTS {
|
|
160
173
|
SPAWN_UPLOADER = "SPAWN_UPLOADER",
|
|
@@ -175,7 +188,9 @@ export declare const enum EVENTS {
|
|
|
175
188
|
UPLOADER_PROGRESS = "UPLOADER_PROGRESS",
|
|
176
189
|
UPLOADER_FINISHED = "UPLOADER_FINISHED",
|
|
177
190
|
RECORDER_ERROR = "RECORDER_ERROR",
|
|
178
|
-
RETRY = "RETRY"
|
|
191
|
+
RETRY = "RETRY",
|
|
192
|
+
UPDATE_TIMER = "UPDATE_TIMER",
|
|
193
|
+
UPDATE_VIDEO_DIMENSIONS = "UPDATE_VIDEO_DIMENSIONS"
|
|
179
194
|
}
|
|
180
195
|
export declare const enum SERVICES {
|
|
181
196
|
UPDATE_VIDEO_OBJECT_CALL = "updateVideoObjectCall",
|
|
@@ -199,7 +214,10 @@ export declare const enum GUARDS {
|
|
|
199
214
|
IS_NO_SOUND_ERROR = "isNoSoundError",
|
|
200
215
|
IS_VIDEO_CORRUPTED = "isVideoCorrupted",
|
|
201
216
|
IS_AUDIO_ERROR = "isAudioError",
|
|
202
|
-
IS_VIDEO_ERROR = "isVideoError"
|
|
217
|
+
IS_VIDEO_ERROR = "isVideoError",
|
|
218
|
+
THERE_ARE_NO_VIDEO_QUESTIONS_TYPE = "thereAreNoVideoQuestionType",
|
|
219
|
+
IS_RECORDER_READY = "isRecorderReady",
|
|
220
|
+
IS_ASSESSMENT_QUESTION = "isAssessmentQuestion"
|
|
203
221
|
}
|
|
204
222
|
export declare const enum TAGS {
|
|
205
223
|
SETUP = "setup",
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CounterInterface } from '../../interfaces/countDownInterface';
|
|
2
|
+
export declare const counterMachine: import("xstate").StateMachine<CounterInterface, any, import("xstate").AnyEventObject, {
|
|
3
|
+
value: any;
|
|
4
|
+
context: CounterInterface;
|
|
5
|
+
}, import("xstate").BaseActionObject, import("xstate").ServiceMap, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, import("xstate").AnyEventObject, import("xstate").BaseActionObject, import("xstate").ServiceMap>>;
|
|
@@ -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, ALL_VIDEO_FILE_TYPES, IVideoDimensions } 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, completed, uploaded, bandwidth }: IVideo) => Promise<IWidgetConfigResponse>;
|
|
6
|
-
export declare const updateVideoFile: (videoId: string, videoFile:
|
|
7
|
-
export declare const getUploadUrl: (videoId: string, fileName: string, typeExtension: string) => Promise<IWidgetConfigResponse>;
|
|
5
|
+
export declare const updateVideo: ({ video_id, started, completed, uploaded, bandwidth }: IVideo) => Promise<IWidgetConfigResponse>;
|
|
6
|
+
export declare const updateVideoFile: (videoId: string, videoFile: ALL_VIDEO_FILE_TYPES) => Promise<IWidgetConfigResponse>;
|
|
7
|
+
export declare const getUploadUrl: (videoId: string, fileName: string, typeExtension: string, { width, height }: IVideoDimensions) => Promise<IWidgetConfigResponse>;
|
|
@@ -11,3 +11,11 @@ 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
|
+
export declare const DEFAULT_ASSESSMENT_MAX_CHARS = 300;
|
|
16
|
+
export declare const DEFAULT_ASSESSMENT_DURATION = 0;
|
|
17
|
+
export declare const DEFAULT_VIDEO_DIMENSIONS: {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
21
|
+
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isRtl: (language?: string) => boolean;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as Sentry from '@sentry/browser';
|
|
2
2
|
import { DoneInvokeEvent } from 'xstate';
|
|
3
|
+
import { Breadcrumb } from '@sentry/types';
|
|
3
4
|
export declare const SentryHub: Sentry.Hub;
|
|
4
|
-
export declare const SentryTrackingFn: (event: DoneInvokeEvent<any>, context: any, name: string) => void;
|
|
5
|
+
export declare const SentryTrackingFn: (event: DoneInvokeEvent<any>, context: any, name: string, level: 'fatal' | 'error' | 'warning' | 'log' | 'info' | 'debug') => void;
|
|
6
|
+
export declare const SentryBreadcrumb: ({ type, level, event_id, category, message, data }: Breadcrumb) => void;
|