@myinterview/widget-react 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/esm/components/Widget.d.ts +2 -2
- package/dist/esm/config/index.d.ts +2 -1
- package/dist/esm/index.js +42 -41
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/configInterface.d.ts +12 -3
- package/dist/esm/interfaces/jobInterface.d.ts +9 -0
- package/dist/esm/services/axiosInstances.service.d.ts +1 -0
- package/dist/esm/utils/constants.utils.d.ts +3 -1
- package/dist/index.d.ts +21 -3
- package/package.json +1 -1
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { ICandidate } from './candidateInterface';
|
|
3
3
|
import { ICompany } from './companyInterface';
|
|
4
|
-
import { IJob, IQuestion } from './jobInterface';
|
|
4
|
+
import { IClientJob, IClientQuestion, IJob, IQuestion } from './jobInterface';
|
|
5
5
|
import { IVideo } from './videoInterface';
|
|
6
6
|
export declare type IMessageType = 'completed' | 'deadline' | 'applied' | 'inactiveJob';
|
|
7
|
-
export interface
|
|
7
|
+
export interface IOnFinish {
|
|
8
8
|
redirectUrl?: string;
|
|
9
9
|
video_id: string;
|
|
10
10
|
}
|
|
11
11
|
export interface IOnError {
|
|
12
12
|
messageType: IMessageType;
|
|
13
13
|
}
|
|
14
|
+
export declare type IEnv = 'dev' | 'staging' | 'production';
|
|
14
15
|
interface IConfig {
|
|
15
16
|
auth: string;
|
|
16
17
|
onWidgetClicked?: () => void;
|
|
17
|
-
|
|
18
|
+
onFinish?: (data: IOnFinish) => void;
|
|
18
19
|
onError?: (data: IOnError) => void;
|
|
19
20
|
openAnimation?: boolean;
|
|
20
21
|
debug?: boolean;
|
|
@@ -22,7 +23,11 @@ interface IConfig {
|
|
|
22
23
|
overlay?: string;
|
|
23
24
|
introVideo?: string;
|
|
24
25
|
introVideoTitle?: string;
|
|
26
|
+
env?: IEnv;
|
|
25
27
|
}
|
|
28
|
+
export declare type IClientConfig = Omit<IConfig, 'practiceQuestions'> & {
|
|
29
|
+
practiceQuestions: IClientQuestion[];
|
|
30
|
+
};
|
|
26
31
|
export interface IWidgetConfig {
|
|
27
32
|
video?: IVideo;
|
|
28
33
|
candidate: ICandidate;
|
|
@@ -33,6 +38,10 @@ export interface IWidgetConfig {
|
|
|
33
38
|
buttonText?: string;
|
|
34
39
|
buttonStyle?: CSSProperties;
|
|
35
40
|
}
|
|
41
|
+
export declare type IClientWidgetConfig = Omit<IWidgetConfig, 'job' | 'config'> & {
|
|
42
|
+
job: IClientJob;
|
|
43
|
+
config: IClientConfig;
|
|
44
|
+
};
|
|
36
45
|
export interface IWidgetConfigResponse {
|
|
37
46
|
video: IVideo;
|
|
38
47
|
candidate: ICandidate;
|
|
@@ -7,6 +7,11 @@ export interface IQuestion {
|
|
|
7
7
|
videoQuestion?: string;
|
|
8
8
|
description?: string;
|
|
9
9
|
}
|
|
10
|
+
export declare type IClientQuestion = Omit<IQuestion, 'numOfRetakes' | 'partDuration' | 'thinkingTime'> & {
|
|
11
|
+
attempts?: number;
|
|
12
|
+
duration?: number;
|
|
13
|
+
thinkingTime?: number;
|
|
14
|
+
};
|
|
10
15
|
export interface IJob {
|
|
11
16
|
language?: string;
|
|
12
17
|
transcriptLanguage?: string;
|
|
@@ -18,4 +23,8 @@ export interface IJob {
|
|
|
18
23
|
old_jobID?: string;
|
|
19
24
|
apiKey?: string;
|
|
20
25
|
company_id?: string;
|
|
26
|
+
jobID?: string;
|
|
21
27
|
}
|
|
28
|
+
export declare type IClientJob = Omit<IJob, 'questions'> & {
|
|
29
|
+
questions: IClientQuestion[];
|
|
30
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const videoAxiosInstance: import("axios").AxiosInstance;
|
|
2
2
|
export declare const s3AxiosInstance: import("axios").AxiosInstance;
|
|
3
3
|
export declare const updateVideoAxiosAuth: (auth: string) => void;
|
|
4
|
+
export declare const updateVideoAxiosBaseURL: (url: string) => void;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const DEFAULT_COUNT_DOWN = 3;
|
|
2
2
|
export declare const DEFAULT_DURATION = 60;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const DEFAULT_ATTEMPTS = 3;
|
|
4
|
+
export declare const DEFAULT_THINKING_TIME = 0;
|
|
5
|
+
export declare const ENOUGH_RECORDING_TIME = 3;
|
|
4
6
|
export declare const SPEED_TEST_FILE_SIZE = 5;
|
|
5
7
|
export declare const FAST_UPLOAD_SPEED = 0.35;
|
|
6
8
|
export declare const SLOW_UPLOAD_SPEED = 0.1;
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,11 @@ interface IQuestion {
|
|
|
24
24
|
videoQuestion?: string;
|
|
25
25
|
description?: string;
|
|
26
26
|
}
|
|
27
|
+
declare type IClientQuestion = Omit<IQuestion, 'numOfRetakes' | 'partDuration' | 'thinkingTime'> & {
|
|
28
|
+
attempts?: number;
|
|
29
|
+
duration?: number;
|
|
30
|
+
thinkingTime?: number;
|
|
31
|
+
};
|
|
27
32
|
interface IJob {
|
|
28
33
|
language?: string;
|
|
29
34
|
transcriptLanguage?: string;
|
|
@@ -35,7 +40,11 @@ interface IJob {
|
|
|
35
40
|
old_jobID?: string;
|
|
36
41
|
apiKey?: string;
|
|
37
42
|
company_id?: string;
|
|
43
|
+
jobID?: string;
|
|
38
44
|
}
|
|
45
|
+
declare type IClientJob = Omit<IJob, 'questions'> & {
|
|
46
|
+
questions: IClientQuestion[];
|
|
47
|
+
};
|
|
39
48
|
|
|
40
49
|
interface IVideoPlatformOS {
|
|
41
50
|
architecture: number;
|
|
@@ -89,17 +98,18 @@ interface IVideo {
|
|
|
89
98
|
}
|
|
90
99
|
|
|
91
100
|
declare type IMessageType = 'completed' | 'deadline' | 'applied' | 'inactiveJob';
|
|
92
|
-
interface
|
|
101
|
+
interface IOnFinish {
|
|
93
102
|
redirectUrl?: string;
|
|
94
103
|
video_id: string;
|
|
95
104
|
}
|
|
96
105
|
interface IOnError {
|
|
97
106
|
messageType: IMessageType;
|
|
98
107
|
}
|
|
108
|
+
declare type IEnv = 'dev' | 'staging' | 'production';
|
|
99
109
|
interface IConfig {
|
|
100
110
|
auth: string;
|
|
101
111
|
onWidgetClicked?: () => void;
|
|
102
|
-
|
|
112
|
+
onFinish?: (data: IOnFinish) => void;
|
|
103
113
|
onError?: (data: IOnError) => void;
|
|
104
114
|
openAnimation?: boolean;
|
|
105
115
|
debug?: boolean;
|
|
@@ -107,7 +117,11 @@ interface IConfig {
|
|
|
107
117
|
overlay?: string;
|
|
108
118
|
introVideo?: string;
|
|
109
119
|
introVideoTitle?: string;
|
|
120
|
+
env?: IEnv;
|
|
110
121
|
}
|
|
122
|
+
declare type IClientConfig = Omit<IConfig, 'practiceQuestions'> & {
|
|
123
|
+
practiceQuestions: IClientQuestion[];
|
|
124
|
+
};
|
|
111
125
|
interface IWidgetConfig {
|
|
112
126
|
video?: IVideo;
|
|
113
127
|
candidate: ICandidate;
|
|
@@ -118,6 +132,10 @@ interface IWidgetConfig {
|
|
|
118
132
|
buttonText?: string;
|
|
119
133
|
buttonStyle?: CSSProperties;
|
|
120
134
|
}
|
|
135
|
+
declare type IClientWidgetConfig = Omit<IWidgetConfig, 'job' | 'config'> & {
|
|
136
|
+
job: IClientJob;
|
|
137
|
+
config: IClientConfig;
|
|
138
|
+
};
|
|
121
139
|
|
|
122
140
|
interface IGetToken {
|
|
123
141
|
type: string;
|
|
@@ -126,6 +144,6 @@ interface IGetToken {
|
|
|
126
144
|
}
|
|
127
145
|
declare const getToken: ({ type, value, secretKey }: IGetToken) => string;
|
|
128
146
|
|
|
129
|
-
declare const Widget: React.FC<
|
|
147
|
+
declare const Widget: React.FC<IClientWidgetConfig>;
|
|
130
148
|
|
|
131
149
|
export { IWidgetConfig, Widget, getToken };
|