heartraite 1.0.14 → 1.0.16

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,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;
@@ -60,6 +60,7 @@ export type UpdateUserResponse = User;
60
60
  export type AddImagesResponse = {
61
61
  images: string[];
62
62
  thumbnail: string;
63
+ thumbnailBlurred: string;
63
64
  };
64
65
  export type CancelBankIDResponse = void;
65
66
  export type GetMatchCheckResponse = MatchCheck;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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 = {
@@ -76,7 +76,11 @@ export type GetUserResponse = User;
76
76
  export type UpdateUserResponse = User;
77
77
 
78
78
  // storage
79
- export type AddImagesResponse = { images: string[]; thumbnail: string };
79
+ export type AddImagesResponse = {
80
+ images: string[];
81
+ thumbnail: string;
82
+ thumbnailBlurred: string;
83
+ };
80
84
 
81
85
  export type CancelBankIDResponse = void;
82
86