@testgorilla/tgo-coding-test 2.0.1 → 2.0.3
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 +8 -5
- package/fesm2022/testgorilla-tgo-coding-test.mjs +24 -37
- package/fesm2022/testgorilla-tgo-coding-test.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/lib/components/tgo-coding-test-candidate-view/tgo-coding-test-candidate-view.component.d.ts +1 -1
- package/lib/config/index.d.ts +1 -1
- package/lib/config/tgo-coding-test.token.d.ts +19 -0
- package/lib/services/candidate-coding-test-services/candidature-api.service.d.ts +1 -1
- package/lib/services/candidate-coding-test-services/coding-test.service.d.ts +1 -1
- package/package.json +25 -21
- package/lib/config/tgo-coding-test.provider.d.ts +0 -26
- package/shared/index.d.ts +0 -4
- package/shared/lib/components/audio-animation/audio-animation.component.d.ts +0 -27
- package/shared/lib/components/audio-animation/index.d.ts +0 -1
- package/shared/lib/components/index.d.ts +0 -2
- package/shared/lib/components/vimeo-video/index.d.ts +0 -1
- package/shared/lib/components/vimeo-video/vimeo-video.component.d.ts +0 -24
- package/shared/lib/models/answer.d.ts +0 -17
- package/shared/lib/models/assessment.d.ts +0 -80
- package/shared/lib/models/environment.d.ts +0 -1
- package/shared/lib/models/index.d.ts +0 -8
- package/shared/lib/models/question-component.d.ts +0 -54
- package/shared/lib/models/question.d.ts +0 -102
- package/shared/lib/models/test.d.ts +0 -81
- package/shared/lib/models/translations.d.ts +0 -1
- package/shared/lib/models/window.d.ts +0 -6
- package/shared/lib/services/api/api.service.d.ts +0 -25
- package/shared/lib/services/api/mocked-api.service.d.ts +0 -35
- package/shared/lib/services/environment/environment.service.d.ts +0 -6
- package/shared/lib/services/index.d.ts +0 -9
- package/shared/lib/services/localization/languages.model.d.ts +0 -15
- package/shared/lib/services/localization/transloco-lazy-module-utils.d.ts +0 -11
- package/shared/lib/services/localization/transloco-testing.module.d.ts +0 -2
- package/shared/lib/services/media/media.service.d.ts +0 -29
- package/shared/lib/services/mixpanel/mixpanel.service.d.ts +0 -10
- package/shared/lib/services/theme/theme.service.d.ts +0 -8
- package/shared/test-mocks/assessment-test.mock.d.ts +0 -21
- package/shared/test-mocks/index.d.ts +0 -2
- package/shared/test-mocks/tgo-ui.mock.d.ts +0 -21
package/index.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ export { Modes } from './lib/models/mode';
|
|
|
10
10
|
export { LibCodingTestService, ResetCodeAction } from './lib/services/lib-coding-test.service';
|
|
11
11
|
export { StorageCodingService } from './lib/services/storage.service';
|
|
12
12
|
export { CodingTestConfigService } from './lib/services/coding-test-config.service';
|
|
13
|
-
export { TgoCodingTestConfig,
|
|
13
|
+
export { TgoCodingTestConfig, TGO_CODING_TEST_CONFIG, } from './lib/config';
|
package/lib/components/tgo-coding-test-candidate-view/tgo-coding-test-candidate-view.component.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { Assessment, IAntiCheatingState, IConfigurationState, INavigationButtonState, IQuestionDataContract, ISubmissionState, Question, TestResultRead } from '
|
|
2
|
+
import { Assessment, IAntiCheatingState, IConfigurationState, INavigationButtonState, IQuestionDataContract, ISubmissionState, Question, TestResultRead } from '@testgorilla/tgo-shared-lib';
|
|
3
3
|
import { ApplicationTheme } from '@testgorilla/tgo-ui';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { CodingTestsResultsModel } from '../../models/coderunner-execution-results';
|
package/lib/config/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { TgoCodingTestConfig } from './tgo-coding-test.config';
|
|
2
|
-
export {
|
|
2
|
+
export { TGO_CODING_TEST_CONFIG } from './tgo-coding-test.token';
|
|
@@ -5,5 +5,24 @@ import { TgoCodingTestConfig } from './tgo-coding-test.config';
|
|
|
5
5
|
*
|
|
6
6
|
* This token is used to inject the runtime configuration provided
|
|
7
7
|
* by the consuming application into library services.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* // In your app.config.ts
|
|
12
|
+
* import { TGO_CODING_TEST_CONFIG } from '@testgorilla/tgo-coding-test';
|
|
13
|
+
* import { environment } from './environments/environment';
|
|
14
|
+
*
|
|
15
|
+
* export const appConfig: ApplicationConfig = {
|
|
16
|
+
* providers: [
|
|
17
|
+
* {
|
|
18
|
+
* provide: TGO_CODING_TEST_CONFIG,
|
|
19
|
+
* useValue: {
|
|
20
|
+
* apiUrl: environment.apiUrl,
|
|
21
|
+
* coderunnerV2Endpoint: environment.coderunnerV2Endpoint
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
* ]
|
|
25
|
+
* };
|
|
26
|
+
* ```
|
|
8
27
|
*/
|
|
9
28
|
export declare const TGO_CODING_TEST_CONFIG: InjectionToken<TgoCodingTestConfig>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApplicationTheme, DialogService, SnackbarService } from '@testgorilla/tgo-ui';
|
|
2
|
-
import { MixpanelService, TestResultRead } from '
|
|
2
|
+
import { MixpanelService, TestResultRead } from '@testgorilla/tgo-shared-lib';
|
|
3
3
|
import { ExampleTestCase, TestCaseDeletionData } from '../../models/test-cases';
|
|
4
4
|
import { LibCodingTestService, ResetCodeAction } from '../lib-coding-test.service';
|
|
5
5
|
import { Observable } from 'rxjs';
|
package/package.json
CHANGED
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testgorilla/tgo-coding-test",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/animations": "
|
|
6
|
-
"@angular/common": "
|
|
7
|
-
"@angular/core": "
|
|
8
|
-
"@angular/forms": "
|
|
9
|
-
"@angular/material": "19.
|
|
10
|
-
"@angular/router": "
|
|
11
|
-
"@ngneat/transloco": "
|
|
12
|
-
"@ngneat/until-destroy": "10.0.0",
|
|
13
|
-
"@testgorilla/tgo-ui": "
|
|
14
|
-
"angular-split": "
|
|
15
|
-
"jest-preset-angular": "14.4.2",
|
|
5
|
+
"@angular/animations": ">= 19.0.0 < 20.0.0",
|
|
6
|
+
"@angular/common": ">= 19.0.0 < 20.0.0",
|
|
7
|
+
"@angular/core": ">= 19.0.0 < 20.0.0",
|
|
8
|
+
"@angular/forms": ">= 19.0.0 < 20.0.0",
|
|
9
|
+
"@angular/material": ">= 19.0.0 < 20.0.0",
|
|
10
|
+
"@angular/router": ">= 19.0.0 < 20.0.0",
|
|
11
|
+
"@ngneat/transloco": ">= 4.0.0 < 5.0.0",
|
|
12
|
+
"@ngneat/until-destroy": ">= 10.0.0 < 11.0.0",
|
|
13
|
+
"@testgorilla/tgo-ui": ">= 4.0.0 < 5.0.0",
|
|
14
|
+
"angular-split": ">= 19.0.0 < 20.0.0",
|
|
16
15
|
"monaco-editor": "0.52.2",
|
|
17
|
-
"ngx-guided-tour": "
|
|
18
|
-
"ngx-monaco-editor-v2": "
|
|
19
|
-
"ngx-quill": "
|
|
20
|
-
"ngx-webstorage": "
|
|
21
|
-
"quill": "
|
|
22
|
-
"rxjs": "
|
|
16
|
+
"ngx-guided-tour": ">= 2.0.0 < 3.0.0",
|
|
17
|
+
"ngx-monaco-editor-v2": ">= 19.0.0 < 20.0.0",
|
|
18
|
+
"ngx-quill": ">= 27.0.0 < 28.0.0",
|
|
19
|
+
"ngx-webstorage": ">= 19.0.0 < 20.0.0",
|
|
20
|
+
"quill": ">= 2.0.0 < 3.0.0",
|
|
21
|
+
"rxjs": ">= 7.0.0 < 8.0.0"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@testgorilla/tgo-shared-lib": ">= 2.0.0 < 3.0.0",
|
|
25
|
+
"tslib": "^2.3.0"
|
|
23
26
|
},
|
|
24
27
|
"sideEffects": false,
|
|
25
28
|
"license": "PROPRIETARY",
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public",
|
|
31
|
+
"registry": "https://registry.npmjs.org/"
|
|
32
|
+
},
|
|
26
33
|
"displayName": "Coding test",
|
|
27
34
|
"description": "Coding test component",
|
|
28
35
|
"module": "fesm2022/testgorilla-tgo-coding-test.mjs",
|
|
@@ -35,8 +42,5 @@
|
|
|
35
42
|
"types": "./index.d.ts",
|
|
36
43
|
"default": "./fesm2022/testgorilla-tgo-coding-test.mjs"
|
|
37
44
|
}
|
|
38
|
-
},
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"tslib": "^2.3.0"
|
|
41
45
|
}
|
|
42
46
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { EnvironmentProviders } from '@angular/core';
|
|
2
|
-
import { TgoCodingTestConfig } from './tgo-coding-test.config';
|
|
3
|
-
/**
|
|
4
|
-
* Provides the TGO Coding Test library configuration.
|
|
5
|
-
*
|
|
6
|
-
* This function should be called in the consuming application's
|
|
7
|
-
* app.config.ts (for standalone apps) or module providers.
|
|
8
|
-
*
|
|
9
|
-
* @param config - The configuration object containing required settings
|
|
10
|
-
* @returns EnvironmentProviders that can be added to the application providers
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import { provideTgoCodingTest } from '@testgorilla/tgo-coding-test';
|
|
15
|
-
* import { environment } from './environments/environment';
|
|
16
|
-
*
|
|
17
|
-
* export const appConfig: ApplicationConfig = {
|
|
18
|
-
* providers: [
|
|
19
|
-
* provideTgoCodingTest({
|
|
20
|
-
* coderunnerV2Endpoint: environment.coderunnerV2Endpoint,
|
|
21
|
-
* }),
|
|
22
|
-
* ],
|
|
23
|
-
* };
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export declare function provideTgoCodingTest(config: TgoCodingTestConfig): EnvironmentProviders;
|
package/shared/index.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { OnChanges, OnDestroy, WritableSignal } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class AudioAnimationComponent implements OnChanges, OnDestroy {
|
|
4
|
-
volume: number;
|
|
5
|
-
fakeData: boolean;
|
|
6
|
-
private isAnimationRunning;
|
|
7
|
-
private animationFrameId;
|
|
8
|
-
private lastAnimationUpdate;
|
|
9
|
-
volumeSignal: WritableSignal<number>;
|
|
10
|
-
barHeightsSignal: import("@angular/core").Signal<{
|
|
11
|
-
'first-bar': string;
|
|
12
|
-
'second-bar': string;
|
|
13
|
-
'third-bar': string;
|
|
14
|
-
}>;
|
|
15
|
-
constructor();
|
|
16
|
-
ngOnChanges(): void;
|
|
17
|
-
private normalizeRealVolume;
|
|
18
|
-
private startAnimation;
|
|
19
|
-
private stopAnimation;
|
|
20
|
-
private getBarHeights;
|
|
21
|
-
private getFakeVolumeRange;
|
|
22
|
-
private getRealVolumeRange;
|
|
23
|
-
private getRandomHeight;
|
|
24
|
-
ngOnDestroy(): void;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AudioAnimationComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AudioAnimationComponent, "tgo-audio-animation", never, { "volume": { "alias": "volume"; "required": false; }; "fakeData": { "alias": "fakeData"; "required": false; }; }, {}, never, never, true, never>;
|
|
27
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './audio-animation.component';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './vimeo-video.component';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
-
import Player from '@vimeo/player';
|
|
3
|
-
import type { VimeoEmbedParameters } from '@vimeo/player/types/formats';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
type Options = VimeoEmbedParameters;
|
|
6
|
-
export declare class VimeoVideoComponent implements OnInit, OnDestroy, OnChanges {
|
|
7
|
-
class: string;
|
|
8
|
-
videoUrl: string;
|
|
9
|
-
isPlaying: boolean;
|
|
10
|
-
options: Options;
|
|
11
|
-
videoEnded: EventEmitter<void>;
|
|
12
|
-
videoStarted: EventEmitter<void>;
|
|
13
|
-
vimeoPlayer?: Player;
|
|
14
|
-
private elRef;
|
|
15
|
-
ngOnInit(): Promise<void>;
|
|
16
|
-
ngOnDestroy(): Promise<void>;
|
|
17
|
-
ngOnChanges(simpleChanges: SimpleChanges): Promise<void>;
|
|
18
|
-
private removeVimeoPlayer;
|
|
19
|
-
private configureVimeoPlayer;
|
|
20
|
-
private playVideo;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<VimeoVideoComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<VimeoVideoComponent, "tgo-vimeo-video", never, { "videoUrl": { "alias": "videoUrl"; "required": false; }; "isPlaying": { "alias": "isPlaying"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "videoEnded": "videoEnded"; "videoStarted": "videoStarted"; }, never, never, true, never>;
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface Answer {
|
|
2
|
-
/** Id */
|
|
3
|
-
id?: number | null;
|
|
4
|
-
/**
|
|
5
|
-
* Text
|
|
6
|
-
* @minLength 1
|
|
7
|
-
*/
|
|
8
|
-
text: string;
|
|
9
|
-
/** Question result id */
|
|
10
|
-
question_result_id?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Uuid
|
|
13
|
-
* @format uuid
|
|
14
|
-
*/
|
|
15
|
-
uuid?: string | null;
|
|
16
|
-
file?: Blob;
|
|
17
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
export interface Assessment {
|
|
2
|
-
/**
|
|
3
|
-
* Uuid
|
|
4
|
-
* @format uuid
|
|
5
|
-
*/
|
|
6
|
-
uuid?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Locale
|
|
9
|
-
* For example, en-US
|
|
10
|
-
* @minLength 1
|
|
11
|
-
*/
|
|
12
|
-
locale?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Is snapshots enabled
|
|
15
|
-
* Specifies whether taking snapshots of candidates during the assessment is enabled.If it's True, taking snapshots of candidates has been enabled.If it's False, taking snapshots of candidates has been disabled.
|
|
16
|
-
*/
|
|
17
|
-
is_snapshots_enabled?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Has video question
|
|
20
|
-
* Specifies whether the assessment contains custom video questions.If it's True, the assessment has video-type custom questions.If it's False, the assessment has no video-type custom questions.
|
|
21
|
-
*/
|
|
22
|
-
has_video_question?: boolean;
|
|
23
|
-
/** Check if extra time is allowed for non-native English speakers */
|
|
24
|
-
allow_non_native_speakers?: boolean;
|
|
25
|
-
/** Check if extra time is allowed for other capacities */
|
|
26
|
-
allow_other_conditions?: boolean;
|
|
27
|
-
general_settings?: {
|
|
28
|
-
/** ID */
|
|
29
|
-
id?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Owner profile id
|
|
32
|
-
* @min 0
|
|
33
|
-
* @max 4294967295
|
|
34
|
-
*/
|
|
35
|
-
owner_profile_id: number;
|
|
36
|
-
/**
|
|
37
|
-
* Company name
|
|
38
|
-
* @maxLength 150
|
|
39
|
-
*/
|
|
40
|
-
company_name?: string | null;
|
|
41
|
-
/**
|
|
42
|
-
* Company color
|
|
43
|
-
* Company color in hexadecimal code
|
|
44
|
-
* @minLength 1
|
|
45
|
-
* @maxLength 32
|
|
46
|
-
*/
|
|
47
|
-
company_color?: string | null;
|
|
48
|
-
/**
|
|
49
|
-
* Company logo
|
|
50
|
-
* @format uri
|
|
51
|
-
* @maxLength 200
|
|
52
|
-
*/
|
|
53
|
-
company_logo?: string | null;
|
|
54
|
-
/**
|
|
55
|
-
* Company redirect url
|
|
56
|
-
* @format uri
|
|
57
|
-
* @maxLength 200
|
|
58
|
-
*/
|
|
59
|
-
company_redirect_url?: string | null;
|
|
60
|
-
/**
|
|
61
|
-
* Has requested demographic details
|
|
62
|
-
* It determines if, at the end of the assessment, the demographic details are requested.If it's true, a form requesting demographic details will be presented once the candidate finishes the assessment.If it's false, once the candidate finishes the assessment, it will be redirected using the company_redirect_url.
|
|
63
|
-
*/
|
|
64
|
-
has_requested_demographic_details?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Has requested feedback
|
|
67
|
-
* It determines if, at the end of the assessment, feedback is requested. If it's true, a form requesting feedback will be presented once the candidate finishes the assessment.If it's false, once the candidate finishes the assessment, it will be redirected using the company_redirect_url.
|
|
68
|
-
*/
|
|
69
|
-
has_requested_feedback?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Original modified
|
|
72
|
-
* The modified date of the original entity in the TestGorilla application
|
|
73
|
-
* @format date-time
|
|
74
|
-
*/
|
|
75
|
-
original_modified?: string | null;
|
|
76
|
-
};
|
|
77
|
-
sharing_results?: boolean;
|
|
78
|
-
deadline_datetime?: string;
|
|
79
|
-
deadline_timezone?: string;
|
|
80
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Environment = 'production' | 'staging' | 'dev' | 'local';
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { Question } from './question';
|
|
4
|
-
import { TestResultRead } from './test';
|
|
5
|
-
import { Environment } from './environment';
|
|
6
|
-
import { Assessment } from './assessment';
|
|
7
|
-
import { ApplicationTheme } from '@testgorilla/tgo-ui';
|
|
8
|
-
export interface INavigationButtonState {
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface IAntiCheatingState {
|
|
12
|
-
fullscreenTracking: boolean;
|
|
13
|
-
snapshotsTracking: boolean;
|
|
14
|
-
mouseEventTracking: boolean;
|
|
15
|
-
}
|
|
16
|
-
export interface IConfigurationState {
|
|
17
|
-
isSavingQuestionDisabled: boolean;
|
|
18
|
-
isExpirationLogicDisabled?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface ISubmissionState {
|
|
21
|
-
text: string;
|
|
22
|
-
file?: Blob;
|
|
23
|
-
language?: string;
|
|
24
|
-
}
|
|
25
|
-
export interface SelectedMediaDevices {
|
|
26
|
-
audioDeviceId: string | null;
|
|
27
|
-
videoDeviceId: string | null;
|
|
28
|
-
}
|
|
29
|
-
export interface IQuestionDataContract {
|
|
30
|
-
completeObservable?: Observable<void>;
|
|
31
|
-
assessment?: Assessment;
|
|
32
|
-
question?: Question;
|
|
33
|
-
test?: TestResultRead;
|
|
34
|
-
isFirstQuestion?: boolean;
|
|
35
|
-
expirationObservable?: Observable<void>;
|
|
36
|
-
mediaAccessChanged?: Observable<SelectedMediaDevices>;
|
|
37
|
-
isExitFullscreen?: Observable<boolean>;
|
|
38
|
-
selectedMediaDevices?: SelectedMediaDevices;
|
|
39
|
-
conversationUrl?: string;
|
|
40
|
-
environment?: Environment;
|
|
41
|
-
validationStatusChanged?: EventEmitter<{
|
|
42
|
-
isValid: boolean;
|
|
43
|
-
message: string;
|
|
44
|
-
}>;
|
|
45
|
-
antiCheatingConfigurationChanged?: EventEmitter<IAntiCheatingState | null>;
|
|
46
|
-
fullscreenChanged?: EventEmitter<boolean>;
|
|
47
|
-
themeChanged?: EventEmitter<ApplicationTheme>;
|
|
48
|
-
codingFullscreenChanged?: EventEmitter<boolean>;
|
|
49
|
-
navigationButtonStateChanged?: EventEmitter<INavigationButtonState | null>;
|
|
50
|
-
configurationStateChanged?: EventEmitter<IConfigurationState | null>;
|
|
51
|
-
submissionStateChanged: EventEmitter<ISubmissionState | null>;
|
|
52
|
-
loadingStateChanged: EventEmitter<boolean>;
|
|
53
|
-
requestMediaAccess?: EventEmitter<void>;
|
|
54
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
export interface Question {
|
|
2
|
-
/** Id */
|
|
3
|
-
id: number;
|
|
4
|
-
/** Question id */
|
|
5
|
-
question_id: number;
|
|
6
|
-
/**
|
|
7
|
-
* Text
|
|
8
|
-
* @minLength 1
|
|
9
|
-
*/
|
|
10
|
-
text: string;
|
|
11
|
-
/**
|
|
12
|
-
* Type
|
|
13
|
-
* @minLength 1
|
|
14
|
-
*/
|
|
15
|
-
type: string;
|
|
16
|
-
context: {
|
|
17
|
-
/**
|
|
18
|
-
* Intro text
|
|
19
|
-
* @minLength 1
|
|
20
|
-
*/
|
|
21
|
-
intro_text: string;
|
|
22
|
-
attempts: number;
|
|
23
|
-
answers: {
|
|
24
|
-
/** Id */
|
|
25
|
-
id: number;
|
|
26
|
-
/**
|
|
27
|
-
* Text
|
|
28
|
-
* @minLength 1
|
|
29
|
-
*/
|
|
30
|
-
text: string;
|
|
31
|
-
/**
|
|
32
|
-
* Answer uuid
|
|
33
|
-
* @format uuid
|
|
34
|
-
*/
|
|
35
|
-
answer_uuid: string;
|
|
36
|
-
}[];
|
|
37
|
-
/**
|
|
38
|
-
* What to look for in the answer
|
|
39
|
-
* @minLength 1
|
|
40
|
-
*/
|
|
41
|
-
what_to_look_for_in_the_answer: string;
|
|
42
|
-
/**
|
|
43
|
-
* Initial code
|
|
44
|
-
* @minLength 1
|
|
45
|
-
*/
|
|
46
|
-
initial_code: string;
|
|
47
|
-
/**
|
|
48
|
-
* Initial code
|
|
49
|
-
* @minLength 1
|
|
50
|
-
*/
|
|
51
|
-
initial_sql?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Code language
|
|
54
|
-
* @minLength 1
|
|
55
|
-
*/
|
|
56
|
-
code_language: string;
|
|
57
|
-
/**
|
|
58
|
-
* Typing test type
|
|
59
|
-
* @minLength 1
|
|
60
|
-
*/
|
|
61
|
-
typing_test_type: string;
|
|
62
|
-
/**
|
|
63
|
-
* Typing test config
|
|
64
|
-
* @minLength 1
|
|
65
|
-
*/
|
|
66
|
-
typing_test_config: string;
|
|
67
|
-
/** Typing test mode */
|
|
68
|
-
typing_test_mode: Record<string, string | null>;
|
|
69
|
-
/** Long answer list */
|
|
70
|
-
long_answer_list: boolean;
|
|
71
|
-
/** Max items */
|
|
72
|
-
max_items: number;
|
|
73
|
-
/** Min items */
|
|
74
|
-
min_items: number;
|
|
75
|
-
/** Coding question boilerplates */
|
|
76
|
-
boilerplates: {
|
|
77
|
-
programming_language: {
|
|
78
|
-
id: number;
|
|
79
|
-
name: string;
|
|
80
|
-
version: string;
|
|
81
|
-
};
|
|
82
|
-
code: string;
|
|
83
|
-
}[];
|
|
84
|
-
/** Coding question testcases */
|
|
85
|
-
testcases: {
|
|
86
|
-
name: string;
|
|
87
|
-
input: string;
|
|
88
|
-
solution: string;
|
|
89
|
-
points: number;
|
|
90
|
-
}[];
|
|
91
|
-
/** Coding question sql testcases */
|
|
92
|
-
sql_testcases: {
|
|
93
|
-
category: string;
|
|
94
|
-
id: number;
|
|
95
|
-
initial_sql: string;
|
|
96
|
-
name: string;
|
|
97
|
-
post_sql: string;
|
|
98
|
-
pre_sql: string;
|
|
99
|
-
result: string;
|
|
100
|
-
}[];
|
|
101
|
-
};
|
|
102
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
export interface TestResultRead {
|
|
2
|
-
/** Test result Id */
|
|
3
|
-
id: number;
|
|
4
|
-
/**
|
|
5
|
-
* Uuid
|
|
6
|
-
* @format uuid
|
|
7
|
-
*/
|
|
8
|
-
uuid?: string;
|
|
9
|
-
test: {
|
|
10
|
-
/** Id */
|
|
11
|
-
id: number;
|
|
12
|
-
/**
|
|
13
|
-
* Name
|
|
14
|
-
* @minLength 1
|
|
15
|
-
*/
|
|
16
|
-
name: string;
|
|
17
|
-
/** Duration */
|
|
18
|
-
duration: number;
|
|
19
|
-
algorithm: string;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Locale
|
|
23
|
-
* For example, en-US.
|
|
24
|
-
* @minLength 1
|
|
25
|
-
* @maxLength 10
|
|
26
|
-
*/
|
|
27
|
-
locale: string;
|
|
28
|
-
/** Total questions */
|
|
29
|
-
total_questions?: number;
|
|
30
|
-
/** Total completed questions */
|
|
31
|
-
total_completed_questions?: number;
|
|
32
|
-
/**
|
|
33
|
-
* Expiration datetime
|
|
34
|
-
* Original name in TGO app: date_of_expiry
|
|
35
|
-
* @format date-time
|
|
36
|
-
*/
|
|
37
|
-
expiration_datetime?: string | null;
|
|
38
|
-
/**
|
|
39
|
-
* Start datetime
|
|
40
|
-
* The exact date time when a test will start
|
|
41
|
-
* @format date-time
|
|
42
|
-
*/
|
|
43
|
-
start_datetime?: string | null;
|
|
44
|
-
/**
|
|
45
|
-
* Is preview mode
|
|
46
|
-
* Indicate if the test is in preview mode. This is used to indicate that the setup of the test should be done only taking into account the practice questions.
|
|
47
|
-
*/
|
|
48
|
-
is_preview_mode?: boolean | null;
|
|
49
|
-
/**
|
|
50
|
-
* Order
|
|
51
|
-
* The order in which the test results are displayed.
|
|
52
|
-
* @min 0
|
|
53
|
-
* @max 4294967295
|
|
54
|
-
*/
|
|
55
|
-
order: number;
|
|
56
|
-
/**
|
|
57
|
-
* Is custom
|
|
58
|
-
* If the test is a custom question's test.
|
|
59
|
-
*/
|
|
60
|
-
is_custom?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Video Length
|
|
63
|
-
* Maximum allowed length for video question recording
|
|
64
|
-
*/
|
|
65
|
-
video_length?: number;
|
|
66
|
-
/**
|
|
67
|
-
* isLat
|
|
68
|
-
* Is language agnostic test
|
|
69
|
-
*/
|
|
70
|
-
is_language_agnostic_test?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* intro_text
|
|
73
|
-
* Intro text for the test
|
|
74
|
-
*/
|
|
75
|
-
intro_text?: string;
|
|
76
|
-
/**
|
|
77
|
-
* test_instruction
|
|
78
|
-
* Test instruction for the test
|
|
79
|
-
*/
|
|
80
|
-
test_instruction?: string;
|
|
81
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ROOT_TRANSLATIONS_SCOPE = "TEST";
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { SnackbarService } from '@testgorilla/tgo-ui';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class ApiService {
|
|
6
|
-
private httpClient;
|
|
7
|
-
private snackbarService;
|
|
8
|
-
private invitationUUID;
|
|
9
|
-
private contentLanguage;
|
|
10
|
-
private ROOT_TRANSLATIONS_SCOPE;
|
|
11
|
-
private baseUrl;
|
|
12
|
-
constructor(httpClient: HttpClient, snackbarService: SnackbarService);
|
|
13
|
-
setParams(invitationUUID: string, contentLanguage: string, translationScope: string, baseUrl: string): void;
|
|
14
|
-
getInvitationUUID(): string;
|
|
15
|
-
get<T>(url: string, options?: {}, errorCallback?: any): Observable<T>;
|
|
16
|
-
post<T>(url: string, data: object, options?: {}, errorCallback?: any, isStandaloneUrl?: boolean): Observable<T>;
|
|
17
|
-
put<T>(url: string, data: object, options?: {}, errorCallback?: any): Observable<T>;
|
|
18
|
-
patch<T>(url: string, data: object, options?: {}, errorCallback?: any): Observable<T>;
|
|
19
|
-
delete(url: string, errorCallback?: any): Observable<object>;
|
|
20
|
-
private handleError;
|
|
21
|
-
private processGenericServerError;
|
|
22
|
-
private buildHeaders;
|
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ApiService, never>;
|
|
24
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ApiService>;
|
|
25
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* MockedApiService provides fake API responses for demo/development purposes.
|
|
5
|
-
* This service mimics the real ApiService interface but returns mock data instead
|
|
6
|
-
* of making actual HTTP calls.
|
|
7
|
-
*
|
|
8
|
-
* Usage: Provide this service in place of ApiService in your demo application:
|
|
9
|
-
* ```
|
|
10
|
-
* { provide: ApiService, useClass: MockedApiService }
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
export declare class MockedApiService {
|
|
14
|
-
private invitationUUID;
|
|
15
|
-
private contentLanguage;
|
|
16
|
-
private ROOT_TRANSLATIONS_SCOPE;
|
|
17
|
-
private readonly MOCK_DELAY;
|
|
18
|
-
setParams(invitationUUID: string, contentLanguage: string, translationScope: string, baseUrl: string): void;
|
|
19
|
-
getInvitationUUID(): string;
|
|
20
|
-
get<T>(url: string, options?: {}, errorCallback?: (error: any) => Observable<never>): Observable<T>;
|
|
21
|
-
post<T>(url: string, data: object, options?: {}, errorCallback?: (error: any) => Observable<never>, isStandaloneUrl?: boolean): Observable<T>;
|
|
22
|
-
put<T>(url: string, data: object, options?: {}, errorCallback?: (error: any) => Observable<never>): Observable<T>;
|
|
23
|
-
patch<T>(url: string, data: object, options?: {}, errorCallback?: (error: any) => Observable<never>): Observable<T>;
|
|
24
|
-
delete(url: string, errorCallback?: (error: any) => Observable<never>): Observable<object>;
|
|
25
|
-
/**
|
|
26
|
-
* Returns mock responses based on the URL pattern
|
|
27
|
-
*/
|
|
28
|
-
private getMockResponse;
|
|
29
|
-
/**
|
|
30
|
-
* Returns a mock coderunner attempt response with test results
|
|
31
|
-
*/
|
|
32
|
-
private getMockCoderunnerAttemptResponse;
|
|
33
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MockedApiService, never>;
|
|
34
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<MockedApiService>;
|
|
35
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './media/media.service';
|
|
2
|
-
export * from './theme/theme.service';
|
|
3
|
-
export * from './localization/transloco-lazy-module-utils';
|
|
4
|
-
export * from './localization/languages.model';
|
|
5
|
-
export * from './localization/transloco-testing.module';
|
|
6
|
-
export * from './api/api.service';
|
|
7
|
-
export * from './api/mocked-api.service';
|
|
8
|
-
export * from './environment/environment.service';
|
|
9
|
-
export * from './mixpanel/mixpanel.service';
|