heartraite 1.0.3 → 1.0.5
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/constants/index.d.ts +1 -0
- package/dist/constants/index.js +17 -0
- package/dist/constants/user.constants.d.ts +3 -0
- package/dist/constants/user.constants.js +6 -0
- package/dist/enum/cloudfunction.enum.d.ts +1 -0
- package/dist/enum/cloudfunction.enum.js +1 -0
- package/dist/enum/index.d.ts +2 -0
- package/dist/enum/index.js +2 -0
- package/dist/enum/notification.enum.d.ts +5 -0
- package/dist/enum/notification.enum.js +9 -0
- package/dist/enum/state.enum.d.ts +26 -0
- package/dist/enum/state.enum.js +30 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/types/cloud-function-types.d.ts +6 -2
- package/dist/types/request.types.d.ts +17 -5
- package/dist/types/response.types.d.ts +5 -4
- package/dist/types/user.types.d.ts +7 -6
- package/package.json +1 -1
- package/src/constants/index.ts +1 -0
- package/src/constants/user.constants.ts +5 -0
- package/src/enum/cloudfunction.enum.ts +1 -0
- package/src/enum/index.ts +2 -0
- package/src/enum/notification.enum.ts +5 -0
- package/src/enum/state.enum.ts +26 -0
- package/src/index.ts +1 -0
- package/src/types/cloud-function-types.ts +6 -0
- package/src/types/request.types.ts +19 -5
- package/src/types/response.types.ts +7 -4
- package/src/types/user.types.ts +8 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./user.constants";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./user.constants"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GENDERS = exports.SWEDISH_STATES = void 0;
|
|
4
|
+
const enum_1 = require("../enum");
|
|
5
|
+
exports.SWEDISH_STATES = Object.values(enum_1.SwedishState);
|
|
6
|
+
exports.GENDERS = [enum_1.Gender.MALE, enum_1.Gender.FEMALE];
|
|
@@ -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
|
@@ -23,3 +23,5 @@ __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
|
+
__exportStar(require("./state.enum"), exports);
|
|
27
|
+
__exportStar(require("./notification.enum"), exports);
|
|
@@ -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 = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum SwedishState {
|
|
2
|
+
BLEKINGE = "blekinge",
|
|
3
|
+
DALARNA = "dalarna",
|
|
4
|
+
GOTLAND = "gotland",
|
|
5
|
+
GAVLEBORG = "gavleborg",
|
|
6
|
+
GOTEBORG = "goteborg",
|
|
7
|
+
HALLAND = "halland",
|
|
8
|
+
JAMTLAND = "jamtland",
|
|
9
|
+
JONKOPING = "jonkoping",
|
|
10
|
+
KALMAR = "kalmar",
|
|
11
|
+
KRONOBERG = "kronoberg",
|
|
12
|
+
NORRBOTTEN = "norrbotten",
|
|
13
|
+
SKARABORG = "skaraborg",
|
|
14
|
+
SKANE = "skane",
|
|
15
|
+
STOCKHOLM = "stockholm",
|
|
16
|
+
SODERMANLAND = "sodermanland",
|
|
17
|
+
UPPSALA = "uppsala",
|
|
18
|
+
VARMLAND = "varmland",
|
|
19
|
+
VASTERBOTTEN = "vasterbotten",
|
|
20
|
+
VASTERNORRLAND = "vasternorrland",
|
|
21
|
+
VASTMANLAND = "vastmanland",
|
|
22
|
+
ALVSBORG = "alvsborg",
|
|
23
|
+
OREBRO = "orebro",
|
|
24
|
+
OSTERGOTLAND = "ostergotland",
|
|
25
|
+
ÖLAND = "oland"
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SwedishState = void 0;
|
|
4
|
+
var SwedishState;
|
|
5
|
+
(function (SwedishState) {
|
|
6
|
+
SwedishState["BLEKINGE"] = "blekinge";
|
|
7
|
+
SwedishState["DALARNA"] = "dalarna";
|
|
8
|
+
SwedishState["GOTLAND"] = "gotland";
|
|
9
|
+
SwedishState["GAVLEBORG"] = "gavleborg";
|
|
10
|
+
SwedishState["GOTEBORG"] = "goteborg";
|
|
11
|
+
SwedishState["HALLAND"] = "halland";
|
|
12
|
+
SwedishState["JAMTLAND"] = "jamtland";
|
|
13
|
+
SwedishState["JONKOPING"] = "jonkoping";
|
|
14
|
+
SwedishState["KALMAR"] = "kalmar";
|
|
15
|
+
SwedishState["KRONOBERG"] = "kronoberg";
|
|
16
|
+
SwedishState["NORRBOTTEN"] = "norrbotten";
|
|
17
|
+
SwedishState["SKARABORG"] = "skaraborg";
|
|
18
|
+
SwedishState["SKANE"] = "skane";
|
|
19
|
+
SwedishState["STOCKHOLM"] = "stockholm";
|
|
20
|
+
SwedishState["SODERMANLAND"] = "sodermanland";
|
|
21
|
+
SwedishState["UPPSALA"] = "uppsala";
|
|
22
|
+
SwedishState["VARMLAND"] = "varmland";
|
|
23
|
+
SwedishState["VASTERBOTTEN"] = "vasterbotten";
|
|
24
|
+
SwedishState["VASTERNORRLAND"] = "vasternorrland";
|
|
25
|
+
SwedishState["VASTMANLAND"] = "vastmanland";
|
|
26
|
+
SwedishState["ALVSBORG"] = "alvsborg";
|
|
27
|
+
SwedishState["OREBRO"] = "orebro";
|
|
28
|
+
SwedishState["OSTERGOTLAND"] = "ostergotland";
|
|
29
|
+
SwedishState["\u00D6LAND"] = "oland";
|
|
30
|
+
})(SwedishState || (exports.SwedishState = SwedishState = {}));
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ 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("./constants"), exports);
|
|
17
18
|
__exportStar(require("./enum"), exports);
|
|
18
19
|
__exportStar(require("./firebase"), exports);
|
|
19
20
|
__exportStar(require("./types"), exports);
|
|
@@ -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;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { FeedbackAgreement, LikeType, ReportReason } from "../enum";
|
|
1
|
+
import { FeedbackAgreement, Gender, LikeType, ReportReason } from "../enum";
|
|
2
2
|
import { Answer } from "./submission.types";
|
|
3
|
+
export type RegisterUserRequest = {
|
|
4
|
+
email: string;
|
|
5
|
+
password: string;
|
|
6
|
+
referrerId?: string;
|
|
7
|
+
};
|
|
3
8
|
export type CreateAssessmentRequest = {
|
|
4
9
|
intimateTopics: boolean;
|
|
5
10
|
};
|
|
@@ -87,10 +92,17 @@ export type CreateReportRequest = {
|
|
|
87
92
|
export type CreateCheckoutSessionRequest = {
|
|
88
93
|
priceId: string;
|
|
89
94
|
};
|
|
90
|
-
export type
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
export type RegisterOnboardingRequest = {
|
|
96
|
+
firstName: string;
|
|
97
|
+
state: string;
|
|
98
|
+
birth: Date;
|
|
99
|
+
images: string[];
|
|
100
|
+
interestedIn: Gender[];
|
|
101
|
+
gender: Gender;
|
|
102
|
+
coordinates: {
|
|
103
|
+
lat: number;
|
|
104
|
+
lng: number;
|
|
105
|
+
};
|
|
94
106
|
};
|
|
95
107
|
export type GetUserRequest = undefined;
|
|
96
108
|
export type UpdateUserRequest = Partial<any>;
|
|
@@ -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,13 +1,16 @@
|
|
|
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
|
-
|
|
5
|
+
created: Date;
|
|
6
|
+
permissions: UserPermissions;
|
|
7
7
|
profile: Profile;
|
|
8
8
|
preferences: DatingPreferences;
|
|
9
9
|
notifications: UserNotifications;
|
|
10
10
|
};
|
|
11
|
+
export type UserPermissions = {
|
|
12
|
+
registrationReferralAllowed: boolean;
|
|
13
|
+
};
|
|
11
14
|
export type Profile = {
|
|
12
15
|
intro: string;
|
|
13
16
|
firstName: 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./user.constants";
|
|
@@ -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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export enum SwedishState {
|
|
2
|
+
BLEKINGE = "blekinge",
|
|
3
|
+
DALARNA = "dalarna",
|
|
4
|
+
GOTLAND = "gotland",
|
|
5
|
+
GAVLEBORG = "gavleborg",
|
|
6
|
+
GOTEBORG = "goteborg",
|
|
7
|
+
HALLAND = "halland",
|
|
8
|
+
JAMTLAND = "jamtland",
|
|
9
|
+
JONKOPING = "jonkoping",
|
|
10
|
+
KALMAR = "kalmar",
|
|
11
|
+
KRONOBERG = "kronoberg",
|
|
12
|
+
NORRBOTTEN = "norrbotten",
|
|
13
|
+
SKARABORG = "skaraborg",
|
|
14
|
+
SKANE = "skane",
|
|
15
|
+
STOCKHOLM = "stockholm",
|
|
16
|
+
SODERMANLAND = "sodermanland",
|
|
17
|
+
UPPSALA = "uppsala",
|
|
18
|
+
VARMLAND = "varmland",
|
|
19
|
+
VASTERBOTTEN = "vasterbotten",
|
|
20
|
+
VASTERNORRLAND = "vasternorrland",
|
|
21
|
+
VASTMANLAND = "vastmanland",
|
|
22
|
+
ALVSBORG = "alvsborg",
|
|
23
|
+
OREBRO = "orebro",
|
|
24
|
+
OSTERGOTLAND = "ostergotland",
|
|
25
|
+
ÖLAND = "oland",
|
|
26
|
+
}
|
package/src/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;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { FeedbackAgreement, LikeType, ReportReason } from "../enum";
|
|
1
|
+
import { FeedbackAgreement, Gender, LikeType, ReportReason } from "../enum";
|
|
2
2
|
import { Answer } from "./submission.types";
|
|
3
3
|
|
|
4
|
+
// auth
|
|
5
|
+
export type RegisterUserRequest = {
|
|
6
|
+
email: string;
|
|
7
|
+
password: string;
|
|
8
|
+
referrerId?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
4
11
|
// assessment
|
|
5
12
|
export type CreateAssessmentRequest = { intimateTopics: boolean };
|
|
6
13
|
export type GetAssessmentRequest = { id: string };
|
|
@@ -83,10 +90,17 @@ export type CreateCheckoutSessionRequest = {
|
|
|
83
90
|
};
|
|
84
91
|
|
|
85
92
|
// user
|
|
86
|
-
export type
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
93
|
+
export type RegisterOnboardingRequest = {
|
|
94
|
+
firstName: string;
|
|
95
|
+
state: string;
|
|
96
|
+
birth: Date;
|
|
97
|
+
images: string[];
|
|
98
|
+
interestedIn: Gender[];
|
|
99
|
+
gender: Gender;
|
|
100
|
+
coordinates: {
|
|
101
|
+
lat: number;
|
|
102
|
+
lng: number;
|
|
103
|
+
};
|
|
90
104
|
};
|
|
91
105
|
export type GetUserRequest = undefined;
|
|
92
106
|
export type UpdateUserRequest = Partial<any>; // TODO; fix typing
|
|
@@ -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,15 +1,19 @@
|
|
|
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
|
-
|
|
6
|
+
created: Date;
|
|
7
|
+
permissions: UserPermissions;
|
|
8
8
|
profile: Profile;
|
|
9
9
|
preferences: DatingPreferences;
|
|
10
10
|
notifications: UserNotifications;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
export type UserPermissions = {
|
|
14
|
+
registrationReferralAllowed: boolean;
|
|
15
|
+
};
|
|
16
|
+
|
|
13
17
|
export type Profile = {
|
|
14
18
|
intro: string;
|
|
15
19
|
firstName: 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
|
};
|