@sayren/storefront-sdk 0.16.0 → 0.17.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-CBAgQuTc.mjs} +10 -3
- package/dist/{index-BeQwCRc8.d.mts → index-BsHuMzBD.d.mts} +350 -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
|
@@ -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
|
|
@@ -1759,6 +1838,23 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1759
1838
|
additionalPrice: number;
|
|
1760
1839
|
soldOut: boolean;
|
|
1761
1840
|
}[];
|
|
1841
|
+
addonGroups: {
|
|
1842
|
+
groupId: string;
|
|
1843
|
+
name: string;
|
|
1844
|
+
required: boolean;
|
|
1845
|
+
values: {
|
|
1846
|
+
valueId: string;
|
|
1847
|
+
name: string;
|
|
1848
|
+
additionalPrice: number;
|
|
1849
|
+
}[];
|
|
1850
|
+
}[];
|
|
1851
|
+
customInputs: {
|
|
1852
|
+
inputId: string;
|
|
1853
|
+
label: string;
|
|
1854
|
+
placeholder: string | null;
|
|
1855
|
+
maxLength: number;
|
|
1856
|
+
required: boolean;
|
|
1857
|
+
}[];
|
|
1762
1858
|
fulfillment: UnknownFulfillmentView | {
|
|
1763
1859
|
type: "SHIPPING";
|
|
1764
1860
|
requiresShipping: true;
|
|
@@ -1831,12 +1927,6 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1831
1927
|
cart: {
|
|
1832
1928
|
get: () => Promise<{
|
|
1833
1929
|
items: {
|
|
1834
|
-
cartItemId: string;
|
|
1835
|
-
productId: string;
|
|
1836
|
-
productName: string;
|
|
1837
|
-
thumbnailUrl: string | null;
|
|
1838
|
-
optionId: string | null;
|
|
1839
|
-
optionName: string | null;
|
|
1840
1930
|
quantity: number;
|
|
1841
1931
|
unitPrice: number;
|
|
1842
1932
|
totalPrice: number;
|
|
@@ -1847,6 +1937,22 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1847
1937
|
};
|
|
1848
1938
|
purchasable: boolean;
|
|
1849
1939
|
unpurchasableReason: "SOLD_OUT" | "SUSPENDED" | "CLOSED" | null;
|
|
1940
|
+
optionSelections: {
|
|
1941
|
+
kind: string;
|
|
1942
|
+
groupName: string;
|
|
1943
|
+
valueName: string;
|
|
1944
|
+
additionalPrice: number;
|
|
1945
|
+
}[];
|
|
1946
|
+
customInputs: {
|
|
1947
|
+
label: string;
|
|
1948
|
+
value: string;
|
|
1949
|
+
}[];
|
|
1950
|
+
cartItemId: string;
|
|
1951
|
+
productId: string;
|
|
1952
|
+
productName: string;
|
|
1953
|
+
thumbnailUrl: string | null;
|
|
1954
|
+
optionId: string | null;
|
|
1955
|
+
optionName: string | null;
|
|
1850
1956
|
}[];
|
|
1851
1957
|
summary: {
|
|
1852
1958
|
productAmount: number;
|
|
@@ -1857,12 +1963,6 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1857
1963
|
}>;
|
|
1858
1964
|
addItem: (body: AddCartItemRequest) => Promise<{
|
|
1859
1965
|
items: {
|
|
1860
|
-
cartItemId: string;
|
|
1861
|
-
productId: string;
|
|
1862
|
-
productName: string;
|
|
1863
|
-
thumbnailUrl: string | null;
|
|
1864
|
-
optionId: string | null;
|
|
1865
|
-
optionName: string | null;
|
|
1866
1966
|
quantity: number;
|
|
1867
1967
|
unitPrice: number;
|
|
1868
1968
|
totalPrice: number;
|
|
@@ -1873,6 +1973,22 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1873
1973
|
};
|
|
1874
1974
|
purchasable: boolean;
|
|
1875
1975
|
unpurchasableReason: "SOLD_OUT" | "SUSPENDED" | "CLOSED" | null;
|
|
1976
|
+
optionSelections: {
|
|
1977
|
+
kind: string;
|
|
1978
|
+
groupName: string;
|
|
1979
|
+
valueName: string;
|
|
1980
|
+
additionalPrice: number;
|
|
1981
|
+
}[];
|
|
1982
|
+
customInputs: {
|
|
1983
|
+
label: string;
|
|
1984
|
+
value: string;
|
|
1985
|
+
}[];
|
|
1986
|
+
cartItemId: string;
|
|
1987
|
+
productId: string;
|
|
1988
|
+
productName: string;
|
|
1989
|
+
thumbnailUrl: string | null;
|
|
1990
|
+
optionId: string | null;
|
|
1991
|
+
optionName: string | null;
|
|
1876
1992
|
}[];
|
|
1877
1993
|
summary: {
|
|
1878
1994
|
productAmount: number;
|
|
@@ -1883,12 +1999,6 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1883
1999
|
}>;
|
|
1884
2000
|
updateItem: (cartItemId: string, body: UpdateCartItemRequest) => Promise<{
|
|
1885
2001
|
items: {
|
|
1886
|
-
cartItemId: string;
|
|
1887
|
-
productId: string;
|
|
1888
|
-
productName: string;
|
|
1889
|
-
thumbnailUrl: string | null;
|
|
1890
|
-
optionId: string | null;
|
|
1891
|
-
optionName: string | null;
|
|
1892
2002
|
quantity: number;
|
|
1893
2003
|
unitPrice: number;
|
|
1894
2004
|
totalPrice: number;
|
|
@@ -1899,6 +2009,22 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1899
2009
|
};
|
|
1900
2010
|
purchasable: boolean;
|
|
1901
2011
|
unpurchasableReason: "SOLD_OUT" | "SUSPENDED" | "CLOSED" | null;
|
|
2012
|
+
optionSelections: {
|
|
2013
|
+
kind: string;
|
|
2014
|
+
groupName: string;
|
|
2015
|
+
valueName: string;
|
|
2016
|
+
additionalPrice: number;
|
|
2017
|
+
}[];
|
|
2018
|
+
customInputs: {
|
|
2019
|
+
label: string;
|
|
2020
|
+
value: string;
|
|
2021
|
+
}[];
|
|
2022
|
+
cartItemId: string;
|
|
2023
|
+
productId: string;
|
|
2024
|
+
productName: string;
|
|
2025
|
+
thumbnailUrl: string | null;
|
|
2026
|
+
optionId: string | null;
|
|
2027
|
+
optionName: string | null;
|
|
1902
2028
|
}[];
|
|
1903
2029
|
summary: {
|
|
1904
2030
|
productAmount: number;
|
|
@@ -1913,10 +2039,6 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1913
2039
|
create: (body: CreateCheckoutRequest) => Promise<{
|
|
1914
2040
|
checkoutId: string;
|
|
1915
2041
|
items: {
|
|
1916
|
-
productId: string;
|
|
1917
|
-
productName: string;
|
|
1918
|
-
optionId: string | null;
|
|
1919
|
-
optionName: string | null;
|
|
1920
2042
|
quantity: number;
|
|
1921
2043
|
unitPrice: number;
|
|
1922
2044
|
totalPrice: number;
|
|
@@ -1925,6 +2047,21 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1925
2047
|
requiresShipping: boolean;
|
|
1926
2048
|
withdrawalRestricted?: boolean | undefined;
|
|
1927
2049
|
};
|
|
2050
|
+
optionSelections: {
|
|
2051
|
+
kind: string;
|
|
2052
|
+
groupName: string;
|
|
2053
|
+
valueName: string;
|
|
2054
|
+
additionalPrice: number;
|
|
2055
|
+
}[];
|
|
2056
|
+
customInputs: {
|
|
2057
|
+
label: string;
|
|
2058
|
+
value: string;
|
|
2059
|
+
}[];
|
|
2060
|
+
productId: string;
|
|
2061
|
+
productName: string;
|
|
2062
|
+
optionId: string | null;
|
|
2063
|
+
optionName: string | null;
|
|
2064
|
+
lineId?: string | undefined;
|
|
1928
2065
|
}[];
|
|
1929
2066
|
amounts: {
|
|
1930
2067
|
productAmount: number;
|
|
@@ -2078,10 +2215,12 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2078
2215
|
discountAmount: number;
|
|
2079
2216
|
rejectReason: string | null;
|
|
2080
2217
|
optionId: string | null;
|
|
2218
|
+
lineId: string | null;
|
|
2081
2219
|
}[];
|
|
2082
2220
|
items: {
|
|
2083
2221
|
optionId: string | null;
|
|
2084
2222
|
couponDiscountAmount: number;
|
|
2223
|
+
lineId?: string | undefined;
|
|
2085
2224
|
}[];
|
|
2086
2225
|
payable: boolean;
|
|
2087
2226
|
}>;
|
|
@@ -2184,17 +2323,12 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2184
2323
|
orderId: string;
|
|
2185
2324
|
orderedAt: string;
|
|
2186
2325
|
items: {
|
|
2187
|
-
orderItemId: string;
|
|
2188
|
-
productId: string;
|
|
2189
|
-
productName: string;
|
|
2190
|
-
thumbnailUrl: string | null;
|
|
2191
|
-
optionName: string | null;
|
|
2192
2326
|
quantity: number;
|
|
2193
2327
|
canceledQuantity: number;
|
|
2194
2328
|
activeQuantity: number;
|
|
2195
2329
|
totalPrice: number;
|
|
2196
2330
|
couponDiscountAmount: number;
|
|
2197
|
-
status: "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED"
|
|
2331
|
+
status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
|
|
2198
2332
|
fulfillmentSnapshot: UnknownFulfillmentView | {
|
|
2199
2333
|
type: "SHIPPING";
|
|
2200
2334
|
requiresShipping: true;
|
|
@@ -2210,6 +2344,21 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2210
2344
|
claimStatus: string | null;
|
|
2211
2345
|
reviewWritten: boolean;
|
|
2212
2346
|
autoDecisionDate: string | null;
|
|
2347
|
+
optionSelections: {
|
|
2348
|
+
kind: string;
|
|
2349
|
+
groupName: string;
|
|
2350
|
+
valueName: string;
|
|
2351
|
+
additionalPrice: number;
|
|
2352
|
+
}[];
|
|
2353
|
+
customInputs: {
|
|
2354
|
+
label: string;
|
|
2355
|
+
value: string;
|
|
2356
|
+
}[];
|
|
2357
|
+
orderItemId: string;
|
|
2358
|
+
productId: string;
|
|
2359
|
+
productName: string;
|
|
2360
|
+
thumbnailUrl: string | null;
|
|
2361
|
+
optionName: string | null;
|
|
2213
2362
|
}[];
|
|
2214
2363
|
requiresShipping: boolean;
|
|
2215
2364
|
shippingAddress: {
|
|
@@ -2243,17 +2392,12 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2243
2392
|
orderId: string;
|
|
2244
2393
|
orderedAt: string;
|
|
2245
2394
|
items: {
|
|
2246
|
-
orderItemId: string;
|
|
2247
|
-
productId: string;
|
|
2248
|
-
productName: string;
|
|
2249
|
-
thumbnailUrl: string | null;
|
|
2250
|
-
optionName: string | null;
|
|
2251
2395
|
quantity: number;
|
|
2252
2396
|
canceledQuantity: number;
|
|
2253
2397
|
activeQuantity: number;
|
|
2254
2398
|
totalPrice: number;
|
|
2255
2399
|
couponDiscountAmount: number;
|
|
2256
|
-
status: "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED"
|
|
2400
|
+
status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
|
|
2257
2401
|
fulfillmentSnapshot: UnknownFulfillmentView | {
|
|
2258
2402
|
type: "SHIPPING";
|
|
2259
2403
|
requiresShipping: true;
|
|
@@ -2269,6 +2413,21 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2269
2413
|
claimStatus: string | null;
|
|
2270
2414
|
reviewWritten: boolean;
|
|
2271
2415
|
autoDecisionDate: string | null;
|
|
2416
|
+
optionSelections: {
|
|
2417
|
+
kind: string;
|
|
2418
|
+
groupName: string;
|
|
2419
|
+
valueName: string;
|
|
2420
|
+
additionalPrice: number;
|
|
2421
|
+
}[];
|
|
2422
|
+
customInputs: {
|
|
2423
|
+
label: string;
|
|
2424
|
+
value: string;
|
|
2425
|
+
}[];
|
|
2426
|
+
orderItemId: string;
|
|
2427
|
+
productId: string;
|
|
2428
|
+
productName: string;
|
|
2429
|
+
thumbnailUrl: string | null;
|
|
2430
|
+
optionName: string | null;
|
|
2272
2431
|
}[];
|
|
2273
2432
|
requiresShipping: boolean;
|
|
2274
2433
|
shippingAddress: {
|
|
@@ -2313,17 +2472,12 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2313
2472
|
orderId: string;
|
|
2314
2473
|
orderedAt: string;
|
|
2315
2474
|
items: {
|
|
2316
|
-
orderItemId: string;
|
|
2317
|
-
productId: string;
|
|
2318
|
-
productName: string;
|
|
2319
|
-
thumbnailUrl: string | null;
|
|
2320
|
-
optionName: string | null;
|
|
2321
2475
|
quantity: number;
|
|
2322
2476
|
canceledQuantity: number;
|
|
2323
2477
|
activeQuantity: number;
|
|
2324
2478
|
totalPrice: number;
|
|
2325
2479
|
couponDiscountAmount: number;
|
|
2326
|
-
status: "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED"
|
|
2480
|
+
status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
|
|
2327
2481
|
fulfillmentSnapshot: UnknownFulfillmentView | {
|
|
2328
2482
|
type: "SHIPPING";
|
|
2329
2483
|
requiresShipping: true;
|
|
@@ -2339,6 +2493,21 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2339
2493
|
claimStatus: string | null;
|
|
2340
2494
|
reviewWritten: boolean;
|
|
2341
2495
|
autoDecisionDate: string | null;
|
|
2496
|
+
optionSelections: {
|
|
2497
|
+
kind: string;
|
|
2498
|
+
groupName: string;
|
|
2499
|
+
valueName: string;
|
|
2500
|
+
additionalPrice: number;
|
|
2501
|
+
}[];
|
|
2502
|
+
customInputs: {
|
|
2503
|
+
label: string;
|
|
2504
|
+
value: string;
|
|
2505
|
+
}[];
|
|
2506
|
+
orderItemId: string;
|
|
2507
|
+
productId: string;
|
|
2508
|
+
productName: string;
|
|
2509
|
+
thumbnailUrl: string | null;
|
|
2510
|
+
optionName: string | null;
|
|
2342
2511
|
}[];
|
|
2343
2512
|
requiresShipping: boolean;
|
|
2344
2513
|
shippingAddress: {
|
|
@@ -2404,7 +2573,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2404
2573
|
contents: {
|
|
2405
2574
|
claimId: string;
|
|
2406
2575
|
type: "CANCEL" | "RETURN" | "EXCHANGE";
|
|
2407
|
-
status: "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "REJECTED" | "
|
|
2576
|
+
status: "COMPLETED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "REJECTED" | "WITHDRAWN";
|
|
2408
2577
|
orderItemId: string;
|
|
2409
2578
|
productName: string;
|
|
2410
2579
|
quantity: number;
|
|
@@ -2771,17 +2940,13 @@ declare const ANALYTICS_MAX_BATCH_BYTES: number;
|
|
|
2771
2940
|
//#endregion
|
|
2772
2941
|
//#region src/schemas/order.d.ts
|
|
2773
2942
|
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
2943
|
quantity: z.ZodNumber;
|
|
2780
2944
|
canceledQuantity: z.ZodNumber;
|
|
2781
2945
|
activeQuantity: z.ZodNumber;
|
|
2782
2946
|
totalPrice: z.ZodNumber;
|
|
2783
2947
|
couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
2784
2948
|
status: z.ZodEnum<{
|
|
2949
|
+
CANCELED: "CANCELED";
|
|
2785
2950
|
PAYMENT_WAITING: "PAYMENT_WAITING";
|
|
2786
2951
|
PAID: "PAID";
|
|
2787
2952
|
CONFIRMED: "CONFIRMED";
|
|
@@ -2789,7 +2954,6 @@ declare const myOrderItemSchema: z.ZodObject<{
|
|
|
2789
2954
|
DELIVERING: "DELIVERING";
|
|
2790
2955
|
DELIVERED: "DELIVERED";
|
|
2791
2956
|
PURCHASE_DECIDED: "PURCHASE_DECIDED";
|
|
2792
|
-
CANCELED: "CANCELED";
|
|
2793
2957
|
}>;
|
|
2794
2958
|
fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2795
2959
|
type: z.ZodLiteral<"SHIPPING">;
|
|
@@ -2813,6 +2977,21 @@ declare const myOrderItemSchema: z.ZodObject<{
|
|
|
2813
2977
|
claimStatus: z.ZodNullable<z.ZodString>;
|
|
2814
2978
|
reviewWritten: z.ZodBoolean;
|
|
2815
2979
|
autoDecisionDate: z.ZodNullable<z.ZodString>;
|
|
2980
|
+
optionSelections: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2981
|
+
kind: z.ZodString;
|
|
2982
|
+
groupName: z.ZodString;
|
|
2983
|
+
valueName: z.ZodString;
|
|
2984
|
+
additionalPrice: z.ZodNumber;
|
|
2985
|
+
}, z.core.$strip>>>>;
|
|
2986
|
+
customInputs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2987
|
+
label: z.ZodString;
|
|
2988
|
+
value: z.ZodString;
|
|
2989
|
+
}, z.core.$strip>>>>;
|
|
2990
|
+
orderItemId: z.ZodString;
|
|
2991
|
+
productId: z.ZodString;
|
|
2992
|
+
productName: z.ZodString;
|
|
2993
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
2994
|
+
optionName: z.ZodNullable<z.ZodString>;
|
|
2816
2995
|
}, z.core.$strip>;
|
|
2817
2996
|
type MyOrderItem = z.infer<typeof myOrderItemSchema>;
|
|
2818
2997
|
/**
|
|
@@ -2833,17 +3012,13 @@ declare const myOrderSchema: z.ZodObject<{
|
|
|
2833
3012
|
orderId: z.ZodString;
|
|
2834
3013
|
orderedAt: z.ZodString;
|
|
2835
3014
|
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
3015
|
quantity: z.ZodNumber;
|
|
2842
3016
|
canceledQuantity: z.ZodNumber;
|
|
2843
3017
|
activeQuantity: z.ZodNumber;
|
|
2844
3018
|
totalPrice: z.ZodNumber;
|
|
2845
3019
|
couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
2846
3020
|
status: z.ZodEnum<{
|
|
3021
|
+
CANCELED: "CANCELED";
|
|
2847
3022
|
PAYMENT_WAITING: "PAYMENT_WAITING";
|
|
2848
3023
|
PAID: "PAID";
|
|
2849
3024
|
CONFIRMED: "CONFIRMED";
|
|
@@ -2851,7 +3026,6 @@ declare const myOrderSchema: z.ZodObject<{
|
|
|
2851
3026
|
DELIVERING: "DELIVERING";
|
|
2852
3027
|
DELIVERED: "DELIVERED";
|
|
2853
3028
|
PURCHASE_DECIDED: "PURCHASE_DECIDED";
|
|
2854
|
-
CANCELED: "CANCELED";
|
|
2855
3029
|
}>;
|
|
2856
3030
|
fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2857
3031
|
type: z.ZodLiteral<"SHIPPING">;
|
|
@@ -2875,6 +3049,21 @@ declare const myOrderSchema: z.ZodObject<{
|
|
|
2875
3049
|
claimStatus: z.ZodNullable<z.ZodString>;
|
|
2876
3050
|
reviewWritten: z.ZodBoolean;
|
|
2877
3051
|
autoDecisionDate: z.ZodNullable<z.ZodString>;
|
|
3052
|
+
optionSelections: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3053
|
+
kind: z.ZodString;
|
|
3054
|
+
groupName: z.ZodString;
|
|
3055
|
+
valueName: z.ZodString;
|
|
3056
|
+
additionalPrice: z.ZodNumber;
|
|
3057
|
+
}, z.core.$strip>>>>;
|
|
3058
|
+
customInputs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3059
|
+
label: z.ZodString;
|
|
3060
|
+
value: z.ZodString;
|
|
3061
|
+
}, z.core.$strip>>>>;
|
|
3062
|
+
orderItemId: z.ZodString;
|
|
3063
|
+
productId: z.ZodString;
|
|
3064
|
+
productName: z.ZodString;
|
|
3065
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
3066
|
+
optionName: z.ZodNullable<z.ZodString>;
|
|
2878
3067
|
}, z.core.$strip>>;
|
|
2879
3068
|
requiresShipping: z.ZodBoolean;
|
|
2880
3069
|
shippingAddress: z.ZodObject<{
|
|
@@ -2942,6 +3131,93 @@ declare const purchaseDecisionResultSchema: z.ZodObject<{
|
|
|
2942
3131
|
}, z.core.$strip>;
|
|
2943
3132
|
type PurchaseDecisionResult = z.infer<typeof purchaseDecisionResultSchema>;
|
|
2944
3133
|
//#endregion
|
|
3134
|
+
//#region src/schemas/product-options.d.ts
|
|
3135
|
+
/**
|
|
3136
|
+
* 추가 선택·직접 입력 (이슈 #59) — 상품 상세의 옵션 표시, 장바구니 담기·바로 구매 요청, 줄 스냅샷의 공통 모양.
|
|
3137
|
+
*
|
|
3138
|
+
* 추가 선택은 재고가 없는 옵션이다. 구매자가 조합(옵션이 없으면 상품)을 고른 뒤 옵션명마다 값 하나를 더 고르고, 값의 추가금이
|
|
3139
|
+
* 단가에 더해진다. 직접 입력은 구매자가 글자를 적는 항목(각인 문구 등)이다. 추가 선택 값이나 직접 입력값이 다르면 장바구니에서 다른 줄이다.
|
|
3140
|
+
*/
|
|
3141
|
+
declare const addonGroupViewSchema: z.ZodObject<{
|
|
3142
|
+
groupId: z.ZodString;
|
|
3143
|
+
name: z.ZodString;
|
|
3144
|
+
required: z.ZodBoolean;
|
|
3145
|
+
values: z.ZodArray<z.ZodObject<{
|
|
3146
|
+
valueId: z.ZodString;
|
|
3147
|
+
name: z.ZodString;
|
|
3148
|
+
additionalPrice: z.ZodNumber;
|
|
3149
|
+
}, z.core.$strip>>;
|
|
3150
|
+
}, z.core.$strip>;
|
|
3151
|
+
type AddonGroupView = z.infer<typeof addonGroupViewSchema>;
|
|
3152
|
+
declare const customInputViewSchema: z.ZodObject<{
|
|
3153
|
+
inputId: z.ZodString;
|
|
3154
|
+
label: z.ZodString;
|
|
3155
|
+
placeholder: z.ZodNullable<z.ZodString>;
|
|
3156
|
+
maxLength: z.ZodNumber;
|
|
3157
|
+
required: z.ZodBoolean;
|
|
3158
|
+
}, z.core.$strip>;
|
|
3159
|
+
type CustomInputView = z.infer<typeof customInputViewSchema>;
|
|
3160
|
+
/**
|
|
3161
|
+
* 직접 입력값 정규화 — NFC로 모으고, 제어 문자(C0·C1·줄바꿈·줄·문단 구분자)는 공백으로, 제로폭·양방향 제어 문자는 지운 뒤
|
|
3162
|
+
* 앞뒤 공백을 지운다. 서버가 저장하는 값이 이것이다. 빈 문자열이면 입력하지 않은 것으로 본다.
|
|
3163
|
+
* (양방향 제어 문자를 두면 셀러 주문 화면의 각인 문구가 뒤집혀 보이게 할 수 있다.)
|
|
3164
|
+
*/
|
|
3165
|
+
declare function normalizeCustomInputValue(value: string): string;
|
|
3166
|
+
/**
|
|
3167
|
+
* 직접 입력값의 글자 수 — 정규화한 값의 **코드 포인트 수**다(이모지 하나가 1자). 서버의 최대 글자 수 판정(`CUSTOM_INPUT_TOO_LONG`)과
|
|
3168
|
+
* 스토어프론트·콘솔의 글자 수 표시가 이 함수 하나를 쓴다. `String.length`(UTF-16)로 세면 이모지가 2자로 세어 판정이 갈린다.
|
|
3169
|
+
*/
|
|
3170
|
+
declare function customInputLength(value: string): number;
|
|
3171
|
+
/** 담기·바로 구매 요청의 직접 입력값 한 칸. 앞뒤 공백을 지우고, 빈 값은 입력하지 않은 것으로 본다 */
|
|
3172
|
+
declare const customInputEntrySchema: z.ZodObject<{
|
|
3173
|
+
inputId: z.ZodString;
|
|
3174
|
+
value: z.ZodString;
|
|
3175
|
+
}, z.core.$strip>;
|
|
3176
|
+
type CustomInputEntry = z.infer<typeof customInputEntrySchema>;
|
|
3177
|
+
/** 고른 추가 선택 한 칸 — 옵션명(`groupId`)과 그 옵션명의 값(`valueId`) */
|
|
3178
|
+
declare const addonSelectionSchema: z.ZodObject<{
|
|
3179
|
+
groupId: z.ZodString;
|
|
3180
|
+
valueId: z.ZodString;
|
|
3181
|
+
}, z.core.$strip>;
|
|
3182
|
+
type AddonSelection = z.infer<typeof addonSelectionSchema>;
|
|
3183
|
+
/** 요청의 추가 선택·직접 입력 필드 — 담기·장바구니 수정·바로 구매가 같은 이름을 쓴다 */
|
|
3184
|
+
declare const lineSelectionRequestShape: {
|
|
3185
|
+
addons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3186
|
+
groupId: z.ZodString;
|
|
3187
|
+
valueId: z.ZodString;
|
|
3188
|
+
}, z.core.$strip>>>;
|
|
3189
|
+
customInputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3190
|
+
inputId: z.ZodString;
|
|
3191
|
+
value: z.ZodString;
|
|
3192
|
+
}, z.core.$strip>>>;
|
|
3193
|
+
};
|
|
3194
|
+
/** 줄의 옵션 선택 스냅샷 한 칸 — 조합 옵션은 옵션명마다 한 칸이고 추가금이 0이다(조합 추가금은 단가에 들어 있다) */
|
|
3195
|
+
declare const optionSelectionViewSchema: z.ZodObject<{
|
|
3196
|
+
kind: z.ZodString;
|
|
3197
|
+
groupName: z.ZodString;
|
|
3198
|
+
valueName: z.ZodString;
|
|
3199
|
+
additionalPrice: z.ZodNumber;
|
|
3200
|
+
}, z.core.$strip>;
|
|
3201
|
+
type OptionSelectionView = z.infer<typeof optionSelectionViewSchema>;
|
|
3202
|
+
declare const customInputValueViewSchema: z.ZodObject<{
|
|
3203
|
+
label: z.ZodString;
|
|
3204
|
+
value: z.ZodString;
|
|
3205
|
+
}, z.core.$strip>;
|
|
3206
|
+
type CustomInputValueView = z.infer<typeof customInputValueViewSchema>;
|
|
3207
|
+
/** 응답 줄의 표시 필드 — 장바구니·주문서·주문상품이 같은 이름을 쓴다 */
|
|
3208
|
+
declare const lineSelectionResponseShape: {
|
|
3209
|
+
optionSelections: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3210
|
+
kind: z.ZodString;
|
|
3211
|
+
groupName: z.ZodString;
|
|
3212
|
+
valueName: z.ZodString;
|
|
3213
|
+
additionalPrice: z.ZodNumber;
|
|
3214
|
+
}, z.core.$strip>>>>;
|
|
3215
|
+
customInputs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3216
|
+
label: z.ZodString;
|
|
3217
|
+
value: z.ZodString;
|
|
3218
|
+
}, z.core.$strip>>>>;
|
|
3219
|
+
};
|
|
3220
|
+
//#endregion
|
|
2945
3221
|
//#region src/schemas/store.d.ts
|
|
2946
3222
|
/**
|
|
2947
3223
|
* 스토어 공개 설정 — `GET /store`. 스토어프론트가 화면을 그릴 때 읽는 값만 담는다.
|
|
@@ -2962,4 +3238,4 @@ declare const storefrontStoreSchema: z.ZodObject<{
|
|
|
2962
3238
|
}, z.core.$strip>;
|
|
2963
3239
|
type StorefrontStore = z.infer<typeof storefrontStoreSchema>;
|
|
2964
3240
|
//#endregion
|
|
2965
|
-
export {
|
|
3241
|
+
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 };
|