heartraite 1.0.132 → 1.0.134

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.
@@ -6,6 +6,7 @@ export declare enum CloudFunction {
6
6
  SUBMIT_FEEDBACK = "feedback/submit-feedback",
7
7
  GET_CA = "ca/get-ca",
8
8
  SUBMIT_ANSWER = "ca/submit-answer",
9
+ GET_EVENT_MATCH = "event/get-event-match",
9
10
  GET_USER_EVENTS = "event/get-user-events",
10
11
  JOIN_EVENT = "event/join-event",
11
12
  GET_EVENT = "event/get-event",
@@ -10,6 +10,7 @@ var CloudFunction;
10
10
  CloudFunction["SUBMIT_FEEDBACK"] = "feedback/submit-feedback";
11
11
  CloudFunction["GET_CA"] = "ca/get-ca";
12
12
  CloudFunction["SUBMIT_ANSWER"] = "ca/submit-answer";
13
+ CloudFunction["GET_EVENT_MATCH"] = "event/get-event-match";
13
14
  CloudFunction["GET_USER_EVENTS"] = "event/get-user-events";
14
15
  CloudFunction["JOIN_EVENT"] = "event/join-event";
15
16
  CloudFunction["GET_EVENT"] = "event/get-event";
@@ -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, SubmitFeedbackRequest, SyncAffiliateRequest, JoinEventRequest, GetEventRequest } 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, SyncAffiliateResponse, GetUserEventsResponse, JoinEventResponse, GetEventResponse } 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, SyncAffiliateRequest, JoinEventRequest, GetEventRequest, GetEventMatchRequest } 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, SyncAffiliateResponse, GetUserEventsResponse, JoinEventResponse, GetEventResponse, GetEventMatchResponse } from "./response.types";
4
4
  export type CloudFunctionTypes = {
5
5
  [CloudFunction.SYNC_AFFILIATE]: {
6
6
  payload: SyncAffiliateRequest;
@@ -30,6 +30,10 @@ export type CloudFunctionTypes = {
30
30
  payload: SubmitCategoryFeedbackRequest;
31
31
  response: SubmitCategoryFeedbackResponse;
32
32
  };
33
+ [CloudFunction.GET_EVENT_MATCH]: {
34
+ payload: GetEventMatchRequest;
35
+ response: GetEventMatchResponse;
36
+ };
33
37
  [CloudFunction.GET_USER_EVENTS]: {
34
38
  payload: undefined;
35
39
  response: GetUserEventsResponse;
@@ -12,6 +12,7 @@ export type Event = {
12
12
  hostBrand: string;
13
13
  createdByRole: "operator" | "partner";
14
14
  eventDateTime: string;
15
+ status: "upcoming" | "ongoing" | "completed";
15
16
  location?: string;
16
17
  isCancelled?: boolean;
17
18
  maxParticipants?: number;
@@ -27,6 +27,9 @@ export type AuthenticateBankIDRequest = undefined;
27
27
  export type CollectBankIDRequest = {
28
28
  orderRef: string;
29
29
  };
30
+ export type GetEventMatchRequest = {
31
+ eventId: string;
32
+ };
30
33
  export type JoinEventRequest = {
31
34
  inviteCode: string;
32
35
  };
@@ -1,5 +1,5 @@
1
1
  import { Submission, CategoryEvaluation } from "./submission.types";
2
- import { Event } from "./event.types";
2
+ import { Event, FullParticipant } from "./event.types";
3
3
  import { UserMatch } from "./match.types";
4
4
  import { MatchableUser, MatchCheck } from "./matchmaking.types";
5
5
  import { Message } from "./message.types";
@@ -32,6 +32,7 @@ export type SubmitAnswerResponse = {
32
32
  categoryEvaluation?: CategoryEvaluation;
33
33
  };
34
34
  export type SubmitCategoryFeedbackResponse = CategoryEvaluation;
35
+ export type GetEventMatchResponse = FullParticipant;
35
36
  export type GetUserEventsResponse = Event[];
36
37
  export type JoinEventResponse = Event;
37
38
  export type GetEventResponse = Event;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.132",
3
+ "version": "1.0.134",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -6,6 +6,7 @@ export enum CloudFunction {
6
6
  SUBMIT_FEEDBACK = "feedback/submit-feedback",
7
7
  GET_CA = "ca/get-ca",
8
8
  SUBMIT_ANSWER = "ca/submit-answer",
9
+ GET_EVENT_MATCH = "event/get-event-match",
9
10
  GET_USER_EVENTS = "event/get-user-events",
10
11
  JOIN_EVENT = "event/join-event",
11
12
  GET_EVENT = "event/get-event",
@@ -39,6 +39,7 @@ import {
39
39
  SyncAffiliateRequest,
40
40
  JoinEventRequest,
41
41
  GetEventRequest,
42
+ GetEventMatchRequest,
42
43
  } from "./request.types";
43
44
  import {
44
45
  AddImagesResponse,
@@ -82,6 +83,7 @@ import {
82
83
  GetUserEventsResponse,
83
84
  JoinEventResponse,
84
85
  GetEventResponse,
86
+ GetEventMatchResponse,
85
87
  } from "./response.types";
86
88
 
87
89
  // Define a mapping of Cloud Functions to payload and response types
@@ -122,6 +124,10 @@ export type CloudFunctionTypes = {
122
124
  };
123
125
 
124
126
  // event
127
+ [CloudFunction.GET_EVENT_MATCH]: {
128
+ payload: GetEventMatchRequest;
129
+ response: GetEventMatchResponse;
130
+ };
125
131
  [CloudFunction.GET_USER_EVENTS]: {
126
132
  payload: undefined;
127
133
  response: GetUserEventsResponse;
@@ -14,6 +14,7 @@ export type Event = {
14
14
  hostBrand: string;
15
15
  createdByRole: "operator" | "partner";
16
16
  eventDateTime: string; // should not be updated, see EventParticipation
17
+ status: "upcoming" | "ongoing" | "completed";
17
18
  location?: string;
18
19
  isCancelled?: boolean;
19
20
  maxParticipants?: number;
@@ -50,6 +50,9 @@ export type CollectBankIDRequest = {
50
50
  };
51
51
 
52
52
  // event
53
+ export type GetEventMatchRequest = {
54
+ eventId: string;
55
+ };
53
56
  export type JoinEventRequest = {
54
57
  inviteCode: string;
55
58
  };
@@ -1,5 +1,5 @@
1
1
  import { Submission, CategoryEvaluation } from "./submission.types";
2
- import { Event } from "./event.types";
2
+ import { Event, FullParticipant } from "./event.types";
3
3
  import { UserMatch } from "./match.types";
4
4
  import { MatchableUser, MatchCheck } from "./matchmaking.types";
5
5
  import { Message } from "./message.types";
@@ -10,7 +10,6 @@ import { CA } from "./ca.types";
10
10
  import { SelfAwareness } from "./sa.types";
11
11
  import { PLSScore } from "./pls.types";
12
12
  import { AdvancedMatch } from "./am.types";
13
- import { EventParticipation } from "./event.types";
14
13
 
15
14
  // affiliate
16
15
  export type SyncAffiliateResponse = void;
@@ -44,6 +43,7 @@ export type SubmitAnswerResponse = {
44
43
  export type SubmitCategoryFeedbackResponse = CategoryEvaluation;
45
44
 
46
45
  // event
46
+ export type GetEventMatchResponse = FullParticipant;
47
47
  export type GetUserEventsResponse = Event[];
48
48
  export type JoinEventResponse = Event;
49
49
  export type GetEventResponse = Event;