@demind-inc/core 1.5.6 → 1.5.8

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.
@@ -34,6 +34,10 @@ export declare const DB_COLLECTION: {
34
34
  DISCOUNT: string;
35
35
  ROUTINE: string;
36
36
  ROUTINE_ACTIVITIES: string;
37
+ CHAT: string;
38
+ CHAT_SCHEDULER_SESSION: string;
39
+ CHAT_RECOMMENDATION_SESSION: string;
40
+ CHAT_MESSAGES: string;
37
41
  };
38
42
  export declare const SLEEP_SUPPORTED_TERRA_PROVIDERS: SupportedTerraProvidersType[];
39
43
  export declare const STRESS_SUPPORTED_TERRA_PROVIDERS: SupportedTerraProvidersType[];
package/dist/constants.js CHANGED
@@ -35,6 +35,10 @@ exports.DB_COLLECTION = {
35
35
  DISCOUNT: "discount",
36
36
  ROUTINE: "routine",
37
37
  ROUTINE_ACTIVITIES: "routineActivities",
38
+ CHAT: "chat",
39
+ CHAT_SCHEDULER_SESSION: "schedulerSession",
40
+ CHAT_RECOMMENDATION_SESSION: "recommendationSession",
41
+ CHAT_MESSAGES: "messages",
38
42
  };
39
43
  exports.SLEEP_SUPPORTED_TERRA_PROVIDERS = [
40
44
  "FITBIT",
@@ -0,0 +1,31 @@
1
+ export interface Chat {
2
+ chatId: string;
3
+ userId: string;
4
+ summary?: ChatSummary;
5
+ schedulerSessions?: SchedulerSession[];
6
+ recommendationSessions?: RecommendationSession[];
7
+ }
8
+ export interface ChatSummary {
9
+ scheduler?: string;
10
+ recommendations?: string;
11
+ }
12
+ export interface SchedulerSession {
13
+ schedulerSessionId: string;
14
+ messages: Message[];
15
+ scheduleOutput: any;
16
+ deltaOutput?: any;
17
+ updatedAt: string;
18
+ }
19
+ export type MessageRole = "user" | "assistant";
20
+ export interface Message {
21
+ messageId: string;
22
+ content: string;
23
+ role: MessageRole;
24
+ sentAt: string;
25
+ }
26
+ export interface RecommendationSession {
27
+ recSessionId: string;
28
+ messages: Message[];
29
+ recommendations: any;
30
+ updatedAt: string;
31
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -19,6 +19,7 @@ export interface User {
19
19
  recommendedTasks?: Array<DocumentReference>;
20
20
  chronotype?: Chronotype;
21
21
  emaIds?: Array<DocumentReference>;
22
+ chatId?: string;
22
23
  access?: UserAccessType;
23
24
  subscriptions?: Subscription[];
24
25
  terraUserIds?: string[];
package/lib/constants.ts CHANGED
@@ -35,6 +35,10 @@ export const DB_COLLECTION = {
35
35
  DISCOUNT: "discount",
36
36
  ROUTINE: "routine",
37
37
  ROUTINE_ACTIVITIES: "routineActivities",
38
+ CHAT: "chat",
39
+ CHAT_SCHEDULER_SESSION: "schedulerSession",
40
+ CHAT_RECOMMENDATION_SESSION: "recommendationSession",
41
+ CHAT_MESSAGES: "messages",
38
42
  };
39
43
 
40
44
  export const SLEEP_SUPPORTED_TERRA_PROVIDERS: SupportedTerraProvidersType[] = [
@@ -0,0 +1,36 @@
1
+ export interface Chat {
2
+ chatId: string;
3
+ userId: string;
4
+ summary?: ChatSummary;
5
+ schedulerSessions?: SchedulerSession[];
6
+ recommendationSessions?: RecommendationSession[];
7
+ }
8
+
9
+ export interface ChatSummary {
10
+ scheduler?: string;
11
+ recommendations?: string;
12
+ }
13
+
14
+ export interface SchedulerSession {
15
+ schedulerSessionId: string;
16
+ messages: Message[];
17
+ scheduleOutput: any; // json
18
+ deltaOutput?: any; // json (output_schedule - schedule)
19
+ updatedAt: string;
20
+ }
21
+
22
+ export type MessageRole = "user" | "assistant";
23
+
24
+ export interface Message {
25
+ messageId: string;
26
+ content: string;
27
+ role: MessageRole;
28
+ sentAt: string;
29
+ }
30
+
31
+ export interface RecommendationSession {
32
+ recSessionId: string;
33
+ messages: Message[];
34
+ recommendations: any; // json
35
+ updatedAt: string;
36
+ }
@@ -20,6 +20,7 @@ export interface User {
20
20
  recommendedTasks?: Array<DocumentReference>;
21
21
  chronotype?: Chronotype;
22
22
  emaIds?: Array<DocumentReference>;
23
+ chatId?: string;
23
24
  access?: UserAccessType;
24
25
  subscriptions?: Subscription[];
25
26
  terraUserIds?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@demind-inc/core",
3
- "version": "1.5.6",
3
+ "version": "1.5.8",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {