@sayren/storefront-sdk 0.16.0 → 0.18.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.mjs +1 -1
- package/dist/{checkout-DTfoCsMF.mjs → checkout-C25liqdW.mjs} +83 -6
- package/dist/{client-BrDY5HO3.mjs → client-CQYPw2N6.mjs} +23 -4
- package/dist/{index-BeQwCRc8.d.mts → index-D6lDEBHy.d.mts} +362 -74
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/payments/index.d.mts +1 -1
- package/dist/payments/index.mjs +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/schemas/cart.ts +9 -0
- package/src/schemas/catalog.ts +15 -0
- package/src/schemas/checkout.ts +13 -1
- package/src/schemas/coupon.ts +19 -2
- package/src/schemas/order.ts +2 -0
- package/src/schemas/product-options.ts +128 -0
- package/src/schemas/store.ts +32 -0
|
@@ -17,12 +17,6 @@ declare function analyticsIdsFromCookie(cookieHeader: string | null | undefined)
|
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/schemas/cart.d.ts
|
|
19
19
|
declare const cartItemSchema: z.ZodObject<{
|
|
20
|
-
cartItemId: z.ZodString;
|
|
21
|
-
productId: z.ZodString;
|
|
22
|
-
productName: z.ZodString;
|
|
23
|
-
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
24
|
-
optionId: z.ZodNullable<z.ZodString>;
|
|
25
|
-
optionName: z.ZodNullable<z.ZodString>;
|
|
26
20
|
quantity: z.ZodNumber;
|
|
27
21
|
unitPrice: z.ZodNumber;
|
|
28
22
|
totalPrice: z.ZodNumber;
|
|
@@ -37,16 +31,26 @@ declare const cartItemSchema: z.ZodObject<{
|
|
|
37
31
|
SUSPENDED: "SUSPENDED";
|
|
38
32
|
CLOSED: "CLOSED";
|
|
39
33
|
}>>;
|
|
34
|
+
optionSelections: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
|
+
kind: z.ZodString;
|
|
36
|
+
groupName: z.ZodString;
|
|
37
|
+
valueName: z.ZodString;
|
|
38
|
+
additionalPrice: z.ZodNumber;
|
|
39
|
+
}, z.core.$strip>>>>;
|
|
40
|
+
customInputs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
|
+
label: z.ZodString;
|
|
42
|
+
value: z.ZodString;
|
|
43
|
+
}, z.core.$strip>>>>;
|
|
44
|
+
cartItemId: z.ZodString;
|
|
45
|
+
productId: z.ZodString;
|
|
46
|
+
productName: z.ZodString;
|
|
47
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
48
|
+
optionId: z.ZodNullable<z.ZodString>;
|
|
49
|
+
optionName: z.ZodNullable<z.ZodString>;
|
|
40
50
|
}, z.core.$strip>;
|
|
41
51
|
type CartItem = z.infer<typeof cartItemSchema>;
|
|
42
52
|
declare const cartSchema: z.ZodObject<{
|
|
43
53
|
items: z.ZodArray<z.ZodObject<{
|
|
44
|
-
cartItemId: z.ZodString;
|
|
45
|
-
productId: z.ZodString;
|
|
46
|
-
productName: z.ZodString;
|
|
47
|
-
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
48
|
-
optionId: z.ZodNullable<z.ZodString>;
|
|
49
|
-
optionName: z.ZodNullable<z.ZodString>;
|
|
50
54
|
quantity: z.ZodNumber;
|
|
51
55
|
unitPrice: z.ZodNumber;
|
|
52
56
|
totalPrice: z.ZodNumber;
|
|
@@ -61,6 +65,22 @@ declare const cartSchema: z.ZodObject<{
|
|
|
61
65
|
SUSPENDED: "SUSPENDED";
|
|
62
66
|
CLOSED: "CLOSED";
|
|
63
67
|
}>>;
|
|
68
|
+
optionSelections: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
69
|
+
kind: z.ZodString;
|
|
70
|
+
groupName: z.ZodString;
|
|
71
|
+
valueName: z.ZodString;
|
|
72
|
+
additionalPrice: z.ZodNumber;
|
|
73
|
+
}, z.core.$strip>>>>;
|
|
74
|
+
customInputs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
75
|
+
label: z.ZodString;
|
|
76
|
+
value: z.ZodString;
|
|
77
|
+
}, z.core.$strip>>>>;
|
|
78
|
+
cartItemId: z.ZodString;
|
|
79
|
+
productId: z.ZodString;
|
|
80
|
+
productName: z.ZodString;
|
|
81
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
82
|
+
optionId: z.ZodNullable<z.ZodString>;
|
|
83
|
+
optionName: z.ZodNullable<z.ZodString>;
|
|
64
84
|
}, z.core.$strip>>;
|
|
65
85
|
summary: z.ZodObject<{
|
|
66
86
|
productAmount: z.ZodNumber;
|
|
@@ -71,6 +91,14 @@ declare const cartSchema: z.ZodObject<{
|
|
|
71
91
|
}, z.core.$strip>;
|
|
72
92
|
type Cart = z.infer<typeof cartSchema>;
|
|
73
93
|
declare const addCartItemRequestSchema: z.ZodObject<{
|
|
94
|
+
addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
95
|
+
groupId: z.ZodString;
|
|
96
|
+
valueId: z.ZodString;
|
|
97
|
+
}, z.core.$strip>>>;
|
|
98
|
+
customInputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
99
|
+
inputId: z.ZodString;
|
|
100
|
+
value: z.ZodString;
|
|
101
|
+
}, z.core.$strip>>>;
|
|
74
102
|
productId: z.ZodString;
|
|
75
103
|
optionId: z.ZodOptional<z.ZodString>;
|
|
76
104
|
quantity: z.ZodNumber;
|
|
@@ -79,6 +107,14 @@ type AddCartItemRequest = z.infer<typeof addCartItemRequestSchema>;
|
|
|
79
107
|
declare const updateCartItemRequestSchema: z.ZodObject<{
|
|
80
108
|
quantity: z.ZodOptional<z.ZodNumber>;
|
|
81
109
|
optionId: z.ZodOptional<z.ZodString>;
|
|
110
|
+
addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
111
|
+
groupId: z.ZodString;
|
|
112
|
+
valueId: z.ZodString;
|
|
113
|
+
}, z.core.$strip>>>;
|
|
114
|
+
customInputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
115
|
+
inputId: z.ZodString;
|
|
116
|
+
value: z.ZodString;
|
|
117
|
+
}, z.core.$strip>>>;
|
|
82
118
|
}, z.core.$strip>;
|
|
83
119
|
type UpdateCartItemRequest = z.infer<typeof updateCartItemRequestSchema>;
|
|
84
120
|
//#endregion
|
|
@@ -167,6 +203,7 @@ interface PageParams {
|
|
|
167
203
|
size?: number;
|
|
168
204
|
}
|
|
169
205
|
declare const orderItemStatusSchema: z.ZodEnum<{
|
|
206
|
+
CANCELED: "CANCELED";
|
|
170
207
|
PAYMENT_WAITING: "PAYMENT_WAITING";
|
|
171
208
|
PAID: "PAID";
|
|
172
209
|
CONFIRMED: "CONFIRMED";
|
|
@@ -174,10 +211,10 @@ declare const orderItemStatusSchema: z.ZodEnum<{
|
|
|
174
211
|
DELIVERING: "DELIVERING";
|
|
175
212
|
DELIVERED: "DELIVERED";
|
|
176
213
|
PURCHASE_DECIDED: "PURCHASE_DECIDED";
|
|
177
|
-
CANCELED: "CANCELED";
|
|
178
214
|
}>;
|
|
179
215
|
type OrderItemStatus = z.infer<typeof orderItemStatusSchema>;
|
|
180
216
|
declare const claimStatusSchema: z.ZodEnum<{
|
|
217
|
+
COMPLETED: "COMPLETED";
|
|
181
218
|
REQUESTED: "REQUESTED";
|
|
182
219
|
HELD: "HELD";
|
|
183
220
|
COLLECTING: "COLLECTING";
|
|
@@ -185,7 +222,6 @@ declare const claimStatusSchema: z.ZodEnum<{
|
|
|
185
222
|
REDELIVERING: "REDELIVERING";
|
|
186
223
|
APPROVED: "APPROVED";
|
|
187
224
|
REJECTED: "REJECTED";
|
|
188
|
-
COMPLETED: "COMPLETED";
|
|
189
225
|
WITHDRAWN: "WITHDRAWN";
|
|
190
226
|
}>;
|
|
191
227
|
type ClaimStatus = z.infer<typeof claimStatusSchema>;
|
|
@@ -243,6 +279,23 @@ declare const productDetailSchema: z.ZodObject<{
|
|
|
243
279
|
additionalPrice: z.ZodNumber;
|
|
244
280
|
soldOut: z.ZodBoolean;
|
|
245
281
|
}, z.core.$strip>>;
|
|
282
|
+
addonGroups: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
283
|
+
groupId: z.ZodString;
|
|
284
|
+
name: z.ZodString;
|
|
285
|
+
required: z.ZodBoolean;
|
|
286
|
+
values: z.ZodArray<z.ZodObject<{
|
|
287
|
+
valueId: z.ZodString;
|
|
288
|
+
name: z.ZodString;
|
|
289
|
+
additionalPrice: z.ZodNumber;
|
|
290
|
+
}, z.core.$strip>>;
|
|
291
|
+
}, z.core.$strip>>>>;
|
|
292
|
+
customInputs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
293
|
+
inputId: z.ZodString;
|
|
294
|
+
label: z.ZodString;
|
|
295
|
+
placeholder: z.ZodNullable<z.ZodString>;
|
|
296
|
+
maxLength: z.ZodNumber;
|
|
297
|
+
required: z.ZodBoolean;
|
|
298
|
+
}, z.core.$strip>>>>;
|
|
246
299
|
fulfillment: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
247
300
|
type: z.ZodLiteral<"SHIPPING">;
|
|
248
301
|
requiresShipping: z.ZodLiteral<true>;
|
|
@@ -341,6 +394,14 @@ type ProductPage = z.infer<typeof productPageSchema>;
|
|
|
341
394
|
declare const createCheckoutRequestSchema: z.ZodObject<{
|
|
342
395
|
cartItemIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
343
396
|
directItem: z.ZodOptional<z.ZodObject<{
|
|
397
|
+
addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
398
|
+
groupId: z.ZodString;
|
|
399
|
+
valueId: z.ZodString;
|
|
400
|
+
}, z.core.$strip>>>;
|
|
401
|
+
customInputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
402
|
+
inputId: z.ZodString;
|
|
403
|
+
value: z.ZodString;
|
|
404
|
+
}, z.core.$strip>>>;
|
|
344
405
|
productId: z.ZodString;
|
|
345
406
|
optionId: z.ZodOptional<z.ZodString>;
|
|
346
407
|
quantity: z.ZodNumber;
|
|
@@ -381,10 +442,6 @@ type CheckoutDelivery = z.infer<typeof checkoutDeliverySchema>;
|
|
|
381
442
|
declare const checkoutSessionSchema: z.ZodObject<{
|
|
382
443
|
checkoutId: z.ZodString;
|
|
383
444
|
items: z.ZodArray<z.ZodObject<{
|
|
384
|
-
productId: z.ZodString;
|
|
385
|
-
productName: z.ZodString;
|
|
386
|
-
optionId: z.ZodNullable<z.ZodString>;
|
|
387
|
-
optionName: z.ZodNullable<z.ZodString>;
|
|
388
445
|
quantity: z.ZodNumber;
|
|
389
446
|
unitPrice: z.ZodNumber;
|
|
390
447
|
totalPrice: z.ZodNumber;
|
|
@@ -393,6 +450,21 @@ declare const checkoutSessionSchema: z.ZodObject<{
|
|
|
393
450
|
requiresShipping: z.ZodBoolean;
|
|
394
451
|
withdrawalRestricted: z.ZodOptional<z.ZodBoolean>;
|
|
395
452
|
}, z.core.$strip>;
|
|
453
|
+
optionSelections: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
454
|
+
kind: z.ZodString;
|
|
455
|
+
groupName: z.ZodString;
|
|
456
|
+
valueName: z.ZodString;
|
|
457
|
+
additionalPrice: z.ZodNumber;
|
|
458
|
+
}, z.core.$strip>>>>;
|
|
459
|
+
customInputs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
460
|
+
label: z.ZodString;
|
|
461
|
+
value: z.ZodString;
|
|
462
|
+
}, z.core.$strip>>>>;
|
|
463
|
+
lineId: z.ZodOptional<z.ZodString>;
|
|
464
|
+
productId: z.ZodString;
|
|
465
|
+
productName: z.ZodString;
|
|
466
|
+
optionId: z.ZodNullable<z.ZodString>;
|
|
467
|
+
optionName: z.ZodNullable<z.ZodString>;
|
|
396
468
|
}, z.core.$strip>>;
|
|
397
469
|
amounts: z.ZodObject<{
|
|
398
470
|
productAmount: z.ZodNumber;
|
|
@@ -800,6 +872,7 @@ declare const startPaymentRequestSchema: z.ZodObject<{
|
|
|
800
872
|
issueId: z.ZodOptional<z.ZodString>;
|
|
801
873
|
code: z.ZodOptional<z.ZodString>;
|
|
802
874
|
optionId: z.ZodOptional<z.ZodString>;
|
|
875
|
+
lineId: z.ZodOptional<z.ZodString>;
|
|
803
876
|
}, z.core.$strip>>>;
|
|
804
877
|
}, z.core.$strip>;
|
|
805
878
|
type StartPaymentRequest = z.infer<typeof startPaymentRequestSchema>;
|
|
@@ -1035,6 +1108,7 @@ declare const myClaimSchema: z.ZodObject<{
|
|
|
1035
1108
|
EXCHANGE: "EXCHANGE";
|
|
1036
1109
|
}>;
|
|
1037
1110
|
status: z.ZodEnum<{
|
|
1111
|
+
COMPLETED: "COMPLETED";
|
|
1038
1112
|
REQUESTED: "REQUESTED";
|
|
1039
1113
|
HELD: "HELD";
|
|
1040
1114
|
COLLECTING: "COLLECTING";
|
|
@@ -1042,7 +1116,6 @@ declare const myClaimSchema: z.ZodObject<{
|
|
|
1042
1116
|
REDELIVERING: "REDELIVERING";
|
|
1043
1117
|
APPROVED: "APPROVED";
|
|
1044
1118
|
REJECTED: "REJECTED";
|
|
1045
|
-
COMPLETED: "COMPLETED";
|
|
1046
1119
|
WITHDRAWN: "WITHDRAWN";
|
|
1047
1120
|
}>;
|
|
1048
1121
|
orderItemId: z.ZodString;
|
|
@@ -1181,6 +1254,7 @@ declare const couponApplicationSchema: z.ZodObject<{
|
|
|
1181
1254
|
issueId: z.ZodOptional<z.ZodString>;
|
|
1182
1255
|
code: z.ZodOptional<z.ZodString>;
|
|
1183
1256
|
optionId: z.ZodOptional<z.ZodString>;
|
|
1257
|
+
lineId: z.ZodOptional<z.ZodString>;
|
|
1184
1258
|
}, z.core.$strip>;
|
|
1185
1259
|
type CouponApplication = z.infer<typeof couponApplicationSchema>;
|
|
1186
1260
|
/** 한 번에 적용할 수 있는 쿠폰 수 */
|
|
@@ -1189,6 +1263,7 @@ declare const couponApplicationListSchema: z.ZodArray<z.ZodObject<{
|
|
|
1189
1263
|
issueId: z.ZodOptional<z.ZodString>;
|
|
1190
1264
|
code: z.ZodOptional<z.ZodString>;
|
|
1191
1265
|
optionId: z.ZodOptional<z.ZodString>;
|
|
1266
|
+
lineId: z.ZodOptional<z.ZodString>;
|
|
1192
1267
|
}, z.core.$strip>>;
|
|
1193
1268
|
/** 쿠폰 혜택 — 응답 표시용. 값이 늘 수 있어 방식은 문자열이다 */
|
|
1194
1269
|
declare const couponBenefitViewSchema: z.ZodObject<{
|
|
@@ -1212,6 +1287,7 @@ declare const couponResultSchema: z.ZodObject<{
|
|
|
1212
1287
|
discountAmount: z.ZodNumber;
|
|
1213
1288
|
rejectReason: z.ZodNullable<z.ZodString>;
|
|
1214
1289
|
optionId: z.ZodNullable<z.ZodString>;
|
|
1290
|
+
lineId: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1215
1291
|
}, z.core.$strip>;
|
|
1216
1292
|
type CouponResult = z.infer<typeof couponResultSchema>;
|
|
1217
1293
|
/** 쿠폰을 반영한 금액 — 결제 금액 = productAmount − couponDiscountAmount + deliveryFee − deliveryDiscountAmount */
|
|
@@ -1229,6 +1305,7 @@ declare const checkoutPricingRequestSchema: z.ZodObject<{
|
|
|
1229
1305
|
issueId: z.ZodOptional<z.ZodString>;
|
|
1230
1306
|
code: z.ZodOptional<z.ZodString>;
|
|
1231
1307
|
optionId: z.ZodOptional<z.ZodString>;
|
|
1308
|
+
lineId: z.ZodOptional<z.ZodString>;
|
|
1232
1309
|
}, z.core.$strip>>;
|
|
1233
1310
|
}, z.core.$strip>;
|
|
1234
1311
|
type CheckoutPricingRequest = z.infer<typeof checkoutPricingRequestSchema>;
|
|
@@ -1257,9 +1334,11 @@ declare const checkoutPricingSchema: z.ZodObject<{
|
|
|
1257
1334
|
discountAmount: z.ZodNumber;
|
|
1258
1335
|
rejectReason: z.ZodNullable<z.ZodString>;
|
|
1259
1336
|
optionId: z.ZodNullable<z.ZodString>;
|
|
1337
|
+
lineId: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1260
1338
|
}, z.core.$strip>>;
|
|
1261
1339
|
items: z.ZodArray<z.ZodObject<{
|
|
1262
1340
|
optionId: z.ZodNullable<z.ZodString>;
|
|
1341
|
+
lineId: z.ZodOptional<z.ZodString>;
|
|
1263
1342
|
couponDiscountAmount: z.ZodNumber;
|
|
1264
1343
|
}, z.core.$strip>>;
|
|
1265
1344
|
payable: z.ZodBoolean;
|
|
@@ -1306,9 +1385,9 @@ declare const myCouponSchema: z.ZodObject<{
|
|
|
1306
1385
|
type MyCoupon = z.infer<typeof myCouponSchema>;
|
|
1307
1386
|
declare const myCouponListQuerySchema: z.ZodObject<{
|
|
1308
1387
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1388
|
+
expired: "expired";
|
|
1309
1389
|
available: "available";
|
|
1310
1390
|
used: "used";
|
|
1311
|
-
expired: "expired";
|
|
1312
1391
|
}>>;
|
|
1313
1392
|
}, z.core.$strip>;
|
|
1314
1393
|
//#endregion
|
|
@@ -1694,6 +1773,9 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1694
1773
|
businessHours: string | null;
|
|
1695
1774
|
guestCheckout: boolean;
|
|
1696
1775
|
loginMethods: ("password" | "kakao" | "naver" | "google")[];
|
|
1776
|
+
checkoutAvailable: boolean;
|
|
1777
|
+
checkoutMode: "LIVE" | "TEST" | null;
|
|
1778
|
+
checkoutUnavailableReason: "PAYMENT_NOT_CONFIGURED" | "PAYMENT_NOT_LIVE" | null;
|
|
1697
1779
|
}>;
|
|
1698
1780
|
};
|
|
1699
1781
|
catalog: {
|
|
@@ -1759,6 +1841,23 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1759
1841
|
additionalPrice: number;
|
|
1760
1842
|
soldOut: boolean;
|
|
1761
1843
|
}[];
|
|
1844
|
+
addonGroups: {
|
|
1845
|
+
groupId: string;
|
|
1846
|
+
name: string;
|
|
1847
|
+
required: boolean;
|
|
1848
|
+
values: {
|
|
1849
|
+
valueId: string;
|
|
1850
|
+
name: string;
|
|
1851
|
+
additionalPrice: number;
|
|
1852
|
+
}[];
|
|
1853
|
+
}[];
|
|
1854
|
+
customInputs: {
|
|
1855
|
+
inputId: string;
|
|
1856
|
+
label: string;
|
|
1857
|
+
placeholder: string | null;
|
|
1858
|
+
maxLength: number;
|
|
1859
|
+
required: boolean;
|
|
1860
|
+
}[];
|
|
1762
1861
|
fulfillment: UnknownFulfillmentView | {
|
|
1763
1862
|
type: "SHIPPING";
|
|
1764
1863
|
requiresShipping: true;
|
|
@@ -1831,12 +1930,6 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1831
1930
|
cart: {
|
|
1832
1931
|
get: () => Promise<{
|
|
1833
1932
|
items: {
|
|
1834
|
-
cartItemId: string;
|
|
1835
|
-
productId: string;
|
|
1836
|
-
productName: string;
|
|
1837
|
-
thumbnailUrl: string | null;
|
|
1838
|
-
optionId: string | null;
|
|
1839
|
-
optionName: string | null;
|
|
1840
1933
|
quantity: number;
|
|
1841
1934
|
unitPrice: number;
|
|
1842
1935
|
totalPrice: number;
|
|
@@ -1847,6 +1940,22 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1847
1940
|
};
|
|
1848
1941
|
purchasable: boolean;
|
|
1849
1942
|
unpurchasableReason: "SOLD_OUT" | "SUSPENDED" | "CLOSED" | null;
|
|
1943
|
+
optionSelections: {
|
|
1944
|
+
kind: string;
|
|
1945
|
+
groupName: string;
|
|
1946
|
+
valueName: string;
|
|
1947
|
+
additionalPrice: number;
|
|
1948
|
+
}[];
|
|
1949
|
+
customInputs: {
|
|
1950
|
+
label: string;
|
|
1951
|
+
value: string;
|
|
1952
|
+
}[];
|
|
1953
|
+
cartItemId: string;
|
|
1954
|
+
productId: string;
|
|
1955
|
+
productName: string;
|
|
1956
|
+
thumbnailUrl: string | null;
|
|
1957
|
+
optionId: string | null;
|
|
1958
|
+
optionName: string | null;
|
|
1850
1959
|
}[];
|
|
1851
1960
|
summary: {
|
|
1852
1961
|
productAmount: number;
|
|
@@ -1857,12 +1966,6 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1857
1966
|
}>;
|
|
1858
1967
|
addItem: (body: AddCartItemRequest) => Promise<{
|
|
1859
1968
|
items: {
|
|
1860
|
-
cartItemId: string;
|
|
1861
|
-
productId: string;
|
|
1862
|
-
productName: string;
|
|
1863
|
-
thumbnailUrl: string | null;
|
|
1864
|
-
optionId: string | null;
|
|
1865
|
-
optionName: string | null;
|
|
1866
1969
|
quantity: number;
|
|
1867
1970
|
unitPrice: number;
|
|
1868
1971
|
totalPrice: number;
|
|
@@ -1873,6 +1976,22 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1873
1976
|
};
|
|
1874
1977
|
purchasable: boolean;
|
|
1875
1978
|
unpurchasableReason: "SOLD_OUT" | "SUSPENDED" | "CLOSED" | null;
|
|
1979
|
+
optionSelections: {
|
|
1980
|
+
kind: string;
|
|
1981
|
+
groupName: string;
|
|
1982
|
+
valueName: string;
|
|
1983
|
+
additionalPrice: number;
|
|
1984
|
+
}[];
|
|
1985
|
+
customInputs: {
|
|
1986
|
+
label: string;
|
|
1987
|
+
value: string;
|
|
1988
|
+
}[];
|
|
1989
|
+
cartItemId: string;
|
|
1990
|
+
productId: string;
|
|
1991
|
+
productName: string;
|
|
1992
|
+
thumbnailUrl: string | null;
|
|
1993
|
+
optionId: string | null;
|
|
1994
|
+
optionName: string | null;
|
|
1876
1995
|
}[];
|
|
1877
1996
|
summary: {
|
|
1878
1997
|
productAmount: number;
|
|
@@ -1883,12 +2002,6 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1883
2002
|
}>;
|
|
1884
2003
|
updateItem: (cartItemId: string, body: UpdateCartItemRequest) => Promise<{
|
|
1885
2004
|
items: {
|
|
1886
|
-
cartItemId: string;
|
|
1887
|
-
productId: string;
|
|
1888
|
-
productName: string;
|
|
1889
|
-
thumbnailUrl: string | null;
|
|
1890
|
-
optionId: string | null;
|
|
1891
|
-
optionName: string | null;
|
|
1892
2005
|
quantity: number;
|
|
1893
2006
|
unitPrice: number;
|
|
1894
2007
|
totalPrice: number;
|
|
@@ -1899,6 +2012,22 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1899
2012
|
};
|
|
1900
2013
|
purchasable: boolean;
|
|
1901
2014
|
unpurchasableReason: "SOLD_OUT" | "SUSPENDED" | "CLOSED" | null;
|
|
2015
|
+
optionSelections: {
|
|
2016
|
+
kind: string;
|
|
2017
|
+
groupName: string;
|
|
2018
|
+
valueName: string;
|
|
2019
|
+
additionalPrice: number;
|
|
2020
|
+
}[];
|
|
2021
|
+
customInputs: {
|
|
2022
|
+
label: string;
|
|
2023
|
+
value: string;
|
|
2024
|
+
}[];
|
|
2025
|
+
cartItemId: string;
|
|
2026
|
+
productId: string;
|
|
2027
|
+
productName: string;
|
|
2028
|
+
thumbnailUrl: string | null;
|
|
2029
|
+
optionId: string | null;
|
|
2030
|
+
optionName: string | null;
|
|
1902
2031
|
}[];
|
|
1903
2032
|
summary: {
|
|
1904
2033
|
productAmount: number;
|
|
@@ -1913,10 +2042,6 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1913
2042
|
create: (body: CreateCheckoutRequest) => Promise<{
|
|
1914
2043
|
checkoutId: string;
|
|
1915
2044
|
items: {
|
|
1916
|
-
productId: string;
|
|
1917
|
-
productName: string;
|
|
1918
|
-
optionId: string | null;
|
|
1919
|
-
optionName: string | null;
|
|
1920
2045
|
quantity: number;
|
|
1921
2046
|
unitPrice: number;
|
|
1922
2047
|
totalPrice: number;
|
|
@@ -1925,6 +2050,21 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1925
2050
|
requiresShipping: boolean;
|
|
1926
2051
|
withdrawalRestricted?: boolean | undefined;
|
|
1927
2052
|
};
|
|
2053
|
+
optionSelections: {
|
|
2054
|
+
kind: string;
|
|
2055
|
+
groupName: string;
|
|
2056
|
+
valueName: string;
|
|
2057
|
+
additionalPrice: number;
|
|
2058
|
+
}[];
|
|
2059
|
+
customInputs: {
|
|
2060
|
+
label: string;
|
|
2061
|
+
value: string;
|
|
2062
|
+
}[];
|
|
2063
|
+
productId: string;
|
|
2064
|
+
productName: string;
|
|
2065
|
+
optionId: string | null;
|
|
2066
|
+
optionName: string | null;
|
|
2067
|
+
lineId?: string | undefined;
|
|
1928
2068
|
}[];
|
|
1929
2069
|
amounts: {
|
|
1930
2070
|
productAmount: number;
|
|
@@ -2078,10 +2218,12 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2078
2218
|
discountAmount: number;
|
|
2079
2219
|
rejectReason: string | null;
|
|
2080
2220
|
optionId: string | null;
|
|
2221
|
+
lineId: string | null;
|
|
2081
2222
|
}[];
|
|
2082
2223
|
items: {
|
|
2083
2224
|
optionId: string | null;
|
|
2084
2225
|
couponDiscountAmount: number;
|
|
2226
|
+
lineId?: string | undefined;
|
|
2085
2227
|
}[];
|
|
2086
2228
|
payable: boolean;
|
|
2087
2229
|
}>;
|
|
@@ -2184,17 +2326,12 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2184
2326
|
orderId: string;
|
|
2185
2327
|
orderedAt: string;
|
|
2186
2328
|
items: {
|
|
2187
|
-
orderItemId: string;
|
|
2188
|
-
productId: string;
|
|
2189
|
-
productName: string;
|
|
2190
|
-
thumbnailUrl: string | null;
|
|
2191
|
-
optionName: string | null;
|
|
2192
2329
|
quantity: number;
|
|
2193
2330
|
canceledQuantity: number;
|
|
2194
2331
|
activeQuantity: number;
|
|
2195
2332
|
totalPrice: number;
|
|
2196
2333
|
couponDiscountAmount: number;
|
|
2197
|
-
status: "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED"
|
|
2334
|
+
status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
|
|
2198
2335
|
fulfillmentSnapshot: UnknownFulfillmentView | {
|
|
2199
2336
|
type: "SHIPPING";
|
|
2200
2337
|
requiresShipping: true;
|
|
@@ -2210,6 +2347,21 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2210
2347
|
claimStatus: string | null;
|
|
2211
2348
|
reviewWritten: boolean;
|
|
2212
2349
|
autoDecisionDate: string | null;
|
|
2350
|
+
optionSelections: {
|
|
2351
|
+
kind: string;
|
|
2352
|
+
groupName: string;
|
|
2353
|
+
valueName: string;
|
|
2354
|
+
additionalPrice: number;
|
|
2355
|
+
}[];
|
|
2356
|
+
customInputs: {
|
|
2357
|
+
label: string;
|
|
2358
|
+
value: string;
|
|
2359
|
+
}[];
|
|
2360
|
+
orderItemId: string;
|
|
2361
|
+
productId: string;
|
|
2362
|
+
productName: string;
|
|
2363
|
+
thumbnailUrl: string | null;
|
|
2364
|
+
optionName: string | null;
|
|
2213
2365
|
}[];
|
|
2214
2366
|
requiresShipping: boolean;
|
|
2215
2367
|
shippingAddress: {
|
|
@@ -2243,17 +2395,12 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2243
2395
|
orderId: string;
|
|
2244
2396
|
orderedAt: string;
|
|
2245
2397
|
items: {
|
|
2246
|
-
orderItemId: string;
|
|
2247
|
-
productId: string;
|
|
2248
|
-
productName: string;
|
|
2249
|
-
thumbnailUrl: string | null;
|
|
2250
|
-
optionName: string | null;
|
|
2251
2398
|
quantity: number;
|
|
2252
2399
|
canceledQuantity: number;
|
|
2253
2400
|
activeQuantity: number;
|
|
2254
2401
|
totalPrice: number;
|
|
2255
2402
|
couponDiscountAmount: number;
|
|
2256
|
-
status: "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED"
|
|
2403
|
+
status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
|
|
2257
2404
|
fulfillmentSnapshot: UnknownFulfillmentView | {
|
|
2258
2405
|
type: "SHIPPING";
|
|
2259
2406
|
requiresShipping: true;
|
|
@@ -2269,6 +2416,21 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2269
2416
|
claimStatus: string | null;
|
|
2270
2417
|
reviewWritten: boolean;
|
|
2271
2418
|
autoDecisionDate: string | null;
|
|
2419
|
+
optionSelections: {
|
|
2420
|
+
kind: string;
|
|
2421
|
+
groupName: string;
|
|
2422
|
+
valueName: string;
|
|
2423
|
+
additionalPrice: number;
|
|
2424
|
+
}[];
|
|
2425
|
+
customInputs: {
|
|
2426
|
+
label: string;
|
|
2427
|
+
value: string;
|
|
2428
|
+
}[];
|
|
2429
|
+
orderItemId: string;
|
|
2430
|
+
productId: string;
|
|
2431
|
+
productName: string;
|
|
2432
|
+
thumbnailUrl: string | null;
|
|
2433
|
+
optionName: string | null;
|
|
2272
2434
|
}[];
|
|
2273
2435
|
requiresShipping: boolean;
|
|
2274
2436
|
shippingAddress: {
|
|
@@ -2313,17 +2475,12 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2313
2475
|
orderId: string;
|
|
2314
2476
|
orderedAt: string;
|
|
2315
2477
|
items: {
|
|
2316
|
-
orderItemId: string;
|
|
2317
|
-
productId: string;
|
|
2318
|
-
productName: string;
|
|
2319
|
-
thumbnailUrl: string | null;
|
|
2320
|
-
optionName: string | null;
|
|
2321
2478
|
quantity: number;
|
|
2322
2479
|
canceledQuantity: number;
|
|
2323
2480
|
activeQuantity: number;
|
|
2324
2481
|
totalPrice: number;
|
|
2325
2482
|
couponDiscountAmount: number;
|
|
2326
|
-
status: "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED"
|
|
2483
|
+
status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
|
|
2327
2484
|
fulfillmentSnapshot: UnknownFulfillmentView | {
|
|
2328
2485
|
type: "SHIPPING";
|
|
2329
2486
|
requiresShipping: true;
|
|
@@ -2339,6 +2496,21 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2339
2496
|
claimStatus: string | null;
|
|
2340
2497
|
reviewWritten: boolean;
|
|
2341
2498
|
autoDecisionDate: string | null;
|
|
2499
|
+
optionSelections: {
|
|
2500
|
+
kind: string;
|
|
2501
|
+
groupName: string;
|
|
2502
|
+
valueName: string;
|
|
2503
|
+
additionalPrice: number;
|
|
2504
|
+
}[];
|
|
2505
|
+
customInputs: {
|
|
2506
|
+
label: string;
|
|
2507
|
+
value: string;
|
|
2508
|
+
}[];
|
|
2509
|
+
orderItemId: string;
|
|
2510
|
+
productId: string;
|
|
2511
|
+
productName: string;
|
|
2512
|
+
thumbnailUrl: string | null;
|
|
2513
|
+
optionName: string | null;
|
|
2342
2514
|
}[];
|
|
2343
2515
|
requiresShipping: boolean;
|
|
2344
2516
|
shippingAddress: {
|
|
@@ -2404,7 +2576,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2404
2576
|
contents: {
|
|
2405
2577
|
claimId: string;
|
|
2406
2578
|
type: "CANCEL" | "RETURN" | "EXCHANGE";
|
|
2407
|
-
status: "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "REJECTED" | "
|
|
2579
|
+
status: "COMPLETED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "REJECTED" | "WITHDRAWN";
|
|
2408
2580
|
orderItemId: string;
|
|
2409
2581
|
productName: string;
|
|
2410
2582
|
quantity: number;
|
|
@@ -2771,17 +2943,13 @@ declare const ANALYTICS_MAX_BATCH_BYTES: number;
|
|
|
2771
2943
|
//#endregion
|
|
2772
2944
|
//#region src/schemas/order.d.ts
|
|
2773
2945
|
declare const myOrderItemSchema: z.ZodObject<{
|
|
2774
|
-
orderItemId: z.ZodString;
|
|
2775
|
-
productId: z.ZodString;
|
|
2776
|
-
productName: z.ZodString;
|
|
2777
|
-
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
2778
|
-
optionName: z.ZodNullable<z.ZodString>;
|
|
2779
2946
|
quantity: z.ZodNumber;
|
|
2780
2947
|
canceledQuantity: z.ZodNumber;
|
|
2781
2948
|
activeQuantity: z.ZodNumber;
|
|
2782
2949
|
totalPrice: z.ZodNumber;
|
|
2783
2950
|
couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
2784
2951
|
status: z.ZodEnum<{
|
|
2952
|
+
CANCELED: "CANCELED";
|
|
2785
2953
|
PAYMENT_WAITING: "PAYMENT_WAITING";
|
|
2786
2954
|
PAID: "PAID";
|
|
2787
2955
|
CONFIRMED: "CONFIRMED";
|
|
@@ -2789,7 +2957,6 @@ declare const myOrderItemSchema: z.ZodObject<{
|
|
|
2789
2957
|
DELIVERING: "DELIVERING";
|
|
2790
2958
|
DELIVERED: "DELIVERED";
|
|
2791
2959
|
PURCHASE_DECIDED: "PURCHASE_DECIDED";
|
|
2792
|
-
CANCELED: "CANCELED";
|
|
2793
2960
|
}>;
|
|
2794
2961
|
fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2795
2962
|
type: z.ZodLiteral<"SHIPPING">;
|
|
@@ -2813,6 +2980,21 @@ declare const myOrderItemSchema: z.ZodObject<{
|
|
|
2813
2980
|
claimStatus: z.ZodNullable<z.ZodString>;
|
|
2814
2981
|
reviewWritten: z.ZodBoolean;
|
|
2815
2982
|
autoDecisionDate: z.ZodNullable<z.ZodString>;
|
|
2983
|
+
optionSelections: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2984
|
+
kind: z.ZodString;
|
|
2985
|
+
groupName: z.ZodString;
|
|
2986
|
+
valueName: z.ZodString;
|
|
2987
|
+
additionalPrice: z.ZodNumber;
|
|
2988
|
+
}, z.core.$strip>>>>;
|
|
2989
|
+
customInputs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2990
|
+
label: z.ZodString;
|
|
2991
|
+
value: z.ZodString;
|
|
2992
|
+
}, z.core.$strip>>>>;
|
|
2993
|
+
orderItemId: z.ZodString;
|
|
2994
|
+
productId: z.ZodString;
|
|
2995
|
+
productName: z.ZodString;
|
|
2996
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
2997
|
+
optionName: z.ZodNullable<z.ZodString>;
|
|
2816
2998
|
}, z.core.$strip>;
|
|
2817
2999
|
type MyOrderItem = z.infer<typeof myOrderItemSchema>;
|
|
2818
3000
|
/**
|
|
@@ -2833,17 +3015,13 @@ declare const myOrderSchema: z.ZodObject<{
|
|
|
2833
3015
|
orderId: z.ZodString;
|
|
2834
3016
|
orderedAt: z.ZodString;
|
|
2835
3017
|
items: z.ZodArray<z.ZodObject<{
|
|
2836
|
-
orderItemId: z.ZodString;
|
|
2837
|
-
productId: z.ZodString;
|
|
2838
|
-
productName: z.ZodString;
|
|
2839
|
-
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
2840
|
-
optionName: z.ZodNullable<z.ZodString>;
|
|
2841
3018
|
quantity: z.ZodNumber;
|
|
2842
3019
|
canceledQuantity: z.ZodNumber;
|
|
2843
3020
|
activeQuantity: z.ZodNumber;
|
|
2844
3021
|
totalPrice: z.ZodNumber;
|
|
2845
3022
|
couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
2846
3023
|
status: z.ZodEnum<{
|
|
3024
|
+
CANCELED: "CANCELED";
|
|
2847
3025
|
PAYMENT_WAITING: "PAYMENT_WAITING";
|
|
2848
3026
|
PAID: "PAID";
|
|
2849
3027
|
CONFIRMED: "CONFIRMED";
|
|
@@ -2851,7 +3029,6 @@ declare const myOrderSchema: z.ZodObject<{
|
|
|
2851
3029
|
DELIVERING: "DELIVERING";
|
|
2852
3030
|
DELIVERED: "DELIVERED";
|
|
2853
3031
|
PURCHASE_DECIDED: "PURCHASE_DECIDED";
|
|
2854
|
-
CANCELED: "CANCELED";
|
|
2855
3032
|
}>;
|
|
2856
3033
|
fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2857
3034
|
type: z.ZodLiteral<"SHIPPING">;
|
|
@@ -2875,6 +3052,21 @@ declare const myOrderSchema: z.ZodObject<{
|
|
|
2875
3052
|
claimStatus: z.ZodNullable<z.ZodString>;
|
|
2876
3053
|
reviewWritten: z.ZodBoolean;
|
|
2877
3054
|
autoDecisionDate: z.ZodNullable<z.ZodString>;
|
|
3055
|
+
optionSelections: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3056
|
+
kind: z.ZodString;
|
|
3057
|
+
groupName: z.ZodString;
|
|
3058
|
+
valueName: z.ZodString;
|
|
3059
|
+
additionalPrice: z.ZodNumber;
|
|
3060
|
+
}, z.core.$strip>>>>;
|
|
3061
|
+
customInputs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3062
|
+
label: z.ZodString;
|
|
3063
|
+
value: z.ZodString;
|
|
3064
|
+
}, z.core.$strip>>>>;
|
|
3065
|
+
orderItemId: z.ZodString;
|
|
3066
|
+
productId: z.ZodString;
|
|
3067
|
+
productName: z.ZodString;
|
|
3068
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
3069
|
+
optionName: z.ZodNullable<z.ZodString>;
|
|
2878
3070
|
}, z.core.$strip>>;
|
|
2879
3071
|
requiresShipping: z.ZodBoolean;
|
|
2880
3072
|
shippingAddress: z.ZodObject<{
|
|
@@ -2942,6 +3134,93 @@ declare const purchaseDecisionResultSchema: z.ZodObject<{
|
|
|
2942
3134
|
}, z.core.$strip>;
|
|
2943
3135
|
type PurchaseDecisionResult = z.infer<typeof purchaseDecisionResultSchema>;
|
|
2944
3136
|
//#endregion
|
|
3137
|
+
//#region src/schemas/product-options.d.ts
|
|
3138
|
+
/**
|
|
3139
|
+
* 추가 선택·직접 입력 (이슈 #59) — 상품 상세의 옵션 표시, 장바구니 담기·바로 구매 요청, 줄 스냅샷의 공통 모양.
|
|
3140
|
+
*
|
|
3141
|
+
* 추가 선택은 재고가 없는 옵션이다. 구매자가 조합(옵션이 없으면 상품)을 고른 뒤 옵션명마다 값 하나를 더 고르고, 값의 추가금이
|
|
3142
|
+
* 단가에 더해진다. 직접 입력은 구매자가 글자를 적는 항목(각인 문구 등)이다. 추가 선택 값이나 직접 입력값이 다르면 장바구니에서 다른 줄이다.
|
|
3143
|
+
*/
|
|
3144
|
+
declare const addonGroupViewSchema: z.ZodObject<{
|
|
3145
|
+
groupId: z.ZodString;
|
|
3146
|
+
name: z.ZodString;
|
|
3147
|
+
required: z.ZodBoolean;
|
|
3148
|
+
values: z.ZodArray<z.ZodObject<{
|
|
3149
|
+
valueId: z.ZodString;
|
|
3150
|
+
name: z.ZodString;
|
|
3151
|
+
additionalPrice: z.ZodNumber;
|
|
3152
|
+
}, z.core.$strip>>;
|
|
3153
|
+
}, z.core.$strip>;
|
|
3154
|
+
type AddonGroupView = z.infer<typeof addonGroupViewSchema>;
|
|
3155
|
+
declare const customInputViewSchema: z.ZodObject<{
|
|
3156
|
+
inputId: z.ZodString;
|
|
3157
|
+
label: z.ZodString;
|
|
3158
|
+
placeholder: z.ZodNullable<z.ZodString>;
|
|
3159
|
+
maxLength: z.ZodNumber;
|
|
3160
|
+
required: z.ZodBoolean;
|
|
3161
|
+
}, z.core.$strip>;
|
|
3162
|
+
type CustomInputView = z.infer<typeof customInputViewSchema>;
|
|
3163
|
+
/**
|
|
3164
|
+
* 직접 입력값 정규화 — NFC로 모으고, 제어 문자(C0·C1·줄바꿈·줄·문단 구분자)는 공백으로, 제로폭·양방향 제어 문자는 지운 뒤
|
|
3165
|
+
* 앞뒤 공백을 지운다. 서버가 저장하는 값이 이것이다. 빈 문자열이면 입력하지 않은 것으로 본다.
|
|
3166
|
+
* (양방향 제어 문자를 두면 셀러 주문 화면의 각인 문구가 뒤집혀 보이게 할 수 있다.)
|
|
3167
|
+
*/
|
|
3168
|
+
declare function normalizeCustomInputValue(value: string): string;
|
|
3169
|
+
/**
|
|
3170
|
+
* 직접 입력값의 글자 수 — 정규화한 값의 **코드 포인트 수**다(이모지 하나가 1자). 서버의 최대 글자 수 판정(`CUSTOM_INPUT_TOO_LONG`)과
|
|
3171
|
+
* 스토어프론트·콘솔의 글자 수 표시가 이 함수 하나를 쓴다. `String.length`(UTF-16)로 세면 이모지가 2자로 세어 판정이 갈린다.
|
|
3172
|
+
*/
|
|
3173
|
+
declare function customInputLength(value: string): number;
|
|
3174
|
+
/** 담기·바로 구매 요청의 직접 입력값 한 칸. 앞뒤 공백을 지우고, 빈 값은 입력하지 않은 것으로 본다 */
|
|
3175
|
+
declare const customInputEntrySchema: z.ZodObject<{
|
|
3176
|
+
inputId: z.ZodString;
|
|
3177
|
+
value: z.ZodString;
|
|
3178
|
+
}, z.core.$strip>;
|
|
3179
|
+
type CustomInputEntry = z.infer<typeof customInputEntrySchema>;
|
|
3180
|
+
/** 고른 추가 선택 한 칸 — 옵션명(`groupId`)과 그 옵션명의 값(`valueId`) */
|
|
3181
|
+
declare const addonSelectionSchema: z.ZodObject<{
|
|
3182
|
+
groupId: z.ZodString;
|
|
3183
|
+
valueId: z.ZodString;
|
|
3184
|
+
}, z.core.$strip>;
|
|
3185
|
+
type AddonSelection = z.infer<typeof addonSelectionSchema>;
|
|
3186
|
+
/** 요청의 추가 선택·직접 입력 필드 — 담기·장바구니 수정·바로 구매가 같은 이름을 쓴다 */
|
|
3187
|
+
declare const lineSelectionRequestShape: {
|
|
3188
|
+
addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3189
|
+
groupId: z.ZodString;
|
|
3190
|
+
valueId: z.ZodString;
|
|
3191
|
+
}, z.core.$strip>>>;
|
|
3192
|
+
customInputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3193
|
+
inputId: z.ZodString;
|
|
3194
|
+
value: z.ZodString;
|
|
3195
|
+
}, z.core.$strip>>>;
|
|
3196
|
+
};
|
|
3197
|
+
/** 줄의 옵션 선택 스냅샷 한 칸 — 조합 옵션은 옵션명마다 한 칸이고 추가금이 0이다(조합 추가금은 단가에 들어 있다) */
|
|
3198
|
+
declare const optionSelectionViewSchema: z.ZodObject<{
|
|
3199
|
+
kind: z.ZodString;
|
|
3200
|
+
groupName: z.ZodString;
|
|
3201
|
+
valueName: z.ZodString;
|
|
3202
|
+
additionalPrice: z.ZodNumber;
|
|
3203
|
+
}, z.core.$strip>;
|
|
3204
|
+
type OptionSelectionView = z.infer<typeof optionSelectionViewSchema>;
|
|
3205
|
+
declare const customInputValueViewSchema: z.ZodObject<{
|
|
3206
|
+
label: z.ZodString;
|
|
3207
|
+
value: z.ZodString;
|
|
3208
|
+
}, z.core.$strip>;
|
|
3209
|
+
type CustomInputValueView = z.infer<typeof customInputValueViewSchema>;
|
|
3210
|
+
/** 응답 줄의 표시 필드 — 장바구니·주문서·주문상품이 같은 이름을 쓴다 */
|
|
3211
|
+
declare const lineSelectionResponseShape: {
|
|
3212
|
+
optionSelections: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3213
|
+
kind: z.ZodString;
|
|
3214
|
+
groupName: z.ZodString;
|
|
3215
|
+
valueName: z.ZodString;
|
|
3216
|
+
additionalPrice: z.ZodNumber;
|
|
3217
|
+
}, z.core.$strip>>>>;
|
|
3218
|
+
customInputs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3219
|
+
label: z.ZodString;
|
|
3220
|
+
value: z.ZodString;
|
|
3221
|
+
}, z.core.$strip>>>>;
|
|
3222
|
+
};
|
|
3223
|
+
//#endregion
|
|
2945
3224
|
//#region src/schemas/store.d.ts
|
|
2946
3225
|
/**
|
|
2947
3226
|
* 스토어 공개 설정 — `GET /store`. 스토어프론트가 화면을 그릴 때 읽는 값만 담는다.
|
|
@@ -2959,7 +3238,16 @@ declare const storefrontStoreSchema: z.ZodObject<{
|
|
|
2959
3238
|
naver: "naver";
|
|
2960
3239
|
google: "google";
|
|
2961
3240
|
}>>;
|
|
3241
|
+
checkoutAvailable: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
3242
|
+
checkoutMode: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
3243
|
+
LIVE: "LIVE";
|
|
3244
|
+
TEST: "TEST";
|
|
3245
|
+
}>>>>;
|
|
3246
|
+
checkoutUnavailableReason: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
3247
|
+
PAYMENT_NOT_CONFIGURED: "PAYMENT_NOT_CONFIGURED";
|
|
3248
|
+
PAYMENT_NOT_LIVE: "PAYMENT_NOT_LIVE";
|
|
3249
|
+
}>>>>;
|
|
2962
3250
|
}, z.core.$strip>;
|
|
2963
3251
|
type StorefrontStore = z.infer<typeof storefrontStoreSchema>;
|
|
2964
3252
|
//#endregion
|
|
2965
|
-
export {
|
|
3253
|
+
export { CreateReviewRequest as $, cashReceiptAvailable as $n, productCardFulfillmentSchema as $r, myCouponSchema as $t, ANALYTICS_MAX_BATCH_BYTES as A, CheckoutDelivery as An, ProductSearchParams as Ar, publicInquirySchema as At, analyticsBatchSchema as B, PAYMENT_STATUS_VALUES as Bn, PageInfo as Br, CouponApplication as Bt, PurchaseDecisionResult as C, createClaimResultSchema as Cn, shippingAddressInputSchema as Cr, updateProfileRequestSchema as Ct, orderShippingAddressSchema as D, CashReceiptIdentityType as Dn, ProductDetail as Dr, PublicInquiry as Dt, myOrderSchema as E, CASH_RECEIPT_METHODS as En, ProductCard as Er, CreateInquiryResult as Et, AnalyticsBatch as F, EasyPayProvider as Fn, productFacetsSchema as Fr, customerInquiryCategorySchema as Ft, StorefrontClient as G, PaymentStart as Gn, pageSchema as Gr, applicableCouponSchema as Gt, analyticsClientEventSchema as H, PaymentMessage as Hn, claimStatusSchema as Hr, MAX_COUPONS_PER_CHECKOUT as Ht, AnalyticsClientEvent as I, GuestInfo as In, productPageSchema as Ir, customerInquirySchema as It, STOREFRONT_SESSION_KEYS as J, RemoteArea as Jn, ProductCardFulfillment as Jr, couponApplicationListSchema as Jt, StorefrontClientOptions as K, PaymentStatus as Kn, LineFulfillment as Kr, checkoutPricingRequestSchema as Kt, AnalyticsClientEventName as L, KnownPaymentResult as Ln, productSortSchema as Lr, ApplicableCoupon as Lt, ANALYTICS_SESSION_HEADER as M, CreateCheckoutRequest as Mn, categoryNodeSchema as Mr, CustomerInquiry as Mt, ANALYTICS_VISITOR_COOKIE as N, DeliveryQuoteRequest as Nn, productCardSchema as Nr, CustomerInquiryCategory as Nt, purchaseDecisionResultSchema as O, CashReceiptRequest as On, ProductFacets as Or, createInquiryRequestSchema as Ot, ANALYTICS_VISITOR_HEADER as P, DeliveryQuoteResult as Pn, productDetailSchema as Pr, createCustomerInquiryRequestSchema as Pt, createStorefrontSession as Q, availablePaymentOptionSchema as Qn, myOrderItemFulfillmentSnapshotSchema as Qr, myCouponListQuerySchema as Qt, AnalyticsEventName as R, KnownPaymentStatus as Rn, ClaimStatus as Rr, CheckoutPricing as Rt, OrderShippingAddress as S, createClaimRequestSchema as Sn, retryPaymentRequestSchema as Sr, memberSchema as St, myOrderItemSchema as T, AvailablePaymentOption as Tn, CategoryNode as Tr, CreateInquiryRequest as Tt, analyticsIdSchema as U, PaymentMethod as Un, orderItemStatusSchema as Ur, MIN_PAYMENT_AMOUNT as Ut, analyticsClientEventNameSchema as V, PaymentFailureCategory as Vn, PageParams as Vr, CouponResult as Vt, analyticsServerEventNameSchema as W, PaymentOption as Wn, pageInfoSchema as Wr, MyCoupon as Wt, StorefrontSession as X, ShippingAddressInput as Xn, UnknownFulfillmentView as Xr, couponBenefitViewSchema as Xt, SessionStorage as Y, RetryPaymentRequest as Yn, ProductFulfillmentView as Yr, couponApplicationSchema as Yt, StorefrontSessionOptions as Z, StartPaymentRequest as Zn, lineFulfillmentSchema as Zr, couponResultSchema as Zt, normalizeCustomInputValue as _, CreateClaimResult as _n, paymentStartSchema as _r, MemberAddressRequest as _t, CustomInputEntry as a, addCartItemRequestSchema as ai, ConsentUpdateRequest as an, createCheckoutRequestSchema as ar, UpdateReviewResult as at, MyOrder as b, claimReturnAddressSchema as bn, remoteAreaSchema as br, memberAddressRequestSchema as bt, OptionSelectionView as c, updateCartItemRequestSchema as ci, consentKindSchema as cn, easyPayProviderResponseSchema as cr, createReviewResultSchema as ct, customInputEntrySchema as d, consentUpdateRequestSchema as dn, paymentFailureCategorySchema as dr, reviewSummarySchema as dt, productFulfillmentViewSchema as ei, pricingAmountsSchema as en, cashReceiptIdentityTypeOf as er, CreateReviewResult as et, customInputLength as f, memberConsentsSchema as fn, paymentMessageSchema as fr, updateReviewRequestSchema as ft, lineSelectionResponseShape as g, CreateClaimRequest as gn, paymentOptionSchema as gr, MemberAddress as gt, lineSelectionRequestShape as h, ClaimType as hn, paymentOptionListSchema as hr, Member as ht, AddonSelection as i, UpdateCartItemRequest as ii, ConsentState as in, checkoutSessionSchema as ir, UpdateReviewRequest as it, ANALYTICS_SESSION_COOKIE as j, CheckoutSession as jn, ProductSort as jr, CreateCustomerInquiryRequest as jt, trackingStageResponseSchema as k, CashReceiptType as kn, ProductPage as kr, createInquiryResultSchema as kt, addonGroupViewSchema as l, analyticsIdsFromCookie as li, consentSourceSchema as ln, easyPayProviderSchema as lr, publicReviewSchema as lt, customInputViewSchema as m, ClaimReturnAddress as mn, paymentOptionKey as mr, writableReviewSchema as mt, storefrontStoreSchema as n, Cart as ni, ConsentKind as nn, cashReceiptTypeSchema as nr, ReviewPage as nt, CustomInputValueView as o, cartItemSchema as oi, MemberConsents as on, deliveryQuoteRequestSchema as or, WritableReview as ot, customInputValueViewSchema as p, ClaimReason as pn, paymentMethodSchema as pr, updateReviewResultSchema as pt, createStorefrontClient as q, PgProvider as qn, MyOrderItemFulfillmentSnapshot as qr, checkoutPricingSchema as qt, AddonGroupView as r, CartItem as ri, ConsentSource as rn, checkoutDeliverySchema as rr, ReviewSummary as rt, CustomInputView as s, cartSchema as si, consentActionSchema as sn, deliveryQuoteSchema as sr, createReviewRequestSchema as st, StorefrontStore as t, AddCartItemRequest as ti, ConsentAction as tn, cashReceiptRequestSchema as tr, PublicReview as tt, addonSelectionSchema as u, consentStateSchema as un, guestInfoSchema as ur, reviewPageSchema as ut, optionSelectionViewSchema as v, MyClaim as vn, paymentStatusSchema as vr, UpdateProfileRequest as vt, deliveryTrackingSchema as w, myClaimSchema as wn, startPaymentRequestSchema as wr, wishlistAddResultSchema as wt, MyOrderItem as x, claimTypeSchema as xn, residentNumberLike as xr, memberAddressSchema as xt, DeliveryTracking as y, claimReasonSchema as yn, pgProviderSchema as yr, WishlistAddResult as yt, AnalyticsServerEventName as z, PAYMENT_RESULT_VALUES as zn, OrderItemStatus as zr, CheckoutPricingRequest as zt };
|