@sayren/storefront-sdk 0.14.0 → 0.15.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 { ft as ApiError, t as createStorefrontClient } from "../client-CUF2xGu8.mjs";
1
+ import { gt as ApiError, t as createStorefrontClient } from "../client-ZPNEEeRT.mjs";
2
2
  //#region src/auth/index.ts
3
3
  /** 소셜 로그인 실패 — 구매자가 취소했거나(`access_denied`) state가 맞지 않는다 */
4
4
  var IdpCallbackError = class extends Error {
@@ -1,53 +1,125 @@
1
1
  import { z } from "zod";
2
- //#region src/schemas/common.ts
3
- const pageInfoSchema = z.object({
4
- page: z.number().int(),
5
- size: z.number().int(),
6
- totalElements: z.number().int(),
7
- totalPages: z.number().int()
8
- });
9
- function pageSchema(item) {
10
- return pageInfoSchema.extend({ contents: z.array(item) });
11
- }
12
- const orderItemStatusSchema = z.enum([
13
- "PAYMENT_WAITING",
14
- "PAID",
15
- "CONFIRMED",
16
- "DISPATCHED",
17
- "DELIVERING",
18
- "DELIVERED",
19
- "PURCHASE_DECIDED",
20
- "CANCELED"
21
- ]);
22
- const claimStatusSchema = z.enum([
23
- "REQUESTED",
24
- "HELD",
25
- "COLLECTING",
26
- "COLLECTED",
27
- "REDELIVERING",
28
- "APPROVED",
29
- "REJECTED",
30
- "COMPLETED",
31
- "WITHDRAWN"
32
- ]);
2
+ //#region src/schemas/fulfillment.ts
33
3
  /**
34
- * 상품 유형 (이슈 #48). 응답에서는 문자열로 받는다(값이 추가될 수 있다). 현재 값은 `SHIPPING`(배송 상품)·
35
- * `DOWNLOAD`(파일 다운로드)·`CODE`(코드 발급)·`SERVICE`(이용권·서비스)·`PICKUP`(방문 수령)이다.
36
- * 이 필드 이전 서버의 응답에는 없어 `SHIPPING`으로 읽는다. 서버는 항상 싣는다.
4
+ * 구매자용 상품 이행 (이슈 #57) — 관리 API의 상품 이행에서 구매자에게 필요한 것만 싣는다. 유형, 배송 필요 여부, 배송 안내(배송비·
5
+ * 무료 기준·반품·교환 배송비), 청약철회 제한 여부, 방문 수령지 표시값이다. 셀러 내부 값(출고지·반품지 id, 코드 풀 여부, 재고 추적 여부)은
6
+ * 싣지 않는다.
7
+ *
8
+ * 유형 이름은 응답에서 문자열이고, 모르는 유형(서버가 나중에 더한 유형, 예: #56 `RESERVATION`)은 `{ type: "OTHER", rawType,
9
+ * requiresShipping }`로 읽는다. `requiresShipping`은 판별 값에서 파생되지만 **모든 가지에 싣는다** — 모르는 유형에서도 주문서가
10
+ * 배송지를 받을지 정할 수 있어야 한다.
37
11
  */
38
- const fulfillmentTypeField = () => z.string().optional().default("SHIPPING").describe("상품 유형. 현재 값은 `SHIPPING`(배송 상품)·`DOWNLOAD`(파일 다운로드)·`CODE`(코드 발급)·`SERVICE`(이용권·서비스)·`PICKUP`(방문 수령)이고 값이 추가될 수 있어 문자열로 받는다. 서버는 항상 싣는다");
12
+ const KNOWN_TYPES = [
13
+ "SHIPPING",
14
+ "DOWNLOAD",
15
+ "CODE",
16
+ "SERVICE",
17
+ "PICKUP"
18
+ ];
19
+ /** 알려진 유형만 판별 유니온으로 검사하고 모르는 유형은 `OTHER`로 읽는다. 알려진 유형의 모양이 틀리면 파싱 오류다 */
20
+ function openUnion(known) {
21
+ return z.union([known, z.looseObject({
22
+ type: z.string().refine((type) => !KNOWN_TYPES.includes(type), { message: "알려진 유형은 해당 유형의 모양이어야 합니다" }),
23
+ requiresShipping: z.boolean()
24
+ }).transform((value) => ({
25
+ type: "OTHER",
26
+ rawType: value.type,
27
+ requiresShipping: value.requiresShipping
28
+ }))]);
29
+ }
30
+ 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
+ /** 상품 카드(목록·찜)의 이행 — 유형과 배송 필요 여부만. 배송비·환불 정책은 상세에서 본다 */
41
+ const productCardFulfillmentSchema = z.object({
42
+ type: z.string().describe("상품 유형. 값이 추가될 수 있어 문자열로 받는다"),
43
+ requiresShipping: z.boolean().describe(requiresShippingDescription)
44
+ });
45
+ /** 상품 상세의 이행 */
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이다(판매자에게 문의)") })
81
+ })
82
+ ])).describe("상품 이행. `type`이 유형이고 같은 이름의 키가 유형별 안내다. 값이 추가될 수 있어 SDK는 모르는 유형을 `OTHER`로 읽는다");
83
+ /** 장바구니 줄·주문서 줄의 이행 — 주문서 줄은 주문서 시점 스냅샷이다 */
84
+ const lineFulfillmentSchema = z.object({
85
+ type: z.string().describe("상품 유형. 값이 추가될 수 있어 문자열로 받는다"),
86
+ requiresShipping: z.boolean().describe(requiresShippingDescription),
87
+ withdrawalRestricted: withdrawalRestrictedField
88
+ });
39
89
  /**
40
- * 배송 필요 여부 (이슈 #48). false면 배송지를 받지 않는다. 이 필드 이전 서버의 응답에는 없어 true로 읽는다.
90
+ * 내 주문 주문상품의 주문 시점 이행 스냅샷. 상품을 나중에 고쳐도 바뀌지 않는다. 실제 제공 기록(코드 가린 값·다운로드 남은 횟수)은
91
+ * 주문상품의 `fulfillment`다.
41
92
  */
42
- const requiresShippingField = (description) => z.boolean().optional().default(true).describe(`${description} 서버는 항상 싣는다`);
43
- /** 배송이 필요한 상품 유형인가 — 배송 상품(`SHIPPING`)만 택배 배송이 있다. 모르는 값은 배송 상품으로 본다 */
44
- function isShippingFulfillment(fulfillmentType) {
45
- return fulfillmentType === void 0 || fulfillmentType === null || ![
46
- "DOWNLOAD",
47
- "CODE",
48
- "SERVICE",
49
- "PICKUP"
50
- ].includes(fulfillmentType);
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;
51
123
  }
52
124
  //#endregion
53
125
  //#region src/schemas/coupon.ts
@@ -191,7 +263,8 @@ const checkoutSessionSchema = z.object({
191
263
  optionName: z.string().nullable(),
192
264
  quantity: z.number().int(),
193
265
  unitPrice: z.number().int(),
194
- totalPrice: z.number().int()
266
+ totalPrice: z.number().int(),
267
+ fulfillment: lineFulfillmentSchema.describe("주문서 시점 상품 이행")
195
268
  })),
196
269
  amounts: z.object({
197
270
  productAmount: z.number().int(),
@@ -201,14 +274,11 @@ const checkoutSessionSchema = z.object({
201
274
  deliveryDiscountAmount: z.number().int().optional().default(0).describe("배송비 쿠폰 할인. 쿠폰이 없으면 0")
202
275
  }),
203
276
  delivery: checkoutDeliverySchema.describe("배송비 내역. 배송지를 입력하면 금액이 바뀔 수 있다 — 최종 금액은 결제 시작 응답의 `amounts`다"),
204
- requiresShipping: requiresShippingField("택배 배송이 필요한 상품이 있는가. false면 배송지를 받지 않는다 — 결제 시작에 `shippingAddress`를 보내지 않아도 된다."),
277
+ requiresShipping: z.boolean().describe("택배 배송이 필요한 상품이 있는가. false면 배송지를 받지 않는다 — 결제 시작에 `shippingAddress`를 보내지 않아도 된다"),
205
278
  withdrawal: z.object({
206
279
  required: z.boolean().describe("청약철회 제한 상품(제공이 시작되면 취소·반품할 수 없는 파일·코드·이용권)이 있는가. true면 `notice`를 결제 전에 보여 주고 동의를 받아 결제 시작에 `withdrawalAgreement: true`를 보낸다"),
207
280
  notice: z.string().nullable().describe("구매자에게 보여 줄 고지 문구. `required`가 false면 null")
208
- }).optional().default({
209
- required: false,
210
- notice: null
211
- }).describe("청약철회 제한 고지(이슈 #48). 서버는 항상 싣는다"),
281
+ }).describe("청약철회 제한 고지(이슈 #48)"),
212
282
  expiresAt: z.string(),
213
283
  paymentOptions: z.lazy(() => paymentOptionListSchema).describe("이 주문서에서 고를 수 있는 결제 옵션, PG 우선순위순. 셀러가 켠 PG·결제수단·간편결제만 담긴다. 비어 있으면 지금 결제할 수 없다"),
214
284
  testPayment: z.boolean().describe("지금 결제하면 테스트 결제(샌드박스)인가. true면 실제로 돈이 나가지 않습니다 — 주문서에 테스트 결제 안내를 표시합니다. 결제 요청 시점에 스토어 결제 설정으로 다시 정해지니 최종 값은 결제 요청 응답의 `testPayment`입니다")
@@ -467,4 +537,4 @@ const paymentMessageSchema = z.object({
467
537
  orderId: z.string().optional()
468
538
  });
469
539
  //#endregion
470
- export { startPaymentRequestSchema as A, myCouponListQuerySchema as B, paymentStartSchema as C, residentNumberLike as D, remoteAreaSchema as E, checkoutPricingSchema as F, isShippingFulfillment as G, pricingAmountsSchema as H, couponApplicationListSchema as I, pageSchema as J, orderItemStatusSchema 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, claimStatusSchema as U, myCouponSchema as V, fulfillmentTypeField as W, requiresShippingField as Y, 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, pageInfoSchema 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 };
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 };
@@ -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, J as pageSchema, K as orderItemStatusSchema, N as applicableCouponSchema, O as retryPaymentRequestSchema, P as checkoutPricingRequestSchema, U as claimStatusSchema, V as myCouponSchema, W as fulfillmentTypeField, Y as requiresShippingField, d as createCheckoutRequestSchema, f as deliveryQuoteRequestSchema, m as easyPayProviderResponseSchema, p as deliveryQuoteSchema, u as checkoutSessionSchema, w as paymentStatusSchema, y as paymentMethodSchema } from "./checkout-wrCpR-P1.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";
3
3
  import { z } from "zod";
4
4
  //#region src/http.ts
5
5
  /** 표준 엔벨로프의 $.error 상세 */
@@ -246,7 +246,7 @@ const cartItemSchema = z.object({
246
246
  quantity: z.number().int(),
247
247
  unitPrice: z.number().int(),
248
248
  totalPrice: z.number().int(),
249
- fulfillmentType: fulfillmentTypeField(),
249
+ fulfillment: lineFulfillmentSchema,
250
250
  purchasable: z.boolean(),
251
251
  unpurchasableReason: z.enum([
252
252
  "SOLD_OUT",
@@ -260,7 +260,7 @@ const cartSchema = z.object({
260
260
  productAmount: z.number().int(),
261
261
  deliveryFee: z.number().int(),
262
262
  totalAmount: z.number().int(),
263
- requiresShipping: requiresShippingField("구매 가능한 항목 중 택배 배송이 필요한 상품이 있는가. false면 배송비가 0이고 주문서가 배송지를 받지 않는다.")
263
+ requiresShipping: z.boolean().describe("구매 가능한 항목 중 택배 배송이 필요한 상품이 있는가. false면 배송비가 0이고 주문서가 배송지를 받지 않는다")
264
264
  })
265
265
  });
266
266
  const addCartItemRequestSchema = z.object({
@@ -273,6 +273,38 @@ const updateCartItemRequestSchema = z.object({
273
273
  optionId: z.string().optional()
274
274
  }).refine((value) => Object.values(value).some((v) => v !== void 0), { message: "최소 1개 필드가 필요합니다" });
275
275
  //#endregion
276
+ //#region src/schemas/common.ts
277
+ const pageInfoSchema = z.object({
278
+ page: z.number().int(),
279
+ size: z.number().int(),
280
+ totalElements: z.number().int(),
281
+ totalPages: z.number().int()
282
+ });
283
+ function pageSchema(item) {
284
+ return pageInfoSchema.extend({ contents: z.array(item) });
285
+ }
286
+ const orderItemStatusSchema = z.enum([
287
+ "PAYMENT_WAITING",
288
+ "PAID",
289
+ "CONFIRMED",
290
+ "DISPATCHED",
291
+ "DELIVERING",
292
+ "DELIVERED",
293
+ "PURCHASE_DECIDED",
294
+ "CANCELED"
295
+ ]);
296
+ const claimStatusSchema = z.enum([
297
+ "REQUESTED",
298
+ "HELD",
299
+ "COLLECTING",
300
+ "COLLECTED",
301
+ "REDELIVERING",
302
+ "APPROVED",
303
+ "REJECTED",
304
+ "COMPLETED",
305
+ "WITHDRAWN"
306
+ ]);
307
+ //#endregion
276
308
  //#region src/schemas/catalog.ts
277
309
  const categoryNodeSchema = z.lazy(() => z.object({
278
310
  categoryId: z.string(),
@@ -287,9 +319,8 @@ const productCardSchema = z.object({
287
319
  salePrice: z.number().int().describe("판매가. 원(KRW) 단위 정수"),
288
320
  discountedPrice: z.number().int().nullable().describe("즉시 할인 적용가. 원 단위. 할인이 없으면 null"),
289
321
  discountRate: z.number().int().nullable().describe("할인율(%). 할인이 없으면 null"),
290
- freeShipping: z.boolean(),
291
- fulfillmentType: fulfillmentTypeField(),
292
- requiresShipping: requiresShippingField("택배 배송이 필요한 상품인가. false면 배송비가 없고 주문서가 배송지를 받지 않는다."),
322
+ freeShipping: z.boolean().describe("무료배송 배지. 배송 상품이고 배송비가 무료일 때만 true다(배송이 없는 상품은 false)"),
323
+ fulfillment: productCardFulfillmentSchema,
293
324
  averageRating: z.number(),
294
325
  reviewCount: z.number().int(),
295
326
  soldOut: z.boolean()
@@ -316,21 +347,8 @@ const productDetailSchema = productCardSchema.extend({
316
347
  additionalPrice: z.number().int(),
317
348
  soldOut: z.boolean()
318
349
  })),
319
- delivery: z.object({
320
- type: z.enum([
321
- "FREE",
322
- "PAID",
323
- "CONDITIONAL_FREE"
324
- ]),
325
- fee: z.number().int(),
326
- conditionalFreeAmount: z.number().int().nullable(),
327
- estimatedDays: z.string()
328
- }),
329
- returnPolicy: z.object({
330
- returnFee: z.number().int(),
331
- exchangeFee: z.number().int(),
332
- periodDays: z.number().int()
333
- }),
350
+ fulfillment: productFulfillmentViewSchema,
351
+ returnPeriodDays: z.number().int().describe("반품·교환을 받는 기간(수령·제공일부터 일수)"),
334
352
  categoryPath: z.array(z.object({
335
353
  categoryId: z.string(),
336
354
  name: z.string()
@@ -589,8 +607,7 @@ const myOrderItemSchema = z.object({
589
607
  totalPrice: z.number().int().describe("주문상품 금액 (즉시할인 반영, 쿠폰 전)"),
590
608
  couponDiscountAmount: z.number().int().optional().default(0).describe("이 주문상품에 배분된 쿠폰 할인. 실결제 금액은 `totalPrice − couponDiscountAmount`다. 쿠폰이 없으면 0. 서버는 항상 싣는다"),
591
609
  status: orderItemStatusSchema,
592
- fulfillmentType: fulfillmentTypeField(),
593
- withdrawalRestricted: z.boolean().optional().default(false).describe("청약철회 제한 주문상품인가(이슈 #48). 구매자가 결제 전에 동의했고 제공이 시작되면(다운로드·열람·이용 시작) 구매자 취소·반품을 받지 않는다. 서버는 항상 싣는다"),
610
+ fulfillmentSnapshot: myOrderItemFulfillmentSnapshotSchema.describe("주문 시점 이행 스냅샷(이슈 #57). `type`이 주문 시점 상품 유형이다. 배송 상품이 아니면 `DELIVERED`는 제공 완료(방문 수령은 수령 완료)다. 청약철회 제한 주문상품(`download`·`code`의 `withdrawalRestricted`)은 제공이 시작되면(다운로드·열람) 구매자 취소·반품을 받지 않는다"),
594
611
  fulfillment: z.object({
595
612
  status: z.string().describe("제공 상태. `FULFILLED`(제공함)·`REVOKED`(환불 등으로 회수함). 값이 추가될 수 있어 문자열로 받는다"),
596
613
  fulfilledAt: z.string().describe("제공 시각 (ISO 8601)"),
@@ -611,13 +628,6 @@ const myOrderItemSchema = z.object({
611
628
  }))
612
629
  }).nullable().optional().default(null).describe("파일 다운로드 상품의 횟수·기한·파일 목록. 파일 주소는 `downloads`로 받는다. 다른 유형은 null. 서버는 항상 싣는다")
613
630
  }).nullable().optional().default(null).describe("비실물 상품(이용권·방문 수령 등)의 제공 정보(이슈 #48). 제공 전이거나 배송 상품이면 null이다. 비실물의 `DELIVERED`는 제공 완료(방문 수령은 수령 완료)로 표시한다. 서버는 항상 싣는다"),
614
- pickupLocation: z.object({
615
- name: z.string().describe("수령 장소 이름"),
616
- zipCode: z.string(),
617
- address1: z.string(),
618
- address2: z.string().nullable(),
619
- phone: z.string().describe("수령 장소 연락처")
620
- }).nullable().optional().default(null).describe("방문 수령 장소(이슈 #48). 방문 수령 상품(`fulfillmentType` = `PICKUP`)이고 셀러가 수령지를 지정했을 때만 있다. 상품의 현재 수령지다. 서버는 항상 싣는다"),
621
631
  claimStatus: z.string().nullable(),
622
632
  reviewWritten: z.boolean(),
623
633
  autoDecisionDate: z.string().nullable()
@@ -639,7 +649,7 @@ const myOrderSchema = z.object({
639
649
  orderId: z.string(),
640
650
  orderedAt: z.string(),
641
651
  items: z.array(myOrderItemSchema),
642
- requiresShipping: requiresShippingField("택배 배송이 필요한 주문상품이 있는가. false면 `shippingAddress`는 주문자 이름·연락처만 있고 주소는 빈 문자열이다."),
652
+ requiresShipping: z.boolean().describe("택배 배송이 필요한 주문상품이 있는가. false면 `shippingAddress`는 주문자 이름·연락처만 있고 주소는 빈 문자열이다"),
643
653
  shippingAddress: orderShippingAddressSchema,
644
654
  payment: z.object({
645
655
  method: paymentMethodSchema.describe("실제 결제수단(PG가 보고한 수단, 모르면 주문서에서 고른 수단). 결제창에서 바뀔 수 있다(카드 결제창의 간편결제 탭 등)"),
@@ -1000,4 +1010,4 @@ get: () => http.request("GET", "/store", storefrontStoreSchema) },
1000
1010
  };
1001
1011
  }
1002
1012
  //#endregion
1003
- export { anonymousSessionSchema 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, updateCartItemRequestSchema as Q, claimReturnAddressSchema as R, memberSchema as S, createInquiryRequestSchema as T, categoryNodeSchema as U, createClaimResultSchema as V, productCardSchema as W, cartItemSchema as X, addCartItemRequestSchema as Y, cartSchema as Z, orderShippingAddressSchema as _, publicReviewSchema as a, loginRequestSchema as at, memberAddressRequestSchema as b, updateReviewRequestSchema as c, socialProviderSchema as ct, deliveryTrackingSchema as d, withdrawalBlockedDetailsSchema as dt, idpAgreementsSchema as et, downloadLinkSchema as f, ApiError as ft, myOrderSchema as g, myOrderItemSchema as h, unwrapData as ht, createReviewResultSchema as i, linkIdentityRequestSchema as it, consentActionSchema as j, customerInquiryCategorySchema as k, updateReviewResultSchema as l, tokenPairSchema as lt, fulfillmentRevealSchema as m, toApiError as mt, storefrontStoreSchema as n, idpAuthorizeResponseSchema as nt, reviewPageSchema as o, memberIdentitiesSchema as ot, downloadRequestSchema as p, buildQuery as pt, productPageSchema as q, createReviewRequestSchema as r, idpTokenRequestSchema as rt, reviewSummarySchema as s, signupRequestSchema as st, createStorefrontClient as t, idpAuthorizeRequestSchema as tt, writableReviewSchema as u, withdrawRequestSchema as ut, purchaseDecisionResultSchema as v, wishlistAddResultSchema as w, memberAddressSchema as x, trackingStageResponseSchema as y, claimTypeSchema as z };
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 };