@sayren/storefront-sdk 0.15.0 → 0.16.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 { gt as ApiError, t as createStorefrontClient } from "../client-ZPNEEeRT.mjs";
1
+ import { pt as ApiError, t as createStorefrontClient } from "../client-BrDY5HO3.mjs";
2
2
  //#region src/auth/index.ts
3
3
  /** 소셜 로그인 실패 — 구매자가 취소했거나(`access_denied`) state가 맞지 않는다 */
4
4
  var IdpCallbackError = class extends Error {
@@ -2,20 +2,14 @@ import { z } from "zod";
2
2
  //#region src/schemas/fulfillment.ts
3
3
  /**
4
4
  * 구매자용 상품 이행 (이슈 #57) — 관리 API의 상품 이행에서 구매자에게 필요한 것만 싣는다. 유형, 배송 필요 여부, 배송 안내(배송비·
5
- * 무료 기준·반품·교환 배송비), 청약철회 제한 여부, 방문 수령지 표시값이다. 셀러 내부 값(출고지·반품지 id, 코드 풀 여부, 재고 추적 여부)은
6
- * 싣지 않는다.
5
+ * 무료 기준·반품·교환 배송비)다. 셀러 내부 값(출고지·반품지 id)은 싣지 않는다.
7
6
  *
8
- * 유형 이름은 응답에서 문자열이고, 모르는 유형(서버가 나중에 더한 유형, 예: #56 `RESERVATION`)은 `{ type: "OTHER", rawType,
7
+ * 유형은 `SHIPPING`(배송 상품)과 `MANUAL`(배송 없는 상품, 판매자가 제공 처리) 둘이다(이슈 #48 범위 축소).
8
+ * 유형 이름은 응답에서 문자열이고, 모르는 유형(서버가 나중에 더한 유형)은 `{ type: "OTHER", rawType,
9
9
  * requiresShipping }`로 읽는다. `requiresShipping`은 판별 값에서 파생되지만 **모든 가지에 싣는다** — 모르는 유형에서도 주문서가
10
10
  * 배송지를 받을지 정할 수 있어야 한다.
11
11
  */
12
- const KNOWN_TYPES = [
13
- "SHIPPING",
14
- "DOWNLOAD",
15
- "CODE",
16
- "SERVICE",
17
- "PICKUP"
18
- ];
12
+ const KNOWN_TYPES = ["SHIPPING", "MANUAL"];
19
13
  /** 알려진 유형만 판별 유니온으로 검사하고 모르는 유형은 `OTHER`로 읽는다. 알려진 유형의 모양이 틀리면 파싱 오류다 */
20
14
  function openUnion(known) {
21
15
  return z.union([known, z.looseObject({
@@ -28,99 +22,44 @@ function openUnion(known) {
28
22
  }))]);
29
23
  }
30
24
  const requiresShippingDescription = "택배 배송이 필요한가. false면 배송비가 없고 주문서가 배송지를 받지 않는다";
31
- const withdrawalRestrictedField = z.boolean().describe("청약철회 제한 대상인가. true면 주문서가 제한 고지 동의를 받고, 첫 다운로드·열람 뒤 단순 변심 취소·반품을 받지 않는다");
32
- /** 방문 수령 장소 표시값 — 주소 id는 싣지 않는다 */
33
- const pickupLocationSchema = z.object({
34
- name: z.string().describe("수령 장소 이름"),
35
- zipCode: z.string(),
36
- address1: z.string(),
37
- address2: z.string().nullable(),
38
- phone: z.string().describe("수령 장소 연락처")
39
- });
40
25
  /** 상품 카드(목록·찜)의 이행 — 유형과 배송 필요 여부만. 배송비·환불 정책은 상세에서 본다 */
41
26
  const productCardFulfillmentSchema = z.object({
42
27
  type: z.string().describe("상품 유형. 값이 추가될 수 있어 문자열로 받는다"),
43
28
  requiresShipping: z.boolean().describe(requiresShippingDescription)
44
29
  });
45
30
  /** 상품 상세의 이행 */
46
- const productFulfillmentViewSchema = openUnion(z.discriminatedUnion("type", [
47
- z.object({
48
- type: z.literal("SHIPPING"),
49
- requiresShipping: z.literal(true),
50
- shipping: z.object({
51
- deliveryType: z.string().describe("배송비 유형. 현재 값은 `FREE`·`PAID`·`CONDITIONAL_FREE`"),
52
- deliveryFee: z.number().int().describe("기본 배송비. 원 단위. 묶음·지역 추가 배송비는 장바구니·주문서 견적이 정한다"),
53
- conditionalFreeAmount: z.number().int().nullable().describe("조건부 무료 기준 금액. 조건부 무료가 아니면 null"),
54
- estimatedDays: z.string().describe("예상 배송 기간 안내 문구"),
55
- returnDeliveryFee: z.number().int().describe("단순 변심 반품 배송비(유효 환불 정책). 원 단위"),
56
- exchangeDeliveryFee: z.number().int().describe("단순 변심 교환 배송비(유효 환불 정책). 원 단위")
57
- })
58
- }),
59
- z.object({
60
- type: z.literal("DOWNLOAD"),
61
- requiresShipping: z.literal(false),
62
- download: z.object({
63
- limit: z.number().int().describe("다운로드 횟수 한도(수량 1개당)"),
64
- days: z.number().int().describe("다운로드 기간(제공일부터 일수)"),
65
- withdrawalRestricted: withdrawalRestrictedField
66
- })
67
- }),
68
- z.object({
69
- type: z.literal("CODE"),
70
- requiresShipping: z.literal(false),
71
- code: z.object({ withdrawalRestricted: withdrawalRestrictedField })
72
- }),
73
- z.object({
74
- type: z.literal("SERVICE"),
75
- requiresShipping: z.literal(false)
76
- }),
77
- z.object({
78
- type: z.literal("PICKUP"),
79
- requiresShipping: z.literal(false),
80
- pickup: z.object({ location: pickupLocationSchema.nullable().describe("방문 수령 장소. 수령지가 지워졌으면 null이다(판매자에게 문의)") })
31
+ const productFulfillmentViewSchema = openUnion(z.discriminatedUnion("type", [z.object({
32
+ type: z.literal("SHIPPING"),
33
+ requiresShipping: z.literal(true),
34
+ shipping: z.object({
35
+ deliveryType: z.string().describe("배송비 유형. 현재 값은 `FREE`·`PAID`·`CONDITIONAL_FREE`"),
36
+ deliveryFee: z.number().int().describe("기본 배송비. 원 단위. 묶음·지역 추가 배송비는 장바구니·주문서 견적이 정한다"),
37
+ conditionalFreeAmount: z.number().int().nullable().describe("조건부 무료 기준 금액. 조건부 무료가 아니면 null"),
38
+ estimatedDays: z.string().describe("예상 배송 기간 안내 문구"),
39
+ returnDeliveryFee: z.number().int().describe("단순 변심 반품 배송비(유효 환불 정책). 원 단위"),
40
+ exchangeDeliveryFee: z.number().int().describe("단순 변심 교환 배송비(유효 환불 정책). 원 단위")
81
41
  })
82
- ])).describe("상품 이행. `type`이 유형이고 같은 이름의 키가 유형별 안내다. 값이 추가될 수 있어 SDK는 모르는 유형을 `OTHER`로 읽는다");
42
+ }), z.object({
43
+ type: z.literal("MANUAL"),
44
+ requiresShipping: z.literal(false)
45
+ })])).describe("상품 이행. `type`이 유형이고 같은 이름의 키가 유형별 안내다. 값이 추가될 수 있어 SDK는 모르는 유형을 `OTHER`로 읽는다");
83
46
  /** 장바구니 줄·주문서 줄의 이행 — 주문서 줄은 주문서 시점 스냅샷이다 */
84
47
  const lineFulfillmentSchema = z.object({
85
48
  type: z.string().describe("상품 유형. 값이 추가될 수 있어 문자열로 받는다"),
86
49
  requiresShipping: z.boolean().describe(requiresShippingDescription),
87
- withdrawalRestricted: withdrawalRestrictedField
50
+ withdrawalRestricted: z.boolean().optional().describe("**Deprecated** — 항상 false다. 청약철회 제한 기능을 없앴고(이슈 #48) storefront-sdk 0.15 이하 호환으로만 싣는다. 게시된 스토어프론트가 0.16 이상으로 넘어간 뒤 다음 릴리스에서 뺀다")
88
51
  });
89
52
  /**
90
- * 내 주문 주문상품의 주문 시점 이행 스냅샷. 상품을 나중에 고쳐도 바뀌지 않는다. 실제 제공 기록(코드 가린 값·다운로드 남은 횟수)은
53
+ * 내 주문 주문상품의 주문 시점 이행 스냅샷. 상품을 나중에 고쳐도 바뀌지 않는다. 제공 기록(제공 시각·판매자 안내)은
91
54
  * 주문상품의 `fulfillment`다.
92
55
  */
93
- const myOrderItemFulfillmentSnapshotSchema = openUnion(z.discriminatedUnion("type", [
94
- z.object({
95
- type: z.literal("SHIPPING"),
96
- requiresShipping: z.literal(true)
97
- }),
98
- z.object({
99
- type: z.literal("DOWNLOAD"),
100
- requiresShipping: z.literal(false),
101
- download: z.object({ withdrawalRestricted: withdrawalRestrictedField })
102
- }),
103
- z.object({
104
- type: z.literal("CODE"),
105
- requiresShipping: z.literal(false),
106
- code: z.object({ withdrawalRestricted: withdrawalRestrictedField })
107
- }),
108
- z.object({
109
- type: z.literal("SERVICE"),
110
- requiresShipping: z.literal(false)
111
- }),
112
- z.object({
113
- type: z.literal("PICKUP"),
114
- requiresShipping: z.literal(false),
115
- pickup: z.object({ location: pickupLocationSchema.nullable().describe("주문 시점 방문 수령 장소. 수령지가 지워졌으면 null이다(판매자에게 문의)") })
116
- })
117
- ])).describe("주문 시점 이행 스냅샷. 값이 추가될 수 있어 SDK는 모르는 유형을 `OTHER`로 읽는다");
118
- /** 청약철회 제한 대상인가 — 파일 다운로드·코드 발급만 켤 수 있다 */
119
- function withdrawalRestrictedOfView(fulfillment) {
120
- if (fulfillment.type === "DOWNLOAD") return fulfillment.download.withdrawalRestricted;
121
- if (fulfillment.type === "CODE") return fulfillment.code.withdrawalRestricted;
122
- return false;
123
- }
56
+ const myOrderItemFulfillmentSnapshotSchema = openUnion(z.discriminatedUnion("type", [z.object({
57
+ type: z.literal("SHIPPING"),
58
+ requiresShipping: z.literal(true)
59
+ }), z.object({
60
+ type: z.literal("MANUAL"),
61
+ requiresShipping: z.literal(false)
62
+ })])).describe("주문 시점 이행 스냅샷. 값이 추가될 수 있어 SDK는 모르는 유형을 `OTHER`로 읽는다");
124
63
  //#endregion
125
64
  //#region src/schemas/coupon.ts
126
65
  /**
@@ -276,9 +215,9 @@ const checkoutSessionSchema = z.object({
276
215
  delivery: checkoutDeliverySchema.describe("배송비 내역. 배송지를 입력하면 금액이 바뀔 수 있다 — 최종 금액은 결제 시작 응답의 `amounts`다"),
277
216
  requiresShipping: z.boolean().describe("택배 배송이 필요한 상품이 있는가. false면 배송지를 받지 않는다 — 결제 시작에 `shippingAddress`를 보내지 않아도 된다"),
278
217
  withdrawal: z.object({
279
- required: z.boolean().describe("청약철회 제한 상품(제공이 시작되면 취소·반품할 수 없는 파일·코드·이용권)이 있는가. true면 `notice`를 결제 전에 보여 주고 동의를 받아 결제 시작에 `withdrawalAgreement: true`를 보낸다"),
280
- notice: z.string().nullable().describe("구매자에게 보여 줄 고지 문구. `required`가 false면 null")
281
- }).describe("청약철회 제한 고지(이슈 #48)"),
218
+ required: z.boolean(),
219
+ notice: z.string().nullable()
220
+ }).optional().describe("**Deprecated** — 항상 `{ required: false, notice: null }`이다. 청약철회 제한 고지를 없앴고(이슈 #48) storefront-sdk 0.15 이하 호환으로만 싣는다. 게시된 스토어프론트가 0.16 이상으로 넘어간 뒤 다음 릴리스에서 뺀다"),
282
221
  expiresAt: z.string(),
283
222
  paymentOptions: z.lazy(() => paymentOptionListSchema).describe("이 주문서에서 고를 수 있는 결제 옵션, PG 우선순위순. 셀러가 켠 PG·결제수단·간편결제만 담긴다. 비어 있으면 지금 결제할 수 없다"),
284
223
  testPayment: z.boolean().describe("지금 결제하면 테스트 결제(샌드박스)인가. true면 실제로 돈이 나가지 않습니다 — 주문서에 테스트 결제 안내를 표시합니다. 결제 요청 시점에 스토어 결제 설정으로 다시 정해지니 최종 값은 결제 요청 응답의 `testPayment`입니다")
@@ -460,9 +399,8 @@ const cashReceiptField = cashReceiptRequestSchema.optional().describe("현금영
460
399
  const startPaymentRequestSchema = z.object({
461
400
  option: paymentOptionSchema,
462
401
  returnUrl: z.url().max(2048).describe("결제를 마치면 돌아올 스토어프론트 주소. 스토어 결제 도메인에 등록된 도메인이어야 한다"),
463
- shippingAddress: shippingAddressInputSchema.optional().describe("배송지. 주문서의 `requiresShipping`이 true면 필수이고 없으면 400 `SHIPPING_ADDRESS_REQUIRED`다. 배송이 필요 없는 주문(파일·코드·이용권·방문 수령만)은 보내지 않아도 된다. 보내면 형식을 검사한 뒤 버린다"),
402
+ shippingAddress: shippingAddressInputSchema.optional().describe("배송지. 주문서의 `requiresShipping`이 true면 필수이고 없으면 400 `SHIPPING_ADDRESS_REQUIRED`다. 배송이 필요 없는 주문(배송 없는 상품만)은 보내지 않아도 된다. 보내면 형식을 검사한 뒤 버린다"),
464
403
  guest: guestInfoSchema.optional(),
465
- withdrawalAgreement: z.boolean().optional().describe("청약철회 제한 동의. 주문서의 `withdrawal.required`가 true면 true여야 하고 아니면 400 `WITHDRAWAL_AGREEMENT_REQUIRED`다. 동의 시각이 주문에 남는다"),
466
404
  cashReceipt: cashReceiptField,
467
405
  coupons: couponApplicationListSchema.optional().describe("적용할 쿠폰(이슈 #47). 결제 시작이 쿠폰을 예약하고 할인한 금액으로 결제 금액을 정한다 — 응답의 `amounts`가 확정 금액이다. 적용하지 못하는 쿠폰이 하나라도 있으면 400 `COUPON_NOT_APPLICABLE`(`details`에 사유)이다. 결제가 실패하거나 만료되면 예약이 풀린다. 쿠폰을 바꾸려면 새로 결제를 시작한다(재시도는 같은 쿠폰을 쓴다)")
468
406
  });
@@ -537,4 +475,4 @@ const paymentMessageSchema = z.object({
537
475
  orderId: z.string().optional()
538
476
  });
539
477
  //#endregion
540
- export { startPaymentRequestSchema as A, myCouponListQuerySchema as B, paymentStartSchema as C, residentNumberLike as D, remoteAreaSchema as E, checkoutPricingSchema as F, pickupLocationSchema as G, pricingAmountsSchema as H, couponApplicationListSchema as I, withdrawalRestrictedOfView as J, productCardFulfillmentSchema as K, couponApplicationSchema as L, MIN_PAYMENT_AMOUNT as M, applicableCouponSchema as N, retryPaymentRequestSchema as O, checkoutPricingRequestSchema as P, couponBenefitViewSchema as R, paymentOptionSchema as S, pgProviderSchema as T, lineFulfillmentSchema as U, myCouponSchema as V, myOrderItemFulfillmentSnapshotSchema as W, paymentFailureCategorySchema as _, cashReceiptAvailable as a, paymentOptionKey as b, cashReceiptTypeSchema as c, createCheckoutRequestSchema as d, deliveryQuoteRequestSchema as f, guestInfoSchema as g, easyPayProviderSchema as h, availablePaymentOptionSchema as i, MAX_COUPONS_PER_CHECKOUT as j, shippingAddressInputSchema as k, checkoutDeliverySchema as l, easyPayProviderResponseSchema as m, PAYMENT_RESULT_VALUES as n, cashReceiptIdentityTypeOf as o, deliveryQuoteSchema as p, productFulfillmentViewSchema as q, PAYMENT_STATUS_VALUES as r, cashReceiptRequestSchema as s, CASH_RECEIPT_METHODS as t, checkoutSessionSchema as u, paymentMessageSchema as v, paymentStatusSchema as w, paymentOptionListSchema as x, paymentMethodSchema as y, couponResultSchema as z };
478
+ export { startPaymentRequestSchema as A, myCouponListQuerySchema as B, paymentStartSchema as C, residentNumberLike as D, remoteAreaSchema as E, checkoutPricingSchema as F, productCardFulfillmentSchema as G, pricingAmountsSchema as H, couponApplicationListSchema as I, productFulfillmentViewSchema as K, couponApplicationSchema as L, MIN_PAYMENT_AMOUNT as M, applicableCouponSchema as N, retryPaymentRequestSchema as O, checkoutPricingRequestSchema as P, couponBenefitViewSchema as R, paymentOptionSchema as S, pgProviderSchema as T, lineFulfillmentSchema as U, myCouponSchema as V, myOrderItemFulfillmentSnapshotSchema as W, paymentFailureCategorySchema as _, cashReceiptAvailable as a, paymentOptionKey as b, cashReceiptTypeSchema as c, createCheckoutRequestSchema as d, deliveryQuoteRequestSchema as f, guestInfoSchema as g, easyPayProviderSchema as h, availablePaymentOptionSchema as i, MAX_COUPONS_PER_CHECKOUT as j, shippingAddressInputSchema as k, checkoutDeliverySchema as l, easyPayProviderResponseSchema as m, PAYMENT_RESULT_VALUES as n, cashReceiptIdentityTypeOf as o, deliveryQuoteSchema as p, PAYMENT_STATUS_VALUES as r, cashReceiptRequestSchema as s, CASH_RECEIPT_METHODS as t, checkoutSessionSchema as u, paymentMessageSchema as v, paymentStatusSchema as w, paymentOptionListSchema as x, paymentMethodSchema as y, couponResultSchema as z };
@@ -1,5 +1,5 @@
1
1
  import { a as ANALYTICS_VISITOR_HEADER, r as ANALYTICS_SESSION_HEADER } from "./analytics-CgD70OqH.mjs";
2
- import { A as startPaymentRequestSchema, C as paymentStartSchema, F as checkoutPricingSchema, K as productCardFulfillmentSchema, N as applicableCouponSchema, O as retryPaymentRequestSchema, P as checkoutPricingRequestSchema, U as lineFulfillmentSchema, V as myCouponSchema, W as myOrderItemFulfillmentSnapshotSchema, d as createCheckoutRequestSchema, f as deliveryQuoteRequestSchema, m as easyPayProviderResponseSchema, p as deliveryQuoteSchema, q as productFulfillmentViewSchema, u as checkoutSessionSchema, w as paymentStatusSchema, y as paymentMethodSchema } from "./checkout-Dsv9C9Zp.mjs";
2
+ import { A as startPaymentRequestSchema, C as paymentStartSchema, F as checkoutPricingSchema, G as productCardFulfillmentSchema, K as productFulfillmentViewSchema, N as applicableCouponSchema, O as retryPaymentRequestSchema, P as checkoutPricingRequestSchema, U as lineFulfillmentSchema, V as myCouponSchema, W as myOrderItemFulfillmentSnapshotSchema, d as createCheckoutRequestSchema, f as deliveryQuoteRequestSchema, m as easyPayProviderResponseSchema, p as deliveryQuoteSchema, u as checkoutSessionSchema, w as paymentStatusSchema, y as paymentMethodSchema } from "./checkout-DTfoCsMF.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/http.ts
5
5
  /** 표준 엔벨로프의 $.error 상세 */
@@ -607,27 +607,12 @@ const myOrderItemSchema = z.object({
607
607
  totalPrice: z.number().int().describe("주문상품 금액 (즉시할인 반영, 쿠폰 전)"),
608
608
  couponDiscountAmount: z.number().int().optional().default(0).describe("이 주문상품에 배분된 쿠폰 할인. 실결제 금액은 `totalPrice − couponDiscountAmount`다. 쿠폰이 없으면 0. 서버는 항상 싣는다"),
609
609
  status: orderItemStatusSchema,
610
- fulfillmentSnapshot: myOrderItemFulfillmentSnapshotSchema.describe("주문 시점 이행 스냅샷(이슈 #57). `type`이 주문 시점 상품 유형이다. 배송 상품이 아니면 `DELIVERED`는 제공 완료(방문 수령은 수령 완료)다. 청약철회 제한 주문상품(`download`·`code`의 `withdrawalRestricted`)은 제공이 시작되면(다운로드·열람) 구매자 취소·반품을 받지 않는다"),
610
+ fulfillmentSnapshot: myOrderItemFulfillmentSnapshotSchema.describe("주문 시점 이행 스냅샷(이슈 #57). `type`이 주문 시점 상품 유형이다. 배송 없는 상품(`MANUAL`)이면 `DELIVERED`는 제공 완료다"),
611
611
  fulfillment: z.object({
612
- status: z.string().describe("제공 상태. `FULFILLED`(제공함)·`REVOKED`(환불 등으로 회수함). 값이 추가될 수 있어 문자열로 받는다"),
612
+ status: z.string().describe("제공 상태. `FULFILLED`(제공함)·`REVOKED`(전량 취소·환불로 회수함). 값이 추가될 수 있어 문자열로 받는다"),
613
613
  fulfilledAt: z.string().describe("제공 시각 (ISO 8601)"),
614
- note: z.string().nullable().describe("셀러가 남긴 이용 안내. 없으면 null"),
615
- codes: z.array(z.object({
616
- codeId: z.string(),
617
- hint: z.string().describe("가린 코드 — 끝 4자만 보인다(예: `****AB12`)"),
618
- revealedAt: z.string().nullable().describe("처음 열람한 시각. 열람 전이면 null")
619
- })).optional().default([]).describe("코드 발급 상품의 코드(가린 값). 평문은 `fulfillment/reveal`로 연다. 환불로 회수된 코드는 싣지 않는다. 서버는 항상 싣는다"),
620
- download: z.object({
621
- count: z.number().int().describe("지금까지 받은 횟수"),
622
- limit: z.number().int().describe("받을 수 있는 횟수"),
623
- expiresAt: z.string().nullable().describe("받을 수 있는 기한 (ISO 8601)"),
624
- files: z.array(z.object({
625
- assetId: z.string(),
626
- fileName: z.string(),
627
- sizeBytes: z.number().int().nullable()
628
- }))
629
- }).nullable().optional().default(null).describe("파일 다운로드 상품의 횟수·기한·파일 목록. 파일 주소는 `downloads`로 받는다. 다른 유형은 null. 서버는 항상 싣는다")
630
- }).nullable().optional().default(null).describe("비실물 상품(이용권·방문 수령 등)의 제공 정보(이슈 #48). 제공 전이거나 배송 상품이면 null이다. 비실물의 `DELIVERED`는 제공 완료(방문 수령은 수령 완료)로 표시한다. 서버는 항상 싣는다"),
614
+ note: z.string().nullable().describe("판매자가 제공 처리 때 남긴 이용 안내. 없으면 null")
615
+ }).nullable().optional().default(null).describe("배송 없는 상품의 제공 기록(이슈 #48). 제공 전이거나 배송 상품이면 null이다. 배송 없는 상품의 `DELIVERED`는 제공 완료로 표시한다. 서버는 항상 싣는다"),
631
616
  claimStatus: z.string().nullable(),
632
617
  reviewWritten: z.boolean(),
633
618
  autoDecisionDate: z.string().nullable()
@@ -666,7 +651,6 @@ const myOrderSchema = z.object({
666
651
  paidAt: z.string().nullable(),
667
652
  receiptUrl: z.url().nullable()
668
653
  }),
669
- withdrawalAgreedAt: z.string().nullable().optional().default(null).describe("청약철회 제한 안내에 동의한 시각(이슈 #48). 제한 상품이 없던 주문은 null. 서버는 항상 싣는다"),
670
654
  testPayment: z.boolean().describe("테스트 결제(샌드박스 결제) 주문인가. true면 실제로 돈이 나가지 않았습니다 — 주문 화면에 테스트 결제 배지를 표시합니다")
671
655
  });
672
656
  /**
@@ -698,33 +682,6 @@ const purchaseDecisionResultSchema = z.object({
698
682
  status: z.literal("PURCHASE_DECIDED"),
699
683
  decidedAt: z.string()
700
684
  });
701
- /**
702
- * 코드 열람 응답 (이슈 #48) — `POST /storefront/v1/me/order-items/{orderItemId}/fulfillment/reveal`(회원)·
703
- * `POST /storefront/v1/guest/orders/{orderId}/order-items/{orderItemId}/fulfillment/reveal`(비회원).
704
- * 평문 코드는 이 응답에만 있다. 화면에 보인 뒤 저장하지 않는다(응답은 `Cache-Control: no-store`).
705
- * 첫 열람 시각은 청약철회 판단의 근거(제공 개시)로 남는다.
706
- */
707
- const fulfillmentRevealSchema = z.object({
708
- orderItemId: z.string(),
709
- codes: z.array(z.object({
710
- codeId: z.string(),
711
- code: z.string().describe("코드 평문"),
712
- revealedAt: z.string().describe("처음 열람한 시각")
713
- }))
714
- });
715
- /**
716
- * 다운로드 요청 (이슈 #48) — `POST /storefront/v1/me/order-items/{orderItemId}/downloads`(회원)·
717
- * `POST /storefront/v1/guest/orders/{orderId}/order-items/{orderItemId}/downloads`(비회원, 연락처·비밀번호를 함께 보낸다).
718
- * 파일이 하나면 `assetId`를 생략할 수 있다.
719
- */
720
- const downloadRequestSchema = z.object({ assetId: z.string().min(1).max(64).optional().describe("받을 파일. 파일이 여러 개면 필수다") });
721
- /** 다운로드 응답 — 수명 300초의 서명 주소. 받을 때마다 횟수가 하나 준다 */
722
- const downloadLinkSchema = z.object({
723
- url: z.url().describe("서명 주소. 300초 뒤 만료된다 — 받아서 바로 쓰고 저장하지 않는다"),
724
- expiresAt: z.string().describe("서명 주소 만료 시각"),
725
- fileName: z.string(),
726
- remaining: z.number().int().describe("남은 다운로드 횟수")
727
- });
728
685
  //#endregion
729
686
  //#region src/schemas/review.ts
730
687
  const publicReviewSchema = z.object({
@@ -948,27 +905,6 @@ get: () => http.request("GET", "/store", storefrontStoreSchema) },
948
905
  */
949
906
  getGuestOrder: (orderId, body) => http.request("POST", path`/guest/orders/${orderId}`, myOrderSchema, { body }),
950
907
  getDelivery: (orderItemId) => http.request("GET", path`/me/order-items/${orderItemId}/delivery`, deliveryTrackingSchema),
951
- /**
952
- * 코드 열람 (이슈 #48) — 코드 발급 상품의 평문 코드. 처음 열람한 시각이 제공 개시 증거로 남는다.
953
- *
954
- * 에러: 404 `ORDER_ITEM_NOT_FOUND`(없거나 남의 주문상품) · 404 `FULFILLMENT_NOT_FOUND`(제공 전·회수됨·코드 상품 아님) ·
955
- * 429 `TOO_MANY_REQUESTS`
956
- */
957
- revealCode: (orderItemId) => http.request("POST", path`/me/order-items/${orderItemId}/fulfillment/reveal`, fulfillmentRevealSchema),
958
- /**
959
- * 파일 다운로드 (이슈 #48) — 수명 300초의 서명 주소를 받는다. 받을 때마다 남은 횟수가 준다.
960
- *
961
- * 에러: 404 `FULFILLMENT_NOT_FOUND`(제공 전·회수됨·파일 상품 아님) · 409 `DOWNLOAD_LIMIT_REACHED`(횟수 소진) ·
962
- * 409 `DOWNLOAD_EXPIRED`(기한 지남) · 400 `ASSET_REQUIRED`(파일이 여러 개인데 `assetId` 없음)
963
- */
964
- createDownload: (orderItemId, body = {}) => http.request("POST", path`/me/order-items/${orderItemId}/downloads`, downloadLinkSchema, { body: downloadRequestSchema.parse(body) }),
965
- /** 비회원 다운로드 — 비회원 주문 조회와 같은 연락처·주문 조회 비밀번호로 확인한다 */
966
- createGuestDownload: (orderId, orderItemId, body) => http.request("POST", path`/guest/orders/${orderId}/order-items/${orderItemId}/downloads`, downloadLinkSchema, { body }),
967
- /**
968
- * 비회원 코드 열람 — 비회원 주문 조회와 같은 연락처·주문 조회 비밀번호로 확인하고 같은 시도 한도를 쓴다.
969
- * 틀리면 구분 없이 404 `ORDER_NOT_FOUND`다.
970
- */
971
- revealGuestCode: (orderId, orderItemId, body) => http.request("POST", path`/guest/orders/${orderId}/order-items/${orderItemId}/fulfillment/reveal`, fulfillmentRevealSchema, { body }),
972
908
  decidePurchase: (orderItemId) => http.requestVoid("POST", path`/me/order-items/${orderItemId}/purchase-decision`)
973
909
  },
974
910
  myClaims: {
@@ -1010,4 +946,4 @@ get: () => http.request("GET", "/store", storefrontStoreSchema) },
1010
946
  };
1011
947
  }
1012
948
  //#endregion
1013
- export { addCartItemRequestSchema as $, customerInquirySchema as A, createClaimRequestSchema as B, updateProfileRequestSchema as C, publicInquirySchema as D, createInquiryResultSchema as E, consentUpdateRequestSchema as F, productDetailSchema as G, myClaimSchema as H, memberConsentsSchema as I, productSortSchema as J, productFacetsSchema as K, claimReasonSchema as L, consentKindSchema as M, consentSourceSchema as N, createCustomerInquiryRequestSchema as O, consentStateSchema as P, pageSchema as Q, claimReturnAddressSchema as R, memberSchema as S, createInquiryRequestSchema as T, categoryNodeSchema as U, createClaimResultSchema as V, productCardSchema as W, orderItemStatusSchema as X, claimStatusSchema as Y, pageInfoSchema as Z, orderShippingAddressSchema as _, buildQuery as _t, publicReviewSchema as a, idpAuthorizeRequestSchema as at, memberAddressRequestSchema as b, updateReviewRequestSchema as c, linkIdentityRequestSchema as ct, deliveryTrackingSchema as d, signupRequestSchema as dt, cartItemSchema as et, downloadLinkSchema as f, socialProviderSchema as ft, myOrderSchema as g, ApiError as gt, myOrderItemSchema as h, withdrawalBlockedDetailsSchema as ht, createReviewResultSchema as i, idpAgreementsSchema as it, consentActionSchema as j, customerInquiryCategorySchema as k, updateReviewResultSchema as l, loginRequestSchema as lt, fulfillmentRevealSchema as m, withdrawRequestSchema as mt, storefrontStoreSchema as n, updateCartItemRequestSchema as nt, reviewPageSchema as o, idpAuthorizeResponseSchema as ot, downloadRequestSchema as p, tokenPairSchema as pt, productPageSchema as q, createReviewRequestSchema as r, anonymousSessionSchema as rt, reviewSummarySchema as s, idpTokenRequestSchema as st, createStorefrontClient as t, cartSchema as tt, writableReviewSchema as u, memberIdentitiesSchema as ut, purchaseDecisionResultSchema as v, toApiError as vt, wishlistAddResultSchema as w, memberAddressSchema as x, trackingStageResponseSchema as y, unwrapData as yt, claimTypeSchema as z };
949
+ export { updateCartItemRequestSchema as $, consentSourceSchema as A, categoryNodeSchema as B, createInquiryResultSchema as C, customerInquirySchema as D, customerInquiryCategorySchema as E, claimReturnAddressSchema as F, productSortSchema as G, productDetailSchema as H, claimTypeSchema as I, pageInfoSchema as J, claimStatusSchema as K, createClaimRequestSchema as L, consentUpdateRequestSchema as M, memberConsentsSchema as N, consentActionSchema as O, claimReasonSchema as P, cartSchema as Q, createClaimResultSchema as R, createInquiryRequestSchema as S, createCustomerInquiryRequestSchema as T, productFacetsSchema as U, productCardSchema as V, productPageSchema as W, addCartItemRequestSchema as X, pageSchema as Y, cartItemSchema as Z, memberAddressRequestSchema as _, publicReviewSchema as a, linkIdentityRequestSchema as at, updateProfileRequestSchema as b, updateReviewRequestSchema as c, signupRequestSchema as ct, deliveryTrackingSchema as d, withdrawRequestSchema as dt, anonymousSessionSchema as et, myOrderItemSchema as f, withdrawalBlockedDetailsSchema as ft, trackingStageResponseSchema as g, unwrapData as gt, purchaseDecisionResultSchema as h, toApiError as ht, createReviewResultSchema as i, idpTokenRequestSchema as it, consentStateSchema as j, consentKindSchema as k, updateReviewResultSchema as l, socialProviderSchema as lt, orderShippingAddressSchema as m, buildQuery as mt, storefrontStoreSchema as n, idpAuthorizeRequestSchema as nt, reviewPageSchema as o, loginRequestSchema as ot, myOrderSchema as p, ApiError as pt, orderItemStatusSchema as q, createReviewRequestSchema as r, idpAuthorizeResponseSchema as rt, reviewSummarySchema as s, memberIdentitiesSchema as st, createStorefrontClient as t, idpAgreementsSchema as tt, writableReviewSchema as u, tokenPairSchema as ut, memberAddressSchema as v, publicInquirySchema as w, wishlistAddResultSchema as x, memberSchema as y, myClaimSchema as z };