@myinterview/widget-react 1.0.11 → 1.0.88

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.
Files changed (202) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/index.js +31900 -0
  3. package/dist/cjs/index.js.map +1 -0
  4. package/dist/{esm → cjs/types}/App.d.ts +0 -0
  5. package/dist/{esm → cjs/types}/components/CountDown.d.ts +0 -0
  6. package/dist/{esm → cjs/types}/components/Counter.d.ts +0 -0
  7. package/dist/{esm → cjs/types}/components/DeviceSelector.d.ts +0 -0
  8. package/dist/{esm → cjs/types}/components/DeviceSelectorList.d.ts +0 -0
  9. package/dist/{esm → cjs/types}/components/DeviceSelectorListNative.d.ts +0 -0
  10. package/dist/{esm → cjs/types}/components/Error.d.ts +0 -0
  11. package/dist/{esm → cjs/types}/components/ErrorBoundaries.d.ts +0 -0
  12. package/dist/{esm → cjs/types}/components/Errors.d.ts +1 -4
  13. package/dist/{esm → cjs/types}/components/Explanation.d.ts +0 -0
  14. package/dist/{esm → cjs/types}/components/Footer.d.ts +0 -0
  15. package/dist/{esm → cjs/types}/components/Header.d.ts +0 -0
  16. package/dist/{esm → cjs/types}/components/InnerView.d.ts +0 -0
  17. package/dist/{esm → cjs/types}/components/Main.d.ts +2 -2
  18. package/dist/{esm → cjs/types}/components/OuterView.d.ts +0 -0
  19. package/dist/{esm → cjs/types}/components/PermissionSteps.d.ts +0 -0
  20. package/dist/{esm → cjs/types}/components/PracticeModeInfo.d.ts +0 -0
  21. package/dist/cjs/types/components/PreviewItem.d.ts +10 -0
  22. package/dist/{esm → cjs/types}/components/PreviewList.d.ts +0 -0
  23. package/dist/{esm → cjs/types}/components/Question.d.ts +0 -0
  24. package/dist/{esm → cjs/types}/components/QuestionItem.d.ts +0 -0
  25. package/dist/{esm → cjs/types}/components/QuestionsList.d.ts +0 -0
  26. package/dist/{esm → cjs/types}/components/RecorderModal.d.ts +0 -1
  27. package/dist/{esm → cjs/types}/components/Setup.d.ts +0 -0
  28. package/dist/{esm → cjs/types}/components/SetupChecks.d.ts +0 -0
  29. package/dist/{esm → cjs/types}/components/SliderModal.d.ts +0 -0
  30. package/dist/{esm → cjs/types}/components/Upload.d.ts +0 -0
  31. package/dist/{esm → cjs/types}/components/VideoCamera.d.ts +0 -1
  32. package/dist/{esm → cjs/types}/components/VideoQuestion.d.ts +0 -0
  33. package/dist/{esm → cjs/types}/components/VideoTimeBar.d.ts +0 -0
  34. package/dist/{esm → cjs/types}/components/WelcomePage.d.ts +0 -0
  35. package/dist/cjs/types/components/Widget.d.ts +9 -0
  36. package/dist/{esm → cjs/types}/components/icons/ClockIcon.d.ts +0 -0
  37. package/dist/{esm → cjs/types}/components/icons/Loading.d.ts +0 -0
  38. package/dist/{esm → cjs/types}/components/icons/NoCameraMic.d.ts +0 -0
  39. package/dist/{esm → cjs/types}/components/icons/PlayIcon.d.ts +0 -0
  40. package/dist/{esm → cjs/types}/components/icons/Retake.d.ts +0 -0
  41. package/dist/{esm → cjs/types}/components/icons/RotateScreenIcon.d.ts +0 -0
  42. package/dist/{esm → cjs/types}/components/ui/Loader.d.ts +0 -0
  43. package/dist/{esm → cjs/types}/components/ui/MicrophoneIndicator.d.ts +0 -0
  44. package/dist/{esm → cjs/types}/components/ui/PracticeMode.d.ts +0 -0
  45. package/dist/{esm → cjs/types}/components/ui/Progress.d.ts +0 -0
  46. package/dist/{esm → cjs/types}/components/ui/QuestionDuration.d.ts +0 -0
  47. package/dist/{esm → cjs/types}/components/ui/QuestionNumber.d.ts +0 -0
  48. package/dist/{esm → cjs/types}/components/ui/RecordingButton.d.ts +0 -0
  49. package/dist/{esm → cjs/types}/components/ui/RotateScreen.d.ts +0 -0
  50. package/dist/{esm → cjs/types}/components/ui/Signal.d.ts +0 -0
  51. package/dist/{esm → cjs/types}/components/ui/StartNowButton.d.ts +0 -0
  52. package/dist/{esm → cjs/types}/components/ui/StartRecordingButton.d.ts +0 -0
  53. package/dist/{esm → cjs/types}/components/ui/StopRecordingButton.d.ts +0 -0
  54. package/dist/{esm → cjs/types}/components/ui/UnsupportedModal.d.ts +0 -0
  55. package/dist/{esm → cjs/types}/config/index.d.ts +1 -2
  56. package/dist/{esm → cjs/types}/config/local.env.d.ts +0 -0
  57. package/dist/{esm → cjs/types}/config/prod.env.d.ts +0 -0
  58. package/dist/{esm → cjs/types}/config/staging.env.d.ts +0 -0
  59. package/dist/cjs/types/i18n/config.d.ts +430 -0
  60. package/dist/cjs/types/index.d.ts +2 -0
  61. package/dist/{esm → cjs/types}/interfaces/candidateInterface.d.ts +0 -0
  62. package/dist/{esm → cjs/types}/interfaces/candidateSessionInterface.d.ts +5 -10
  63. package/dist/{esm → cjs/types}/interfaces/companyInterface.d.ts +0 -0
  64. package/dist/cjs/types/interfaces/configInterface.d.ts +33 -0
  65. package/dist/{esm → cjs/types}/interfaces/jobInterface.d.ts +1 -9
  66. package/dist/{esm → cjs/types}/interfaces/microphoneInterface.d.ts +0 -0
  67. package/dist/{esm → cjs/types}/interfaces/networkInterface.d.ts +0 -0
  68. package/dist/{esm → cjs/types}/interfaces/previewInterface.d.ts +0 -0
  69. package/dist/{esm → cjs/types}/interfaces/recorderInterface.d.ts +0 -0
  70. package/dist/{esm → cjs/types}/interfaces/storageInterface.d.ts +0 -0
  71. package/dist/{esm → cjs/types}/interfaces/uploaderInterface.d.ts +0 -0
  72. package/dist/{esm → cjs/types}/interfaces/videoInterface.d.ts +0 -1
  73. package/dist/{esm → cjs/types}/interfaces/widgetInterface.d.ts +5 -24
  74. package/dist/{esm → cjs/types}/machines/acceleratorMachines/accUploaderMachine.d.ts +0 -0
  75. package/dist/{esm → cjs/types}/machines/acceleratorMachines/accWidgetMachine.d.ts +0 -0
  76. package/dist/{esm → cjs/types}/machines/acceleratorMachines/microphoneMachine.d.ts +0 -0
  77. package/dist/{esm → cjs/types}/machines/acceleratorMachines/networkMachine.d.ts +0 -0
  78. package/dist/{esm → cjs/types}/machines/acceleratorMachines/previewMachine.d.ts +0 -0
  79. package/dist/{esm → cjs/types}/machines/acceleratorMachines/recorderMachineV2.d.ts +0 -0
  80. package/dist/{esm → cjs/types}/machines/acceleratorMachines/storageMachine.d.ts +0 -0
  81. package/dist/{esm → cjs/types}/reportWebVitals.d.ts +0 -0
  82. package/dist/{esm → cjs/types}/services/axiosInstances.service.d.ts +0 -1
  83. package/dist/{esm → cjs/types}/services/s3.service.d.ts +0 -0
  84. package/dist/{esm → cjs/types}/services/session.service.d.ts +1 -12
  85. package/dist/{esm → cjs/types}/services/speedTest.service.d.ts +0 -0
  86. package/dist/cjs/types/services/video.service.d.ts +7 -0
  87. package/dist/{esm → cjs/types}/setupTests.d.ts +0 -0
  88. package/dist/{esm → cjs/types}/utils/authToken.utils.d.ts +0 -0
  89. package/dist/{esm → cjs/types}/utils/constants.utils.d.ts +2 -5
  90. package/dist/{esm → cjs/types}/utils/debug.utils.d.ts +0 -0
  91. package/dist/{esm → cjs/types}/utils/device.utils.d.ts +0 -0
  92. package/dist/{esm → cjs/types}/utils/errors.utils.d.ts +0 -0
  93. package/dist/{esm → cjs/types}/utils/formatters.utils.d.ts +0 -0
  94. package/dist/{esm → cjs/types}/utils/messages.utils.d.ts +0 -0
  95. package/dist/cjs/types/utils/permissionSteps.utils.d.ts +19 -0
  96. package/dist/{esm → cjs/types}/utils/practiceQuestions.utils.d.ts +0 -0
  97. package/dist/{esm → cjs/types}/utils/sentry.utils.d.ts +0 -0
  98. package/dist/{esm → cjs/types}/utils/statusCodes.utils.d.ts +0 -0
  99. package/dist/esm/index.js +1819 -9383
  100. package/dist/esm/index.js.map +1 -1
  101. package/dist/esm/types/App.d.ts +2 -0
  102. package/dist/esm/types/components/CountDown.d.ts +6 -0
  103. package/dist/esm/types/components/Counter.d.ts +8 -0
  104. package/dist/esm/types/components/DeviceSelector.d.ts +10 -0
  105. package/dist/esm/types/components/DeviceSelectorList.d.ts +9 -0
  106. package/dist/esm/types/components/DeviceSelectorListNative.d.ts +6 -0
  107. package/dist/esm/types/components/Error.d.ts +8 -0
  108. package/dist/esm/types/components/ErrorBoundaries.d.ts +9 -0
  109. package/dist/esm/types/components/Errors.d.ts +9 -0
  110. package/dist/esm/types/components/Explanation.d.ts +7 -0
  111. package/dist/esm/types/components/Footer.d.ts +2 -0
  112. package/dist/esm/types/components/Header.d.ts +10 -0
  113. package/dist/esm/types/components/InnerView.d.ts +12 -0
  114. package/dist/esm/types/components/Main.d.ts +8 -0
  115. package/dist/esm/types/components/OuterView.d.ts +8 -0
  116. package/dist/esm/types/components/PermissionSteps.d.ts +6 -0
  117. package/dist/esm/types/components/PracticeModeInfo.d.ts +8 -0
  118. package/dist/esm/types/components/PreviewItem.d.ts +10 -0
  119. package/dist/esm/types/components/PreviewList.d.ts +17 -0
  120. package/dist/esm/types/components/Question.d.ts +9 -0
  121. package/dist/esm/types/components/QuestionItem.d.ts +12 -0
  122. package/dist/esm/types/components/QuestionsList.d.ts +11 -0
  123. package/dist/esm/types/components/RecorderModal.d.ts +14 -0
  124. package/dist/esm/types/components/Setup.d.ts +6 -0
  125. package/dist/esm/types/components/SetupChecks.d.ts +14 -0
  126. package/dist/esm/types/components/SliderModal.d.ts +8 -0
  127. package/dist/esm/types/components/Upload.d.ts +13 -0
  128. package/dist/esm/types/components/VideoCamera.d.ts +28 -0
  129. package/dist/esm/types/components/VideoQuestion.d.ts +9 -0
  130. package/dist/esm/types/components/VideoTimeBar.d.ts +9 -0
  131. package/dist/esm/types/components/WelcomePage.d.ts +11 -0
  132. package/dist/esm/types/components/Widget.d.ts +9 -0
  133. package/dist/esm/types/components/icons/ClockIcon.d.ts +2 -0
  134. package/dist/esm/types/components/icons/Loading.d.ts +2 -0
  135. package/dist/esm/types/components/icons/NoCameraMic.d.ts +2 -0
  136. package/dist/esm/types/components/icons/PlayIcon.d.ts +6 -0
  137. package/dist/esm/types/components/icons/Retake.d.ts +2 -0
  138. package/dist/esm/types/components/icons/RotateScreenIcon.d.ts +2 -0
  139. package/dist/esm/types/components/ui/Loader.d.ts +2 -0
  140. package/dist/esm/types/components/ui/MicrophoneIndicator.d.ts +7 -0
  141. package/dist/esm/types/components/ui/PracticeMode.d.ts +2 -0
  142. package/dist/esm/types/components/ui/Progress.d.ts +6 -0
  143. package/dist/esm/types/components/ui/QuestionDuration.d.ts +6 -0
  144. package/dist/esm/types/components/ui/QuestionNumber.d.ts +7 -0
  145. package/dist/esm/types/components/ui/RecordingButton.d.ts +6 -0
  146. package/dist/esm/types/components/ui/RotateScreen.d.ts +2 -0
  147. package/dist/esm/types/components/ui/Signal.d.ts +9 -0
  148. package/dist/esm/types/components/ui/StartNowButton.d.ts +6 -0
  149. package/dist/esm/types/components/ui/StartRecordingButton.d.ts +10 -0
  150. package/dist/esm/types/components/ui/StopRecordingButton.d.ts +7 -0
  151. package/dist/esm/types/components/ui/UnsupportedModal.d.ts +6 -0
  152. package/dist/esm/types/config/index.d.ts +6 -0
  153. package/dist/esm/types/config/local.env.d.ts +6 -0
  154. package/dist/esm/types/config/prod.env.d.ts +6 -0
  155. package/dist/esm/types/config/staging.env.d.ts +6 -0
  156. package/dist/esm/{i18n → types/i18n}/config.d.ts +28 -37
  157. package/dist/esm/types/index.d.ts +2 -0
  158. package/dist/esm/types/interfaces/candidateInterface.d.ts +10 -0
  159. package/dist/esm/types/interfaces/candidateSessionInterface.d.ts +78 -0
  160. package/dist/esm/types/interfaces/companyInterface.d.ts +3 -0
  161. package/dist/esm/types/interfaces/configInterface.d.ts +33 -0
  162. package/dist/esm/types/interfaces/jobInterface.d.ts +22 -0
  163. package/dist/esm/types/interfaces/microphoneInterface.d.ts +36 -0
  164. package/dist/esm/types/interfaces/networkInterface.d.ts +9 -0
  165. package/dist/esm/types/interfaces/previewInterface.d.ts +14 -0
  166. package/dist/esm/types/interfaces/recorderInterface.d.ts +110 -0
  167. package/dist/esm/types/interfaces/storageInterface.d.ts +29 -0
  168. package/dist/esm/types/interfaces/uploaderInterface.d.ts +39 -0
  169. package/dist/esm/types/interfaces/videoInterface.d.ts +54 -0
  170. package/dist/esm/types/interfaces/widgetInterface.d.ts +192 -0
  171. package/dist/esm/types/machines/acceleratorMachines/accUploaderMachine.d.ts +6 -0
  172. package/dist/esm/types/machines/acceleratorMachines/accWidgetMachine.d.ts +6 -0
  173. package/dist/esm/types/machines/acceleratorMachines/microphoneMachine.d.ts +6 -0
  174. package/dist/esm/types/machines/acceleratorMachines/networkMachine.d.ts +5 -0
  175. package/dist/esm/types/machines/acceleratorMachines/previewMachine.d.ts +6 -0
  176. package/dist/esm/types/machines/acceleratorMachines/recorderMachineV2.d.ts +6 -0
  177. package/dist/esm/types/machines/acceleratorMachines/storageMachine.d.ts +6 -0
  178. package/dist/esm/types/reportWebVitals.d.ts +3 -0
  179. package/dist/esm/types/services/axiosInstances.service.d.ts +3 -0
  180. package/dist/esm/types/services/s3.service.d.ts +1 -0
  181. package/dist/esm/types/services/session.service.d.ts +46 -0
  182. package/dist/esm/types/services/speedTest.service.d.ts +2 -0
  183. package/dist/esm/types/services/video.service.d.ts +7 -0
  184. package/dist/esm/types/setupTests.d.ts +1 -0
  185. package/dist/esm/types/utils/authToken.utils.d.ts +7 -0
  186. package/dist/esm/types/utils/constants.utils.d.ts +9 -0
  187. package/dist/esm/types/utils/debug.utils.d.ts +19 -0
  188. package/dist/esm/types/utils/device.utils.d.ts +12 -0
  189. package/dist/esm/types/utils/errors.utils.d.ts +9 -0
  190. package/dist/esm/types/utils/formatters.utils.d.ts +5 -0
  191. package/dist/esm/types/utils/messages.utils.d.ts +16 -0
  192. package/dist/esm/types/utils/permissionSteps.utils.d.ts +19 -0
  193. package/dist/esm/types/utils/practiceQuestions.utils.d.ts +2 -0
  194. package/dist/esm/types/utils/sentry.utils.d.ts +4 -0
  195. package/dist/esm/types/utils/statusCodes.utils.d.ts +13 -0
  196. package/dist/index.d.ts +13 -45
  197. package/package.json +4 -4
  198. package/dist/esm/components/PreviewItem.d.ts +0 -16
  199. package/dist/esm/components/Widget.d.ts +0 -6
  200. package/dist/esm/index.d.ts +0 -4
  201. package/dist/esm/interfaces/configInterface.d.ts +0 -55
  202. package/dist/esm/services/video.service.d.ts +0 -7
@@ -1,6 +1,6 @@
1
1
  import i18n from 'i18next';
2
2
  export declare const resources: {
3
- readonly cn: {
3
+ readonly en: {
4
4
  readonly translation: {
5
5
  setup: {
6
6
  title: string;
@@ -32,8 +32,8 @@ export declare const resources: {
32
32
  };
33
33
  };
34
34
  time: {
35
- minuteLeft_one: string;
36
- minuteLeft_other: string;
35
+ less_than_one_left: string;
36
+ minuteLeft: string;
37
37
  minute_one: string;
38
38
  minute_other: string;
39
39
  second_one: string;
@@ -43,6 +43,13 @@ export declare const resources: {
43
43
  title: string;
44
44
  subtitle: string;
45
45
  label: string;
46
+ questions: {
47
+ numOfRetakes: number;
48
+ thinkingTime: number;
49
+ partDuration: number;
50
+ question: string;
51
+ description: string;
52
+ }[];
46
53
  };
47
54
  preview: {
48
55
  title: string;
@@ -137,7 +144,7 @@ export declare const resources: {
137
144
  };
138
145
  };
139
146
  };
140
- readonly de: {
147
+ readonly fr: {
141
148
  readonly translation: {
142
149
  setup: {
143
150
  title: string;
@@ -151,6 +158,7 @@ export declare const resources: {
151
158
  };
152
159
  microphone: {
153
160
  name: string;
161
+ NO_SOUND: string;
154
162
  WAITING: string;
155
163
  ERROR: string;
156
164
  READY: string;
@@ -169,8 +177,8 @@ export declare const resources: {
169
177
  };
170
178
  };
171
179
  time: {
172
- minuteLeft_one: string;
173
- minuteLeft_other: string;
180
+ less_than_one_left: string;
181
+ minuteLeft: string;
174
182
  minute_one: string;
175
183
  minute_other: string;
176
184
  second_one: string;
@@ -180,6 +188,13 @@ export declare const resources: {
180
188
  title: string;
181
189
  subtitle: string;
182
190
  label: string;
191
+ questions: {
192
+ numOfRetakes: number;
193
+ thinkingTime: number;
194
+ partDuration: number;
195
+ question: string;
196
+ description: string;
197
+ }[];
183
198
  };
184
199
  preview: {
185
200
  title: string;
@@ -274,7 +289,7 @@ export declare const resources: {
274
289
  };
275
290
  };
276
291
  };
277
- readonly en: {
292
+ readonly es: {
278
293
  readonly translation: {
279
294
  setup: {
280
295
  title: string;
@@ -317,13 +332,6 @@ export declare const resources: {
317
332
  title: string;
318
333
  subtitle: string;
319
334
  label: string;
320
- questions: {
321
- numOfRetakes: number;
322
- thinkingTime: number;
323
- partDuration: number;
324
- question: string;
325
- description: string;
326
- }[];
327
335
  };
328
336
  preview: {
329
337
  title: string;
@@ -370,15 +378,6 @@ export declare const resources: {
370
378
  TITLE: string;
371
379
  DETAILS: string;
372
380
  };
373
- RETRY: {
374
- TITLE: string;
375
- DETAILS: string;
376
- CTA: string;
377
- };
378
- REDIRECT: {
379
- TITLE: string;
380
- DETAILS: string;
381
- };
382
381
  };
383
382
  permissions: {
384
383
  title: string;
@@ -427,7 +426,7 @@ export declare const resources: {
427
426
  };
428
427
  };
429
428
  };
430
- readonly es: {
429
+ readonly cn: {
431
430
  readonly translation: {
432
431
  setup: {
433
432
  title: string;
@@ -459,8 +458,8 @@ export declare const resources: {
459
458
  };
460
459
  };
461
460
  time: {
462
- less_than_one_left: string;
463
- minuteLeft: string;
461
+ minuteLeft_one: string;
462
+ minuteLeft_other: string;
464
463
  minute_one: string;
465
464
  minute_other: string;
466
465
  second_one: string;
@@ -564,7 +563,7 @@ export declare const resources: {
564
563
  };
565
564
  };
566
565
  };
567
- readonly fr: {
566
+ readonly de: {
568
567
  readonly translation: {
569
568
  setup: {
570
569
  title: string;
@@ -578,7 +577,6 @@ export declare const resources: {
578
577
  };
579
578
  microphone: {
580
579
  name: string;
581
- NO_SOUND: string;
582
580
  WAITING: string;
583
581
  ERROR: string;
584
582
  READY: string;
@@ -597,8 +595,8 @@ export declare const resources: {
597
595
  };
598
596
  };
599
597
  time: {
600
- less_than_one_left: string;
601
- minuteLeft: string;
598
+ minuteLeft_one: string;
599
+ minuteLeft_other: string;
602
600
  minute_one: string;
603
601
  minute_other: string;
604
602
  second_one: string;
@@ -608,13 +606,6 @@ export declare const resources: {
608
606
  title: string;
609
607
  subtitle: string;
610
608
  label: string;
611
- questions: {
612
- numOfRetakes: number;
613
- thinkingTime: number;
614
- partDuration: number;
615
- question: string;
616
- description: string;
617
- }[];
618
609
  };
619
610
  preview: {
620
611
  title: string;
@@ -0,0 +1,2 @@
1
+ import { Widget } from './components/Widget';
2
+ export { Widget };
@@ -0,0 +1,10 @@
1
+ export interface ICandidate {
2
+ candidate_id?: string;
3
+ email: string;
4
+ username: string;
5
+ phone?: string;
6
+ video_id?: string;
7
+ redirectUrl?: string;
8
+ apiKey?: string;
9
+ company_id?: string;
10
+ }
@@ -0,0 +1,78 @@
1
+ /**
2
+ * @author tht7 ( tht7 )
3
+ * @date 10/07/12022 6:48 pm
4
+ */
5
+ declare global {
6
+ interface Window {
7
+ candidateSession?: ICandidateSession;
8
+ }
9
+ }
10
+ export declare const enum CandidateSessionError {
11
+ NO_CANDIDATE_FOUND = "NO_CANDIDATE_FOUND",
12
+ NO_JOB_FOUND = "NO_JOB_FOUND",
13
+ DEADLINE_EXPIRED = "DEADLINE_EXPIRED",
14
+ NO_AUDIO = "NO_AUDIO",
15
+ NO_VIDEO = "NO_VIDEO",
16
+ PERMISSIONS_BLOCKED = "PERMISSIONS_BLOCKED",
17
+ JOB_INACTIVE = "JOB_INACTIVE",
18
+ SUBSCRIPTION_PAUSED = "SUBSCRIPTION_PAUSED",
19
+ SUBSCRIPTION_CANCELLED = "SUBSCRIPTION_CANCELLED",
20
+ INTERVIEW_ALREADY_COMPLETED = "INTERVIEW_ALREADY_COMPLETED"
21
+ }
22
+ export declare const enum CandidateSessionWarnings {
23
+ LOW_LIGHT = "LOW_LIGHT",
24
+ LOW_VOLUME = "LOW_VOLUME",
25
+ SLOW_CONNECTION = "SLOW_CONNECTION"
26
+ }
27
+ export declare type CandidateSessionSourceType = 'direct' | 'email' | 'sms' | 'email_reminder' | 'sms_reminder';
28
+ export declare const enum CandidateSessionSourceMap {
29
+ direct_start_inter = "direct",
30
+ reminder_start_inter = "email_reminder",
31
+ reminder_sms_start_inter = "sms_reminder",
32
+ email_start_inter = "email",
33
+ sms_start_inter = "sms"
34
+ }
35
+ export interface ICandidateSession {
36
+ session_id: string;
37
+ duration: number;
38
+ error?: keyof typeof CandidateSessionError;
39
+ warnings?: (keyof typeof CandidateSessionWarnings)[];
40
+ reload_count: number;
41
+ files_uploaded_count: number;
42
+ company_id: string;
43
+ apiKey: string;
44
+ job_id?: string;
45
+ candidate_id?: string;
46
+ video_id?: string;
47
+ email?: string;
48
+ source?: CandidateSessionSourceType;
49
+ userAgent?: string;
50
+ ip?: string;
51
+ candidate_location?: string;
52
+ first_interaction?: Date;
53
+ form_filled?: Date;
54
+ document_uploaded?: Date;
55
+ top_tips_shown?: Date;
56
+ top_tips_clicked?: Date;
57
+ top_tips_positive_rating?: boolean;
58
+ widget_shown?: Date;
59
+ widget_practiced?: Date;
60
+ widget_camera_setup?: Date;
61
+ widget_camera_error?: Date;
62
+ widget_microphone_setup?: Date;
63
+ widget_microphone_error?: Date;
64
+ widget_slow_internet_setup?: Date;
65
+ widget_high_internet_setup?: Date;
66
+ widget_medium_internet_setup?: Date;
67
+ widget_no_internet_setup?: Date;
68
+ widget_start_click_setup?: Date;
69
+ widget_change_camera_setup?: Date;
70
+ widget_change_mic_setup?: Date;
71
+ widget_exit?: Date;
72
+ widget_retake_count: number;
73
+ widget_submitted?: Date;
74
+ widget_completed?: Date;
75
+ page_closed: Date;
76
+ createdAt: Date;
77
+ updatedAt: Date;
78
+ }
@@ -0,0 +1,3 @@
1
+ export interface ICompany {
2
+ shouldShowWaterMark: boolean;
3
+ }
@@ -0,0 +1,33 @@
1
+ import { ICandidate } from './candidateInterface';
2
+ import { ICompany } from './companyInterface';
3
+ import { IJob } from './jobInterface';
4
+ import { IVideo } from './videoInterface';
5
+ export declare type IMessageType = 'completed' | 'deadline' | 'applied' | 'inactiveJob';
6
+ export interface IOnCompleteCallback {
7
+ redirectUrl?: string;
8
+ video_id: string;
9
+ }
10
+ export interface IOnError {
11
+ messageType: IMessageType;
12
+ }
13
+ export interface IConfig {
14
+ video?: IVideo;
15
+ candidate: ICandidate;
16
+ job?: IJob;
17
+ company?: ICompany;
18
+ config: {
19
+ auth: string;
20
+ onCompleteCallback?: (data: IOnCompleteCallback) => void;
21
+ onError?: (data: IOnError) => void;
22
+ };
23
+ }
24
+ export interface IConfigResponse {
25
+ video: IVideo;
26
+ candidate: ICandidate;
27
+ job: IJob;
28
+ }
29
+ export interface IConfigRequest {
30
+ video?: IVideo;
31
+ candidate?: ICandidate;
32
+ job?: IJob;
33
+ }
@@ -0,0 +1,22 @@
1
+ export interface IQuestion {
2
+ question: string;
3
+ numOfRetakes: number;
4
+ partDuration: number;
5
+ thinkingTime: number;
6
+ timeLimit?: number;
7
+ videoQuestion?: string;
8
+ description?: string;
9
+ }
10
+ export interface IJob {
11
+ language?: string;
12
+ overlay?: string;
13
+ transcriptLanguage?: string;
14
+ title?: string;
15
+ company?: string;
16
+ job_id?: string;
17
+ logo?: string;
18
+ questions?: IQuestion[];
19
+ old_jobID?: string;
20
+ apiKey?: string;
21
+ company_id?: string;
22
+ }
@@ -0,0 +1,36 @@
1
+ export interface InitialState {
2
+ mediaStream: MediaStream | null;
3
+ micData: number;
4
+ retakes: number;
5
+ }
6
+ export declare const enum STATES {
7
+ INACTIVE = "inactive",
8
+ ACTIVE = "active",
9
+ NOT_RECEIVING_DATA = "notReceivingData",
10
+ RECEIVING_DATA = "receivingData",
11
+ DATA_CHECK = "dataCheck"
12
+ }
13
+ export declare const enum ACTIONS {
14
+ CONSOLE_LOG = "consoleLog",
15
+ SET_MEDIA_STREAM = "setMediaStream",
16
+ UPDATE_MIC = "updateMic",
17
+ UPDATE_RETAKES = "UPDATE_RETAKES",
18
+ CLEAN_RETAKES = "CLEAN_RETAKES",
19
+ SENTRY = "sentry"
20
+ }
21
+ export declare const enum EVENTS {
22
+ ON_SET_MEDIA_STREAM = "ON_SET_MEDIA_STREAM",
23
+ SEND_DATA = "SEND_DATA",
24
+ MIC_CHECK = "MIC_CHECK",
25
+ SEND_ERROR = "SEND_ERROR",
26
+ UPDATE_RETAKES = "UPDATE_RETAKES",
27
+ CLEAN_RETAKES = "CLEAN_RETAKES"
28
+ }
29
+ export declare const enum SERVICES {
30
+ CHECK_MICROPHONE_LEVEL = "checkMicrophoneLevel"
31
+ }
32
+ export declare const enum GUARDS {
33
+ IS_MEDIA_STREAM_AVAILABLE = "isMediaStreamAvailable",
34
+ IS_MIC_NOT_RECEIVING_DATA = "isMicNotReceivingData",
35
+ IS_MIC_RECEIVING_DATA = "isMicReceivingData"
36
+ }
@@ -0,0 +1,9 @@
1
+ export declare const enum STATES {
2
+ READY = "ready"
3
+ }
4
+ export declare const enum ACTIONS {
5
+ SET_CONNECTION = "setConnection"
6
+ }
7
+ export declare const enum EVENTS {
8
+ CONNECTION_CHANGED = "CONNECTION_CHANGED"
9
+ }
@@ -0,0 +1,14 @@
1
+ export interface PreviewInterface {
2
+ videosUrls: string[];
3
+ }
4
+ export declare const enum STATES {
5
+ IDLE = "idle",
6
+ ERROR = "error",
7
+ FINISH = "finish"
8
+ }
9
+ export declare const enum EVENTS {
10
+ TAKES_RECEIVED = "TAKES_RECEIVED"
11
+ }
12
+ export declare const enum ACTIONS {
13
+ SET_TAKES = "setTakes"
14
+ }
@@ -0,0 +1,110 @@
1
+ import { ActorRef, DoneInvokeEvent } from 'xstate';
2
+ import { RefObject } from 'react';
3
+ export interface RecorderInterface {
4
+ isDefaultConstraint: boolean;
5
+ audioDevices?: MediaDeviceInfo[];
6
+ videoDevices?: MediaDeviceInfo[];
7
+ selectedAudioDevice?: MediaDeviceInfo;
8
+ selectedVideoDevice?: MediaDeviceInfo;
9
+ mediaRecorder?: MediaRecorder | null;
10
+ mediaStream?: MediaStream | null;
11
+ videoRef: RefObject<HTMLVideoElement>;
12
+ microphoneRef: ActorRef<DoneInvokeEvent<any>> | null;
13
+ speedTestLevel: SPEED_TEST_LEVEL;
14
+ videoBitsPerSecond: number;
15
+ mimeType: string;
16
+ mimeTypes: string[];
17
+ error: {};
18
+ countdown: number;
19
+ recordingTime: number;
20
+ facingMode: any;
21
+ durations: number;
22
+ constraint: ConstrainProps;
23
+ autoStart: boolean;
24
+ isMicError: boolean;
25
+ }
26
+ interface ConstrainProps {
27
+ video: {
28
+ width: {
29
+ min?: number;
30
+ ideal?: number;
31
+ max: number;
32
+ };
33
+ aspectRatio?: number;
34
+ };
35
+ audio: boolean;
36
+ }
37
+ export declare type mediaDeviceType = 'video' | 'audio';
38
+ export declare const enum STATES {
39
+ INIT = "init",
40
+ IDLE = "idle",
41
+ RECORDING = "recording",
42
+ WAITING = "waiting",
43
+ ERROR = "error"
44
+ }
45
+ export declare const enum RECORDER_STATES {
46
+ INIT_RECORDER = "initRecorder",
47
+ COUNT_DOWN = "countDown",
48
+ COLLECTING_BLOBS = "collectingBlobs",
49
+ RECORDER_TIMER = "recorderTimer",
50
+ RECORDER_SENDING_BLOBS = "recorderSendingBlobs"
51
+ }
52
+ export declare const enum RECORDER_EVENTS {
53
+ PAUSE = "PAUSE",
54
+ START_RECORDING = "START_RECORDING",
55
+ STOP_RECORDING = "STOP_RECORDING",
56
+ RETRY = "RETRY",
57
+ SET_QUESTION_PARAMS = "SET_QUESTION_PARAMS",
58
+ CHANGE_VIDEO_DEVICE = "CHANGE_VIDEO_DEVICE",
59
+ CHANGE_AUDIO_DEVICE = "CHANGE_AUDIO_DEVICE",
60
+ TICK = "TICK",
61
+ FORCE_START = "FORCE_START",
62
+ INIT_RECORDER = "INIT_RECORDER",
63
+ SAVE = "SAVE",
64
+ RE_INIT = "RE_INIT",
65
+ MIC_DATA_RECEIVED = "MIC_DATA_RECEIVED",
66
+ SPEED_TEST_RESULT_UPDATED = "SPEED_TEST_RESULT_UPDATED"
67
+ }
68
+ export declare const enum ACTIONS {
69
+ CLEAN_MIC_ERROR = "CLEAN_MIC_ERROR",
70
+ SET_MIC_ERROR = "setMicError",
71
+ DISABLE_AUTO_START = "disableAutoStart",
72
+ AUTO_START = "autoStart",
73
+ PAUSE_MEDIA_RECORDER = "pauseMediaRecorder",
74
+ ACTIVATE_MEDIA_RECORDER = "activateMediaRecorder",
75
+ SESSION_EVENT = "sessionEvent",
76
+ DISABLE_DEFAULT_CONSTRAINT = "disableDefaultConstraint",
77
+ SET_DEFAULT_CONSTRAINT = "setDefaultConstraint",
78
+ SET_MEDIA_STREAM = "setMediaStream",
79
+ SET_ERROR = "setError",
80
+ SET_INITIAL_CONTEXT = "setInitialContext",
81
+ STOP_MEDIA_STREAM = "stopMediaStream",
82
+ SET_MEDIA_STREAM_AUDIO_CHANGE = "setMediaStreamAudioChange",
83
+ SET_MEDIA_STREAM_VIDEO_CHANGE = "setMediaStreamVideoChange",
84
+ SET_MIC_MEDIA_STREAM = "SET_MIC_MEDIA_STREAM",
85
+ SAVE_TAKE = "SAVE_TAKE",
86
+ CLEAN = "CLEAN",
87
+ SET_QUESTION_PARAMS = "SET_QUESTION_PARAMS",
88
+ RESET = "REST",
89
+ SEND_ERROR = "SEND_ERROR",
90
+ SET_MEDIA_RECORDER = "setMediaRecorder",
91
+ SET_MIME_TYPE = "setmimeType",
92
+ SET_TIME_TO_START = "setTimeToStart",
93
+ SET_RECORDING_TIME = "setRecordingTime",
94
+ STOP_MEDIA_RECORDER = "stopMediaRecorder",
95
+ FORCE_START = "forceStart",
96
+ STOP_MIC = "stopMic",
97
+ SET_SPEED_TEST = "setSpeedTest",
98
+ SET_CONSTRAINT = "setConstraint",
99
+ SENTRY = "sentry"
100
+ }
101
+ export declare const enum RECORDER_SERVICE {
102
+ GET_MEDIA_STREAM = "getMediaStream",
103
+ GET_MEDIA_RECORDER = "getMediaRecorder"
104
+ }
105
+ export declare const enum SPEED_TEST_LEVEL {
106
+ LOW = 0,
107
+ MEDIUM = 1,
108
+ HIGH = 2
109
+ }
110
+ export {};
@@ -0,0 +1,29 @@
1
+ export interface ITakeObj {
2
+ file: File[];
3
+ objectUrl: string;
4
+ }
5
+ interface IFilesQuestion {
6
+ [questionNumber: number]: ITakeObj[];
7
+ }
8
+ export interface InitialState {
9
+ questions: IFilesQuestion;
10
+ practice: IFilesQuestion;
11
+ }
12
+ export declare const enum EVENTS {
13
+ STORE_TAKE = "STORE_TAKE",
14
+ GET_TAKE = "GET_TAKE",
15
+ GET_TAKES = "GET_TAKES",
16
+ REMOVE_TAKES = "REMOVE_TAKES"
17
+ }
18
+ export declare const enum ACTIONS {
19
+ CONSOLE_LOG = "consoleLog",
20
+ STORE_TAKE = "storeTake",
21
+ SEND_TAKE = "sendTake",
22
+ SEND_TAKES = "sendTakes",
23
+ REMOVE_TAKES = "removeTakes"
24
+ }
25
+ export declare const enum TAKE_TYPES {
26
+ QUESTION = "question",
27
+ PRACTICE = "practice"
28
+ }
29
+ export {};
@@ -0,0 +1,39 @@
1
+ import { IVideoFile } from './videoInterface';
2
+ interface ILastUploadChunkl {
3
+ loaded: number;
4
+ timeStamp: number;
5
+ }
6
+ export interface InitialState {
7
+ isConnected: boolean;
8
+ currentQuestion: number | null;
9
+ file: File | null;
10
+ signedUrl: string;
11
+ uploadSpeed: number;
12
+ lastUploadChunk: ILastUploadChunkl;
13
+ videoId: string;
14
+ videoFile: IVideoFile;
15
+ }
16
+ export declare const enum STATES {
17
+ IDLE = "idle",
18
+ UPLOADING = "uploading",
19
+ GET_SIGNED_URL = "getSignedUrl",
20
+ UPLOAD_TO_S3 = "uploadToS3",
21
+ UPLOADED = "uploaded",
22
+ FINISHED = "finished"
23
+ }
24
+ export declare const enum ACTIONS {
25
+ SET_UPLOADED = "setUploaded",
26
+ CONSOLE_LOG = "consoleLog",
27
+ SET_CONNECTION = "setConnection",
28
+ SET_SIGNED_URL = "setSignedUrl",
29
+ SET_VIDEO_FILE = "setVideoFile",
30
+ INITIAL_UPLOAD_TIMESTAMP = "initialUploadTimestamp",
31
+ UPDATE_UPLOAD_SPEED = "updateUploadSpeed",
32
+ SEND_UPLOAD_PROGRESS = "sendUploadProgress",
33
+ UPDATE_PARENT = "updateParent",
34
+ SENTRY = "sentry"
35
+ }
36
+ export declare const enum GUARDS {
37
+ CAN_UPLOAD = "canUplaod"
38
+ }
39
+ export {};
@@ -0,0 +1,54 @@
1
+ export interface IVideoPlatformOS {
2
+ architecture: number;
3
+ family: string;
4
+ version: string;
5
+ }
6
+ export interface IVideoPlatform {
7
+ description: string;
8
+ layout: string;
9
+ manufacturer: string;
10
+ name: string;
11
+ prerelease: string;
12
+ product: string;
13
+ ua: string;
14
+ version: string;
15
+ os: IVideoPlatformOS;
16
+ }
17
+ export interface IVideoFile {
18
+ completed: boolean;
19
+ uploaded: boolean;
20
+ filename: string;
21
+ retakes: number;
22
+ started: boolean;
23
+ videoLength?: number;
24
+ uploadUrl?: string;
25
+ question?: string;
26
+ }
27
+ export interface IVideo {
28
+ video_id: string;
29
+ bandwidth?: string;
30
+ clicked?: boolean;
31
+ started?: boolean;
32
+ completed?: boolean;
33
+ uploaded?: boolean;
34
+ jobID?: string;
35
+ platform?: IVideoPlatform;
36
+ quality?: string;
37
+ referrer?: string;
38
+ cvUrl?: string;
39
+ videos: IVideoFile[];
40
+ processTime?: number;
41
+ files?: string[];
42
+ personalInfo?: Record<string, string>;
43
+ language?: string;
44
+ gdprTimestamp?: string;
45
+ tracking?: {
46
+ reminder: number;
47
+ source: number;
48
+ };
49
+ }
50
+ export declare const enum VIDEO_STATUS {
51
+ INCOMPLETED = 0,
52
+ COMPLETED = 1,
53
+ UPLOADED = 2
54
+ }