@meltingspot/core 1.18.0 → 1.20.0
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/CHANGELOG.md +29 -0
- package/index.d.ts +6 -1
- package/index.mjs +969 -901
- package/index.umd.js +3 -3
- package/package.json +1 -1
- package/services/api/melty/melty.api.output.d.ts +7 -0
- package/services/api/melty/melty.api.service.d.ts +13 -0
- package/services/api/playbook/playbook.api.input.d.ts +8 -0
- package/services/api/playbook/playbook.api.output.d.ts +3 -0
- package/services/api/playbook/playbook.api.service.d.ts +3 -2
- package/services/auth.service.d.ts +20 -2
- package/types/conversation/conversationMessage.d.ts +4 -0
- package/types/conversation/conversationSseEvent.d.ts +9 -1
- package/types/conversation/getConversationMessagesResponse.d.ts +4 -0
- package/types/conversation/index.d.ts +3 -0
- package/types/conversation/listConversationsSort.d.ts +10 -0
- package/types/conversation/meltyOnboardingAction.d.ts +3 -0
- package/types/conversation/messageIntentAction.d.ts +1 -0
- package/types/conversation/onboardingConversation.d.ts +81 -0
- package/types/index.d.ts +1 -0
- package/types/roleplay/index.d.ts +1 -0
- package/types/roleplay/roleplayModality.d.ts +5 -0
- package/types/widget/metadata/generatedContentWidgetContentMetadata.d.ts +6 -0
- package/types/widget/metadata/index.d.ts +5 -1
- package/types/widget/metadata/roleplayWidgetContentMetadata.d.ts +10 -0
- package/types/widget/playbook/playbookIntentWidgetMode.d.ts +2 -1
- package/types/widget/spotWidgetContentType.d.ts +2 -0
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Result } from 'neverthrow';
|
|
2
|
+
import { MeltyConfigOutput } from './melty.api.output';
|
|
3
|
+
export declare class MeltyApiService {
|
|
4
|
+
private readonly meltingSpotApi;
|
|
5
|
+
private static instance;
|
|
6
|
+
static getInstance(): MeltyApiService;
|
|
7
|
+
private constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Capabilities of the coach config of the current spot. A flag the API
|
|
10
|
+
* does not send reads as `false` (fail-closed).
|
|
11
|
+
*/
|
|
12
|
+
getConfig(): Promise<Result<MeltyConfigOutput, Error>>;
|
|
13
|
+
}
|
|
@@ -38,6 +38,7 @@ export interface ListPlaybookIntentsQuery extends PlaybookHotspotParams {
|
|
|
38
38
|
}
|
|
39
39
|
export interface ListAccessiblePlaybookIntentsQuery extends PlaybookPageParams {
|
|
40
40
|
domain?: string;
|
|
41
|
+
capabilities?: string[];
|
|
41
42
|
}
|
|
42
43
|
export interface PlaybookIntentParams extends PlaybookHotspotParams {
|
|
43
44
|
intentId: string;
|
|
@@ -61,11 +62,18 @@ export interface UpdatePlaybookHotspotInput {
|
|
|
61
62
|
highlighted?: boolean;
|
|
62
63
|
pageId?: string;
|
|
63
64
|
}
|
|
65
|
+
export interface CreatePlaybookIntentStandaloneInput {
|
|
66
|
+
title: string;
|
|
67
|
+
}
|
|
64
68
|
export interface CreatePlaybookIntentInput {
|
|
65
69
|
description: string;
|
|
66
70
|
status?: PlaybookIntentStatus;
|
|
67
71
|
widgetId?: string;
|
|
68
72
|
order?: number;
|
|
73
|
+
standalone?: CreatePlaybookIntentStandaloneInput;
|
|
74
|
+
}
|
|
75
|
+
export interface GenerateIntentStandaloneTitleInput {
|
|
76
|
+
prompt: string;
|
|
69
77
|
}
|
|
70
78
|
export interface UpdatePlaybookIntentInput {
|
|
71
79
|
description?: string;
|
|
@@ -8,6 +8,9 @@ import { PlaybookIntent } from '../../../types/widget/playbook/playbookIntent';
|
|
|
8
8
|
import { PlaybookIntentActionSummary } from '../../../types/widget/playbook/playbookIntentActionSummary';
|
|
9
9
|
import { PlaybookIntentWidgetMode } from '../../../types/widget/playbook/playbookIntentWidgetMode';
|
|
10
10
|
import { PlaybookPage } from '../../../types/widget/playbook/playbookPage';
|
|
11
|
+
export interface GenerateIntentStandaloneTitleOutput {
|
|
12
|
+
title: string;
|
|
13
|
+
}
|
|
11
14
|
export interface ListPlaybooksOutput {
|
|
12
15
|
items: Playbook[];
|
|
13
16
|
total: number;
|
|
@@ -2,8 +2,8 @@ import { Result } from 'neverthrow';
|
|
|
2
2
|
import { PlaybookHotspot } from '../../../types/widget/playbook/playbookHotspot';
|
|
3
3
|
import { PlaybookIntent } from '../../../types/widget/playbook/playbookIntent';
|
|
4
4
|
import { PlaybookPage } from '../../../types/widget/playbook/playbookPage';
|
|
5
|
-
import { CreatePlaybookHotspotInput, CreatePlaybookIntentInput, CreatePlaybookPageInput, ListAccessiblePlaybookIntentsQuery, ListPlaybookHotspotsQuery, ListPlaybookIntentsQuery, ListPlaybookPagesQuery, ListPlaybooksQuery, PlaybookHotspotParams, PlaybookIntentParams, PlaybookPageParams, PlaybookParams, UpdatePlaybookHotspotInput, UpdatePlaybookIntentInput } from './playbook.api.input';
|
|
6
|
-
import { ListAccessiblePlaybookIntentsOutput, ListPlaybookHotspotsOutput, ListPlaybookIntentsOutput, ListPlaybookPagesOutput, ListPlaybooksOutput } from './playbook.api.output';
|
|
5
|
+
import { CreatePlaybookHotspotInput, CreatePlaybookIntentInput, CreatePlaybookPageInput, GenerateIntentStandaloneTitleInput, ListAccessiblePlaybookIntentsQuery, ListPlaybookHotspotsQuery, ListPlaybookIntentsQuery, ListPlaybookPagesQuery, ListPlaybooksQuery, PlaybookHotspotParams, PlaybookIntentParams, PlaybookPageParams, PlaybookParams, UpdatePlaybookHotspotInput, UpdatePlaybookIntentInput } from './playbook.api.input';
|
|
6
|
+
import { GenerateIntentStandaloneTitleOutput, ListAccessiblePlaybookIntentsOutput, ListPlaybookHotspotsOutput, ListPlaybookIntentsOutput, ListPlaybookPagesOutput, ListPlaybooksOutput } from './playbook.api.output';
|
|
7
7
|
export declare class PlaybookApiService {
|
|
8
8
|
private readonly meltingSpotApi;
|
|
9
9
|
private static instance;
|
|
@@ -18,5 +18,6 @@ export declare class PlaybookApiService {
|
|
|
18
18
|
updatePlaybookHotspot(query: PlaybookHotspotParams, body: UpdatePlaybookHotspotInput): Promise<Result<PlaybookHotspot, Error>>;
|
|
19
19
|
listPlaybookIntents(query: ListPlaybookIntentsQuery): Promise<Result<ListPlaybookIntentsOutput, Error>>;
|
|
20
20
|
createPlaybookIntent(query: PlaybookHotspotParams, body: CreatePlaybookIntentInput): Promise<Result<PlaybookIntent, Error>>;
|
|
21
|
+
generateIntentStandaloneTitle(body: GenerateIntentStandaloneTitleInput): Promise<Result<GenerateIntentStandaloneTitleOutput, Error>>;
|
|
21
22
|
updatePlaybookIntent(query: PlaybookIntentParams, body: UpdatePlaybookIntentInput): Promise<Result<PlaybookIntent, Error>>;
|
|
22
23
|
}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
+
import { StatusCodes } from 'http-status-codes';
|
|
1
2
|
import { Result } from 'neverthrow';
|
|
2
3
|
import { AuthTokens } from '../types/authTokens';
|
|
3
4
|
import { Nullable } from '../types/nullable';
|
|
4
5
|
import { HttpError } from './http.service';
|
|
5
6
|
export declare enum AuthServiceEvents {
|
|
6
|
-
TokensUpdated = "auth:tokens-updated"
|
|
7
|
+
TokensUpdated = "auth:tokens-updated",
|
|
8
|
+
RefreshRejected = "auth:refresh-rejected"
|
|
7
9
|
}
|
|
8
10
|
export interface AuthTokensUpdatedEventDetail {
|
|
9
11
|
accessToken: Nullable<string>;
|
|
10
12
|
refreshToken: Nullable<string>;
|
|
11
13
|
}
|
|
14
|
+
export interface AuthRefreshRejectedEventDetail {
|
|
15
|
+
status: StatusCodes;
|
|
16
|
+
}
|
|
12
17
|
export declare class AuthService extends EventTarget {
|
|
13
18
|
private static instance;
|
|
14
19
|
private accessToken;
|
|
15
20
|
private refreshToken;
|
|
21
|
+
private refreshInFlight;
|
|
16
22
|
private constructor();
|
|
17
23
|
static getInstance(): AuthService;
|
|
18
24
|
/**
|
|
@@ -30,8 +36,20 @@ export declare class AuthService extends EventTarget {
|
|
|
30
36
|
resetPassword(email: string): Promise<Result<void, HttpError>>;
|
|
31
37
|
/**
|
|
32
38
|
* Refresh the access token using the stored refresh token.
|
|
39
|
+
*
|
|
40
|
+
* Concurrent calls share a single request and receive the same `Result`.
|
|
41
|
+
* The error carries the HTTP status: 401 when the server refuses the refresh
|
|
42
|
+
* token (also signalled by `AuthServiceEvents.RefreshRejected`), 5xx on an
|
|
43
|
+
* outage or a network error.
|
|
44
|
+
*
|
|
45
|
+
* A refresh superseded by a logout or a new login while in flight writes
|
|
46
|
+
* nothing and signals nothing: it never overwrites nor logs out the session
|
|
47
|
+
* that replaced the one it was refreshing.
|
|
33
48
|
*/
|
|
34
|
-
refresh(): Promise<Result<AuthTokens,
|
|
49
|
+
refresh(): Promise<Result<AuthTokens, HttpError>>;
|
|
50
|
+
private doRefresh;
|
|
51
|
+
private currentSessionResult;
|
|
52
|
+
private emitRefreshRejected;
|
|
35
53
|
/**
|
|
36
54
|
* Remove auth tokens from memory.
|
|
37
55
|
*/
|
|
@@ -3,6 +3,7 @@ import { MeltyHandoffReason } from './meltyHandoffReason';
|
|
|
3
3
|
import { MeltyMessageFeedbackReason } from './meltyMessageFeedbackReason';
|
|
4
4
|
import { MeltyMessageFeedbackSignal } from './meltyMessageFeedbackSignal';
|
|
5
5
|
import { MessageIntentAction } from './messageIntentAction';
|
|
6
|
+
import { OnboardingStep } from './onboardingConversation';
|
|
6
7
|
import { RenderableWidgetAction } from './renderableWidgetAction';
|
|
7
8
|
export interface ConversationMessage {
|
|
8
9
|
id: string;
|
|
@@ -12,12 +13,15 @@ export interface ConversationMessage {
|
|
|
12
13
|
handoff?: {
|
|
13
14
|
reason: MeltyHandoffReason;
|
|
14
15
|
};
|
|
16
|
+
onboardingNextStep?: OnboardingStep;
|
|
15
17
|
feedback?: {
|
|
16
18
|
signal: MeltyMessageFeedbackSignal;
|
|
17
19
|
reason?: Nullable<MeltyMessageFeedbackReason>;
|
|
18
20
|
};
|
|
19
21
|
feedbackEligible?: boolean;
|
|
20
22
|
intentAction?: MessageIntentAction;
|
|
23
|
+
wizardStepKey?: string;
|
|
24
|
+
wizardClosing?: boolean;
|
|
21
25
|
createdAt: string;
|
|
22
26
|
}
|
|
23
27
|
export declare enum ConversationMessageRole {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MeltyHandoffReason } from './meltyHandoffReason';
|
|
2
2
|
import { MeltyWidgetAction } from './meltyWidgetAction';
|
|
3
|
+
import { OnboardingStep } from './onboardingConversation';
|
|
3
4
|
export declare enum ConversationSseEventType {
|
|
4
5
|
Metadata = "metadata",
|
|
5
6
|
Token = "token",
|
|
@@ -8,6 +9,7 @@ export declare enum ConversationSseEventType {
|
|
|
8
9
|
Action = "action",
|
|
9
10
|
Bubble = "bubble",
|
|
10
11
|
Handoff = "handoff",
|
|
12
|
+
OnboardingNextStep = "onboarding_next_step",
|
|
11
13
|
Done = "done",
|
|
12
14
|
Error = "error"
|
|
13
15
|
}
|
|
@@ -50,6 +52,12 @@ export interface ConversationSseHandoffEvent {
|
|
|
50
52
|
reason: MeltyHandoffReason;
|
|
51
53
|
};
|
|
52
54
|
}
|
|
55
|
+
export interface ConversationSseOnboardingNextStepEvent {
|
|
56
|
+
type: ConversationSseEventType.OnboardingNextStep;
|
|
57
|
+
data: {
|
|
58
|
+
step: OnboardingStep;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
53
61
|
export interface ConversationSseDoneEvent {
|
|
54
62
|
type: ConversationSseEventType.Done;
|
|
55
63
|
data: {
|
|
@@ -64,4 +72,4 @@ export interface ConversationSseErrorEvent {
|
|
|
64
72
|
code: string;
|
|
65
73
|
};
|
|
66
74
|
}
|
|
67
|
-
export type ConversationSseEvent = ConversationSseMetadataEvent | ConversationSseTokenEvent | ConversationSseStatusLabelEvent | ConversationSseActionsPendingEvent | ConversationSseActionEvent | ConversationSseBubbleEvent | ConversationSseHandoffEvent | ConversationSseDoneEvent | ConversationSseErrorEvent;
|
|
75
|
+
export type ConversationSseEvent = ConversationSseMetadataEvent | ConversationSseTokenEvent | ConversationSseStatusLabelEvent | ConversationSseActionsPendingEvent | ConversationSseActionEvent | ConversationSseBubbleEvent | ConversationSseHandoffEvent | ConversationSseOnboardingNextStepEvent | ConversationSseDoneEvent | ConversationSseErrorEvent;
|
|
@@ -6,6 +6,7 @@ import { MeltyMessageFeedbackReason } from './meltyMessageFeedbackReason';
|
|
|
6
6
|
import { MeltyMessageFeedbackSignal } from './meltyMessageFeedbackSignal';
|
|
7
7
|
import { MeltyWidgetAction } from './meltyWidgetAction';
|
|
8
8
|
import { MessageIntentAction } from './messageIntentAction';
|
|
9
|
+
import { OnboardingStep } from './onboardingConversation';
|
|
9
10
|
/**
|
|
10
11
|
* Raw payload of GET /melty/conversations/:id/messages. It differs from the SDK
|
|
11
12
|
* `Conversation`: the id is `conversationId`, and per-message widget actions are
|
|
@@ -22,6 +23,9 @@ export interface GetConversationMessageResponse {
|
|
|
22
23
|
reason: MeltyHandoffReason;
|
|
23
24
|
};
|
|
24
25
|
intentAction?: MessageIntentAction;
|
|
26
|
+
wizardStepKey?: string;
|
|
27
|
+
wizardClosing?: boolean;
|
|
28
|
+
onboardingNextStep?: OnboardingStep;
|
|
25
29
|
}>;
|
|
26
30
|
feedback?: {
|
|
27
31
|
signal: MeltyMessageFeedbackSignal;
|
|
@@ -5,11 +5,14 @@ export * from './conversationStreamResponse';
|
|
|
5
5
|
export * from './createConversationResponse';
|
|
6
6
|
export * from './getConversationMessagesResponse';
|
|
7
7
|
export * from './listConversationsResponse';
|
|
8
|
+
export * from './listConversationsSort';
|
|
8
9
|
export * from './meltyHandoffReason';
|
|
9
10
|
export * from './meltyMessageFeedbackReason';
|
|
10
11
|
export * from './meltyMessageFeedbackSignal';
|
|
12
|
+
export * from './meltyOnboardingAction';
|
|
11
13
|
export * from './meltyWidgetAction';
|
|
12
14
|
export * from './messageIntentAction';
|
|
15
|
+
export * from './onboardingConversation';
|
|
13
16
|
export * from './renderableWidgetAction';
|
|
14
17
|
export * from './proactiveCheckResponse';
|
|
15
18
|
export * from './triggerType';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order of `GET /v1/melty/conversations`. Mirror of the server enum.
|
|
3
|
+
* `CreatedAt` (the default when omitted): newest created first.
|
|
4
|
+
* `LastActivity`: most recent activity first, conversations without any
|
|
5
|
+
* activity last.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum ListConversationsSort {
|
|
8
|
+
CreatedAt = "CreatedAt",
|
|
9
|
+
LastActivity = "LastActivity"
|
|
10
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Nullable } from '../nullable';
|
|
2
|
+
import { ConversationStatus } from './conversation';
|
|
3
|
+
/**
|
|
4
|
+
* Status of the onboarding wizard of a client spot (story 2.1). Mirrors the
|
|
5
|
+
* backend `OnboardingWizardStatus`: `Completed` once the last answer saved the
|
|
6
|
+
* context and persona of the spot, `InProgress` before.
|
|
7
|
+
*/
|
|
8
|
+
export declare enum OnboardingWizardStatus {
|
|
9
|
+
InProgress = "InProgress",
|
|
10
|
+
Completed = "Completed"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The 8 steps of the onboarding checklist of a client spot (story 3.1), in the
|
|
14
|
+
* order of the checklist. Mirrors the shared `OnboardingStep` enum (same
|
|
15
|
+
* values): the SDK core shares no package with it, the `util-types` barrel
|
|
16
|
+
* would drag `zod` and `dayjs` into the published bundle.
|
|
17
|
+
*/
|
|
18
|
+
export declare enum OnboardingStep {
|
|
19
|
+
CompanyContext = "CompanyContext",
|
|
20
|
+
CoachPersona = "CoachPersona",
|
|
21
|
+
ContextDocuments = "ContextDocuments",
|
|
22
|
+
TestAiCoach = "TestAiCoach",
|
|
23
|
+
Playbook = "Playbook",
|
|
24
|
+
Extension = "Extension",
|
|
25
|
+
IntentTooltip = "IntentTooltip",
|
|
26
|
+
PreviewAsMember = "PreviewAsMember"
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Persisted status of an onboarding step. Mirrors the shared
|
|
30
|
+
* `OnboardingStepStatus` enum. "To do" is not a value: it is a null status.
|
|
31
|
+
*/
|
|
32
|
+
export declare enum OnboardingStepStatus {
|
|
33
|
+
Completed = "Completed",
|
|
34
|
+
Skipped = "Skipped"
|
|
35
|
+
}
|
|
36
|
+
/** One step of the onboarding checklist and its status (null = to do). */
|
|
37
|
+
export interface CoachOnboardingChecklistStep {
|
|
38
|
+
step: OnboardingStep;
|
|
39
|
+
status: Nullable<OnboardingStepStatus>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The onboarding checklist of the client spot, pushed by the host to the
|
|
43
|
+
* coach (`Coach.setOnboardingChecklist`, story 3.1): the coach reads nothing
|
|
44
|
+
* of it from the server.
|
|
45
|
+
*/
|
|
46
|
+
export interface CoachOnboardingChecklist {
|
|
47
|
+
steps: CoachOnboardingChecklistStep[];
|
|
48
|
+
completedCount: number;
|
|
49
|
+
totalCount: number;
|
|
50
|
+
nextStep: Nullable<OnboardingStep>;
|
|
51
|
+
latestPlaybookName: Nullable<string>;
|
|
52
|
+
testCoachDisabledReason?: Nullable<string>;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* State of the onboarding wizard, as the server computes it from the messages
|
|
56
|
+
* of the onboarding conversation. Keys are the wizard step keys (shared
|
|
57
|
+
* `WizardStepKey` values) — typed as strings here, the SDK core shares no
|
|
58
|
+
* package with the wizard definition.
|
|
59
|
+
*/
|
|
60
|
+
export interface OnboardingWizardState {
|
|
61
|
+
status: OnboardingWizardStatus;
|
|
62
|
+
currentStepKey: Nullable<string>;
|
|
63
|
+
answers: Partial<Record<string, string[]>>;
|
|
64
|
+
}
|
|
65
|
+
/** The onboarding conversation of a client spot, in the Academy spot. */
|
|
66
|
+
export interface OnboardingConversation {
|
|
67
|
+
id: string;
|
|
68
|
+
title: Nullable<string>;
|
|
69
|
+
status: ConversationStatus;
|
|
70
|
+
onboardingSpotId: string;
|
|
71
|
+
createdAt: string;
|
|
72
|
+
}
|
|
73
|
+
/** Response of POST /melty/conversations~onboarding. */
|
|
74
|
+
export interface GetOrCreateOnboardingConversationResponse {
|
|
75
|
+
conversation: OnboardingConversation;
|
|
76
|
+
wizard: OnboardingWizardState;
|
|
77
|
+
}
|
|
78
|
+
/** Response of POST /melty/conversations/:id/onboardingWizard~answer. */
|
|
79
|
+
export interface AnswerOnboardingWizardStepResponse {
|
|
80
|
+
wizard: OnboardingWizardState;
|
|
81
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './roleplayModality';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SpotWidgetContentType } from '../spotWidgetContentType';
|
|
2
|
+
import { AbstractWidgetContentMetadata } from './abstractWidgetContentMetadata';
|
|
3
|
+
export interface GeneratedContentWidgetContentMetadata extends AbstractWidgetContentMetadata {
|
|
4
|
+
type: SpotWidgetContentType.GeneratedContent;
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
@@ -4,11 +4,13 @@ import { CourseWidgetContentMetadata } from './courseWidgetContentMetadata';
|
|
|
4
4
|
import { DocumentLinkWidgetContentMetadata } from './documentLinkWidgetContentMetadata';
|
|
5
5
|
import { DocumentPageWidgetContentMetadata } from './documentPageWidgetContentMetadata';
|
|
6
6
|
import { ForumWidgetContentMetadata } from './forumWidgetContentMetadata';
|
|
7
|
+
import { GeneratedContentWidgetContentMetadata } from './generatedContentWidgetContentMetadata';
|
|
7
8
|
import { LearningPathWidgetContentMetadata } from './learningPathWidgetContentMetadata';
|
|
8
9
|
import { LiveWidgetContentMetadata } from './liveWidgetContentMetadata';
|
|
9
10
|
import { RichTextWidgetContentMetadata } from './richTextWidgetContentMetadata';
|
|
11
|
+
import { RoleplayWidgetContentMetadata } from './roleplayWidgetContentMetadata';
|
|
10
12
|
import { TopicWidgetContentMetadata } from './topicWidgetContentMetadata';
|
|
11
|
-
export type WidgetContentMetadata = ChannelWidgetContentMetadata | CollectionWidgetContentMetadata | CourseWidgetContentMetadata | DocumentLinkWidgetContentMetadata | DocumentPageWidgetContentMetadata | ForumWidgetContentMetadata | LearningPathWidgetContentMetadata | LiveWidgetContentMetadata | RichTextWidgetContentMetadata | TopicWidgetContentMetadata;
|
|
13
|
+
export type WidgetContentMetadata = ChannelWidgetContentMetadata | CollectionWidgetContentMetadata | CourseWidgetContentMetadata | DocumentLinkWidgetContentMetadata | DocumentPageWidgetContentMetadata | ForumWidgetContentMetadata | GeneratedContentWidgetContentMetadata | LearningPathWidgetContentMetadata | LiveWidgetContentMetadata | RichTextWidgetContentMetadata | RoleplayWidgetContentMetadata | TopicWidgetContentMetadata;
|
|
12
14
|
export type NonRichTextWidgetContentMetadata = Exclude<WidgetContentMetadata, RichTextWidgetContentMetadata>;
|
|
13
15
|
export * from './abstractWidgetContentMetadata';
|
|
14
16
|
export * from './channelWidgetContentMetadata';
|
|
@@ -17,7 +19,9 @@ export * from './courseWidgetContentMetadata';
|
|
|
17
19
|
export * from './documentLinkWidgetContentMetadata';
|
|
18
20
|
export * from './documentPageWidgetContentMetadata';
|
|
19
21
|
export * from './forumWidgetContentMetadata';
|
|
22
|
+
export * from './generatedContentWidgetContentMetadata';
|
|
20
23
|
export * from './learningPathWidgetContentMetadata';
|
|
21
24
|
export * from './liveWidgetContentMetadata';
|
|
22
25
|
export * from './richTextWidgetContentMetadata';
|
|
26
|
+
export * from './roleplayWidgetContentMetadata';
|
|
23
27
|
export * from './topicWidgetContentMetadata';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RoleplayModality } from '../../roleplay';
|
|
2
|
+
import { SpotWidgetContentType } from '../spotWidgetContentType';
|
|
3
|
+
import { AbstractWidgetContentMetadata } from './abstractWidgetContentMetadata';
|
|
4
|
+
export interface RoleplayWidgetContentMetadata extends AbstractWidgetContentMetadata {
|
|
5
|
+
type: SpotWidgetContentType.Roleplay;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
modality: RoleplayModality;
|
|
9
|
+
link: string;
|
|
10
|
+
}
|
|
@@ -4,11 +4,13 @@ export declare enum SpotWidgetContentType {
|
|
|
4
4
|
Course = "Course",
|
|
5
5
|
Discussion = "Discussion",
|
|
6
6
|
Forum = "Forum",
|
|
7
|
+
GeneratedContent = "GeneratedContent",
|
|
7
8
|
Link = "Link",
|
|
8
9
|
Live = "Live",
|
|
9
10
|
LearningPath = "LearningPath",
|
|
10
11
|
Page = "Page",
|
|
11
12
|
RichText = "RichText",// Not yet supported on concrete widgets but only from lists of content
|
|
13
|
+
Roleplay = "Roleplay",
|
|
12
14
|
Topic = "Topic"
|
|
13
15
|
}
|
|
14
16
|
export declare function isSpotWidgetContentType(value: any): value is SpotWidgetContentType;
|