@kimdaegyu/babmukdang-shared 1.1.4 → 1.1.11
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-U6OQQOPN.js → chunk-4E5E3PFW.js} +6 -2
- package/dist/{chunk-VAWYU5JG.js → chunk-AI2YMBJX.js} +4 -1
- package/dist/{chunk-RLVHDFEV.js → chunk-K3CZKI2F.js} +7 -4
- package/dist/{chunk-J76VB5SE.js → chunk-OJVXYCSH.js} +2 -3
- package/dist/{chunk-M5OSCHMV.js → chunk-PQMEXOPZ.js} +55 -6
- package/dist/{chunk-UJJMW7II.js → chunk-W4C7XHTX.js} +1 -1
- package/dist/{chunk-W3YQYI4R.js → chunk-W4TUW2GY.js} +2 -2
- package/dist/{chunk-23FZ4MAS.js → chunk-WNYCCQM4.js} +49 -33
- package/dist/{chunk-SOHYA6XL.js → chunk-YM7YU7IR.js} +102 -87
- package/dist/{chunk-KRVEQVRC.js → chunk-ZH7D7B2Y.js} +10 -4
- package/dist/domain/article/index.cjs +12 -5
- package/dist/domain/article/index.d.cts +11 -3
- package/dist/domain/article/index.d.ts +11 -3
- package/dist/domain/article/index.js +6 -4
- package/dist/domain/auth/index.cjs +7 -4
- package/dist/domain/auth/index.d.cts +0 -3
- package/dist/domain/auth/index.d.ts +0 -3
- package/dist/domain/auth/index.js +2 -2
- package/dist/domain/common/index.cjs +243 -181
- package/dist/domain/common/index.d.cts +370 -120
- package/dist/domain/common/index.d.ts +370 -120
- package/dist/domain/common/index.js +12 -11
- package/dist/domain/friend/index.cjs +14 -4
- package/dist/domain/friend/index.d.cts +15 -1
- package/dist/domain/friend/index.d.ts +15 -1
- package/dist/domain/friend/index.js +8 -4
- package/dist/domain/index.cjs +261 -183
- package/dist/domain/index.d.cts +315 -13
- package/dist/domain/index.d.ts +315 -13
- package/dist/domain/index.js +51 -35
- package/dist/domain/meal/index.cjs +6 -2
- package/dist/domain/meal/index.js +3 -3
- package/dist/domain/member/index.cjs +12 -6
- package/dist/domain/member/index.d.cts +11 -3
- package/dist/domain/member/index.d.ts +11 -3
- package/dist/domain/member/index.js +7 -5
- package/dist/domain/plan/index.cjs +55 -6
- package/dist/domain/plan/index.d.cts +2 -2
- package/dist/domain/plan/index.d.ts +2 -2
- package/dist/domain/plan/index.js +4 -4
- package/dist/domain/promotion/index.cjs +4 -1
- package/dist/domain/promotion/index.d.cts +49 -5
- package/dist/domain/promotion/index.d.ts +49 -5
- package/dist/domain/promotion/index.js +1 -1
- package/dist/domain/recruit/index.cjs +11 -3
- package/dist/domain/recruit/index.d.cts +160 -76
- package/dist/domain/recruit/index.d.ts +160 -76
- package/dist/domain/recruit/index.js +11 -10
- package/dist/domain/restaurant/index.d.cts +1 -75
- package/dist/domain/restaurant/index.d.ts +1 -75
- package/dist/domain/room/index.cjs +63 -6
- package/dist/domain/room/index.d.cts +1192 -31
- package/dist/domain/room/index.d.ts +1192 -31
- package/dist/domain/room/index.js +11 -3
- package/dist/index.cjs +251 -359
- package/dist/index.d.cts +15 -281
- package/dist/index.d.ts +15 -281
- package/dist/index.js +12 -188
- package/dist/restaurant.schema-CuEcX3S3.d.cts +78 -0
- package/dist/restaurant.schema-CuEcX3S3.d.ts +78 -0
- package/package.json +1 -1
- package/dist/index-CZT6irsm.d.cts +0 -294
- package/dist/index-DDLVbMTB.d.ts +0 -294
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export { A as ArticleId, a as ArticleIdSchema, B as Brand, C as CommentId, b as CommentIdSchema, c as CouponId, d as CouponIdSchema, F as Food, e as FoodCode, f as FoodCodeSchema, g as FoodLabel, h as FoodLabelSchema, i as FoodSchema, j as FriendRequestId, k as FriendRequestIdSchema, I as InvitationId, l as InvitationIdSchema, M as MemberId, m as MemberIdSchema, N as NonEmptyStringIdSchema, P as PlanId, n as PlanIdSchema, o as PositiveIntIdSchema, R as RecruitId, p as RecruitIdSchema, q as ReferralCode, r as ReferralCodeSchema, s as RestaurantId, t as RestaurantIdSchema, u as RoomId, v as RoomIdSchema, S as SubscriptionId, w as SubscriptionIdSchema, U as UserId, x as UserIdSchema, y as toArticleId, z as toCommentId, D as toCouponId, E as toFriendRequestId, G as toInvitationId, H as toMemberId, J as toPlanId, K as toRecruitId, L as toReferralCode, O as toRestaurantId, Q as toRoomId, T as toSubscriptionId } from '../../id-dAYxfjZn.cjs';
|
|
3
3
|
|
|
4
|
+
type HttpMethod = "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
5
|
+
declare const NoBodySchema: z.ZodUndefined;
|
|
6
|
+
declare const NoQuerySchema: z.ZodUndefined;
|
|
7
|
+
declare const NoParamsSchema: z.ZodUndefined;
|
|
8
|
+
interface EndpointContract<TMethod extends HttpMethod, TPath extends string, TPathParams extends z.ZodTypeAny, TQuery extends z.ZodTypeAny, TBody extends z.ZodTypeAny, TResponse extends z.ZodTypeAny> {
|
|
9
|
+
readonly method: TMethod;
|
|
10
|
+
readonly path: TPath;
|
|
11
|
+
readonly pathParams: TPathParams;
|
|
12
|
+
readonly query: TQuery;
|
|
13
|
+
readonly body: TBody;
|
|
14
|
+
readonly response: TResponse;
|
|
15
|
+
}
|
|
16
|
+
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: {
|
|
17
|
+
method: TMethod;
|
|
18
|
+
path: TPath;
|
|
19
|
+
pathParams?: TPathParams;
|
|
20
|
+
query?: TQuery;
|
|
21
|
+
body?: TBody;
|
|
22
|
+
response: TResponse;
|
|
23
|
+
}) => EndpointContract<TMethod, TPath, TPathParams, TQuery, TBody, TResponse>;
|
|
24
|
+
type BodyOf<E> = E extends EndpointContract<any, any, any, any, infer TBody, any> ? z.infer<TBody> : never;
|
|
25
|
+
type QueryOf<E> = E extends EndpointContract<any, any, any, infer TQuery, any, any> ? z.infer<TQuery> : never;
|
|
26
|
+
type PathParamsOf<E> = E extends EndpointContract<any, any, infer TPathParams, any, any, any> ? z.infer<TPathParams> : never;
|
|
27
|
+
type ResponseOf<E> = E extends EndpointContract<any, any, any, any, any, infer TResponse> ? z.infer<TResponse> : never;
|
|
28
|
+
|
|
4
29
|
declare const apiContract: {
|
|
5
30
|
readonly auth: {
|
|
6
31
|
readonly signup: EndpointContract<"POST", "/auth/signup", z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
@@ -56,23 +81,17 @@ declare const apiContract: {
|
|
|
56
81
|
password: string;
|
|
57
82
|
}>, z.ZodObject<{
|
|
58
83
|
accessToken: z.ZodString;
|
|
59
|
-
accessTokenMaxAge: z.ZodNumber;
|
|
60
84
|
}, "strip", z.ZodTypeAny, {
|
|
61
85
|
accessToken: string;
|
|
62
|
-
accessTokenMaxAge: number;
|
|
63
86
|
}, {
|
|
64
87
|
accessToken: string;
|
|
65
|
-
accessTokenMaxAge: number;
|
|
66
88
|
}>>;
|
|
67
89
|
readonly refresh: EndpointContract<"POST", "/auth/refresh", z.ZodUndefined, z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
68
90
|
accessToken: z.ZodString;
|
|
69
|
-
accessTokenMaxAge: z.ZodNumber;
|
|
70
91
|
}, "strip", z.ZodTypeAny, {
|
|
71
92
|
accessToken: string;
|
|
72
|
-
accessTokenMaxAge: number;
|
|
73
93
|
}, {
|
|
74
94
|
accessToken: string;
|
|
75
|
-
accessTokenMaxAge: number;
|
|
76
95
|
}>>;
|
|
77
96
|
readonly logout: EndpointContract<"POST", "/auth/logout", z.ZodUndefined, z.ZodUndefined, z.ZodUndefined, z.ZodNull>;
|
|
78
97
|
};
|
|
@@ -90,7 +109,7 @@ declare const apiContract: {
|
|
|
90
109
|
username: string;
|
|
91
110
|
profileImageUrl?: string | null | undefined;
|
|
92
111
|
}>>;
|
|
93
|
-
readonly myProfile: EndpointContract<"GET", "/members/me/
|
|
112
|
+
readonly myProfile: EndpointContract<"GET", "/members/me/profile", z.ZodUndefined, z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
94
113
|
memberId: z.ZodBranded<z.ZodNumber, "MemberId">;
|
|
95
114
|
username: z.ZodString;
|
|
96
115
|
profileImageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -138,7 +157,7 @@ declare const apiContract: {
|
|
|
138
157
|
username: string;
|
|
139
158
|
profileImageUrl?: string | null | undefined;
|
|
140
159
|
}>, "many">>;
|
|
141
|
-
readonly memberProfile: EndpointContract<"GET", "/members/:memberId", z.ZodObject<{
|
|
160
|
+
readonly memberProfile: EndpointContract<"GET", "/members/:memberId/profile", z.ZodObject<{
|
|
142
161
|
memberId: z.ZodBranded<z.ZodNumber, "MemberId">;
|
|
143
162
|
}, "strip", z.ZodTypeAny, {
|
|
144
163
|
memberId: number & z.BRAND<"MemberId">;
|
|
@@ -170,7 +189,13 @@ declare const apiContract: {
|
|
|
170
189
|
completedPlans?: number | undefined;
|
|
171
190
|
uncompletedPlans?: number | undefined;
|
|
172
191
|
}>>;
|
|
173
|
-
readonly presignProfileImage: EndpointContract<"POST", "/uploads/presign-profile", z.ZodUndefined, z.ZodUndefined, z.
|
|
192
|
+
readonly presignProfileImage: EndpointContract<"POST", "/uploads/presign-profile", z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
193
|
+
contentType: z.ZodString;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
contentType: string;
|
|
196
|
+
}, {
|
|
197
|
+
contentType: string;
|
|
198
|
+
}>, z.ZodObject<{
|
|
174
199
|
key: z.ZodString;
|
|
175
200
|
putUrl: z.ZodString;
|
|
176
201
|
cdnUrl: z.ZodString;
|
|
@@ -384,7 +409,7 @@ declare const apiContract: {
|
|
|
384
409
|
}>, z.ZodNull>;
|
|
385
410
|
};
|
|
386
411
|
readonly mealStatus: {
|
|
387
|
-
readonly my: EndpointContract<"GET", "/meal-status", z.ZodUndefined, z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
412
|
+
readonly my: EndpointContract<"GET", "/members/me/meal-status", z.ZodUndefined, z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
388
413
|
hungry: z.ZodBoolean;
|
|
389
414
|
label: z.ZodString;
|
|
390
415
|
updatedAt: z.ZodString;
|
|
@@ -400,14 +425,14 @@ declare const apiContract: {
|
|
|
400
425
|
hungry: boolean;
|
|
401
426
|
secondsToAutoOff: number;
|
|
402
427
|
}>>;
|
|
403
|
-
readonly updateMealStatus: EndpointContract<"PATCH", "/meal-status", z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
428
|
+
readonly updateMealStatus: EndpointContract<"PATCH", "/members/me/meal-status", z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
404
429
|
action: z.ZodDefault<z.ZodOptional<z.ZodEnum<["ARTICLE_UPLOAD", "SET_MANNUALY"]>>>;
|
|
405
430
|
}, "strip", z.ZodTypeAny, {
|
|
406
431
|
action: "ARTICLE_UPLOAD" | "SET_MANNUALY";
|
|
407
432
|
}, {
|
|
408
433
|
action?: "ARTICLE_UPLOAD" | "SET_MANNUALY" | undefined;
|
|
409
434
|
}>, z.ZodNull>;
|
|
410
|
-
readonly friendMealStatus: EndpointContract<"GET", "/
|
|
435
|
+
readonly friendMealStatus: EndpointContract<"GET", "/friends/me/meals", z.ZodUndefined, z.ZodObject<{
|
|
411
436
|
status: z.ZodDefault<z.ZodOptional<z.ZodEnum<["ALL", "HUNGRY", "NOT_HUNGRY"]>>>;
|
|
412
437
|
}, "strip", z.ZodTypeAny, {
|
|
413
438
|
status: "ALL" | "HUNGRY" | "NOT_HUNGRY";
|
|
@@ -1706,7 +1731,13 @@ declare const apiContract: {
|
|
|
1706
1731
|
id: number;
|
|
1707
1732
|
entity: "plan";
|
|
1708
1733
|
}>]>>;
|
|
1709
|
-
readonly presignArticleImage: EndpointContract<"POST", "/uploads/presign-article", z.ZodUndefined, z.ZodUndefined, z.
|
|
1734
|
+
readonly presignArticleImage: EndpointContract<"POST", "/uploads/presign-article", z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
1735
|
+
contentType: z.ZodString;
|
|
1736
|
+
}, "strip", z.ZodTypeAny, {
|
|
1737
|
+
contentType: string;
|
|
1738
|
+
}, {
|
|
1739
|
+
contentType: string;
|
|
1740
|
+
}>, z.ZodObject<{
|
|
1710
1741
|
key: z.ZodString;
|
|
1711
1742
|
putUrl: z.ZodString;
|
|
1712
1743
|
cdnUrl: z.ZodString;
|
|
@@ -1751,83 +1782,167 @@ declare const apiContract: {
|
|
|
1751
1782
|
size?: number | undefined;
|
|
1752
1783
|
sortBy?: "createdAt" | "participantCount" | "deadline" | undefined;
|
|
1753
1784
|
direction?: "asc" | "desc" | undefined;
|
|
1754
|
-
}>, z.ZodUndefined, z.
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1785
|
+
}>, z.ZodUndefined, z.ZodObject<{
|
|
1786
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1787
|
+
targetCount: z.ZodNumber;
|
|
1788
|
+
meetingAt: z.ZodString;
|
|
1789
|
+
location: z.ZodString;
|
|
1790
|
+
message: z.ZodString;
|
|
1791
|
+
recruitId: z.ZodBranded<z.ZodNumber, "RecruitId">;
|
|
1792
|
+
status: z.ZodEnum<["OPEN", "CLOSED", "EXPIRED"]>;
|
|
1793
|
+
createdAt: z.ZodString;
|
|
1794
|
+
expiredAt: z.ZodString;
|
|
1795
|
+
updatedAt: z.ZodString;
|
|
1796
|
+
author: z.ZodObject<{
|
|
1797
|
+
memberId: z.ZodBranded<z.ZodNumber, "MemberId">;
|
|
1798
|
+
username: z.ZodString;
|
|
1799
|
+
profileImageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1800
|
+
}, "strip", z.ZodTypeAny, {
|
|
1801
|
+
memberId: number & z.BRAND<"MemberId">;
|
|
1802
|
+
username: string;
|
|
1803
|
+
profileImageUrl?: string | null | undefined;
|
|
1804
|
+
}, {
|
|
1805
|
+
memberId: number;
|
|
1806
|
+
username: string;
|
|
1807
|
+
profileImageUrl?: string | null | undefined;
|
|
1808
|
+
}>;
|
|
1809
|
+
participants: z.ZodArray<z.ZodObject<{
|
|
1810
|
+
memberId: z.ZodBranded<z.ZodNumber, "MemberId">;
|
|
1811
|
+
username: z.ZodString;
|
|
1812
|
+
profileImageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1813
|
+
}, "strip", z.ZodTypeAny, {
|
|
1814
|
+
memberId: number & z.BRAND<"MemberId">;
|
|
1815
|
+
username: string;
|
|
1816
|
+
profileImageUrl?: string | null | undefined;
|
|
1817
|
+
}, {
|
|
1818
|
+
memberId: number;
|
|
1819
|
+
username: string;
|
|
1820
|
+
profileImageUrl?: string | null | undefined;
|
|
1821
|
+
}>, "many">;
|
|
1768
1822
|
}, "strip", z.ZodTypeAny, {
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1823
|
+
message: string;
|
|
1824
|
+
status: "OPEN" | "CLOSED" | "EXPIRED";
|
|
1825
|
+
createdAt: string;
|
|
1826
|
+
author: {
|
|
1827
|
+
memberId: number & z.BRAND<"MemberId">;
|
|
1828
|
+
username: string;
|
|
1829
|
+
profileImageUrl?: string | null | undefined;
|
|
1830
|
+
};
|
|
1831
|
+
updatedAt: string;
|
|
1832
|
+
location: string;
|
|
1833
|
+
participants: {
|
|
1834
|
+
memberId: number & z.BRAND<"MemberId">;
|
|
1835
|
+
username: string;
|
|
1836
|
+
profileImageUrl?: string | null | undefined;
|
|
1837
|
+
}[];
|
|
1838
|
+
meetingAt: string;
|
|
1839
|
+
targetCount: number;
|
|
1840
|
+
recruitId: number & z.BRAND<"RecruitId">;
|
|
1841
|
+
expiredAt: string;
|
|
1772
1842
|
}, {
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1843
|
+
message: string;
|
|
1844
|
+
status: "OPEN" | "CLOSED" | "EXPIRED";
|
|
1845
|
+
createdAt: string;
|
|
1846
|
+
author: {
|
|
1847
|
+
memberId: number;
|
|
1848
|
+
username: string;
|
|
1849
|
+
profileImageUrl?: string | null | undefined;
|
|
1850
|
+
};
|
|
1851
|
+
updatedAt: string;
|
|
1852
|
+
location: string;
|
|
1853
|
+
participants: {
|
|
1854
|
+
memberId: number;
|
|
1855
|
+
username: string;
|
|
1856
|
+
profileImageUrl?: string | null | undefined;
|
|
1857
|
+
}[];
|
|
1858
|
+
meetingAt: string;
|
|
1859
|
+
targetCount: number;
|
|
1860
|
+
recruitId: number;
|
|
1861
|
+
expiredAt: string;
|
|
1862
|
+
}>, "many">;
|
|
1863
|
+
meta: z.ZodObject<{
|
|
1864
|
+
page: z.ZodNumber;
|
|
1865
|
+
size: z.ZodNumber;
|
|
1866
|
+
totalItems: z.ZodNumber;
|
|
1867
|
+
totalPages: z.ZodNumber;
|
|
1868
|
+
hasNext: z.ZodBoolean;
|
|
1869
|
+
hasPrevious: z.ZodBoolean;
|
|
1781
1870
|
}, "strip", z.ZodTypeAny, {
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1871
|
+
page: number;
|
|
1872
|
+
size: number;
|
|
1873
|
+
totalItems: number;
|
|
1874
|
+
totalPages: number;
|
|
1875
|
+
hasNext: boolean;
|
|
1876
|
+
hasPrevious: boolean;
|
|
1785
1877
|
}, {
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1878
|
+
page: number;
|
|
1879
|
+
size: number;
|
|
1880
|
+
totalItems: number;
|
|
1881
|
+
totalPages: number;
|
|
1882
|
+
hasNext: boolean;
|
|
1883
|
+
hasPrevious: boolean;
|
|
1884
|
+
}>;
|
|
1790
1885
|
}, "strip", z.ZodTypeAny, {
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1886
|
+
items: {
|
|
1887
|
+
message: string;
|
|
1888
|
+
status: "OPEN" | "CLOSED" | "EXPIRED";
|
|
1889
|
+
createdAt: string;
|
|
1890
|
+
author: {
|
|
1891
|
+
memberId: number & z.BRAND<"MemberId">;
|
|
1892
|
+
username: string;
|
|
1893
|
+
profileImageUrl?: string | null | undefined;
|
|
1894
|
+
};
|
|
1895
|
+
updatedAt: string;
|
|
1896
|
+
location: string;
|
|
1897
|
+
participants: {
|
|
1898
|
+
memberId: number & z.BRAND<"MemberId">;
|
|
1899
|
+
username: string;
|
|
1900
|
+
profileImageUrl?: string | null | undefined;
|
|
1901
|
+
}[];
|
|
1902
|
+
meetingAt: string;
|
|
1903
|
+
targetCount: number;
|
|
1904
|
+
recruitId: number & z.BRAND<"RecruitId">;
|
|
1905
|
+
expiredAt: string;
|
|
1805
1906
|
}[];
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
createdAt: string;
|
|
1814
|
-
author: {
|
|
1815
|
-
memberId: number;
|
|
1816
|
-
username: string;
|
|
1817
|
-
profileImageUrl?: string | null | undefined;
|
|
1907
|
+
meta: {
|
|
1908
|
+
page: number;
|
|
1909
|
+
size: number;
|
|
1910
|
+
totalItems: number;
|
|
1911
|
+
totalPages: number;
|
|
1912
|
+
hasNext: boolean;
|
|
1913
|
+
hasPrevious: boolean;
|
|
1818
1914
|
};
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1915
|
+
}, {
|
|
1916
|
+
items: {
|
|
1917
|
+
message: string;
|
|
1918
|
+
status: "OPEN" | "CLOSED" | "EXPIRED";
|
|
1919
|
+
createdAt: string;
|
|
1920
|
+
author: {
|
|
1921
|
+
memberId: number;
|
|
1922
|
+
username: string;
|
|
1923
|
+
profileImageUrl?: string | null | undefined;
|
|
1924
|
+
};
|
|
1925
|
+
updatedAt: string;
|
|
1926
|
+
location: string;
|
|
1927
|
+
participants: {
|
|
1928
|
+
memberId: number;
|
|
1929
|
+
username: string;
|
|
1930
|
+
profileImageUrl?: string | null | undefined;
|
|
1931
|
+
}[];
|
|
1932
|
+
meetingAt: string;
|
|
1933
|
+
targetCount: number;
|
|
1934
|
+
recruitId: number;
|
|
1935
|
+
expiredAt: string;
|
|
1825
1936
|
}[];
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1937
|
+
meta: {
|
|
1938
|
+
page: number;
|
|
1939
|
+
size: number;
|
|
1940
|
+
totalItems: number;
|
|
1941
|
+
totalPages: number;
|
|
1942
|
+
hasNext: boolean;
|
|
1943
|
+
hasPrevious: boolean;
|
|
1944
|
+
};
|
|
1945
|
+
}>>;
|
|
1831
1946
|
readonly create: EndpointContract<"POST", "/recruits", z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
1832
1947
|
targetCount: z.ZodNumber;
|
|
1833
1948
|
meetingAt: z.ZodString;
|
|
@@ -1857,7 +1972,7 @@ declare const apiContract: {
|
|
|
1857
1972
|
}, {
|
|
1858
1973
|
recruitId: number;
|
|
1859
1974
|
}>, z.ZodUndefined, z.ZodUndefined, z.ZodNull>;
|
|
1860
|
-
readonly close: EndpointContract<"
|
|
1975
|
+
readonly close: EndpointContract<"POST", "/recruits/:recruitId/close", z.ZodObject<{
|
|
1861
1976
|
recruitId: z.ZodBranded<z.ZodNumber, "RecruitId">;
|
|
1862
1977
|
}, "strip", z.ZodTypeAny, {
|
|
1863
1978
|
recruitId: number & z.BRAND<"RecruitId">;
|
|
@@ -1879,7 +1994,7 @@ declare const apiContract: {
|
|
|
1879
1994
|
inviterName: string;
|
|
1880
1995
|
inviterProfileImageUrl?: string | null | undefined;
|
|
1881
1996
|
}>, "many">>;
|
|
1882
|
-
readonly send: EndpointContract<"POST", "/invitations", z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
1997
|
+
readonly send: EndpointContract<"POST", "/invitations/send", z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
1883
1998
|
inviteeId: z.ZodBranded<z.ZodNumber, "MemberId">;
|
|
1884
1999
|
message: z.ZodString;
|
|
1885
2000
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -2059,8 +2174,8 @@ declare const apiContract: {
|
|
|
2059
2174
|
username: string;
|
|
2060
2175
|
profileImageUrl?: string | null | undefined;
|
|
2061
2176
|
}[];
|
|
2062
|
-
planId: number & z.BRAND<"PlanId">;
|
|
2063
2177
|
meetingAt: string;
|
|
2178
|
+
planId: number & z.BRAND<"PlanId">;
|
|
2064
2179
|
}, {
|
|
2065
2180
|
type: "RECRUIT" | "INVITATION";
|
|
2066
2181
|
status: "PLANNING" | "COMPLETED";
|
|
@@ -2096,8 +2211,8 @@ declare const apiContract: {
|
|
|
2096
2211
|
username: string;
|
|
2097
2212
|
profileImageUrl?: string | null | undefined;
|
|
2098
2213
|
}[];
|
|
2099
|
-
planId: number;
|
|
2100
2214
|
meetingAt: string;
|
|
2215
|
+
planId: number;
|
|
2101
2216
|
}>, "many">>;
|
|
2102
2217
|
readonly detail: EndpointContract<"GET", "/plans/:planId", z.ZodObject<{
|
|
2103
2218
|
planId: z.ZodBranded<z.ZodNumber, "PlanId">;
|
|
@@ -2229,8 +2344,8 @@ declare const apiContract: {
|
|
|
2229
2344
|
username: string;
|
|
2230
2345
|
profileImageUrl?: string | null | undefined;
|
|
2231
2346
|
}[];
|
|
2232
|
-
planId: number & z.BRAND<"PlanId">;
|
|
2233
2347
|
meetingAt: string;
|
|
2348
|
+
planId: number & z.BRAND<"PlanId">;
|
|
2234
2349
|
}, {
|
|
2235
2350
|
type: "RECRUIT" | "INVITATION";
|
|
2236
2351
|
status: "PLANNING" | "COMPLETED";
|
|
@@ -2266,8 +2381,8 @@ declare const apiContract: {
|
|
|
2266
2381
|
username: string;
|
|
2267
2382
|
profileImageUrl?: string | null | undefined;
|
|
2268
2383
|
}[];
|
|
2269
|
-
planId: number;
|
|
2270
2384
|
meetingAt: string;
|
|
2385
|
+
planId: number;
|
|
2271
2386
|
}>>;
|
|
2272
2387
|
readonly cancel: EndpointContract<"PATCH", "/plans/:planId/cancel", z.ZodObject<{
|
|
2273
2388
|
planId: z.ZodBranded<z.ZodNumber, "PlanId">;
|
|
@@ -2312,6 +2427,28 @@ declare const apiContract: {
|
|
|
2312
2427
|
blockedAt: string;
|
|
2313
2428
|
profileImageUrl?: string | null | undefined;
|
|
2314
2429
|
}>, "many">>;
|
|
2430
|
+
readonly search: EndpointContract<"GET", "/friends/search", z.ZodUndefined, z.ZodObject<{
|
|
2431
|
+
email: z.ZodOptional<z.ZodString>;
|
|
2432
|
+
username: z.ZodOptional<z.ZodString>;
|
|
2433
|
+
}, "strip", z.ZodTypeAny, {
|
|
2434
|
+
username?: string | undefined;
|
|
2435
|
+
email?: string | undefined;
|
|
2436
|
+
}, {
|
|
2437
|
+
username?: string | undefined;
|
|
2438
|
+
email?: string | undefined;
|
|
2439
|
+
}>, z.ZodUndefined, z.ZodArray<z.ZodObject<{
|
|
2440
|
+
memberId: z.ZodBranded<z.ZodNumber, "MemberId">;
|
|
2441
|
+
username: z.ZodString;
|
|
2442
|
+
profileImageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2443
|
+
}, "strip", z.ZodTypeAny, {
|
|
2444
|
+
memberId: number & z.BRAND<"MemberId">;
|
|
2445
|
+
username: string;
|
|
2446
|
+
profileImageUrl?: string | null | undefined;
|
|
2447
|
+
}, {
|
|
2448
|
+
memberId: number;
|
|
2449
|
+
username: string;
|
|
2450
|
+
profileImageUrl?: string | null | undefined;
|
|
2451
|
+
}>, "many">>;
|
|
2315
2452
|
readonly incomingRequest: EndpointContract<"GET", "/friends/requests/incoming", z.ZodUndefined, z.ZodUndefined, z.ZodUndefined, z.ZodArray<z.ZodObject<{
|
|
2316
2453
|
requestId: z.ZodBranded<z.ZodNumber, "FriendRequestId">;
|
|
2317
2454
|
requester: z.ZodObject<{
|
|
@@ -2493,23 +2630,23 @@ declare const apiContract: {
|
|
|
2493
2630
|
}, "strip", z.ZodTypeAny, {
|
|
2494
2631
|
type: "DISCOUNT" | "SERVICE";
|
|
2495
2632
|
expiresAt: string;
|
|
2633
|
+
title: string;
|
|
2496
2634
|
used: boolean;
|
|
2497
2635
|
couponId: number & z.BRAND<"CouponId">;
|
|
2498
|
-
title: string;
|
|
2499
2636
|
shopName: string;
|
|
2500
2637
|
condition: string;
|
|
2501
2638
|
thumbnailUrl: string;
|
|
2502
2639
|
}, {
|
|
2503
2640
|
type: "DISCOUNT" | "SERVICE";
|
|
2504
2641
|
expiresAt: string;
|
|
2642
|
+
title: string;
|
|
2505
2643
|
used: boolean;
|
|
2506
2644
|
couponId: number;
|
|
2507
|
-
title: string;
|
|
2508
2645
|
shopName: string;
|
|
2509
2646
|
condition: string;
|
|
2510
2647
|
thumbnailUrl: string;
|
|
2511
2648
|
}>, "many">>;
|
|
2512
|
-
readonly use: EndpointContract<"
|
|
2649
|
+
readonly use: EndpointContract<"POST", "/coupons/:couponId/use", z.ZodObject<{
|
|
2513
2650
|
couponId: z.ZodBranded<z.ZodNumber, "CouponId">;
|
|
2514
2651
|
}, "strip", z.ZodTypeAny, {
|
|
2515
2652
|
couponId: number & z.BRAND<"CouponId">;
|
|
@@ -2519,11 +2656,55 @@ declare const apiContract: {
|
|
|
2519
2656
|
};
|
|
2520
2657
|
readonly challenges: {
|
|
2521
2658
|
readonly status: EndpointContract<"GET", "/challenges/status", z.ZodUndefined, z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
2522
|
-
|
|
2659
|
+
week: z.ZodObject<{
|
|
2660
|
+
days: z.ZodArray<z.ZodBoolean, "many">;
|
|
2661
|
+
completed: z.ZodNumber;
|
|
2662
|
+
goal: z.ZodNumber;
|
|
2663
|
+
}, "strip", z.ZodTypeAny, {
|
|
2664
|
+
days: boolean[];
|
|
2665
|
+
completed: number;
|
|
2666
|
+
goal: number;
|
|
2667
|
+
}, {
|
|
2668
|
+
days: boolean[];
|
|
2669
|
+
completed: number;
|
|
2670
|
+
goal: number;
|
|
2671
|
+
}>;
|
|
2672
|
+
month: z.ZodObject<{
|
|
2673
|
+
count: z.ZodNumber;
|
|
2674
|
+
goal: z.ZodNumber;
|
|
2675
|
+
}, "strip", z.ZodTypeAny, {
|
|
2676
|
+
goal: number;
|
|
2677
|
+
count: number;
|
|
2678
|
+
}, {
|
|
2679
|
+
goal: number;
|
|
2680
|
+
count: number;
|
|
2681
|
+
}>;
|
|
2682
|
+
weekRewardAvailable: z.ZodBoolean;
|
|
2683
|
+
monthRewardAvailable: z.ZodBoolean;
|
|
2523
2684
|
}, "strip", z.ZodTypeAny, {
|
|
2524
|
-
|
|
2685
|
+
week: {
|
|
2686
|
+
days: boolean[];
|
|
2687
|
+
completed: number;
|
|
2688
|
+
goal: number;
|
|
2689
|
+
};
|
|
2690
|
+
month: {
|
|
2691
|
+
goal: number;
|
|
2692
|
+
count: number;
|
|
2693
|
+
};
|
|
2694
|
+
weekRewardAvailable: boolean;
|
|
2695
|
+
monthRewardAvailable: boolean;
|
|
2525
2696
|
}, {
|
|
2526
|
-
|
|
2697
|
+
week: {
|
|
2698
|
+
days: boolean[];
|
|
2699
|
+
completed: number;
|
|
2700
|
+
goal: number;
|
|
2701
|
+
};
|
|
2702
|
+
month: {
|
|
2703
|
+
goal: number;
|
|
2704
|
+
count: number;
|
|
2705
|
+
};
|
|
2706
|
+
weekRewardAvailable: boolean;
|
|
2707
|
+
monthRewardAvailable: boolean;
|
|
2527
2708
|
}>>;
|
|
2528
2709
|
readonly claimReward: EndpointContract<"POST", "/challenges/rewards", z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
2529
2710
|
type: z.ZodEnum<["WEEK", "MONTH"]>;
|
|
@@ -2577,7 +2758,101 @@ declare const apiContract: {
|
|
|
2577
2758
|
code: string;
|
|
2578
2759
|
}>, z.ZodNull>;
|
|
2579
2760
|
};
|
|
2580
|
-
readonly
|
|
2761
|
+
readonly notifications: {
|
|
2762
|
+
readonly list: EndpointContract<"GET", "/notifications", z.ZodUndefined, z.ZodUndefined, z.ZodUndefined, z.ZodArray<z.ZodObject<{
|
|
2763
|
+
notificationId: z.ZodString;
|
|
2764
|
+
kind: z.ZodEnum<["recruit", "invitation"]>;
|
|
2765
|
+
roomId: z.ZodBranded<z.ZodString, "RoomId">;
|
|
2766
|
+
roomType: z.ZodEnum<["recruit", "invitation"]>;
|
|
2767
|
+
title: z.ZodString;
|
|
2768
|
+
message: z.ZodString;
|
|
2769
|
+
createdAt: z.ZodString;
|
|
2770
|
+
readAt: z.ZodNullable<z.ZodString>;
|
|
2771
|
+
}, "strip", z.ZodTypeAny, {
|
|
2772
|
+
message: string;
|
|
2773
|
+
createdAt: string;
|
|
2774
|
+
roomId: string & z.BRAND<"RoomId">;
|
|
2775
|
+
roomType: "recruit" | "invitation";
|
|
2776
|
+
notificationId: string;
|
|
2777
|
+
kind: "recruit" | "invitation";
|
|
2778
|
+
title: string;
|
|
2779
|
+
readAt: string | null;
|
|
2780
|
+
}, {
|
|
2781
|
+
message: string;
|
|
2782
|
+
createdAt: string;
|
|
2783
|
+
roomId: string;
|
|
2784
|
+
roomType: "recruit" | "invitation";
|
|
2785
|
+
notificationId: string;
|
|
2786
|
+
kind: "recruit" | "invitation";
|
|
2787
|
+
title: string;
|
|
2788
|
+
readAt: string | null;
|
|
2789
|
+
}>, "many">>;
|
|
2790
|
+
readonly markRead: EndpointContract<"PATCH", "/notifications/:notificationId/read", z.ZodObject<{
|
|
2791
|
+
notificationId: z.ZodString;
|
|
2792
|
+
}, "strip", z.ZodTypeAny, {
|
|
2793
|
+
notificationId: string;
|
|
2794
|
+
}, {
|
|
2795
|
+
notificationId: string;
|
|
2796
|
+
}>, z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
2797
|
+
notificationId: z.ZodString;
|
|
2798
|
+
kind: z.ZodEnum<["recruit", "invitation"]>;
|
|
2799
|
+
roomId: z.ZodBranded<z.ZodString, "RoomId">;
|
|
2800
|
+
roomType: z.ZodEnum<["recruit", "invitation"]>;
|
|
2801
|
+
title: z.ZodString;
|
|
2802
|
+
message: z.ZodString;
|
|
2803
|
+
createdAt: z.ZodString;
|
|
2804
|
+
readAt: z.ZodNullable<z.ZodString>;
|
|
2805
|
+
}, "strip", z.ZodTypeAny, {
|
|
2806
|
+
message: string;
|
|
2807
|
+
createdAt: string;
|
|
2808
|
+
roomId: string & z.BRAND<"RoomId">;
|
|
2809
|
+
roomType: "recruit" | "invitation";
|
|
2810
|
+
notificationId: string;
|
|
2811
|
+
kind: "recruit" | "invitation";
|
|
2812
|
+
title: string;
|
|
2813
|
+
readAt: string | null;
|
|
2814
|
+
}, {
|
|
2815
|
+
message: string;
|
|
2816
|
+
createdAt: string;
|
|
2817
|
+
roomId: string;
|
|
2818
|
+
roomType: "recruit" | "invitation";
|
|
2819
|
+
notificationId: string;
|
|
2820
|
+
kind: "recruit" | "invitation";
|
|
2821
|
+
title: string;
|
|
2822
|
+
readAt: string | null;
|
|
2823
|
+
}>>;
|
|
2824
|
+
readonly delete: EndpointContract<"DELETE", "/notifications/:notificationId", z.ZodObject<{
|
|
2825
|
+
notificationId: z.ZodString;
|
|
2826
|
+
}, "strip", z.ZodTypeAny, {
|
|
2827
|
+
notificationId: string;
|
|
2828
|
+
}, {
|
|
2829
|
+
notificationId: string;
|
|
2830
|
+
}>, z.ZodUndefined, z.ZodUndefined, z.ZodNull>;
|
|
2831
|
+
};
|
|
2832
|
+
readonly room: {
|
|
2833
|
+
readonly access: EndpointContract<"GET", "/rooms/:roomId/access", z.ZodObject<{
|
|
2834
|
+
roomId: z.ZodBranded<z.ZodString, "RoomId">;
|
|
2835
|
+
}, "strip", z.ZodTypeAny, {
|
|
2836
|
+
roomId: string & z.BRAND<"RoomId">;
|
|
2837
|
+
}, {
|
|
2838
|
+
roomId: string;
|
|
2839
|
+
}>, z.ZodUndefined, z.ZodUndefined, z.ZodObject<{
|
|
2840
|
+
roomId: z.ZodBranded<z.ZodString, "RoomId">;
|
|
2841
|
+
roomType: z.ZodEnum<["recruit", "invitation"]>;
|
|
2842
|
+
stage: z.ZodUnion<[z.ZodEnum<["waiting", "location", "location-vote", "exclude-menu", "menu", "restaurant", "finish"]>, z.ZodEnum<["waiting", "date", "time", "location", "location-vote", "exclude-menu", "menu", "restaurant", "finish"]>]>;
|
|
2843
|
+
canJoin: z.ZodBoolean;
|
|
2844
|
+
}, "strip", z.ZodTypeAny, {
|
|
2845
|
+
roomId: string & z.BRAND<"RoomId">;
|
|
2846
|
+
roomType: "recruit" | "invitation";
|
|
2847
|
+
stage: "date" | "restaurant" | "waiting" | "location" | "location-vote" | "exclude-menu" | "menu" | "finish" | "time";
|
|
2848
|
+
canJoin: boolean;
|
|
2849
|
+
}, {
|
|
2850
|
+
roomId: string;
|
|
2851
|
+
roomType: "recruit" | "invitation";
|
|
2852
|
+
stage: "date" | "restaurant" | "waiting" | "location" | "location-vote" | "exclude-menu" | "menu" | "finish" | "time";
|
|
2853
|
+
canJoin: boolean;
|
|
2854
|
+
}>>;
|
|
2855
|
+
};
|
|
2581
2856
|
readonly health: {
|
|
2582
2857
|
readonly healthCheck: EndpointContract<"GET", "/", z.ZodUndefined, z.ZodUndefined, z.ZodUndefined, z.ZodString>;
|
|
2583
2858
|
};
|
|
@@ -2593,31 +2868,6 @@ type ISODateString = z.infer<typeof ISODateStringSchema>;
|
|
|
2593
2868
|
type ISODateTimeString = z.infer<typeof ISODateTimeStringSchema>;
|
|
2594
2869
|
type TimeHHmmString = z.infer<typeof TimeHHmmStringSchema>;
|
|
2595
2870
|
|
|
2596
|
-
type HttpMethod = "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
|
|
2597
|
-
declare const NoBodySchema: z.ZodUndefined;
|
|
2598
|
-
declare const NoQuerySchema: z.ZodUndefined;
|
|
2599
|
-
declare const NoParamsSchema: z.ZodUndefined;
|
|
2600
|
-
interface EndpointContract<TMethod extends HttpMethod, TPath extends string, TPathParams extends z.ZodTypeAny, TQuery extends z.ZodTypeAny, TBody extends z.ZodTypeAny, TResponse extends z.ZodTypeAny> {
|
|
2601
|
-
readonly method: TMethod;
|
|
2602
|
-
readonly path: TPath;
|
|
2603
|
-
readonly pathParams: TPathParams;
|
|
2604
|
-
readonly query: TQuery;
|
|
2605
|
-
readonly body: TBody;
|
|
2606
|
-
readonly response: TResponse;
|
|
2607
|
-
}
|
|
2608
|
-
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: {
|
|
2609
|
-
method: TMethod;
|
|
2610
|
-
path: TPath;
|
|
2611
|
-
pathParams?: TPathParams;
|
|
2612
|
-
query?: TQuery;
|
|
2613
|
-
body?: TBody;
|
|
2614
|
-
response: TResponse;
|
|
2615
|
-
}) => EndpointContract<TMethod, TPath, TPathParams, TQuery, TBody, TResponse>;
|
|
2616
|
-
type BodyOf<E> = E extends EndpointContract<any, any, any, any, infer TBody, any> ? z.infer<TBody> : never;
|
|
2617
|
-
type QueryOf<E> = E extends EndpointContract<any, any, any, infer TQuery, any, any> ? z.infer<TQuery> : never;
|
|
2618
|
-
type PathParamsOf<E> = E extends EndpointContract<any, any, infer TPathParams, any, any, any> ? z.infer<TPathParams> : never;
|
|
2619
|
-
type ResponseOf<E> = E extends EndpointContract<any, any, any, any, any, infer TResponse> ? z.infer<TResponse> : never;
|
|
2620
|
-
|
|
2621
2871
|
type EntityContract<TEntityName extends string, TId, TShape extends object> = TShape & {
|
|
2622
2872
|
readonly __entityName?: TEntityName;
|
|
2623
2873
|
readonly id?: TId;
|