heartraite 1.0.43 → 1.0.45

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.
@@ -18,6 +18,7 @@ export declare enum CloudFunction {
18
18
  HANDLE_LAST_MESSAGE_SEEN = "message/handle-last-message-seen",
19
19
  SEND_MESSAGE = "message/send-message",
20
20
  GET_MESSAGES = "message/get-messages",
21
+ SUBMIT_PLS_DEMOGRAPHICS = "pls/submit-demographics",
21
22
  CALCULATE_PLS_SCORE = "pls/calculate-score",
22
23
  CREATE_PLS_INPUT = "pls/create-input",
23
24
  CREATE_PLS_ASSESSMENT = "pls/create-assessment",
@@ -22,6 +22,7 @@ var CloudFunction;
22
22
  CloudFunction["HANDLE_LAST_MESSAGE_SEEN"] = "message/handle-last-message-seen";
23
23
  CloudFunction["SEND_MESSAGE"] = "message/send-message";
24
24
  CloudFunction["GET_MESSAGES"] = "message/get-messages";
25
+ CloudFunction["SUBMIT_PLS_DEMOGRAPHICS"] = "pls/submit-demographics";
25
26
  CloudFunction["CALCULATE_PLS_SCORE"] = "pls/calculate-score";
26
27
  CloudFunction["CREATE_PLS_INPUT"] = "pls/create-input";
27
28
  CloudFunction["CREATE_PLS_ASSESSMENT"] = "pls/create-assessment";
@@ -6,6 +6,7 @@ export * from "./like.enum";
6
6
  export * from "./match.enum";
7
7
  export * from "./report.enum";
8
8
  export * from "./gender.enum";
9
+ export * from "./pls.enum";
9
10
  export * from "./provider.enum";
10
11
  export * from "./state.enum";
11
12
  export * from "./notification.enum";
@@ -22,6 +22,7 @@ __exportStar(require("./like.enum"), exports);
22
22
  __exportStar(require("./match.enum"), exports);
23
23
  __exportStar(require("./report.enum"), exports);
24
24
  __exportStar(require("./gender.enum"), exports);
25
+ __exportStar(require("./pls.enum"), exports);
25
26
  __exportStar(require("./provider.enum"), exports);
26
27
  __exportStar(require("./state.enum"), exports);
27
28
  __exportStar(require("./notification.enum"), exports);
@@ -0,0 +1,24 @@
1
+ export declare enum PLSAgeInterval {
2
+ EIGHTEEN_TO_TWENTY_FOUR = "18-24",
3
+ TWENTY_FIVE_TO_THIRTY_ONE = "25-31",
4
+ THIRTY_TWO_TO_THIRTY_EIGHT = "32-38",
5
+ THIRTY_NINE_TO_FORTY_FIVE = "39-45",
6
+ FORTY_SIX_TO_FIFTY_TWO = "46-52",
7
+ FIFTY_THREE_TO_FIFTY_NINE = "53-59",
8
+ SIXTY_PLUS = "60+"
9
+ }
10
+ export declare enum PLSRelationshipDuration {
11
+ LESS_THAN_SIX_MONTHS = "less_than_six_months",
12
+ SIX_TO_TWELVE_MONTHS = "six_to_twelve_months",
13
+ ONE_TO_THREE_YEARS = "one_to_three_years",
14
+ FOUR_TO_SIX_YEARS = "four_to_six_years",
15
+ SEVEN_TO_TEN_YEARS = "seven_to_ten_years",
16
+ MORE_THAN_TEN_YEARS = "more_than_ten_years"
17
+ }
18
+ export declare enum PLSRelationshipStatus {
19
+ OPEN_RELATIONSHIP = "open_relationship",
20
+ LIVING_TOGETHER = "living_together",
21
+ ENGAGED = "engaged",
22
+ MARRIED = "married",
23
+ PARTNERS_BUT_NOT_LIVING_TOGETHER = "partners_but_not_living_together"
24
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PLSRelationshipStatus = exports.PLSRelationshipDuration = exports.PLSAgeInterval = void 0;
4
+ var PLSAgeInterval;
5
+ (function (PLSAgeInterval) {
6
+ PLSAgeInterval["EIGHTEEN_TO_TWENTY_FOUR"] = "18-24";
7
+ PLSAgeInterval["TWENTY_FIVE_TO_THIRTY_ONE"] = "25-31";
8
+ PLSAgeInterval["THIRTY_TWO_TO_THIRTY_EIGHT"] = "32-38";
9
+ PLSAgeInterval["THIRTY_NINE_TO_FORTY_FIVE"] = "39-45";
10
+ PLSAgeInterval["FORTY_SIX_TO_FIFTY_TWO"] = "46-52";
11
+ PLSAgeInterval["FIFTY_THREE_TO_FIFTY_NINE"] = "53-59";
12
+ PLSAgeInterval["SIXTY_PLUS"] = "60+";
13
+ })(PLSAgeInterval || (exports.PLSAgeInterval = PLSAgeInterval = {}));
14
+ var PLSRelationshipDuration;
15
+ (function (PLSRelationshipDuration) {
16
+ PLSRelationshipDuration["LESS_THAN_SIX_MONTHS"] = "less_than_six_months";
17
+ PLSRelationshipDuration["SIX_TO_TWELVE_MONTHS"] = "six_to_twelve_months";
18
+ PLSRelationshipDuration["ONE_TO_THREE_YEARS"] = "one_to_three_years";
19
+ PLSRelationshipDuration["FOUR_TO_SIX_YEARS"] = "four_to_six_years";
20
+ PLSRelationshipDuration["SEVEN_TO_TEN_YEARS"] = "seven_to_ten_years";
21
+ PLSRelationshipDuration["MORE_THAN_TEN_YEARS"] = "more_than_ten_years";
22
+ })(PLSRelationshipDuration || (exports.PLSRelationshipDuration = PLSRelationshipDuration = {}));
23
+ var PLSRelationshipStatus;
24
+ (function (PLSRelationshipStatus) {
25
+ PLSRelationshipStatus["OPEN_RELATIONSHIP"] = "open_relationship";
26
+ PLSRelationshipStatus["LIVING_TOGETHER"] = "living_together";
27
+ PLSRelationshipStatus["ENGAGED"] = "engaged";
28
+ PLSRelationshipStatus["MARRIED"] = "married";
29
+ PLSRelationshipStatus["PARTNERS_BUT_NOT_LIVING_TOGETHER"] = "partners_but_not_living_together";
30
+ })(PLSRelationshipStatus || (exports.PLSRelationshipStatus = PLSRelationshipStatus = {}));
@@ -1,6 +1,6 @@
1
1
  import { CloudFunction } from "../enum";
2
- import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest, CreateBillingPortalRequest, CreateCheckoutSessionRequest, CreateLikeRequest, CreatePLSInputRequest, CreatePLSSubmissionRequest, CreateReportRequest, GetCARequest, GetLikesRequest, GetMatchableUserRequest, GetMatchCheckRequest, GetMatchesRequest, GetMatchRequest, GetMessagesRequest, GetPLSSubmissionRequest, GetProductsRequest, GetUserRequest, HandleLastMessageSeenRequest, HandleLikeSeenRequest, HandleMatchSeenRequest, RegisterOnboardingRequest, RegisterUserRequest, RemoveMatchRequest, SendMessageRequest, SubmitAnswerRequest, SubmitCategoryFeedbackRequest, SubmitPLSCategoryFeedbackRequest, UpdatePLSAnswerRequest, UpdateQuestionsRequest, UpdateUserRequest } from "./request.types";
3
- import { AddImagesResponse, AuthenticateBankIDResponse, CollectBankIDResponse, CreateBillingPortalResponse, CreateCheckoutSessionResponse, CreateLikeResponse, CreatePLSInputResponse, CreatePLSSubmissionResponse, CreateReportResponse, GetCAResponse, GetLikesResponse, GetMatchableUserResponse, GetMatchableUsersResponse, GetMatchCheckResponse, GetMatchesResponse, GetMatchResponse, GetMessagesResponse, GetPLSSubmissionResponse, GetProductsResponse, GetUserResponse, HandleLastMessageSeenResponse, HandleLikeSeenResponse, HandleMatchSeenResponse, RegisterOnboardingResponse, RegisterUserResponse, RemoveMatchResponse, SendMessageResponse, SubmitAnswerResponse, SubmitCategoryFeedbackResponse, SubmitPLSCategoryFeedbackResponse, UpdatePLSAnswerResponse, UpdateQuestionsResponse, UpdateUserResponse } from "./response.types";
2
+ import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest, CreateBillingPortalRequest, CreateCheckoutSessionRequest, CreateLikeRequest, CreatePLSInputRequest, CreatePLSSubmissionRequest, CreateReportRequest, GetCARequest, GetLikesRequest, GetMatchableUserRequest, GetMatchCheckRequest, GetMatchesRequest, GetMatchRequest, GetMessagesRequest, GetPLSSubmissionRequest, GetProductsRequest, 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, GetCAResponse, GetLikesResponse, GetMatchableUserResponse, GetMatchableUsersResponse, GetMatchCheckResponse, GetMatchesResponse, GetMatchResponse, GetMessagesResponse, GetPLSSubmissionResponse, GetProductsResponse, GetUserResponse, HandleLastMessageSeenResponse, HandleLikeSeenResponse, HandleMatchSeenResponse, RegisterOnboardingResponse, RegisterUserResponse, RemoveMatchResponse, SendMessageResponse, SubmitAnswerResponse, SubmitCategoryFeedbackResponse, SubmitPLSCategoryFeedbackResponse, SubmitPLSDemographicsResponse, UpdatePLSAnswerResponse, UpdateQuestionsResponse, UpdateUserResponse } from "./response.types";
4
4
  export type CloudFunctionTypes = {
5
5
  [CloudFunction.REGISTER_USER]: {
6
6
  payload: RegisterUserRequest;
@@ -78,6 +78,10 @@ export type CloudFunctionTypes = {
78
78
  payload: GetMessagesRequest;
79
79
  response: GetMessagesResponse;
80
80
  };
81
+ [CloudFunction.SUBMIT_PLS_DEMOGRAPHICS]: {
82
+ payload: SubmitPLSDemographicsRequest;
83
+ response: SubmitPLSDemographicsResponse;
84
+ };
81
85
  [CloudFunction.CREATE_PLS_INPUT]: {
82
86
  payload: CreatePLSInputRequest;
83
87
  response: CreatePLSInputResponse;
@@ -1,6 +1,6 @@
1
1
  import { FeedbackAgreement, Gender, LikeType, ProviderType, ReportReason } from "../enum";
2
2
  import { DeepPartial } from "./helper.types";
3
- import { Answer } from "./submission.types";
3
+ import { Answer, Demographics } from "./submission.types";
4
4
  import { DatingPreferences, UserNotifications, UserProfile } from "./user.types";
5
5
  export type RegisterUserRequest = {
6
6
  userId: string;
@@ -67,6 +67,11 @@ export type GetMatchableUserRequest = {
67
67
  export type GetMatchCheckRequest = {
68
68
  userId: string;
69
69
  };
70
+ export type SubmitPLSDemographicsRequest = {
71
+ assessmentId: string;
72
+ submissionId: string;
73
+ demographics: Demographics;
74
+ };
70
75
  export type CreatePLSInputRequest = {
71
76
  questionnaire: Record<string, string>;
72
77
  channelId: string;
@@ -42,6 +42,7 @@ export type CreateLikeResponse = {
42
42
  };
43
43
  export type GetLikesResponse = Like[];
44
44
  export type HandleLikeSeenResponse = void;
45
+ export type SubmitPLSDemographicsResponse = void;
45
46
  export type CreatePLSInputResponse = void;
46
47
  export type CreatePLSSubmissionResponse = Submission;
47
48
  export type GetPLSSubmissionResponse = Submission;
@@ -1,11 +1,11 @@
1
- import { FeedbackAgreement, Gender } from "../enum";
1
+ import { FeedbackAgreement, Gender, PLSAgeInterval, PLSRelationshipDuration, PLSRelationshipStatus } from "../enum";
2
2
  type QuestionId = string;
3
3
  type CategoryId = string;
4
4
  export type Demographics = {
5
5
  gender: Gender;
6
- ageInterval: string;
7
- relationshipDuration: string;
8
- relationshipStatus: string;
6
+ ageInterval: PLSAgeInterval;
7
+ relationshipDuration: PLSRelationshipDuration;
8
+ relationshipStatus: PLSRelationshipStatus;
9
9
  appreciatedPartnerTraits: string;
10
10
  };
11
11
  export type Submission = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,6 +18,7 @@ export enum CloudFunction {
18
18
  HANDLE_LAST_MESSAGE_SEEN = "message/handle-last-message-seen",
19
19
  SEND_MESSAGE = "message/send-message",
20
20
  GET_MESSAGES = "message/get-messages",
21
+ SUBMIT_PLS_DEMOGRAPHICS = "pls/submit-demographics",
21
22
  CALCULATE_PLS_SCORE = "pls/calculate-score",
22
23
  CREATE_PLS_INPUT = "pls/create-input",
23
24
  CREATE_PLS_ASSESSMENT = "pls/create-assessment",
package/src/enum/index.ts CHANGED
@@ -6,6 +6,7 @@ export * from "./like.enum";
6
6
  export * from "./match.enum";
7
7
  export * from "./report.enum";
8
8
  export * from "./gender.enum";
9
+ export * from "./pls.enum";
9
10
  export * from "./provider.enum";
10
11
  export * from "./state.enum";
11
12
  export * from "./notification.enum";
@@ -0,0 +1,26 @@
1
+ export enum PLSAgeInterval {
2
+ EIGHTEEN_TO_TWENTY_FOUR = "18-24",
3
+ TWENTY_FIVE_TO_THIRTY_ONE = "25-31",
4
+ THIRTY_TWO_TO_THIRTY_EIGHT = "32-38",
5
+ THIRTY_NINE_TO_FORTY_FIVE = "39-45",
6
+ FORTY_SIX_TO_FIFTY_TWO = "46-52",
7
+ FIFTY_THREE_TO_FIFTY_NINE = "53-59",
8
+ SIXTY_PLUS = "60+",
9
+ }
10
+
11
+ export enum PLSRelationshipDuration {
12
+ LESS_THAN_SIX_MONTHS = "less_than_six_months",
13
+ SIX_TO_TWELVE_MONTHS = "six_to_twelve_months",
14
+ ONE_TO_THREE_YEARS = "one_to_three_years",
15
+ FOUR_TO_SIX_YEARS = "four_to_six_years",
16
+ SEVEN_TO_TEN_YEARS = "seven_to_ten_years",
17
+ MORE_THAN_TEN_YEARS = "more_than_ten_years",
18
+ }
19
+
20
+ export enum PLSRelationshipStatus {
21
+ OPEN_RELATIONSHIP = "open_relationship",
22
+ LIVING_TOGETHER = "living_together",
23
+ ENGAGED = "engaged",
24
+ MARRIED = "married",
25
+ PARTNERS_BUT_NOT_LIVING_TOGETHER = "partners_but_not_living_together",
26
+ }
@@ -29,6 +29,7 @@ import {
29
29
  SubmitAnswerRequest,
30
30
  SubmitCategoryFeedbackRequest,
31
31
  SubmitPLSCategoryFeedbackRequest,
32
+ SubmitPLSDemographicsRequest,
32
33
  UpdatePLSAnswerRequest,
33
34
  UpdateQuestionsRequest,
34
35
  UpdateUserRequest,
@@ -64,6 +65,7 @@ import {
64
65
  SubmitAnswerResponse,
65
66
  SubmitCategoryFeedbackResponse,
66
67
  SubmitPLSCategoryFeedbackResponse,
68
+ SubmitPLSDemographicsResponse,
67
69
  UpdatePLSAnswerResponse,
68
70
  UpdateQuestionsResponse,
69
71
  UpdateUserResponse,
@@ -160,6 +162,10 @@ export type CloudFunctionTypes = {
160
162
  };
161
163
 
162
164
  // pls
165
+ [CloudFunction.SUBMIT_PLS_DEMOGRAPHICS]: {
166
+ payload: SubmitPLSDemographicsRequest;
167
+ response: SubmitPLSDemographicsResponse;
168
+ };
163
169
  [CloudFunction.CREATE_PLS_INPUT]: {
164
170
  payload: CreatePLSInputRequest;
165
171
  response: CreatePLSInputResponse;
@@ -6,7 +6,7 @@ import {
6
6
  ReportReason,
7
7
  } from "../enum";
8
8
  import { DeepPartial } from "./helper.types";
9
- import { Answer } from "./submission.types";
9
+ import { Answer, Demographics } from "./submission.types";
10
10
  import {
11
11
  DatingPreferences,
12
12
  UserNotifications,
@@ -68,6 +68,11 @@ export type GetMatchableUserRequest = { userId: string };
68
68
  export type GetMatchCheckRequest = { userId: string };
69
69
 
70
70
  // pls
71
+ export type SubmitPLSDemographicsRequest = {
72
+ assessmentId: string;
73
+ submissionId: string;
74
+ demographics: Demographics;
75
+ };
71
76
  export type CreatePLSInputRequest = {
72
77
  questionnaire: Record<string, string>;
73
78
  channelId: string;
@@ -55,6 +55,7 @@ export type GetLikesResponse = Like[];
55
55
  export type HandleLikeSeenResponse = void;
56
56
 
57
57
  // pls
58
+ export type SubmitPLSDemographicsResponse = void;
58
59
  export type CreatePLSInputResponse = void;
59
60
  export type CreatePLSSubmissionResponse = Submission;
60
61
  export type GetPLSSubmissionResponse = Submission;
@@ -1,13 +1,19 @@
1
- import { FeedbackAgreement, Gender } from "../enum";
1
+ import {
2
+ FeedbackAgreement,
3
+ Gender,
4
+ PLSAgeInterval,
5
+ PLSRelationshipDuration,
6
+ PLSRelationshipStatus,
7
+ } from "../enum";
2
8
 
3
9
  type QuestionId = string;
4
10
  type CategoryId = string;
5
11
 
6
12
  export type Demographics = {
7
13
  gender: Gender;
8
- ageInterval: string;
9
- relationshipDuration: string;
10
- relationshipStatus: string;
14
+ ageInterval: PLSAgeInterval;
15
+ relationshipDuration: PLSRelationshipDuration;
16
+ relationshipStatus: PLSRelationshipStatus;
11
17
  appreciatedPartnerTraits: string;
12
18
  };
13
19