@mindly/ui-components 8.8.11 → 8.9.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/dist/cjs/index.js +4 -4
- package/dist/cjs/lib2/features/CompanionSessionMessagesFeature/CompanionSessionMessagesFeature.d.ts +13 -0
- package/dist/cjs/lib2/features/CompanionSessionMessagesFeature/CompanionSessionMessagesSkeletonFeature.d.ts +2 -0
- package/dist/cjs/lib2/features/CompanionSessionMessagesFeature/index.d.ts +1 -0
- package/dist/cjs/lib2/features/CompanionSessionsHistoryFeature/CompanionSessionsHistoryFeature.d.ts +13 -0
- package/dist/cjs/lib2/features/CompanionSessionsHistoryFeature/CompanionSessionsHistorySkeletonFeature.d.ts +2 -0
- package/dist/cjs/lib2/features/CompanionSessionsHistoryFeature/index.d.ts +1 -0
- package/dist/cjs/lib2/features/index.d.ts +2 -0
- package/dist/cjs/lib2/shared/types/aiCompanion.d.ts +36 -0
- package/dist/cjs/lib2/shared/types/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/utils/aiCompanion.d.ts +5 -0
- package/dist/cjs/lib2/shared/utils/index.d.ts +1 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/lib2/features/CompanionSessionMessagesFeature/CompanionSessionMessagesFeature.d.ts +13 -0
- package/dist/esm/lib2/features/CompanionSessionMessagesFeature/CompanionSessionMessagesSkeletonFeature.d.ts +2 -0
- package/dist/esm/lib2/features/CompanionSessionMessagesFeature/index.d.ts +1 -0
- package/dist/esm/lib2/features/CompanionSessionsHistoryFeature/CompanionSessionsHistoryFeature.d.ts +13 -0
- package/dist/esm/lib2/features/CompanionSessionsHistoryFeature/CompanionSessionsHistorySkeletonFeature.d.ts +2 -0
- package/dist/esm/lib2/features/CompanionSessionsHistoryFeature/index.d.ts +1 -0
- package/dist/esm/lib2/features/index.d.ts +2 -0
- package/dist/esm/lib2/shared/types/aiCompanion.d.ts +36 -0
- package/dist/esm/lib2/shared/types/index.d.ts +1 -0
- package/dist/esm/lib2/shared/utils/aiCompanion.d.ts +5 -0
- package/dist/esm/lib2/shared/utils/index.d.ts +1 -0
- package/dist/index.d.ts +67 -1
- package/package.json +1 -1
package/dist/cjs/lib2/features/CompanionSessionMessagesFeature/CompanionSessionMessagesFeature.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AiCompanionSessionMessage, SupportedLocales } from '../../shared';
|
|
2
|
+
type CompanionSessionMessagesFeatureProps = {
|
|
3
|
+
messages: AiCompanionSessionMessage[];
|
|
4
|
+
status: 'idle' | 'loading' | 'succeeded' | 'failed';
|
|
5
|
+
userAvatar: string;
|
|
6
|
+
psychologistAvatar: string;
|
|
7
|
+
userLabel: string;
|
|
8
|
+
assistantLabel: string;
|
|
9
|
+
language: SupportedLocales;
|
|
10
|
+
scrollTopLabel: string;
|
|
11
|
+
};
|
|
12
|
+
declare const CompanionSessionMessagesFeature: ({ messages, status, userAvatar, psychologistAvatar, userLabel, assistantLabel, language, scrollTopLabel, }: CompanionSessionMessagesFeatureProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default CompanionSessionMessagesFeature;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CompanionSessionMessagesFeature } from './CompanionSessionMessagesFeature';
|
package/dist/cjs/lib2/features/CompanionSessionsHistoryFeature/CompanionSessionsHistoryFeature.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AiCompanionSessionWeek, SupportedLocales } from '../../shared';
|
|
2
|
+
type CompanionSessionsHistoryFeatureProps = {
|
|
3
|
+
weeks: AiCompanionSessionWeek[];
|
|
4
|
+
hasNext: boolean;
|
|
5
|
+
status: 'idle' | 'loading' | 'succeeded' | 'failed';
|
|
6
|
+
weekLabels: Record<string, string>;
|
|
7
|
+
language: SupportedLocales;
|
|
8
|
+
loadMoreLabel: string;
|
|
9
|
+
handleSessionClick: (sessionId: string) => void;
|
|
10
|
+
handleLoadMore: () => void;
|
|
11
|
+
};
|
|
12
|
+
declare const CompanionSessionsHistoryFeature: ({ weeks, hasNext, status, weekLabels, language, loadMoreLabel, handleSessionClick, handleLoadMore, }: CompanionSessionsHistoryFeatureProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default CompanionSessionsHistoryFeature;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CompanionSessionsHistoryFeature } from './CompanionSessionsHistoryFeature';
|
|
@@ -70,3 +70,5 @@ export * from './ScheduleFeature';
|
|
|
70
70
|
export * from './SubscriptionCard';
|
|
71
71
|
export * from './CancelSubscriptionFeature';
|
|
72
72
|
export type { RecurringSessionsTimeSlots } from './RevampSubscriptionStepperFeature';
|
|
73
|
+
export * from './CompanionSessionMessagesFeature';
|
|
74
|
+
export * from './CompanionSessionsHistoryFeature';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface AiCompanionSessionItem {
|
|
2
|
+
id: string;
|
|
3
|
+
started_at: string;
|
|
4
|
+
session_summary: string;
|
|
5
|
+
session_title?: string;
|
|
6
|
+
session_review?: AiCompanionSessionReview;
|
|
7
|
+
}
|
|
8
|
+
export interface AiCompanionSessionReview {
|
|
9
|
+
created_at: string;
|
|
10
|
+
custom_message: string | null;
|
|
11
|
+
prepared_messages: string[] | null;
|
|
12
|
+
rate: number;
|
|
13
|
+
session_id: string;
|
|
14
|
+
user_id: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AiCompanionSessionMessage {
|
|
17
|
+
id: string;
|
|
18
|
+
session_id: string;
|
|
19
|
+
role: string;
|
|
20
|
+
content: string;
|
|
21
|
+
timestamp: string;
|
|
22
|
+
}
|
|
23
|
+
export interface AiCompanionSessionWeek {
|
|
24
|
+
week_label: string;
|
|
25
|
+
sessions: AiCompanionSessionItem[];
|
|
26
|
+
}
|
|
27
|
+
export interface AiCompanionSessionsHistoryResponse {
|
|
28
|
+
firestore_user_id: string;
|
|
29
|
+
total_count: number;
|
|
30
|
+
total_weeks: number;
|
|
31
|
+
page: number;
|
|
32
|
+
page_size: number;
|
|
33
|
+
has_next: boolean;
|
|
34
|
+
weeks: AiCompanionSessionWeek[];
|
|
35
|
+
}
|
|
36
|
+
export type AiCompanionMessageRole = 'user' | 'assistant' | string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AiCompanionMessageRole, SupportedLocales } from '../../shared';
|
|
2
|
+
export declare const formatSessionDate: (startedAt: string, language: SupportedLocales) => string;
|
|
3
|
+
export declare const formatWeekLabel: (weekLabel: string, weekLabels: Record<string, string>, language: SupportedLocales) => string;
|
|
4
|
+
export declare const formatMessageTimestamp: (timestamp: string, language: SupportedLocales) => string;
|
|
5
|
+
export declare const roleLabel: (role: AiCompanionMessageRole, userLabel: string, assistantLabel: string) => string;
|