heartraite 1.0.90 → 1.0.92

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.
@@ -8,7 +8,7 @@ export declare enum CloudFunction {
8
8
  CREATE_LIKE = "like/create-like",
9
9
  GET_LIKES = "like/get-likes",
10
10
  HANDLE_LIKE_SEEN = "like/handle-like-seen",
11
- GET_MATCH = "match/get-match",
11
+ GET_ADVANCED_MATCH = "match/get-advanced-match",
12
12
  HANDLE_MATCH_SEEN = "match/handle-match-seen",
13
13
  GET_MATCHES = "match/get-matches",
14
14
  REMOVE_MATCH = "match/remove-match",
@@ -12,7 +12,7 @@ var CloudFunction;
12
12
  CloudFunction["CREATE_LIKE"] = "like/create-like";
13
13
  CloudFunction["GET_LIKES"] = "like/get-likes";
14
14
  CloudFunction["HANDLE_LIKE_SEEN"] = "like/handle-like-seen";
15
- CloudFunction["GET_MATCH"] = "match/get-match";
15
+ CloudFunction["GET_ADVANCED_MATCH"] = "match/get-advanced-match";
16
16
  CloudFunction["HANDLE_MATCH_SEEN"] = "match/handle-match-seen";
17
17
  CloudFunction["GET_MATCHES"] = "match/get-matches";
18
18
  CloudFunction["REMOVE_MATCH"] = "match/remove-match";
@@ -1,4 +1,5 @@
1
1
  import { LoveLanguages, Personality } from "./ca.types";
2
+ import { MatchCompatibility } from "./matchmaking.types";
2
3
  export type AMDatingSuggestions = {
3
4
  summary: string;
4
5
  suggestions: AMDatingSuggestion[];
@@ -71,6 +72,10 @@ export type AMStrengthsAndChallenges = {
71
72
  };
72
73
  type UserId = string;
73
74
  export type AdvancedMatch = {
75
+ id: string;
76
+ matchId: string;
77
+ version: string;
78
+ created: string;
74
79
  datingSuggestions: AMDatingSuggestions;
75
80
  icebreakers: AMIcebreakers;
76
81
  strengthsAndChallenges: AMStrengthsAndChallenges;
@@ -81,7 +86,6 @@ export type AdvancedMatch = {
81
86
  personality: Personality;
82
87
  loveLanguages: LoveLanguages;
83
88
  }>;
84
- version: string;
85
- created: string;
89
+ compatibility: MatchCompatibility;
86
90
  };
87
91
  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, 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, GetPLSSubmissionResponse, GetProductsResponse, GetSelfAwarenessReponse, 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, GetAdvancedMatchRequest, GetMessagesRequest, 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, GetAdvancedMatchResponse, GetMessagesResponse, 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;
@@ -38,9 +38,9 @@ export type CloudFunctionTypes = {
38
38
  payload: HandleLikeSeenRequest;
39
39
  response: HandleLikeSeenResponse;
40
40
  };
41
- [CloudFunction.GET_MATCH]: {
42
- payload: GetMatchRequest;
43
- response: GetMatchResponse;
41
+ [CloudFunction.GET_ADVANCED_MATCH]: {
42
+ payload: GetAdvancedMatchRequest;
43
+ response: GetAdvancedMatchResponse;
44
44
  };
45
45
  [CloudFunction.HANDLE_MATCH_SEEN]: {
46
46
  payload: HandleMatchSeenRequest;
@@ -1,13 +1,9 @@
1
- import { AdvancedMatch } from "./am.types";
2
- import { MatchCompatibility } from "./matchmaking.types";
3
1
  export type Match = {
4
2
  id: string;
5
3
  users: string[];
6
4
  created: string;
7
5
  initiatedBy: string;
8
6
  conversationId: string;
9
- compatibility: MatchCompatibility;
10
- advancedMatch?: AdvancedMatch;
11
7
  };
12
8
  export type UserMatch = {
13
9
  matchId: string;
@@ -1,7 +1,7 @@
1
1
  import { FeedbackAgreement, Gender, LikeType, ProviderType, ReportReason, UserDeletionReason } from "../enum";
2
2
  import { DeepPartial } from "./helper.types";
3
3
  import { Answer, Demographics } from "./submission.types";
4
- import { DatingPreferences, UserNotifications, UserProfile, UserSettings } from "./user.types";
4
+ import { DatingPreferences, UserConsents, UserNotifications, UserProfile, UserSettings } from "./user.types";
5
5
  export type RegisterUserRequest = {
6
6
  userId: string;
7
7
  email: string;
@@ -51,7 +51,7 @@ export type HandleLikeSeenRequest = {
51
51
  export type RemoveMatchRequest = {
52
52
  matchId: string;
53
53
  };
54
- export type GetMatchRequest = {
54
+ export type GetAdvancedMatchRequest = {
55
55
  matchId: string;
56
56
  };
57
57
  export type HandleMatchSeenRequest = {
@@ -135,6 +135,7 @@ export type UpdateUserRequest = {
135
135
  };
136
136
  appVersion?: string;
137
137
  settings?: DeepPartial<UserSettings>;
138
+ consent?: DeepPartial<UserConsents>;
138
139
  };
139
140
  export type DeleteUserRequest = {
140
141
  validationPhrase: string;
@@ -1,5 +1,5 @@
1
1
  import { Submission, CategoryEvaluation } from "./submission.types";
2
- import { Match, UserMatch } from "./match.types";
2
+ import { UserMatch } from "./match.types";
3
3
  import { MatchableUser, MatchCheck } from "./matchmaking.types";
4
4
  import { Message } from "./message.types";
5
5
  import { StripeProduct } from "./stripe.types";
@@ -8,6 +8,7 @@ import { IncomingLike } from "./like.types";
8
8
  import { CA } from "./ca.types";
9
9
  import { SelfAwareness } from "./sa.types";
10
10
  import { PLSScore } from "./pls.types";
11
+ import { AdvancedMatch } from "./am.types";
11
12
  export type RegisterUserResponse = {
12
13
  success: boolean;
13
14
  message: string;
@@ -33,7 +34,7 @@ export type HandleLastMessageSeenResponse = undefined;
33
34
  export type SendMessageResponse = Message;
34
35
  export type GetMessagesResponse = Message[];
35
36
  export type RemoveMatchResponse = void;
36
- export type GetMatchResponse = Match;
37
+ export type GetAdvancedMatchResponse = AdvancedMatch;
37
38
  export type HandleMatchSeenResponse = void;
38
39
  export type GetMatchesResponse = UserMatch[];
39
40
  export type GetMatchableUserResponse = MatchableUser;
@@ -8,6 +8,13 @@ export type User = {
8
8
  preferences: DatingPreferences;
9
9
  notifications: UserNotifications;
10
10
  settings: UserSettings;
11
+ consent: UserConsents;
12
+ };
13
+ export type UserConsents = {
14
+ am: Consent;
15
+ };
16
+ export type Consent = {
17
+ given: boolean;
11
18
  };
12
19
  export type UserSettings = {
13
20
  language: UserLanguage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.90",
3
+ "version": "1.0.92",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,7 +8,7 @@ export enum CloudFunction {
8
8
  CREATE_LIKE = "like/create-like",
9
9
  GET_LIKES = "like/get-likes",
10
10
  HANDLE_LIKE_SEEN = "like/handle-like-seen",
11
- GET_MATCH = "match/get-match",
11
+ GET_ADVANCED_MATCH = "match/get-advanced-match",
12
12
  HANDLE_MATCH_SEEN = "match/handle-match-seen",
13
13
  GET_MATCHES = "match/get-matches",
14
14
  REMOVE_MATCH = "match/remove-match",
@@ -1,4 +1,5 @@
1
1
  import { LoveLanguages, Personality } from "./ca.types";
2
+ import { MatchCompatibility } from "./matchmaking.types";
2
3
 
3
4
  export type AMDatingSuggestions = {
4
5
  summary: string;
@@ -87,6 +88,10 @@ export type AMStrengthsAndChallenges = {
87
88
  type UserId = string;
88
89
 
89
90
  export type AdvancedMatch = {
91
+ id: string;
92
+ matchId: string;
93
+ version: string;
94
+ created: string;
90
95
  datingSuggestions: AMDatingSuggestions;
91
96
  icebreakers: AMIcebreakers;
92
97
  strengthsAndChallenges: AMStrengthsAndChallenges;
@@ -100,6 +105,5 @@ export type AdvancedMatch = {
100
105
  loveLanguages: LoveLanguages;
101
106
  }
102
107
  >;
103
- version: string;
104
- created: string;
108
+ compatibility: MatchCompatibility;
105
109
  };
@@ -15,7 +15,7 @@ import {
15
15
  GetMatchableUserRequest,
16
16
  GetMatchCheckRequest,
17
17
  GetMatchesRequest,
18
- GetMatchRequest,
18
+ GetAdvancedMatchRequest,
19
19
  GetMessagesRequest,
20
20
  GetPLSSubmissionRequest,
21
21
  GetProductsRequest,
@@ -53,7 +53,7 @@ import {
53
53
  GetMatchableUsersResponse,
54
54
  GetMatchCheckResponse,
55
55
  GetMatchesResponse,
56
- GetMatchResponse,
56
+ GetAdvancedMatchResponse,
57
57
  GetMessagesResponse,
58
58
  GetPLSSubmissionResponse,
59
59
  GetProductsResponse,
@@ -122,9 +122,9 @@ export type CloudFunctionTypes = {
122
122
  };
123
123
 
124
124
  // match
125
- [CloudFunction.GET_MATCH]: {
126
- payload: GetMatchRequest;
127
- response: GetMatchResponse;
125
+ [CloudFunction.GET_ADVANCED_MATCH]: {
126
+ payload: GetAdvancedMatchRequest;
127
+ response: GetAdvancedMatchResponse;
128
128
  };
129
129
  [CloudFunction.HANDLE_MATCH_SEEN]: {
130
130
  payload: HandleMatchSeenRequest;
@@ -1,14 +1,9 @@
1
- import { AdvancedMatch } from "./am.types";
2
- import { MatchCompatibility } from "./matchmaking.types";
3
-
4
1
  export type Match = {
5
2
  id: string;
6
3
  users: string[];
7
4
  created: string;
8
5
  initiatedBy: string;
9
6
  conversationId: string;
10
- compatibility: MatchCompatibility;
11
- advancedMatch?: AdvancedMatch;
12
7
  };
13
8
 
14
9
  export type UserMatch = {
@@ -10,6 +10,7 @@ import { DeepPartial } from "./helper.types";
10
10
  import { Answer, Demographics } from "./submission.types";
11
11
  import {
12
12
  DatingPreferences,
13
+ UserConsents,
13
14
  UserNotifications,
14
15
  UserProfile,
15
16
  UserSettings,
@@ -63,7 +64,7 @@ export type HandleLikeSeenRequest = { userId: string };
63
64
 
64
65
  // match
65
66
  export type RemoveMatchRequest = { matchId: string };
66
- export type GetMatchRequest = { matchId: string };
67
+ export type GetAdvancedMatchRequest = { matchId: string };
67
68
  export type HandleMatchSeenRequest = { userId: string };
68
69
  export type GetMatchesRequest = { limit: number; offset: string };
69
70
  export type GetMatchableUserRequest = { userId: string };
@@ -140,6 +141,7 @@ export type UpdateUserRequest = {
140
141
  geoLocation?: { lat: number; lng: number };
141
142
  appVersion?: string;
142
143
  settings?: DeepPartial<UserSettings>;
144
+ consent?: DeepPartial<UserConsents>;
143
145
  };
144
146
  export type DeleteUserRequest = {
145
147
  validationPhrase: string;
@@ -8,6 +8,7 @@ import { IncomingLike } from "./like.types";
8
8
  import { CA } from "./ca.types";
9
9
  import { SelfAwareness } from "./sa.types";
10
10
  import { PLSScore } from "./pls.types";
11
+ import { AdvancedMatch } from "./am.types";
11
12
 
12
13
  // auth
13
14
  export type RegisterUserResponse = {
@@ -44,7 +45,7 @@ export type GetMessagesResponse = Message[];
44
45
 
45
46
  // match
46
47
  export type RemoveMatchResponse = void;
47
- export type GetMatchResponse = Match;
48
+ export type GetAdvancedMatchResponse = AdvancedMatch;
48
49
  export type HandleMatchSeenResponse = void;
49
50
  export type GetMatchesResponse = UserMatch[];
50
51
  export type GetMatchableUserResponse = MatchableUser;
@@ -15,6 +15,16 @@ export type User = {
15
15
  preferences: DatingPreferences;
16
16
  notifications: UserNotifications;
17
17
  settings: UserSettings;
18
+ consent: UserConsents;
19
+ };
20
+
21
+ export type UserConsents = {
22
+ am: Consent;
23
+ // add others as needed
24
+ };
25
+
26
+ export type Consent = {
27
+ given: boolean;
18
28
  };
19
29
 
20
30
  export type UserSettings = {