@sayren/storefront-sdk 0.18.4 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/index.mjs +1 -1
- package/dist/{checkout-CCsO8PY2.mjs → checkout-f7iFQV88.mjs} +18 -4
- package/dist/{client-5Nd-KG-G.mjs → client-NPFWqMgT.mjs} +89 -4
- package/dist/{index-AQs_Qyhm.d.mts → index-UhlK7HG7.d.mts} +273 -16
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/payments/index.d.mts +6 -1
- package/dist/payments/index.mjs +24 -3
- package/package.json +1 -1
- package/src/client.ts +31 -0
- package/src/index.ts +1 -0
- package/src/payments/index.ts +26 -2
- package/src/schemas/catalog.ts +60 -0
- package/src/schemas/checkout.ts +47 -3
- package/src/schemas/order.ts +4 -3
- package/src/schemas/points.ts +62 -0
package/dist/auth/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { kt as ApiError, t as createStorefrontClient } from "../client-NPFWqMgT.mjs";
|
|
2
2
|
//#region src/auth/index.ts
|
|
3
3
|
/** 소셜 로그인 실패 — 구매자가 취소했거나(`access_denied`) state가 맞지 않는다 */
|
|
4
4
|
var IdpCallbackError = class extends Error {
|
|
@@ -317,6 +317,13 @@ const paymentMethodSchema = z.enum([
|
|
|
317
317
|
"MOBILE",
|
|
318
318
|
"EASY_PAY"
|
|
319
319
|
]);
|
|
320
|
+
/**
|
|
321
|
+
* 응답에 실리는 결제수단 — 아는 값(`PaymentMethod`)이거나 이 SDK가 모르는 새 값(문자열)이다. 서버가 결제수단을 더해도
|
|
322
|
+
* 응답 파싱이 깨지지 않게 넓게 받는다(`responsePlanCodeSchema`·`easyPayProviderResponseSchema`와 같은 방식, #93 P0).
|
|
323
|
+
* 적립금 전액 결제 주문은 `POINT`가 온다. 화면은 아는 값으로 분기하고 모르는 값은 그대로 표시하거나 「기타」로 다룬다.
|
|
324
|
+
* 요청(결제 옵션)은 값을 골라 보내는 자리라 `paymentMethodSchema`(enum) 그대로다.
|
|
325
|
+
*/
|
|
326
|
+
const responsePaymentMethodSchema = z.union([paymentMethodSchema, z.string()]).describe("결제수단. `CARD` 카드 · `BANK_TRANSFER` 계좌이체 · `VIRTUAL_ACCOUNT` 가상계좌 · `MOBILE` 휴대폰 · `EASY_PAY` 간편결제 · `POINT` 적립금 전액 결제. 값이 추가될 수 있어 문자열로 받는다");
|
|
320
327
|
/** 결제를 처리하는 PG. 셀러가 직접 계약하고 상점 플랫폼 설정 › 결제에서 연결한다 */
|
|
321
328
|
const pgProviderSchema = z.enum(["tosspayments", "portone"]);
|
|
322
329
|
/** 간편결제사. 토스페이먼츠·포트원 모두 같은 코드를 쓴다 */
|
|
@@ -491,11 +498,18 @@ const retryPaymentRequestSchema = z.object({
|
|
|
491
498
|
returnUrl: startPaymentRequestSchema.shape.returnUrl.optional(),
|
|
492
499
|
cashReceipt: cashReceiptField
|
|
493
500
|
});
|
|
501
|
+
/**
|
|
502
|
+
* 결제 시작 상태 — `pending`이면 `payUrl`로 결제창을 연다. `completed`면 결제창 없이 결제가 끝나 주문이 만들어졌고
|
|
503
|
+
* `orderId`가 있다(적립금으로 결제 금액 전체를 낸 주문, #93). 값이 추가될 수 있어 응답은 문자열로 받는다.
|
|
504
|
+
*/
|
|
505
|
+
const PAYMENT_START_STATUS_VALUES = ["pending", "completed"];
|
|
494
506
|
const paymentStartSchema = z.object({
|
|
495
507
|
paymentId: z.string().describe("결제 id. 상태 조회·재시도의 키다"),
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
508
|
+
status: z.string().optional().default("pending").describe("결제 시작 상태. `pending`이면 `payUrl`로 결제창을 연다. `completed`면 결제창 없이 결제가 끝났고(적립금 전액 결제) `orderId`가 주문 번호다. 그 밖의 값은 결제 상태 조회(`GET /payments/{paymentId}`)로 확정한다. 이 필드가 없던 서버 응답은 `pending`으로 읽는다"),
|
|
509
|
+
orderId: z.string().nullable().optional().default(null).describe("만들어진 주문 번호. `status`가 `completed`일 때만 값이 있고 그 밖에는 null"),
|
|
510
|
+
attemptId: z.string().nullable().describe("결제 시도 id. PG 주문번호(토스 orderId, 포트원 paymentId)다. 결제창 없이 끝난 결제(`completed`)는 null"),
|
|
511
|
+
option: paymentOptionSchema.nullable().describe("이 시도의 결제 옵션. 결제창 없이 끝난 결제(`completed`)는 null"),
|
|
512
|
+
payUrl: z.string().nullable().describe("결제 서비스 주소. 팝업으로 열려면 쿼리 `mode=popup`을 붙이고, 그대로 이동하면 리다이렉트 결제다. 결제창 없이 끝난 결제(`completed`)는 null이다"),
|
|
499
513
|
expiresAt: z.string().describe("결제 요청 만료 시각"),
|
|
500
514
|
testPayment: z.boolean().describe("테스트 결제(샌드박스) 여부. true면 실제로 돈이 나가지 않는다 — 결제 화면에 테스트 결제 안내를 표시한다"),
|
|
501
515
|
amounts: checkoutSessionSchema.shape.amounts.describe("**확정 결제 금액** — 보낸 배송지로 배송비를 다시 계산한 값이다. 주문서 조회 시점의 `amounts`와 다를 수 있다(제주·도서산간 추가 배송비)"),
|
|
@@ -553,4 +567,4 @@ const paymentMessageSchema = z.object({
|
|
|
553
567
|
orderId: z.string().optional()
|
|
554
568
|
});
|
|
555
569
|
//#endregion
|
|
556
|
-
export {
|
|
570
|
+
export { normalizeCustomInputValue as $, retryPaymentRequestSchema as A, couponBenefitViewSchema as B, paymentOptionSchema as C, remoteAreaSchema as D, pgProviderSchema as E, applicableCouponSchema as F, addonGroupViewSchema as G, myCouponListQuerySchema as H, checkoutPricingRequestSchema as I, customInputLength as J, addonSelectionSchema as K, checkoutPricingSchema as L, startPaymentRequestSchema as M, MAX_COUPONS_PER_CHECKOUT as N, residentNumberLike as O, MIN_PAYMENT_AMOUNT as P, lineSelectionResponseShape as Q, couponApplicationListSchema as R, paymentOptionListSchema as S, paymentStatusSchema as T, myCouponSchema as U, couponResultSchema as V, pricingAmountsSchema as W, customInputViewSchema as X, customInputValueViewSchema as Y, lineSelectionRequestShape as Z, guestInfoSchema as _, availablePaymentOptionSchema as a, paymentMethodSchema as b, cashReceiptRequestSchema as c, checkoutSessionSchema as d, optionSelectionViewSchema as et, createCheckoutRequestSchema as f, easyPayProviderSchema as g, easyPayProviderResponseSchema as h, PAYMENT_STATUS_VALUES as i, productFulfillmentViewSchema as it, shippingAddressInputSchema as j, responsePaymentMethodSchema as k, cashReceiptTypeSchema as l, deliveryQuoteSchema as m, PAYMENT_RESULT_VALUES as n, myOrderItemFulfillmentSnapshotSchema as nt, cashReceiptAvailable as o, deliveryQuoteRequestSchema as p, customInputEntrySchema as q, PAYMENT_START_STATUS_VALUES as r, productCardFulfillmentSchema as rt, cashReceiptIdentityTypeOf as s, CASH_RECEIPT_METHODS as t, lineFulfillmentSchema as tt, checkoutDeliverySchema as u, paymentFailureCategorySchema as v, paymentStartSchema as w, paymentOptionKey as x, paymentMessageSchema as y, couponApplicationSchema as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ANALYTICS_VISITOR_HEADER, r as ANALYTICS_SESSION_HEADER } from "./analytics-CgD70OqH.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { A as retryPaymentRequestSchema, F as applicableCouponSchema, G as addonGroupViewSchema, I as checkoutPricingRequestSchema, L as checkoutPricingSchema, M as startPaymentRequestSchema, Q as lineSelectionResponseShape, T as paymentStatusSchema, U as myCouponSchema, X as customInputViewSchema, Z as lineSelectionRequestShape, d as checkoutSessionSchema, f as createCheckoutRequestSchema, h as easyPayProviderResponseSchema, it as productFulfillmentViewSchema, k as responsePaymentMethodSchema, m as deliveryQuoteSchema, nt as myOrderItemFulfillmentSnapshotSchema, p as deliveryQuoteRequestSchema, rt as productCardFulfillmentSchema, tt as lineFulfillmentSchema, w as paymentStartSchema } from "./checkout-f7iFQV88.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/http.ts
|
|
5
5
|
/** 표준 엔벨로프의 $.error 상세 */
|
|
@@ -382,6 +382,42 @@ const productFacetsSchema = z.object({
|
|
|
382
382
|
});
|
|
383
383
|
/** `GET /products` 응답 — 상품 카드 페이지와 검색 패싯 */
|
|
384
384
|
const productPageSchema = pageSchema(productCardSchema).extend({ facets: productFacetsSchema.optional() });
|
|
385
|
+
/**
|
|
386
|
+
* 컬렉션 (이슈 #83) — 셀러가 묶은 상품 목록(기획전·이벤트·신상품 등). 노출 중인 것(노출 켜짐 + 기간 안)만 보인다.
|
|
387
|
+
* 주소 값은 `slug`이고 상품 목록은 `GET /collections/{slug}/products`다.
|
|
388
|
+
*/
|
|
389
|
+
const storefrontCollectionSchema = z.object({
|
|
390
|
+
collectionId: z.string(),
|
|
391
|
+
slug: z.string(),
|
|
392
|
+
title: z.string(),
|
|
393
|
+
description: z.string(),
|
|
394
|
+
imageUrl: z.string().nullable().describe("대표 이미지 주소. 없으면 null"),
|
|
395
|
+
startsAt: z.string().nullable().describe("노출 시작 시각. 없으면 null"),
|
|
396
|
+
endsAt: z.string().nullable().describe("노출 종료 시각. 없으면 null(끝나지 않는다)")
|
|
397
|
+
});
|
|
398
|
+
/** 컬렉션 상품 정렬 — 상품 검색 정렬 + `manual`(셀러가 정한 순서) */
|
|
399
|
+
const collectionProductSortSchema = z.enum(["manual", ...productSortSchema.options]);
|
|
400
|
+
/** `GET /collections/{slug}` — 목록 항목 + 기본 정렬·검색 메타 */
|
|
401
|
+
const storefrontCollectionDetailSchema = storefrontCollectionSchema.extend({
|
|
402
|
+
productSort: z.string().describe("상품 목록 기본 정렬(`sort`를 생략하면 이 정렬이다). 현재 값은 `CollectionProductSortParam`이고 값이 늘 수 있어 문자열이다"),
|
|
403
|
+
metaTitle: z.string().nullable(),
|
|
404
|
+
metaDescription: z.string().nullable()
|
|
405
|
+
});
|
|
406
|
+
/** `GET /collections/{slug}/products` 쿼리 — OpenAPI 문서용 형태(값은 쿼리 문자열) */
|
|
407
|
+
const collectionProductQuerySchema = z.object({
|
|
408
|
+
sort: collectionProductSortSchema.optional().describe("정렬. 생략하면 컬렉션의 기본 정렬"),
|
|
409
|
+
minPrice: z.string().optional().describe("최소 판매가(즉시할인 반영)"),
|
|
410
|
+
maxPrice: z.string().optional().describe("최대 판매가(즉시할인 반영)"),
|
|
411
|
+
page: z.string().optional().describe("페이지 번호 (1부터, 기본 1)"),
|
|
412
|
+
size: z.string().optional().describe("페이지 크기 (기본 20, 최대 60)")
|
|
413
|
+
});
|
|
414
|
+
/** 컬렉션 상품 페이지 — 상품 검색과 같은 카드다(판매 중 상품만) */
|
|
415
|
+
const collectionProductPageSchema = pageSchema(productCardSchema);
|
|
416
|
+
/** `GET /collections` 쿼리 */
|
|
417
|
+
const storefrontCollectionListQuerySchema = z.object({
|
|
418
|
+
page: z.string().optional().describe("페이지 번호 (1부터, 기본 1)"),
|
|
419
|
+
size: z.string().optional().describe("페이지 크기 (기본 20, 최대 100)")
|
|
420
|
+
});
|
|
385
421
|
//#endregion
|
|
386
422
|
//#region src/schemas/claim.ts
|
|
387
423
|
const claimTypeSchema = z.enum([
|
|
@@ -661,7 +697,7 @@ const myOrderSchema = z.object({
|
|
|
661
697
|
requiresShipping: z.boolean().describe("택배 배송이 필요한 주문상품이 있는가. false면 `shippingAddress`는 주문자 이름·연락처만 있고 주소는 빈 문자열이다"),
|
|
662
698
|
shippingAddress: orderShippingAddressSchema,
|
|
663
699
|
payment: z.object({
|
|
664
|
-
method:
|
|
700
|
+
method: responsePaymentMethodSchema.describe("실제 결제수단(PG가 보고한 수단, 모르면 주문서에서 고른 수단). 결제창에서 바뀔 수 있다(카드 결제창의 간편결제 탭 등). 적립금 전액 결제 주문은 `POINT`다. 값이 추가될 수 있어 문자열로 받는다"),
|
|
665
701
|
easyPayProvider: easyPayProviderResponseSchema.nullable().optional().default(null).describe("간편결제사. `method`가 `EASY_PAY`일 때만 값이 있고, PG가 알려 주지 않았으면 주문서에서 고른 간편결제사다. 그 밖의 결제수단과 간편결제 이전 주문은 null. 서버는 항상 싣는다. 현재 값은 `NAVERPAY`·`KAKAOPAY`·`TOSSPAY`·`PAYCO`이고 값이 추가될 수 있어 문자열로 받는다"),
|
|
666
702
|
couponDiscountAmount: z.number().int().optional().default(0).describe("상품·주문 쿠폰 할인 합계. 쿠폰이 없으면 0. 서버는 항상 싣는다"),
|
|
667
703
|
deliveryDiscountAmount: z.number().int().optional().default(0).describe("배송비 쿠폰 할인. 쿠폰이 없으면 0. 서버는 항상 싣는다"),
|
|
@@ -707,6 +743,43 @@ const purchaseDecisionResultSchema = z.object({
|
|
|
707
743
|
decidedAt: z.string()
|
|
708
744
|
});
|
|
709
745
|
//#endregion
|
|
746
|
+
//#region src/schemas/points.ts
|
|
747
|
+
/**
|
|
748
|
+
* 적립금 (이슈 #93) — 상점 적립 정책 안내와 구매자 잔액·내역. 금액은 원 단위 정수다.
|
|
749
|
+
* 적립금 사용(주문서·결제)은 다음 단계에서 가산한다.
|
|
750
|
+
*/
|
|
751
|
+
/** `GET /point-policy` — 상점 적립 정책(인증 없음, 상점 단위). 리뷰 작성·주문 화면의 혜택 안내에 쓴다 */
|
|
752
|
+
const storefrontPointPolicySchema = z.object({
|
|
753
|
+
reviewReward: z.object({
|
|
754
|
+
enabled: z.boolean().describe("리뷰 적립 사용 여부. false면 리뷰 혜택 안내를 그리지 않는다"),
|
|
755
|
+
textPoint: z.number().int().describe("리뷰를 작성하면 주는 적립금(원)"),
|
|
756
|
+
photoPoint: z.number().int().describe("사진 리뷰에 더 주는 적립금(원). 사진 리뷰는 `textPoint + photoPoint`다")
|
|
757
|
+
}).describe("리뷰 적립"),
|
|
758
|
+
purchaseEarn: z.object({
|
|
759
|
+
enabled: z.boolean().describe("구매 적립 사용 여부"),
|
|
760
|
+
rateBp: z.number().int().describe("상점 기본 구매 적립률(만분율, 100 = 1%). 상품마다 다를 수 있다")
|
|
761
|
+
}).describe("구매 적립 — 구매확정 때 실결제 금액(배송비 제외) × 적립률을 준다"),
|
|
762
|
+
expiryDays: z.number().int().nullable().describe("적립금 유효 기간(일). 정하지 않았으면 null"),
|
|
763
|
+
review: z.object({
|
|
764
|
+
writableDays: z.number().int().describe("구매확정 뒤 리뷰를 쓸 수 있는 기간(일)"),
|
|
765
|
+
editableDays: z.number().int().describe("리뷰를 쓴 뒤 고칠 수 있는 기간(일)")
|
|
766
|
+
}).describe("리뷰 작성·수정 기한")
|
|
767
|
+
});
|
|
768
|
+
/** `GET /me/points` — 내 적립금 */
|
|
769
|
+
const memberPointsSchema = z.object({
|
|
770
|
+
balance: z.number().int().describe("잔액"),
|
|
771
|
+
expiringSoon: z.number().int().describe("30일 안에 소멸할 금액")
|
|
772
|
+
});
|
|
773
|
+
/** 내 적립금 내역 한 줄 — 셀러 메모는 싣지 않는다 */
|
|
774
|
+
const memberPointEntrySchema = z.object({
|
|
775
|
+
entryId: z.string(),
|
|
776
|
+
type: z.string().describe("유형. `EARN_REVIEW` 리뷰 적립 · `REVOKE_REVIEW` 리뷰 삭제 회수 · `EARN_PURCHASE` 구매 적립 · `EXPIRE` 소멸 · `ADJUST` 상점 지급·차감 · `OPENING` 기존 적립금. 값이 추가될 수 있어 문자열로 받는다"),
|
|
777
|
+
amount: z.number().int().describe("변동액. 적립 +, 회수·차감·소멸 −"),
|
|
778
|
+
balanceAfter: z.number().int().describe("이 변동 직후 잔액"),
|
|
779
|
+
createdAt: z.string()
|
|
780
|
+
});
|
|
781
|
+
const memberPointEntryPageSchema = pageSchema(memberPointEntrySchema);
|
|
782
|
+
//#endregion
|
|
710
783
|
//#region src/schemas/review.ts
|
|
711
784
|
const publicReviewSchema = z.object({
|
|
712
785
|
reviewId: z.string(),
|
|
@@ -932,12 +1005,20 @@ function createStorefrontClient(options) {
|
|
|
932
1005
|
get: () => http.request("GET", "/store", storefrontStoreSchema) },
|
|
933
1006
|
catalog: {
|
|
934
1007
|
listCategories: () => http.request("GET", "/categories", z.array(categoryNodeSchema)),
|
|
1008
|
+
/** `GET /point-policy` — 상점 적립 정책(리뷰·구매 적립, 유효 기간, 리뷰 작성·수정 기한, #93). 리뷰 혜택 안내에 쓴다 */
|
|
1009
|
+
getPointPolicy: () => http.request("GET", "/point-policy", storefrontPointPolicySchema),
|
|
935
1010
|
searchProducts: (params) => http.request("GET", "/products", productPageSchema, { query: params }),
|
|
936
1011
|
getProduct: (productId) => http.request("GET", path`/products/${productId}`, productDetailSchema),
|
|
937
1012
|
/** 상품 리뷰 목록 — `variantId`로 옵션(조합)별 리뷰만 받는다(상품 상세 `variants[].variantId`) */
|
|
938
1013
|
listProductReviews: (productId, params) => http.request("GET", path`/products/${productId}/reviews`, reviewPageSchema, { query: params }),
|
|
939
1014
|
listProductInquiries: (productId, params) => http.request("GET", path`/products/${productId}/inquiries`, pageSchema(publicInquirySchema), { query: params }),
|
|
940
|
-
createInquiry: (productId, body) => http.requestVoid("POST", path`/products/${productId}/inquiries`, { body })
|
|
1015
|
+
createInquiry: (productId, body) => http.requestVoid("POST", path`/products/${productId}/inquiries`, { body }),
|
|
1016
|
+
/** 노출 중인 컬렉션(노출 켜짐 + 기간 안) — 셀러가 정한 순서 */
|
|
1017
|
+
listCollections: (params) => http.request("GET", "/collections", pageSchema(storefrontCollectionSchema), { query: params }),
|
|
1018
|
+
/** 숨김·기간 밖·없음은 모두 404 `COLLECTION_NOT_FOUND` */
|
|
1019
|
+
getCollection: (slug) => http.request("GET", path`/collections/${slug}`, storefrontCollectionDetailSchema),
|
|
1020
|
+
/** 컬렉션 상품(판매 중만). `sort`를 생략하면 컬렉션의 기본 정렬이다 */
|
|
1021
|
+
listCollectionProducts: (slug, params) => http.request("GET", path`/collections/${slug}/products`, collectionProductPageSchema, { query: params })
|
|
941
1022
|
},
|
|
942
1023
|
cart: {
|
|
943
1024
|
get: () => http.request("GET", "/cart", cartSchema),
|
|
@@ -1018,6 +1099,10 @@ get: () => http.request("GET", "/store", storefrontStoreSchema) },
|
|
|
1018
1099
|
},
|
|
1019
1100
|
member: {
|
|
1020
1101
|
me: () => http.request("GET", "/me", memberSchema),
|
|
1102
|
+
/** `GET /me/points` — 내 적립금 잔액과 30일 안 소멸 예정액(#93) */
|
|
1103
|
+
getPoints: () => http.request("GET", "/me/points", memberPointsSchema),
|
|
1104
|
+
/** `GET /me/points/history` — 내 적립금 내역(최신순) */
|
|
1105
|
+
listPointHistory: (params) => http.request("GET", "/me/points/history", memberPointEntryPageSchema, { query: params }),
|
|
1021
1106
|
updateMe: (body) => http.requestVoid("PATCH", "/me", { body: updateProfileRequestSchema.parse(body) }),
|
|
1022
1107
|
/** 약관·개인정보·마케팅 동의의 현재 상태와 재동의 필요 여부 */
|
|
1023
1108
|
consents: () => http.request("GET", "/me/consents", memberConsentsSchema),
|
|
@@ -1057,4 +1142,4 @@ get: () => http.request("GET", "/store", storefrontStoreSchema) },
|
|
|
1057
1142
|
};
|
|
1058
1143
|
}
|
|
1059
1144
|
//#endregion
|
|
1060
|
-
export {
|
|
1145
|
+
export { collectionProductSortSchema as $, wishlistAddResultSchema as A, buildQuery as At, consentSourceSchema as B, orderShippingAddressSchema as C, memberIdentitiesSchema as Ct, memberAddressSchema as D, withdrawRequestSchema as Dt, memberAddressRequestSchema as E, tokenPairSchema as Et, createCustomerInquiryRequestSchema as F, claimReturnAddressSchema as G, consentUpdateRequestSchema as H, customerInquiryCategorySchema as I, createClaimResultSchema as J, claimTypeSchema as K, customerInquirySchema as L, createInquiryResultSchema as M, unwrapData as Mt, productInquiryCategorySchema as N, memberSchema as O, withdrawalBlockedDetailsSchema as Ot, publicInquirySchema as P, collectionProductQuerySchema as Q, consentActionSchema as R, myOrderSchema as S, loginRequestSchema as St, trackingStageResponseSchema as T, socialProviderSchema as Tt, memberConsentsSchema as U, consentStateSchema as V, claimReasonSchema as W, categoryNodeSchema as X, myClaimSchema as Y, collectionProductPageSchema as Z, memberPointEntrySchema as _, idpAgreementsSchema as _t, myReviewSchema as a, storefrontCollectionDetailSchema as at, deliveryTrackingSchema as b, idpTokenRequestSchema as bt, publicReviewSchema as c, claimStatusSchema as ct, reviewSummarySchema as d, pageSchema as dt, productCardSchema as et, updateReviewRequestSchema as f, addCartItemRequestSchema as ft, memberPointEntryPageSchema as g, anonymousSessionSchema as gt, writableReviewSchema as h, updateCartItemRequestSchema as ht, createReviewResultSchema as i, productSortSchema as it, createInquiryRequestSchema as j, toApiError as jt, updateProfileRequestSchema as k, ApiError as kt, reviewImageUploadRequestSchema as l, orderItemStatusSchema as lt, uploadTicketSchema as m, cartSchema as mt, storefrontStoreSchema as n, productFacetsSchema as nt, productReviewQuerySchema as o, storefrontCollectionListQuerySchema as ot, updateReviewResultSchema as p, cartItemSchema as pt, createClaimRequestSchema as q, createReviewRequestSchema as r, productPageSchema as rt, productReviewSortSchema as s, storefrontCollectionSchema as st, createStorefrontClient as t, productDetailSchema as tt, reviewPageSchema as u, pageInfoSchema as ut, memberPointsSchema as v, idpAuthorizeRequestSchema as vt, purchaseDecisionResultSchema as w, signupRequestSchema as wt, myOrderItemSchema as x, linkIdentityRequestSchema as xt, storefrontPointPolicySchema as y, idpAuthorizeResponseSchema as yt, consentKindSchema as z };
|
|
@@ -392,6 +392,96 @@ declare const productPageSchema: z.ZodObject<{
|
|
|
392
392
|
}, z.core.$strip>>;
|
|
393
393
|
}, z.core.$strip>;
|
|
394
394
|
type ProductPage = z.infer<typeof productPageSchema>;
|
|
395
|
+
/**
|
|
396
|
+
* 컬렉션 (이슈 #83) — 셀러가 묶은 상품 목록(기획전·이벤트·신상품 등). 노출 중인 것(노출 켜짐 + 기간 안)만 보인다.
|
|
397
|
+
* 주소 값은 `slug`이고 상품 목록은 `GET /collections/{slug}/products`다.
|
|
398
|
+
*/
|
|
399
|
+
declare const storefrontCollectionSchema: z.ZodObject<{
|
|
400
|
+
collectionId: z.ZodString;
|
|
401
|
+
slug: z.ZodString;
|
|
402
|
+
title: z.ZodString;
|
|
403
|
+
description: z.ZodString;
|
|
404
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
405
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
406
|
+
endsAt: z.ZodNullable<z.ZodString>;
|
|
407
|
+
}, z.core.$strip>;
|
|
408
|
+
type StorefrontCollection = z.infer<typeof storefrontCollectionSchema>;
|
|
409
|
+
/** 컬렉션 상품 정렬 — 상품 검색 정렬 + `manual`(셀러가 정한 순서) */
|
|
410
|
+
declare const collectionProductSortSchema: z.ZodEnum<{
|
|
411
|
+
reviewCount: "reviewCount";
|
|
412
|
+
recommend: "recommend";
|
|
413
|
+
latest: "latest";
|
|
414
|
+
priceAsc: "priceAsc";
|
|
415
|
+
priceDesc: "priceDesc";
|
|
416
|
+
ratingDesc: "ratingDesc";
|
|
417
|
+
manual: "manual";
|
|
418
|
+
}>;
|
|
419
|
+
type CollectionProductSortParam = z.infer<typeof collectionProductSortSchema>;
|
|
420
|
+
/** `GET /collections/{slug}` — 목록 항목 + 기본 정렬·검색 메타 */
|
|
421
|
+
declare const storefrontCollectionDetailSchema: z.ZodObject<{
|
|
422
|
+
collectionId: z.ZodString;
|
|
423
|
+
slug: z.ZodString;
|
|
424
|
+
title: z.ZodString;
|
|
425
|
+
description: z.ZodString;
|
|
426
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
427
|
+
startsAt: z.ZodNullable<z.ZodString>;
|
|
428
|
+
endsAt: z.ZodNullable<z.ZodString>;
|
|
429
|
+
productSort: z.ZodString;
|
|
430
|
+
metaTitle: z.ZodNullable<z.ZodString>;
|
|
431
|
+
metaDescription: z.ZodNullable<z.ZodString>;
|
|
432
|
+
}, z.core.$strip>;
|
|
433
|
+
type StorefrontCollectionDetail = z.infer<typeof storefrontCollectionDetailSchema>;
|
|
434
|
+
interface CollectionProductParams extends PageParams {
|
|
435
|
+
sort?: CollectionProductSortParam;
|
|
436
|
+
minPrice?: number;
|
|
437
|
+
maxPrice?: number;
|
|
438
|
+
}
|
|
439
|
+
/** `GET /collections/{slug}/products` 쿼리 — OpenAPI 문서용 형태(값은 쿼리 문자열) */
|
|
440
|
+
declare const collectionProductQuerySchema: z.ZodObject<{
|
|
441
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
442
|
+
reviewCount: "reviewCount";
|
|
443
|
+
recommend: "recommend";
|
|
444
|
+
latest: "latest";
|
|
445
|
+
priceAsc: "priceAsc";
|
|
446
|
+
priceDesc: "priceDesc";
|
|
447
|
+
ratingDesc: "ratingDesc";
|
|
448
|
+
manual: "manual";
|
|
449
|
+
}>>;
|
|
450
|
+
minPrice: z.ZodOptional<z.ZodString>;
|
|
451
|
+
maxPrice: z.ZodOptional<z.ZodString>;
|
|
452
|
+
page: z.ZodOptional<z.ZodString>;
|
|
453
|
+
size: z.ZodOptional<z.ZodString>;
|
|
454
|
+
}, z.core.$strip>;
|
|
455
|
+
/** 컬렉션 상품 페이지 — 상품 검색과 같은 카드다(판매 중 상품만) */
|
|
456
|
+
declare const collectionProductPageSchema: z.ZodObject<{
|
|
457
|
+
page: z.ZodNumber;
|
|
458
|
+
size: z.ZodNumber;
|
|
459
|
+
totalElements: z.ZodNumber;
|
|
460
|
+
totalPages: z.ZodNumber;
|
|
461
|
+
contents: z.ZodArray<z.ZodObject<{
|
|
462
|
+
productId: z.ZodString;
|
|
463
|
+
name: z.ZodString;
|
|
464
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
465
|
+
salePrice: z.ZodNumber;
|
|
466
|
+
discountedPrice: z.ZodNullable<z.ZodNumber>;
|
|
467
|
+
discountRate: z.ZodNullable<z.ZodNumber>;
|
|
468
|
+
originalPrice: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
469
|
+
freeShipping: z.ZodBoolean;
|
|
470
|
+
fulfillment: z.ZodObject<{
|
|
471
|
+
type: z.ZodString;
|
|
472
|
+
requiresShipping: z.ZodBoolean;
|
|
473
|
+
}, z.core.$strip>;
|
|
474
|
+
averageRating: z.ZodNumber;
|
|
475
|
+
reviewCount: z.ZodNumber;
|
|
476
|
+
soldOut: z.ZodBoolean;
|
|
477
|
+
}, z.core.$strip>>;
|
|
478
|
+
}, z.core.$strip>;
|
|
479
|
+
type CollectionProductPage = z.infer<typeof collectionProductPageSchema>;
|
|
480
|
+
/** `GET /collections` 쿼리 */
|
|
481
|
+
declare const storefrontCollectionListQuerySchema: z.ZodObject<{
|
|
482
|
+
page: z.ZodOptional<z.ZodString>;
|
|
483
|
+
size: z.ZodOptional<z.ZodString>;
|
|
484
|
+
}, z.core.$strip>;
|
|
395
485
|
//#endregion
|
|
396
486
|
//#region src/schemas/checkout.d.ts
|
|
397
487
|
declare const createCheckoutRequestSchema: z.ZodObject<{
|
|
@@ -579,6 +669,20 @@ declare const paymentMethodSchema: z.ZodEnum<{
|
|
|
579
669
|
MOBILE: "MOBILE";
|
|
580
670
|
}>;
|
|
581
671
|
type PaymentMethod = z.infer<typeof paymentMethodSchema>;
|
|
672
|
+
/**
|
|
673
|
+
* 응답에 실리는 결제수단 — 아는 값(`PaymentMethod`)이거나 이 SDK가 모르는 새 값(문자열)이다. 서버가 결제수단을 더해도
|
|
674
|
+
* 응답 파싱이 깨지지 않게 넓게 받는다(`responsePlanCodeSchema`·`easyPayProviderResponseSchema`와 같은 방식, #93 P0).
|
|
675
|
+
* 적립금 전액 결제 주문은 `POINT`가 온다. 화면은 아는 값으로 분기하고 모르는 값은 그대로 표시하거나 「기타」로 다룬다.
|
|
676
|
+
* 요청(결제 옵션)은 값을 골라 보내는 자리라 `paymentMethodSchema`(enum) 그대로다.
|
|
677
|
+
*/
|
|
678
|
+
declare const responsePaymentMethodSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
679
|
+
CARD: "CARD";
|
|
680
|
+
EASY_PAY: "EASY_PAY";
|
|
681
|
+
BANK_TRANSFER: "BANK_TRANSFER";
|
|
682
|
+
VIRTUAL_ACCOUNT: "VIRTUAL_ACCOUNT";
|
|
683
|
+
MOBILE: "MOBILE";
|
|
684
|
+
}>, z.ZodString]>;
|
|
685
|
+
type ResponsePaymentMethod = PaymentMethod | (string & {});
|
|
582
686
|
/** 결제를 처리하는 PG. 셀러가 직접 계약하고 상점 플랫폼 설정 › 결제에서 연결한다 */
|
|
583
687
|
declare const pgProviderSchema: z.ZodEnum<{
|
|
584
688
|
tosspayments: "tosspayments";
|
|
@@ -932,10 +1036,18 @@ declare const retryPaymentRequestSchema: z.ZodObject<{
|
|
|
932
1036
|
}, z.core.$strip>>;
|
|
933
1037
|
}, z.core.$strip>;
|
|
934
1038
|
type RetryPaymentRequest = z.infer<typeof retryPaymentRequestSchema>;
|
|
1039
|
+
/**
|
|
1040
|
+
* 결제 시작 상태 — `pending`이면 `payUrl`로 결제창을 연다. `completed`면 결제창 없이 결제가 끝나 주문이 만들어졌고
|
|
1041
|
+
* `orderId`가 있다(적립금으로 결제 금액 전체를 낸 주문, #93). 값이 추가될 수 있어 응답은 문자열로 받는다.
|
|
1042
|
+
*/
|
|
1043
|
+
declare const PAYMENT_START_STATUS_VALUES: readonly ["pending", "completed"];
|
|
1044
|
+
type KnownPaymentStartStatus = (typeof PAYMENT_START_STATUS_VALUES)[number];
|
|
935
1045
|
declare const paymentStartSchema: z.ZodObject<{
|
|
936
1046
|
paymentId: z.ZodString;
|
|
937
|
-
|
|
938
|
-
|
|
1047
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1048
|
+
orderId: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1049
|
+
attemptId: z.ZodNullable<z.ZodString>;
|
|
1050
|
+
option: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
939
1051
|
pg: z.ZodEnum<{
|
|
940
1052
|
tosspayments: "tosspayments";
|
|
941
1053
|
portone: "portone";
|
|
@@ -971,8 +1083,8 @@ declare const paymentStartSchema: z.ZodObject<{
|
|
|
971
1083
|
portone: "portone";
|
|
972
1084
|
}>;
|
|
973
1085
|
method: z.ZodLiteral<"MOBILE">;
|
|
974
|
-
}, z.core.$strip>], "method"
|
|
975
|
-
payUrl: z.ZodString
|
|
1086
|
+
}, z.core.$strip>], "method">>;
|
|
1087
|
+
payUrl: z.ZodNullable<z.ZodString>;
|
|
976
1088
|
expiresAt: z.ZodString;
|
|
977
1089
|
testPayment: z.ZodBoolean;
|
|
978
1090
|
amounts: z.ZodObject<{
|
|
@@ -1890,6 +2002,23 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1890
2002
|
};
|
|
1891
2003
|
catalog: {
|
|
1892
2004
|
listCategories: () => Promise<CategoryNode[]>;
|
|
2005
|
+
/** `GET /point-policy` — 상점 적립 정책(리뷰·구매 적립, 유효 기간, 리뷰 작성·수정 기한, #93). 리뷰 혜택 안내에 쓴다 */
|
|
2006
|
+
getPointPolicy: () => Promise<{
|
|
2007
|
+
reviewReward: {
|
|
2008
|
+
enabled: boolean;
|
|
2009
|
+
textPoint: number;
|
|
2010
|
+
photoPoint: number;
|
|
2011
|
+
};
|
|
2012
|
+
purchaseEarn: {
|
|
2013
|
+
enabled: boolean;
|
|
2014
|
+
rateBp: number;
|
|
2015
|
+
};
|
|
2016
|
+
expiryDays: number | null;
|
|
2017
|
+
review: {
|
|
2018
|
+
writableDays: number;
|
|
2019
|
+
editableDays: number;
|
|
2020
|
+
};
|
|
2021
|
+
}>;
|
|
1893
2022
|
searchProducts: (params?: ProductSearchParams) => Promise<{
|
|
1894
2023
|
page: number;
|
|
1895
2024
|
size: number;
|
|
@@ -2040,6 +2169,59 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2040
2169
|
}[];
|
|
2041
2170
|
}>;
|
|
2042
2171
|
createInquiry: (productId: string, body: CreateInquiryRequest) => Promise<void>;
|
|
2172
|
+
/** 노출 중인 컬렉션(노출 켜짐 + 기간 안) — 셀러가 정한 순서 */
|
|
2173
|
+
listCollections: (params?: PageParams) => Promise<{
|
|
2174
|
+
page: number;
|
|
2175
|
+
size: number;
|
|
2176
|
+
totalElements: number;
|
|
2177
|
+
totalPages: number;
|
|
2178
|
+
contents: {
|
|
2179
|
+
collectionId: string;
|
|
2180
|
+
slug: string;
|
|
2181
|
+
title: string;
|
|
2182
|
+
description: string;
|
|
2183
|
+
imageUrl: string | null;
|
|
2184
|
+
startsAt: string | null;
|
|
2185
|
+
endsAt: string | null;
|
|
2186
|
+
}[];
|
|
2187
|
+
}>;
|
|
2188
|
+
/** 숨김·기간 밖·없음은 모두 404 `COLLECTION_NOT_FOUND` */
|
|
2189
|
+
getCollection: (slug: string) => Promise<{
|
|
2190
|
+
collectionId: string;
|
|
2191
|
+
slug: string;
|
|
2192
|
+
title: string;
|
|
2193
|
+
description: string;
|
|
2194
|
+
imageUrl: string | null;
|
|
2195
|
+
startsAt: string | null;
|
|
2196
|
+
endsAt: string | null;
|
|
2197
|
+
productSort: string;
|
|
2198
|
+
metaTitle: string | null;
|
|
2199
|
+
metaDescription: string | null;
|
|
2200
|
+
}>;
|
|
2201
|
+
/** 컬렉션 상품(판매 중만). `sort`를 생략하면 컬렉션의 기본 정렬이다 */
|
|
2202
|
+
listCollectionProducts: (slug: string, params?: CollectionProductParams) => Promise<{
|
|
2203
|
+
page: number;
|
|
2204
|
+
size: number;
|
|
2205
|
+
totalElements: number;
|
|
2206
|
+
totalPages: number;
|
|
2207
|
+
contents: {
|
|
2208
|
+
productId: string;
|
|
2209
|
+
name: string;
|
|
2210
|
+
thumbnailUrl: string | null;
|
|
2211
|
+
salePrice: number;
|
|
2212
|
+
discountedPrice: number | null;
|
|
2213
|
+
discountRate: number | null;
|
|
2214
|
+
originalPrice: number | null;
|
|
2215
|
+
freeShipping: boolean;
|
|
2216
|
+
fulfillment: {
|
|
2217
|
+
type: string;
|
|
2218
|
+
requiresShipping: boolean;
|
|
2219
|
+
};
|
|
2220
|
+
averageRating: number;
|
|
2221
|
+
reviewCount: number;
|
|
2222
|
+
soldOut: boolean;
|
|
2223
|
+
}[];
|
|
2224
|
+
}>;
|
|
2043
2225
|
};
|
|
2044
2226
|
cart: {
|
|
2045
2227
|
get: () => Promise<{
|
|
@@ -2265,7 +2447,9 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2265
2447
|
*/
|
|
2266
2448
|
startPayment: (checkoutId: string, body: StartPaymentRequest) => Promise<{
|
|
2267
2449
|
paymentId: string;
|
|
2268
|
-
|
|
2450
|
+
status: string;
|
|
2451
|
+
orderId: string | null;
|
|
2452
|
+
attemptId: string | null;
|
|
2269
2453
|
option: {
|
|
2270
2454
|
pg: "tosspayments" | "portone";
|
|
2271
2455
|
method: "CARD";
|
|
@@ -2282,8 +2466,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2282
2466
|
} | {
|
|
2283
2467
|
pg: "tosspayments" | "portone";
|
|
2284
2468
|
method: "MOBILE";
|
|
2285
|
-
};
|
|
2286
|
-
payUrl: string;
|
|
2469
|
+
} | null;
|
|
2470
|
+
payUrl: string | null;
|
|
2287
2471
|
expiresAt: string;
|
|
2288
2472
|
testPayment: boolean;
|
|
2289
2473
|
amounts: {
|
|
@@ -2389,7 +2573,9 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2389
2573
|
*/
|
|
2390
2574
|
retry: (paymentId: string, body: RetryPaymentRequest) => Promise<{
|
|
2391
2575
|
paymentId: string;
|
|
2392
|
-
|
|
2576
|
+
status: string;
|
|
2577
|
+
orderId: string | null;
|
|
2578
|
+
attemptId: string | null;
|
|
2393
2579
|
option: {
|
|
2394
2580
|
pg: "tosspayments" | "portone";
|
|
2395
2581
|
method: "CARD";
|
|
@@ -2406,8 +2592,8 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2406
2592
|
} | {
|
|
2407
2593
|
pg: "tosspayments" | "portone";
|
|
2408
2594
|
method: "MOBILE";
|
|
2409
|
-
};
|
|
2410
|
-
payUrl: string;
|
|
2595
|
+
} | null;
|
|
2596
|
+
payUrl: string | null;
|
|
2411
2597
|
expiresAt: string;
|
|
2412
2598
|
testPayment: boolean;
|
|
2413
2599
|
amounts: {
|
|
@@ -2489,7 +2675,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2489
2675
|
entranceCode?: string | null | undefined;
|
|
2490
2676
|
};
|
|
2491
2677
|
payment: {
|
|
2492
|
-
method:
|
|
2678
|
+
method: string;
|
|
2493
2679
|
easyPayProvider: string | null;
|
|
2494
2680
|
couponDiscountAmount: number;
|
|
2495
2681
|
deliveryDiscountAmount: number;
|
|
@@ -2558,7 +2744,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2558
2744
|
entranceCode?: string | null | undefined;
|
|
2559
2745
|
};
|
|
2560
2746
|
payment: {
|
|
2561
|
-
method:
|
|
2747
|
+
method: string;
|
|
2562
2748
|
easyPayProvider: string | null;
|
|
2563
2749
|
couponDiscountAmount: number;
|
|
2564
2750
|
deliveryDiscountAmount: number;
|
|
@@ -2638,7 +2824,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2638
2824
|
entranceCode?: string | null | undefined;
|
|
2639
2825
|
};
|
|
2640
2826
|
payment: {
|
|
2641
|
-
method:
|
|
2827
|
+
method: string;
|
|
2642
2828
|
easyPayProvider: string | null;
|
|
2643
2829
|
couponDiscountAmount: number;
|
|
2644
2830
|
deliveryDiscountAmount: number;
|
|
@@ -2724,6 +2910,25 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2724
2910
|
joinedAt: string;
|
|
2725
2911
|
reconsentRequired: boolean;
|
|
2726
2912
|
}>;
|
|
2913
|
+
/** `GET /me/points` — 내 적립금 잔액과 30일 안 소멸 예정액(#93) */
|
|
2914
|
+
getPoints: () => Promise<{
|
|
2915
|
+
balance: number;
|
|
2916
|
+
expiringSoon: number;
|
|
2917
|
+
}>;
|
|
2918
|
+
/** `GET /me/points/history` — 내 적립금 내역(최신순) */
|
|
2919
|
+
listPointHistory: (params?: PageParams) => Promise<{
|
|
2920
|
+
page: number;
|
|
2921
|
+
size: number;
|
|
2922
|
+
totalElements: number;
|
|
2923
|
+
totalPages: number;
|
|
2924
|
+
contents: {
|
|
2925
|
+
entryId: string;
|
|
2926
|
+
type: string;
|
|
2927
|
+
amount: number;
|
|
2928
|
+
balanceAfter: number;
|
|
2929
|
+
createdAt: string;
|
|
2930
|
+
}[];
|
|
2931
|
+
}>;
|
|
2727
2932
|
updateMe: (body: UpdateProfileRequest) => Promise<void>;
|
|
2728
2933
|
/** 약관·개인정보·마케팅 동의의 현재 상태와 재동의 필요 여부 */
|
|
2729
2934
|
consents: () => Promise<{
|
|
@@ -3232,13 +3437,13 @@ declare const myOrderSchema: z.ZodObject<{
|
|
|
3232
3437
|
entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3233
3438
|
}, z.core.$strip>;
|
|
3234
3439
|
payment: z.ZodObject<{
|
|
3235
|
-
method: z.ZodEnum<{
|
|
3440
|
+
method: z.ZodUnion<readonly [z.ZodEnum<{
|
|
3236
3441
|
CARD: "CARD";
|
|
3237
3442
|
EASY_PAY: "EASY_PAY";
|
|
3238
3443
|
BANK_TRANSFER: "BANK_TRANSFER";
|
|
3239
3444
|
VIRTUAL_ACCOUNT: "VIRTUAL_ACCOUNT";
|
|
3240
3445
|
MOBILE: "MOBILE";
|
|
3241
|
-
}>;
|
|
3446
|
+
}>, z.ZodString]>;
|
|
3242
3447
|
easyPayProvider: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3243
3448
|
couponDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
3244
3449
|
deliveryDiscountAmount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -3287,6 +3492,58 @@ declare const purchaseDecisionResultSchema: z.ZodObject<{
|
|
|
3287
3492
|
}, z.core.$strip>;
|
|
3288
3493
|
type PurchaseDecisionResult = z.infer<typeof purchaseDecisionResultSchema>;
|
|
3289
3494
|
//#endregion
|
|
3495
|
+
//#region src/schemas/points.d.ts
|
|
3496
|
+
/**
|
|
3497
|
+
* 적립금 (이슈 #93) — 상점 적립 정책 안내와 구매자 잔액·내역. 금액은 원 단위 정수다.
|
|
3498
|
+
* 적립금 사용(주문서·결제)은 다음 단계에서 가산한다.
|
|
3499
|
+
*/
|
|
3500
|
+
/** `GET /point-policy` — 상점 적립 정책(인증 없음, 상점 단위). 리뷰 작성·주문 화면의 혜택 안내에 쓴다 */
|
|
3501
|
+
declare const storefrontPointPolicySchema: z.ZodObject<{
|
|
3502
|
+
reviewReward: z.ZodObject<{
|
|
3503
|
+
enabled: z.ZodBoolean;
|
|
3504
|
+
textPoint: z.ZodNumber;
|
|
3505
|
+
photoPoint: z.ZodNumber;
|
|
3506
|
+
}, z.core.$strip>;
|
|
3507
|
+
purchaseEarn: z.ZodObject<{
|
|
3508
|
+
enabled: z.ZodBoolean;
|
|
3509
|
+
rateBp: z.ZodNumber;
|
|
3510
|
+
}, z.core.$strip>;
|
|
3511
|
+
expiryDays: z.ZodNullable<z.ZodNumber>;
|
|
3512
|
+
review: z.ZodObject<{
|
|
3513
|
+
writableDays: z.ZodNumber;
|
|
3514
|
+
editableDays: z.ZodNumber;
|
|
3515
|
+
}, z.core.$strip>;
|
|
3516
|
+
}, z.core.$strip>;
|
|
3517
|
+
type StorefrontPointPolicy = z.infer<typeof storefrontPointPolicySchema>;
|
|
3518
|
+
/** `GET /me/points` — 내 적립금 */
|
|
3519
|
+
declare const memberPointsSchema: z.ZodObject<{
|
|
3520
|
+
balance: z.ZodNumber;
|
|
3521
|
+
expiringSoon: z.ZodNumber;
|
|
3522
|
+
}, z.core.$strip>;
|
|
3523
|
+
type MemberPoints = z.infer<typeof memberPointsSchema>;
|
|
3524
|
+
/** 내 적립금 내역 한 줄 — 셀러 메모는 싣지 않는다 */
|
|
3525
|
+
declare const memberPointEntrySchema: z.ZodObject<{
|
|
3526
|
+
entryId: z.ZodString;
|
|
3527
|
+
type: z.ZodString;
|
|
3528
|
+
amount: z.ZodNumber;
|
|
3529
|
+
balanceAfter: z.ZodNumber;
|
|
3530
|
+
createdAt: z.ZodString;
|
|
3531
|
+
}, z.core.$strip>;
|
|
3532
|
+
type MemberPointEntry = z.infer<typeof memberPointEntrySchema>;
|
|
3533
|
+
declare const memberPointEntryPageSchema: z.ZodObject<{
|
|
3534
|
+
page: z.ZodNumber;
|
|
3535
|
+
size: z.ZodNumber;
|
|
3536
|
+
totalElements: z.ZodNumber;
|
|
3537
|
+
totalPages: z.ZodNumber;
|
|
3538
|
+
contents: z.ZodArray<z.ZodObject<{
|
|
3539
|
+
entryId: z.ZodString;
|
|
3540
|
+
type: z.ZodString;
|
|
3541
|
+
amount: z.ZodNumber;
|
|
3542
|
+
balanceAfter: z.ZodNumber;
|
|
3543
|
+
createdAt: z.ZodString;
|
|
3544
|
+
}, z.core.$strip>>;
|
|
3545
|
+
}, z.core.$strip>;
|
|
3546
|
+
//#endregion
|
|
3290
3547
|
//#region src/schemas/product-options.d.ts
|
|
3291
3548
|
/**
|
|
3292
3549
|
* 추가 선택·직접 입력 (이슈 #59) — 상품 상세의 옵션 표시, 장바구니 담기·바로 구매 요청, 줄 스냅샷의 공통 모양.
|
|
@@ -3411,4 +3668,4 @@ declare const storefrontStoreSchema: z.ZodObject<{
|
|
|
3411
3668
|
}, z.core.$strip>;
|
|
3412
3669
|
type StorefrontStore = z.infer<typeof storefrontStoreSchema>;
|
|
3413
3670
|
//#endregion
|
|
3414
|
-
export {
|
|
3671
|
+
export { StorefrontClientOptions as $, DeliveryQuoteResult as $n, ProductDetail as $r, createCustomerInquiryRequestSchema as $t, PurchaseDecisionResult as A, UnknownFulfillmentView as Ai, consentUpdateRequestSchema as An, easyPayProviderResponseSchema as Ar, uploadTicketSchema as At, ANALYTICS_VISITOR_COOKIE as B, cartItemSchema as Bi, claimTypeSchema as Bn, paymentStatusSchema as Br, updateProfileRequestSchema as Bt, memberPointEntrySchema as C, orderItemStatusSchema as Ci, ConsentState as Cn, cashReceiptRequestSchema as Cr, productReviewSortSchema as Ct, MyOrder as D, MyOrderItemFulfillmentSnapshot as Di, consentKindSchema as Dn, createCheckoutRequestSchema as Dr, reviewSummarySchema as Dt, DeliveryTracking as E, LineFulfillment as Ei, consentActionSchema as En, checkoutSessionSchema as Er, reviewPageSchema as Et, purchaseDecisionResultSchema as F, AddCartItemRequest as Fi, CreateClaimRequest as Fn, paymentMethodSchema as Fr, UpdateProfileRequest as Ft, AnalyticsEventName as G, CASH_RECEIPT_METHODS as Gn, retryPaymentRequestSchema as Gr, PublicInquiry as Gt, AnalyticsBatch as H, updateCartItemRequestSchema as Hi, createClaimResultSchema as Hn, remoteAreaSchema as Hr, CreateInquiryRequest as Ht, trackingStageResponseSchema as I, Cart as Ii, CreateClaimResult as In, paymentOptionKey as Ir, WishlistAddResult as It, analyticsClientEventNameSchema as J, CashReceiptType as Jn, CategoryNode as Jr, productInquiryCategorySchema as Jt, AnalyticsServerEventName as K, CashReceiptIdentityType as Kn, shippingAddressInputSchema as Kr, createInquiryRequestSchema as Kt, ANALYTICS_MAX_BATCH_BYTES as L, CartItem as Li, MyClaim as Ln, paymentOptionListSchema as Lr, memberAddressRequestSchema as Lt, myOrderItemSchema as M, myOrderItemFulfillmentSnapshotSchema as Mi, ClaimReason as Mn, guestInfoSchema as Mr, Member as Mt, myOrderSchema as N, productCardFulfillmentSchema as Ni, ClaimReturnAddress as Nn, paymentFailureCategorySchema as Nr, MemberAddress as Nt, MyOrderItem as O, ProductCardFulfillment as Oi, consentSourceSchema as On, deliveryQuoteRequestSchema as Or, updateReviewRequestSchema as Ot, orderShippingAddressSchema as P, productFulfillmentViewSchema as Pi, ClaimType as Pn, paymentMessageSchema as Pr, MemberAddressRequest as Pt, StorefrontClient as Q, DeliveryQuoteRequest as Qn, ProductCard as Qr, CustomerInquiryCategory as Qt, ANALYTICS_SESSION_COOKIE as R, UpdateCartItemRequest as Ri, claimReasonSchema as Rn, paymentOptionSchema as Rr, memberAddressSchema as Rt, memberPointEntryPageSchema as S, claimStatusSchema as Si, ConsentSource as Sn, cashReceiptIdentityTypeOf as Sr, productReviewQuerySchema as St, storefrontPointPolicySchema as T, pageSchema as Ti, MemberConsents as Tn, checkoutDeliverySchema as Tr, reviewImageUploadRequestSchema as Tt, AnalyticsClientEvent as U, analyticsIdsFromCookie as Ui, myClaimSchema as Un, residentNumberLike as Ur, CreateInquiryResult as Ut, ANALYTICS_VISITOR_HEADER as V, cartSchema as Vi, createClaimRequestSchema as Vn, pgProviderSchema as Vr, wishlistAddResultSchema as Vt, AnalyticsClientEventName as W, AvailablePaymentOption as Wn, responsePaymentMethodSchema as Wr, ProductInquiryCategory as Wt, analyticsIdSchema as X, CheckoutSession as Xn, CollectionProductParams as Xr, CreateCustomerInquiryRequest as Xt, analyticsClientEventSchema as Y, CheckoutDelivery as Yn, CollectionProductPage as Yr, publicInquirySchema as Yt, analyticsServerEventNameSchema as Z, CreateCheckoutRequest as Zn, CollectionProductSortParam as Zr, CustomerInquiry as Zt, normalizeCustomInputValue as _, storefrontCollectionSchema as _i, myCouponListQuerySchema as _n, RetryPaymentRequest as _r, UploadTicket as _t, CustomInputEntry as a, StorefrontCollectionDetail as ai, CouponApplication as an, PAYMENT_RESULT_VALUES as ar, createStorefrontSession as at, MemberPoints as b, PageInfo as bi, ConsentAction as bn, availablePaymentOptionSchema as br, createReviewResultSchema as bt, OptionSelectionView as c, collectionProductQuerySchema as ci, MIN_PAYMENT_AMOUNT as cn, PaymentFailureCategory as cr, MyReview as ct, customInputEntrySchema as d, productDetailSchema as di, checkoutPricingRequestSchema as dn, PaymentOption as dr, PublicReview as dt, ProductFacets as ei, customerInquiryCategorySchema as en, EasyPayProvider as er, createStorefrontClient as et, customInputLength as f, productFacetsSchema as fi, checkoutPricingSchema as fn, PaymentStart as fr, ReviewImageUploadRequest as ft, lineSelectionResponseShape as g, storefrontCollectionListQuerySchema as gi, couponResultSchema as gn, ResponsePaymentMethod as gr, UpdateReviewResult as gt, lineSelectionRequestShape as h, storefrontCollectionDetailSchema as hi, couponBenefitViewSchema as hn, RemoteArea as hr, UpdateReviewRequest as ht, AddonSelection as i, StorefrontCollection as ii, CheckoutPricingRequest as in, KnownPaymentStatus as ir, StorefrontSessionOptions as it, deliveryTrackingSchema as j, lineFulfillmentSchema as ji, memberConsentsSchema as jn, easyPayProviderSchema as jr, writableReviewSchema as jt, OrderShippingAddress as k, ProductFulfillmentView as ki, consentStateSchema as kn, deliveryQuoteSchema as kr, updateReviewResultSchema as kt, addonGroupViewSchema as l, collectionProductSortSchema as li, MyCoupon as ln, PaymentMessage as lr, ProductReviewParams as lt, customInputViewSchema as m, productSortSchema as mi, couponApplicationSchema as mn, PgProvider as mr, ReviewSummary as mt, storefrontStoreSchema as n, ProductSearchParams as ni, ApplicableCoupon as nn, KnownPaymentResult as nr, SessionStorage as nt, CustomInputValueView as o, categoryNodeSchema as oi, CouponResult as on, PAYMENT_START_STATUS_VALUES as or, CreateReviewRequest as ot, customInputValueViewSchema as p, productPageSchema as pi, couponApplicationListSchema as pn, PaymentStatus as pr, ReviewPage as pt, analyticsBatchSchema as q, CashReceiptRequest as qn, startPaymentRequestSchema as qr, createInquiryResultSchema as qt, AddonGroupView as r, ProductSort as ri, CheckoutPricing as rn, KnownPaymentStartStatus as rr, StorefrontSession as rt, CustomInputView as s, collectionProductPageSchema as si, MAX_COUPONS_PER_CHECKOUT as sn, PAYMENT_STATUS_VALUES as sr, CreateReviewResult as st, StorefrontStore as t, ProductPage as ti, customerInquirySchema as tn, GuestInfo as tr, STOREFRONT_SESSION_KEYS as tt, addonSelectionSchema as u, productCardSchema as ui, applicableCouponSchema as un, PaymentMethod as ur, ProductReviewSort as ut, optionSelectionViewSchema as v, ClaimStatus as vi, myCouponSchema as vn, ShippingAddressInput as vr, WritableReview as vt, memberPointsSchema as w, pageInfoSchema as wi, ConsentUpdateRequest as wn, cashReceiptTypeSchema as wr, publicReviewSchema as wt, StorefrontPointPolicy as x, PageParams as xi, ConsentKind as xn, cashReceiptAvailable as xr, myReviewSchema as xt, MemberPointEntry as y, OrderItemStatus as yi, pricingAmountsSchema as yn, StartPaymentRequest as yr, createReviewRequestSchema as yt, ANALYTICS_SESSION_HEADER as z, addCartItemRequestSchema as zi, claimReturnAddressSchema as zn, paymentStartSchema as zr, memberSchema as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { C as loginRequestSchema, D as tokenPairSchema, E as socialProviderSchema, O as withdrawRequestSchema, S as linkIdentityRequestSchema, T as signupRequestSchema, _ as anonymousSessionSchema, a as AnonymousSession, b as idpAuthorizeResponseSchema, c as IdpTokenRequest, d as MemberIdentities, f as SignupRequest, g as WithdrawalBlockedDetails, h as WithdrawRequest, i as buildQuery, k as withdrawalBlockedDetailsSchema, l as LinkIdentityRequest, m as TokenPair, n as Query, o as IdpAgreements, p as SocialProvider, r as TokenSource, s as IdpAuthorizeRequest, t as ApiError, u as LoginRequest, v as idpAgreementsSchema, w as memberIdentitiesSchema, x as idpTokenRequestSchema, y as idpAuthorizeRequestSchema } from "./http-1ab7tP4-.mjs";
|
|
2
|
-
import { $ as
|
|
3
|
-
export { ANALYTICS_MAX_BATCH_BYTES, ANALYTICS_SESSION_COOKIE, ANALYTICS_SESSION_HEADER, ANALYTICS_VISITOR_COOKIE, ANALYTICS_VISITOR_HEADER, AddCartItemRequest, AddonGroupView, AddonSelection, AnalyticsBatch, AnalyticsClientEvent, AnalyticsClientEventName, AnalyticsEventName, AnalyticsServerEventName, AnonymousSession, ApiError, ApplicableCoupon, AvailablePaymentOption, CASH_RECEIPT_METHODS, Cart, CartItem, CashReceiptIdentityType, CashReceiptRequest, CashReceiptType, CategoryNode, CheckoutDelivery, CheckoutPricing, CheckoutPricingRequest, CheckoutSession, ClaimReason, ClaimReturnAddress, ClaimStatus, ClaimType, ConsentAction, ConsentKind, ConsentSource, ConsentState, ConsentUpdateRequest, CouponApplication, CouponResult, CreateCheckoutRequest, CreateClaimRequest, CreateClaimResult, CreateCustomerInquiryRequest, CreateInquiryRequest, CreateInquiryResult, CreateReviewRequest, CreateReviewResult, CustomInputEntry, CustomInputValueView, CustomInputView, CustomerInquiry, CustomerInquiryCategory, DeliveryQuoteRequest, DeliveryQuoteResult, DeliveryTracking, EasyPayProvider, GuestInfo, IdpAgreements, IdpAuthorizeRequest, IdpTokenRequest, KnownPaymentResult, KnownPaymentStatus, LineFulfillment, LinkIdentityRequest, LoginRequest, MAX_COUPONS_PER_CHECKOUT, MIN_PAYMENT_AMOUNT, Member, MemberAddress, MemberAddressRequest, MemberConsents, MemberIdentities, MyClaim, MyCoupon, MyOrder, MyOrderItem, MyOrderItemFulfillmentSnapshot, MyReview, OptionSelectionView, OrderItemStatus, OrderShippingAddress, PAYMENT_RESULT_VALUES, PAYMENT_STATUS_VALUES, PageInfo, PageParams, PaymentFailureCategory, PaymentMessage, PaymentMethod, PaymentOption, PaymentStart, PaymentStatus, PgProvider, ProductCard, ProductCardFulfillment, ProductDetail, ProductFacets, ProductFulfillmentView, ProductInquiryCategory, ProductPage, ProductReviewParams, ProductReviewSort, ProductSearchParams, ProductSort, PublicInquiry, PublicReview, PurchaseDecisionResult, type Query, RemoteArea, RetryPaymentRequest, ReviewImageUploadRequest, ReviewPage, ReviewSummary, STOREFRONT_SESSION_KEYS, type SessionStorage, ShippingAddressInput, SignupRequest, SocialProvider, StartPaymentRequest, type StorefrontClient, type StorefrontClientOptions, type StorefrontSession, type StorefrontSessionOptions, StorefrontStore, TokenPair, type TokenSource, UnknownFulfillmentView, UpdateCartItemRequest, UpdateProfileRequest, UpdateReviewRequest, UpdateReviewResult, UploadTicket, WishlistAddResult, WithdrawRequest, WithdrawalBlockedDetails, WritableReview, addCartItemRequestSchema, addonGroupViewSchema, addonSelectionSchema, analyticsBatchSchema, analyticsClientEventNameSchema, analyticsClientEventSchema, analyticsIdSchema, analyticsIdsFromCookie, analyticsServerEventNameSchema, anonymousSessionSchema, applicableCouponSchema, availablePaymentOptionSchema, buildQuery, cartItemSchema, cartSchema, cashReceiptAvailable, cashReceiptIdentityTypeOf, cashReceiptRequestSchema, cashReceiptTypeSchema, categoryNodeSchema, checkoutDeliverySchema, checkoutPricingRequestSchema, checkoutPricingSchema, checkoutSessionSchema, claimReasonSchema, claimReturnAddressSchema, claimStatusSchema, claimTypeSchema, consentActionSchema, consentKindSchema, consentSourceSchema, consentStateSchema, consentUpdateRequestSchema, couponApplicationListSchema, couponApplicationSchema, couponBenefitViewSchema, couponResultSchema, createCheckoutRequestSchema, createClaimRequestSchema, createClaimResultSchema, createCustomerInquiryRequestSchema, createInquiryRequestSchema, createInquiryResultSchema, createReviewRequestSchema, createReviewResultSchema, createStorefrontClient, createStorefrontSession, customInputEntrySchema, customInputLength, customInputValueViewSchema, customInputViewSchema, customerInquiryCategorySchema, customerInquirySchema, deliveryQuoteRequestSchema, deliveryQuoteSchema, deliveryTrackingSchema, easyPayProviderResponseSchema, easyPayProviderSchema, guestInfoSchema, idpAgreementsSchema, idpAuthorizeRequestSchema, idpAuthorizeResponseSchema, idpTokenRequestSchema, lineFulfillmentSchema, lineSelectionRequestShape, lineSelectionResponseShape, linkIdentityRequestSchema, loginRequestSchema, memberAddressRequestSchema, memberAddressSchema, memberConsentsSchema, memberIdentitiesSchema, memberSchema, myClaimSchema, myCouponListQuerySchema, myCouponSchema, myOrderItemFulfillmentSnapshotSchema, myOrderItemSchema, myOrderSchema, myReviewSchema, normalizeCustomInputValue, optionSelectionViewSchema, orderItemStatusSchema, orderShippingAddressSchema, pageInfoSchema, pageSchema, paymentFailureCategorySchema, paymentMessageSchema, paymentMethodSchema, paymentOptionKey, paymentOptionListSchema, paymentOptionSchema, paymentStartSchema, paymentStatusSchema, pgProviderSchema, pricingAmountsSchema, productCardFulfillmentSchema, productCardSchema, productDetailSchema, productFacetsSchema, productFulfillmentViewSchema, productInquiryCategorySchema, productPageSchema, productReviewQuerySchema, productReviewSortSchema, productSortSchema, publicInquirySchema, publicReviewSchema, purchaseDecisionResultSchema, remoteAreaSchema, residentNumberLike, retryPaymentRequestSchema, reviewImageUploadRequestSchema, reviewPageSchema, reviewSummarySchema, shippingAddressInputSchema, signupRequestSchema, socialProviderSchema, startPaymentRequestSchema, storefrontStoreSchema, tokenPairSchema, trackingStageResponseSchema, updateCartItemRequestSchema, updateProfileRequestSchema, updateReviewRequestSchema, updateReviewResultSchema, uploadTicketSchema, wishlistAddResultSchema, withdrawRequestSchema, withdrawalBlockedDetailsSchema, writableReviewSchema };
|
|
2
|
+
import { $ as StorefrontClientOptions, $n as DeliveryQuoteResult, $r as ProductDetail, $t as createCustomerInquiryRequestSchema, A as PurchaseDecisionResult, Ai as UnknownFulfillmentView, An as consentUpdateRequestSchema, Ar as easyPayProviderResponseSchema, At as uploadTicketSchema, B as ANALYTICS_VISITOR_COOKIE, Bi as cartItemSchema, Bn as claimTypeSchema, Br as paymentStatusSchema, Bt as updateProfileRequestSchema, C as memberPointEntrySchema, Ci as orderItemStatusSchema, Cn as ConsentState, Cr as cashReceiptRequestSchema, Ct as productReviewSortSchema, D as MyOrder, Di as MyOrderItemFulfillmentSnapshot, Dn as consentKindSchema, Dr as createCheckoutRequestSchema, Dt as reviewSummarySchema, E as DeliveryTracking, Ei as LineFulfillment, En as consentActionSchema, Er as checkoutSessionSchema, Et as reviewPageSchema, F as purchaseDecisionResultSchema, Fi as AddCartItemRequest, Fn as CreateClaimRequest, Fr as paymentMethodSchema, Ft as UpdateProfileRequest, G as AnalyticsEventName, Gn as CASH_RECEIPT_METHODS, Gr as retryPaymentRequestSchema, Gt as PublicInquiry, H as AnalyticsBatch, Hi as updateCartItemRequestSchema, Hn as createClaimResultSchema, Hr as remoteAreaSchema, Ht as CreateInquiryRequest, I as trackingStageResponseSchema, Ii as Cart, In as CreateClaimResult, Ir as paymentOptionKey, It as WishlistAddResult, J as analyticsClientEventNameSchema, Jn as CashReceiptType, Jr as CategoryNode, Jt as productInquiryCategorySchema, K as AnalyticsServerEventName, Kn as CashReceiptIdentityType, Kr as shippingAddressInputSchema, Kt as createInquiryRequestSchema, L as ANALYTICS_MAX_BATCH_BYTES, Li as CartItem, Ln as MyClaim, Lr as paymentOptionListSchema, Lt as memberAddressRequestSchema, M as myOrderItemSchema, Mi as myOrderItemFulfillmentSnapshotSchema, Mn as ClaimReason, Mr as guestInfoSchema, Mt as Member, N as myOrderSchema, Ni as productCardFulfillmentSchema, Nn as ClaimReturnAddress, Nr as paymentFailureCategorySchema, Nt as MemberAddress, O as MyOrderItem, Oi as ProductCardFulfillment, On as consentSourceSchema, Or as deliveryQuoteRequestSchema, Ot as updateReviewRequestSchema, P as orderShippingAddressSchema, Pi as productFulfillmentViewSchema, Pn as ClaimType, Pr as paymentMessageSchema, Pt as MemberAddressRequest, Q as StorefrontClient, Qn as DeliveryQuoteRequest, Qr as ProductCard, Qt as CustomerInquiryCategory, R as ANALYTICS_SESSION_COOKIE, Ri as UpdateCartItemRequest, Rn as claimReasonSchema, Rr as paymentOptionSchema, Rt as memberAddressSchema, S as memberPointEntryPageSchema, Si as claimStatusSchema, Sn as ConsentSource, Sr as cashReceiptIdentityTypeOf, St as productReviewQuerySchema, T as storefrontPointPolicySchema, Ti as pageSchema, Tn as MemberConsents, Tr as checkoutDeliverySchema, Tt as reviewImageUploadRequestSchema, U as AnalyticsClientEvent, Ui as analyticsIdsFromCookie, Un as myClaimSchema, Ur as residentNumberLike, Ut as CreateInquiryResult, V as ANALYTICS_VISITOR_HEADER, Vi as cartSchema, Vn as createClaimRequestSchema, Vr as pgProviderSchema, Vt as wishlistAddResultSchema, W as AnalyticsClientEventName, Wn as AvailablePaymentOption, Wr as responsePaymentMethodSchema, Wt as ProductInquiryCategory, X as analyticsIdSchema, Xn as CheckoutSession, Xr as CollectionProductParams, Xt as CreateCustomerInquiryRequest, Y as analyticsClientEventSchema, Yn as CheckoutDelivery, Yr as CollectionProductPage, Yt as publicInquirySchema, Z as analyticsServerEventNameSchema, Zn as CreateCheckoutRequest, Zr as CollectionProductSortParam, Zt as CustomerInquiry, _ as normalizeCustomInputValue, _i as storefrontCollectionSchema, _n as myCouponListQuerySchema, _r as RetryPaymentRequest, _t as UploadTicket, a as CustomInputEntry, ai as StorefrontCollectionDetail, an as CouponApplication, ar as PAYMENT_RESULT_VALUES, at as createStorefrontSession, b as MemberPoints, bi as PageInfo, bn as ConsentAction, br as availablePaymentOptionSchema, bt as createReviewResultSchema, c as OptionSelectionView, ci as collectionProductQuerySchema, cn as MIN_PAYMENT_AMOUNT, cr as PaymentFailureCategory, ct as MyReview, d as customInputEntrySchema, di as productDetailSchema, dn as checkoutPricingRequestSchema, dr as PaymentOption, dt as PublicReview, ei as ProductFacets, en as customerInquiryCategorySchema, er as EasyPayProvider, et as createStorefrontClient, f as customInputLength, fi as productFacetsSchema, fn as checkoutPricingSchema, fr as PaymentStart, ft as ReviewImageUploadRequest, g as lineSelectionResponseShape, gi as storefrontCollectionListQuerySchema, gn as couponResultSchema, gr as ResponsePaymentMethod, gt as UpdateReviewResult, h as lineSelectionRequestShape, hi as storefrontCollectionDetailSchema, hn as couponBenefitViewSchema, hr as RemoteArea, ht as UpdateReviewRequest, i as AddonSelection, ii as StorefrontCollection, in as CheckoutPricingRequest, ir as KnownPaymentStatus, it as StorefrontSessionOptions, j as deliveryTrackingSchema, ji as lineFulfillmentSchema, jn as memberConsentsSchema, jr as easyPayProviderSchema, jt as writableReviewSchema, k as OrderShippingAddress, ki as ProductFulfillmentView, kn as consentStateSchema, kr as deliveryQuoteSchema, kt as updateReviewResultSchema, l as addonGroupViewSchema, li as collectionProductSortSchema, ln as MyCoupon, lr as PaymentMessage, lt as ProductReviewParams, m as customInputViewSchema, mi as productSortSchema, mn as couponApplicationSchema, mr as PgProvider, mt as ReviewSummary, n as storefrontStoreSchema, ni as ProductSearchParams, nn as ApplicableCoupon, nr as KnownPaymentResult, nt as SessionStorage, o as CustomInputValueView, oi as categoryNodeSchema, on as CouponResult, or as PAYMENT_START_STATUS_VALUES, ot as CreateReviewRequest, p as customInputValueViewSchema, pi as productPageSchema, pn as couponApplicationListSchema, pr as PaymentStatus, pt as ReviewPage, q as analyticsBatchSchema, qn as CashReceiptRequest, qr as startPaymentRequestSchema, qt as createInquiryResultSchema, r as AddonGroupView, ri as ProductSort, rn as CheckoutPricing, rr as KnownPaymentStartStatus, rt as StorefrontSession, s as CustomInputView, si as collectionProductPageSchema, sn as MAX_COUPONS_PER_CHECKOUT, sr as PAYMENT_STATUS_VALUES, st as CreateReviewResult, t as StorefrontStore, ti as ProductPage, tn as customerInquirySchema, tr as GuestInfo, tt as STOREFRONT_SESSION_KEYS, u as addonSelectionSchema, ui as productCardSchema, un as applicableCouponSchema, ur as PaymentMethod, ut as ProductReviewSort, v as optionSelectionViewSchema, vi as ClaimStatus, vn as myCouponSchema, vr as ShippingAddressInput, vt as WritableReview, w as memberPointsSchema, wi as pageInfoSchema, wn as ConsentUpdateRequest, wr as cashReceiptTypeSchema, wt as publicReviewSchema, x as StorefrontPointPolicy, xi as PageParams, xn as ConsentKind, xr as cashReceiptAvailable, xt as myReviewSchema, y as MemberPointEntry, yi as OrderItemStatus, yn as pricingAmountsSchema, yr as StartPaymentRequest, yt as createReviewRequestSchema, z as ANALYTICS_SESSION_HEADER, zi as addCartItemRequestSchema, zn as claimReturnAddressSchema, zr as paymentStartSchema, zt as memberSchema } from "./index-UhlK7HG7.mjs";
|
|
3
|
+
export { ANALYTICS_MAX_BATCH_BYTES, ANALYTICS_SESSION_COOKIE, ANALYTICS_SESSION_HEADER, ANALYTICS_VISITOR_COOKIE, ANALYTICS_VISITOR_HEADER, AddCartItemRequest, AddonGroupView, AddonSelection, AnalyticsBatch, AnalyticsClientEvent, AnalyticsClientEventName, AnalyticsEventName, AnalyticsServerEventName, AnonymousSession, ApiError, ApplicableCoupon, AvailablePaymentOption, CASH_RECEIPT_METHODS, Cart, CartItem, CashReceiptIdentityType, CashReceiptRequest, CashReceiptType, CategoryNode, CheckoutDelivery, CheckoutPricing, CheckoutPricingRequest, CheckoutSession, ClaimReason, ClaimReturnAddress, ClaimStatus, ClaimType, CollectionProductPage, CollectionProductParams, CollectionProductSortParam, ConsentAction, ConsentKind, ConsentSource, ConsentState, ConsentUpdateRequest, CouponApplication, CouponResult, CreateCheckoutRequest, CreateClaimRequest, CreateClaimResult, CreateCustomerInquiryRequest, CreateInquiryRequest, CreateInquiryResult, CreateReviewRequest, CreateReviewResult, CustomInputEntry, CustomInputValueView, CustomInputView, CustomerInquiry, CustomerInquiryCategory, DeliveryQuoteRequest, DeliveryQuoteResult, DeliveryTracking, EasyPayProvider, GuestInfo, IdpAgreements, IdpAuthorizeRequest, IdpTokenRequest, KnownPaymentResult, KnownPaymentStartStatus, KnownPaymentStatus, LineFulfillment, LinkIdentityRequest, LoginRequest, MAX_COUPONS_PER_CHECKOUT, MIN_PAYMENT_AMOUNT, Member, MemberAddress, MemberAddressRequest, MemberConsents, MemberIdentities, MemberPointEntry, MemberPoints, MyClaim, MyCoupon, MyOrder, MyOrderItem, MyOrderItemFulfillmentSnapshot, MyReview, OptionSelectionView, OrderItemStatus, OrderShippingAddress, PAYMENT_RESULT_VALUES, PAYMENT_START_STATUS_VALUES, PAYMENT_STATUS_VALUES, PageInfo, PageParams, PaymentFailureCategory, PaymentMessage, PaymentMethod, PaymentOption, PaymentStart, PaymentStatus, PgProvider, ProductCard, ProductCardFulfillment, ProductDetail, ProductFacets, ProductFulfillmentView, ProductInquiryCategory, ProductPage, ProductReviewParams, ProductReviewSort, ProductSearchParams, ProductSort, PublicInquiry, PublicReview, PurchaseDecisionResult, type Query, RemoteArea, ResponsePaymentMethod, RetryPaymentRequest, ReviewImageUploadRequest, ReviewPage, ReviewSummary, STOREFRONT_SESSION_KEYS, type SessionStorage, ShippingAddressInput, SignupRequest, SocialProvider, StartPaymentRequest, type StorefrontClient, type StorefrontClientOptions, StorefrontCollection, StorefrontCollectionDetail, StorefrontPointPolicy, type StorefrontSession, type StorefrontSessionOptions, StorefrontStore, TokenPair, type TokenSource, UnknownFulfillmentView, UpdateCartItemRequest, UpdateProfileRequest, UpdateReviewRequest, UpdateReviewResult, UploadTicket, WishlistAddResult, WithdrawRequest, WithdrawalBlockedDetails, WritableReview, addCartItemRequestSchema, addonGroupViewSchema, addonSelectionSchema, analyticsBatchSchema, analyticsClientEventNameSchema, analyticsClientEventSchema, analyticsIdSchema, analyticsIdsFromCookie, analyticsServerEventNameSchema, anonymousSessionSchema, applicableCouponSchema, availablePaymentOptionSchema, buildQuery, cartItemSchema, cartSchema, cashReceiptAvailable, cashReceiptIdentityTypeOf, cashReceiptRequestSchema, cashReceiptTypeSchema, categoryNodeSchema, checkoutDeliverySchema, checkoutPricingRequestSchema, checkoutPricingSchema, checkoutSessionSchema, claimReasonSchema, claimReturnAddressSchema, claimStatusSchema, claimTypeSchema, collectionProductPageSchema, collectionProductQuerySchema, collectionProductSortSchema, consentActionSchema, consentKindSchema, consentSourceSchema, consentStateSchema, consentUpdateRequestSchema, couponApplicationListSchema, couponApplicationSchema, couponBenefitViewSchema, couponResultSchema, createCheckoutRequestSchema, createClaimRequestSchema, createClaimResultSchema, createCustomerInquiryRequestSchema, createInquiryRequestSchema, createInquiryResultSchema, createReviewRequestSchema, createReviewResultSchema, createStorefrontClient, createStorefrontSession, customInputEntrySchema, customInputLength, customInputValueViewSchema, customInputViewSchema, customerInquiryCategorySchema, customerInquirySchema, deliveryQuoteRequestSchema, deliveryQuoteSchema, deliveryTrackingSchema, easyPayProviderResponseSchema, easyPayProviderSchema, guestInfoSchema, idpAgreementsSchema, idpAuthorizeRequestSchema, idpAuthorizeResponseSchema, idpTokenRequestSchema, lineFulfillmentSchema, lineSelectionRequestShape, lineSelectionResponseShape, linkIdentityRequestSchema, loginRequestSchema, memberAddressRequestSchema, memberAddressSchema, memberConsentsSchema, memberIdentitiesSchema, memberPointEntryPageSchema, memberPointEntrySchema, memberPointsSchema, memberSchema, myClaimSchema, myCouponListQuerySchema, myCouponSchema, myOrderItemFulfillmentSnapshotSchema, myOrderItemSchema, myOrderSchema, myReviewSchema, normalizeCustomInputValue, optionSelectionViewSchema, orderItemStatusSchema, orderShippingAddressSchema, pageInfoSchema, pageSchema, paymentFailureCategorySchema, paymentMessageSchema, paymentMethodSchema, paymentOptionKey, paymentOptionListSchema, paymentOptionSchema, paymentStartSchema, paymentStatusSchema, pgProviderSchema, pricingAmountsSchema, productCardFulfillmentSchema, productCardSchema, productDetailSchema, productFacetsSchema, productFulfillmentViewSchema, productInquiryCategorySchema, productPageSchema, productReviewQuerySchema, productReviewSortSchema, productSortSchema, publicInquirySchema, publicReviewSchema, purchaseDecisionResultSchema, remoteAreaSchema, residentNumberLike, responsePaymentMethodSchema, retryPaymentRequestSchema, reviewImageUploadRequestSchema, reviewPageSchema, reviewSummarySchema, shippingAddressInputSchema, signupRequestSchema, socialProviderSchema, startPaymentRequestSchema, storefrontCollectionDetailSchema, storefrontCollectionListQuerySchema, storefrontCollectionSchema, storefrontPointPolicySchema, storefrontStoreSchema, tokenPairSchema, trackingStageResponseSchema, updateCartItemRequestSchema, updateProfileRequestSchema, updateReviewRequestSchema, updateReviewResultSchema, uploadTicketSchema, wishlistAddResultSchema, withdrawRequestSchema, withdrawalBlockedDetailsSchema, writableReviewSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as ANALYTICS_VISITOR_HEADER, c as analyticsClientEventSchema, i as ANALYTICS_VISITOR_COOKIE, l as analyticsIdSchema, n as ANALYTICS_SESSION_COOKIE, o as analyticsBatchSchema, r as ANALYTICS_SESSION_HEADER, s as analyticsClientEventNameSchema, t as ANALYTICS_MAX_BATCH_BYTES, u as analyticsServerEventNameSchema } from "./analytics-CgD70OqH.mjs";
|
|
2
2
|
import { t as analyticsIdsFromCookie } from "./analytics-ids-COElZiI3.mjs";
|
|
3
|
-
import { $ as
|
|
4
|
-
import { $ as
|
|
3
|
+
import { $ as collectionProductSortSchema, A as wishlistAddResultSchema, At as buildQuery, B as consentSourceSchema, C as orderShippingAddressSchema, Ct as memberIdentitiesSchema, D as memberAddressSchema, Dt as withdrawRequestSchema, E as memberAddressRequestSchema, Et as tokenPairSchema, F as createCustomerInquiryRequestSchema, G as claimReturnAddressSchema, H as consentUpdateRequestSchema, I as customerInquiryCategorySchema, J as createClaimResultSchema, K as claimTypeSchema, L as customerInquirySchema, M as createInquiryResultSchema, Mt as unwrapData, N as productInquiryCategorySchema, O as memberSchema, Ot as withdrawalBlockedDetailsSchema, P as publicInquirySchema, Q as collectionProductQuerySchema, R as consentActionSchema, S as myOrderSchema, St as loginRequestSchema, T as trackingStageResponseSchema, Tt as socialProviderSchema, U as memberConsentsSchema, V as consentStateSchema, W as claimReasonSchema, X as categoryNodeSchema, Y as myClaimSchema, Z as collectionProductPageSchema, _ as memberPointEntrySchema, _t as idpAgreementsSchema, a as myReviewSchema, at as storefrontCollectionDetailSchema, b as deliveryTrackingSchema, bt as idpTokenRequestSchema, c as publicReviewSchema, ct as claimStatusSchema, d as reviewSummarySchema, dt as pageSchema, et as productCardSchema, f as updateReviewRequestSchema, ft as addCartItemRequestSchema, g as memberPointEntryPageSchema, gt as anonymousSessionSchema, h as writableReviewSchema, ht as updateCartItemRequestSchema, i as createReviewResultSchema, it as productSortSchema, j as createInquiryRequestSchema, jt as toApiError, k as updateProfileRequestSchema, kt as ApiError, l as reviewImageUploadRequestSchema, lt as orderItemStatusSchema, m as uploadTicketSchema, mt as cartSchema, n as storefrontStoreSchema, nt as productFacetsSchema, o as productReviewQuerySchema, ot as storefrontCollectionListQuerySchema, p as updateReviewResultSchema, pt as cartItemSchema, q as createClaimRequestSchema, r as createReviewRequestSchema, rt as productPageSchema, s as productReviewSortSchema, st as storefrontCollectionSchema, t as createStorefrontClient, tt as productDetailSchema, u as reviewPageSchema, ut as pageInfoSchema, v as memberPointsSchema, vt as idpAuthorizeRequestSchema, w as purchaseDecisionResultSchema, wt as signupRequestSchema, x as myOrderItemSchema, xt as linkIdentityRequestSchema, y as storefrontPointPolicySchema, yt as idpAuthorizeResponseSchema, z as consentKindSchema } from "./client-NPFWqMgT.mjs";
|
|
4
|
+
import { $ as normalizeCustomInputValue, A as retryPaymentRequestSchema, B as couponBenefitViewSchema, C as paymentOptionSchema, D as remoteAreaSchema, E as pgProviderSchema, F as applicableCouponSchema, G as addonGroupViewSchema, H as myCouponListQuerySchema, I as checkoutPricingRequestSchema, J as customInputLength, K as addonSelectionSchema, L as checkoutPricingSchema, M as startPaymentRequestSchema, N as MAX_COUPONS_PER_CHECKOUT, O as residentNumberLike, P as MIN_PAYMENT_AMOUNT, Q as lineSelectionResponseShape, R as couponApplicationListSchema, S as paymentOptionListSchema, T as paymentStatusSchema, U as myCouponSchema, V as couponResultSchema, W as pricingAmountsSchema, X as customInputViewSchema, Y as customInputValueViewSchema, Z as lineSelectionRequestShape, _ as guestInfoSchema, a as availablePaymentOptionSchema, b as paymentMethodSchema, c as cashReceiptRequestSchema, d as checkoutSessionSchema, et as optionSelectionViewSchema, f as createCheckoutRequestSchema, g as easyPayProviderSchema, h as easyPayProviderResponseSchema, i as PAYMENT_STATUS_VALUES, it as productFulfillmentViewSchema, j as shippingAddressInputSchema, k as responsePaymentMethodSchema, l as cashReceiptTypeSchema, m as deliveryQuoteSchema, n as PAYMENT_RESULT_VALUES, nt as myOrderItemFulfillmentSnapshotSchema, o as cashReceiptAvailable, p as deliveryQuoteRequestSchema, q as customInputEntrySchema, r as PAYMENT_START_STATUS_VALUES, rt as productCardFulfillmentSchema, s as cashReceiptIdentityTypeOf, t as CASH_RECEIPT_METHODS, tt as lineFulfillmentSchema, u as checkoutDeliverySchema, v as paymentFailureCategorySchema, w as paymentStartSchema, x as paymentOptionKey, y as paymentMessageSchema, z as couponApplicationSchema } from "./checkout-f7iFQV88.mjs";
|
|
5
5
|
//#region src/session.ts
|
|
6
6
|
/** 세션 키 상수 — SDK가 소유한다. store-sdk와 겹치지 않는 별도 네임스페이스. */
|
|
7
7
|
const STOREFRONT_SESSION_KEYS = {
|
|
@@ -125,4 +125,4 @@ function createStorefrontSession(options) {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
//#endregion
|
|
128
|
-
export { ANALYTICS_MAX_BATCH_BYTES, ANALYTICS_SESSION_COOKIE, ANALYTICS_SESSION_HEADER, ANALYTICS_VISITOR_COOKIE, ANALYTICS_VISITOR_HEADER, ApiError, CASH_RECEIPT_METHODS, MAX_COUPONS_PER_CHECKOUT, MIN_PAYMENT_AMOUNT, PAYMENT_RESULT_VALUES, PAYMENT_STATUS_VALUES, STOREFRONT_SESSION_KEYS, addCartItemRequestSchema, addonGroupViewSchema, addonSelectionSchema, analyticsBatchSchema, analyticsClientEventNameSchema, analyticsClientEventSchema, analyticsIdSchema, analyticsIdsFromCookie, analyticsServerEventNameSchema, anonymousSessionSchema, applicableCouponSchema, availablePaymentOptionSchema, buildQuery, cartItemSchema, cartSchema, cashReceiptAvailable, cashReceiptIdentityTypeOf, cashReceiptRequestSchema, cashReceiptTypeSchema, categoryNodeSchema, checkoutDeliverySchema, checkoutPricingRequestSchema, checkoutPricingSchema, checkoutSessionSchema, claimReasonSchema, claimReturnAddressSchema, claimStatusSchema, claimTypeSchema, consentActionSchema, consentKindSchema, consentSourceSchema, consentStateSchema, consentUpdateRequestSchema, couponApplicationListSchema, couponApplicationSchema, couponBenefitViewSchema, couponResultSchema, createCheckoutRequestSchema, createClaimRequestSchema, createClaimResultSchema, createCustomerInquiryRequestSchema, createInquiryRequestSchema, createInquiryResultSchema, createReviewRequestSchema, createReviewResultSchema, createStorefrontClient, createStorefrontSession, customInputEntrySchema, customInputLength, customInputValueViewSchema, customInputViewSchema, customerInquiryCategorySchema, customerInquirySchema, deliveryQuoteRequestSchema, deliveryQuoteSchema, deliveryTrackingSchema, easyPayProviderResponseSchema, easyPayProviderSchema, guestInfoSchema, idpAgreementsSchema, idpAuthorizeRequestSchema, idpAuthorizeResponseSchema, idpTokenRequestSchema, lineFulfillmentSchema, lineSelectionRequestShape, lineSelectionResponseShape, linkIdentityRequestSchema, loginRequestSchema, memberAddressRequestSchema, memberAddressSchema, memberConsentsSchema, memberIdentitiesSchema, memberSchema, myClaimSchema, myCouponListQuerySchema, myCouponSchema, myOrderItemFulfillmentSnapshotSchema, myOrderItemSchema, myOrderSchema, myReviewSchema, normalizeCustomInputValue, optionSelectionViewSchema, orderItemStatusSchema, orderShippingAddressSchema, pageInfoSchema, pageSchema, paymentFailureCategorySchema, paymentMessageSchema, paymentMethodSchema, paymentOptionKey, paymentOptionListSchema, paymentOptionSchema, paymentStartSchema, paymentStatusSchema, pgProviderSchema, pricingAmountsSchema, productCardFulfillmentSchema, productCardSchema, productDetailSchema, productFacetsSchema, productFulfillmentViewSchema, productInquiryCategorySchema, productPageSchema, productReviewQuerySchema, productReviewSortSchema, productSortSchema, publicInquirySchema, publicReviewSchema, purchaseDecisionResultSchema, remoteAreaSchema, residentNumberLike, retryPaymentRequestSchema, reviewImageUploadRequestSchema, reviewPageSchema, reviewSummarySchema, shippingAddressInputSchema, signupRequestSchema, socialProviderSchema, startPaymentRequestSchema, storefrontStoreSchema, tokenPairSchema, trackingStageResponseSchema, updateCartItemRequestSchema, updateProfileRequestSchema, updateReviewRequestSchema, updateReviewResultSchema, uploadTicketSchema, wishlistAddResultSchema, withdrawRequestSchema, withdrawalBlockedDetailsSchema, writableReviewSchema };
|
|
128
|
+
export { ANALYTICS_MAX_BATCH_BYTES, ANALYTICS_SESSION_COOKIE, ANALYTICS_SESSION_HEADER, ANALYTICS_VISITOR_COOKIE, ANALYTICS_VISITOR_HEADER, ApiError, CASH_RECEIPT_METHODS, MAX_COUPONS_PER_CHECKOUT, MIN_PAYMENT_AMOUNT, PAYMENT_RESULT_VALUES, PAYMENT_START_STATUS_VALUES, PAYMENT_STATUS_VALUES, STOREFRONT_SESSION_KEYS, addCartItemRequestSchema, addonGroupViewSchema, addonSelectionSchema, analyticsBatchSchema, analyticsClientEventNameSchema, analyticsClientEventSchema, analyticsIdSchema, analyticsIdsFromCookie, analyticsServerEventNameSchema, anonymousSessionSchema, applicableCouponSchema, availablePaymentOptionSchema, buildQuery, cartItemSchema, cartSchema, cashReceiptAvailable, cashReceiptIdentityTypeOf, cashReceiptRequestSchema, cashReceiptTypeSchema, categoryNodeSchema, checkoutDeliverySchema, checkoutPricingRequestSchema, checkoutPricingSchema, checkoutSessionSchema, claimReasonSchema, claimReturnAddressSchema, claimStatusSchema, claimTypeSchema, collectionProductPageSchema, collectionProductQuerySchema, collectionProductSortSchema, consentActionSchema, consentKindSchema, consentSourceSchema, consentStateSchema, consentUpdateRequestSchema, couponApplicationListSchema, couponApplicationSchema, couponBenefitViewSchema, couponResultSchema, createCheckoutRequestSchema, createClaimRequestSchema, createClaimResultSchema, createCustomerInquiryRequestSchema, createInquiryRequestSchema, createInquiryResultSchema, createReviewRequestSchema, createReviewResultSchema, createStorefrontClient, createStorefrontSession, customInputEntrySchema, customInputLength, customInputValueViewSchema, customInputViewSchema, customerInquiryCategorySchema, customerInquirySchema, deliveryQuoteRequestSchema, deliveryQuoteSchema, deliveryTrackingSchema, easyPayProviderResponseSchema, easyPayProviderSchema, guestInfoSchema, idpAgreementsSchema, idpAuthorizeRequestSchema, idpAuthorizeResponseSchema, idpTokenRequestSchema, lineFulfillmentSchema, lineSelectionRequestShape, lineSelectionResponseShape, linkIdentityRequestSchema, loginRequestSchema, memberAddressRequestSchema, memberAddressSchema, memberConsentsSchema, memberIdentitiesSchema, memberPointEntryPageSchema, memberPointEntrySchema, memberPointsSchema, memberSchema, myClaimSchema, myCouponListQuerySchema, myCouponSchema, myOrderItemFulfillmentSnapshotSchema, myOrderItemSchema, myOrderSchema, myReviewSchema, normalizeCustomInputValue, optionSelectionViewSchema, orderItemStatusSchema, orderShippingAddressSchema, pageInfoSchema, pageSchema, paymentFailureCategorySchema, paymentMessageSchema, paymentMethodSchema, paymentOptionKey, paymentOptionListSchema, paymentOptionSchema, paymentStartSchema, paymentStatusSchema, pgProviderSchema, pricingAmountsSchema, productCardFulfillmentSchema, productCardSchema, productDetailSchema, productFacetsSchema, productFulfillmentViewSchema, productInquiryCategorySchema, productPageSchema, productReviewQuerySchema, productReviewSortSchema, productSortSchema, publicInquirySchema, publicReviewSchema, purchaseDecisionResultSchema, remoteAreaSchema, residentNumberLike, responsePaymentMethodSchema, retryPaymentRequestSchema, reviewImageUploadRequestSchema, reviewPageSchema, reviewSummarySchema, shippingAddressInputSchema, signupRequestSchema, socialProviderSchema, startPaymentRequestSchema, storefrontCollectionDetailSchema, storefrontCollectionListQuerySchema, storefrontCollectionSchema, storefrontPointPolicySchema, storefrontStoreSchema, tokenPairSchema, trackingStageResponseSchema, updateCartItemRequestSchema, updateProfileRequestSchema, updateReviewRequestSchema, updateReviewResultSchema, uploadTicketSchema, wishlistAddResultSchema, withdrawRequestSchema, withdrawalBlockedDetailsSchema, writableReviewSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dr as PaymentOption, et as createStorefrontClient, fr as PaymentStart, pr as PaymentStatus, qn as CashReceiptRequest, tr as GuestInfo, vr as ShippingAddressInput, yr as StartPaymentRequest } from "../index-UhlK7HG7.mjs";
|
|
2
2
|
//#region src/payments/index.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* 스토어프론트 결제 — 브라우저 전용(`@sayren/storefront-sdk/payments`).
|
|
@@ -9,6 +9,9 @@ import { Bn as CashReceiptRequest, Jn as GuestInfo, cr as ShippingAddressInput,
|
|
|
9
9
|
* if (result.status === "COMPLETED") location.assign(`/orders/${result.orderId}`);
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
+
* 결제 금액 전체를 적립금으로 낸 주문은 결제창이 없다. 결제 시작 응답이 `status: "completed"`·`payUrl: null`이면
|
|
13
|
+
* SDK는 창을 열지 않고(미리 연 팝업은 닫는다) 바로 `COMPLETED`를 돌려준다. 화면 분기는 그대로다.
|
|
14
|
+
*
|
|
12
15
|
* 결제창은 결제 서비스(`payUrl`)가 그린다. SDK는 그 창을 팝업으로 열고 결과 메시지를 받아 결제 상태 조회로 확정한다.
|
|
13
16
|
* 모바일(또는 `mode: "redirect"`)에서는 현재 탭을 `payUrl`로 보내고, 결제가 끝나면 구매자가 `returnUrl`로 돌아온다 —
|
|
14
17
|
* 복귀 화면에서 {@link Payments.result}를 부른다.
|
|
@@ -160,6 +163,8 @@ export interface Payments {
|
|
|
160
163
|
/**
|
|
161
164
|
* 이미 받은 결제 시작 값으로 결제창만 연다 — 결제 시작을 서버 함수로 하는 SSR 앱용.
|
|
162
165
|
* 클릭 핸들러에서 {@link Payments.prepareWindow}로 창을 먼저 열고 그 핸들을 `window`로 넘긴다.
|
|
166
|
+
* 결제 시작 값이 `status: "completed"`(결제창 없이 끝난 결제, `payUrl: null`)면 창을 열지 않고 미리 연 창을 닫은 뒤
|
|
167
|
+
* 바로 `COMPLETED`를 돌려준다. `start`·`retry`도 같다.
|
|
163
168
|
*/
|
|
164
169
|
open(start: PaymentStart, options?: {
|
|
165
170
|
mode?: PaymentMode;
|
package/dist/payments/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { y as paymentMessageSchema } from "../checkout-f7iFQV88.mjs";
|
|
2
2
|
//#region src/payments/index.ts
|
|
3
3
|
/** 복귀 주소에 결제 서비스가 붙이는 쿼리 */
|
|
4
4
|
const RETURN_PAYMENT_ID = "sayrenPaymentId";
|
|
@@ -252,13 +252,34 @@ function createPayments(options) {
|
|
|
252
252
|
cancelWatch = cancelThis;
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
|
+
/** 결제창을 열지 않는 결제 시작 응답의 결과 */
|
|
256
|
+
async function settleWithoutWindow(start) {
|
|
257
|
+
if (start.status === "completed" && start.orderId) return {
|
|
258
|
+
status: "COMPLETED",
|
|
259
|
+
paymentId: start.paymentId,
|
|
260
|
+
orderId: start.orderId
|
|
261
|
+
};
|
|
262
|
+
try {
|
|
263
|
+
return paymentResultOf(await client.payments.getStatus(start.paymentId));
|
|
264
|
+
} catch {
|
|
265
|
+
return {
|
|
266
|
+
status: "PROCESSING",
|
|
267
|
+
paymentId: start.paymentId
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
}
|
|
255
271
|
function open(start, openOptions = {}) {
|
|
256
272
|
stopWatch();
|
|
257
273
|
const popup = resolvePrepared(openOptions.window, openOptions.mode).popup;
|
|
258
|
-
const
|
|
274
|
+
const payUrl = start.payUrl;
|
|
275
|
+
if (start.status !== "pending" || !payUrl) {
|
|
276
|
+
popup?.close();
|
|
277
|
+
return settleWithoutWindow(start);
|
|
278
|
+
}
|
|
279
|
+
const url = popup ? popupUrl(payUrl) : null;
|
|
259
280
|
if (!popup || !url) {
|
|
260
281
|
popup?.close();
|
|
261
|
-
env.navigate(
|
|
282
|
+
env.navigate(payUrl);
|
|
262
283
|
return new Promise(() => {});
|
|
263
284
|
}
|
|
264
285
|
popup.navigate(url);
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -27,11 +27,15 @@ import {
|
|
|
27
27
|
updateCartItemRequestSchema,
|
|
28
28
|
} from "./schemas/cart";
|
|
29
29
|
import {
|
|
30
|
+
type CollectionProductParams,
|
|
30
31
|
categoryNodeSchema,
|
|
32
|
+
collectionProductPageSchema,
|
|
31
33
|
type ProductSearchParams,
|
|
32
34
|
productCardSchema,
|
|
33
35
|
productDetailSchema,
|
|
34
36
|
productPageSchema,
|
|
37
|
+
storefrontCollectionDetailSchema,
|
|
38
|
+
storefrontCollectionSchema,
|
|
35
39
|
} from "./schemas/catalog";
|
|
36
40
|
import {
|
|
37
41
|
type CreateCheckoutRequest,
|
|
@@ -87,6 +91,11 @@ import {
|
|
|
87
91
|
updateProfileRequestSchema,
|
|
88
92
|
} from "./schemas/member";
|
|
89
93
|
import { deliveryTrackingSchema, myOrderSchema } from "./schemas/order";
|
|
94
|
+
import {
|
|
95
|
+
memberPointEntryPageSchema,
|
|
96
|
+
memberPointsSchema,
|
|
97
|
+
storefrontPointPolicySchema,
|
|
98
|
+
} from "./schemas/points";
|
|
90
99
|
import {
|
|
91
100
|
type CreateReviewRequest,
|
|
92
101
|
createReviewRequestSchema,
|
|
@@ -244,6 +253,8 @@ export function createStorefrontClient(options: StorefrontClientOptions) {
|
|
|
244
253
|
|
|
245
254
|
catalog: {
|
|
246
255
|
listCategories: () => http.request("GET", "/categories", z.array(categoryNodeSchema)),
|
|
256
|
+
/** `GET /point-policy` — 상점 적립 정책(리뷰·구매 적립, 유효 기간, 리뷰 작성·수정 기한, #93). 리뷰 혜택 안내에 쓴다 */
|
|
257
|
+
getPointPolicy: () => http.request("GET", "/point-policy", storefrontPointPolicySchema),
|
|
247
258
|
searchProducts: (params?: ProductSearchParams) =>
|
|
248
259
|
http.request("GET", "/products", productPageSchema, { query: params as Query }),
|
|
249
260
|
getProduct: (productId: string) =>
|
|
@@ -264,6 +275,19 @@ export function createStorefrontClient(options: StorefrontClientOptions) {
|
|
|
264
275
|
),
|
|
265
276
|
createInquiry: (productId: string, body: CreateInquiryRequest) =>
|
|
266
277
|
http.requestVoid("POST", path`/products/${productId}/inquiries`, { body }),
|
|
278
|
+
/** 노출 중인 컬렉션(노출 켜짐 + 기간 안) — 셀러가 정한 순서 */
|
|
279
|
+
listCollections: (params?: PageParams) =>
|
|
280
|
+
http.request("GET", "/collections", pageSchema(storefrontCollectionSchema), {
|
|
281
|
+
query: params as Query,
|
|
282
|
+
}),
|
|
283
|
+
/** 숨김·기간 밖·없음은 모두 404 `COLLECTION_NOT_FOUND` */
|
|
284
|
+
getCollection: (slug: string) =>
|
|
285
|
+
http.request("GET", path`/collections/${slug}`, storefrontCollectionDetailSchema),
|
|
286
|
+
/** 컬렉션 상품(판매 중만). `sort`를 생략하면 컬렉션의 기본 정렬이다 */
|
|
287
|
+
listCollectionProducts: (slug: string, params?: CollectionProductParams) =>
|
|
288
|
+
http.request("GET", path`/collections/${slug}/products`, collectionProductPageSchema, {
|
|
289
|
+
query: params as Query,
|
|
290
|
+
}),
|
|
267
291
|
},
|
|
268
292
|
|
|
269
293
|
cart: {
|
|
@@ -382,6 +406,13 @@ export function createStorefrontClient(options: StorefrontClientOptions) {
|
|
|
382
406
|
|
|
383
407
|
member: {
|
|
384
408
|
me: () => http.request("GET", "/me", memberSchema),
|
|
409
|
+
/** `GET /me/points` — 내 적립금 잔액과 30일 안 소멸 예정액(#93) */
|
|
410
|
+
getPoints: () => http.request("GET", "/me/points", memberPointsSchema),
|
|
411
|
+
/** `GET /me/points/history` — 내 적립금 내역(최신순) */
|
|
412
|
+
listPointHistory: (params?: PageParams) =>
|
|
413
|
+
http.request("GET", "/me/points/history", memberPointEntryPageSchema, {
|
|
414
|
+
query: params as Query,
|
|
415
|
+
}),
|
|
385
416
|
updateMe: (body: UpdateProfileRequest) =>
|
|
386
417
|
http.requestVoid("PATCH", "/me", { body: updateProfileRequestSchema.parse(body) }),
|
|
387
418
|
/** 약관·개인정보·마케팅 동의의 현재 상태와 재동의 필요 여부 */
|
package/src/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from "./schemas/fulfillment";
|
|
|
17
17
|
export * from "./schemas/inquiry";
|
|
18
18
|
export * from "./schemas/member";
|
|
19
19
|
export * from "./schemas/order";
|
|
20
|
+
export * from "./schemas/points";
|
|
20
21
|
export * from "./schemas/product-options";
|
|
21
22
|
export * from "./schemas/review";
|
|
22
23
|
export * from "./schemas/store";
|
package/src/payments/index.ts
CHANGED
|
@@ -19,6 +19,9 @@ import {
|
|
|
19
19
|
* if (result.status === "COMPLETED") location.assign(`/orders/${result.orderId}`);
|
|
20
20
|
* ```
|
|
21
21
|
*
|
|
22
|
+
* 결제 금액 전체를 적립금으로 낸 주문은 결제창이 없다. 결제 시작 응답이 `status: "completed"`·`payUrl: null`이면
|
|
23
|
+
* SDK는 창을 열지 않고(미리 연 팝업은 닫는다) 바로 `COMPLETED`를 돌려준다. 화면 분기는 그대로다.
|
|
24
|
+
*
|
|
22
25
|
* 결제창은 결제 서비스(`payUrl`)가 그린다. SDK는 그 창을 팝업으로 열고 결과 메시지를 받아 결제 상태 조회로 확정한다.
|
|
23
26
|
* 모바일(또는 `mode: "redirect"`)에서는 현재 탭을 `payUrl`로 보내고, 결제가 끝나면 구매자가 `returnUrl`로 돌아온다 —
|
|
24
27
|
* 복귀 화면에서 {@link Payments.result}를 부른다.
|
|
@@ -294,6 +297,8 @@ export interface Payments {
|
|
|
294
297
|
/**
|
|
295
298
|
* 이미 받은 결제 시작 값으로 결제창만 연다 — 결제 시작을 서버 함수로 하는 SSR 앱용.
|
|
296
299
|
* 클릭 핸들러에서 {@link Payments.prepareWindow}로 창을 먼저 열고 그 핸들을 `window`로 넘긴다.
|
|
300
|
+
* 결제 시작 값이 `status: "completed"`(결제창 없이 끝난 결제, `payUrl: null`)면 창을 열지 않고 미리 연 창을 닫은 뒤
|
|
301
|
+
* 바로 `COMPLETED`를 돌려준다. `start`·`retry`도 같다.
|
|
297
302
|
*/
|
|
298
303
|
open(
|
|
299
304
|
start: PaymentStart,
|
|
@@ -484,6 +489,18 @@ export function createPayments(options: PaymentsOptions): Payments {
|
|
|
484
489
|
});
|
|
485
490
|
}
|
|
486
491
|
|
|
492
|
+
/** 결제창을 열지 않는 결제 시작 응답의 결과 */
|
|
493
|
+
async function settleWithoutWindow(start: PaymentStart): Promise<PaymentResult> {
|
|
494
|
+
if (start.status === "completed" && start.orderId) {
|
|
495
|
+
return { status: "COMPLETED", paymentId: start.paymentId, orderId: start.orderId };
|
|
496
|
+
}
|
|
497
|
+
try {
|
|
498
|
+
return paymentResultOf(await client.payments.getStatus(start.paymentId));
|
|
499
|
+
} catch {
|
|
500
|
+
return { status: "PROCESSING", paymentId: start.paymentId };
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
487
504
|
function open(
|
|
488
505
|
start: PaymentStart,
|
|
489
506
|
openOptions: { mode?: PaymentMode; window?: PreparedPaymentWindow } = {},
|
|
@@ -492,10 +509,17 @@ export function createPayments(options: PaymentsOptions): Payments {
|
|
|
492
509
|
stopWatch();
|
|
493
510
|
const prepared = resolvePrepared(openOptions.window, openOptions.mode);
|
|
494
511
|
const popup = prepared.popup;
|
|
495
|
-
const
|
|
512
|
+
const payUrl = start.payUrl;
|
|
513
|
+
if (start.status !== "pending" || !payUrl) {
|
|
514
|
+
// 결제창 없이 끝난 결제(적립금 전액 결제, #93)이거나 이 SDK가 모르는 상태다 — 창을 열지 않는다.
|
|
515
|
+
// 주문 번호가 오면 그대로 완료이고, 아니면 결제 상태 조회로 확정한다(원천은 언제나 `GET /payments/{id}`)
|
|
516
|
+
popup?.close();
|
|
517
|
+
return settleWithoutWindow(start);
|
|
518
|
+
}
|
|
519
|
+
const url = popup ? popupUrl(payUrl) : null;
|
|
496
520
|
if (!popup || !url) {
|
|
497
521
|
popup?.close();
|
|
498
|
-
env.navigate(
|
|
522
|
+
env.navigate(payUrl);
|
|
499
523
|
// 페이지가 떠난다 — 결과는 복귀 화면의 result()가 읽는다
|
|
500
524
|
return new Promise<PaymentResult>(() => {});
|
|
501
525
|
}
|
package/src/schemas/catalog.ts
CHANGED
|
@@ -145,3 +145,63 @@ export const productPageSchema = pageSchema(productCardSchema).extend({
|
|
|
145
145
|
});
|
|
146
146
|
|
|
147
147
|
export type ProductPage = z.infer<typeof productPageSchema>;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* 컬렉션 (이슈 #83) — 셀러가 묶은 상품 목록(기획전·이벤트·신상품 등). 노출 중인 것(노출 켜짐 + 기간 안)만 보인다.
|
|
151
|
+
* 주소 값은 `slug`이고 상품 목록은 `GET /collections/{slug}/products`다.
|
|
152
|
+
*/
|
|
153
|
+
export const storefrontCollectionSchema = z.object({
|
|
154
|
+
collectionId: z.string(),
|
|
155
|
+
slug: z.string(),
|
|
156
|
+
title: z.string(),
|
|
157
|
+
description: z.string(),
|
|
158
|
+
imageUrl: z.string().nullable().describe("대표 이미지 주소. 없으면 null"),
|
|
159
|
+
startsAt: z.string().nullable().describe("노출 시작 시각. 없으면 null"),
|
|
160
|
+
endsAt: z.string().nullable().describe("노출 종료 시각. 없으면 null(끝나지 않는다)"),
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
export type StorefrontCollection = z.infer<typeof storefrontCollectionSchema>;
|
|
164
|
+
|
|
165
|
+
/** 컬렉션 상품 정렬 — 상품 검색 정렬 + `manual`(셀러가 정한 순서) */
|
|
166
|
+
export const collectionProductSortSchema = z.enum(["manual", ...productSortSchema.options]);
|
|
167
|
+
|
|
168
|
+
export type CollectionProductSortParam = z.infer<typeof collectionProductSortSchema>;
|
|
169
|
+
|
|
170
|
+
/** `GET /collections/{slug}` — 목록 항목 + 기본 정렬·검색 메타 */
|
|
171
|
+
export const storefrontCollectionDetailSchema = storefrontCollectionSchema.extend({
|
|
172
|
+
productSort: z
|
|
173
|
+
.string()
|
|
174
|
+
.describe(
|
|
175
|
+
"상품 목록 기본 정렬(`sort`를 생략하면 이 정렬이다). 현재 값은 `CollectionProductSortParam`이고 값이 늘 수 있어 문자열이다",
|
|
176
|
+
),
|
|
177
|
+
metaTitle: z.string().nullable(),
|
|
178
|
+
metaDescription: z.string().nullable(),
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
export type StorefrontCollectionDetail = z.infer<typeof storefrontCollectionDetailSchema>;
|
|
182
|
+
|
|
183
|
+
export interface CollectionProductParams extends PageParams {
|
|
184
|
+
sort?: CollectionProductSortParam;
|
|
185
|
+
minPrice?: number;
|
|
186
|
+
maxPrice?: number;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** `GET /collections/{slug}/products` 쿼리 — OpenAPI 문서용 형태(값은 쿼리 문자열) */
|
|
190
|
+
export const collectionProductQuerySchema = z.object({
|
|
191
|
+
sort: collectionProductSortSchema.optional().describe("정렬. 생략하면 컬렉션의 기본 정렬"),
|
|
192
|
+
minPrice: z.string().optional().describe("최소 판매가(즉시할인 반영)"),
|
|
193
|
+
maxPrice: z.string().optional().describe("최대 판매가(즉시할인 반영)"),
|
|
194
|
+
page: z.string().optional().describe("페이지 번호 (1부터, 기본 1)"),
|
|
195
|
+
size: z.string().optional().describe("페이지 크기 (기본 20, 최대 60)"),
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
/** 컬렉션 상품 페이지 — 상품 검색과 같은 카드다(판매 중 상품만) */
|
|
199
|
+
export const collectionProductPageSchema = pageSchema(productCardSchema);
|
|
200
|
+
|
|
201
|
+
export type CollectionProductPage = z.infer<typeof collectionProductPageSchema>;
|
|
202
|
+
|
|
203
|
+
/** `GET /collections` 쿼리 */
|
|
204
|
+
export const storefrontCollectionListQuerySchema = z.object({
|
|
205
|
+
page: z.string().optional().describe("페이지 번호 (1부터, 기본 1)"),
|
|
206
|
+
size: z.string().optional().describe("페이지 크기 (기본 20, 최대 100)"),
|
|
207
|
+
});
|
package/src/schemas/checkout.ts
CHANGED
|
@@ -165,6 +165,20 @@ export const paymentMethodSchema = z.enum([
|
|
|
165
165
|
|
|
166
166
|
export type PaymentMethod = z.infer<typeof paymentMethodSchema>;
|
|
167
167
|
|
|
168
|
+
/**
|
|
169
|
+
* 응답에 실리는 결제수단 — 아는 값(`PaymentMethod`)이거나 이 SDK가 모르는 새 값(문자열)이다. 서버가 결제수단을 더해도
|
|
170
|
+
* 응답 파싱이 깨지지 않게 넓게 받는다(`responsePlanCodeSchema`·`easyPayProviderResponseSchema`와 같은 방식, #93 P0).
|
|
171
|
+
* 적립금 전액 결제 주문은 `POINT`가 온다. 화면은 아는 값으로 분기하고 모르는 값은 그대로 표시하거나 「기타」로 다룬다.
|
|
172
|
+
* 요청(결제 옵션)은 값을 골라 보내는 자리라 `paymentMethodSchema`(enum) 그대로다.
|
|
173
|
+
*/
|
|
174
|
+
export const responsePaymentMethodSchema = z
|
|
175
|
+
.union([paymentMethodSchema, z.string()])
|
|
176
|
+
.describe(
|
|
177
|
+
"결제수단. `CARD` 카드 · `BANK_TRANSFER` 계좌이체 · `VIRTUAL_ACCOUNT` 가상계좌 · `MOBILE` 휴대폰 · `EASY_PAY` 간편결제 · " +
|
|
178
|
+
"`POINT` 적립금 전액 결제. 값이 추가될 수 있어 문자열로 받는다",
|
|
179
|
+
);
|
|
180
|
+
export type ResponsePaymentMethod = PaymentMethod | (string & {});
|
|
181
|
+
|
|
168
182
|
/** 결제를 처리하는 PG. 셀러가 직접 계약하고 상점 플랫폼 설정 › 결제에서 연결한다 */
|
|
169
183
|
export const pgProviderSchema = z.enum(["tosspayments", "portone"]);
|
|
170
184
|
export type PgProvider = z.infer<typeof pgProviderSchema>;
|
|
@@ -415,14 +429,44 @@ export const retryPaymentRequestSchema = z.object({
|
|
|
415
429
|
|
|
416
430
|
export type RetryPaymentRequest = z.infer<typeof retryPaymentRequestSchema>;
|
|
417
431
|
|
|
432
|
+
/**
|
|
433
|
+
* 결제 시작 상태 — `pending`이면 `payUrl`로 결제창을 연다. `completed`면 결제창 없이 결제가 끝나 주문이 만들어졌고
|
|
434
|
+
* `orderId`가 있다(적립금으로 결제 금액 전체를 낸 주문, #93). 값이 추가될 수 있어 응답은 문자열로 받는다.
|
|
435
|
+
*/
|
|
436
|
+
export const PAYMENT_START_STATUS_VALUES = ["pending", "completed"] as const;
|
|
437
|
+
export type KnownPaymentStartStatus = (typeof PAYMENT_START_STATUS_VALUES)[number];
|
|
438
|
+
|
|
418
439
|
export const paymentStartSchema = z.object({
|
|
419
440
|
paymentId: z.string().describe("결제 id. 상태 조회·재시도의 키다"),
|
|
420
|
-
|
|
421
|
-
|
|
441
|
+
status: z
|
|
442
|
+
.string()
|
|
443
|
+
.optional()
|
|
444
|
+
.default("pending")
|
|
445
|
+
.describe(
|
|
446
|
+
"결제 시작 상태. `pending`이면 `payUrl`로 결제창을 연다. `completed`면 결제창 없이 결제가 끝났고(적립금 전액 결제) `orderId`가 주문 번호다. " +
|
|
447
|
+
"그 밖의 값은 결제 상태 조회(`GET /payments/{paymentId}`)로 확정한다. 이 필드가 없던 서버 응답은 `pending`으로 읽는다",
|
|
448
|
+
),
|
|
449
|
+
orderId: z
|
|
450
|
+
.string()
|
|
451
|
+
.nullable()
|
|
452
|
+
.optional()
|
|
453
|
+
.default(null)
|
|
454
|
+
.describe("만들어진 주문 번호. `status`가 `completed`일 때만 값이 있고 그 밖에는 null"),
|
|
455
|
+
attemptId: z
|
|
456
|
+
.string()
|
|
457
|
+
.nullable()
|
|
458
|
+
.describe(
|
|
459
|
+
"결제 시도 id. PG 주문번호(토스 orderId, 포트원 paymentId)다. 결제창 없이 끝난 결제(`completed`)는 null",
|
|
460
|
+
),
|
|
461
|
+
option: paymentOptionSchema
|
|
462
|
+
.nullable()
|
|
463
|
+
.describe("이 시도의 결제 옵션. 결제창 없이 끝난 결제(`completed`)는 null"),
|
|
422
464
|
payUrl: z
|
|
423
465
|
.string()
|
|
466
|
+
.nullable()
|
|
424
467
|
.describe(
|
|
425
|
-
"결제 서비스 주소. 팝업으로 열려면 쿼리 `mode=popup`을 붙이고, 그대로 이동하면 리다이렉트
|
|
468
|
+
"결제 서비스 주소. 팝업으로 열려면 쿼리 `mode=popup`을 붙이고, 그대로 이동하면 리다이렉트 결제다. " +
|
|
469
|
+
"결제창 없이 끝난 결제(`completed`)는 null이다",
|
|
426
470
|
),
|
|
427
471
|
expiresAt: z.string().describe("결제 요청 만료 시각"),
|
|
428
472
|
testPayment: z
|
package/src/schemas/order.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { easyPayProviderResponseSchema,
|
|
2
|
+
import { easyPayProviderResponseSchema, responsePaymentMethodSchema } from "./checkout";
|
|
3
3
|
import { orderItemStatusSchema } from "./common";
|
|
4
4
|
import { myOrderItemFulfillmentSnapshotSchema } from "./fulfillment";
|
|
5
5
|
import { lineSelectionResponseShape } from "./product-options";
|
|
@@ -90,8 +90,9 @@ export const myOrderSchema = z.object({
|
|
|
90
90
|
),
|
|
91
91
|
shippingAddress: orderShippingAddressSchema,
|
|
92
92
|
payment: z.object({
|
|
93
|
-
method:
|
|
94
|
-
"실제 결제수단(PG가 보고한 수단, 모르면 주문서에서 고른 수단). 결제창에서 바뀔 수 있다(카드 결제창의 간편결제 탭 등)"
|
|
93
|
+
method: responsePaymentMethodSchema.describe(
|
|
94
|
+
"실제 결제수단(PG가 보고한 수단, 모르면 주문서에서 고른 수단). 결제창에서 바뀔 수 있다(카드 결제창의 간편결제 탭 등). " +
|
|
95
|
+
"적립금 전액 결제 주문은 `POINT`다. 값이 추가될 수 있어 문자열로 받는다",
|
|
95
96
|
),
|
|
96
97
|
easyPayProvider: easyPayProviderResponseSchema
|
|
97
98
|
.nullable()
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { pageSchema } from "./common";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 적립금 (이슈 #93) — 상점 적립 정책 안내와 구매자 잔액·내역. 금액은 원 단위 정수다.
|
|
6
|
+
* 적립금 사용(주문서·결제)은 다음 단계에서 가산한다.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** `GET /point-policy` — 상점 적립 정책(인증 없음, 상점 단위). 리뷰 작성·주문 화면의 혜택 안내에 쓴다 */
|
|
10
|
+
export const storefrontPointPolicySchema = z.object({
|
|
11
|
+
reviewReward: z
|
|
12
|
+
.object({
|
|
13
|
+
enabled: z.boolean().describe("리뷰 적립 사용 여부. false면 리뷰 혜택 안내를 그리지 않는다"),
|
|
14
|
+
textPoint: z.number().int().describe("리뷰를 작성하면 주는 적립금(원)"),
|
|
15
|
+
photoPoint: z
|
|
16
|
+
.number()
|
|
17
|
+
.int()
|
|
18
|
+
.describe("사진 리뷰에 더 주는 적립금(원). 사진 리뷰는 `textPoint + photoPoint`다"),
|
|
19
|
+
})
|
|
20
|
+
.describe("리뷰 적립"),
|
|
21
|
+
purchaseEarn: z
|
|
22
|
+
.object({
|
|
23
|
+
enabled: z.boolean().describe("구매 적립 사용 여부"),
|
|
24
|
+
rateBp: z
|
|
25
|
+
.number()
|
|
26
|
+
.int()
|
|
27
|
+
.describe("상점 기본 구매 적립률(만분율, 100 = 1%). 상품마다 다를 수 있다"),
|
|
28
|
+
})
|
|
29
|
+
.describe("구매 적립 — 구매확정 때 실결제 금액(배송비 제외) × 적립률을 준다"),
|
|
30
|
+
expiryDays: z.number().int().nullable().describe("적립금 유효 기간(일). 정하지 않았으면 null"),
|
|
31
|
+
review: z
|
|
32
|
+
.object({
|
|
33
|
+
writableDays: z.number().int().describe("구매확정 뒤 리뷰를 쓸 수 있는 기간(일)"),
|
|
34
|
+
editableDays: z.number().int().describe("리뷰를 쓴 뒤 고칠 수 있는 기간(일)"),
|
|
35
|
+
})
|
|
36
|
+
.describe("리뷰 작성·수정 기한"),
|
|
37
|
+
});
|
|
38
|
+
export type StorefrontPointPolicy = z.infer<typeof storefrontPointPolicySchema>;
|
|
39
|
+
|
|
40
|
+
/** `GET /me/points` — 내 적립금 */
|
|
41
|
+
export const memberPointsSchema = z.object({
|
|
42
|
+
balance: z.number().int().describe("잔액"),
|
|
43
|
+
expiringSoon: z.number().int().describe("30일 안에 소멸할 금액"),
|
|
44
|
+
});
|
|
45
|
+
export type MemberPoints = z.infer<typeof memberPointsSchema>;
|
|
46
|
+
|
|
47
|
+
/** 내 적립금 내역 한 줄 — 셀러 메모는 싣지 않는다 */
|
|
48
|
+
export const memberPointEntrySchema = z.object({
|
|
49
|
+
entryId: z.string(),
|
|
50
|
+
type: z
|
|
51
|
+
.string()
|
|
52
|
+
.describe(
|
|
53
|
+
"유형. `EARN_REVIEW` 리뷰 적립 · `REVOKE_REVIEW` 리뷰 삭제 회수 · `EARN_PURCHASE` 구매 적립 · `EXPIRE` 소멸 · `ADJUST` 상점 지급·차감 · " +
|
|
54
|
+
"`OPENING` 기존 적립금. 값이 추가될 수 있어 문자열로 받는다",
|
|
55
|
+
),
|
|
56
|
+
amount: z.number().int().describe("변동액. 적립 +, 회수·차감·소멸 −"),
|
|
57
|
+
balanceAfter: z.number().int().describe("이 변동 직후 잔액"),
|
|
58
|
+
createdAt: z.string(),
|
|
59
|
+
});
|
|
60
|
+
export type MemberPointEntry = z.infer<typeof memberPointEntrySchema>;
|
|
61
|
+
|
|
62
|
+
export const memberPointEntryPageSchema = pageSchema(memberPointEntrySchema);
|