@kimdaegyu/babmukdang-shared 1.0.6 → 1.1.0
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-2GRWCRTV.js +328 -0
- package/dist/chunk-2SJCUQNN.js +40 -0
- package/dist/chunk-34EKPNPX.js +0 -0
- package/dist/chunk-35QGRA2X.js +0 -0
- package/dist/chunk-3YMV26OY.js +0 -0
- package/dist/chunk-4DAOP35P.js +74 -0
- package/dist/chunk-6NZPEF4K.js +34 -0
- package/dist/chunk-7MGHUZXI.js +25 -0
- package/dist/chunk-BVTYAILQ.js +0 -0
- package/dist/chunk-EJKRR2MZ.js +184 -0
- package/dist/chunk-F24BT6H4.js +23 -0
- package/dist/chunk-FCE6KXNO.js +30 -0
- package/dist/chunk-HRM3FQPL.js +12 -0
- package/dist/chunk-IJMADVK5.js +27 -0
- package/dist/chunk-IYCA6KHR.js +0 -0
- package/dist/chunk-JCN37ARR.js +52 -0
- package/dist/chunk-JXYRJKRV.js +0 -0
- package/dist/chunk-LCMNVWSP.js +0 -0
- package/dist/chunk-MP7TEKEI.js +72 -0
- package/dist/chunk-NCVWB52E.js +0 -0
- package/dist/chunk-NW5O4R7M.js +37 -0
- package/dist/chunk-O6DYRCFN.js +0 -0
- package/dist/chunk-PDGMGLYH.js +0 -0
- package/dist/chunk-PFSZSKD5.js +0 -0
- package/dist/chunk-TA4BB3UC.js +0 -0
- package/dist/chunk-UFVPFUMI.js +35 -0
- package/dist/chunk-UN7KYFMV.js +0 -0
- package/dist/chunk-UXA4FHST.js +19 -0
- package/dist/chunk-WNY6POLW.js +0 -0
- package/dist/chunk-YVACD5IG.js +127 -0
- package/dist/chunk-Z2UFF3MA.js +212 -0
- package/dist/chunk-ZNAAA53X.js +45 -0
- package/dist/chunk-ZSZ3ETY7.js +32 -0
- package/dist/domain/article/index.cjs +250 -0
- package/dist/domain/article/index.d.cts +1026 -0
- package/dist/domain/article/index.d.ts +1026 -0
- package/dist/domain/article/index.js +32 -0
- package/dist/domain/auth/index.cjs +135 -0
- package/dist/domain/auth/index.d.cts +73 -0
- package/dist/domain/auth/index.d.ts +73 -0
- package/dist/domain/auth/index.js +17 -0
- package/dist/domain/challenge/index.cjs +65 -0
- package/dist/domain/challenge/index.d.cts +104 -0
- package/dist/domain/challenge/index.d.ts +104 -0
- package/dist/domain/challenge/index.js +18 -0
- package/dist/domain/common/index.cjs +769 -0
- package/dist/domain/common/index.d.cts +2576 -0
- package/dist/domain/common/index.d.ts +2576 -0
- package/dist/domain/common/index.js +107 -0
- package/dist/domain/coupon/index.cjs +74 -0
- package/dist/domain/coupon/index.d.cts +38 -0
- package/dist/domain/coupon/index.d.ts +38 -0
- package/dist/domain/coupon/index.js +14 -0
- package/dist/domain/friend/index.cjs +152 -0
- package/dist/domain/friend/index.d.cts +148 -0
- package/dist/domain/friend/index.d.ts +148 -0
- package/dist/domain/friend/index.js +25 -0
- package/dist/domain/index.cjs +997 -0
- package/dist/domain/index.d.cts +17 -0
- package/dist/domain/index.d.ts +17 -0
- package/dist/domain/index.js +334 -0
- package/dist/domain/invitation/index.cjs +104 -0
- package/dist/domain/invitation/index.d.cts +67 -0
- package/dist/domain/invitation/index.d.ts +67 -0
- package/dist/domain/invitation/index.js +17 -0
- package/dist/domain/meal/index.cjs +59 -0
- package/dist/domain/meal/index.d.cts +38 -0
- package/dist/domain/meal/index.d.ts +38 -0
- package/dist/domain/meal/index.js +15 -0
- package/dist/domain/member/index.cjs +127 -0
- package/dist/domain/member/index.d.cts +225 -0
- package/dist/domain/member/index.d.ts +225 -0
- package/dist/domain/member/index.js +30 -0
- package/dist/domain/plan/index.cjs +269 -0
- package/dist/domain/plan/index.d.cts +189 -0
- package/dist/domain/plan/index.d.ts +189 -0
- package/dist/domain/plan/index.js +19 -0
- package/dist/domain/preference/index.cjs +69 -0
- package/dist/domain/preference/index.d.cts +31 -0
- package/dist/domain/preference/index.d.ts +31 -0
- package/dist/domain/preference/index.js +12 -0
- package/dist/domain/recruit/index.cjs +138 -0
- package/dist/domain/recruit/index.d.cts +130 -0
- package/dist/domain/recruit/index.d.ts +130 -0
- package/dist/domain/recruit/index.js +19 -0
- package/dist/domain/referral/index.cjs +78 -0
- package/dist/domain/referral/index.d.cts +51 -0
- package/dist/domain/referral/index.d.ts +51 -0
- package/dist/domain/referral/index.js +14 -0
- package/dist/domain/restaurant/index.cjs +79 -0
- package/dist/domain/restaurant/index.d.cts +85 -0
- package/dist/domain/restaurant/index.d.ts +85 -0
- package/dist/domain/restaurant/index.js +11 -0
- package/dist/domain/room/index.cjs +332 -0
- package/dist/domain/room/index.d.cts +1482 -0
- package/dist/domain/room/index.d.ts +1482 -0
- package/dist/domain/room/index.js +74 -0
- package/dist/id-B-8M90Ef.d.cts +43 -0
- package/dist/id-B-8M90Ef.d.ts +43 -0
- package/dist/index-BuInbhtG.d.cts +305 -0
- package/dist/index-CKRUOupn.d.ts +305 -0
- package/dist/index.cjs +845 -21
- package/dist/index.d.cts +113 -569
- package/dist/index.d.ts +113 -569
- package/dist/index.js +50 -30
- package/package.json +50 -39
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const RestaurantSchema: z.ZodObject<{
|
|
4
|
+
restaurantId: z.ZodBranded<z.ZodString, "RestaurantId">;
|
|
5
|
+
placeName: z.ZodString;
|
|
6
|
+
categoryName: z.ZodString;
|
|
7
|
+
categoryGroupName: z.ZodString;
|
|
8
|
+
distance: z.ZodOptional<z.ZodString>;
|
|
9
|
+
roadAddressName: z.ZodString;
|
|
10
|
+
addressName: z.ZodString;
|
|
11
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
12
|
+
placeUrl: z.ZodNullable<z.ZodString>;
|
|
13
|
+
lat: z.ZodNumber;
|
|
14
|
+
lng: z.ZodNumber;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
restaurantId: string & z.BRAND<"RestaurantId">;
|
|
17
|
+
placeName: string;
|
|
18
|
+
categoryName: string;
|
|
19
|
+
categoryGroupName: string;
|
|
20
|
+
roadAddressName: string;
|
|
21
|
+
addressName: string;
|
|
22
|
+
phone: string | null;
|
|
23
|
+
placeUrl: string | null;
|
|
24
|
+
lat: number;
|
|
25
|
+
lng: number;
|
|
26
|
+
distance?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
restaurantId: string;
|
|
29
|
+
placeName: string;
|
|
30
|
+
categoryName: string;
|
|
31
|
+
categoryGroupName: string;
|
|
32
|
+
roadAddressName: string;
|
|
33
|
+
addressName: string;
|
|
34
|
+
phone: string | null;
|
|
35
|
+
placeUrl: string | null;
|
|
36
|
+
lat: number;
|
|
37
|
+
lng: number;
|
|
38
|
+
distance?: string | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
declare const KakaoPlaceRawSchema: z.ZodObject<{
|
|
41
|
+
id: z.ZodBranded<z.ZodString, "RestaurantId">;
|
|
42
|
+
place_name: z.ZodString;
|
|
43
|
+
category_name: z.ZodString;
|
|
44
|
+
category_group_name: z.ZodString;
|
|
45
|
+
distance: z.ZodString;
|
|
46
|
+
road_address_name: z.ZodString;
|
|
47
|
+
address_name: z.ZodString;
|
|
48
|
+
phone: z.ZodString;
|
|
49
|
+
place_url: z.ZodOptional<z.ZodString>;
|
|
50
|
+
lat: z.ZodNumber;
|
|
51
|
+
lng: z.ZodNumber;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
distance: string;
|
|
54
|
+
phone: string;
|
|
55
|
+
lat: number;
|
|
56
|
+
lng: number;
|
|
57
|
+
id: string & z.BRAND<"RestaurantId">;
|
|
58
|
+
place_name: string;
|
|
59
|
+
category_name: string;
|
|
60
|
+
category_group_name: string;
|
|
61
|
+
road_address_name: string;
|
|
62
|
+
address_name: string;
|
|
63
|
+
place_url?: string | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
distance: string;
|
|
66
|
+
phone: string;
|
|
67
|
+
lat: number;
|
|
68
|
+
lng: number;
|
|
69
|
+
id: string;
|
|
70
|
+
place_name: string;
|
|
71
|
+
category_name: string;
|
|
72
|
+
category_group_name: string;
|
|
73
|
+
road_address_name: string;
|
|
74
|
+
address_name: string;
|
|
75
|
+
place_url?: string | undefined;
|
|
76
|
+
}>;
|
|
77
|
+
|
|
78
|
+
type RestaurantResponse = z.infer<typeof RestaurantSchema>;
|
|
79
|
+
type RestaurantDto = RestaurantResponse;
|
|
80
|
+
/** External Kakao adapter boundary only. Do not use inside app DTOs. */
|
|
81
|
+
type KakaoPlaceRaw = z.infer<typeof KakaoPlaceRawSchema>;
|
|
82
|
+
/** @deprecated Use RestaurantResponse internally or KakaoPlaceRaw only at the adapter boundary. */
|
|
83
|
+
type KakaoRestaurantResponseDto = KakaoPlaceRaw;
|
|
84
|
+
|
|
85
|
+
export { type KakaoPlaceRaw, KakaoPlaceRawSchema, type KakaoRestaurantResponseDto, type RestaurantDto, type RestaurantResponse, RestaurantSchema };
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/domain/room/index.ts
|
|
21
|
+
var room_exports = {};
|
|
22
|
+
__export(room_exports, {
|
|
23
|
+
AddLocationCandidateRequestSchema: () => AddLocationCandidateRequestSchema,
|
|
24
|
+
ChatMessageRequestSchema: () => ChatMessageRequestSchema,
|
|
25
|
+
ChatMessageResponseSchema: () => ChatMessageResponseSchema,
|
|
26
|
+
DatePicksUpdateResponseSchema: () => DatePicksUpdateResponseSchema,
|
|
27
|
+
ExcludeMenuRequestSchema: () => ExcludeMenuRequestSchema,
|
|
28
|
+
ExcludeMenuUpdateResponseSchema: () => ExcludeMenuUpdateResponseSchema,
|
|
29
|
+
FinalStateSchema: () => FinalStateSchema,
|
|
30
|
+
InvitationRoomStageSchema: () => InvitationRoomStageSchema,
|
|
31
|
+
LocationCandidateAddUpdateResponseSchema: () => LocationCandidateAddUpdateResponseSchema,
|
|
32
|
+
LocationCandidateSchema: () => LocationCandidateSchema,
|
|
33
|
+
LocationCandidateVoteUpdateResponseSchema: () => LocationCandidateVoteUpdateResponseSchema,
|
|
34
|
+
LocationIdSchema: () => LocationIdSchema,
|
|
35
|
+
MenuCodeSchema: () => MenuCodeSchema,
|
|
36
|
+
MenuPickUpdateResponseSchema: () => MenuPickUpdateResponseSchema,
|
|
37
|
+
MenuSchema: () => MenuSchema,
|
|
38
|
+
ParticipantSchema: () => ParticipantSchema,
|
|
39
|
+
PhaseDataBroadcastSchema: () => PhaseDataBroadcastSchema,
|
|
40
|
+
PickDateRequestSchema: () => PickDateRequestSchema,
|
|
41
|
+
PickMenuRequestSchema: () => PickMenuRequestSchema,
|
|
42
|
+
PickRestaurantRequestSchema: () => PickRestaurantRequestSchema,
|
|
43
|
+
PickTimesRequestSchema: () => PickTimesRequestSchema,
|
|
44
|
+
ReadyStateChangedSchema: () => ReadyStateChangedSchema,
|
|
45
|
+
ReadyStateRequestSchema: () => ReadyStateRequestSchema,
|
|
46
|
+
RecruitRoomStageSchema: () => RecruitRoomStageSchema,
|
|
47
|
+
RestaurantPickUpdateResponseSchema: () => RestaurantPickUpdateResponseSchema,
|
|
48
|
+
RoomAssignedResponseSchema: () => RoomAssignedResponseSchema,
|
|
49
|
+
RoomInitialStateSchema: () => RoomInitialStateSchema,
|
|
50
|
+
RoomSocketClientEventSchemas: () => RoomSocketClientEventSchemas,
|
|
51
|
+
RoomSocketErrorSchema: () => RoomSocketErrorSchema,
|
|
52
|
+
RoomSocketServerEventSchemas: () => RoomSocketServerEventSchemas,
|
|
53
|
+
TimePicksUpdateResponseSchema: () => TimePicksUpdateResponseSchema,
|
|
54
|
+
VoteLocationRequestSchema: () => VoteLocationRequestSchema
|
|
55
|
+
});
|
|
56
|
+
module.exports = __toCommonJS(room_exports);
|
|
57
|
+
|
|
58
|
+
// src/domain/room/schema/room.schema.ts
|
|
59
|
+
var import_zod5 = require("zod");
|
|
60
|
+
|
|
61
|
+
// src/domain/common/schema/date.schema.ts
|
|
62
|
+
var import_zod = require("zod");
|
|
63
|
+
var isoDateRegex = /^\d{4}-\d{2}-\d{2}$/;
|
|
64
|
+
var ISODateStringSchema = import_zod.z.string().regex(isoDateRegex, "Expected ISO date string in YYYY-MM-DD format");
|
|
65
|
+
var ISODateTimeStringSchema = import_zod.z.string().datetime({ offset: true, message: "Expected ISO datetime string" });
|
|
66
|
+
var TimeHHmmStringSchema = import_zod.z.string().regex(/^\d{2}:\d{2}$/, "Expected time string in HH:mm format");
|
|
67
|
+
|
|
68
|
+
// src/domain/common/schema/id.schema.ts
|
|
69
|
+
var import_zod2 = require("zod");
|
|
70
|
+
var PositiveIntIdSchema = import_zod2.z.number().int().positive();
|
|
71
|
+
var NonEmptyStringIdSchema = import_zod2.z.string().min(1);
|
|
72
|
+
var MemberIdSchema = PositiveIntIdSchema.brand();
|
|
73
|
+
var ArticleIdSchema = PositiveIntIdSchema.brand();
|
|
74
|
+
var CommentIdSchema = PositiveIntIdSchema.brand();
|
|
75
|
+
var RecruitIdSchema = PositiveIntIdSchema.brand();
|
|
76
|
+
var PlanIdSchema = PositiveIntIdSchema.brand();
|
|
77
|
+
var InvitationIdSchema = PositiveIntIdSchema.brand();
|
|
78
|
+
var RoomIdSchema = NonEmptyStringIdSchema.brand();
|
|
79
|
+
var RestaurantIdSchema = NonEmptyStringIdSchema.brand();
|
|
80
|
+
var CouponIdSchema = PositiveIntIdSchema.brand();
|
|
81
|
+
var SubscriptionIdSchema = PositiveIntIdSchema.brand();
|
|
82
|
+
var FriendRequestIdSchema = PositiveIntIdSchema.brand();
|
|
83
|
+
var ReferralCodeSchema = import_zod2.z.string().min(4).max(64).brand();
|
|
84
|
+
|
|
85
|
+
// src/domain/member/schema/member.schema.ts
|
|
86
|
+
var import_zod3 = require("zod");
|
|
87
|
+
var MemberRoleSchema = import_zod3.z.enum(["USER", "ADMIN"]);
|
|
88
|
+
var MemberCoreSchema = import_zod3.z.object({
|
|
89
|
+
memberId: MemberIdSchema,
|
|
90
|
+
username: import_zod3.z.string().min(1).max(50),
|
|
91
|
+
profileImageUrl: import_zod3.z.string().url().nullable()
|
|
92
|
+
});
|
|
93
|
+
var MemberResponseSchema = MemberCoreSchema.pick({
|
|
94
|
+
memberId: true,
|
|
95
|
+
username: true,
|
|
96
|
+
profileImageUrl: true
|
|
97
|
+
});
|
|
98
|
+
var MemberSummaryResponseSchema = MemberCoreSchema.extend({
|
|
99
|
+
friends: import_zod3.z.number().int().min(0).default(0),
|
|
100
|
+
completedPlans: import_zod3.z.number().int().min(0).default(0),
|
|
101
|
+
uncompletedPlans: import_zod3.z.number().int().min(0).default(0)
|
|
102
|
+
});
|
|
103
|
+
var AuthPrincipalSchema = import_zod3.z.object({
|
|
104
|
+
memberId: MemberIdSchema,
|
|
105
|
+
role: MemberRoleSchema
|
|
106
|
+
});
|
|
107
|
+
var ProfilePreferenceItemSchema = import_zod3.z.object({
|
|
108
|
+
code: import_zod3.z.string(),
|
|
109
|
+
label: import_zod3.z.string()
|
|
110
|
+
});
|
|
111
|
+
var ProfileDetailResponseSchema = MemberCoreSchema.extend({
|
|
112
|
+
bio: import_zod3.z.string().nullable(),
|
|
113
|
+
planCount: import_zod3.z.number().int().min(0),
|
|
114
|
+
likes: import_zod3.z.array(ProfilePreferenceItemSchema),
|
|
115
|
+
dislikes: import_zod3.z.array(ProfilePreferenceItemSchema),
|
|
116
|
+
allergies: import_zod3.z.array(ProfilePreferenceItemSchema)
|
|
117
|
+
});
|
|
118
|
+
var UpdateProfileRequestSchema = import_zod3.z.object({
|
|
119
|
+
username: import_zod3.z.string().min(1).max(50),
|
|
120
|
+
profileImageUrl: import_zod3.z.string().url().nullable(),
|
|
121
|
+
bio: import_zod3.z.string().max(500).nullable()
|
|
122
|
+
});
|
|
123
|
+
var OnboardingPreferenceRequestSchema = import_zod3.z.object({
|
|
124
|
+
likedCodes: import_zod3.z.array(import_zod3.z.string()),
|
|
125
|
+
dislikedCodes: import_zod3.z.array(import_zod3.z.string()),
|
|
126
|
+
allergyCodes: import_zod3.z.array(import_zod3.z.string())
|
|
127
|
+
});
|
|
128
|
+
var OnboardingRequestSchema = UpdateProfileRequestSchema.merge(
|
|
129
|
+
OnboardingPreferenceRequestSchema
|
|
130
|
+
);
|
|
131
|
+
var PreferenceMetaResponseSchema = import_zod3.z.object({
|
|
132
|
+
onboardedAt: ISODateTimeStringSchema.nullable(),
|
|
133
|
+
lastUpdatedAt: ISODateTimeStringSchema.nullable(),
|
|
134
|
+
revision: import_zod3.z.number().int().min(0)
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// src/domain/restaurant/schema/restaurant.schema.ts
|
|
138
|
+
var import_zod4 = require("zod");
|
|
139
|
+
var RestaurantSchema = import_zod4.z.object({
|
|
140
|
+
restaurantId: RestaurantIdSchema,
|
|
141
|
+
placeName: import_zod4.z.string(),
|
|
142
|
+
categoryName: import_zod4.z.string(),
|
|
143
|
+
categoryGroupName: import_zod4.z.string(),
|
|
144
|
+
distance: import_zod4.z.string().optional(),
|
|
145
|
+
roadAddressName: import_zod4.z.string(),
|
|
146
|
+
addressName: import_zod4.z.string(),
|
|
147
|
+
phone: import_zod4.z.string().nullable(),
|
|
148
|
+
placeUrl: import_zod4.z.string().url().nullable(),
|
|
149
|
+
lat: import_zod4.z.number(),
|
|
150
|
+
lng: import_zod4.z.number()
|
|
151
|
+
});
|
|
152
|
+
var KakaoPlaceRawSchema = import_zod4.z.object({
|
|
153
|
+
id: RestaurantIdSchema,
|
|
154
|
+
place_name: import_zod4.z.string(),
|
|
155
|
+
category_name: import_zod4.z.string(),
|
|
156
|
+
category_group_name: import_zod4.z.string(),
|
|
157
|
+
distance: import_zod4.z.string(),
|
|
158
|
+
road_address_name: import_zod4.z.string(),
|
|
159
|
+
address_name: import_zod4.z.string(),
|
|
160
|
+
phone: import_zod4.z.string(),
|
|
161
|
+
place_url: import_zod4.z.string().url().optional(),
|
|
162
|
+
lat: import_zod4.z.number(),
|
|
163
|
+
lng: import_zod4.z.number()
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
// src/domain/room/schema/room.schema.ts
|
|
167
|
+
var MenuCodeSchema = import_zod5.z.string().min(1).brand();
|
|
168
|
+
var LocationIdSchema = import_zod5.z.string().min(1).brand();
|
|
169
|
+
var MenuSchema = import_zod5.z.object({
|
|
170
|
+
code: MenuCodeSchema,
|
|
171
|
+
label: import_zod5.z.string()
|
|
172
|
+
});
|
|
173
|
+
var LocationCandidateSchema = import_zod5.z.object({
|
|
174
|
+
locationId: LocationIdSchema,
|
|
175
|
+
placeName: import_zod5.z.string(),
|
|
176
|
+
lat: import_zod5.z.number(),
|
|
177
|
+
lng: import_zod5.z.number(),
|
|
178
|
+
address: import_zod5.z.string()
|
|
179
|
+
});
|
|
180
|
+
var ParticipantSchema = MemberResponseSchema.extend({
|
|
181
|
+
ready: import_zod5.z.boolean()
|
|
182
|
+
});
|
|
183
|
+
var RecruitRoomStageSchema = import_zod5.z.enum([
|
|
184
|
+
"waiting",
|
|
185
|
+
"location",
|
|
186
|
+
"location-vote",
|
|
187
|
+
"exclude-menu",
|
|
188
|
+
"menu",
|
|
189
|
+
"restaurant",
|
|
190
|
+
"finish"
|
|
191
|
+
]);
|
|
192
|
+
var InvitationRoomStageSchema = import_zod5.z.enum([
|
|
193
|
+
"waiting",
|
|
194
|
+
"date",
|
|
195
|
+
"time",
|
|
196
|
+
"location",
|
|
197
|
+
"location-vote",
|
|
198
|
+
"exclude-menu",
|
|
199
|
+
"menu",
|
|
200
|
+
"restaurant",
|
|
201
|
+
"finish"
|
|
202
|
+
]);
|
|
203
|
+
var ReadyStateRequestSchema = import_zod5.z.object({
|
|
204
|
+
isReady: import_zod5.z.boolean()
|
|
205
|
+
});
|
|
206
|
+
var ChatMessageRequestSchema = import_zod5.z.object({
|
|
207
|
+
message: import_zod5.z.string().min(1).max(500)
|
|
208
|
+
});
|
|
209
|
+
var AddLocationCandidateRequestSchema = LocationCandidateSchema;
|
|
210
|
+
var VoteLocationRequestSchema = import_zod5.z.object({ locationId: LocationIdSchema });
|
|
211
|
+
var ExcludeMenuRequestSchema = import_zod5.z.object({ menu: MenuSchema });
|
|
212
|
+
var PickMenuRequestSchema = import_zod5.z.object({ menuCode: MenuCodeSchema });
|
|
213
|
+
var PickRestaurantRequestSchema = import_zod5.z.object({ restaurantId: RestaurantIdSchema });
|
|
214
|
+
var PickTimesRequestSchema = import_zod5.z.object({ times: import_zod5.z.array(import_zod5.z.string().min(1)).min(1) });
|
|
215
|
+
var PickDateRequestSchema = import_zod5.z.object({ dates: import_zod5.z.array(ISODateStringSchema).min(1) });
|
|
216
|
+
var RoomAssignedResponseSchema = import_zod5.z.object({
|
|
217
|
+
roomId: RoomIdSchema
|
|
218
|
+
});
|
|
219
|
+
var RoomSocketErrorSchema = import_zod5.z.object({
|
|
220
|
+
code: import_zod5.z.string(),
|
|
221
|
+
message: import_zod5.z.string()
|
|
222
|
+
});
|
|
223
|
+
var ChatMessageResponseSchema = import_zod5.z.object({
|
|
224
|
+
messageId: import_zod5.z.string(),
|
|
225
|
+
user: MemberResponseSchema,
|
|
226
|
+
message: import_zod5.z.string(),
|
|
227
|
+
createdAt: ISODateTimeStringSchema
|
|
228
|
+
});
|
|
229
|
+
var ReadyStateChangedSchema = import_zod5.z.object({
|
|
230
|
+
readyCount: import_zod5.z.number().int().min(0),
|
|
231
|
+
participantCount: import_zod5.z.number().int().min(0)
|
|
232
|
+
});
|
|
233
|
+
var FinalStateSchema = import_zod5.z.object({
|
|
234
|
+
location: LocationCandidateSchema.optional(),
|
|
235
|
+
excludeMenu: import_zod5.z.array(MenuSchema).optional(),
|
|
236
|
+
menu: MenuSchema.optional(),
|
|
237
|
+
restaurant: RestaurantSchema.optional(),
|
|
238
|
+
time: import_zod5.z.string().optional(),
|
|
239
|
+
date: ISODateStringSchema.optional()
|
|
240
|
+
});
|
|
241
|
+
var RoomInitialStateSchema = import_zod5.z.object({
|
|
242
|
+
participants: import_zod5.z.array(ParticipantSchema),
|
|
243
|
+
chat: import_zod5.z.array(ChatMessageResponseSchema),
|
|
244
|
+
final: FinalStateSchema
|
|
245
|
+
});
|
|
246
|
+
var PhaseDataBroadcastSchema = import_zod5.z.object({
|
|
247
|
+
phase: import_zod5.z.union([RecruitRoomStageSchema, InvitationRoomStageSchema]),
|
|
248
|
+
data: import_zod5.z.unknown()
|
|
249
|
+
});
|
|
250
|
+
var TimePicksUpdateResponseSchema = import_zod5.z.array(
|
|
251
|
+
import_zod5.z.object({ memberId: MemberIdSchema, times: import_zod5.z.array(import_zod5.z.string()) })
|
|
252
|
+
);
|
|
253
|
+
var DatePicksUpdateResponseSchema = import_zod5.z.array(
|
|
254
|
+
import_zod5.z.object({ memberId: MemberIdSchema, dates: import_zod5.z.array(ISODateStringSchema) })
|
|
255
|
+
);
|
|
256
|
+
var LocationCandidateAddUpdateResponseSchema = import_zod5.z.array(
|
|
257
|
+
LocationCandidateSchema.extend({ authorMemberId: MemberIdSchema })
|
|
258
|
+
);
|
|
259
|
+
var LocationCandidateVoteUpdateResponseSchema = import_zod5.z.array(
|
|
260
|
+
import_zod5.z.object({ locationId: LocationIdSchema, votes: import_zod5.z.array(MemberIdSchema) })
|
|
261
|
+
);
|
|
262
|
+
var ExcludeMenuUpdateResponseSchema = import_zod5.z.array(
|
|
263
|
+
import_zod5.z.object({ memberId: MemberIdSchema, exclusions: import_zod5.z.array(MenuSchema) })
|
|
264
|
+
);
|
|
265
|
+
var MenuPickUpdateResponseSchema = import_zod5.z.array(
|
|
266
|
+
import_zod5.z.object({ menuCode: MenuCodeSchema, selectedMembers: import_zod5.z.array(MemberIdSchema) })
|
|
267
|
+
);
|
|
268
|
+
var RestaurantPickUpdateResponseSchema = import_zod5.z.array(
|
|
269
|
+
import_zod5.z.object({ restaurantId: RestaurantIdSchema, selectedMembers: import_zod5.z.array(MemberIdSchema) })
|
|
270
|
+
);
|
|
271
|
+
var RoomSocketClientEventSchemas = {
|
|
272
|
+
"ready-state": ReadyStateRequestSchema,
|
|
273
|
+
"chat-message": ChatMessageRequestSchema,
|
|
274
|
+
"add-location-candidate": AddLocationCandidateRequestSchema,
|
|
275
|
+
"vote-location": VoteLocationRequestSchema,
|
|
276
|
+
"exclude-menu": ExcludeMenuRequestSchema,
|
|
277
|
+
"pick-menu": PickMenuRequestSchema,
|
|
278
|
+
"pick-restaurant": PickRestaurantRequestSchema,
|
|
279
|
+
"pick-times": PickTimesRequestSchema,
|
|
280
|
+
"pick-date": PickDateRequestSchema
|
|
281
|
+
};
|
|
282
|
+
var RoomSocketServerEventSchemas = {
|
|
283
|
+
"room-assigned": RoomAssignedResponseSchema,
|
|
284
|
+
"stage-changed": PhaseDataBroadcastSchema,
|
|
285
|
+
"chat-message": ChatMessageResponseSchema,
|
|
286
|
+
"room-error": RoomSocketErrorSchema,
|
|
287
|
+
"ready-state-changed": ReadyStateChangedSchema,
|
|
288
|
+
"join-room": RoomInitialStateSchema,
|
|
289
|
+
"time-updated": TimePicksUpdateResponseSchema,
|
|
290
|
+
"date-updated": DatePicksUpdateResponseSchema,
|
|
291
|
+
"location-add-updated": LocationCandidateAddUpdateResponseSchema,
|
|
292
|
+
"location-vote-updated": LocationCandidateVoteUpdateResponseSchema,
|
|
293
|
+
"exclude-menu-updated": ExcludeMenuUpdateResponseSchema,
|
|
294
|
+
"menu-pick-updated": MenuPickUpdateResponseSchema,
|
|
295
|
+
"restaurant-pick-updated": RestaurantPickUpdateResponseSchema,
|
|
296
|
+
"final-state-response": FinalStateSchema
|
|
297
|
+
};
|
|
298
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
299
|
+
0 && (module.exports = {
|
|
300
|
+
AddLocationCandidateRequestSchema,
|
|
301
|
+
ChatMessageRequestSchema,
|
|
302
|
+
ChatMessageResponseSchema,
|
|
303
|
+
DatePicksUpdateResponseSchema,
|
|
304
|
+
ExcludeMenuRequestSchema,
|
|
305
|
+
ExcludeMenuUpdateResponseSchema,
|
|
306
|
+
FinalStateSchema,
|
|
307
|
+
InvitationRoomStageSchema,
|
|
308
|
+
LocationCandidateAddUpdateResponseSchema,
|
|
309
|
+
LocationCandidateSchema,
|
|
310
|
+
LocationCandidateVoteUpdateResponseSchema,
|
|
311
|
+
LocationIdSchema,
|
|
312
|
+
MenuCodeSchema,
|
|
313
|
+
MenuPickUpdateResponseSchema,
|
|
314
|
+
MenuSchema,
|
|
315
|
+
ParticipantSchema,
|
|
316
|
+
PhaseDataBroadcastSchema,
|
|
317
|
+
PickDateRequestSchema,
|
|
318
|
+
PickMenuRequestSchema,
|
|
319
|
+
PickRestaurantRequestSchema,
|
|
320
|
+
PickTimesRequestSchema,
|
|
321
|
+
ReadyStateChangedSchema,
|
|
322
|
+
ReadyStateRequestSchema,
|
|
323
|
+
RecruitRoomStageSchema,
|
|
324
|
+
RestaurantPickUpdateResponseSchema,
|
|
325
|
+
RoomAssignedResponseSchema,
|
|
326
|
+
RoomInitialStateSchema,
|
|
327
|
+
RoomSocketClientEventSchemas,
|
|
328
|
+
RoomSocketErrorSchema,
|
|
329
|
+
RoomSocketServerEventSchemas,
|
|
330
|
+
TimePicksUpdateResponseSchema,
|
|
331
|
+
VoteLocationRequestSchema
|
|
332
|
+
});
|