heartraite 1.0.15 → 1.0.17

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.
@@ -0,0 +1,6 @@
1
+ export declare enum CASkipReason {
2
+ NOT_RELEVANT = "not_relevant",
3
+ TOO_PERSONAL = "too_personal",
4
+ DONT_KNOW = "dont_know",
5
+ OTHER_REASON = "other_reason"
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CASkipReason = void 0;
4
+ var CASkipReason;
5
+ (function (CASkipReason) {
6
+ CASkipReason["NOT_RELEVANT"] = "not_relevant";
7
+ CASkipReason["TOO_PERSONAL"] = "too_personal";
8
+ CASkipReason["DONT_KNOW"] = "dont_know";
9
+ CASkipReason["OTHER_REASON"] = "other_reason";
10
+ })(CASkipReason || (exports.CASkipReason = CASkipReason = {}));
@@ -1,11 +1,12 @@
1
+ export * from "./app-route.enum";
2
+ export * from "./ca.enum";
1
3
  export * from "./cloudfunction.enum";
4
+ export * from "./evaluation.enum";
2
5
  export * from "./like.enum";
3
6
  export * from "./match.enum";
4
- export * from "./app-route.enum";
5
- export * from "./ai-verification-status.enum";
6
- export * from "./evaluation.enum";
7
7
  export * from "./report.enum";
8
8
  export * from "./gender.enum";
9
9
  export * from "./provider.enum";
10
10
  export * from "./state.enum";
11
11
  export * from "./notification.enum";
12
+ export * from "./user.enum";
@@ -14,14 +14,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./app-route.enum"), exports);
18
+ __exportStar(require("./ca.enum"), exports);
17
19
  __exportStar(require("./cloudfunction.enum"), exports);
20
+ __exportStar(require("./evaluation.enum"), exports);
18
21
  __exportStar(require("./like.enum"), exports);
19
22
  __exportStar(require("./match.enum"), exports);
20
- __exportStar(require("./app-route.enum"), exports);
21
- __exportStar(require("./ai-verification-status.enum"), exports);
22
- __exportStar(require("./evaluation.enum"), exports);
23
23
  __exportStar(require("./report.enum"), exports);
24
24
  __exportStar(require("./gender.enum"), exports);
25
25
  __exportStar(require("./provider.enum"), exports);
26
26
  __exportStar(require("./state.enum"), exports);
27
27
  __exportStar(require("./notification.enum"), exports);
28
+ __exportStar(require("./user.enum"), exports);
@@ -4,3 +4,9 @@ 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.AdvancedMatchStatus = void 0;
3
+ exports.CACompletionStatus = exports.AdvancedMatchStatus = void 0;
4
4
  var AdvancedMatchStatus;
5
5
  (function (AdvancedMatchStatus) {
6
6
  AdvancedMatchStatus["INITIAL"] = "initial";
@@ -8,3 +8,10 @@ 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 = {}));
@@ -0,0 +1,3 @@
1
+ export declare enum UserLanguage {
2
+ SWEDISH = "sv"
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserLanguage = void 0;
4
+ var UserLanguage;
5
+ (function (UserLanguage) {
6
+ UserLanguage["SWEDISH"] = "sv";
7
+ })(UserLanguage || (exports.UserLanguage = UserLanguage = {}));
@@ -0,0 +1,5 @@
1
+ export type FirebaseError = {
2
+ code: string;
3
+ message: string;
4
+ details?: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,6 @@
1
1
  export * from "./assessment.types";
2
2
  export * from "./cloud-function-types";
3
+ export * from "./error.types";
3
4
  export * from "./helper.types";
4
5
  export * from "./like.types";
5
6
  export * from "./match.types";
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./assessment.types"), exports);
18
18
  __exportStar(require("./cloud-function-types"), exports);
19
+ __exportStar(require("./error.types"), exports);
19
20
  __exportStar(require("./helper.types"), exports);
20
21
  __exportStar(require("./like.types"), exports);
21
22
  __exportStar(require("./match.types"), exports);
@@ -1,6 +1,7 @@
1
1
  import { LikeType } from "../enum";
2
2
  import { AdvancedMatchStatus } from "../enum/match.enum";
3
3
  import { RatedQuestions } from "./rating.types";
4
+ import { UserProfile } from "./user.types";
4
5
  export type Match = {
5
6
  id: string;
6
7
  users: Record<string, boolean>;
@@ -20,43 +21,25 @@ interface StrengthOrWeakness {
20
21
  title: string;
21
22
  summary: string;
22
23
  }
23
- export type UserData = {
24
- id: string;
25
- intro: string;
26
- firstName: string;
27
- state: string;
28
- birth: string;
29
- gender: string;
30
- distance: number;
31
- interestedIn: string;
32
- zodiacSign: string;
33
- images: string[];
34
- profileInput: Record<string, string>;
35
- aiSummary?: string;
36
- thumbnail: string;
37
- image: string;
38
- bankIDVerified: boolean;
24
+ export type MatchStatus = {
25
+ likeType?: LikeType;
26
+ advancedMatchStatus?: AdvancedMatchStatus;
39
27
  };
40
- export type MatchableUser = {
41
- user: UserData;
42
- percentages: RatedQuestions;
28
+ export type MatchData = {
29
+ percentages: Record<string, number>;
43
30
  totalPercentage: number;
44
31
  isMatch: boolean;
45
- likeType?: LikeType;
46
- isWildcard: boolean;
32
+ };
33
+ export type MatchableUser = {
47
34
  matchId?: string;
48
35
  conversationId?: string;
49
- advancedMatchStatus?: AdvancedMatchStatus;
36
+ profile: UserProfile;
37
+ matchData: MatchData;
38
+ matchStatus: MatchStatus;
50
39
  };
51
40
  export type MatchCheck = {
52
- user: UserData;
53
- percentages: RatedQuestions;
54
- totalPercentage: number;
55
- };
56
- export type UserQuestions = {
57
- questions: Record<string, string>;
58
- invalidQuestions: string[];
59
- favoriteQuestions: string[];
41
+ profile: UserProfile;
42
+ matchData: MatchData;
60
43
  };
61
44
  export type UserMatch = {
62
45
  matchId: string;
@@ -16,6 +16,7 @@ export type Answer = {
16
16
  elaboration?: string;
17
17
  skipped: boolean;
18
18
  reason: string | null;
19
+ detailedReason?: string;
19
20
  };
20
21
  export type CategoryEvaluation = {
21
22
  categoryId: string;
@@ -1,4 +1,4 @@
1
- import { Gender, NotificationSetting } from "../enum";
1
+ import { CACompletionStatus, Gender, NotificationSetting, UserLanguage } from "../enum";
2
2
  export type User = {
3
3
  id: string;
4
4
  email: string;
@@ -7,6 +7,14 @@ export type User = {
7
7
  profile: UserProfile;
8
8
  preferences: DatingPreferences;
9
9
  notifications: UserNotifications;
10
+ settings: UserSettings;
11
+ status: UserStatus;
12
+ };
13
+ export type UserStatus = {
14
+ caCompletionStatus: CACompletionStatus;
15
+ };
16
+ export type UserSettings = {
17
+ language: UserLanguage;
10
18
  };
11
19
  export type UserPermissions = {
12
20
  registrationReferralAllowed: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,6 @@
1
+ export enum CASkipReason {
2
+ NOT_RELEVANT = "not_relevant",
3
+ TOO_PERSONAL = "too_personal",
4
+ DONT_KNOW = "dont_know",
5
+ OTHER_REASON = "other_reason",
6
+ }
package/src/enum/index.ts CHANGED
@@ -1,11 +1,12 @@
1
+ export * from "./app-route.enum";
2
+ export * from "./ca.enum";
1
3
  export * from "./cloudfunction.enum";
4
+ export * from "./evaluation.enum";
2
5
  export * from "./like.enum";
3
6
  export * from "./match.enum";
4
- export * from "./app-route.enum";
5
- export * from "./ai-verification-status.enum";
6
- export * from "./evaluation.enum";
7
7
  export * from "./report.enum";
8
8
  export * from "./gender.enum";
9
9
  export * from "./provider.enum";
10
10
  export * from "./state.enum";
11
11
  export * from "./notification.enum";
12
+ export * from "./user.enum";
@@ -4,3 +4,10 @@ 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
+ }
@@ -0,0 +1,3 @@
1
+ export enum UserLanguage {
2
+ SWEDISH = "sv",
3
+ }
@@ -0,0 +1,5 @@
1
+ export type FirebaseError = {
2
+ code: string;
3
+ message: string;
4
+ details?: string;
5
+ };
@@ -1,5 +1,6 @@
1
1
  export * from "./assessment.types";
2
2
  export * from "./cloud-function-types";
3
+ export * from "./error.types";
3
4
  export * from "./helper.types";
4
5
  export * from "./like.types";
5
6
  export * from "./match.types";
@@ -1,6 +1,7 @@
1
1
  import { LikeType } from "../enum";
2
2
  import { AdvancedMatchStatus } from "../enum/match.enum";
3
3
  import { RatedQuestions } from "./rating.types";
4
+ import { UserProfile } from "./user.types";
4
5
 
5
6
  export type Match = {
6
7
  id: string;
@@ -24,46 +25,28 @@ interface StrengthOrWeakness {
24
25
  summary: string;
25
26
  }
26
27
 
27
- export type UserData = {
28
- id: string;
29
- intro: string;
30
- firstName: string;
31
- state: string;
32
- birth: string;
33
- gender: string;
34
- distance: number;
35
- interestedIn: string;
36
- zodiacSign: string;
37
- images: string[];
38
- profileInput: Record<string, string>;
39
- aiSummary?: string;
40
- thumbnail: string;
41
- image: string;
42
- bankIDVerified: boolean;
28
+ export type MatchStatus = {
29
+ likeType?: LikeType;
30
+ advancedMatchStatus?: AdvancedMatchStatus;
43
31
  };
44
32
 
45
- export type MatchableUser = {
46
- user: UserData;
47
- percentages: RatedQuestions;
33
+ export type MatchData = {
34
+ percentages: Record<string, number>;
48
35
  totalPercentage: number;
49
36
  isMatch: boolean;
50
- likeType?: LikeType;
51
- isWildcard: boolean;
37
+ };
38
+
39
+ export type MatchableUser = {
52
40
  matchId?: string;
53
41
  conversationId?: string;
54
- advancedMatchStatus?: AdvancedMatchStatus;
42
+ profile: UserProfile;
43
+ matchData: MatchData;
44
+ matchStatus: MatchStatus;
55
45
  };
56
46
 
57
47
  export type MatchCheck = {
58
- user: UserData;
59
- percentages: RatedQuestions;
60
- totalPercentage: number;
61
- };
62
-
63
- export type UserQuestions = {
64
- questions: Record<string, string>;
65
- invalidQuestions: string[];
66
- favoriteQuestions: string[];
48
+ profile: UserProfile;
49
+ matchData: MatchData;
67
50
  };
68
51
 
69
52
  export type UserMatch = {
@@ -19,6 +19,7 @@ export type Answer = {
19
19
  elaboration?: string;
20
20
  skipped: boolean;
21
21
  reason: string | null;
22
+ detailedReason?: string;
22
23
  };
23
24
 
24
25
  export type CategoryEvaluation = {
@@ -1,4 +1,9 @@
1
- import { Gender, NotificationSetting } from "../enum";
1
+ import {
2
+ CACompletionStatus,
3
+ Gender,
4
+ NotificationSetting,
5
+ UserLanguage,
6
+ } from "../enum";
2
7
 
3
8
  export type User = {
4
9
  id: string;
@@ -8,6 +13,16 @@ export type User = {
8
13
  profile: UserProfile;
9
14
  preferences: DatingPreferences;
10
15
  notifications: UserNotifications;
16
+ settings: UserSettings;
17
+ status: UserStatus;
18
+ };
19
+
20
+ export type UserStatus = {
21
+ caCompletionStatus: CACompletionStatus;
22
+ };
23
+
24
+ export type UserSettings = {
25
+ language: UserLanguage;
11
26
  };
12
27
 
13
28
  export type UserPermissions = {
@@ -1,6 +0,0 @@
1
- export declare enum AiVerificationStatus {
2
- PENDING = "pending",
3
- ERROR = "error",
4
- SUCCESS = "success",
5
- ACTION_REQUIRED = "action required"
6
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AiVerificationStatus = void 0;
4
- var AiVerificationStatus;
5
- (function (AiVerificationStatus) {
6
- AiVerificationStatus["PENDING"] = "pending";
7
- AiVerificationStatus["ERROR"] = "error";
8
- AiVerificationStatus["SUCCESS"] = "success";
9
- AiVerificationStatus["ACTION_REQUIRED"] = "action required";
10
- })(AiVerificationStatus || (exports.AiVerificationStatus = AiVerificationStatus = {}));
@@ -1,6 +0,0 @@
1
- export enum AiVerificationStatus {
2
- PENDING = "pending",
3
- ERROR = "error",
4
- SUCCESS = "success",
5
- ACTION_REQUIRED = "action required",
6
- }