heartraite 1.0.4 → 1.0.6
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/enum/index.d.ts +1 -0
- package/dist/enum/index.js +1 -0
- package/dist/enum/notification.enum.d.ts +5 -0
- package/dist/enum/notification.enum.js +9 -0
- package/dist/types/cloud-function-types.d.ts +6 -2
- package/dist/types/helper.types.d.ts +3 -0
- package/dist/types/helper.types.js +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/request.types.d.ts +24 -6
- package/dist/types/response.types.d.ts +5 -4
- package/dist/types/user.types.d.ts +9 -8
- package/package.json +1 -1
- package/src/enum/cloudfunction.enum.ts +1 -0
- package/src/enum/index.ts +1 -0
- package/src/enum/notification.enum.ts +5 -0
- package/src/types/cloud-function-types.ts +6 -0
- package/src/types/helper.types.ts +3 -0
- package/src/types/index.ts +1 -0
- package/src/types/request.types.ts +30 -6
- package/src/types/response.types.ts +7 -4
- package/src/types/user.types.ts +10 -8
|
@@ -29,6 +29,7 @@ export declare enum CloudFunction {
|
|
|
29
29
|
STRIPE_WEBWOOK = "stripe/webhook",
|
|
30
30
|
CREATE_BILLING_PORTAL = "stripe/create-billing-portal",
|
|
31
31
|
CREATE_CHECKOUT_SESSION = "stripe/create-checkout-session",
|
|
32
|
+
REGISTER_ONBOARDING = "user/register-onboarding",
|
|
32
33
|
UPDATE_USER = "user/update-user",
|
|
33
34
|
GET_CURRENT_USER = "user/get-current-user"
|
|
34
35
|
}
|
|
@@ -33,6 +33,7 @@ var CloudFunction;
|
|
|
33
33
|
CloudFunction["STRIPE_WEBWOOK"] = "stripe/webhook";
|
|
34
34
|
CloudFunction["CREATE_BILLING_PORTAL"] = "stripe/create-billing-portal";
|
|
35
35
|
CloudFunction["CREATE_CHECKOUT_SESSION"] = "stripe/create-checkout-session";
|
|
36
|
+
CloudFunction["REGISTER_ONBOARDING"] = "user/register-onboarding";
|
|
36
37
|
CloudFunction["UPDATE_USER"] = "user/update-user";
|
|
37
38
|
CloudFunction["GET_CURRENT_USER"] = "user/get-current-user";
|
|
38
39
|
})(CloudFunction || (exports.CloudFunction = CloudFunction = {}));
|
package/dist/enum/index.d.ts
CHANGED
package/dist/enum/index.js
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationSetting = void 0;
|
|
4
|
+
var NotificationSetting;
|
|
5
|
+
(function (NotificationSetting) {
|
|
6
|
+
NotificationSetting["NEW_MATCH"] = "new-match";
|
|
7
|
+
NotificationSetting["NEW_LIKE"] = "new-like";
|
|
8
|
+
NotificationSetting["NEW_MESSAGE"] = "new-message";
|
|
9
|
+
})(NotificationSetting || (exports.NotificationSetting = NotificationSetting = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CloudFunction } from "../enum";
|
|
2
|
-
import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest, CreateAssessmentRequest, CreateBillingPortalRequest, CreateCheckoutSessionRequest, CreateLikeRequest, CreatePLSRequest, CreateReportRequest, CreateSubmissionRequest, GetAssessmentRequest, GetMatchableUserRequest, GetMatchCheckRequest, GetMatchesRequest, GetMatchRequest, GetMessagesRequest, GetProductsRequest, GetSubmissionRequest, GetUserRequest, HandleLikeSeenRequest, HandleMatchSeenRequest, RegisterUserRequest, RemoveMatchRequest, SendMessageRequest, SubmitCategoryFeedbackRequest, UpdateAnswerRequest, UpdateQuestionsRequest, UpdateUserRequest } from "./request.types";
|
|
3
|
-
import { AddImagesResponse, AuthenticateBankIDResponse, CollectBankIDResponse, CreateAssessmentResponse, CreateBillingPortalResponse, CreateCheckoutSessionResponse, CreateLikeResponse, CreatePLSResponse, CreateReportResponse, CreateSubmissionResponse, GetAssessmentResponse, GetAssessmentsResponse, GetMatchableUserResponse, GetMatchableUsersResponse, GetMatchCheckResponse, GetMatchesResponse, GetMatchResponse, GetMessagesResponse, GetProductsResponse, GetSubmissionResponse, GetUserResponse, HandleLikeSeenResponse, HandleMatchSeenResponse, RegisterUserResponse, RemoveMatchResponse, SendMessageResponse, SubmitCategoryFeedbackResponse, UpdateAnswerResponse, UpdateQuestionsResponse, UpdateUserResponse } from "./response.types";
|
|
2
|
+
import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest, CreateAssessmentRequest, CreateBillingPortalRequest, CreateCheckoutSessionRequest, CreateLikeRequest, CreatePLSRequest, CreateReportRequest, CreateSubmissionRequest, GetAssessmentRequest, GetMatchableUserRequest, GetMatchCheckRequest, GetMatchesRequest, GetMatchRequest, GetMessagesRequest, GetProductsRequest, GetSubmissionRequest, GetUserRequest, HandleLikeSeenRequest, HandleMatchSeenRequest, RegisterOnboardingRequest, RegisterUserRequest, RemoveMatchRequest, SendMessageRequest, SubmitCategoryFeedbackRequest, UpdateAnswerRequest, UpdateQuestionsRequest, UpdateUserRequest } from "./request.types";
|
|
3
|
+
import { AddImagesResponse, AuthenticateBankIDResponse, CollectBankIDResponse, CreateAssessmentResponse, CreateBillingPortalResponse, CreateCheckoutSessionResponse, CreateLikeResponse, CreatePLSResponse, CreateReportResponse, CreateSubmissionResponse, GetAssessmentResponse, GetAssessmentsResponse, GetMatchableUserResponse, GetMatchableUsersResponse, GetMatchCheckResponse, GetMatchesResponse, GetMatchResponse, GetMessagesResponse, GetProductsResponse, GetSubmissionResponse, GetUserResponse, HandleLikeSeenResponse, HandleMatchSeenResponse, RegisterOnboardingResponse, RegisterUserResponse, RemoveMatchResponse, SendMessageResponse, SubmitCategoryFeedbackResponse, UpdateAnswerResponse, UpdateQuestionsResponse, UpdateUserResponse } from "./response.types";
|
|
4
4
|
export type CloudFunctionTypes = {
|
|
5
5
|
[CloudFunction.CREATE_ASSESSMENT]: {
|
|
6
6
|
payload: CreateAssessmentRequest;
|
|
@@ -118,6 +118,10 @@ export type CloudFunctionTypes = {
|
|
|
118
118
|
payload: CreateCheckoutSessionRequest;
|
|
119
119
|
response: CreateCheckoutSessionResponse;
|
|
120
120
|
};
|
|
121
|
+
[CloudFunction.REGISTER_ONBOARDING]: {
|
|
122
|
+
payload: RegisterOnboardingRequest;
|
|
123
|
+
response: RegisterOnboardingResponse;
|
|
124
|
+
};
|
|
121
125
|
[CloudFunction.UPDATE_USER]: {
|
|
122
126
|
payload: UpdateUserRequest;
|
|
123
127
|
response: UpdateUserResponse;
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -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("./helper.types"), exports);
|
|
19
20
|
__exportStar(require("./like.types"), exports);
|
|
20
21
|
__exportStar(require("./match.types"), exports);
|
|
21
22
|
__exportStar(require("./message.types"), exports);
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import { FeedbackAgreement, LikeType, ReportReason } from "../enum";
|
|
1
|
+
import { FeedbackAgreement, Gender, LikeType, ReportReason } from "../enum";
|
|
2
|
+
import { DeepPartial } from "./helper.types";
|
|
2
3
|
import { Answer } from "./submission.types";
|
|
4
|
+
import { DatingPreferences, UserNotifications, UserProfile } from "./user.types";
|
|
5
|
+
export type RegisterUserRequest = {
|
|
6
|
+
email: string;
|
|
7
|
+
password: string;
|
|
8
|
+
referrerId?: string;
|
|
9
|
+
};
|
|
3
10
|
export type CreateAssessmentRequest = {
|
|
4
11
|
intimateTopics: boolean;
|
|
5
12
|
};
|
|
@@ -87,13 +94,24 @@ export type CreateReportRequest = {
|
|
|
87
94
|
export type CreateCheckoutSessionRequest = {
|
|
88
95
|
priceId: string;
|
|
89
96
|
};
|
|
90
|
-
export type
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
export type RegisterOnboardingRequest = {
|
|
98
|
+
firstName: string;
|
|
99
|
+
state: string;
|
|
100
|
+
birth: Date;
|
|
101
|
+
images: string[];
|
|
102
|
+
interestedIn: Gender[];
|
|
103
|
+
gender: Gender;
|
|
104
|
+
coordinates: {
|
|
105
|
+
lat: number;
|
|
106
|
+
lng: number;
|
|
107
|
+
};
|
|
94
108
|
};
|
|
95
109
|
export type GetUserRequest = undefined;
|
|
96
|
-
export type UpdateUserRequest =
|
|
110
|
+
export type UpdateUserRequest = {
|
|
111
|
+
profile?: DeepPartial<UserProfile>;
|
|
112
|
+
preferences?: DeepPartial<DatingPreferences>;
|
|
113
|
+
notifications?: DeepPartial<UserNotifications>;
|
|
114
|
+
};
|
|
97
115
|
export type AddImagesRequest = {
|
|
98
116
|
images: string[];
|
|
99
117
|
};
|
|
@@ -5,6 +5,10 @@ import { Message } from "./message.types";
|
|
|
5
5
|
import { StripeProduct } from "./stripe.types";
|
|
6
6
|
import { User } from "./user.types";
|
|
7
7
|
import { Like } from "./like.types";
|
|
8
|
+
export type RegisterUserResponse = {
|
|
9
|
+
success: boolean;
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
8
12
|
export type CreateAssessmentResponse = Assessment;
|
|
9
13
|
export type GetAssessmentResponse = Assessment;
|
|
10
14
|
export type GetAssessmentsResponse = FullAssessment[];
|
|
@@ -50,10 +54,7 @@ export type CreateCheckoutSessionResponse = {
|
|
|
50
54
|
url: string;
|
|
51
55
|
};
|
|
52
56
|
export type GetProductsResponse = StripeProduct[];
|
|
53
|
-
export type
|
|
54
|
-
success: boolean;
|
|
55
|
-
message: string;
|
|
56
|
-
};
|
|
57
|
+
export type RegisterOnboardingResponse = User;
|
|
57
58
|
export type GetUserResponse = User;
|
|
58
59
|
export type UpdateUserResponse = User;
|
|
59
60
|
export type AddImagesResponse = {
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { Gender } from "../enum";
|
|
1
|
+
import { Gender, NotificationSetting } from "../enum";
|
|
2
2
|
export type User = {
|
|
3
3
|
id: string;
|
|
4
4
|
email: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
profile:
|
|
5
|
+
created: Date;
|
|
6
|
+
permissions: UserPermissions;
|
|
7
|
+
profile: UserProfile;
|
|
8
8
|
preferences: DatingPreferences;
|
|
9
9
|
notifications: UserNotifications;
|
|
10
10
|
};
|
|
11
|
-
export type
|
|
11
|
+
export type UserPermissions = {
|
|
12
|
+
registrationReferralAllowed: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type UserProfile = {
|
|
12
15
|
intro: string;
|
|
13
16
|
firstName: string;
|
|
14
17
|
state: string;
|
|
@@ -26,11 +29,9 @@ export type Profile = {
|
|
|
26
29
|
};
|
|
27
30
|
export type NotificationSettings = {
|
|
28
31
|
enabled: boolean;
|
|
29
|
-
settings: Record<
|
|
32
|
+
settings: Record<NotificationSetting, boolean>;
|
|
30
33
|
};
|
|
31
34
|
export type UserNotifications = {
|
|
32
|
-
pushNotificationsEnabled: boolean;
|
|
33
|
-
emailNotificationsEnabled: boolean;
|
|
34
35
|
pushNotificationSettings: NotificationSettings;
|
|
35
36
|
emailNotificationSettings: NotificationSettings;
|
|
36
37
|
};
|
package/package.json
CHANGED
|
@@ -29,6 +29,7 @@ export enum CloudFunction {
|
|
|
29
29
|
STRIPE_WEBWOOK = "stripe/webhook",
|
|
30
30
|
CREATE_BILLING_PORTAL = "stripe/create-billing-portal",
|
|
31
31
|
CREATE_CHECKOUT_SESSION = "stripe/create-checkout-session",
|
|
32
|
+
REGISTER_ONBOARDING = "user/register-onboarding",
|
|
32
33
|
UPDATE_USER = "user/update-user",
|
|
33
34
|
GET_CURRENT_USER = "user/get-current-user",
|
|
34
35
|
}
|
package/src/enum/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
GetUserRequest,
|
|
22
22
|
HandleLikeSeenRequest,
|
|
23
23
|
HandleMatchSeenRequest,
|
|
24
|
+
RegisterOnboardingRequest,
|
|
24
25
|
RegisterUserRequest,
|
|
25
26
|
RemoveMatchRequest,
|
|
26
27
|
SendMessageRequest,
|
|
@@ -53,6 +54,7 @@ import {
|
|
|
53
54
|
GetUserResponse,
|
|
54
55
|
HandleLikeSeenResponse,
|
|
55
56
|
HandleMatchSeenResponse,
|
|
57
|
+
RegisterOnboardingResponse,
|
|
56
58
|
RegisterUserResponse,
|
|
57
59
|
RemoveMatchResponse,
|
|
58
60
|
SendMessageResponse,
|
|
@@ -193,6 +195,10 @@ export type CloudFunctionTypes = {
|
|
|
193
195
|
response: CreateCheckoutSessionResponse;
|
|
194
196
|
};
|
|
195
197
|
// User
|
|
198
|
+
[CloudFunction.REGISTER_ONBOARDING]: {
|
|
199
|
+
payload: RegisterOnboardingRequest;
|
|
200
|
+
response: RegisterOnboardingResponse;
|
|
201
|
+
};
|
|
196
202
|
[CloudFunction.UPDATE_USER]: {
|
|
197
203
|
payload: UpdateUserRequest;
|
|
198
204
|
response: UpdateUserResponse;
|
package/src/types/index.ts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
import { FeedbackAgreement, LikeType, ReportReason } from "../enum";
|
|
1
|
+
import { FeedbackAgreement, Gender, LikeType, ReportReason } from "../enum";
|
|
2
|
+
import { DeepPartial } from "./helper.types";
|
|
2
3
|
import { Answer } from "./submission.types";
|
|
4
|
+
import {
|
|
5
|
+
DatingPreferences,
|
|
6
|
+
UserNotifications,
|
|
7
|
+
UserProfile,
|
|
8
|
+
} from "./user.types";
|
|
9
|
+
|
|
10
|
+
// auth
|
|
11
|
+
export type RegisterUserRequest = {
|
|
12
|
+
email: string;
|
|
13
|
+
password: string;
|
|
14
|
+
referrerId?: string;
|
|
15
|
+
};
|
|
3
16
|
|
|
4
17
|
// assessment
|
|
5
18
|
export type CreateAssessmentRequest = { intimateTopics: boolean };
|
|
@@ -83,13 +96,24 @@ export type CreateCheckoutSessionRequest = {
|
|
|
83
96
|
};
|
|
84
97
|
|
|
85
98
|
// user
|
|
86
|
-
export type
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
99
|
+
export type RegisterOnboardingRequest = {
|
|
100
|
+
firstName: string;
|
|
101
|
+
state: string;
|
|
102
|
+
birth: Date;
|
|
103
|
+
images: string[];
|
|
104
|
+
interestedIn: Gender[];
|
|
105
|
+
gender: Gender;
|
|
106
|
+
coordinates: {
|
|
107
|
+
lat: number;
|
|
108
|
+
lng: number;
|
|
109
|
+
};
|
|
90
110
|
};
|
|
91
111
|
export type GetUserRequest = undefined;
|
|
92
|
-
export type UpdateUserRequest =
|
|
112
|
+
export type UpdateUserRequest = {
|
|
113
|
+
profile?: DeepPartial<UserProfile>;
|
|
114
|
+
preferences?: DeepPartial<DatingPreferences>;
|
|
115
|
+
notifications?: DeepPartial<UserNotifications>;
|
|
116
|
+
};
|
|
93
117
|
|
|
94
118
|
// storage
|
|
95
119
|
export type AddImagesRequest = { images: string[] };
|
|
@@ -6,6 +6,12 @@ import { StripeProduct } from "./stripe.types";
|
|
|
6
6
|
import { User } from "./user.types";
|
|
7
7
|
import { Like } from "./like.types";
|
|
8
8
|
|
|
9
|
+
// auth
|
|
10
|
+
export type RegisterUserResponse = {
|
|
11
|
+
success: boolean;
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
9
15
|
// assessment
|
|
10
16
|
export type CreateAssessmentResponse = Assessment;
|
|
11
17
|
export type GetAssessmentResponse = Assessment;
|
|
@@ -65,10 +71,7 @@ export type CreateCheckoutSessionResponse = { url: string };
|
|
|
65
71
|
export type GetProductsResponse = StripeProduct[];
|
|
66
72
|
|
|
67
73
|
// user
|
|
68
|
-
export type
|
|
69
|
-
success: boolean;
|
|
70
|
-
message: string;
|
|
71
|
-
};
|
|
74
|
+
export type RegisterOnboardingResponse = User;
|
|
72
75
|
export type GetUserResponse = User;
|
|
73
76
|
export type UpdateUserResponse = User;
|
|
74
77
|
|
package/src/types/user.types.ts
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { Gender } from "../enum";
|
|
1
|
+
import { Gender, NotificationSetting } from "../enum";
|
|
2
2
|
|
|
3
3
|
export type User = {
|
|
4
4
|
id: string;
|
|
5
5
|
email: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
profile:
|
|
6
|
+
created: Date;
|
|
7
|
+
permissions: UserPermissions;
|
|
8
|
+
profile: UserProfile;
|
|
9
9
|
preferences: DatingPreferences;
|
|
10
10
|
notifications: UserNotifications;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export type
|
|
13
|
+
export type UserPermissions = {
|
|
14
|
+
registrationReferralAllowed: boolean;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type UserProfile = {
|
|
14
18
|
intro: string;
|
|
15
19
|
firstName: string;
|
|
16
20
|
state: string;
|
|
@@ -29,12 +33,10 @@ export type Profile = {
|
|
|
29
33
|
|
|
30
34
|
export type NotificationSettings = {
|
|
31
35
|
enabled: boolean;
|
|
32
|
-
settings: Record<
|
|
36
|
+
settings: Record<NotificationSetting, boolean>;
|
|
33
37
|
};
|
|
34
38
|
|
|
35
39
|
export type UserNotifications = {
|
|
36
|
-
pushNotificationsEnabled: boolean;
|
|
37
|
-
emailNotificationsEnabled: boolean;
|
|
38
40
|
pushNotificationSettings: NotificationSettings;
|
|
39
41
|
emailNotificationSettings: NotificationSettings;
|
|
40
42
|
};
|