@myinterview/widget-react 1.0.4 → 1.0.6
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/index.js +12 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/configInterface.d.ts +10 -3
- package/dist/esm/interfaces/jobInterface.d.ts +8 -0
- package/dist/esm/utils/constants.utils.d.ts +3 -1
- package/dist/index.d.ts +18 -3
- package/package.json +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
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
|
}
|
|
@@ -15,7 +15,7 @@ export declare type IEnv = 'dev' | 'staging' | 'production';
|
|
|
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
20
|
openAnimation?: boolean;
|
|
21
21
|
debug?: boolean;
|
|
@@ -25,6 +25,9 @@ interface IConfig {
|
|
|
25
25
|
introVideoTitle?: string;
|
|
26
26
|
env?: IEnv;
|
|
27
27
|
}
|
|
28
|
+
export declare type IClientConfig = Omit<IConfig, 'practiceQuestions'> & {
|
|
29
|
+
practiceQuestions: IClientQuestion[];
|
|
30
|
+
};
|
|
28
31
|
export interface IWidgetConfig {
|
|
29
32
|
video?: IVideo;
|
|
30
33
|
candidate: ICandidate;
|
|
@@ -35,6 +38,10 @@ export interface IWidgetConfig {
|
|
|
35
38
|
buttonText?: string;
|
|
36
39
|
buttonStyle?: CSSProperties;
|
|
37
40
|
}
|
|
41
|
+
export declare type IClientWidgetConfig = Omit<IWidgetConfig, 'job' | 'config'> & {
|
|
42
|
+
job: IClientJob;
|
|
43
|
+
config: IClientConfig;
|
|
44
|
+
};
|
|
38
45
|
export interface IWidgetConfigResponse {
|
|
39
46
|
video: IVideo;
|
|
40
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;
|
|
@@ -20,3 +25,6 @@ export interface IJob {
|
|
|
20
25
|
company_id?: string;
|
|
21
26
|
jobID?: string;
|
|
22
27
|
}
|
|
28
|
+
export declare type IClientJob = Omit<IJob, 'questions'> & {
|
|
29
|
+
questions: IClientQuestion[];
|
|
30
|
+
};
|
|
@@ -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;
|
|
@@ -37,6 +42,9 @@ interface IJob {
|
|
|
37
42
|
company_id?: string;
|
|
38
43
|
jobID?: string;
|
|
39
44
|
}
|
|
45
|
+
declare type IClientJob = Omit<IJob, 'questions'> & {
|
|
46
|
+
questions: IClientQuestion[];
|
|
47
|
+
};
|
|
40
48
|
|
|
41
49
|
interface IVideoPlatformOS {
|
|
42
50
|
architecture: number;
|
|
@@ -90,7 +98,7 @@ interface IVideo {
|
|
|
90
98
|
}
|
|
91
99
|
|
|
92
100
|
declare type IMessageType = 'completed' | 'deadline' | 'applied' | 'inactiveJob';
|
|
93
|
-
interface
|
|
101
|
+
interface IOnFinish {
|
|
94
102
|
redirectUrl?: string;
|
|
95
103
|
video_id: string;
|
|
96
104
|
}
|
|
@@ -101,7 +109,7 @@ declare type IEnv = 'dev' | 'staging' | 'production';
|
|
|
101
109
|
interface IConfig {
|
|
102
110
|
auth: string;
|
|
103
111
|
onWidgetClicked?: () => void;
|
|
104
|
-
|
|
112
|
+
onFinish?: (data: IOnFinish) => void;
|
|
105
113
|
onError?: (data: IOnError) => void;
|
|
106
114
|
openAnimation?: boolean;
|
|
107
115
|
debug?: boolean;
|
|
@@ -111,6 +119,9 @@ interface IConfig {
|
|
|
111
119
|
introVideoTitle?: string;
|
|
112
120
|
env?: IEnv;
|
|
113
121
|
}
|
|
122
|
+
declare type IClientConfig = Omit<IConfig, 'practiceQuestions'> & {
|
|
123
|
+
practiceQuestions: IClientQuestion[];
|
|
124
|
+
};
|
|
114
125
|
interface IWidgetConfig {
|
|
115
126
|
video?: IVideo;
|
|
116
127
|
candidate: ICandidate;
|
|
@@ -121,6 +132,10 @@ interface IWidgetConfig {
|
|
|
121
132
|
buttonText?: string;
|
|
122
133
|
buttonStyle?: CSSProperties;
|
|
123
134
|
}
|
|
135
|
+
declare type IClientWidgetConfig = Omit<IWidgetConfig, 'job' | 'config'> & {
|
|
136
|
+
job: IClientJob;
|
|
137
|
+
config: IClientConfig;
|
|
138
|
+
};
|
|
124
139
|
|
|
125
140
|
interface IGetToken {
|
|
126
141
|
type: string;
|
|
@@ -129,6 +144,6 @@ interface IGetToken {
|
|
|
129
144
|
}
|
|
130
145
|
declare const getToken: ({ type, value, secretKey }: IGetToken) => string;
|
|
131
146
|
|
|
132
|
-
declare const Widget: React.FC<
|
|
147
|
+
declare const Widget: React.FC<IClientWidgetConfig>;
|
|
133
148
|
|
|
134
149
|
export { IWidgetConfig, Widget, getToken };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myinterview/widget-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "myInterview widget v3",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"files": [
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@cloudflare/stream-react": "^1.8.0",
|
|
12
|
-
"@myinterview/component-library": "^
|
|
12
|
+
"@myinterview/component-library": "^1.0.9",
|
|
13
13
|
"@sentry/react": "^7.7.0",
|
|
14
14
|
"@sentry/tracing": "^7.7.0",
|
|
15
15
|
"@xstate/react": "^3.0.1",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
"webpack-cli": "^4.10.0"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
|
+
"@testing-library/react": "^12.1.5 || ^13.4.0",
|
|
94
95
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
95
|
-
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
96
|
-
"@testing-library/react": "^12.1.5 || ^13.4.0"
|
|
96
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
97
97
|
}
|
|
98
98
|
}
|