@cuby-ui/api 0.0.473 → 0.0.475

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/index.d.ts CHANGED
@@ -5,3 +5,4 @@ export * from './project';
5
5
  export * from './factory';
6
6
  export * from './platform';
7
7
  export * from './construction';
8
+ export * from './instruction';
@@ -0,0 +1,2 @@
1
+ export * from './services';
2
+ export * from './models';
@@ -0,0 +1 @@
1
+ export * from './instruction-assessment-config';
@@ -0,0 +1,38 @@
1
+ import { CuiNullable } from '@cuby-ui/cdk';
2
+ export interface InstructionAssessmentConfig {
3
+ readonly assessmentMode: AssessmentMode;
4
+ readonly assessmentRequirement: AssessmentRequirement;
5
+ readonly quizSize: number;
6
+ readonly quizPassThreshold: number;
7
+ readonly questionTypes: QuestionType[];
8
+ readonly quizLanguage: LanguageCode;
9
+ readonly interactiveMinTurns: number;
10
+ readonly interactiveMaxTurns: number;
11
+ readonly interactivePassThreshold: number;
12
+ readonly interactiveLanguage: LanguageCode;
13
+ readonly assistantPrompt: CuiNullable<string>;
14
+ readonly attemptsLimit: number;
15
+ readonly attemptsResetPeriod: Duration;
16
+ readonly ttlHours: number;
17
+ }
18
+ export declare enum AssessmentMode {
19
+ Quiz = "QUIZ",
20
+ Interactive = "INTERACTIVE"
21
+ }
22
+ export declare enum AssessmentRequirement {
23
+ Mandatory = "MANDATORY",
24
+ Optional = "OPTIONAL"
25
+ }
26
+ export declare enum QuestionType {
27
+ SingleChoice = "SINGLE_CHOICE",
28
+ MultipleChoice = "MULTIPLE_CHOICE",
29
+ TrueFalse = "TRUE_FALSE"
30
+ }
31
+ /**
32
+ * Код языка (ISO 639-1)
33
+ */
34
+ export type LanguageCode = string;
35
+ /**
36
+ * Период времени в формате ISO 8601 Duration (например, PT24H, P7D)
37
+ */
38
+ export type Duration = string;
@@ -0,0 +1 @@
1
+ export { CuiInstructionAssessmentConfigApiService } from './instruction-assessment-config-api.service';
@@ -0,0 +1,24 @@
1
+ import type { Observable } from 'rxjs';
2
+ import type { AssessmentMode, AssessmentRequirement, Duration, InstructionAssessmentConfig, QuestionType } from '../models';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CuiInstructionAssessmentConfigApiService {
5
+ private readonly httpClient;
6
+ private readonly INSTRUCTION_URL;
7
+ private readonly ASSESSMENT_CONFIG_URL;
8
+ createInstructionAssessmentConfig(instructionId: string, body: InstructionAssessmentConfig): Observable<InstructionAssessmentConfig>;
9
+ getInstructionAssessmentConfig(instructionId: string): Observable<InstructionAssessmentConfig>;
10
+ updateAssessmentMode(instructionId: string, assessmentMode: AssessmentMode): Observable<InstructionAssessmentConfig>;
11
+ updateAssessmentRequirement(instructionId: string, assessmentRequirement: AssessmentRequirement): Observable<InstructionAssessmentConfig>;
12
+ updateQuizSize(instructionId: string, quizSize: number): Observable<InstructionAssessmentConfig>;
13
+ updateQuizPassThreshold(instructionId: string, quizPassThreshold: number): Observable<InstructionAssessmentConfig>;
14
+ updateQuestionTypes(instructionId: string, questionTypes: QuestionType[]): Observable<InstructionAssessmentConfig>;
15
+ updateInteractiveMinTurns(instructionId: string, interactiveMinTurns: number): Observable<InstructionAssessmentConfig>;
16
+ updateInteractiveMaxTurns(instructionId: string, interactiveMaxTurns: number): Observable<InstructionAssessmentConfig>;
17
+ updateInteractivePassThreshold(instructionId: string, interactivePassThreshold: number): Observable<InstructionAssessmentConfig>;
18
+ updateAssistantPrompt(instructionId: string, assistantPrompt: string): Observable<InstructionAssessmentConfig>;
19
+ updateAttemptsLimit(instructionId: string, attemptsLimit: number): Observable<InstructionAssessmentConfig>;
20
+ updateAttemptsResetPeriod(instructionId: string, attemptsResetPeriod: Duration): Observable<InstructionAssessmentConfig>;
21
+ updateTtlHours(instructionId: string, ttlHours: number): Observable<InstructionAssessmentConfig>;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuiInstructionAssessmentConfigApiService, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<CuiInstructionAssessmentConfigApiService>;
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuby-ui/api",
3
- "version": "0.0.473",
3
+ "version": "0.0.475",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",
@@ -5,4 +5,11 @@ export interface Instruction {
5
5
  readonly shortDescription: string;
6
6
  readonly framerInstructionId: string;
7
7
  readonly frameContainer: Frame;
8
+ readonly status: InstructionStatus;
9
+ }
10
+ export declare enum InstructionStatus {
11
+ Draft = "DRAFT",
12
+ Publishing = "PUBLISHING",
13
+ Published = "PUBLISHED",
14
+ PublishFailed = "PUBLISH_FAILED"
8
15
  }