heartraite 1.0.1 → 1.0.2
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/ai-verification-status.enum.d.ts +6 -0
- package/dist/enum/ai-verification-status.enum.js +10 -0
- package/dist/enum/app-route.enum.d.ts +30 -0
- package/dist/enum/app-route.enum.js +34 -0
- package/dist/enum/cloudfunction.enum.d.ts +34 -0
- package/dist/enum/cloudfunction.enum.js +38 -0
- package/dist/enum/evaluation.enum.d.ts +6 -0
- package/dist/enum/evaluation.enum.js +10 -0
- package/dist/enum/gender.enum.d.ts +4 -0
- package/dist/enum/gender.enum.js +8 -0
- package/dist/enum/index.d.ts +8 -0
- package/dist/enum/index.js +24 -0
- package/dist/enum/like.enum.d.ts +6 -0
- package/dist/enum/like.enum.js +10 -0
- package/dist/enum/match.enum.d.ts +6 -0
- package/dist/enum/match.enum.js +10 -0
- package/dist/enum/report.enum.d.ts +11 -0
- package/dist/enum/report.enum.js +16 -0
- package/dist/firebase/function.caller.d.ts +9 -0
- package/dist/firebase/function.caller.js +11 -0
- package/dist/firebase/index.d.ts +1 -0
- package/dist/firebase/index.js +17 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -0
- package/dist/types/assessment.types.d.ts +11 -0
- package/dist/types/assessment.types.js +2 -0
- package/dist/types/cloud-function-types.d.ts +129 -0
- package/dist/types/cloud-function-types.js +3 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.js +28 -0
- package/dist/types/like.types.d.ts +8 -0
- package/dist/types/like.types.js +2 -0
- package/dist/types/match.types.d.ts +68 -0
- package/dist/types/match.types.js +2 -0
- package/dist/types/message.types.d.ts +9 -0
- package/dist/types/message.types.js +2 -0
- package/dist/types/pls.types.d.ts +8 -0
- package/dist/types/pls.types.js +2 -0
- package/dist/types/rating.types.d.ts +1 -0
- package/dist/types/rating.types.js +2 -0
- package/dist/types/report.types.d.ts +11 -0
- package/dist/types/report.types.js +2 -0
- package/dist/types/request.types.d.ts +103 -0
- package/dist/types/request.types.js +2 -0
- package/dist/types/response.types.d.ts +64 -0
- package/dist/types/response.types.js +2 -0
- package/dist/types/stripe.types.d.ts +8 -0
- package/dist/types/stripe.types.js +2 -0
- package/dist/types/submission.types.d.ts +27 -0
- package/dist/types/submission.types.js +2 -0
- package/dist/types/user.types.d.ts +53 -0
- package/dist/types/user.types.js +64 -0
- package/package.json +5 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AiVerificationStatus = void 0;
|
|
4
|
+
var AiVerificationStatus;
|
|
5
|
+
(function (AiVerificationStatus) {
|
|
6
|
+
AiVerificationStatus["PENDING"] = "pending";
|
|
7
|
+
AiVerificationStatus["ERROR"] = "error";
|
|
8
|
+
AiVerificationStatus["SUCCESS"] = "success";
|
|
9
|
+
AiVerificationStatus["ACTION_REQUIRED"] = "action required";
|
|
10
|
+
})(AiVerificationStatus || (exports.AiVerificationStatus = AiVerificationStatus = {}));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare enum AppRoute {
|
|
2
|
+
START = "start",
|
|
3
|
+
LOGIN = "login",
|
|
4
|
+
REGISTER = "register",
|
|
5
|
+
DISCOVER = "discover",
|
|
6
|
+
PROFILE = "profile",
|
|
7
|
+
MATCH = "match",
|
|
8
|
+
MESSAGES = "messages",
|
|
9
|
+
MATCHES = "matches",
|
|
10
|
+
SETTINGS = "settings",
|
|
11
|
+
ACOUNT_SETTINGS = "account_settings",
|
|
12
|
+
MATCH_SETTINGS = "match_settings",
|
|
13
|
+
MEMBERSHIP = "membership",
|
|
14
|
+
USER_PROFILE = "user_profile",
|
|
15
|
+
BLOG = "blog",
|
|
16
|
+
QUESTIONS = "questions",
|
|
17
|
+
CHAT = "chat",
|
|
18
|
+
SUBSCRIPTIONS = "membership",
|
|
19
|
+
NOTIFICATIONS = "notifications",
|
|
20
|
+
QUESTION = "question",
|
|
21
|
+
IMAGES = "images",
|
|
22
|
+
IMAGES_MODAL = "image_modal",
|
|
23
|
+
ADVANCED_MATCH = "advanced_match",
|
|
24
|
+
SUPPORT = "common_questions",
|
|
25
|
+
IMAGE_MODAL_REGISTRATION = "image_modal_registration",
|
|
26
|
+
GENERAL = "general",
|
|
27
|
+
MATCH_SCANNER = "match_scanner",
|
|
28
|
+
MATCH_CHECK = "match_check",
|
|
29
|
+
PROFILE_INPUT = "profile_input"
|
|
30
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppRoute = void 0;
|
|
4
|
+
var AppRoute;
|
|
5
|
+
(function (AppRoute) {
|
|
6
|
+
AppRoute["START"] = "start";
|
|
7
|
+
AppRoute["LOGIN"] = "login";
|
|
8
|
+
AppRoute["REGISTER"] = "register";
|
|
9
|
+
AppRoute["DISCOVER"] = "discover";
|
|
10
|
+
AppRoute["PROFILE"] = "profile";
|
|
11
|
+
AppRoute["MATCH"] = "match";
|
|
12
|
+
AppRoute["MESSAGES"] = "messages";
|
|
13
|
+
AppRoute["MATCHES"] = "matches";
|
|
14
|
+
AppRoute["SETTINGS"] = "settings";
|
|
15
|
+
AppRoute["ACOUNT_SETTINGS"] = "account_settings";
|
|
16
|
+
AppRoute["MATCH_SETTINGS"] = "match_settings";
|
|
17
|
+
AppRoute["MEMBERSHIP"] = "membership";
|
|
18
|
+
AppRoute["USER_PROFILE"] = "user_profile";
|
|
19
|
+
AppRoute["BLOG"] = "blog";
|
|
20
|
+
AppRoute["QUESTIONS"] = "questions";
|
|
21
|
+
AppRoute["CHAT"] = "chat";
|
|
22
|
+
AppRoute["SUBSCRIPTIONS"] = "membership";
|
|
23
|
+
AppRoute["NOTIFICATIONS"] = "notifications";
|
|
24
|
+
AppRoute["QUESTION"] = "question";
|
|
25
|
+
AppRoute["IMAGES"] = "images";
|
|
26
|
+
AppRoute["IMAGES_MODAL"] = "image_modal";
|
|
27
|
+
AppRoute["ADVANCED_MATCH"] = "advanced_match";
|
|
28
|
+
AppRoute["SUPPORT"] = "common_questions";
|
|
29
|
+
AppRoute["IMAGE_MODAL_REGISTRATION"] = "image_modal_registration";
|
|
30
|
+
AppRoute["GENERAL"] = "general";
|
|
31
|
+
AppRoute["MATCH_SCANNER"] = "match_scanner";
|
|
32
|
+
AppRoute["MATCH_CHECK"] = "match_check";
|
|
33
|
+
AppRoute["PROFILE_INPUT"] = "profile_input";
|
|
34
|
+
})(AppRoute || (exports.AppRoute = AppRoute = {}));
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare enum CloudFunction {
|
|
2
|
+
CREATE_ASSESSMENT = "assessment/create-assessment",
|
|
3
|
+
GET_ASSESSMENT = "assessment/get-assessment",
|
|
4
|
+
GET_ASSESSMENTS = "assessment/get-assessments",
|
|
5
|
+
CREATE_SUBMISSION = "assessment/create-submission",
|
|
6
|
+
GET_SUBMISSION = "assessment/get-submission",
|
|
7
|
+
UPDATE_ANSWER = "assessment/update-answer",
|
|
8
|
+
SUBMIT_CATEGORY_FEEDBACK = "assessment/submit-category-feedback",
|
|
9
|
+
AUTHENTICATE_BANKID = "bankid/authenticate",
|
|
10
|
+
COLLECT_BANKID = "bankid/collect",
|
|
11
|
+
CREATE_LIKE = "like/create-like",
|
|
12
|
+
GET_LIKES = "like/get-likes",
|
|
13
|
+
HANDLE_LIKE_SEEN = "like/handle-like-seen",
|
|
14
|
+
GET_MATCH = "match/get-match",
|
|
15
|
+
HANDLE_MATCH_SEEN = "match/handle-match-seen",
|
|
16
|
+
GET_MATCHES = "match/get-matches",
|
|
17
|
+
GET_MATCH_CHECK = "match/get-match-check",
|
|
18
|
+
REMOVE_MATCH = "match/remove-match",
|
|
19
|
+
GET_MATCHABLE_USER = "match/get-matchable-user",
|
|
20
|
+
GET_MATCHABLE_USERS = "match/get-matchable-users",
|
|
21
|
+
SEND_MESSAGE = "message/send-message",
|
|
22
|
+
GET_MESSAGES = "message/get-messages",
|
|
23
|
+
CREATE_PLS = "pls/create-pls",
|
|
24
|
+
UPDATE_QUESTIONS = "rating/update-quesitons",
|
|
25
|
+
CREATE_REPORT = "report/create-report",
|
|
26
|
+
ADD_IMAGES = "storage/add-images",
|
|
27
|
+
GET_PRODUCTS = "stripe/get-products",
|
|
28
|
+
STRIPE_WEBWOOK = "stripe/webhook",
|
|
29
|
+
CREATE_BILLING_PORTAL = "stripe/create-billing-portal",
|
|
30
|
+
CREATE_CHECKOUT_SESSION = "stripe/create-checkout-session",
|
|
31
|
+
REGISTER_USER = "user/register-user",
|
|
32
|
+
UPDATE_USER = "user/update-user",
|
|
33
|
+
GET_CURRENT_USER = "user/get-current-user"
|
|
34
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CloudFunction = void 0;
|
|
4
|
+
var CloudFunction;
|
|
5
|
+
(function (CloudFunction) {
|
|
6
|
+
CloudFunction["CREATE_ASSESSMENT"] = "assessment/create-assessment";
|
|
7
|
+
CloudFunction["GET_ASSESSMENT"] = "assessment/get-assessment";
|
|
8
|
+
CloudFunction["GET_ASSESSMENTS"] = "assessment/get-assessments";
|
|
9
|
+
CloudFunction["CREATE_SUBMISSION"] = "assessment/create-submission";
|
|
10
|
+
CloudFunction["GET_SUBMISSION"] = "assessment/get-submission";
|
|
11
|
+
CloudFunction["UPDATE_ANSWER"] = "assessment/update-answer";
|
|
12
|
+
CloudFunction["SUBMIT_CATEGORY_FEEDBACK"] = "assessment/submit-category-feedback";
|
|
13
|
+
CloudFunction["AUTHENTICATE_BANKID"] = "bankid/authenticate";
|
|
14
|
+
CloudFunction["COLLECT_BANKID"] = "bankid/collect";
|
|
15
|
+
CloudFunction["CREATE_LIKE"] = "like/create-like";
|
|
16
|
+
CloudFunction["GET_LIKES"] = "like/get-likes";
|
|
17
|
+
CloudFunction["HANDLE_LIKE_SEEN"] = "like/handle-like-seen";
|
|
18
|
+
CloudFunction["GET_MATCH"] = "match/get-match";
|
|
19
|
+
CloudFunction["HANDLE_MATCH_SEEN"] = "match/handle-match-seen";
|
|
20
|
+
CloudFunction["GET_MATCHES"] = "match/get-matches";
|
|
21
|
+
CloudFunction["GET_MATCH_CHECK"] = "match/get-match-check";
|
|
22
|
+
CloudFunction["REMOVE_MATCH"] = "match/remove-match";
|
|
23
|
+
CloudFunction["GET_MATCHABLE_USER"] = "match/get-matchable-user";
|
|
24
|
+
CloudFunction["GET_MATCHABLE_USERS"] = "match/get-matchable-users";
|
|
25
|
+
CloudFunction["SEND_MESSAGE"] = "message/send-message";
|
|
26
|
+
CloudFunction["GET_MESSAGES"] = "message/get-messages";
|
|
27
|
+
CloudFunction["CREATE_PLS"] = "pls/create-pls";
|
|
28
|
+
CloudFunction["UPDATE_QUESTIONS"] = "rating/update-quesitons";
|
|
29
|
+
CloudFunction["CREATE_REPORT"] = "report/create-report";
|
|
30
|
+
CloudFunction["ADD_IMAGES"] = "storage/add-images";
|
|
31
|
+
CloudFunction["GET_PRODUCTS"] = "stripe/get-products";
|
|
32
|
+
CloudFunction["STRIPE_WEBWOOK"] = "stripe/webhook";
|
|
33
|
+
CloudFunction["CREATE_BILLING_PORTAL"] = "stripe/create-billing-portal";
|
|
34
|
+
CloudFunction["CREATE_CHECKOUT_SESSION"] = "stripe/create-checkout-session";
|
|
35
|
+
CloudFunction["REGISTER_USER"] = "user/register-user";
|
|
36
|
+
CloudFunction["UPDATE_USER"] = "user/update-user";
|
|
37
|
+
CloudFunction["GET_CURRENT_USER"] = "user/get-current-user";
|
|
38
|
+
})(CloudFunction || (exports.CloudFunction = CloudFunction = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FeedbackAgreement = void 0;
|
|
4
|
+
var FeedbackAgreement;
|
|
5
|
+
(function (FeedbackAgreement) {
|
|
6
|
+
FeedbackAgreement["YES"] = "yes";
|
|
7
|
+
FeedbackAgreement["NO"] = "no";
|
|
8
|
+
FeedbackAgreement["PARTIAL"] = "partial";
|
|
9
|
+
FeedbackAgreement["UNKNOWN"] = "unknown";
|
|
10
|
+
})(FeedbackAgreement || (exports.FeedbackAgreement = FeedbackAgreement = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./cloudfunction.enum";
|
|
2
|
+
export * from "./like.enum";
|
|
3
|
+
export * from "./match.enum";
|
|
4
|
+
export * from "./app-route.enum";
|
|
5
|
+
export * from "./ai-verification-status.enum";
|
|
6
|
+
export * from "./evaluation.enum";
|
|
7
|
+
export * from "./report.enum";
|
|
8
|
+
export * from "./gender.enum";
|
|
@@ -0,0 +1,24 @@
|
|
|
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("./cloudfunction.enum"), exports);
|
|
18
|
+
__exportStar(require("./like.enum"), exports);
|
|
19
|
+
__exportStar(require("./match.enum"), exports);
|
|
20
|
+
__exportStar(require("./app-route.enum"), exports);
|
|
21
|
+
__exportStar(require("./ai-verification-status.enum"), exports);
|
|
22
|
+
__exportStar(require("./evaluation.enum"), exports);
|
|
23
|
+
__exportStar(require("./report.enum"), exports);
|
|
24
|
+
__exportStar(require("./gender.enum"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LikeType = void 0;
|
|
4
|
+
var LikeType;
|
|
5
|
+
(function (LikeType) {
|
|
6
|
+
LikeType["LIKE"] = "like";
|
|
7
|
+
LikeType["DISLIKE"] = "dislike";
|
|
8
|
+
LikeType["PULSE"] = "pulse";
|
|
9
|
+
LikeType["REVERTED"] = "reverted";
|
|
10
|
+
})(LikeType || (exports.LikeType = LikeType = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdvancedMatchStatus = void 0;
|
|
4
|
+
var AdvancedMatchStatus;
|
|
5
|
+
(function (AdvancedMatchStatus) {
|
|
6
|
+
AdvancedMatchStatus["INITIAL"] = "initial";
|
|
7
|
+
AdvancedMatchStatus["LOADING"] = "loading";
|
|
8
|
+
AdvancedMatchStatus["ERROR"] = "error";
|
|
9
|
+
AdvancedMatchStatus["SUCCESS"] = "success";
|
|
10
|
+
})(AdvancedMatchStatus || (exports.AdvancedMatchStatus = AdvancedMatchStatus = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum ReportReason {
|
|
2
|
+
OFFENSIVE_CONTENT = "offensive_content",
|
|
3
|
+
FAKE_PROFILE = "fake_profile",
|
|
4
|
+
INAPPROPRIATE_MESSAGES = "inappropriate_messages",
|
|
5
|
+
UNDER_AGED = "underaged",
|
|
6
|
+
OTHER = "other"
|
|
7
|
+
}
|
|
8
|
+
export declare enum ReportStatus {
|
|
9
|
+
UNRESOLVED = "unresolved",
|
|
10
|
+
RESOLVED = "resolved"
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReportStatus = exports.ReportReason = void 0;
|
|
4
|
+
var ReportReason;
|
|
5
|
+
(function (ReportReason) {
|
|
6
|
+
ReportReason["OFFENSIVE_CONTENT"] = "offensive_content";
|
|
7
|
+
ReportReason["FAKE_PROFILE"] = "fake_profile";
|
|
8
|
+
ReportReason["INAPPROPRIATE_MESSAGES"] = "inappropriate_messages";
|
|
9
|
+
ReportReason["UNDER_AGED"] = "underaged";
|
|
10
|
+
ReportReason["OTHER"] = "other";
|
|
11
|
+
})(ReportReason || (exports.ReportReason = ReportReason = {}));
|
|
12
|
+
var ReportStatus;
|
|
13
|
+
(function (ReportStatus) {
|
|
14
|
+
ReportStatus["UNRESOLVED"] = "unresolved";
|
|
15
|
+
ReportStatus["RESOLVED"] = "resolved";
|
|
16
|
+
})(ReportStatus || (exports.ReportStatus = ReportStatus = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Functions } from "firebase/functions";
|
|
2
|
+
import { CloudFunctionTypes } from "../types";
|
|
3
|
+
interface Params<T extends keyof CloudFunctionTypes> {
|
|
4
|
+
functionName: T;
|
|
5
|
+
functions: Functions;
|
|
6
|
+
payload?: CloudFunctionTypes[T]["payload"];
|
|
7
|
+
}
|
|
8
|
+
export declare const callCloudFunction: <T extends keyof CloudFunctionTypes>({ payload, functions, functionName, }: Params<T>) => Promise<CloudFunctionTypes[T]["response"]>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.callCloudFunction = void 0;
|
|
4
|
+
const functions_1 = require("firebase/functions");
|
|
5
|
+
// Generic function to call any Firebase Cloud Function
|
|
6
|
+
const callCloudFunction = async ({ payload, functions, functionName, }) => {
|
|
7
|
+
const fn = (0, functions_1.httpsCallable)(functions, functionName);
|
|
8
|
+
const res = payload ? await fn(payload) : await fn();
|
|
9
|
+
return res.data;
|
|
10
|
+
};
|
|
11
|
+
exports.callCloudFunction = callCloudFunction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./function.caller";
|
|
@@ -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("./function.caller"), exports);
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
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("./enum"), exports);
|
|
18
|
+
__exportStar(require("./firebase"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Submission } from "./submission.types";
|
|
2
|
+
export type Assessment = {
|
|
3
|
+
id: string;
|
|
4
|
+
created: string;
|
|
5
|
+
createdBy: string;
|
|
6
|
+
intimateTopics: boolean;
|
|
7
|
+
version: string;
|
|
8
|
+
};
|
|
9
|
+
export type FullAssessment = Assessment & {
|
|
10
|
+
submissions: Submission[];
|
|
11
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
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";
|
|
4
|
+
export type CloudFunctionTypes = {
|
|
5
|
+
[CloudFunction.CREATE_ASSESSMENT]: {
|
|
6
|
+
payload: CreateAssessmentRequest;
|
|
7
|
+
response: CreateAssessmentResponse;
|
|
8
|
+
};
|
|
9
|
+
[CloudFunction.GET_ASSESSMENT]: {
|
|
10
|
+
payload: GetAssessmentRequest;
|
|
11
|
+
response: GetAssessmentResponse;
|
|
12
|
+
};
|
|
13
|
+
[CloudFunction.GET_ASSESSMENTS]: {
|
|
14
|
+
payload?: undefined;
|
|
15
|
+
response: GetAssessmentsResponse;
|
|
16
|
+
};
|
|
17
|
+
[CloudFunction.CREATE_SUBMISSION]: {
|
|
18
|
+
payload: CreateSubmissionRequest;
|
|
19
|
+
response: CreateSubmissionResponse;
|
|
20
|
+
};
|
|
21
|
+
[CloudFunction.GET_SUBMISSION]: {
|
|
22
|
+
payload: GetSubmissionRequest;
|
|
23
|
+
response: GetSubmissionResponse;
|
|
24
|
+
};
|
|
25
|
+
[CloudFunction.UPDATE_ANSWER]: {
|
|
26
|
+
payload: UpdateAnswerRequest;
|
|
27
|
+
response: UpdateAnswerResponse;
|
|
28
|
+
};
|
|
29
|
+
[CloudFunction.SUBMIT_CATEGORY_FEEDBACK]: {
|
|
30
|
+
payload: SubmitCategoryFeedbackRequest;
|
|
31
|
+
response: SubmitCategoryFeedbackResponse;
|
|
32
|
+
};
|
|
33
|
+
[CloudFunction.AUTHENTICATE_BANKID]: {
|
|
34
|
+
payload: AuthenticateBankIDRequest;
|
|
35
|
+
response: AuthenticateBankIDResponse;
|
|
36
|
+
};
|
|
37
|
+
[CloudFunction.COLLECT_BANKID]: {
|
|
38
|
+
payload: CollectBankIDRequest;
|
|
39
|
+
response: CollectBankIDResponse;
|
|
40
|
+
};
|
|
41
|
+
[CloudFunction.CREATE_LIKE]: {
|
|
42
|
+
payload: CreateLikeRequest;
|
|
43
|
+
response: CreateLikeResponse;
|
|
44
|
+
};
|
|
45
|
+
[CloudFunction.GET_LIKES]: {
|
|
46
|
+
payload: CreateLikeRequest;
|
|
47
|
+
response: CreateLikeResponse;
|
|
48
|
+
};
|
|
49
|
+
[CloudFunction.HANDLE_LIKE_SEEN]: {
|
|
50
|
+
payload: HandleLikeSeenRequest;
|
|
51
|
+
response: HandleLikeSeenResponse;
|
|
52
|
+
};
|
|
53
|
+
[CloudFunction.GET_MATCH]: {
|
|
54
|
+
payload: GetMatchRequest;
|
|
55
|
+
response: GetMatchResponse;
|
|
56
|
+
};
|
|
57
|
+
[CloudFunction.HANDLE_MATCH_SEEN]: {
|
|
58
|
+
payload: HandleMatchSeenRequest;
|
|
59
|
+
response: HandleMatchSeenResponse;
|
|
60
|
+
};
|
|
61
|
+
[CloudFunction.GET_MATCHES]: {
|
|
62
|
+
payload: GetMatchesRequest;
|
|
63
|
+
response: GetMatchesResponse;
|
|
64
|
+
};
|
|
65
|
+
[CloudFunction.GET_MATCH_CHECK]: {
|
|
66
|
+
payload: GetMatchCheckRequest;
|
|
67
|
+
response: GetMatchCheckResponse;
|
|
68
|
+
};
|
|
69
|
+
[CloudFunction.REMOVE_MATCH]: {
|
|
70
|
+
payload: RemoveMatchRequest;
|
|
71
|
+
response: RemoveMatchResponse;
|
|
72
|
+
};
|
|
73
|
+
[CloudFunction.GET_MATCHABLE_USER]: {
|
|
74
|
+
payload: GetMatchableUserRequest;
|
|
75
|
+
response: GetMatchableUserResponse;
|
|
76
|
+
};
|
|
77
|
+
[CloudFunction.GET_MATCHABLE_USERS]: {
|
|
78
|
+
payload: GetMatchableUsersResponse;
|
|
79
|
+
response: GetMatchableUsersResponse;
|
|
80
|
+
};
|
|
81
|
+
[CloudFunction.SEND_MESSAGE]: {
|
|
82
|
+
payload: SendMessageRequest;
|
|
83
|
+
response: SendMessageResponse;
|
|
84
|
+
};
|
|
85
|
+
[CloudFunction.GET_MESSAGES]: {
|
|
86
|
+
payload: GetMessagesRequest;
|
|
87
|
+
response: GetMessagesResponse;
|
|
88
|
+
};
|
|
89
|
+
[CloudFunction.CREATE_PLS]: {
|
|
90
|
+
payload: CreatePLSRequest;
|
|
91
|
+
response: CreatePLSResponse;
|
|
92
|
+
};
|
|
93
|
+
[CloudFunction.UPDATE_QUESTIONS]: {
|
|
94
|
+
payload: UpdateQuestionsRequest;
|
|
95
|
+
response: UpdateQuestionsResponse;
|
|
96
|
+
};
|
|
97
|
+
[CloudFunction.CREATE_REPORT]: {
|
|
98
|
+
payload: CreateReportRequest;
|
|
99
|
+
response: CreateReportResponse;
|
|
100
|
+
};
|
|
101
|
+
[CloudFunction.ADD_IMAGES]: {
|
|
102
|
+
payload: AddImagesRequest;
|
|
103
|
+
response: AddImagesResponse;
|
|
104
|
+
};
|
|
105
|
+
[CloudFunction.GET_PRODUCTS]: {
|
|
106
|
+
payload: GetProductsRequest;
|
|
107
|
+
response: GetProductsResponse;
|
|
108
|
+
};
|
|
109
|
+
[CloudFunction.CREATE_BILLING_PORTAL]: {
|
|
110
|
+
payload: CreateBillingPortalRequest;
|
|
111
|
+
response: CreateBillingPortalResponse;
|
|
112
|
+
};
|
|
113
|
+
[CloudFunction.CREATE_CHECKOUT_SESSION]: {
|
|
114
|
+
payload: CreateCheckoutSessionRequest;
|
|
115
|
+
response: CreateCheckoutSessionResponse;
|
|
116
|
+
};
|
|
117
|
+
[CloudFunction.REGISTER_USER]: {
|
|
118
|
+
payload: RegisterUserRequest;
|
|
119
|
+
response: RegisterUserResponse;
|
|
120
|
+
};
|
|
121
|
+
[CloudFunction.UPDATE_USER]: {
|
|
122
|
+
payload: UpdateUserRequest;
|
|
123
|
+
response: UpdateUserResponse;
|
|
124
|
+
};
|
|
125
|
+
[CloudFunction.GET_CURRENT_USER]: {
|
|
126
|
+
payload: GetUserRequest;
|
|
127
|
+
response: GetUserResponse;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./assessment.types";
|
|
2
|
+
export * from "./cloud-function-types";
|
|
3
|
+
export * from "./like.types";
|
|
4
|
+
export * from "./match.types";
|
|
5
|
+
export * from "./message.types";
|
|
6
|
+
export * from "./request.types";
|
|
7
|
+
export * from "./report.types";
|
|
8
|
+
export * from "./response.types";
|
|
9
|
+
export * from "./pls.types";
|
|
10
|
+
export * from "./stripe.types";
|
|
11
|
+
export * from "./submission.types";
|
|
12
|
+
export * from "./user.types";
|
|
@@ -0,0 +1,28 @@
|
|
|
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("./assessment.types"), exports);
|
|
18
|
+
__exportStar(require("./cloud-function-types"), exports);
|
|
19
|
+
__exportStar(require("./like.types"), exports);
|
|
20
|
+
__exportStar(require("./match.types"), exports);
|
|
21
|
+
__exportStar(require("./message.types"), exports);
|
|
22
|
+
__exportStar(require("./request.types"), exports);
|
|
23
|
+
__exportStar(require("./report.types"), exports);
|
|
24
|
+
__exportStar(require("./response.types"), exports);
|
|
25
|
+
__exportStar(require("./pls.types"), exports);
|
|
26
|
+
__exportStar(require("./stripe.types"), exports);
|
|
27
|
+
__exportStar(require("./submission.types"), exports);
|
|
28
|
+
__exportStar(require("./user.types"), exports);
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { LikeType } from "../enum";
|
|
2
|
+
import { AdvancedMatchStatus } from "../enum/match.enum";
|
|
3
|
+
import { RatedQuestions } from "./rating.types";
|
|
4
|
+
export type Match = {
|
|
5
|
+
id: string;
|
|
6
|
+
users: Record<string, boolean>;
|
|
7
|
+
created: string;
|
|
8
|
+
percentages: RatedQuestions;
|
|
9
|
+
totalPercentage: number;
|
|
10
|
+
conversationId: string;
|
|
11
|
+
advancedMatchStatus: AdvancedMatchStatus;
|
|
12
|
+
advancedMatch?: AdvancedMatch;
|
|
13
|
+
};
|
|
14
|
+
interface StrengthOrWeakness {
|
|
15
|
+
title: string;
|
|
16
|
+
summary: string;
|
|
17
|
+
}
|
|
18
|
+
export type AdvancedMatch = {
|
|
19
|
+
strengths: StrengthOrWeakness[];
|
|
20
|
+
weaknesses: StrengthOrWeakness[];
|
|
21
|
+
summary: string;
|
|
22
|
+
};
|
|
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;
|
|
39
|
+
};
|
|
40
|
+
export type MatchableUser = {
|
|
41
|
+
user: UserData;
|
|
42
|
+
percentages: RatedQuestions;
|
|
43
|
+
totalPercentage: number;
|
|
44
|
+
isMatch: boolean;
|
|
45
|
+
likeType?: LikeType;
|
|
46
|
+
isWildcard: boolean;
|
|
47
|
+
matchId?: string;
|
|
48
|
+
conversationId?: string;
|
|
49
|
+
advancedMatchStatus?: AdvancedMatchStatus;
|
|
50
|
+
};
|
|
51
|
+
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[];
|
|
60
|
+
};
|
|
61
|
+
export type UserMatch = {
|
|
62
|
+
matchId: string;
|
|
63
|
+
userId: string;
|
|
64
|
+
seen: boolean;
|
|
65
|
+
created: string;
|
|
66
|
+
conversationId: string;
|
|
67
|
+
};
|
|
68
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type RatedQuestions = Record<string, number>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReportReason, ReportStatus } from "../enum";
|
|
2
|
+
export type Report = {
|
|
3
|
+
id: string;
|
|
4
|
+
reporterId: string;
|
|
5
|
+
reportedUserId: string;
|
|
6
|
+
reason: ReportReason;
|
|
7
|
+
description?: string;
|
|
8
|
+
status: ReportStatus;
|
|
9
|
+
resolvedBy?: string;
|
|
10
|
+
created: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { FeedbackAgreement, LikeType, ReportReason } from "../enum";
|
|
2
|
+
import { Answer } from "./submission.types";
|
|
3
|
+
import { RegistrationData } from "./user.types";
|
|
4
|
+
export type CreateAssessmentRequest = {
|
|
5
|
+
intimateTopics: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type GetAssessmentRequest = {
|
|
8
|
+
id: string;
|
|
9
|
+
};
|
|
10
|
+
export type CreateSubmissionRequest = {
|
|
11
|
+
assessmentId: string;
|
|
12
|
+
};
|
|
13
|
+
export type GetSubmissionRequest = {
|
|
14
|
+
assessmentId: string;
|
|
15
|
+
submissionId: string;
|
|
16
|
+
};
|
|
17
|
+
export type UpdateAnswerRequest = {
|
|
18
|
+
assessmentId: string;
|
|
19
|
+
submissionId: string;
|
|
20
|
+
categoryId: string;
|
|
21
|
+
answer: Answer;
|
|
22
|
+
};
|
|
23
|
+
export type SubmitCategoryFeedbackRequest = {
|
|
24
|
+
assessmentId: string;
|
|
25
|
+
submissionId: string;
|
|
26
|
+
categoryId: string;
|
|
27
|
+
agreement: FeedbackAgreement;
|
|
28
|
+
evaluationReflection: string;
|
|
29
|
+
additionalThoughts: string;
|
|
30
|
+
};
|
|
31
|
+
export type AuthenticateBankIDRequest = undefined;
|
|
32
|
+
export type CollectBankIDRequest = {
|
|
33
|
+
orderRef: string;
|
|
34
|
+
};
|
|
35
|
+
export type SendMessageRequest = {
|
|
36
|
+
conversationId: string;
|
|
37
|
+
messageId: string;
|
|
38
|
+
message: string;
|
|
39
|
+
};
|
|
40
|
+
export type GetMessagesRequest = {
|
|
41
|
+
conversationId: string;
|
|
42
|
+
limit: number;
|
|
43
|
+
offset: string;
|
|
44
|
+
};
|
|
45
|
+
export type CreateLikeRequest = {
|
|
46
|
+
recipientId: string;
|
|
47
|
+
type: LikeType;
|
|
48
|
+
};
|
|
49
|
+
export type GetLikesRequest = {
|
|
50
|
+
limit: number;
|
|
51
|
+
offset: string;
|
|
52
|
+
};
|
|
53
|
+
export type HandleLikeSeenRequest = {
|
|
54
|
+
userId: string;
|
|
55
|
+
};
|
|
56
|
+
export type RemoveMatchRequest = {
|
|
57
|
+
recipientId: string;
|
|
58
|
+
};
|
|
59
|
+
export type GetMatchRequest = {
|
|
60
|
+
matchId: string;
|
|
61
|
+
};
|
|
62
|
+
export type HandleMatchSeenRequest = {
|
|
63
|
+
userId: string;
|
|
64
|
+
};
|
|
65
|
+
export type GetMatchesRequest = {
|
|
66
|
+
limit: number;
|
|
67
|
+
offset: string;
|
|
68
|
+
};
|
|
69
|
+
export type GetMatchableUserRequest = {
|
|
70
|
+
userId: string;
|
|
71
|
+
};
|
|
72
|
+
export type GetMatchCheckRequest = {
|
|
73
|
+
userId: string;
|
|
74
|
+
};
|
|
75
|
+
export type CreatePLSRequest = {
|
|
76
|
+
questionnaire: Record<string, string>;
|
|
77
|
+
channelId: string;
|
|
78
|
+
variation: string;
|
|
79
|
+
};
|
|
80
|
+
export type UpdateQuestionsRequest = {
|
|
81
|
+
questions: Record<string, string>;
|
|
82
|
+
};
|
|
83
|
+
export type CreateReportRequest = {
|
|
84
|
+
reportedUserId: string;
|
|
85
|
+
reason: ReportReason;
|
|
86
|
+
description?: string;
|
|
87
|
+
};
|
|
88
|
+
export type CreateCheckoutSessionRequest = {
|
|
89
|
+
priceId: string;
|
|
90
|
+
};
|
|
91
|
+
export type RegisterUserRequest = {
|
|
92
|
+
email: string;
|
|
93
|
+
password: string;
|
|
94
|
+
referrerId?: string;
|
|
95
|
+
data: RegistrationData;
|
|
96
|
+
};
|
|
97
|
+
export type GetUserRequest = undefined;
|
|
98
|
+
export type UpdateUserRequest = Partial<any>;
|
|
99
|
+
export type AddImagesRequest = {
|
|
100
|
+
images: string[];
|
|
101
|
+
};
|
|
102
|
+
export type GetProductsRequest = undefined;
|
|
103
|
+
export type CreateBillingPortalRequest = undefined;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Assessment, FullAssessment } from "./assessment.types";
|
|
2
|
+
import { Submission, CategoryEvaluation } from "./submission.types";
|
|
3
|
+
import { Match, MatchableUser, MatchCheck, UserMatch } from "./match.types";
|
|
4
|
+
import { Message } from "./message.types";
|
|
5
|
+
import { StripeProduct } from "./stripe.types";
|
|
6
|
+
import { User } from "./user.types";
|
|
7
|
+
import { Like } from "./like.types";
|
|
8
|
+
export type CreateAssessmentResponse = Assessment;
|
|
9
|
+
export type GetAssessmentResponse = Assessment;
|
|
10
|
+
export type GetAssessmentsResponse = FullAssessment[];
|
|
11
|
+
export type CreateSubmissionResponse = Submission;
|
|
12
|
+
export type GetSubmissionResponse = Submission;
|
|
13
|
+
export type UpdateAnswerResponse = {
|
|
14
|
+
submission: Submission;
|
|
15
|
+
categoryEvaluation?: CategoryEvaluation;
|
|
16
|
+
};
|
|
17
|
+
export type SubmitCategoryFeedbackResponse = CategoryEvaluation;
|
|
18
|
+
export type AuthenticateBankIDResponse = {
|
|
19
|
+
orderRef: string;
|
|
20
|
+
qrStartToken: string;
|
|
21
|
+
autoStartToken: string;
|
|
22
|
+
};
|
|
23
|
+
export interface CollectBankIDResponse {
|
|
24
|
+
orderRef: string;
|
|
25
|
+
status: "pending" | "complete" | "failed";
|
|
26
|
+
qrCode?: string;
|
|
27
|
+
hintCode?: string;
|
|
28
|
+
}
|
|
29
|
+
export type SendMessageResponse = Message;
|
|
30
|
+
export type GetMessagesResponse = Message[];
|
|
31
|
+
export type HandleLikeResponse = boolean;
|
|
32
|
+
export type RemoveMatchResponse = void;
|
|
33
|
+
export type GetMatchResponse = Match;
|
|
34
|
+
export type HandleMatchSeenResponse = void;
|
|
35
|
+
export type GetMatchesResponse = UserMatch[];
|
|
36
|
+
export type GetMatchableUserResponse = MatchableUser;
|
|
37
|
+
export type GetMatchableUsersResponse = MatchableUser[];
|
|
38
|
+
export type CreateLikeResponse = {
|
|
39
|
+
isMatch: boolean;
|
|
40
|
+
};
|
|
41
|
+
export type GetLikesResponse = Like[];
|
|
42
|
+
export type HandleLikeSeenResponse = void;
|
|
43
|
+
export type CreatePLSResponse = void;
|
|
44
|
+
export type UpdateQuestionsResponse = void;
|
|
45
|
+
export type CreateReportResponse = void;
|
|
46
|
+
export type CreateBillingPortalResponse = {
|
|
47
|
+
url: string;
|
|
48
|
+
};
|
|
49
|
+
export type CreateCheckoutSessionResponse = {
|
|
50
|
+
url: string;
|
|
51
|
+
};
|
|
52
|
+
export type GetProductsResponse = StripeProduct[];
|
|
53
|
+
export type RegisterUserResponse = {
|
|
54
|
+
success: boolean;
|
|
55
|
+
message: string;
|
|
56
|
+
};
|
|
57
|
+
export type GetUserResponse = User;
|
|
58
|
+
export type UpdateUserResponse = User;
|
|
59
|
+
export type AddImagesResponse = {
|
|
60
|
+
images: string[];
|
|
61
|
+
thumbnail: string;
|
|
62
|
+
};
|
|
63
|
+
export type CancelBankIDResponse = void;
|
|
64
|
+
export type GetMatchCheckResponse = MatchCheck;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FeedbackAgreement } from "../enum";
|
|
2
|
+
type QuestionId = string;
|
|
3
|
+
type CategoryId = string;
|
|
4
|
+
export type Submission = {
|
|
5
|
+
id: string;
|
|
6
|
+
assessmentId: string;
|
|
7
|
+
introductionSeen: boolean;
|
|
8
|
+
answers: Record<QuestionId, Answer>;
|
|
9
|
+
categoryEvaluations: Record<CategoryId, CategoryEvaluation>;
|
|
10
|
+
lastUpdated: string;
|
|
11
|
+
created: string;
|
|
12
|
+
};
|
|
13
|
+
export type Answer = {
|
|
14
|
+
questionId: string;
|
|
15
|
+
answer: string | null;
|
|
16
|
+
elaboration?: string;
|
|
17
|
+
skipped: boolean;
|
|
18
|
+
reason: string | null;
|
|
19
|
+
};
|
|
20
|
+
export type CategoryEvaluation = {
|
|
21
|
+
categoryId: string;
|
|
22
|
+
aiSummary: string;
|
|
23
|
+
agreement: FeedbackAgreement | null;
|
|
24
|
+
evaluationReflection: string | null;
|
|
25
|
+
additionalThoughts: string | null;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Gender } from "../enum";
|
|
2
|
+
export type User = {
|
|
3
|
+
id: string;
|
|
4
|
+
email: string;
|
|
5
|
+
bankIDVerified: boolean;
|
|
6
|
+
registrationReferralAllowed: boolean;
|
|
7
|
+
profile: Profile;
|
|
8
|
+
preferences: DatingPreferences;
|
|
9
|
+
notifications: UserNotifications;
|
|
10
|
+
};
|
|
11
|
+
export type Profile = {
|
|
12
|
+
intro: string;
|
|
13
|
+
firstName: string;
|
|
14
|
+
state: string;
|
|
15
|
+
birth: Date;
|
|
16
|
+
age: number;
|
|
17
|
+
gender: Gender;
|
|
18
|
+
zodiacSign: string;
|
|
19
|
+
images: string[];
|
|
20
|
+
thumbnail: string;
|
|
21
|
+
thumbnailBlurred: string;
|
|
22
|
+
image: string;
|
|
23
|
+
aiSummary?: string;
|
|
24
|
+
attachedSummary: boolean;
|
|
25
|
+
profileInput: Record<string, string>;
|
|
26
|
+
};
|
|
27
|
+
export type NotificationSettings = {
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
settings: Record<string, boolean>;
|
|
30
|
+
};
|
|
31
|
+
export type UserNotifications = {
|
|
32
|
+
pushNotificationsEnabled: boolean;
|
|
33
|
+
emailNotificationsEnabled: boolean;
|
|
34
|
+
pushNotificationSettings: NotificationSettings;
|
|
35
|
+
emailNotificationSettings: NotificationSettings;
|
|
36
|
+
};
|
|
37
|
+
export type DatingPreferences = {
|
|
38
|
+
minAge: number;
|
|
39
|
+
maxAge: number;
|
|
40
|
+
interestedIn: Gender[];
|
|
41
|
+
distanceRadius: number;
|
|
42
|
+
};
|
|
43
|
+
export type RegistrationData = {
|
|
44
|
+
firstName: string;
|
|
45
|
+
lat: number;
|
|
46
|
+
lng: number;
|
|
47
|
+
birth: Date;
|
|
48
|
+
gender: Gender;
|
|
49
|
+
interestedIn: Gender[];
|
|
50
|
+
minAge: number;
|
|
51
|
+
maxAge: number;
|
|
52
|
+
distanceRadius: number;
|
|
53
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// export type User = {
|
|
4
|
+
// id: string;
|
|
5
|
+
// intro: string;
|
|
6
|
+
// firstName: string;
|
|
7
|
+
// state: string;
|
|
8
|
+
// birth: string;
|
|
9
|
+
// gender: string;
|
|
10
|
+
// interestedIn: string;
|
|
11
|
+
// zodiacSign: string;
|
|
12
|
+
// images: string[];
|
|
13
|
+
// profileInput: ProfileInput;
|
|
14
|
+
// lat: number;
|
|
15
|
+
// lng: number;
|
|
16
|
+
// radius: number;
|
|
17
|
+
// geohash: string;
|
|
18
|
+
// minAge: number;
|
|
19
|
+
// maxAge: number;
|
|
20
|
+
// aiSummary?: string;
|
|
21
|
+
// attachedSummary: boolean;
|
|
22
|
+
// thumbnail: string;
|
|
23
|
+
// image: string;
|
|
24
|
+
// bankIDVerified: boolean;
|
|
25
|
+
// emailNotificationsEnabled: boolean;
|
|
26
|
+
// pushNotificationsEnabled: boolean;
|
|
27
|
+
// pushNotificationSettings: NotificationSettings;
|
|
28
|
+
// registrationReferralAllowed: boolean;
|
|
29
|
+
// };
|
|
30
|
+
// export type UserRegistrationData = {
|
|
31
|
+
// firstName: string;
|
|
32
|
+
// state: string;
|
|
33
|
+
// birth: string;
|
|
34
|
+
// gender: string;
|
|
35
|
+
// images: string[];
|
|
36
|
+
// intro: string;
|
|
37
|
+
// interestedIn: string;
|
|
38
|
+
// lat?: number;
|
|
39
|
+
// lng?: number;
|
|
40
|
+
// radius?: number;
|
|
41
|
+
// minAge?: number;
|
|
42
|
+
// maxAge?: number;
|
|
43
|
+
// };
|
|
44
|
+
// export type UpdateUserData = {
|
|
45
|
+
// intro: string;
|
|
46
|
+
// firstName: string;
|
|
47
|
+
// state: string;
|
|
48
|
+
// birth: string;
|
|
49
|
+
// profileInput: ProfileInput;
|
|
50
|
+
// lat: number;
|
|
51
|
+
// lng: number;
|
|
52
|
+
// radius: number;
|
|
53
|
+
// geohash: string;
|
|
54
|
+
// minAge: number;
|
|
55
|
+
// maxAge: number;
|
|
56
|
+
// interestedIn: string; // maybe to be removed before release
|
|
57
|
+
// attachedSummary: boolean;
|
|
58
|
+
// expoPushToken?: string;
|
|
59
|
+
// pushNotificationsEnabled: boolean;
|
|
60
|
+
// emailNotificationsEnabled: boolean;
|
|
61
|
+
// pushNotificationSettings?: NotificationSettings;
|
|
62
|
+
// emailNotificationSettings?: NotificationSettings;
|
|
63
|
+
// };
|
|
64
|
+
// export type ProfileInput = Record<string, string>;
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "heartraite",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Heartraite npm package for common functionality",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"rootDir": "src",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"test": "jest",
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"prepublishOnly": "npm run build"
|
|
11
12
|
},
|
|
12
13
|
"repository": {
|
|
13
14
|
"type": "git",
|
|
@@ -27,4 +28,4 @@
|
|
|
27
28
|
"typescript": "^5.6.3",
|
|
28
29
|
"firebase": "^11.0.1"
|
|
29
30
|
}
|
|
30
|
-
}
|
|
31
|
+
}
|