@sayren/storefront-sdk 0.18.1 → 0.18.2
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/{client-C91Y801B.mjs → client-BNChG_51.mjs} +36 -6
- package/dist/{index-DJYqxHSY.d.mts → index-D2WiGpwr.d.mts} +73 -14
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/payments/index.d.mts +1 -1
- package/package.json +1 -1
- package/src/schemas/catalog.ts +28 -3
- package/src/schemas/inquiry.ts +46 -0
- package/src/schemas/store.ts +22 -0
package/dist/auth/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mt as ApiError, t as createStorefrontClient } from "../client-BNChG_51.mjs";
|
|
2
2
|
//#region src/auth/index.ts
|
|
3
3
|
/** 소셜 로그인 실패 — 구매자가 취소했거나(`access_denied`) state가 맞지 않는다 */
|
|
4
4
|
var IdpCallbackError = class extends Error {
|
|
@@ -320,9 +320,10 @@ const productCardSchema = z.object({
|
|
|
320
320
|
productId: z.string(),
|
|
321
321
|
name: z.string(),
|
|
322
322
|
thumbnailUrl: z.url().nullable().describe("대표 이미지 주소. 등록된 이미지가 없으면 null"),
|
|
323
|
-
salePrice: z.number().int().describe("판매가. 원(KRW) 단위
|
|
324
|
-
discountedPrice: z.number().int().nullable().describe("
|
|
325
|
-
discountRate: z.number().int().nullable().describe("
|
|
323
|
+
salePrice: z.number().int().describe("판매가. 원(KRW) 단위 정수. 즉시할인이 없으면 구매자가 내는 한 개 가격(옵션 추가금 제외)이고, 즉시할인의 기준 가격이다"),
|
|
324
|
+
discountedPrice: z.number().int().nullable().describe("즉시할인 적용가. 원 단위. 판매가에 즉시할인을 적용한 값이고, 있으면 이 값이 구매자가 내는 한 개 가격이다. 할인이 없으면 null"),
|
|
325
|
+
discountRate: z.number().int().nullable().describe("즉시할인율(%). 판매가 대비 `discountedPrice`의 할인율이다(정가 기준이 아니다). 할인이 없으면 null"),
|
|
326
|
+
originalPrice: z.number().int().nullable().optional().default(null).describe("정가(할인 전 표시 가격, 이슈 #82). 원 단위. 셀러가 상품에 적은 비교용 가격이고 결제 금액 계산에 쓰지 않는다. 구매자가 내는 가격은 `discountedPrice ?? salePrice`다. 정가가 그 가격보다 클 때 「정가 취소선 + 할인율 + 판매가」로 보이면 되고, 이때 할인율은 `round((1 - (discountedPrice ?? salePrice) / originalPrice) × 100)`이다. 판매가와 크기를 검증하지 않으므로 작거나 같으면 표시하지 않는다. 정하지 않았으면 null. 서버는 항상 싣는다"),
|
|
326
327
|
freeShipping: z.boolean().describe("무료배송 배지. 배송 상품이고 배송비가 무료일 때만 true다(배송이 없는 상품은 false)"),
|
|
327
328
|
fulfillment: productCardFulfillmentSchema,
|
|
328
329
|
averageRating: z.number(),
|
|
@@ -536,6 +537,17 @@ const createCustomerInquiryRequestSchema = z.object({
|
|
|
536
537
|
});
|
|
537
538
|
//#endregion
|
|
538
539
|
//#region src/schemas/inquiry.ts
|
|
540
|
+
/**
|
|
541
|
+
* 상품 문의 유형(이슈 #85) — 관리 API 상품 문의의 `category`와 같은 값이다.
|
|
542
|
+
* `PRODUCT` 상품(사이즈·소재 등), `DELIVERY` 배송, `RETURN` 반품, `EXCHANGE` 교환, `ETC` 기타
|
|
543
|
+
*/
|
|
544
|
+
const productInquiryCategorySchema = z.enum([
|
|
545
|
+
"PRODUCT",
|
|
546
|
+
"DELIVERY",
|
|
547
|
+
"RETURN",
|
|
548
|
+
"EXCHANGE",
|
|
549
|
+
"ETC"
|
|
550
|
+
]);
|
|
539
551
|
const publicInquirySchema = z.object({
|
|
540
552
|
inquiryId: z.string(),
|
|
541
553
|
content: z.string().nullable(),
|
|
@@ -546,11 +558,16 @@ const publicInquirySchema = z.object({
|
|
|
546
558
|
content: z.string().nullable(),
|
|
547
559
|
answeredAt: z.string()
|
|
548
560
|
}).nullable(),
|
|
549
|
-
createdAt: z.string()
|
|
561
|
+
createdAt: z.string(),
|
|
562
|
+
productId: z.string().nullable().optional().default(null).describe("문의한 상품 id. 서버는 항상 싣는다(옛 서버 응답이면 null)"),
|
|
563
|
+
productName: z.string().nullable().optional().default(null).describe("문의한 상품의 지금 이름. 상품이 지워졌으면 null. 서버는 항상 싣는다"),
|
|
564
|
+
thumbnailUrl: z.url().nullable().optional().default(null).describe("문의한 상품의 대표 이미지 주소. 이미지가 없거나 상품이 지워졌으면 null. 서버는 항상 싣는다"),
|
|
565
|
+
category: productInquiryCategorySchema.optional().default("PRODUCT").describe("문의 유형. `PRODUCT`(상품)·`DELIVERY`(배송)·`RETURN`(반품)·`EXCHANGE`(교환)·`ETC`(기타). 서버는 항상 싣는다")
|
|
550
566
|
});
|
|
551
567
|
const createInquiryRequestSchema = z.object({
|
|
552
568
|
content: z.string().min(1).max(1e3),
|
|
553
|
-
secret: z.boolean().default(false)
|
|
569
|
+
secret: z.boolean().default(false),
|
|
570
|
+
category: productInquiryCategorySchema.optional().describe("문의 유형(이슈 #85). `PRODUCT`(상품)·`DELIVERY`(배송)·`RETURN`(반품)·`EXCHANGE`(교환)·`ETC`(기타). 생략하면 `PRODUCT`다")
|
|
554
571
|
});
|
|
555
572
|
/** `POST /products/{productId}/inquiries` 응답 */
|
|
556
573
|
const createInquiryResultSchema = z.object({
|
|
@@ -741,6 +758,11 @@ const updateReviewResultSchema = z.object({
|
|
|
741
758
|
//#endregion
|
|
742
759
|
//#region src/schemas/store.ts
|
|
743
760
|
/**
|
|
761
|
+
* 사업자 정보 필드(이슈 #81) — 전자상거래법 표기(푸터)용이다. 셀러가 정하지 않았으면 null이고, 그 항목은 표시하지 않으면 된다.
|
|
762
|
+
* 옛 서버 응답에 없으면 null로 읽는다.
|
|
763
|
+
*/
|
|
764
|
+
const businessText = (description) => z.string().nullable().optional().default(null).describe(`${description}. 정하지 않았으면 null. 서버는 항상 싣는다`);
|
|
765
|
+
/**
|
|
744
766
|
* 상점 공개 설정 — `GET /store`. 스토어프론트가 화면을 그릴 때 읽는 값만 담는다.
|
|
745
767
|
*/
|
|
746
768
|
const storefrontStoreSchema = z.object({
|
|
@@ -749,6 +771,14 @@ const storefrontStoreSchema = z.object({
|
|
|
749
771
|
logoUrl: z.string().nullable(),
|
|
750
772
|
customerCenterPhone: z.string().nullable(),
|
|
751
773
|
businessHours: z.string().nullable(),
|
|
774
|
+
businessName: businessText("상호(사업자등록증의 상호). 상점명(`name`)과 다를 수 있다"),
|
|
775
|
+
representativeName: businessText("대표자명"),
|
|
776
|
+
businessNumber: businessText("사업자등록번호. 관리 API로 저장한 값은 숫자 10자리(하이픈 없음)이고 표시할 때 `123-45-67890`으로 끊으면 된다"),
|
|
777
|
+
mailOrderSalesNumber: businessText("통신판매업 신고번호. 셀러가 적은 그대로다"),
|
|
778
|
+
businessAddress: businessText("사업장 주소"),
|
|
779
|
+
customerCenterEmail: businessText("고객센터 이메일"),
|
|
780
|
+
privacyOfficerName: businessText("개인정보 보호책임자 성명"),
|
|
781
|
+
privacyOfficerEmail: businessText("개인정보 보호책임자 이메일"),
|
|
752
782
|
/**
|
|
753
783
|
* 비회원 주문 허용. false면 로그인하지 않은 구매자의 주문서 생성·결제 요청이 403 `GUEST_CHECKOUT_DISABLED`다.
|
|
754
784
|
* 장바구니 담기는 된다 — 주문 버튼을 로그인 안내로 바꾸면 된다
|
|
@@ -965,4 +995,4 @@ get: () => http.request("GET", "/store", storefrontStoreSchema) },
|
|
|
965
995
|
};
|
|
966
996
|
}
|
|
967
997
|
//#endregion
|
|
968
|
-
export {
|
|
998
|
+
export { cartSchema as $, consentKindSchema as A, myClaimSchema as B, createInquiryResultSchema as C, customerInquiryCategorySchema as D, createCustomerInquiryRequestSchema as E, claimReasonSchema as F, productPageSchema as G, productCardSchema as H, claimReturnAddressSchema as I, orderItemStatusSchema as J, productSortSchema as K, claimTypeSchema as L, consentStateSchema as M, consentUpdateRequestSchema as N, customerInquirySchema as O, memberConsentsSchema as P, cartItemSchema as Q, createClaimRequestSchema as R, createInquiryRequestSchema as S, publicInquirySchema as T, productDetailSchema as U, categoryNodeSchema as V, productFacetsSchema as W, pageSchema as X, pageInfoSchema as Y, addCartItemRequestSchema as Z, memberAddressRequestSchema as _, unwrapData as _t, publicReviewSchema as a, idpTokenRequestSchema as at, updateProfileRequestSchema as b, updateReviewRequestSchema as c, memberIdentitiesSchema as ct, deliveryTrackingSchema as d, tokenPairSchema as dt, updateCartItemRequestSchema as et, myOrderItemSchema as f, withdrawRequestSchema as ft, trackingStageResponseSchema as g, toApiError as gt, purchaseDecisionResultSchema as h, buildQuery as ht, createReviewResultSchema as i, idpAuthorizeResponseSchema as it, consentSourceSchema as j, consentActionSchema as k, updateReviewResultSchema as l, signupRequestSchema as lt, orderShippingAddressSchema as m, ApiError as mt, storefrontStoreSchema as n, idpAgreementsSchema as nt, reviewPageSchema as o, linkIdentityRequestSchema as ot, myOrderSchema as p, withdrawalBlockedDetailsSchema as pt, claimStatusSchema as q, createReviewRequestSchema as r, idpAuthorizeRequestSchema as rt, reviewSummarySchema as s, loginRequestSchema as st, createStorefrontClient as t, anonymousSessionSchema as tt, writableReviewSchema as u, socialProviderSchema as ut, memberAddressSchema as v, productInquiryCategorySchema as w, wishlistAddResultSchema as x, memberSchema as y, createClaimResultSchema as z };
|
|
@@ -241,6 +241,7 @@ declare const productCardSchema: z.ZodObject<{
|
|
|
241
241
|
salePrice: z.ZodNumber;
|
|
242
242
|
discountedPrice: z.ZodNullable<z.ZodNumber>;
|
|
243
243
|
discountRate: z.ZodNullable<z.ZodNumber>;
|
|
244
|
+
originalPrice: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
244
245
|
freeShipping: z.ZodBoolean;
|
|
245
246
|
fulfillment: z.ZodObject<{
|
|
246
247
|
type: z.ZodString;
|
|
@@ -258,6 +259,7 @@ declare const productDetailSchema: z.ZodObject<{
|
|
|
258
259
|
salePrice: z.ZodNumber;
|
|
259
260
|
discountedPrice: z.ZodNullable<z.ZodNumber>;
|
|
260
261
|
discountRate: z.ZodNullable<z.ZodNumber>;
|
|
262
|
+
originalPrice: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
261
263
|
freeShipping: z.ZodBoolean;
|
|
262
264
|
averageRating: z.ZodNumber;
|
|
263
265
|
reviewCount: z.ZodNumber;
|
|
@@ -367,6 +369,7 @@ declare const productPageSchema: z.ZodObject<{
|
|
|
367
369
|
salePrice: z.ZodNumber;
|
|
368
370
|
discountedPrice: z.ZodNullable<z.ZodNumber>;
|
|
369
371
|
discountRate: z.ZodNullable<z.ZodNumber>;
|
|
372
|
+
originalPrice: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
370
373
|
freeShipping: z.ZodBoolean;
|
|
371
374
|
fulfillment: z.ZodObject<{
|
|
372
375
|
type: z.ZodString;
|
|
@@ -1039,9 +1042,9 @@ type PaymentMessage = z.infer<typeof paymentMessageSchema>;
|
|
|
1039
1042
|
//#endregion
|
|
1040
1043
|
//#region src/schemas/claim.d.ts
|
|
1041
1044
|
declare const claimTypeSchema: z.ZodEnum<{
|
|
1042
|
-
CANCEL: "CANCEL";
|
|
1043
1045
|
RETURN: "RETURN";
|
|
1044
1046
|
EXCHANGE: "EXCHANGE";
|
|
1047
|
+
CANCEL: "CANCEL";
|
|
1045
1048
|
}>;
|
|
1046
1049
|
type ClaimType = z.infer<typeof claimTypeSchema>;
|
|
1047
1050
|
declare const claimReasonSchema: z.ZodEnum<{
|
|
@@ -1055,9 +1058,9 @@ declare const claimReasonSchema: z.ZodEnum<{
|
|
|
1055
1058
|
type ClaimReason = z.infer<typeof claimReasonSchema>;
|
|
1056
1059
|
declare const createClaimRequestSchema: z.ZodObject<{
|
|
1057
1060
|
type: z.ZodEnum<{
|
|
1058
|
-
CANCEL: "CANCEL";
|
|
1059
1061
|
RETURN: "RETURN";
|
|
1060
1062
|
EXCHANGE: "EXCHANGE";
|
|
1063
|
+
CANCEL: "CANCEL";
|
|
1061
1064
|
}>;
|
|
1062
1065
|
reason: z.ZodEnum<{
|
|
1063
1066
|
CHANGE_OF_MIND: "CHANGE_OF_MIND";
|
|
@@ -1103,9 +1106,9 @@ type ClaimReturnAddress = z.infer<typeof claimReturnAddressSchema>;
|
|
|
1103
1106
|
declare const myClaimSchema: z.ZodObject<{
|
|
1104
1107
|
claimId: z.ZodString;
|
|
1105
1108
|
type: z.ZodEnum<{
|
|
1106
|
-
CANCEL: "CANCEL";
|
|
1107
1109
|
RETURN: "RETURN";
|
|
1108
1110
|
EXCHANGE: "EXCHANGE";
|
|
1111
|
+
CANCEL: "CANCEL";
|
|
1109
1112
|
}>;
|
|
1110
1113
|
status: z.ZodEnum<{
|
|
1111
1114
|
COMPLETED: "COMPLETED";
|
|
@@ -1393,22 +1396,22 @@ declare const myCouponListQuerySchema: z.ZodObject<{
|
|
|
1393
1396
|
//#endregion
|
|
1394
1397
|
//#region src/schemas/customer-inquiry.d.ts
|
|
1395
1398
|
declare const customerInquiryCategorySchema: z.ZodEnum<{
|
|
1399
|
+
DELIVERY: "DELIVERY";
|
|
1396
1400
|
RETURN: "RETURN";
|
|
1397
1401
|
EXCHANGE: "EXCHANGE";
|
|
1398
|
-
DELIVERY: "DELIVERY";
|
|
1399
|
-
PAYMENT: "PAYMENT";
|
|
1400
1402
|
ETC: "ETC";
|
|
1403
|
+
PAYMENT: "PAYMENT";
|
|
1401
1404
|
}>;
|
|
1402
1405
|
type CustomerInquiryCategory = z.infer<typeof customerInquiryCategorySchema>;
|
|
1403
1406
|
/** 구매자 본인 뷰 — 마스킹 없이 본인 데이터, 셀러 답변(수정횟수 제외) */
|
|
1404
1407
|
declare const customerInquirySchema: z.ZodObject<{
|
|
1405
1408
|
inquiryId: z.ZodString;
|
|
1406
1409
|
category: z.ZodEnum<{
|
|
1410
|
+
DELIVERY: "DELIVERY";
|
|
1407
1411
|
RETURN: "RETURN";
|
|
1408
1412
|
EXCHANGE: "EXCHANGE";
|
|
1409
|
-
DELIVERY: "DELIVERY";
|
|
1410
|
-
PAYMENT: "PAYMENT";
|
|
1411
1413
|
ETC: "ETC";
|
|
1414
|
+
PAYMENT: "PAYMENT";
|
|
1412
1415
|
}>;
|
|
1413
1416
|
title: z.ZodString;
|
|
1414
1417
|
content: z.ZodString;
|
|
@@ -1423,11 +1426,11 @@ declare const customerInquirySchema: z.ZodObject<{
|
|
|
1423
1426
|
type CustomerInquiry = z.infer<typeof customerInquirySchema>;
|
|
1424
1427
|
declare const createCustomerInquiryRequestSchema: z.ZodObject<{
|
|
1425
1428
|
category: z.ZodEnum<{
|
|
1429
|
+
DELIVERY: "DELIVERY";
|
|
1426
1430
|
RETURN: "RETURN";
|
|
1427
1431
|
EXCHANGE: "EXCHANGE";
|
|
1428
|
-
DELIVERY: "DELIVERY";
|
|
1429
|
-
PAYMENT: "PAYMENT";
|
|
1430
1432
|
ETC: "ETC";
|
|
1433
|
+
PAYMENT: "PAYMENT";
|
|
1431
1434
|
}>;
|
|
1432
1435
|
title: z.ZodString;
|
|
1433
1436
|
content: z.ZodString;
|
|
@@ -1436,6 +1439,18 @@ declare const createCustomerInquiryRequestSchema: z.ZodObject<{
|
|
|
1436
1439
|
type CreateCustomerInquiryRequest = z.infer<typeof createCustomerInquiryRequestSchema>;
|
|
1437
1440
|
//#endregion
|
|
1438
1441
|
//#region src/schemas/inquiry.d.ts
|
|
1442
|
+
/**
|
|
1443
|
+
* 상품 문의 유형(이슈 #85) — 관리 API 상품 문의의 `category`와 같은 값이다.
|
|
1444
|
+
* `PRODUCT` 상품(사이즈·소재 등), `DELIVERY` 배송, `RETURN` 반품, `EXCHANGE` 교환, `ETC` 기타
|
|
1445
|
+
*/
|
|
1446
|
+
declare const productInquiryCategorySchema: z.ZodEnum<{
|
|
1447
|
+
PRODUCT: "PRODUCT";
|
|
1448
|
+
DELIVERY: "DELIVERY";
|
|
1449
|
+
RETURN: "RETURN";
|
|
1450
|
+
EXCHANGE: "EXCHANGE";
|
|
1451
|
+
ETC: "ETC";
|
|
1452
|
+
}>;
|
|
1453
|
+
type ProductInquiryCategory = z.infer<typeof productInquiryCategorySchema>;
|
|
1439
1454
|
declare const publicInquirySchema: z.ZodObject<{
|
|
1440
1455
|
inquiryId: z.ZodString;
|
|
1441
1456
|
content: z.ZodNullable<z.ZodString>;
|
|
@@ -1447,11 +1462,28 @@ declare const publicInquirySchema: z.ZodObject<{
|
|
|
1447
1462
|
answeredAt: z.ZodString;
|
|
1448
1463
|
}, z.core.$strip>>;
|
|
1449
1464
|
createdAt: z.ZodString;
|
|
1465
|
+
productId: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1466
|
+
productName: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1467
|
+
thumbnailUrl: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodURL>>>;
|
|
1468
|
+
category: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1469
|
+
PRODUCT: "PRODUCT";
|
|
1470
|
+
DELIVERY: "DELIVERY";
|
|
1471
|
+
RETURN: "RETURN";
|
|
1472
|
+
EXCHANGE: "EXCHANGE";
|
|
1473
|
+
ETC: "ETC";
|
|
1474
|
+
}>>>;
|
|
1450
1475
|
}, z.core.$strip>;
|
|
1451
1476
|
type PublicInquiry = z.infer<typeof publicInquirySchema>;
|
|
1452
1477
|
declare const createInquiryRequestSchema: z.ZodObject<{
|
|
1453
1478
|
content: z.ZodString;
|
|
1454
1479
|
secret: z.ZodDefault<z.ZodBoolean>;
|
|
1480
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
1481
|
+
PRODUCT: "PRODUCT";
|
|
1482
|
+
DELIVERY: "DELIVERY";
|
|
1483
|
+
RETURN: "RETURN";
|
|
1484
|
+
EXCHANGE: "EXCHANGE";
|
|
1485
|
+
ETC: "ETC";
|
|
1486
|
+
}>>;
|
|
1455
1487
|
}, z.core.$strip>;
|
|
1456
1488
|
type CreateInquiryRequest = z.infer<typeof createInquiryRequestSchema>;
|
|
1457
1489
|
/** `POST /products/{productId}/inquiries` 응답 */
|
|
@@ -1771,6 +1803,14 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1771
1803
|
logoUrl: string | null;
|
|
1772
1804
|
customerCenterPhone: string | null;
|
|
1773
1805
|
businessHours: string | null;
|
|
1806
|
+
businessName: string | null;
|
|
1807
|
+
representativeName: string | null;
|
|
1808
|
+
businessNumber: string | null;
|
|
1809
|
+
mailOrderSalesNumber: string | null;
|
|
1810
|
+
businessAddress: string | null;
|
|
1811
|
+
customerCenterEmail: string | null;
|
|
1812
|
+
privacyOfficerName: string | null;
|
|
1813
|
+
privacyOfficerEmail: string | null;
|
|
1774
1814
|
guestCheckout: boolean;
|
|
1775
1815
|
loginMethods: ("password" | "kakao" | "naver" | "google")[];
|
|
1776
1816
|
checkoutAvailable: boolean;
|
|
@@ -1792,6 +1832,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1792
1832
|
salePrice: number;
|
|
1793
1833
|
discountedPrice: number | null;
|
|
1794
1834
|
discountRate: number | null;
|
|
1835
|
+
originalPrice: number | null;
|
|
1795
1836
|
freeShipping: boolean;
|
|
1796
1837
|
fulfillment: {
|
|
1797
1838
|
type: string;
|
|
@@ -1820,6 +1861,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1820
1861
|
salePrice: number;
|
|
1821
1862
|
discountedPrice: number | null;
|
|
1822
1863
|
discountRate: number | null;
|
|
1864
|
+
originalPrice: number | null;
|
|
1823
1865
|
freeShipping: boolean;
|
|
1824
1866
|
averageRating: number;
|
|
1825
1867
|
reviewCount: number;
|
|
@@ -1923,6 +1965,10 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1923
1965
|
answeredAt: string;
|
|
1924
1966
|
} | null;
|
|
1925
1967
|
createdAt: string;
|
|
1968
|
+
productId: string | null;
|
|
1969
|
+
productName: string | null;
|
|
1970
|
+
thumbnailUrl: string | null;
|
|
1971
|
+
category: "PRODUCT" | "DELIVERY" | "RETURN" | "EXCHANGE" | "ETC";
|
|
1926
1972
|
}[];
|
|
1927
1973
|
}>;
|
|
1928
1974
|
createInquiry: (productId: string, body: CreateInquiryRequest) => Promise<void>;
|
|
@@ -2575,7 +2621,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2575
2621
|
totalPages: number;
|
|
2576
2622
|
contents: {
|
|
2577
2623
|
claimId: string;
|
|
2578
|
-
type: "
|
|
2624
|
+
type: "RETURN" | "EXCHANGE" | "CANCEL";
|
|
2579
2625
|
status: "COMPLETED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "REJECTED" | "WITHDRAWN";
|
|
2580
2626
|
orderItemId: string;
|
|
2581
2627
|
productName: string;
|
|
@@ -2697,6 +2743,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2697
2743
|
salePrice: number;
|
|
2698
2744
|
discountedPrice: number | null;
|
|
2699
2745
|
discountRate: number | null;
|
|
2746
|
+
originalPrice: number | null;
|
|
2700
2747
|
freeShipping: boolean;
|
|
2701
2748
|
fulfillment: {
|
|
2702
2749
|
type: string;
|
|
@@ -2745,6 +2792,10 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2745
2792
|
answeredAt: string;
|
|
2746
2793
|
} | null;
|
|
2747
2794
|
createdAt: string;
|
|
2795
|
+
productId: string | null;
|
|
2796
|
+
productName: string | null;
|
|
2797
|
+
thumbnailUrl: string | null;
|
|
2798
|
+
category: "PRODUCT" | "DELIVERY" | "RETURN" | "EXCHANGE" | "ETC";
|
|
2748
2799
|
}[];
|
|
2749
2800
|
}>;
|
|
2750
2801
|
};
|
|
@@ -2773,7 +2824,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2773
2824
|
customerInquiries: {
|
|
2774
2825
|
create: (body: CreateCustomerInquiryRequest) => Promise<{
|
|
2775
2826
|
inquiryId: string;
|
|
2776
|
-
category: "
|
|
2827
|
+
category: "DELIVERY" | "RETURN" | "EXCHANGE" | "ETC" | "PAYMENT";
|
|
2777
2828
|
title: string;
|
|
2778
2829
|
content: string;
|
|
2779
2830
|
orderItemId: string | null;
|
|
@@ -2794,7 +2845,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2794
2845
|
totalPages: number;
|
|
2795
2846
|
contents: {
|
|
2796
2847
|
inquiryId: string;
|
|
2797
|
-
category: "
|
|
2848
|
+
category: "DELIVERY" | "RETURN" | "EXCHANGE" | "ETC" | "PAYMENT";
|
|
2798
2849
|
title: string;
|
|
2799
2850
|
content: string;
|
|
2800
2851
|
orderItemId: string | null;
|
|
@@ -2808,7 +2859,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2808
2859
|
}>;
|
|
2809
2860
|
get: (inquiryId: string) => Promise<{
|
|
2810
2861
|
inquiryId: string;
|
|
2811
|
-
category: "
|
|
2862
|
+
category: "DELIVERY" | "RETURN" | "EXCHANGE" | "ETC" | "PAYMENT";
|
|
2812
2863
|
title: string;
|
|
2813
2864
|
content: string;
|
|
2814
2865
|
orderItemId: string | null;
|
|
@@ -3231,6 +3282,14 @@ declare const storefrontStoreSchema: z.ZodObject<{
|
|
|
3231
3282
|
logoUrl: z.ZodNullable<z.ZodString>;
|
|
3232
3283
|
customerCenterPhone: z.ZodNullable<z.ZodString>;
|
|
3233
3284
|
businessHours: z.ZodNullable<z.ZodString>;
|
|
3285
|
+
businessName: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3286
|
+
representativeName: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3287
|
+
businessNumber: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3288
|
+
mailOrderSalesNumber: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3289
|
+
businessAddress: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3290
|
+
customerCenterEmail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3291
|
+
privacyOfficerName: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3292
|
+
privacyOfficerEmail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3234
3293
|
guestCheckout: z.ZodBoolean;
|
|
3235
3294
|
loginMethods: z.ZodArray<z.ZodEnum<{
|
|
3236
3295
|
password: "password";
|
|
@@ -3250,4 +3309,4 @@ declare const storefrontStoreSchema: z.ZodObject<{
|
|
|
3250
3309
|
}, z.core.$strip>;
|
|
3251
3310
|
type StorefrontStore = z.infer<typeof storefrontStoreSchema>;
|
|
3252
3311
|
//#endregion
|
|
3253
|
-
export { CreateReviewRequest as $,
|
|
3312
|
+
export { CreateReviewRequest as $, StartPaymentRequest as $n, lineFulfillmentSchema as $r, couponResultSchema as $t, ANALYTICS_MAX_BATCH_BYTES as A, CashReceiptRequest as An, ProductFacets as Ar, createInquiryResultSchema as At, analyticsBatchSchema as B, KnownPaymentStatus as Bn, ClaimStatus as Br, CheckoutPricing as Bt, PurchaseDecisionResult as C, claimTypeSchema as Cn, residentNumberLike as Cr, updateProfileRequestSchema as Ct, orderShippingAddressSchema as D, AvailablePaymentOption as Dn, CategoryNode as Dr, ProductInquiryCategory as Dt, myOrderSchema as E, myClaimSchema as En, startPaymentRequestSchema as Er, CreateInquiryResult as Et, AnalyticsBatch as F, DeliveryQuoteRequest as Fn, productCardSchema as Fr, CustomerInquiryCategory as Ft, StorefrontClient as G, PaymentMethod as Gn, orderItemStatusSchema as Gr, MIN_PAYMENT_AMOUNT as Gt, analyticsClientEventSchema as H, PAYMENT_STATUS_VALUES as Hn, PageInfo as Hr, CouponApplication as Ht, AnalyticsClientEvent as I, DeliveryQuoteResult as In, productDetailSchema as Ir, createCustomerInquiryRequestSchema as It, STOREFRONT_SESSION_KEYS as J, PaymentStatus as Jn, LineFulfillment as Jr, checkoutPricingRequestSchema as Jt, StorefrontClientOptions as K, PaymentOption as Kn, pageInfoSchema as Kr, MyCoupon as Kt, AnalyticsClientEventName as L, EasyPayProvider as Ln, productFacetsSchema as Lr, customerInquiryCategorySchema as Lt, ANALYTICS_SESSION_HEADER as M, CheckoutDelivery as Mn, ProductSearchParams as Mr, publicInquirySchema as Mt, ANALYTICS_VISITOR_COOKIE as N, CheckoutSession as Nn, ProductSort as Nr, CreateCustomerInquiryRequest as Nt, purchaseDecisionResultSchema as O, CASH_RECEIPT_METHODS as On, ProductCard as Or, PublicInquiry as Ot, ANALYTICS_VISITOR_HEADER as P, CreateCheckoutRequest as Pn, categoryNodeSchema as Pr, CustomerInquiry as Pt, createStorefrontSession as Q, ShippingAddressInput as Qn, UnknownFulfillmentView as Qr, couponBenefitViewSchema as Qt, AnalyticsEventName as R, GuestInfo as Rn, productPageSchema as Rr, customerInquirySchema as Rt, OrderShippingAddress as S, claimReturnAddressSchema as Sn, remoteAreaSchema as Sr, memberSchema as St, myOrderItemSchema as T, createClaimResultSchema as Tn, shippingAddressInputSchema as Tr, CreateInquiryRequest as Tt, analyticsIdSchema as U, PaymentFailureCategory as Un, PageParams as Ur, CouponResult as Ut, analyticsClientEventNameSchema as V, PAYMENT_RESULT_VALUES as Vn, OrderItemStatus as Vr, CheckoutPricingRequest as Vt, analyticsServerEventNameSchema as W, PaymentMessage as Wn, claimStatusSchema as Wr, MAX_COUPONS_PER_CHECKOUT as Wt, StorefrontSession as X, RemoteArea as Xn, ProductCardFulfillment as Xr, couponApplicationListSchema as Xt, SessionStorage as Y, PgProvider as Yn, MyOrderItemFulfillmentSnapshot as Yr, checkoutPricingSchema as Yt, StorefrontSessionOptions as Z, RetryPaymentRequest as Zn, ProductFulfillmentView as Zr, couponApplicationSchema as Zt, normalizeCustomInputValue as _, ClaimType as _n, paymentOptionListSchema as _r, MemberAddressRequest as _t, CustomInputEntry as a, CartItem as ai, ConsentSource as an, checkoutDeliverySchema as ar, UpdateReviewResult as at, MyOrder as b, MyClaim as bn, paymentStatusSchema as br, memberAddressRequestSchema as bt, OptionSelectionView as c, cartItemSchema as ci, MemberConsents as cn, deliveryQuoteRequestSchema as cr, createReviewResultSchema as ct, customInputEntrySchema as d, analyticsIdsFromCookie as di, consentSourceSchema as dn, easyPayProviderSchema as dr, reviewSummarySchema as dt, myOrderItemFulfillmentSnapshotSchema as ei, myCouponListQuerySchema as en, availablePaymentOptionSchema as er, CreateReviewResult as et, customInputLength as f, consentStateSchema as fn, guestInfoSchema as fr, updateReviewRequestSchema as ft, lineSelectionResponseShape as g, ClaimReturnAddress as gn, paymentOptionKey as gr, MemberAddress as gt, lineSelectionRequestShape as h, ClaimReason as hn, paymentMethodSchema as hr, Member as ht, AddonSelection as i, Cart as ii, ConsentKind as in, cashReceiptTypeSchema as ir, UpdateReviewRequest as it, ANALYTICS_SESSION_COOKIE as j, CashReceiptType as jn, ProductPage as jr, productInquiryCategorySchema as jt, trackingStageResponseSchema as k, CashReceiptIdentityType as kn, ProductDetail as kr, createInquiryRequestSchema as kt, addonGroupViewSchema as l, cartSchema as li, consentActionSchema as ln, deliveryQuoteSchema as lr, publicReviewSchema as lt, customInputViewSchema as m, memberConsentsSchema as mn, paymentMessageSchema as mr, writableReviewSchema as mt, storefrontStoreSchema as n, productFulfillmentViewSchema as ni, pricingAmountsSchema as nn, cashReceiptIdentityTypeOf as nr, ReviewPage as nt, CustomInputValueView as o, UpdateCartItemRequest as oi, ConsentState as on, checkoutSessionSchema as or, WritableReview as ot, customInputValueViewSchema as p, consentUpdateRequestSchema as pn, paymentFailureCategorySchema as pr, updateReviewResultSchema as pt, createStorefrontClient as q, PaymentStart as qn, pageSchema as qr, applicableCouponSchema as qt, AddonGroupView as r, AddCartItemRequest as ri, ConsentAction as rn, cashReceiptRequestSchema as rr, ReviewSummary as rt, CustomInputView as s, addCartItemRequestSchema as si, ConsentUpdateRequest as sn, createCheckoutRequestSchema as sr, createReviewRequestSchema as st, StorefrontStore as t, productCardFulfillmentSchema as ti, myCouponSchema as tn, cashReceiptAvailable as tr, PublicReview as tt, addonSelectionSchema as u, updateCartItemRequestSchema as ui, consentKindSchema as un, easyPayProviderResponseSchema as ur, reviewPageSchema as ut, optionSelectionViewSchema as v, CreateClaimRequest as vn, paymentOptionSchema as vr, UpdateProfileRequest as vt, deliveryTrackingSchema as w, createClaimRequestSchema as wn, retryPaymentRequestSchema as wr, wishlistAddResultSchema as wt, MyOrderItem as x, claimReasonSchema as xn, pgProviderSchema as xr, memberAddressSchema as xt, DeliveryTracking as y, CreateClaimResult as yn, paymentStartSchema as yr, WishlistAddResult as yt, AnalyticsServerEventName as z, KnownPaymentResult as zn, productSortSchema as zr, ApplicableCoupon 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 CreateReviewRequest, $n 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, OptionSelectionView, OrderItemStatus, OrderShippingAddress, PAYMENT_RESULT_VALUES, PAYMENT_STATUS_VALUES, PageInfo, PageParams, PaymentFailureCategory, PaymentMessage, PaymentMethod, PaymentOption, PaymentStart, PaymentStatus, PgProvider, ProductCard, ProductCardFulfillment, ProductDetail, ProductFacets, ProductFulfillmentView, ProductPage, ProductSearchParams, ProductSort, PublicInquiry, PublicReview, PurchaseDecisionResult, type Query, RemoteArea, RetryPaymentRequest, 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, 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, normalizeCustomInputValue, optionSelectionViewSchema, orderItemStatusSchema, orderShippingAddressSchema, pageInfoSchema, pageSchema, paymentFailureCategorySchema, paymentMessageSchema, paymentMethodSchema, paymentOptionKey, paymentOptionListSchema, paymentOptionSchema, paymentStartSchema, paymentStatusSchema, pgProviderSchema, pricingAmountsSchema, productCardFulfillmentSchema, productCardSchema, productDetailSchema, productFacetsSchema, productFulfillmentViewSchema, productPageSchema, productSortSchema, publicInquirySchema, publicReviewSchema, purchaseDecisionResultSchema, remoteAreaSchema, residentNumberLike, retryPaymentRequestSchema, reviewPageSchema, reviewSummarySchema, shippingAddressInputSchema, signupRequestSchema, socialProviderSchema, startPaymentRequestSchema, storefrontStoreSchema, tokenPairSchema, trackingStageResponseSchema, updateCartItemRequestSchema, updateProfileRequestSchema, updateReviewRequestSchema, updateReviewResultSchema, wishlistAddResultSchema, withdrawRequestSchema, withdrawalBlockedDetailsSchema, writableReviewSchema };
|
|
2
|
+
import { $ as CreateReviewRequest, $n as StartPaymentRequest, $r as lineFulfillmentSchema, $t as couponResultSchema, A as ANALYTICS_MAX_BATCH_BYTES, An as CashReceiptRequest, Ar as ProductFacets, At as createInquiryResultSchema, B as analyticsBatchSchema, Bn as KnownPaymentStatus, Br as ClaimStatus, Bt as CheckoutPricing, C as PurchaseDecisionResult, Cn as claimTypeSchema, Cr as residentNumberLike, Ct as updateProfileRequestSchema, D as orderShippingAddressSchema, Dn as AvailablePaymentOption, Dr as CategoryNode, Dt as ProductInquiryCategory, E as myOrderSchema, En as myClaimSchema, Er as startPaymentRequestSchema, Et as CreateInquiryResult, F as AnalyticsBatch, Fn as DeliveryQuoteRequest, Fr as productCardSchema, Ft as CustomerInquiryCategory, G as StorefrontClient, Gn as PaymentMethod, Gr as orderItemStatusSchema, Gt as MIN_PAYMENT_AMOUNT, H as analyticsClientEventSchema, Hn as PAYMENT_STATUS_VALUES, Hr as PageInfo, Ht as CouponApplication, I as AnalyticsClientEvent, In as DeliveryQuoteResult, Ir as productDetailSchema, It as createCustomerInquiryRequestSchema, J as STOREFRONT_SESSION_KEYS, Jn as PaymentStatus, Jr as LineFulfillment, Jt as checkoutPricingRequestSchema, K as StorefrontClientOptions, Kn as PaymentOption, Kr as pageInfoSchema, Kt as MyCoupon, L as AnalyticsClientEventName, Ln as EasyPayProvider, Lr as productFacetsSchema, Lt as customerInquiryCategorySchema, M as ANALYTICS_SESSION_HEADER, Mn as CheckoutDelivery, Mr as ProductSearchParams, Mt as publicInquirySchema, N as ANALYTICS_VISITOR_COOKIE, Nn as CheckoutSession, Nr as ProductSort, Nt as CreateCustomerInquiryRequest, O as purchaseDecisionResultSchema, On as CASH_RECEIPT_METHODS, Or as ProductCard, Ot as PublicInquiry, P as ANALYTICS_VISITOR_HEADER, Pn as CreateCheckoutRequest, Pr as categoryNodeSchema, Pt as CustomerInquiry, Q as createStorefrontSession, Qn as ShippingAddressInput, Qr as UnknownFulfillmentView, Qt as couponBenefitViewSchema, R as AnalyticsEventName, Rn as GuestInfo, Rr as productPageSchema, Rt as customerInquirySchema, S as OrderShippingAddress, Sn as claimReturnAddressSchema, Sr as remoteAreaSchema, St as memberSchema, T as myOrderItemSchema, Tn as createClaimResultSchema, Tr as shippingAddressInputSchema, Tt as CreateInquiryRequest, U as analyticsIdSchema, Un as PaymentFailureCategory, Ur as PageParams, Ut as CouponResult, V as analyticsClientEventNameSchema, Vn as PAYMENT_RESULT_VALUES, Vr as OrderItemStatus, Vt as CheckoutPricingRequest, W as analyticsServerEventNameSchema, Wn as PaymentMessage, Wr as claimStatusSchema, Wt as MAX_COUPONS_PER_CHECKOUT, X as StorefrontSession, Xn as RemoteArea, Xr as ProductCardFulfillment, Xt as couponApplicationListSchema, Y as SessionStorage, Yn as PgProvider, Yr as MyOrderItemFulfillmentSnapshot, Yt as checkoutPricingSchema, Z as StorefrontSessionOptions, Zn as RetryPaymentRequest, Zr as ProductFulfillmentView, Zt as couponApplicationSchema, _ as normalizeCustomInputValue, _n as ClaimType, _r as paymentOptionListSchema, _t as MemberAddressRequest, a as CustomInputEntry, ai as CartItem, an as ConsentSource, ar as checkoutDeliverySchema, at as UpdateReviewResult, b as MyOrder, bn as MyClaim, br as paymentStatusSchema, bt as memberAddressRequestSchema, c as OptionSelectionView, ci as cartItemSchema, cn as MemberConsents, cr as deliveryQuoteRequestSchema, ct as createReviewResultSchema, d as customInputEntrySchema, di as analyticsIdsFromCookie, dn as consentSourceSchema, dr as easyPayProviderSchema, dt as reviewSummarySchema, ei as myOrderItemFulfillmentSnapshotSchema, en as myCouponListQuerySchema, er as availablePaymentOptionSchema, et as CreateReviewResult, f as customInputLength, fn as consentStateSchema, fr as guestInfoSchema, ft as updateReviewRequestSchema, g as lineSelectionResponseShape, gn as ClaimReturnAddress, gr as paymentOptionKey, gt as MemberAddress, h as lineSelectionRequestShape, hn as ClaimReason, hr as paymentMethodSchema, ht as Member, i as AddonSelection, ii as Cart, in as ConsentKind, ir as cashReceiptTypeSchema, it as UpdateReviewRequest, j as ANALYTICS_SESSION_COOKIE, jn as CashReceiptType, jr as ProductPage, jt as productInquiryCategorySchema, k as trackingStageResponseSchema, kn as CashReceiptIdentityType, kr as ProductDetail, kt as createInquiryRequestSchema, l as addonGroupViewSchema, li as cartSchema, ln as consentActionSchema, lr as deliveryQuoteSchema, lt as publicReviewSchema, m as customInputViewSchema, mn as memberConsentsSchema, mr as paymentMessageSchema, mt as writableReviewSchema, n as storefrontStoreSchema, ni as productFulfillmentViewSchema, nn as pricingAmountsSchema, nr as cashReceiptIdentityTypeOf, nt as ReviewPage, o as CustomInputValueView, oi as UpdateCartItemRequest, on as ConsentState, or as checkoutSessionSchema, ot as WritableReview, p as customInputValueViewSchema, pn as consentUpdateRequestSchema, pr as paymentFailureCategorySchema, pt as updateReviewResultSchema, q as createStorefrontClient, qn as PaymentStart, qr as pageSchema, qt as applicableCouponSchema, r as AddonGroupView, ri as AddCartItemRequest, rn as ConsentAction, rr as cashReceiptRequestSchema, rt as ReviewSummary, s as CustomInputView, si as addCartItemRequestSchema, sn as ConsentUpdateRequest, sr as createCheckoutRequestSchema, st as createReviewRequestSchema, t as StorefrontStore, ti as productCardFulfillmentSchema, tn as myCouponSchema, tr as cashReceiptAvailable, tt as PublicReview, u as addonSelectionSchema, ui as updateCartItemRequestSchema, un as consentKindSchema, ur as easyPayProviderResponseSchema, ut as reviewPageSchema, v as optionSelectionViewSchema, vn as CreateClaimRequest, vr as paymentOptionSchema, vt as UpdateProfileRequest, w as deliveryTrackingSchema, wn as createClaimRequestSchema, wr as retryPaymentRequestSchema, wt as wishlistAddResultSchema, x as MyOrderItem, xn as claimReasonSchema, xr as pgProviderSchema, xt as memberAddressSchema, y as DeliveryTracking, yn as CreateClaimResult, yr as paymentStartSchema, yt as WishlistAddResult, z as AnalyticsServerEventName, zn as KnownPaymentResult, zr as productSortSchema, zt as ApplicableCoupon } from "./index-D2WiGpwr.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, 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, 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, ProductSearchParams, ProductSort, PublicInquiry, PublicReview, PurchaseDecisionResult, type Query, RemoteArea, RetryPaymentRequest, 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, 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, normalizeCustomInputValue, optionSelectionViewSchema, orderItemStatusSchema, orderShippingAddressSchema, pageInfoSchema, pageSchema, paymentFailureCategorySchema, paymentMessageSchema, paymentMethodSchema, paymentOptionKey, paymentOptionListSchema, paymentOptionSchema, paymentStartSchema, paymentStatusSchema, pgProviderSchema, pricingAmountsSchema, productCardFulfillmentSchema, productCardSchema, productDetailSchema, productFacetsSchema, productFulfillmentViewSchema, productInquiryCategorySchema, productPageSchema, productSortSchema, publicInquirySchema, publicReviewSchema, purchaseDecisionResultSchema, remoteAreaSchema, residentNumberLike, retryPaymentRequestSchema, reviewPageSchema, reviewSummarySchema, shippingAddressInputSchema, signupRequestSchema, socialProviderSchema, startPaymentRequestSchema, storefrontStoreSchema, tokenPairSchema, trackingStageResponseSchema, updateCartItemRequestSchema, updateProfileRequestSchema, updateReviewRequestSchema, updateReviewResultSchema, wishlistAddResultSchema, withdrawRequestSchema, withdrawalBlockedDetailsSchema, writableReviewSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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
|
|
3
|
+
import { $ as cartSchema, A as consentKindSchema, B as myClaimSchema, C as createInquiryResultSchema, D as customerInquiryCategorySchema, E as createCustomerInquiryRequestSchema, F as claimReasonSchema, G as productPageSchema, H as productCardSchema, I as claimReturnAddressSchema, J as orderItemStatusSchema, K as productSortSchema, L as claimTypeSchema, M as consentStateSchema, N as consentUpdateRequestSchema, O as customerInquirySchema, P as memberConsentsSchema, Q as cartItemSchema, R as createClaimRequestSchema, S as createInquiryRequestSchema, T as publicInquirySchema, U as productDetailSchema, V as categoryNodeSchema, W as productFacetsSchema, X as pageSchema, Y as pageInfoSchema, Z as addCartItemRequestSchema, _ as memberAddressRequestSchema, _t as unwrapData, a as publicReviewSchema, at as idpTokenRequestSchema, b as updateProfileRequestSchema, c as updateReviewRequestSchema, ct as memberIdentitiesSchema, d as deliveryTrackingSchema, dt as tokenPairSchema, et as updateCartItemRequestSchema, f as myOrderItemSchema, ft as withdrawRequestSchema, g as trackingStageResponseSchema, gt as toApiError, h as purchaseDecisionResultSchema, ht as buildQuery, i as createReviewResultSchema, it as idpAuthorizeResponseSchema, j as consentSourceSchema, k as consentActionSchema, l as updateReviewResultSchema, lt as signupRequestSchema, m as orderShippingAddressSchema, mt as ApiError, n as storefrontStoreSchema, nt as idpAgreementsSchema, o as reviewPageSchema, ot as linkIdentityRequestSchema, p as myOrderSchema, pt as withdrawalBlockedDetailsSchema, q as claimStatusSchema, r as createReviewRequestSchema, rt as idpAuthorizeRequestSchema, s as reviewSummarySchema, st as loginRequestSchema, t as createStorefrontClient, tt as anonymousSessionSchema, u as writableReviewSchema, ut as socialProviderSchema, v as memberAddressSchema, w as productInquiryCategorySchema, x as wishlistAddResultSchema, y as memberSchema, z as createClaimResultSchema } from "./client-BNChG_51.mjs";
|
|
4
4
|
import { $ as lineFulfillmentSchema, A as startPaymentRequestSchema, B as myCouponListQuerySchema, C as paymentStartSchema, D as residentNumberLike, E as remoteAreaSchema, F as checkoutPricingSchema, G as customInputEntrySchema, H as pricingAmountsSchema, I as couponApplicationListSchema, J as customInputViewSchema, K as customInputLength, L as couponApplicationSchema, M as MIN_PAYMENT_AMOUNT, N as applicableCouponSchema, O as retryPaymentRequestSchema, P as checkoutPricingRequestSchema, Q as optionSelectionViewSchema, R as couponBenefitViewSchema, S as paymentOptionSchema, T as pgProviderSchema, U as addonGroupViewSchema, V as myCouponSchema, W as addonSelectionSchema, X as lineSelectionResponseShape, Y as lineSelectionRequestShape, Z as normalizeCustomInputValue, _ as paymentFailureCategorySchema, a as cashReceiptAvailable, b as paymentOptionKey, c as cashReceiptTypeSchema, d as createCheckoutRequestSchema, et as myOrderItemFulfillmentSnapshotSchema, f as deliveryQuoteRequestSchema, g as guestInfoSchema, h as easyPayProviderSchema, i as availablePaymentOptionSchema, j as MAX_COUPONS_PER_CHECKOUT, k as shippingAddressInputSchema, l as checkoutDeliverySchema, m as easyPayProviderResponseSchema, n as PAYMENT_RESULT_VALUES, nt as productFulfillmentViewSchema, o as cashReceiptIdentityTypeOf, p as deliveryQuoteSchema, q as customInputValueViewSchema, r as PAYMENT_STATUS_VALUES, s as cashReceiptRequestSchema, t as CASH_RECEIPT_METHODS, tt as productCardFulfillmentSchema, u as checkoutSessionSchema, v as paymentMessageSchema, w as paymentStatusSchema, x as paymentOptionListSchema, y as paymentMethodSchema, z as couponResultSchema } from "./checkout-PJk8g5DY.mjs";
|
|
5
5
|
//#region src/session.ts
|
|
6
6
|
/** 세션 키 상수 — SDK가 소유한다. store-sdk와 겹치지 않는 별도 네임스페이스. */
|
|
@@ -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, normalizeCustomInputValue, optionSelectionViewSchema, orderItemStatusSchema, orderShippingAddressSchema, pageInfoSchema, pageSchema, paymentFailureCategorySchema, paymentMessageSchema, paymentMethodSchema, paymentOptionKey, paymentOptionListSchema, paymentOptionSchema, paymentStartSchema, paymentStatusSchema, pgProviderSchema, pricingAmountsSchema, productCardFulfillmentSchema, productCardSchema, productDetailSchema, productFacetsSchema, productFulfillmentViewSchema, productPageSchema, productSortSchema, publicInquirySchema, publicReviewSchema, purchaseDecisionResultSchema, remoteAreaSchema, residentNumberLike, retryPaymentRequestSchema, reviewPageSchema, reviewSummarySchema, shippingAddressInputSchema, signupRequestSchema, socialProviderSchema, startPaymentRequestSchema, storefrontStoreSchema, tokenPairSchema, trackingStageResponseSchema, updateCartItemRequestSchema, updateProfileRequestSchema, updateReviewRequestSchema, updateReviewResultSchema, 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_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, normalizeCustomInputValue, optionSelectionViewSchema, orderItemStatusSchema, orderShippingAddressSchema, pageInfoSchema, pageSchema, paymentFailureCategorySchema, paymentMessageSchema, paymentMethodSchema, paymentOptionKey, paymentOptionListSchema, paymentOptionSchema, paymentStartSchema, paymentStatusSchema, pgProviderSchema, pricingAmountsSchema, productCardFulfillmentSchema, productCardSchema, productDetailSchema, productFacetsSchema, productFulfillmentViewSchema, productInquiryCategorySchema, productPageSchema, productSortSchema, publicInquirySchema, publicReviewSchema, purchaseDecisionResultSchema, remoteAreaSchema, residentNumberLike, retryPaymentRequestSchema, reviewPageSchema, reviewSummarySchema, shippingAddressInputSchema, signupRequestSchema, socialProviderSchema, startPaymentRequestSchema, storefrontStoreSchema, tokenPairSchema, trackingStageResponseSchema, updateCartItemRequestSchema, updateProfileRequestSchema, updateReviewRequestSchema, updateReviewResultSchema, wishlistAddResultSchema, withdrawRequestSchema, withdrawalBlockedDetailsSchema, writableReviewSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $n as StartPaymentRequest, An as CashReceiptRequest, Jn as PaymentStatus, Kn as PaymentOption, Qn as ShippingAddressInput, Rn as GuestInfo, q as createStorefrontClient, qn as PaymentStart } from "../index-D2WiGpwr.mjs";
|
|
2
2
|
//#region src/payments/index.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* 스토어프론트 결제 — 브라우저 전용(`@sayren/storefront-sdk/payments`).
|
package/package.json
CHANGED
package/src/schemas/catalog.ts
CHANGED
|
@@ -23,13 +23,38 @@ export const productCardSchema = z.object({
|
|
|
23
23
|
productId: z.string(),
|
|
24
24
|
name: z.string(),
|
|
25
25
|
thumbnailUrl: z.url().nullable().describe("대표 이미지 주소. 등록된 이미지가 없으면 null"),
|
|
26
|
-
salePrice: z
|
|
26
|
+
salePrice: z
|
|
27
|
+
.number()
|
|
28
|
+
.int()
|
|
29
|
+
.describe(
|
|
30
|
+
"판매가. 원(KRW) 단위 정수. 즉시할인이 없으면 구매자가 내는 한 개 가격(옵션 추가금 제외)이고, 즉시할인의 기준 가격이다",
|
|
31
|
+
),
|
|
27
32
|
discountedPrice: z
|
|
28
33
|
.number()
|
|
29
34
|
.int()
|
|
30
35
|
.nullable()
|
|
31
|
-
.describe(
|
|
32
|
-
|
|
36
|
+
.describe(
|
|
37
|
+
"즉시할인 적용가. 원 단위. 판매가에 즉시할인을 적용한 값이고, 있으면 이 값이 구매자가 내는 한 개 가격이다. 할인이 없으면 null",
|
|
38
|
+
),
|
|
39
|
+
discountRate: z
|
|
40
|
+
.number()
|
|
41
|
+
.int()
|
|
42
|
+
.nullable()
|
|
43
|
+
.describe(
|
|
44
|
+
"즉시할인율(%). 판매가 대비 `discountedPrice`의 할인율이다(정가 기준이 아니다). 할인이 없으면 null",
|
|
45
|
+
),
|
|
46
|
+
originalPrice: z
|
|
47
|
+
.number()
|
|
48
|
+
.int()
|
|
49
|
+
.nullable()
|
|
50
|
+
.optional()
|
|
51
|
+
.default(null)
|
|
52
|
+
.describe(
|
|
53
|
+
"정가(할인 전 표시 가격, 이슈 #82). 원 단위. 셀러가 상품에 적은 비교용 가격이고 결제 금액 계산에 쓰지 않는다. " +
|
|
54
|
+
"구매자가 내는 가격은 `discountedPrice ?? salePrice`다. 정가가 그 가격보다 클 때 「정가 취소선 + 할인율 + 판매가」로 보이면 되고, " +
|
|
55
|
+
"이때 할인율은 `round((1 - (discountedPrice ?? salePrice) / originalPrice) × 100)`이다. 판매가와 크기를 검증하지 않으므로 " +
|
|
56
|
+
"작거나 같으면 표시하지 않는다. 정하지 않았으면 null. 서버는 항상 싣는다",
|
|
57
|
+
),
|
|
33
58
|
freeShipping: z
|
|
34
59
|
.boolean()
|
|
35
60
|
.describe("무료배송 배지. 배송 상품이고 배송비가 무료일 때만 true다(배송이 없는 상품은 false)"),
|
package/src/schemas/inquiry.ts
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 상품 문의 유형(이슈 #85) — 관리 API 상품 문의의 `category`와 같은 값이다.
|
|
5
|
+
* `PRODUCT` 상품(사이즈·소재 등), `DELIVERY` 배송, `RETURN` 반품, `EXCHANGE` 교환, `ETC` 기타
|
|
6
|
+
*/
|
|
7
|
+
export const productInquiryCategorySchema = z.enum([
|
|
8
|
+
"PRODUCT",
|
|
9
|
+
"DELIVERY",
|
|
10
|
+
"RETURN",
|
|
11
|
+
"EXCHANGE",
|
|
12
|
+
"ETC",
|
|
13
|
+
]);
|
|
14
|
+
|
|
15
|
+
export type ProductInquiryCategory = z.infer<typeof productInquiryCategorySchema>;
|
|
16
|
+
|
|
3
17
|
export const publicInquirySchema = z.object({
|
|
4
18
|
inquiryId: z.string(),
|
|
5
19
|
content: z.string().nullable(),
|
|
@@ -13,6 +27,33 @@ export const publicInquirySchema = z.object({
|
|
|
13
27
|
})
|
|
14
28
|
.nullable(),
|
|
15
29
|
createdAt: z.string(),
|
|
30
|
+
// ── 이슈 #85: 어느 상품의 문의인지(「내 상품 문의」에서 상품으로 돌아가기)와 문의 유형. 옛 서버 응답에 없으면 기본값으로 읽는다 ──
|
|
31
|
+
productId: z
|
|
32
|
+
.string()
|
|
33
|
+
.nullable()
|
|
34
|
+
.optional()
|
|
35
|
+
.default(null)
|
|
36
|
+
.describe("문의한 상품 id. 서버는 항상 싣는다(옛 서버 응답이면 null)"),
|
|
37
|
+
productName: z
|
|
38
|
+
.string()
|
|
39
|
+
.nullable()
|
|
40
|
+
.optional()
|
|
41
|
+
.default(null)
|
|
42
|
+
.describe("문의한 상품의 지금 이름. 상품이 지워졌으면 null. 서버는 항상 싣는다"),
|
|
43
|
+
thumbnailUrl: z
|
|
44
|
+
.url()
|
|
45
|
+
.nullable()
|
|
46
|
+
.optional()
|
|
47
|
+
.default(null)
|
|
48
|
+
.describe(
|
|
49
|
+
"문의한 상품의 대표 이미지 주소. 이미지가 없거나 상품이 지워졌으면 null. 서버는 항상 싣는다",
|
|
50
|
+
),
|
|
51
|
+
category: productInquiryCategorySchema
|
|
52
|
+
.optional()
|
|
53
|
+
.default("PRODUCT")
|
|
54
|
+
.describe(
|
|
55
|
+
"문의 유형. `PRODUCT`(상품)·`DELIVERY`(배송)·`RETURN`(반품)·`EXCHANGE`(교환)·`ETC`(기타). 서버는 항상 싣는다",
|
|
56
|
+
),
|
|
16
57
|
});
|
|
17
58
|
|
|
18
59
|
export type PublicInquiry = z.infer<typeof publicInquirySchema>;
|
|
@@ -20,6 +61,11 @@ export type PublicInquiry = z.infer<typeof publicInquirySchema>;
|
|
|
20
61
|
export const createInquiryRequestSchema = z.object({
|
|
21
62
|
content: z.string().min(1).max(1000),
|
|
22
63
|
secret: z.boolean().default(false),
|
|
64
|
+
category: productInquiryCategorySchema
|
|
65
|
+
.optional()
|
|
66
|
+
.describe(
|
|
67
|
+
"문의 유형(이슈 #85). `PRODUCT`(상품)·`DELIVERY`(배송)·`RETURN`(반품)·`EXCHANGE`(교환)·`ETC`(기타). 생략하면 `PRODUCT`다",
|
|
68
|
+
),
|
|
23
69
|
});
|
|
24
70
|
|
|
25
71
|
export type CreateInquiryRequest = z.infer<typeof createInquiryRequestSchema>;
|
package/src/schemas/store.ts
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 사업자 정보 필드(이슈 #81) — 전자상거래법 표기(푸터)용이다. 셀러가 정하지 않았으면 null이고, 그 항목은 표시하지 않으면 된다.
|
|
5
|
+
* 옛 서버 응답에 없으면 null로 읽는다.
|
|
6
|
+
*/
|
|
7
|
+
const businessText = (description: string) =>
|
|
8
|
+
z
|
|
9
|
+
.string()
|
|
10
|
+
.nullable()
|
|
11
|
+
.optional()
|
|
12
|
+
.default(null)
|
|
13
|
+
.describe(`${description}. 정하지 않았으면 null. 서버는 항상 싣는다`);
|
|
14
|
+
|
|
3
15
|
/**
|
|
4
16
|
* 상점 공개 설정 — `GET /store`. 스토어프론트가 화면을 그릴 때 읽는 값만 담는다.
|
|
5
17
|
*/
|
|
@@ -9,6 +21,16 @@ export const storefrontStoreSchema = z.object({
|
|
|
9
21
|
logoUrl: z.string().nullable(),
|
|
10
22
|
customerCenterPhone: z.string().nullable(),
|
|
11
23
|
businessHours: z.string().nullable(),
|
|
24
|
+
businessName: businessText("상호(사업자등록증의 상호). 상점명(`name`)과 다를 수 있다"),
|
|
25
|
+
representativeName: businessText("대표자명"),
|
|
26
|
+
businessNumber: businessText(
|
|
27
|
+
"사업자등록번호. 관리 API로 저장한 값은 숫자 10자리(하이픈 없음)이고 표시할 때 `123-45-67890`으로 끊으면 된다",
|
|
28
|
+
),
|
|
29
|
+
mailOrderSalesNumber: businessText("통신판매업 신고번호. 셀러가 적은 그대로다"),
|
|
30
|
+
businessAddress: businessText("사업장 주소"),
|
|
31
|
+
customerCenterEmail: businessText("고객센터 이메일"),
|
|
32
|
+
privacyOfficerName: businessText("개인정보 보호책임자 성명"),
|
|
33
|
+
privacyOfficerEmail: businessText("개인정보 보호책임자 이메일"),
|
|
12
34
|
/**
|
|
13
35
|
* 비회원 주문 허용. false면 로그인하지 않은 구매자의 주문서 생성·결제 요청이 403 `GUEST_CHECKOUT_DISABLED`다.
|
|
14
36
|
* 장바구니 담기는 된다 — 주문 버튼을 로그인 안내로 바꾸면 된다
|