@sayren/store-sdk 0.10.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 +437 -4
- package/dist/index.mjs +562 -27
- package/package.json +1 -1
- package/src/client.ts +7 -0
- package/src/index.ts +1 -0
- package/src/schemas/claim.ts +24 -0
- package/src/schemas/order.ts +72 -4
- package/src/schemas/payment.ts +64 -0
- package/src/schemas/product.ts +42 -3
- package/src/schemas/shipping-policy.ts +375 -0
- package/src/schemas/store.ts +10 -0
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<{
|
|
@@ -1136,6 +1152,14 @@ export declare const claimSchema: z.ZodObject<{
|
|
|
1136
1152
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
1137
1153
|
holdExpiresAt: z.ZodNullable<z.ZodString>;
|
|
1138
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>>;
|
|
1139
1163
|
}, z.core.$strip>;
|
|
1140
1164
|
export type Claim = z.infer<typeof claimSchema>;
|
|
1141
1165
|
export interface ClaimListParams extends PageParams {
|
|
@@ -1215,6 +1239,14 @@ export declare const claimDetailSchema: z.ZodObject<{
|
|
|
1215
1239
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
1216
1240
|
holdExpiresAt: z.ZodNullable<z.ZodString>;
|
|
1217
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>>;
|
|
1218
1250
|
histories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1219
1251
|
status: z.ZodEnum<{
|
|
1220
1252
|
REQUESTED: "REQUESTED";
|
|
@@ -2218,6 +2250,28 @@ export declare const orderSchema: z.ZodObject<{
|
|
|
2218
2250
|
discountAmount: z.ZodNumber;
|
|
2219
2251
|
totalAmount: z.ZodNumber;
|
|
2220
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>>>>;
|
|
2221
2275
|
}, z.core.$strip>;
|
|
2222
2276
|
testPayment: z.ZodBoolean;
|
|
2223
2277
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -2441,7 +2495,7 @@ export declare const dispatchRequestSchema: z.ZodObject<{
|
|
|
2441
2495
|
}>;
|
|
2442
2496
|
carrierCode: z.ZodOptional<z.ZodString>;
|
|
2443
2497
|
trackingNumber: z.ZodOptional<z.ZodString>;
|
|
2444
|
-
dispatchedAt: z.ZodOptional<z.
|
|
2498
|
+
dispatchedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
2445
2499
|
}, z.core.$strip>;
|
|
2446
2500
|
export type DispatchRequest = z.infer<typeof dispatchRequestSchema>;
|
|
2447
2501
|
export declare const deliveryInfoSchema: z.ZodObject<{
|
|
@@ -2465,6 +2519,11 @@ export declare const deliveryInfoSchema: z.ZodObject<{
|
|
|
2465
2519
|
deliveredAt: z.ZodNullable<z.ZodString>;
|
|
2466
2520
|
}, z.core.$strip>;
|
|
2467
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;
|
|
2468
2527
|
/** `GET /v1/order-items/{orderItemId}/delivery` 응답 — 배송 정보 + 배송 추적 이벤트 */
|
|
2469
2528
|
export declare const deliveryStatusSchema: z.ZodObject<{
|
|
2470
2529
|
orderItemId: z.ZodString;
|
|
@@ -2489,7 +2548,14 @@ export declare const deliveryStatusSchema: z.ZodObject<{
|
|
|
2489
2548
|
status: z.ZodString;
|
|
2490
2549
|
location: z.ZodString;
|
|
2491
2550
|
occurredAt: z.ZodString;
|
|
2551
|
+
stage: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
2492
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>>>>;
|
|
2493
2559
|
}, z.core.$strip>;
|
|
2494
2560
|
export type DeliveryStatus = z.infer<typeof deliveryStatusSchema>;
|
|
2495
2561
|
/** `PUT /v1/order-items/{orderItemId}/dispatch/tracking` 응답 — 바뀐 송장 */
|
|
@@ -3268,6 +3334,40 @@ export declare const paymentRecordStatusSchema: z.ZodEnum<{
|
|
|
3268
3334
|
}>;
|
|
3269
3335
|
export type PaymentRecordStatus = z.infer<typeof paymentRecordStatusSchema>;
|
|
3270
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>;
|
|
3271
3371
|
export declare const paymentRecordSchema: z.ZodObject<{
|
|
3272
3372
|
paymentId: z.ZodString;
|
|
3273
3373
|
orderId: z.ZodNullable<z.ZodString>;
|
|
@@ -3306,6 +3406,7 @@ export declare const paymentRecordSchema: z.ZodObject<{
|
|
|
3306
3406
|
failMessage: z.ZodNullable<z.ZodString>;
|
|
3307
3407
|
paidAt: z.ZodNullable<z.ZodString>;
|
|
3308
3408
|
createdAt: z.ZodString;
|
|
3409
|
+
cashReceiptStatus: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3309
3410
|
}, z.core.$strip>;
|
|
3310
3411
|
export type PaymentRecord = z.infer<typeof paymentRecordSchema>;
|
|
3311
3412
|
export declare const paymentRecordPageSchema: z.ZodObject<{
|
|
@@ -3351,6 +3452,7 @@ export declare const paymentRecordPageSchema: z.ZodObject<{
|
|
|
3351
3452
|
failMessage: z.ZodNullable<z.ZodString>;
|
|
3352
3453
|
paidAt: z.ZodNullable<z.ZodString>;
|
|
3353
3454
|
createdAt: z.ZodString;
|
|
3455
|
+
cashReceiptStatus: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3354
3456
|
}, z.core.$strip>>;
|
|
3355
3457
|
}, z.core.$strip>;
|
|
3356
3458
|
export type PaymentRecordPage = z.infer<typeof paymentRecordPageSchema>;
|
|
@@ -3439,6 +3541,7 @@ export declare const paymentRecordDetailSchema: z.ZodObject<{
|
|
|
3439
3541
|
failMessage: z.ZodNullable<z.ZodString>;
|
|
3440
3542
|
paidAt: z.ZodNullable<z.ZodString>;
|
|
3441
3543
|
createdAt: z.ZodString;
|
|
3544
|
+
cashReceiptStatus: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3442
3545
|
refundableAmount: z.ZodNumber;
|
|
3443
3546
|
merchantId: z.ZodNullable<z.ZodString>;
|
|
3444
3547
|
attempts: z.ZodArray<z.ZodObject<{
|
|
@@ -3486,6 +3589,28 @@ export declare const paymentRecordDetailSchema: z.ZodObject<{
|
|
|
3486
3589
|
requestedAt: z.ZodString;
|
|
3487
3590
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
3488
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>>>>;
|
|
3489
3614
|
}, z.core.$strip>;
|
|
3490
3615
|
export type PaymentRecordDetail = z.infer<typeof paymentRecordDetailSchema>;
|
|
3491
3616
|
/** `GET /v1/payments` 쿼리 — OpenAPI 문서용 형태(값은 쿼리 문자열) */
|
|
@@ -3795,7 +3920,7 @@ export declare const productCreateRequestSchema: z.ZodObject<{
|
|
|
3795
3920
|
PAID: "PAID";
|
|
3796
3921
|
CONDITIONAL_FREE: "CONDITIONAL_FREE";
|
|
3797
3922
|
}>>;
|
|
3798
|
-
deliveryFee: z.
|
|
3923
|
+
deliveryFee: z.ZodOptional<z.ZodNumber>;
|
|
3799
3924
|
conditionalFreeAmount: z.ZodOptional<z.ZodNumber>;
|
|
3800
3925
|
returnFee: z.ZodDefault<z.ZodNumber>;
|
|
3801
3926
|
exchangeFee: z.ZodDefault<z.ZodNumber>;
|
|
@@ -3806,8 +3931,8 @@ export declare const productCreateRequestSchema: z.ZodObject<{
|
|
|
3806
3931
|
sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
|
|
3807
3932
|
conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
|
|
3808
3933
|
}, z.core.$strict>>>;
|
|
3809
|
-
shippingAddressId: z.ZodOptional<z.ZodString
|
|
3810
|
-
returnAddressId: z.ZodOptional<z.ZodString
|
|
3934
|
+
shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3935
|
+
returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3811
3936
|
optionGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3812
3937
|
groupId: z.ZodOptional<z.ZodString>;
|
|
3813
3938
|
name: z.ZodString;
|
|
@@ -3840,6 +3965,8 @@ export declare const productPatchRequestSchema: z.ZodObject<{
|
|
|
3840
3965
|
CLOSED: "CLOSED";
|
|
3841
3966
|
}>>;
|
|
3842
3967
|
deliveryFee: z.ZodOptional<z.ZodNumber>;
|
|
3968
|
+
shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3969
|
+
returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3843
3970
|
}, z.core.$strip>;
|
|
3844
3971
|
export type ProductPatchRequest = z.infer<typeof productPatchRequestSchema>;
|
|
3845
3972
|
export declare const productSortSchema: z.ZodEnum<{
|
|
@@ -3950,6 +4077,12 @@ export declare const updateStoreRequestSchema: z.ZodObject<{
|
|
|
3950
4077
|
sellerFaultFreeShipping: z.ZodOptional<z.ZodBoolean>;
|
|
3951
4078
|
conditionalFreeShortfallCharge: z.ZodOptional<z.ZodBoolean>;
|
|
3952
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>>;
|
|
3953
4086
|
termsVersion: z.ZodOptional<z.ZodString>;
|
|
3954
4087
|
privacyVersion: z.ZodOptional<z.ZodString>;
|
|
3955
4088
|
termsUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
@@ -3981,6 +4114,12 @@ export declare const storeSchema: z.ZodObject<{
|
|
|
3981
4114
|
sellerFaultFreeShipping: z.ZodBoolean;
|
|
3982
4115
|
conditionalFreeShortfallCharge: z.ZodBoolean;
|
|
3983
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>;
|
|
3984
4123
|
termsVersion: z.ZodString;
|
|
3985
4124
|
privacyVersion: z.ZodString;
|
|
3986
4125
|
termsVersionUpdatedAt: z.ZodNullable<z.ZodString>;
|
|
@@ -4911,6 +5050,25 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
4911
5050
|
discountAmount: number;
|
|
4912
5051
|
totalAmount: number;
|
|
4913
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;
|
|
4914
5072
|
};
|
|
4915
5073
|
testPayment: boolean;
|
|
4916
5074
|
items: {
|
|
@@ -4941,6 +5099,29 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
4941
5099
|
testPayment: boolean;
|
|
4942
5100
|
}[];
|
|
4943
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
|
+
}>;
|
|
4944
5125
|
};
|
|
4945
5126
|
orderItems: {
|
|
4946
5127
|
/** `GET /v1/order-items`. `testPayment` 필터는 `orders.list`와 같다 */
|
|
@@ -5082,10 +5263,17 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
5082
5263
|
status: "DISPATCHED" | "DELIVERING" | "DELIVERED";
|
|
5083
5264
|
dispatchedAt: string;
|
|
5084
5265
|
deliveredAt: string | null;
|
|
5266
|
+
tracking: {
|
|
5267
|
+
result: string | null;
|
|
5268
|
+
stage: string | null;
|
|
5269
|
+
checkedAt: string | null;
|
|
5270
|
+
carrierDeliveredAt: string | null;
|
|
5271
|
+
} | null;
|
|
5085
5272
|
trackingEvents?: {
|
|
5086
5273
|
status: string;
|
|
5087
5274
|
location: string;
|
|
5088
5275
|
occurredAt: string;
|
|
5276
|
+
stage: string | null;
|
|
5089
5277
|
}[] | undefined;
|
|
5090
5278
|
}>;
|
|
5091
5279
|
};
|
|
@@ -5129,6 +5317,14 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
5129
5317
|
completedAt: string | null;
|
|
5130
5318
|
holdExpiresAt: string | null;
|
|
5131
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;
|
|
5132
5328
|
}[];
|
|
5133
5329
|
}>;
|
|
5134
5330
|
get: (claimId: string) => Promise<{
|
|
@@ -5158,6 +5354,14 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
5158
5354
|
completedAt: string | null;
|
|
5159
5355
|
holdExpiresAt: string | null;
|
|
5160
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;
|
|
5161
5365
|
histories?: {
|
|
5162
5366
|
status: "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "REJECTED" | "COMPLETED" | "WITHDRAWN";
|
|
5163
5367
|
actor: "BUYER" | "SELLER" | "SYSTEM";
|
|
@@ -5213,6 +5417,14 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
5213
5417
|
completedAt: string | null;
|
|
5214
5418
|
holdExpiresAt: string | null;
|
|
5215
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;
|
|
5216
5428
|
}>;
|
|
5217
5429
|
};
|
|
5218
5430
|
inquiries: {
|
|
@@ -5846,6 +6058,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
5846
6058
|
failMessage: string | null;
|
|
5847
6059
|
paidAt: string | null;
|
|
5848
6060
|
createdAt: string;
|
|
6061
|
+
cashReceiptStatus: string | null;
|
|
5849
6062
|
}[];
|
|
5850
6063
|
}>;
|
|
5851
6064
|
/** `GET /v1/payments/{paymentId}` — 시도·환불 이력 포함. 404 `PAYMENT_NOT_FOUND` */
|
|
@@ -5869,6 +6082,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
5869
6082
|
failMessage: string | null;
|
|
5870
6083
|
paidAt: string | null;
|
|
5871
6084
|
createdAt: string;
|
|
6085
|
+
cashReceiptStatus: string | null;
|
|
5872
6086
|
refundableAmount: number;
|
|
5873
6087
|
merchantId: string | null;
|
|
5874
6088
|
attempts: {
|
|
@@ -5898,6 +6112,25 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
5898
6112
|
requestedAt: string;
|
|
5899
6113
|
completedAt: string | null;
|
|
5900
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;
|
|
5901
6134
|
}>;
|
|
5902
6135
|
};
|
|
5903
6136
|
/**
|
|
@@ -6857,6 +7090,12 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
6857
7090
|
sellerFaultFreeShipping: boolean;
|
|
6858
7091
|
conditionalFreeShortfallCharge: boolean;
|
|
6859
7092
|
};
|
|
7093
|
+
shippingPolicy: {
|
|
7094
|
+
baseDeliveryFee: number;
|
|
7095
|
+
freeThreshold: number | null;
|
|
7096
|
+
jejuSurcharge: number;
|
|
7097
|
+
isolatedSurcharge: number;
|
|
7098
|
+
};
|
|
6860
7099
|
termsVersion: string;
|
|
6861
7100
|
privacyVersion: string;
|
|
6862
7101
|
termsVersionUpdatedAt: string | null;
|
|
@@ -6891,6 +7130,12 @@ export declare function createStoreClient(options: StoreClientOptions): {
|
|
|
6891
7130
|
sellerFaultFreeShipping: boolean;
|
|
6892
7131
|
conditionalFreeShortfallCharge: boolean;
|
|
6893
7132
|
};
|
|
7133
|
+
shippingPolicy: {
|
|
7134
|
+
baseDeliveryFee: number;
|
|
7135
|
+
freeThreshold: number | null;
|
|
7136
|
+
jejuSurcharge: number;
|
|
7137
|
+
isolatedSurcharge: number;
|
|
7138
|
+
};
|
|
6894
7139
|
termsVersion: string;
|
|
6895
7140
|
privacyVersion: string;
|
|
6896
7141
|
termsVersionUpdatedAt: string | null;
|
|
@@ -7107,6 +7352,194 @@ export declare const STORE_ROLE_SCOPES: {
|
|
|
7107
7352
|
readonly STAFF: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "customer:r"];
|
|
7108
7353
|
};
|
|
7109
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
|
|
7110
7543
|
//#region src/schemas/webhook-event.d.ts
|
|
7111
7544
|
export declare const orderWebhookEventDataSchema: z.ZodObject<{
|
|
7112
7545
|
orderId: z.ZodString;
|