heartraite 1.0.57 → 1.0.59

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.
@@ -30,6 +30,7 @@ export declare enum CloudFunction {
30
30
  SUBMIT_PLS_CATEGORY_FEEDBACK = "pls/submit-category-feedback",
31
31
  UPDATE_QUESTIONS = "rating/update-quesitons",
32
32
  CREATE_REPORT = "report/create-report",
33
+ GET_PLS_SCORES = "score/get-pls-scores",
33
34
  ADD_IMAGES = "storage/add-images",
34
35
  GET_PRODUCTS = "stripe/get-products",
35
36
  STRIPE_WEBWOOK = "stripe/webhook",
@@ -34,6 +34,7 @@ var CloudFunction;
34
34
  CloudFunction["SUBMIT_PLS_CATEGORY_FEEDBACK"] = "pls/submit-category-feedback";
35
35
  CloudFunction["UPDATE_QUESTIONS"] = "rating/update-quesitons";
36
36
  CloudFunction["CREATE_REPORT"] = "report/create-report";
37
+ CloudFunction["GET_PLS_SCORES"] = "score/get-pls-scores";
37
38
  CloudFunction["ADD_IMAGES"] = "storage/add-images";
38
39
  CloudFunction["GET_PRODUCTS"] = "stripe/get-products";
39
40
  CloudFunction["STRIPE_WEBWOOK"] = "stripe/webhook";
@@ -24,5 +24,6 @@ export declare enum UserCollection {
24
24
  MESSAGES = "messages",
25
25
  MATCHES = "matches",
26
26
  OUTGOING_LIKES = "outgoing_likes",
27
- INCOMING_LIKES = "incoming_likes"
27
+ INCOMING_LIKES = "incoming_likes",
28
+ MATCH_FETCHES = "match_fetches"
28
29
  }
@@ -31,4 +31,5 @@ var UserCollection;
31
31
  UserCollection["MATCHES"] = "matches";
32
32
  UserCollection["OUTGOING_LIKES"] = "outgoing_likes";
33
33
  UserCollection["INCOMING_LIKES"] = "incoming_likes";
34
+ UserCollection["MATCH_FETCHES"] = "match_fetches";
34
35
  })(UserCollection || (exports.UserCollection = UserCollection = {}));
@@ -1,6 +1,6 @@
1
1
  import { CloudFunction } from "../enum";
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, SubmitPLSDemographicsRequest, 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, SubmitPLSDemographicsResponse, UpdatePLSAnswerResponse, UpdateQuestionsResponse, UpdateUserResponse } from "./response.types";
2
+ import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest, CreateBillingPortalRequest, CreateCheckoutSessionRequest, CreateLikeRequest, CreatePLSInputRequest, CreatePLSSubmissionRequest, CreateReportRequest, GetCARequest, GetLikesRequest, GetMatchableUserRequest, GetMatchCheckRequest, GetMatchesRequest, GetMatchRequest, GetMessagesRequest, GetPLSScoresRequest, GetPLSSubmissionRequest, GetProductsRequest, GetUserRequest, HandleLastMessageSeenRequest, HandleLikeSeenRequest, HandleMatchSeenRequest, RegisterOnboardingRequest, RegisterUserRequest, RemoveMatchRequest, SendMessageRequest, SubmitAnswerRequest, SubmitCategoryFeedbackRequest, SubmitPLSCategoryFeedbackRequest, SubmitPLSDemographicsRequest, 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, GetPLSScoresResponse, GetPLSSubmissionResponse, GetProductsResponse, GetUserResponse, HandleLastMessageSeenResponse, HandleLikeSeenResponse, HandleMatchSeenResponse, RegisterOnboardingResponse, RegisterUserResponse, RemoveMatchResponse, SendMessageResponse, SubmitAnswerResponse, SubmitCategoryFeedbackResponse, SubmitPLSCategoryFeedbackResponse, SubmitPLSDemographicsResponse, UpdatePLSAnswerResponse, UpdateQuestionsResponse, UpdateUserResponse } from "./response.types";
4
4
  export type CloudFunctionTypes = {
5
5
  [CloudFunction.REGISTER_USER]: {
6
6
  payload: RegisterUserRequest;
@@ -110,6 +110,10 @@ export type CloudFunctionTypes = {
110
110
  payload: CreateReportRequest;
111
111
  response: CreateReportResponse;
112
112
  };
113
+ [CloudFunction.GET_PLS_SCORES]: {
114
+ payload: GetPLSScoresRequest;
115
+ response: GetPLSScoresResponse;
116
+ };
113
117
  [CloudFunction.ADD_IMAGES]: {
114
118
  payload: AddImagesRequest;
115
119
  response: AddImagesResponse;
@@ -1,5 +1,9 @@
1
1
  export type FirebaseError = {
2
2
  code: string;
3
3
  message: string;
4
- details?: string;
4
+ details?: Details;
5
5
  };
6
+ type Details = {
7
+ matchFetchTimestamp?: string;
8
+ };
9
+ export {};
@@ -133,6 +133,7 @@ export type UpdateUserRequest = {
133
133
  lng: number;
134
134
  };
135
135
  };
136
+ export type GetPLSScoresRequest = undefined;
136
137
  export type AddImagesRequest = {
137
138
  images: string[];
138
139
  };
@@ -6,6 +6,7 @@ import { StripeProduct } from "./stripe.types";
6
6
  import { User } from "./user.types";
7
7
  import { Like } from "./like.types";
8
8
  import { CA } from "./ca.types";
9
+ import { PLSScore } from "./pls.types";
9
10
  export type RegisterUserResponse = {
10
11
  success: boolean;
11
12
  message: string;
@@ -50,6 +51,7 @@ export type UpdatePLSAnswerResponse = {
50
51
  export type SubmitPLSCategoryFeedbackResponse = CategoryEvaluation;
51
52
  export type UpdateQuestionsResponse = void;
52
53
  export type CreateReportResponse = void;
54
+ export type GetPLSScoresResponse = PLSScore[];
53
55
  export type CreateBillingPortalResponse = {
54
56
  url: string;
55
57
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.57",
3
+ "version": "1.0.59",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,6 +30,7 @@ export enum CloudFunction {
30
30
  SUBMIT_PLS_CATEGORY_FEEDBACK = "pls/submit-category-feedback",
31
31
  UPDATE_QUESTIONS = "rating/update-quesitons",
32
32
  CREATE_REPORT = "report/create-report",
33
+ GET_PLS_SCORES = "score/get-pls-scores",
33
34
  ADD_IMAGES = "storage/add-images",
34
35
  GET_PRODUCTS = "stripe/get-products",
35
36
  STRIPE_WEBWOOK = "stripe/webhook",
@@ -27,4 +27,5 @@ export enum UserCollection {
27
27
  MATCHES = "matches",
28
28
  OUTGOING_LIKES = "outgoing_likes",
29
29
  INCOMING_LIKES = "incoming_likes",
30
+ MATCH_FETCHES = "match_fetches",
30
31
  }
@@ -16,6 +16,7 @@ import {
16
16
  GetMatchesRequest,
17
17
  GetMatchRequest,
18
18
  GetMessagesRequest,
19
+ GetPLSScoresRequest,
19
20
  GetPLSSubmissionRequest,
20
21
  GetProductsRequest,
21
22
  GetUserRequest,
@@ -52,6 +53,7 @@ import {
52
53
  GetMatchesResponse,
53
54
  GetMatchResponse,
54
55
  GetMessagesResponse,
56
+ GetPLSScoresResponse,
55
57
  GetPLSSubmissionResponse,
56
58
  GetProductsResponse,
57
59
  GetUserResponse,
@@ -199,6 +201,12 @@ export type CloudFunctionTypes = {
199
201
  response: CreateReportResponse;
200
202
  };
201
203
 
204
+ // score
205
+ [CloudFunction.GET_PLS_SCORES]: {
206
+ payload: GetPLSScoresRequest;
207
+ response: GetPLSScoresResponse;
208
+ };
209
+
202
210
  // storage
203
211
  [CloudFunction.ADD_IMAGES]: {
204
212
  payload: AddImagesRequest;
@@ -1,5 +1,9 @@
1
1
  export type FirebaseError = {
2
2
  code: string;
3
3
  message: string;
4
- details?: string;
4
+ details?: Details;
5
+ };
6
+
7
+ type Details = {
8
+ matchFetchTimestamp?: string;
5
9
  };
@@ -138,6 +138,9 @@ export type UpdateUserRequest = {
138
138
  geoLocation?: { lat: number; lng: number };
139
139
  };
140
140
 
141
+ // score
142
+ export type GetPLSScoresRequest = undefined;
143
+
141
144
  // storage
142
145
  export type AddImagesRequest = { images: string[] };
143
146
 
@@ -6,6 +6,7 @@ import { StripeProduct } from "./stripe.types";
6
6
  import { User } from "./user.types";
7
7
  import { Like } from "./like.types";
8
8
  import { CA } from "./ca.types";
9
+ import { PLSScore } from "./pls.types";
9
10
 
10
11
  // auth
11
12
  export type RegisterUserResponse = {
@@ -70,6 +71,9 @@ export type UpdateQuestionsResponse = void;
70
71
  // report
71
72
  export type CreateReportResponse = void;
72
73
 
74
+ // score
75
+ export type GetPLSScoresResponse = PLSScore[];
76
+
73
77
  // stripe
74
78
  export type CreateBillingPortalResponse = { url: string };
75
79
  export type CreateCheckoutSessionResponse = { url: string };