@sayren/storefront-sdk 0.12.0 → 0.14.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-BeZKjYJz.mjs → checkout-wrCpR-P1.mjs} +165 -5
- package/dist/{client-DkyvDLXK.mjs → client-CUF2xGu8.mjs} +130 -46
- package/dist/{index-SXEtj3N5.d.mts → index-dIZNg-hO.d.mts} +698 -127
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/payments/index.d.mts +7 -2
- package/dist/payments/index.mjs +3 -1
- package/package.json +1 -1
- package/src/client.ts +89 -1
- package/src/index.ts +1 -0
- package/src/payments/index.ts +11 -1
- package/src/schemas/cart.ts +5 -0
- package/src/schemas/catalog.ts +5 -1
- package/src/schemas/checkout.ts +59 -2
- package/src/schemas/claim.ts +21 -2
- package/src/schemas/common.ts +30 -0
- package/src/schemas/coupon.ts +169 -0
- package/src/schemas/order.ts +162 -3
|
@@ -26,6 +26,7 @@ declare const cartItemSchema: z.ZodObject<{
|
|
|
26
26
|
quantity: z.ZodNumber;
|
|
27
27
|
unitPrice: z.ZodNumber;
|
|
28
28
|
totalPrice: z.ZodNumber;
|
|
29
|
+
fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
29
30
|
purchasable: z.ZodBoolean;
|
|
30
31
|
unpurchasableReason: z.ZodNullable<z.ZodEnum<{
|
|
31
32
|
SOLD_OUT: "SOLD_OUT";
|
|
@@ -45,6 +46,7 @@ declare const cartSchema: z.ZodObject<{
|
|
|
45
46
|
quantity: z.ZodNumber;
|
|
46
47
|
unitPrice: z.ZodNumber;
|
|
47
48
|
totalPrice: z.ZodNumber;
|
|
49
|
+
fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
48
50
|
purchasable: z.ZodBoolean;
|
|
49
51
|
unpurchasableReason: z.ZodNullable<z.ZodEnum<{
|
|
50
52
|
SOLD_OUT: "SOLD_OUT";
|
|
@@ -56,6 +58,7 @@ declare const cartSchema: z.ZodObject<{
|
|
|
56
58
|
productAmount: z.ZodNumber;
|
|
57
59
|
deliveryFee: z.ZodNumber;
|
|
58
60
|
totalAmount: z.ZodNumber;
|
|
61
|
+
requiresShipping: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
59
62
|
}, z.core.$strip>;
|
|
60
63
|
}, z.core.$strip>;
|
|
61
64
|
type Cart = z.infer<typeof cartSchema>;
|
|
@@ -113,6 +116,18 @@ declare const claimStatusSchema: z.ZodEnum<{
|
|
|
113
116
|
WITHDRAWN: "WITHDRAWN";
|
|
114
117
|
}>;
|
|
115
118
|
type ClaimStatus = z.infer<typeof claimStatusSchema>;
|
|
119
|
+
/**
|
|
120
|
+
* 상품 유형 (이슈 #48). 응답에서는 문자열로 받는다(값이 추가될 수 있다). 현재 값은 `SHIPPING`(배송 상품)·
|
|
121
|
+
* `DOWNLOAD`(파일 다운로드)·`CODE`(코드 발급)·`SERVICE`(이용권·서비스)·`PICKUP`(방문 수령)이다.
|
|
122
|
+
* 이 필드 이전 서버의 응답에는 없어 `SHIPPING`으로 읽는다. 서버는 항상 싣는다.
|
|
123
|
+
*/
|
|
124
|
+
declare const fulfillmentTypeField: () => z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
125
|
+
/**
|
|
126
|
+
* 배송 필요 여부 (이슈 #48). false면 배송지를 받지 않는다. 이 필드 이전 서버의 응답에는 없어 true로 읽는다.
|
|
127
|
+
*/
|
|
128
|
+
declare const requiresShippingField: (description: string) => z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
129
|
+
/** 배송이 필요한 상품 유형인가 — 배송 상품(`SHIPPING`)만 택배 배송이 있다. 모르는 값은 배송 상품으로 본다 */
|
|
130
|
+
declare function isShippingFulfillment(fulfillmentType: string | null | undefined): boolean;
|
|
116
131
|
//#endregion
|
|
117
132
|
//#region src/schemas/catalog.d.ts
|
|
118
133
|
interface CategoryNode {
|
|
@@ -130,6 +145,8 @@ declare const productCardSchema: z.ZodObject<{
|
|
|
130
145
|
discountedPrice: z.ZodNullable<z.ZodNumber>;
|
|
131
146
|
discountRate: z.ZodNullable<z.ZodNumber>;
|
|
132
147
|
freeShipping: z.ZodBoolean;
|
|
148
|
+
fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
149
|
+
requiresShipping: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
133
150
|
averageRating: z.ZodNumber;
|
|
134
151
|
reviewCount: z.ZodNumber;
|
|
135
152
|
soldOut: z.ZodBoolean;
|
|
@@ -143,6 +160,8 @@ declare const productDetailSchema: z.ZodObject<{
|
|
|
143
160
|
discountedPrice: z.ZodNullable<z.ZodNumber>;
|
|
144
161
|
discountRate: z.ZodNullable<z.ZodNumber>;
|
|
145
162
|
freeShipping: z.ZodBoolean;
|
|
163
|
+
fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
164
|
+
requiresShipping: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
146
165
|
averageRating: z.ZodNumber;
|
|
147
166
|
reviewCount: z.ZodNumber;
|
|
148
167
|
soldOut: z.ZodBoolean;
|
|
@@ -227,6 +246,8 @@ declare const productPageSchema: z.ZodObject<{
|
|
|
227
246
|
discountedPrice: z.ZodNullable<z.ZodNumber>;
|
|
228
247
|
discountRate: z.ZodNullable<z.ZodNumber>;
|
|
229
248
|
freeShipping: z.ZodBoolean;
|
|
249
|
+
fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
250
|
+
requiresShipping: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
230
251
|
averageRating: z.ZodNumber;
|
|
231
252
|
reviewCount: z.ZodNumber;
|
|
232
253
|
soldOut: z.ZodBoolean;
|
|
@@ -301,6 +322,8 @@ declare const checkoutSessionSchema: z.ZodObject<{
|
|
|
301
322
|
productAmount: z.ZodNumber;
|
|
302
323
|
deliveryFee: z.ZodNumber;
|
|
303
324
|
totalAmount: z.ZodNumber;
|
|
325
|
+
couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
326
|
+
deliveryDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
304
327
|
}, z.core.$strip>;
|
|
305
328
|
delivery: z.ZodObject<{
|
|
306
329
|
baseFee: z.ZodNumber;
|
|
@@ -315,6 +338,11 @@ declare const checkoutSessionSchema: z.ZodObject<{
|
|
|
315
338
|
freeByThreshold: z.ZodBoolean;
|
|
316
339
|
zipCode: z.ZodNullable<z.ZodString>;
|
|
317
340
|
}, z.core.$strip>;
|
|
341
|
+
requiresShipping: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
342
|
+
withdrawal: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
343
|
+
required: z.ZodBoolean;
|
|
344
|
+
notice: z.ZodNullable<z.ZodString>;
|
|
345
|
+
}, z.core.$strip>>>;
|
|
318
346
|
expiresAt: z.ZodString;
|
|
319
347
|
paymentOptions: z.ZodLazy<z.ZodPreprocess<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
320
348
|
pg: z.ZodEnum<{
|
|
@@ -374,6 +402,8 @@ declare const deliveryQuoteSchema: z.ZodObject<{
|
|
|
374
402
|
productAmount: z.ZodNumber;
|
|
375
403
|
deliveryFee: z.ZodNumber;
|
|
376
404
|
totalAmount: z.ZodNumber;
|
|
405
|
+
couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
406
|
+
deliveryDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
377
407
|
}, z.core.$strip>;
|
|
378
408
|
delivery: z.ZodObject<{
|
|
379
409
|
baseFee: z.ZodNumber;
|
|
@@ -667,7 +697,7 @@ declare const startPaymentRequestSchema: z.ZodObject<{
|
|
|
667
697
|
method: z.ZodLiteral<"MOBILE">;
|
|
668
698
|
}, z.core.$strip>], "method">;
|
|
669
699
|
returnUrl: z.ZodURL;
|
|
670
|
-
shippingAddress: z.ZodObject<{
|
|
700
|
+
shippingAddress: z.ZodOptional<z.ZodObject<{
|
|
671
701
|
addressId: z.ZodOptional<z.ZodString>;
|
|
672
702
|
receiverName: z.ZodString;
|
|
673
703
|
phone: z.ZodString;
|
|
@@ -676,13 +706,14 @@ declare const startPaymentRequestSchema: z.ZodObject<{
|
|
|
676
706
|
address2: z.ZodOptional<z.ZodString>;
|
|
677
707
|
deliveryMemo: z.ZodOptional<z.ZodString>;
|
|
678
708
|
entranceCode: z.ZodOptional<z.ZodString>;
|
|
679
|
-
}, z.core.$strip
|
|
709
|
+
}, z.core.$strip>>;
|
|
680
710
|
guest: z.ZodOptional<z.ZodObject<{
|
|
681
711
|
name: z.ZodString;
|
|
682
712
|
phone: z.ZodString;
|
|
683
713
|
email: z.ZodEmail;
|
|
684
714
|
orderPassword: z.ZodString;
|
|
685
715
|
}, z.core.$strip>>;
|
|
716
|
+
withdrawalAgreement: z.ZodOptional<z.ZodBoolean>;
|
|
686
717
|
cashReceipt: z.ZodOptional<z.ZodObject<{
|
|
687
718
|
type: z.ZodEnum<{
|
|
688
719
|
INCOME_DEDUCTION: "INCOME_DEDUCTION";
|
|
@@ -690,6 +721,11 @@ declare const startPaymentRequestSchema: z.ZodObject<{
|
|
|
690
721
|
}>;
|
|
691
722
|
identityNumber: z.ZodString;
|
|
692
723
|
}, z.core.$strip>>;
|
|
724
|
+
coupons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
725
|
+
issueId: z.ZodOptional<z.ZodString>;
|
|
726
|
+
code: z.ZodOptional<z.ZodString>;
|
|
727
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
728
|
+
}, z.core.$strip>>>;
|
|
693
729
|
}, z.core.$strip>;
|
|
694
730
|
type StartPaymentRequest = z.infer<typeof startPaymentRequestSchema>;
|
|
695
731
|
/**
|
|
@@ -792,6 +828,8 @@ declare const paymentStartSchema: z.ZodObject<{
|
|
|
792
828
|
productAmount: z.ZodNumber;
|
|
793
829
|
deliveryFee: z.ZodNumber;
|
|
794
830
|
totalAmount: z.ZodNumber;
|
|
831
|
+
couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
832
|
+
deliveryDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
795
833
|
}, z.core.$strip>;
|
|
796
834
|
delivery: z.ZodObject<{
|
|
797
835
|
baseFee: z.ZodNumber;
|
|
@@ -894,6 +932,8 @@ declare const createClaimResultSchema: z.ZodObject<{
|
|
|
894
932
|
claimDeliveryFee: z.ZodNumber;
|
|
895
933
|
quantity: z.ZodNumber;
|
|
896
934
|
deliveryFeeRefundAmount: z.ZodNumber;
|
|
935
|
+
couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
936
|
+
couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
897
937
|
}, z.core.$strip>;
|
|
898
938
|
type CreateClaimResult = z.infer<typeof createClaimResultSchema>;
|
|
899
939
|
/**
|
|
@@ -1051,6 +1091,152 @@ declare const consentUpdateRequestSchema: z.ZodObject<{
|
|
|
1051
1091
|
}, z.core.$strip>;
|
|
1052
1092
|
type ConsentUpdateRequest = z.infer<typeof consentUpdateRequestSchema>;
|
|
1053
1093
|
//#endregion
|
|
1094
|
+
//#region src/schemas/coupon.d.ts
|
|
1095
|
+
/**
|
|
1096
|
+
* 스토어프론트 쿠폰 계약 (이슈 #47).
|
|
1097
|
+
*
|
|
1098
|
+
* 구매자는 주문서에서 쿠폰을 고르거나 코드를 입력한다. 금액 미리보기(`POST /checkout/{checkoutId}/pricing`)는
|
|
1099
|
+
* 주문서를 바꾸지 않는 읽기 계산이고, **확정은 결제 시작(`coupons` 필드)만 한다** — 결제 시작이 쿠폰을 예약하고 그 금액으로
|
|
1100
|
+
* 결제 금액을 정한다. 결제가 실패하거나 만료되면 예약이 풀려 같은 쿠폰을 다시 쓸 수 있다.
|
|
1101
|
+
*
|
|
1102
|
+
* 한 주문에 주문 쿠폰 1장, 주문상품 한 줄에 상품 쿠폰 1장까지다. 같은 쿠폰을 두 번 쓸 수 없다.
|
|
1103
|
+
*/
|
|
1104
|
+
/** 적용할 쿠폰 한 장 — 발급 쿠폰 id 또는 코드 중 하나 */
|
|
1105
|
+
declare const couponApplicationSchema: z.ZodObject<{
|
|
1106
|
+
issueId: z.ZodOptional<z.ZodString>;
|
|
1107
|
+
code: z.ZodOptional<z.ZodString>;
|
|
1108
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
1109
|
+
}, z.core.$strip>;
|
|
1110
|
+
type CouponApplication = z.infer<typeof couponApplicationSchema>;
|
|
1111
|
+
/** 한 번에 적용할 수 있는 쿠폰 수 */
|
|
1112
|
+
declare const MAX_COUPONS_PER_CHECKOUT = 5;
|
|
1113
|
+
declare const couponApplicationListSchema: z.ZodArray<z.ZodObject<{
|
|
1114
|
+
issueId: z.ZodOptional<z.ZodString>;
|
|
1115
|
+
code: z.ZodOptional<z.ZodString>;
|
|
1116
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
1117
|
+
}, z.core.$strip>>;
|
|
1118
|
+
/** 쿠폰 혜택 — 응답 표시용. 값이 늘 수 있어 방식은 문자열이다 */
|
|
1119
|
+
declare const couponBenefitViewSchema: z.ZodObject<{
|
|
1120
|
+
type: z.ZodString;
|
|
1121
|
+
value: z.ZodNumber;
|
|
1122
|
+
maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
|
|
1123
|
+
}, z.core.$strip>;
|
|
1124
|
+
/** 쿠폰 한 장의 적용 결과 */
|
|
1125
|
+
declare const couponResultSchema: z.ZodObject<{
|
|
1126
|
+
couponId: z.ZodString;
|
|
1127
|
+
issueId: z.ZodNullable<z.ZodString>;
|
|
1128
|
+
code: z.ZodNullable<z.ZodString>;
|
|
1129
|
+
name: z.ZodString;
|
|
1130
|
+
kind: z.ZodString;
|
|
1131
|
+
benefit: z.ZodObject<{
|
|
1132
|
+
type: z.ZodString;
|
|
1133
|
+
value: z.ZodNumber;
|
|
1134
|
+
maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
|
|
1135
|
+
}, z.core.$strip>;
|
|
1136
|
+
applied: z.ZodBoolean;
|
|
1137
|
+
discountAmount: z.ZodNumber;
|
|
1138
|
+
rejectReason: z.ZodNullable<z.ZodString>;
|
|
1139
|
+
optionId: z.ZodNullable<z.ZodString>;
|
|
1140
|
+
}, z.core.$strip>;
|
|
1141
|
+
type CouponResult = z.infer<typeof couponResultSchema>;
|
|
1142
|
+
/** 쿠폰을 반영한 금액 — 결제 금액 = productAmount − couponDiscountAmount + deliveryFee − deliveryDiscountAmount */
|
|
1143
|
+
declare const pricingAmountsSchema: z.ZodObject<{
|
|
1144
|
+
productAmount: z.ZodNumber;
|
|
1145
|
+
deliveryFee: z.ZodNumber;
|
|
1146
|
+
couponDiscountAmount: z.ZodNumber;
|
|
1147
|
+
deliveryDiscountAmount: z.ZodNumber;
|
|
1148
|
+
totalAmount: z.ZodNumber;
|
|
1149
|
+
}, z.core.$strip>;
|
|
1150
|
+
/** `POST /checkout/{checkoutId}/pricing` 요청 */
|
|
1151
|
+
declare const checkoutPricingRequestSchema: z.ZodObject<{
|
|
1152
|
+
zipCode: z.ZodOptional<z.ZodString>;
|
|
1153
|
+
coupons: z.ZodArray<z.ZodObject<{
|
|
1154
|
+
issueId: z.ZodOptional<z.ZodString>;
|
|
1155
|
+
code: z.ZodOptional<z.ZodString>;
|
|
1156
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
1157
|
+
}, z.core.$strip>>;
|
|
1158
|
+
}, z.core.$strip>;
|
|
1159
|
+
type CheckoutPricingRequest = z.infer<typeof checkoutPricingRequestSchema>;
|
|
1160
|
+
/** 결제 금액의 하한 — 쿠폰 적용 뒤 결제 금액이 이보다 작으면 결제를 시작할 수 없다 */
|
|
1161
|
+
declare const MIN_PAYMENT_AMOUNT = 100;
|
|
1162
|
+
declare const checkoutPricingSchema: z.ZodObject<{
|
|
1163
|
+
amounts: z.ZodObject<{
|
|
1164
|
+
productAmount: z.ZodNumber;
|
|
1165
|
+
deliveryFee: z.ZodNumber;
|
|
1166
|
+
couponDiscountAmount: z.ZodNumber;
|
|
1167
|
+
deliveryDiscountAmount: z.ZodNumber;
|
|
1168
|
+
totalAmount: z.ZodNumber;
|
|
1169
|
+
}, z.core.$strip>;
|
|
1170
|
+
coupons: z.ZodArray<z.ZodObject<{
|
|
1171
|
+
couponId: z.ZodString;
|
|
1172
|
+
issueId: z.ZodNullable<z.ZodString>;
|
|
1173
|
+
code: z.ZodNullable<z.ZodString>;
|
|
1174
|
+
name: z.ZodString;
|
|
1175
|
+
kind: z.ZodString;
|
|
1176
|
+
benefit: z.ZodObject<{
|
|
1177
|
+
type: z.ZodString;
|
|
1178
|
+
value: z.ZodNumber;
|
|
1179
|
+
maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
|
|
1180
|
+
}, z.core.$strip>;
|
|
1181
|
+
applied: z.ZodBoolean;
|
|
1182
|
+
discountAmount: z.ZodNumber;
|
|
1183
|
+
rejectReason: z.ZodNullable<z.ZodString>;
|
|
1184
|
+
optionId: z.ZodNullable<z.ZodString>;
|
|
1185
|
+
}, z.core.$strip>>;
|
|
1186
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1187
|
+
optionId: z.ZodNullable<z.ZodString>;
|
|
1188
|
+
couponDiscountAmount: z.ZodNumber;
|
|
1189
|
+
}, z.core.$strip>>;
|
|
1190
|
+
payable: z.ZodBoolean;
|
|
1191
|
+
}, z.core.$strip>;
|
|
1192
|
+
type CheckoutPricing = z.infer<typeof checkoutPricingSchema>;
|
|
1193
|
+
/** `GET /checkout/{checkoutId}/coupons` 항목 — 이 주문서에 쓸 수 있는 내 쿠폰 */
|
|
1194
|
+
declare const applicableCouponSchema: z.ZodObject<{
|
|
1195
|
+
issueId: z.ZodString;
|
|
1196
|
+
couponId: z.ZodString;
|
|
1197
|
+
name: z.ZodString;
|
|
1198
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1199
|
+
kind: z.ZodString;
|
|
1200
|
+
benefit: z.ZodObject<{
|
|
1201
|
+
type: z.ZodString;
|
|
1202
|
+
value: z.ZodNumber;
|
|
1203
|
+
maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
|
|
1204
|
+
}, z.core.$strip>;
|
|
1205
|
+
minOrderAmount: z.ZodNumber;
|
|
1206
|
+
validUntil: z.ZodNullable<z.ZodString>;
|
|
1207
|
+
applicable: z.ZodBoolean;
|
|
1208
|
+
expectedDiscountAmount: z.ZodNumber;
|
|
1209
|
+
rejectReason: z.ZodNullable<z.ZodString>;
|
|
1210
|
+
}, z.core.$strip>;
|
|
1211
|
+
type ApplicableCoupon = z.infer<typeof applicableCouponSchema>;
|
|
1212
|
+
/** `GET /me/coupons` 항목 */
|
|
1213
|
+
declare const myCouponSchema: z.ZodObject<{
|
|
1214
|
+
issueId: z.ZodString;
|
|
1215
|
+
couponId: z.ZodString;
|
|
1216
|
+
name: z.ZodString;
|
|
1217
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1218
|
+
kind: z.ZodString;
|
|
1219
|
+
benefit: z.ZodObject<{
|
|
1220
|
+
type: z.ZodString;
|
|
1221
|
+
value: z.ZodNumber;
|
|
1222
|
+
maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
|
|
1223
|
+
}, z.core.$strip>;
|
|
1224
|
+
minOrderAmount: z.ZodNumber;
|
|
1225
|
+
status: z.ZodString;
|
|
1226
|
+
validFrom: z.ZodString;
|
|
1227
|
+
validUntil: z.ZodNullable<z.ZodString>;
|
|
1228
|
+
usedOrderId: z.ZodNullable<z.ZodString>;
|
|
1229
|
+
issuedAt: z.ZodString;
|
|
1230
|
+
}, z.core.$strip>;
|
|
1231
|
+
type MyCoupon = z.infer<typeof myCouponSchema>;
|
|
1232
|
+
declare const myCouponListQuerySchema: z.ZodObject<{
|
|
1233
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
1234
|
+
expired: "expired";
|
|
1235
|
+
available: "available";
|
|
1236
|
+
used: "used";
|
|
1237
|
+
}>>;
|
|
1238
|
+
}, z.core.$strip>;
|
|
1239
|
+
//#endregion
|
|
1054
1240
|
//#region src/schemas/customer-inquiry.d.ts
|
|
1055
1241
|
declare const customerInquiryCategorySchema: z.ZodEnum<{
|
|
1056
1242
|
RETURN: "RETURN";
|
|
@@ -1167,6 +1353,232 @@ declare const wishlistAddResultSchema: z.ZodObject<{
|
|
|
1167
1353
|
}, z.core.$strip>;
|
|
1168
1354
|
type WishlistAddResult = z.infer<typeof wishlistAddResultSchema>;
|
|
1169
1355
|
//#endregion
|
|
1356
|
+
//#region src/schemas/order.d.ts
|
|
1357
|
+
declare const myOrderItemSchema: z.ZodObject<{
|
|
1358
|
+
orderItemId: z.ZodString;
|
|
1359
|
+
productId: z.ZodString;
|
|
1360
|
+
productName: z.ZodString;
|
|
1361
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
1362
|
+
optionName: z.ZodNullable<z.ZodString>;
|
|
1363
|
+
quantity: z.ZodNumber;
|
|
1364
|
+
canceledQuantity: z.ZodNumber;
|
|
1365
|
+
activeQuantity: z.ZodNumber;
|
|
1366
|
+
totalPrice: z.ZodNumber;
|
|
1367
|
+
couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1368
|
+
status: z.ZodEnum<{
|
|
1369
|
+
CANCELED: "CANCELED";
|
|
1370
|
+
PAYMENT_WAITING: "PAYMENT_WAITING";
|
|
1371
|
+
PAID: "PAID";
|
|
1372
|
+
CONFIRMED: "CONFIRMED";
|
|
1373
|
+
DISPATCHED: "DISPATCHED";
|
|
1374
|
+
DELIVERING: "DELIVERING";
|
|
1375
|
+
DELIVERED: "DELIVERED";
|
|
1376
|
+
PURCHASE_DECIDED: "PURCHASE_DECIDED";
|
|
1377
|
+
}>;
|
|
1378
|
+
fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1379
|
+
withdrawalRestricted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1380
|
+
fulfillment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1381
|
+
status: z.ZodString;
|
|
1382
|
+
fulfilledAt: z.ZodString;
|
|
1383
|
+
note: z.ZodNullable<z.ZodString>;
|
|
1384
|
+
codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1385
|
+
codeId: z.ZodString;
|
|
1386
|
+
hint: z.ZodString;
|
|
1387
|
+
revealedAt: z.ZodNullable<z.ZodString>;
|
|
1388
|
+
}, z.core.$strip>>>>;
|
|
1389
|
+
download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1390
|
+
count: z.ZodNumber;
|
|
1391
|
+
limit: z.ZodNumber;
|
|
1392
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1393
|
+
files: z.ZodArray<z.ZodObject<{
|
|
1394
|
+
assetId: z.ZodString;
|
|
1395
|
+
fileName: z.ZodString;
|
|
1396
|
+
sizeBytes: z.ZodNullable<z.ZodNumber>;
|
|
1397
|
+
}, z.core.$strip>>;
|
|
1398
|
+
}, z.core.$strip>>>>;
|
|
1399
|
+
}, z.core.$strip>>>>;
|
|
1400
|
+
pickupLocation: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1401
|
+
name: z.ZodString;
|
|
1402
|
+
zipCode: z.ZodString;
|
|
1403
|
+
address1: z.ZodString;
|
|
1404
|
+
address2: z.ZodNullable<z.ZodString>;
|
|
1405
|
+
phone: z.ZodString;
|
|
1406
|
+
}, z.core.$strip>>>>;
|
|
1407
|
+
claimStatus: z.ZodNullable<z.ZodString>;
|
|
1408
|
+
reviewWritten: z.ZodBoolean;
|
|
1409
|
+
autoDecisionDate: z.ZodNullable<z.ZodString>;
|
|
1410
|
+
}, z.core.$strip>;
|
|
1411
|
+
type MyOrderItem = z.infer<typeof myOrderItemSchema>;
|
|
1412
|
+
/**
|
|
1413
|
+
* 주문 응답의 배송지 — 결제 요청 시 저장된 스냅샷. 요청 스키마(`shippingAddressInputSchema`)와 분리한 응답 스키마라
|
|
1414
|
+
* 형식 검증(regex·길이)을 하지 않는다. 입력하지 않은 선택 필드는 null로 오거나 빠질 수 있다.
|
|
1415
|
+
*/
|
|
1416
|
+
declare const orderShippingAddressSchema: z.ZodObject<{
|
|
1417
|
+
receiverName: z.ZodString;
|
|
1418
|
+
phone: z.ZodString;
|
|
1419
|
+
zipCode: z.ZodString;
|
|
1420
|
+
address1: z.ZodString;
|
|
1421
|
+
address2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1422
|
+
deliveryMemo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1423
|
+
entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1424
|
+
}, z.core.$strip>;
|
|
1425
|
+
type OrderShippingAddress = z.infer<typeof orderShippingAddressSchema>;
|
|
1426
|
+
declare const myOrderSchema: z.ZodObject<{
|
|
1427
|
+
orderId: z.ZodString;
|
|
1428
|
+
orderedAt: z.ZodString;
|
|
1429
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1430
|
+
orderItemId: z.ZodString;
|
|
1431
|
+
productId: z.ZodString;
|
|
1432
|
+
productName: z.ZodString;
|
|
1433
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
1434
|
+
optionName: z.ZodNullable<z.ZodString>;
|
|
1435
|
+
quantity: z.ZodNumber;
|
|
1436
|
+
canceledQuantity: z.ZodNumber;
|
|
1437
|
+
activeQuantity: z.ZodNumber;
|
|
1438
|
+
totalPrice: z.ZodNumber;
|
|
1439
|
+
couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1440
|
+
status: z.ZodEnum<{
|
|
1441
|
+
CANCELED: "CANCELED";
|
|
1442
|
+
PAYMENT_WAITING: "PAYMENT_WAITING";
|
|
1443
|
+
PAID: "PAID";
|
|
1444
|
+
CONFIRMED: "CONFIRMED";
|
|
1445
|
+
DISPATCHED: "DISPATCHED";
|
|
1446
|
+
DELIVERING: "DELIVERING";
|
|
1447
|
+
DELIVERED: "DELIVERED";
|
|
1448
|
+
PURCHASE_DECIDED: "PURCHASE_DECIDED";
|
|
1449
|
+
}>;
|
|
1450
|
+
fulfillmentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1451
|
+
withdrawalRestricted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1452
|
+
fulfillment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1453
|
+
status: z.ZodString;
|
|
1454
|
+
fulfilledAt: z.ZodString;
|
|
1455
|
+
note: z.ZodNullable<z.ZodString>;
|
|
1456
|
+
codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1457
|
+
codeId: z.ZodString;
|
|
1458
|
+
hint: z.ZodString;
|
|
1459
|
+
revealedAt: z.ZodNullable<z.ZodString>;
|
|
1460
|
+
}, z.core.$strip>>>>;
|
|
1461
|
+
download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1462
|
+
count: z.ZodNumber;
|
|
1463
|
+
limit: z.ZodNumber;
|
|
1464
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
1465
|
+
files: z.ZodArray<z.ZodObject<{
|
|
1466
|
+
assetId: z.ZodString;
|
|
1467
|
+
fileName: z.ZodString;
|
|
1468
|
+
sizeBytes: z.ZodNullable<z.ZodNumber>;
|
|
1469
|
+
}, z.core.$strip>>;
|
|
1470
|
+
}, z.core.$strip>>>>;
|
|
1471
|
+
}, z.core.$strip>>>>;
|
|
1472
|
+
pickupLocation: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1473
|
+
name: z.ZodString;
|
|
1474
|
+
zipCode: z.ZodString;
|
|
1475
|
+
address1: z.ZodString;
|
|
1476
|
+
address2: z.ZodNullable<z.ZodString>;
|
|
1477
|
+
phone: z.ZodString;
|
|
1478
|
+
}, z.core.$strip>>>>;
|
|
1479
|
+
claimStatus: z.ZodNullable<z.ZodString>;
|
|
1480
|
+
reviewWritten: z.ZodBoolean;
|
|
1481
|
+
autoDecisionDate: z.ZodNullable<z.ZodString>;
|
|
1482
|
+
}, z.core.$strip>>;
|
|
1483
|
+
requiresShipping: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1484
|
+
shippingAddress: z.ZodObject<{
|
|
1485
|
+
receiverName: z.ZodString;
|
|
1486
|
+
phone: z.ZodString;
|
|
1487
|
+
zipCode: z.ZodString;
|
|
1488
|
+
address1: z.ZodString;
|
|
1489
|
+
address2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1490
|
+
deliveryMemo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1491
|
+
entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1492
|
+
}, z.core.$strip>;
|
|
1493
|
+
payment: z.ZodObject<{
|
|
1494
|
+
method: z.ZodEnum<{
|
|
1495
|
+
CARD: "CARD";
|
|
1496
|
+
EASY_PAY: "EASY_PAY";
|
|
1497
|
+
BANK_TRANSFER: "BANK_TRANSFER";
|
|
1498
|
+
VIRTUAL_ACCOUNT: "VIRTUAL_ACCOUNT";
|
|
1499
|
+
MOBILE: "MOBILE";
|
|
1500
|
+
}>;
|
|
1501
|
+
easyPayProvider: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1502
|
+
couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1503
|
+
deliveryDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1504
|
+
discounts: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1505
|
+
couponId: z.ZodString;
|
|
1506
|
+
name: z.ZodString;
|
|
1507
|
+
kind: z.ZodString;
|
|
1508
|
+
discountAmount: z.ZodNumber;
|
|
1509
|
+
}, z.core.$strip>>>>;
|
|
1510
|
+
totalAmount: z.ZodNumber;
|
|
1511
|
+
paidAt: z.ZodNullable<z.ZodString>;
|
|
1512
|
+
receiptUrl: z.ZodNullable<z.ZodURL>;
|
|
1513
|
+
}, z.core.$strip>;
|
|
1514
|
+
withdrawalAgreedAt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1515
|
+
testPayment: z.ZodBoolean;
|
|
1516
|
+
}, z.core.$strip>;
|
|
1517
|
+
type MyOrder = z.infer<typeof myOrderSchema>;
|
|
1518
|
+
/**
|
|
1519
|
+
* 택배 추적 단계. 응답에서는 문자열로 받는다(값이 추가될 수 있다) — 현재 값은 `ACCEPTED`(접수)·`IN_TRANSIT`(이동 중)·
|
|
1520
|
+
* `OUT_FOR_DELIVERY`(배송 출발)·`DELIVERED`(배송완료)다.
|
|
1521
|
+
*/
|
|
1522
|
+
declare const trackingStageResponseSchema: z.ZodString;
|
|
1523
|
+
declare const deliveryTrackingSchema: z.ZodObject<{
|
|
1524
|
+
carrierName: z.ZodString;
|
|
1525
|
+
trackingNumber: z.ZodString;
|
|
1526
|
+
trackingUrl: z.ZodURL;
|
|
1527
|
+
status: z.ZodEnum<{
|
|
1528
|
+
DISPATCHED: "DISPATCHED";
|
|
1529
|
+
DELIVERING: "DELIVERING";
|
|
1530
|
+
DELIVERED: "DELIVERED";
|
|
1531
|
+
}>;
|
|
1532
|
+
trackingEvents: z.ZodArray<z.ZodObject<{
|
|
1533
|
+
status: z.ZodString;
|
|
1534
|
+
location: z.ZodString;
|
|
1535
|
+
occurredAt: z.ZodString;
|
|
1536
|
+
stage: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1537
|
+
}, z.core.$strip>>;
|
|
1538
|
+
trackingStage: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1539
|
+
trackingCheckedAt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1540
|
+
}, z.core.$strip>;
|
|
1541
|
+
type DeliveryTracking = z.infer<typeof deliveryTrackingSchema>;
|
|
1542
|
+
/** `POST /me/order-items/{orderItemId}/purchase-decision` 응답 */
|
|
1543
|
+
declare const purchaseDecisionResultSchema: z.ZodObject<{
|
|
1544
|
+
orderItemId: z.ZodString;
|
|
1545
|
+
status: z.ZodLiteral<"PURCHASE_DECIDED">;
|
|
1546
|
+
decidedAt: z.ZodString;
|
|
1547
|
+
}, z.core.$strip>;
|
|
1548
|
+
type PurchaseDecisionResult = z.infer<typeof purchaseDecisionResultSchema>;
|
|
1549
|
+
/**
|
|
1550
|
+
* 코드 열람 응답 (이슈 #48) — `POST /storefront/v1/me/order-items/{orderItemId}/fulfillment/reveal`(회원)·
|
|
1551
|
+
* `POST /storefront/v1/guest/orders/{orderId}/order-items/{orderItemId}/fulfillment/reveal`(비회원).
|
|
1552
|
+
* 평문 코드는 이 응답에만 있다. 화면에 보인 뒤 저장하지 않는다(응답은 `Cache-Control: no-store`).
|
|
1553
|
+
* 첫 열람 시각은 청약철회 판단의 근거(제공 개시)로 남는다.
|
|
1554
|
+
*/
|
|
1555
|
+
declare const fulfillmentRevealSchema: z.ZodObject<{
|
|
1556
|
+
orderItemId: z.ZodString;
|
|
1557
|
+
codes: z.ZodArray<z.ZodObject<{
|
|
1558
|
+
codeId: z.ZodString;
|
|
1559
|
+
code: z.ZodString;
|
|
1560
|
+
revealedAt: z.ZodString;
|
|
1561
|
+
}, z.core.$strip>>;
|
|
1562
|
+
}, z.core.$strip>;
|
|
1563
|
+
type FulfillmentReveal = z.infer<typeof fulfillmentRevealSchema>;
|
|
1564
|
+
/**
|
|
1565
|
+
* 다운로드 요청 (이슈 #48) — `POST /storefront/v1/me/order-items/{orderItemId}/downloads`(회원)·
|
|
1566
|
+
* `POST /storefront/v1/guest/orders/{orderId}/order-items/{orderItemId}/downloads`(비회원, 연락처·비밀번호를 함께 보낸다).
|
|
1567
|
+
* 파일이 하나면 `assetId`를 생략할 수 있다.
|
|
1568
|
+
*/
|
|
1569
|
+
declare const downloadRequestSchema: z.ZodObject<{
|
|
1570
|
+
assetId: z.ZodOptional<z.ZodString>;
|
|
1571
|
+
}, z.core.$strip>;
|
|
1572
|
+
type DownloadRequest = z.infer<typeof downloadRequestSchema>;
|
|
1573
|
+
/** 다운로드 응답 — 수명 300초의 서명 주소. 받을 때마다 횟수가 하나 준다 */
|
|
1574
|
+
declare const downloadLinkSchema: z.ZodObject<{
|
|
1575
|
+
url: z.ZodURL;
|
|
1576
|
+
expiresAt: z.ZodString;
|
|
1577
|
+
fileName: z.ZodString;
|
|
1578
|
+
remaining: z.ZodNumber;
|
|
1579
|
+
}, z.core.$strip>;
|
|
1580
|
+
type DownloadLink = z.infer<typeof downloadLinkSchema>;
|
|
1581
|
+
//#endregion
|
|
1170
1582
|
//#region src/schemas/review.d.ts
|
|
1171
1583
|
declare const publicReviewSchema: z.ZodObject<{
|
|
1172
1584
|
reviewId: z.ZodString;
|
|
@@ -1450,6 +1862,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1450
1862
|
discountedPrice: number | null;
|
|
1451
1863
|
discountRate: number | null;
|
|
1452
1864
|
freeShipping: boolean;
|
|
1865
|
+
fulfillmentType: string;
|
|
1866
|
+
requiresShipping: boolean;
|
|
1453
1867
|
averageRating: number;
|
|
1454
1868
|
reviewCount: number;
|
|
1455
1869
|
soldOut: boolean;
|
|
@@ -1474,6 +1888,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1474
1888
|
discountedPrice: number | null;
|
|
1475
1889
|
discountRate: number | null;
|
|
1476
1890
|
freeShipping: boolean;
|
|
1891
|
+
fulfillmentType: string;
|
|
1892
|
+
requiresShipping: boolean;
|
|
1477
1893
|
averageRating: number;
|
|
1478
1894
|
reviewCount: number;
|
|
1479
1895
|
soldOut: boolean;
|
|
@@ -1570,6 +1986,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1570
1986
|
quantity: number;
|
|
1571
1987
|
unitPrice: number;
|
|
1572
1988
|
totalPrice: number;
|
|
1989
|
+
fulfillmentType: string;
|
|
1573
1990
|
purchasable: boolean;
|
|
1574
1991
|
unpurchasableReason: "SOLD_OUT" | "SUSPENDED" | "CLOSED" | null;
|
|
1575
1992
|
}[];
|
|
@@ -1577,6 +1994,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1577
1994
|
productAmount: number;
|
|
1578
1995
|
deliveryFee: number;
|
|
1579
1996
|
totalAmount: number;
|
|
1997
|
+
requiresShipping: boolean;
|
|
1580
1998
|
};
|
|
1581
1999
|
}>;
|
|
1582
2000
|
addItem: (body: AddCartItemRequest) => Promise<{
|
|
@@ -1590,6 +2008,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1590
2008
|
quantity: number;
|
|
1591
2009
|
unitPrice: number;
|
|
1592
2010
|
totalPrice: number;
|
|
2011
|
+
fulfillmentType: string;
|
|
1593
2012
|
purchasable: boolean;
|
|
1594
2013
|
unpurchasableReason: "SOLD_OUT" | "SUSPENDED" | "CLOSED" | null;
|
|
1595
2014
|
}[];
|
|
@@ -1597,6 +2016,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1597
2016
|
productAmount: number;
|
|
1598
2017
|
deliveryFee: number;
|
|
1599
2018
|
totalAmount: number;
|
|
2019
|
+
requiresShipping: boolean;
|
|
1600
2020
|
};
|
|
1601
2021
|
}>;
|
|
1602
2022
|
updateItem: (cartItemId: string, body: UpdateCartItemRequest) => Promise<{
|
|
@@ -1610,6 +2030,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1610
2030
|
quantity: number;
|
|
1611
2031
|
unitPrice: number;
|
|
1612
2032
|
totalPrice: number;
|
|
2033
|
+
fulfillmentType: string;
|
|
1613
2034
|
purchasable: boolean;
|
|
1614
2035
|
unpurchasableReason: "SOLD_OUT" | "SUSPENDED" | "CLOSED" | null;
|
|
1615
2036
|
}[];
|
|
@@ -1617,6 +2038,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1617
2038
|
productAmount: number;
|
|
1618
2039
|
deliveryFee: number;
|
|
1619
2040
|
totalAmount: number;
|
|
2041
|
+
requiresShipping: boolean;
|
|
1620
2042
|
};
|
|
1621
2043
|
}>;
|
|
1622
2044
|
removeItem: (cartItemId: string) => Promise<void>;
|
|
@@ -1637,6 +2059,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1637
2059
|
productAmount: number;
|
|
1638
2060
|
deliveryFee: number;
|
|
1639
2061
|
totalAmount: number;
|
|
2062
|
+
couponDiscountAmount: number;
|
|
2063
|
+
deliveryDiscountAmount: number;
|
|
1640
2064
|
};
|
|
1641
2065
|
delivery: {
|
|
1642
2066
|
baseFee: number;
|
|
@@ -1647,6 +2071,11 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1647
2071
|
freeByThreshold: boolean;
|
|
1648
2072
|
zipCode: string | null;
|
|
1649
2073
|
};
|
|
2074
|
+
requiresShipping: boolean;
|
|
2075
|
+
withdrawal: {
|
|
2076
|
+
required: boolean;
|
|
2077
|
+
notice: string | null;
|
|
2078
|
+
};
|
|
1650
2079
|
expiresAt: string;
|
|
1651
2080
|
paymentOptions: (({
|
|
1652
2081
|
pg: "tosspayments" | "portone";
|
|
@@ -1684,6 +2113,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1684
2113
|
productAmount: number;
|
|
1685
2114
|
deliveryFee: number;
|
|
1686
2115
|
totalAmount: number;
|
|
2116
|
+
couponDiscountAmount: number;
|
|
2117
|
+
deliveryDiscountAmount: number;
|
|
1687
2118
|
};
|
|
1688
2119
|
delivery: {
|
|
1689
2120
|
baseFee: number;
|
|
@@ -1734,6 +2165,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1734
2165
|
productAmount: number;
|
|
1735
2166
|
deliveryFee: number;
|
|
1736
2167
|
totalAmount: number;
|
|
2168
|
+
couponDiscountAmount: number;
|
|
2169
|
+
deliveryDiscountAmount: number;
|
|
1737
2170
|
};
|
|
1738
2171
|
delivery: {
|
|
1739
2172
|
baseFee: number;
|
|
@@ -1745,6 +2178,60 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1745
2178
|
zipCode: string | null;
|
|
1746
2179
|
};
|
|
1747
2180
|
}>;
|
|
2181
|
+
/**
|
|
2182
|
+
* `POST /checkout/{checkoutId}/pricing` — 쿠폰 금액 미리보기(이슈 #47). 주문서를 바꾸지 않고 쿠폰을 예약하지 않는다.
|
|
2183
|
+
* 확정은 결제 시작의 `coupons`다. 코드 입력은 구매자당 분당 10회까지다(429 `TOO_MANY_REQUESTS`).
|
|
2184
|
+
*
|
|
2185
|
+
* 에러: 404 `COUPON_NOT_FOUND`(없는 코드·남의 쿠폰) · 409 `COUPONS_UNAVAILABLE`(지금 쿠폰을 쓸 수 없음)
|
|
2186
|
+
*/
|
|
2187
|
+
pricing: (checkoutId: string, body: CheckoutPricingRequest) => Promise<{
|
|
2188
|
+
amounts: {
|
|
2189
|
+
productAmount: number;
|
|
2190
|
+
deliveryFee: number;
|
|
2191
|
+
couponDiscountAmount: number;
|
|
2192
|
+
deliveryDiscountAmount: number;
|
|
2193
|
+
totalAmount: number;
|
|
2194
|
+
};
|
|
2195
|
+
coupons: {
|
|
2196
|
+
couponId: string;
|
|
2197
|
+
issueId: string | null;
|
|
2198
|
+
code: string | null;
|
|
2199
|
+
name: string;
|
|
2200
|
+
kind: string;
|
|
2201
|
+
benefit: {
|
|
2202
|
+
type: string;
|
|
2203
|
+
value: number;
|
|
2204
|
+
maxDiscountAmount: number | null;
|
|
2205
|
+
};
|
|
2206
|
+
applied: boolean;
|
|
2207
|
+
discountAmount: number;
|
|
2208
|
+
rejectReason: string | null;
|
|
2209
|
+
optionId: string | null;
|
|
2210
|
+
}[];
|
|
2211
|
+
items: {
|
|
2212
|
+
optionId: string | null;
|
|
2213
|
+
couponDiscountAmount: number;
|
|
2214
|
+
}[];
|
|
2215
|
+
payable: boolean;
|
|
2216
|
+
}>;
|
|
2217
|
+
/** `GET /checkout/{checkoutId}/coupons` — 이 주문서에 쓸 수 있는 내 쿠폰과 예상 할인(회원 전용) */
|
|
2218
|
+
applicableCoupons: (checkoutId: string) => Promise<{
|
|
2219
|
+
issueId: string;
|
|
2220
|
+
couponId: string;
|
|
2221
|
+
name: string;
|
|
2222
|
+
description: string | null;
|
|
2223
|
+
kind: string;
|
|
2224
|
+
benefit: {
|
|
2225
|
+
type: string;
|
|
2226
|
+
value: number;
|
|
2227
|
+
maxDiscountAmount: number | null;
|
|
2228
|
+
};
|
|
2229
|
+
minOrderAmount: number;
|
|
2230
|
+
validUntil: string | null;
|
|
2231
|
+
applicable: boolean;
|
|
2232
|
+
expectedDiscountAmount: number;
|
|
2233
|
+
rejectReason: string | null;
|
|
2234
|
+
}[]>;
|
|
1748
2235
|
};
|
|
1749
2236
|
payments: {
|
|
1750
2237
|
/**
|
|
@@ -1799,6 +2286,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1799
2286
|
productAmount: number;
|
|
1800
2287
|
deliveryFee: number;
|
|
1801
2288
|
totalAmount: number;
|
|
2289
|
+
couponDiscountAmount: number;
|
|
2290
|
+
deliveryDiscountAmount: number;
|
|
1802
2291
|
};
|
|
1803
2292
|
delivery: {
|
|
1804
2293
|
baseFee: number;
|
|
@@ -1833,11 +2322,42 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1833
2322
|
canceledQuantity: number;
|
|
1834
2323
|
activeQuantity: number;
|
|
1835
2324
|
totalPrice: number;
|
|
2325
|
+
couponDiscountAmount: number;
|
|
1836
2326
|
status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
|
|
2327
|
+
fulfillmentType: string;
|
|
2328
|
+
withdrawalRestricted: boolean;
|
|
2329
|
+
fulfillment: {
|
|
2330
|
+
status: string;
|
|
2331
|
+
fulfilledAt: string;
|
|
2332
|
+
note: string | null;
|
|
2333
|
+
codes: {
|
|
2334
|
+
codeId: string;
|
|
2335
|
+
hint: string;
|
|
2336
|
+
revealedAt: string | null;
|
|
2337
|
+
}[];
|
|
2338
|
+
download: {
|
|
2339
|
+
count: number;
|
|
2340
|
+
limit: number;
|
|
2341
|
+
expiresAt: string | null;
|
|
2342
|
+
files: {
|
|
2343
|
+
assetId: string;
|
|
2344
|
+
fileName: string;
|
|
2345
|
+
sizeBytes: number | null;
|
|
2346
|
+
}[];
|
|
2347
|
+
} | null;
|
|
2348
|
+
} | null;
|
|
2349
|
+
pickupLocation: {
|
|
2350
|
+
name: string;
|
|
2351
|
+
zipCode: string;
|
|
2352
|
+
address1: string;
|
|
2353
|
+
address2: string | null;
|
|
2354
|
+
phone: string;
|
|
2355
|
+
} | null;
|
|
1837
2356
|
claimStatus: string | null;
|
|
1838
2357
|
reviewWritten: boolean;
|
|
1839
2358
|
autoDecisionDate: string | null;
|
|
1840
2359
|
}[];
|
|
2360
|
+
requiresShipping: boolean;
|
|
1841
2361
|
shippingAddress: {
|
|
1842
2362
|
receiverName: string;
|
|
1843
2363
|
phone: string;
|
|
@@ -1850,10 +2370,19 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1850
2370
|
payment: {
|
|
1851
2371
|
method: "CARD" | "EASY_PAY" | "BANK_TRANSFER" | "VIRTUAL_ACCOUNT" | "MOBILE";
|
|
1852
2372
|
easyPayProvider: string | null;
|
|
2373
|
+
couponDiscountAmount: number;
|
|
2374
|
+
deliveryDiscountAmount: number;
|
|
2375
|
+
discounts: {
|
|
2376
|
+
couponId: string;
|
|
2377
|
+
name: string;
|
|
2378
|
+
kind: string;
|
|
2379
|
+
discountAmount: number;
|
|
2380
|
+
}[];
|
|
1853
2381
|
totalAmount: number;
|
|
1854
2382
|
paidAt: string | null;
|
|
1855
2383
|
receiptUrl: string | null;
|
|
1856
2384
|
};
|
|
2385
|
+
withdrawalAgreedAt: string | null;
|
|
1857
2386
|
testPayment: boolean;
|
|
1858
2387
|
}[];
|
|
1859
2388
|
}>;
|
|
@@ -1870,11 +2399,42 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1870
2399
|
canceledQuantity: number;
|
|
1871
2400
|
activeQuantity: number;
|
|
1872
2401
|
totalPrice: number;
|
|
2402
|
+
couponDiscountAmount: number;
|
|
1873
2403
|
status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
|
|
2404
|
+
fulfillmentType: string;
|
|
2405
|
+
withdrawalRestricted: boolean;
|
|
2406
|
+
fulfillment: {
|
|
2407
|
+
status: string;
|
|
2408
|
+
fulfilledAt: string;
|
|
2409
|
+
note: string | null;
|
|
2410
|
+
codes: {
|
|
2411
|
+
codeId: string;
|
|
2412
|
+
hint: string;
|
|
2413
|
+
revealedAt: string | null;
|
|
2414
|
+
}[];
|
|
2415
|
+
download: {
|
|
2416
|
+
count: number;
|
|
2417
|
+
limit: number;
|
|
2418
|
+
expiresAt: string | null;
|
|
2419
|
+
files: {
|
|
2420
|
+
assetId: string;
|
|
2421
|
+
fileName: string;
|
|
2422
|
+
sizeBytes: number | null;
|
|
2423
|
+
}[];
|
|
2424
|
+
} | null;
|
|
2425
|
+
} | null;
|
|
2426
|
+
pickupLocation: {
|
|
2427
|
+
name: string;
|
|
2428
|
+
zipCode: string;
|
|
2429
|
+
address1: string;
|
|
2430
|
+
address2: string | null;
|
|
2431
|
+
phone: string;
|
|
2432
|
+
} | null;
|
|
1874
2433
|
claimStatus: string | null;
|
|
1875
2434
|
reviewWritten: boolean;
|
|
1876
2435
|
autoDecisionDate: string | null;
|
|
1877
2436
|
}[];
|
|
2437
|
+
requiresShipping: boolean;
|
|
1878
2438
|
shippingAddress: {
|
|
1879
2439
|
receiverName: string;
|
|
1880
2440
|
phone: string;
|
|
@@ -1887,12 +2447,30 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1887
2447
|
payment: {
|
|
1888
2448
|
method: "CARD" | "EASY_PAY" | "BANK_TRANSFER" | "VIRTUAL_ACCOUNT" | "MOBILE";
|
|
1889
2449
|
easyPayProvider: string | null;
|
|
2450
|
+
couponDiscountAmount: number;
|
|
2451
|
+
deliveryDiscountAmount: number;
|
|
2452
|
+
discounts: {
|
|
2453
|
+
couponId: string;
|
|
2454
|
+
name: string;
|
|
2455
|
+
kind: string;
|
|
2456
|
+
discountAmount: number;
|
|
2457
|
+
}[];
|
|
1890
2458
|
totalAmount: number;
|
|
1891
2459
|
paidAt: string | null;
|
|
1892
2460
|
receiptUrl: string | null;
|
|
1893
2461
|
};
|
|
2462
|
+
withdrawalAgreedAt: string | null;
|
|
1894
2463
|
testPayment: boolean;
|
|
1895
2464
|
}>;
|
|
2465
|
+
/**
|
|
2466
|
+
* 비회원 주문 조회 — 주문번호 + 주문할 때 적은 연락처·주문 조회 비밀번호.
|
|
2467
|
+
*
|
|
2468
|
+
* 에러: 404 `ORDER_NOT_FOUND`(주문이 없거나 연락처·비밀번호가 다름 — 둘을 구분하지 않는다) ·
|
|
2469
|
+
* 429 `TOO_MANY_REQUESTS`(주문번호마다 10분에 5번까지 확인하고, 5번째가 틀리면 30분 잠금.
|
|
2470
|
+
* 주문번호마다 하루 15번, 스토어 전체 분당 한도도 있다. 남은 시간은 `ApiError.details.retryAfterSeconds`).
|
|
2471
|
+
* 맞게 조회하면 주문번호의 횟수가 초기화된다. 본문 형식은 `guestInfoSchema`의 `phone`·`orderPassword`와 같다.
|
|
2472
|
+
* 429는 연락처·비밀번호가 맞아도 난다 — 「잠시 후 다시 시도」로 안내한다.
|
|
2473
|
+
*/
|
|
1896
2474
|
getGuestOrder: (orderId: string, body: {
|
|
1897
2475
|
phone: string;
|
|
1898
2476
|
orderPassword: string;
|
|
@@ -1909,11 +2487,42 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1909
2487
|
canceledQuantity: number;
|
|
1910
2488
|
activeQuantity: number;
|
|
1911
2489
|
totalPrice: number;
|
|
2490
|
+
couponDiscountAmount: number;
|
|
1912
2491
|
status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
|
|
2492
|
+
fulfillmentType: string;
|
|
2493
|
+
withdrawalRestricted: boolean;
|
|
2494
|
+
fulfillment: {
|
|
2495
|
+
status: string;
|
|
2496
|
+
fulfilledAt: string;
|
|
2497
|
+
note: string | null;
|
|
2498
|
+
codes: {
|
|
2499
|
+
codeId: string;
|
|
2500
|
+
hint: string;
|
|
2501
|
+
revealedAt: string | null;
|
|
2502
|
+
}[];
|
|
2503
|
+
download: {
|
|
2504
|
+
count: number;
|
|
2505
|
+
limit: number;
|
|
2506
|
+
expiresAt: string | null;
|
|
2507
|
+
files: {
|
|
2508
|
+
assetId: string;
|
|
2509
|
+
fileName: string;
|
|
2510
|
+
sizeBytes: number | null;
|
|
2511
|
+
}[];
|
|
2512
|
+
} | null;
|
|
2513
|
+
} | null;
|
|
2514
|
+
pickupLocation: {
|
|
2515
|
+
name: string;
|
|
2516
|
+
zipCode: string;
|
|
2517
|
+
address1: string;
|
|
2518
|
+
address2: string | null;
|
|
2519
|
+
phone: string;
|
|
2520
|
+
} | null;
|
|
1913
2521
|
claimStatus: string | null;
|
|
1914
2522
|
reviewWritten: boolean;
|
|
1915
2523
|
autoDecisionDate: string | null;
|
|
1916
2524
|
}[];
|
|
2525
|
+
requiresShipping: boolean;
|
|
1917
2526
|
shippingAddress: {
|
|
1918
2527
|
receiverName: string;
|
|
1919
2528
|
phone: string;
|
|
@@ -1926,10 +2535,19 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1926
2535
|
payment: {
|
|
1927
2536
|
method: "CARD" | "EASY_PAY" | "BANK_TRANSFER" | "VIRTUAL_ACCOUNT" | "MOBILE";
|
|
1928
2537
|
easyPayProvider: string | null;
|
|
2538
|
+
couponDiscountAmount: number;
|
|
2539
|
+
deliveryDiscountAmount: number;
|
|
2540
|
+
discounts: {
|
|
2541
|
+
couponId: string;
|
|
2542
|
+
name: string;
|
|
2543
|
+
kind: string;
|
|
2544
|
+
discountAmount: number;
|
|
2545
|
+
}[];
|
|
1929
2546
|
totalAmount: number;
|
|
1930
2547
|
paidAt: string | null;
|
|
1931
2548
|
receiptUrl: string | null;
|
|
1932
2549
|
};
|
|
2550
|
+
withdrawalAgreedAt: string | null;
|
|
1933
2551
|
testPayment: boolean;
|
|
1934
2552
|
}>;
|
|
1935
2553
|
getDelivery: (orderItemId: string) => Promise<{
|
|
@@ -1946,6 +2564,58 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1946
2564
|
trackingStage: string | null;
|
|
1947
2565
|
trackingCheckedAt: string | null;
|
|
1948
2566
|
}>;
|
|
2567
|
+
/**
|
|
2568
|
+
* 코드 열람 (이슈 #48) — 코드 발급 상품의 평문 코드. 처음 열람한 시각이 제공 개시 증거로 남는다.
|
|
2569
|
+
*
|
|
2570
|
+
* 에러: 404 `ORDER_ITEM_NOT_FOUND`(없거나 남의 주문상품) · 404 `FULFILLMENT_NOT_FOUND`(제공 전·회수됨·코드 상품 아님) ·
|
|
2571
|
+
* 429 `TOO_MANY_REQUESTS`
|
|
2572
|
+
*/
|
|
2573
|
+
revealCode: (orderItemId: string) => Promise<{
|
|
2574
|
+
orderItemId: string;
|
|
2575
|
+
codes: {
|
|
2576
|
+
codeId: string;
|
|
2577
|
+
code: string;
|
|
2578
|
+
revealedAt: string;
|
|
2579
|
+
}[];
|
|
2580
|
+
}>;
|
|
2581
|
+
/**
|
|
2582
|
+
* 파일 다운로드 (이슈 #48) — 수명 300초의 서명 주소를 받는다. 받을 때마다 남은 횟수가 준다.
|
|
2583
|
+
*
|
|
2584
|
+
* 에러: 404 `FULFILLMENT_NOT_FOUND`(제공 전·회수됨·파일 상품 아님) · 409 `DOWNLOAD_LIMIT_REACHED`(횟수 소진) ·
|
|
2585
|
+
* 409 `DOWNLOAD_EXPIRED`(기한 지남) · 400 `ASSET_REQUIRED`(파일이 여러 개인데 `assetId` 없음)
|
|
2586
|
+
*/
|
|
2587
|
+
createDownload: (orderItemId: string, body?: DownloadRequest) => Promise<{
|
|
2588
|
+
url: string;
|
|
2589
|
+
expiresAt: string;
|
|
2590
|
+
fileName: string;
|
|
2591
|
+
remaining: number;
|
|
2592
|
+
}>;
|
|
2593
|
+
/** 비회원 다운로드 — 비회원 주문 조회와 같은 연락처·주문 조회 비밀번호로 확인한다 */
|
|
2594
|
+
createGuestDownload: (orderId: string, orderItemId: string, body: {
|
|
2595
|
+
phone: string;
|
|
2596
|
+
orderPassword: string;
|
|
2597
|
+
assetId?: string;
|
|
2598
|
+
}) => Promise<{
|
|
2599
|
+
url: string;
|
|
2600
|
+
expiresAt: string;
|
|
2601
|
+
fileName: string;
|
|
2602
|
+
remaining: number;
|
|
2603
|
+
}>;
|
|
2604
|
+
/**
|
|
2605
|
+
* 비회원 코드 열람 — 비회원 주문 조회와 같은 연락처·주문 조회 비밀번호로 확인하고 같은 시도 한도를 쓴다.
|
|
2606
|
+
* 틀리면 구분 없이 404 `ORDER_NOT_FOUND`다.
|
|
2607
|
+
*/
|
|
2608
|
+
revealGuestCode: (orderId: string, orderItemId: string, body: {
|
|
2609
|
+
phone: string;
|
|
2610
|
+
orderPassword: string;
|
|
2611
|
+
}) => Promise<{
|
|
2612
|
+
orderItemId: string;
|
|
2613
|
+
codes: {
|
|
2614
|
+
codeId: string;
|
|
2615
|
+
code: string;
|
|
2616
|
+
revealedAt: string;
|
|
2617
|
+
}[];
|
|
2618
|
+
}>;
|
|
1949
2619
|
decidePurchase: (orderItemId: string) => Promise<void>;
|
|
1950
2620
|
};
|
|
1951
2621
|
myClaims: {
|
|
@@ -1956,6 +2626,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1956
2626
|
claimDeliveryFee: number;
|
|
1957
2627
|
quantity: number;
|
|
1958
2628
|
deliveryFeeRefundAmount: number;
|
|
2629
|
+
couponChargeAmount: number;
|
|
2630
|
+
couponChargeRefundAmount: number;
|
|
1959
2631
|
}>;
|
|
1960
2632
|
list: (params?: PageParams & {
|
|
1961
2633
|
status?: ClaimStatus;
|
|
@@ -2089,6 +2761,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2089
2761
|
discountedPrice: number | null;
|
|
2090
2762
|
discountRate: number | null;
|
|
2091
2763
|
freeShipping: boolean;
|
|
2764
|
+
fulfillmentType: string;
|
|
2765
|
+
requiresShipping: boolean;
|
|
2092
2766
|
averageRating: number;
|
|
2093
2767
|
reviewCount: number;
|
|
2094
2768
|
soldOut: boolean;
|
|
@@ -2136,6 +2810,27 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2136
2810
|
}>;
|
|
2137
2811
|
};
|
|
2138
2812
|
me: {
|
|
2813
|
+
/** `GET /me/coupons` — 내 쿠폰(이슈 #47). `status`로 사용 가능·사용함·기간 지남을 거른다 */
|
|
2814
|
+
coupons: (params?: {
|
|
2815
|
+
status?: "available" | "used" | "expired";
|
|
2816
|
+
}) => Promise<{
|
|
2817
|
+
issueId: string;
|
|
2818
|
+
couponId: string;
|
|
2819
|
+
name: string;
|
|
2820
|
+
description: string | null;
|
|
2821
|
+
kind: string;
|
|
2822
|
+
benefit: {
|
|
2823
|
+
type: string;
|
|
2824
|
+
value: number;
|
|
2825
|
+
maxDiscountAmount: number | null;
|
|
2826
|
+
};
|
|
2827
|
+
minOrderAmount: number;
|
|
2828
|
+
status: string;
|
|
2829
|
+
validFrom: string;
|
|
2830
|
+
validUntil: string | null;
|
|
2831
|
+
usedOrderId: string | null;
|
|
2832
|
+
issuedAt: string;
|
|
2833
|
+
}[]>;
|
|
2139
2834
|
customerInquiries: {
|
|
2140
2835
|
create: (body: CreateCustomerInquiryRequest) => Promise<{
|
|
2141
2836
|
inquiryId: string;
|
|
@@ -2307,130 +3002,6 @@ type AnalyticsBatch = z.infer<typeof analyticsBatchSchema>;
|
|
|
2307
3002
|
/** 배치 본문 상한(바이트) — 서버가 넘는 요청을 거부한다 */
|
|
2308
3003
|
declare const ANALYTICS_MAX_BATCH_BYTES: number;
|
|
2309
3004
|
//#endregion
|
|
2310
|
-
//#region src/schemas/order.d.ts
|
|
2311
|
-
declare const myOrderItemSchema: z.ZodObject<{
|
|
2312
|
-
orderItemId: z.ZodString;
|
|
2313
|
-
productId: z.ZodString;
|
|
2314
|
-
productName: z.ZodString;
|
|
2315
|
-
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
2316
|
-
optionName: z.ZodNullable<z.ZodString>;
|
|
2317
|
-
quantity: z.ZodNumber;
|
|
2318
|
-
canceledQuantity: z.ZodNumber;
|
|
2319
|
-
activeQuantity: z.ZodNumber;
|
|
2320
|
-
totalPrice: z.ZodNumber;
|
|
2321
|
-
status: z.ZodEnum<{
|
|
2322
|
-
CANCELED: "CANCELED";
|
|
2323
|
-
PAYMENT_WAITING: "PAYMENT_WAITING";
|
|
2324
|
-
PAID: "PAID";
|
|
2325
|
-
CONFIRMED: "CONFIRMED";
|
|
2326
|
-
DISPATCHED: "DISPATCHED";
|
|
2327
|
-
DELIVERING: "DELIVERING";
|
|
2328
|
-
DELIVERED: "DELIVERED";
|
|
2329
|
-
PURCHASE_DECIDED: "PURCHASE_DECIDED";
|
|
2330
|
-
}>;
|
|
2331
|
-
claimStatus: z.ZodNullable<z.ZodString>;
|
|
2332
|
-
reviewWritten: z.ZodBoolean;
|
|
2333
|
-
autoDecisionDate: z.ZodNullable<z.ZodString>;
|
|
2334
|
-
}, z.core.$strip>;
|
|
2335
|
-
type MyOrderItem = z.infer<typeof myOrderItemSchema>;
|
|
2336
|
-
/**
|
|
2337
|
-
* 주문 응답의 배송지 — 결제 요청 시 저장된 스냅샷. 요청 스키마(`shippingAddressInputSchema`)와 분리한 응답 스키마라
|
|
2338
|
-
* 형식 검증(regex·길이)을 하지 않는다. 입력하지 않은 선택 필드는 null로 오거나 빠질 수 있다.
|
|
2339
|
-
*/
|
|
2340
|
-
declare const orderShippingAddressSchema: z.ZodObject<{
|
|
2341
|
-
receiverName: z.ZodString;
|
|
2342
|
-
phone: z.ZodString;
|
|
2343
|
-
zipCode: z.ZodString;
|
|
2344
|
-
address1: z.ZodString;
|
|
2345
|
-
address2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2346
|
-
deliveryMemo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2347
|
-
entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2348
|
-
}, z.core.$strip>;
|
|
2349
|
-
type OrderShippingAddress = z.infer<typeof orderShippingAddressSchema>;
|
|
2350
|
-
declare const myOrderSchema: z.ZodObject<{
|
|
2351
|
-
orderId: z.ZodString;
|
|
2352
|
-
orderedAt: z.ZodString;
|
|
2353
|
-
items: z.ZodArray<z.ZodObject<{
|
|
2354
|
-
orderItemId: z.ZodString;
|
|
2355
|
-
productId: z.ZodString;
|
|
2356
|
-
productName: z.ZodString;
|
|
2357
|
-
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
2358
|
-
optionName: z.ZodNullable<z.ZodString>;
|
|
2359
|
-
quantity: z.ZodNumber;
|
|
2360
|
-
canceledQuantity: z.ZodNumber;
|
|
2361
|
-
activeQuantity: z.ZodNumber;
|
|
2362
|
-
totalPrice: z.ZodNumber;
|
|
2363
|
-
status: z.ZodEnum<{
|
|
2364
|
-
CANCELED: "CANCELED";
|
|
2365
|
-
PAYMENT_WAITING: "PAYMENT_WAITING";
|
|
2366
|
-
PAID: "PAID";
|
|
2367
|
-
CONFIRMED: "CONFIRMED";
|
|
2368
|
-
DISPATCHED: "DISPATCHED";
|
|
2369
|
-
DELIVERING: "DELIVERING";
|
|
2370
|
-
DELIVERED: "DELIVERED";
|
|
2371
|
-
PURCHASE_DECIDED: "PURCHASE_DECIDED";
|
|
2372
|
-
}>;
|
|
2373
|
-
claimStatus: z.ZodNullable<z.ZodString>;
|
|
2374
|
-
reviewWritten: z.ZodBoolean;
|
|
2375
|
-
autoDecisionDate: z.ZodNullable<z.ZodString>;
|
|
2376
|
-
}, z.core.$strip>>;
|
|
2377
|
-
shippingAddress: z.ZodObject<{
|
|
2378
|
-
receiverName: z.ZodString;
|
|
2379
|
-
phone: z.ZodString;
|
|
2380
|
-
zipCode: z.ZodString;
|
|
2381
|
-
address1: z.ZodString;
|
|
2382
|
-
address2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2383
|
-
deliveryMemo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2384
|
-
entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2385
|
-
}, z.core.$strip>;
|
|
2386
|
-
payment: z.ZodObject<{
|
|
2387
|
-
method: z.ZodEnum<{
|
|
2388
|
-
CARD: "CARD";
|
|
2389
|
-
EASY_PAY: "EASY_PAY";
|
|
2390
|
-
BANK_TRANSFER: "BANK_TRANSFER";
|
|
2391
|
-
VIRTUAL_ACCOUNT: "VIRTUAL_ACCOUNT";
|
|
2392
|
-
MOBILE: "MOBILE";
|
|
2393
|
-
}>;
|
|
2394
|
-
easyPayProvider: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
2395
|
-
totalAmount: z.ZodNumber;
|
|
2396
|
-
paidAt: z.ZodNullable<z.ZodString>;
|
|
2397
|
-
receiptUrl: z.ZodNullable<z.ZodURL>;
|
|
2398
|
-
}, z.core.$strip>;
|
|
2399
|
-
testPayment: z.ZodBoolean;
|
|
2400
|
-
}, z.core.$strip>;
|
|
2401
|
-
type MyOrder = z.infer<typeof myOrderSchema>;
|
|
2402
|
-
/**
|
|
2403
|
-
* 택배 추적 단계. 응답에서는 문자열로 받는다(값이 추가될 수 있다) — 현재 값은 `ACCEPTED`(접수)·`IN_TRANSIT`(이동 중)·
|
|
2404
|
-
* `OUT_FOR_DELIVERY`(배송 출발)·`DELIVERED`(배송완료)다.
|
|
2405
|
-
*/
|
|
2406
|
-
declare const trackingStageResponseSchema: z.ZodString;
|
|
2407
|
-
declare const deliveryTrackingSchema: z.ZodObject<{
|
|
2408
|
-
carrierName: z.ZodString;
|
|
2409
|
-
trackingNumber: z.ZodString;
|
|
2410
|
-
trackingUrl: z.ZodURL;
|
|
2411
|
-
status: z.ZodEnum<{
|
|
2412
|
-
DISPATCHED: "DISPATCHED";
|
|
2413
|
-
DELIVERING: "DELIVERING";
|
|
2414
|
-
DELIVERED: "DELIVERED";
|
|
2415
|
-
}>;
|
|
2416
|
-
trackingEvents: z.ZodArray<z.ZodObject<{
|
|
2417
|
-
status: z.ZodString;
|
|
2418
|
-
location: z.ZodString;
|
|
2419
|
-
occurredAt: z.ZodString;
|
|
2420
|
-
stage: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
2421
|
-
}, z.core.$strip>>;
|
|
2422
|
-
trackingStage: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
2423
|
-
trackingCheckedAt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
2424
|
-
}, z.core.$strip>;
|
|
2425
|
-
type DeliveryTracking = z.infer<typeof deliveryTrackingSchema>;
|
|
2426
|
-
/** `POST /me/order-items/{orderItemId}/purchase-decision` 응답 */
|
|
2427
|
-
declare const purchaseDecisionResultSchema: z.ZodObject<{
|
|
2428
|
-
orderItemId: z.ZodString;
|
|
2429
|
-
status: z.ZodLiteral<"PURCHASE_DECIDED">;
|
|
2430
|
-
decidedAt: z.ZodString;
|
|
2431
|
-
}, z.core.$strip>;
|
|
2432
|
-
type PurchaseDecisionResult = z.infer<typeof purchaseDecisionResultSchema>;
|
|
2433
|
-
//#endregion
|
|
2434
3005
|
//#region src/schemas/store.d.ts
|
|
2435
3006
|
/**
|
|
2436
3007
|
* 스토어 공개 설정 — `GET /store`. 스토어프론트가 화면을 그릴 때 읽는 값만 담는다.
|
|
@@ -2451,4 +3022,4 @@ declare const storefrontStoreSchema: z.ZodObject<{
|
|
|
2451
3022
|
}, z.core.$strip>;
|
|
2452
3023
|
type StorefrontStore = z.infer<typeof storefrontStoreSchema>;
|
|
2453
3024
|
//#endregion
|
|
2454
|
-
export {
|
|
3025
|
+
export { fulfillmentRevealSchema as $, easyPayProviderSchema as $n, consentSourceSchema as $t, ReviewSummary as A, PAYMENT_STATUS_VALUES as An, PageInfo as Ar, CouponApplication as At, updateReviewResultSchema as B, ShippingAddressInput as Bn, Cart as Br, couponBenefitViewSchema as Bt, StorefrontSession as C, DeliveryQuoteRequest as Cn, productCardSchema as Cr, CustomerInquiryCategory as Ct, CreateReviewResult as D, KnownPaymentResult as Dn, productSortSchema as Dr, ApplicableCoupon as Dt, CreateReviewRequest as E, GuestInfo as En, productPageSchema as Er, customerInquirySchema as Et, createReviewResultSchema as F, PaymentStart as Fn, orderItemStatusSchema as Fr, applicableCouponSchema as Ft, FulfillmentReveal as G, cashReceiptRequestSchema as Gn, cartSchema as Gr, ConsentAction as Gt, DeliveryTracking as H, availablePaymentOptionSchema as Hn, UpdateCartItemRequest as Hr, myCouponListQuerySchema as Ht, publicReviewSchema as I, PaymentStatus as In, pageInfoSchema as Ir, checkoutPricingRequestSchema as It, OrderShippingAddress as J, checkoutSessionSchema as Jn, ConsentState as Jt, MyOrder as K, cashReceiptTypeSchema as Kn, updateCartItemRequestSchema as Kr, ConsentKind as Kt, reviewPageSchema as L, PgProvider as Ln, pageSchema as Lr, checkoutPricingSchema as Lt, UpdateReviewResult as M, PaymentMessage as Mn, claimStatusSchema as Mr, MAX_COUPONS_PER_CHECKOUT as Mt, WritableReview as N, PaymentMethod as Nn, fulfillmentTypeField as Nr, MIN_PAYMENT_AMOUNT as Nt, PublicReview as O, KnownPaymentStatus as On, ClaimStatus as Or, CheckoutPricing as Ot, createReviewRequestSchema as P, PaymentOption as Pn, isShippingFulfillment as Pr, MyCoupon as Pt, downloadRequestSchema as Q, easyPayProviderResponseSchema as Qn, consentKindSchema as Qt, reviewSummarySchema as R, RemoteArea as Rn, requiresShippingField as Rr, couponApplicationListSchema as Rt, SessionStorage as S, CreateCheckoutRequest as Sn, categoryNodeSchema as Sr, CustomerInquiry as St, createStorefrontSession as T, EasyPayProvider as Tn, productFacetsSchema as Tr, customerInquiryCategorySchema as Tt, DownloadLink as U, cashReceiptAvailable as Un, addCartItemRequestSchema as Ur, myCouponSchema as Ut, writableReviewSchema as V, StartPaymentRequest as Vn, CartItem as Vr, couponResultSchema as Vt, DownloadRequest as W, cashReceiptIdentityTypeOf as Wn, cartItemSchema as Wr, pricingAmountsSchema as Wt, deliveryTrackingSchema as X, deliveryQuoteRequestSchema as Xn, MemberConsents as Xt, PurchaseDecisionResult as Y, createCheckoutRequestSchema as Yn, ConsentUpdateRequest as Yt, downloadLinkSchema as Z, deliveryQuoteSchema as Zn, consentActionSchema as Zt, analyticsServerEventNameSchema as _, CashReceiptIdentityType as _n, ProductDetail as _r, PublicInquiry as _t, ANALYTICS_SESSION_HEADER as a, ClaimType as an, paymentOptionListSchema as ar, Member as at, createStorefrontClient as b, CheckoutDelivery as bn, ProductSearchParams as br, publicInquirySchema as bt, AnalyticsBatch as c, MyClaim as cn, paymentStatusSchema as cr, UpdateProfileRequest as ct, AnalyticsEventName as d, claimTypeSchema as dn, residentNumberLike as dr, memberAddressSchema as dt, consentStateSchema as en, guestInfoSchema as er, myOrderItemSchema as et, AnalyticsServerEventName as f, createClaimRequestSchema as fn, retryPaymentRequestSchema as fr, memberSchema as ft, analyticsIdSchema as g, CASH_RECEIPT_METHODS as gn, ProductCard as gr, CreateInquiryResult as gt, analyticsClientEventSchema as h, AvailablePaymentOption as hn, CategoryNode as hr, CreateInquiryRequest as ht, ANALYTICS_SESSION_COOKIE as i, ClaimReturnAddress as in, paymentOptionKey as ir, trackingStageResponseSchema as it, UpdateReviewRequest as j, PaymentFailureCategory as jn, PageParams as jr, CouponResult as jt, ReviewPage as k, PAYMENT_RESULT_VALUES as kn, OrderItemStatus as kr, CheckoutPricingRequest as kt, AnalyticsClientEvent as l, claimReasonSchema as ln, pgProviderSchema as lr, WishlistAddResult as lt, analyticsClientEventNameSchema as m, myClaimSchema as mn, startPaymentRequestSchema as mr, wishlistAddResultSchema as mt, storefrontStoreSchema as n, memberConsentsSchema as nn, paymentMessageSchema as nr, orderShippingAddressSchema as nt, ANALYTICS_VISITOR_COOKIE as o, CreateClaimRequest as on, paymentOptionSchema as or, MemberAddress as ot, analyticsBatchSchema as p, createClaimResultSchema as pn, shippingAddressInputSchema as pr, updateProfileRequestSchema as pt, MyOrderItem as q, checkoutDeliverySchema as qn, analyticsIdsFromCookie as qr, ConsentSource as qt, ANALYTICS_MAX_BATCH_BYTES as r, ClaimReason as rn, paymentMethodSchema as rr, purchaseDecisionResultSchema as rt, ANALYTICS_VISITOR_HEADER as s, CreateClaimResult as sn, paymentStartSchema as sr, MemberAddressRequest as st, StorefrontStore as t, consentUpdateRequestSchema as tn, paymentFailureCategorySchema as tr, myOrderSchema as tt, AnalyticsClientEventName as u, claimReturnAddressSchema as un, remoteAreaSchema as ur, memberAddressRequestSchema as ut, StorefrontClient as v, CashReceiptRequest as vn, ProductFacets as vr, createInquiryRequestSchema as vt, StorefrontSessionOptions as w, DeliveryQuoteResult as wn, productDetailSchema as wr, createCustomerInquiryRequestSchema as wt, STOREFRONT_SESSION_KEYS as x, CheckoutSession as xn, ProductSort as xr, CreateCustomerInquiryRequest as xt, StorefrontClientOptions as y, CashReceiptType as yn, ProductPage as yr, createInquiryResultSchema as yt, updateReviewRequestSchema as z, RetryPaymentRequest as zn, AddCartItemRequest as zr, couponApplicationSchema as zt };
|