heartraite 1.0.63 → 1.0.65

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);
@@ -5,7 +5,6 @@ export declare enum CloudFunction {
5
5
  GET_CA = "ca/get-ca",
6
6
  SUBMIT_ANSWER = "ca/submit-answer",
7
7
  SUBMIT_CATEGORY_FEEDBACK = "ca/submit-category-feedback",
8
- GET_SELF_AWARENESS = "ca/get-self-awareness",
9
8
  CREATE_LIKE = "like/create-like",
10
9
  GET_LIKES = "like/get-likes",
11
10
  HANDLE_LIKE_SEEN = "like/handle-like-seen",
@@ -31,6 +30,7 @@ export declare enum CloudFunction {
31
30
  SUBMIT_PLS_CATEGORY_FEEDBACK = "pls/submit-category-feedback",
32
31
  UPDATE_QUESTIONS = "rating/update-quesitons",
33
32
  CREATE_REPORT = "report/create-report",
33
+ GET_SELF_AWARENESS = "sa/get-sa",
34
34
  GET_PLS_SCORES = "score/get-pls-scores",
35
35
  ADD_IMAGES = "storage/add-images",
36
36
  GET_PRODUCTS = "stripe/get-products",
@@ -9,7 +9,6 @@ var CloudFunction;
9
9
  CloudFunction["GET_CA"] = "ca/get-ca";
10
10
  CloudFunction["SUBMIT_ANSWER"] = "ca/submit-answer";
11
11
  CloudFunction["SUBMIT_CATEGORY_FEEDBACK"] = "ca/submit-category-feedback";
12
- CloudFunction["GET_SELF_AWARENESS"] = "ca/get-self-awareness";
13
12
  CloudFunction["CREATE_LIKE"] = "like/create-like";
14
13
  CloudFunction["GET_LIKES"] = "like/get-likes";
15
14
  CloudFunction["HANDLE_LIKE_SEEN"] = "like/handle-like-seen";
@@ -35,6 +34,7 @@ var CloudFunction;
35
34
  CloudFunction["SUBMIT_PLS_CATEGORY_FEEDBACK"] = "pls/submit-category-feedback";
36
35
  CloudFunction["UPDATE_QUESTIONS"] = "rating/update-quesitons";
37
36
  CloudFunction["CREATE_REPORT"] = "report/create-report";
37
+ CloudFunction["GET_SELF_AWARENESS"] = "sa/get-sa";
38
38
  CloudFunction["GET_PLS_SCORES"] = "score/get-pls-scores";
39
39
  CloudFunction["ADD_IMAGES"] = "storage/add-images";
40
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 {};
@@ -26,10 +26,6 @@ export type CloudFunctionTypes = {
26
26
  payload: SubmitCategoryFeedbackRequest;
27
27
  response: SubmitCategoryFeedbackResponse;
28
28
  };
29
- [CloudFunction.GET_SELF_AWARENESS]: {
30
- payload: GetSelfAwarenessRequest;
31
- response: GetSelfAwarenessReponse;
32
- };
33
29
  [CloudFunction.CREATE_LIKE]: {
34
30
  payload: CreateLikeRequest;
35
31
  response: CreateLikeResponse;
@@ -114,6 +110,10 @@ export type CloudFunctionTypes = {
114
110
  payload: CreateReportRequest;
115
111
  response: CreateReportResponse;
116
112
  };
113
+ [CloudFunction.GET_SELF_AWARENESS]: {
114
+ payload: GetSelfAwarenessRequest;
115
+ response: GetSelfAwarenessReponse;
116
+ };
117
117
  [CloudFunction.GET_PLS_SCORES]: {
118
118
  payload: GetPLSScoresRequest;
119
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);
@@ -20,7 +20,6 @@ export type SubmitCategoryFeedbackRequest = {
20
20
  evaluationReflection: string;
21
21
  additionalThoughts: string;
22
22
  };
23
- export type GetSelfAwarenessRequest = undefined;
24
23
  export type AuthenticateBankIDRequest = undefined;
25
24
  export type CollectBankIDRequest = {
26
25
  orderRef: string;
@@ -139,6 +138,7 @@ export type DeleteUserRequest = {
139
138
  deletionReason: UserDeletionReason;
140
139
  customDeletionReason?: string;
141
140
  };
141
+ export type GetSelfAwarenessRequest = undefined;
142
142
  export type GetPLSScoresRequest = undefined;
143
143
  export type AddImagesRequest = {
144
144
  images: string[];
@@ -5,7 +5,8 @@ import { Message } from "./message.types";
5
5
  import { StripeProduct } from "./stripe.types";
6
6
  import { User } from "./user.types";
7
7
  import { Like } from "./like.types";
8
- import { CA, SelfAwareness } from "./ca.types";
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;
@@ -28,7 +29,6 @@ export type SubmitAnswerResponse = {
28
29
  categoryEvaluation?: CategoryEvaluation;
29
30
  };
30
31
  export type SubmitCategoryFeedbackResponse = CategoryEvaluation;
31
- export type GetSelfAwarenessReponse = SelfAwareness;
32
32
  export type HandleLastMessageSeenResponse = undefined;
33
33
  export type SendMessageResponse = Message;
34
34
  export type GetMessagesResponse = Message[];
@@ -52,6 +52,7 @@ export type UpdatePLSAnswerResponse = {
52
52
  export type SubmitPLSCategoryFeedbackResponse = CategoryEvaluation;
53
53
  export type UpdateQuestionsResponse = void;
54
54
  export type CreateReportResponse = void;
55
+ export type GetSelfAwarenessReponse = SelfAwareness;
55
56
  export type GetPLSScoresResponse = PLSScore[];
56
57
  export type CreateBillingPortalResponse = {
57
58
  url: string;
@@ -0,0 +1,15 @@
1
+ export type SelfAwareness = {
2
+ userId: string;
3
+ categories: SACategory[];
4
+ created: string;
5
+ };
6
+ export type SACategory = {
7
+ id: string;
8
+ sections: SACategorySection[];
9
+ };
10
+ export type SACategorySection = {
11
+ sectionId: string;
12
+ insight: string;
13
+ reflection: string;
14
+ tip: string;
15
+ };
@@ -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.63",
3
+ "version": "1.0.65",
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);
@@ -5,7 +5,6 @@ export enum CloudFunction {
5
5
  GET_CA = "ca/get-ca",
6
6
  SUBMIT_ANSWER = "ca/submit-answer",
7
7
  SUBMIT_CATEGORY_FEEDBACK = "ca/submit-category-feedback",
8
- GET_SELF_AWARENESS = "ca/get-self-awareness",
9
8
  CREATE_LIKE = "like/create-like",
10
9
  GET_LIKES = "like/get-likes",
11
10
  HANDLE_LIKE_SEEN = "like/handle-like-seen",
@@ -31,6 +30,7 @@ export enum CloudFunction {
31
30
  SUBMIT_PLS_CATEGORY_FEEDBACK = "pls/submit-category-feedback",
32
31
  UPDATE_QUESTIONS = "rating/update-quesitons",
33
32
  CREATE_REPORT = "report/create-report",
33
+ GET_SELF_AWARENESS = "sa/get-sa",
34
34
  GET_PLS_SCORES = "score/get-pls-scores",
35
35
  ADD_IMAGES = "storage/add-images",
36
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
- };
@@ -108,10 +108,6 @@ export type CloudFunctionTypes = {
108
108
  payload: SubmitCategoryFeedbackRequest;
109
109
  response: SubmitCategoryFeedbackResponse;
110
110
  };
111
- [CloudFunction.GET_SELF_AWARENESS]: {
112
- payload: GetSelfAwarenessRequest;
113
- response: GetSelfAwarenessReponse;
114
- };
115
111
 
116
112
  // like
117
113
  [CloudFunction.CREATE_LIKE]: {
@@ -209,6 +205,12 @@ export type CloudFunctionTypes = {
209
205
  response: CreateReportResponse;
210
206
  };
211
207
 
208
+ // sa
209
+ [CloudFunction.GET_SELF_AWARENESS]: {
210
+ payload: GetSelfAwarenessRequest;
211
+ response: GetSelfAwarenessReponse;
212
+ };
213
+
212
214
  // score
213
215
  [CloudFunction.GET_PLS_SCORES]: {
214
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";
@@ -32,7 +32,6 @@ export type SubmitCategoryFeedbackRequest = {
32
32
  evaluationReflection: string;
33
33
  additionalThoughts: string;
34
34
  };
35
- export type GetSelfAwarenessRequest = undefined;
36
35
 
37
36
  // bankid
38
37
  export type AuthenticateBankIDRequest = undefined;
@@ -145,6 +144,9 @@ export type DeleteUserRequest = {
145
144
  customDeletionReason?: string;
146
145
  };
147
146
 
147
+ // sa
148
+ export type GetSelfAwarenessRequest = undefined;
149
+
148
150
  // score
149
151
  export type GetPLSScoresRequest = undefined;
150
152
 
@@ -5,7 +5,8 @@ import { Message } from "./message.types";
5
5
  import { StripeProduct } from "./stripe.types";
6
6
  import { User } from "./user.types";
7
7
  import { Like } from "./like.types";
8
- import { CA, SelfAwareness } from "./ca.types";
8
+ import { CA } from "./ca.types";
9
+ import { SelfAwareness } from "./sa.types";
9
10
  import { PLSScore } from "./pls.types";
10
11
 
11
12
  // auth
@@ -35,7 +36,6 @@ export type SubmitAnswerResponse = {
35
36
  categoryEvaluation?: CategoryEvaluation;
36
37
  };
37
38
  export type SubmitCategoryFeedbackResponse = CategoryEvaluation;
38
- export type GetSelfAwarenessReponse = SelfAwareness;
39
39
 
40
40
  // message
41
41
  export type HandleLastMessageSeenResponse = undefined;
@@ -72,6 +72,9 @@ export type UpdateQuestionsResponse = void;
72
72
  // report
73
73
  export type CreateReportResponse = void;
74
74
 
75
+ // sa
76
+ export type GetSelfAwarenessReponse = SelfAwareness;
77
+
75
78
  // score
76
79
  export type GetPLSScoresResponse = PLSScore[];
77
80
 
@@ -0,0 +1,17 @@
1
+ export type SelfAwareness = {
2
+ userId: string;
3
+ categories: SACategory[];
4
+ created: string;
5
+ };
6
+
7
+ export type SACategory = {
8
+ id: string;
9
+ sections: SACategorySection[];
10
+ };
11
+
12
+ export type SACategorySection = {
13
+ sectionId: string;
14
+ insight: string;
15
+ reflection: string;
16
+ tip: string;
17
+ };