@kimdaegyu/babmukdang-shared 1.1.11 → 2.0.2
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/chunk-3BLXZW4U.js +338 -0
- package/dist/{chunk-AI2YMBJX.js → chunk-65DWKLP6.js} +18 -9
- package/dist/{chunk-H77ISYYC.js → chunk-6R5CCY5Q.js} +22 -8
- package/dist/{chunk-4E5E3PFW.js → chunk-DRCY5UNQ.js} +20 -7
- package/dist/chunk-EX7S5FI5.js +91 -0
- package/dist/{chunk-HRM3FQPL.js → chunk-EYZU5HPG.js} +4 -1
- package/dist/{chunk-OJVXYCSH.js → chunk-G7TITUHT.js} +1 -1
- package/dist/chunk-GESEM4IA.js +122 -0
- package/dist/chunk-IPANLE7B.js +632 -0
- package/dist/chunk-KREAZLLH.js +1062 -0
- package/dist/{chunk-K3CZKI2F.js → chunk-P3MYMK34.js} +24 -13
- package/dist/chunk-Q4BPFDVB.js +171 -0
- package/dist/{chunk-W4C7XHTX.js → chunk-QUAG5LF5.js} +13 -6
- package/dist/chunk-TIOX7OHA.js +863 -0
- package/dist/{chunk-GTVEQYJW.js → chunk-TOXRHSD6.js} +1 -1
- package/dist/chunk-YV734GYZ.js +165 -0
- package/dist/domain/article/index.cjs +107 -15
- package/dist/domain/article/index.d.cts +79 -796
- package/dist/domain/article/index.d.ts +79 -796
- package/dist/domain/article/index.js +5 -5
- package/dist/domain/auth/index.cjs +88 -9
- package/dist/domain/auth/index.d.cts +6 -46
- package/dist/domain/auth/index.d.ts +6 -46
- package/dist/domain/auth/index.js +3 -3
- package/dist/domain/common/index.cjs +2100 -395
- package/dist/domain/common/index.d.cts +212 -3037
- package/dist/domain/common/index.d.ts +212 -3037
- package/dist/domain/common/index.js +65 -31
- package/dist/domain/food/index.cjs +248 -0
- package/dist/domain/food/index.d.cts +321 -0
- package/dist/domain/food/index.d.ts +321 -0
- package/dist/domain/food/index.js +44 -0
- package/dist/domain/friend/index.cjs +108 -12
- package/dist/domain/friend/index.d.cts +39 -98
- package/dist/domain/friend/index.d.ts +39 -98
- package/dist/domain/friend/index.js +6 -4
- package/dist/domain/index.cjs +2736 -522
- package/dist/domain/index.d.cts +383 -123
- package/dist/domain/index.d.ts +383 -123
- package/dist/domain/index.js +429 -140
- package/dist/domain/live-activity/index.cjs +1061 -0
- package/dist/domain/live-activity/index.d.cts +177 -0
- package/dist/domain/live-activity/index.d.ts +177 -0
- package/dist/domain/live-activity/index.js +27 -0
- package/dist/domain/meal/index.cjs +101 -12
- package/dist/domain/meal/index.d.cts +21 -40
- package/dist/domain/meal/index.d.ts +21 -40
- package/dist/domain/meal/index.js +4 -4
- package/dist/domain/meal-plan/index.cjs +1504 -0
- package/dist/domain/meal-plan/index.d.cts +4424 -0
- package/dist/domain/meal-plan/index.d.ts +4424 -0
- package/dist/domain/meal-plan/index.js +256 -0
- package/dist/domain/member/index.cjs +114 -9
- package/dist/domain/member/index.d.cts +263 -273
- package/dist/domain/member/index.d.ts +263 -273
- package/dist/domain/member/index.js +26 -2
- package/dist/domain/promotion/index.cjs +26 -8
- package/dist/domain/promotion/index.d.cts +35 -112
- package/dist/domain/promotion/index.d.ts +35 -112
- package/dist/domain/promotion/index.js +3 -3
- package/dist/domain/push/index.cjs +1004 -0
- package/dist/domain/push/index.d.cts +169 -0
- package/dist/domain/push/index.d.ts +169 -0
- package/dist/domain/push/index.js +35 -0
- package/dist/domain/restaurant/index.cjs +10 -4
- package/dist/domain/restaurant/index.d.cts +27 -1
- package/dist/domain/restaurant/index.d.ts +27 -1
- package/dist/domain/restaurant/index.js +2 -2
- package/dist/index.cjs +2535 -464
- package/dist/index.d.cts +5 -7
- package/dist/index.d.ts +5 -7
- package/dist/index.js +16 -15
- package/package.json +52 -55
- package/dist/chunk-PFSZSKD5.js +0 -0
- package/dist/chunk-PQMEXOPZ.js +0 -232
- package/dist/chunk-W4TUW2GY.js +0 -40
- package/dist/chunk-WNYCCQM4.js +0 -342
- package/dist/chunk-YGFAVC5N.js +0 -34
- package/dist/chunk-YM7YU7IR.js +0 -319
- package/dist/chunk-ZH7D7B2Y.js +0 -78
- package/dist/domain/invitation/index.cjs +0 -82
- package/dist/domain/invitation/index.d.cts +0 -64
- package/dist/domain/invitation/index.d.ts +0 -64
- package/dist/domain/invitation/index.js +0 -13
- package/dist/domain/plan/index.cjs +0 -327
- package/dist/domain/plan/index.d.cts +0 -178
- package/dist/domain/plan/index.d.ts +0 -178
- package/dist/domain/plan/index.js +0 -18
- package/dist/domain/recruit/index.cjs +0 -189
- package/dist/domain/recruit/index.d.cts +0 -214
- package/dist/domain/recruit/index.d.ts +0 -214
- package/dist/domain/recruit/index.js +0 -30
- package/dist/domain/room/index.cjs +0 -401
- package/dist/domain/room/index.d.cts +0 -2643
- package/dist/domain/room/index.d.ts +0 -2643
- package/dist/domain/room/index.js +0 -82
- package/dist/id-dAYxfjZn.d.cts +0 -64
- package/dist/id-dAYxfjZn.d.ts +0 -64
- package/dist/restaurant.schema-CuEcX3S3.d.cts +0 -78
- package/dist/restaurant.schema-CuEcX3S3.d.ts +0 -78
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MEAL_PLAN_NOTIFICATION_PRIORITY_POLICIES,
|
|
3
|
+
MealPlanDecisionStageIdSchema,
|
|
4
|
+
MealPlanJoinRequestSummarySchema,
|
|
5
|
+
MealPlanNotificationSchema,
|
|
6
|
+
MealPlanResponseSchema,
|
|
7
|
+
MyMealPlanListItemSchema
|
|
8
|
+
} from "./chunk-TIOX7OHA.js";
|
|
9
|
+
import {
|
|
10
|
+
RestaurantSchema
|
|
11
|
+
} from "./chunk-TOXRHSD6.js";
|
|
12
|
+
import {
|
|
13
|
+
MemberCoreSchema
|
|
14
|
+
} from "./chunk-YV734GYZ.js";
|
|
15
|
+
import {
|
|
16
|
+
ISODateTimeStringSchema
|
|
17
|
+
} from "./chunk-EYZU5HPG.js";
|
|
18
|
+
import {
|
|
19
|
+
ArticleIdSchema,
|
|
20
|
+
MealGroupIdSchema,
|
|
21
|
+
MealPlanIdSchema,
|
|
22
|
+
MealPlanShareLinkIdSchema,
|
|
23
|
+
MealPlanShareLinkTokenSchema,
|
|
24
|
+
MemberIdSchema,
|
|
25
|
+
__name
|
|
26
|
+
} from "./chunk-6R5CCY5Q.js";
|
|
27
|
+
|
|
28
|
+
// src/domain/meal-plan/meal-plan-share-link.schema.ts
|
|
29
|
+
import { z } from "zod";
|
|
30
|
+
var CreateMealPlanShareLinkRequestSchema = z.object({
|
|
31
|
+
expiresAt: ISODateTimeStringSchema.optional(),
|
|
32
|
+
guestJoinEnabled: z.boolean().default(true)
|
|
33
|
+
});
|
|
34
|
+
var MealPlanShareLinkSummarySchema = z.object({
|
|
35
|
+
shareLinkId: MealPlanShareLinkIdSchema,
|
|
36
|
+
mealPlanId: MealPlanIdSchema,
|
|
37
|
+
token: MealPlanShareLinkTokenSchema,
|
|
38
|
+
url: z.string().url(),
|
|
39
|
+
expiresAt: ISODateTimeStringSchema,
|
|
40
|
+
guestJoinEnabled: z.boolean(),
|
|
41
|
+
createdAt: ISODateTimeStringSchema
|
|
42
|
+
});
|
|
43
|
+
var MealPlanSharePreviewResponseSchema = z.object({
|
|
44
|
+
mealPlanId: MealPlanIdSchema,
|
|
45
|
+
token: MealPlanShareLinkTokenSchema,
|
|
46
|
+
title: z.string(),
|
|
47
|
+
ownerName: z.string(),
|
|
48
|
+
participantCount: z.number().int().min(1),
|
|
49
|
+
expiresAt: ISODateTimeStringSchema,
|
|
50
|
+
guestJoinEnabled: z.boolean()
|
|
51
|
+
});
|
|
52
|
+
var JoinMealPlanGuestRequestSchema = z.object({
|
|
53
|
+
nickname: z.string().min(1).max(50),
|
|
54
|
+
password: z.string().min(1).max(100).optional()
|
|
55
|
+
});
|
|
56
|
+
var JoinMealPlanGuestResponseSchema = z.object({
|
|
57
|
+
mealPlanId: MealPlanIdSchema,
|
|
58
|
+
guestId: z.string().min(1),
|
|
59
|
+
sessionToken: z.string().min(1)
|
|
60
|
+
});
|
|
61
|
+
var MealPlanGuestSessionQuerySchema = z.object({
|
|
62
|
+
sessionToken: z.string().min(1)
|
|
63
|
+
});
|
|
64
|
+
var MealPlanGuestSessionResponseSchema = z.object({
|
|
65
|
+
mealPlan: MealPlanResponseSchema,
|
|
66
|
+
token: MealPlanShareLinkTokenSchema,
|
|
67
|
+
guestId: z.string().min(1),
|
|
68
|
+
nickname: z.string().min(1).max(50),
|
|
69
|
+
sessionToken: z.string().min(1)
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// src/domain/meal-plan/meal-group.schema.ts
|
|
73
|
+
import { z as z2 } from "zod";
|
|
74
|
+
var MealGroupMemberRoleSchema = z2.enum([
|
|
75
|
+
"OWNER",
|
|
76
|
+
"MEMBER"
|
|
77
|
+
]);
|
|
78
|
+
var MealGroupMemberSchema = z2.object({
|
|
79
|
+
member: MemberCoreSchema,
|
|
80
|
+
role: MealGroupMemberRoleSchema,
|
|
81
|
+
joinedAt: ISODateTimeStringSchema
|
|
82
|
+
});
|
|
83
|
+
var MealGroupResponseSchema = z2.object({
|
|
84
|
+
mealGroupId: MealGroupIdSchema,
|
|
85
|
+
name: z2.string().min(1).max(50),
|
|
86
|
+
owner: MemberCoreSchema,
|
|
87
|
+
profileImageUrl: z2.string().url().nullable(),
|
|
88
|
+
members: z2.array(MealGroupMemberSchema),
|
|
89
|
+
recentMealPlanIds: z2.array(MealPlanIdSchema),
|
|
90
|
+
createdAt: ISODateTimeStringSchema,
|
|
91
|
+
updatedAt: ISODateTimeStringSchema
|
|
92
|
+
});
|
|
93
|
+
var CreateMealGroupRequestSchema = z2.object({
|
|
94
|
+
name: z2.string().min(1).max(50),
|
|
95
|
+
memberIds: z2.array(z2.number().int().positive()).min(1),
|
|
96
|
+
profileImageUrl: z2.string().url().nullable().optional(),
|
|
97
|
+
sourceMealPlanId: MealPlanIdSchema.optional()
|
|
98
|
+
});
|
|
99
|
+
var StartMealPlanFromGroupRequestSchema = z2.object({
|
|
100
|
+
title: z2.string().min(1).max(100).optional()
|
|
101
|
+
});
|
|
102
|
+
var AddMealGroupMemberRequestSchema = z2.object({
|
|
103
|
+
memberId: z2.number().int().positive(),
|
|
104
|
+
role: MealGroupMemberRoleSchema.default("MEMBER")
|
|
105
|
+
});
|
|
106
|
+
var UpdateMealGroupMemberRoleRequestSchema = z2.object({
|
|
107
|
+
role: MealGroupMemberRoleSchema
|
|
108
|
+
});
|
|
109
|
+
var MealGroupHistoryItemSchema = MyMealPlanListItemSchema.extend({});
|
|
110
|
+
var MealGroupPreferenceSummarySchema = z2.object({
|
|
111
|
+
mealGroupId: MealGroupIdSchema,
|
|
112
|
+
frequentMenuCategories: z2.array(z2.object({
|
|
113
|
+
label: z2.string(),
|
|
114
|
+
count: z2.number().int().min(0)
|
|
115
|
+
})),
|
|
116
|
+
frequentRestaurants: z2.array(z2.object({
|
|
117
|
+
restaurantName: z2.string(),
|
|
118
|
+
count: z2.number().int().min(0)
|
|
119
|
+
})),
|
|
120
|
+
recentMenuCategories: z2.array(z2.string()),
|
|
121
|
+
recommendationContext: z2.object({
|
|
122
|
+
preferredMenuCategories: z2.array(z2.string()),
|
|
123
|
+
excludedMenuCategories: z2.array(z2.string()),
|
|
124
|
+
candidateMenuCategories: z2.array(z2.string())
|
|
125
|
+
})
|
|
126
|
+
});
|
|
127
|
+
var MealGroupHistoryResponseSchema = z2.array(MealGroupHistoryItemSchema);
|
|
128
|
+
|
|
129
|
+
// src/domain/meal-plan/meal-plan-home-map.schema.ts
|
|
130
|
+
import { z as z3 } from "zod";
|
|
131
|
+
var HomeMealPlanActionKindSchema = z3.enum([
|
|
132
|
+
"CONTINUE_DECISION",
|
|
133
|
+
"TODAY_UPCOMING",
|
|
134
|
+
"RECORD_NEEDED",
|
|
135
|
+
"RESPOND_JOIN_REQUEST",
|
|
136
|
+
"NOTIFICATION_FOLLOW_UP"
|
|
137
|
+
]);
|
|
138
|
+
var HomeMealPlanActionCardSchema = z3.object({
|
|
139
|
+
actionId: z3.string().min(1),
|
|
140
|
+
kind: HomeMealPlanActionKindSchema,
|
|
141
|
+
priority: z3.number().int().min(0),
|
|
142
|
+
title: z3.string().min(1),
|
|
143
|
+
description: z3.string().min(1),
|
|
144
|
+
primaryAction: z3.object({
|
|
145
|
+
label: z3.string().min(1),
|
|
146
|
+
href: z3.string().min(1)
|
|
147
|
+
}),
|
|
148
|
+
mealPlan: MyMealPlanListItemSchema.nullable(),
|
|
149
|
+
joinRequest: MealPlanJoinRequestSummarySchema.nullable(),
|
|
150
|
+
notification: MealPlanNotificationSchema.nullable().default(null)
|
|
151
|
+
});
|
|
152
|
+
var HomeMealPlanDashboardResponseSchema = z3.object({
|
|
153
|
+
generatedAt: ISODateTimeStringSchema,
|
|
154
|
+
inProgress: z3.array(MyMealPlanListItemSchema),
|
|
155
|
+
today: z3.array(MyMealPlanListItemSchema),
|
|
156
|
+
recordNeeded: z3.array(MyMealPlanListItemSchema),
|
|
157
|
+
pendingJoinRequests: z3.array(MealPlanJoinRequestSummarySchema),
|
|
158
|
+
unreadNotifications: z3.array(MealPlanNotificationSchema).default([]),
|
|
159
|
+
nextActions: z3.array(HomeMealPlanActionCardSchema)
|
|
160
|
+
});
|
|
161
|
+
var MealMapLayerSchema = z3.enum([
|
|
162
|
+
"MY_MEAL_PLAN_PLACE",
|
|
163
|
+
"NEARBY_FRIEND_MEAL_PLAN",
|
|
164
|
+
"FRIEND_RECORD_LOCATION",
|
|
165
|
+
"RESTAURANT_CANDIDATE"
|
|
166
|
+
]);
|
|
167
|
+
var MealMapMarkerBaseSchema = z3.object({
|
|
168
|
+
markerId: z3.string().min(1),
|
|
169
|
+
lat: z3.number().min(-90).max(90),
|
|
170
|
+
lng: z3.number().min(-180).max(180),
|
|
171
|
+
title: z3.string().min(1),
|
|
172
|
+
subtitle: z3.string().nullable(),
|
|
173
|
+
href: z3.string().min(1).nullable(),
|
|
174
|
+
mealPlanId: MealPlanIdSchema.nullable(),
|
|
175
|
+
articleId: ArticleIdSchema.nullable(),
|
|
176
|
+
restaurant: RestaurantSchema.nullable(),
|
|
177
|
+
distanceMeters: z3.number().int().min(0).nullable(),
|
|
178
|
+
updatedAt: ISODateTimeStringSchema
|
|
179
|
+
});
|
|
180
|
+
var MealMapMyMealPlanPlaceMetadataSchema = z3.object({
|
|
181
|
+
ownerId: MemberIdSchema.nullable().default(null),
|
|
182
|
+
status: z3.string().min(1),
|
|
183
|
+
participantCount: z3.number().int().min(1),
|
|
184
|
+
source: z3.string().min(1)
|
|
185
|
+
});
|
|
186
|
+
var MealMapNearbyFriendMealPlanMetadataSchema = z3.object({
|
|
187
|
+
ownerId: MemberIdSchema.nullable().default(null),
|
|
188
|
+
ownerName: z3.string().min(1),
|
|
189
|
+
participantCount: z3.number().int().min(1),
|
|
190
|
+
expiresAt: ISODateTimeStringSchema.nullable(),
|
|
191
|
+
source: z3.string().min(1)
|
|
192
|
+
});
|
|
193
|
+
var MealMapFriendRecordLocationMetadataSchema = z3.object({
|
|
194
|
+
authorId: MemberIdSchema.nullable().default(null),
|
|
195
|
+
authorName: z3.string().min(1),
|
|
196
|
+
imageUrl: z3.string().nullable().default(null),
|
|
197
|
+
mealDate: z3.string().min(1)
|
|
198
|
+
});
|
|
199
|
+
var MealMapRestaurantCandidateCompletionBlockedReasonSchema = z3.enum([
|
|
200
|
+
"OWNER_ONLY",
|
|
201
|
+
"STAGE_ALREADY_COMPLETED",
|
|
202
|
+
"MEAL_PLAN_NOT_MUTABLE"
|
|
203
|
+
]);
|
|
204
|
+
var MealMapRestaurantCandidateMetadataSchema = z3.object({
|
|
205
|
+
stageId: MealPlanDecisionStageIdSchema,
|
|
206
|
+
ownerId: MemberIdSchema.nullable().default(null),
|
|
207
|
+
status: z3.string().min(1),
|
|
208
|
+
source: z3.enum([
|
|
209
|
+
"search",
|
|
210
|
+
"fallback",
|
|
211
|
+
"manual"
|
|
212
|
+
]).default("search"),
|
|
213
|
+
stageStatus: z3.enum([
|
|
214
|
+
"OPEN",
|
|
215
|
+
"COMPLETED",
|
|
216
|
+
"REOPENED"
|
|
217
|
+
]).default("OPEN"),
|
|
218
|
+
canVote: z3.boolean().default(false),
|
|
219
|
+
canCompleteStage: z3.boolean().default(false),
|
|
220
|
+
completionBlockedReason: MealMapRestaurantCandidateCompletionBlockedReasonSchema.nullable().default(null)
|
|
221
|
+
});
|
|
222
|
+
var MealMapMarkerSchema = z3.discriminatedUnion("layer", [
|
|
223
|
+
MealMapMarkerBaseSchema.extend({
|
|
224
|
+
layer: z3.literal("MY_MEAL_PLAN_PLACE"),
|
|
225
|
+
metadata: MealMapMyMealPlanPlaceMetadataSchema
|
|
226
|
+
}),
|
|
227
|
+
MealMapMarkerBaseSchema.extend({
|
|
228
|
+
layer: z3.literal("NEARBY_FRIEND_MEAL_PLAN"),
|
|
229
|
+
metadata: MealMapNearbyFriendMealPlanMetadataSchema
|
|
230
|
+
}),
|
|
231
|
+
MealMapMarkerBaseSchema.extend({
|
|
232
|
+
layer: z3.literal("FRIEND_RECORD_LOCATION"),
|
|
233
|
+
metadata: MealMapFriendRecordLocationMetadataSchema
|
|
234
|
+
}),
|
|
235
|
+
MealMapMarkerBaseSchema.extend({
|
|
236
|
+
layer: z3.literal("RESTAURANT_CANDIDATE"),
|
|
237
|
+
metadata: MealMapRestaurantCandidateMetadataSchema
|
|
238
|
+
})
|
|
239
|
+
]);
|
|
240
|
+
var MealMapQuerySchema = z3.object({
|
|
241
|
+
friendRecordDays: z3.coerce.number().int().min(1).max(90).optional().default(7)
|
|
242
|
+
});
|
|
243
|
+
var MealMapResponseSchema = z3.object({
|
|
244
|
+
generatedAt: ISODateTimeStringSchema,
|
|
245
|
+
center: z3.object({
|
|
246
|
+
lat: z3.number().min(-90).max(90),
|
|
247
|
+
lng: z3.number().min(-180).max(180),
|
|
248
|
+
source: z3.enum([
|
|
249
|
+
"LAST_KNOWN_LOCATION",
|
|
250
|
+
"MY_MEAL_PLAN",
|
|
251
|
+
"DEFAULT"
|
|
252
|
+
])
|
|
253
|
+
}),
|
|
254
|
+
layers: z3.object({
|
|
255
|
+
myMealPlanPlaces: z3.array(MealMapMarkerSchema),
|
|
256
|
+
nearbyFriendMealPlans: z3.array(MealMapMarkerSchema),
|
|
257
|
+
friendRecordLocations: z3.array(MealMapMarkerSchema),
|
|
258
|
+
restaurantCandidates: z3.array(MealMapMarkerSchema)
|
|
259
|
+
})
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
// src/domain/meal-plan/meal-plan-notification-priority.ts
|
|
263
|
+
var DEFAULT_POLICY = MEAL_PLAN_NOTIFICATION_PRIORITY_POLICIES.MEAL_PLAN_PARTICIPANT_JOINED;
|
|
264
|
+
function getMealPlanNotificationPriorityPolicy(kind) {
|
|
265
|
+
return MEAL_PLAN_NOTIFICATION_PRIORITY_POLICIES[kind] ?? DEFAULT_POLICY;
|
|
266
|
+
}
|
|
267
|
+
__name(getMealPlanNotificationPriorityPolicy, "getMealPlanNotificationPriorityPolicy");
|
|
268
|
+
function getMealPlanNotificationPriority(kind, channel = "HOME") {
|
|
269
|
+
const policy = getMealPlanNotificationPriorityPolicy(kind);
|
|
270
|
+
switch (channel) {
|
|
271
|
+
case "HOME":
|
|
272
|
+
return policy.homePriority;
|
|
273
|
+
case "NOTIFICATION_INBOX":
|
|
274
|
+
return policy.inboxPriority;
|
|
275
|
+
case "FCM_PUSH":
|
|
276
|
+
return policy.fcmPriority;
|
|
277
|
+
case "LIVE_ACTIVITY":
|
|
278
|
+
return policy.liveActivityPriority;
|
|
279
|
+
default:
|
|
280
|
+
return policy.priority;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
__name(getMealPlanNotificationPriority, "getMealPlanNotificationPriority");
|
|
284
|
+
function getMealPlanLiveActivityBehavior(kind) {
|
|
285
|
+
return getMealPlanNotificationPriorityPolicy(kind).liveActivityBehavior;
|
|
286
|
+
}
|
|
287
|
+
__name(getMealPlanLiveActivityBehavior, "getMealPlanLiveActivityBehavior");
|
|
288
|
+
function shouldShowForegroundToast(kind) {
|
|
289
|
+
return getMealPlanNotificationPriorityPolicy(kind).foregroundToast;
|
|
290
|
+
}
|
|
291
|
+
__name(shouldShowForegroundToast, "shouldShowForegroundToast");
|
|
292
|
+
function compareMealPlanNotificationsByPriority(channel) {
|
|
293
|
+
return (a, b) => {
|
|
294
|
+
const unreadDelta = Number(Boolean(a.readAt)) - Number(Boolean(b.readAt));
|
|
295
|
+
if (unreadDelta !== 0) return unreadDelta;
|
|
296
|
+
const priorityDelta = getMealPlanNotificationPriority(a.kind, channel) - getMealPlanNotificationPriority(b.kind, channel);
|
|
297
|
+
if (priorityDelta !== 0) return priorityDelta;
|
|
298
|
+
return new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime();
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
__name(compareMealPlanNotificationsByPriority, "compareMealPlanNotificationsByPriority");
|
|
302
|
+
|
|
303
|
+
export {
|
|
304
|
+
CreateMealPlanShareLinkRequestSchema,
|
|
305
|
+
MealPlanShareLinkSummarySchema,
|
|
306
|
+
MealPlanSharePreviewResponseSchema,
|
|
307
|
+
JoinMealPlanGuestRequestSchema,
|
|
308
|
+
JoinMealPlanGuestResponseSchema,
|
|
309
|
+
MealPlanGuestSessionQuerySchema,
|
|
310
|
+
MealPlanGuestSessionResponseSchema,
|
|
311
|
+
MealGroupMemberRoleSchema,
|
|
312
|
+
MealGroupMemberSchema,
|
|
313
|
+
MealGroupResponseSchema,
|
|
314
|
+
CreateMealGroupRequestSchema,
|
|
315
|
+
StartMealPlanFromGroupRequestSchema,
|
|
316
|
+
AddMealGroupMemberRequestSchema,
|
|
317
|
+
UpdateMealGroupMemberRoleRequestSchema,
|
|
318
|
+
MealGroupHistoryItemSchema,
|
|
319
|
+
MealGroupPreferenceSummarySchema,
|
|
320
|
+
MealGroupHistoryResponseSchema,
|
|
321
|
+
HomeMealPlanActionKindSchema,
|
|
322
|
+
HomeMealPlanActionCardSchema,
|
|
323
|
+
HomeMealPlanDashboardResponseSchema,
|
|
324
|
+
MealMapLayerSchema,
|
|
325
|
+
MealMapMyMealPlanPlaceMetadataSchema,
|
|
326
|
+
MealMapNearbyFriendMealPlanMetadataSchema,
|
|
327
|
+
MealMapFriendRecordLocationMetadataSchema,
|
|
328
|
+
MealMapRestaurantCandidateCompletionBlockedReasonSchema,
|
|
329
|
+
MealMapRestaurantCandidateMetadataSchema,
|
|
330
|
+
MealMapMarkerSchema,
|
|
331
|
+
MealMapQuerySchema,
|
|
332
|
+
MealMapResponseSchema,
|
|
333
|
+
getMealPlanNotificationPriorityPolicy,
|
|
334
|
+
getMealPlanNotificationPriority,
|
|
335
|
+
getMealPlanLiveActivityBehavior,
|
|
336
|
+
shouldShowForegroundToast,
|
|
337
|
+
compareMealPlanNotificationsByPriority
|
|
338
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ISODateStringSchema,
|
|
3
3
|
ISODateTimeStringSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EYZU5HPG.js";
|
|
5
5
|
import {
|
|
6
6
|
CouponIdSchema,
|
|
7
7
|
MemberIdSchema,
|
|
8
8
|
ReferralCodeSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6R5CCY5Q.js";
|
|
10
10
|
|
|
11
11
|
// src/domain/promotion/referral.schema.ts
|
|
12
12
|
import { z } from "zod";
|
|
@@ -29,8 +29,14 @@ var RedeemReferralRequestSchema = z.object({
|
|
|
29
29
|
|
|
30
30
|
// src/domain/promotion/coupon.schema.ts
|
|
31
31
|
import { z as z2 } from "zod";
|
|
32
|
-
var CouponTypeSchema = z2.enum([
|
|
33
|
-
|
|
32
|
+
var CouponTypeSchema = z2.enum([
|
|
33
|
+
"DISCOUNT",
|
|
34
|
+
"SERVICE"
|
|
35
|
+
]);
|
|
36
|
+
var CouponStatusSchema = z2.enum([
|
|
37
|
+
"UNUSED",
|
|
38
|
+
"USED"
|
|
39
|
+
]);
|
|
34
40
|
var CouponResponseSchema = z2.object({
|
|
35
41
|
couponId: CouponIdSchema,
|
|
36
42
|
title: z2.string(),
|
|
@@ -44,7 +50,10 @@ var CouponResponseSchema = z2.object({
|
|
|
44
50
|
|
|
45
51
|
// src/domain/promotion/challenge.schema.ts
|
|
46
52
|
import { z as z3 } from "zod";
|
|
47
|
-
var RewardTypeSchema = z3.enum([
|
|
53
|
+
var RewardTypeSchema = z3.enum([
|
|
54
|
+
"WEEK",
|
|
55
|
+
"MONTH"
|
|
56
|
+
]);
|
|
48
57
|
var WeekProgressSchema = z3.object({
|
|
49
58
|
days: z3.array(z3.boolean()),
|
|
50
59
|
completed: z3.number().int().min(0),
|
|
@@ -69,13 +78,13 @@ var ClaimChallengeRewardResponseSchema = z3.object({
|
|
|
69
78
|
});
|
|
70
79
|
|
|
71
80
|
export {
|
|
72
|
-
ChallengeStatusResponseSchema,
|
|
73
|
-
ClaimChallengeRewardRequestSchema,
|
|
74
|
-
ClaimChallengeRewardResponseSchema,
|
|
75
81
|
ReferralCreateResponseSchema,
|
|
76
82
|
ReferralItemResponseSchema,
|
|
77
83
|
RedeemReferralRequestSchema,
|
|
78
84
|
CouponTypeSchema,
|
|
79
85
|
CouponStatusSchema,
|
|
80
|
-
CouponResponseSchema
|
|
86
|
+
CouponResponseSchema,
|
|
87
|
+
ChallengeStatusResponseSchema,
|
|
88
|
+
ClaimChallengeRewardRequestSchema,
|
|
89
|
+
ClaimChallengeRewardResponseSchema
|
|
81
90
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
2
3
|
var __export = (target, all) => {
|
|
3
4
|
for (var name in all)
|
|
4
5
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -12,10 +13,16 @@ var MemberIdSchema = PositiveIntIdSchema.brand();
|
|
|
12
13
|
var UserIdSchema = MemberIdSchema;
|
|
13
14
|
var ArticleIdSchema = PositiveIntIdSchema.brand();
|
|
14
15
|
var CommentIdSchema = PositiveIntIdSchema.brand();
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
16
|
+
var MealPlanIdSchema = z.string().uuid().brand();
|
|
17
|
+
var MealPlanInviteIdSchema = z.string().uuid().brand();
|
|
18
|
+
var MealPlanJoinRequestIdSchema = z.string().uuid().brand();
|
|
19
|
+
var MealPlanNearbyFriendExposureBatchIdSchema = z.string().uuid().brand();
|
|
20
|
+
var MealPlanChangeRequestIdSchema = z.string().uuid().brand();
|
|
21
|
+
var MealPlanShareLinkIdSchema = z.string().uuid().brand();
|
|
22
|
+
var MealPlanShareLinkTokenSchema = z.string().min(8).max(128).brand();
|
|
23
|
+
var MealPlanChatRoomIdSchema = z.string().uuid().brand();
|
|
24
|
+
var MealPlanChatMessageIdSchema = z.string().uuid().brand();
|
|
25
|
+
var MealGroupIdSchema = z.string().uuid().brand();
|
|
19
26
|
var RestaurantIdSchema = NonEmptyStringIdSchema.brand();
|
|
20
27
|
var CouponIdSchema = PositiveIntIdSchema.brand();
|
|
21
28
|
var SubscriptionIdSchema = PositiveIntIdSchema.brand();
|
|
@@ -29,6 +36,7 @@ var FoodSchema = z.object({
|
|
|
29
36
|
});
|
|
30
37
|
|
|
31
38
|
export {
|
|
39
|
+
__name,
|
|
32
40
|
__export,
|
|
33
41
|
PositiveIntIdSchema,
|
|
34
42
|
NonEmptyStringIdSchema,
|
|
@@ -36,10 +44,16 @@ export {
|
|
|
36
44
|
UserIdSchema,
|
|
37
45
|
ArticleIdSchema,
|
|
38
46
|
CommentIdSchema,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
MealPlanIdSchema,
|
|
48
|
+
MealPlanInviteIdSchema,
|
|
49
|
+
MealPlanJoinRequestIdSchema,
|
|
50
|
+
MealPlanNearbyFriendExposureBatchIdSchema,
|
|
51
|
+
MealPlanChangeRequestIdSchema,
|
|
52
|
+
MealPlanShareLinkIdSchema,
|
|
53
|
+
MealPlanShareLinkTokenSchema,
|
|
54
|
+
MealPlanChatRoomIdSchema,
|
|
55
|
+
MealPlanChatMessageIdSchema,
|
|
56
|
+
MealGroupIdSchema,
|
|
43
57
|
RestaurantIdSchema,
|
|
44
58
|
CouponIdSchema,
|
|
45
59
|
SubscriptionIdSchema,
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ISODateTimeStringSchema
|
|
3
|
-
} from "./chunk-HRM3FQPL.js";
|
|
4
1
|
import {
|
|
5
2
|
MemberCoreSchema
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YV734GYZ.js";
|
|
4
|
+
import {
|
|
5
|
+
ISODateTimeStringSchema
|
|
6
|
+
} from "./chunk-EYZU5HPG.js";
|
|
7
7
|
import {
|
|
8
8
|
FriendRequestIdSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6R5CCY5Q.js";
|
|
10
10
|
|
|
11
11
|
// src/domain/friend/friend.schema.ts
|
|
12
12
|
import { z } from "zod";
|
|
13
|
-
var FriendRequestStatusSchema = z.enum([
|
|
13
|
+
var FriendRequestStatusSchema = z.enum([
|
|
14
|
+
"PENDING",
|
|
15
|
+
"ACCEPTED",
|
|
16
|
+
"REJECTED",
|
|
17
|
+
"CANCELED"
|
|
18
|
+
]);
|
|
19
|
+
var FriendMealAvailabilitySchema = z.object({
|
|
20
|
+
isHungry: z.boolean(),
|
|
21
|
+
mealProposalAllowed: z.boolean(),
|
|
22
|
+
mealStatusExpiresAt: ISODateTimeStringSchema.nullable(),
|
|
23
|
+
nearbyMealPlanExposureAllowed: z.boolean()
|
|
24
|
+
});
|
|
14
25
|
var FriendListItemResponseSchema = MemberCoreSchema.extend({
|
|
15
|
-
friendSince: ISODateTimeStringSchema
|
|
26
|
+
friendSince: ISODateTimeStringSchema,
|
|
27
|
+
mealAvailability: FriendMealAvailabilitySchema.optional()
|
|
16
28
|
});
|
|
17
29
|
var FriendBlockItemResponseSchema = MemberCoreSchema.extend({
|
|
18
30
|
blockedAt: ISODateTimeStringSchema
|
|
@@ -30,6 +42,7 @@ var FriendSearchResponseSchema = z.array(MemberCoreSchema);
|
|
|
30
42
|
|
|
31
43
|
export {
|
|
32
44
|
FriendRequestStatusSchema,
|
|
45
|
+
FriendMealAvailabilitySchema,
|
|
33
46
|
FriendListItemResponseSchema,
|
|
34
47
|
FriendBlockItemResponseSchema,
|
|
35
48
|
FriendRequestMemberSchema,
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PushPlatformSchema
|
|
3
|
+
} from "./chunk-GESEM4IA.js";
|
|
4
|
+
import {
|
|
5
|
+
MealPlanLiveActivityBehaviorSchema,
|
|
6
|
+
MealPlanNotificationKindSchema
|
|
7
|
+
} from "./chunk-TIOX7OHA.js";
|
|
8
|
+
import {
|
|
9
|
+
ISODateTimeStringSchema
|
|
10
|
+
} from "./chunk-EYZU5HPG.js";
|
|
11
|
+
import {
|
|
12
|
+
MealPlanIdSchema
|
|
13
|
+
} from "./chunk-6R5CCY5Q.js";
|
|
14
|
+
|
|
15
|
+
// src/domain/live-activity/live-activity.schema.ts
|
|
16
|
+
import { z } from "zod";
|
|
17
|
+
var MealPlanLiveActivityPlatformSchema = z.enum([
|
|
18
|
+
"IOS_LIVE_ACTIVITY",
|
|
19
|
+
"ANDROID_LIVE_UPDATE"
|
|
20
|
+
]);
|
|
21
|
+
var MealPlanLiveActivitySessionStatusSchema = z.enum([
|
|
22
|
+
"ACTIVE",
|
|
23
|
+
"ENDED",
|
|
24
|
+
"EXPIRED",
|
|
25
|
+
"DISABLED"
|
|
26
|
+
]);
|
|
27
|
+
var MealPlanLiveActivityUpdateStatusSchema = z.enum([
|
|
28
|
+
"PENDING",
|
|
29
|
+
"SENT",
|
|
30
|
+
"FAILED",
|
|
31
|
+
"SKIPPED"
|
|
32
|
+
]);
|
|
33
|
+
var RegisterMealPlanLiveActivitySessionRequestSchema = z.object({
|
|
34
|
+
platform: MealPlanLiveActivityPlatformSchema,
|
|
35
|
+
deviceId: z.string().min(1).max(128),
|
|
36
|
+
activityId: z.string().min(1).max(128),
|
|
37
|
+
pushToken: z.string().min(10).optional(),
|
|
38
|
+
appVersion: z.string().min(1).max(64).optional(),
|
|
39
|
+
buildNumber: z.string().min(1).max(64).optional()
|
|
40
|
+
});
|
|
41
|
+
var EndMealPlanLiveActivitySessionRequestSchema = z.object({
|
|
42
|
+
platform: MealPlanLiveActivityPlatformSchema.optional(),
|
|
43
|
+
deviceId: z.string().min(1).max(128).optional(),
|
|
44
|
+
activityId: z.string().min(1).max(128).optional()
|
|
45
|
+
});
|
|
46
|
+
var MealPlanLiveActivityStateSchema = z.object({
|
|
47
|
+
mealPlanId: MealPlanIdSchema,
|
|
48
|
+
title: z.string().min(1),
|
|
49
|
+
status: z.string().min(1),
|
|
50
|
+
scheduledAt: ISODateTimeStringSchema.nullable(),
|
|
51
|
+
restaurantName: z.string().nullable(),
|
|
52
|
+
placeName: z.string().nullable(),
|
|
53
|
+
deepLink: z.string().min(1),
|
|
54
|
+
progressLabel: z.string().min(1),
|
|
55
|
+
updatedAt: ISODateTimeStringSchema
|
|
56
|
+
});
|
|
57
|
+
var MealPlanLiveActivitySessionResponseSchema = z.object({
|
|
58
|
+
sessionId: z.string().uuid(),
|
|
59
|
+
mealPlanId: MealPlanIdSchema,
|
|
60
|
+
memberId: z.number().int().positive(),
|
|
61
|
+
platform: MealPlanLiveActivityPlatformSchema,
|
|
62
|
+
devicePlatform: PushPlatformSchema,
|
|
63
|
+
deviceId: z.string(),
|
|
64
|
+
activityId: z.string(),
|
|
65
|
+
status: MealPlanLiveActivitySessionStatusSchema,
|
|
66
|
+
appVersion: z.string().nullable(),
|
|
67
|
+
buildNumber: z.string().nullable(),
|
|
68
|
+
lastEventKind: MealPlanNotificationKindSchema.nullable(),
|
|
69
|
+
lastBehavior: MealPlanLiveActivityBehaviorSchema.nullable(),
|
|
70
|
+
lastUpdateStatus: MealPlanLiveActivityUpdateStatusSchema.nullable(),
|
|
71
|
+
lastError: z.string().nullable(),
|
|
72
|
+
startedAt: ISODateTimeStringSchema,
|
|
73
|
+
endedAt: ISODateTimeStringSchema.nullable(),
|
|
74
|
+
updatedAt: ISODateTimeStringSchema
|
|
75
|
+
});
|
|
76
|
+
var MealPlanLiveActivitySessionListResponseSchema = z.object({
|
|
77
|
+
mealPlanId: MealPlanIdSchema,
|
|
78
|
+
state: MealPlanLiveActivityStateSchema,
|
|
79
|
+
sessions: z.array(MealPlanLiveActivitySessionResponseSchema)
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export {
|
|
83
|
+
MealPlanLiveActivityPlatformSchema,
|
|
84
|
+
MealPlanLiveActivitySessionStatusSchema,
|
|
85
|
+
MealPlanLiveActivityUpdateStatusSchema,
|
|
86
|
+
RegisterMealPlanLiveActivitySessionRequestSchema,
|
|
87
|
+
EndMealPlanLiveActivitySessionRequestSchema,
|
|
88
|
+
MealPlanLiveActivityStateSchema,
|
|
89
|
+
MealPlanLiveActivitySessionResponseSchema,
|
|
90
|
+
MealPlanLiveActivitySessionListResponseSchema
|
|
91
|
+
};
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
var isoDateRegex = /^\d{4}-\d{2}-\d{2}$/;
|
|
4
4
|
var ISODateStringSchema = z.string().regex(isoDateRegex, "Expected ISO date string in YYYY-MM-DD format");
|
|
5
|
-
var ISODateTimeStringSchema = z.string().datetime({
|
|
5
|
+
var ISODateTimeStringSchema = z.string().datetime({
|
|
6
|
+
offset: true,
|
|
7
|
+
message: "Expected ISO datetime string"
|
|
8
|
+
});
|
|
6
9
|
var TimeHHmmStringSchema = z.string().regex(/^\d{2}:\d{2}$/, "Expected time string in HH:mm format");
|
|
7
10
|
|
|
8
11
|
export {
|