@dataclouder/ngx-lessons 0.1.3 → 0.1.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/fesm2022/dataclouder-ngx-lessons.mjs +1020 -1008
- package/fesm2022/dataclouder-ngx-lessons.mjs.map +1 -1
- package/index.d.ts +706 -5
- package/package.json +1 -1
- package/lib/components/courses/course-detail/course-detail.component.d.ts +0 -5
- package/lib/components/courses/course-form/course-form.component.d.ts +0 -35
- package/lib/components/courses/course-list/course-list.component.d.ts +0 -25
- package/lib/components/courses/courses.component.d.ts +0 -5
- package/lib/components/courses/courses.service.d.ts +0 -14
- package/lib/components/courses/models/courses.model.d.ts +0 -24
- package/lib/components/courses-admin/courses-admin.component.d.ts +0 -8
- package/lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component.d.ts +0 -25
- package/lib/components/dc-lessons/dc-lesson-component-adder/dc-lesson-component-adder.component.d.ts +0 -11
- package/lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component.d.ts +0 -67
- package/lib/components/dc-lessons/dc-lesson-metadata-editor/dc-lesson-metadata-editor.component.d.ts +0 -43
- package/lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component.d.ts +0 -51
- package/lib/components/dc-lessons/dc-lesson-renderer/eval-agents-skills.d.ts +0 -1
- package/lib/components/dc-lessons/lesson-form/lesson-form.component.d.ts +0 -5
- package/lib/components/dc-lessons/lesson-list/dc-lesson-list.component.d.ts +0 -36
- package/lib/components/dynamic-components/dynamic-components-builder.service.d.ts +0 -8
- package/lib/components/dynamic-components/dynamic-components.service.d.ts +0 -30
- package/lib/components/dynamic-components/selector/selector-builder/selector-builder.component.d.ts +0 -16
- package/lib/components/dynamic-components/selector/selector.component.d.ts +0 -12
- package/lib/components/lesson-mini-components/components/ComponentBuilder.d.ts +0 -33
- package/lib/components/lesson-mini-components/components/ComponentWithForm.d.ts +0 -12
- package/lib/components/lesson-mini-components/components/lesson-dynamic.component.d.ts +0 -7
- package/lib/components/lesson-mini-components/components/lessons.clases.d.ts +0 -159
- package/lib/components/lesson-mini-components/components/speaker/speaker-builder/speaker-builder.component.d.ts +0 -14
- package/lib/components/lesson-mini-components/components/speaker/speaker.component.d.ts +0 -12
- package/lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component.d.ts +0 -7
- package/lib/components/lesson-mini-components/components/text-writer/text-writer.component.d.ts +0 -16
- package/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component.d.ts +0 -11
- package/lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component.d.ts +0 -7
- package/lib/models/lessons.pipes.d.ts +0 -28
- package/lib/models/notion.models.d.ts +0 -41
- package/lib/models/simple-agents.d.ts +0 -2
- package/lib/services/courses.service.d.ts +0 -7
- package/lib/services/default-lessons.service.d.ts +0 -20
- package/lib/services/lesson-ai.service.d.ts +0 -32
- package/lib/services/lesson-notion.service.d.ts +0 -35
- package/lib/services/lesson-utils.service.d.ts +0 -56
- package/public-api.d.ts +0 -27
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { UntypedFormControl } from '@angular/forms';
|
|
2
|
-
import { InjectionToken, Type } from '@angular/core';
|
|
3
|
-
import { Provider } from '@angular/core';
|
|
4
|
-
import { TextWriterBuiderComponent } from './text-writer/text-writer-buider/text-writer-buider.component';
|
|
5
|
-
import { TextWriterComponent } from './text-writer/text-writer.component';
|
|
6
|
-
import { TranslationSwitcherBuilderComponent } from './translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component';
|
|
7
|
-
import { TranslationSwitcherComponent } from './translationSwitcher/translationSwitcher.component';
|
|
8
|
-
import { SpeakerBuilderComponent } from './speaker/speaker-builder/speaker-builder.component';
|
|
9
|
-
import { SpeakerComponent } from './speaker/speaker.component';
|
|
10
|
-
import { SelectorBuilderComponent } from '../../dynamic-components/selector/selector-builder/selector-builder.component';
|
|
11
|
-
import { SelectorComponent } from '../../dynamic-components/selector/selector.component';
|
|
12
|
-
export type LessonComponentsType = 'selector' | 'speaker' | 'text-writer' | 'verb-summary' | 'word-summary';
|
|
13
|
-
export declare enum LessonComponentEnum {
|
|
14
|
-
Selector = "selector",
|
|
15
|
-
Speaker = "speaker",
|
|
16
|
-
TextWriter = "textWriter",
|
|
17
|
-
VerbSummary = "verbSummary",
|
|
18
|
-
WordSummary = "wordSummary",
|
|
19
|
-
TranslationSwitcher = "translationSwitcher",
|
|
20
|
-
PlayWord = "playWord"
|
|
21
|
-
}
|
|
22
|
-
export declare const LessonComponentBuilders: {
|
|
23
|
-
selector: typeof SelectorBuilderComponent;
|
|
24
|
-
speaker: typeof SpeakerBuilderComponent;
|
|
25
|
-
textWriter: typeof TextWriterBuiderComponent;
|
|
26
|
-
translationSwitcher: typeof TranslationSwitcherBuilderComponent;
|
|
27
|
-
};
|
|
28
|
-
export declare const LessonComponents: {
|
|
29
|
-
selector: typeof SelectorComponent;
|
|
30
|
-
speaker: typeof SpeakerComponent;
|
|
31
|
-
textWriter: typeof TextWriterComponent;
|
|
32
|
-
translationSwitcher: typeof TranslationSwitcherComponent;
|
|
33
|
-
};
|
|
34
|
-
export declare function getLessonComponentClass(type: LessonComponentsType): any;
|
|
35
|
-
export interface LessonCompSettings {
|
|
36
|
-
response?: string;
|
|
37
|
-
responses?: string;
|
|
38
|
-
options?: string[];
|
|
39
|
-
text?: string;
|
|
40
|
-
hint?: string;
|
|
41
|
-
explanation?: string;
|
|
42
|
-
}
|
|
43
|
-
export interface TextContent {
|
|
44
|
-
text: string;
|
|
45
|
-
}
|
|
46
|
-
export interface LessonComponentConfiguration<T extends LessonCompSettings = LessonCompSettings> {
|
|
47
|
-
id?: string;
|
|
48
|
-
component: LessonComponentEnum | string;
|
|
49
|
-
settings?: T;
|
|
50
|
-
inputs?: Record<string, any>;
|
|
51
|
-
}
|
|
52
|
-
export interface StorageFile {
|
|
53
|
-
bucket: string;
|
|
54
|
-
url: string;
|
|
55
|
-
path: string;
|
|
56
|
-
}
|
|
57
|
-
export interface AudioStorage extends StorageFile {
|
|
58
|
-
text?: string;
|
|
59
|
-
voiceType?: string;
|
|
60
|
-
}
|
|
61
|
-
export interface SpeakerCompConfiguration extends LessonComponentConfiguration<LessonCompSettings & {
|
|
62
|
-
voice: string;
|
|
63
|
-
}> {
|
|
64
|
-
audio: AudioStorage;
|
|
65
|
-
}
|
|
66
|
-
export interface LessonComponentInterface {
|
|
67
|
-
config: LessonComponentConfiguration<any>;
|
|
68
|
-
control?: UntypedFormControl;
|
|
69
|
-
validate?(): boolean | null;
|
|
70
|
-
evaluate?(): boolean | null;
|
|
71
|
-
}
|
|
72
|
-
export declare const LESSONS_TOKEN: InjectionToken<LessonsAbstractService>;
|
|
73
|
-
export interface ImgStorageData extends StorageFile {
|
|
74
|
-
fullPath: string;
|
|
75
|
-
resolutions: any;
|
|
76
|
-
resolution: string;
|
|
77
|
-
}
|
|
78
|
-
export type LessonImage = ImgStorageData & {
|
|
79
|
-
type: string;
|
|
80
|
-
};
|
|
81
|
-
export interface DynamicContentComponent {
|
|
82
|
-
id: string;
|
|
83
|
-
component: LessonComponentEnum;
|
|
84
|
-
inputs: Record<string, any>;
|
|
85
|
-
config: LessonComponentConfiguration<any>;
|
|
86
|
-
}
|
|
87
|
-
type StorageType = StorageFile & {
|
|
88
|
-
type: string;
|
|
89
|
-
};
|
|
90
|
-
export interface Media {
|
|
91
|
-
audios?: StorageType[];
|
|
92
|
-
images?: StorageType[];
|
|
93
|
-
}
|
|
94
|
-
export interface ILessonExtra {
|
|
95
|
-
notionPageId?: string;
|
|
96
|
-
}
|
|
97
|
-
export interface ContentMetadata {
|
|
98
|
-
title: string;
|
|
99
|
-
description: string;
|
|
100
|
-
isPublished: boolean;
|
|
101
|
-
tags: string[];
|
|
102
|
-
banner: StorageType;
|
|
103
|
-
prompt: string;
|
|
104
|
-
generatedByAI: boolean;
|
|
105
|
-
}
|
|
106
|
-
export interface ILesson {
|
|
107
|
-
_id: any;
|
|
108
|
-
id: string;
|
|
109
|
-
metadata?: ContentMetadata;
|
|
110
|
-
title: string;
|
|
111
|
-
description: string;
|
|
112
|
-
isPublished: boolean;
|
|
113
|
-
textCoded: string;
|
|
114
|
-
authorId: string;
|
|
115
|
-
authorEmail: string;
|
|
116
|
-
tags: string[];
|
|
117
|
-
media: Media;
|
|
118
|
-
banner?: StorageType;
|
|
119
|
-
components: Array<LessonComponentConfiguration<any>>;
|
|
120
|
-
dynamicComponents: Record<string, DynamicContentComponent>;
|
|
121
|
-
baseLang: string;
|
|
122
|
-
targetLang: string;
|
|
123
|
-
appExtension: Record<string, any>;
|
|
124
|
-
generatedByAI: boolean;
|
|
125
|
-
prompt: string;
|
|
126
|
-
extras: ILessonExtra;
|
|
127
|
-
}
|
|
128
|
-
export interface ILessonWithTaken extends ILesson {
|
|
129
|
-
taken: any;
|
|
130
|
-
createdAt: Date;
|
|
131
|
-
updatedAt: Date;
|
|
132
|
-
}
|
|
133
|
-
export interface ILessonTaken {
|
|
134
|
-
id: string;
|
|
135
|
-
score: number;
|
|
136
|
-
goalCompleted: boolean;
|
|
137
|
-
status: string;
|
|
138
|
-
lastAccess: Date;
|
|
139
|
-
}
|
|
140
|
-
export interface LessonPrompts {
|
|
141
|
-
description: (lesson: ILesson) => string;
|
|
142
|
-
banner: (lesson: ILesson) => string;
|
|
143
|
-
content: (lesson: ILesson) => string;
|
|
144
|
-
}
|
|
145
|
-
export declare abstract class LessonsAbstractService {
|
|
146
|
-
abstract getLessons(paginator?: any): Promise<any>;
|
|
147
|
-
abstract getLesson(id: string): Promise<any>;
|
|
148
|
-
abstract postLesson(lesson: ILesson): Promise<any>;
|
|
149
|
-
abstract updateLesson(lesson: ILesson): Promise<any>;
|
|
150
|
-
abstract deleteLesson(id: string): Promise<any>;
|
|
151
|
-
abstract generateLesson(lesson: ILesson): Promise<any>;
|
|
152
|
-
abstract postGenerateByAI(id: string): Promise<any>;
|
|
153
|
-
abstract extractTextFromHtml(html: string): string;
|
|
154
|
-
abstract postImproveMDWithAI(lessonId: string, markdownText: string): Promise<any>;
|
|
155
|
-
abstract saveTakenLesson(lesson: ILessonTaken): Promise<any>;
|
|
156
|
-
abstract getPrompts(): LessonPrompts;
|
|
157
|
-
}
|
|
158
|
-
export declare function provideLessonsService(serviceImplementation: Type<LessonsAbstractService>): Provider[];
|
|
159
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ComponentBuilder } from '../../ComponentBuilder';
|
|
2
|
-
import { TTSGenerated } from '@dataclouder/ngx-tts';
|
|
3
|
-
import { LessonComponentConfiguration, LessonCompSettings } from '../../lessons.clases';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class SpeakerBuilderComponent extends ComponentBuilder {
|
|
6
|
-
componentName: string;
|
|
7
|
-
tts: import("@angular/core").WritableSignal<TTSGenerated>;
|
|
8
|
-
handleTtsGenerated(event: TTSGenerated): void;
|
|
9
|
-
protected getCode(): LessonComponentConfiguration<LessonCompSettings & {
|
|
10
|
-
voice: string;
|
|
11
|
-
}>;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SpeakerBuilderComponent, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpeakerBuilderComponent, "app-speaker-builder", never, {}, {}, never, never, true, never>;
|
|
14
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { SpeakerCompConfiguration } from '../lessons.clases';
|
|
3
|
-
import { TTSGenerated } from '@dataclouder/ngx-tts';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class SpeakerComponent implements OnInit {
|
|
6
|
-
ngOnInit(): void;
|
|
7
|
-
config: SpeakerCompConfiguration;
|
|
8
|
-
tts: TTSGenerated | undefined;
|
|
9
|
-
speach(): void;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SpeakerComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpeakerComponent, "app-speaker", never, { "config": { "alias": "config"; "required": false; }; "tts": { "alias": "tts"; "required": false; }; }, {}, never, never, true, never>;
|
|
12
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ComponentBuilder } from '../../ComponentBuilder';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TextWriterBuiderComponent extends ComponentBuilder {
|
|
4
|
-
componentName: string;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TextWriterBuiderComponent, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextWriterBuiderComponent, "app-text-writer-buider", never, {}, {}, never, never, true, never>;
|
|
7
|
-
}
|
package/lib/components/lesson-mini-components/components/text-writer/text-writer.component.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { ComponentWithForm } from '../ComponentWithForm';
|
|
3
|
-
import { LessonComponentConfiguration, LessonComponentInterface } from '../lessons.clases';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class TextWriterComponent extends ComponentWithForm implements OnInit, LessonComponentInterface {
|
|
6
|
-
config: LessonComponentConfiguration;
|
|
7
|
-
constructor();
|
|
8
|
-
size: number;
|
|
9
|
-
hint: string;
|
|
10
|
-
ngOnInit(): void;
|
|
11
|
-
private getSize;
|
|
12
|
-
evaluate(): any;
|
|
13
|
-
validate(): boolean;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TextWriterComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextWriterComponent, "app-text-writer", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
16
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { SpeakerCompConfiguration } from '../lessons.clases';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TranslationSwitcherComponent implements OnInit {
|
|
5
|
-
config: SpeakerCompConfiguration;
|
|
6
|
-
visibleText: string;
|
|
7
|
-
ngOnInit(): void;
|
|
8
|
-
switchTranslation(): void;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TranslationSwitcherComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TranslationSwitcherComponent, "app-translation-switcher", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
11
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ComponentBuilder } from '../../ComponentBuilder';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TranslationSwitcherBuilderComponent extends ComponentBuilder {
|
|
4
|
-
componentName: string;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TranslationSwitcherBuilderComponent, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TranslationSwitcherBuilderComponent, "app-translation-switcher-builder", never, {}, {}, never, never, true, never>;
|
|
7
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare const LangCodeDescription: {
|
|
4
|
-
es: string;
|
|
5
|
-
en: string;
|
|
6
|
-
it: string;
|
|
7
|
-
pt: string;
|
|
8
|
-
fr: string;
|
|
9
|
-
ja: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const LangCodeDescriptionEs: {
|
|
12
|
-
es: string;
|
|
13
|
-
en: string;
|
|
14
|
-
it: string;
|
|
15
|
-
pt: string;
|
|
16
|
-
fr: string;
|
|
17
|
-
ja: string;
|
|
18
|
-
};
|
|
19
|
-
export declare class LangDescTranslationPipe implements PipeTransform {
|
|
20
|
-
transform(value: string, lang: string): boolean;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LangDescTranslationPipe, never>;
|
|
22
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<LangDescTranslationPipe, "langDesc", true>;
|
|
23
|
-
}
|
|
24
|
-
export declare class FlagLanguagePipe implements PipeTransform {
|
|
25
|
-
transform(lang: string): string;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FlagLanguagePipe, never>;
|
|
27
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<FlagLanguagePipe, "flagEmoji", true>;
|
|
28
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, Provider, Type } from '@angular/core';
|
|
2
|
-
export type NotionDBResponse = {
|
|
3
|
-
success: boolean;
|
|
4
|
-
databases: {
|
|
5
|
-
id: string;
|
|
6
|
-
title: string;
|
|
7
|
-
url: string;
|
|
8
|
-
created_time: string;
|
|
9
|
-
}[];
|
|
10
|
-
error?: string;
|
|
11
|
-
count: number;
|
|
12
|
-
};
|
|
13
|
-
export type NotionPageResponse = {
|
|
14
|
-
success: boolean;
|
|
15
|
-
pages: {
|
|
16
|
-
id: string;
|
|
17
|
-
title: string;
|
|
18
|
-
url: string;
|
|
19
|
-
created_time: string;
|
|
20
|
-
}[];
|
|
21
|
-
error?: string;
|
|
22
|
-
count: number;
|
|
23
|
-
};
|
|
24
|
-
export declare const NOTION_SERVICE_TOKEN: InjectionToken<NotionAbstractService>;
|
|
25
|
-
export declare abstract class NotionAbstractService {
|
|
26
|
-
abstract getDBAvailible(): Promise<NotionDBResponse>;
|
|
27
|
-
abstract getPagesAvailable(): Promise<NotionPageResponse>;
|
|
28
|
-
abstract createNotionPage(card: any): Promise<{
|
|
29
|
-
success: boolean;
|
|
30
|
-
error: string;
|
|
31
|
-
page: any;
|
|
32
|
-
}>;
|
|
33
|
-
abstract getPageInSpecificFormat(pageId: string, format: NotionExportType): Promise<any>;
|
|
34
|
-
}
|
|
35
|
-
export declare function provideNotionService(serviceImplementation: Type<NotionAbstractService>): Provider[];
|
|
36
|
-
export declare enum NotionExportType {
|
|
37
|
-
HTML = "html",
|
|
38
|
-
MARKDOWN = "markdown",
|
|
39
|
-
PLAIN_TEXT = "plain_text",
|
|
40
|
-
SIMPLE_BLOCKS = "simple_blocks"
|
|
41
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ILesson, ILessonTaken, LessonPrompts, LessonsAbstractService } from '../components/lesson-mini-components/components/lessons.clases';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class DefaultLessonsService implements LessonsAbstractService {
|
|
4
|
-
saveTakenLesson(lesson: ILessonTaken): Promise<any>;
|
|
5
|
-
private httpCoreService;
|
|
6
|
-
private endpoints;
|
|
7
|
-
getLessons(paginator?: any): Promise<any>;
|
|
8
|
-
getLesson(id: string): Promise<any>;
|
|
9
|
-
postLesson(lesson: ILesson): Promise<any>;
|
|
10
|
-
updateLesson(lesson: ILesson): Promise<any>;
|
|
11
|
-
deleteLesson(id: string): Promise<any>;
|
|
12
|
-
generateLesson(lesson: ILesson): Promise<any>;
|
|
13
|
-
postGenerateByAI(id: string): Promise<any>;
|
|
14
|
-
postImproveMDWithAI(lessonId: string, markdownText: string): Promise<any>;
|
|
15
|
-
extractTextFromHtml(html: string): string;
|
|
16
|
-
generateBanner(prompt: string, lessonId: string): Promise<any>;
|
|
17
|
-
getPrompts(): LessonPrompts;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultLessonsService, never>;
|
|
19
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DefaultLessonsService>;
|
|
20
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { IAgentCard, IMiniAgentCard, IConversationSettings } from '@dataclouder/ngx-agent-cards';
|
|
2
|
-
import { ILesson } from '../components/lesson-mini-components/components/lessons.clases';
|
|
3
|
-
import { ILessonsSettings } from '../components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class LessonAIService {
|
|
6
|
-
private readonly lessonService;
|
|
7
|
-
private readonly userService;
|
|
8
|
-
/**
|
|
9
|
-
* Builds the scenario prompt string based on lesson content and user info.
|
|
10
|
-
* @param lessonText The extracted text content of the lesson.
|
|
11
|
-
* @param userInformationPrompt The formatted string containing user details.
|
|
12
|
-
* @returns The complete scenario prompt string.
|
|
13
|
-
*/
|
|
14
|
-
private _buildScenarioPrompt;
|
|
15
|
-
/**
|
|
16
|
-
* Generates the necessary agent cards for a lesson chat session.
|
|
17
|
-
* @param lesson The lesson data.
|
|
18
|
-
* @returns An object containing the master agent card and the evaluator agent card.
|
|
19
|
-
*/
|
|
20
|
-
generateAgentCards(lesson: ILesson): Promise<{
|
|
21
|
-
masterAgent: IAgentCard;
|
|
22
|
-
evaluatorAgent: IMiniAgentCard;
|
|
23
|
-
} | null>;
|
|
24
|
-
/**
|
|
25
|
-
* Generates conversation settings for a lesson, using the lesson scenario as the initial prompt.
|
|
26
|
-
* @param lesson The lesson data.
|
|
27
|
-
* @returns An IConversationSettings object configured for the lesson scenario.
|
|
28
|
-
*/
|
|
29
|
-
generateConversationSettingsForLesson(lesson: ILesson, settings: ILessonsSettings): Promise<IConversationSettings | null>;
|
|
30
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LessonAIService, never>;
|
|
31
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LessonAIService>;
|
|
32
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ILesson } from '../components/lesson-mini-components/components/lessons.clases';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class LessonNotionService {
|
|
4
|
-
#private;
|
|
5
|
-
isLoading: import("@angular/core").WritableSignal<boolean>;
|
|
6
|
-
/**
|
|
7
|
-
* Extracts the Notion Page ID from a URL.
|
|
8
|
-
* @param url The Notion page URL.
|
|
9
|
-
* @returns The extracted page ID or null if invalid.
|
|
10
|
-
*/
|
|
11
|
-
private extractNotionPageId;
|
|
12
|
-
/**
|
|
13
|
-
* Links an existing lesson with a Notion page ID by updating the lesson's extras.
|
|
14
|
-
* @param lesson The current lesson data.
|
|
15
|
-
* @param notionPageId The Notion page ID to link.
|
|
16
|
-
* @returns The updated lesson data from the backend or undefined on failure.
|
|
17
|
-
*/
|
|
18
|
-
linkLessonWithNotion(lesson: ILesson, notionPageId: string): Promise<ILesson | undefined>;
|
|
19
|
-
/**
|
|
20
|
-
* Handles the process of importing lesson content from Notion.
|
|
21
|
-
* It prompts the user for a URL if necessary, extracts the ID, fetches content,
|
|
22
|
-
* and potentially links the lesson if it's an existing one.
|
|
23
|
-
* @param currentLesson The current lesson data (can be a new or existing lesson).
|
|
24
|
-
* @param lessonId The current lesson ID (null if it's a new lesson).
|
|
25
|
-
* @returns The fetched HTML content from Notion, or null if the process fails.
|
|
26
|
-
*/
|
|
27
|
-
importAndLinkLessonFromNotion(currentLesson: ILesson | undefined, lessonId: string | null): Promise<string | null>;
|
|
28
|
-
/**
|
|
29
|
-
* Fetches content from the linked Notion page for AI improvement (placeholder).
|
|
30
|
-
* @param lesson The current lesson data.
|
|
31
|
-
*/
|
|
32
|
-
improveLessonWithNotionAI(lesson: ILesson | undefined): Promise<void>;
|
|
33
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LessonNotionService, never>;
|
|
34
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LessonNotionService>;
|
|
35
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { WritableSignal } from '@angular/core';
|
|
2
|
-
import { ILesson } from '../components/lesson-mini-components/components/lessons.clases';
|
|
3
|
-
import { LoadingBarService } from '@dataclouder/ngx-core';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class LessonUtilsService {
|
|
6
|
-
#private;
|
|
7
|
-
loadingBarService: LoadingBarService;
|
|
8
|
-
/**
|
|
9
|
-
* Validates if audios need generation for the given lesson.
|
|
10
|
-
* Currently logs a placeholder message.
|
|
11
|
-
* @param lesson The lesson object (or signal) to validate.
|
|
12
|
-
*/
|
|
13
|
-
validateAudios(lesson: ILesson | undefined): void;
|
|
14
|
-
/**
|
|
15
|
-
* Updates the lesson signal with a new banner image in metadata.
|
|
16
|
-
* @param lessonSignal The signal holding the lesson data.
|
|
17
|
-
* @param imageUploaded The image data object from the upload event. Should conform to LessonImage structure partially.
|
|
18
|
-
*/
|
|
19
|
-
uploadCover(lessonSignal: WritableSignal<ILesson | undefined>, imageUploaded: any): void;
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated Use create new method.
|
|
22
|
-
* Generates lesson content using AI. Assumes the lesson is already saved.
|
|
23
|
-
* @param lessonId The ID of the lesson to generate content for.
|
|
24
|
-
* @returns The updated lesson object after AI generation, or null on failure.
|
|
25
|
-
*/
|
|
26
|
-
generateByAI(lessonId: string): Promise<ILesson | null>;
|
|
27
|
-
/**
|
|
28
|
-
* Improves the provided Markdown text using AI and updates the lesson.
|
|
29
|
-
* Assumes the lesson is already saved before calling this.
|
|
30
|
-
* @param lesson The lesson object containing the prompt and other context.
|
|
31
|
-
* @param markdownText The Markdown text generated from the lesson's HTML content.
|
|
32
|
-
* @returns The improved Markdown string, or null on failure.
|
|
33
|
-
*/
|
|
34
|
-
improveMDWithAI(lesson: ILesson, markdownText: string): Promise<string | null>;
|
|
35
|
-
/**
|
|
36
|
-
* Generates a concise description for the lesson using AI based on its content.
|
|
37
|
-
* @param lesson The lesson object containing the content.
|
|
38
|
-
* @returns A promise resolving to the generated description string, or null on failure.
|
|
39
|
-
*/
|
|
40
|
-
generateDescriptionWithAI(lesson: ILesson): Promise<string | null>;
|
|
41
|
-
/**
|
|
42
|
-
* Extracts plain text from an HTML string, removing encoded JSON components.
|
|
43
|
-
* @param htmlInput The HTML string potentially containing encoded JSON (~...~).
|
|
44
|
-
* @returns The plain text representation.
|
|
45
|
-
*/
|
|
46
|
-
private _extractTextFromHtml;
|
|
47
|
-
/**
|
|
48
|
-
* Cleans orphaned components from the lesson's dynamicComponents.
|
|
49
|
-
* An orphaned component is one present in dynamicComponents but its ID is not found in the textCoded HTML.
|
|
50
|
-
* @param lesson The lesson object to clean.
|
|
51
|
-
* @returns A new lesson object with orphaned components removed from dynamicComponents.
|
|
52
|
-
*/
|
|
53
|
-
cleanOrphanedComponents(lesson: ILesson): ILesson;
|
|
54
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LessonUtilsService, never>;
|
|
55
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LessonUtilsService>;
|
|
56
|
-
}
|
package/public-api.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export * from './lib/models/lessons.pipes';
|
|
2
|
-
export * from './lib/models/notion.models';
|
|
3
|
-
export * from './lib/models/simple-agents';
|
|
4
|
-
export * from './lib/components/dc-lessons/lesson-list/dc-lesson-list.component';
|
|
5
|
-
export * from './lib/components/dc-lessons/lesson-form/lesson-form.component';
|
|
6
|
-
export * from './lib/components/dc-lessons/dc-lesson-editor/dc-lesson-editor.component';
|
|
7
|
-
export * from './lib/components/dc-lessons/dc-lesson-card/dc-lesson-card.component';
|
|
8
|
-
export * from './lib/services/default-lessons.service';
|
|
9
|
-
export * from './lib/components/dc-lessons/dc-lesson-renderer/dc-lesson-renderer.component';
|
|
10
|
-
export * from './lib/components/lesson-mini-components/components/ComponentWithForm';
|
|
11
|
-
export * from './lib/components/lesson-mini-components/components/lesson-dynamic.component';
|
|
12
|
-
export * from './lib/components/lesson-mini-components/components/lessons.clases';
|
|
13
|
-
export * from './lib/components/lesson-mini-components/components/ComponentBuilder';
|
|
14
|
-
export * from './lib/components/lesson-mini-components/components/text-writer/text-writer-buider/text-writer-buider.component';
|
|
15
|
-
export * from './lib/components/lesson-mini-components/components/text-writer/text-writer.component';
|
|
16
|
-
export * from './lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcher.component';
|
|
17
|
-
export * from './lib/components/lesson-mini-components/components/translationSwitcher/translationSwitcherBuilder/translationSwitcherBuilder.component';
|
|
18
|
-
export * from './lib/components/dynamic-components/selector/selector.component';
|
|
19
|
-
export * from './lib/components/dynamic-components/selector/selector-builder/selector-builder.component';
|
|
20
|
-
export * from './lib/components/dynamic-components/dynamic-components.service';
|
|
21
|
-
export * from './lib/services/courses.service';
|
|
22
|
-
export * from './lib/components/courses-admin/courses-admin.component';
|
|
23
|
-
export * from './lib/components/courses/courses.component';
|
|
24
|
-
export * from './lib/components/courses/course-detail/course-detail.component';
|
|
25
|
-
export * from './lib/components/courses/course-form/course-form.component';
|
|
26
|
-
export * from './lib/components/courses/course-list/course-list.component';
|
|
27
|
-
export * from './lib/components/courses/courses.service';
|