heartraite 1.0.103 → 1.0.105

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.
@@ -1,3 +1,3 @@
1
1
  import { PersonalityTrait, SACategoryID } from "../enum";
2
2
  export declare const SA_TRIAL_CATEGORIES: SACategoryID[];
3
- export declare const SA_TRIAL_PERSONALITY_SECTIONS: PersonalityTrait[];
3
+ export declare const SA_TRIAL_SECTIONS: PersonalityTrait[];
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SA_TRIAL_PERSONALITY_SECTIONS = exports.SA_TRIAL_CATEGORIES = void 0;
3
+ exports.SA_TRIAL_SECTIONS = exports.SA_TRIAL_CATEGORIES = void 0;
4
4
  const enum_1 = require("../enum");
5
5
  exports.SA_TRIAL_CATEGORIES = [enum_1.SACategoryID.PERSONALITY];
6
- exports.SA_TRIAL_PERSONALITY_SECTIONS = [
6
+ exports.SA_TRIAL_SECTIONS = [
7
7
  enum_1.PersonalityTrait.OPENNESS,
8
8
  enum_1.PersonalityTrait.CONSCIENTIOUSNESS,
9
9
  ];
@@ -2,6 +2,7 @@ export declare enum CloudFunction {
2
2
  REGISTER_USER = "auth/register-user",
3
3
  AUTHENTICATE_BANKID = "bankid/authenticate",
4
4
  COLLECT_BANKID = "bankid/collect",
5
+ SUBMIT_FEEDBACK = "feedback/submit-feedback",
5
6
  GET_CA = "ca/get-ca",
6
7
  SUBMIT_ANSWER = "ca/submit-answer",
7
8
  SUBMIT_CATEGORY_FEEDBACK = "ca/submit-category-feedback",
@@ -6,6 +6,7 @@ var CloudFunction;
6
6
  CloudFunction["REGISTER_USER"] = "auth/register-user";
7
7
  CloudFunction["AUTHENTICATE_BANKID"] = "bankid/authenticate";
8
8
  CloudFunction["COLLECT_BANKID"] = "bankid/collect";
9
+ CloudFunction["SUBMIT_FEEDBACK"] = "feedback/submit-feedback";
9
10
  CloudFunction["GET_CA"] = "ca/get-ca";
10
11
  CloudFunction["SUBMIT_ANSWER"] = "ca/submit-answer";
11
12
  CloudFunction["SUBMIT_CATEGORY_FEEDBACK"] = "ca/submit-category-feedback";
@@ -0,0 +1,8 @@
1
+ export declare enum FeedbackType {
2
+ BUG = "bug",
3
+ SUGGESTION = "suggestion",
4
+ COMPLAINT = "complaint",
5
+ PRAISE = "praise",
6
+ QUESTION = "question",
7
+ OTHER = "other"
8
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FeedbackType = void 0;
4
+ var FeedbackType;
5
+ (function (FeedbackType) {
6
+ FeedbackType["BUG"] = "bug";
7
+ FeedbackType["SUGGESTION"] = "suggestion";
8
+ FeedbackType["COMPLAINT"] = "complaint";
9
+ FeedbackType["PRAISE"] = "praise";
10
+ FeedbackType["QUESTION"] = "question";
11
+ FeedbackType["OTHER"] = "other";
12
+ })(FeedbackType || (exports.FeedbackType = FeedbackType = {}));
@@ -3,6 +3,7 @@ export * from "./ca.enum";
3
3
  export * from "./cloudfunction.enum";
4
4
  export * from "./evaluation.enum";
5
5
  export * from "./environment.enum";
6
+ export * from "./feedback.enum";
6
7
  export * from "./firestore.enum";
7
8
  export * from "./general.enum";
8
9
  export * from "./iap.enum";
@@ -19,6 +19,7 @@ __exportStar(require("./ca.enum"), exports);
19
19
  __exportStar(require("./cloudfunction.enum"), exports);
20
20
  __exportStar(require("./evaluation.enum"), exports);
21
21
  __exportStar(require("./environment.enum"), exports);
22
+ __exportStar(require("./feedback.enum"), exports);
22
23
  __exportStar(require("./firestore.enum"), exports);
23
24
  __exportStar(require("./general.enum"), exports);
24
25
  __exportStar(require("./iap.enum"), exports);
@@ -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 } 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";
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 } 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 } from "./response.types";
4
4
  export type CloudFunctionTypes = {
5
5
  [CloudFunction.REGISTER_USER]: {
6
6
  payload: RegisterUserRequest;
@@ -26,6 +26,10 @@ export type CloudFunctionTypes = {
26
26
  payload: SubmitCategoryFeedbackRequest;
27
27
  response: SubmitCategoryFeedbackResponse;
28
28
  };
29
+ [CloudFunction.SUBMIT_FEEDBACK]: {
30
+ payload: SubmitFeedbackRequest;
31
+ response: SubmitFeedbackResponse;
32
+ };
29
33
  [CloudFunction.CREATE_LIKE]: {
30
34
  payload: CreateLikeRequest;
31
35
  response: CreateLikeResponse;
@@ -0,0 +1,10 @@
1
+ import { FeedbackType } from "../enum";
2
+ export type Feedback = {
3
+ id: string;
4
+ type: FeedbackType;
5
+ message: string;
6
+ context: string;
7
+ createdBy: string;
8
+ created: string;
9
+ metadata?: Record<string, any>;
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,6 +3,7 @@ export * from "./assessment.types";
3
3
  export * from "./ca.types";
4
4
  export * from "./cloud-function-types";
5
5
  export * from "./error.types";
6
+ export * from "./feedback.types";
6
7
  export * from "./helper.types";
7
8
  export * from "./like.types";
8
9
  export * from "./match.types";
@@ -19,6 +19,7 @@ __exportStar(require("./assessment.types"), exports);
19
19
  __exportStar(require("./ca.types"), exports);
20
20
  __exportStar(require("./cloud-function-types"), exports);
21
21
  __exportStar(require("./error.types"), exports);
22
+ __exportStar(require("./feedback.types"), exports);
22
23
  __exportStar(require("./helper.types"), exports);
23
24
  __exportStar(require("./like.types"), exports);
24
25
  __exportStar(require("./match.types"), exports);
@@ -1,4 +1,4 @@
1
- import { FeedbackAgreement, Gender, LikeType, ProviderType, ReportReason, UserDeletionReason } from "../enum";
1
+ import { FeedbackAgreement, FeedbackType, Gender, LikeType, ProviderType, ReportReason, UserDeletionReason } from "../enum";
2
2
  import { DeepPartial } from "./helper.types";
3
3
  import { Answer, Demographics } from "./submission.types";
4
4
  import { DatingPreferences, UserConsents, UserNotifications, UserProfile, UserSettings } from "./user.types";
@@ -24,6 +24,11 @@ export type AuthenticateBankIDRequest = undefined;
24
24
  export type CollectBankIDRequest = {
25
25
  orderRef: string;
26
26
  };
27
+ export type SubmitFeedbackRequest = {
28
+ message: string;
29
+ type: FeedbackType;
30
+ context?: string;
31
+ };
27
32
  export type HandleLastMessageSeenRequest = {
28
33
  conversationId: string;
29
34
  };
@@ -30,6 +30,7 @@ export type SubmitAnswerResponse = {
30
30
  categoryEvaluation?: CategoryEvaluation;
31
31
  };
32
32
  export type SubmitCategoryFeedbackResponse = CategoryEvaluation;
33
+ export type SubmitFeedbackResponse = undefined;
33
34
  export type HandleLastMessageSeenResponse = undefined;
34
35
  export type SendMessageResponse = Message;
35
36
  export type GetMessagesResponse = Message[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.103",
3
+ "version": "1.0.105",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -2,7 +2,7 @@ import { PersonalityTrait, SACategoryID } from "../enum";
2
2
 
3
3
  export const SA_TRIAL_CATEGORIES = [SACategoryID.PERSONALITY];
4
4
 
5
- export const SA_TRIAL_PERSONALITY_SECTIONS = [
5
+ export const SA_TRIAL_SECTIONS = [
6
6
  PersonalityTrait.OPENNESS,
7
7
  PersonalityTrait.CONSCIENTIOUSNESS,
8
8
  ];
@@ -2,6 +2,7 @@ export enum CloudFunction {
2
2
  REGISTER_USER = "auth/register-user",
3
3
  AUTHENTICATE_BANKID = "bankid/authenticate",
4
4
  COLLECT_BANKID = "bankid/collect",
5
+ SUBMIT_FEEDBACK = "feedback/submit-feedback",
5
6
  GET_CA = "ca/get-ca",
6
7
  SUBMIT_ANSWER = "ca/submit-answer",
7
8
  SUBMIT_CATEGORY_FEEDBACK = "ca/submit-category-feedback",
@@ -0,0 +1,8 @@
1
+ export enum FeedbackType {
2
+ BUG = "bug",
3
+ SUGGESTION = "suggestion",
4
+ COMPLAINT = "complaint",
5
+ PRAISE = "praise",
6
+ QUESTION = "question",
7
+ OTHER = "other",
8
+ }
package/src/enum/index.ts CHANGED
@@ -3,6 +3,7 @@ export * from "./ca.enum";
3
3
  export * from "./cloudfunction.enum";
4
4
  export * from "./evaluation.enum";
5
5
  export * from "./environment.enum";
6
+ export * from "./feedback.enum";
6
7
  export * from "./firestore.enum";
7
8
  export * from "./general.enum";
8
9
  export * from "./iap.enum";
@@ -35,6 +35,7 @@ import {
35
35
  UpdatePLSAnswerRequest,
36
36
  UpdateQuestionsRequest,
37
37
  UpdateUserRequest,
38
+ SubmitFeedbackRequest,
38
39
  } from "./request.types";
39
40
  import {
40
41
  AddImagesResponse,
@@ -73,6 +74,7 @@ import {
73
74
  UpdatePLSAnswerResponse,
74
75
  UpdateQuestionsResponse,
75
76
  UpdateUserResponse,
77
+ SubmitFeedbackResponse,
76
78
  } from "./response.types";
77
79
 
78
80
  // Define a mapping of Cloud Functions to payload and response types
@@ -107,6 +109,12 @@ export type CloudFunctionTypes = {
107
109
  response: SubmitCategoryFeedbackResponse;
108
110
  };
109
111
 
112
+ // feedback
113
+ [CloudFunction.SUBMIT_FEEDBACK]: {
114
+ payload: SubmitFeedbackRequest;
115
+ response: SubmitFeedbackResponse;
116
+ };
117
+
110
118
  // like
111
119
  [CloudFunction.CREATE_LIKE]: {
112
120
  payload: CreateLikeRequest;
@@ -0,0 +1,11 @@
1
+ import { FeedbackType } from "../enum";
2
+
3
+ export type Feedback = {
4
+ id: string;
5
+ type: FeedbackType;
6
+ message: string;
7
+ context: string;
8
+ createdBy: string;
9
+ created: string;
10
+ metadata?: Record<string, any>;
11
+ };
@@ -3,6 +3,7 @@ export * from "./assessment.types";
3
3
  export * from "./ca.types";
4
4
  export * from "./cloud-function-types";
5
5
  export * from "./error.types";
6
+ export * from "./feedback.types";
6
7
  export * from "./helper.types";
7
8
  export * from "./like.types";
8
9
  export * from "./match.types";
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  FeedbackAgreement,
3
+ FeedbackType,
3
4
  Gender,
4
5
  LikeType,
5
6
  ProviderType,
@@ -41,6 +42,13 @@ export type CollectBankIDRequest = {
41
42
  orderRef: string;
42
43
  };
43
44
 
45
+ // feedback
46
+ export type SubmitFeedbackRequest = {
47
+ message: string;
48
+ type: FeedbackType;
49
+ context?: string;
50
+ };
51
+
44
52
  // message
45
53
  export type HandleLastMessageSeenRequest = {
46
54
  conversationId: string;
@@ -38,6 +38,9 @@ export type SubmitAnswerResponse = {
38
38
  };
39
39
  export type SubmitCategoryFeedbackResponse = CategoryEvaluation;
40
40
 
41
+ // feedback
42
+ export type SubmitFeedbackResponse = undefined;
43
+
41
44
  // message
42
45
  export type HandleLastMessageSeenResponse = undefined;
43
46
  export type SendMessageResponse = Message;