@sayren/storefront-sdk 0.20.4 → 0.20.6
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-D-cg8lLE.mjs → checkout-CE-r7SFw.mjs} +1 -0
- package/dist/{client-BTADfYXV.mjs → client-D8DDKutm.mjs} +36 -3
- package/dist/{index-BC2ogdyl.d.mts → index-Ca0AyapE.d.mts} +49 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/payments/index.d.mts +1 -1
- package/dist/payments/index.mjs +1 -1
- package/package.json +1 -1
- package/src/client.ts +2 -1
- package/src/index.ts +1 -0
- package/src/schemas/cart.ts +9 -0
- package/src/schemas/catalog.ts +17 -0
- package/src/schemas/checkout.ts +5 -0
- package/src/schemas/claim.ts +7 -0
- package/src/schemas/commerce-number.ts +28 -0
- package/src/schemas/order.ts +7 -0
package/dist/auth/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mt as ApiError, t as createStorefrontClient } from "../client-D8DDKutm.mjs";
|
|
2
2
|
//#region src/auth/index.ts
|
|
3
3
|
/** 소셜 로그인 실패 — 구매자가 취소했거나(`access_denied`) state가 맞지 않는다 */
|
|
4
4
|
var IdpCallbackError = class extends Error {
|
|
@@ -283,6 +283,7 @@ const checkoutSessionSchema = z.object({
|
|
|
283
283
|
lineId: z.string().optional().describe("주문서 줄 id(이슈 #59). 같은 `optionId`가 추가 선택·직접 입력이 달라 여러 줄에 나올 수 있어, 상품 쿠폰을 걸 줄은 이 값으로 지목한다. 서버는 항상 싣는다"),
|
|
284
284
|
productId: z.string(),
|
|
285
285
|
productName: z.string(),
|
|
286
|
+
thumbnailUrl: z.url().nullable().optional().describe("주문서 시점의 상품 대표 이미지. 없으면 null(이슈 #114). 옛 서버는 싣지 않는다"),
|
|
286
287
|
/** variantId. 옵션 없는 상품은 default variant id */
|
|
287
288
|
optionId: z.string().nullable(),
|
|
288
289
|
optionName: z.string().nullable(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ANALYTICS_VISITOR_HEADER, r as ANALYTICS_SESSION_HEADER } from "./analytics-CgD70OqH.mjs";
|
|
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-
|
|
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-CE-r7SFw.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/http.ts
|
|
5
5
|
/** 표준 엔벨로프의 $.error 상세 */
|
|
@@ -239,6 +239,7 @@ const linkIdentityRequestSchema = z.object({
|
|
|
239
239
|
const cartItemSchema = z.object({
|
|
240
240
|
cartItemId: z.string(),
|
|
241
241
|
productId: z.string(),
|
|
242
|
+
productNo: z.number().int().nullable().optional().default(null).describe("상품번호(이슈 #107) — 상품 주소(`/products/{productNo}`)에 씁니다. 장바구니 요청에는 계속 `productId`를 보냅니다. 옛 응답은 null"),
|
|
242
243
|
productName: z.string(),
|
|
243
244
|
thumbnailUrl: z.url().nullable().describe("담은 상품의 대표 이미지. 없으면 null"),
|
|
244
245
|
optionId: z.string().nullable(),
|
|
@@ -318,6 +319,7 @@ const categoryNodeSchema = z.lazy(() => z.object({
|
|
|
318
319
|
}));
|
|
319
320
|
const productCardSchema = z.object({
|
|
320
321
|
productId: z.string(),
|
|
322
|
+
productNo: z.number().int().nullable().optional().default(null).describe("상품번호(이슈 #107) — 상점별 1부터 증가하는 숫자, 상점 안에서 유일, 생성 후 바뀌지 않습니다. 상품 주소에 쓰십시오(`GET /products/{productNo}`). 번호 체계 이전 응답은 null"),
|
|
321
323
|
name: z.string(),
|
|
322
324
|
thumbnailUrl: z.url().nullable().describe("대표 이미지 주소. 등록된 이미지가 없으면 null"),
|
|
323
325
|
salePrice: z.number().int().describe("판매가. 원(KRW) 단위 정수. 즉시할인이 없으면 구매자가 내는 한 개 가격(옵션 추가금 제외)이고, 즉시할인의 기준 가격이다"),
|
|
@@ -345,6 +347,7 @@ const productDetailSchema = productCardSchema.extend({
|
|
|
345
347
|
/** 판매 단위(SKU). variantId는 카트·주문의 optionId와 같은 값 공간이다 */
|
|
346
348
|
variants: z.array(z.object({
|
|
347
349
|
variantId: z.string(),
|
|
350
|
+
variantNo: z.string().nullable().optional().default(null).describe("조합 번호(이슈 #107) — `{productNo}-{조합 순번 2자리}`(예: `10482-03`). 시스템이 매기는 SKU이고 상점 안에서 유일합니다. 생성 후 바뀌지 않으며, 지운 조합의 번호는 다시 쓰지 않습니다. 셀러가 입력하는 `sku`와 별개입니다"),
|
|
348
351
|
/** optionGroups 순서와 1:1 대응. 옵션 없는 상품은 [] */
|
|
349
352
|
valueIds: z.array(z.string()),
|
|
350
353
|
/** 값 이름을 " / "로 이은 표시명. 옵션 없으면 "" */
|
|
@@ -421,6 +424,31 @@ const storefrontCollectionListQuerySchema = z.object({
|
|
|
421
424
|
size: z.string().optional().describe("페이지 크기 (기본 20, 최대 100)")
|
|
422
425
|
});
|
|
423
426
|
//#endregion
|
|
427
|
+
//#region src/schemas/commerce-number.ts
|
|
428
|
+
/**
|
|
429
|
+
* 국내 쇼핑몰 번호 체계(이슈 #107) — 공개 ID(`ord_…` 등)와 따로 싣는 숫자 번호의 표기·필드.
|
|
430
|
+
* 번호는 서버가 만들고 생성 후 바뀌지 않는다. 새 필드라 옛 서버 응답에는 없다 — 파싱은 null로 채운다.
|
|
431
|
+
*/
|
|
432
|
+
/**
|
|
433
|
+
* 번호 표기 — 숫자를 앞에서부터 4자리씩 하이픈으로 나눈다. 주문번호 `26100284731592` → `2610-0284-7315-92`,
|
|
434
|
+
* 상품주문번호 `2610028473159201` → `2610-0284-7315-9201`. 숫자만으로 된 값이 아니면(클레임번호 `C…`) 그대로, 없으면 빈 문자열이다.
|
|
435
|
+
* 화면 표기 전용이다 — API에 보낼 때는 원래 값을 쓴다(주문번호 조회는 하이픈도 받는다)
|
|
436
|
+
*/
|
|
437
|
+
function formatOrderNo(no) {
|
|
438
|
+
if (!no) return "";
|
|
439
|
+
if (!/^\d+$/.test(no)) return no;
|
|
440
|
+
return no.match(/.{1,4}/g)?.join("-") ?? no;
|
|
441
|
+
}
|
|
442
|
+
/** 표기 하이픈·공백을 지운 숫자 번호. 숫자가 아닌 글자가 남거나 비면 null */
|
|
443
|
+
function parseOrderNo(value) {
|
|
444
|
+
const digits = value.replace(/[\s-]/g, "");
|
|
445
|
+
return /^\d+$/.test(digits) ? digits : null;
|
|
446
|
+
}
|
|
447
|
+
/** 응답 번호 필드 — 서버는 항상 싣고, 번호 체계 이전 행(백필 전)·옛 서버 응답은 null이다 */
|
|
448
|
+
function commerceNumberField(description) {
|
|
449
|
+
return z.string().nullable().optional().default(null).describe(description);
|
|
450
|
+
}
|
|
451
|
+
//#endregion
|
|
424
452
|
//#region src/schemas/claim.ts
|
|
425
453
|
const claimTypeSchema = z.enum([
|
|
426
454
|
"CANCEL",
|
|
@@ -445,6 +473,7 @@ const createClaimRequestSchema = z.object({
|
|
|
445
473
|
});
|
|
446
474
|
const createClaimResultSchema = z.object({
|
|
447
475
|
claimId: z.string(),
|
|
476
|
+
claimNo: commerceNumberField("클레임번호(이슈 #107) — `C` + YYMMDD(KST) + 숫자 8자리. 취소·반품·교환 접수 단위 번호이고 생성 후 바뀌지 않습니다"),
|
|
448
477
|
status: z.literal("REQUESTED"),
|
|
449
478
|
expectedRefundAmount: z.number().int().nullable().describe("예상 환불액 — 수량 비율 상품 실결제 금액(쿠폰 할인을 뺀 금액) − 반품 배송비 − 조건부 무료배송 미달 차감 − 쿠폰 조건 미달 차감(`couponChargeAmount`) + 되돌릴 쿠폰 차감. **배송비 환불은 여기 포함되지 않고 `deliveryFeeRefundAmount`로 따로 온다**(승인 시점의 배송 묶음 상태로 확정되기 때문이다). 교환은 환불이 없어 null이다"),
|
|
450
479
|
claimDeliveryFee: z.number().int().describe("구매자가 부담하는 반품·교환 배송비. 원 단위"),
|
|
@@ -471,6 +500,7 @@ const claimReturnAddressSchema = z.object({
|
|
|
471
500
|
});
|
|
472
501
|
const myClaimSchema = z.object({
|
|
473
502
|
claimId: z.string(),
|
|
503
|
+
claimNo: commerceNumberField("클레임번호(이슈 #107) — `C` + YYMMDD(KST) + 숫자 8자리. 취소·반품·교환 접수 단위 번호이고 생성 후 바뀌지 않습니다"),
|
|
474
504
|
type: claimTypeSchema,
|
|
475
505
|
status: claimStatusSchema,
|
|
476
506
|
orderItemId: z.string(),
|
|
@@ -660,6 +690,7 @@ const wishlistAddResultSchema = z.object({
|
|
|
660
690
|
//#region src/schemas/order.ts
|
|
661
691
|
const myOrderItemSchema = z.object({
|
|
662
692
|
orderItemId: z.string(),
|
|
693
|
+
orderItemNo: commerceNumberField("상품주문번호(이슈 #107) — 주문번호 + 줄 순번 2자리. 취소·반품·교환 문의에 쓰는 번호입니다"),
|
|
663
694
|
productId: z.string(),
|
|
664
695
|
productName: z.string(),
|
|
665
696
|
thumbnailUrl: z.url().nullable().describe("주문 시점의 대표 이미지. 없었으면 null"),
|
|
@@ -697,6 +728,7 @@ const orderShippingAddressSchema = z.object({
|
|
|
697
728
|
});
|
|
698
729
|
const myOrderSchema = z.object({
|
|
699
730
|
orderId: z.string(),
|
|
731
|
+
orderNo: commerceNumberField("주문번호(이슈 #107) — 숫자 14자리, 생성 후 바뀌지 않습니다. 구매자 화면에는 `formatOrderNo`(4자리 하이픈)로 표시하십시오. 비회원 주문 조회 경로에도 쓸 수 있습니다"),
|
|
700
732
|
orderedAt: z.string(),
|
|
701
733
|
items: z.array(myOrderItemSchema),
|
|
702
734
|
requiresShipping: z.boolean().describe("택배 배송이 필요한 주문상품이 있는가. false면 `shippingAddress`는 주문자 이름·연락처만 있고 주소는 빈 문자열이다"),
|
|
@@ -1014,6 +1046,7 @@ get: () => http.request("GET", "/store", storefrontStoreSchema) },
|
|
|
1014
1046
|
/** `GET /point-policy` — 상점 적립 정책(리뷰·구매 적립, 유효 기간, 리뷰 작성·수정 기한, #93). 리뷰 혜택 안내에 쓴다 */
|
|
1015
1047
|
getPointPolicy: () => http.request("GET", "/point-policy", storefrontPointPolicySchema),
|
|
1016
1048
|
searchProducts: (params) => http.request("GET", "/products", productPageSchema, { query: params }),
|
|
1049
|
+
/** `GET /products/{productId}` — 상품 id(`prod_…`) 또는 숫자 상품번호(`productNo`, 이슈 #107). 번호는 문자열로 넘긴다 */
|
|
1017
1050
|
getProduct: (productId) => http.request("GET", path`/products/${productId}`, productDetailSchema),
|
|
1018
1051
|
/** 상품 리뷰 목록 — `variantId`로 옵션(조합)별 리뷰만 받는다(상품 상세 `variants[].variantId`) */
|
|
1019
1052
|
listProductReviews: (productId, params) => http.request("GET", path`/products/${productId}/reviews`, reviewPageSchema, { query: params }),
|
|
@@ -1086,7 +1119,7 @@ get: () => http.request("GET", "/store", storefrontStoreSchema) },
|
|
|
1086
1119
|
list: (params) => http.request("GET", "/me/orders", pageSchema(myOrderSchema), { query: params }),
|
|
1087
1120
|
get: (orderId) => http.request("GET", path`/me/orders/${orderId}`, myOrderSchema),
|
|
1088
1121
|
/**
|
|
1089
|
-
* 비회원 주문 조회 — 주문번호 + 주문할 때 적은 연락처·주문 조회 비밀번호.
|
|
1122
|
+
* 비회원 주문 조회 — 주문 id(`ord_…`) 또는 숫자 주문번호(`orderNo`, 하이픈 허용, 이슈 #107) + 주문할 때 적은 연락처·주문 조회 비밀번호.
|
|
1090
1123
|
*
|
|
1091
1124
|
* 에러: 404 `ORDER_NOT_FOUND`(주문이 없거나 연락처·비밀번호가 다름 — 둘을 구분하지 않는다) ·
|
|
1092
1125
|
* 429 `TOO_MANY_REQUESTS`(주문번호마다 10분에 5번까지 확인하고, 5번째가 틀리면 30분 잠금.
|
|
@@ -1148,4 +1181,4 @@ get: () => http.request("GET", "/store", storefrontStoreSchema) },
|
|
|
1148
1181
|
};
|
|
1149
1182
|
}
|
|
1150
1183
|
//#endregion
|
|
1151
|
-
export {
|
|
1184
|
+
export { categoryNodeSchema as $, wishlistAddResultSchema as A, withdrawRequestSchema as At, consentSourceSchema as B, orderShippingAddressSchema as C, idpTokenRequestSchema as Ct, memberAddressSchema as D, signupRequestSchema as Dt, memberAddressRequestSchema as E, memberIdentitiesSchema as Et, createCustomerInquiryRequestSchema as F, unwrapData as Ft, claimReturnAddressSchema as G, consentUpdateRequestSchema as H, customerInquiryCategorySchema as I, createClaimResultSchema as J, claimTypeSchema as K, customerInquirySchema as L, createInquiryResultSchema as M, ApiError as Mt, productInquiryCategorySchema as N, buildQuery as Nt, memberSchema as O, socialProviderSchema as Ot, publicInquirySchema as P, toApiError as Pt, parseOrderNo as Q, consentActionSchema as R, myOrderSchema as S, idpAuthorizeResponseSchema as St, trackingStageResponseSchema as T, loginRequestSchema as Tt, memberConsentsSchema as U, consentStateSchema as V, claimReasonSchema as W, commerceNumberField as X, myClaimSchema as Y, formatOrderNo as Z, memberPointEntrySchema as _, cartSchema as _t, myReviewSchema as a, productFacetsSchema as at, deliveryTrackingSchema as b, idpAgreementsSchema as bt, publicReviewSchema as c, storefrontCollectionDetailSchema as ct, reviewSummarySchema as d, claimStatusSchema as dt, collectionProductPageSchema as et, updateReviewRequestSchema as f, orderItemStatusSchema as ft, memberPointEntryPageSchema as g, cartItemSchema as gt, writableReviewSchema as h, addCartItemRequestSchema as ht, createReviewResultSchema as i, productDetailSchema as it, createInquiryRequestSchema as j, withdrawalBlockedDetailsSchema as jt, updateProfileRequestSchema as k, tokenPairSchema as kt, reviewImageUploadRequestSchema as l, storefrontCollectionListQuerySchema as lt, uploadTicketSchema as m, pageSchema as mt, storefrontStoreSchema as n, collectionProductSortSchema as nt, productReviewQuerySchema as o, productPageSchema as ot, updateReviewResultSchema as p, pageInfoSchema as pt, createClaimRequestSchema as q, createReviewRequestSchema as r, productCardSchema as rt, productReviewSortSchema as s, productSortSchema as st, createStorefrontClient as t, collectionProductQuerySchema as tt, reviewPageSchema as u, storefrontCollectionSchema as ut, memberPointsSchema as v, updateCartItemRequestSchema as vt, purchaseDecisionResultSchema as w, linkIdentityRequestSchema as wt, myOrderItemSchema as x, idpAuthorizeRequestSchema as xt, storefrontPointPolicySchema as y, anonymousSessionSchema as yt, consentKindSchema as z };
|
|
@@ -43,6 +43,7 @@ declare const cartItemSchema: z.ZodObject<{
|
|
|
43
43
|
}, z.core.$strip>>>>;
|
|
44
44
|
cartItemId: z.ZodString;
|
|
45
45
|
productId: z.ZodString;
|
|
46
|
+
productNo: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
46
47
|
productName: z.ZodString;
|
|
47
48
|
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
48
49
|
optionId: z.ZodNullable<z.ZodString>;
|
|
@@ -77,6 +78,7 @@ declare const cartSchema: z.ZodObject<{
|
|
|
77
78
|
}, z.core.$strip>>>>;
|
|
78
79
|
cartItemId: z.ZodString;
|
|
79
80
|
productId: z.ZodString;
|
|
81
|
+
productNo: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
80
82
|
productName: z.ZodString;
|
|
81
83
|
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
82
84
|
optionId: z.ZodNullable<z.ZodString>;
|
|
@@ -236,6 +238,7 @@ interface CategoryNode {
|
|
|
236
238
|
declare const categoryNodeSchema: z.ZodType<CategoryNode>;
|
|
237
239
|
declare const productCardSchema: z.ZodObject<{
|
|
238
240
|
productId: z.ZodString;
|
|
241
|
+
productNo: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
239
242
|
name: z.ZodString;
|
|
240
243
|
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
241
244
|
salePrice: z.ZodNumber;
|
|
@@ -254,6 +257,7 @@ declare const productCardSchema: z.ZodObject<{
|
|
|
254
257
|
type ProductCard = z.infer<typeof productCardSchema>;
|
|
255
258
|
declare const productDetailSchema: z.ZodObject<{
|
|
256
259
|
productId: z.ZodString;
|
|
260
|
+
productNo: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
257
261
|
name: z.ZodString;
|
|
258
262
|
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
259
263
|
salePrice: z.ZodNumber;
|
|
@@ -276,6 +280,7 @@ declare const productDetailSchema: z.ZodObject<{
|
|
|
276
280
|
}, z.core.$strip>>;
|
|
277
281
|
variants: z.ZodArray<z.ZodObject<{
|
|
278
282
|
variantId: z.ZodString;
|
|
283
|
+
variantNo: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
279
284
|
valueIds: z.ZodArray<z.ZodString>;
|
|
280
285
|
name: z.ZodString;
|
|
281
286
|
additionalPrice: z.ZodNumber;
|
|
@@ -365,6 +370,7 @@ declare const productPageSchema: z.ZodObject<{
|
|
|
365
370
|
totalPages: z.ZodNumber;
|
|
366
371
|
contents: z.ZodArray<z.ZodObject<{
|
|
367
372
|
productId: z.ZodString;
|
|
373
|
+
productNo: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
368
374
|
name: z.ZodString;
|
|
369
375
|
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
370
376
|
salePrice: z.ZodNumber;
|
|
@@ -462,6 +468,7 @@ declare const collectionProductPageSchema: z.ZodObject<{
|
|
|
462
468
|
totalPages: z.ZodNumber;
|
|
463
469
|
contents: z.ZodArray<z.ZodObject<{
|
|
464
470
|
productId: z.ZodString;
|
|
471
|
+
productNo: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
465
472
|
name: z.ZodString;
|
|
466
473
|
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
467
474
|
salePrice: z.ZodNumber;
|
|
@@ -558,6 +565,7 @@ declare const checkoutSessionSchema: z.ZodObject<{
|
|
|
558
565
|
lineId: z.ZodOptional<z.ZodString>;
|
|
559
566
|
productId: z.ZodString;
|
|
560
567
|
productName: z.ZodString;
|
|
568
|
+
thumbnailUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
561
569
|
optionId: z.ZodNullable<z.ZodString>;
|
|
562
570
|
optionName: z.ZodNullable<z.ZodString>;
|
|
563
571
|
}, z.core.$strip>>;
|
|
@@ -1205,6 +1213,7 @@ declare const createClaimRequestSchema: z.ZodObject<{
|
|
|
1205
1213
|
type CreateClaimRequest = z.infer<typeof createClaimRequestSchema>;
|
|
1206
1214
|
declare const createClaimResultSchema: z.ZodObject<{
|
|
1207
1215
|
claimId: z.ZodString;
|
|
1216
|
+
claimNo: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1208
1217
|
status: z.ZodLiteral<"REQUESTED">;
|
|
1209
1218
|
expectedRefundAmount: z.ZodNullable<z.ZodNumber>;
|
|
1210
1219
|
claimDeliveryFee: z.ZodNumber;
|
|
@@ -1233,6 +1242,7 @@ declare const claimReturnAddressSchema: z.ZodObject<{
|
|
|
1233
1242
|
type ClaimReturnAddress = z.infer<typeof claimReturnAddressSchema>;
|
|
1234
1243
|
declare const myClaimSchema: z.ZodObject<{
|
|
1235
1244
|
claimId: z.ZodString;
|
|
1245
|
+
claimNo: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1236
1246
|
type: z.ZodEnum<{
|
|
1237
1247
|
RETURN: "RETURN";
|
|
1238
1248
|
EXCHANGE: "EXCHANGE";
|
|
@@ -2053,6 +2063,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2053
2063
|
totalPages: number;
|
|
2054
2064
|
contents: {
|
|
2055
2065
|
productId: string;
|
|
2066
|
+
productNo: number | null;
|
|
2056
2067
|
name: string;
|
|
2057
2068
|
thumbnailUrl: string | null;
|
|
2058
2069
|
salePrice: number;
|
|
@@ -2080,8 +2091,10 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2080
2091
|
} | undefined;
|
|
2081
2092
|
} | undefined;
|
|
2082
2093
|
}>;
|
|
2094
|
+
/** `GET /products/{productId}` — 상품 id(`prod_…`) 또는 숫자 상품번호(`productNo`, 이슈 #107). 번호는 문자열로 넘긴다 */
|
|
2083
2095
|
getProduct: (productId: string) => Promise<{
|
|
2084
2096
|
productId: string;
|
|
2097
|
+
productNo: number | null;
|
|
2085
2098
|
name: string;
|
|
2086
2099
|
thumbnailUrl: string | null;
|
|
2087
2100
|
salePrice: number;
|
|
@@ -2104,6 +2117,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2104
2117
|
}[];
|
|
2105
2118
|
variants: {
|
|
2106
2119
|
variantId: string;
|
|
2120
|
+
variantNo: string | null;
|
|
2107
2121
|
valueIds: string[];
|
|
2108
2122
|
name: string;
|
|
2109
2123
|
additionalPrice: number;
|
|
@@ -2235,6 +2249,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2235
2249
|
totalPages: number;
|
|
2236
2250
|
contents: {
|
|
2237
2251
|
productId: string;
|
|
2252
|
+
productNo: number | null;
|
|
2238
2253
|
name: string;
|
|
2239
2254
|
thumbnailUrl: string | null;
|
|
2240
2255
|
salePrice: number;
|
|
@@ -2277,6 +2292,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2277
2292
|
}[];
|
|
2278
2293
|
cartItemId: string;
|
|
2279
2294
|
productId: string;
|
|
2295
|
+
productNo: number | null;
|
|
2280
2296
|
productName: string;
|
|
2281
2297
|
thumbnailUrl: string | null;
|
|
2282
2298
|
optionId: string | null;
|
|
@@ -2313,6 +2329,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2313
2329
|
}[];
|
|
2314
2330
|
cartItemId: string;
|
|
2315
2331
|
productId: string;
|
|
2332
|
+
productNo: number | null;
|
|
2316
2333
|
productName: string;
|
|
2317
2334
|
thumbnailUrl: string | null;
|
|
2318
2335
|
optionId: string | null;
|
|
@@ -2349,6 +2366,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2349
2366
|
}[];
|
|
2350
2367
|
cartItemId: string;
|
|
2351
2368
|
productId: string;
|
|
2369
|
+
productNo: number | null;
|
|
2352
2370
|
productName: string;
|
|
2353
2371
|
thumbnailUrl: string | null;
|
|
2354
2372
|
optionId: string | null;
|
|
@@ -2390,6 +2408,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2390
2408
|
optionId: string | null;
|
|
2391
2409
|
optionName: string | null;
|
|
2392
2410
|
lineId?: string | undefined;
|
|
2411
|
+
thumbnailUrl?: string | null | undefined;
|
|
2393
2412
|
}[];
|
|
2394
2413
|
amounts: {
|
|
2395
2414
|
productAmount: number;
|
|
@@ -2675,6 +2694,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2675
2694
|
totalPages: number;
|
|
2676
2695
|
contents: {
|
|
2677
2696
|
orderId: string;
|
|
2697
|
+
orderNo: string | null;
|
|
2678
2698
|
orderedAt: string;
|
|
2679
2699
|
items: {
|
|
2680
2700
|
quantity: number;
|
|
@@ -2710,6 +2730,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2710
2730
|
value: string;
|
|
2711
2731
|
}[];
|
|
2712
2732
|
orderItemId: string;
|
|
2733
|
+
orderItemNo: string | null;
|
|
2713
2734
|
productId: string;
|
|
2714
2735
|
productName: string;
|
|
2715
2736
|
thumbnailUrl: string | null;
|
|
@@ -2746,6 +2767,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2746
2767
|
}>;
|
|
2747
2768
|
get: (orderId: string) => Promise<{
|
|
2748
2769
|
orderId: string;
|
|
2770
|
+
orderNo: string | null;
|
|
2749
2771
|
orderedAt: string;
|
|
2750
2772
|
items: {
|
|
2751
2773
|
quantity: number;
|
|
@@ -2781,6 +2803,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2781
2803
|
value: string;
|
|
2782
2804
|
}[];
|
|
2783
2805
|
orderItemId: string;
|
|
2806
|
+
orderItemNo: string | null;
|
|
2784
2807
|
productId: string;
|
|
2785
2808
|
productName: string;
|
|
2786
2809
|
thumbnailUrl: string | null;
|
|
@@ -2815,7 +2838,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2815
2838
|
testPayment: boolean;
|
|
2816
2839
|
}>;
|
|
2817
2840
|
/**
|
|
2818
|
-
* 비회원 주문 조회 — 주문번호 + 주문할 때 적은 연락처·주문 조회 비밀번호.
|
|
2841
|
+
* 비회원 주문 조회 — 주문 id(`ord_…`) 또는 숫자 주문번호(`orderNo`, 하이픈 허용, 이슈 #107) + 주문할 때 적은 연락처·주문 조회 비밀번호.
|
|
2819
2842
|
*
|
|
2820
2843
|
* 에러: 404 `ORDER_NOT_FOUND`(주문이 없거나 연락처·비밀번호가 다름 — 둘을 구분하지 않는다) ·
|
|
2821
2844
|
* 429 `TOO_MANY_REQUESTS`(주문번호마다 10분에 5번까지 확인하고, 5번째가 틀리면 30분 잠금.
|
|
@@ -2828,6 +2851,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2828
2851
|
orderPassword: string;
|
|
2829
2852
|
}) => Promise<{
|
|
2830
2853
|
orderId: string;
|
|
2854
|
+
orderNo: string | null;
|
|
2831
2855
|
orderedAt: string;
|
|
2832
2856
|
items: {
|
|
2833
2857
|
quantity: number;
|
|
@@ -2863,6 +2887,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2863
2887
|
value: string;
|
|
2864
2888
|
}[];
|
|
2865
2889
|
orderItemId: string;
|
|
2890
|
+
orderItemNo: string | null;
|
|
2866
2891
|
productId: string;
|
|
2867
2892
|
productName: string;
|
|
2868
2893
|
thumbnailUrl: string | null;
|
|
@@ -2915,6 +2940,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2915
2940
|
myClaims: {
|
|
2916
2941
|
create: (orderItemId: string, body: CreateClaimRequest) => Promise<{
|
|
2917
2942
|
claimId: string;
|
|
2943
|
+
claimNo: string | null;
|
|
2918
2944
|
status: "REQUESTED";
|
|
2919
2945
|
expectedRefundAmount: number | null;
|
|
2920
2946
|
claimDeliveryFee: number;
|
|
@@ -2933,6 +2959,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
2933
2959
|
totalPages: number;
|
|
2934
2960
|
contents: {
|
|
2935
2961
|
claimId: string;
|
|
2962
|
+
claimNo: string | null;
|
|
2936
2963
|
type: "RETURN" | "EXCHANGE" | "CANCEL";
|
|
2937
2964
|
status: "COMPLETED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "REJECTED" | "WITHDRAWN";
|
|
2938
2965
|
orderItemId: string;
|
|
@@ -3070,6 +3097,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
3070
3097
|
totalPages: number;
|
|
3071
3098
|
contents: {
|
|
3072
3099
|
productId: string;
|
|
3100
|
+
productNo: number | null;
|
|
3073
3101
|
name: string;
|
|
3074
3102
|
thumbnailUrl: string | null;
|
|
3075
3103
|
salePrice: number;
|
|
@@ -3357,6 +3385,22 @@ type AnalyticsBatch = z.infer<typeof analyticsBatchSchema>;
|
|
|
3357
3385
|
/** 배치 본문 상한(바이트) — 서버가 넘는 요청을 거부한다 */
|
|
3358
3386
|
declare const ANALYTICS_MAX_BATCH_BYTES: number;
|
|
3359
3387
|
//#endregion
|
|
3388
|
+
//#region src/schemas/commerce-number.d.ts
|
|
3389
|
+
/**
|
|
3390
|
+
* 국내 쇼핑몰 번호 체계(이슈 #107) — 공개 ID(`ord_…` 등)와 따로 싣는 숫자 번호의 표기·필드.
|
|
3391
|
+
* 번호는 서버가 만들고 생성 후 바뀌지 않는다. 새 필드라 옛 서버 응답에는 없다 — 파싱은 null로 채운다.
|
|
3392
|
+
*/
|
|
3393
|
+
/**
|
|
3394
|
+
* 번호 표기 — 숫자를 앞에서부터 4자리씩 하이픈으로 나눈다. 주문번호 `26100284731592` → `2610-0284-7315-92`,
|
|
3395
|
+
* 상품주문번호 `2610028473159201` → `2610-0284-7315-9201`. 숫자만으로 된 값이 아니면(클레임번호 `C…`) 그대로, 없으면 빈 문자열이다.
|
|
3396
|
+
* 화면 표기 전용이다 — API에 보낼 때는 원래 값을 쓴다(주문번호 조회는 하이픈도 받는다)
|
|
3397
|
+
*/
|
|
3398
|
+
declare function formatOrderNo(no: string | null | undefined): string;
|
|
3399
|
+
/** 표기 하이픈·공백을 지운 숫자 번호. 숫자가 아닌 글자가 남거나 비면 null */
|
|
3400
|
+
declare function parseOrderNo(value: string): string | null;
|
|
3401
|
+
/** 응답 번호 필드 — 서버는 항상 싣고, 번호 체계 이전 행(백필 전)·옛 서버 응답은 null이다 */
|
|
3402
|
+
declare function commerceNumberField(description: string): z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3403
|
+
//#endregion
|
|
3360
3404
|
//#region src/schemas/order.d.ts
|
|
3361
3405
|
declare const myOrderItemSchema: z.ZodObject<{
|
|
3362
3406
|
quantity: z.ZodNumber;
|
|
@@ -3408,6 +3452,7 @@ declare const myOrderItemSchema: z.ZodObject<{
|
|
|
3408
3452
|
value: z.ZodString;
|
|
3409
3453
|
}, z.core.$strip>>>>;
|
|
3410
3454
|
orderItemId: z.ZodString;
|
|
3455
|
+
orderItemNo: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3411
3456
|
productId: z.ZodString;
|
|
3412
3457
|
productName: z.ZodString;
|
|
3413
3458
|
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
@@ -3430,6 +3475,7 @@ declare const orderShippingAddressSchema: z.ZodObject<{
|
|
|
3430
3475
|
type OrderShippingAddress = z.infer<typeof orderShippingAddressSchema>;
|
|
3431
3476
|
declare const myOrderSchema: z.ZodObject<{
|
|
3432
3477
|
orderId: z.ZodString;
|
|
3478
|
+
orderNo: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3433
3479
|
orderedAt: z.ZodString;
|
|
3434
3480
|
items: z.ZodArray<z.ZodObject<{
|
|
3435
3481
|
quantity: z.ZodNumber;
|
|
@@ -3481,6 +3527,7 @@ declare const myOrderSchema: z.ZodObject<{
|
|
|
3481
3527
|
value: z.ZodString;
|
|
3482
3528
|
}, z.core.$strip>>>>;
|
|
3483
3529
|
orderItemId: z.ZodString;
|
|
3530
|
+
orderItemNo: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
3484
3531
|
productId: z.ZodString;
|
|
3485
3532
|
productName: z.ZodString;
|
|
3486
3533
|
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
@@ -3729,4 +3776,4 @@ declare const storefrontStoreSchema: z.ZodObject<{
|
|
|
3729
3776
|
}, z.core.$strip>;
|
|
3730
3777
|
type StorefrontStore = z.infer<typeof storefrontStoreSchema>;
|
|
3731
3778
|
//#endregion
|
|
3732
|
-
export {
|
|
3779
|
+
export { analyticsIdSchema as $, CheckoutSession as $n, CollectionProductParams as $r, CreateCustomerInquiryRequest as $t, PurchaseDecisionResult as A, MyOrderItemFulfillmentSnapshot as Ai, consentKindSchema as An, createCheckoutRequestSchema as Ar, reviewSummarySchema as At, ANALYTICS_MAX_BATCH_BYTES as B, CartItem as Bi, MyClaim as Bn, paymentOptionListSchema as Br, memberAddressRequestSchema as Bt, memberPointEntrySchema as C, PageInfo as Ci, ConsentAction as Cn, availablePaymentOptionSchema as Cr, createReviewResultSchema as Ct, MyOrder as D, pageInfoSchema as Di, ConsentUpdateRequest as Dn, cashReceiptTypeSchema as Dr, publicReviewSchema as Dt, DeliveryTracking as E, orderItemStatusSchema as Ei, ConsentState as En, cashReceiptRequestSchema as Er, productReviewSortSchema as Et, purchaseDecisionResultSchema as F, myOrderItemFulfillmentSnapshotSchema as Fi, ClaimReason as Fn, guestInfoSchema as Fr, Member as Ft, AnalyticsBatch as G, updateCartItemRequestSchema as Gi, createClaimResultSchema as Gn, remoteAreaSchema as Gr, CreateInquiryRequest as Gt, ANALYTICS_SESSION_HEADER as H, addCartItemRequestSchema as Hi, claimReturnAddressSchema as Hn, paymentStartSchema as Hr, memberSchema as Ht, trackingStageResponseSchema as I, productCardFulfillmentSchema as Ii, ClaimReturnAddress as In, paymentFailureCategorySchema as Ir, MemberAddress as It, AnalyticsEventName as J, CASH_RECEIPT_METHODS as Jn, retryPaymentRequestSchema as Jr, PublicInquiry as Jt, AnalyticsClientEvent as K, analyticsIdsFromCookie as Ki, myClaimSchema as Kn, residentNumberLike as Kr, CreateInquiryResult as Kt, commerceNumberField as L, productFulfillmentViewSchema as Li, ClaimType as Ln, paymentMessageSchema as Lr, MemberAddressRequest as Lt, myOrderItemSchema as M, ProductFulfillmentView as Mi, consentStateSchema as Mn, deliveryQuoteSchema as Mr, updateReviewResultSchema as Mt, myOrderSchema as N, UnknownFulfillmentView as Ni, consentUpdateRequestSchema as Nn, easyPayProviderResponseSchema as Nr, uploadTicketSchema as Nt, MyOrderItem as O, pageSchema as Oi, MemberConsents as On, checkoutDeliverySchema as Or, reviewImageUploadRequestSchema as Ot, orderShippingAddressSchema as P, lineFulfillmentSchema as Pi, memberConsentsSchema as Pn, easyPayProviderSchema as Pr, writableReviewSchema as Pt, analyticsClientEventSchema as Q, CheckoutDelivery as Qn, CollectionProductPage as Qr, publicInquirySchema as Qt, formatOrderNo as R, AddCartItemRequest as Ri, CreateClaimRequest as Rn, paymentMethodSchema as Rr, UpdateProfileRequest as Rt, memberPointEntryPageSchema as S, OrderItemStatus as Si, pricingAmountsSchema as Sn, StartPaymentRequest as Sr, createReviewRequestSchema as St, storefrontPointPolicySchema as T, claimStatusSchema as Ti, ConsentSource as Tn, cashReceiptIdentityTypeOf as Tr, productReviewQuerySchema as Tt, ANALYTICS_VISITOR_COOKIE as U, cartItemSchema as Ui, claimTypeSchema as Un, paymentStatusSchema as Ur, updateProfileRequestSchema as Ut, ANALYTICS_SESSION_COOKIE as V, UpdateCartItemRequest as Vi, claimReasonSchema as Vn, paymentOptionSchema as Vr, memberAddressSchema as Vt, ANALYTICS_VISITOR_HEADER as W, cartSchema as Wi, createClaimRequestSchema as Wn, pgProviderSchema as Wr, wishlistAddResultSchema as Wt, analyticsBatchSchema as X, CashReceiptRequest as Xn, startPaymentRequestSchema as Xr, createInquiryResultSchema as Xt, AnalyticsServerEventName as Y, CashReceiptIdentityType as Yn, shippingAddressInputSchema as Yr, createInquiryRequestSchema as Yt, analyticsClientEventNameSchema as Z, CashReceiptType as Zn, CategoryNode as Zr, productInquiryCategorySchema as Zt, normalizeCustomInputValue as _, productSortSchema as _i, couponApplicationSchema as _n, PgProvider as _r, ReviewSummary as _t, CustomInputEntry as a, ProductSearchParams as ai, ApplicableCoupon as an, KnownPaymentResult as ar, SessionStorage as at, MemberPoints as b, storefrontCollectionSchema as bi, myCouponListQuerySchema as bn, RetryPaymentRequest as br, UploadTicket as bt, OptionSelectionView as c, StorefrontCollectionDetail as ci, CouponApplication as cn, PAYMENT_RESULT_VALUES as cr, createStorefrontSession as ct, customInputEntrySchema as d, collectionProductQuerySchema as di, MIN_PAYMENT_AMOUNT as dn, PaymentFailureCategory as dr, MyReview as dt, CollectionProductSortParam as ei, CustomerInquiry as en, CreateCheckoutRequest as er, analyticsServerEventNameSchema as et, customInputLength as f, collectionProductSortSchema as fi, MyCoupon as fn, PaymentMessage as fr, ProductReviewParams as ft, lineSelectionResponseShape as g, productPageSchema as gi, couponApplicationListSchema as gn, PaymentStatus as gr, ReviewPage as gt, lineSelectionRequestShape as h, productFacetsSchema as hi, checkoutPricingSchema as hn, PaymentStart as hr, ReviewImageUploadRequest as ht, AddonSelection as i, ProductPage as ii, customerInquirySchema as in, GuestInfo as ir, STOREFRONT_SESSION_KEYS as it, deliveryTrackingSchema as j, ProductCardFulfillment as ji, consentSourceSchema as jn, deliveryQuoteRequestSchema as jr, updateReviewRequestSchema as jt, OrderShippingAddress as k, LineFulfillment as ki, consentActionSchema as kn, checkoutSessionSchema as kr, reviewPageSchema as kt, addonGroupViewSchema as l, categoryNodeSchema as li, CouponResult as ln, PAYMENT_START_STATUS_VALUES as lr, CreateReviewRequest as lt, customInputViewSchema as m, productDetailSchema as mi, checkoutPricingRequestSchema as mn, PaymentOption as mr, PublicReview as mt, storefrontStoreSchema as n, ProductDetail as ni, createCustomerInquiryRequestSchema as nn, DeliveryQuoteResult as nr, StorefrontClientOptions as nt, CustomInputValueView as o, ProductSort as oi, CheckoutPricing as on, KnownPaymentStartStatus as or, StorefrontSession as ot, customInputValueViewSchema as p, productCardSchema as pi, applicableCouponSchema as pn, PaymentMethod as pr, ProductReviewSort as pt, AnalyticsClientEventName as q, AvailablePaymentOption as qn, responsePaymentMethodSchema as qr, ProductInquiryCategory as qt, AddonGroupView as r, ProductFacets as ri, customerInquiryCategorySchema as rn, EasyPayProvider as rr, createStorefrontClient as rt, CustomInputView as s, StorefrontCollection as si, CheckoutPricingRequest as sn, KnownPaymentStatus as sr, StorefrontSessionOptions as st, StorefrontStore as t, ProductCard as ti, CustomerInquiryCategory as tn, DeliveryQuoteRequest as tr, StorefrontClient as tt, addonSelectionSchema as u, collectionProductPageSchema as ui, MAX_COUPONS_PER_CHECKOUT as un, PAYMENT_STATUS_VALUES as ur, CreateReviewResult as ut, optionSelectionViewSchema as v, storefrontCollectionDetailSchema as vi, couponBenefitViewSchema as vn, RemoteArea as vr, UpdateReviewRequest as vt, memberPointsSchema as w, PageParams as wi, ConsentKind as wn, cashReceiptAvailable as wr, myReviewSchema as wt, StorefrontPointPolicy as x, ClaimStatus as xi, myCouponSchema as xn, ShippingAddressInput as xr, WritableReview as xt, MemberPointEntry as y, storefrontCollectionListQuerySchema as yi, couponResultSchema as yn, ResponsePaymentMethod as yr, UpdateReviewResult as yt, parseOrderNo as z, Cart as zi, CreateClaimResult as zn, paymentOptionKey as zr, WishlistAddResult 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, 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 };
|
|
2
|
+
import { $ as analyticsIdSchema, $n as CheckoutSession, $r as CollectionProductParams, $t as CreateCustomerInquiryRequest, A as PurchaseDecisionResult, Ai as MyOrderItemFulfillmentSnapshot, An as consentKindSchema, Ar as createCheckoutRequestSchema, At as reviewSummarySchema, B as ANALYTICS_MAX_BATCH_BYTES, Bi as CartItem, Bn as MyClaim, Br as paymentOptionListSchema, Bt as memberAddressRequestSchema, C as memberPointEntrySchema, Ci as PageInfo, Cn as ConsentAction, Cr as availablePaymentOptionSchema, Ct as createReviewResultSchema, D as MyOrder, Di as pageInfoSchema, Dn as ConsentUpdateRequest, Dr as cashReceiptTypeSchema, Dt as publicReviewSchema, E as DeliveryTracking, Ei as orderItemStatusSchema, En as ConsentState, Er as cashReceiptRequestSchema, Et as productReviewSortSchema, F as purchaseDecisionResultSchema, Fi as myOrderItemFulfillmentSnapshotSchema, Fn as ClaimReason, Fr as guestInfoSchema, Ft as Member, G as AnalyticsBatch, Gi as updateCartItemRequestSchema, Gn as createClaimResultSchema, Gr as remoteAreaSchema, Gt as CreateInquiryRequest, H as ANALYTICS_SESSION_HEADER, Hi as addCartItemRequestSchema, Hn as claimReturnAddressSchema, Hr as paymentStartSchema, Ht as memberSchema, I as trackingStageResponseSchema, Ii as productCardFulfillmentSchema, In as ClaimReturnAddress, Ir as paymentFailureCategorySchema, It as MemberAddress, J as AnalyticsEventName, Jn as CASH_RECEIPT_METHODS, Jr as retryPaymentRequestSchema, Jt as PublicInquiry, K as AnalyticsClientEvent, Ki as analyticsIdsFromCookie, Kn as myClaimSchema, Kr as residentNumberLike, Kt as CreateInquiryResult, L as commerceNumberField, Li as productFulfillmentViewSchema, Ln as ClaimType, Lr as paymentMessageSchema, Lt as MemberAddressRequest, M as myOrderItemSchema, Mi as ProductFulfillmentView, Mn as consentStateSchema, Mr as deliveryQuoteSchema, Mt as updateReviewResultSchema, N as myOrderSchema, Ni as UnknownFulfillmentView, Nn as consentUpdateRequestSchema, Nr as easyPayProviderResponseSchema, Nt as uploadTicketSchema, O as MyOrderItem, Oi as pageSchema, On as MemberConsents, Or as checkoutDeliverySchema, Ot as reviewImageUploadRequestSchema, P as orderShippingAddressSchema, Pi as lineFulfillmentSchema, Pn as memberConsentsSchema, Pr as easyPayProviderSchema, Pt as writableReviewSchema, Q as analyticsClientEventSchema, Qn as CheckoutDelivery, Qr as CollectionProductPage, Qt as publicInquirySchema, R as formatOrderNo, Ri as AddCartItemRequest, Rn as CreateClaimRequest, Rr as paymentMethodSchema, Rt as UpdateProfileRequest, S as memberPointEntryPageSchema, Si as OrderItemStatus, Sn as pricingAmountsSchema, Sr as StartPaymentRequest, St as createReviewRequestSchema, T as storefrontPointPolicySchema, Ti as claimStatusSchema, Tn as ConsentSource, Tr as cashReceiptIdentityTypeOf, Tt as productReviewQuerySchema, U as ANALYTICS_VISITOR_COOKIE, Ui as cartItemSchema, Un as claimTypeSchema, Ur as paymentStatusSchema, Ut as updateProfileRequestSchema, V as ANALYTICS_SESSION_COOKIE, Vi as UpdateCartItemRequest, Vn as claimReasonSchema, Vr as paymentOptionSchema, Vt as memberAddressSchema, W as ANALYTICS_VISITOR_HEADER, Wi as cartSchema, Wn as createClaimRequestSchema, Wr as pgProviderSchema, Wt as wishlistAddResultSchema, X as analyticsBatchSchema, Xn as CashReceiptRequest, Xr as startPaymentRequestSchema, Xt as createInquiryResultSchema, Y as AnalyticsServerEventName, Yn as CashReceiptIdentityType, Yr as shippingAddressInputSchema, Yt as createInquiryRequestSchema, Z as analyticsClientEventNameSchema, Zn as CashReceiptType, Zr as CategoryNode, Zt as productInquiryCategorySchema, _ as normalizeCustomInputValue, _i as productSortSchema, _n as couponApplicationSchema, _r as PgProvider, _t as ReviewSummary, a as CustomInputEntry, ai as ProductSearchParams, an as ApplicableCoupon, ar as KnownPaymentResult, at as SessionStorage, b as MemberPoints, bi as storefrontCollectionSchema, bn as myCouponListQuerySchema, br as RetryPaymentRequest, bt as UploadTicket, c as OptionSelectionView, ci as StorefrontCollectionDetail, cn as CouponApplication, cr as PAYMENT_RESULT_VALUES, ct as createStorefrontSession, d as customInputEntrySchema, di as collectionProductQuerySchema, dn as MIN_PAYMENT_AMOUNT, dr as PaymentFailureCategory, dt as MyReview, ei as CollectionProductSortParam, en as CustomerInquiry, er as CreateCheckoutRequest, et as analyticsServerEventNameSchema, f as customInputLength, fi as collectionProductSortSchema, fn as MyCoupon, fr as PaymentMessage, ft as ProductReviewParams, g as lineSelectionResponseShape, gi as productPageSchema, gn as couponApplicationListSchema, gr as PaymentStatus, gt as ReviewPage, h as lineSelectionRequestShape, hi as productFacetsSchema, hn as checkoutPricingSchema, hr as PaymentStart, ht as ReviewImageUploadRequest, i as AddonSelection, ii as ProductPage, in as customerInquirySchema, ir as GuestInfo, it as STOREFRONT_SESSION_KEYS, j as deliveryTrackingSchema, ji as ProductCardFulfillment, jn as consentSourceSchema, jr as deliveryQuoteRequestSchema, jt as updateReviewRequestSchema, k as OrderShippingAddress, ki as LineFulfillment, kn as consentActionSchema, kr as checkoutSessionSchema, kt as reviewPageSchema, l as addonGroupViewSchema, li as categoryNodeSchema, ln as CouponResult, lr as PAYMENT_START_STATUS_VALUES, lt as CreateReviewRequest, m as customInputViewSchema, mi as productDetailSchema, mn as checkoutPricingRequestSchema, mr as PaymentOption, mt as PublicReview, n as storefrontStoreSchema, ni as ProductDetail, nn as createCustomerInquiryRequestSchema, nr as DeliveryQuoteResult, nt as StorefrontClientOptions, o as CustomInputValueView, oi as ProductSort, on as CheckoutPricing, or as KnownPaymentStartStatus, ot as StorefrontSession, p as customInputValueViewSchema, pi as productCardSchema, pn as applicableCouponSchema, pr as PaymentMethod, pt as ProductReviewSort, q as AnalyticsClientEventName, qn as AvailablePaymentOption, qr as responsePaymentMethodSchema, qt as ProductInquiryCategory, r as AddonGroupView, ri as ProductFacets, rn as customerInquiryCategorySchema, rr as EasyPayProvider, rt as createStorefrontClient, s as CustomInputView, si as StorefrontCollection, sn as CheckoutPricingRequest, sr as KnownPaymentStatus, st as StorefrontSessionOptions, t as StorefrontStore, ti as ProductCard, tn as CustomerInquiryCategory, tr as DeliveryQuoteRequest, tt as StorefrontClient, u as addonSelectionSchema, ui as collectionProductPageSchema, un as MAX_COUPONS_PER_CHECKOUT, ur as PAYMENT_STATUS_VALUES, ut as CreateReviewResult, v as optionSelectionViewSchema, vi as storefrontCollectionDetailSchema, vn as couponBenefitViewSchema, vr as RemoteArea, vt as UpdateReviewRequest, w as memberPointsSchema, wi as PageParams, wn as ConsentKind, wr as cashReceiptAvailable, wt as myReviewSchema, x as StorefrontPointPolicy, xi as ClaimStatus, xn as myCouponSchema, xr as ShippingAddressInput, xt as WritableReview, y as MemberPointEntry, yi as storefrontCollectionListQuerySchema, yn as couponResultSchema, yr as ResponsePaymentMethod, yt as UpdateReviewResult, z as parseOrderNo, zi as Cart, zn as CreateClaimResult, zr as paymentOptionKey, zt as WishlistAddResult } from "./index-Ca0AyapE.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, commerceNumberField, 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, formatOrderNo, 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, parseOrderNo, 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 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-
|
|
3
|
+
import { $ as categoryNodeSchema, A as wishlistAddResultSchema, At as withdrawRequestSchema, B as consentSourceSchema, C as orderShippingAddressSchema, Ct as idpTokenRequestSchema, D as memberAddressSchema, Dt as signupRequestSchema, E as memberAddressRequestSchema, Et as memberIdentitiesSchema, F as createCustomerInquiryRequestSchema, Ft as unwrapData, G as claimReturnAddressSchema, H as consentUpdateRequestSchema, I as customerInquiryCategorySchema, J as createClaimResultSchema, K as claimTypeSchema, L as customerInquirySchema, M as createInquiryResultSchema, Mt as ApiError, N as productInquiryCategorySchema, Nt as buildQuery, O as memberSchema, Ot as socialProviderSchema, P as publicInquirySchema, Pt as toApiError, Q as parseOrderNo, R as consentActionSchema, S as myOrderSchema, St as idpAuthorizeResponseSchema, T as trackingStageResponseSchema, Tt as loginRequestSchema, U as memberConsentsSchema, V as consentStateSchema, W as claimReasonSchema, X as commerceNumberField, Y as myClaimSchema, Z as formatOrderNo, _ as memberPointEntrySchema, _t as cartSchema, a as myReviewSchema, at as productFacetsSchema, b as deliveryTrackingSchema, bt as idpAgreementsSchema, c as publicReviewSchema, ct as storefrontCollectionDetailSchema, d as reviewSummarySchema, dt as claimStatusSchema, et as collectionProductPageSchema, f as updateReviewRequestSchema, ft as orderItemStatusSchema, g as memberPointEntryPageSchema, gt as cartItemSchema, h as writableReviewSchema, ht as addCartItemRequestSchema, i as createReviewResultSchema, it as productDetailSchema, j as createInquiryRequestSchema, jt as withdrawalBlockedDetailsSchema, k as updateProfileRequestSchema, kt as tokenPairSchema, l as reviewImageUploadRequestSchema, lt as storefrontCollectionListQuerySchema, m as uploadTicketSchema, mt as pageSchema, n as storefrontStoreSchema, nt as collectionProductSortSchema, o as productReviewQuerySchema, ot as productPageSchema, p as updateReviewResultSchema, pt as pageInfoSchema, q as createClaimRequestSchema, r as createReviewRequestSchema, rt as productCardSchema, s as productReviewSortSchema, st as productSortSchema, t as createStorefrontClient, tt as collectionProductQuerySchema, u as reviewPageSchema, ut as storefrontCollectionSchema, v as memberPointsSchema, vt as updateCartItemRequestSchema, w as purchaseDecisionResultSchema, wt as linkIdentityRequestSchema, x as myOrderItemSchema, xt as idpAuthorizeRequestSchema, y as storefrontPointPolicySchema, yt as anonymousSessionSchema, z as consentKindSchema } from "./client-D8DDKutm.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-CE-r7SFw.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_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 };
|
|
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, commerceNumberField, 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, formatOrderNo, 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, parseOrderNo, 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 { Sr as StartPaymentRequest, Xn as CashReceiptRequest, gr as PaymentStatus, hr as PaymentStart, ir as GuestInfo, mr as PaymentOption, rt as createStorefrontClient, xr as ShippingAddressInput } from "../index-Ca0AyapE.mjs";
|
|
2
2
|
//#region src/payments/index.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* 스토어프론트 결제 — 브라우저 전용(`@sayren/storefront-sdk/payments`).
|
package/dist/payments/index.mjs
CHANGED
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -257,6 +257,7 @@ export function createStorefrontClient(options: StorefrontClientOptions) {
|
|
|
257
257
|
getPointPolicy: () => http.request("GET", "/point-policy", storefrontPointPolicySchema),
|
|
258
258
|
searchProducts: (params?: ProductSearchParams) =>
|
|
259
259
|
http.request("GET", "/products", productPageSchema, { query: params as Query }),
|
|
260
|
+
/** `GET /products/{productId}` — 상품 id(`prod_…`) 또는 숫자 상품번호(`productNo`, 이슈 #107). 번호는 문자열로 넘긴다 */
|
|
260
261
|
getProduct: (productId: string) =>
|
|
261
262
|
http.request("GET", path`/products/${productId}`, productDetailSchema),
|
|
262
263
|
/** 상품 리뷰 목록 — `variantId`로 옵션(조합)별 리뷰만 받는다(상품 상세 `variants[].variantId`) */
|
|
@@ -378,7 +379,7 @@ export function createStorefrontClient(options: StorefrontClientOptions) {
|
|
|
378
379
|
http.request("GET", "/me/orders", pageSchema(myOrderSchema), { query: params as Query }),
|
|
379
380
|
get: (orderId: string) => http.request("GET", path`/me/orders/${orderId}`, myOrderSchema),
|
|
380
381
|
/**
|
|
381
|
-
* 비회원 주문 조회 — 주문번호 + 주문할 때 적은 연락처·주문 조회 비밀번호.
|
|
382
|
+
* 비회원 주문 조회 — 주문 id(`ord_…`) 또는 숫자 주문번호(`orderNo`, 하이픈 허용, 이슈 #107) + 주문할 때 적은 연락처·주문 조회 비밀번호.
|
|
382
383
|
*
|
|
383
384
|
* 에러: 404 `ORDER_NOT_FOUND`(주문이 없거나 연락처·비밀번호가 다름 — 둘을 구분하지 않는다) ·
|
|
384
385
|
* 429 `TOO_MANY_REQUESTS`(주문번호마다 10분에 5번까지 확인하고, 5번째가 틀리면 30분 잠금.
|
package/src/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./schemas/cart";
|
|
|
9
9
|
export * from "./schemas/catalog";
|
|
10
10
|
export * from "./schemas/checkout";
|
|
11
11
|
export * from "./schemas/claim";
|
|
12
|
+
export * from "./schemas/commerce-number";
|
|
12
13
|
export * from "./schemas/common";
|
|
13
14
|
export * from "./schemas/consent";
|
|
14
15
|
export * from "./schemas/coupon";
|
package/src/schemas/cart.ts
CHANGED
|
@@ -5,6 +5,15 @@ import { lineSelectionRequestShape, lineSelectionResponseShape } from "./product
|
|
|
5
5
|
export const cartItemSchema = z.object({
|
|
6
6
|
cartItemId: z.string(),
|
|
7
7
|
productId: z.string(),
|
|
8
|
+
productNo: z
|
|
9
|
+
.number()
|
|
10
|
+
.int()
|
|
11
|
+
.nullable()
|
|
12
|
+
.optional()
|
|
13
|
+
.default(null)
|
|
14
|
+
.describe(
|
|
15
|
+
"상품번호(이슈 #107) — 상품 주소(`/products/{productNo}`)에 씁니다. 장바구니 요청에는 계속 `productId`를 보냅니다. 옛 응답은 null",
|
|
16
|
+
),
|
|
8
17
|
productName: z.string(),
|
|
9
18
|
thumbnailUrl: z.url().nullable().describe("담은 상품의 대표 이미지. 없으면 null"),
|
|
10
19
|
optionId: z.string().nullable(),
|
package/src/schemas/catalog.ts
CHANGED
|
@@ -21,6 +21,15 @@ export const categoryNodeSchema: z.ZodType<CategoryNode> = z.lazy(() =>
|
|
|
21
21
|
|
|
22
22
|
export const productCardSchema = z.object({
|
|
23
23
|
productId: z.string(),
|
|
24
|
+
productNo: z
|
|
25
|
+
.number()
|
|
26
|
+
.int()
|
|
27
|
+
.nullable()
|
|
28
|
+
.optional()
|
|
29
|
+
.default(null)
|
|
30
|
+
.describe(
|
|
31
|
+
"상품번호(이슈 #107) — 상점별 1부터 증가하는 숫자, 상점 안에서 유일, 생성 후 바뀌지 않습니다. 상품 주소에 쓰십시오(`GET /products/{productNo}`). 번호 체계 이전 응답은 null",
|
|
32
|
+
),
|
|
24
33
|
name: z.string(),
|
|
25
34
|
thumbnailUrl: z.url().nullable().describe("대표 이미지 주소. 등록된 이미지가 없으면 null"),
|
|
26
35
|
salePrice: z
|
|
@@ -81,6 +90,14 @@ export const productDetailSchema = productCardSchema.extend({
|
|
|
81
90
|
variants: z.array(
|
|
82
91
|
z.object({
|
|
83
92
|
variantId: z.string(),
|
|
93
|
+
variantNo: z
|
|
94
|
+
.string()
|
|
95
|
+
.nullable()
|
|
96
|
+
.optional()
|
|
97
|
+
.default(null)
|
|
98
|
+
.describe(
|
|
99
|
+
"조합 번호(이슈 #107) — `{productNo}-{조합 순번 2자리}`(예: `10482-03`). 시스템이 매기는 SKU이고 상점 안에서 유일합니다. 생성 후 바뀌지 않으며, 지운 조합의 번호는 다시 쓰지 않습니다. 셀러가 입력하는 `sku`와 별개입니다",
|
|
100
|
+
),
|
|
84
101
|
/** optionGroups 순서와 1:1 대응. 옵션 없는 상품은 [] */
|
|
85
102
|
valueIds: z.array(z.string()),
|
|
86
103
|
/** 값 이름을 " / "로 이은 표시명. 옵션 없으면 "" */
|
package/src/schemas/checkout.ts
CHANGED
|
@@ -71,6 +71,11 @@ export const checkoutSessionSchema = z.object({
|
|
|
71
71
|
),
|
|
72
72
|
productId: z.string(),
|
|
73
73
|
productName: z.string(),
|
|
74
|
+
thumbnailUrl: z
|
|
75
|
+
.url()
|
|
76
|
+
.nullable()
|
|
77
|
+
.optional()
|
|
78
|
+
.describe("주문서 시점의 상품 대표 이미지. 없으면 null(이슈 #114). 옛 서버는 싣지 않는다"),
|
|
74
79
|
/** variantId. 옵션 없는 상품은 default variant id */
|
|
75
80
|
optionId: z.string().nullable(),
|
|
76
81
|
optionName: z.string().nullable(),
|
package/src/schemas/claim.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { commerceNumberField } from "./commerce-number";
|
|
2
3
|
import { claimStatusSchema } from "./common";
|
|
3
4
|
|
|
4
5
|
export const claimTypeSchema = z.enum(["CANCEL", "RETURN", "EXCHANGE"]);
|
|
@@ -36,6 +37,9 @@ export type CreateClaimRequest = z.infer<typeof createClaimRequestSchema>;
|
|
|
36
37
|
|
|
37
38
|
export const createClaimResultSchema = z.object({
|
|
38
39
|
claimId: z.string(),
|
|
40
|
+
claimNo: commerceNumberField(
|
|
41
|
+
"클레임번호(이슈 #107) — `C` + YYMMDD(KST) + 숫자 8자리. 취소·반품·교환 접수 단위 번호이고 생성 후 바뀌지 않습니다",
|
|
42
|
+
),
|
|
39
43
|
status: z.literal("REQUESTED"),
|
|
40
44
|
expectedRefundAmount: z
|
|
41
45
|
.number()
|
|
@@ -104,6 +108,9 @@ export type ClaimReturnAddress = z.infer<typeof claimReturnAddressSchema>;
|
|
|
104
108
|
|
|
105
109
|
export const myClaimSchema = z.object({
|
|
106
110
|
claimId: z.string(),
|
|
111
|
+
claimNo: commerceNumberField(
|
|
112
|
+
"클레임번호(이슈 #107) — `C` + YYMMDD(KST) + 숫자 8자리. 취소·반품·교환 접수 단위 번호이고 생성 후 바뀌지 않습니다",
|
|
113
|
+
),
|
|
107
114
|
type: claimTypeSchema,
|
|
108
115
|
status: claimStatusSchema,
|
|
109
116
|
orderItemId: z.string(),
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 국내 쇼핑몰 번호 체계(이슈 #107) — 공개 ID(`ord_…` 등)와 따로 싣는 숫자 번호의 표기·필드.
|
|
5
|
+
* 번호는 서버가 만들고 생성 후 바뀌지 않는다. 새 필드라 옛 서버 응답에는 없다 — 파싱은 null로 채운다.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 번호 표기 — 숫자를 앞에서부터 4자리씩 하이픈으로 나눈다. 주문번호 `26100284731592` → `2610-0284-7315-92`,
|
|
10
|
+
* 상품주문번호 `2610028473159201` → `2610-0284-7315-9201`. 숫자만으로 된 값이 아니면(클레임번호 `C…`) 그대로, 없으면 빈 문자열이다.
|
|
11
|
+
* 화면 표기 전용이다 — API에 보낼 때는 원래 값을 쓴다(주문번호 조회는 하이픈도 받는다)
|
|
12
|
+
*/
|
|
13
|
+
export function formatOrderNo(no: string | null | undefined): string {
|
|
14
|
+
if (!no) return "";
|
|
15
|
+
if (!/^\d+$/.test(no)) return no;
|
|
16
|
+
return no.match(/.{1,4}/g)?.join("-") ?? no;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** 표기 하이픈·공백을 지운 숫자 번호. 숫자가 아닌 글자가 남거나 비면 null */
|
|
20
|
+
export function parseOrderNo(value: string): string | null {
|
|
21
|
+
const digits = value.replace(/[\s-]/g, "");
|
|
22
|
+
return /^\d+$/.test(digits) ? digits : null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** 응답 번호 필드 — 서버는 항상 싣고, 번호 체계 이전 행(백필 전)·옛 서버 응답은 null이다 */
|
|
26
|
+
export function commerceNumberField(description: string) {
|
|
27
|
+
return z.string().nullable().optional().default(null).describe(description);
|
|
28
|
+
}
|
package/src/schemas/order.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { easyPayProviderResponseSchema, responsePaymentMethodSchema } from "./checkout";
|
|
3
|
+
import { commerceNumberField } from "./commerce-number";
|
|
3
4
|
import { orderItemStatusSchema } from "./common";
|
|
4
5
|
import { myOrderItemFulfillmentSnapshotSchema } from "./fulfillment";
|
|
5
6
|
import { lineSelectionResponseShape } from "./product-options";
|
|
6
7
|
|
|
7
8
|
export const myOrderItemSchema = z.object({
|
|
8
9
|
orderItemId: z.string(),
|
|
10
|
+
orderItemNo: commerceNumberField(
|
|
11
|
+
"상품주문번호(이슈 #107) — 주문번호 + 줄 순번 2자리. 취소·반품·교환 문의에 쓰는 번호입니다",
|
|
12
|
+
),
|
|
9
13
|
productId: z.string(),
|
|
10
14
|
productName: z.string(),
|
|
11
15
|
thumbnailUrl: z.url().nullable().describe("주문 시점의 대표 이미지. 없었으면 null"),
|
|
@@ -89,6 +93,9 @@ export type OrderShippingAddress = z.infer<typeof orderShippingAddressSchema>;
|
|
|
89
93
|
|
|
90
94
|
export const myOrderSchema = z.object({
|
|
91
95
|
orderId: z.string(),
|
|
96
|
+
orderNo: commerceNumberField(
|
|
97
|
+
"주문번호(이슈 #107) — 숫자 14자리, 생성 후 바뀌지 않습니다. 구매자 화면에는 `formatOrderNo`(4자리 하이픈)로 표시하십시오. 비회원 주문 조회 경로에도 쓸 수 있습니다",
|
|
98
|
+
),
|
|
92
99
|
orderedAt: z.string(),
|
|
93
100
|
items: z.array(myOrderItemSchema),
|
|
94
101
|
requiresShipping: z
|