@withwiz/toolkit 0.3.3 → 0.4.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/auth/index.js +6 -6
- package/dist/{chunk-E54MAI4I.js → chunk-2F6KNGOD.js} +2 -2
- package/dist/{chunk-BKJPYZYO.js → chunk-3YUKCYHI.js} +4 -4
- package/dist/{chunk-S54PFAEU.js → chunk-7VTBRP5M.js} +2 -2
- package/dist/{chunk-HCF3C3AQ.js → chunk-AKD4YMJU.js} +0 -61
- package/dist/{chunk-6MI4XLWC.js → chunk-AQJAY5FA.js} +2 -2
- package/dist/{chunk-TQJDNWBL.js → chunk-BJSEYZBH.js} +3 -3
- package/dist/{chunk-KXXROUA5.js → chunk-EOEMOXNT.js} +1 -44
- package/dist/{chunk-HUDWNKGY.js → chunk-J5AISIJS.js} +2 -2
- package/dist/{chunk-Y2JYA2AR.js → chunk-JNJALNRR.js} +2 -2
- package/dist/{chunk-2KDLKHTO.js → chunk-L6AU74EI.js} +2 -14
- package/dist/{chunk-IYXMGIEP.js → chunk-ON4ENPUS.js} +0 -61
- package/dist/{chunk-SNVGJPPX.js → chunk-SNTLJ646.js} +0 -80
- package/dist/{chunk-7JWIX5BS.js → chunk-WMJ5M45N.js} +1 -1
- package/dist/{chunk-JJ3I57N2.js → chunk-YP5SAHAP.js} +3 -3
- package/dist/components/ui/DataTable.js +2 -2
- package/dist/components/ui/data-table/DataTable.js +2 -2
- package/dist/constants/error-codes.d.ts +0 -78
- package/dist/constants/error-codes.js +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/error/app-error.d.ts +3 -16
- package/dist/error/app-error.js +2 -2
- package/dist/error/error-display.js +7 -7
- package/dist/error/error-handler.d.ts +0 -24
- package/dist/error/error-handler.js +3 -3
- package/dist/error/friendly-messages-v2.js +5 -5
- package/dist/error/friendly-messages.js +1 -15
- package/dist/error/index.js +8 -8
- package/dist/error/messages/en.js +1 -1
- package/dist/error/messages/index.js +3 -3
- package/dist/error/messages/ko.js +1 -1
- package/dist/middleware/auth.js +3 -3
- package/dist/middleware/error-handler.js +7 -7
- package/dist/middleware/index.js +10 -10
- package/dist/middleware/rate-limit.js +3 -3
- package/dist/middleware/wrappers.js +10 -10
- package/dist/storage/r2-storage.js +2 -2
- package/dist/utils/api-helpers.js +2 -2
- package/dist/utils/error-processor.js +3 -3
- package/dist/utils/index.js +4 -4
- package/dist/utils/optimistic-lock.js +2 -2
- package/package.json +1 -1
- package/dist/{chunk-HB5GFTFD.js → chunk-LX2EYD74.js} +3 -3
package/dist/auth/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TokenGenerator
|
|
3
|
+
} from "../chunk-GDWEDUHO.js";
|
|
4
|
+
import {
|
|
5
|
+
OAuthManager
|
|
6
|
+
} from "../chunk-V5K5FYU7.js";
|
|
1
7
|
import {
|
|
2
8
|
DEFAULT_PASSWORD_CONFIG,
|
|
3
9
|
createPasswordHasher,
|
|
@@ -13,9 +19,6 @@ import {
|
|
|
13
19
|
defaultPasswordSchema,
|
|
14
20
|
strongPasswordSchema
|
|
15
21
|
} from "../chunk-IHXRF3BH.js";
|
|
16
|
-
import {
|
|
17
|
-
TokenGenerator
|
|
18
|
-
} from "../chunk-GDWEDUHO.js";
|
|
19
22
|
import {
|
|
20
23
|
JWTClientManager,
|
|
21
24
|
clearStoredTokens,
|
|
@@ -32,9 +35,6 @@ import {
|
|
|
32
35
|
isTokenExpiringSoon,
|
|
33
36
|
storeTokens
|
|
34
37
|
} from "../chunk-XRRPEBKB.js";
|
|
35
|
-
import {
|
|
36
|
-
OAuthManager
|
|
37
|
-
} from "../chunk-V5K5FYU7.js";
|
|
38
38
|
import {
|
|
39
39
|
OAuthProvider,
|
|
40
40
|
PasswordStrength,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AUTH_ERROR_CODE_MAP
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-L6AU74EI.js";
|
|
4
4
|
import {
|
|
5
5
|
AppError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EOEMOXNT.js";
|
|
7
7
|
import {
|
|
8
8
|
getErrorMessage
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JNJALNRR.js";
|
|
10
10
|
import {
|
|
11
11
|
ERROR_CODES,
|
|
12
12
|
classifyError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SNTLJ646.js";
|
|
14
14
|
import {
|
|
15
15
|
AuthError
|
|
16
16
|
} from "./chunk-AIH3F7JV.js";
|
|
@@ -38,11 +38,6 @@ var enMessages = {
|
|
|
38
38
|
description: "8+ characters with letters, numbers, and symbols",
|
|
39
39
|
action: "Please set a more complex password."
|
|
40
40
|
},
|
|
41
|
-
40008: {
|
|
42
|
-
title: "Please check alias format",
|
|
43
|
-
description: "Only letters, numbers, and hyphens (-) allowed",
|
|
44
|
-
action: "Example: my-link-123"
|
|
45
|
-
},
|
|
46
41
|
// ============================================
|
|
47
42
|
// Authentication Errors (401xx)
|
|
48
43
|
// ============================================
|
|
@@ -61,16 +56,6 @@ var enMessages = {
|
|
|
61
56
|
description: "Your session has expired for security.",
|
|
62
57
|
action: "Please login again."
|
|
63
58
|
},
|
|
64
|
-
40104: {
|
|
65
|
-
title: "Password required",
|
|
66
|
-
description: "You must enter a password.",
|
|
67
|
-
action: "Please enter the password."
|
|
68
|
-
},
|
|
69
|
-
40105: {
|
|
70
|
-
title: "Incorrect password",
|
|
71
|
-
description: "The password is incorrect.",
|
|
72
|
-
action: "Please check again."
|
|
73
|
-
},
|
|
74
59
|
40106: {
|
|
75
60
|
title: "Login failed",
|
|
76
61
|
description: "Email or password is incorrect.",
|
|
@@ -116,23 +101,6 @@ var enMessages = {
|
|
|
116
101
|
title: "User not found",
|
|
117
102
|
description: "The user does not exist."
|
|
118
103
|
},
|
|
119
|
-
40403: {
|
|
120
|
-
title: "Link not found",
|
|
121
|
-
description: "The shortened link does not exist.",
|
|
122
|
-
action: "Please check the link address."
|
|
123
|
-
},
|
|
124
|
-
40408: {
|
|
125
|
-
title: "Tag not found",
|
|
126
|
-
description: "The tag does not exist."
|
|
127
|
-
},
|
|
128
|
-
40409: {
|
|
129
|
-
title: "Favorite not found",
|
|
130
|
-
description: "The item does not exist."
|
|
131
|
-
},
|
|
132
|
-
40410: {
|
|
133
|
-
title: "Group not found",
|
|
134
|
-
description: "The group does not exist."
|
|
135
|
-
},
|
|
136
104
|
// ============================================
|
|
137
105
|
// Conflict Errors (409xx)
|
|
138
106
|
// ============================================
|
|
@@ -151,11 +119,6 @@ var enMessages = {
|
|
|
151
119
|
description: "This email is already in use by another account.",
|
|
152
120
|
action: "Please use a different email."
|
|
153
121
|
},
|
|
154
|
-
40907: {
|
|
155
|
-
title: "Alias already in use",
|
|
156
|
-
description: "This alias is being used by another link.",
|
|
157
|
-
action: "Please enter a different alias."
|
|
158
|
-
},
|
|
159
122
|
// ============================================
|
|
160
123
|
// Business Logic Errors (422xx)
|
|
161
124
|
// ============================================
|
|
@@ -173,30 +136,6 @@ var enMessages = {
|
|
|
173
136
|
description: "You have exceeded the limit.",
|
|
174
137
|
action: "Please consider upgrading your plan."
|
|
175
138
|
},
|
|
176
|
-
42204: {
|
|
177
|
-
title: "Link expired",
|
|
178
|
-
description: "The validity period has passed.",
|
|
179
|
-
action: "Please create a new link."
|
|
180
|
-
},
|
|
181
|
-
42205: {
|
|
182
|
-
title: "Link disabled",
|
|
183
|
-
description: "Usage has been stopped.",
|
|
184
|
-
action: "Please contact the owner."
|
|
185
|
-
},
|
|
186
|
-
// 42206, 42207: moved to 401xx → see 40104, 40105 below
|
|
187
|
-
42208: {
|
|
188
|
-
title: "Alias not allowed",
|
|
189
|
-
description: "This is a system reserved word.",
|
|
190
|
-
action: "Please choose a different alias."
|
|
191
|
-
},
|
|
192
|
-
42209: {
|
|
193
|
-
title: "Already in favorites",
|
|
194
|
-
description: "Already added."
|
|
195
|
-
},
|
|
196
|
-
42210: {
|
|
197
|
-
title: "Cannot delete",
|
|
198
|
-
description: "Cannot delete your own admin account."
|
|
199
|
-
},
|
|
200
139
|
42211: {
|
|
201
140
|
title: "File too large",
|
|
202
141
|
description: "The maximum size has been exceeded.",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AppError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EOEMOXNT.js";
|
|
4
4
|
import {
|
|
5
5
|
getErrorDisplayInfo,
|
|
6
6
|
getFriendlyMessage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7VTBRP5M.js";
|
|
8
8
|
import {
|
|
9
9
|
getErrorCategory
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SNTLJ646.js";
|
|
11
11
|
|
|
12
12
|
// src/error/error-display.ts
|
|
13
13
|
import { toast } from "sonner";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
formatErrorMessage,
|
|
5
5
|
getErrorCategory,
|
|
6
6
|
getHttpStatus
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SNTLJ646.js";
|
|
8
8
|
|
|
9
9
|
// src/error/app-error.ts
|
|
10
10
|
var AppError = class _AppError extends Error {
|
|
@@ -149,11 +149,6 @@ var AppError = class _AppError extends Error {
|
|
|
149
149
|
static weakPassword() {
|
|
150
150
|
return _AppError.fromKey("PASSWORD_TOO_WEAK");
|
|
151
151
|
}
|
|
152
|
-
static invalidAlias(alias) {
|
|
153
|
-
return _AppError.fromKey("INVALID_ALIAS_FORMAT", void 0, {
|
|
154
|
-
value: alias
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
152
|
// ============================================
|
|
158
153
|
// 인증 에러 (401xx)
|
|
159
154
|
// ============================================
|
|
@@ -196,18 +191,6 @@ var AppError = class _AppError extends Error {
|
|
|
196
191
|
static userNotFound() {
|
|
197
192
|
return _AppError.fromKey("USER_NOT_FOUND");
|
|
198
193
|
}
|
|
199
|
-
static linkNotFound() {
|
|
200
|
-
return _AppError.fromKey("LINK_NOT_FOUND");
|
|
201
|
-
}
|
|
202
|
-
static tagNotFound() {
|
|
203
|
-
return _AppError.fromKey("TAG_NOT_FOUND");
|
|
204
|
-
}
|
|
205
|
-
static favoriteNotFound() {
|
|
206
|
-
return _AppError.fromKey("FAVORITE_NOT_FOUND");
|
|
207
|
-
}
|
|
208
|
-
static groupNotFound() {
|
|
209
|
-
return _AppError.fromKey("GROUP_NOT_FOUND");
|
|
210
|
-
}
|
|
211
194
|
// ============================================
|
|
212
195
|
// 충돌 에러 (409xx)
|
|
213
196
|
// ============================================
|
|
@@ -223,11 +206,6 @@ var AppError = class _AppError extends Error {
|
|
|
223
206
|
value: email
|
|
224
207
|
});
|
|
225
208
|
}
|
|
226
|
-
static aliasExists(alias) {
|
|
227
|
-
return _AppError.fromKey("ALIAS_ALREADY_EXISTS", void 0, {
|
|
228
|
-
value: alias
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
209
|
// ============================================
|
|
232
210
|
// 비즈니스 로직 에러 (422xx)
|
|
233
211
|
// ============================================
|
|
@@ -241,27 +219,6 @@ var AppError = class _AppError extends Error {
|
|
|
241
219
|
const message = quotaType ? `${quotaType} \uC0AC\uC6A9\uB7C9\uC744 \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4.` : void 0;
|
|
242
220
|
return _AppError.fromKey("QUOTA_EXCEEDED", message);
|
|
243
221
|
}
|
|
244
|
-
static linkExpired() {
|
|
245
|
-
return _AppError.fromKey("LINK_EXPIRED");
|
|
246
|
-
}
|
|
247
|
-
static linkInactive() {
|
|
248
|
-
return _AppError.fromKey("LINK_INACTIVE");
|
|
249
|
-
}
|
|
250
|
-
static linkPasswordRequired() {
|
|
251
|
-
return _AppError.fromKey("LINK_PASSWORD_REQUIRED");
|
|
252
|
-
}
|
|
253
|
-
static linkPasswordIncorrect() {
|
|
254
|
-
return _AppError.fromKey("LINK_PASSWORD_INCORRECT");
|
|
255
|
-
}
|
|
256
|
-
static reservedWord(word) {
|
|
257
|
-
return _AppError.fromKey("RESERVED_WORD_USED", void 0, { value: word });
|
|
258
|
-
}
|
|
259
|
-
static alreadyFavorited() {
|
|
260
|
-
return _AppError.fromKey("ALREADY_FAVORITED");
|
|
261
|
-
}
|
|
262
|
-
static cannotDeleteOwnAccount() {
|
|
263
|
-
return _AppError.fromKey("CANNOT_DELETE_OWN_ACCOUNT");
|
|
264
|
-
}
|
|
265
222
|
static fileTooLarge(maxSize) {
|
|
266
223
|
const message = maxSize ? `\uD30C\uC77C \uD06C\uAE30\uAC00 ${maxSize}\uB97C \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4.` : void 0;
|
|
267
224
|
return _AppError.fromKey("FILE_TOO_LARGE", message);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AppError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EOEMOXNT.js";
|
|
4
4
|
import {
|
|
5
5
|
ERROR_CODES,
|
|
6
6
|
classifyError,
|
|
7
7
|
formatErrorMessage,
|
|
8
8
|
getHttpStatus
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SNTLJ646.js";
|
|
10
10
|
import {
|
|
11
11
|
AuthError
|
|
12
12
|
} from "./chunk-AIH3F7JV.js";
|
|
@@ -124,13 +124,10 @@ var ErrorResponse = {
|
|
|
124
124
|
invalidUrl: () => errorToResponse(AppError.invalidUrl()),
|
|
125
125
|
invalidEmail: () => errorToResponse(AppError.invalidEmail()),
|
|
126
126
|
weakPassword: () => errorToResponse(AppError.weakPassword()),
|
|
127
|
-
invalidAlias: () => errorToResponse(AppError.invalidAlias()),
|
|
128
127
|
// 401xx
|
|
129
128
|
unauthorized: (message) => errorToResponse(AppError.unauthorized(message)),
|
|
130
129
|
invalidToken: () => errorToResponse(AppError.invalidToken()),
|
|
131
130
|
tokenExpired: () => errorToResponse(AppError.tokenExpired()),
|
|
132
|
-
linkPasswordRequired: () => errorToResponse(AppError.linkPasswordRequired()),
|
|
133
|
-
linkPasswordIncorrect: () => errorToResponse(AppError.linkPasswordIncorrect()),
|
|
134
131
|
invalidCredentials: () => errorToResponse(AppError.invalidCredentials()),
|
|
135
132
|
sessionExpired: () => errorToResponse(AppError.sessionExpired()),
|
|
136
133
|
// 403xx
|
|
@@ -141,23 +138,14 @@ var ErrorResponse = {
|
|
|
141
138
|
// 404xx
|
|
142
139
|
notFound: (message) => errorToResponse(AppError.notFound(message)),
|
|
143
140
|
userNotFound: () => errorToResponse(AppError.userNotFound()),
|
|
144
|
-
linkNotFound: () => errorToResponse(AppError.linkNotFound()),
|
|
145
|
-
tagNotFound: () => errorToResponse(AppError.tagNotFound()),
|
|
146
|
-
favoriteNotFound: () => errorToResponse(AppError.favoriteNotFound()),
|
|
147
|
-
groupNotFound: () => errorToResponse(AppError.groupNotFound()),
|
|
148
141
|
// 409xx
|
|
149
142
|
conflict: (message) => errorToResponse(AppError.conflict(message)),
|
|
150
143
|
duplicate: (resource) => errorToResponse(AppError.duplicate(resource)),
|
|
151
144
|
emailExists: () => errorToResponse(AppError.emailExists()),
|
|
152
|
-
aliasExists: () => errorToResponse(AppError.aliasExists()),
|
|
153
145
|
// 422xx
|
|
154
146
|
businessRule: (message) => errorToResponse(AppError.businessRule(message)),
|
|
155
147
|
invalidOperation: (message) => errorToResponse(AppError.invalidOperation(message)),
|
|
156
|
-
linkExpired: () => errorToResponse(AppError.linkExpired()),
|
|
157
|
-
linkInactive: () => errorToResponse(AppError.linkInactive()),
|
|
158
|
-
reservedWord: () => errorToResponse(AppError.reservedWord()),
|
|
159
148
|
quotaExceeded: () => errorToResponse(AppError.quotaExceeded()),
|
|
160
|
-
alreadyFavorited: () => errorToResponse(AppError.alreadyFavorited()),
|
|
161
149
|
fileTooLarge: (maxSize) => errorToResponse(AppError.fileTooLarge(maxSize)),
|
|
162
150
|
unsupportedFileType: (fileType) => errorToResponse(AppError.unsupportedFileType(fileType)),
|
|
163
151
|
// 429xx
|
|
@@ -38,11 +38,6 @@ var koMessages = {
|
|
|
38
38
|
description: "8\uC790 \uC774\uC0C1, \uC601\uBB38/\uC22B\uC790/\uD2B9\uC218\uBB38\uC790 \uD3EC\uD568",
|
|
39
39
|
action: "\uB354 \uBCF5\uC7A1\uD55C \uBE44\uBC00\uBC88\uD638\uB97C \uC124\uC815\uD574 \uC8FC\uC138\uC694."
|
|
40
40
|
},
|
|
41
|
-
40008: {
|
|
42
|
-
title: "\uBCC4\uCE6D \uD615\uC2DD\uC744 \uD655\uC778\uD574 \uC8FC\uC138\uC694",
|
|
43
|
-
description: "\uC601\uBB38, \uC22B\uC790, \uD558\uC774\uD508(-)\uB9CC \uC0AC\uC6A9 \uAC00\uB2A5",
|
|
44
|
-
action: "\uC608: my-link-123"
|
|
45
|
-
},
|
|
46
41
|
// ============================================
|
|
47
42
|
// 인증 관련 (401xx)
|
|
48
43
|
// ============================================
|
|
@@ -61,16 +56,6 @@ var koMessages = {
|
|
|
61
56
|
description: "\uBCF4\uC548\uC744 \uC704\uD574 \uC138\uC158\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",
|
|
62
57
|
action: "\uB2E4\uC2DC \uB85C\uADF8\uC778\uD574 \uC8FC\uC138\uC694."
|
|
63
58
|
},
|
|
64
|
-
40104: {
|
|
65
|
-
title: "\uBE44\uBC00\uBC88\uD638\uAC00 \uD544\uC694\uD574\uC694",
|
|
66
|
-
description: "\uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD574\uC57C \uD569\uB2C8\uB2E4.",
|
|
67
|
-
action: "\uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD574 \uC8FC\uC138\uC694."
|
|
68
|
-
},
|
|
69
|
-
40105: {
|
|
70
|
-
title: "\uBE44\uBC00\uBC88\uD638\uAC00 \uD2C0\uB838\uC5B4\uC694",
|
|
71
|
-
description: "\uBE44\uBC00\uBC88\uD638\uAC00 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
|
|
72
|
-
action: "\uB2E4\uC2DC \uD655\uC778\uD574 \uC8FC\uC138\uC694."
|
|
73
|
-
},
|
|
74
59
|
40106: {
|
|
75
60
|
title: "\uB85C\uADF8\uC778\uC5D0 \uC2E4\uD328\uD588\uC5B4\uC694",
|
|
76
61
|
description: "\uC774\uBA54\uC77C \uB610\uB294 \uBE44\uBC00\uBC88\uD638\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
|
|
@@ -116,23 +101,6 @@ var koMessages = {
|
|
|
116
101
|
title: "\uC0AC\uC6A9\uC790\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC5B4\uC694",
|
|
117
102
|
description: "\uD574\uB2F9 \uC0AC\uC6A9\uC790\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."
|
|
118
103
|
},
|
|
119
|
-
40403: {
|
|
120
|
-
title: "\uB9C1\uD06C\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC5B4\uC694",
|
|
121
|
-
description: "\uB2E8\uCD95 \uB9C1\uD06C\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
|
|
122
|
-
action: "\uB9C1\uD06C \uC8FC\uC18C\uB97C \uD655\uC778\uD574 \uC8FC\uC138\uC694."
|
|
123
|
-
},
|
|
124
|
-
40408: {
|
|
125
|
-
title: "\uD0DC\uADF8\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC5B4\uC694",
|
|
126
|
-
description: "\uD0DC\uADF8\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."
|
|
127
|
-
},
|
|
128
|
-
40409: {
|
|
129
|
-
title: "\uC990\uACA8\uCC3E\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC5B4\uC694",
|
|
130
|
-
description: "\uD56D\uBAA9\uC774 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."
|
|
131
|
-
},
|
|
132
|
-
40410: {
|
|
133
|
-
title: "\uADF8\uB8F9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC5B4\uC694",
|
|
134
|
-
description: "\uADF8\uB8F9\uC774 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."
|
|
135
|
-
},
|
|
136
104
|
// ============================================
|
|
137
105
|
// 충돌 (409xx)
|
|
138
106
|
// ============================================
|
|
@@ -151,11 +119,6 @@ var koMessages = {
|
|
|
151
119
|
description: "\uB2E4\uB978 \uACC4\uC815\uC5D0\uC11C \uC0AC\uC6A9 \uC911\uC785\uB2C8\uB2E4.",
|
|
152
120
|
action: "\uB2E4\uB978 \uC774\uBA54\uC77C\uC744 \uC0AC\uC6A9\uD574 \uC8FC\uC138\uC694."
|
|
153
121
|
},
|
|
154
|
-
40907: {
|
|
155
|
-
title: "\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uBCC4\uCE6D\uC774\uC5D0\uC694",
|
|
156
|
-
description: "\uB2E4\uB978 \uB9C1\uD06C\uC5D0\uC11C \uC0AC\uC6A9 \uC911\uC785\uB2C8\uB2E4.",
|
|
157
|
-
action: "\uB2E4\uB978 \uBCC4\uCE6D\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."
|
|
158
|
-
},
|
|
159
122
|
// ============================================
|
|
160
123
|
// 비즈니스 로직 (422xx)
|
|
161
124
|
// ============================================
|
|
@@ -173,30 +136,6 @@ var koMessages = {
|
|
|
173
136
|
description: "\uD55C\uB3C4\uB97C \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4.",
|
|
174
137
|
action: "\uD50C\uB79C \uC5C5\uADF8\uB808\uC774\uB4DC\uB97C \uACE0\uB824\uD574 \uC8FC\uC138\uC694."
|
|
175
138
|
},
|
|
176
|
-
42204: {
|
|
177
|
-
title: "\uB9CC\uB8CC\uB41C \uB9C1\uD06C\uC608\uC694",
|
|
178
|
-
description: "\uC720\uD6A8 \uAE30\uAC04\uC774 \uC9C0\uB0AC\uC2B5\uB2C8\uB2E4.",
|
|
179
|
-
action: "\uC0C8 \uB9C1\uD06C\uB97C \uC0DD\uC131\uD574 \uC8FC\uC138\uC694."
|
|
180
|
-
},
|
|
181
|
-
42205: {
|
|
182
|
-
title: "\uBE44\uD65C\uC131\uD654\uB41C \uB9C1\uD06C\uC608\uC694",
|
|
183
|
-
description: "\uC0AC\uC6A9\uC774 \uC911\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",
|
|
184
|
-
action: "\uC18C\uC720\uC790\uC5D0\uAC8C \uBB38\uC758\uD574 \uC8FC\uC138\uC694."
|
|
185
|
-
},
|
|
186
|
-
// 42206, 42207: 401xx로 이동 → 아래 40104, 40105 참조
|
|
187
|
-
42208: {
|
|
188
|
-
title: "\uC0AC\uC6A9\uD560 \uC218 \uC5C6\uB294 \uBCC4\uCE6D\uC774\uC5D0\uC694",
|
|
189
|
-
description: "\uC2DC\uC2A4\uD15C \uC608\uC57D\uC5B4\uC785\uB2C8\uB2E4.",
|
|
190
|
-
action: "\uB2E4\uB978 \uBCC4\uCE6D\uC744 \uC120\uD0DD\uD574 \uC8FC\uC138\uC694."
|
|
191
|
-
},
|
|
192
|
-
42209: {
|
|
193
|
-
title: "\uC774\uBBF8 \uC990\uACA8\uCC3E\uAE30\uC5D0 \uC788\uC5B4\uC694",
|
|
194
|
-
description: "\uC774\uBBF8 \uCD94\uAC00\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."
|
|
195
|
-
},
|
|
196
|
-
42210: {
|
|
197
|
-
title: "\uC0AD\uC81C\uD560 \uC218 \uC5C6\uC5B4\uC694",
|
|
198
|
-
description: "\uBCF8\uC778 \uAD00\uB9AC\uC790 \uACC4\uC815\uC740 \uC0AD\uC81C \uBD88\uAC00\uD569\uB2C8\uB2E4."
|
|
199
|
-
},
|
|
200
139
|
42211: {
|
|
201
140
|
title: "\uD30C\uC77C\uC774 \uB108\uBB34 \uCEE4\uC694",
|
|
202
141
|
description: "\uCD5C\uB300 \uD06C\uAE30\uB97C \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4.",
|
|
@@ -59,12 +59,6 @@ var ERROR_CODES = {
|
|
|
59
59
|
status: HTTP_STATUS.BAD_REQUEST,
|
|
60
60
|
message: "Password is too weak."
|
|
61
61
|
},
|
|
62
|
-
INVALID_ALIAS_FORMAT: {
|
|
63
|
-
code: 40008,
|
|
64
|
-
key: "INVALID_ALIAS_FORMAT",
|
|
65
|
-
status: HTTP_STATUS.BAD_REQUEST,
|
|
66
|
-
message: "Alias can only contain English letters, numbers, -, and _."
|
|
67
|
-
},
|
|
68
62
|
// ============================================
|
|
69
63
|
// Authentication Related (401xx)
|
|
70
64
|
// ============================================
|
|
@@ -92,18 +86,6 @@ var ERROR_CODES = {
|
|
|
92
86
|
status: HTTP_STATUS.UNAUTHORIZED,
|
|
93
87
|
message: "Invalid email or password."
|
|
94
88
|
},
|
|
95
|
-
LINK_PASSWORD_REQUIRED: {
|
|
96
|
-
code: 40104,
|
|
97
|
-
key: "LINK_PASSWORD_REQUIRED",
|
|
98
|
-
status: HTTP_STATUS.UNAUTHORIZED,
|
|
99
|
-
message: "Link password is required."
|
|
100
|
-
},
|
|
101
|
-
LINK_PASSWORD_INCORRECT: {
|
|
102
|
-
code: 40105,
|
|
103
|
-
key: "LINK_PASSWORD_INCORRECT",
|
|
104
|
-
status: HTTP_STATUS.UNAUTHORIZED,
|
|
105
|
-
message: "Incorrect link password."
|
|
106
|
-
},
|
|
107
89
|
SESSION_EXPIRED: {
|
|
108
90
|
code: 40107,
|
|
109
91
|
key: "SESSION_EXPIRED",
|
|
@@ -155,30 +137,6 @@ var ERROR_CODES = {
|
|
|
155
137
|
status: HTTP_STATUS.NOT_FOUND,
|
|
156
138
|
message: "User not found."
|
|
157
139
|
},
|
|
158
|
-
LINK_NOT_FOUND: {
|
|
159
|
-
code: 40403,
|
|
160
|
-
key: "LINK_NOT_FOUND",
|
|
161
|
-
status: HTTP_STATUS.NOT_FOUND,
|
|
162
|
-
message: "Link not found."
|
|
163
|
-
},
|
|
164
|
-
TAG_NOT_FOUND: {
|
|
165
|
-
code: 40408,
|
|
166
|
-
key: "TAG_NOT_FOUND",
|
|
167
|
-
status: HTTP_STATUS.NOT_FOUND,
|
|
168
|
-
message: "Tag not found."
|
|
169
|
-
},
|
|
170
|
-
FAVORITE_NOT_FOUND: {
|
|
171
|
-
code: 40409,
|
|
172
|
-
key: "FAVORITE_NOT_FOUND",
|
|
173
|
-
status: HTTP_STATUS.NOT_FOUND,
|
|
174
|
-
message: "Favorite not found."
|
|
175
|
-
},
|
|
176
|
-
GROUP_NOT_FOUND: {
|
|
177
|
-
code: 40410,
|
|
178
|
-
key: "GROUP_NOT_FOUND",
|
|
179
|
-
status: HTTP_STATUS.NOT_FOUND,
|
|
180
|
-
message: "Group not found."
|
|
181
|
-
},
|
|
182
140
|
// ============================================
|
|
183
141
|
// Conflict (409xx)
|
|
184
142
|
// Reserved: 40901~40903 (미사용, 향후 확장용)
|
|
@@ -201,12 +159,6 @@ var ERROR_CODES = {
|
|
|
201
159
|
status: HTTP_STATUS.CONFLICT,
|
|
202
160
|
message: "Email is already registered."
|
|
203
161
|
},
|
|
204
|
-
ALIAS_ALREADY_EXISTS: {
|
|
205
|
-
code: 40907,
|
|
206
|
-
key: "ALIAS_ALREADY_EXISTS",
|
|
207
|
-
status: HTTP_STATUS.CONFLICT,
|
|
208
|
-
message: "Alias is already in use."
|
|
209
|
-
},
|
|
210
162
|
// ============================================
|
|
211
163
|
// Business Logic (422xx)
|
|
212
164
|
// ============================================
|
|
@@ -228,38 +180,6 @@ var ERROR_CODES = {
|
|
|
228
180
|
status: HTTP_STATUS.UNPROCESSABLE_ENTITY,
|
|
229
181
|
message: "Usage quota exceeded."
|
|
230
182
|
},
|
|
231
|
-
LINK_EXPIRED: {
|
|
232
|
-
code: 42204,
|
|
233
|
-
key: "LINK_EXPIRED",
|
|
234
|
-
status: HTTP_STATUS.UNPROCESSABLE_ENTITY,
|
|
235
|
-
message: "Link has expired."
|
|
236
|
-
},
|
|
237
|
-
LINK_INACTIVE: {
|
|
238
|
-
code: 42205,
|
|
239
|
-
key: "LINK_INACTIVE",
|
|
240
|
-
status: HTTP_STATUS.UNPROCESSABLE_ENTITY,
|
|
241
|
-
message: "Link is inactive."
|
|
242
|
-
},
|
|
243
|
-
// LINK_PASSWORD_REQUIRED: 401xx로 이동 (40104)
|
|
244
|
-
// LINK_PASSWORD_INCORRECT: 401xx로 이동 (40105)
|
|
245
|
-
RESERVED_WORD_USED: {
|
|
246
|
-
code: 42208,
|
|
247
|
-
key: "RESERVED_WORD_USED",
|
|
248
|
-
status: HTTP_STATUS.UNPROCESSABLE_ENTITY,
|
|
249
|
-
message: "Reserved words cannot be used as aliases."
|
|
250
|
-
},
|
|
251
|
-
ALREADY_FAVORITED: {
|
|
252
|
-
code: 42209,
|
|
253
|
-
key: "ALREADY_FAVORITED",
|
|
254
|
-
status: HTTP_STATUS.UNPROCESSABLE_ENTITY,
|
|
255
|
-
message: "Already added to favorites."
|
|
256
|
-
},
|
|
257
|
-
CANNOT_DELETE_OWN_ACCOUNT: {
|
|
258
|
-
code: 42210,
|
|
259
|
-
key: "CANNOT_DELETE_OWN_ACCOUNT",
|
|
260
|
-
status: HTTP_STATUS.UNPROCESSABLE_ENTITY,
|
|
261
|
-
message: "You cannot delete your own account."
|
|
262
|
-
},
|
|
263
183
|
FILE_TOO_LARGE: {
|
|
264
184
|
code: 42211,
|
|
265
185
|
key: "FILE_TOO_LARGE",
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-FPESPW6P.js";
|
|
7
7
|
import {
|
|
8
8
|
rateLimitMiddleware
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AQJAY5FA.js";
|
|
10
10
|
import {
|
|
11
11
|
responseLoggerMiddleware
|
|
12
12
|
} from "./chunk-OIRAH57Y.js";
|
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
adminMiddleware,
|
|
18
18
|
authMiddleware,
|
|
19
19
|
optionalAuthMiddleware
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-J5AISIJS.js";
|
|
21
21
|
import {
|
|
22
22
|
corsMiddleware
|
|
23
23
|
} from "./chunk-KGHWGLED.js";
|
|
24
24
|
import {
|
|
25
25
|
errorHandlerMiddleware
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-3YUKCYHI.js";
|
|
27
27
|
|
|
28
28
|
// src/middleware/wrappers.ts
|
|
29
29
|
function withPublicApi(handler) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DataTable
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-LX2EYD74.js";
|
|
4
|
+
import "../../chunk-7IY3RQQL.js";
|
|
4
5
|
import "../../chunk-MAATEX2R.js";
|
|
5
6
|
import "../../chunk-SEZJN4TC.js";
|
|
6
7
|
import "../../chunk-IPXPCBDO.js";
|
|
7
8
|
import "../../chunk-KHYY4KCV.js";
|
|
8
9
|
import "../../chunk-NY5QXT33.js";
|
|
9
|
-
import "../../chunk-7IY3RQQL.js";
|
|
10
10
|
import "../../chunk-34WAGUT5.js";
|
|
11
11
|
import "../../chunk-RJUVBBZG.js";
|
|
12
12
|
import "../../chunk-IJEZ7G7S.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
DataTable
|
|
4
|
-
} from "../../../chunk-
|
|
4
|
+
} from "../../../chunk-LX2EYD74.js";
|
|
5
|
+
import "../../../chunk-7IY3RQQL.js";
|
|
5
6
|
import "../../../chunk-MAATEX2R.js";
|
|
6
7
|
import "../../../chunk-SEZJN4TC.js";
|
|
7
8
|
import "../../../chunk-IPXPCBDO.js";
|
|
8
9
|
import "../../../chunk-KHYY4KCV.js";
|
|
9
10
|
import "../../../chunk-NY5QXT33.js";
|
|
10
|
-
import "../../../chunk-7IY3RQQL.js";
|
|
11
11
|
import "../../../chunk-34WAGUT5.js";
|
|
12
12
|
import "../../../chunk-RJUVBBZG.js";
|
|
13
13
|
import "../../../chunk-IJEZ7G7S.js";
|