@sayren/storefront-sdk 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/index.mjs +1 -1
- package/dist/{checkout-BeZKjYJz.mjs → checkout-Cm9YAC5l.mjs} +1 -1
- package/dist/{client-DkyvDLXK.mjs → client-U1LJGfWn.mjs} +10 -1
- package/dist/{index-SXEtj3N5.d.mts → index-BaSx86ts.d.mts} +18 -9
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/payments/index.d.mts +1 -1
- package/dist/payments/index.mjs +1 -1
- package/package.json +1 -1
- package/src/client.ts +9 -0
- package/src/schemas/checkout.ts +4 -1
package/dist/auth/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { pt as ApiError, t as createStorefrontClient } from "../client-
|
|
1
|
+
import { pt as ApiError, t as createStorefrontClient } from "../client-U1LJGfWn.mjs";
|
|
2
2
|
//#region src/auth/index.ts
|
|
3
3
|
/** 소셜 로그인 실패 — 구매자가 취소했거나(`access_denied`) state가 맞지 않는다 */
|
|
4
4
|
var IdpCallbackError = class extends Error {
|
|
@@ -146,7 +146,7 @@ const guestInfoSchema = z.object({
|
|
|
146
146
|
name: z.string().min(1),
|
|
147
147
|
phone: z.string().regex(/^01[0-9]{8,9}$/),
|
|
148
148
|
email: z.email(),
|
|
149
|
-
orderPassword: z.string().min(6, "주문 조회 비밀번호는 6자 이상이어야 합니다")
|
|
149
|
+
orderPassword: z.string().min(6, "주문 조회 비밀번호는 6자 이상이어야 합니다").max(128, "주문 조회 비밀번호는 128자까지입니다")
|
|
150
150
|
});
|
|
151
151
|
/** 현금영수증을 신청할 수 있는 결제수단 — 계좌이체·가상계좌 */
|
|
152
152
|
const CASH_RECEIPT_METHODS = ["BANK_TRANSFER", "VIRTUAL_ACCOUNT"];
|
|
@@ -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 startPaymentRequestSchema, C as paymentStartSchema, O as retryPaymentRequestSchema, d as createCheckoutRequestSchema, f as deliveryQuoteRequestSchema, m as easyPayProviderResponseSchema, p as deliveryQuoteSchema, u as checkoutSessionSchema, w as paymentStatusSchema, y as paymentMethodSchema } from "./checkout-
|
|
2
|
+
import { A as startPaymentRequestSchema, C as paymentStartSchema, O as retryPaymentRequestSchema, d as createCheckoutRequestSchema, f as deliveryQuoteRequestSchema, m as easyPayProviderResponseSchema, p as deliveryQuoteSchema, u as checkoutSessionSchema, w as paymentStatusSchema, y as paymentMethodSchema } from "./checkout-Cm9YAC5l.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/http.ts
|
|
5
5
|
/** 표준 엔벨로프의 $.error 상세 */
|
|
@@ -877,6 +877,15 @@ get: () => http.request("GET", "/store", storefrontStoreSchema) },
|
|
|
877
877
|
myOrders: {
|
|
878
878
|
list: (params) => http.request("GET", "/me/orders", pageSchema(myOrderSchema), { query: params }),
|
|
879
879
|
get: (orderId) => http.request("GET", path`/me/orders/${orderId}`, myOrderSchema),
|
|
880
|
+
/**
|
|
881
|
+
* 비회원 주문 조회 — 주문번호 + 주문할 때 적은 연락처·주문 조회 비밀번호.
|
|
882
|
+
*
|
|
883
|
+
* 에러: 404 `ORDER_NOT_FOUND`(주문이 없거나 연락처·비밀번호가 다름 — 둘을 구분하지 않는다) ·
|
|
884
|
+
* 429 `TOO_MANY_REQUESTS`(주문번호마다 10분에 5번까지 확인하고, 5번째가 틀리면 30분 잠금.
|
|
885
|
+
* 주문번호마다 하루 15번, 스토어 전체 분당 한도도 있다. 남은 시간은 `ApiError.details.retryAfterSeconds`).
|
|
886
|
+
* 맞게 조회하면 주문번호의 횟수가 초기화된다. 본문 형식은 `guestInfoSchema`의 `phone`·`orderPassword`와 같다.
|
|
887
|
+
* 429는 연락처·비밀번호가 맞아도 난다 — 「잠시 후 다시 시도」로 안내한다.
|
|
888
|
+
*/
|
|
880
889
|
getGuestOrder: (orderId, body) => http.request("POST", path`/guest/orders/${orderId}`, myOrderSchema, { body }),
|
|
881
890
|
getDelivery: (orderItemId) => http.request("GET", path`/me/order-items/${orderItemId}/delivery`, deliveryTrackingSchema),
|
|
882
891
|
decidePurchase: (orderItemId) => http.requestVoid("POST", path`/me/order-items/${orderItemId}/purchase-decision`)
|
|
@@ -91,7 +91,6 @@ interface PageParams {
|
|
|
91
91
|
size?: number;
|
|
92
92
|
}
|
|
93
93
|
declare const orderItemStatusSchema: z.ZodEnum<{
|
|
94
|
-
CANCELED: "CANCELED";
|
|
95
94
|
PAYMENT_WAITING: "PAYMENT_WAITING";
|
|
96
95
|
PAID: "PAID";
|
|
97
96
|
CONFIRMED: "CONFIRMED";
|
|
@@ -99,10 +98,10 @@ declare const orderItemStatusSchema: z.ZodEnum<{
|
|
|
99
98
|
DELIVERING: "DELIVERING";
|
|
100
99
|
DELIVERED: "DELIVERED";
|
|
101
100
|
PURCHASE_DECIDED: "PURCHASE_DECIDED";
|
|
101
|
+
CANCELED: "CANCELED";
|
|
102
102
|
}>;
|
|
103
103
|
type OrderItemStatus = z.infer<typeof orderItemStatusSchema>;
|
|
104
104
|
declare const claimStatusSchema: z.ZodEnum<{
|
|
105
|
-
COMPLETED: "COMPLETED";
|
|
106
105
|
REQUESTED: "REQUESTED";
|
|
107
106
|
HELD: "HELD";
|
|
108
107
|
COLLECTING: "COLLECTING";
|
|
@@ -110,6 +109,7 @@ declare const claimStatusSchema: z.ZodEnum<{
|
|
|
110
109
|
REDELIVERING: "REDELIVERING";
|
|
111
110
|
APPROVED: "APPROVED";
|
|
112
111
|
REJECTED: "REJECTED";
|
|
112
|
+
COMPLETED: "COMPLETED";
|
|
113
113
|
WITHDRAWN: "WITHDRAWN";
|
|
114
114
|
}>;
|
|
115
115
|
type ClaimStatus = z.infer<typeof claimStatusSchema>;
|
|
@@ -920,7 +920,6 @@ declare const myClaimSchema: z.ZodObject<{
|
|
|
920
920
|
EXCHANGE: "EXCHANGE";
|
|
921
921
|
}>;
|
|
922
922
|
status: z.ZodEnum<{
|
|
923
|
-
COMPLETED: "COMPLETED";
|
|
924
923
|
REQUESTED: "REQUESTED";
|
|
925
924
|
HELD: "HELD";
|
|
926
925
|
COLLECTING: "COLLECTING";
|
|
@@ -928,6 +927,7 @@ declare const myClaimSchema: z.ZodObject<{
|
|
|
928
927
|
REDELIVERING: "REDELIVERING";
|
|
929
928
|
APPROVED: "APPROVED";
|
|
930
929
|
REJECTED: "REJECTED";
|
|
930
|
+
COMPLETED: "COMPLETED";
|
|
931
931
|
WITHDRAWN: "WITHDRAWN";
|
|
932
932
|
}>;
|
|
933
933
|
orderItemId: z.ZodString;
|
|
@@ -1833,7 +1833,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1833
1833
|
canceledQuantity: number;
|
|
1834
1834
|
activeQuantity: number;
|
|
1835
1835
|
totalPrice: number;
|
|
1836
|
-
status: "
|
|
1836
|
+
status: "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED" | "CANCELED";
|
|
1837
1837
|
claimStatus: string | null;
|
|
1838
1838
|
reviewWritten: boolean;
|
|
1839
1839
|
autoDecisionDate: string | null;
|
|
@@ -1870,7 +1870,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1870
1870
|
canceledQuantity: number;
|
|
1871
1871
|
activeQuantity: number;
|
|
1872
1872
|
totalPrice: number;
|
|
1873
|
-
status: "
|
|
1873
|
+
status: "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED" | "CANCELED";
|
|
1874
1874
|
claimStatus: string | null;
|
|
1875
1875
|
reviewWritten: boolean;
|
|
1876
1876
|
autoDecisionDate: string | null;
|
|
@@ -1893,6 +1893,15 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1893
1893
|
};
|
|
1894
1894
|
testPayment: boolean;
|
|
1895
1895
|
}>;
|
|
1896
|
+
/**
|
|
1897
|
+
* 비회원 주문 조회 — 주문번호 + 주문할 때 적은 연락처·주문 조회 비밀번호.
|
|
1898
|
+
*
|
|
1899
|
+
* 에러: 404 `ORDER_NOT_FOUND`(주문이 없거나 연락처·비밀번호가 다름 — 둘을 구분하지 않는다) ·
|
|
1900
|
+
* 429 `TOO_MANY_REQUESTS`(주문번호마다 10분에 5번까지 확인하고, 5번째가 틀리면 30분 잠금.
|
|
1901
|
+
* 주문번호마다 하루 15번, 스토어 전체 분당 한도도 있다. 남은 시간은 `ApiError.details.retryAfterSeconds`).
|
|
1902
|
+
* 맞게 조회하면 주문번호의 횟수가 초기화된다. 본문 형식은 `guestInfoSchema`의 `phone`·`orderPassword`와 같다.
|
|
1903
|
+
* 429는 연락처·비밀번호가 맞아도 난다 — 「잠시 후 다시 시도」로 안내한다.
|
|
1904
|
+
*/
|
|
1896
1905
|
getGuestOrder: (orderId: string, body: {
|
|
1897
1906
|
phone: string;
|
|
1898
1907
|
orderPassword: string;
|
|
@@ -1909,7 +1918,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1909
1918
|
canceledQuantity: number;
|
|
1910
1919
|
activeQuantity: number;
|
|
1911
1920
|
totalPrice: number;
|
|
1912
|
-
status: "
|
|
1921
|
+
status: "PAYMENT_WAITING" | "PAID" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED" | "CANCELED";
|
|
1913
1922
|
claimStatus: string | null;
|
|
1914
1923
|
reviewWritten: boolean;
|
|
1915
1924
|
autoDecisionDate: string | null;
|
|
@@ -1967,7 +1976,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
|
|
|
1967
1976
|
contents: {
|
|
1968
1977
|
claimId: string;
|
|
1969
1978
|
type: "CANCEL" | "RETURN" | "EXCHANGE";
|
|
1970
|
-
status: "
|
|
1979
|
+
status: "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "REJECTED" | "COMPLETED" | "WITHDRAWN";
|
|
1971
1980
|
orderItemId: string;
|
|
1972
1981
|
productName: string;
|
|
1973
1982
|
quantity: number;
|
|
@@ -2319,7 +2328,6 @@ declare const myOrderItemSchema: z.ZodObject<{
|
|
|
2319
2328
|
activeQuantity: z.ZodNumber;
|
|
2320
2329
|
totalPrice: z.ZodNumber;
|
|
2321
2330
|
status: z.ZodEnum<{
|
|
2322
|
-
CANCELED: "CANCELED";
|
|
2323
2331
|
PAYMENT_WAITING: "PAYMENT_WAITING";
|
|
2324
2332
|
PAID: "PAID";
|
|
2325
2333
|
CONFIRMED: "CONFIRMED";
|
|
@@ -2327,6 +2335,7 @@ declare const myOrderItemSchema: z.ZodObject<{
|
|
|
2327
2335
|
DELIVERING: "DELIVERING";
|
|
2328
2336
|
DELIVERED: "DELIVERED";
|
|
2329
2337
|
PURCHASE_DECIDED: "PURCHASE_DECIDED";
|
|
2338
|
+
CANCELED: "CANCELED";
|
|
2330
2339
|
}>;
|
|
2331
2340
|
claimStatus: z.ZodNullable<z.ZodString>;
|
|
2332
2341
|
reviewWritten: z.ZodBoolean;
|
|
@@ -2361,7 +2370,6 @@ declare const myOrderSchema: z.ZodObject<{
|
|
|
2361
2370
|
activeQuantity: z.ZodNumber;
|
|
2362
2371
|
totalPrice: z.ZodNumber;
|
|
2363
2372
|
status: z.ZodEnum<{
|
|
2364
|
-
CANCELED: "CANCELED";
|
|
2365
2373
|
PAYMENT_WAITING: "PAYMENT_WAITING";
|
|
2366
2374
|
PAID: "PAID";
|
|
2367
2375
|
CONFIRMED: "CONFIRMED";
|
|
@@ -2369,6 +2377,7 @@ declare const myOrderSchema: z.ZodObject<{
|
|
|
2369
2377
|
DELIVERING: "DELIVERING";
|
|
2370
2378
|
DELIVERED: "DELIVERED";
|
|
2371
2379
|
PURCHASE_DECIDED: "PURCHASE_DECIDED";
|
|
2380
|
+
CANCELED: "CANCELED";
|
|
2372
2381
|
}>;
|
|
2373
2382
|
claimStatus: z.ZodNullable<z.ZodString>;
|
|
2374
2383
|
reviewWritten: z.ZodBoolean;
|
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 Member, $n as productCardSchema, $t as DeliveryQuoteRequest, A as StorefrontClientOptions, An as guestInfoSchema, At as consentStateSchema, B as ReviewPage, Bn as remoteAreaSchema, Bt as claimReturnAddressSchema, C as AnalyticsServerEventName, Cn as checkoutDeliverySchema, Ct as ConsentSource, D as analyticsIdSchema, Dn as deliveryQuoteSchema, Dt as consentActionSchema, E as analyticsClientEventSchema, En as deliveryQuoteRequestSchema, Et as MemberConsents, F as StorefrontSessionOptions, Fn as paymentOptionListSchema, Ft as ClaimType, G as createReviewRequestSchema, Gn as CategoryNode, Gt as AvailablePaymentOption, H as UpdateReviewRequest, Hn as retryPaymentRequestSchema, Ht as createClaimRequestSchema, I as createStorefrontSession, In as paymentOptionSchema, It as CreateClaimRequest, J as reviewPageSchema, Jn as ProductFacets, Jt as CashReceiptRequest, K as createReviewResultSchema, Kn as ProductCard, Kt as CASH_RECEIPT_METHODS, L as CreateReviewRequest, Ln as paymentStartSchema, Lt as CreateClaimResult, M as STOREFRONT_SESSION_KEYS, Mn as paymentMessageSchema, Mt as memberConsentsSchema, N as SessionStorage, Nn as paymentMethodSchema, Nt as ClaimReason, O as analyticsServerEventNameSchema, On as easyPayProviderResponseSchema, Ot as consentKindSchema, P as StorefrontSession, Pn as paymentOptionKey, Pt as ClaimReturnAddress, Q as writableReviewSchema, Qn as categoryNodeSchema, Qt as CreateCheckoutRequest, R as CreateReviewResult, Rn as paymentStatusSchema, Rt as MyClaim, S as AnalyticsEventName, Sn as cashReceiptTypeSchema, St as ConsentKind, T as analyticsClientEventNameSchema, Tn as createCheckoutRequestSchema, Tt as ConsentUpdateRequest, U as UpdateReviewResult, Un as shippingAddressInputSchema, Ut as createClaimResultSchema, V as ReviewSummary, Vn as residentNumberLike, Vt as claimTypeSchema, W as WritableReview, Wn as startPaymentRequestSchema, Wt as myClaimSchema, X as updateReviewRequestSchema, Xn as ProductSearchParams, Xt as CheckoutDelivery, Y as reviewSummarySchema, Yn as ProductPage, Yt as CashReceiptType, Z as updateReviewResultSchema, Zn as ProductSort, Zt as CheckoutSession, _ as ANALYTICS_VISITOR_COOKIE, _n as StartPaymentRequest, _r as cartItemSchema, _t as CustomerInquiryCategory, a as MyOrderItem, an as PAYMENT_RESULT_VALUES, ar as OrderItemStatus, at as memberAddressSchema, b as AnalyticsClientEvent, bn as cashReceiptIdentityTypeOf, br as analyticsIdsFromCookie, bt as customerInquirySchema, c as deliveryTrackingSchema, cn as PaymentMessage, cr as claimStatusSchema, ct as wishlistAddResultSchema, d as orderShippingAddressSchema, dn as PaymentStart, dr as pageSchema, dt as PublicInquiry, en as DeliveryQuoteResult, er as productDetailSchema, et as MemberAddress, f as purchaseDecisionResultSchema, fn as PaymentStatus, fr as AddCartItemRequest, ft as createInquiryRequestSchema, g as ANALYTICS_SESSION_HEADER, gn as ShippingAddressInput, gr as addCartItemRequestSchema, gt as CustomerInquiry, h as ANALYTICS_SESSION_COOKIE, hn as RetryPaymentRequest, hr as UpdateCartItemRequest, ht as CreateCustomerInquiryRequest, i as MyOrder, in as KnownPaymentStatus, ir as ClaimStatus, it as memberAddressRequestSchema, j as createStorefrontClient, jn as paymentFailureCategorySchema, jt as consentUpdateRequestSchema, k as StorefrontClient, kn as easyPayProviderSchema, kt as consentSourceSchema, l as myOrderItemSchema, ln as PaymentMethod, lr as orderItemStatusSchema, lt as CreateInquiryRequest, m as ANALYTICS_MAX_BATCH_BYTES, mn as RemoteArea, mr as CartItem, mt as publicInquirySchema, n as storefrontStoreSchema, nn as GuestInfo, nr as productPageSchema, nt as UpdateProfileRequest, o as OrderShippingAddress, on as PAYMENT_STATUS_VALUES, or as PageInfo, ot as memberSchema, p as trackingStageResponseSchema, pn as PgProvider, pr as Cart, pt as createInquiryResultSchema, q as publicReviewSchema, qn as ProductDetail, qt as CashReceiptIdentityType, r as DeliveryTracking, rn as KnownPaymentResult, rr as productSortSchema, rt as WishlistAddResult, s as PurchaseDecisionResult, sn as PaymentFailureCategory, sr as PageParams, st as updateProfileRequestSchema, t as StorefrontStore, tn as EasyPayProvider, tr as productFacetsSchema, tt as MemberAddressRequest, u as myOrderSchema, un as PaymentOption, ur as pageInfoSchema, ut as CreateInquiryResult, v as ANALYTICS_VISITOR_HEADER, vn as availablePaymentOptionSchema, vr as cartSchema, vt as createCustomerInquiryRequestSchema, w as analyticsBatchSchema, wn as checkoutSessionSchema, wt as ConsentState, x as AnalyticsClientEventName, xn as cashReceiptRequestSchema, xt as ConsentAction, y as AnalyticsBatch, yn as cashReceiptAvailable, yr as updateCartItemRequestSchema, yt as customerInquiryCategorySchema, z as PublicReview, zn as pgProviderSchema, zt as claimReasonSchema } from "./index-
|
|
2
|
+
import { $ as Member, $n as productCardSchema, $t as DeliveryQuoteRequest, A as StorefrontClientOptions, An as guestInfoSchema, At as consentStateSchema, B as ReviewPage, Bn as remoteAreaSchema, Bt as claimReturnAddressSchema, C as AnalyticsServerEventName, Cn as checkoutDeliverySchema, Ct as ConsentSource, D as analyticsIdSchema, Dn as deliveryQuoteSchema, Dt as consentActionSchema, E as analyticsClientEventSchema, En as deliveryQuoteRequestSchema, Et as MemberConsents, F as StorefrontSessionOptions, Fn as paymentOptionListSchema, Ft as ClaimType, G as createReviewRequestSchema, Gn as CategoryNode, Gt as AvailablePaymentOption, H as UpdateReviewRequest, Hn as retryPaymentRequestSchema, Ht as createClaimRequestSchema, I as createStorefrontSession, In as paymentOptionSchema, It as CreateClaimRequest, J as reviewPageSchema, Jn as ProductFacets, Jt as CashReceiptRequest, K as createReviewResultSchema, Kn as ProductCard, Kt as CASH_RECEIPT_METHODS, L as CreateReviewRequest, Ln as paymentStartSchema, Lt as CreateClaimResult, M as STOREFRONT_SESSION_KEYS, Mn as paymentMessageSchema, Mt as memberConsentsSchema, N as SessionStorage, Nn as paymentMethodSchema, Nt as ClaimReason, O as analyticsServerEventNameSchema, On as easyPayProviderResponseSchema, Ot as consentKindSchema, P as StorefrontSession, Pn as paymentOptionKey, Pt as ClaimReturnAddress, Q as writableReviewSchema, Qn as categoryNodeSchema, Qt as CreateCheckoutRequest, R as CreateReviewResult, Rn as paymentStatusSchema, Rt as MyClaim, S as AnalyticsEventName, Sn as cashReceiptTypeSchema, St as ConsentKind, T as analyticsClientEventNameSchema, Tn as createCheckoutRequestSchema, Tt as ConsentUpdateRequest, U as UpdateReviewResult, Un as shippingAddressInputSchema, Ut as createClaimResultSchema, V as ReviewSummary, Vn as residentNumberLike, Vt as claimTypeSchema, W as WritableReview, Wn as startPaymentRequestSchema, Wt as myClaimSchema, X as updateReviewRequestSchema, Xn as ProductSearchParams, Xt as CheckoutDelivery, Y as reviewSummarySchema, Yn as ProductPage, Yt as CashReceiptType, Z as updateReviewResultSchema, Zn as ProductSort, Zt as CheckoutSession, _ as ANALYTICS_VISITOR_COOKIE, _n as StartPaymentRequest, _r as cartItemSchema, _t as CustomerInquiryCategory, a as MyOrderItem, an as PAYMENT_RESULT_VALUES, ar as OrderItemStatus, at as memberAddressSchema, b as AnalyticsClientEvent, bn as cashReceiptIdentityTypeOf, br as analyticsIdsFromCookie, bt as customerInquirySchema, c as deliveryTrackingSchema, cn as PaymentMessage, cr as claimStatusSchema, ct as wishlistAddResultSchema, d as orderShippingAddressSchema, dn as PaymentStart, dr as pageSchema, dt as PublicInquiry, en as DeliveryQuoteResult, er as productDetailSchema, et as MemberAddress, f as purchaseDecisionResultSchema, fn as PaymentStatus, fr as AddCartItemRequest, ft as createInquiryRequestSchema, g as ANALYTICS_SESSION_HEADER, gn as ShippingAddressInput, gr as addCartItemRequestSchema, gt as CustomerInquiry, h as ANALYTICS_SESSION_COOKIE, hn as RetryPaymentRequest, hr as UpdateCartItemRequest, ht as CreateCustomerInquiryRequest, i as MyOrder, in as KnownPaymentStatus, ir as ClaimStatus, it as memberAddressRequestSchema, j as createStorefrontClient, jn as paymentFailureCategorySchema, jt as consentUpdateRequestSchema, k as StorefrontClient, kn as easyPayProviderSchema, kt as consentSourceSchema, l as myOrderItemSchema, ln as PaymentMethod, lr as orderItemStatusSchema, lt as CreateInquiryRequest, m as ANALYTICS_MAX_BATCH_BYTES, mn as RemoteArea, mr as CartItem, mt as publicInquirySchema, n as storefrontStoreSchema, nn as GuestInfo, nr as productPageSchema, nt as UpdateProfileRequest, o as OrderShippingAddress, on as PAYMENT_STATUS_VALUES, or as PageInfo, ot as memberSchema, p as trackingStageResponseSchema, pn as PgProvider, pr as Cart, pt as createInquiryResultSchema, q as publicReviewSchema, qn as ProductDetail, qt as CashReceiptIdentityType, r as DeliveryTracking, rn as KnownPaymentResult, rr as productSortSchema, rt as WishlistAddResult, s as PurchaseDecisionResult, sn as PaymentFailureCategory, sr as PageParams, st as updateProfileRequestSchema, t as StorefrontStore, tn as EasyPayProvider, tr as productFacetsSchema, tt as MemberAddressRequest, u as myOrderSchema, un as PaymentOption, ur as pageInfoSchema, ut as CreateInquiryResult, v as ANALYTICS_VISITOR_HEADER, vn as availablePaymentOptionSchema, vr as cartSchema, vt as createCustomerInquiryRequestSchema, w as analyticsBatchSchema, wn as checkoutSessionSchema, wt as ConsentState, x as AnalyticsClientEventName, xn as cashReceiptRequestSchema, xt as ConsentAction, y as AnalyticsBatch, yn as cashReceiptAvailable, yr as updateCartItemRequestSchema, yt as customerInquiryCategorySchema, z as PublicReview, zn as pgProviderSchema, zt as claimReasonSchema } from "./index-BaSx86ts.mjs";
|
|
3
3
|
export { ANALYTICS_MAX_BATCH_BYTES, ANALYTICS_SESSION_COOKIE, ANALYTICS_SESSION_HEADER, ANALYTICS_VISITOR_COOKIE, ANALYTICS_VISITOR_HEADER, AddCartItemRequest, AnalyticsBatch, AnalyticsClientEvent, AnalyticsClientEventName, AnalyticsEventName, AnalyticsServerEventName, AnonymousSession, ApiError, AvailablePaymentOption, CASH_RECEIPT_METHODS, Cart, CartItem, CashReceiptIdentityType, CashReceiptRequest, CashReceiptType, CategoryNode, CheckoutDelivery, CheckoutSession, ClaimReason, ClaimReturnAddress, ClaimStatus, ClaimType, ConsentAction, ConsentKind, ConsentSource, ConsentState, ConsentUpdateRequest, CreateCheckoutRequest, CreateClaimRequest, CreateClaimResult, CreateCustomerInquiryRequest, CreateInquiryRequest, CreateInquiryResult, CreateReviewRequest, CreateReviewResult, CustomerInquiry, CustomerInquiryCategory, DeliveryQuoteRequest, DeliveryQuoteResult, DeliveryTracking, EasyPayProvider, GuestInfo, IdpAgreements, IdpAuthorizeRequest, IdpTokenRequest, KnownPaymentResult, KnownPaymentStatus, LinkIdentityRequest, LoginRequest, Member, MemberAddress, MemberAddressRequest, MemberConsents, MemberIdentities, MyClaim, MyOrder, MyOrderItem, OrderItemStatus, OrderShippingAddress, PAYMENT_RESULT_VALUES, PAYMENT_STATUS_VALUES, PageInfo, PageParams, PaymentFailureCategory, PaymentMessage, PaymentMethod, PaymentOption, PaymentStart, PaymentStatus, PgProvider, ProductCard, ProductDetail, ProductFacets, 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, UpdateCartItemRequest, UpdateProfileRequest, UpdateReviewRequest, UpdateReviewResult, WishlistAddResult, WithdrawRequest, WithdrawalBlockedDetails, WritableReview, addCartItemRequestSchema, analyticsBatchSchema, analyticsClientEventNameSchema, analyticsClientEventSchema, analyticsIdSchema, analyticsIdsFromCookie, analyticsServerEventNameSchema, anonymousSessionSchema, availablePaymentOptionSchema, buildQuery, cartItemSchema, cartSchema, cashReceiptAvailable, cashReceiptIdentityTypeOf, cashReceiptRequestSchema, cashReceiptTypeSchema, categoryNodeSchema, checkoutDeliverySchema, checkoutSessionSchema, claimReasonSchema, claimReturnAddressSchema, claimStatusSchema, claimTypeSchema, consentActionSchema, consentKindSchema, consentSourceSchema, consentStateSchema, consentUpdateRequestSchema, createCheckoutRequestSchema, createClaimRequestSchema, createClaimResultSchema, createCustomerInquiryRequestSchema, createInquiryRequestSchema, createInquiryResultSchema, createReviewRequestSchema, createReviewResultSchema, createStorefrontClient, createStorefrontSession, customerInquiryCategorySchema, customerInquirySchema, deliveryQuoteRequestSchema, deliveryQuoteSchema, deliveryTrackingSchema, easyPayProviderResponseSchema, easyPayProviderSchema, guestInfoSchema, idpAgreementsSchema, idpAuthorizeRequestSchema, idpAuthorizeResponseSchema, idpTokenRequestSchema, linkIdentityRequestSchema, loginRequestSchema, memberAddressRequestSchema, memberAddressSchema, memberConsentsSchema, memberIdentitiesSchema, memberSchema, myClaimSchema, myOrderItemSchema, myOrderSchema, orderItemStatusSchema, orderShippingAddressSchema, pageInfoSchema, pageSchema, paymentFailureCategorySchema, paymentMessageSchema, paymentMethodSchema, paymentOptionKey, paymentOptionListSchema, paymentOptionSchema, paymentStartSchema, paymentStatusSchema, pgProviderSchema, productCardSchema, productDetailSchema, productFacetsSchema, 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,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 updateCartItemRequestSchema, A as consentSourceSchema, B as categoryNodeSchema, C as createInquiryResultSchema, D as customerInquirySchema, E as customerInquiryCategorySchema, F as claimReturnAddressSchema, G as productSortSchema, H as productDetailSchema, I as claimTypeSchema, J as pageInfoSchema, K as claimStatusSchema, L as createClaimRequestSchema, M as consentUpdateRequestSchema, N as memberConsentsSchema, O as consentActionSchema, P as claimReasonSchema, Q as cartSchema, R as createClaimResultSchema, S as createInquiryRequestSchema, T as createCustomerInquiryRequestSchema, U as productFacetsSchema, V as productCardSchema, W as productPageSchema, X as addCartItemRequestSchema, Y as pageSchema, Z as cartItemSchema, _ as memberAddressRequestSchema, a as publicReviewSchema, at as linkIdentityRequestSchema, b as updateProfileRequestSchema, c as updateReviewRequestSchema, ct as signupRequestSchema, d as deliveryTrackingSchema, dt as withdrawRequestSchema, et as anonymousSessionSchema, f as myOrderItemSchema, ft as withdrawalBlockedDetailsSchema, g as trackingStageResponseSchema, gt as unwrapData, h as purchaseDecisionResultSchema, ht as toApiError, i as createReviewResultSchema, it as idpTokenRequestSchema, j as consentStateSchema, k as consentKindSchema, l as updateReviewResultSchema, lt as socialProviderSchema, m as orderShippingAddressSchema, mt as buildQuery, n as storefrontStoreSchema, nt as idpAuthorizeRequestSchema, o as reviewPageSchema, ot as loginRequestSchema, p as myOrderSchema, pt as ApiError, q as orderItemStatusSchema, r as createReviewRequestSchema, rt as idpAuthorizeResponseSchema, s as reviewSummarySchema, st as memberIdentitiesSchema, t as createStorefrontClient, tt as idpAgreementsSchema, u as writableReviewSchema, ut as tokenPairSchema, v as memberAddressSchema, w as publicInquirySchema, x as wishlistAddResultSchema, y as memberSchema, z as myClaimSchema } from "./client-
|
|
4
|
-
import { A as startPaymentRequestSchema, C as paymentStartSchema, D as residentNumberLike, E as remoteAreaSchema, O as retryPaymentRequestSchema, S as paymentOptionSchema, T as pgProviderSchema, _ as paymentFailureCategorySchema, a as cashReceiptAvailable, b as paymentOptionKey, c as cashReceiptTypeSchema, d as createCheckoutRequestSchema, f as deliveryQuoteRequestSchema, g as guestInfoSchema, h as easyPayProviderSchema, i as availablePaymentOptionSchema, k as shippingAddressInputSchema, l as checkoutDeliverySchema, m as easyPayProviderResponseSchema, n as PAYMENT_RESULT_VALUES, o as cashReceiptIdentityTypeOf, p as deliveryQuoteSchema, r as PAYMENT_STATUS_VALUES, s as cashReceiptRequestSchema, t as CASH_RECEIPT_METHODS, u as checkoutSessionSchema, v as paymentMessageSchema, w as paymentStatusSchema, x as paymentOptionListSchema, y as paymentMethodSchema } from "./checkout-
|
|
3
|
+
import { $ as updateCartItemRequestSchema, A as consentSourceSchema, B as categoryNodeSchema, C as createInquiryResultSchema, D as customerInquirySchema, E as customerInquiryCategorySchema, F as claimReturnAddressSchema, G as productSortSchema, H as productDetailSchema, I as claimTypeSchema, J as pageInfoSchema, K as claimStatusSchema, L as createClaimRequestSchema, M as consentUpdateRequestSchema, N as memberConsentsSchema, O as consentActionSchema, P as claimReasonSchema, Q as cartSchema, R as createClaimResultSchema, S as createInquiryRequestSchema, T as createCustomerInquiryRequestSchema, U as productFacetsSchema, V as productCardSchema, W as productPageSchema, X as addCartItemRequestSchema, Y as pageSchema, Z as cartItemSchema, _ as memberAddressRequestSchema, a as publicReviewSchema, at as linkIdentityRequestSchema, b as updateProfileRequestSchema, c as updateReviewRequestSchema, ct as signupRequestSchema, d as deliveryTrackingSchema, dt as withdrawRequestSchema, et as anonymousSessionSchema, f as myOrderItemSchema, ft as withdrawalBlockedDetailsSchema, g as trackingStageResponseSchema, gt as unwrapData, h as purchaseDecisionResultSchema, ht as toApiError, i as createReviewResultSchema, it as idpTokenRequestSchema, j as consentStateSchema, k as consentKindSchema, l as updateReviewResultSchema, lt as socialProviderSchema, m as orderShippingAddressSchema, mt as buildQuery, n as storefrontStoreSchema, nt as idpAuthorizeRequestSchema, o as reviewPageSchema, ot as loginRequestSchema, p as myOrderSchema, pt as ApiError, q as orderItemStatusSchema, r as createReviewRequestSchema, rt as idpAuthorizeResponseSchema, s as reviewSummarySchema, st as memberIdentitiesSchema, t as createStorefrontClient, tt as idpAgreementsSchema, u as writableReviewSchema, ut as tokenPairSchema, v as memberAddressSchema, w as publicInquirySchema, x as wishlistAddResultSchema, y as memberSchema, z as myClaimSchema } from "./client-U1LJGfWn.mjs";
|
|
4
|
+
import { A as startPaymentRequestSchema, C as paymentStartSchema, D as residentNumberLike, E as remoteAreaSchema, O as retryPaymentRequestSchema, S as paymentOptionSchema, T as pgProviderSchema, _ as paymentFailureCategorySchema, a as cashReceiptAvailable, b as paymentOptionKey, c as cashReceiptTypeSchema, d as createCheckoutRequestSchema, f as deliveryQuoteRequestSchema, g as guestInfoSchema, h as easyPayProviderSchema, i as availablePaymentOptionSchema, k as shippingAddressInputSchema, l as checkoutDeliverySchema, m as easyPayProviderResponseSchema, n as PAYMENT_RESULT_VALUES, o as cashReceiptIdentityTypeOf, p as deliveryQuoteSchema, r as PAYMENT_STATUS_VALUES, s as cashReceiptRequestSchema, t as CASH_RECEIPT_METHODS, u as checkoutSessionSchema, v as paymentMessageSchema, w as paymentStatusSchema, x as paymentOptionListSchema, y as paymentMethodSchema } from "./checkout-Cm9YAC5l.mjs";
|
|
5
5
|
//#region src/session.ts
|
|
6
6
|
/** 세션 키 상수 — SDK가 소유한다. store-sdk와 겹치지 않는 별도 네임스페이스. */
|
|
7
7
|
const STOREFRONT_SESSION_KEYS = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Jt as CashReceiptRequest, dn as PaymentStart, fn as PaymentStatus, gn as ShippingAddressInput, j as createStorefrontClient, nn as GuestInfo, un as PaymentOption } from "../index-
|
|
1
|
+
import { Jt as CashReceiptRequest, dn as PaymentStart, fn as PaymentStatus, gn as ShippingAddressInput, j as createStorefrontClient, nn as GuestInfo, un as PaymentOption } from "../index-BaSx86ts.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
|
@@ -334,6 +334,15 @@ export function createStorefrontClient(options: StorefrontClientOptions) {
|
|
|
334
334
|
list: (params?: PageParams & { status?: OrderItemStatus; from?: string }) =>
|
|
335
335
|
http.request("GET", "/me/orders", pageSchema(myOrderSchema), { query: params as Query }),
|
|
336
336
|
get: (orderId: string) => http.request("GET", path`/me/orders/${orderId}`, myOrderSchema),
|
|
337
|
+
/**
|
|
338
|
+
* 비회원 주문 조회 — 주문번호 + 주문할 때 적은 연락처·주문 조회 비밀번호.
|
|
339
|
+
*
|
|
340
|
+
* 에러: 404 `ORDER_NOT_FOUND`(주문이 없거나 연락처·비밀번호가 다름 — 둘을 구분하지 않는다) ·
|
|
341
|
+
* 429 `TOO_MANY_REQUESTS`(주문번호마다 10분에 5번까지 확인하고, 5번째가 틀리면 30분 잠금.
|
|
342
|
+
* 주문번호마다 하루 15번, 스토어 전체 분당 한도도 있다. 남은 시간은 `ApiError.details.retryAfterSeconds`).
|
|
343
|
+
* 맞게 조회하면 주문번호의 횟수가 초기화된다. 본문 형식은 `guestInfoSchema`의 `phone`·`orderPassword`와 같다.
|
|
344
|
+
* 429는 연락처·비밀번호가 맞아도 난다 — 「잠시 후 다시 시도」로 안내한다.
|
|
345
|
+
*/
|
|
337
346
|
getGuestOrder: (orderId: string, body: { phone: string; orderPassword: string }) =>
|
|
338
347
|
http.request("POST", path`/guest/orders/${orderId}`, myOrderSchema, { body }),
|
|
339
348
|
getDelivery: (orderItemId: string) =>
|
package/src/schemas/checkout.ts
CHANGED
|
@@ -205,7 +205,10 @@ export const guestInfoSchema = z.object({
|
|
|
205
205
|
name: z.string().min(1),
|
|
206
206
|
phone: z.string().regex(/^01[0-9]{8,9}$/),
|
|
207
207
|
email: z.email(),
|
|
208
|
-
orderPassword: z
|
|
208
|
+
orderPassword: z
|
|
209
|
+
.string()
|
|
210
|
+
.min(6, "주문 조회 비밀번호는 6자 이상이어야 합니다")
|
|
211
|
+
.max(128, "주문 조회 비밀번호는 128자까지입니다"),
|
|
209
212
|
});
|
|
210
213
|
|
|
211
214
|
export type GuestInfo = z.infer<typeof guestInfoSchema>;
|