heartraite 1.0.119 → 1.0.121
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.
- package/dist/enum/cloudfunction.enum.d.ts +1 -0
- package/dist/enum/cloudfunction.enum.js +1 -0
- package/dist/types/cloud-function-types.d.ts +6 -2
- package/dist/types/event.types.d.ts +25 -12
- package/dist/types/request.types.d.ts +3 -0
- package/dist/types/response.types.d.ts +2 -0
- package/package.json +1 -1
- package/src/enum/cloudfunction.enum.ts +1 -0
- package/src/types/cloud-function-types.ts +6 -0
- package/src/types/event.types.ts +23 -12
- package/src/types/request.types.ts +5 -0
- package/src/types/response.types.ts +3 -1
|
@@ -7,6 +7,7 @@ export declare enum CloudFunction {
|
|
|
7
7
|
GET_CA = "ca/get-ca",
|
|
8
8
|
SUBMIT_ANSWER = "ca/submit-answer",
|
|
9
9
|
GET_USER_EVENTS = "event/get-user-events",
|
|
10
|
+
JOIN_EVENT = "event/join-event",
|
|
10
11
|
SUBMIT_CATEGORY_FEEDBACK = "ca/submit-category-feedback",
|
|
11
12
|
CREATE_LIKE = "like/create-like",
|
|
12
13
|
GET_LIKES = "like/get-likes",
|
|
@@ -11,6 +11,7 @@ var CloudFunction;
|
|
|
11
11
|
CloudFunction["GET_CA"] = "ca/get-ca";
|
|
12
12
|
CloudFunction["SUBMIT_ANSWER"] = "ca/submit-answer";
|
|
13
13
|
CloudFunction["GET_USER_EVENTS"] = "event/get-user-events";
|
|
14
|
+
CloudFunction["JOIN_EVENT"] = "event/join-event";
|
|
14
15
|
CloudFunction["SUBMIT_CATEGORY_FEEDBACK"] = "ca/submit-category-feedback";
|
|
15
16
|
CloudFunction["CREATE_LIKE"] = "like/create-like";
|
|
16
17
|
CloudFunction["GET_LIKES"] = "like/get-likes";
|
|
@@ -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, GetAdvancedMatchRequest, GetMessagesRequest, GetPLSSubmissionRequest, GetProductsRequest, GetSelfAwarenessRequest, GetUserRequest, HandleLastMessageSeenRequest, HandleLikeSeenRequest, HandleMatchSeenRequest, RegisterOnboardingRequest, RegisterUserRequest, RemoveMatchRequest, SendMessageRequest, SubmitAnswerRequest, SubmitCategoryFeedbackRequest, SubmitPLSCategoryFeedbackRequest, SubmitPLSDemographicsRequest, UpdatePLSAnswerRequest, UpdateQuestionsRequest, UpdateUserRequest, SubmitFeedbackRequest, SyncAffiliateRequest } 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, SubmitFeedbackResponse, SyncAffiliateResponse, GetUserEventsResponse } 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, SubmitFeedbackRequest, SyncAffiliateRequest, JoinEventRequest } 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, SubmitFeedbackResponse, SyncAffiliateResponse, GetUserEventsResponse, JoinEventResponse } from "./response.types";
|
|
4
4
|
export type CloudFunctionTypes = {
|
|
5
5
|
[CloudFunction.SYNC_AFFILIATE]: {
|
|
6
6
|
payload: SyncAffiliateRequest;
|
|
@@ -34,6 +34,10 @@ export type CloudFunctionTypes = {
|
|
|
34
34
|
payload: undefined;
|
|
35
35
|
response: GetUserEventsResponse;
|
|
36
36
|
};
|
|
37
|
+
[CloudFunction.JOIN_EVENT]: {
|
|
38
|
+
payload: JoinEventRequest;
|
|
39
|
+
response: JoinEventResponse;
|
|
40
|
+
};
|
|
37
41
|
[CloudFunction.SUBMIT_FEEDBACK]: {
|
|
38
42
|
payload: SubmitFeedbackRequest;
|
|
39
43
|
response: SubmitFeedbackResponse;
|
|
@@ -23,19 +23,32 @@ export type EventParticipation = {
|
|
|
23
23
|
eventId: string;
|
|
24
24
|
userId: string;
|
|
25
25
|
joinedAt: string;
|
|
26
|
+
gender: Gender;
|
|
27
|
+
interestedIn: Gender[];
|
|
26
28
|
role: "attendee" | "host" | "admin";
|
|
27
29
|
status: "confirmed" | "pending" | "cancelled";
|
|
28
30
|
};
|
|
29
|
-
export type
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
export type FullParticipant = EventParticipation & {
|
|
32
|
+
firstName: string;
|
|
33
|
+
image: string;
|
|
34
|
+
age: number;
|
|
35
|
+
minAge: number;
|
|
36
|
+
maxAge: number;
|
|
37
|
+
state: string;
|
|
38
|
+
birth: string;
|
|
39
|
+
gender: Gender;
|
|
40
|
+
};
|
|
41
|
+
export type EventMatchStats = {
|
|
42
|
+
lastCalculated: string;
|
|
43
|
+
totalPairs: number;
|
|
44
|
+
topMatches: {
|
|
45
|
+
userA: string;
|
|
46
|
+
userB: string;
|
|
47
|
+
score: number;
|
|
48
|
+
}[];
|
|
49
|
+
averageCompatibility: number;
|
|
50
|
+
};
|
|
51
|
+
export type FullEvent = Omit<Event, "participants"> & {
|
|
52
|
+
participants: FullParticipant[];
|
|
53
|
+
matchStats?: EventMatchStats;
|
|
41
54
|
};
|
|
@@ -27,6 +27,9 @@ export type AuthenticateBankIDRequest = undefined;
|
|
|
27
27
|
export type CollectBankIDRequest = {
|
|
28
28
|
orderRef: string;
|
|
29
29
|
};
|
|
30
|
+
export type JoinEventRequest = {
|
|
31
|
+
inviteCode: string;
|
|
32
|
+
};
|
|
30
33
|
export type SubmitFeedbackRequest = {
|
|
31
34
|
message: string;
|
|
32
35
|
type: FeedbackType;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Submission, CategoryEvaluation } from "./submission.types";
|
|
2
|
+
import { Event } from "./event.types";
|
|
2
3
|
import { UserMatch } from "./match.types";
|
|
3
4
|
import { MatchableUser, MatchCheck } from "./matchmaking.types";
|
|
4
5
|
import { Message } from "./message.types";
|
|
@@ -33,6 +34,7 @@ export type SubmitAnswerResponse = {
|
|
|
33
34
|
};
|
|
34
35
|
export type SubmitCategoryFeedbackResponse = CategoryEvaluation;
|
|
35
36
|
export type GetUserEventsResponse = EventParticipation[];
|
|
37
|
+
export type JoinEventResponse = Event;
|
|
36
38
|
export type SubmitFeedbackResponse = undefined;
|
|
37
39
|
export type HandleLastMessageSeenResponse = undefined;
|
|
38
40
|
export type SendMessageResponse = Message;
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ export enum CloudFunction {
|
|
|
7
7
|
GET_CA = "ca/get-ca",
|
|
8
8
|
SUBMIT_ANSWER = "ca/submit-answer",
|
|
9
9
|
GET_USER_EVENTS = "event/get-user-events",
|
|
10
|
+
JOIN_EVENT = "event/join-event",
|
|
10
11
|
SUBMIT_CATEGORY_FEEDBACK = "ca/submit-category-feedback",
|
|
11
12
|
CREATE_LIKE = "like/create-like",
|
|
12
13
|
GET_LIKES = "like/get-likes",
|
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
UpdateUserRequest,
|
|
38
38
|
SubmitFeedbackRequest,
|
|
39
39
|
SyncAffiliateRequest,
|
|
40
|
+
JoinEventRequest,
|
|
40
41
|
} from "./request.types";
|
|
41
42
|
import {
|
|
42
43
|
AddImagesResponse,
|
|
@@ -78,6 +79,7 @@ import {
|
|
|
78
79
|
SubmitFeedbackResponse,
|
|
79
80
|
SyncAffiliateResponse,
|
|
80
81
|
GetUserEventsResponse,
|
|
82
|
+
JoinEventResponse,
|
|
81
83
|
} from "./response.types";
|
|
82
84
|
|
|
83
85
|
// Define a mapping of Cloud Functions to payload and response types
|
|
@@ -122,6 +124,10 @@ export type CloudFunctionTypes = {
|
|
|
122
124
|
payload: undefined;
|
|
123
125
|
response: GetUserEventsResponse;
|
|
124
126
|
};
|
|
127
|
+
[CloudFunction.JOIN_EVENT]: {
|
|
128
|
+
payload: JoinEventRequest;
|
|
129
|
+
response: JoinEventResponse;
|
|
130
|
+
};
|
|
125
131
|
|
|
126
132
|
// feedback
|
|
127
133
|
[CloudFunction.SUBMIT_FEEDBACK]: {
|
package/src/types/event.types.ts
CHANGED
|
@@ -26,20 +26,31 @@ export type EventParticipation = {
|
|
|
26
26
|
eventId: string;
|
|
27
27
|
userId: string;
|
|
28
28
|
joinedAt: string;
|
|
29
|
+
gender: Gender;
|
|
30
|
+
interestedIn: Gender[];
|
|
29
31
|
role: "attendee" | "host" | "admin";
|
|
30
32
|
status: "confirmed" | "pending" | "cancelled";
|
|
31
33
|
};
|
|
32
34
|
|
|
33
|
-
export type
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
export type FullParticipant = EventParticipation & {
|
|
36
|
+
firstName: string;
|
|
37
|
+
image: string;
|
|
38
|
+
age: number;
|
|
39
|
+
minAge: number;
|
|
40
|
+
maxAge: number;
|
|
41
|
+
state: string;
|
|
42
|
+
birth: string;
|
|
43
|
+
gender: Gender;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export type EventMatchStats = {
|
|
47
|
+
lastCalculated: string;
|
|
48
|
+
totalPairs: number;
|
|
49
|
+
topMatches: { userA: string; userB: string; score: number }[];
|
|
50
|
+
averageCompatibility: number;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type FullEvent = Omit<Event, "participants"> & {
|
|
54
|
+
participants: FullParticipant[];
|
|
55
|
+
matchStats?: EventMatchStats;
|
|
45
56
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Submission, CategoryEvaluation } from "./submission.types";
|
|
2
|
-
import {
|
|
2
|
+
import { Event } from "./event.types";
|
|
3
|
+
import { UserMatch } from "./match.types";
|
|
3
4
|
import { MatchableUser, MatchCheck } from "./matchmaking.types";
|
|
4
5
|
import { Message } from "./message.types";
|
|
5
6
|
import { StripeProduct } from "./stripe.types";
|
|
@@ -44,6 +45,7 @@ export type SubmitCategoryFeedbackResponse = CategoryEvaluation;
|
|
|
44
45
|
|
|
45
46
|
// event
|
|
46
47
|
export type GetUserEventsResponse = EventParticipation[];
|
|
48
|
+
export type JoinEventResponse = Event;
|
|
47
49
|
|
|
48
50
|
// feedback
|
|
49
51
|
export type SubmitFeedbackResponse = undefined;
|