heartraite 1.0.220 → 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.
- package/dist/enum/cloudfunction.enum.d.ts +1 -0
- package/dist/enum/cloudfunction.enum.js +1 -0
- package/dist/types/cloud-function-types.d.ts +6 -2
- package/dist/types/event-interest.types.d.ts +20 -0
- package/dist/types/event-interest.types.js +2 -0
- package/dist/types/event.types.d.ts +22 -8
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/request.types.d.ts +4 -0
- package/dist/types/response.types.d.ts +2 -0
- package/dist/types/ticket.types.d.ts +2 -2
- package/package.json +1 -1
- package/src/enum/cloudfunction.enum.ts +1 -0
- package/src/types/cloud-function-types.ts +6 -0
- package/src/types/event-interest.types.ts +40 -0
- package/src/types/event.types.ts +40 -11
- package/src/types/index.ts +1 -0
- package/src/types/request.types.ts +4 -0
- package/src/types/response.types.ts +2 -0
- package/src/types/ticket.types.ts +2 -2
|
@@ -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">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CAStatus, Gender, MatchmakingMode } from "../enum";
|
|
1
|
+
import { CAStatus, Gender, Market, MatchmakingMode } from "../enum";
|
|
2
2
|
import { CompatibilitySummary } from "./matchmaking.types";
|
|
3
3
|
type UserId = string;
|
|
4
4
|
export declare enum EventAccess {
|
|
@@ -26,10 +26,9 @@ export type Event = {
|
|
|
26
26
|
lastUpdated: string;
|
|
27
27
|
access: EventAccess;
|
|
28
28
|
lastCAReminderAt?: string;
|
|
29
|
+
homeMarket?: Market;
|
|
29
30
|
city?: string;
|
|
30
|
-
|
|
31
|
-
minAge?: number;
|
|
32
|
-
maxAge?: number;
|
|
31
|
+
eligibility?: EventEligibility;
|
|
33
32
|
priceOre?: number;
|
|
34
33
|
currency?: EventCurrency;
|
|
35
34
|
capacity?: EventCapacity;
|
|
@@ -39,6 +38,14 @@ export type Event = {
|
|
|
39
38
|
salesCloseAt?: string;
|
|
40
39
|
decisionAt?: string;
|
|
41
40
|
};
|
|
41
|
+
export type EventEligibilityInterest = "opposite_gender";
|
|
42
|
+
export type EventEligibility = {
|
|
43
|
+
markets?: Market[];
|
|
44
|
+
states?: string[];
|
|
45
|
+
minAge?: number;
|
|
46
|
+
maxAge?: number;
|
|
47
|
+
interest?: EventEligibilityInterest;
|
|
48
|
+
};
|
|
42
49
|
export type EventCurrency = "SEK";
|
|
43
50
|
export type EventCapacity = {
|
|
44
51
|
male: number;
|
|
@@ -52,13 +59,20 @@ export type EventSeats = {
|
|
|
52
59
|
male: EventSeatCount;
|
|
53
60
|
female: EventSeatCount;
|
|
54
61
|
};
|
|
55
|
-
export type
|
|
62
|
+
export type EventAvailability = "scheduled" | "on_sale" | "sold_out_for_you" | "sales_closed" | "not_eligible";
|
|
63
|
+
export type EventIneligibleReason = "outside_area" | "out_of_age_range" | "assessment_required";
|
|
56
64
|
export type EventUserOrderStatus = "none" | "pending" | "paid";
|
|
57
|
-
|
|
58
|
-
saleState: EventSaleState;
|
|
59
|
-
seatsLeftForUser?: number;
|
|
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"> & {
|
|
60
66
|
userOrderStatus?: EventUserOrderStatus;
|
|
67
|
+
userInterested?: boolean;
|
|
61
68
|
};
|
|
69
|
+
export type EventOffer = EventOfferDetails & ({
|
|
70
|
+
availability: Exclude<EventAvailability, "not_eligible">;
|
|
71
|
+
ineligibleReason?: never;
|
|
72
|
+
} | {
|
|
73
|
+
availability: "not_eligible";
|
|
74
|
+
ineligibleReason: EventIneligibleReason;
|
|
75
|
+
});
|
|
62
76
|
export type EventParticipation = {
|
|
63
77
|
eventId: string;
|
|
64
78
|
userId: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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";
|
package/dist/types/index.js
CHANGED
|
@@ -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
|
|
34
|
+
expiresAt?: string;
|
|
35
35
|
paidAt?: string;
|
|
36
36
|
cancelledAt?: string;
|
|
37
37
|
refund?: EventOrderRefund;
|
package/package.json
CHANGED
|
@@ -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
|
+
>;
|
package/src/types/event.types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CAStatus, Gender, MatchmakingMode } from "../enum";
|
|
1
|
+
import { CAStatus, Gender, Market, MatchmakingMode } from "../enum";
|
|
2
2
|
import { CompatibilitySummary } from "./matchmaking.types";
|
|
3
3
|
|
|
4
4
|
type UserId = string;
|
|
@@ -29,10 +29,9 @@ export type Event = {
|
|
|
29
29
|
lastUpdated: string;
|
|
30
30
|
access: EventAccess;
|
|
31
31
|
lastCAReminderAt?: string;
|
|
32
|
+
homeMarket?: Market;
|
|
32
33
|
city?: string;
|
|
33
|
-
|
|
34
|
-
minAge?: number;
|
|
35
|
-
maxAge?: number;
|
|
34
|
+
eligibility?: EventEligibility;
|
|
36
35
|
priceOre?: number;
|
|
37
36
|
currency?: EventCurrency;
|
|
38
37
|
capacity?: EventCapacity;
|
|
@@ -43,6 +42,16 @@ export type Event = {
|
|
|
43
42
|
decisionAt?: string;
|
|
44
43
|
};
|
|
45
44
|
|
|
45
|
+
export type EventEligibilityInterest = "opposite_gender";
|
|
46
|
+
|
|
47
|
+
export type EventEligibility = {
|
|
48
|
+
markets?: Market[];
|
|
49
|
+
states?: string[];
|
|
50
|
+
minAge?: number;
|
|
51
|
+
maxAge?: number;
|
|
52
|
+
interest?: EventEligibilityInterest;
|
|
53
|
+
};
|
|
54
|
+
|
|
46
55
|
export type EventCurrency = "SEK";
|
|
47
56
|
|
|
48
57
|
export type EventCapacity = {
|
|
@@ -60,11 +69,21 @@ export type EventSeats = {
|
|
|
60
69
|
female: EventSeatCount;
|
|
61
70
|
};
|
|
62
71
|
|
|
63
|
-
export type
|
|
72
|
+
export type EventAvailability =
|
|
73
|
+
| "scheduled"
|
|
74
|
+
| "on_sale"
|
|
75
|
+
| "sold_out_for_you"
|
|
76
|
+
| "sales_closed"
|
|
77
|
+
| "not_eligible";
|
|
78
|
+
|
|
79
|
+
export type EventIneligibleReason =
|
|
80
|
+
| "outside_area"
|
|
81
|
+
| "out_of_age_range"
|
|
82
|
+
| "assessment_required";
|
|
64
83
|
|
|
65
84
|
export type EventUserOrderStatus = "none" | "pending" | "paid";
|
|
66
85
|
|
|
67
|
-
|
|
86
|
+
type EventOfferDetails = Pick<
|
|
68
87
|
Event,
|
|
69
88
|
| "id"
|
|
70
89
|
| "title"
|
|
@@ -74,18 +93,28 @@ export type EventOffer = Pick<
|
|
|
74
93
|
| "matchRevealTime"
|
|
75
94
|
| "location"
|
|
76
95
|
| "city"
|
|
77
|
-
| "minAge"
|
|
78
|
-
| "maxAge"
|
|
79
96
|
| "access"
|
|
80
97
|
> &
|
|
81
98
|
Required<
|
|
82
99
|
Pick<Event, "priceOre" | "currency" | "salesOpenAt" | "salesCloseAt">
|
|
83
|
-
> &
|
|
84
|
-
|
|
85
|
-
seatsLeftForUser?: number;
|
|
100
|
+
> &
|
|
101
|
+
Pick<EventEligibility, "minAge" | "maxAge"> & {
|
|
86
102
|
userOrderStatus?: EventUserOrderStatus;
|
|
103
|
+
userInterested?: boolean;
|
|
87
104
|
};
|
|
88
105
|
|
|
106
|
+
export type EventOffer = EventOfferDetails &
|
|
107
|
+
(
|
|
108
|
+
| {
|
|
109
|
+
availability: Exclude<EventAvailability, "not_eligible">;
|
|
110
|
+
ineligibleReason?: never;
|
|
111
|
+
}
|
|
112
|
+
| {
|
|
113
|
+
availability: "not_eligible";
|
|
114
|
+
ineligibleReason: EventIneligibleReason;
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
|
|
89
118
|
export type EventParticipation = {
|
|
90
119
|
eventId: string;
|
|
91
120
|
userId: string;
|
package/src/types/index.ts
CHANGED
|
@@ -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
|
|
55
|
+
expiresAt?: string;
|
|
56
56
|
paidAt?: string;
|
|
57
57
|
cancelledAt?: string;
|
|
58
58
|
refund?: EventOrderRefund;
|