heartraite 1.0.203 → 1.0.204

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.
@@ -56,5 +56,7 @@ export declare enum CloudFunction {
56
56
  DELETE_USER = "user/delete-user",
57
57
  SUBMIT_MATCH_FEEDBACK = "match-outcome/submit-feedback",
58
58
  GENERATE_CODE = "ps/generate-code",
59
- RESOLVE_CODE = "ps/resolve-code"
59
+ RESOLVE_CODE = "ps/resolve-code",
60
+ GET_SYSTEM_MESSAGES = "system-message/get-messages",
61
+ HANDLE_SYSTEM_MESSAGE_SEEN = "system-message/handle-seen"
60
62
  }
@@ -61,4 +61,6 @@ var CloudFunction;
61
61
  CloudFunction["SUBMIT_MATCH_FEEDBACK"] = "match-outcome/submit-feedback";
62
62
  CloudFunction["GENERATE_CODE"] = "ps/generate-code";
63
63
  CloudFunction["RESOLVE_CODE"] = "ps/resolve-code";
64
+ CloudFunction["GET_SYSTEM_MESSAGES"] = "system-message/get-messages";
65
+ CloudFunction["HANDLE_SYSTEM_MESSAGE_SEEN"] = "system-message/handle-seen";
64
66
  })(CloudFunction || (exports.CloudFunction = CloudFunction = {}));
@@ -27,5 +27,6 @@ export declare enum FirestoreUserCollection {
27
27
  CONVERSATIONS = "user_conversations",
28
28
  NOTIFICATIONS = "user_notifications",
29
29
  EVENTS = "user_events",
30
- SURVEYS = "user_surveys"
30
+ SURVEYS = "user_surveys",
31
+ SYSTEM_MESSAGES = "system_messages"
31
32
  }
@@ -34,4 +34,5 @@ var FirestoreUserCollection;
34
34
  FirestoreUserCollection["NOTIFICATIONS"] = "user_notifications";
35
35
  FirestoreUserCollection["EVENTS"] = "user_events";
36
36
  FirestoreUserCollection["SURVEYS"] = "user_surveys";
37
+ FirestoreUserCollection["SYSTEM_MESSAGES"] = "system_messages";
37
38
  })(FirestoreUserCollection || (exports.FirestoreUserCollection = FirestoreUserCollection = {}));
@@ -24,3 +24,4 @@ export * from "./notification.enum";
24
24
  export * from "./user.enum";
25
25
  export * from "./sa.enum";
26
26
  export * from "./survey.enum";
27
+ export * from "./system-message.enum";
@@ -40,3 +40,4 @@ __exportStar(require("./notification.enum"), exports);
40
40
  __exportStar(require("./user.enum"), exports);
41
41
  __exportStar(require("./sa.enum"), exports);
42
42
  __exportStar(require("./survey.enum"), exports);
43
+ __exportStar(require("./system-message.enum"), exports);
@@ -0,0 +1,5 @@
1
+ export declare enum SystemMessageCategory {
2
+ MATCHMAKING_STATUS = "matchmaking_status",
3
+ SUPPORT_REPLY = "support_reply",
4
+ GENERAL = "general"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SystemMessageCategory = void 0;
4
+ var SystemMessageCategory;
5
+ (function (SystemMessageCategory) {
6
+ SystemMessageCategory["MATCHMAKING_STATUS"] = "matchmaking_status";
7
+ SystemMessageCategory["SUPPORT_REPLY"] = "support_reply";
8
+ SystemMessageCategory["GENERAL"] = "general";
9
+ })(SystemMessageCategory || (exports.SystemMessageCategory = SystemMessageCategory = {}));
@@ -23,3 +23,4 @@ export * from "./user.types";
23
23
  export * from "./sa.types";
24
24
  export * from "./ps.types";
25
25
  export * from "./survey.types";
26
+ export * from "./system-message.types";
@@ -39,3 +39,4 @@ __exportStar(require("./user.types"), exports);
39
39
  __exportStar(require("./sa.types"), exports);
40
40
  __exportStar(require("./ps.types"), exports);
41
41
  __exportStar(require("./survey.types"), exports);
42
+ __exportStar(require("./system-message.types"), exports);
@@ -112,6 +112,13 @@ export type GetLikesRequest = {
112
112
  export type HandleLikeSeenRequest = {
113
113
  userId: string;
114
114
  };
115
+ export type GetSystemMessagesRequest = {
116
+ limit: number;
117
+ offset: string;
118
+ };
119
+ export type HandleSystemMessageSeenRequest = {
120
+ messageId: string;
121
+ };
115
122
  export type RemoveMatchRequest = {
116
123
  matchId: string;
117
124
  };
@@ -11,6 +11,7 @@ import { CA } from "./ca.types";
11
11
  import { SelfAwareness } from "./sa.types";
12
12
  import { PLSScore } from "./pls.types";
13
13
  import { AdvancedMatch } from "./am.types";
14
+ import { SystemMessage } from "./system-message.types";
14
15
  export type SyncAffiliateResponse = void;
15
16
  export type RegisterUserResponse = {
16
17
  success: boolean;
@@ -64,6 +65,8 @@ export type CreateLikeResponse = void;
64
65
  export type GetLikesResponse = IncomingLike[];
65
66
  export type GetOutgoingLikesResponse = OutgoingLike[];
66
67
  export type HandleLikeSeenResponse = void;
68
+ export type GetSystemMessagesResponse = SystemMessage[];
69
+ export type HandleSystemMessageSeenResponse = void;
67
70
  export type SubmitPLSDemographicsResponse = void;
68
71
  export type CreatePLSInputResponse = void;
69
72
  export type CreatePLSSubmissionResponse = Submission;
@@ -0,0 +1,16 @@
1
+ import { AppRoute, SystemMessageCategory } from "../enum";
2
+ export interface SystemMessage {
3
+ id: string;
4
+ category: SystemMessageCategory;
5
+ title: string;
6
+ body: string;
7
+ route?: AppRoute;
8
+ created: string;
9
+ seen: boolean;
10
+ seenAt?: string;
11
+ relatedFeedbackId?: string;
12
+ sentBy: {
13
+ source: "admin" | "system";
14
+ id: string;
15
+ };
16
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.203",
3
+ "version": "1.0.204",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -57,4 +57,6 @@ export enum CloudFunction {
57
57
  SUBMIT_MATCH_FEEDBACK = "match-outcome/submit-feedback",
58
58
  GENERATE_CODE = "ps/generate-code",
59
59
  RESOLVE_CODE = "ps/resolve-code",
60
+ GET_SYSTEM_MESSAGES = "system-message/get-messages",
61
+ HANDLE_SYSTEM_MESSAGE_SEEN = "system-message/handle-seen",
60
62
  }
@@ -30,4 +30,5 @@ export enum FirestoreUserCollection {
30
30
  NOTIFICATIONS = "user_notifications",
31
31
  EVENTS = "user_events",
32
32
  SURVEYS = "user_surveys",
33
+ SYSTEM_MESSAGES = "system_messages",
33
34
  }
package/src/enum/index.ts CHANGED
@@ -24,3 +24,4 @@ export * from "./notification.enum";
24
24
  export * from "./user.enum";
25
25
  export * from "./sa.enum";
26
26
  export * from "./survey.enum";
27
+ export * from "./system-message.enum";
@@ -0,0 +1,5 @@
1
+ export enum SystemMessageCategory {
2
+ MATCHMAKING_STATUS = "matchmaking_status",
3
+ SUPPORT_REPLY = "support_reply",
4
+ GENERAL = "general",
5
+ }
@@ -23,3 +23,4 @@ export * from "./user.types";
23
23
  export * from "./sa.types";
24
24
  export * from "./ps.types";
25
25
  export * from "./survey.types";
26
+ export * from "./system-message.types";
@@ -154,6 +154,10 @@ export type CreateLikeRequest = {
154
154
  export type GetLikesRequest = { limit: number; offset: string };
155
155
  export type HandleLikeSeenRequest = { userId: string };
156
156
 
157
+ // system-message
158
+ export type GetSystemMessagesRequest = { limit: number; offset: string };
159
+ export type HandleSystemMessageSeenRequest = { messageId: string };
160
+
157
161
  // match
158
162
  export type RemoveMatchRequest = { matchId: string };
159
163
  export type GetAdvancedMatchRequest = { matchId: string };
@@ -14,6 +14,7 @@ import { CA } from "./ca.types";
14
14
  import { SelfAwareness } from "./sa.types";
15
15
  import { PLSScore } from "./pls.types";
16
16
  import { AdvancedMatch } from "./am.types";
17
+ import { SystemMessage } from "./system-message.types";
17
18
 
18
19
  // affiliate
19
20
  export type SyncAffiliateResponse = void;
@@ -95,6 +96,10 @@ export type GetLikesResponse = IncomingLike[];
95
96
  export type GetOutgoingLikesResponse = OutgoingLike[];
96
97
  export type HandleLikeSeenResponse = void;
97
98
 
99
+ // system-message
100
+ export type GetSystemMessagesResponse = SystemMessage[];
101
+ export type HandleSystemMessageSeenResponse = void;
102
+
98
103
  // pls
99
104
  export type SubmitPLSDemographicsResponse = void;
100
105
  export type CreatePLSInputResponse = void;
@@ -0,0 +1,14 @@
1
+ import { AppRoute, SystemMessageCategory } from "../enum";
2
+
3
+ export interface SystemMessage {
4
+ id: string;
5
+ category: SystemMessageCategory;
6
+ title: string;
7
+ body: string;
8
+ route?: AppRoute;
9
+ created: string;
10
+ seen: boolean;
11
+ seenAt?: string;
12
+ relatedFeedbackId?: string;
13
+ sentBy: { source: "admin" | "system"; id: string };
14
+ }