heartraite 1.0.31 → 1.0.33

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.
@@ -15,6 +15,7 @@ export declare enum CloudFunction {
15
15
  GET_MATCH_CHECK = "matchmaking/get-match-check",
16
16
  GET_MATCHABLE_USER = "matchmaking/get-matchable-user",
17
17
  GET_MATCHABLE_USERS = "matchmaking/get-matchable-users",
18
+ HANDLE_LAST_MESSAGE_SEEN = "message/handle-last-message-seen",
18
19
  SEND_MESSAGE = "message/send-message",
19
20
  GET_MESSAGES = "message/get-messages",
20
21
  CALCULATE_PLS_SCORE = "pls/calculate-score",
@@ -19,6 +19,7 @@ var CloudFunction;
19
19
  CloudFunction["GET_MATCH_CHECK"] = "matchmaking/get-match-check";
20
20
  CloudFunction["GET_MATCHABLE_USER"] = "matchmaking/get-matchable-user";
21
21
  CloudFunction["GET_MATCHABLE_USERS"] = "matchmaking/get-matchable-users";
22
+ CloudFunction["HANDLE_LAST_MESSAGE_SEEN"] = "message/handle-last-message-seen";
22
23
  CloudFunction["SEND_MESSAGE"] = "message/send-message";
23
24
  CloudFunction["GET_MESSAGES"] = "message/get-messages";
24
25
  CloudFunction["CALCULATE_PLS_SCORE"] = "pls/calculate-score";
@@ -1,6 +1,6 @@
1
1
  import { CloudFunction } from "../enum";
2
- import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest, CreateBillingPortalRequest, CreateCheckoutSessionRequest, CreateLikeRequest, CreatePLSInputRequest, CreatePLSSubmissionRequest, CreateReportRequest, GetCARequest, GetMatchableUserRequest, GetMatchCheckRequest, GetMatchesRequest, GetMatchRequest, GetMessagesRequest, GetPLSSubmissionRequest, GetProductsRequest, GetUserRequest, HandleLikeSeenRequest, HandleMatchSeenRequest, RegisterOnboardingRequest, RegisterUserRequest, RemoveMatchRequest, SendMessageRequest, SubmitAnswerRequest, SubmitCategoryFeedbackRequest, SubmitPLSCategoryFeedbackRequest, UpdatePLSAnswerRequest, UpdateQuestionsRequest, UpdateUserRequest } from "./request.types";
3
- import { AddImagesResponse, AuthenticateBankIDResponse, CollectBankIDResponse, CreateBillingPortalResponse, CreateCheckoutSessionResponse, CreateLikeResponse, CreatePLSInputResponse, CreatePLSSubmissionResponse, CreateReportResponse, GetCAResponse, GetMatchableUserResponse, GetMatchableUsersResponse, GetMatchCheckResponse, GetMatchesResponse, GetMatchResponse, GetMessagesResponse, GetPLSSubmissionResponse, GetProductsResponse, GetUserResponse, HandleLikeSeenResponse, HandleMatchSeenResponse, RegisterOnboardingResponse, RegisterUserResponse, RemoveMatchResponse, SendMessageResponse, SubmitAnswerResponse, SubmitCategoryFeedbackResponse, SubmitPLSCategoryFeedbackResponse, UpdatePLSAnswerResponse, UpdateQuestionsResponse, UpdateUserResponse } from "./response.types";
2
+ import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest, CreateBillingPortalRequest, CreateCheckoutSessionRequest, CreateLikeRequest, CreatePLSInputRequest, CreatePLSSubmissionRequest, CreateReportRequest, GetCARequest, GetLikesRequest, GetMatchableUserRequest, GetMatchCheckRequest, GetMatchesRequest, GetMatchRequest, GetMessagesRequest, GetPLSSubmissionRequest, GetProductsRequest, GetUserRequest, HandleLastMessageSeenRequest, HandleLikeSeenRequest, HandleMatchSeenRequest, RegisterOnboardingRequest, RegisterUserRequest, RemoveMatchRequest, SendMessageRequest, SubmitAnswerRequest, SubmitCategoryFeedbackRequest, SubmitPLSCategoryFeedbackRequest, UpdatePLSAnswerRequest, UpdateQuestionsRequest, UpdateUserRequest } from "./request.types";
3
+ import { AddImagesResponse, AuthenticateBankIDResponse, CollectBankIDResponse, CreateBillingPortalResponse, CreateCheckoutSessionResponse, CreateLikeResponse, CreatePLSInputResponse, CreatePLSSubmissionResponse, CreateReportResponse, GetCAResponse, GetLikesResponse, GetMatchableUserResponse, GetMatchableUsersResponse, GetMatchCheckResponse, GetMatchesResponse, GetMatchResponse, GetMessagesResponse, GetPLSSubmissionResponse, GetProductsResponse, GetUserResponse, HandleLastMessageSeenResponse, HandleLikeSeenResponse, HandleMatchSeenResponse, RegisterOnboardingResponse, RegisterUserResponse, RemoveMatchResponse, SendMessageResponse, SubmitAnswerResponse, SubmitCategoryFeedbackResponse, SubmitPLSCategoryFeedbackResponse, UpdatePLSAnswerResponse, UpdateQuestionsResponse, UpdateUserResponse } from "./response.types";
4
4
  export type CloudFunctionTypes = {
5
5
  [CloudFunction.REGISTER_USER]: {
6
6
  payload: RegisterUserRequest;
@@ -31,8 +31,8 @@ export type CloudFunctionTypes = {
31
31
  response: CreateLikeResponse;
32
32
  };
33
33
  [CloudFunction.GET_LIKES]: {
34
- payload: CreateLikeRequest;
35
- response: CreateLikeResponse;
34
+ payload: GetLikesRequest;
35
+ response: GetLikesResponse;
36
36
  };
37
37
  [CloudFunction.HANDLE_LIKE_SEEN]: {
38
38
  payload: HandleLikeSeenRequest;
@@ -66,6 +66,10 @@ export type CloudFunctionTypes = {
66
66
  payload: GetMatchableUsersResponse;
67
67
  response: GetMatchableUsersResponse;
68
68
  };
69
+ [CloudFunction.HANDLE_LAST_MESSAGE_SEEN]: {
70
+ payload: HandleLastMessageSeenRequest;
71
+ response: HandleLastMessageSeenResponse;
72
+ };
69
73
  [CloudFunction.SEND_MESSAGE]: {
70
74
  payload: SendMessageRequest;
71
75
  response: SendMessageResponse;
@@ -24,6 +24,9 @@ export type AuthenticateBankIDRequest = undefined;
24
24
  export type CollectBankIDRequest = {
25
25
  orderRef: string;
26
26
  };
27
+ export type HandleLastMessageSeenRequest = {
28
+ conversationId: string;
29
+ };
27
30
  export type SendMessageRequest = {
28
31
  conversationId: string;
29
32
  messageId: string;
@@ -27,6 +27,7 @@ export type SubmitAnswerResponse = {
27
27
  categoryEvaluation?: CategoryEvaluation;
28
28
  };
29
29
  export type SubmitCategoryFeedbackResponse = CategoryEvaluation;
30
+ export type HandleLastMessageSeenResponse = undefined;
30
31
  export type SendMessageResponse = Message;
31
32
  export type GetMessagesResponse = Message[];
32
33
  export type HandleLikeResponse = boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,6 +15,7 @@ export enum CloudFunction {
15
15
  GET_MATCH_CHECK = "matchmaking/get-match-check",
16
16
  GET_MATCHABLE_USER = "matchmaking/get-matchable-user",
17
17
  GET_MATCHABLE_USERS = "matchmaking/get-matchable-users",
18
+ HANDLE_LAST_MESSAGE_SEEN = "message/handle-last-message-seen",
18
19
  SEND_MESSAGE = "message/send-message",
19
20
  GET_MESSAGES = "message/get-messages",
20
21
  CALCULATE_PLS_SCORE = "pls/calculate-score",
@@ -10,6 +10,7 @@ import {
10
10
  CreatePLSSubmissionRequest,
11
11
  CreateReportRequest,
12
12
  GetCARequest,
13
+ GetLikesRequest,
13
14
  GetMatchableUserRequest,
14
15
  GetMatchCheckRequest,
15
16
  GetMatchesRequest,
@@ -18,6 +19,7 @@ import {
18
19
  GetPLSSubmissionRequest,
19
20
  GetProductsRequest,
20
21
  GetUserRequest,
22
+ HandleLastMessageSeenRequest,
21
23
  HandleLikeSeenRequest,
22
24
  HandleMatchSeenRequest,
23
25
  RegisterOnboardingRequest,
@@ -42,6 +44,7 @@ import {
42
44
  CreatePLSSubmissionResponse,
43
45
  CreateReportResponse,
44
46
  GetCAResponse,
47
+ GetLikesResponse,
45
48
  GetMatchableUserResponse,
46
49
  GetMatchableUsersResponse,
47
50
  GetMatchCheckResponse,
@@ -51,6 +54,7 @@ import {
51
54
  GetPLSSubmissionResponse,
52
55
  GetProductsResponse,
53
56
  GetUserResponse,
57
+ HandleLastMessageSeenResponse,
54
58
  HandleLikeSeenResponse,
55
59
  HandleMatchSeenResponse,
56
60
  RegisterOnboardingResponse,
@@ -103,8 +107,8 @@ export type CloudFunctionTypes = {
103
107
  response: CreateLikeResponse;
104
108
  };
105
109
  [CloudFunction.GET_LIKES]: {
106
- payload: CreateLikeRequest;
107
- response: CreateLikeResponse;
110
+ payload: GetLikesRequest;
111
+ response: GetLikesResponse;
108
112
  };
109
113
  [CloudFunction.HANDLE_LIKE_SEEN]: {
110
114
  payload: HandleLikeSeenRequest;
@@ -142,6 +146,10 @@ export type CloudFunctionTypes = {
142
146
  };
143
147
 
144
148
  // messages
149
+ [CloudFunction.HANDLE_LAST_MESSAGE_SEEN]: {
150
+ payload: HandleLastMessageSeenRequest;
151
+ response: HandleLastMessageSeenResponse;
152
+ };
145
153
  [CloudFunction.SEND_MESSAGE]: {
146
154
  payload: SendMessageRequest;
147
155
  response: SendMessageResponse;
@@ -39,6 +39,9 @@ export type CollectBankIDRequest = {
39
39
  };
40
40
 
41
41
  // message
42
+ export type HandleLastMessageSeenRequest = {
43
+ conversationId: string;
44
+ };
42
45
  export type SendMessageRequest = {
43
46
  conversationId: string;
44
47
  messageId: string;
@@ -1,4 +1,3 @@
1
- import { Assessment, FullAssessment } from "./assessment.types";
2
1
  import { Submission, CategoryEvaluation } from "./submission.types";
3
2
  import { Match, UserMatch } from "./match.types";
4
3
  import { MatchableUser, MatchCheck } from "./matchmaking.types";
@@ -37,6 +36,7 @@ export type SubmitAnswerResponse = {
37
36
  export type SubmitCategoryFeedbackResponse = CategoryEvaluation;
38
37
 
39
38
  // message
39
+ export type HandleLastMessageSeenResponse = undefined;
40
40
  export type SendMessageResponse = Message;
41
41
  export type GetMessagesResponse = Message[];
42
42