@sayren/store-sdk 0.9.0 → 0.10.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
@@ -1119,6 +1119,7 @@ export declare const claimSchema: z.ZodObject<{
1119
1119
  }>;
1120
1120
  claimDeliveryFee: z.ZodNumber;
1121
1121
  expectedRefundAmount: z.ZodNullable<z.ZodNumber>;
1122
+ expectedDeliveryFeeRefundAmount: z.ZodNullable<z.ZodNumber>;
1122
1123
  exchangeOption: z.ZodNullable<z.ZodObject<{
1123
1124
  optionId: z.ZodString;
1124
1125
  optionName: z.ZodString;
@@ -1197,6 +1198,7 @@ export declare const claimDetailSchema: z.ZodObject<{
1197
1198
  }>;
1198
1199
  claimDeliveryFee: z.ZodNumber;
1199
1200
  expectedRefundAmount: z.ZodNullable<z.ZodNumber>;
1201
+ expectedDeliveryFeeRefundAmount: z.ZodNullable<z.ZodNumber>;
1200
1202
  exchangeOption: z.ZodNullable<z.ZodObject<{
1201
1203
  optionId: z.ZodString;
1202
1204
  optionName: z.ZodString;
@@ -1256,6 +1258,9 @@ export declare const approveClaimResultSchema: z.ZodObject<{
1256
1258
  claimId: z.ZodString;
1257
1259
  refundAmount: z.ZodNumber;
1258
1260
  deductAmount: z.ZodNumber;
1261
+ quantity: z.ZodNumber;
1262
+ deliveryFeeRefundAmount: z.ZodNumber;
1263
+ deliveryFeeChargeAmount: z.ZodNumber;
1259
1264
  refundedAt: z.ZodString;
1260
1265
  }, z.core.$strip>;
1261
1266
  export type ApproveClaimResult = z.infer<typeof approveClaimResultSchema>;
@@ -1319,6 +1324,125 @@ export declare const customerAddressSchema: z.ZodObject<{
1319
1324
  address1: z.ZodString;
1320
1325
  address2: z.ZodNullable<z.ZodString>;
1321
1326
  }, z.core.$strip>;
1327
+ /** 동의 종류 — 이용약관·개인정보 수집이용은 가입 필수, 마케팅 수신은 선택 */
1328
+ export declare const consentKindSchema: z.ZodEnum<{
1329
+ TERMS: "TERMS";
1330
+ PRIVACY: "PRIVACY";
1331
+ MARKETING: "MARKETING";
1332
+ }>;
1333
+ export type ConsentKind = z.infer<typeof consentKindSchema>;
1334
+ export declare const consentActionSchema: z.ZodEnum<{
1335
+ WITHDRAWN: "WITHDRAWN";
1336
+ AGREED: "AGREED";
1337
+ }>;
1338
+ export type ConsentAction = z.infer<typeof consentActionSchema>;
1339
+ /**
1340
+ * 동의가 일어난 경로. 값이 추가될 수 있어 모르는 값은 그대로 보여 준다.
1341
+ * `SIGNUP` 비밀번호 가입 · `SOCIAL_SIGNUP` 소셜 가입 · `DELEGATED` 셀러 자체 회원 연동 ·
1342
+ * `RECONSENT` 약관 개정 재동의 · `MEMBER_UPDATE` 구매자가 직접 변경 · `SELLER` 셀러가 처리
1343
+ */
1344
+ export declare const consentSourceSchema: z.ZodEnum<{
1345
+ SELLER: "SELLER";
1346
+ SIGNUP: "SIGNUP";
1347
+ SOCIAL_SIGNUP: "SOCIAL_SIGNUP";
1348
+ DELEGATED: "DELEGATED";
1349
+ RECONSENT: "RECONSENT";
1350
+ MEMBER_UPDATE: "MEMBER_UPDATE";
1351
+ }>;
1352
+ export type ConsentSource = z.infer<typeof consentSourceSchema>;
1353
+ /** 동의 이력 한 줄 — 추가만 되고 지워지지 않는다(구매자 탈퇴 시에만 함께 지워진다) */
1354
+ export declare const customerConsentSchema: z.ZodObject<{
1355
+ consentId: z.ZodString;
1356
+ kind: z.ZodEnum<{
1357
+ TERMS: "TERMS";
1358
+ PRIVACY: "PRIVACY";
1359
+ MARKETING: "MARKETING";
1360
+ }>;
1361
+ version: z.ZodNullable<z.ZodString>;
1362
+ documentUrl: z.ZodNullable<z.ZodString>;
1363
+ action: z.ZodEnum<{
1364
+ WITHDRAWN: "WITHDRAWN";
1365
+ AGREED: "AGREED";
1366
+ }>;
1367
+ source: z.ZodEnum<{
1368
+ SELLER: "SELLER";
1369
+ SIGNUP: "SIGNUP";
1370
+ SOCIAL_SIGNUP: "SOCIAL_SIGNUP";
1371
+ DELEGATED: "DELEGATED";
1372
+ RECONSENT: "RECONSENT";
1373
+ MEMBER_UPDATE: "MEMBER_UPDATE";
1374
+ }>;
1375
+ occurredAt: z.ZodString;
1376
+ }, z.core.$strip>;
1377
+ export type CustomerConsent = z.infer<typeof customerConsentSchema>;
1378
+ /** 종류별 현재 동의 상태 */
1379
+ export declare const customerConsentStateSchema: z.ZodObject<{
1380
+ kind: z.ZodEnum<{
1381
+ TERMS: "TERMS";
1382
+ PRIVACY: "PRIVACY";
1383
+ MARKETING: "MARKETING";
1384
+ }>;
1385
+ agreed: z.ZodBoolean;
1386
+ agreedVersion: z.ZodNullable<z.ZodString>;
1387
+ currentVersion: z.ZodNullable<z.ZodString>;
1388
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1389
+ updatedAt: z.ZodNullable<z.ZodString>;
1390
+ reconsentRequired: z.ZodBoolean;
1391
+ }, z.core.$strip>;
1392
+ export type CustomerConsentState = z.infer<typeof customerConsentStateSchema>;
1393
+ export declare const customerConsentsSchema: z.ZodObject<{
1394
+ terms: z.ZodObject<{
1395
+ kind: z.ZodEnum<{
1396
+ TERMS: "TERMS";
1397
+ PRIVACY: "PRIVACY";
1398
+ MARKETING: "MARKETING";
1399
+ }>;
1400
+ agreed: z.ZodBoolean;
1401
+ agreedVersion: z.ZodNullable<z.ZodString>;
1402
+ currentVersion: z.ZodNullable<z.ZodString>;
1403
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1404
+ updatedAt: z.ZodNullable<z.ZodString>;
1405
+ reconsentRequired: z.ZodBoolean;
1406
+ }, z.core.$strip>;
1407
+ privacy: z.ZodObject<{
1408
+ kind: z.ZodEnum<{
1409
+ TERMS: "TERMS";
1410
+ PRIVACY: "PRIVACY";
1411
+ MARKETING: "MARKETING";
1412
+ }>;
1413
+ agreed: z.ZodBoolean;
1414
+ agreedVersion: z.ZodNullable<z.ZodString>;
1415
+ currentVersion: z.ZodNullable<z.ZodString>;
1416
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1417
+ updatedAt: z.ZodNullable<z.ZodString>;
1418
+ reconsentRequired: z.ZodBoolean;
1419
+ }, z.core.$strip>;
1420
+ marketing: z.ZodObject<{
1421
+ kind: z.ZodEnum<{
1422
+ TERMS: "TERMS";
1423
+ PRIVACY: "PRIVACY";
1424
+ MARKETING: "MARKETING";
1425
+ }>;
1426
+ agreed: z.ZodBoolean;
1427
+ agreedVersion: z.ZodNullable<z.ZodString>;
1428
+ currentVersion: z.ZodNullable<z.ZodString>;
1429
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1430
+ updatedAt: z.ZodNullable<z.ZodString>;
1431
+ reconsentRequired: z.ZodBoolean;
1432
+ }, z.core.$strip>;
1433
+ reconsentRequired: z.ZodBoolean;
1434
+ }, z.core.$strip>;
1435
+ export type CustomerConsents = z.infer<typeof customerConsentsSchema>;
1436
+ /** `GET /v1/customers/{id}/consents` 쿼리 — 최근 순이다 */
1437
+ export declare const customerConsentListQuerySchema: z.ZodObject<{
1438
+ page: z.ZodOptional<z.ZodString>;
1439
+ size: z.ZodOptional<z.ZodString>;
1440
+ kind: z.ZodOptional<z.ZodEnum<{
1441
+ TERMS: "TERMS";
1442
+ PRIVACY: "PRIVACY";
1443
+ MARKETING: "MARKETING";
1444
+ }>>;
1445
+ }, z.core.$strip>;
1322
1446
  /** 구매자 상세 — 휴대폰 전체를 보여 준다 */
1323
1447
  export declare const customerDetailSchema: z.ZodObject<{
1324
1448
  customerId: z.ZodString;
@@ -1337,6 +1461,48 @@ export declare const customerDetailSchema: z.ZodObject<{
1337
1461
  }>;
1338
1462
  linkedAt: z.ZodString;
1339
1463
  }, z.core.$strip>>;
1464
+ consents: z.ZodObject<{
1465
+ terms: z.ZodObject<{
1466
+ kind: z.ZodEnum<{
1467
+ TERMS: "TERMS";
1468
+ PRIVACY: "PRIVACY";
1469
+ MARKETING: "MARKETING";
1470
+ }>;
1471
+ agreed: z.ZodBoolean;
1472
+ agreedVersion: z.ZodNullable<z.ZodString>;
1473
+ currentVersion: z.ZodNullable<z.ZodString>;
1474
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1475
+ updatedAt: z.ZodNullable<z.ZodString>;
1476
+ reconsentRequired: z.ZodBoolean;
1477
+ }, z.core.$strip>;
1478
+ privacy: z.ZodObject<{
1479
+ kind: z.ZodEnum<{
1480
+ TERMS: "TERMS";
1481
+ PRIVACY: "PRIVACY";
1482
+ MARKETING: "MARKETING";
1483
+ }>;
1484
+ agreed: z.ZodBoolean;
1485
+ agreedVersion: z.ZodNullable<z.ZodString>;
1486
+ currentVersion: z.ZodNullable<z.ZodString>;
1487
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1488
+ updatedAt: z.ZodNullable<z.ZodString>;
1489
+ reconsentRequired: z.ZodBoolean;
1490
+ }, z.core.$strip>;
1491
+ marketing: z.ZodObject<{
1492
+ kind: z.ZodEnum<{
1493
+ TERMS: "TERMS";
1494
+ PRIVACY: "PRIVACY";
1495
+ MARKETING: "MARKETING";
1496
+ }>;
1497
+ agreed: z.ZodBoolean;
1498
+ agreedVersion: z.ZodNullable<z.ZodString>;
1499
+ currentVersion: z.ZodNullable<z.ZodString>;
1500
+ currentDocumentUrl: z.ZodNullable<z.ZodString>;
1501
+ updatedAt: z.ZodNullable<z.ZodString>;
1502
+ reconsentRequired: z.ZodBoolean;
1503
+ }, z.core.$strip>;
1504
+ reconsentRequired: z.ZodBoolean;
1505
+ }, z.core.$strip>;
1340
1506
  addresses: z.ZodArray<z.ZodObject<{
1341
1507
  addressId: z.ZodString;
1342
1508
  alias: z.ZodString;
@@ -1991,6 +2157,8 @@ export declare const orderItemSchema: z.ZodObject<{
1991
2157
  optionName: z.ZodNullable<z.ZodString>;
1992
2158
  sellerCode: z.ZodNullable<z.ZodString>;
1993
2159
  quantity: z.ZodNumber;
2160
+ canceledQuantity: z.ZodNumber;
2161
+ activeQuantity: z.ZodNumber;
1994
2162
  unitPrice: z.ZodNumber;
1995
2163
  discountAmount: z.ZodNumber;
1996
2164
  totalPrice: z.ZodNumber;
@@ -2076,6 +2244,8 @@ export declare const orderSchema: z.ZodObject<{
2076
2244
  optionName: z.ZodNullable<z.ZodString>;
2077
2245
  sellerCode: z.ZodNullable<z.ZodString>;
2078
2246
  quantity: z.ZodNumber;
2247
+ canceledQuantity: z.ZodNumber;
2248
+ activeQuantity: z.ZodNumber;
2079
2249
  unitPrice: z.ZodNumber;
2080
2250
  discountAmount: z.ZodNumber;
2081
2251
  totalPrice: z.ZodNumber;
@@ -2159,6 +2329,8 @@ export declare const orderItemPageSchema: z.ZodObject<{
2159
2329
  optionName: z.ZodNullable<z.ZodString>;
2160
2330
  sellerCode: z.ZodNullable<z.ZodString>;
2161
2331
  quantity: z.ZodNumber;
2332
+ canceledQuantity: z.ZodNumber;
2333
+ activeQuantity: z.ZodNumber;
2162
2334
  unitPrice: z.ZodNumber;
2163
2335
  discountAmount: z.ZodNumber;
2164
2336
  totalPrice: z.ZodNumber;
@@ -2352,12 +2524,17 @@ export declare const cancelBySellerRequestSchema: z.ZodObject<{
2352
2524
  DELIVERY_IMPOSSIBLE: "DELIVERY_IMPOSSIBLE";
2353
2525
  }>;
2354
2526
  detail: z.ZodOptional<z.ZodString>;
2527
+ quantity: z.ZodOptional<z.ZodNumber>;
2355
2528
  }, z.core.$strip>;
2356
2529
  export type CancelBySellerRequest = z.infer<typeof cancelBySellerRequestSchema>;
2357
2530
  /** `POST /v1/order-items/{orderItemId}/cancel` 응답 — 셀러 직권취소 환불 결과 */
2358
2531
  export declare const cancelBySellerResultSchema: z.ZodObject<{
2359
2532
  orderItemId: z.ZodString;
2360
2533
  refundAmount: z.ZodNumber;
2534
+ quantity: z.ZodNumber;
2535
+ canceledQuantity: z.ZodNumber;
2536
+ deliveryFeeRefundAmount: z.ZodNumber;
2537
+ deliveryFeeChargeAmount: z.ZodNumber;
2361
2538
  refundedAt: z.ZodString;
2362
2539
  }, z.core.$strip>;
2363
2540
  export type CancelBySellerResult = z.infer<typeof cancelBySellerResultSchema>;
@@ -3458,6 +3635,13 @@ export declare const productSchema: z.ZodObject<{
3458
3635
  conditionalFreeAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3459
3636
  returnFee: z.ZodOptional<z.ZodNumber>;
3460
3637
  exchangeFee: z.ZodOptional<z.ZodNumber>;
3638
+ refundPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3639
+ preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
3640
+ returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
3641
+ exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
3642
+ sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
3643
+ conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
3644
+ }, z.core.$strict>>>;
3461
3645
  shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3462
3646
  returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3463
3647
  createdAt: z.ZodOptional<z.ZodString>;
@@ -3615,6 +3799,13 @@ export declare const productCreateRequestSchema: z.ZodObject<{
3615
3799
  conditionalFreeAmount: z.ZodOptional<z.ZodNumber>;
3616
3800
  returnFee: z.ZodDefault<z.ZodNumber>;
3617
3801
  exchangeFee: z.ZodDefault<z.ZodNumber>;
3802
+ refundPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3803
+ preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
3804
+ returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
3805
+ exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
3806
+ sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
3807
+ conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
3808
+ }, z.core.$strict>>>;
3618
3809
  shippingAddressId: z.ZodOptional<z.ZodString>;
3619
3810
  returnAddressId: z.ZodOptional<z.ZodString>;
3620
3811
  optionGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -3731,6 +3922,16 @@ export declare const analyticsOriginSchema: z.ZodString;
3731
3922
  export declare const MAX_ANALYTICS_ALLOWED_ORIGINS = 20;
3732
3923
  /** 자동 배송완료·자동 구매확정 대기일 상한 */
3733
3924
  export declare const MAX_AUTO_TRANSITION_DAYS = 30;
3925
+ /**
3926
+ * 약관 버전 — 스토어가 정하는 문자열이다(`1`·`2`·`2026-09-26`·`v1.2` 등). 형식은 강제하지 않고 값이 다르면 다른 버전이다.
3927
+ * 올리면 그 약관에 동의한 구매자의 `reconsentRequired`가 켜지고, 재동의가 이력에 남는다. 되돌리면 재동의 요구도 풀린다.
3928
+ */
3929
+ export declare const policyVersionSchema: z.ZodString;
3930
+ /**
3931
+ * 약관 문서 주소 — 구매자에게 보여 주는 약관 본문의 주소다. 동의 시점 값이 이력 행에 복사되므로
3932
+ * 나중에 주소를 바꿔도 "무엇에 동의했는지"가 남는다. `null`로 지울 수 있다.
3933
+ */
3934
+ export declare const policyDocumentUrlSchema: z.ZodNullable<z.ZodURL>;
3734
3935
  /** `PATCH /v1/store` 본문 — 바꿀 필드만 보낸다 */
3735
3936
  export declare const updateStoreRequestSchema: z.ZodObject<{
3736
3937
  name: z.ZodOptional<z.ZodString>;
@@ -3742,6 +3943,17 @@ export declare const updateStoreRequestSchema: z.ZodObject<{
3742
3943
  guestCheckoutEnabled: z.ZodOptional<z.ZodBoolean>;
3743
3944
  autoDeliverDays: z.ZodOptional<z.ZodNumber>;
3744
3945
  autoConfirmDays: z.ZodOptional<z.ZodNumber>;
3946
+ refundPolicy: z.ZodOptional<z.ZodObject<{
3947
+ preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
3948
+ returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
3949
+ exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
3950
+ sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
3951
+ conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
3952
+ }, z.core.$strict>>;
3953
+ termsVersion: z.ZodOptional<z.ZodString>;
3954
+ privacyVersion: z.ZodOptional<z.ZodString>;
3955
+ termsUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
3956
+ privacyUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
3745
3957
  }, z.core.$strip>;
3746
3958
  export type UpdateStoreRequest = z.infer<typeof updateStoreRequestSchema>;
3747
3959
  export declare const storeSchema: z.ZodObject<{
@@ -3762,6 +3974,19 @@ export declare const storeSchema: z.ZodObject<{
3762
3974
  guestCheckoutEnabled: z.ZodBoolean;
3763
3975
  autoDeliverDays: z.ZodNumber;
3764
3976
  autoConfirmDays: z.ZodNumber;
3977
+ refundPolicy: z.ZodObject<{
3978
+ preShipmentDeliveryFeeRefund: z.ZodBoolean;
3979
+ returnDeliveryFee: z.ZodNumber;
3980
+ exchangeDeliveryFee: z.ZodNumber;
3981
+ sellerFaultFreeShipping: z.ZodBoolean;
3982
+ conditionalFreeShortfallCharge: z.ZodBoolean;
3983
+ }, z.core.$strip>;
3984
+ termsVersion: z.ZodString;
3985
+ privacyVersion: z.ZodString;
3986
+ termsVersionUpdatedAt: z.ZodNullable<z.ZodString>;
3987
+ privacyVersionUpdatedAt: z.ZodNullable<z.ZodString>;
3988
+ termsUrl: z.ZodNullable<z.ZodString>;
3989
+ privacyUrl: z.ZodNullable<z.ZodString>;
3765
3990
  memberCount: z.ZodNumber;
3766
3991
  createdAt: z.ZodString;
3767
3992
  }, z.core.$strip>;
@@ -4270,6 +4495,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
4270
4495
  conditionalFreeAmount?: number | null | undefined;
4271
4496
  returnFee?: number | undefined;
4272
4497
  exchangeFee?: number | undefined;
4498
+ refundPolicy?: {
4499
+ preShipmentDeliveryFeeRefund?: boolean | undefined;
4500
+ returnDeliveryFee?: number | undefined;
4501
+ exchangeDeliveryFee?: number | undefined;
4502
+ sellerFaultFreeShipping?: boolean | undefined;
4503
+ conditionalFreeShortfallCharge?: boolean | undefined;
4504
+ } | null | undefined;
4273
4505
  shippingAddressId?: string | null | undefined;
4274
4506
  returnAddressId?: string | null | undefined;
4275
4507
  createdAt?: string | undefined;
@@ -4321,6 +4553,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
4321
4553
  conditionalFreeAmount?: number | null | undefined;
4322
4554
  returnFee?: number | undefined;
4323
4555
  exchangeFee?: number | undefined;
4556
+ refundPolicy?: {
4557
+ preShipmentDeliveryFeeRefund?: boolean | undefined;
4558
+ returnDeliveryFee?: number | undefined;
4559
+ exchangeDeliveryFee?: number | undefined;
4560
+ sellerFaultFreeShipping?: boolean | undefined;
4561
+ conditionalFreeShortfallCharge?: boolean | undefined;
4562
+ } | null | undefined;
4324
4563
  shippingAddressId?: string | null | undefined;
4325
4564
  returnAddressId?: string | null | undefined;
4326
4565
  createdAt?: string | undefined;
@@ -4372,6 +4611,13 @@ export declare function createStoreClient(options: StoreClientOptions): {
4372
4611
  conditionalFreeAmount?: number | null | undefined;
4373
4612
  returnFee?: number | undefined;
4374
4613
  exchangeFee?: number | undefined;
4614
+ refundPolicy?: {
4615
+ preShipmentDeliveryFeeRefund?: boolean | undefined;
4616
+ returnDeliveryFee?: number | undefined;
4617
+ exchangeDeliveryFee?: number | undefined;
4618
+ sellerFaultFreeShipping?: boolean | undefined;
4619
+ conditionalFreeShortfallCharge?: boolean | undefined;
4620
+ } | null | undefined;
4375
4621
  shippingAddressId?: string | null | undefined;
4376
4622
  returnAddressId?: string | null | undefined;
4377
4623
  createdAt?: string | undefined;
@@ -4678,6 +4924,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
4678
4924
  optionName: string | null;
4679
4925
  sellerCode: string | null;
4680
4926
  quantity: number;
4927
+ canceledQuantity: number;
4928
+ activeQuantity: number;
4681
4929
  unitPrice: number;
4682
4930
  discountAmount: number;
4683
4931
  totalPrice: number;
@@ -4712,6 +4960,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
4712
4960
  optionName: string | null;
4713
4961
  sellerCode: string | null;
4714
4962
  quantity: number;
4963
+ canceledQuantity: number;
4964
+ activeQuantity: number;
4715
4965
  unitPrice: number;
4716
4966
  discountAmount: number;
4717
4967
  totalPrice: number;
@@ -4743,6 +4993,10 @@ export declare function createStoreClient(options: StoreClientOptions): {
4743
4993
  cancelBySeller: (orderItemId: string, body: CancelBySellerRequest, idempotencyKey?: string) => Promise<{
4744
4994
  orderItemId: string;
4745
4995
  refundAmount: number;
4996
+ quantity: number;
4997
+ canceledQuantity: number;
4998
+ deliveryFeeRefundAmount: number;
4999
+ deliveryFeeChargeAmount: number;
4746
5000
  refundedAt: string;
4747
5001
  }>;
4748
5002
  updateMemo: (orderItemId: string, memo: string) => Promise<void>;
@@ -4791,6 +5045,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
4791
5045
  optionName: string | null;
4792
5046
  sellerCode: string | null;
4793
5047
  quantity: number;
5048
+ canceledQuantity: number;
5049
+ activeQuantity: number;
4794
5050
  unitPrice: number;
4795
5051
  discountAmount: number;
4796
5052
  totalPrice: number;
@@ -4859,6 +5115,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
4859
5115
  responsibility: "BUYER" | "SELLER";
4860
5116
  claimDeliveryFee: number;
4861
5117
  expectedRefundAmount: number | null;
5118
+ expectedDeliveryFeeRefundAmount: number | null;
4862
5119
  exchangeOption: {
4863
5120
  optionId: string;
4864
5121
  optionName: string;
@@ -4887,6 +5144,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
4887
5144
  responsibility: "BUYER" | "SELLER";
4888
5145
  claimDeliveryFee: number;
4889
5146
  expectedRefundAmount: number | null;
5147
+ expectedDeliveryFeeRefundAmount: number | null;
4890
5148
  exchangeOption: {
4891
5149
  optionId: string;
4892
5150
  optionName: string;
@@ -4910,6 +5168,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
4910
5168
  claimId: string;
4911
5169
  refundAmount: number;
4912
5170
  deductAmount: number;
5171
+ quantity: number;
5172
+ deliveryFeeRefundAmount: number;
5173
+ deliveryFeeChargeAmount: number;
4913
5174
  refundedAt: string;
4914
5175
  }>;
4915
5176
  reject: (claimId: string, body: RejectClaimRequest) => Promise<void>;
@@ -4938,6 +5199,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
4938
5199
  responsibility: "BUYER" | "SELLER";
4939
5200
  claimDeliveryFee: number;
4940
5201
  expectedRefundAmount: number | null;
5202
+ expectedDeliveryFeeRefundAmount: number | null;
4941
5203
  exchangeOption: {
4942
5204
  optionId: string;
4943
5205
  optionName: string;
@@ -5130,6 +5392,36 @@ export declare function createStoreClient(options: StoreClientOptions): {
5130
5392
  method: "kakao" | "naver" | "google" | "password";
5131
5393
  linkedAt: string;
5132
5394
  }[];
5395
+ consents: {
5396
+ terms: {
5397
+ kind: "TERMS" | "PRIVACY" | "MARKETING";
5398
+ agreed: boolean;
5399
+ agreedVersion: string | null;
5400
+ currentVersion: string | null;
5401
+ currentDocumentUrl: string | null;
5402
+ updatedAt: string | null;
5403
+ reconsentRequired: boolean;
5404
+ };
5405
+ privacy: {
5406
+ kind: "TERMS" | "PRIVACY" | "MARKETING";
5407
+ agreed: boolean;
5408
+ agreedVersion: string | null;
5409
+ currentVersion: string | null;
5410
+ currentDocumentUrl: string | null;
5411
+ updatedAt: string | null;
5412
+ reconsentRequired: boolean;
5413
+ };
5414
+ marketing: {
5415
+ kind: "TERMS" | "PRIVACY" | "MARKETING";
5416
+ agreed: boolean;
5417
+ agreedVersion: string | null;
5418
+ currentVersion: string | null;
5419
+ currentDocumentUrl: string | null;
5420
+ updatedAt: string | null;
5421
+ reconsentRequired: boolean;
5422
+ };
5423
+ reconsentRequired: boolean;
5424
+ };
5133
5425
  addresses: {
5134
5426
  addressId: string;
5135
5427
  alias: string;
@@ -5169,6 +5461,24 @@ export declare function createStoreClient(options: StoreClientOptions): {
5169
5461
  }[];
5170
5462
  }[];
5171
5463
  }>;
5464
+ /** 동의 이력 — 최근 순. 가입·재동의·마케팅 변경이 한 줄씩 남는다 */
5465
+ consents: (customerId: string, params?: PageParams & {
5466
+ kind?: ConsentKind;
5467
+ }) => Promise<{
5468
+ page: number;
5469
+ size: number;
5470
+ totalElements: number;
5471
+ totalPages: number;
5472
+ contents: {
5473
+ consentId: string;
5474
+ kind: "TERMS" | "PRIVACY" | "MARKETING";
5475
+ version: string | null;
5476
+ documentUrl: string | null;
5477
+ action: "WITHDRAWN" | "AGREED";
5478
+ source: "SELLER" | "SIGNUP" | "SOCIAL_SIGNUP" | "DELEGATED" | "RECONSENT" | "MEMBER_UPDATE";
5479
+ occurredAt: string;
5480
+ }[];
5481
+ }>;
5172
5482
  withdraw: (customerId: string, body: WithdrawCustomerRequest) => Promise<void>;
5173
5483
  };
5174
5484
  customerInquiries: {
@@ -6540,6 +6850,19 @@ export declare function createStoreClient(options: StoreClientOptions): {
6540
6850
  guestCheckoutEnabled: boolean;
6541
6851
  autoDeliverDays: number;
6542
6852
  autoConfirmDays: number;
6853
+ refundPolicy: {
6854
+ preShipmentDeliveryFeeRefund: boolean;
6855
+ returnDeliveryFee: number;
6856
+ exchangeDeliveryFee: number;
6857
+ sellerFaultFreeShipping: boolean;
6858
+ conditionalFreeShortfallCharge: boolean;
6859
+ };
6860
+ termsVersion: string;
6861
+ privacyVersion: string;
6862
+ termsVersionUpdatedAt: string | null;
6863
+ privacyVersionUpdatedAt: string | null;
6864
+ termsUrl: string | null;
6865
+ privacyUrl: string | null;
6543
6866
  memberCount: number;
6544
6867
  createdAt: string;
6545
6868
  }>;
@@ -6561,6 +6884,19 @@ export declare function createStoreClient(options: StoreClientOptions): {
6561
6884
  guestCheckoutEnabled: boolean;
6562
6885
  autoDeliverDays: number;
6563
6886
  autoConfirmDays: number;
6887
+ refundPolicy: {
6888
+ preShipmentDeliveryFeeRefund: boolean;
6889
+ returnDeliveryFee: number;
6890
+ exchangeDeliveryFee: number;
6891
+ sellerFaultFreeShipping: boolean;
6892
+ conditionalFreeShortfallCharge: boolean;
6893
+ };
6894
+ termsVersion: string;
6895
+ privacyVersion: string;
6896
+ termsVersionUpdatedAt: string | null;
6897
+ privacyVersionUpdatedAt: string | null;
6898
+ termsUrl: string | null;
6899
+ privacyUrl: string | null;
6564
6900
  memberCount: number;
6565
6901
  createdAt: string;
6566
6902
  }>;
@@ -6644,6 +6980,77 @@ export declare function exchangeStoreTokenViaOAuth(options: {
6644
6980
  role?: string;
6645
6981
  }>;
6646
6982
  //#endregion
6983
+ //#region src/schemas/refund-policy.d.ts
6984
+ /** 유효 환불 정책 — 스토어 기본 + 상품별 덮어쓰기를 합친 결과 */
6985
+ export declare const refundPolicySchema: z.ZodObject<{
6986
+ preShipmentDeliveryFeeRefund: z.ZodBoolean;
6987
+ returnDeliveryFee: z.ZodNumber;
6988
+ exchangeDeliveryFee: z.ZodNumber;
6989
+ sellerFaultFreeShipping: z.ZodBoolean;
6990
+ conditionalFreeShortfallCharge: z.ZodBoolean;
6991
+ }, z.core.$strip>;
6992
+ export type RefundPolicy = z.infer<typeof refundPolicySchema>;
6993
+ /**
6994
+ * 스토어가 정하지 않았을 때 서버가 쓰는 값.
6995
+ *
6996
+ * `as const`가 아니라 `RefundPolicy`로 타입을 좁힌다 — 리터럴 타입이면 `Partial<typeof …>`로 일부만 바꿀 때
6997
+ * `true` 자리에 `false`를 넣을 수 없다.
6998
+ */
6999
+ export declare const REFUND_POLICY_DEFAULTS: RefundPolicy;
7000
+ /**
7001
+ * 부분 정책 — 스토어 설정 요청과 상품별 덮어쓰기가 쓴다. 준 항목만 바뀐다.
7002
+ *
7003
+ * `strictObject`라 모르는 키는 400이다. 오타(`returnFee` 등)를 조용히 무시하면 셀러는 저장됐다고
7004
+ * 믿는데 정책은 기본값으로 남는다.
7005
+ */
7006
+ export declare const refundPolicyPatchSchema: z.ZodObject<{
7007
+ preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
7008
+ returnDeliveryFee: z.ZodOptional<z.ZodNumber>;
7009
+ exchangeDeliveryFee: z.ZodOptional<z.ZodNumber>;
7010
+ sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
7011
+ conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
7012
+ }, z.core.$strict>;
7013
+ export type RefundPolicyPatch = z.infer<typeof refundPolicyPatchSchema>;
7014
+ /** 정책 해석에 쓰는 상품 값 — 상품별 덮어쓰기와 레거시 배송비 필드 */
7015
+ export interface RefundPolicyProductInput {
7016
+ /** 상품별 덮어쓰기. 없으면 스토어 기본을 그대로 쓴다 */
7017
+ refundPolicy?: RefundPolicyPatch | null;
7018
+ /** @deprecated 레거시 상품 반품비 — `refundPolicy`가 없는 옛 상품의 값이다 */
7019
+ returnFee?: number | null;
7020
+ /** @deprecated 레거시 상품 교환비 — `refundPolicy`가 없는 옛 상품의 값이다 */
7021
+ exchangeFee?: number | null;
7022
+ }
7023
+ /**
7024
+ * 유효 정책 해석 — 상품별 덮어쓰기 → 스토어 기본 → `REFUND_POLICY_DEFAULTS` 순이다.
7025
+ *
7026
+ * 반품비·교환비는 레거시 필드(`products.returnFee`·`exchangeFee`)와 **연결**한다. 상품이
7027
+ * `refundPolicy.returnDeliveryFee`를 정하면 그 값이 원천이고(서버가 `returnFee`도 같은 값으로 맞춘다),
7028
+ * 정하지 않았으면 레거시 값이 0보다 클 때 그 값을 쓴다. 0이면 스토어 기본을 따른다 —
7029
+ * 정책이 생기기 전에 만든 상품(반품비 0)이 스토어 기본을 물려받게 하는 규칙이다.
7030
+ */
7031
+ export declare function resolveRefundPolicy(storePolicy?: RefundPolicyPatch | null, product?: RefundPolicyProductInput | null): RefundPolicy;
7032
+ /**
7033
+ * 상품의 **덮어쓰기 자체** — 레거시 반품비·교환비를 같은 형태로 승격한 값이다. 덮어쓰기가 없으면 null.
7034
+ *
7035
+ * `resolveRefundPolicy`가 합친 결과로는 "상품이 정한 값"과 "스토어 기본을 물려받은 값"을 가를 수 없다.
7036
+ * 관리 API 응답의 `refundPolicy`와 콘솔 폼의 덮어쓰기 스위치가 이 함수를 원천으로 쓴다 — 가르지 못하면
7037
+ * 스토어 기본을 쓰는 상품을 저장할 때 그 순간의 기본값이 상품에 박히거나, 레거시 값이 조용히 사라진다.
7038
+ */
7039
+ export declare function productRefundPolicyOverride(product?: RefundPolicyProductInput | null): RefundPolicyPatch | null;
7040
+ /**
7041
+ * 수량 단위 부분 취소의 환불 기준액 — **누적 내림의 차분**이다.
7042
+ *
7043
+ * 원 단위 반올림 규칙: `floor(주문상품 금액 × 누적 수량 ÷ 전체 수량)`을 두 번 구해 그 차를 쓴다.
7044
+ * 부분 취소를 몇 번 나눠도 합이 주문상품 금액과 정확히 같아서 1원이 남거나 넘치지 않는다.
7045
+ * 할인은 이미 단가에 들어 있어(주문 단위 쿠폰이 없다) 별도 안분이 없다.
7046
+ *
7047
+ * @param totalPrice 주문상품 금액 (할인 반영 단가 × 전체 수량)
7048
+ * @param quantity 주문상품 전체 수량
7049
+ * @param settledQuantity 이미 취소·반품된 누적 수량
7050
+ * @param cancelQuantity 이번에 취소·반품할 수량
7051
+ */
7052
+ export declare function proratedRefundBase(totalPrice: number, quantity: number, settledQuantity: number, cancelQuantity: number): number;
7053
+ //#endregion
6647
7054
  //#region src/schemas/scope.d.ts
6648
7055
  /**
6649
7056
  * 스토어 스코프 카탈로그 (auth-spec §7) — 형식 `{리소스}:{r|rw}`, rw는 r을 함의한다.
@@ -6736,6 +7143,11 @@ export declare const claimWebhookEventDataSchema: z.ZodObject<{
6736
7143
  COMPLETED: "COMPLETED";
6737
7144
  WITHDRAWN: "WITHDRAWN";
6738
7145
  }>;
7146
+ quantity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7147
+ refundAmount: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
7148
+ deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7149
+ deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7150
+ deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6739
7151
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
6740
7152
  }, z.core.$strip>;
6741
7153
  export type ClaimWebhookEventData = z.infer<typeof claimWebhookEventDataSchema>;
@@ -6809,6 +7221,11 @@ export declare const claimWebhookEventSchema: z.ZodObject<{
6809
7221
  COMPLETED: "COMPLETED";
6810
7222
  WITHDRAWN: "WITHDRAWN";
6811
7223
  }>;
7224
+ quantity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7225
+ refundAmount: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
7226
+ deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7227
+ deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7228
+ deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6812
7229
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
6813
7230
  }, z.core.$strip>;
6814
7231
  id: z.ZodString;
@@ -6900,6 +7317,11 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6900
7317
  COMPLETED: "COMPLETED";
6901
7318
  WITHDRAWN: "WITHDRAWN";
6902
7319
  }>;
7320
+ quantity: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7321
+ refundAmount: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
7322
+ deliveryFeeRefundAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7323
+ deliveryFeeChargeAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7324
+ deductAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6903
7325
  testPayment: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
6904
7326
  }, z.core.$strip>;
6905
7327
  id: z.ZodString;