heartraite 1.0.221 → 1.0.222

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.
@@ -17,6 +17,7 @@ export declare enum CloudFunction {
17
17
  JOIN_EVENT = "event/join-event",
18
18
  GET_EVENT = "event/get-event",
19
19
  GET_PUBLIC_EVENTS = "event/get-public-events",
20
+ SET_EVENT_INTEREST = "event/set-interest",
20
21
  CREATE_CHECKOUT = "ticket/create-checkout",
21
22
  CONFIRM_ORDER = "ticket/confirm",
22
23
  ABANDON_ORDER = "ticket/abandon",
@@ -21,6 +21,7 @@ var CloudFunction;
21
21
  CloudFunction["JOIN_EVENT"] = "event/join-event";
22
22
  CloudFunction["GET_EVENT"] = "event/get-event";
23
23
  CloudFunction["GET_PUBLIC_EVENTS"] = "event/get-public-events";
24
+ CloudFunction["SET_EVENT_INTEREST"] = "event/set-interest";
24
25
  CloudFunction["CREATE_CHECKOUT"] = "ticket/create-checkout";
25
26
  CloudFunction["CONFIRM_ORDER"] = "ticket/confirm";
26
27
  CloudFunction["ABANDON_ORDER"] = "ticket/abandon";
@@ -1,6 +1,6 @@
1
1
  import { CloudFunction } from "../enum";
2
- import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest, CreateLikeRequest, CreatePLSInputRequest, CreatePLSSubmissionRequest, CreateReportRequest, DeleteUserRequest, GetCARequest, GetMatchableUserRequest, GetMatchCheckRequest, GetMatchesRequest, GetAdvancedMatchRequest, GetMessagesRequest, GetPLSSubmissionRequest, GetSelfAwarenessRequest, GetUserRequest, HandleLastMessageSeenRequest, HandleLikeSeenRequest, HandleMatchSeenRequest, RegisterOnboardingRequest, RegisterUserRequest, RemoveMatchRequest, SendMessageRequest, SubmitAnswerRequest, SubmitCategoryFeedbackRequest, SubmitPLSCategoryFeedbackRequest, SubmitPLSDemographicsRequest, UpdatePLSAnswerRequest, UpdateQuestionsRequest, UpdateUserRequest, SubmitFeedbackRequest, ExpressConsultationInterestRequest, GetMyConsultationInterestRequest, GetConsultationInterestsRequest, UpdateConsultationInterestRequest, SyncAffiliateRequest, JoinEventRequest, GetEventRequest, GetEventMatchRequest, SendEventFeedbackRequest, GetEventParticipantsRequest, GetPublicEventsRequest, CreateCheckoutRequest, ConfirmOrderRequest, AbandonOrderRequest } from "./request.types";
3
- import { AddImagesResponse, AuthenticateBankIDResponse, CollectBankIDResponse, CreateLikeResponse, CreatePLSInputResponse, CreatePLSSubmissionResponse, CreateReportResponse, DeleteUserResponse, GetCAResponse, GetMatchableUserResponse, GetMatchableUsersResponse, GetMatchCheckResponse, GetMatchesResponse, GetAdvancedMatchResponse, GetMessagesResponse, GetPLSSubmissionResponse, GetSelfAwarenessReponse, GetUserResponse, HandleLastMessageSeenResponse, HandleLikeSeenResponse, HandleMatchSeenResponse, RegisterOnboardingResponse, RegisterUserResponse, RemoveMatchResponse, SendMessageResponse, SubmitAnswerResponse, SubmitCategoryFeedbackResponse, SubmitPLSCategoryFeedbackResponse, SubmitPLSDemographicsResponse, UpdatePLSAnswerResponse, UpdateQuestionsResponse, UpdateUserResponse, SubmitFeedbackResponse, ExpressConsultationInterestResponse, GetMyConsultationInterestResponse, GetConsultationInterestsResponse, UpdateConsultationInterestResponse, SyncAffiliateResponse, GetUserEventsResponse, JoinEventResponse, GetEventResponse, GetEventMatchResponse, SendEventFeedbackResponse, GetEventParticipantsResponse, GetPublicEventsResponse, CreateCheckoutResponse, ConfirmOrderResponse, AbandonOrderResponse } from "./response.types";
2
+ import { AddImagesRequest, AuthenticateBankIDRequest, CollectBankIDRequest, CreateLikeRequest, CreatePLSInputRequest, CreatePLSSubmissionRequest, CreateReportRequest, DeleteUserRequest, GetCARequest, GetMatchableUserRequest, GetMatchCheckRequest, GetMatchesRequest, GetAdvancedMatchRequest, GetMessagesRequest, GetPLSSubmissionRequest, GetSelfAwarenessRequest, GetUserRequest, HandleLastMessageSeenRequest, HandleLikeSeenRequest, HandleMatchSeenRequest, RegisterOnboardingRequest, RegisterUserRequest, RemoveMatchRequest, SendMessageRequest, SubmitAnswerRequest, SubmitCategoryFeedbackRequest, SubmitPLSCategoryFeedbackRequest, SubmitPLSDemographicsRequest, UpdatePLSAnswerRequest, UpdateQuestionsRequest, UpdateUserRequest, SubmitFeedbackRequest, ExpressConsultationInterestRequest, GetMyConsultationInterestRequest, GetConsultationInterestsRequest, UpdateConsultationInterestRequest, SyncAffiliateRequest, JoinEventRequest, GetEventRequest, GetEventMatchRequest, SendEventFeedbackRequest, GetEventParticipantsRequest, GetPublicEventsRequest, SetEventInterestRequest, CreateCheckoutRequest, ConfirmOrderRequest, AbandonOrderRequest } from "./request.types";
3
+ import { AddImagesResponse, AuthenticateBankIDResponse, CollectBankIDResponse, CreateLikeResponse, CreatePLSInputResponse, CreatePLSSubmissionResponse, CreateReportResponse, DeleteUserResponse, GetCAResponse, GetMatchableUserResponse, GetMatchableUsersResponse, GetMatchCheckResponse, GetMatchesResponse, GetAdvancedMatchResponse, GetMessagesResponse, GetPLSSubmissionResponse, GetSelfAwarenessReponse, GetUserResponse, HandleLastMessageSeenResponse, HandleLikeSeenResponse, HandleMatchSeenResponse, RegisterOnboardingResponse, RegisterUserResponse, RemoveMatchResponse, SendMessageResponse, SubmitAnswerResponse, SubmitCategoryFeedbackResponse, SubmitPLSCategoryFeedbackResponse, SubmitPLSDemographicsResponse, UpdatePLSAnswerResponse, UpdateQuestionsResponse, UpdateUserResponse, SubmitFeedbackResponse, ExpressConsultationInterestResponse, GetMyConsultationInterestResponse, GetConsultationInterestsResponse, UpdateConsultationInterestResponse, SyncAffiliateResponse, GetUserEventsResponse, JoinEventResponse, GetEventResponse, GetEventMatchResponse, SendEventFeedbackResponse, GetEventParticipantsResponse, GetPublicEventsResponse, SetEventInterestResponse, CreateCheckoutResponse, ConfirmOrderResponse, AbandonOrderResponse } from "./response.types";
4
4
  /**
5
5
  * @deprecated This function is deprecated.
6
6
  * Use `CloudFunctionTypes` inside application code instead.
@@ -63,6 +63,10 @@ export type CloudFunctionTypes = {
63
63
  payload: GetPublicEventsRequest;
64
64
  response: GetPublicEventsResponse;
65
65
  };
66
+ [CloudFunction.SET_EVENT_INTEREST]: {
67
+ payload: SetEventInterestRequest;
68
+ response: SetEventInterestResponse;
69
+ };
66
70
  [CloudFunction.CREATE_CHECKOUT]: {
67
71
  payload: CreateCheckoutRequest;
68
72
  response: CreateCheckoutResponse;
@@ -0,0 +1,20 @@
1
+ import { Gender, Market, UserLanguage } from "../enum";
2
+ export type EventInterestSource = "scheduled" | "on_sale" | "sold_out" | "sales_closed" | "out_of_age_range" | "outside_area" | "assessment_required";
3
+ export type EventInterestAgeBand = "18-24" | "25-34" | "35-44" | "45-54" | "55-64" | "65+";
4
+ export type EventInterest = {
5
+ id: string;
6
+ eventId: string;
7
+ userId: string;
8
+ createdAt: string;
9
+ updatedAt: string;
10
+ source: EventInterestSource;
11
+ snapshot: {
12
+ gender: Gender;
13
+ market: Market;
14
+ state?: string;
15
+ ageBand: EventInterestAgeBand;
16
+ language: UserLanguage;
17
+ };
18
+ notified?: Partial<Record<"sales_opened" | "seat_freed", string>>;
19
+ };
20
+ export type EventInterestView = Pick<EventInterest, "eventId" | "createdAt" | "source">;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -64,6 +64,7 @@ export type EventIneligibleReason = "outside_area" | "out_of_age_range" | "asses
64
64
  export type EventUserOrderStatus = "none" | "pending" | "paid";
65
65
  type EventOfferDetails = Pick<Event, "id" | "title" | "description" | "hostBrand" | "eventDateTime" | "matchRevealTime" | "location" | "city" | "access"> & Required<Pick<Event, "priceOre" | "currency" | "salesOpenAt" | "salesCloseAt">> & Pick<EventEligibility, "minAge" | "maxAge"> & {
66
66
  userOrderStatus?: EventUserOrderStatus;
67
+ userInterested?: boolean;
67
68
  };
68
69
  export type EventOffer = EventOfferDetails & ({
69
70
  availability: Exclude<EventAvailability, "not_eligible">;
@@ -6,6 +6,7 @@ export * from "./consultation.types";
6
6
  export * from "./dq.types";
7
7
  export * from "./error.types";
8
8
  export * from "./event.types";
9
+ export * from "./event-interest.types";
9
10
  export * from "./feedback.types";
10
11
  export * from "./helper.types";
11
12
  export * from "./like.types";
@@ -22,6 +22,7 @@ __exportStar(require("./consultation.types"), exports);
22
22
  __exportStar(require("./dq.types"), exports);
23
23
  __exportStar(require("./error.types"), exports);
24
24
  __exportStar(require("./event.types"), exports);
25
+ __exportStar(require("./event-interest.types"), exports);
25
26
  __exportStar(require("./feedback.types"), exports);
26
27
  __exportStar(require("./helper.types"), exports);
27
28
  __exportStar(require("./like.types"), exports);
@@ -58,6 +58,10 @@ export type GetEventParticipantsRequest = {
58
58
  eventId: string;
59
59
  };
60
60
  export type GetPublicEventsRequest = undefined;
61
+ export type SetEventInterestRequest = {
62
+ eventId: string;
63
+ interested: boolean;
64
+ };
61
65
  export type CreateCheckoutRequest = {
62
66
  eventId: string;
63
67
  };
@@ -1,6 +1,7 @@
1
1
  import { ConsultationInterest, ConsultationInterestSummary } from "./consultation.types";
2
2
  import { Submission, CategoryEvaluation } from "./submission.types";
3
3
  import { Event, EventOffer, FullParticipant, FullParticipantWithCS } from "./event.types";
4
+ import { EventInterestView } from "./event-interest.types";
4
5
  import { EventOrderView } from "./ticket.types";
5
6
  import { UserMatch } from "./match.types";
6
7
  import { MatchableUser, MatchCheck } from "./matchmaking.types";
@@ -48,6 +49,7 @@ export type GetEventParticipantsResponse = {
48
49
  eventMatchIds: string[];
49
50
  };
50
51
  export type GetPublicEventsResponse = EventOffer[];
52
+ export type SetEventInterestResponse = EventInterestView | null;
51
53
  export type CreateCheckoutResponse = {
52
54
  orderId: string;
53
55
  checkoutUrl: string;
@@ -1,7 +1,7 @@
1
1
  import { Gender } from "../enum";
2
2
  import { EventCurrency } from "./event.types";
3
3
  export type EventOrderStatus = "pending" | "paid" | "expired" | "abandoned" | "cancelled" | "refund_pending" | "refunded" | "refund_failed";
4
- export type EventOrderKind = "paid" | "comp";
4
+ export type EventOrderKind = "paid" | "comp" | "free";
5
5
  export type EventOrderRefundReason = "user_cancel" | "event_cancelled" | "admin" | "deletion" | "oversold";
6
6
  export type EventOrderRefundStatus = "pending" | "succeeded" | "failed";
7
7
  export type EventOrderRefund = {
@@ -31,7 +31,7 @@ export type EventOrder = {
31
31
  stripeCheckoutSessionId?: string;
32
32
  stripePaymentIntentId?: string;
33
33
  createdAt: string;
34
- expiresAt: string;
34
+ expiresAt?: string;
35
35
  paidAt?: string;
36
36
  cancelledAt?: string;
37
37
  refund?: EventOrderRefund;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.221",
3
+ "version": "1.0.222",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,6 +17,7 @@ export enum CloudFunction {
17
17
  JOIN_EVENT = "event/join-event",
18
18
  GET_EVENT = "event/get-event",
19
19
  GET_PUBLIC_EVENTS = "event/get-public-events",
20
+ SET_EVENT_INTEREST = "event/set-interest",
20
21
  CREATE_CHECKOUT = "ticket/create-checkout",
21
22
  CONFIRM_ORDER = "ticket/confirm",
22
23
  ABANDON_ORDER = "ticket/abandon",
@@ -43,6 +43,7 @@ import {
43
43
  SendEventFeedbackRequest,
44
44
  GetEventParticipantsRequest,
45
45
  GetPublicEventsRequest,
46
+ SetEventInterestRequest,
46
47
  CreateCheckoutRequest,
47
48
  ConfirmOrderRequest,
48
49
  AbandonOrderRequest,
@@ -93,6 +94,7 @@ import {
93
94
  SendEventFeedbackResponse,
94
95
  GetEventParticipantsResponse,
95
96
  GetPublicEventsResponse,
97
+ SetEventInterestResponse,
96
98
  CreateCheckoutResponse,
97
99
  ConfirmOrderResponse,
98
100
  AbandonOrderResponse,
@@ -168,6 +170,10 @@ export type CloudFunctionTypes = {
168
170
  payload: GetPublicEventsRequest;
169
171
  response: GetPublicEventsResponse;
170
172
  };
173
+ [CloudFunction.SET_EVENT_INTEREST]: {
174
+ payload: SetEventInterestRequest;
175
+ response: SetEventInterestResponse;
176
+ };
171
177
  [CloudFunction.CREATE_CHECKOUT]: {
172
178
  payload: CreateCheckoutRequest;
173
179
  response: CreateCheckoutResponse;
@@ -0,0 +1,40 @@
1
+ import { Gender, Market, UserLanguage } from "../enum";
2
+
3
+ export type EventInterestSource =
4
+ | "scheduled"
5
+ | "on_sale"
6
+ | "sold_out"
7
+ | "sales_closed"
8
+ | "out_of_age_range"
9
+ | "outside_area"
10
+ | "assessment_required";
11
+
12
+ export type EventInterestAgeBand =
13
+ | "18-24"
14
+ | "25-34"
15
+ | "35-44"
16
+ | "45-54"
17
+ | "55-64"
18
+ | "65+";
19
+
20
+ export type EventInterest = {
21
+ id: string;
22
+ eventId: string;
23
+ userId: string;
24
+ createdAt: string;
25
+ updatedAt: string;
26
+ source: EventInterestSource;
27
+ snapshot: {
28
+ gender: Gender;
29
+ market: Market;
30
+ state?: string;
31
+ ageBand: EventInterestAgeBand;
32
+ language: UserLanguage;
33
+ };
34
+ notified?: Partial<Record<"sales_opened" | "seat_freed", string>>;
35
+ };
36
+
37
+ export type EventInterestView = Pick<
38
+ EventInterest,
39
+ "eventId" | "createdAt" | "source"
40
+ >;
@@ -100,6 +100,7 @@ type EventOfferDetails = Pick<
100
100
  > &
101
101
  Pick<EventEligibility, "minAge" | "maxAge"> & {
102
102
  userOrderStatus?: EventUserOrderStatus;
103
+ userInterested?: boolean;
103
104
  };
104
105
 
105
106
  export type EventOffer = EventOfferDetails &
@@ -6,6 +6,7 @@ export * from "./consultation.types";
6
6
  export * from "./dq.types";
7
7
  export * from "./error.types";
8
8
  export * from "./event.types";
9
+ export * from "./event-interest.types";
9
10
  export * from "./feedback.types";
10
11
  export * from "./helper.types";
11
12
  export * from "./like.types";
@@ -84,6 +84,10 @@ export type GetEventParticipantsRequest = {
84
84
  eventId: string;
85
85
  };
86
86
  export type GetPublicEventsRequest = undefined;
87
+ export type SetEventInterestRequest = {
88
+ eventId: string;
89
+ interested: boolean;
90
+ };
87
91
  export type CreateCheckoutRequest = {
88
92
  eventId: string;
89
93
  };
@@ -9,6 +9,7 @@ import {
9
9
  FullParticipant,
10
10
  FullParticipantWithCS,
11
11
  } from "./event.types";
12
+ import { EventInterestView } from "./event-interest.types";
12
13
  import { EventOrderView } from "./ticket.types";
13
14
  import { UserMatch } from "./match.types";
14
15
  import { MatchableUser, MatchCheck } from "./matchmaking.types";
@@ -67,6 +68,7 @@ export type GetEventParticipantsResponse = {
67
68
  eventMatchIds: string[];
68
69
  };
69
70
  export type GetPublicEventsResponse = EventOffer[];
71
+ export type SetEventInterestResponse = EventInterestView | null;
70
72
  export type CreateCheckoutResponse = {
71
73
  orderId: string;
72
74
  checkoutUrl: string;
@@ -11,7 +11,7 @@ export type EventOrderStatus =
11
11
  | "refunded"
12
12
  | "refund_failed";
13
13
 
14
- export type EventOrderKind = "paid" | "comp";
14
+ export type EventOrderKind = "paid" | "comp" | "free";
15
15
 
16
16
  export type EventOrderRefundReason =
17
17
  | "user_cancel"
@@ -52,7 +52,7 @@ export type EventOrder = {
52
52
  stripeCheckoutSessionId?: string;
53
53
  stripePaymentIntentId?: string;
54
54
  createdAt: string;
55
- expiresAt: string;
55
+ expiresAt?: string;
56
56
  paidAt?: string;
57
57
  cancelledAt?: string;
58
58
  refund?: EventOrderRefund;