heartraite 1.0.62 → 1.0.64

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.
@@ -1,4 +1,4 @@
1
1
  import { Gender, SwedishState, UserDeletionReason } from "../enum";
2
2
  export declare const SWEDISH_STATES: SwedishState[];
3
- export declare const USER_DELETION_REASONS: UserDeletionReason[];
4
3
  export declare const GENDERS: Gender[];
4
+ export declare const USER_DELETION_REASONS: UserDeletionReason[];
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GENDERS = exports.USER_DELETION_REASONS = exports.SWEDISH_STATES = void 0;
3
+ exports.USER_DELETION_REASONS = exports.GENDERS = exports.SWEDISH_STATES = void 0;
4
4
  const enum_1 = require("../enum");
5
5
  exports.SWEDISH_STATES = Object.values(enum_1.SwedishState);
6
- exports.USER_DELETION_REASONS = Object.values(enum_1.UserDeletionReason);
7
6
  exports.GENDERS = [enum_1.Gender.MALE, enum_1.Gender.FEMALE];
7
+ exports.USER_DELETION_REASONS = Object.values(enum_1.UserDeletionReason);
@@ -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_SELF_AWARENESS = "sa/get-sa",
33
34
  GET_PLS_SCORES = "score/get-pls-scores",
34
35
  ADD_IMAGES = "storage/add-images",
35
36
  GET_PRODUCTS = "stripe/get-products",
@@ -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_SELF_AWARENESS"] = "sa/get-sa";
37
38
  CloudFunction["GET_PLS_SCORES"] = "score/get-pls-scores";
38
39
  CloudFunction["ADD_IMAGES"] = "storage/add-images";
39
40
  CloudFunction["GET_PRODUCTS"] = "stripe/get-products";
@@ -15,17 +15,4 @@ export type CAScore = {
15
15
  userId: string;
16
16
  scores: Score;
17
17
  };
18
- export type SelfAwareness = {
19
- categories: SACategory[];
20
- };
21
- export type SACategory = {
22
- id: string;
23
- sections: SACategorySection[];
24
- };
25
- export type SACategorySection = {
26
- sectionId: string;
27
- insight: string;
28
- reflection: string;
29
- tip: string;
30
- };
31
18
  export {};
@@ -1,6 +1,6 @@
1
1
  import { CloudFunction } from "../enum";
2
- import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest, CreateBillingPortalRequest, CreateCheckoutSessionRequest, CreateLikeRequest, CreatePLSInputRequest, CreatePLSSubmissionRequest, CreateReportRequest, DeleteUserRequest, 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, DeleteUserResponse, 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";
2
+ import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest, CreateBillingPortalRequest, CreateCheckoutSessionRequest, CreateLikeRequest, CreatePLSInputRequest, CreatePLSSubmissionRequest, CreateReportRequest, DeleteUserRequest, GetCARequest, GetLikesRequest, GetMatchableUserRequest, GetMatchCheckRequest, GetMatchesRequest, GetMatchRequest, GetMessagesRequest, GetPLSScoresRequest, GetPLSSubmissionRequest, GetProductsRequest, GetSelfAwarenessRequest, 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, DeleteUserResponse, GetCAResponse, GetLikesResponse, GetMatchableUserResponse, GetMatchableUsersResponse, GetMatchCheckResponse, GetMatchesResponse, GetMatchResponse, GetMessagesResponse, GetPLSScoresResponse, GetPLSSubmissionResponse, GetProductsResponse, GetSelfAwarenessReponse, 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_SELF_AWARENESS]: {
114
+ payload: GetSelfAwarenessRequest;
115
+ response: GetSelfAwarenessReponse;
116
+ };
113
117
  [CloudFunction.GET_PLS_SCORES]: {
114
118
  payload: GetPLSScoresRequest;
115
119
  response: GetPLSScoresResponse;
@@ -14,3 +14,4 @@ export * from "./pls.types";
14
14
  export * from "./stripe.types";
15
15
  export * from "./submission.types";
16
16
  export * from "./user.types";
17
+ export * from "./sa.types";
@@ -30,3 +30,4 @@ __exportStar(require("./pls.types"), exports);
30
30
  __exportStar(require("./stripe.types"), exports);
31
31
  __exportStar(require("./submission.types"), exports);
32
32
  __exportStar(require("./user.types"), exports);
33
+ __exportStar(require("./sa.types"), exports);
@@ -138,6 +138,7 @@ export type DeleteUserRequest = {
138
138
  deletionReason: UserDeletionReason;
139
139
  customDeletionReason?: string;
140
140
  };
141
+ export type GetSelfAwarenessRequest = undefined;
141
142
  export type GetPLSScoresRequest = undefined;
142
143
  export type AddImagesRequest = {
143
144
  images: string[];
@@ -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 { SelfAwareness } from "./sa.types";
9
10
  import { PLSScore } from "./pls.types";
10
11
  export type RegisterUserResponse = {
11
12
  success: boolean;
@@ -51,6 +52,7 @@ export type UpdatePLSAnswerResponse = {
51
52
  export type SubmitPLSCategoryFeedbackResponse = CategoryEvaluation;
52
53
  export type UpdateQuestionsResponse = void;
53
54
  export type CreateReportResponse = void;
55
+ export type GetSelfAwarenessReponse = SelfAwareness;
54
56
  export type GetPLSScoresResponse = PLSScore[];
55
57
  export type CreateBillingPortalResponse = {
56
58
  url: string;
@@ -0,0 +1,14 @@
1
+ export type SelfAwareness = {
2
+ userId: string;
3
+ categories: SACategory[];
4
+ };
5
+ export type SACategory = {
6
+ id: string;
7
+ sections: SACategorySection[];
8
+ };
9
+ export type SACategorySection = {
10
+ sectionId: string;
11
+ insight: string;
12
+ reflection: string;
13
+ tip: string;
14
+ };
@@ -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.62",
3
+ "version": "1.0.64",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -2,6 +2,6 @@ import { Gender, SwedishState, UserDeletionReason } from "../enum";
2
2
 
3
3
  export const SWEDISH_STATES = Object.values(SwedishState);
4
4
 
5
- export const USER_DELETION_REASONS = Object.values(UserDeletionReason);
6
-
7
5
  export const GENDERS = [Gender.MALE, Gender.FEMALE];
6
+
7
+ export const USER_DELETION_REASONS = Object.values(UserDeletionReason);
@@ -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_SELF_AWARENESS = "sa/get-sa",
33
34
  GET_PLS_SCORES = "score/get-pls-scores",
34
35
  ADD_IMAGES = "storage/add-images",
35
36
  GET_PRODUCTS = "stripe/get-products",
@@ -19,19 +19,3 @@ export type CAScore = {
19
19
  userId: string;
20
20
  scores: Score;
21
21
  };
22
-
23
- export type SelfAwareness = {
24
- categories: SACategory[];
25
- };
26
-
27
- export type SACategory = {
28
- id: string;
29
- sections: SACategorySection[];
30
- };
31
-
32
- export type SACategorySection = {
33
- sectionId: string;
34
- insight: string;
35
- reflection: string;
36
- tip: string;
37
- };
@@ -20,6 +20,7 @@ import {
20
20
  GetPLSScoresRequest,
21
21
  GetPLSSubmissionRequest,
22
22
  GetProductsRequest,
23
+ GetSelfAwarenessRequest,
23
24
  GetUserRequest,
24
25
  HandleLastMessageSeenRequest,
25
26
  HandleLikeSeenRequest,
@@ -58,6 +59,7 @@ import {
58
59
  GetPLSScoresResponse,
59
60
  GetPLSSubmissionResponse,
60
61
  GetProductsResponse,
62
+ GetSelfAwarenessReponse,
61
63
  GetUserResponse,
62
64
  HandleLastMessageSeenResponse,
63
65
  HandleLikeSeenResponse,
@@ -203,6 +205,12 @@ export type CloudFunctionTypes = {
203
205
  response: CreateReportResponse;
204
206
  };
205
207
 
208
+ // sa
209
+ [CloudFunction.GET_SELF_AWARENESS]: {
210
+ payload: GetSelfAwarenessRequest;
211
+ response: GetSelfAwarenessReponse;
212
+ };
213
+
206
214
  // score
207
215
  [CloudFunction.GET_PLS_SCORES]: {
208
216
  payload: GetPLSScoresRequest;
@@ -14,3 +14,4 @@ export * from "./pls.types";
14
14
  export * from "./stripe.types";
15
15
  export * from "./submission.types";
16
16
  export * from "./user.types";
17
+ export * from "./sa.types";
@@ -144,6 +144,9 @@ export type DeleteUserRequest = {
144
144
  customDeletionReason?: string;
145
145
  };
146
146
 
147
+ // sa
148
+ export type GetSelfAwarenessRequest = undefined;
149
+
147
150
  // score
148
151
  export type GetPLSScoresRequest = undefined;
149
152
 
@@ -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 { SelfAwareness } from "./sa.types";
9
10
  import { PLSScore } from "./pls.types";
10
11
 
11
12
  // auth
@@ -71,6 +72,9 @@ export type UpdateQuestionsResponse = void;
71
72
  // report
72
73
  export type CreateReportResponse = void;
73
74
 
75
+ // sa
76
+ export type GetSelfAwarenessReponse = SelfAwareness;
77
+
74
78
  // score
75
79
  export type GetPLSScoresResponse = PLSScore[];
76
80
 
@@ -0,0 +1,16 @@
1
+ export type SelfAwareness = {
2
+ userId: string;
3
+ categories: SACategory[];
4
+ };
5
+
6
+ export type SACategory = {
7
+ id: string;
8
+ sections: SACategorySection[];
9
+ };
10
+
11
+ export type SACategorySection = {
12
+ sectionId: string;
13
+ insight: string;
14
+ reflection: string;
15
+ tip: string;
16
+ };