@kimdaegyu/babmukdang-shared 1.1.10 → 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.
Files changed (88) hide show
  1. package/dist/chunk-3BLXZW4U.js +338 -0
  2. package/dist/{chunk-AI2YMBJX.js → chunk-65DWKLP6.js} +18 -9
  3. package/dist/{chunk-H77ISYYC.js → chunk-6R5CCY5Q.js} +22 -8
  4. package/dist/{chunk-4E5E3PFW.js → chunk-DRCY5UNQ.js} +20 -7
  5. package/dist/chunk-EX7S5FI5.js +91 -0
  6. package/dist/{chunk-HRM3FQPL.js → chunk-EYZU5HPG.js} +4 -1
  7. package/dist/{chunk-OJVXYCSH.js → chunk-G7TITUHT.js} +1 -1
  8. package/dist/chunk-GESEM4IA.js +122 -0
  9. package/dist/chunk-IPANLE7B.js +632 -0
  10. package/dist/chunk-KREAZLLH.js +1062 -0
  11. package/dist/{chunk-K3CZKI2F.js → chunk-P3MYMK34.js} +24 -13
  12. package/dist/chunk-Q4BPFDVB.js +171 -0
  13. package/dist/{chunk-W4C7XHTX.js → chunk-QUAG5LF5.js} +13 -6
  14. package/dist/chunk-TIOX7OHA.js +863 -0
  15. package/dist/{chunk-GTVEQYJW.js → chunk-TOXRHSD6.js} +1 -1
  16. package/dist/chunk-YV734GYZ.js +165 -0
  17. package/dist/domain/article/index.cjs +107 -15
  18. package/dist/domain/article/index.d.cts +254 -0
  19. package/dist/domain/article/index.d.ts +254 -0
  20. package/dist/domain/article/index.js +5 -5
  21. package/dist/domain/auth/index.cjs +88 -9
  22. package/dist/domain/auth/index.d.cts +29 -0
  23. package/dist/domain/auth/index.d.ts +29 -0
  24. package/dist/domain/auth/index.js +3 -3
  25. package/dist/domain/common/index.cjs +2100 -395
  26. package/dist/domain/common/index.d.cts +328 -0
  27. package/dist/domain/common/index.d.ts +328 -0
  28. package/dist/domain/common/index.js +65 -31
  29. package/dist/domain/food/index.cjs +248 -0
  30. package/dist/domain/food/index.d.cts +321 -0
  31. package/dist/domain/food/index.d.ts +321 -0
  32. package/dist/domain/food/index.js +44 -0
  33. package/dist/domain/friend/index.cjs +108 -12
  34. package/dist/domain/friend/index.d.cts +72 -0
  35. package/dist/domain/friend/index.d.ts +72 -0
  36. package/dist/domain/friend/index.js +6 -4
  37. package/dist/domain/index.cjs +2736 -522
  38. package/dist/domain/index.d.cts +576 -0
  39. package/dist/domain/index.d.ts +576 -0
  40. package/dist/domain/index.js +429 -140
  41. package/dist/domain/live-activity/index.cjs +1061 -0
  42. package/dist/domain/live-activity/index.d.cts +177 -0
  43. package/dist/domain/live-activity/index.d.ts +177 -0
  44. package/dist/domain/live-activity/index.js +27 -0
  45. package/dist/domain/meal/index.cjs +101 -12
  46. package/dist/domain/meal/index.d.cts +47 -0
  47. package/dist/domain/meal/index.d.ts +47 -0
  48. package/dist/domain/meal/index.js +4 -4
  49. package/dist/domain/meal-plan/index.cjs +1504 -0
  50. package/dist/domain/meal-plan/index.d.cts +4424 -0
  51. package/dist/domain/meal-plan/index.d.ts +4424 -0
  52. package/dist/domain/meal-plan/index.js +256 -0
  53. package/dist/domain/member/index.cjs +114 -9
  54. package/dist/domain/member/index.d.cts +330 -0
  55. package/dist/domain/member/index.d.ts +330 -0
  56. package/dist/domain/member/index.js +26 -2
  57. package/dist/domain/promotion/index.cjs +26 -8
  58. package/dist/domain/promotion/index.d.cts +81 -0
  59. package/dist/domain/promotion/index.d.ts +81 -0
  60. package/dist/domain/promotion/index.js +3 -3
  61. package/dist/domain/push/index.cjs +1004 -0
  62. package/dist/domain/push/index.d.cts +169 -0
  63. package/dist/domain/push/index.d.ts +169 -0
  64. package/dist/domain/push/index.js +35 -0
  65. package/dist/domain/restaurant/index.cjs +10 -4
  66. package/dist/domain/restaurant/index.d.cts +34 -0
  67. package/dist/domain/restaurant/index.d.ts +34 -0
  68. package/dist/domain/restaurant/index.js +2 -2
  69. package/dist/index.cjs +2533 -640
  70. package/dist/index.d.cts +14 -0
  71. package/dist/index.d.ts +14 -0
  72. package/dist/index.js +16 -191
  73. package/package.json +52 -55
  74. package/dist/chunk-PFSZSKD5.js +0 -0
  75. package/dist/chunk-PQMEXOPZ.js +0 -232
  76. package/dist/chunk-W4TUW2GY.js +0 -40
  77. package/dist/chunk-WNYCCQM4.js +0 -342
  78. package/dist/chunk-YGFAVC5N.js +0 -34
  79. package/dist/chunk-YM7YU7IR.js +0 -319
  80. package/dist/chunk-ZH7D7B2Y.js +0 -78
  81. package/dist/domain/invitation/index.cjs +0 -82
  82. package/dist/domain/invitation/index.js +0 -13
  83. package/dist/domain/plan/index.cjs +0 -327
  84. package/dist/domain/plan/index.js +0 -18
  85. package/dist/domain/recruit/index.cjs +0 -189
  86. package/dist/domain/recruit/index.js +0 -30
  87. package/dist/domain/room/index.cjs +0 -401
  88. package/dist/domain/room/index.js +0 -82
@@ -0,0 +1,328 @@
1
+ import { z } from 'zod';
2
+
3
+ type HttpMethod = "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
4
+ declare const NoBodySchema: z.ZodUndefined;
5
+ declare const NoQuerySchema: z.ZodUndefined;
6
+ declare const NoParamsSchema: z.ZodUndefined;
7
+ interface EndpointContract<TMethod extends HttpMethod, TPath extends string, TPathParams extends z.ZodTypeAny, TQuery extends z.ZodTypeAny, TBody extends z.ZodTypeAny, TResponse extends z.ZodTypeAny> {
8
+ readonly method: TMethod;
9
+ readonly path: TPath;
10
+ readonly pathParams: TPathParams;
11
+ readonly query: TQuery;
12
+ readonly body: TBody;
13
+ readonly response: TResponse;
14
+ }
15
+ declare const endpoint: <TMethod extends HttpMethod, TPath extends string, TPathParams extends z.ZodTypeAny = typeof NoParamsSchema, TQuery extends z.ZodTypeAny = typeof NoQuerySchema, TBody extends z.ZodTypeAny = typeof NoBodySchema, TResponse extends z.ZodTypeAny = z.ZodNever>(contract: {
16
+ method: TMethod;
17
+ path: TPath;
18
+ pathParams?: TPathParams;
19
+ query?: TQuery;
20
+ body?: TBody;
21
+ response: TResponse;
22
+ }) => EndpointContract<TMethod, TPath, TPathParams, TQuery, TBody, TResponse>;
23
+ type BodyOf<E> = E extends EndpointContract<any, any, any, any, infer TBody, any> ? z.infer<TBody> : never;
24
+ type QueryOf<E> = E extends EndpointContract<any, any, any, infer TQuery, any, any> ? z.infer<TQuery> : never;
25
+ type PathParamsOf<E> = E extends EndpointContract<any, any, infer TPathParams, any, any, any> ? z.infer<TPathParams> : never;
26
+ type ResponseOf<E> = E extends EndpointContract<any, any, any, any, any, infer TResponse> ? z.infer<TResponse> : never;
27
+
28
+ declare const apiContract: Record<string, Record<string, EndpointContract<any, string, any, any, any, any>>>;
29
+ type ApiContract = typeof apiContract;
30
+ type ApiDomain = keyof ApiContract;
31
+
32
+ declare const CacheInvalidationEntitySchema: z.ZodEnum<{
33
+ article: "article";
34
+ mealPlan: "mealPlan";
35
+ mealPlanInvite: "mealPlanInvite";
36
+ mealPlanParticipant: "mealPlanParticipant";
37
+ mealPlanDecision: "mealPlanDecision";
38
+ mealPlanChat: "mealPlanChat";
39
+ mealGroup: "mealGroup";
40
+ notification: "notification";
41
+ friend: "friend";
42
+ }>;
43
+ declare const CacheInvalidationActionSchema: z.ZodEnum<{
44
+ created: "created";
45
+ updated: "updated";
46
+ deleted: "deleted";
47
+ accepted: "accepted";
48
+ rejected: "rejected";
49
+ cancelled: "cancelled";
50
+ closed: "closed";
51
+ joined: "joined";
52
+ ready: "ready";
53
+ confirmed: "confirmed";
54
+ locked: "locked";
55
+ completed: "completed";
56
+ recorded: "recorded";
57
+ read: "read";
58
+ }>;
59
+ declare const CacheInvalidationKeySchema: z.ZodEnum<{
60
+ articles: "articles";
61
+ mealPlans: "mealPlans";
62
+ mealPlanDetail: "mealPlanDetail";
63
+ mealPlanInvites: "mealPlanInvites";
64
+ mealPlanJoinRequests: "mealPlanJoinRequests";
65
+ mealPlanNearbyFriends: "mealPlanNearbyFriends";
66
+ mealPlanMessages: "mealPlanMessages";
67
+ mealGroups: "mealGroups";
68
+ notifications: "notifications";
69
+ friends: "friends";
70
+ friendMeals: "friendMeals";
71
+ }>;
72
+ declare const CacheInvalidationEventSchema: z.ZodObject<{
73
+ type: z.ZodLiteral<"cache.invalidate">;
74
+ entity: z.ZodEnum<{
75
+ article: "article";
76
+ mealPlan: "mealPlan";
77
+ mealPlanInvite: "mealPlanInvite";
78
+ mealPlanParticipant: "mealPlanParticipant";
79
+ mealPlanDecision: "mealPlanDecision";
80
+ mealPlanChat: "mealPlanChat";
81
+ mealGroup: "mealGroup";
82
+ notification: "notification";
83
+ friend: "friend";
84
+ }>;
85
+ action: z.ZodEnum<{
86
+ created: "created";
87
+ updated: "updated";
88
+ deleted: "deleted";
89
+ accepted: "accepted";
90
+ rejected: "rejected";
91
+ cancelled: "cancelled";
92
+ closed: "closed";
93
+ joined: "joined";
94
+ ready: "ready";
95
+ confirmed: "confirmed";
96
+ locked: "locked";
97
+ completed: "completed";
98
+ recorded: "recorded";
99
+ read: "read";
100
+ }>;
101
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
102
+ keys: z.ZodArray<z.ZodEnum<{
103
+ articles: "articles";
104
+ mealPlans: "mealPlans";
105
+ mealPlanDetail: "mealPlanDetail";
106
+ mealPlanInvites: "mealPlanInvites";
107
+ mealPlanJoinRequests: "mealPlanJoinRequests";
108
+ mealPlanNearbyFriends: "mealPlanNearbyFriends";
109
+ mealPlanMessages: "mealPlanMessages";
110
+ mealGroups: "mealGroups";
111
+ notifications: "notifications";
112
+ friends: "friends";
113
+ friendMeals: "friendMeals";
114
+ }>>;
115
+ occurredAt: z.ZodString;
116
+ }, z.core.$strip>;
117
+
118
+ declare const CACHE_INVALIDATION_SSE_EVENT: "cache-invalidate";
119
+ type CacheInvalidationEntity = z.infer<typeof CacheInvalidationEntitySchema>;
120
+ type CacheInvalidationAction = z.infer<typeof CacheInvalidationActionSchema>;
121
+ type CacheInvalidationKey = z.infer<typeof CacheInvalidationKeySchema>;
122
+ type CacheInvalidationEvent = z.infer<typeof CacheInvalidationEventSchema>;
123
+
124
+ declare const ISODateStringSchema: z.ZodString;
125
+ declare const ISODateTimeStringSchema: z.ZodString;
126
+ declare const TimeHHmmStringSchema: z.ZodString;
127
+
128
+ type ISODateString = z.infer<typeof ISODateStringSchema>;
129
+ type ISODateTimeString = z.infer<typeof ISODateTimeStringSchema>;
130
+ type TimeHHmmString = z.infer<typeof TimeHHmmStringSchema>;
131
+
132
+ type EntityContract<TEntityName extends string, TId, TShape extends object> = TShape & {
133
+ readonly __entityName?: TEntityName;
134
+ readonly id?: TId;
135
+ };
136
+
137
+ declare const NoContentSchema: z.ZodNull;
138
+ declare const ApiSuccessSchema: <TData extends z.ZodTypeAny>(data: TData) => z.ZodObject<{
139
+ success: z.ZodLiteral<true>;
140
+ code: z.ZodNumber;
141
+ message: z.ZodString;
142
+ data: TData;
143
+ }, z.core.$strip>;
144
+ declare const ApiFailureSchema: z.ZodObject<{
145
+ success: z.ZodLiteral<false>;
146
+ status: z.ZodNumber;
147
+ code: z.ZodString;
148
+ message: z.ZodString;
149
+ }, z.core.$strip>;
150
+ declare const ApiResponseSchema: <TData extends z.ZodTypeAny>(data: TData) => z.ZodUnion<readonly [z.ZodObject<{
151
+ success: z.ZodLiteral<true>;
152
+ code: z.ZodNumber;
153
+ message: z.ZodString;
154
+ data: TData;
155
+ }, z.core.$strip>, z.ZodObject<{
156
+ success: z.ZodLiteral<false>;
157
+ status: z.ZodNumber;
158
+ code: z.ZodString;
159
+ message: z.ZodString;
160
+ }, z.core.$strip>]>;
161
+ declare const CreatedEntityIdResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
162
+ entity: z.ZodLiteral<"article">;
163
+ id: z.core.$ZodBranded<z.ZodNumber, "ArticleId", "out">;
164
+ }, z.core.$strip>, z.ZodObject<{
165
+ entity: z.ZodLiteral<"comment">;
166
+ id: z.core.$ZodBranded<z.ZodNumber, "CommentId", "out">;
167
+ }, z.core.$strip>, z.ZodObject<{
168
+ entity: z.ZodLiteral<"subscription">;
169
+ id: z.core.$ZodBranded<z.ZodNumber, "SubscriptionId", "out">;
170
+ }, z.core.$strip>, z.ZodObject<{
171
+ entity: z.ZodLiteral<"coupon">;
172
+ id: z.core.$ZodBranded<z.ZodNumber, "CouponId", "out">;
173
+ }, z.core.$strip>, z.ZodObject<{
174
+ entity: z.ZodLiteral<"mealPlan">;
175
+ id: z.core.$ZodBranded<z.ZodString, "MealPlanId", "out">;
176
+ }, z.core.$strip>, z.ZodObject<{
177
+ entity: z.ZodLiteral<"mealPlanInvite">;
178
+ id: z.core.$ZodBranded<z.ZodString, "MealPlanInviteId", "out">;
179
+ }, z.core.$strip>, z.ZodObject<{
180
+ entity: z.ZodLiteral<"mealPlanJoinRequest">;
181
+ id: z.core.$ZodBranded<z.ZodString, "MealPlanJoinRequestId", "out">;
182
+ }, z.core.$strip>, z.ZodObject<{
183
+ entity: z.ZodLiteral<"mealPlanChangeRequest">;
184
+ id: z.core.$ZodBranded<z.ZodString, "MealPlanChangeRequestId", "out">;
185
+ }, z.core.$strip>, z.ZodObject<{
186
+ entity: z.ZodLiteral<"mealPlanShareLink">;
187
+ id: z.core.$ZodBranded<z.ZodString, "MealPlanShareLinkId", "out">;
188
+ }, z.core.$strip>, z.ZodObject<{
189
+ entity: z.ZodLiteral<"mealPlanChatMessage">;
190
+ id: z.core.$ZodBranded<z.ZodString, "MealPlanChatMessageId", "out">;
191
+ }, z.core.$strip>, z.ZodObject<{
192
+ entity: z.ZodLiteral<"mealGroup">;
193
+ id: z.core.$ZodBranded<z.ZodString, "MealGroupId", "out">;
194
+ }, z.core.$strip>], "entity">;
195
+
196
+ type NoContent = z.infer<typeof NoContentSchema>;
197
+ type ApiSuccess<T> = z.infer<ReturnType<typeof ApiSuccessSchema<z.ZodType<T>>>>;
198
+ type ApiFailure = z.infer<typeof ApiFailureSchema>;
199
+ type ApiResponse<T> = ApiSuccess<T> | ApiFailure;
200
+ type CreatedEntityIdResponse = z.infer<typeof CreatedEntityIdResponseSchema>;
201
+ declare const makeApiResponseSchema: <TData extends z.ZodTypeAny>(data: TData) => z.ZodUnion<readonly [z.ZodObject<{
202
+ success: z.ZodLiteral<true>;
203
+ code: z.ZodNumber;
204
+ message: z.ZodString;
205
+ data: TData;
206
+ }, z.core.$strip>, z.ZodObject<{
207
+ success: z.ZodLiteral<false>;
208
+ status: z.ZodNumber;
209
+ code: z.ZodString;
210
+ message: z.ZodString;
211
+ }, z.core.$strip>]>;
212
+ declare const makeApiSuccessSchema: <TData extends z.ZodTypeAny>(data: TData) => z.ZodObject<{
213
+ success: z.ZodLiteral<true>;
214
+ code: z.ZodNumber;
215
+ message: z.ZodString;
216
+ data: TData;
217
+ }, z.core.$strip>;
218
+
219
+ declare const PositiveIntIdSchema: z.ZodNumber;
220
+ declare const NonEmptyStringIdSchema: z.ZodString;
221
+ declare const MemberIdSchema: z.core.$ZodBranded<z.ZodNumber, "MemberId", "out">;
222
+ declare const UserIdSchema: z.core.$ZodBranded<z.ZodNumber, "MemberId", "out">;
223
+ declare const ArticleIdSchema: z.core.$ZodBranded<z.ZodNumber, "ArticleId", "out">;
224
+ declare const CommentIdSchema: z.core.$ZodBranded<z.ZodNumber, "CommentId", "out">;
225
+ declare const MealPlanIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanId", "out">;
226
+ declare const MealPlanInviteIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanInviteId", "out">;
227
+ declare const MealPlanJoinRequestIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanJoinRequestId", "out">;
228
+ declare const MealPlanNearbyFriendExposureBatchIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanNearbyFriendExposureBatchId", "out">;
229
+ declare const MealPlanChangeRequestIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanChangeRequestId", "out">;
230
+ declare const MealPlanShareLinkIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanShareLinkId", "out">;
231
+ declare const MealPlanShareLinkTokenSchema: z.core.$ZodBranded<z.ZodString, "MealPlanShareLinkToken", "out">;
232
+ declare const MealPlanChatRoomIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanChatRoomId", "out">;
233
+ declare const MealPlanChatMessageIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanChatMessageId", "out">;
234
+ declare const MealGroupIdSchema: z.core.$ZodBranded<z.ZodString, "MealGroupId", "out">;
235
+ declare const RestaurantIdSchema: z.core.$ZodBranded<z.ZodString, "RestaurantId", "out">;
236
+ declare const CouponIdSchema: z.core.$ZodBranded<z.ZodNumber, "CouponId", "out">;
237
+ declare const SubscriptionIdSchema: z.core.$ZodBranded<z.ZodNumber, "SubscriptionId", "out">;
238
+ declare const FriendRequestIdSchema: z.core.$ZodBranded<z.ZodNumber, "FriendRequestId", "out">;
239
+ declare const ReferralCodeSchema: z.core.$ZodBranded<z.ZodString, "ReferralCode", "out">;
240
+ declare const FoodCodeSchema: z.core.$ZodBranded<z.ZodString, "FoodCode", "out">;
241
+ declare const FoodLabelSchema: z.core.$ZodBranded<z.ZodString, "FoodLabel", "out">;
242
+ declare const FoodSchema: z.ZodObject<{
243
+ code: z.core.$ZodBranded<z.ZodString, "FoodCode", "out">;
244
+ label: z.core.$ZodBranded<z.ZodString, "FoodLabel", "out">;
245
+ }, z.core.$strip>;
246
+
247
+ type Brand<T, TBrand extends string> = T & {
248
+ readonly __brand: TBrand;
249
+ };
250
+ type MemberId = z.infer<typeof MemberIdSchema>;
251
+ type ArticleId = z.infer<typeof ArticleIdSchema>;
252
+ type CommentId = z.infer<typeof CommentIdSchema>;
253
+ type MealPlanId = z.infer<typeof MealPlanIdSchema>;
254
+ type MealPlanInviteId = z.infer<typeof MealPlanInviteIdSchema>;
255
+ type MealPlanJoinRequestId = z.infer<typeof MealPlanJoinRequestIdSchema>;
256
+ type MealPlanNearbyFriendExposureBatchId = z.infer<typeof MealPlanNearbyFriendExposureBatchIdSchema>;
257
+ type MealPlanChangeRequestId = z.infer<typeof MealPlanChangeRequestIdSchema>;
258
+ type MealPlanShareLinkId = z.infer<typeof MealPlanShareLinkIdSchema>;
259
+ type MealPlanShareLinkToken = z.infer<typeof MealPlanShareLinkTokenSchema>;
260
+ type MealPlanChatRoomId = z.infer<typeof MealPlanChatRoomIdSchema>;
261
+ type MealPlanChatMessageId = z.infer<typeof MealPlanChatMessageIdSchema>;
262
+ type MealGroupId = z.infer<typeof MealGroupIdSchema>;
263
+ type RestaurantId = z.infer<typeof RestaurantIdSchema>;
264
+ type CouponId = z.infer<typeof CouponIdSchema>;
265
+ type SubscriptionId = z.infer<typeof SubscriptionIdSchema>;
266
+ type FriendRequestId = z.infer<typeof FriendRequestIdSchema>;
267
+ type ReferralCode = z.infer<typeof ReferralCodeSchema>;
268
+ type FoodCode = z.infer<typeof FoodCodeSchema>;
269
+ type FoodLabel = z.infer<typeof FoodLabelSchema>;
270
+ type Food = z.infer<typeof FoodSchema>;
271
+ declare const toMemberId: (value: number) => MemberId;
272
+ declare const toArticleId: (value: number) => ArticleId;
273
+ declare const toMealPlanId: (value: string) => MealPlanId;
274
+ declare const toMealPlanInviteId: (value: string) => MealPlanInviteId;
275
+ declare const toMealPlanJoinRequestId: (value: string) => MealPlanJoinRequestId;
276
+ declare const toMealPlanNearbyFriendExposureBatchId: (value: string) => MealPlanNearbyFriendExposureBatchId;
277
+ declare const toMealPlanChangeRequestId: (value: string) => MealPlanChangeRequestId;
278
+ declare const toMealPlanShareLinkId: (value: string) => MealPlanShareLinkId;
279
+ declare const toMealPlanShareLinkToken: (value: string) => MealPlanShareLinkToken;
280
+ declare const toMealPlanChatRoomId: (value: string) => MealPlanChatRoomId;
281
+ declare const toMealPlanChatMessageId: (value: string) => MealPlanChatMessageId;
282
+ declare const toMealGroupId: (value: string) => MealGroupId;
283
+ declare const toRestaurantId: (value: string) => RestaurantId;
284
+ declare const toCommentId: (value: number) => CommentId;
285
+ declare const toCouponId: (value: number) => CouponId;
286
+ declare const toSubscriptionId: (value: number) => SubscriptionId;
287
+ declare const toFriendRequestId: (value: number) => FriendRequestId;
288
+ declare const toReferralCode: (value: string) => ReferralCode;
289
+
290
+ type MapperContract<TSource, TTarget> = (source: TSource) => TTarget;
291
+ type AsyncMapperContract<TSource, TTarget> = (source: TSource) => Promise<TTarget>;
292
+ type MapperInput<TMapper> = TMapper extends (source: infer TSource) => unknown ? TSource : never;
293
+ type MapperOutput<TMapper> = TMapper extends (...args: never[]) => infer TTarget ? TTarget : never;
294
+
295
+ declare const PageQuerySchema: z.ZodObject<{
296
+ page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
297
+ size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
298
+ }, z.core.$strip>;
299
+ declare const PageMetaSchema: z.ZodObject<{
300
+ page: z.ZodNumber;
301
+ size: z.ZodNumber;
302
+ totalItems: z.ZodNumber;
303
+ totalPages: z.ZodNumber;
304
+ hasNext: z.ZodBoolean;
305
+ hasPrevious: z.ZodBoolean;
306
+ }, z.core.$strip>;
307
+ declare const PageResponseSchema: <TItem extends z.ZodTypeAny>(item: TItem) => z.ZodObject<{
308
+ items: z.ZodArray<TItem>;
309
+ meta: z.ZodObject<{
310
+ page: z.ZodNumber;
311
+ size: z.ZodNumber;
312
+ totalItems: z.ZodNumber;
313
+ totalPages: z.ZodNumber;
314
+ hasNext: z.ZodBoolean;
315
+ hasPrevious: z.ZodBoolean;
316
+ }, z.core.$strip>;
317
+ }, z.core.$strip>;
318
+ declare const SortDirectionSchema: z.ZodEnum<{
319
+ asc: "asc";
320
+ desc: "desc";
321
+ }>;
322
+
323
+ type PageRequest = z.infer<typeof PageQuerySchema>;
324
+ type PageResponse<TItem> = z.infer<ReturnType<typeof PageResponseSchema<z.ZodType<TItem>>>>;
325
+ type PageMeta = z.infer<typeof PageMetaSchema>;
326
+ type SortDirection = z.infer<typeof SortDirectionSchema>;
327
+
328
+ export { type ApiContract, type ApiDomain, type ApiFailure, ApiFailureSchema, type ApiResponse, ApiResponseSchema, type ApiSuccess, ApiSuccessSchema, type ArticleId, ArticleIdSchema, type AsyncMapperContract, type BodyOf, type Brand, CACHE_INVALIDATION_SSE_EVENT, type CacheInvalidationAction, CacheInvalidationActionSchema, type CacheInvalidationEntity, CacheInvalidationEntitySchema, type CacheInvalidationEvent, CacheInvalidationEventSchema, type CacheInvalidationKey, CacheInvalidationKeySchema, type CommentId, CommentIdSchema, type CouponId, CouponIdSchema, type CreatedEntityIdResponse, CreatedEntityIdResponseSchema, type EndpointContract, type EntityContract, type Food, type FoodCode, FoodCodeSchema, type FoodLabel, FoodLabelSchema, FoodSchema, type FriendRequestId, FriendRequestIdSchema, type HttpMethod, type ISODateString, ISODateStringSchema, type ISODateTimeString, ISODateTimeStringSchema, type MapperContract, type MapperInput, type MapperOutput, type MealGroupId, MealGroupIdSchema, type MealPlanChangeRequestId, MealPlanChangeRequestIdSchema, type MealPlanChatMessageId, MealPlanChatMessageIdSchema, type MealPlanChatRoomId, MealPlanChatRoomIdSchema, type MealPlanId, MealPlanIdSchema, type MealPlanInviteId, MealPlanInviteIdSchema, type MealPlanJoinRequestId, MealPlanJoinRequestIdSchema, type MealPlanNearbyFriendExposureBatchId, MealPlanNearbyFriendExposureBatchIdSchema, type MealPlanShareLinkId, MealPlanShareLinkIdSchema, type MealPlanShareLinkToken, MealPlanShareLinkTokenSchema, type MemberId, MemberIdSchema, NoBodySchema, type NoContent, NoContentSchema, NoParamsSchema, NoQuerySchema, NonEmptyStringIdSchema, type PageMeta, PageMetaSchema, PageQuerySchema, type PageRequest, type PageResponse, PageResponseSchema, type PathParamsOf, PositiveIntIdSchema, type QueryOf, type ReferralCode, ReferralCodeSchema, type ResponseOf, type RestaurantId, RestaurantIdSchema, type SortDirection, SortDirectionSchema, type SubscriptionId, SubscriptionIdSchema, type TimeHHmmString, TimeHHmmStringSchema, UserIdSchema, apiContract, endpoint, makeApiResponseSchema, makeApiSuccessSchema, toArticleId, toCommentId, toCouponId, toFriendRequestId, toMealGroupId, toMealPlanChangeRequestId, toMealPlanChatMessageId, toMealPlanChatRoomId, toMealPlanId, toMealPlanInviteId, toMealPlanJoinRequestId, toMealPlanNearbyFriendExposureBatchId, toMealPlanShareLinkId, toMealPlanShareLinkToken, toMemberId, toReferralCode, toRestaurantId, toSubscriptionId };
@@ -0,0 +1,328 @@
1
+ import { z } from 'zod';
2
+
3
+ type HttpMethod = "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
4
+ declare const NoBodySchema: z.ZodUndefined;
5
+ declare const NoQuerySchema: z.ZodUndefined;
6
+ declare const NoParamsSchema: z.ZodUndefined;
7
+ interface EndpointContract<TMethod extends HttpMethod, TPath extends string, TPathParams extends z.ZodTypeAny, TQuery extends z.ZodTypeAny, TBody extends z.ZodTypeAny, TResponse extends z.ZodTypeAny> {
8
+ readonly method: TMethod;
9
+ readonly path: TPath;
10
+ readonly pathParams: TPathParams;
11
+ readonly query: TQuery;
12
+ readonly body: TBody;
13
+ readonly response: TResponse;
14
+ }
15
+ declare const endpoint: <TMethod extends HttpMethod, TPath extends string, TPathParams extends z.ZodTypeAny = typeof NoParamsSchema, TQuery extends z.ZodTypeAny = typeof NoQuerySchema, TBody extends z.ZodTypeAny = typeof NoBodySchema, TResponse extends z.ZodTypeAny = z.ZodNever>(contract: {
16
+ method: TMethod;
17
+ path: TPath;
18
+ pathParams?: TPathParams;
19
+ query?: TQuery;
20
+ body?: TBody;
21
+ response: TResponse;
22
+ }) => EndpointContract<TMethod, TPath, TPathParams, TQuery, TBody, TResponse>;
23
+ type BodyOf<E> = E extends EndpointContract<any, any, any, any, infer TBody, any> ? z.infer<TBody> : never;
24
+ type QueryOf<E> = E extends EndpointContract<any, any, any, infer TQuery, any, any> ? z.infer<TQuery> : never;
25
+ type PathParamsOf<E> = E extends EndpointContract<any, any, infer TPathParams, any, any, any> ? z.infer<TPathParams> : never;
26
+ type ResponseOf<E> = E extends EndpointContract<any, any, any, any, any, infer TResponse> ? z.infer<TResponse> : never;
27
+
28
+ declare const apiContract: Record<string, Record<string, EndpointContract<any, string, any, any, any, any>>>;
29
+ type ApiContract = typeof apiContract;
30
+ type ApiDomain = keyof ApiContract;
31
+
32
+ declare const CacheInvalidationEntitySchema: z.ZodEnum<{
33
+ article: "article";
34
+ mealPlan: "mealPlan";
35
+ mealPlanInvite: "mealPlanInvite";
36
+ mealPlanParticipant: "mealPlanParticipant";
37
+ mealPlanDecision: "mealPlanDecision";
38
+ mealPlanChat: "mealPlanChat";
39
+ mealGroup: "mealGroup";
40
+ notification: "notification";
41
+ friend: "friend";
42
+ }>;
43
+ declare const CacheInvalidationActionSchema: z.ZodEnum<{
44
+ created: "created";
45
+ updated: "updated";
46
+ deleted: "deleted";
47
+ accepted: "accepted";
48
+ rejected: "rejected";
49
+ cancelled: "cancelled";
50
+ closed: "closed";
51
+ joined: "joined";
52
+ ready: "ready";
53
+ confirmed: "confirmed";
54
+ locked: "locked";
55
+ completed: "completed";
56
+ recorded: "recorded";
57
+ read: "read";
58
+ }>;
59
+ declare const CacheInvalidationKeySchema: z.ZodEnum<{
60
+ articles: "articles";
61
+ mealPlans: "mealPlans";
62
+ mealPlanDetail: "mealPlanDetail";
63
+ mealPlanInvites: "mealPlanInvites";
64
+ mealPlanJoinRequests: "mealPlanJoinRequests";
65
+ mealPlanNearbyFriends: "mealPlanNearbyFriends";
66
+ mealPlanMessages: "mealPlanMessages";
67
+ mealGroups: "mealGroups";
68
+ notifications: "notifications";
69
+ friends: "friends";
70
+ friendMeals: "friendMeals";
71
+ }>;
72
+ declare const CacheInvalidationEventSchema: z.ZodObject<{
73
+ type: z.ZodLiteral<"cache.invalidate">;
74
+ entity: z.ZodEnum<{
75
+ article: "article";
76
+ mealPlan: "mealPlan";
77
+ mealPlanInvite: "mealPlanInvite";
78
+ mealPlanParticipant: "mealPlanParticipant";
79
+ mealPlanDecision: "mealPlanDecision";
80
+ mealPlanChat: "mealPlanChat";
81
+ mealGroup: "mealGroup";
82
+ notification: "notification";
83
+ friend: "friend";
84
+ }>;
85
+ action: z.ZodEnum<{
86
+ created: "created";
87
+ updated: "updated";
88
+ deleted: "deleted";
89
+ accepted: "accepted";
90
+ rejected: "rejected";
91
+ cancelled: "cancelled";
92
+ closed: "closed";
93
+ joined: "joined";
94
+ ready: "ready";
95
+ confirmed: "confirmed";
96
+ locked: "locked";
97
+ completed: "completed";
98
+ recorded: "recorded";
99
+ read: "read";
100
+ }>;
101
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
102
+ keys: z.ZodArray<z.ZodEnum<{
103
+ articles: "articles";
104
+ mealPlans: "mealPlans";
105
+ mealPlanDetail: "mealPlanDetail";
106
+ mealPlanInvites: "mealPlanInvites";
107
+ mealPlanJoinRequests: "mealPlanJoinRequests";
108
+ mealPlanNearbyFriends: "mealPlanNearbyFriends";
109
+ mealPlanMessages: "mealPlanMessages";
110
+ mealGroups: "mealGroups";
111
+ notifications: "notifications";
112
+ friends: "friends";
113
+ friendMeals: "friendMeals";
114
+ }>>;
115
+ occurredAt: z.ZodString;
116
+ }, z.core.$strip>;
117
+
118
+ declare const CACHE_INVALIDATION_SSE_EVENT: "cache-invalidate";
119
+ type CacheInvalidationEntity = z.infer<typeof CacheInvalidationEntitySchema>;
120
+ type CacheInvalidationAction = z.infer<typeof CacheInvalidationActionSchema>;
121
+ type CacheInvalidationKey = z.infer<typeof CacheInvalidationKeySchema>;
122
+ type CacheInvalidationEvent = z.infer<typeof CacheInvalidationEventSchema>;
123
+
124
+ declare const ISODateStringSchema: z.ZodString;
125
+ declare const ISODateTimeStringSchema: z.ZodString;
126
+ declare const TimeHHmmStringSchema: z.ZodString;
127
+
128
+ type ISODateString = z.infer<typeof ISODateStringSchema>;
129
+ type ISODateTimeString = z.infer<typeof ISODateTimeStringSchema>;
130
+ type TimeHHmmString = z.infer<typeof TimeHHmmStringSchema>;
131
+
132
+ type EntityContract<TEntityName extends string, TId, TShape extends object> = TShape & {
133
+ readonly __entityName?: TEntityName;
134
+ readonly id?: TId;
135
+ };
136
+
137
+ declare const NoContentSchema: z.ZodNull;
138
+ declare const ApiSuccessSchema: <TData extends z.ZodTypeAny>(data: TData) => z.ZodObject<{
139
+ success: z.ZodLiteral<true>;
140
+ code: z.ZodNumber;
141
+ message: z.ZodString;
142
+ data: TData;
143
+ }, z.core.$strip>;
144
+ declare const ApiFailureSchema: z.ZodObject<{
145
+ success: z.ZodLiteral<false>;
146
+ status: z.ZodNumber;
147
+ code: z.ZodString;
148
+ message: z.ZodString;
149
+ }, z.core.$strip>;
150
+ declare const ApiResponseSchema: <TData extends z.ZodTypeAny>(data: TData) => z.ZodUnion<readonly [z.ZodObject<{
151
+ success: z.ZodLiteral<true>;
152
+ code: z.ZodNumber;
153
+ message: z.ZodString;
154
+ data: TData;
155
+ }, z.core.$strip>, z.ZodObject<{
156
+ success: z.ZodLiteral<false>;
157
+ status: z.ZodNumber;
158
+ code: z.ZodString;
159
+ message: z.ZodString;
160
+ }, z.core.$strip>]>;
161
+ declare const CreatedEntityIdResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
162
+ entity: z.ZodLiteral<"article">;
163
+ id: z.core.$ZodBranded<z.ZodNumber, "ArticleId", "out">;
164
+ }, z.core.$strip>, z.ZodObject<{
165
+ entity: z.ZodLiteral<"comment">;
166
+ id: z.core.$ZodBranded<z.ZodNumber, "CommentId", "out">;
167
+ }, z.core.$strip>, z.ZodObject<{
168
+ entity: z.ZodLiteral<"subscription">;
169
+ id: z.core.$ZodBranded<z.ZodNumber, "SubscriptionId", "out">;
170
+ }, z.core.$strip>, z.ZodObject<{
171
+ entity: z.ZodLiteral<"coupon">;
172
+ id: z.core.$ZodBranded<z.ZodNumber, "CouponId", "out">;
173
+ }, z.core.$strip>, z.ZodObject<{
174
+ entity: z.ZodLiteral<"mealPlan">;
175
+ id: z.core.$ZodBranded<z.ZodString, "MealPlanId", "out">;
176
+ }, z.core.$strip>, z.ZodObject<{
177
+ entity: z.ZodLiteral<"mealPlanInvite">;
178
+ id: z.core.$ZodBranded<z.ZodString, "MealPlanInviteId", "out">;
179
+ }, z.core.$strip>, z.ZodObject<{
180
+ entity: z.ZodLiteral<"mealPlanJoinRequest">;
181
+ id: z.core.$ZodBranded<z.ZodString, "MealPlanJoinRequestId", "out">;
182
+ }, z.core.$strip>, z.ZodObject<{
183
+ entity: z.ZodLiteral<"mealPlanChangeRequest">;
184
+ id: z.core.$ZodBranded<z.ZodString, "MealPlanChangeRequestId", "out">;
185
+ }, z.core.$strip>, z.ZodObject<{
186
+ entity: z.ZodLiteral<"mealPlanShareLink">;
187
+ id: z.core.$ZodBranded<z.ZodString, "MealPlanShareLinkId", "out">;
188
+ }, z.core.$strip>, z.ZodObject<{
189
+ entity: z.ZodLiteral<"mealPlanChatMessage">;
190
+ id: z.core.$ZodBranded<z.ZodString, "MealPlanChatMessageId", "out">;
191
+ }, z.core.$strip>, z.ZodObject<{
192
+ entity: z.ZodLiteral<"mealGroup">;
193
+ id: z.core.$ZodBranded<z.ZodString, "MealGroupId", "out">;
194
+ }, z.core.$strip>], "entity">;
195
+
196
+ type NoContent = z.infer<typeof NoContentSchema>;
197
+ type ApiSuccess<T> = z.infer<ReturnType<typeof ApiSuccessSchema<z.ZodType<T>>>>;
198
+ type ApiFailure = z.infer<typeof ApiFailureSchema>;
199
+ type ApiResponse<T> = ApiSuccess<T> | ApiFailure;
200
+ type CreatedEntityIdResponse = z.infer<typeof CreatedEntityIdResponseSchema>;
201
+ declare const makeApiResponseSchema: <TData extends z.ZodTypeAny>(data: TData) => z.ZodUnion<readonly [z.ZodObject<{
202
+ success: z.ZodLiteral<true>;
203
+ code: z.ZodNumber;
204
+ message: z.ZodString;
205
+ data: TData;
206
+ }, z.core.$strip>, z.ZodObject<{
207
+ success: z.ZodLiteral<false>;
208
+ status: z.ZodNumber;
209
+ code: z.ZodString;
210
+ message: z.ZodString;
211
+ }, z.core.$strip>]>;
212
+ declare const makeApiSuccessSchema: <TData extends z.ZodTypeAny>(data: TData) => z.ZodObject<{
213
+ success: z.ZodLiteral<true>;
214
+ code: z.ZodNumber;
215
+ message: z.ZodString;
216
+ data: TData;
217
+ }, z.core.$strip>;
218
+
219
+ declare const PositiveIntIdSchema: z.ZodNumber;
220
+ declare const NonEmptyStringIdSchema: z.ZodString;
221
+ declare const MemberIdSchema: z.core.$ZodBranded<z.ZodNumber, "MemberId", "out">;
222
+ declare const UserIdSchema: z.core.$ZodBranded<z.ZodNumber, "MemberId", "out">;
223
+ declare const ArticleIdSchema: z.core.$ZodBranded<z.ZodNumber, "ArticleId", "out">;
224
+ declare const CommentIdSchema: z.core.$ZodBranded<z.ZodNumber, "CommentId", "out">;
225
+ declare const MealPlanIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanId", "out">;
226
+ declare const MealPlanInviteIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanInviteId", "out">;
227
+ declare const MealPlanJoinRequestIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanJoinRequestId", "out">;
228
+ declare const MealPlanNearbyFriendExposureBatchIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanNearbyFriendExposureBatchId", "out">;
229
+ declare const MealPlanChangeRequestIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanChangeRequestId", "out">;
230
+ declare const MealPlanShareLinkIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanShareLinkId", "out">;
231
+ declare const MealPlanShareLinkTokenSchema: z.core.$ZodBranded<z.ZodString, "MealPlanShareLinkToken", "out">;
232
+ declare const MealPlanChatRoomIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanChatRoomId", "out">;
233
+ declare const MealPlanChatMessageIdSchema: z.core.$ZodBranded<z.ZodString, "MealPlanChatMessageId", "out">;
234
+ declare const MealGroupIdSchema: z.core.$ZodBranded<z.ZodString, "MealGroupId", "out">;
235
+ declare const RestaurantIdSchema: z.core.$ZodBranded<z.ZodString, "RestaurantId", "out">;
236
+ declare const CouponIdSchema: z.core.$ZodBranded<z.ZodNumber, "CouponId", "out">;
237
+ declare const SubscriptionIdSchema: z.core.$ZodBranded<z.ZodNumber, "SubscriptionId", "out">;
238
+ declare const FriendRequestIdSchema: z.core.$ZodBranded<z.ZodNumber, "FriendRequestId", "out">;
239
+ declare const ReferralCodeSchema: z.core.$ZodBranded<z.ZodString, "ReferralCode", "out">;
240
+ declare const FoodCodeSchema: z.core.$ZodBranded<z.ZodString, "FoodCode", "out">;
241
+ declare const FoodLabelSchema: z.core.$ZodBranded<z.ZodString, "FoodLabel", "out">;
242
+ declare const FoodSchema: z.ZodObject<{
243
+ code: z.core.$ZodBranded<z.ZodString, "FoodCode", "out">;
244
+ label: z.core.$ZodBranded<z.ZodString, "FoodLabel", "out">;
245
+ }, z.core.$strip>;
246
+
247
+ type Brand<T, TBrand extends string> = T & {
248
+ readonly __brand: TBrand;
249
+ };
250
+ type MemberId = z.infer<typeof MemberIdSchema>;
251
+ type ArticleId = z.infer<typeof ArticleIdSchema>;
252
+ type CommentId = z.infer<typeof CommentIdSchema>;
253
+ type MealPlanId = z.infer<typeof MealPlanIdSchema>;
254
+ type MealPlanInviteId = z.infer<typeof MealPlanInviteIdSchema>;
255
+ type MealPlanJoinRequestId = z.infer<typeof MealPlanJoinRequestIdSchema>;
256
+ type MealPlanNearbyFriendExposureBatchId = z.infer<typeof MealPlanNearbyFriendExposureBatchIdSchema>;
257
+ type MealPlanChangeRequestId = z.infer<typeof MealPlanChangeRequestIdSchema>;
258
+ type MealPlanShareLinkId = z.infer<typeof MealPlanShareLinkIdSchema>;
259
+ type MealPlanShareLinkToken = z.infer<typeof MealPlanShareLinkTokenSchema>;
260
+ type MealPlanChatRoomId = z.infer<typeof MealPlanChatRoomIdSchema>;
261
+ type MealPlanChatMessageId = z.infer<typeof MealPlanChatMessageIdSchema>;
262
+ type MealGroupId = z.infer<typeof MealGroupIdSchema>;
263
+ type RestaurantId = z.infer<typeof RestaurantIdSchema>;
264
+ type CouponId = z.infer<typeof CouponIdSchema>;
265
+ type SubscriptionId = z.infer<typeof SubscriptionIdSchema>;
266
+ type FriendRequestId = z.infer<typeof FriendRequestIdSchema>;
267
+ type ReferralCode = z.infer<typeof ReferralCodeSchema>;
268
+ type FoodCode = z.infer<typeof FoodCodeSchema>;
269
+ type FoodLabel = z.infer<typeof FoodLabelSchema>;
270
+ type Food = z.infer<typeof FoodSchema>;
271
+ declare const toMemberId: (value: number) => MemberId;
272
+ declare const toArticleId: (value: number) => ArticleId;
273
+ declare const toMealPlanId: (value: string) => MealPlanId;
274
+ declare const toMealPlanInviteId: (value: string) => MealPlanInviteId;
275
+ declare const toMealPlanJoinRequestId: (value: string) => MealPlanJoinRequestId;
276
+ declare const toMealPlanNearbyFriendExposureBatchId: (value: string) => MealPlanNearbyFriendExposureBatchId;
277
+ declare const toMealPlanChangeRequestId: (value: string) => MealPlanChangeRequestId;
278
+ declare const toMealPlanShareLinkId: (value: string) => MealPlanShareLinkId;
279
+ declare const toMealPlanShareLinkToken: (value: string) => MealPlanShareLinkToken;
280
+ declare const toMealPlanChatRoomId: (value: string) => MealPlanChatRoomId;
281
+ declare const toMealPlanChatMessageId: (value: string) => MealPlanChatMessageId;
282
+ declare const toMealGroupId: (value: string) => MealGroupId;
283
+ declare const toRestaurantId: (value: string) => RestaurantId;
284
+ declare const toCommentId: (value: number) => CommentId;
285
+ declare const toCouponId: (value: number) => CouponId;
286
+ declare const toSubscriptionId: (value: number) => SubscriptionId;
287
+ declare const toFriendRequestId: (value: number) => FriendRequestId;
288
+ declare const toReferralCode: (value: string) => ReferralCode;
289
+
290
+ type MapperContract<TSource, TTarget> = (source: TSource) => TTarget;
291
+ type AsyncMapperContract<TSource, TTarget> = (source: TSource) => Promise<TTarget>;
292
+ type MapperInput<TMapper> = TMapper extends (source: infer TSource) => unknown ? TSource : never;
293
+ type MapperOutput<TMapper> = TMapper extends (...args: never[]) => infer TTarget ? TTarget : never;
294
+
295
+ declare const PageQuerySchema: z.ZodObject<{
296
+ page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
297
+ size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
298
+ }, z.core.$strip>;
299
+ declare const PageMetaSchema: z.ZodObject<{
300
+ page: z.ZodNumber;
301
+ size: z.ZodNumber;
302
+ totalItems: z.ZodNumber;
303
+ totalPages: z.ZodNumber;
304
+ hasNext: z.ZodBoolean;
305
+ hasPrevious: z.ZodBoolean;
306
+ }, z.core.$strip>;
307
+ declare const PageResponseSchema: <TItem extends z.ZodTypeAny>(item: TItem) => z.ZodObject<{
308
+ items: z.ZodArray<TItem>;
309
+ meta: z.ZodObject<{
310
+ page: z.ZodNumber;
311
+ size: z.ZodNumber;
312
+ totalItems: z.ZodNumber;
313
+ totalPages: z.ZodNumber;
314
+ hasNext: z.ZodBoolean;
315
+ hasPrevious: z.ZodBoolean;
316
+ }, z.core.$strip>;
317
+ }, z.core.$strip>;
318
+ declare const SortDirectionSchema: z.ZodEnum<{
319
+ asc: "asc";
320
+ desc: "desc";
321
+ }>;
322
+
323
+ type PageRequest = z.infer<typeof PageQuerySchema>;
324
+ type PageResponse<TItem> = z.infer<ReturnType<typeof PageResponseSchema<z.ZodType<TItem>>>>;
325
+ type PageMeta = z.infer<typeof PageMetaSchema>;
326
+ type SortDirection = z.infer<typeof SortDirectionSchema>;
327
+
328
+ export { type ApiContract, type ApiDomain, type ApiFailure, ApiFailureSchema, type ApiResponse, ApiResponseSchema, type ApiSuccess, ApiSuccessSchema, type ArticleId, ArticleIdSchema, type AsyncMapperContract, type BodyOf, type Brand, CACHE_INVALIDATION_SSE_EVENT, type CacheInvalidationAction, CacheInvalidationActionSchema, type CacheInvalidationEntity, CacheInvalidationEntitySchema, type CacheInvalidationEvent, CacheInvalidationEventSchema, type CacheInvalidationKey, CacheInvalidationKeySchema, type CommentId, CommentIdSchema, type CouponId, CouponIdSchema, type CreatedEntityIdResponse, CreatedEntityIdResponseSchema, type EndpointContract, type EntityContract, type Food, type FoodCode, FoodCodeSchema, type FoodLabel, FoodLabelSchema, FoodSchema, type FriendRequestId, FriendRequestIdSchema, type HttpMethod, type ISODateString, ISODateStringSchema, type ISODateTimeString, ISODateTimeStringSchema, type MapperContract, type MapperInput, type MapperOutput, type MealGroupId, MealGroupIdSchema, type MealPlanChangeRequestId, MealPlanChangeRequestIdSchema, type MealPlanChatMessageId, MealPlanChatMessageIdSchema, type MealPlanChatRoomId, MealPlanChatRoomIdSchema, type MealPlanId, MealPlanIdSchema, type MealPlanInviteId, MealPlanInviteIdSchema, type MealPlanJoinRequestId, MealPlanJoinRequestIdSchema, type MealPlanNearbyFriendExposureBatchId, MealPlanNearbyFriendExposureBatchIdSchema, type MealPlanShareLinkId, MealPlanShareLinkIdSchema, type MealPlanShareLinkToken, MealPlanShareLinkTokenSchema, type MemberId, MemberIdSchema, NoBodySchema, type NoContent, NoContentSchema, NoParamsSchema, NoQuerySchema, NonEmptyStringIdSchema, type PageMeta, PageMetaSchema, PageQuerySchema, type PageRequest, type PageResponse, PageResponseSchema, type PathParamsOf, PositiveIntIdSchema, type QueryOf, type ReferralCode, ReferralCodeSchema, type ResponseOf, type RestaurantId, RestaurantIdSchema, type SortDirection, SortDirectionSchema, type SubscriptionId, SubscriptionIdSchema, type TimeHHmmString, TimeHHmmStringSchema, UserIdSchema, apiContract, endpoint, makeApiResponseSchema, makeApiSuccessSchema, toArticleId, toCommentId, toCouponId, toFriendRequestId, toMealGroupId, toMealPlanChangeRequestId, toMealPlanChatMessageId, toMealPlanChatRoomId, toMealPlanId, toMealPlanInviteId, toMealPlanJoinRequestId, toMealPlanNearbyFriendExposureBatchId, toMealPlanShareLinkId, toMealPlanShareLinkToken, toMemberId, toReferralCode, toRestaurantId, toSubscriptionId };