@sayren/storefront-sdk 0.13.0 → 0.15.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.
@@ -26,6 +26,11 @@ declare const cartItemSchema: z.ZodObject<{
26
26
  quantity: z.ZodNumber;
27
27
  unitPrice: z.ZodNumber;
28
28
  totalPrice: z.ZodNumber;
29
+ fulfillment: z.ZodObject<{
30
+ type: z.ZodString;
31
+ requiresShipping: z.ZodBoolean;
32
+ withdrawalRestricted: z.ZodBoolean;
33
+ }, z.core.$strip>;
29
34
  purchasable: z.ZodBoolean;
30
35
  unpurchasableReason: z.ZodNullable<z.ZodEnum<{
31
36
  SOLD_OUT: "SOLD_OUT";
@@ -45,6 +50,11 @@ declare const cartSchema: z.ZodObject<{
45
50
  quantity: z.ZodNumber;
46
51
  unitPrice: z.ZodNumber;
47
52
  totalPrice: z.ZodNumber;
53
+ fulfillment: z.ZodObject<{
54
+ type: z.ZodString;
55
+ requiresShipping: z.ZodBoolean;
56
+ withdrawalRestricted: z.ZodBoolean;
57
+ }, z.core.$strip>;
48
58
  purchasable: z.ZodBoolean;
49
59
  unpurchasableReason: z.ZodNullable<z.ZodEnum<{
50
60
  SOLD_OUT: "SOLD_OUT";
@@ -56,6 +66,7 @@ declare const cartSchema: z.ZodObject<{
56
66
  productAmount: z.ZodNumber;
57
67
  deliveryFee: z.ZodNumber;
58
68
  totalAmount: z.ZodNumber;
69
+ requiresShipping: z.ZodBoolean;
59
70
  }, z.core.$strip>;
60
71
  }, z.core.$strip>;
61
72
  type Cart = z.infer<typeof cartSchema>;
@@ -71,6 +82,132 @@ declare const updateCartItemRequestSchema: z.ZodObject<{
71
82
  }, z.core.$strip>;
72
83
  type UpdateCartItemRequest = z.infer<typeof updateCartItemRequestSchema>;
73
84
  //#endregion
85
+ //#region src/schemas/fulfillment.d.ts
86
+ /** 모르는 유형 — SDK가 아직 모르는 유형이다 */
87
+ interface UnknownFulfillmentView {
88
+ type: "OTHER";
89
+ /** 서버가 보낸 유형 이름 */
90
+ rawType: string;
91
+ requiresShipping: boolean;
92
+ }
93
+ /** 방문 수령 장소 표시값 — 주소 id는 싣지 않는다 */
94
+ declare const pickupLocationSchema: z.ZodObject<{
95
+ name: z.ZodString;
96
+ zipCode: z.ZodString;
97
+ address1: z.ZodString;
98
+ address2: z.ZodNullable<z.ZodString>;
99
+ phone: z.ZodString;
100
+ }, z.core.$strip>;
101
+ type PickupLocation = z.infer<typeof pickupLocationSchema>;
102
+ /** 상품 카드(목록·찜)의 이행 — 유형과 배송 필요 여부만. 배송비·환불 정책은 상세에서 본다 */
103
+ declare const productCardFulfillmentSchema: z.ZodObject<{
104
+ type: z.ZodString;
105
+ requiresShipping: z.ZodBoolean;
106
+ }, z.core.$strip>;
107
+ type ProductCardFulfillment = z.infer<typeof productCardFulfillmentSchema>;
108
+ /** 상품 상세의 이행 */
109
+ declare const productFulfillmentViewSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
110
+ type: z.ZodLiteral<"SHIPPING">;
111
+ requiresShipping: z.ZodLiteral<true>;
112
+ shipping: z.ZodObject<{
113
+ deliveryType: z.ZodString;
114
+ deliveryFee: z.ZodNumber;
115
+ conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
116
+ estimatedDays: z.ZodString;
117
+ returnDeliveryFee: z.ZodNumber;
118
+ exchangeDeliveryFee: z.ZodNumber;
119
+ }, z.core.$strip>;
120
+ }, z.core.$strip>, z.ZodObject<{
121
+ type: z.ZodLiteral<"DOWNLOAD">;
122
+ requiresShipping: z.ZodLiteral<false>;
123
+ download: z.ZodObject<{
124
+ limit: z.ZodNumber;
125
+ days: z.ZodNumber;
126
+ withdrawalRestricted: z.ZodBoolean;
127
+ }, z.core.$strip>;
128
+ }, z.core.$strip>, z.ZodObject<{
129
+ type: z.ZodLiteral<"CODE">;
130
+ requiresShipping: z.ZodLiteral<false>;
131
+ code: z.ZodObject<{
132
+ withdrawalRestricted: z.ZodBoolean;
133
+ }, z.core.$strip>;
134
+ }, z.core.$strip>, z.ZodObject<{
135
+ type: z.ZodLiteral<"SERVICE">;
136
+ requiresShipping: z.ZodLiteral<false>;
137
+ }, z.core.$strip>, z.ZodObject<{
138
+ type: z.ZodLiteral<"PICKUP">;
139
+ requiresShipping: z.ZodLiteral<false>;
140
+ pickup: z.ZodObject<{
141
+ location: z.ZodNullable<z.ZodObject<{
142
+ name: z.ZodString;
143
+ zipCode: z.ZodString;
144
+ address1: z.ZodString;
145
+ address2: z.ZodNullable<z.ZodString>;
146
+ phone: z.ZodString;
147
+ }, z.core.$strip>>;
148
+ }, z.core.$strip>;
149
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
150
+ type: z.ZodString;
151
+ requiresShipping: z.ZodBoolean;
152
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillmentView, {
153
+ [x: string]: unknown;
154
+ type: string;
155
+ requiresShipping: boolean;
156
+ }>>]>;
157
+ type ProductFulfillmentView = z.infer<typeof productFulfillmentViewSchema>;
158
+ /** 장바구니 줄·주문서 줄의 이행 — 주문서 줄은 주문서 시점 스냅샷이다 */
159
+ declare const lineFulfillmentSchema: z.ZodObject<{
160
+ type: z.ZodString;
161
+ requiresShipping: z.ZodBoolean;
162
+ withdrawalRestricted: z.ZodBoolean;
163
+ }, z.core.$strip>;
164
+ type LineFulfillment = z.infer<typeof lineFulfillmentSchema>;
165
+ /**
166
+ * 내 주문 주문상품의 주문 시점 이행 스냅샷. 상품을 나중에 고쳐도 바뀌지 않는다. 실제 제공 기록(코드 가린 값·다운로드 남은 횟수)은
167
+ * 주문상품의 `fulfillment`다.
168
+ */
169
+ declare const myOrderItemFulfillmentSnapshotSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
170
+ type: z.ZodLiteral<"SHIPPING">;
171
+ requiresShipping: z.ZodLiteral<true>;
172
+ }, z.core.$strip>, z.ZodObject<{
173
+ type: z.ZodLiteral<"DOWNLOAD">;
174
+ requiresShipping: z.ZodLiteral<false>;
175
+ download: z.ZodObject<{
176
+ withdrawalRestricted: z.ZodBoolean;
177
+ }, z.core.$strip>;
178
+ }, z.core.$strip>, z.ZodObject<{
179
+ type: z.ZodLiteral<"CODE">;
180
+ requiresShipping: z.ZodLiteral<false>;
181
+ code: z.ZodObject<{
182
+ withdrawalRestricted: z.ZodBoolean;
183
+ }, z.core.$strip>;
184
+ }, z.core.$strip>, z.ZodObject<{
185
+ type: z.ZodLiteral<"SERVICE">;
186
+ requiresShipping: z.ZodLiteral<false>;
187
+ }, z.core.$strip>, z.ZodObject<{
188
+ type: z.ZodLiteral<"PICKUP">;
189
+ requiresShipping: z.ZodLiteral<false>;
190
+ pickup: z.ZodObject<{
191
+ location: z.ZodNullable<z.ZodObject<{
192
+ name: z.ZodString;
193
+ zipCode: z.ZodString;
194
+ address1: z.ZodString;
195
+ address2: z.ZodNullable<z.ZodString>;
196
+ phone: z.ZodString;
197
+ }, z.core.$strip>>;
198
+ }, z.core.$strip>;
199
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
200
+ type: z.ZodString;
201
+ requiresShipping: z.ZodBoolean;
202
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillmentView, {
203
+ [x: string]: unknown;
204
+ type: string;
205
+ requiresShipping: boolean;
206
+ }>>]>;
207
+ type MyOrderItemFulfillmentSnapshot = z.infer<typeof myOrderItemFulfillmentSnapshotSchema>;
208
+ /** 청약철회 제한 대상인가 — 파일 다운로드·코드 발급만 켤 수 있다 */
209
+ declare function withdrawalRestrictedOfView(fulfillment: ProductFulfillmentView | MyOrderItemFulfillmentSnapshot): boolean;
210
+ //#endregion
74
211
  //#region src/schemas/common.d.ts
75
212
  declare const pageInfoSchema: z.ZodObject<{
76
213
  page: z.ZodNumber;
@@ -91,6 +228,7 @@ interface PageParams {
91
228
  size?: number;
92
229
  }
93
230
  declare const orderItemStatusSchema: z.ZodEnum<{
231
+ CANCELED: "CANCELED";
94
232
  PAYMENT_WAITING: "PAYMENT_WAITING";
95
233
  PAID: "PAID";
96
234
  CONFIRMED: "CONFIRMED";
@@ -98,10 +236,10 @@ declare const orderItemStatusSchema: z.ZodEnum<{
98
236
  DELIVERING: "DELIVERING";
99
237
  DELIVERED: "DELIVERED";
100
238
  PURCHASE_DECIDED: "PURCHASE_DECIDED";
101
- CANCELED: "CANCELED";
102
239
  }>;
103
240
  type OrderItemStatus = z.infer<typeof orderItemStatusSchema>;
104
241
  declare const claimStatusSchema: z.ZodEnum<{
242
+ COMPLETED: "COMPLETED";
105
243
  REQUESTED: "REQUESTED";
106
244
  HELD: "HELD";
107
245
  COLLECTING: "COLLECTING";
@@ -109,7 +247,6 @@ declare const claimStatusSchema: z.ZodEnum<{
109
247
  REDELIVERING: "REDELIVERING";
110
248
  APPROVED: "APPROVED";
111
249
  REJECTED: "REJECTED";
112
- COMPLETED: "COMPLETED";
113
250
  WITHDRAWN: "WITHDRAWN";
114
251
  }>;
115
252
  type ClaimStatus = z.infer<typeof claimStatusSchema>;
@@ -130,6 +267,10 @@ declare const productCardSchema: z.ZodObject<{
130
267
  discountedPrice: z.ZodNullable<z.ZodNumber>;
131
268
  discountRate: z.ZodNullable<z.ZodNumber>;
132
269
  freeShipping: z.ZodBoolean;
270
+ fulfillment: z.ZodObject<{
271
+ type: z.ZodString;
272
+ requiresShipping: z.ZodBoolean;
273
+ }, z.core.$strip>;
133
274
  averageRating: z.ZodNumber;
134
275
  reviewCount: z.ZodNumber;
135
276
  soldOut: z.ZodBoolean;
@@ -163,21 +304,55 @@ declare const productDetailSchema: z.ZodObject<{
163
304
  additionalPrice: z.ZodNumber;
164
305
  soldOut: z.ZodBoolean;
165
306
  }, z.core.$strip>>;
166
- delivery: z.ZodObject<{
167
- type: z.ZodEnum<{
168
- PAID: "PAID";
169
- FREE: "FREE";
170
- CONDITIONAL_FREE: "CONDITIONAL_FREE";
171
- }>;
172
- fee: z.ZodNumber;
173
- conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
174
- estimatedDays: z.ZodString;
175
- }, z.core.$strip>;
176
- returnPolicy: z.ZodObject<{
177
- returnFee: z.ZodNumber;
178
- exchangeFee: z.ZodNumber;
179
- periodDays: z.ZodNumber;
180
- }, z.core.$strip>;
307
+ fulfillment: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
308
+ type: z.ZodLiteral<"SHIPPING">;
309
+ requiresShipping: z.ZodLiteral<true>;
310
+ shipping: z.ZodObject<{
311
+ deliveryType: z.ZodString;
312
+ deliveryFee: z.ZodNumber;
313
+ conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
314
+ estimatedDays: z.ZodString;
315
+ returnDeliveryFee: z.ZodNumber;
316
+ exchangeDeliveryFee: z.ZodNumber;
317
+ }, z.core.$strip>;
318
+ }, z.core.$strip>, z.ZodObject<{
319
+ type: z.ZodLiteral<"DOWNLOAD">;
320
+ requiresShipping: z.ZodLiteral<false>;
321
+ download: z.ZodObject<{
322
+ limit: z.ZodNumber;
323
+ days: z.ZodNumber;
324
+ withdrawalRestricted: z.ZodBoolean;
325
+ }, z.core.$strip>;
326
+ }, z.core.$strip>, z.ZodObject<{
327
+ type: z.ZodLiteral<"CODE">;
328
+ requiresShipping: z.ZodLiteral<false>;
329
+ code: z.ZodObject<{
330
+ withdrawalRestricted: z.ZodBoolean;
331
+ }, z.core.$strip>;
332
+ }, z.core.$strip>, z.ZodObject<{
333
+ type: z.ZodLiteral<"SERVICE">;
334
+ requiresShipping: z.ZodLiteral<false>;
335
+ }, z.core.$strip>, z.ZodObject<{
336
+ type: z.ZodLiteral<"PICKUP">;
337
+ requiresShipping: z.ZodLiteral<false>;
338
+ pickup: z.ZodObject<{
339
+ location: z.ZodNullable<z.ZodObject<{
340
+ name: z.ZodString;
341
+ zipCode: z.ZodString;
342
+ address1: z.ZodString;
343
+ address2: z.ZodNullable<z.ZodString>;
344
+ phone: z.ZodString;
345
+ }, z.core.$strip>>;
346
+ }, z.core.$strip>;
347
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
348
+ type: z.ZodString;
349
+ requiresShipping: z.ZodBoolean;
350
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillmentView, {
351
+ [x: string]: unknown;
352
+ type: string;
353
+ requiresShipping: boolean;
354
+ }>>]>;
355
+ returnPeriodDays: z.ZodNumber;
181
356
  categoryPath: z.ZodArray<z.ZodObject<{
182
357
  categoryId: z.ZodString;
183
358
  name: z.ZodString;
@@ -227,6 +402,10 @@ declare const productPageSchema: z.ZodObject<{
227
402
  discountedPrice: z.ZodNullable<z.ZodNumber>;
228
403
  discountRate: z.ZodNullable<z.ZodNumber>;
229
404
  freeShipping: z.ZodBoolean;
405
+ fulfillment: z.ZodObject<{
406
+ type: z.ZodString;
407
+ requiresShipping: z.ZodBoolean;
408
+ }, z.core.$strip>;
230
409
  averageRating: z.ZodNumber;
231
410
  reviewCount: z.ZodNumber;
232
411
  soldOut: z.ZodBoolean;
@@ -296,11 +475,18 @@ declare const checkoutSessionSchema: z.ZodObject<{
296
475
  quantity: z.ZodNumber;
297
476
  unitPrice: z.ZodNumber;
298
477
  totalPrice: z.ZodNumber;
478
+ fulfillment: z.ZodObject<{
479
+ type: z.ZodString;
480
+ requiresShipping: z.ZodBoolean;
481
+ withdrawalRestricted: z.ZodBoolean;
482
+ }, z.core.$strip>;
299
483
  }, z.core.$strip>>;
300
484
  amounts: z.ZodObject<{
301
485
  productAmount: z.ZodNumber;
302
486
  deliveryFee: z.ZodNumber;
303
487
  totalAmount: z.ZodNumber;
488
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
489
+ deliveryDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
304
490
  }, z.core.$strip>;
305
491
  delivery: z.ZodObject<{
306
492
  baseFee: z.ZodNumber;
@@ -315,6 +501,11 @@ declare const checkoutSessionSchema: z.ZodObject<{
315
501
  freeByThreshold: z.ZodBoolean;
316
502
  zipCode: z.ZodNullable<z.ZodString>;
317
503
  }, z.core.$strip>;
504
+ requiresShipping: z.ZodBoolean;
505
+ withdrawal: z.ZodObject<{
506
+ required: z.ZodBoolean;
507
+ notice: z.ZodNullable<z.ZodString>;
508
+ }, z.core.$strip>;
318
509
  expiresAt: z.ZodString;
319
510
  paymentOptions: z.ZodLazy<z.ZodPreprocess<z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
320
511
  pg: z.ZodEnum<{
@@ -374,6 +565,8 @@ declare const deliveryQuoteSchema: z.ZodObject<{
374
565
  productAmount: z.ZodNumber;
375
566
  deliveryFee: z.ZodNumber;
376
567
  totalAmount: z.ZodNumber;
568
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
569
+ deliveryDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
377
570
  }, z.core.$strip>;
378
571
  delivery: z.ZodObject<{
379
572
  baseFee: z.ZodNumber;
@@ -667,7 +860,7 @@ declare const startPaymentRequestSchema: z.ZodObject<{
667
860
  method: z.ZodLiteral<"MOBILE">;
668
861
  }, z.core.$strip>], "method">;
669
862
  returnUrl: z.ZodURL;
670
- shippingAddress: z.ZodObject<{
863
+ shippingAddress: z.ZodOptional<z.ZodObject<{
671
864
  addressId: z.ZodOptional<z.ZodString>;
672
865
  receiverName: z.ZodString;
673
866
  phone: z.ZodString;
@@ -676,13 +869,14 @@ declare const startPaymentRequestSchema: z.ZodObject<{
676
869
  address2: z.ZodOptional<z.ZodString>;
677
870
  deliveryMemo: z.ZodOptional<z.ZodString>;
678
871
  entranceCode: z.ZodOptional<z.ZodString>;
679
- }, z.core.$strip>;
872
+ }, z.core.$strip>>;
680
873
  guest: z.ZodOptional<z.ZodObject<{
681
874
  name: z.ZodString;
682
875
  phone: z.ZodString;
683
876
  email: z.ZodEmail;
684
877
  orderPassword: z.ZodString;
685
878
  }, z.core.$strip>>;
879
+ withdrawalAgreement: z.ZodOptional<z.ZodBoolean>;
686
880
  cashReceipt: z.ZodOptional<z.ZodObject<{
687
881
  type: z.ZodEnum<{
688
882
  INCOME_DEDUCTION: "INCOME_DEDUCTION";
@@ -690,6 +884,11 @@ declare const startPaymentRequestSchema: z.ZodObject<{
690
884
  }>;
691
885
  identityNumber: z.ZodString;
692
886
  }, z.core.$strip>>;
887
+ coupons: z.ZodOptional<z.ZodArray<z.ZodObject<{
888
+ issueId: z.ZodOptional<z.ZodString>;
889
+ code: z.ZodOptional<z.ZodString>;
890
+ optionId: z.ZodOptional<z.ZodString>;
891
+ }, z.core.$strip>>>;
693
892
  }, z.core.$strip>;
694
893
  type StartPaymentRequest = z.infer<typeof startPaymentRequestSchema>;
695
894
  /**
@@ -792,6 +991,8 @@ declare const paymentStartSchema: z.ZodObject<{
792
991
  productAmount: z.ZodNumber;
793
992
  deliveryFee: z.ZodNumber;
794
993
  totalAmount: z.ZodNumber;
994
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
995
+ deliveryDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
795
996
  }, z.core.$strip>;
796
997
  delivery: z.ZodObject<{
797
998
  baseFee: z.ZodNumber;
@@ -894,6 +1095,8 @@ declare const createClaimResultSchema: z.ZodObject<{
894
1095
  claimDeliveryFee: z.ZodNumber;
895
1096
  quantity: z.ZodNumber;
896
1097
  deliveryFeeRefundAmount: z.ZodNumber;
1098
+ couponChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1099
+ couponChargeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
897
1100
  }, z.core.$strip>;
898
1101
  type CreateClaimResult = z.infer<typeof createClaimResultSchema>;
899
1102
  /**
@@ -920,6 +1123,7 @@ declare const myClaimSchema: z.ZodObject<{
920
1123
  EXCHANGE: "EXCHANGE";
921
1124
  }>;
922
1125
  status: z.ZodEnum<{
1126
+ COMPLETED: "COMPLETED";
923
1127
  REQUESTED: "REQUESTED";
924
1128
  HELD: "HELD";
925
1129
  COLLECTING: "COLLECTING";
@@ -927,7 +1131,6 @@ declare const myClaimSchema: z.ZodObject<{
927
1131
  REDELIVERING: "REDELIVERING";
928
1132
  APPROVED: "APPROVED";
929
1133
  REJECTED: "REJECTED";
930
- COMPLETED: "COMPLETED";
931
1134
  WITHDRAWN: "WITHDRAWN";
932
1135
  }>;
933
1136
  orderItemId: z.ZodString;
@@ -1051,6 +1254,152 @@ declare const consentUpdateRequestSchema: z.ZodObject<{
1051
1254
  }, z.core.$strip>;
1052
1255
  type ConsentUpdateRequest = z.infer<typeof consentUpdateRequestSchema>;
1053
1256
  //#endregion
1257
+ //#region src/schemas/coupon.d.ts
1258
+ /**
1259
+ * 스토어프론트 쿠폰 계약 (이슈 #47).
1260
+ *
1261
+ * 구매자는 주문서에서 쿠폰을 고르거나 코드를 입력한다. 금액 미리보기(`POST /checkout/{checkoutId}/pricing`)는
1262
+ * 주문서를 바꾸지 않는 읽기 계산이고, **확정은 결제 시작(`coupons` 필드)만 한다** — 결제 시작이 쿠폰을 예약하고 그 금액으로
1263
+ * 결제 금액을 정한다. 결제가 실패하거나 만료되면 예약이 풀려 같은 쿠폰을 다시 쓸 수 있다.
1264
+ *
1265
+ * 한 주문에 주문 쿠폰 1장, 주문상품 한 줄에 상품 쿠폰 1장까지다. 같은 쿠폰을 두 번 쓸 수 없다.
1266
+ */
1267
+ /** 적용할 쿠폰 한 장 — 발급 쿠폰 id 또는 코드 중 하나 */
1268
+ declare const couponApplicationSchema: z.ZodObject<{
1269
+ issueId: z.ZodOptional<z.ZodString>;
1270
+ code: z.ZodOptional<z.ZodString>;
1271
+ optionId: z.ZodOptional<z.ZodString>;
1272
+ }, z.core.$strip>;
1273
+ type CouponApplication = z.infer<typeof couponApplicationSchema>;
1274
+ /** 한 번에 적용할 수 있는 쿠폰 수 */
1275
+ declare const MAX_COUPONS_PER_CHECKOUT = 5;
1276
+ declare const couponApplicationListSchema: z.ZodArray<z.ZodObject<{
1277
+ issueId: z.ZodOptional<z.ZodString>;
1278
+ code: z.ZodOptional<z.ZodString>;
1279
+ optionId: z.ZodOptional<z.ZodString>;
1280
+ }, z.core.$strip>>;
1281
+ /** 쿠폰 혜택 — 응답 표시용. 값이 늘 수 있어 방식은 문자열이다 */
1282
+ declare const couponBenefitViewSchema: z.ZodObject<{
1283
+ type: z.ZodString;
1284
+ value: z.ZodNumber;
1285
+ maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
1286
+ }, z.core.$strip>;
1287
+ /** 쿠폰 한 장의 적용 결과 */
1288
+ declare const couponResultSchema: z.ZodObject<{
1289
+ couponId: z.ZodString;
1290
+ issueId: z.ZodNullable<z.ZodString>;
1291
+ code: z.ZodNullable<z.ZodString>;
1292
+ name: z.ZodString;
1293
+ kind: z.ZodString;
1294
+ benefit: z.ZodObject<{
1295
+ type: z.ZodString;
1296
+ value: z.ZodNumber;
1297
+ maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
1298
+ }, z.core.$strip>;
1299
+ applied: z.ZodBoolean;
1300
+ discountAmount: z.ZodNumber;
1301
+ rejectReason: z.ZodNullable<z.ZodString>;
1302
+ optionId: z.ZodNullable<z.ZodString>;
1303
+ }, z.core.$strip>;
1304
+ type CouponResult = z.infer<typeof couponResultSchema>;
1305
+ /** 쿠폰을 반영한 금액 — 결제 금액 = productAmount − couponDiscountAmount + deliveryFee − deliveryDiscountAmount */
1306
+ declare const pricingAmountsSchema: z.ZodObject<{
1307
+ productAmount: z.ZodNumber;
1308
+ deliveryFee: z.ZodNumber;
1309
+ couponDiscountAmount: z.ZodNumber;
1310
+ deliveryDiscountAmount: z.ZodNumber;
1311
+ totalAmount: z.ZodNumber;
1312
+ }, z.core.$strip>;
1313
+ /** `POST /checkout/{checkoutId}/pricing` 요청 */
1314
+ declare const checkoutPricingRequestSchema: z.ZodObject<{
1315
+ zipCode: z.ZodOptional<z.ZodString>;
1316
+ coupons: z.ZodArray<z.ZodObject<{
1317
+ issueId: z.ZodOptional<z.ZodString>;
1318
+ code: z.ZodOptional<z.ZodString>;
1319
+ optionId: z.ZodOptional<z.ZodString>;
1320
+ }, z.core.$strip>>;
1321
+ }, z.core.$strip>;
1322
+ type CheckoutPricingRequest = z.infer<typeof checkoutPricingRequestSchema>;
1323
+ /** 결제 금액의 하한 — 쿠폰 적용 뒤 결제 금액이 이보다 작으면 결제를 시작할 수 없다 */
1324
+ declare const MIN_PAYMENT_AMOUNT = 100;
1325
+ declare const checkoutPricingSchema: z.ZodObject<{
1326
+ amounts: z.ZodObject<{
1327
+ productAmount: z.ZodNumber;
1328
+ deliveryFee: z.ZodNumber;
1329
+ couponDiscountAmount: z.ZodNumber;
1330
+ deliveryDiscountAmount: z.ZodNumber;
1331
+ totalAmount: z.ZodNumber;
1332
+ }, z.core.$strip>;
1333
+ coupons: z.ZodArray<z.ZodObject<{
1334
+ couponId: z.ZodString;
1335
+ issueId: z.ZodNullable<z.ZodString>;
1336
+ code: z.ZodNullable<z.ZodString>;
1337
+ name: z.ZodString;
1338
+ kind: z.ZodString;
1339
+ benefit: z.ZodObject<{
1340
+ type: z.ZodString;
1341
+ value: z.ZodNumber;
1342
+ maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
1343
+ }, z.core.$strip>;
1344
+ applied: z.ZodBoolean;
1345
+ discountAmount: z.ZodNumber;
1346
+ rejectReason: z.ZodNullable<z.ZodString>;
1347
+ optionId: z.ZodNullable<z.ZodString>;
1348
+ }, z.core.$strip>>;
1349
+ items: z.ZodArray<z.ZodObject<{
1350
+ optionId: z.ZodNullable<z.ZodString>;
1351
+ couponDiscountAmount: z.ZodNumber;
1352
+ }, z.core.$strip>>;
1353
+ payable: z.ZodBoolean;
1354
+ }, z.core.$strip>;
1355
+ type CheckoutPricing = z.infer<typeof checkoutPricingSchema>;
1356
+ /** `GET /checkout/{checkoutId}/coupons` 항목 — 이 주문서에 쓸 수 있는 내 쿠폰 */
1357
+ declare const applicableCouponSchema: z.ZodObject<{
1358
+ issueId: z.ZodString;
1359
+ couponId: z.ZodString;
1360
+ name: z.ZodString;
1361
+ description: z.ZodNullable<z.ZodString>;
1362
+ kind: z.ZodString;
1363
+ benefit: z.ZodObject<{
1364
+ type: z.ZodString;
1365
+ value: z.ZodNumber;
1366
+ maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
1367
+ }, z.core.$strip>;
1368
+ minOrderAmount: z.ZodNumber;
1369
+ validUntil: z.ZodNullable<z.ZodString>;
1370
+ applicable: z.ZodBoolean;
1371
+ expectedDiscountAmount: z.ZodNumber;
1372
+ rejectReason: z.ZodNullable<z.ZodString>;
1373
+ }, z.core.$strip>;
1374
+ type ApplicableCoupon = z.infer<typeof applicableCouponSchema>;
1375
+ /** `GET /me/coupons` 항목 */
1376
+ declare const myCouponSchema: z.ZodObject<{
1377
+ issueId: z.ZodString;
1378
+ couponId: z.ZodString;
1379
+ name: z.ZodString;
1380
+ description: z.ZodNullable<z.ZodString>;
1381
+ kind: z.ZodString;
1382
+ benefit: z.ZodObject<{
1383
+ type: z.ZodString;
1384
+ value: z.ZodNumber;
1385
+ maxDiscountAmount: z.ZodNullable<z.ZodNumber>;
1386
+ }, z.core.$strip>;
1387
+ minOrderAmount: z.ZodNumber;
1388
+ status: z.ZodString;
1389
+ validFrom: z.ZodString;
1390
+ validUntil: z.ZodNullable<z.ZodString>;
1391
+ usedOrderId: z.ZodNullable<z.ZodString>;
1392
+ issuedAt: z.ZodString;
1393
+ }, z.core.$strip>;
1394
+ type MyCoupon = z.infer<typeof myCouponSchema>;
1395
+ declare const myCouponListQuerySchema: z.ZodObject<{
1396
+ status: z.ZodOptional<z.ZodEnum<{
1397
+ expired: "expired";
1398
+ available: "available";
1399
+ used: "used";
1400
+ }>>;
1401
+ }, z.core.$strip>;
1402
+ //#endregion
1054
1403
  //#region src/schemas/customer-inquiry.d.ts
1055
1404
  declare const customerInquiryCategorySchema: z.ZodEnum<{
1056
1405
  RETURN: "RETURN";
@@ -1167,6 +1516,290 @@ declare const wishlistAddResultSchema: z.ZodObject<{
1167
1516
  }, z.core.$strip>;
1168
1517
  type WishlistAddResult = z.infer<typeof wishlistAddResultSchema>;
1169
1518
  //#endregion
1519
+ //#region src/schemas/order.d.ts
1520
+ declare const myOrderItemSchema: z.ZodObject<{
1521
+ orderItemId: z.ZodString;
1522
+ productId: z.ZodString;
1523
+ productName: z.ZodString;
1524
+ thumbnailUrl: z.ZodNullable<z.ZodURL>;
1525
+ optionName: z.ZodNullable<z.ZodString>;
1526
+ quantity: z.ZodNumber;
1527
+ canceledQuantity: z.ZodNumber;
1528
+ activeQuantity: z.ZodNumber;
1529
+ totalPrice: z.ZodNumber;
1530
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1531
+ status: z.ZodEnum<{
1532
+ CANCELED: "CANCELED";
1533
+ PAYMENT_WAITING: "PAYMENT_WAITING";
1534
+ PAID: "PAID";
1535
+ CONFIRMED: "CONFIRMED";
1536
+ DISPATCHED: "DISPATCHED";
1537
+ DELIVERING: "DELIVERING";
1538
+ DELIVERED: "DELIVERED";
1539
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
1540
+ }>;
1541
+ fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
1542
+ type: z.ZodLiteral<"SHIPPING">;
1543
+ requiresShipping: z.ZodLiteral<true>;
1544
+ }, z.core.$strip>, z.ZodObject<{
1545
+ type: z.ZodLiteral<"DOWNLOAD">;
1546
+ requiresShipping: z.ZodLiteral<false>;
1547
+ download: z.ZodObject<{
1548
+ withdrawalRestricted: z.ZodBoolean;
1549
+ }, z.core.$strip>;
1550
+ }, z.core.$strip>, z.ZodObject<{
1551
+ type: z.ZodLiteral<"CODE">;
1552
+ requiresShipping: z.ZodLiteral<false>;
1553
+ code: z.ZodObject<{
1554
+ withdrawalRestricted: z.ZodBoolean;
1555
+ }, z.core.$strip>;
1556
+ }, z.core.$strip>, z.ZodObject<{
1557
+ type: z.ZodLiteral<"SERVICE">;
1558
+ requiresShipping: z.ZodLiteral<false>;
1559
+ }, z.core.$strip>, z.ZodObject<{
1560
+ type: z.ZodLiteral<"PICKUP">;
1561
+ requiresShipping: z.ZodLiteral<false>;
1562
+ pickup: z.ZodObject<{
1563
+ location: z.ZodNullable<z.ZodObject<{
1564
+ name: z.ZodString;
1565
+ zipCode: z.ZodString;
1566
+ address1: z.ZodString;
1567
+ address2: z.ZodNullable<z.ZodString>;
1568
+ phone: z.ZodString;
1569
+ }, z.core.$strip>>;
1570
+ }, z.core.$strip>;
1571
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
1572
+ type: z.ZodString;
1573
+ requiresShipping: z.ZodBoolean;
1574
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillmentView, {
1575
+ [x: string]: unknown;
1576
+ type: string;
1577
+ requiresShipping: boolean;
1578
+ }>>]>;
1579
+ fulfillment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1580
+ status: z.ZodString;
1581
+ fulfilledAt: z.ZodString;
1582
+ note: z.ZodNullable<z.ZodString>;
1583
+ codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
1584
+ codeId: z.ZodString;
1585
+ hint: z.ZodString;
1586
+ revealedAt: z.ZodNullable<z.ZodString>;
1587
+ }, z.core.$strip>>>>;
1588
+ download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1589
+ count: z.ZodNumber;
1590
+ limit: z.ZodNumber;
1591
+ expiresAt: z.ZodNullable<z.ZodString>;
1592
+ files: z.ZodArray<z.ZodObject<{
1593
+ assetId: z.ZodString;
1594
+ fileName: z.ZodString;
1595
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
1596
+ }, z.core.$strip>>;
1597
+ }, z.core.$strip>>>>;
1598
+ }, z.core.$strip>>>>;
1599
+ claimStatus: z.ZodNullable<z.ZodString>;
1600
+ reviewWritten: z.ZodBoolean;
1601
+ autoDecisionDate: z.ZodNullable<z.ZodString>;
1602
+ }, z.core.$strip>;
1603
+ type MyOrderItem = z.infer<typeof myOrderItemSchema>;
1604
+ /**
1605
+ * 주문 응답의 배송지 — 결제 요청 시 저장된 스냅샷. 요청 스키마(`shippingAddressInputSchema`)와 분리한 응답 스키마라
1606
+ * 형식 검증(regex·길이)을 하지 않는다. 입력하지 않은 선택 필드는 null로 오거나 빠질 수 있다.
1607
+ */
1608
+ declare const orderShippingAddressSchema: z.ZodObject<{
1609
+ receiverName: z.ZodString;
1610
+ phone: z.ZodString;
1611
+ zipCode: z.ZodString;
1612
+ address1: z.ZodString;
1613
+ address2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1614
+ deliveryMemo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1615
+ entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1616
+ }, z.core.$strip>;
1617
+ type OrderShippingAddress = z.infer<typeof orderShippingAddressSchema>;
1618
+ declare const myOrderSchema: z.ZodObject<{
1619
+ orderId: z.ZodString;
1620
+ orderedAt: z.ZodString;
1621
+ items: z.ZodArray<z.ZodObject<{
1622
+ orderItemId: z.ZodString;
1623
+ productId: z.ZodString;
1624
+ productName: z.ZodString;
1625
+ thumbnailUrl: z.ZodNullable<z.ZodURL>;
1626
+ optionName: z.ZodNullable<z.ZodString>;
1627
+ quantity: z.ZodNumber;
1628
+ canceledQuantity: z.ZodNumber;
1629
+ activeQuantity: z.ZodNumber;
1630
+ totalPrice: z.ZodNumber;
1631
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1632
+ status: z.ZodEnum<{
1633
+ CANCELED: "CANCELED";
1634
+ PAYMENT_WAITING: "PAYMENT_WAITING";
1635
+ PAID: "PAID";
1636
+ CONFIRMED: "CONFIRMED";
1637
+ DISPATCHED: "DISPATCHED";
1638
+ DELIVERING: "DELIVERING";
1639
+ DELIVERED: "DELIVERED";
1640
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
1641
+ }>;
1642
+ fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
1643
+ type: z.ZodLiteral<"SHIPPING">;
1644
+ requiresShipping: z.ZodLiteral<true>;
1645
+ }, z.core.$strip>, z.ZodObject<{
1646
+ type: z.ZodLiteral<"DOWNLOAD">;
1647
+ requiresShipping: z.ZodLiteral<false>;
1648
+ download: z.ZodObject<{
1649
+ withdrawalRestricted: z.ZodBoolean;
1650
+ }, z.core.$strip>;
1651
+ }, z.core.$strip>, z.ZodObject<{
1652
+ type: z.ZodLiteral<"CODE">;
1653
+ requiresShipping: z.ZodLiteral<false>;
1654
+ code: z.ZodObject<{
1655
+ withdrawalRestricted: z.ZodBoolean;
1656
+ }, z.core.$strip>;
1657
+ }, z.core.$strip>, z.ZodObject<{
1658
+ type: z.ZodLiteral<"SERVICE">;
1659
+ requiresShipping: z.ZodLiteral<false>;
1660
+ }, z.core.$strip>, z.ZodObject<{
1661
+ type: z.ZodLiteral<"PICKUP">;
1662
+ requiresShipping: z.ZodLiteral<false>;
1663
+ pickup: z.ZodObject<{
1664
+ location: z.ZodNullable<z.ZodObject<{
1665
+ name: z.ZodString;
1666
+ zipCode: z.ZodString;
1667
+ address1: z.ZodString;
1668
+ address2: z.ZodNullable<z.ZodString>;
1669
+ phone: z.ZodString;
1670
+ }, z.core.$strip>>;
1671
+ }, z.core.$strip>;
1672
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
1673
+ type: z.ZodString;
1674
+ requiresShipping: z.ZodBoolean;
1675
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillmentView, {
1676
+ [x: string]: unknown;
1677
+ type: string;
1678
+ requiresShipping: boolean;
1679
+ }>>]>;
1680
+ fulfillment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1681
+ status: z.ZodString;
1682
+ fulfilledAt: z.ZodString;
1683
+ note: z.ZodNullable<z.ZodString>;
1684
+ codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
1685
+ codeId: z.ZodString;
1686
+ hint: z.ZodString;
1687
+ revealedAt: z.ZodNullable<z.ZodString>;
1688
+ }, z.core.$strip>>>>;
1689
+ download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1690
+ count: z.ZodNumber;
1691
+ limit: z.ZodNumber;
1692
+ expiresAt: z.ZodNullable<z.ZodString>;
1693
+ files: z.ZodArray<z.ZodObject<{
1694
+ assetId: z.ZodString;
1695
+ fileName: z.ZodString;
1696
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
1697
+ }, z.core.$strip>>;
1698
+ }, z.core.$strip>>>>;
1699
+ }, z.core.$strip>>>>;
1700
+ claimStatus: z.ZodNullable<z.ZodString>;
1701
+ reviewWritten: z.ZodBoolean;
1702
+ autoDecisionDate: z.ZodNullable<z.ZodString>;
1703
+ }, z.core.$strip>>;
1704
+ requiresShipping: z.ZodBoolean;
1705
+ shippingAddress: z.ZodObject<{
1706
+ receiverName: z.ZodString;
1707
+ phone: z.ZodString;
1708
+ zipCode: z.ZodString;
1709
+ address1: z.ZodString;
1710
+ address2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1711
+ deliveryMemo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1712
+ entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1713
+ }, z.core.$strip>;
1714
+ payment: z.ZodObject<{
1715
+ method: z.ZodEnum<{
1716
+ CARD: "CARD";
1717
+ EASY_PAY: "EASY_PAY";
1718
+ BANK_TRANSFER: "BANK_TRANSFER";
1719
+ VIRTUAL_ACCOUNT: "VIRTUAL_ACCOUNT";
1720
+ MOBILE: "MOBILE";
1721
+ }>;
1722
+ easyPayProvider: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1723
+ couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1724
+ deliveryDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1725
+ discounts: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
1726
+ couponId: z.ZodString;
1727
+ name: z.ZodString;
1728
+ kind: z.ZodString;
1729
+ discountAmount: z.ZodNumber;
1730
+ }, z.core.$strip>>>>;
1731
+ totalAmount: z.ZodNumber;
1732
+ paidAt: z.ZodNullable<z.ZodString>;
1733
+ receiptUrl: z.ZodNullable<z.ZodURL>;
1734
+ }, z.core.$strip>;
1735
+ withdrawalAgreedAt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1736
+ testPayment: z.ZodBoolean;
1737
+ }, z.core.$strip>;
1738
+ type MyOrder = z.infer<typeof myOrderSchema>;
1739
+ /**
1740
+ * 택배 추적 단계. 응답에서는 문자열로 받는다(값이 추가될 수 있다) — 현재 값은 `ACCEPTED`(접수)·`IN_TRANSIT`(이동 중)·
1741
+ * `OUT_FOR_DELIVERY`(배송 출발)·`DELIVERED`(배송완료)다.
1742
+ */
1743
+ declare const trackingStageResponseSchema: z.ZodString;
1744
+ declare const deliveryTrackingSchema: z.ZodObject<{
1745
+ carrierName: z.ZodString;
1746
+ trackingNumber: z.ZodString;
1747
+ trackingUrl: z.ZodURL;
1748
+ status: z.ZodEnum<{
1749
+ DISPATCHED: "DISPATCHED";
1750
+ DELIVERING: "DELIVERING";
1751
+ DELIVERED: "DELIVERED";
1752
+ }>;
1753
+ trackingEvents: z.ZodArray<z.ZodObject<{
1754
+ status: z.ZodString;
1755
+ location: z.ZodString;
1756
+ occurredAt: z.ZodString;
1757
+ stage: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1758
+ }, z.core.$strip>>;
1759
+ trackingStage: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1760
+ trackingCheckedAt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1761
+ }, z.core.$strip>;
1762
+ type DeliveryTracking = z.infer<typeof deliveryTrackingSchema>;
1763
+ /** `POST /me/order-items/{orderItemId}/purchase-decision` 응답 */
1764
+ declare const purchaseDecisionResultSchema: z.ZodObject<{
1765
+ orderItemId: z.ZodString;
1766
+ status: z.ZodLiteral<"PURCHASE_DECIDED">;
1767
+ decidedAt: z.ZodString;
1768
+ }, z.core.$strip>;
1769
+ type PurchaseDecisionResult = z.infer<typeof purchaseDecisionResultSchema>;
1770
+ /**
1771
+ * 코드 열람 응답 (이슈 #48) — `POST /storefront/v1/me/order-items/{orderItemId}/fulfillment/reveal`(회원)·
1772
+ * `POST /storefront/v1/guest/orders/{orderId}/order-items/{orderItemId}/fulfillment/reveal`(비회원).
1773
+ * 평문 코드는 이 응답에만 있다. 화면에 보인 뒤 저장하지 않는다(응답은 `Cache-Control: no-store`).
1774
+ * 첫 열람 시각은 청약철회 판단의 근거(제공 개시)로 남는다.
1775
+ */
1776
+ declare const fulfillmentRevealSchema: z.ZodObject<{
1777
+ orderItemId: z.ZodString;
1778
+ codes: z.ZodArray<z.ZodObject<{
1779
+ codeId: z.ZodString;
1780
+ code: z.ZodString;
1781
+ revealedAt: z.ZodString;
1782
+ }, z.core.$strip>>;
1783
+ }, z.core.$strip>;
1784
+ type FulfillmentReveal = z.infer<typeof fulfillmentRevealSchema>;
1785
+ /**
1786
+ * 다운로드 요청 (이슈 #48) — `POST /storefront/v1/me/order-items/{orderItemId}/downloads`(회원)·
1787
+ * `POST /storefront/v1/guest/orders/{orderId}/order-items/{orderItemId}/downloads`(비회원, 연락처·비밀번호를 함께 보낸다).
1788
+ * 파일이 하나면 `assetId`를 생략할 수 있다.
1789
+ */
1790
+ declare const downloadRequestSchema: z.ZodObject<{
1791
+ assetId: z.ZodOptional<z.ZodString>;
1792
+ }, z.core.$strip>;
1793
+ type DownloadRequest = z.infer<typeof downloadRequestSchema>;
1794
+ /** 다운로드 응답 — 수명 300초의 서명 주소. 받을 때마다 횟수가 하나 준다 */
1795
+ declare const downloadLinkSchema: z.ZodObject<{
1796
+ url: z.ZodURL;
1797
+ expiresAt: z.ZodString;
1798
+ fileName: z.ZodString;
1799
+ remaining: z.ZodNumber;
1800
+ }, z.core.$strip>;
1801
+ type DownloadLink = z.infer<typeof downloadLinkSchema>;
1802
+ //#endregion
1170
1803
  //#region src/schemas/review.d.ts
1171
1804
  declare const publicReviewSchema: z.ZodObject<{
1172
1805
  reviewId: z.ZodString;
@@ -1450,6 +2083,10 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1450
2083
  discountedPrice: number | null;
1451
2084
  discountRate: number | null;
1452
2085
  freeShipping: boolean;
2086
+ fulfillment: {
2087
+ type: string;
2088
+ requiresShipping: boolean;
2089
+ };
1453
2090
  averageRating: number;
1454
2091
  reviewCount: number;
1455
2092
  soldOut: boolean;
@@ -1494,17 +2131,48 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1494
2131
  additionalPrice: number;
1495
2132
  soldOut: boolean;
1496
2133
  }[];
1497
- delivery: {
1498
- type: "PAID" | "FREE" | "CONDITIONAL_FREE";
1499
- fee: number;
1500
- conditionalFreeAmount: number | null;
1501
- estimatedDays: string;
1502
- };
1503
- returnPolicy: {
1504
- returnFee: number;
1505
- exchangeFee: number;
1506
- periodDays: number;
2134
+ fulfillment: UnknownFulfillmentView | {
2135
+ type: "SHIPPING";
2136
+ requiresShipping: true;
2137
+ shipping: {
2138
+ deliveryType: string;
2139
+ deliveryFee: number;
2140
+ conditionalFreeAmount: number | null;
2141
+ estimatedDays: string;
2142
+ returnDeliveryFee: number;
2143
+ exchangeDeliveryFee: number;
2144
+ };
2145
+ } | {
2146
+ type: "DOWNLOAD";
2147
+ requiresShipping: false;
2148
+ download: {
2149
+ limit: number;
2150
+ days: number;
2151
+ withdrawalRestricted: boolean;
2152
+ };
2153
+ } | {
2154
+ type: "CODE";
2155
+ requiresShipping: false;
2156
+ code: {
2157
+ withdrawalRestricted: boolean;
2158
+ };
2159
+ } | {
2160
+ type: "SERVICE";
2161
+ requiresShipping: false;
2162
+ } | {
2163
+ type: "PICKUP";
2164
+ requiresShipping: false;
2165
+ pickup: {
2166
+ location: {
2167
+ name: string;
2168
+ zipCode: string;
2169
+ address1: string;
2170
+ address2: string | null;
2171
+ phone: string;
2172
+ } | null;
2173
+ };
1507
2174
  };
2175
+ returnPeriodDays: number;
1508
2176
  categoryPath: {
1509
2177
  categoryId: string;
1510
2178
  name: string;
@@ -1570,6 +2238,11 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1570
2238
  quantity: number;
1571
2239
  unitPrice: number;
1572
2240
  totalPrice: number;
2241
+ fulfillment: {
2242
+ type: string;
2243
+ requiresShipping: boolean;
2244
+ withdrawalRestricted: boolean;
2245
+ };
1573
2246
  purchasable: boolean;
1574
2247
  unpurchasableReason: "SOLD_OUT" | "SUSPENDED" | "CLOSED" | null;
1575
2248
  }[];
@@ -1577,6 +2250,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1577
2250
  productAmount: number;
1578
2251
  deliveryFee: number;
1579
2252
  totalAmount: number;
2253
+ requiresShipping: boolean;
1580
2254
  };
1581
2255
  }>;
1582
2256
  addItem: (body: AddCartItemRequest) => Promise<{
@@ -1590,6 +2264,11 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1590
2264
  quantity: number;
1591
2265
  unitPrice: number;
1592
2266
  totalPrice: number;
2267
+ fulfillment: {
2268
+ type: string;
2269
+ requiresShipping: boolean;
2270
+ withdrawalRestricted: boolean;
2271
+ };
1593
2272
  purchasable: boolean;
1594
2273
  unpurchasableReason: "SOLD_OUT" | "SUSPENDED" | "CLOSED" | null;
1595
2274
  }[];
@@ -1597,6 +2276,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1597
2276
  productAmount: number;
1598
2277
  deliveryFee: number;
1599
2278
  totalAmount: number;
2279
+ requiresShipping: boolean;
1600
2280
  };
1601
2281
  }>;
1602
2282
  updateItem: (cartItemId: string, body: UpdateCartItemRequest) => Promise<{
@@ -1610,6 +2290,11 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1610
2290
  quantity: number;
1611
2291
  unitPrice: number;
1612
2292
  totalPrice: number;
2293
+ fulfillment: {
2294
+ type: string;
2295
+ requiresShipping: boolean;
2296
+ withdrawalRestricted: boolean;
2297
+ };
1613
2298
  purchasable: boolean;
1614
2299
  unpurchasableReason: "SOLD_OUT" | "SUSPENDED" | "CLOSED" | null;
1615
2300
  }[];
@@ -1617,6 +2302,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1617
2302
  productAmount: number;
1618
2303
  deliveryFee: number;
1619
2304
  totalAmount: number;
2305
+ requiresShipping: boolean;
1620
2306
  };
1621
2307
  }>;
1622
2308
  removeItem: (cartItemId: string) => Promise<void>;
@@ -1632,11 +2318,18 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1632
2318
  quantity: number;
1633
2319
  unitPrice: number;
1634
2320
  totalPrice: number;
2321
+ fulfillment: {
2322
+ type: string;
2323
+ requiresShipping: boolean;
2324
+ withdrawalRestricted: boolean;
2325
+ };
1635
2326
  }[];
1636
2327
  amounts: {
1637
2328
  productAmount: number;
1638
2329
  deliveryFee: number;
1639
2330
  totalAmount: number;
2331
+ couponDiscountAmount: number;
2332
+ deliveryDiscountAmount: number;
1640
2333
  };
1641
2334
  delivery: {
1642
2335
  baseFee: number;
@@ -1647,6 +2340,11 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1647
2340
  freeByThreshold: boolean;
1648
2341
  zipCode: string | null;
1649
2342
  };
2343
+ requiresShipping: boolean;
2344
+ withdrawal: {
2345
+ required: boolean;
2346
+ notice: string | null;
2347
+ };
1650
2348
  expiresAt: string;
1651
2349
  paymentOptions: (({
1652
2350
  pg: "tosspayments" | "portone";
@@ -1684,6 +2382,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1684
2382
  productAmount: number;
1685
2383
  deliveryFee: number;
1686
2384
  totalAmount: number;
2385
+ couponDiscountAmount: number;
2386
+ deliveryDiscountAmount: number;
1687
2387
  };
1688
2388
  delivery: {
1689
2389
  baseFee: number;
@@ -1734,6 +2434,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1734
2434
  productAmount: number;
1735
2435
  deliveryFee: number;
1736
2436
  totalAmount: number;
2437
+ couponDiscountAmount: number;
2438
+ deliveryDiscountAmount: number;
1737
2439
  };
1738
2440
  delivery: {
1739
2441
  baseFee: number;
@@ -1745,6 +2447,60 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1745
2447
  zipCode: string | null;
1746
2448
  };
1747
2449
  }>;
2450
+ /**
2451
+ * `POST /checkout/{checkoutId}/pricing` — 쿠폰 금액 미리보기(이슈 #47). 주문서를 바꾸지 않고 쿠폰을 예약하지 않는다.
2452
+ * 확정은 결제 시작의 `coupons`다. 코드 입력은 구매자당 분당 10회까지다(429 `TOO_MANY_REQUESTS`).
2453
+ *
2454
+ * 에러: 404 `COUPON_NOT_FOUND`(없는 코드·남의 쿠폰) · 409 `COUPONS_UNAVAILABLE`(지금 쿠폰을 쓸 수 없음)
2455
+ */
2456
+ pricing: (checkoutId: string, body: CheckoutPricingRequest) => Promise<{
2457
+ amounts: {
2458
+ productAmount: number;
2459
+ deliveryFee: number;
2460
+ couponDiscountAmount: number;
2461
+ deliveryDiscountAmount: number;
2462
+ totalAmount: number;
2463
+ };
2464
+ coupons: {
2465
+ couponId: string;
2466
+ issueId: string | null;
2467
+ code: string | null;
2468
+ name: string;
2469
+ kind: string;
2470
+ benefit: {
2471
+ type: string;
2472
+ value: number;
2473
+ maxDiscountAmount: number | null;
2474
+ };
2475
+ applied: boolean;
2476
+ discountAmount: number;
2477
+ rejectReason: string | null;
2478
+ optionId: string | null;
2479
+ }[];
2480
+ items: {
2481
+ optionId: string | null;
2482
+ couponDiscountAmount: number;
2483
+ }[];
2484
+ payable: boolean;
2485
+ }>;
2486
+ /** `GET /checkout/{checkoutId}/coupons` — 이 주문서에 쓸 수 있는 내 쿠폰과 예상 할인(회원 전용) */
2487
+ applicableCoupons: (checkoutId: string) => Promise<{
2488
+ issueId: string;
2489
+ couponId: string;
2490
+ name: string;
2491
+ description: string | null;
2492
+ kind: string;
2493
+ benefit: {
2494
+ type: string;
2495
+ value: number;
2496
+ maxDiscountAmount: number | null;
2497
+ };
2498
+ minOrderAmount: number;
2499
+ validUntil: string | null;
2500
+ applicable: boolean;
2501
+ expectedDiscountAmount: number;
2502
+ rejectReason: string | null;
2503
+ }[]>;
1748
2504
  };
1749
2505
  payments: {
1750
2506
  /**
@@ -1799,6 +2555,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1799
2555
  productAmount: number;
1800
2556
  deliveryFee: number;
1801
2557
  totalAmount: number;
2558
+ couponDiscountAmount: number;
2559
+ deliveryDiscountAmount: number;
1802
2560
  };
1803
2561
  delivery: {
1804
2562
  baseFee: number;
@@ -1833,11 +2591,64 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1833
2591
  canceledQuantity: number;
1834
2592
  activeQuantity: number;
1835
2593
  totalPrice: number;
1836
- status: "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED" | "CANCELED";
2594
+ couponDiscountAmount: number;
2595
+ status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
2596
+ fulfillmentSnapshot: UnknownFulfillmentView | {
2597
+ type: "SHIPPING";
2598
+ requiresShipping: true;
2599
+ } | {
2600
+ type: "DOWNLOAD";
2601
+ requiresShipping: false;
2602
+ download: {
2603
+ withdrawalRestricted: boolean;
2604
+ };
2605
+ } | {
2606
+ type: "CODE";
2607
+ requiresShipping: false;
2608
+ code: {
2609
+ withdrawalRestricted: boolean;
2610
+ };
2611
+ } | {
2612
+ type: "SERVICE";
2613
+ requiresShipping: false;
2614
+ } | {
2615
+ type: "PICKUP";
2616
+ requiresShipping: false;
2617
+ pickup: {
2618
+ location: {
2619
+ name: string;
2620
+ zipCode: string;
2621
+ address1: string;
2622
+ address2: string | null;
2623
+ phone: string;
2624
+ } | null;
2625
+ };
2626
+ };
2627
+ fulfillment: {
2628
+ status: string;
2629
+ fulfilledAt: string;
2630
+ note: string | null;
2631
+ codes: {
2632
+ codeId: string;
2633
+ hint: string;
2634
+ revealedAt: string | null;
2635
+ }[];
2636
+ download: {
2637
+ count: number;
2638
+ limit: number;
2639
+ expiresAt: string | null;
2640
+ files: {
2641
+ assetId: string;
2642
+ fileName: string;
2643
+ sizeBytes: number | null;
2644
+ }[];
2645
+ } | null;
2646
+ } | null;
1837
2647
  claimStatus: string | null;
1838
2648
  reviewWritten: boolean;
1839
2649
  autoDecisionDate: string | null;
1840
2650
  }[];
2651
+ requiresShipping: boolean;
1841
2652
  shippingAddress: {
1842
2653
  receiverName: string;
1843
2654
  phone: string;
@@ -1850,10 +2661,19 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1850
2661
  payment: {
1851
2662
  method: "CARD" | "EASY_PAY" | "BANK_TRANSFER" | "VIRTUAL_ACCOUNT" | "MOBILE";
1852
2663
  easyPayProvider: string | null;
2664
+ couponDiscountAmount: number;
2665
+ deliveryDiscountAmount: number;
2666
+ discounts: {
2667
+ couponId: string;
2668
+ name: string;
2669
+ kind: string;
2670
+ discountAmount: number;
2671
+ }[];
1853
2672
  totalAmount: number;
1854
2673
  paidAt: string | null;
1855
2674
  receiptUrl: string | null;
1856
2675
  };
2676
+ withdrawalAgreedAt: string | null;
1857
2677
  testPayment: boolean;
1858
2678
  }[];
1859
2679
  }>;
@@ -1870,11 +2690,64 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1870
2690
  canceledQuantity: number;
1871
2691
  activeQuantity: number;
1872
2692
  totalPrice: number;
1873
- status: "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED" | "CANCELED";
2693
+ couponDiscountAmount: number;
2694
+ status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
2695
+ fulfillmentSnapshot: UnknownFulfillmentView | {
2696
+ type: "SHIPPING";
2697
+ requiresShipping: true;
2698
+ } | {
2699
+ type: "DOWNLOAD";
2700
+ requiresShipping: false;
2701
+ download: {
2702
+ withdrawalRestricted: boolean;
2703
+ };
2704
+ } | {
2705
+ type: "CODE";
2706
+ requiresShipping: false;
2707
+ code: {
2708
+ withdrawalRestricted: boolean;
2709
+ };
2710
+ } | {
2711
+ type: "SERVICE";
2712
+ requiresShipping: false;
2713
+ } | {
2714
+ type: "PICKUP";
2715
+ requiresShipping: false;
2716
+ pickup: {
2717
+ location: {
2718
+ name: string;
2719
+ zipCode: string;
2720
+ address1: string;
2721
+ address2: string | null;
2722
+ phone: string;
2723
+ } | null;
2724
+ };
2725
+ };
2726
+ fulfillment: {
2727
+ status: string;
2728
+ fulfilledAt: string;
2729
+ note: string | null;
2730
+ codes: {
2731
+ codeId: string;
2732
+ hint: string;
2733
+ revealedAt: string | null;
2734
+ }[];
2735
+ download: {
2736
+ count: number;
2737
+ limit: number;
2738
+ expiresAt: string | null;
2739
+ files: {
2740
+ assetId: string;
2741
+ fileName: string;
2742
+ sizeBytes: number | null;
2743
+ }[];
2744
+ } | null;
2745
+ } | null;
1874
2746
  claimStatus: string | null;
1875
2747
  reviewWritten: boolean;
1876
2748
  autoDecisionDate: string | null;
1877
2749
  }[];
2750
+ requiresShipping: boolean;
1878
2751
  shippingAddress: {
1879
2752
  receiverName: string;
1880
2753
  phone: string;
@@ -1887,10 +2760,19 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1887
2760
  payment: {
1888
2761
  method: "CARD" | "EASY_PAY" | "BANK_TRANSFER" | "VIRTUAL_ACCOUNT" | "MOBILE";
1889
2762
  easyPayProvider: string | null;
2763
+ couponDiscountAmount: number;
2764
+ deliveryDiscountAmount: number;
2765
+ discounts: {
2766
+ couponId: string;
2767
+ name: string;
2768
+ kind: string;
2769
+ discountAmount: number;
2770
+ }[];
1890
2771
  totalAmount: number;
1891
2772
  paidAt: string | null;
1892
2773
  receiptUrl: string | null;
1893
2774
  };
2775
+ withdrawalAgreedAt: string | null;
1894
2776
  testPayment: boolean;
1895
2777
  }>;
1896
2778
  /**
@@ -1918,11 +2800,64 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1918
2800
  canceledQuantity: number;
1919
2801
  activeQuantity: number;
1920
2802
  totalPrice: number;
1921
- status: "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED" | "CANCELED";
2803
+ couponDiscountAmount: number;
2804
+ status: "CANCELED" | "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED";
2805
+ fulfillmentSnapshot: UnknownFulfillmentView | {
2806
+ type: "SHIPPING";
2807
+ requiresShipping: true;
2808
+ } | {
2809
+ type: "DOWNLOAD";
2810
+ requiresShipping: false;
2811
+ download: {
2812
+ withdrawalRestricted: boolean;
2813
+ };
2814
+ } | {
2815
+ type: "CODE";
2816
+ requiresShipping: false;
2817
+ code: {
2818
+ withdrawalRestricted: boolean;
2819
+ };
2820
+ } | {
2821
+ type: "SERVICE";
2822
+ requiresShipping: false;
2823
+ } | {
2824
+ type: "PICKUP";
2825
+ requiresShipping: false;
2826
+ pickup: {
2827
+ location: {
2828
+ name: string;
2829
+ zipCode: string;
2830
+ address1: string;
2831
+ address2: string | null;
2832
+ phone: string;
2833
+ } | null;
2834
+ };
2835
+ };
2836
+ fulfillment: {
2837
+ status: string;
2838
+ fulfilledAt: string;
2839
+ note: string | null;
2840
+ codes: {
2841
+ codeId: string;
2842
+ hint: string;
2843
+ revealedAt: string | null;
2844
+ }[];
2845
+ download: {
2846
+ count: number;
2847
+ limit: number;
2848
+ expiresAt: string | null;
2849
+ files: {
2850
+ assetId: string;
2851
+ fileName: string;
2852
+ sizeBytes: number | null;
2853
+ }[];
2854
+ } | null;
2855
+ } | null;
1922
2856
  claimStatus: string | null;
1923
2857
  reviewWritten: boolean;
1924
2858
  autoDecisionDate: string | null;
1925
2859
  }[];
2860
+ requiresShipping: boolean;
1926
2861
  shippingAddress: {
1927
2862
  receiverName: string;
1928
2863
  phone: string;
@@ -1935,10 +2870,19 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1935
2870
  payment: {
1936
2871
  method: "CARD" | "EASY_PAY" | "BANK_TRANSFER" | "VIRTUAL_ACCOUNT" | "MOBILE";
1937
2872
  easyPayProvider: string | null;
2873
+ couponDiscountAmount: number;
2874
+ deliveryDiscountAmount: number;
2875
+ discounts: {
2876
+ couponId: string;
2877
+ name: string;
2878
+ kind: string;
2879
+ discountAmount: number;
2880
+ }[];
1938
2881
  totalAmount: number;
1939
2882
  paidAt: string | null;
1940
2883
  receiptUrl: string | null;
1941
2884
  };
2885
+ withdrawalAgreedAt: string | null;
1942
2886
  testPayment: boolean;
1943
2887
  }>;
1944
2888
  getDelivery: (orderItemId: string) => Promise<{
@@ -1955,6 +2899,58 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1955
2899
  trackingStage: string | null;
1956
2900
  trackingCheckedAt: string | null;
1957
2901
  }>;
2902
+ /**
2903
+ * 코드 열람 (이슈 #48) — 코드 발급 상품의 평문 코드. 처음 열람한 시각이 제공 개시 증거로 남는다.
2904
+ *
2905
+ * 에러: 404 `ORDER_ITEM_NOT_FOUND`(없거나 남의 주문상품) · 404 `FULFILLMENT_NOT_FOUND`(제공 전·회수됨·코드 상품 아님) ·
2906
+ * 429 `TOO_MANY_REQUESTS`
2907
+ */
2908
+ revealCode: (orderItemId: string) => Promise<{
2909
+ orderItemId: string;
2910
+ codes: {
2911
+ codeId: string;
2912
+ code: string;
2913
+ revealedAt: string;
2914
+ }[];
2915
+ }>;
2916
+ /**
2917
+ * 파일 다운로드 (이슈 #48) — 수명 300초의 서명 주소를 받는다. 받을 때마다 남은 횟수가 준다.
2918
+ *
2919
+ * 에러: 404 `FULFILLMENT_NOT_FOUND`(제공 전·회수됨·파일 상품 아님) · 409 `DOWNLOAD_LIMIT_REACHED`(횟수 소진) ·
2920
+ * 409 `DOWNLOAD_EXPIRED`(기한 지남) · 400 `ASSET_REQUIRED`(파일이 여러 개인데 `assetId` 없음)
2921
+ */
2922
+ createDownload: (orderItemId: string, body?: DownloadRequest) => Promise<{
2923
+ url: string;
2924
+ expiresAt: string;
2925
+ fileName: string;
2926
+ remaining: number;
2927
+ }>;
2928
+ /** 비회원 다운로드 — 비회원 주문 조회와 같은 연락처·주문 조회 비밀번호로 확인한다 */
2929
+ createGuestDownload: (orderId: string, orderItemId: string, body: {
2930
+ phone: string;
2931
+ orderPassword: string;
2932
+ assetId?: string;
2933
+ }) => Promise<{
2934
+ url: string;
2935
+ expiresAt: string;
2936
+ fileName: string;
2937
+ remaining: number;
2938
+ }>;
2939
+ /**
2940
+ * 비회원 코드 열람 — 비회원 주문 조회와 같은 연락처·주문 조회 비밀번호로 확인하고 같은 시도 한도를 쓴다.
2941
+ * 틀리면 구분 없이 404 `ORDER_NOT_FOUND`다.
2942
+ */
2943
+ revealGuestCode: (orderId: string, orderItemId: string, body: {
2944
+ phone: string;
2945
+ orderPassword: string;
2946
+ }) => Promise<{
2947
+ orderItemId: string;
2948
+ codes: {
2949
+ codeId: string;
2950
+ code: string;
2951
+ revealedAt: string;
2952
+ }[];
2953
+ }>;
1958
2954
  decidePurchase: (orderItemId: string) => Promise<void>;
1959
2955
  };
1960
2956
  myClaims: {
@@ -1965,6 +2961,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1965
2961
  claimDeliveryFee: number;
1966
2962
  quantity: number;
1967
2963
  deliveryFeeRefundAmount: number;
2964
+ couponChargeAmount: number;
2965
+ couponChargeRefundAmount: number;
1968
2966
  }>;
1969
2967
  list: (params?: PageParams & {
1970
2968
  status?: ClaimStatus;
@@ -1976,7 +2974,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1976
2974
  contents: {
1977
2975
  claimId: string;
1978
2976
  type: "CANCEL" | "RETURN" | "EXCHANGE";
1979
- status: "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "REJECTED" | "COMPLETED" | "WITHDRAWN";
2977
+ status: "COMPLETED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "REJECTED" | "WITHDRAWN";
1980
2978
  orderItemId: string;
1981
2979
  productName: string;
1982
2980
  quantity: number;
@@ -2098,6 +3096,10 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
2098
3096
  discountedPrice: number | null;
2099
3097
  discountRate: number | null;
2100
3098
  freeShipping: boolean;
3099
+ fulfillment: {
3100
+ type: string;
3101
+ requiresShipping: boolean;
3102
+ };
2101
3103
  averageRating: number;
2102
3104
  reviewCount: number;
2103
3105
  soldOut: boolean;
@@ -2145,6 +3147,27 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
2145
3147
  }>;
2146
3148
  };
2147
3149
  me: {
3150
+ /** `GET /me/coupons` — 내 쿠폰(이슈 #47). `status`로 사용 가능·사용함·기간 지남을 거른다 */
3151
+ coupons: (params?: {
3152
+ status?: "available" | "used" | "expired";
3153
+ }) => Promise<{
3154
+ issueId: string;
3155
+ couponId: string;
3156
+ name: string;
3157
+ description: string | null;
3158
+ kind: string;
3159
+ benefit: {
3160
+ type: string;
3161
+ value: number;
3162
+ maxDiscountAmount: number | null;
3163
+ };
3164
+ minOrderAmount: number;
3165
+ status: string;
3166
+ validFrom: string;
3167
+ validUntil: string | null;
3168
+ usedOrderId: string | null;
3169
+ issuedAt: string;
3170
+ }[]>;
2148
3171
  customerInquiries: {
2149
3172
  create: (body: CreateCustomerInquiryRequest) => Promise<{
2150
3173
  inquiryId: string;
@@ -2316,130 +3339,6 @@ type AnalyticsBatch = z.infer<typeof analyticsBatchSchema>;
2316
3339
  /** 배치 본문 상한(바이트) — 서버가 넘는 요청을 거부한다 */
2317
3340
  declare const ANALYTICS_MAX_BATCH_BYTES: number;
2318
3341
  //#endregion
2319
- //#region src/schemas/order.d.ts
2320
- declare const myOrderItemSchema: z.ZodObject<{
2321
- orderItemId: z.ZodString;
2322
- productId: z.ZodString;
2323
- productName: z.ZodString;
2324
- thumbnailUrl: z.ZodNullable<z.ZodURL>;
2325
- optionName: z.ZodNullable<z.ZodString>;
2326
- quantity: z.ZodNumber;
2327
- canceledQuantity: z.ZodNumber;
2328
- activeQuantity: z.ZodNumber;
2329
- totalPrice: z.ZodNumber;
2330
- status: z.ZodEnum<{
2331
- PAYMENT_WAITING: "PAYMENT_WAITING";
2332
- PAID: "PAID";
2333
- CONFIRMED: "CONFIRMED";
2334
- DISPATCHED: "DISPATCHED";
2335
- DELIVERING: "DELIVERING";
2336
- DELIVERED: "DELIVERED";
2337
- PURCHASE_DECIDED: "PURCHASE_DECIDED";
2338
- CANCELED: "CANCELED";
2339
- }>;
2340
- claimStatus: z.ZodNullable<z.ZodString>;
2341
- reviewWritten: z.ZodBoolean;
2342
- autoDecisionDate: z.ZodNullable<z.ZodString>;
2343
- }, z.core.$strip>;
2344
- type MyOrderItem = z.infer<typeof myOrderItemSchema>;
2345
- /**
2346
- * 주문 응답의 배송지 — 결제 요청 시 저장된 스냅샷. 요청 스키마(`shippingAddressInputSchema`)와 분리한 응답 스키마라
2347
- * 형식 검증(regex·길이)을 하지 않는다. 입력하지 않은 선택 필드는 null로 오거나 빠질 수 있다.
2348
- */
2349
- declare const orderShippingAddressSchema: z.ZodObject<{
2350
- receiverName: z.ZodString;
2351
- phone: z.ZodString;
2352
- zipCode: z.ZodString;
2353
- address1: z.ZodString;
2354
- address2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2355
- deliveryMemo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2356
- entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2357
- }, z.core.$strip>;
2358
- type OrderShippingAddress = z.infer<typeof orderShippingAddressSchema>;
2359
- declare const myOrderSchema: z.ZodObject<{
2360
- orderId: z.ZodString;
2361
- orderedAt: z.ZodString;
2362
- items: z.ZodArray<z.ZodObject<{
2363
- orderItemId: z.ZodString;
2364
- productId: z.ZodString;
2365
- productName: z.ZodString;
2366
- thumbnailUrl: z.ZodNullable<z.ZodURL>;
2367
- optionName: z.ZodNullable<z.ZodString>;
2368
- quantity: z.ZodNumber;
2369
- canceledQuantity: z.ZodNumber;
2370
- activeQuantity: z.ZodNumber;
2371
- totalPrice: z.ZodNumber;
2372
- status: z.ZodEnum<{
2373
- PAYMENT_WAITING: "PAYMENT_WAITING";
2374
- PAID: "PAID";
2375
- CONFIRMED: "CONFIRMED";
2376
- DISPATCHED: "DISPATCHED";
2377
- DELIVERING: "DELIVERING";
2378
- DELIVERED: "DELIVERED";
2379
- PURCHASE_DECIDED: "PURCHASE_DECIDED";
2380
- CANCELED: "CANCELED";
2381
- }>;
2382
- claimStatus: z.ZodNullable<z.ZodString>;
2383
- reviewWritten: z.ZodBoolean;
2384
- autoDecisionDate: z.ZodNullable<z.ZodString>;
2385
- }, z.core.$strip>>;
2386
- shippingAddress: z.ZodObject<{
2387
- receiverName: z.ZodString;
2388
- phone: z.ZodString;
2389
- zipCode: z.ZodString;
2390
- address1: z.ZodString;
2391
- address2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2392
- deliveryMemo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2393
- entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2394
- }, z.core.$strip>;
2395
- payment: z.ZodObject<{
2396
- method: z.ZodEnum<{
2397
- CARD: "CARD";
2398
- EASY_PAY: "EASY_PAY";
2399
- BANK_TRANSFER: "BANK_TRANSFER";
2400
- VIRTUAL_ACCOUNT: "VIRTUAL_ACCOUNT";
2401
- MOBILE: "MOBILE";
2402
- }>;
2403
- easyPayProvider: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2404
- totalAmount: z.ZodNumber;
2405
- paidAt: z.ZodNullable<z.ZodString>;
2406
- receiptUrl: z.ZodNullable<z.ZodURL>;
2407
- }, z.core.$strip>;
2408
- testPayment: z.ZodBoolean;
2409
- }, z.core.$strip>;
2410
- type MyOrder = z.infer<typeof myOrderSchema>;
2411
- /**
2412
- * 택배 추적 단계. 응답에서는 문자열로 받는다(값이 추가될 수 있다) — 현재 값은 `ACCEPTED`(접수)·`IN_TRANSIT`(이동 중)·
2413
- * `OUT_FOR_DELIVERY`(배송 출발)·`DELIVERED`(배송완료)다.
2414
- */
2415
- declare const trackingStageResponseSchema: z.ZodString;
2416
- declare const deliveryTrackingSchema: z.ZodObject<{
2417
- carrierName: z.ZodString;
2418
- trackingNumber: z.ZodString;
2419
- trackingUrl: z.ZodURL;
2420
- status: z.ZodEnum<{
2421
- DISPATCHED: "DISPATCHED";
2422
- DELIVERING: "DELIVERING";
2423
- DELIVERED: "DELIVERED";
2424
- }>;
2425
- trackingEvents: z.ZodArray<z.ZodObject<{
2426
- status: z.ZodString;
2427
- location: z.ZodString;
2428
- occurredAt: z.ZodString;
2429
- stage: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2430
- }, z.core.$strip>>;
2431
- trackingStage: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2432
- trackingCheckedAt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2433
- }, z.core.$strip>;
2434
- type DeliveryTracking = z.infer<typeof deliveryTrackingSchema>;
2435
- /** `POST /me/order-items/{orderItemId}/purchase-decision` 응답 */
2436
- declare const purchaseDecisionResultSchema: z.ZodObject<{
2437
- orderItemId: z.ZodString;
2438
- status: z.ZodLiteral<"PURCHASE_DECIDED">;
2439
- decidedAt: z.ZodString;
2440
- }, z.core.$strip>;
2441
- type PurchaseDecisionResult = z.infer<typeof purchaseDecisionResultSchema>;
2442
- //#endregion
2443
3342
  //#region src/schemas/store.d.ts
2444
3343
  /**
2445
3344
  * 스토어 공개 설정 — `GET /store`. 스토어프론트가 화면을 그릴 때 읽는 값만 담는다.
@@ -2460,4 +3359,4 @@ declare const storefrontStoreSchema: z.ZodObject<{
2460
3359
  }, z.core.$strip>;
2461
3360
  type StorefrontStore = z.infer<typeof storefrontStoreSchema>;
2462
3361
  //#endregion
2463
- export { Member as $, productCardSchema as $n, DeliveryQuoteRequest as $t, StorefrontClientOptions as A, guestInfoSchema as An, consentStateSchema as At, ReviewPage as B, remoteAreaSchema as Bn, claimReturnAddressSchema as Bt, AnalyticsServerEventName as C, checkoutDeliverySchema as Cn, ConsentSource as Ct, analyticsIdSchema as D, deliveryQuoteSchema as Dn, consentActionSchema as Dt, analyticsClientEventSchema as E, deliveryQuoteRequestSchema as En, MemberConsents as Et, StorefrontSessionOptions as F, paymentOptionListSchema as Fn, ClaimType as Ft, createReviewRequestSchema as G, CategoryNode as Gn, AvailablePaymentOption as Gt, UpdateReviewRequest as H, retryPaymentRequestSchema as Hn, createClaimRequestSchema as Ht, createStorefrontSession as I, paymentOptionSchema as In, CreateClaimRequest as It, reviewPageSchema as J, ProductFacets as Jn, CashReceiptRequest as Jt, createReviewResultSchema as K, ProductCard as Kn, CASH_RECEIPT_METHODS as Kt, CreateReviewRequest as L, paymentStartSchema as Ln, CreateClaimResult as Lt, STOREFRONT_SESSION_KEYS as M, paymentMessageSchema as Mn, memberConsentsSchema as Mt, SessionStorage as N, paymentMethodSchema as Nn, ClaimReason as Nt, analyticsServerEventNameSchema as O, easyPayProviderResponseSchema as On, consentKindSchema as Ot, StorefrontSession as P, paymentOptionKey as Pn, ClaimReturnAddress as Pt, writableReviewSchema as Q, categoryNodeSchema as Qn, CreateCheckoutRequest as Qt, CreateReviewResult as R, paymentStatusSchema as Rn, MyClaim as Rt, AnalyticsEventName as S, cashReceiptTypeSchema as Sn, ConsentKind as St, analyticsClientEventNameSchema as T, createCheckoutRequestSchema as Tn, ConsentUpdateRequest as Tt, UpdateReviewResult as U, shippingAddressInputSchema as Un, createClaimResultSchema as Ut, ReviewSummary as V, residentNumberLike as Vn, claimTypeSchema as Vt, WritableReview as W, startPaymentRequestSchema as Wn, myClaimSchema as Wt, updateReviewRequestSchema as X, ProductSearchParams as Xn, CheckoutDelivery as Xt, reviewSummarySchema as Y, ProductPage as Yn, CashReceiptType as Yt, updateReviewResultSchema as Z, ProductSort as Zn, CheckoutSession as Zt, ANALYTICS_VISITOR_COOKIE as _, StartPaymentRequest as _n, cartItemSchema as _r, CustomerInquiryCategory as _t, MyOrderItem as a, PAYMENT_RESULT_VALUES as an, OrderItemStatus as ar, memberAddressSchema as at, AnalyticsClientEvent as b, cashReceiptIdentityTypeOf as bn, analyticsIdsFromCookie as br, customerInquirySchema as bt, deliveryTrackingSchema as c, PaymentMessage as cn, claimStatusSchema as cr, wishlistAddResultSchema as ct, orderShippingAddressSchema as d, PaymentStart as dn, pageSchema as dr, PublicInquiry as dt, DeliveryQuoteResult as en, productDetailSchema as er, MemberAddress as et, purchaseDecisionResultSchema as f, PaymentStatus as fn, AddCartItemRequest as fr, createInquiryRequestSchema as ft, ANALYTICS_SESSION_HEADER as g, ShippingAddressInput as gn, addCartItemRequestSchema as gr, CustomerInquiry as gt, ANALYTICS_SESSION_COOKIE as h, RetryPaymentRequest as hn, UpdateCartItemRequest as hr, CreateCustomerInquiryRequest as ht, MyOrder as i, KnownPaymentStatus as in, ClaimStatus as ir, memberAddressRequestSchema as it, createStorefrontClient as j, paymentFailureCategorySchema as jn, consentUpdateRequestSchema as jt, StorefrontClient as k, easyPayProviderSchema as kn, consentSourceSchema as kt, myOrderItemSchema as l, PaymentMethod as ln, orderItemStatusSchema as lr, CreateInquiryRequest as lt, ANALYTICS_MAX_BATCH_BYTES as m, RemoteArea as mn, CartItem as mr, publicInquirySchema as mt, storefrontStoreSchema as n, GuestInfo as nn, productPageSchema as nr, UpdateProfileRequest as nt, OrderShippingAddress as o, PAYMENT_STATUS_VALUES as on, PageInfo as or, memberSchema as ot, trackingStageResponseSchema as p, PgProvider as pn, Cart as pr, createInquiryResultSchema as pt, publicReviewSchema as q, ProductDetail as qn, CashReceiptIdentityType as qt, DeliveryTracking as r, KnownPaymentResult as rn, productSortSchema as rr, WishlistAddResult as rt, PurchaseDecisionResult as s, PaymentFailureCategory as sn, PageParams as sr, updateProfileRequestSchema as st, StorefrontStore as t, EasyPayProvider as tn, productFacetsSchema as tr, MemberAddressRequest as tt, myOrderSchema as u, PaymentOption as un, pageInfoSchema as ur, CreateInquiryResult as ut, ANALYTICS_VISITOR_HEADER as v, availablePaymentOptionSchema as vn, cartSchema as vr, createCustomerInquiryRequestSchema as vt, analyticsBatchSchema as w, checkoutSessionSchema as wn, ConsentState as wt, AnalyticsClientEventName as x, cashReceiptRequestSchema as xn, ConsentAction as xt, AnalyticsBatch as y, cashReceiptAvailable as yn, updateCartItemRequestSchema as yr, customerInquiryCategorySchema as yt, PublicReview as z, pgProviderSchema as zn, claimReasonSchema as zt };
3362
+ export { fulfillmentRevealSchema as $, easyPayProviderSchema as $n, cartItemSchema as $r, consentSourceSchema as $t, ReviewSummary as A, PAYMENT_STATUS_VALUES as An, PageInfo as Ar, CouponApplication as At, updateReviewResultSchema as B, ShippingAddressInput as Bn, ProductFulfillmentView 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, pageSchema as Fr, applicableCouponSchema as Ft, FulfillmentReveal as G, cashReceiptRequestSchema as Gn, productCardFulfillmentSchema as Gr, ConsentAction as Gt, DeliveryTracking as H, availablePaymentOptionSchema as Hn, lineFulfillmentSchema as Hr, myCouponListQuerySchema as Ht, publicReviewSchema as I, PaymentStatus as In, LineFulfillment as Ir, checkoutPricingRequestSchema as It, OrderShippingAddress as J, checkoutSessionSchema as Jn, AddCartItemRequest as Jr, ConsentState as Jt, MyOrder as K, cashReceiptTypeSchema as Kn, productFulfillmentViewSchema as Kr, ConsentKind as Kt, reviewPageSchema as L, PgProvider as Ln, MyOrderItemFulfillmentSnapshot 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, orderItemStatusSchema 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, pageInfoSchema as Pr, MyCoupon as Pt, downloadRequestSchema as Q, easyPayProviderResponseSchema as Qn, addCartItemRequestSchema as Qr, consentKindSchema as Qt, reviewSummarySchema as R, RemoteArea as Rn, PickupLocation 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, myOrderItemFulfillmentSnapshotSchema as Ur, myCouponSchema as Ut, writableReviewSchema as V, StartPaymentRequest as Vn, UnknownFulfillmentView as Vr, couponResultSchema as Vt, DownloadRequest as W, cashReceiptIdentityTypeOf as Wn, pickupLocationSchema as Wr, pricingAmountsSchema as Wt, deliveryTrackingSchema as X, deliveryQuoteRequestSchema as Xn, CartItem as Xr, MemberConsents as Xt, PurchaseDecisionResult as Y, createCheckoutRequestSchema as Yn, Cart as Yr, ConsentUpdateRequest as Yt, downloadLinkSchema as Z, deliveryQuoteSchema as Zn, UpdateCartItemRequest as Zr, 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, cartSchema as ei, 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, analyticsIdsFromCookie as ni, 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, withdrawalRestrictedOfView 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, updateCartItemRequestSchema as ti, 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, ProductCardFulfillment as zr, couponApplicationSchema as zt };