heartraite 1.0.218 → 1.0.220
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/app-route.enum.d.ts +1 -0
- package/dist/enum/app-route.enum.js +1 -0
- package/dist/enum/cloudfunction.enum.d.ts +4 -0
- package/dist/enum/cloudfunction.enum.js +4 -0
- package/dist/types/cloud-function-types.d.ts +18 -2
- package/dist/types/event.types.d.ts +34 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/request.types.d.ts +12 -0
- package/dist/types/response.types.d.ts +10 -1
- package/dist/types/ticket.types.d.ts +45 -0
- package/dist/types/ticket.types.js +2 -0
- package/package.json +1 -1
- package/src/enum/app-route.enum.ts +1 -0
- package/src/enum/cloudfunction.enum.ts +4 -0
- package/src/types/cloud-function-types.ts +24 -0
- package/src/types/event.types.ts +57 -1
- package/src/types/index.ts +1 -0
- package/src/types/request.types.ts +12 -0
- package/src/types/response.types.ts +15 -1
- package/src/types/ticket.types.ts +83 -0
|
@@ -26,6 +26,7 @@ var AppRoute;
|
|
|
26
26
|
AppRoute["TERMS_PRIVACY"] = "terms_privacy";
|
|
27
27
|
AppRoute["EVENTS"] = "events";
|
|
28
28
|
AppRoute["EVENT_DETAILS"] = "event_details";
|
|
29
|
+
AppRoute["EVENT_OFFER"] = "event_offer";
|
|
29
30
|
AppRoute["EVENT_FEEDBACK"] = "event_feedback";
|
|
30
31
|
AppRoute["JOIN_EVENT"] = "join_event";
|
|
31
32
|
AppRoute["CHAT"] = "chat";
|
|
@@ -16,6 +16,10 @@ export declare enum CloudFunction {
|
|
|
16
16
|
GET_USER_EVENTS = "event/get-user-events",
|
|
17
17
|
JOIN_EVENT = "event/join-event",
|
|
18
18
|
GET_EVENT = "event/get-event",
|
|
19
|
+
GET_PUBLIC_EVENTS = "event/get-public-events",
|
|
20
|
+
CREATE_CHECKOUT = "ticket/create-checkout",
|
|
21
|
+
CONFIRM_ORDER = "ticket/confirm",
|
|
22
|
+
ABANDON_ORDER = "ticket/abandon",
|
|
19
23
|
SUBMIT_CATEGORY_FEEDBACK = "ca/submit-category-feedback",
|
|
20
24
|
CREATE_LIKE = "like/create-like",
|
|
21
25
|
HANDLE_LIKE_SEEN = "like/handle-like-seen",
|
|
@@ -20,6 +20,10 @@ var CloudFunction;
|
|
|
20
20
|
CloudFunction["GET_USER_EVENTS"] = "event/get-user-events";
|
|
21
21
|
CloudFunction["JOIN_EVENT"] = "event/join-event";
|
|
22
22
|
CloudFunction["GET_EVENT"] = "event/get-event";
|
|
23
|
+
CloudFunction["GET_PUBLIC_EVENTS"] = "event/get-public-events";
|
|
24
|
+
CloudFunction["CREATE_CHECKOUT"] = "ticket/create-checkout";
|
|
25
|
+
CloudFunction["CONFIRM_ORDER"] = "ticket/confirm";
|
|
26
|
+
CloudFunction["ABANDON_ORDER"] = "ticket/abandon";
|
|
23
27
|
CloudFunction["SUBMIT_CATEGORY_FEEDBACK"] = "ca/submit-category-feedback";
|
|
24
28
|
CloudFunction["CREATE_LIKE"] = "like/create-like";
|
|
25
29
|
CloudFunction["HANDLE_LIKE_SEEN"] = "like/handle-like-seen";
|
|
@@ -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 } 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 } 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, 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";
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated This function is deprecated.
|
|
6
6
|
* Use `CloudFunctionTypes` inside application code instead.
|
|
@@ -59,6 +59,22 @@ export type CloudFunctionTypes = {
|
|
|
59
59
|
payload: GetEventRequest;
|
|
60
60
|
response: GetEventResponse;
|
|
61
61
|
};
|
|
62
|
+
[CloudFunction.GET_PUBLIC_EVENTS]: {
|
|
63
|
+
payload: GetPublicEventsRequest;
|
|
64
|
+
response: GetPublicEventsResponse;
|
|
65
|
+
};
|
|
66
|
+
[CloudFunction.CREATE_CHECKOUT]: {
|
|
67
|
+
payload: CreateCheckoutRequest;
|
|
68
|
+
response: CreateCheckoutResponse;
|
|
69
|
+
};
|
|
70
|
+
[CloudFunction.CONFIRM_ORDER]: {
|
|
71
|
+
payload: ConfirmOrderRequest;
|
|
72
|
+
response: ConfirmOrderResponse;
|
|
73
|
+
};
|
|
74
|
+
[CloudFunction.ABANDON_ORDER]: {
|
|
75
|
+
payload: AbandonOrderRequest;
|
|
76
|
+
response: AbandonOrderResponse;
|
|
77
|
+
};
|
|
62
78
|
[CloudFunction.SUBMIT_FEEDBACK]: {
|
|
63
79
|
payload: SubmitFeedbackRequest;
|
|
64
80
|
response: SubmitFeedbackResponse;
|
|
@@ -8,7 +8,7 @@ export declare enum EventAccess {
|
|
|
8
8
|
export type Event = {
|
|
9
9
|
id: string;
|
|
10
10
|
title: string;
|
|
11
|
-
inviteCode
|
|
11
|
+
inviteCode?: string;
|
|
12
12
|
description?: string;
|
|
13
13
|
createdBy: string;
|
|
14
14
|
hostBrand: string;
|
|
@@ -26,6 +26,38 @@ export type Event = {
|
|
|
26
26
|
lastUpdated: string;
|
|
27
27
|
access: EventAccess;
|
|
28
28
|
lastCAReminderAt?: string;
|
|
29
|
+
city?: string;
|
|
30
|
+
eligibleStates?: string[];
|
|
31
|
+
minAge?: number;
|
|
32
|
+
maxAge?: number;
|
|
33
|
+
priceOre?: number;
|
|
34
|
+
currency?: EventCurrency;
|
|
35
|
+
capacity?: EventCapacity;
|
|
36
|
+
seats?: EventSeats;
|
|
37
|
+
published?: boolean;
|
|
38
|
+
salesOpenAt?: string;
|
|
39
|
+
salesCloseAt?: string;
|
|
40
|
+
decisionAt?: string;
|
|
41
|
+
};
|
|
42
|
+
export type EventCurrency = "SEK";
|
|
43
|
+
export type EventCapacity = {
|
|
44
|
+
male: number;
|
|
45
|
+
female: number;
|
|
46
|
+
};
|
|
47
|
+
export type EventSeatCount = {
|
|
48
|
+
held: number;
|
|
49
|
+
sold: number;
|
|
50
|
+
};
|
|
51
|
+
export type EventSeats = {
|
|
52
|
+
male: EventSeatCount;
|
|
53
|
+
female: EventSeatCount;
|
|
54
|
+
};
|
|
55
|
+
export type EventSaleState = "on_sale" | "sold_out_for_you";
|
|
56
|
+
export type EventUserOrderStatus = "none" | "pending" | "paid";
|
|
57
|
+
export type EventOffer = Pick<Event, "id" | "title" | "description" | "hostBrand" | "eventDateTime" | "matchRevealTime" | "location" | "city" | "minAge" | "maxAge" | "access"> & Required<Pick<Event, "priceOre" | "currency" | "salesOpenAt" | "salesCloseAt">> & {
|
|
58
|
+
saleState: EventSaleState;
|
|
59
|
+
seatsLeftForUser?: number;
|
|
60
|
+
userOrderStatus?: EventUserOrderStatus;
|
|
29
61
|
};
|
|
30
62
|
export type EventParticipation = {
|
|
31
63
|
eventId: string;
|
|
@@ -37,6 +69,7 @@ export type EventParticipation = {
|
|
|
37
69
|
role: "attendee" | "host" | "admin";
|
|
38
70
|
status: "confirmed" | "pending" | "cancelled";
|
|
39
71
|
mode: MatchmakingMode;
|
|
72
|
+
checkedInAt?: string;
|
|
40
73
|
};
|
|
41
74
|
export type FullParticipant = EventParticipation & {
|
|
42
75
|
firstName: string;
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -57,6 +57,16 @@ export type GetEventRequest = {
|
|
|
57
57
|
export type GetEventParticipantsRequest = {
|
|
58
58
|
eventId: string;
|
|
59
59
|
};
|
|
60
|
+
export type GetPublicEventsRequest = undefined;
|
|
61
|
+
export type CreateCheckoutRequest = {
|
|
62
|
+
eventId: string;
|
|
63
|
+
};
|
|
64
|
+
export type ConfirmOrderRequest = {
|
|
65
|
+
sessionId: string;
|
|
66
|
+
};
|
|
67
|
+
export type AbandonOrderRequest = {
|
|
68
|
+
eventId: string;
|
|
69
|
+
};
|
|
60
70
|
export type SubmitFeedbackRequest = {
|
|
61
71
|
message: string;
|
|
62
72
|
type: FeedbackType;
|
|
@@ -213,6 +223,8 @@ export type UpdateUserRequest = {
|
|
|
213
223
|
lng: number;
|
|
214
224
|
};
|
|
215
225
|
appVersion?: string;
|
|
226
|
+
otaUpdateId?: string;
|
|
227
|
+
runtimeVersion?: string;
|
|
216
228
|
settings?: DeepPartial<UserSettings>;
|
|
217
229
|
consent?: DeepPartial<UserConsents>;
|
|
218
230
|
device?: DeepPartial<UserDevice>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ConsultationInterest, ConsultationInterestSummary } from "./consultation.types";
|
|
2
2
|
import { Submission, CategoryEvaluation } from "./submission.types";
|
|
3
|
-
import { Event, FullParticipant, FullParticipantWithCS } from "./event.types";
|
|
3
|
+
import { Event, EventOffer, FullParticipant, FullParticipantWithCS } from "./event.types";
|
|
4
|
+
import { EventOrderView } from "./ticket.types";
|
|
4
5
|
import { UserMatch } from "./match.types";
|
|
5
6
|
import { MatchableUser, MatchCheck } from "./matchmaking.types";
|
|
6
7
|
import { Message } from "./message.types";
|
|
@@ -46,6 +47,14 @@ export type GetEventParticipantsResponse = {
|
|
|
46
47
|
eventMatchId: string | null;
|
|
47
48
|
eventMatchIds: string[];
|
|
48
49
|
};
|
|
50
|
+
export type GetPublicEventsResponse = EventOffer[];
|
|
51
|
+
export type CreateCheckoutResponse = {
|
|
52
|
+
orderId: string;
|
|
53
|
+
checkoutUrl: string;
|
|
54
|
+
expiresAt: string;
|
|
55
|
+
};
|
|
56
|
+
export type ConfirmOrderResponse = EventOrderView;
|
|
57
|
+
export type AbandonOrderResponse = void;
|
|
49
58
|
export type SubmitFeedbackResponse = undefined;
|
|
50
59
|
export type ExpressConsultationInterestResponse = ConsultationInterestSummary;
|
|
51
60
|
export type GetMyConsultationInterestResponse = ConsultationInterestSummary;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Gender } from "../enum";
|
|
2
|
+
import { EventCurrency } from "./event.types";
|
|
3
|
+
export type EventOrderStatus = "pending" | "paid" | "expired" | "abandoned" | "cancelled" | "refund_pending" | "refunded" | "refund_failed";
|
|
4
|
+
export type EventOrderKind = "paid" | "comp";
|
|
5
|
+
export type EventOrderRefundReason = "user_cancel" | "event_cancelled" | "admin" | "deletion" | "oversold";
|
|
6
|
+
export type EventOrderRefundStatus = "pending" | "succeeded" | "failed";
|
|
7
|
+
export type EventOrderRefund = {
|
|
8
|
+
stripeRefundId?: string;
|
|
9
|
+
amountOre: number;
|
|
10
|
+
reason: EventOrderRefundReason;
|
|
11
|
+
requestedAt: string;
|
|
12
|
+
status: EventOrderRefundStatus;
|
|
13
|
+
failedAt?: string;
|
|
14
|
+
};
|
|
15
|
+
export type EventOrderMessageChannel = "push" | "email" | "iam";
|
|
16
|
+
export type EventOrderBuyerSnapshot = {
|
|
17
|
+
firstName: string;
|
|
18
|
+
email: string;
|
|
19
|
+
};
|
|
20
|
+
export type EventOrder = {
|
|
21
|
+
id: string;
|
|
22
|
+
eventId: string;
|
|
23
|
+
userId: string;
|
|
24
|
+
kind: EventOrderKind;
|
|
25
|
+
status: EventOrderStatus;
|
|
26
|
+
gender: Gender;
|
|
27
|
+
amountOre: number;
|
|
28
|
+
currency: EventCurrency;
|
|
29
|
+
priceSnapshotOre: number;
|
|
30
|
+
stripeProductId?: string;
|
|
31
|
+
stripeCheckoutSessionId?: string;
|
|
32
|
+
stripePaymentIntentId?: string;
|
|
33
|
+
createdAt: string;
|
|
34
|
+
expiresAt: string;
|
|
35
|
+
paidAt?: string;
|
|
36
|
+
cancelledAt?: string;
|
|
37
|
+
refund?: EventOrderRefund;
|
|
38
|
+
messages?: Record<string, Partial<Record<EventOrderMessageChannel, string>>>;
|
|
39
|
+
buyerSnapshot: EventOrderBuyerSnapshot;
|
|
40
|
+
deletedUser?: boolean;
|
|
41
|
+
};
|
|
42
|
+
export type EventOrderRefundView = Pick<EventOrderRefund, "amountOre" | "status" | "requestedAt">;
|
|
43
|
+
export type EventOrderView = Pick<EventOrder, "id" | "eventId" | "kind" | "status" | "amountOre" | "currency" | "createdAt" | "expiresAt" | "paidAt" | "cancelledAt"> & {
|
|
44
|
+
refund?: EventOrderRefundView;
|
|
45
|
+
};
|
package/package.json
CHANGED
|
@@ -16,6 +16,10 @@ export enum CloudFunction {
|
|
|
16
16
|
GET_USER_EVENTS = "event/get-user-events",
|
|
17
17
|
JOIN_EVENT = "event/join-event",
|
|
18
18
|
GET_EVENT = "event/get-event",
|
|
19
|
+
GET_PUBLIC_EVENTS = "event/get-public-events",
|
|
20
|
+
CREATE_CHECKOUT = "ticket/create-checkout",
|
|
21
|
+
CONFIRM_ORDER = "ticket/confirm",
|
|
22
|
+
ABANDON_ORDER = "ticket/abandon",
|
|
19
23
|
SUBMIT_CATEGORY_FEEDBACK = "ca/submit-category-feedback",
|
|
20
24
|
CREATE_LIKE = "like/create-like",
|
|
21
25
|
HANDLE_LIKE_SEEN = "like/handle-like-seen",
|
|
@@ -42,6 +42,10 @@ import {
|
|
|
42
42
|
GetEventMatchRequest,
|
|
43
43
|
SendEventFeedbackRequest,
|
|
44
44
|
GetEventParticipantsRequest,
|
|
45
|
+
GetPublicEventsRequest,
|
|
46
|
+
CreateCheckoutRequest,
|
|
47
|
+
ConfirmOrderRequest,
|
|
48
|
+
AbandonOrderRequest,
|
|
45
49
|
} from "./request.types";
|
|
46
50
|
import {
|
|
47
51
|
AddImagesResponse,
|
|
@@ -88,6 +92,10 @@ import {
|
|
|
88
92
|
GetEventMatchResponse,
|
|
89
93
|
SendEventFeedbackResponse,
|
|
90
94
|
GetEventParticipantsResponse,
|
|
95
|
+
GetPublicEventsResponse,
|
|
96
|
+
CreateCheckoutResponse,
|
|
97
|
+
ConfirmOrderResponse,
|
|
98
|
+
AbandonOrderResponse,
|
|
91
99
|
} from "./response.types";
|
|
92
100
|
|
|
93
101
|
/**
|
|
@@ -156,6 +164,22 @@ export type CloudFunctionTypes = {
|
|
|
156
164
|
payload: GetEventRequest;
|
|
157
165
|
response: GetEventResponse;
|
|
158
166
|
};
|
|
167
|
+
[CloudFunction.GET_PUBLIC_EVENTS]: {
|
|
168
|
+
payload: GetPublicEventsRequest;
|
|
169
|
+
response: GetPublicEventsResponse;
|
|
170
|
+
};
|
|
171
|
+
[CloudFunction.CREATE_CHECKOUT]: {
|
|
172
|
+
payload: CreateCheckoutRequest;
|
|
173
|
+
response: CreateCheckoutResponse;
|
|
174
|
+
};
|
|
175
|
+
[CloudFunction.CONFIRM_ORDER]: {
|
|
176
|
+
payload: ConfirmOrderRequest;
|
|
177
|
+
response: ConfirmOrderResponse;
|
|
178
|
+
};
|
|
179
|
+
[CloudFunction.ABANDON_ORDER]: {
|
|
180
|
+
payload: AbandonOrderRequest;
|
|
181
|
+
response: AbandonOrderResponse;
|
|
182
|
+
};
|
|
159
183
|
|
|
160
184
|
// feedback
|
|
161
185
|
[CloudFunction.SUBMIT_FEEDBACK]: {
|
package/src/types/event.types.ts
CHANGED
|
@@ -11,7 +11,7 @@ export enum EventAccess {
|
|
|
11
11
|
export type Event = {
|
|
12
12
|
id: string;
|
|
13
13
|
title: string;
|
|
14
|
-
inviteCode
|
|
14
|
+
inviteCode?: string;
|
|
15
15
|
description?: string;
|
|
16
16
|
createdBy: string;
|
|
17
17
|
hostBrand: string;
|
|
@@ -29,8 +29,63 @@ export type Event = {
|
|
|
29
29
|
lastUpdated: string;
|
|
30
30
|
access: EventAccess;
|
|
31
31
|
lastCAReminderAt?: string;
|
|
32
|
+
city?: string;
|
|
33
|
+
eligibleStates?: string[];
|
|
34
|
+
minAge?: number;
|
|
35
|
+
maxAge?: number;
|
|
36
|
+
priceOre?: number;
|
|
37
|
+
currency?: EventCurrency;
|
|
38
|
+
capacity?: EventCapacity;
|
|
39
|
+
seats?: EventSeats;
|
|
40
|
+
published?: boolean;
|
|
41
|
+
salesOpenAt?: string;
|
|
42
|
+
salesCloseAt?: string;
|
|
43
|
+
decisionAt?: string;
|
|
32
44
|
};
|
|
33
45
|
|
|
46
|
+
export type EventCurrency = "SEK";
|
|
47
|
+
|
|
48
|
+
export type EventCapacity = {
|
|
49
|
+
male: number;
|
|
50
|
+
female: number;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type EventSeatCount = {
|
|
54
|
+
held: number;
|
|
55
|
+
sold: number;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export type EventSeats = {
|
|
59
|
+
male: EventSeatCount;
|
|
60
|
+
female: EventSeatCount;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export type EventSaleState = "on_sale" | "sold_out_for_you";
|
|
64
|
+
|
|
65
|
+
export type EventUserOrderStatus = "none" | "pending" | "paid";
|
|
66
|
+
|
|
67
|
+
export type EventOffer = Pick<
|
|
68
|
+
Event,
|
|
69
|
+
| "id"
|
|
70
|
+
| "title"
|
|
71
|
+
| "description"
|
|
72
|
+
| "hostBrand"
|
|
73
|
+
| "eventDateTime"
|
|
74
|
+
| "matchRevealTime"
|
|
75
|
+
| "location"
|
|
76
|
+
| "city"
|
|
77
|
+
| "minAge"
|
|
78
|
+
| "maxAge"
|
|
79
|
+
| "access"
|
|
80
|
+
> &
|
|
81
|
+
Required<
|
|
82
|
+
Pick<Event, "priceOre" | "currency" | "salesOpenAt" | "salesCloseAt">
|
|
83
|
+
> & {
|
|
84
|
+
saleState: EventSaleState;
|
|
85
|
+
seatsLeftForUser?: number;
|
|
86
|
+
userOrderStatus?: EventUserOrderStatus;
|
|
87
|
+
};
|
|
88
|
+
|
|
34
89
|
export type EventParticipation = {
|
|
35
90
|
eventId: string;
|
|
36
91
|
userId: string;
|
|
@@ -41,6 +96,7 @@ export type EventParticipation = {
|
|
|
41
96
|
role: "attendee" | "host" | "admin";
|
|
42
97
|
status: "confirmed" | "pending" | "cancelled";
|
|
43
98
|
mode: MatchmakingMode;
|
|
99
|
+
checkedInAt?: string;
|
|
44
100
|
};
|
|
45
101
|
|
|
46
102
|
export type FullParticipant = EventParticipation & {
|
package/src/types/index.ts
CHANGED
|
@@ -83,6 +83,16 @@ export type GetEventRequest = {
|
|
|
83
83
|
export type GetEventParticipantsRequest = {
|
|
84
84
|
eventId: string;
|
|
85
85
|
};
|
|
86
|
+
export type GetPublicEventsRequest = undefined;
|
|
87
|
+
export type CreateCheckoutRequest = {
|
|
88
|
+
eventId: string;
|
|
89
|
+
};
|
|
90
|
+
export type ConfirmOrderRequest = {
|
|
91
|
+
sessionId: string;
|
|
92
|
+
};
|
|
93
|
+
export type AbandonOrderRequest = {
|
|
94
|
+
eventId: string;
|
|
95
|
+
};
|
|
86
96
|
|
|
87
97
|
// feedback
|
|
88
98
|
export type SubmitFeedbackRequest = {
|
|
@@ -240,6 +250,8 @@ export type UpdateUserRequest = {
|
|
|
240
250
|
>;
|
|
241
251
|
geoLocation?: { lat: number; lng: number };
|
|
242
252
|
appVersion?: string;
|
|
253
|
+
otaUpdateId?: string;
|
|
254
|
+
runtimeVersion?: string;
|
|
243
255
|
settings?: DeepPartial<UserSettings>;
|
|
244
256
|
consent?: DeepPartial<UserConsents>;
|
|
245
257
|
device?: DeepPartial<UserDevice>;
|
|
@@ -3,7 +3,13 @@ import {
|
|
|
3
3
|
ConsultationInterestSummary,
|
|
4
4
|
} from "./consultation.types";
|
|
5
5
|
import { Submission, CategoryEvaluation } from "./submission.types";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
Event,
|
|
8
|
+
EventOffer,
|
|
9
|
+
FullParticipant,
|
|
10
|
+
FullParticipantWithCS,
|
|
11
|
+
} from "./event.types";
|
|
12
|
+
import { EventOrderView } from "./ticket.types";
|
|
7
13
|
import { UserMatch } from "./match.types";
|
|
8
14
|
import { MatchableUser, MatchCheck } from "./matchmaking.types";
|
|
9
15
|
import { Message } from "./message.types";
|
|
@@ -60,6 +66,14 @@ export type GetEventParticipantsResponse = {
|
|
|
60
66
|
eventMatchId: string | null;
|
|
61
67
|
eventMatchIds: string[];
|
|
62
68
|
};
|
|
69
|
+
export type GetPublicEventsResponse = EventOffer[];
|
|
70
|
+
export type CreateCheckoutResponse = {
|
|
71
|
+
orderId: string;
|
|
72
|
+
checkoutUrl: string;
|
|
73
|
+
expiresAt: string;
|
|
74
|
+
};
|
|
75
|
+
export type ConfirmOrderResponse = EventOrderView;
|
|
76
|
+
export type AbandonOrderResponse = void;
|
|
63
77
|
|
|
64
78
|
// feedback
|
|
65
79
|
export type SubmitFeedbackResponse = undefined;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Gender } from "../enum";
|
|
2
|
+
import { EventCurrency } from "./event.types";
|
|
3
|
+
|
|
4
|
+
export type EventOrderStatus =
|
|
5
|
+
| "pending"
|
|
6
|
+
| "paid"
|
|
7
|
+
| "expired"
|
|
8
|
+
| "abandoned"
|
|
9
|
+
| "cancelled"
|
|
10
|
+
| "refund_pending"
|
|
11
|
+
| "refunded"
|
|
12
|
+
| "refund_failed";
|
|
13
|
+
|
|
14
|
+
export type EventOrderKind = "paid" | "comp";
|
|
15
|
+
|
|
16
|
+
export type EventOrderRefundReason =
|
|
17
|
+
| "user_cancel"
|
|
18
|
+
| "event_cancelled"
|
|
19
|
+
| "admin"
|
|
20
|
+
| "deletion"
|
|
21
|
+
| "oversold";
|
|
22
|
+
|
|
23
|
+
export type EventOrderRefundStatus = "pending" | "succeeded" | "failed";
|
|
24
|
+
|
|
25
|
+
export type EventOrderRefund = {
|
|
26
|
+
stripeRefundId?: string;
|
|
27
|
+
amountOre: number;
|
|
28
|
+
reason: EventOrderRefundReason;
|
|
29
|
+
requestedAt: string;
|
|
30
|
+
status: EventOrderRefundStatus;
|
|
31
|
+
failedAt?: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type EventOrderMessageChannel = "push" | "email" | "iam";
|
|
35
|
+
|
|
36
|
+
export type EventOrderBuyerSnapshot = {
|
|
37
|
+
firstName: string;
|
|
38
|
+
email: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type EventOrder = {
|
|
42
|
+
id: string;
|
|
43
|
+
eventId: string;
|
|
44
|
+
userId: string;
|
|
45
|
+
kind: EventOrderKind;
|
|
46
|
+
status: EventOrderStatus;
|
|
47
|
+
gender: Gender;
|
|
48
|
+
amountOre: number;
|
|
49
|
+
currency: EventCurrency;
|
|
50
|
+
priceSnapshotOre: number;
|
|
51
|
+
stripeProductId?: string;
|
|
52
|
+
stripeCheckoutSessionId?: string;
|
|
53
|
+
stripePaymentIntentId?: string;
|
|
54
|
+
createdAt: string;
|
|
55
|
+
expiresAt: string;
|
|
56
|
+
paidAt?: string;
|
|
57
|
+
cancelledAt?: string;
|
|
58
|
+
refund?: EventOrderRefund;
|
|
59
|
+
messages?: Record<string, Partial<Record<EventOrderMessageChannel, string>>>;
|
|
60
|
+
buyerSnapshot: EventOrderBuyerSnapshot;
|
|
61
|
+
deletedUser?: boolean;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export type EventOrderRefundView = Pick<
|
|
65
|
+
EventOrderRefund,
|
|
66
|
+
"amountOre" | "status" | "requestedAt"
|
|
67
|
+
>;
|
|
68
|
+
|
|
69
|
+
export type EventOrderView = Pick<
|
|
70
|
+
EventOrder,
|
|
71
|
+
| "id"
|
|
72
|
+
| "eventId"
|
|
73
|
+
| "kind"
|
|
74
|
+
| "status"
|
|
75
|
+
| "amountOre"
|
|
76
|
+
| "currency"
|
|
77
|
+
| "createdAt"
|
|
78
|
+
| "expiresAt"
|
|
79
|
+
| "paidAt"
|
|
80
|
+
| "cancelledAt"
|
|
81
|
+
> & {
|
|
82
|
+
refund?: EventOrderRefundView;
|
|
83
|
+
};
|