heartraite 1.0.21 → 1.0.23

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.
@@ -4,3 +4,9 @@ export declare enum CASkipReason {
4
4
  DONT_KNOW = "dont_know",
5
5
  OTHER_REASON = "other_reason"
6
6
  }
7
+ export declare enum CAStatus {
8
+ NOT_STARTED = "not started",
9
+ IN_PROGRESS = "in progress",
10
+ ERROR = "error",
11
+ SUCCESS = "success"
12
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CASkipReason = void 0;
3
+ exports.CAStatus = exports.CASkipReason = void 0;
4
4
  var CASkipReason;
5
5
  (function (CASkipReason) {
6
6
  CASkipReason["NOT_RELEVANT"] = "not_relevant";
@@ -8,3 +8,10 @@ var CASkipReason;
8
8
  CASkipReason["DONT_KNOW"] = "dont_know";
9
9
  CASkipReason["OTHER_REASON"] = "other_reason";
10
10
  })(CASkipReason || (exports.CASkipReason = CASkipReason = {}));
11
+ var CAStatus;
12
+ (function (CAStatus) {
13
+ CAStatus["NOT_STARTED"] = "not started";
14
+ CAStatus["IN_PROGRESS"] = "in progress";
15
+ CAStatus["ERROR"] = "error";
16
+ CAStatus["SUCCESS"] = "success";
17
+ })(CAStatus || (exports.CAStatus = CAStatus = {}));
@@ -4,9 +4,3 @@ export declare enum AdvancedMatchStatus {
4
4
  ERROR = "error",
5
5
  SUCCESS = "success"
6
6
  }
7
- export declare enum CACompletionStatus {
8
- NOT_STARTED = "not started",
9
- IN_PROGRESS = "in progress",
10
- ERROR = "error",
11
- SUCCESS = "success"
12
- }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CACompletionStatus = exports.AdvancedMatchStatus = void 0;
3
+ exports.AdvancedMatchStatus = void 0;
4
4
  var AdvancedMatchStatus;
5
5
  (function (AdvancedMatchStatus) {
6
6
  AdvancedMatchStatus["INITIAL"] = "initial";
@@ -8,10 +8,3 @@ var AdvancedMatchStatus;
8
8
  AdvancedMatchStatus["ERROR"] = "error";
9
9
  AdvancedMatchStatus["SUCCESS"] = "success";
10
10
  })(AdvancedMatchStatus || (exports.AdvancedMatchStatus = AdvancedMatchStatus = {}));
11
- var CACompletionStatus;
12
- (function (CACompletionStatus) {
13
- CACompletionStatus["NOT_STARTED"] = "not started";
14
- CACompletionStatus["IN_PROGRESS"] = "in progress";
15
- CACompletionStatus["ERROR"] = "error";
16
- CACompletionStatus["SUCCESS"] = "success";
17
- })(CACompletionStatus || (exports.CACompletionStatus = CACompletionStatus = {}));
package/dist/index.d.ts CHANGED
@@ -2,4 +2,3 @@ export * from "./constants";
2
2
  export * from "./enum";
3
3
  export * from "./firebase";
4
4
  export * from "./types";
5
- export * from "./hooks";
package/dist/index.js CHANGED
@@ -18,4 +18,3 @@ __exportStar(require("./constants"), exports);
18
18
  __exportStar(require("./enum"), exports);
19
19
  __exportStar(require("./firebase"), exports);
20
20
  __exportStar(require("./types"), exports);
21
- __exportStar(require("./hooks"), exports);
@@ -1,6 +1,8 @@
1
1
  import { Answer, CategoryEvaluation } from "./submission.types";
2
2
  type QuestionId = string;
3
3
  type CategoryId = string;
4
+ type ScoreAmount = number;
5
+ export type Score = Record<QuestionId, ScoreAmount>;
4
6
  export type CA = {
5
7
  created: string;
6
8
  userId: string;
@@ -8,4 +10,9 @@ export type CA = {
8
10
  answers: Record<QuestionId, Answer>;
9
11
  categoryEvaluations?: Record<CategoryId, CategoryEvaluation>;
10
12
  };
13
+ export type CAScore = {
14
+ created: string;
15
+ userId: string;
16
+ scores: Score;
17
+ };
11
18
  export {};
@@ -43,7 +43,7 @@ export type GetLikesResponse = Like[];
43
43
  export type HandleLikeSeenResponse = void;
44
44
  export type CreatePLSInputResponse = void;
45
45
  export type CreatePLSAssessmentResponse = Assessment;
46
- export type GetPLSAssessmentResponse = Assessment;
46
+ export type GetPLSAssessmentResponse = FullAssessment;
47
47
  export type GetPLSAssessmentsResponse = FullAssessment[];
48
48
  export type CreatePLSSubmissionResponse = Submission;
49
49
  export type GetPLSSubmissionResponse = Submission;
@@ -1,4 +1,4 @@
1
- import { CACompletionStatus, Gender, NotificationSetting, UserLanguage } from "../enum";
1
+ import { CAStatus, Gender, NotificationSetting, UserLanguage } from "../enum";
2
2
  export type User = {
3
3
  id: string;
4
4
  email: string;
@@ -11,7 +11,7 @@ export type User = {
11
11
  status: UserStatus;
12
12
  };
13
13
  export type UserStatus = {
14
- caCompletionStatus: CACompletionStatus;
14
+ caStatus: CAStatus;
15
15
  };
16
16
  export type UserSettings = {
17
17
  language: UserLanguage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -4,3 +4,10 @@ export enum CASkipReason {
4
4
  DONT_KNOW = "dont_know",
5
5
  OTHER_REASON = "other_reason",
6
6
  }
7
+
8
+ export enum CAStatus {
9
+ NOT_STARTED = "not started",
10
+ IN_PROGRESS = "in progress",
11
+ ERROR = "error",
12
+ SUCCESS = "success",
13
+ }
@@ -4,10 +4,3 @@ export enum AdvancedMatchStatus {
4
4
  ERROR = "error",
5
5
  SUCCESS = "success",
6
6
  }
7
-
8
- export enum CACompletionStatus {
9
- NOT_STARTED = "not started",
10
- IN_PROGRESS = "in progress",
11
- ERROR = "error",
12
- SUCCESS = "success",
13
- }
package/src/index.ts CHANGED
@@ -2,4 +2,3 @@ export * from "./constants";
2
2
  export * from "./enum";
3
3
  export * from "./firebase";
4
4
  export * from "./types";
5
- export * from "./hooks";
@@ -2,6 +2,9 @@ import { Answer, CategoryEvaluation } from "./submission.types";
2
2
 
3
3
  type QuestionId = string;
4
4
  type CategoryId = string;
5
+ type ScoreAmount = number;
6
+
7
+ export type Score = Record<QuestionId, ScoreAmount>;
5
8
 
6
9
  export type CA = {
7
10
  created: string;
@@ -10,3 +13,9 @@ export type CA = {
10
13
  answers: Record<QuestionId, Answer>;
11
14
  categoryEvaluations?: Record<CategoryId, CategoryEvaluation>;
12
15
  };
16
+
17
+ export type CAScore = {
18
+ created: string;
19
+ userId: string;
20
+ scores: Score;
21
+ };
@@ -56,7 +56,7 @@ export type HandleLikeSeenResponse = void;
56
56
  // pls
57
57
  export type CreatePLSInputResponse = void;
58
58
  export type CreatePLSAssessmentResponse = Assessment;
59
- export type GetPLSAssessmentResponse = Assessment;
59
+ export type GetPLSAssessmentResponse = FullAssessment;
60
60
  export type GetPLSAssessmentsResponse = FullAssessment[];
61
61
  export type CreatePLSSubmissionResponse = Submission;
62
62
  export type GetPLSSubmissionResponse = Submission;
@@ -1,9 +1,4 @@
1
- import {
2
- CACompletionStatus,
3
- Gender,
4
- NotificationSetting,
5
- UserLanguage,
6
- } from "../enum";
1
+ import { CAStatus, Gender, NotificationSetting, UserLanguage } from "../enum";
7
2
 
8
3
  export type User = {
9
4
  id: string;
@@ -18,7 +13,7 @@ export type User = {
18
13
  };
19
14
 
20
15
  export type UserStatus = {
21
- caCompletionStatus: CACompletionStatus;
16
+ caStatus: CAStatus;
22
17
  };
23
18
 
24
19
  export type UserSettings = {