@sayren/storefront-sdk 0.8.0 → 0.9.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.
@@ -1,4 +1,4 @@
1
- import { it as ApiError, t as createStorefrontClient } from "../client-DwqExvZN.mjs";
1
+ import { it as ApiError, t as createStorefrontClient } from "../client-D9iQIWnV.mjs";
2
2
  //#region src/auth/index.ts
3
3
  /** 소셜 로그인 실패 — 구매자가 취소했거나(`access_denied`) state가 맞지 않는다 */
4
4
  var IdpCallbackError = class extends Error {
@@ -219,7 +219,7 @@ const cartItemSchema = z.object({
219
219
  cartItemId: z.string(),
220
220
  productId: z.string(),
221
221
  productName: z.string(),
222
- thumbnailUrl: z.url(),
222
+ thumbnailUrl: z.url().nullable().describe("담은 상품의 대표 이미지. 없으면 null"),
223
223
  optionId: z.string().nullable(),
224
224
  optionName: z.string().nullable(),
225
225
  quantity: z.number().int(),
@@ -292,7 +292,7 @@ const categoryNodeSchema = z.lazy(() => z.object({
292
292
  const productCardSchema = z.object({
293
293
  productId: z.string(),
294
294
  name: z.string(),
295
- thumbnailUrl: z.url(),
295
+ thumbnailUrl: z.url().nullable().describe("대표 이미지 주소. 등록된 이미지가 없으면 null"),
296
296
  salePrice: z.number().int().describe("판매가. 원(KRW) 단위 정수"),
297
297
  discountedPrice: z.number().int().nullable().describe("즉시 할인 적용가. 원 단위. 할인이 없으면 null"),
298
298
  discountRate: z.number().int().nullable().describe("할인율(%). 할인이 없으면 null"),
@@ -503,7 +503,7 @@ const myOrderItemSchema = z.object({
503
503
  orderItemId: z.string(),
504
504
  productId: z.string(),
505
505
  productName: z.string(),
506
- thumbnailUrl: z.url(),
506
+ thumbnailUrl: z.url().nullable().describe("주문 시점의 대표 이미지. 없었으면 null"),
507
507
  optionName: z.string().nullable(),
508
508
  quantity: z.number().int(),
509
509
  totalPrice: z.number().int(),
@@ -585,7 +585,7 @@ const writableReviewSchema = z.object({
585
585
  productId: z.string(),
586
586
  productName: z.string(),
587
587
  optionName: z.string().nullable(),
588
- thumbnailUrl: z.url(),
588
+ thumbnailUrl: z.url().nullable().describe("주문 시점의 대표 이미지. 없었으면 null"),
589
589
  writableUntil: z.string()
590
590
  });
591
591
  const createReviewRequestSchema = z.object({
@@ -20,7 +20,7 @@ declare const cartItemSchema: z.ZodObject<{
20
20
  cartItemId: z.ZodString;
21
21
  productId: z.ZodString;
22
22
  productName: z.ZodString;
23
- thumbnailUrl: z.ZodURL;
23
+ thumbnailUrl: z.ZodNullable<z.ZodURL>;
24
24
  optionId: z.ZodNullable<z.ZodString>;
25
25
  optionName: z.ZodNullable<z.ZodString>;
26
26
  quantity: z.ZodNumber;
@@ -39,7 +39,7 @@ declare const cartSchema: z.ZodObject<{
39
39
  cartItemId: z.ZodString;
40
40
  productId: z.ZodString;
41
41
  productName: z.ZodString;
42
- thumbnailUrl: z.ZodURL;
42
+ thumbnailUrl: z.ZodNullable<z.ZodURL>;
43
43
  optionId: z.ZodNullable<z.ZodString>;
44
44
  optionName: z.ZodNullable<z.ZodString>;
45
45
  quantity: z.ZodNumber;
@@ -125,7 +125,7 @@ declare const categoryNodeSchema: z.ZodType<CategoryNode>;
125
125
  declare const productCardSchema: z.ZodObject<{
126
126
  productId: z.ZodString;
127
127
  name: z.ZodString;
128
- thumbnailUrl: z.ZodURL;
128
+ thumbnailUrl: z.ZodNullable<z.ZodURL>;
129
129
  salePrice: z.ZodNumber;
130
130
  discountedPrice: z.ZodNullable<z.ZodNumber>;
131
131
  discountRate: z.ZodNullable<z.ZodNumber>;
@@ -138,7 +138,7 @@ type ProductCard = z.infer<typeof productCardSchema>;
138
138
  declare const productDetailSchema: z.ZodObject<{
139
139
  productId: z.ZodString;
140
140
  name: z.ZodString;
141
- thumbnailUrl: z.ZodURL;
141
+ thumbnailUrl: z.ZodNullable<z.ZodURL>;
142
142
  salePrice: z.ZodNumber;
143
143
  discountedPrice: z.ZodNullable<z.ZodNumber>;
144
144
  discountRate: z.ZodNullable<z.ZodNumber>;
@@ -222,7 +222,7 @@ declare const productPageSchema: z.ZodObject<{
222
222
  contents: z.ZodArray<z.ZodObject<{
223
223
  productId: z.ZodString;
224
224
  name: z.ZodString;
225
- thumbnailUrl: z.ZodURL;
225
+ thumbnailUrl: z.ZodNullable<z.ZodURL>;
226
226
  salePrice: z.ZodNumber;
227
227
  discountedPrice: z.ZodNullable<z.ZodNumber>;
228
228
  discountRate: z.ZodNullable<z.ZodNumber>;
@@ -896,7 +896,7 @@ declare const writableReviewSchema: z.ZodObject<{
896
896
  productId: z.ZodString;
897
897
  productName: z.ZodString;
898
898
  optionName: z.ZodNullable<z.ZodString>;
899
- thumbnailUrl: z.ZodURL;
899
+ thumbnailUrl: z.ZodNullable<z.ZodURL>;
900
900
  writableUntil: z.ZodString;
901
901
  }, z.core.$strip>;
902
902
  type WritableReview = z.infer<typeof writableReviewSchema>;
@@ -1147,7 +1147,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1147
1147
  contents: {
1148
1148
  productId: string;
1149
1149
  name: string;
1150
- thumbnailUrl: string;
1150
+ thumbnailUrl: string | null;
1151
1151
  salePrice: number;
1152
1152
  discountedPrice: number | null;
1153
1153
  discountRate: number | null;
@@ -1171,7 +1171,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1171
1171
  getProduct: (productId: string) => Promise<{
1172
1172
  productId: string;
1173
1173
  name: string;
1174
- thumbnailUrl: string;
1174
+ thumbnailUrl: string | null;
1175
1175
  salePrice: number;
1176
1176
  discountedPrice: number | null;
1177
1177
  discountRate: number | null;
@@ -1266,7 +1266,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1266
1266
  cartItemId: string;
1267
1267
  productId: string;
1268
1268
  productName: string;
1269
- thumbnailUrl: string;
1269
+ thumbnailUrl: string | null;
1270
1270
  optionId: string | null;
1271
1271
  optionName: string | null;
1272
1272
  quantity: number;
@@ -1286,7 +1286,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1286
1286
  cartItemId: string;
1287
1287
  productId: string;
1288
1288
  productName: string;
1289
- thumbnailUrl: string;
1289
+ thumbnailUrl: string | null;
1290
1290
  optionId: string | null;
1291
1291
  optionName: string | null;
1292
1292
  quantity: number;
@@ -1306,7 +1306,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1306
1306
  cartItemId: string;
1307
1307
  productId: string;
1308
1308
  productName: string;
1309
- thumbnailUrl: string;
1309
+ thumbnailUrl: string | null;
1310
1310
  optionId: string | null;
1311
1311
  optionName: string | null;
1312
1312
  quantity: number;
@@ -1467,7 +1467,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1467
1467
  orderItemId: string;
1468
1468
  productId: string;
1469
1469
  productName: string;
1470
- thumbnailUrl: string;
1470
+ thumbnailUrl: string | null;
1471
1471
  optionName: string | null;
1472
1472
  quantity: number;
1473
1473
  totalPrice: number;
@@ -1502,7 +1502,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1502
1502
  orderItemId: string;
1503
1503
  productId: string;
1504
1504
  productName: string;
1505
- thumbnailUrl: string;
1505
+ thumbnailUrl: string | null;
1506
1506
  optionName: string | null;
1507
1507
  quantity: number;
1508
1508
  totalPrice: number;
@@ -1539,7 +1539,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1539
1539
  orderItemId: string;
1540
1540
  productId: string;
1541
1541
  productName: string;
1542
- thumbnailUrl: string;
1542
+ thumbnailUrl: string | null;
1543
1543
  optionName: string | null;
1544
1544
  quantity: number;
1545
1545
  totalPrice: number;
@@ -1640,7 +1640,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1640
1640
  contents: {
1641
1641
  productId: string;
1642
1642
  name: string;
1643
- thumbnailUrl: string;
1643
+ thumbnailUrl: string | null;
1644
1644
  salePrice: number;
1645
1645
  discountedPrice: number | null;
1646
1646
  discountRate: number | null;
@@ -1659,7 +1659,7 @@ declare function createStorefrontClient(options: StorefrontClientOptions): {
1659
1659
  productId: string;
1660
1660
  productName: string;
1661
1661
  optionName: string | null;
1662
- thumbnailUrl: string;
1662
+ thumbnailUrl: string | null;
1663
1663
  writableUntil: string;
1664
1664
  }[]>;
1665
1665
  create: (orderItemId: string, body: CreateReviewRequest) => Promise<{
@@ -1868,7 +1868,7 @@ declare const myOrderItemSchema: z.ZodObject<{
1868
1868
  orderItemId: z.ZodString;
1869
1869
  productId: z.ZodString;
1870
1870
  productName: z.ZodString;
1871
- thumbnailUrl: z.ZodURL;
1871
+ thumbnailUrl: z.ZodNullable<z.ZodURL>;
1872
1872
  optionName: z.ZodNullable<z.ZodString>;
1873
1873
  quantity: z.ZodNumber;
1874
1874
  totalPrice: z.ZodNumber;
@@ -1908,7 +1908,7 @@ declare const myOrderSchema: z.ZodObject<{
1908
1908
  orderItemId: z.ZodString;
1909
1909
  productId: z.ZodString;
1910
1910
  productName: z.ZodString;
1911
- thumbnailUrl: z.ZodURL;
1911
+ thumbnailUrl: z.ZodNullable<z.ZodURL>;
1912
1912
  optionName: z.ZodNullable<z.ZodString>;
1913
1913
  quantity: z.ZodNumber;
1914
1914
  totalPrice: z.ZodNumber;
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { C as signupRequestSchema, D as withdrawalBlockedDetailsSchema, E as withdrawRequestSchema, S as memberIdentitiesSchema, T as tokenPairSchema, _ as idpAuthorizeRequestSchema, a as AnonymousSession, b as linkIdentityRequestSchema, c as LinkIdentityRequest, d as SignupRequest, f as SocialProvider, g as anonymousSessionSchema, h as WithdrawalBlockedDetails, i as buildQuery, l as LoginRequest, m as WithdrawRequest, n as Query, o as IdpAuthorizeRequest, p as TokenPair, r as TokenSource, s as IdpTokenRequest, t as ApiError, u as MemberIdentities, v as idpAuthorizeResponseSchema, w as socialProviderSchema, x as loginRequestSchema, y as idpTokenRequestSchema } from "./http-BbFHVGBf.mjs";
2
- import { $ as MemberAddress, $t as easyPayProviderSchema, A as createStorefrontClient, An as claimStatusSchema, At as AvailablePaymentOption, B as ReviewSummary, Bn as cartSchema, Bt as PaymentMessage, C as analyticsBatchSchema, Cn as productFacetsSchema, Ct as CreateClaimResult, D as analyticsServerEventNameSchema, Dn as OrderItemStatus, Dt as createClaimRequestSchema, E as analyticsIdSchema, En as ClaimStatus, Et as claimTypeSchema, F as createStorefrontSession, Fn as Cart, Ft as KnownPaymentResult, G as createReviewResultSchema, Gt as PgProvider, H as UpdateReviewResult, Hn as analyticsIdsFromCookie, Ht as PaymentOption, I as CreateReviewRequest, In as CartItem, It as KnownPaymentStatus, J as reviewSummarySchema, Jt as StartPaymentRequest, K as publicReviewSchema, Kt as RetryPaymentRequest, L as CreateReviewResult, Ln as UpdateCartItemRequest, Lt as PAYMENT_RESULT_VALUES, M as SessionStorage, Mn as pageInfoSchema, Mt as CreateCheckoutRequest, N as StorefrontSession, Nn as pageSchema, Nt as EasyPayProvider, O as StorefrontClient, On as PageInfo, Ot as createClaimResultSchema, P as StorefrontSessionOptions, Pn as AddCartItemRequest, Pt as GuestInfo, Q as Member, Qt as easyPayProviderResponseSchema, R as PublicReview, Rn as addCartItemRequestSchema, Rt as PAYMENT_STATUS_VALUES, S as AnalyticsServerEventName, Sn as productDetailSchema, St as CreateClaimRequest, T as analyticsClientEventSchema, Tn as productSortSchema, Tt as claimReasonSchema, U as WritableReview, Ut as PaymentStart, V as UpdateReviewRequest, Vn as updateCartItemRequestSchema, Vt as PaymentMethod, W as createReviewRequestSchema, Wt as PaymentStatus, X as updateReviewResultSchema, Xt as checkoutSessionSchema, Y as updateReviewRequestSchema, Yt as availablePaymentOptionSchema, Z as writableReviewSchema, Zt as createCheckoutRequestSchema, _ as ANALYTICS_VISITOR_HEADER, _n as ProductPage, _t as createCustomerInquiryRequestSchema, a as MyOrderItem, an as paymentOptionListSchema, at as memberSchema, b as AnalyticsClientEventName, bn as categoryNodeSchema, bt as ClaimReason, c as deliveryTrackingSchema, cn as paymentStatusSchema, ct as CreateInquiryRequest, d as orderShippingAddressSchema, dn as shippingAddressInputSchema, dt as createInquiryRequestSchema, en as guestInfoSchema, et as MemberAddressRequest, f as purchaseDecisionResultSchema, fn as startPaymentRequestSchema, ft as createInquiryResultSchema, g as ANALYTICS_VISITOR_COOKIE, gn as ProductFacets, gt as CustomerInquiryCategory, h as ANALYTICS_SESSION_HEADER, hn as ProductDetail, ht as CustomerInquiry, i as MyOrder, in as paymentOptionKey, it as memberAddressSchema, j as STOREFRONT_SESSION_KEYS, jn as orderItemStatusSchema, jt as CheckoutSession, k as StorefrontClientOptions, kn as PageParams, kt as myClaimSchema, l as myOrderItemSchema, ln as pgProviderSchema, lt as CreateInquiryResult, m as ANALYTICS_SESSION_COOKIE, mn as ProductCard, mt as CreateCustomerInquiryRequest, n as storefrontStoreSchema, nn as paymentMessageSchema, nt as WishlistAddResult, o as OrderShippingAddress, on as paymentOptionSchema, ot as updateProfileRequestSchema, p as ANALYTICS_MAX_BATCH_BYTES, pn as CategoryNode, pt as publicInquirySchema, q as reviewPageSchema, qt as ShippingAddressInput, r as DeliveryTracking, rn as paymentMethodSchema, rt as memberAddressRequestSchema, s as PurchaseDecisionResult, sn as paymentStartSchema, st as wishlistAddResultSchema, t as StorefrontStore, tn as paymentFailureCategorySchema, tt as UpdateProfileRequest, u as myOrderSchema, un as retryPaymentRequestSchema, ut as PublicInquiry, v as AnalyticsBatch, vn as ProductSearchParams, vt as customerInquiryCategorySchema, w as analyticsClientEventNameSchema, wn as productPageSchema, wt as MyClaim, x as AnalyticsEventName, xn as productCardSchema, xt as ClaimType, y as AnalyticsClientEvent, yn as ProductSort, yt as customerInquirySchema, z as ReviewPage, zn as cartItemSchema, zt as PaymentFailureCategory } from "./index-BRXStiK2.mjs";
2
+ import { $ as MemberAddress, $t as easyPayProviderSchema, A as createStorefrontClient, An as claimStatusSchema, At as AvailablePaymentOption, B as ReviewSummary, Bn as cartSchema, Bt as PaymentMessage, C as analyticsBatchSchema, Cn as productFacetsSchema, Ct as CreateClaimResult, D as analyticsServerEventNameSchema, Dn as OrderItemStatus, Dt as createClaimRequestSchema, E as analyticsIdSchema, En as ClaimStatus, Et as claimTypeSchema, F as createStorefrontSession, Fn as Cart, Ft as KnownPaymentResult, G as createReviewResultSchema, Gt as PgProvider, H as UpdateReviewResult, Hn as analyticsIdsFromCookie, Ht as PaymentOption, I as CreateReviewRequest, In as CartItem, It as KnownPaymentStatus, J as reviewSummarySchema, Jt as StartPaymentRequest, K as publicReviewSchema, Kt as RetryPaymentRequest, L as CreateReviewResult, Ln as UpdateCartItemRequest, Lt as PAYMENT_RESULT_VALUES, M as SessionStorage, Mn as pageInfoSchema, Mt as CreateCheckoutRequest, N as StorefrontSession, Nn as pageSchema, Nt as EasyPayProvider, O as StorefrontClient, On as PageInfo, Ot as createClaimResultSchema, P as StorefrontSessionOptions, Pn as AddCartItemRequest, Pt as GuestInfo, Q as Member, Qt as easyPayProviderResponseSchema, R as PublicReview, Rn as addCartItemRequestSchema, Rt as PAYMENT_STATUS_VALUES, S as AnalyticsServerEventName, Sn as productDetailSchema, St as CreateClaimRequest, T as analyticsClientEventSchema, Tn as productSortSchema, Tt as claimReasonSchema, U as WritableReview, Ut as PaymentStart, V as UpdateReviewRequest, Vn as updateCartItemRequestSchema, Vt as PaymentMethod, W as createReviewRequestSchema, Wt as PaymentStatus, X as updateReviewResultSchema, Xt as checkoutSessionSchema, Y as updateReviewRequestSchema, Yt as availablePaymentOptionSchema, Z as writableReviewSchema, Zt as createCheckoutRequestSchema, _ as ANALYTICS_VISITOR_HEADER, _n as ProductPage, _t as createCustomerInquiryRequestSchema, a as MyOrderItem, an as paymentOptionListSchema, at as memberSchema, b as AnalyticsClientEventName, bn as categoryNodeSchema, bt as ClaimReason, c as deliveryTrackingSchema, cn as paymentStatusSchema, ct as CreateInquiryRequest, d as orderShippingAddressSchema, dn as shippingAddressInputSchema, dt as createInquiryRequestSchema, en as guestInfoSchema, et as MemberAddressRequest, f as purchaseDecisionResultSchema, fn as startPaymentRequestSchema, ft as createInquiryResultSchema, g as ANALYTICS_VISITOR_COOKIE, gn as ProductFacets, gt as CustomerInquiryCategory, h as ANALYTICS_SESSION_HEADER, hn as ProductDetail, ht as CustomerInquiry, i as MyOrder, in as paymentOptionKey, it as memberAddressSchema, j as STOREFRONT_SESSION_KEYS, jn as orderItemStatusSchema, jt as CheckoutSession, k as StorefrontClientOptions, kn as PageParams, kt as myClaimSchema, l as myOrderItemSchema, ln as pgProviderSchema, lt as CreateInquiryResult, m as ANALYTICS_SESSION_COOKIE, mn as ProductCard, mt as CreateCustomerInquiryRequest, n as storefrontStoreSchema, nn as paymentMessageSchema, nt as WishlistAddResult, o as OrderShippingAddress, on as paymentOptionSchema, ot as updateProfileRequestSchema, p as ANALYTICS_MAX_BATCH_BYTES, pn as CategoryNode, pt as publicInquirySchema, q as reviewPageSchema, qt as ShippingAddressInput, r as DeliveryTracking, rn as paymentMethodSchema, rt as memberAddressRequestSchema, s as PurchaseDecisionResult, sn as paymentStartSchema, st as wishlistAddResultSchema, t as StorefrontStore, tn as paymentFailureCategorySchema, tt as UpdateProfileRequest, u as myOrderSchema, un as retryPaymentRequestSchema, ut as PublicInquiry, v as AnalyticsBatch, vn as ProductSearchParams, vt as customerInquiryCategorySchema, w as analyticsClientEventNameSchema, wn as productPageSchema, wt as MyClaim, x as AnalyticsEventName, xn as productCardSchema, xt as ClaimType, y as AnalyticsClientEvent, yn as ProductSort, yt as customerInquirySchema, z as ReviewPage, zn as cartItemSchema, zt as PaymentFailureCategory } from "./index-DvHOQm2-.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, Cart, CartItem, CategoryNode, CheckoutSession, ClaimReason, ClaimStatus, ClaimType, CreateCheckoutRequest, CreateClaimRequest, CreateClaimResult, CreateCustomerInquiryRequest, CreateInquiryRequest, CreateInquiryResult, CreateReviewRequest, CreateReviewResult, CustomerInquiry, CustomerInquiryCategory, DeliveryTracking, EasyPayProvider, GuestInfo, IdpAuthorizeRequest, IdpTokenRequest, KnownPaymentResult, KnownPaymentStatus, LinkIdentityRequest, LoginRequest, Member, MemberAddress, MemberAddressRequest, 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, 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, categoryNodeSchema, checkoutSessionSchema, claimReasonSchema, claimStatusSchema, claimTypeSchema, createCheckoutRequestSchema, createClaimRequestSchema, createClaimResultSchema, createCustomerInquiryRequestSchema, createInquiryRequestSchema, createInquiryResultSchema, createReviewRequestSchema, createReviewResultSchema, createStorefrontClient, createStorefrontSession, customerInquiryCategorySchema, customerInquirySchema, deliveryTrackingSchema, easyPayProviderResponseSchema, easyPayProviderSchema, guestInfoSchema, idpAuthorizeRequestSchema, idpAuthorizeResponseSchema, idpTokenRequestSchema, linkIdentityRequestSchema, loginRequestSchema, memberAddressRequestSchema, memberAddressSchema, 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, retryPaymentRequestSchema, reviewPageSchema, reviewSummarySchema, shippingAddressInputSchema, signupRequestSchema, socialProviderSchema, startPaymentRequestSchema, storefrontStoreSchema, tokenPairSchema, updateCartItemRequestSchema, updateProfileRequestSchema, updateReviewRequestSchema, updateReviewResultSchema, wishlistAddResultSchema, withdrawRequestSchema, withdrawalBlockedDetailsSchema, writableReviewSchema };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as ANALYTICS_VISITOR_HEADER, c as analyticsClientEventSchema, i as ANALYTICS_VISITOR_COOKIE, l as analyticsIdSchema, n as ANALYTICS_SESSION_COOKIE, o as analyticsBatchSchema, r as ANALYTICS_SESSION_HEADER, s as analyticsClientEventNameSchema, t as ANALYTICS_MAX_BATCH_BYTES, u as analyticsServerEventNameSchema } from "./analytics-CgD70OqH.mjs";
2
2
  import { t as analyticsIdsFromCookie } from "./analytics-ids-COElZiI3.mjs";
3
- import { $ as signupRequestSchema, A as createClaimResultSchema, B as pageInfoSchema, C as publicInquirySchema, D as claimReasonSchema, E as customerInquirySchema, F as productFacetsSchema, G as updateCartItemRequestSchema, H as addCartItemRequestSchema, I as productPageSchema, J as idpAuthorizeResponseSchema, K as anonymousSessionSchema, L as productSortSchema, M as categoryNodeSchema, N as productCardSchema, O as claimTypeSchema, P as productDetailSchema, Q as memberIdentitiesSchema, R as claimStatusSchema, S as createInquiryResultSchema, T as customerInquiryCategorySchema, U as cartItemSchema, V as pageSchema, W as cartSchema, X as linkIdentityRequestSchema, Y as idpTokenRequestSchema, Z as loginRequestSchema, _ as memberAddressSchema, a as publicReviewSchema, at as buildQuery, b as wishlistAddResultSchema, c as updateReviewRequestSchema, d as deliveryTrackingSchema, et as socialProviderSchema, f as myOrderItemSchema, g as memberAddressRequestSchema, h as purchaseDecisionResultSchema, i as createReviewResultSchema, it as ApiError, j as myClaimSchema, k as createClaimRequestSchema, l as updateReviewResultSchema, m as orderShippingAddressSchema, n as storefrontStoreSchema, nt as withdrawRequestSchema, o as reviewPageSchema, ot as toApiError, p as myOrderSchema, q as idpAuthorizeRequestSchema, r as createReviewRequestSchema, rt as withdrawalBlockedDetailsSchema, s as reviewSummarySchema, st as unwrapData, t as createStorefrontClient, tt as tokenPairSchema, u as writableReviewSchema, v as memberSchema, w as createCustomerInquiryRequestSchema, x as createInquiryRequestSchema, y as updateProfileRequestSchema, z as orderItemStatusSchema } from "./client-DwqExvZN.mjs";
3
+ import { $ as signupRequestSchema, A as createClaimResultSchema, B as pageInfoSchema, C as publicInquirySchema, D as claimReasonSchema, E as customerInquirySchema, F as productFacetsSchema, G as updateCartItemRequestSchema, H as addCartItemRequestSchema, I as productPageSchema, J as idpAuthorizeResponseSchema, K as anonymousSessionSchema, L as productSortSchema, M as categoryNodeSchema, N as productCardSchema, O as claimTypeSchema, P as productDetailSchema, Q as memberIdentitiesSchema, R as claimStatusSchema, S as createInquiryResultSchema, T as customerInquiryCategorySchema, U as cartItemSchema, V as pageSchema, W as cartSchema, X as linkIdentityRequestSchema, Y as idpTokenRequestSchema, Z as loginRequestSchema, _ as memberAddressSchema, a as publicReviewSchema, at as buildQuery, b as wishlistAddResultSchema, c as updateReviewRequestSchema, d as deliveryTrackingSchema, et as socialProviderSchema, f as myOrderItemSchema, g as memberAddressRequestSchema, h as purchaseDecisionResultSchema, i as createReviewResultSchema, it as ApiError, j as myClaimSchema, k as createClaimRequestSchema, l as updateReviewResultSchema, m as orderShippingAddressSchema, n as storefrontStoreSchema, nt as withdrawRequestSchema, o as reviewPageSchema, ot as toApiError, p as myOrderSchema, q as idpAuthorizeRequestSchema, r as createReviewRequestSchema, rt as withdrawalBlockedDetailsSchema, s as reviewSummarySchema, st as unwrapData, t as createStorefrontClient, tt as tokenPairSchema, u as writableReviewSchema, v as memberSchema, w as createCustomerInquiryRequestSchema, x as createInquiryRequestSchema, y as updateProfileRequestSchema, z as orderItemStatusSchema } from "./client-D9iQIWnV.mjs";
4
4
  import { _ as pgProviderSchema, a as createCheckoutRequestSchema, b as startPaymentRequestSchema, c as guestInfoSchema, d as paymentMethodSchema, f as paymentOptionKey, g as paymentStatusSchema, h as paymentStartSchema, i as checkoutSessionSchema, l as paymentFailureCategorySchema, m as paymentOptionSchema, n as PAYMENT_STATUS_VALUES, o as easyPayProviderResponseSchema, p as paymentOptionListSchema, r as availablePaymentOptionSchema, s as easyPayProviderSchema, t as PAYMENT_RESULT_VALUES, u as paymentMessageSchema, v as retryPaymentRequestSchema, y as shippingAddressInputSchema } from "./checkout-JFk3b8RG.mjs";
5
5
  //#region src/session.ts
6
6
  /** 세션 키 상수 — SDK가 소유한다. store-sdk와 겹치지 않는 별도 네임스페이스. */
@@ -1,4 +1,4 @@
1
- import { A as createStorefrontClient, Ht as PaymentOption, Pt as GuestInfo, Ut as PaymentStart, Wt as PaymentStatus, qt as ShippingAddressInput } from "../index-BRXStiK2.mjs";
1
+ import { A as createStorefrontClient, Ht as PaymentOption, Pt as GuestInfo, Ut as PaymentStart, Wt as PaymentStatus, qt as ShippingAddressInput } from "../index-DvHOQm2-.mjs";
2
2
  //#region src/payments/index.d.ts
3
3
  /**
4
4
  * 스토어프론트 결제 — 브라우저 전용(`@sayren/storefront-sdk/payments`).
@@ -4,7 +4,17 @@ import { u as paymentMessageSchema } from "../checkout-JFk3b8RG.mjs";
4
4
  const RETURN_PAYMENT_ID = "sayrenPaymentId";
5
5
  /** 팝업 이름 — 같은 이름으로 열면 결제창이 하나만 뜬다 */
6
6
  const POPUP_NAME = "sayren-payment";
7
- const POPUP_FEATURES = "width=500,height=720,resizable=yes,scrollbars=yes";
7
+ /**
8
+ * 결제 팝업 크기 — PG 결제창이 안에서 그대로 뜬다. KG이니시스 PC 결제창이 폭 800px 안팎이라 그보다 넓게 연다
9
+ * (포트원 샌드박스 확인). 화면이 더 작으면 화면에 맞춘다.
10
+ */
11
+ const POPUP_SIZE = {
12
+ width: 860,
13
+ height: 760
14
+ };
15
+ function popupFeatures() {
16
+ return `width=${Math.min(POPUP_SIZE.width, window.screen?.availWidth || POPUP_SIZE.width)},height=${Math.min(POPUP_SIZE.height, window.screen?.availHeight || POPUP_SIZE.height)},resizable=yes,scrollbars=yes`;
17
+ }
8
18
  /** 팝업이 메시지 없이 닫혔는지 보는 간격 */
9
19
  const POPUP_POLL_MS = 500;
10
20
  /** opener를 잃은 팝업 대비 — 결제 상태를 직접 조회하기 시작하는 시점(5초)과 그 뒤 간격(3초) */
@@ -66,7 +76,7 @@ function paymentResultOf(status, options = {}) {
66
76
  function browserEnv() {
67
77
  return {
68
78
  openPopup() {
69
- const popup = window.open("about:blank", POPUP_NAME, POPUP_FEATURES);
79
+ const popup = window.open("about:blank", POPUP_NAME, popupFeatures());
70
80
  if (!popup) return null;
71
81
  return {
72
82
  get closed() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sayren/storefront-sdk",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "main": "./dist/index.mjs",
5
5
  "types": "./dist/index.d.mts",
6
6
  "exports": {
@@ -112,7 +112,17 @@ export interface PaymentsEnv {
112
112
  const RETURN_PAYMENT_ID = "sayrenPaymentId";
113
113
  /** 팝업 이름 — 같은 이름으로 열면 결제창이 하나만 뜬다 */
114
114
  const POPUP_NAME = "sayren-payment";
115
- const POPUP_FEATURES = "width=500,height=720,resizable=yes,scrollbars=yes";
115
+ /**
116
+ * 결제 팝업 크기 — PG 결제창이 안에서 그대로 뜬다. KG이니시스 PC 결제창이 폭 800px 안팎이라 그보다 넓게 연다
117
+ * (포트원 샌드박스 확인). 화면이 더 작으면 화면에 맞춘다.
118
+ */
119
+ const POPUP_SIZE = { width: 860, height: 760 };
120
+
121
+ function popupFeatures(): string {
122
+ const width = Math.min(POPUP_SIZE.width, window.screen?.availWidth || POPUP_SIZE.width);
123
+ const height = Math.min(POPUP_SIZE.height, window.screen?.availHeight || POPUP_SIZE.height);
124
+ return `width=${width},height=${height},resizable=yes,scrollbars=yes`;
125
+ }
116
126
  /** 팝업이 메시지 없이 닫혔는지 보는 간격 */
117
127
  const POPUP_POLL_MS = 500;
118
128
  /** opener를 잃은 팝업 대비 — 결제 상태를 직접 조회하기 시작하는 시점(5초)과 그 뒤 간격(3초) */
@@ -182,7 +192,7 @@ export function paymentResultOf(
182
192
  function browserEnv(): PaymentsEnv {
183
193
  return {
184
194
  openPopup() {
185
- const popup = window.open("about:blank", POPUP_NAME, POPUP_FEATURES);
195
+ const popup = window.open("about:blank", POPUP_NAME, popupFeatures());
186
196
  if (!popup) return null;
187
197
  return {
188
198
  get closed() {
@@ -4,7 +4,7 @@ export const cartItemSchema = z.object({
4
4
  cartItemId: z.string(),
5
5
  productId: z.string(),
6
6
  productName: z.string(),
7
- thumbnailUrl: z.url(),
7
+ thumbnailUrl: z.url().nullable().describe("담은 상품의 대표 이미지. 없으면 null"),
8
8
  optionId: z.string().nullable(),
9
9
  optionName: z.string().nullable(),
10
10
  quantity: z.number().int(),
@@ -20,7 +20,7 @@ export const categoryNodeSchema: z.ZodType<CategoryNode> = z.lazy(() =>
20
20
  export const productCardSchema = z.object({
21
21
  productId: z.string(),
22
22
  name: z.string(),
23
- thumbnailUrl: z.url(),
23
+ thumbnailUrl: z.url().nullable().describe("대표 이미지 주소. 등록된 이미지가 없으면 null"),
24
24
  salePrice: z.number().int().describe("판매가. 원(KRW) 단위 정수"),
25
25
  discountedPrice: z
26
26
  .number()
@@ -6,7 +6,7 @@ export const myOrderItemSchema = z.object({
6
6
  orderItemId: z.string(),
7
7
  productId: z.string(),
8
8
  productName: z.string(),
9
- thumbnailUrl: z.url(),
9
+ thumbnailUrl: z.url().nullable().describe("주문 시점의 대표 이미지. 없었으면 null"),
10
10
  optionName: z.string().nullable(),
11
11
  quantity: z.number().int(),
12
12
  totalPrice: z.number().int(),
@@ -32,7 +32,7 @@ export const writableReviewSchema = z.object({
32
32
  productId: z.string(),
33
33
  productName: z.string(),
34
34
  optionName: z.string().nullable(),
35
- thumbnailUrl: z.url(),
35
+ thumbnailUrl: z.url().nullable().describe("주문 시점의 대표 이미지. 없었으면 null"),
36
36
  writableUntil: z.string(),
37
37
  });
38
38