@sayren/store-sdk 0.9.0 → 0.11.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/index.d.mts CHANGED
@@ -1082,6 +1082,22 @@ export declare const claimReasonSchema: z.ZodEnum<{
1082
1082
  DELAY: "DELAY";
1083
1083
  }>;
1084
1084
  export type ClaimReason = z.infer<typeof claimReasonSchema>;
1085
+ /**
1086
+ * 반품지 (이슈 #30) — 반품·교환 수거가 안내하는 주소다. 스토어 주소록의 기본 반품지이거나,
1087
+ * 상품이 반품지를 따로 지정했으면 그 주소다.
1088
+ *
1089
+ * 취소 클레임은 보낼 물건이 없어 null이고, 반품지를 등록하지 않은 스토어도 null이다.
1090
+ * 구매자가 직접 보내는 수거(`BUYER_SEND`)에 이 주소가 필요하다.
1091
+ */
1092
+ export declare const claimReturnAddressSchema: z.ZodObject<{
1093
+ name: z.ZodString;
1094
+ contactName: z.ZodString;
1095
+ phone: z.ZodString;
1096
+ zipCode: z.ZodString;
1097
+ address1: z.ZodString;
1098
+ address2: z.ZodNullable<z.ZodString>;
1099
+ }, z.core.$strip>;
1100
+ export type ClaimReturnAddress = z.infer<typeof claimReturnAddressSchema>;
1085
1101
  export declare const claimSchema: z.ZodObject<{
1086
1102
  claimId: z.ZodString;
1087
1103
  type: z.ZodEnum<{
@@ -1119,6 +1135,7 @@ export declare const claimSchema: z.ZodObject<{
1119
1135
  }>;
1120
1136
  claimDeliveryFee: z.ZodNumber;
1121
1137
  expectedRefundAmount: z.ZodNullable<z.ZodNumber>;
1138
+ expectedDeliveryFeeRefundAmount: z.ZodNullable<z.ZodNumber>;
1122
1139
  exchangeOption: z.ZodNullable<z.ZodObject<{
1123
1140
  optionId: z.ZodString;
1124
1141
  optionName: z.ZodString;
@@ -1135,6 +1152,14 @@ export declare const claimSchema: z.ZodObject<{
1135
1152
  completedAt: z.ZodNullable<z.ZodString>;
1136
1153
  holdExpiresAt: z.ZodNullable<z.ZodString>;
1137
1154
  holdUsed: z.ZodBoolean;
1155
+ returnAddress: z.ZodNullable<z.ZodObject<{
1156
+ name: z.ZodString;
1157
+ contactName: z.ZodString;
1158
+ phone: z.ZodString;
1159
+ zipCode: z.ZodString;
1160
+ address1: z.ZodString;
1161
+ address2: z.ZodNullable<z.ZodString>;
1162
+ }, z.core.$strip>>;
1138
1163
  }, z.core.$strip>;
1139
1164
  export type Claim = z.infer<typeof claimSchema>;
1140
1165
  export interface ClaimListParams extends PageParams {
@@ -1197,6 +1222,7 @@ export declare const claimDetailSchema: z.ZodObject<{
1197
1222
  }>;
1198
1223
  claimDeliveryFee: z.ZodNumber;
1199
1224
  expectedRefundAmount: z.ZodNullable<z.ZodNumber>;
1225
+ expectedDeliveryFeeRefundAmount: z.ZodNullable<z.ZodNumber>;
1200
1226
  exchangeOption: z.ZodNullable<z.ZodObject<{
1201
1227
  optionId: z.ZodString;
1202
1228
  optionName: z.ZodString;
@@ -1213,6 +1239,14 @@ export declare const claimDetailSchema: z.ZodObject<{
1213
1239
  completedAt: z.ZodNullable<z.ZodString>;
1214
1240
  holdExpiresAt: z.ZodNullable<z.ZodString>;
1215
1241
  holdUsed: z.ZodBoolean;
1242
+ returnAddress: z.ZodNullable<z.ZodObject<{
1243
+ name: z.ZodString;
1244
+ contactName: z.ZodString;
1245
+ phone: z.ZodString;
1246
+ zipCode: z.ZodString;
1247
+ address1: z.ZodString;
1248
+ address2: z.ZodNullable<z.ZodString>;
1249
+ }, z.core.$strip>>;
1216
1250
  histories: z.ZodOptional<z.ZodArray<z.ZodObject<{
1217
1251
  status: z.ZodEnum<{
1218
1252
  REQUESTED: "REQUESTED";
@@ -1256,6 +1290,9 @@ export declare const approveClaimResultSchema: z.ZodObject<{
1256
1290
  claimId: z.ZodString;
1257
1291
  refundAmount: z.ZodNumber;
1258
1292
  deductAmount: z.ZodNumber;
1293
+ quantity: z.ZodNumber;
1294
+ deliveryFeeRefundAmount: z.ZodNumber;
1295
+ deliveryFeeChargeAmount: z.ZodNumber;
1259
1296
  refundedAt: z.ZodString;
1260
1297
  }, z.core.$strip>;
1261
1298
  export type ApproveClaimResult = z.infer<typeof approveClaimResultSchema>;
@@ -1319,6 +1356,125 @@ export declare const customerAddressSchema: z.ZodObject<{
1319
1356
  address1: z.ZodString;
1320
1357
  address2: z.ZodNullable<z.ZodString>;
1321
1358
  }, z.core.$strip>;
1359
+ /** 동의 종류 — 이용약관·개인정보 수집이용은 가입 필수, 마케팅 수신은 선택 */
1360
+ export declare const consentKindSchema: z.ZodEnum<{
1361
+ TERMS: "TERMS";
1362
+ PRIVACY: "PRIVACY";
1363
+ MARKETING: "MARKETING";
1364
+ }>;
1365
+ export type ConsentKind = z.infer<typeof consentKindSchema>;
1366
+ export declare const consentActionSchema: z.ZodEnum<{
1367
+ WITHDRAWN: "WITHDRAWN";
1368
+ AGREED: "AGREED";
1369
+ }>;
1370
+ export type ConsentAction = z.infer<typeof consentActionSchema>;
1371
+ /**
1372
+ * 동의가 일어난 경로. 값이 추가될 수 있어 모르는 값은 그대로 보여 준다.
1373
+ * `SIGNUP` 비밀번호 가입 · `SOCIAL_SIGNUP` 소셜 가입 · `DELEGATED` 셀러 자체 회원 연동 ·
1374
+ * `RECONSENT` 약관 개정 재동의 · `MEMBER_UPDATE` 구매자가 직접 변경 · `SELLER` 셀러가 처리
1375
+ */
1376
+ export declare const consentSourceSchema: z.ZodEnum<{
1377
+ SELLER: "SELLER";
1378
+ SIGNUP: "SIGNUP";
1379
+ SOCIAL_SIGNUP: "SOCIAL_SIGNUP";
1380
+ DELEGATED: "DELEGATED";
1381
+ RECONSENT: "RECONSENT";
1382
+ MEMBER_UPDATE: "MEMBER_UPDATE";
1383
+ }>;
1384
+ export type ConsentSource = z.infer<typeof consentSourceSchema>;
1385
+ /** 동의 이력 한 줄 — 추가만 되고 지워지지 않는다(구매자 탈퇴 시에만 함께 지워진다) */
1386
+ export declare const customerConsentSchema: z.ZodObject<{
1387
+ consentId: z.ZodString;
1388
+ kind: z.ZodEnum<{
1389
+ TERMS: "TERMS";
1390
+ PRIVACY: "PRIVACY";
1391
+ MARKETING: "MARKETING";
1392
+ }>;
1393
+ version: z.ZodNullable<z.ZodString>;
1394
+ documentUrl: z.ZodNullable<z.ZodString>;
1395
+ action: z.ZodEnum<{
1396
+ WITHDRAWN: "WITHDRAWN";
1397
+ AGREED: "AGREED";
1398
+ }>;
1399
+ source: z.ZodEnum<{
1400
+ SELLER: "SELLER";
1401
+ SIGNUP: "SIGNUP";
1402
+ SOCIAL_SIGNUP: "SOCIAL_SIGNUP";
1403
+ DELEGATED: "DELEGATED";
1404
+ RECONSENT: "RECONSENT";
1405
+ MEMBER_UPDATE: "MEMBER_UPDATE";
1406
+ }>;
1407
+ occurredAt: z.ZodString;
1408
+ }, z.core.$strip>;
1409
+ export type CustomerConsent = z.infer<typeof customerConsentSchema>;
1410
+ /** 종류별 현재 동의 상태 */
1411
+ export declare const customerConsentStateSchema: z.ZodObject<{
1412
+ kind: z.ZodEnum<{
1413
+ TERMS: "TERMS";
1414
+ PRIVACY: "PRIVACY";
1415
+ MARKETING: "MARKETING";
1416
+ }>;
1417
+ agreed: z.ZodBoolean;
1418
+ agreedVersion: z.ZodNullable<z.ZodString>;
1419
+ currentVersion: z.ZodNullable<z.ZodString>;
1420
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1421
+ updatedAt: z.ZodNullable<z.ZodString>;
1422
+ reconsentRequired: z.ZodBoolean;
1423
+ }, z.core.$strip>;
1424
+ export type CustomerConsentState = z.infer<typeof customerConsentStateSchema>;
1425
+ export declare const customerConsentsSchema: z.ZodObject<{
1426
+ terms: z.ZodObject<{
1427
+ kind: z.ZodEnum<{
1428
+ TERMS: "TERMS";
1429
+ PRIVACY: "PRIVACY";
1430
+ MARKETING: "MARKETING";
1431
+ }>;
1432
+ agreed: z.ZodBoolean;
1433
+ agreedVersion: z.ZodNullable<z.ZodString>;
1434
+ currentVersion: z.ZodNullable<z.ZodString>;
1435
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1436
+ updatedAt: z.ZodNullable<z.ZodString>;
1437
+ reconsentRequired: z.ZodBoolean;
1438
+ }, z.core.$strip>;
1439
+ privacy: z.ZodObject<{
1440
+ kind: z.ZodEnum<{
1441
+ TERMS: "TERMS";
1442
+ PRIVACY: "PRIVACY";
1443
+ MARKETING: "MARKETING";
1444
+ }>;
1445
+ agreed: z.ZodBoolean;
1446
+ agreedVersion: z.ZodNullable<z.ZodString>;
1447
+ currentVersion: z.ZodNullable<z.ZodString>;
1448
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1449
+ updatedAt: z.ZodNullable<z.ZodString>;
1450
+ reconsentRequired: z.ZodBoolean;
1451
+ }, z.core.$strip>;
1452
+ marketing: z.ZodObject<{
1453
+ kind: z.ZodEnum<{
1454
+ TERMS: "TERMS";
1455
+ PRIVACY: "PRIVACY";
1456
+ MARKETING: "MARKETING";
1457
+ }>;
1458
+ agreed: z.ZodBoolean;
1459
+ agreedVersion: z.ZodNullable<z.ZodString>;
1460
+ currentVersion: z.ZodNullable<z.ZodString>;
1461
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1462
+ updatedAt: z.ZodNullable<z.ZodString>;
1463
+ reconsentRequired: z.ZodBoolean;
1464
+ }, z.core.$strip>;
1465
+ reconsentRequired: z.ZodBoolean;
1466
+ }, z.core.$strip>;
1467
+ export type CustomerConsents = z.infer<typeof customerConsentsSchema>;
1468
+ /** `GET /v1/customers/{id}/consents` 쿼리 — 최근 순이다 */
1469
+ export declare const customerConsentListQuerySchema: z.ZodObject<{
1470
+ page: z.ZodOptional<z.ZodString>;
1471
+ size: z.ZodOptional<z.ZodString>;
1472
+ kind: z.ZodOptional<z.ZodEnum<{
1473
+ TERMS: "TERMS";
1474
+ PRIVACY: "PRIVACY";
1475
+ MARKETING: "MARKETING";
1476
+ }>>;
1477
+ }, z.core.$strip>;
1322
1478
  /** 구매자 상세 — 휴대폰 전체를 보여 준다 */
1323
1479
  export declare const customerDetailSchema: z.ZodObject<{
1324
1480
  customerId: z.ZodString;
@@ -1337,6 +1493,48 @@ export declare const customerDetailSchema: z.ZodObject<{
1337
1493
  }>;
1338
1494
  linkedAt: z.ZodString;
1339
1495
  }, z.core.$strip>>;
1496
+ consents: z.ZodObject<{
1497
+ terms: z.ZodObject<{
1498
+ kind: z.ZodEnum<{
1499
+ TERMS: "TERMS";
1500
+ PRIVACY: "PRIVACY";
1501
+ MARKETING: "MARKETING";
1502
+ }>;
1503
+ agreed: z.ZodBoolean;
1504
+ agreedVersion: z.ZodNullable<z.ZodString>;
1505
+ currentVersion: z.ZodNullable<z.ZodString>;
1506
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1507
+ updatedAt: z.ZodNullable<z.ZodString>;
1508
+ reconsentRequired: z.ZodBoolean;
1509
+ }, z.core.$strip>;
1510
+ privacy: z.ZodObject<{
1511
+ kind: z.ZodEnum<{
1512
+ TERMS: "TERMS";
1513
+ PRIVACY: "PRIVACY";
1514
+ MARKETING: "MARKETING";
1515
+ }>;
1516
+ agreed: z.ZodBoolean;
1517
+ agreedVersion: z.ZodNullable<z.ZodString>;
1518
+ currentVersion: z.ZodNullable<z.ZodString>;
1519
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1520
+ updatedAt: z.ZodNullable<z.ZodString>;
1521
+ reconsentRequired: z.ZodBoolean;
1522
+ }, z.core.$strip>;
1523
+ marketing: z.ZodObject<{
1524
+ kind: z.ZodEnum<{
1525
+ TERMS: "TERMS";
1526
+ PRIVACY: "PRIVACY";
1527
+ MARKETING: "MARKETING";
1528
+ }>;
1529
+ agreed: z.ZodBoolean;
1530
+ agreedVersion: z.ZodNullable<z.ZodString>;
1531
+ currentVersion: z.ZodNullable<z.ZodString>;
1532
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1533
+ updatedAt: z.ZodNullable<z.ZodString>;
1534
+ reconsentRequired: z.ZodBoolean;
1535
+ }, z.core.$strip>;
1536
+ reconsentRequired: z.ZodBoolean;
1537
+ }, z.core.$strip>;
1340
1538
  addresses: z.ZodArray<z.ZodObject<{
1341
1539
  addressId: z.ZodString;
1342
1540
  alias: z.ZodString;
@@ -1991,6 +2189,8 @@ export declare const orderItemSchema: z.ZodObject<{
1991
2189
  optionName: z.ZodNullable<z.ZodString>;
1992
2190
  sellerCode: z.ZodNullable<z.ZodString>;
1993
2191
  quantity: z.ZodNumber;
2192
+ canceledQuantity: z.ZodNumber;
2193
+ activeQuantity: z.ZodNumber;
1994
2194
  unitPrice: z.ZodNumber;
1995
2195
  discountAmount: z.ZodNumber;
1996
2196
  totalPrice: z.ZodNumber;
@@ -2050,6 +2250,28 @@ export declare const orderSchema: z.ZodObject<{
2050
2250
  discountAmount: z.ZodNumber;
2051
2251
  totalAmount: z.ZodNumber;
2052
2252
  paidAt: z.ZodNullable<z.ZodString>;
2253
+ cashReceipt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
2254
+ cashReceiptId: z.ZodString;
2255
+ status: z.ZodString;
2256
+ type: z.ZodString;
2257
+ identityType: z.ZodString;
2258
+ identityNumberMasked: z.ZodString;
2259
+ amount: z.ZodNumber;
2260
+ issuedAmount: z.ZodNumber;
2261
+ provider: z.ZodNullable<z.ZodEnum<{
2262
+ tosspayments: "tosspayments";
2263
+ portone: "portone";
2264
+ }>>;
2265
+ issueNumber: z.ZodNullable<z.ZodString>;
2266
+ receiptUrl: z.ZodNullable<z.ZodString>;
2267
+ issuedAt: z.ZodNullable<z.ZodString>;
2268
+ canceledAt: z.ZodNullable<z.ZodString>;
2269
+ failCode: z.ZodNullable<z.ZodString>;
2270
+ failMessage: z.ZodNullable<z.ZodString>;
2271
+ reissuable: z.ZodBoolean;
2272
+ requestedAt: z.ZodString;
2273
+ updatedAt: z.ZodString;
2274
+ }, z.core.$strip>>>>;
2053
2275
  }, z.core.$strip>;
2054
2276
  testPayment: z.ZodBoolean;
2055
2277
  items: z.ZodArray<z.ZodObject<{
@@ -2076,6 +2298,8 @@ export declare const orderSchema: z.ZodObject<{
2076
2298
  optionName: z.ZodNullable<z.ZodString>;
2077
2299
  sellerCode: z.ZodNullable<z.ZodString>;
2078
2300
  quantity: z.ZodNumber;
2301
+ canceledQuantity: z.ZodNumber;
2302
+ activeQuantity: z.ZodNumber;
2079
2303
  unitPrice: z.ZodNumber;
2080
2304
  discountAmount: z.ZodNumber;
2081
2305
  totalPrice: z.ZodNumber;
@@ -2159,6 +2383,8 @@ export declare const orderItemPageSchema: z.ZodObject<{
2159
2383
  optionName: z.ZodNullable<z.ZodString>;
2160
2384
  sellerCode: z.ZodNullable<z.ZodString>;
2161
2385
  quantity: z.ZodNumber;
2386
+ canceledQuantity: z.ZodNumber;
2387
+ activeQuantity: z.ZodNumber;
2162
2388
  unitPrice: z.ZodNumber;
2163
2389
  discountAmount: z.ZodNumber;
2164
2390
  totalPrice: z.ZodNumber;
@@ -2269,7 +2495,7 @@ export declare const dispatchRequestSchema: z.ZodObject<{
2269
2495
  }>;
2270
2496
  carrierCode: z.ZodOptional<z.ZodString>;
2271
2497
  trackingNumber: z.ZodOptional<z.ZodString>;
2272
- dispatchedAt: z.ZodOptional<z.ZodString>;
2498
+ dispatchedAt: z.ZodOptional<z.ZodISODateTime>;
2273
2499
  }, z.core.$strip>;
2274
2500
  export type DispatchRequest = z.infer<typeof dispatchRequestSchema>;
2275
2501
  export declare const deliveryInfoSchema: z.ZodObject<{
@@ -2293,6 +2519,11 @@ export declare const deliveryInfoSchema: z.ZodObject<{
2293
2519
  deliveredAt: z.ZodNullable<z.ZodString>;
2294
2520
  }, z.core.$strip>;
2295
2521
  export type DeliveryInfo = z.infer<typeof deliveryInfoSchema>;
2522
+ /**
2523
+ * 택배 추적 단계. 응답에서는 문자열로 받는다(값이 추가될 수 있다) — 현재 값은 `ACCEPTED`(접수)·`IN_TRANSIT`(이동 중)·
2524
+ * `OUT_FOR_DELIVERY`(배송 출발)·`DELIVERED`(배송완료)다.
2525
+ */
2526
+ export declare const trackingStageResponseSchema: z.ZodString;
2296
2527
  /** `GET /v1/order-items/{orderItemId}/delivery` 응답 — 배송 정보 + 배송 추적 이벤트 */
2297
2528
  export declare const deliveryStatusSchema: z.ZodObject<{
2298
2529
  orderItemId: z.ZodString;
@@ -2317,7 +2548,14 @@ export declare const deliveryStatusSchema: z.ZodObject<{
2317
2548
  status: z.ZodString;
2318
2549
  location: z.ZodString;
2319
2550
  occurredAt: z.ZodString;
2551
+ stage: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2320
2552
  }, z.core.$strip>>>;
2553
+ tracking: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
2554
+ result: z.ZodNullable<z.ZodString>;
2555
+ stage: z.ZodNullable<z.ZodString>;
2556
+ checkedAt: z.ZodNullable<z.ZodString>;
2557
+ carrierDeliveredAt: z.ZodNullable<z.ZodString>;
2558
+ }, z.core.$strip>>>>;
2321
2559
  }, z.core.$strip>;
2322
2560
  export type DeliveryStatus = z.infer<typeof deliveryStatusSchema>;
2323
2561
  /** `PUT /v1/order-items/{orderItemId}/dispatch/tracking` 응답 — 바뀐 송장 */
@@ -2352,12 +2590,17 @@ export declare const cancelBySellerRequestSchema: z.ZodObject<{
2352
2590
  DELIVERY_IMPOSSIBLE: "DELIVERY_IMPOSSIBLE";
2353
2591
  }>;
2354
2592
  detail: z.ZodOptional<z.ZodString>;
2593
+ quantity: z.ZodOptional<z.ZodNumber>;
2355
2594
  }, z.core.$strip>;
2356
2595
  export type CancelBySellerRequest = z.infer<typeof cancelBySellerRequestSchema>;
2357
2596
  /** `POST /v1/order-items/{orderItemId}/cancel` 응답 — 셀러 직권취소 환불 결과 */
2358
2597
  export declare const cancelBySellerResultSchema: z.ZodObject<{
2359
2598
  orderItemId: z.ZodString;
2360
2599
  refundAmount: z.ZodNumber;
2600
+ quantity: z.ZodNumber;
2601
+ canceledQuantity: z.ZodNumber;
2602
+ deliveryFeeRefundAmount: z.ZodNumber;
2603
+ deliveryFeeChargeAmount: z.ZodNumber;
2361
2604
  refundedAt: z.ZodString;
2362
2605
  }, z.core.$strip>;
2363
2606
  export type CancelBySellerResult = z.infer<typeof cancelBySellerResultSchema>;
@@ -3091,6 +3334,40 @@ export declare const paymentRecordStatusSchema: z.ZodEnum<{
3091
3334
  }>;
3092
3335
  export type PaymentRecordStatus = z.infer<typeof paymentRecordStatusSchema>;
3093
3336
  export declare const paymentAttemptStatusSchema: z.ZodString;
3337
+ /**
3338
+ * 현금영수증 상태 — 값이 추가될 수 있어 응답은 문자열로 받는다. 화면 분기는 이 목록으로 하고 모르는 값은 처리 중으로 다룬다.
3339
+ * - `REQUESTED`: 구매자가 신청했고 결제 승인 전이다
3340
+ * - `PENDING`: 발급·취소를 기다린다(승인 직후, 또는 일시 오류로 자동 재시도 대기)
3341
+ * - `ISSUED`: 발급됐다. 부분 환불이 있었으면 그만큼 취소(또는 재발급)된 금액이다
3342
+ * - `CANCELED`: 전액 환불로 취소됐다
3343
+ * - `FAILED`: 발급·취소가 실패했고 자동 재시도가 끝났다. `failCode`·`failMessage`를 보고 재발급한다
3344
+ * - `SKIPPED`: 발급 대상이 아니다(승인된 결제수단이 계좌이체·가상계좌가 아님)
3345
+ */
3346
+ export declare const CASH_RECEIPT_STATUS_VALUES: readonly ["REQUESTED", "PENDING", "ISSUED", "CANCELED", "FAILED", "SKIPPED"];
3347
+ export type KnownCashReceiptStatus = (typeof CASH_RECEIPT_STATUS_VALUES)[number];
3348
+ export declare const cashReceiptSchema: z.ZodObject<{
3349
+ cashReceiptId: z.ZodString;
3350
+ status: z.ZodString;
3351
+ type: z.ZodString;
3352
+ identityType: z.ZodString;
3353
+ identityNumberMasked: z.ZodString;
3354
+ amount: z.ZodNumber;
3355
+ issuedAmount: z.ZodNumber;
3356
+ provider: z.ZodNullable<z.ZodEnum<{
3357
+ tosspayments: "tosspayments";
3358
+ portone: "portone";
3359
+ }>>;
3360
+ issueNumber: z.ZodNullable<z.ZodString>;
3361
+ receiptUrl: z.ZodNullable<z.ZodString>;
3362
+ issuedAt: z.ZodNullable<z.ZodString>;
3363
+ canceledAt: z.ZodNullable<z.ZodString>;
3364
+ failCode: z.ZodNullable<z.ZodString>;
3365
+ failMessage: z.ZodNullable<z.ZodString>;
3366
+ reissuable: z.ZodBoolean;
3367
+ requestedAt: z.ZodString;
3368
+ updatedAt: z.ZodString;
3369
+ }, z.core.$strip>;
3370
+ export type CashReceipt = z.infer<typeof cashReceiptSchema>;
3094
3371
  export declare const paymentRecordSchema: z.ZodObject<{
3095
3372
  paymentId: z.ZodString;
3096
3373
  orderId: z.ZodNullable<z.ZodString>;
@@ -3129,6 +3406,7 @@ export declare const paymentRecordSchema: z.ZodObject<{
3129
3406
  failMessage: z.ZodNullable<z.ZodString>;
3130
3407
  paidAt: z.ZodNullable<z.ZodString>;
3131
3408
  createdAt: z.ZodString;
3409
+ cashReceiptStatus: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
3132
3410
  }, z.core.$strip>;
3133
3411
  export type PaymentRecord = z.infer<typeof paymentRecordSchema>;
3134
3412
  export declare const paymentRecordPageSchema: z.ZodObject<{
@@ -3174,6 +3452,7 @@ export declare const paymentRecordPageSchema: z.ZodObject<{
3174
3452
  failMessage: z.ZodNullable<z.ZodString>;
3175
3453
  paidAt: z.ZodNullable<z.ZodString>;
3176
3454
  createdAt: z.ZodString;
3455
+ cashReceiptStatus: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
3177
3456
  }, z.core.$strip>>;
3178
3457
  }, z.core.$strip>;
3179
3458
  export type PaymentRecordPage = z.infer<typeof paymentRecordPageSchema>;
@@ -3262,6 +3541,7 @@ export declare const paymentRecordDetailSchema: z.ZodObject<{
3262
3541
  failMessage: z.ZodNullable<z.ZodString>;
3263
3542
  paidAt: z.ZodNullable<z.ZodString>;
3264
3543
  createdAt: z.ZodString;
3544
+ cashReceiptStatus: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
3265
3545
  refundableAmount: z.ZodNumber;
3266
3546
  merchantId: z.ZodNullable<z.ZodString>;
3267
3547
  attempts: z.ZodArray<z.ZodObject<{
@@ -3309,6 +3589,28 @@ export declare const paymentRecordDetailSchema: z.ZodObject<{
3309
3589
  requestedAt: z.ZodString;
3310
3590
  completedAt: z.ZodNullable<z.ZodString>;
3311
3591
  }, z.core.$strip>>;
3592
+ cashReceipt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3593
+ cashReceiptId: z.ZodString;
3594
+ status: z.ZodString;
3595
+ type: z.ZodString;
3596
+ identityType: z.ZodString;
3597
+ identityNumberMasked: z.ZodString;
3598
+ amount: z.ZodNumber;
3599
+ issuedAmount: z.ZodNumber;
3600
+ provider: z.ZodNullable<z.ZodEnum<{
3601
+ tosspayments: "tosspayments";
3602
+ portone: "portone";
3603
+ }>>;
3604
+ issueNumber: z.ZodNullable<z.ZodString>;
3605
+ receiptUrl: z.ZodNullable<z.ZodString>;
3606
+ issuedAt: z.ZodNullable<z.ZodString>;
3607
+ canceledAt: z.ZodNullable<z.ZodString>;
3608
+ failCode: z.ZodNullable<z.ZodString>;
3609
+ failMessage: z.ZodNullable<z.ZodString>;
3610
+ reissuable: z.ZodBoolean;
3611
+ requestedAt: z.ZodString;
3612
+ updatedAt: z.ZodString;
3613
+ }, z.core.$strip>>>>;
3312
3614
  }, z.core.$strip>;
3313
3615
  export type PaymentRecordDetail = z.infer<typeof paymentRecordDetailSchema>;
3314
3616
  /** `GET /v1/payments` 쿼리 — OpenAPI 문서용 형태(값은 쿼리 문자열) */
@@ -3458,6 +3760,13 @@ export declare const productSchema: z.ZodObject<{
3458
3760
  conditionalFreeAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3459
3761
  returnFee: z.ZodOptional<z.ZodNumber>;
3460
3762
  exchangeFee: z.ZodOptional<z.ZodNumber>;
3763
+ refundPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3764
+ preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
3765
+ returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
3766
+ exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
3767
+ sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
3768
+ conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
3769
+ }, z.core.$strict>>>;
3461
3770
  shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3462
3771
  returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3463
3772
  createdAt: z.ZodOptional<z.ZodString>;
@@ -3611,12 +3920,19 @@ export declare const productCreateRequestSchema: z.ZodObject<{
3611
3920
  PAID: "PAID";
3612
3921
  CONDITIONAL_FREE: "CONDITIONAL_FREE";
3613
3922
  }>>;
3614
- deliveryFee: z.ZodDefault<z.ZodNumber>;
3923
+ deliveryFee: z.ZodOptional<z.ZodNumber>;
3615
3924
  conditionalFreeAmount: z.ZodOptional<z.ZodNumber>;
3616
3925
  returnFee: z.ZodDefault<z.ZodNumber>;
3617
3926
  exchangeFee: z.ZodDefault<z.ZodNumber>;
3618
- shippingAddressId: z.ZodOptional<z.ZodString>;
3619
- returnAddressId: z.ZodOptional<z.ZodString>;
3927
+ refundPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3928
+ preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
3929
+ returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
3930
+ exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
3931
+ sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
3932
+ conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
3933
+ }, z.core.$strict>>>;
3934
+ shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3935
+ returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3620
3936
  optionGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
3621
3937
  groupId: z.ZodOptional<z.ZodString>;
3622
3938
  name: z.ZodString;
@@ -3649,6 +3965,8 @@ export declare const productPatchRequestSchema: z.ZodObject<{
3649
3965
  CLOSED: "CLOSED";
3650
3966
  }>>;
3651
3967
  deliveryFee: z.ZodOptional<z.ZodNumber>;
3968
+ shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3969
+ returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3652
3970
  }, z.core.$strip>;
3653
3971
  export type ProductPatchRequest = z.infer<typeof productPatchRequestSchema>;
3654
3972
  export declare const productSortSchema: z.ZodEnum<{
@@ -3731,6 +4049,16 @@ export declare const analyticsOriginSchema: z.ZodString;
3731
4049
  export declare const MAX_ANALYTICS_ALLOWED_ORIGINS = 20;
3732
4050
  /** 자동 배송완료·자동 구매확정 대기일 상한 */
3733
4051
  export declare const MAX_AUTO_TRANSITION_DAYS = 30;
4052
+ /**
4053
+ * 약관 버전 — 스토어가 정하는 문자열이다(`1`·`2`·`2026-09-26`·`v1.2` 등). 형식은 강제하지 않고 값이 다르면 다른 버전이다.
4054
+ * 올리면 그 약관에 동의한 구매자의 `reconsentRequired`가 켜지고, 재동의가 이력에 남는다. 되돌리면 재동의 요구도 풀린다.
4055
+ */
4056
+ export declare const policyVersionSchema: z.ZodString;
4057
+ /**
4058
+ * 약관 문서 주소 — 구매자에게 보여 주는 약관 본문의 주소다. 동의 시점 값이 이력 행에 복사되므로
4059
+ * 나중에 주소를 바꿔도 "무엇에 동의했는지"가 남는다. `null`로 지울 수 있다.
4060
+ */
4061
+ export declare const policyDocumentUrlSchema: z.ZodNullable<z.ZodURL>;
3734
4062
  /** `PATCH /v1/store` 본문 — 바꿀 필드만 보낸다 */
3735
4063
  export declare const updateStoreRequestSchema: z.ZodObject<{
3736
4064
  name: z.ZodOptional<z.ZodString>;
@@ -3742,6 +4070,23 @@ export declare const updateStoreRequestSchema: z.ZodObject<{
3742
4070
  guestCheckoutEnabled: z.ZodOptional<z.ZodBoolean>;
3743
4071
  autoDeliverDays: z.ZodOptional<z.ZodNumber>;
3744
4072
  autoConfirmDays: z.ZodOptional<z.ZodNumber>;
4073
+ refundPolicy: z.ZodOptional<z.ZodObject<{
4074
+ preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
4075
+ returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
4076
+ exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
4077
+ sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
4078
+ conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
4079
+ }, z.core.$strict>>;
4080
+ shippingPolicy: z.ZodOptional<z.ZodObject<{
4081
+ baseDeliveryFee: z.ZodOptional<z.ZodNumber>;
4082
+ freeThreshold: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4083
+ jejuSurcharge: z.ZodOptional<z.ZodNumber>;
4084
+ isolatedSurcharge: z.ZodOptional<z.ZodNumber>;
4085
+ }, z.core.$strict>>;
4086
+ termsVersion: z.ZodOptional<z.ZodString>;
4087
+ privacyVersion: z.ZodOptional<z.ZodString>;
4088
+ termsUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
4089
+ privacyUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
3745
4090
  }, z.core.$strip>;
3746
4091
  export type UpdateStoreRequest = z.infer<typeof updateStoreRequestSchema>;
3747
4092
  export declare const storeSchema: z.ZodObject<{
@@ -3762,6 +4107,25 @@ export declare const storeSchema: z.ZodObject<{
3762
4107
  guestCheckoutEnabled: z.ZodBoolean;
3763
4108
  autoDeliverDays: z.ZodNumber;
3764
4109
  autoConfirmDays: z.ZodNumber;
4110
+ refundPolicy: z.ZodObject<{
4111
+ preShipmentDeliveryFeeRefund: z.ZodBoolean;
4112
+ returnDeliveryFee: z.ZodNumber;
4113
+ exchangeDeliveryFee: z.ZodNumber;
4114
+ sellerFaultFreeShipping: z.ZodBoolean;
4115
+ conditionalFreeShortfallCharge: z.ZodBoolean;
4116
+ }, z.core.$strip>;
4117
+ shippingPolicy: z.ZodObject<{
4118
+ baseDeliveryFee: z.ZodNumber;
4119
+ freeThreshold: z.ZodNullable<z.ZodNumber>;
4120
+ jejuSurcharge: z.ZodNumber;
4121
+ isolatedSurcharge: z.ZodNumber;
4122
+ }, z.core.$strip>;
4123
+ termsVersion: z.ZodString;
4124
+ privacyVersion: z.ZodString;
4125
+ termsVersionUpdatedAt: z.ZodNullable<z.ZodString>;
4126
+ privacyVersionUpdatedAt: z.ZodNullable<z.ZodString>;
4127
+ termsUrl: z.ZodNullable<z.ZodString>;
4128
+ privacyUrl: z.ZodNullable<z.ZodString>;
3765
4129
  memberCount: z.ZodNumber;
3766
4130
  createdAt: z.ZodString;
3767
4131
  }, z.core.$strip>;
@@ -4270,6 +4634,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
4270
4634
  conditionalFreeAmount?: number | null | undefined;
4271
4635
  returnFee?: number | undefined;
4272
4636
  exchangeFee?: number | undefined;
4637
+ refundPolicy?: {
4638
+ preShipmentDeliveryFeeRefund?: boolean | undefined;
4639
+ returnDeliveryFee?: number | undefined;
4640
+ exchangeDeliveryFee?: number | undefined;
4641
+ sellerFaultFreeShipping?: boolean | undefined;
4642
+ conditionalFreeShortfallCharge?: boolean | undefined;
4643
+ } | null | undefined;
4273
4644
  shippingAddressId?: string | null | undefined;
4274
4645
  returnAddressId?: string | null | undefined;
4275
4646
  createdAt?: string | undefined;
@@ -4321,6 +4692,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
4321
4692
  conditionalFreeAmount?: number | null | undefined;
4322
4693
  returnFee?: number | undefined;
4323
4694
  exchangeFee?: number | undefined;
4695
+ refundPolicy?: {
4696
+ preShipmentDeliveryFeeRefund?: boolean | undefined;
4697
+ returnDeliveryFee?: number | undefined;
4698
+ exchangeDeliveryFee?: number | undefined;
4699
+ sellerFaultFreeShipping?: boolean | undefined;
4700
+ conditionalFreeShortfallCharge?: boolean | undefined;
4701
+ } | null | undefined;
4324
4702
  shippingAddressId?: string | null | undefined;
4325
4703
  returnAddressId?: string | null | undefined;
4326
4704
  createdAt?: string | undefined;
@@ -4372,6 +4750,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
4372
4750
  conditionalFreeAmount?: number | null | undefined;
4373
4751
  returnFee?: number | undefined;
4374
4752
  exchangeFee?: number | undefined;
4753
+ refundPolicy?: {
4754
+ preShipmentDeliveryFeeRefund?: boolean | undefined;
4755
+ returnDeliveryFee?: number | undefined;
4756
+ exchangeDeliveryFee?: number | undefined;
4757
+ sellerFaultFreeShipping?: boolean | undefined;
4758
+ conditionalFreeShortfallCharge?: boolean | undefined;
4759
+ } | null | undefined;
4375
4760
  shippingAddressId?: string | null | undefined;
4376
4761
  returnAddressId?: string | null | undefined;
4377
4762
  createdAt?: string | undefined;
@@ -4665,6 +5050,25 @@ export declare function createStoreClient(options: StoreClientOptions): {
4665
5050
  discountAmount: number;
4666
5051
  totalAmount: number;
4667
5052
  paidAt: string | null;
5053
+ cashReceipt: {
5054
+ cashReceiptId: string;
5055
+ status: string;
5056
+ type: string;
5057
+ identityType: string;
5058
+ identityNumberMasked: string;
5059
+ amount: number;
5060
+ issuedAmount: number;
5061
+ provider: "tosspayments" | "portone" | null;
5062
+ issueNumber: string | null;
5063
+ receiptUrl: string | null;
5064
+ issuedAt: string | null;
5065
+ canceledAt: string | null;
5066
+ failCode: string | null;
5067
+ failMessage: string | null;
5068
+ reissuable: boolean;
5069
+ requestedAt: string;
5070
+ updatedAt: string;
5071
+ } | null;
4668
5072
  };
4669
5073
  testPayment: boolean;
4670
5074
  items: {
@@ -4678,6 +5082,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
4678
5082
  optionName: string | null;
4679
5083
  sellerCode: string | null;
4680
5084
  quantity: number;
5085
+ canceledQuantity: number;
5086
+ activeQuantity: number;
4681
5087
  unitPrice: number;
4682
5088
  discountAmount: number;
4683
5089
  totalPrice: number;
@@ -4693,6 +5099,29 @@ export declare function createStoreClient(options: StoreClientOptions): {
4693
5099
  testPayment: boolean;
4694
5100
  }[];
4695
5101
  }>;
5102
+ /**
5103
+ * `POST /v1/orders/{orderId}/cash-receipt/reissue` — 실패했거나 재시도 대기 중인 현금영수증을 지금 다시 발급·취소한다.
5104
+ * 콘솔 OWNER·ADMIN 전용(PAT·M2M 403 `INSUFFICIENT_ROLE`). 404 `CASH_RECEIPT_NOT_FOUND`, 409 `CASH_RECEIPT_NOT_REISSUABLE`
5105
+ */
5106
+ reissueCashReceipt: (orderId: string) => Promise<{
5107
+ cashReceiptId: string;
5108
+ status: string;
5109
+ type: string;
5110
+ identityType: string;
5111
+ identityNumberMasked: string;
5112
+ amount: number;
5113
+ issuedAmount: number;
5114
+ provider: "tosspayments" | "portone" | null;
5115
+ issueNumber: string | null;
5116
+ receiptUrl: string | null;
5117
+ issuedAt: string | null;
5118
+ canceledAt: string | null;
5119
+ failCode: string | null;
5120
+ failMessage: string | null;
5121
+ reissuable: boolean;
5122
+ requestedAt: string;
5123
+ updatedAt: string;
5124
+ }>;
4696
5125
  };
4697
5126
  orderItems: {
4698
5127
  /** `GET /v1/order-items`. `testPayment` 필터는 `orders.list`와 같다 */
@@ -4712,6 +5141,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
4712
5141
  optionName: string | null;
4713
5142
  sellerCode: string | null;
4714
5143
  quantity: number;
5144
+ canceledQuantity: number;
5145
+ activeQuantity: number;
4715
5146
  unitPrice: number;
4716
5147
  discountAmount: number;
4717
5148
  totalPrice: number;
@@ -4743,6 +5174,10 @@ export declare function createStoreClient(options: StoreClientOptions): {
4743
5174
  cancelBySeller: (orderItemId: string, body: CancelBySellerRequest, idempotencyKey?: string) => Promise<{
4744
5175
  orderItemId: string;
4745
5176
  refundAmount: number;
5177
+ quantity: number;
5178
+ canceledQuantity: number;
5179
+ deliveryFeeRefundAmount: number;
5180
+ deliveryFeeChargeAmount: number;
4746
5181
  refundedAt: string;
4747
5182
  }>;
4748
5183
  updateMemo: (orderItemId: string, memo: string) => Promise<void>;
@@ -4791,6 +5226,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
4791
5226
  optionName: string | null;
4792
5227
  sellerCode: string | null;
4793
5228
  quantity: number;
5229
+ canceledQuantity: number;
5230
+ activeQuantity: number;
4794
5231
  unitPrice: number;
4795
5232
  discountAmount: number;
4796
5233
  totalPrice: number;
@@ -4826,10 +5263,17 @@ export declare function createStoreClient(options: StoreClientOptions): {
4826
5263
  status: "DISPATCHED" | "DELIVERING" | "DELIVERED";
4827
5264
  dispatchedAt: string;
4828
5265
  deliveredAt: string | null;
5266
+ tracking: {
5267
+ result: string | null;
5268
+ stage: string | null;
5269
+ checkedAt: string | null;
5270
+ carrierDeliveredAt: string | null;
5271
+ } | null;
4829
5272
  trackingEvents?: {
4830
5273
  status: string;
4831
5274
  location: string;
4832
5275
  occurredAt: string;
5276
+ stage: string | null;
4833
5277
  }[] | undefined;
4834
5278
  }>;
4835
5279
  };
@@ -4859,6 +5303,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
4859
5303
  responsibility: "BUYER" | "SELLER";
4860
5304
  claimDeliveryFee: number;
4861
5305
  expectedRefundAmount: number | null;
5306
+ expectedDeliveryFeeRefundAmount: number | null;
4862
5307
  exchangeOption: {
4863
5308
  optionId: string;
4864
5309
  optionName: string;
@@ -4872,6 +5317,14 @@ export declare function createStoreClient(options: StoreClientOptions): {
4872
5317
  completedAt: string | null;
4873
5318
  holdExpiresAt: string | null;
4874
5319
  holdUsed: boolean;
5320
+ returnAddress: {
5321
+ name: string;
5322
+ contactName: string;
5323
+ phone: string;
5324
+ zipCode: string;
5325
+ address1: string;
5326
+ address2: string | null;
5327
+ } | null;
4875
5328
  }[];
4876
5329
  }>;
4877
5330
  get: (claimId: string) => Promise<{
@@ -4887,6 +5340,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
4887
5340
  responsibility: "BUYER" | "SELLER";
4888
5341
  claimDeliveryFee: number;
4889
5342
  expectedRefundAmount: number | null;
5343
+ expectedDeliveryFeeRefundAmount: number | null;
4890
5344
  exchangeOption: {
4891
5345
  optionId: string;
4892
5346
  optionName: string;
@@ -4900,6 +5354,14 @@ export declare function createStoreClient(options: StoreClientOptions): {
4900
5354
  completedAt: string | null;
4901
5355
  holdExpiresAt: string | null;
4902
5356
  holdUsed: boolean;
5357
+ returnAddress: {
5358
+ name: string;
5359
+ contactName: string;
5360
+ phone: string;
5361
+ zipCode: string;
5362
+ address1: string;
5363
+ address2: string | null;
5364
+ } | null;
4903
5365
  histories?: {
4904
5366
  status: "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "REJECTED" | "COMPLETED" | "WITHDRAWN";
4905
5367
  actor: "BUYER" | "SELLER" | "SYSTEM";
@@ -4910,6 +5372,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
4910
5372
  claimId: string;
4911
5373
  refundAmount: number;
4912
5374
  deductAmount: number;
5375
+ quantity: number;
5376
+ deliveryFeeRefundAmount: number;
5377
+ deliveryFeeChargeAmount: number;
4913
5378
  refundedAt: string;
4914
5379
  }>;
4915
5380
  reject: (claimId: string, body: RejectClaimRequest) => Promise<void>;
@@ -4938,6 +5403,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
4938
5403
  responsibility: "BUYER" | "SELLER";
4939
5404
  claimDeliveryFee: number;
4940
5405
  expectedRefundAmount: number | null;
5406
+ expectedDeliveryFeeRefundAmount: number | null;
4941
5407
  exchangeOption: {
4942
5408
  optionId: string;
4943
5409
  optionName: string;
@@ -4951,6 +5417,14 @@ export declare function createStoreClient(options: StoreClientOptions): {
4951
5417
  completedAt: string | null;
4952
5418
  holdExpiresAt: string | null;
4953
5419
  holdUsed: boolean;
5420
+ returnAddress: {
5421
+ name: string;
5422
+ contactName: string;
5423
+ phone: string;
5424
+ zipCode: string;
5425
+ address1: string;
5426
+ address2: string | null;
5427
+ } | null;
4954
5428
  }>;
4955
5429
  };
4956
5430
  inquiries: {
@@ -5130,6 +5604,36 @@ export declare function createStoreClient(options: StoreClientOptions): {
5130
5604
  method: "kakao" | "naver" | "google" | "password";
5131
5605
  linkedAt: string;
5132
5606
  }[];
5607
+ consents: {
5608
+ terms: {
5609
+ kind: "TERMS" | "PRIVACY" | "MARKETING";
5610
+ agreed: boolean;
5611
+ agreedVersion: string | null;
5612
+ currentVersion: string | null;
5613
+ currentDocumentUrl: string | null;
5614
+ updatedAt: string | null;
5615
+ reconsentRequired: boolean;
5616
+ };
5617
+ privacy: {
5618
+ kind: "TERMS" | "PRIVACY" | "MARKETING";
5619
+ agreed: boolean;
5620
+ agreedVersion: string | null;
5621
+ currentVersion: string | null;
5622
+ currentDocumentUrl: string | null;
5623
+ updatedAt: string | null;
5624
+ reconsentRequired: boolean;
5625
+ };
5626
+ marketing: {
5627
+ kind: "TERMS" | "PRIVACY" | "MARKETING";
5628
+ agreed: boolean;
5629
+ agreedVersion: string | null;
5630
+ currentVersion: string | null;
5631
+ currentDocumentUrl: string | null;
5632
+ updatedAt: string | null;
5633
+ reconsentRequired: boolean;
5634
+ };
5635
+ reconsentRequired: boolean;
5636
+ };
5133
5637
  addresses: {
5134
5638
  addressId: string;
5135
5639
  alias: string;
@@ -5169,6 +5673,24 @@ export declare function createStoreClient(options: StoreClientOptions): {
5169
5673
  }[];
5170
5674
  }[];
5171
5675
  }>;
5676
+ /** 동의 이력 — 최근 순. 가입·재동의·마케팅 변경이 한 줄씩 남는다 */
5677
+ consents: (customerId: string, params?: PageParams & {
5678
+ kind?: ConsentKind;
5679
+ }) => Promise<{
5680
+ page: number;
5681
+ size: number;
5682
+ totalElements: number;
5683
+ totalPages: number;
5684
+ contents: {
5685
+ consentId: string;
5686
+ kind: "TERMS" | "PRIVACY" | "MARKETING";
5687
+ version: string | null;
5688
+ documentUrl: string | null;
5689
+ action: "WITHDRAWN" | "AGREED";
5690
+ source: "SELLER" | "SIGNUP" | "SOCIAL_SIGNUP" | "DELEGATED" | "RECONSENT" | "MEMBER_UPDATE";
5691
+ occurredAt: string;
5692
+ }[];
5693
+ }>;
5172
5694
  withdraw: (customerId: string, body: WithdrawCustomerRequest) => Promise<void>;
5173
5695
  };
5174
5696
  customerInquiries: {
@@ -5536,6 +6058,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5536
6058
  failMessage: string | null;
5537
6059
  paidAt: string | null;
5538
6060
  createdAt: string;
6061
+ cashReceiptStatus: string | null;
5539
6062
  }[];
5540
6063
  }>;
5541
6064
  /** `GET /v1/payments/{paymentId}` — 시도·환불 이력 포함. 404 `PAYMENT_NOT_FOUND` */
@@ -5559,6 +6082,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
5559
6082
  failMessage: string | null;
5560
6083
  paidAt: string | null;
5561
6084
  createdAt: string;
6085
+ cashReceiptStatus: string | null;
5562
6086
  refundableAmount: number;
5563
6087
  merchantId: string | null;
5564
6088
  attempts: {
@@ -5588,6 +6112,25 @@ export declare function createStoreClient(options: StoreClientOptions): {
5588
6112
  requestedAt: string;
5589
6113
  completedAt: string | null;
5590
6114
  }[];
6115
+ cashReceipt: {
6116
+ cashReceiptId: string;
6117
+ status: string;
6118
+ type: string;
6119
+ identityType: string;
6120
+ identityNumberMasked: string;
6121
+ amount: number;
6122
+ issuedAmount: number;
6123
+ provider: "tosspayments" | "portone" | null;
6124
+ issueNumber: string | null;
6125
+ receiptUrl: string | null;
6126
+ issuedAt: string | null;
6127
+ canceledAt: string | null;
6128
+ failCode: string | null;
6129
+ failMessage: string | null;
6130
+ reissuable: boolean;
6131
+ requestedAt: string;
6132
+ updatedAt: string;
6133
+ } | null;
5591
6134
  }>;
5592
6135
  };
5593
6136
  /**
@@ -6540,6 +7083,25 @@ export declare function createStoreClient(options: StoreClientOptions): {
6540
7083
  guestCheckoutEnabled: boolean;
6541
7084
  autoDeliverDays: number;
6542
7085
  autoConfirmDays: number;
7086
+ refundPolicy: {
7087
+ preShipmentDeliveryFeeRefund: boolean;
7088
+ returnDeliveryFee: number;
7089
+ exchangeDeliveryFee: number;
7090
+ sellerFaultFreeShipping: boolean;
7091
+ conditionalFreeShortfallCharge: boolean;
7092
+ };
7093
+ shippingPolicy: {
7094
+ baseDeliveryFee: number;
7095
+ freeThreshold: number | null;
7096
+ jejuSurcharge: number;
7097
+ isolatedSurcharge: number;
7098
+ };
7099
+ termsVersion: string;
7100
+ privacyVersion: string;
7101
+ termsVersionUpdatedAt: string | null;
7102
+ privacyVersionUpdatedAt: string | null;
7103
+ termsUrl: string | null;
7104
+ privacyUrl: string | null;
6543
7105
  memberCount: number;
6544
7106
  createdAt: string;
6545
7107
  }>;
@@ -6561,6 +7123,25 @@ export declare function createStoreClient(options: StoreClientOptions): {
6561
7123
  guestCheckoutEnabled: boolean;
6562
7124
  autoDeliverDays: number;
6563
7125
  autoConfirmDays: number;
7126
+ refundPolicy: {
7127
+ preShipmentDeliveryFeeRefund: boolean;
7128
+ returnDeliveryFee: number;
7129
+ exchangeDeliveryFee: number;
7130
+ sellerFaultFreeShipping: boolean;
7131
+ conditionalFreeShortfallCharge: boolean;
7132
+ };
7133
+ shippingPolicy: {
7134
+ baseDeliveryFee: number;
7135
+ freeThreshold: number | null;
7136
+ jejuSurcharge: number;
7137
+ isolatedSurcharge: number;
7138
+ };
7139
+ termsVersion: string;
7140
+ privacyVersion: string;
7141
+ termsVersionUpdatedAt: string | null;
7142
+ privacyVersionUpdatedAt: string | null;
7143
+ termsUrl: string | null;
7144
+ privacyUrl: string | null;
6564
7145
  memberCount: number;
6565
7146
  createdAt: string;
6566
7147
  }>;
@@ -6644,6 +7225,77 @@ export declare function exchangeStoreTokenViaOAuth(options: {
6644
7225
  role?: string;
6645
7226
  }>;
6646
7227
  //#endregion
7228
+ //#region src/schemas/refund-policy.d.ts
7229
+ /** 유효 환불 정책 — 스토어 기본 + 상품별 덮어쓰기를 합친 결과 */
7230
+ export declare const refundPolicySchema: z.ZodObject<{
7231
+ preShipmentDeliveryFeeRefund: z.ZodBoolean;
7232
+ returnDeliveryFee: z.ZodNumber;
7233
+ exchangeDeliveryFee: z.ZodNumber;
7234
+ sellerFaultFreeShipping: z.ZodBoolean;
7235
+ conditionalFreeShortfallCharge: z.ZodBoolean;
7236
+ }, z.core.$strip>;
7237
+ export type RefundPolicy = z.infer<typeof refundPolicySchema>;
7238
+ /**
7239
+ * 스토어가 정하지 않았을 때 서버가 쓰는 값.
7240
+ *
7241
+ * `as const`가 아니라 `RefundPolicy`로 타입을 좁힌다 — 리터럴 타입이면 `Partial<typeof …>`로 일부만 바꿀 때
7242
+ * `true` 자리에 `false`를 넣을 수 없다.
7243
+ */
7244
+ export declare const REFUND_POLICY_DEFAULTS: RefundPolicy;
7245
+ /**
7246
+ * 부분 정책 — 스토어 설정 요청과 상품별 덮어쓰기가 쓴다. 준 항목만 바뀐다.
7247
+ *
7248
+ * `strictObject`라 모르는 키는 400이다. 오타(`returnFee` 등)를 조용히 무시하면 셀러는 저장됐다고
7249
+ * 믿는데 정책은 기본값으로 남는다.
7250
+ */
7251
+ export declare const refundPolicyPatchSchema: z.ZodObject<{
7252
+ preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
7253
+ returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
7254
+ exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
7255
+ sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
7256
+ conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
7257
+ }, z.core.$strict>;
7258
+ export type RefundPolicyPatch = z.infer<typeof refundPolicyPatchSchema>;
7259
+ /** 정책 해석에 쓰는 상품 값 — 상품별 덮어쓰기와 레거시 배송비 필드 */
7260
+ export interface RefundPolicyProductInput {
7261
+ /** 상품별 덮어쓰기. 없으면 스토어 기본을 그대로 쓴다 */
7262
+ refundPolicy?: RefundPolicyPatch | null;
7263
+ /** @deprecated 레거시 상품 반품비 — `refundPolicy`가 없는 옛 상품의 값이다 */
7264
+ returnFee?: number | null;
7265
+ /** @deprecated 레거시 상품 교환비 — `refundPolicy`가 없는 옛 상품의 값이다 */
7266
+ exchangeFee?: number | null;
7267
+ }
7268
+ /**
7269
+ * 유효 정책 해석 — 상품별 덮어쓰기 → 스토어 기본 → `REFUND_POLICY_DEFAULTS` 순이다.
7270
+ *
7271
+ * 반품비·교환비는 레거시 필드(`products.returnFee`·`exchangeFee`)와 **연결**한다. 상품이
7272
+ * `refundPolicy.returnDeliveryFee`를 정하면 그 값이 원천이고(서버가 `returnFee`도 같은 값으로 맞춘다),
7273
+ * 정하지 않았으면 레거시 값이 0보다 클 때 그 값을 쓴다. 0이면 스토어 기본을 따른다 —
7274
+ * 정책이 생기기 전에 만든 상품(반품비 0)이 스토어 기본을 물려받게 하는 규칙이다.
7275
+ */
7276
+ export declare function resolveRefundPolicy(storePolicy?: RefundPolicyPatch | null, product?: RefundPolicyProductInput | null): RefundPolicy;
7277
+ /**
7278
+ * 상품의 **덮어쓰기 자체** — 레거시 반품비·교환비를 같은 형태로 승격한 값이다. 덮어쓰기가 없으면 null.
7279
+ *
7280
+ * `resolveRefundPolicy`가 합친 결과로는 "상품이 정한 값"과 "스토어 기본을 물려받은 값"을 가를 수 없다.
7281
+ * 관리 API 응답의 `refundPolicy`와 콘솔 폼의 덮어쓰기 스위치가 이 함수를 원천으로 쓴다 — 가르지 못하면
7282
+ * 스토어 기본을 쓰는 상품을 저장할 때 그 순간의 기본값이 상품에 박히거나, 레거시 값이 조용히 사라진다.
7283
+ */
7284
+ export declare function productRefundPolicyOverride(product?: RefundPolicyProductInput | null): RefundPolicyPatch | null;
7285
+ /**
7286
+ * 수량 단위 부분 취소의 환불 기준액 — **누적 내림의 차분**이다.
7287
+ *
7288
+ * 원 단위 반올림 규칙: `floor(주문상품 금액 × 누적 수량 ÷ 전체 수량)`을 두 번 구해 그 차를 쓴다.
7289
+ * 부분 취소를 몇 번 나눠도 합이 주문상품 금액과 정확히 같아서 1원이 남거나 넘치지 않는다.
7290
+ * 할인은 이미 단가에 들어 있어(주문 단위 쿠폰이 없다) 별도 안분이 없다.
7291
+ *
7292
+ * @param totalPrice 주문상품 금액 (할인 반영 단가 × 전체 수량)
7293
+ * @param quantity 주문상품 전체 수량
7294
+ * @param settledQuantity 이미 취소·반품된 누적 수량
7295
+ * @param cancelQuantity 이번에 취소·반품할 수량
7296
+ */
7297
+ export declare function proratedRefundBase(totalPrice: number, quantity: number, settledQuantity: number, cancelQuantity: number): number;
7298
+ //#endregion
6647
7299
  //#region src/schemas/scope.d.ts
6648
7300
  /**
6649
7301
  * 스토어 스코프 카탈로그 (auth-spec §7) — 형식 `{리소스}:{r|rw}`, rw는 r을 함의한다.
@@ -6700,6 +7352,194 @@ export declare const STORE_ROLE_SCOPES: {
6700
7352
  readonly STAFF: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "customer:r"];
6701
7353
  };
6702
7354
  //#endregion
7355
+ //#region src/schemas/shipping-policy.d.ts
7356
+ /** 유효 배송비 정책 — 스토어가 정하지 않은 항목은 `SHIPPING_POLICY_DEFAULTS`로 채운 값이다 */
7357
+ export declare const shippingPolicySchema: z.ZodObject<{
7358
+ baseDeliveryFee: z.ZodNumber;
7359
+ freeThreshold: z.ZodNullable<z.ZodNumber>;
7360
+ jejuSurcharge: z.ZodNumber;
7361
+ isolatedSurcharge: z.ZodNumber;
7362
+ }, z.core.$strip>;
7363
+ export type ShippingPolicy = z.infer<typeof shippingPolicySchema>;
7364
+ /**
7365
+ * 스토어가 정하지 않았을 때 서버가 쓰는 값.
7366
+ *
7367
+ * `as const`가 아니라 `ShippingPolicy`로 좁힌다 — 리터럴 타입이면 `Partial<typeof …>`로 일부만 바꿀 때
7368
+ * `null` 자리에 숫자를 넣을 수 없다(`REFUND_POLICY_DEFAULTS`와 같은 이유).
7369
+ */
7370
+ export declare const SHIPPING_POLICY_DEFAULTS: ShippingPolicy;
7371
+ /**
7372
+ * 부분 정책 — `PATCH /v1/store`의 `shippingPolicy`가 쓴다. 준 항목만 바뀐다.
7373
+ *
7374
+ * `strictObject`라 모르는 키는 400이다. 오타를 조용히 무시하면 셀러는 저장됐다고 믿는데
7375
+ * 정책은 기본값으로 남는다(`refundPolicyPatchSchema`와 같은 이유).
7376
+ */
7377
+ export declare const shippingPolicyPatchSchema: z.ZodObject<{
7378
+ baseDeliveryFee: z.ZodOptional<z.ZodNumber>;
7379
+ freeThreshold: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7380
+ jejuSurcharge: z.ZodOptional<z.ZodNumber>;
7381
+ isolatedSurcharge: z.ZodOptional<z.ZodNumber>;
7382
+ }, z.core.$strict>;
7383
+ export type ShippingPolicyPatch = z.infer<typeof shippingPolicyPatchSchema>;
7384
+ /** 유효 정책 해석 — 스토어가 정한 항목 + `SHIPPING_POLICY_DEFAULTS` */
7385
+ export declare function resolveShippingPolicy(patch?: ShippingPolicyPatch | null): ShippingPolicy;
7386
+ /** 지역 구분 — 우편번호로 판정한다 */
7387
+ export declare const remoteAreaSchema: z.ZodEnum<{
7388
+ NONE: "NONE";
7389
+ JEJU: "JEJU";
7390
+ ISOLATED: "ISOLATED";
7391
+ }>;
7392
+ export type RemoteArea = z.infer<typeof remoteAreaSchema>;
7393
+ /**
7394
+ * 제주·도서산간 우편번호 범위 — **코드 상수다.** 금액은 스토어가 정하고 범위는 플랫폼이 고정한다.
7395
+ *
7396
+ * 국내 택배사가 공표하는 제주·도서산간 할증 구간을 5자리 우편번호 범위로 옮긴 표다. 셀러마다
7397
+ * 범위가 다르면 같은 주소에 다른 금액이 나가고 CS가 셀러 수만큼 갈라진다. 스토어별 범위 편집은
7398
+ * 후속 과제이고, 지금은 이 표가 유일한 원천이다.
7399
+ *
7400
+ * ## 근거
7401
+ *
7402
+ * 원천은 **CJ대한통운이 공표한 「제주 및 도서산간 지역 추가 운송비」 표**(구간 시작·끝 우편번호와
7403
+ * 지역명이 붙은 그 표)다. 같은 표가 한진택배 공지와 쇼핑몰 솔루션 안내에도 같은 값으로 실린다.
7404
+ * 서로 다른 게시자의 전재본 네 곳이 인천·전남·경남 구간까지 글자 그대로 일치하는 것을 확인했다.
7405
+ *
7406
+ * - CJ대한통운 표 전재 (구간별 금액 포함): https://ichibanhouse.com/article/공지뉴스/1/16/
7407
+ * - 같은 표의 다른 전재본: https://peppytail.com/article/공지사항/1/4046/
7408
+ * - 시행 시점(2020-02-01)과 구간별 행정구역명을 함께 적은 전재본:
7409
+ * https://tosstoss.co.kr/bbs/content.php?co_id=pilotage
7410
+ * - 솔루션 안내 「제주도 및 도서산간 지역 기준표」:
7411
+ * https://help.campaignus.me/ko/articles/제주도-및-도서산간-지역-기준표-342d2e5e
7412
+ *
7413
+ * 라벨의 행정구역명은 우편번호 배정을 따로 확인해 고쳤다. 택배사 표의 지역명은 축약·오기가 있다.
7414
+ * 확인한 것만 남기고, 확인하지 못한 구간은 이 표에서 뺀다 — 판정하지 못하면 받지 않는 쪽이
7415
+ * `remoteAreaOf`의 규칙과 같다.
7416
+ *
7417
+ * ## 표에서 뺀 구간
7418
+ *
7419
+ * - **54000**: 택배사 표는 「경남 통영 섬지역3」으로 적었지만 이 번호는 **전북 군산시 옥도면**이다.
7420
+ * 게다가 공정거래위원회가 2025-10-07 발표에서 연륙교로 이어진 신시도·야미도·선유도와 비연륙
7421
+ * 도서(방축도·관리도)가 같은 우편번호를 쓰는 대표 사례로 이 지역을 들었다. 라벨도 부과 근거도
7422
+ * 확정하지 못해 뺀다.
7423
+ * - **강화군 본섬(23000~23003, 23011~23099)**: 택배사 표의 강화 할증 구간은 23004~23010
7424
+ * (교동면·삼산면·서도면)뿐이다. 강화대교·초지대교로 이어진 본섬은 도선료가 없어 어느 택배사도
7425
+ * 할증하지 않는다. 「누락」이 아니라 대상이 아니다.
7426
+ *
7427
+ * ## 한계
7428
+ *
7429
+ * 우편번호 단위 판정은 한 번호 안에 연륙도서와 비연륙도서가 섞인 구간에서 과대 부과가 된다.
7430
+ * 공정위가 2025-10-07에 온라인몰 13곳의 이 방식을 시정하게 한 지적이 그것이다
7431
+ * (https://eiec.kdi.re.kr/policy/materialView.do?num=272070). 아래 구간 중 33411(보령 오천면,
7432
+ * 원산도가 해저터널로 연결), 46768~46771(강서구 가덕도, 거가대교로 연결)이 그런 혼재 구간이다.
7433
+ * 도로명주소·건물관리번호 단위 판정은 후속 과제다.
7434
+ *
7435
+ * 범위는 **닫힌 구간**(`from` ≤ zip ≤ `to`)이고 겹치지 않는다. 앞에서부터 처음 맞는 항목을 쓴다.
7436
+ * 순서는 콘솔 「추가 배송비 지역」 표의 행 순서이기도 하다(`remoteAreaGroups`). 제주를 먼저 두고
7437
+ * 도서산간은 우편번호 오름차순으로 둔다.
7438
+ */
7439
+ export declare const REMOTE_AREA_ZIP_RANGES: ReadonlyArray<{
7440
+ readonly area: Exclude<RemoteArea, "NONE">;
7441
+ readonly from: number;
7442
+ readonly to: number;
7443
+ readonly label: string;
7444
+ }>;
7445
+ /**
7446
+ * 우편번호 → 지역 구분. 5자리 숫자가 아니면 `NONE`이다.
7447
+ *
7448
+ * 형식 검증은 배송지 스키마(`/^[0-9]{5}$/`)가 하고, 여기서는 **판정하지 못하면 추가 배송비를 받지 않는다**.
7449
+ * 반대로 두면 우편번호를 잘못 넣은 주문에 근거 없는 금액이 붙는다.
7450
+ */
7451
+ export declare function remoteAreaOf(zipCode: string | null | undefined): RemoteArea;
7452
+ /** 지역 구분의 안내 이름 — 판정된 범위의 `label`이다. 판정되지 않으면 null */
7453
+ export declare function remoteAreaLabelOf(zipCode: string | null | undefined): string | null;
7454
+ /** 묶음 하나에 붙는 지역 추가 배송비 */
7455
+ export declare function remoteSurchargeOf(policy: ShippingPolicy, area: RemoteArea): number;
7456
+ /** 묶음 판정에 쓰는 상품 값 — 출고지와 배송 정책이다 */
7457
+ export interface DeliveryBundleProduct {
7458
+ deliveryType: DeliveryType;
7459
+ deliveryFee: number;
7460
+ conditionalFreeAmount: number | null;
7461
+ /** 출고지 주소 id(`seller_addresses`). null이면 스토어 기본 출고지를 쓰는 상품끼리 한 묶음이다 */
7462
+ shippingAddressId?: string | null;
7463
+ }
7464
+ /**
7465
+ * 배송 묶음 키 — **같은 출고지 + 같은 배송 정책이면 같은 키다.**
7466
+ *
7467
+ * 키는 주문 시점에 주문상품 행에 스냅샷된다(`order_items.delivery_bundle_key`). 셀러가 주문 뒤
7468
+ * 출고지나 배송비를 바꿔도 그 주문의 묶음은 움직이지 않는다 — 움직이면 이미 환불한 묶음의 키가
7469
+ * 달라져 `orders.delivery_fee_settlements`의 이중 환불 방지 표시가 무력해진다.
7470
+ *
7471
+ * `-`는 「값 없음」이다. 사람이 읽을 수 있게 남기고, 값 자체에 `:`가 들어갈 수 없는 형식만 쓴다
7472
+ * (주소 id는 `adr_…`, 나머지는 열거형·정수).
7473
+ */
7474
+ export declare function deliveryBundleKeyOf(product: DeliveryBundleProduct): string;
7475
+ /** 계산에 넣는 한 줄 — 주문상품·장바구니 항목·주문서 항목이 이 형태로 들어온다 */
7476
+ export interface DeliveryFeeLine {
7477
+ productId: string;
7478
+ /** 상품 금액 (할인 반영 단가 × 수량) */
7479
+ amount: number;
7480
+ }
7481
+ /**
7482
+ * 기본 배송비를 면제한 근거 — 면제하지 않았으면 null이다.
7483
+ *
7484
+ * 환불 정산이 근거를 구분해야 한다. 조건부 무료 기준 미달 차감은 **상품별 조건부 무료(`CONDITIONAL`)로
7485
+ * 면제된 묶음만** 대상이다. 스토어 전체 무료 기준(`STORE_THRESHOLD`)이나 무료배송 상품(`FREE`)은 셀러가
7486
+ * 배송비를 받지 않기로 한 것이므로, 일부 취소로 기준이 깨져도 구매자에게 배송비를 물리지 않는다.
7487
+ *
7488
+ * 세 값이 겹치면 `FREE` → `STORE_THRESHOLD` → `CONDITIONAL` 순으로 센 근거를 남긴다.
7489
+ */
7490
+ export declare const deliveryFeeWaiverSchema: z.ZodEnum<{
7491
+ FREE: "FREE";
7492
+ STORE_THRESHOLD: "STORE_THRESHOLD";
7493
+ CONDITIONAL: "CONDITIONAL";
7494
+ }>;
7495
+ export type DeliveryFeeWaiver = z.infer<typeof deliveryFeeWaiverSchema>;
7496
+ /** 묶음 하나의 견적 */
7497
+ export interface DeliveryBundleQuote {
7498
+ bundleKey: string;
7499
+ /** 이 묶음에 든 상품 id — 스냅샷 검증과 콘솔 안내에 쓴다 */
7500
+ productIds: string[];
7501
+ /** 실제 청구한 기본 배송비 — 무료배송·무료 기준 충족이면 0 */
7502
+ fee: number;
7503
+ /** 기본 배송비를 면제한 근거. 청구했으면 null */
7504
+ waivedBy: DeliveryFeeWaiver | null;
7505
+ /** 배송비 정가 — 조건부 무료 미달 차감액의 상한이다 */
7506
+ listFee: number;
7507
+ /** 묶음 조건부 무료 기준액. 조건부 무료가 아니면 null */
7508
+ freeThreshold: number | null;
7509
+ /** 이 묶음에 붙은 지역 추가 배송비 */
7510
+ remoteSurcharge: number;
7511
+ }
7512
+ /** 배송비 견적 — 합계와 묶음 내역 */
7513
+ export interface DeliveryQuote {
7514
+ bundles: DeliveryBundleQuote[];
7515
+ /** 기본 배송비 합계 (지역 추가 제외) */
7516
+ baseFee: number;
7517
+ /** 지역 추가 배송비 합계 */
7518
+ remoteSurcharge: number;
7519
+ /** 청구할 배송비 총액 = `baseFee` + `remoteSurcharge` */
7520
+ deliveryFee: number;
7521
+ remoteArea: RemoteArea;
7522
+ /** 스토어 전체 무료 기준(`freeThreshold`) 충족으로 기본 배송비를 면제했는가 */
7523
+ freeByThreshold: boolean;
7524
+ }
7525
+ export interface DeliveryQuoteInput {
7526
+ lines: DeliveryFeeLine[];
7527
+ /** 상품 배송 정책 조회 — 못 읽은 상품은 계산에서 빠진다(배송비를 만들어 붙이지 않는다) */
7528
+ productOf: (productId: string) => DeliveryBundleProduct | undefined;
7529
+ policy: ShippingPolicy;
7530
+ /** 배송지 우편번호. 아직 모르면 생략한다 — 지역 추가 배송비 0으로 계산한다 */
7531
+ zipCode?: string | null;
7532
+ }
7533
+ /**
7534
+ * 배송비 계산 — **순수 함수다.** 장바구니 요약, 주문서 금액, 결제 시작의 최종 확정,
7535
+ * 주문 배송비 스냅샷이 모두 이 한 곳을 쓴다.
7536
+ *
7537
+ * 순서가 규칙이다. 묶음별 조건부 무료를 먼저 보고, 그다음 스토어 전체 무료 기준으로 기본 배송비를
7538
+ * 한꺼번에 0으로 만들고, 마지막에 지역 추가 배송비를 묶음마다 더한다. 추가 배송비는 무료 기준에
7539
+ * 걸리지 않는다.
7540
+ */
7541
+ export declare function quoteDelivery(input: DeliveryQuoteInput): DeliveryQuote;
7542
+ //#endregion
6703
7543
  //#region src/schemas/webhook-event.d.ts
6704
7544
  export declare const orderWebhookEventDataSchema: z.ZodObject<{
6705
7545
  orderId: z.ZodString;
@@ -6736,6 +7576,11 @@ export declare const claimWebhookEventDataSchema: z.ZodObject<{
6736
7576
  COMPLETED: "COMPLETED";
6737
7577
  WITHDRAWN: "WITHDRAWN";
6738
7578
  }>;
7579
+ quantity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7580
+ refundAmount: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
7581
+ deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7582
+ deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7583
+ deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6739
7584
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
6740
7585
  }, z.core.$strip>;
6741
7586
  export type ClaimWebhookEventData = z.infer<typeof claimWebhookEventDataSchema>;
@@ -6809,6 +7654,11 @@ export declare const claimWebhookEventSchema: z.ZodObject<{
6809
7654
  COMPLETED: "COMPLETED";
6810
7655
  WITHDRAWN: "WITHDRAWN";
6811
7656
  }>;
7657
+ quantity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7658
+ refundAmount: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
7659
+ deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7660
+ deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7661
+ deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6812
7662
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
6813
7663
  }, z.core.$strip>;
6814
7664
  id: z.ZodString;
@@ -6900,6 +7750,11 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6900
7750
  COMPLETED: "COMPLETED";
6901
7751
  WITHDRAWN: "WITHDRAWN";
6902
7752
  }>;
7753
+ quantity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7754
+ refundAmount: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
7755
+ deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7756
+ deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7757
+ deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6903
7758
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
6904
7759
  }, z.core.$strip>;
6905
7760
  id: z.ZodString;