@mindly/ui-components 8.8.12 → 8.9.1

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.
Files changed (26) hide show
  1. package/dist/cjs/index.js +4 -4
  2. package/dist/cjs/lib2/features/CompanionSessionMessagesFeature/CompanionSessionMessagesFeature.d.ts +13 -0
  3. package/dist/cjs/lib2/features/CompanionSessionMessagesFeature/CompanionSessionMessagesSkeletonFeature.d.ts +2 -0
  4. package/dist/cjs/lib2/features/CompanionSessionMessagesFeature/index.d.ts +1 -0
  5. package/dist/cjs/lib2/features/CompanionSessionsHistoryFeature/CompanionSessionsHistoryFeature.d.ts +13 -0
  6. package/dist/cjs/lib2/features/CompanionSessionsHistoryFeature/CompanionSessionsHistorySkeletonFeature.d.ts +2 -0
  7. package/dist/cjs/lib2/features/CompanionSessionsHistoryFeature/index.d.ts +1 -0
  8. package/dist/cjs/lib2/features/index.d.ts +2 -0
  9. package/dist/cjs/lib2/shared/types/aiCompanion.d.ts +36 -0
  10. package/dist/cjs/lib2/shared/types/index.d.ts +1 -0
  11. package/dist/cjs/lib2/shared/utils/aiCompanion.d.ts +5 -0
  12. package/dist/cjs/lib2/shared/utils/index.d.ts +1 -0
  13. package/dist/esm/index.js +4 -4
  14. package/dist/esm/lib2/features/CompanionSessionMessagesFeature/CompanionSessionMessagesFeature.d.ts +13 -0
  15. package/dist/esm/lib2/features/CompanionSessionMessagesFeature/CompanionSessionMessagesSkeletonFeature.d.ts +2 -0
  16. package/dist/esm/lib2/features/CompanionSessionMessagesFeature/index.d.ts +1 -0
  17. package/dist/esm/lib2/features/CompanionSessionsHistoryFeature/CompanionSessionsHistoryFeature.d.ts +13 -0
  18. package/dist/esm/lib2/features/CompanionSessionsHistoryFeature/CompanionSessionsHistorySkeletonFeature.d.ts +2 -0
  19. package/dist/esm/lib2/features/CompanionSessionsHistoryFeature/index.d.ts +1 -0
  20. package/dist/esm/lib2/features/index.d.ts +2 -0
  21. package/dist/esm/lib2/shared/types/aiCompanion.d.ts +36 -0
  22. package/dist/esm/lib2/shared/types/index.d.ts +1 -0
  23. package/dist/esm/lib2/shared/utils/aiCompanion.d.ts +5 -0
  24. package/dist/esm/lib2/shared/utils/index.d.ts +1 -0
  25. package/dist/index.d.ts +67 -1
  26. package/package.json +1 -1
@@ -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,2 @@
1
+ declare const CompanionSessionMessagesSkeletonFeature: () => import("react/jsx-runtime").JSX.Element;
2
+ export default CompanionSessionMessagesSkeletonFeature;
@@ -0,0 +1 @@
1
+ export { default as CompanionSessionMessagesFeature } from './CompanionSessionMessagesFeature';
@@ -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,2 @@
1
+ declare const CompanionSessionsHistorySkeletonFeature: () => import("react/jsx-runtime").JSX.Element;
2
+ export default CompanionSessionsHistorySkeletonFeature;
@@ -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;
@@ -15,3 +15,4 @@ export * from './subscription';
15
15
  export * from './session';
16
16
  export * from './tariff';
17
17
  export * from './schedule';
18
+ export * from './aiCompanion';
@@ -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;
@@ -14,3 +14,4 @@ export { ONBOARDING_THEME_DEFAULT_COLORS } from './onboarding';
14
14
  export * from './globalAuthState';
15
15
  export * from './validation';
16
16
  export * from './timezone';
17
+ export * from './aiCompanion';