@sayren/store-sdk 0.28.1 → 0.28.3

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/index.mjs CHANGED
@@ -2586,11 +2586,26 @@ const PAYMENT_ROUTING_EXCLUSION_CODES = [
2586
2586
  "PLATFORM_BLOCKED",
2587
2587
  "MODE_MISMATCH"
2588
2588
  ];
2589
+ /**
2590
+ * 결제수단 반복 실패 경고(#86 후속) — 같은 PG·결제수단(·간편결제사)이 가맹점 설정 문제(구매자가 고칠 수 없는 실패, 예: KG이니시스
2591
+ * `V105 [NO MPI SET] 전용화면 미설정`)로 기간 안에 여러 번 실패했다. 구매자에게는 「이 결제수단은 지금 사용할 수 없습니다」가 보이고,
2592
+ * PG 관리자에서 그 결제수단의 전용 화면·채널을 설정해야 다시 쓸 수 있다
2593
+ */
2594
+ const paymentFailureWarningSchema = z.object({
2595
+ provider: z.string().describe("PG(`tosspayments`·`portone`). 값이 추가될 수 있어 문자열로 받는다"),
2596
+ method: z.string().describe("결제수단(`CARD`·`BANK_TRANSFER`·`VIRTUAL_ACCOUNT`·`MOBILE`·`EASY_PAY`)"),
2597
+ easyPayProvider: easyPayProviderResponseSchema.nullable().describe("간편결제사. 간편결제가 아니면 null"),
2598
+ code: z.string().nullable().describe("PG 실패 코드(예: `V105`, `AllChannelsNotSatisfied`). PG 원문 문구로만 판정했으면 null"),
2599
+ count: z.number().int().describe("기간 안의 실패 횟수"),
2600
+ lastAt: z.string().describe("마지막 실패 시각"),
2601
+ message: z.string().nullable().describe("마지막 실패의 PG 원문 사유. 구매자에게는 보이지 않는다")
2602
+ });
2589
2603
  const paymentSettingsSchema = z.object({
2590
2604
  checkoutOrigins: z.array(z.string()).describe("결제 도메인 — 결제를 마친 구매자가 돌아올 스토어프론트 origin 목록"),
2591
2605
  providers: z.array(paymentProviderSchema).describe("지원하는 모든 PG. 연결된 것은 우선순위순, 연결되지 않은 것은 뒤에 온다"),
2592
2606
  environment: pgEnvironmentSchema.nullable().optional().default(null).describe("지금 결제를 시작하면 쓰는 결제 환경. 사용 가능한 PG 중 하나라도 라이브면 `LIVE`(샌드박스 PG는 제외), 아니면 `TEST`. 사용 가능한 PG가 없으면 null. 서버는 항상 싣는다. 이 필드가 없는 이전 서버 응답은 기본값(null)으로 읽는다"),
2593
- candidates: z.array(z.string()).optional().default(() => []).describe("지금 결제를 시작하면 쓰는 PG, 우선순위순(`tosspayments`·`portone`). 비어 있으면 구매자가 결제할 수 없다. 빠진 PG의 사유는 `providers[].routingExclusion` — 후보가 아닌 PG에는 항상 사유 코드를 붙인다. 서버는 항상 싣는다. 이 필드가 없는 이전 서버 응답은 기본값(빈 배열)으로 읽는다")
2607
+ candidates: z.array(z.string()).optional().default(() => []).describe("지금 결제를 시작하면 쓰는 PG, 우선순위순(`tosspayments`·`portone`). 비어 있으면 구매자가 결제할 수 없다. 빠진 PG의 사유는 `providers[].routingExclusion` — 후보가 아닌 PG에는 항상 사유 코드를 붙인다. 서버는 항상 싣는다. 이 필드가 없는 이전 서버 응답은 기본값(빈 배열)으로 읽는다"),
2608
+ warnings: z.array(paymentFailureWarningSchema).optional().default(() => []).describe("최근 24시간 안에 같은 PG·결제수단·간편결제사가 가맹점 설정 문제로 3번 이상 실패한 조합, 마지막 실패가 최근인 순. 판정 규칙은 서버가 정하고 바뀔 수 있다. 서버는 항상 싣는다. 이 필드가 없는 이전 서버 응답은 기본값(빈 배열)으로 읽는다")
2594
2609
  });
2595
2610
  const paymentProviderVerificationSchema = z.object({
2596
2611
  provider: pgProviderSchema,
@@ -3045,7 +3060,7 @@ const productSchema = productSummarySchema.extend({
3045
3060
  * 표시는 `description`(HTML)이 맡는다 — 소비자는 이 필드를 몰라도 된다.
3046
3061
  */
3047
3062
  descriptionJson: z.string().nullable().optional(),
3048
- originalPrice: z.number().int().nullable().optional(),
3063
+ originalPrice: z.number().int().nullable().optional().describe("정가(할인 전 표시 가격). 원 단위. 비교용 표시 값이고 결제 금액 계산에 쓰지 않는다 — 구매자가 내는 가격은 즉시할인이 있으면 `discountedPrice`, 없으면 `salePrice`다. 스토어프론트 상품 응답에도 같은 값이 실린다. 정하지 않았으면 null"),
3049
3064
  images: z.array(z.url()).optional(),
3050
3065
  attributes: z.array(z.object({
3051
3066
  attributeId: z.string(),
@@ -3185,6 +3200,8 @@ const variantStockSchema = z.object({
3185
3200
  variantId: z.string(),
3186
3201
  stockQuantity: z.number().int()
3187
3202
  });
3203
+ /** 상품 쓰기 요청의 이미지 목록 — 등록·전체 수정·부분 수정이 같은 항목 형식을 쓴다. 첫 장이 대표(썸네일)다 */
3204
+ const productImagesRequestSchema = z.array(productImageUrlSchema).min(1).max(10);
3188
3205
  /**
3189
3206
  * 상품 쓰기 요청의 공통 필드 — 등록(POST)과 전체 수정(PUT)이 같다. 이행(`fulfillment`)만 두 요청의 스키마가 다르다.
3190
3207
  *
@@ -3195,14 +3212,14 @@ const productWriteShape = {
3195
3212
  name: z.string().min(1).max(100),
3196
3213
  categoryId: z.string().min(1, "카테고리를 선택해주십시오"),
3197
3214
  salePrice: z.number().int().min(10).multipleOf(10, "판매가는 10원 단위여야 합니다 (INVALID_PRICE_UNIT)").describe("판매가. 원(KRW) 단위 정수, 최소 10원, 10원 단위"),
3198
- originalPrice: z.number().int().optional().describe("정가(할인 전 표시 가격). 원 단위"),
3215
+ originalPrice: z.number().int().optional().describe("정가(할인 전 표시 가격). 원 단위. 비교용 표시 값이고 결제 금액은 판매가(즉시할인이 있으면 할인 적용가)다. 스토어프론트가 판매가보다 클 때 취소선·할인율로 보인다. 즉시할인은 `PUT /v1/products/{productId}/discount`로 따로 정한다"),
3199
3216
  description: z.string().optional(),
3200
3217
  /**
3201
3218
  * 상세설명 에디터(@avarlabs/editor)의 직렬화 상태. 재편집 때 이 값으로 문서를 복원한다.
3202
3219
  * 표시는 `description`(HTML)이 맡는다 — 소비자는 이 필드를 몰라도 된다.
3203
3220
  */
3204
3221
  descriptionJson: z.string().nullable().optional(),
3205
- images: z.array(productImageUrlSchema).min(1).max(10).optional().describe("상품 이미지 주소 목록. 첫 장이 대표 이미지(썸네일)다"),
3222
+ images: productImagesRequestSchema.optional().describe("상품 이미지 주소 목록. 첫 장이 대표 이미지(썸네일)다"),
3206
3223
  attributes: z.array(z.object({
3207
3224
  attributeId: z.string(),
3208
3225
  value: z.string()
@@ -3225,6 +3242,7 @@ const productPatchRequestSchema = z.strictObject({
3225
3242
  name: z.string().max(100).optional(),
3226
3243
  salePrice: z.number().int().multipleOf(10).optional(),
3227
3244
  status: productStatusSchema.optional(),
3245
+ images: productImagesRequestSchema.optional().describe("상품 이미지 주소 목록. 주면 통째로 바꾼다(현재 목록과 병합하지 않는다). 첫 장이 대표 이미지(썸네일)다. 생략하면 바꾸지 않는다"),
3228
3246
  fulfillment: productFulfillmentUpdateSchema.optional().describe(fulfillmentUpdateDescription),
3229
3247
  refundPolicy: productRefundPolicyPatchSchema.nullable().optional().describe("상품별 환불 정책. 주면 통째로 바꾼다(준 항목만 상점 기본을 덮어쓴다). `null`은 덮어쓰기를 지워 상점 기본을 따른다. 생략하면 바꾸지 않는다")
3230
3248
  }).refine((value) => Object.values(value).some((v) => v !== void 0), { message: "최소 1개 필드가 필요합니다" });
@@ -4148,14 +4166,60 @@ const policyVersionSchema = z.string().trim().min(1).max(20).describe("약관
4148
4166
  * 나중에 주소를 바꿔도 "무엇에 동의했는지"가 남는다. `null`로 지울 수 있다.
4149
4167
  */
4150
4168
  const policyDocumentUrlSchema = z.url().max(500).refine((value) => value.startsWith("https://"), "https 주소만 쓸 수 있습니다").nullable();
4169
+ /**
4170
+ * 사업자등록번호 — 숫자 10자리. 하이픈(`123-45-67890`)과 공백은 받고 서버가 숫자만 남겨 저장한다.
4171
+ * 국세청 검증번호(체크섬)는 보지 않는다.
4172
+ */
4173
+ const BUSINESS_NUMBER_PATTERN = /^\d{3}[-\s]?\d{2}[-\s]?\d{5}$/;
4174
+ /** 사업자등록번호에서 숫자만 남긴다 — 저장·비교는 이 값으로 한다 */
4175
+ function normalizeBusinessNumber(value) {
4176
+ return value.replace(/\D/g, "");
4177
+ }
4178
+ const businessNumberSchema = z.string().trim().regex(BUSINESS_NUMBER_PATTERN, "사업자등록번호는 숫자 10자리여야 합니다").nullable();
4179
+ /** 사업자 정보 글자 필드 — 앞뒤 공백을 지우고 빈 값은 받지 않는다(지우려면 `null`) */
4180
+ const businessText = (max) => z.string().trim().min(1).max(max).nullable();
4181
+ /** 사업자 정보 필드의 길이 상한 — 상점 플랫폼 입력 칸과 같다 */
4182
+ const BUSINESS_INFO_MAX_LENGTH = {
4183
+ businessName: 100,
4184
+ representativeName: 50,
4185
+ mailOrderSalesNumber: 50,
4186
+ businessAddress: 200,
4187
+ privacyOfficerName: 50
4188
+ };
4189
+ /**
4190
+ * `PATCH /v1/store`의 사업자 정보 필드(이슈 #81) — 전자상거래법 표기(스토어프론트 푸터)용이다.
4191
+ * 바꿀 필드만 보내고 `null`을 주면 지운다. 스토어프론트 `GET /store`가 같은 값을 싣는다.
4192
+ */
4193
+ const businessInfoPatchShape = {
4194
+ businessName: businessText(BUSINESS_INFO_MAX_LENGTH.businessName).optional().describe("상호(사업자등록증의 상호). 상점명(`name`)과 다를 수 있다. `null`을 주면 지운다"),
4195
+ representativeName: businessText(BUSINESS_INFO_MAX_LENGTH.representativeName).optional().describe("대표자명. `null`을 주면 지운다"),
4196
+ businessNumber: businessNumberSchema.optional().describe("사업자등록번호. 숫자 10자리이고 하이픈(`123-45-67890`)을 넣어도 된다. 숫자만 저장한다. `null`을 주면 지운다"),
4197
+ mailOrderSalesNumber: businessText(BUSINESS_INFO_MAX_LENGTH.mailOrderSalesNumber).optional().describe("통신판매업 신고번호(예: `2026-서울강남-01234`). 적은 그대로 저장한다. `null`을 주면 지운다"),
4198
+ businessAddress: businessText(BUSINESS_INFO_MAX_LENGTH.businessAddress).optional().describe("사업장 주소. `null`을 주면 지운다"),
4199
+ customerCenterEmail: z.email().max(254).nullable().optional().describe("고객센터 이메일. `null`을 주면 지운다"),
4200
+ privacyOfficerName: businessText(BUSINESS_INFO_MAX_LENGTH.privacyOfficerName).optional().describe("개인정보 보호책임자 성명. `null`을 주면 지운다"),
4201
+ privacyOfficerEmail: z.email().max(254).nullable().optional().describe("개인정보 보호책임자 이메일. `null`을 주면 지운다")
4202
+ };
4203
+ /** 응답의 사업자 정보 필드 — 옛 api 응답에 없으면 null로 읽는다(상점 플랫폼이 api보다 먼저 배포된다) */
4204
+ const nullableText = (description) => z.string().nullable().optional().default(null).describe(`${description}. 없으면 null. 서버는 항상 싣는다`);
4205
+ const businessInfoResponseShape = {
4206
+ businessName: nullableText("상호. 상점명과 다를 수 있다"),
4207
+ representativeName: nullableText("대표자명"),
4208
+ mailOrderSalesNumber: nullableText("통신판매업 신고번호"),
4209
+ businessAddress: nullableText("사업장 주소"),
4210
+ customerCenterEmail: nullableText("고객센터 이메일"),
4211
+ privacyOfficerName: nullableText("개인정보 보호책임자 성명"),
4212
+ privacyOfficerEmail: nullableText("개인정보 보호책임자 이메일")
4213
+ };
4151
4214
  const autoDeliverDaysDescription = "발송 후 자동 배송완료까지의 일수(0~30, 기본 7). 발송(`DISPATCHED`)·배송중(`DELIVERING`) 주문상품을 이 기간이 지나면 배송완료(`DELIVERED`)로 바꾼다. `0`이면 자동 배송완료를 하지 않는다";
4152
4215
  const autoConfirmDaysDescription = "배송완료 후 자동 구매확정까지의 일수(0~30, 기본 7). 배송완료 시점에 구매확정 예정일(`autoDecisionDate`)을 이 값으로 잡고, 그 날짜가 지나면 구매확정(`PURCHASE_DECIDED`)으로 바꾼다. 진행 중인 클레임이 있으면 건너뛴다. `0`이면 자동 구매확정을 하지 않는다";
4153
4216
  /** `PATCH /v1/store` 본문 — 바꿀 필드만 보낸다 */
4154
4217
  const updateStoreRequestSchema = z.object({
4155
4218
  name: z.string().min(2).max(50).optional(),
4156
4219
  logoUrl: z.url().optional(),
4157
- customerCenterPhone: z.string().optional(),
4220
+ customerCenterPhone: z.string().nullable().optional().describe("고객센터 전화번호. `null`을 주면 지운다"),
4158
4221
  businessHours: z.string().max(100).optional(),
4222
+ ...businessInfoPatchShape,
4159
4223
  analyticsAllowedOrigins: z.array(analyticsOriginSchema).max(20).optional().describe("@deprecated `storefrontOrigins`를 쓴다(같은 목록). 방문 분석 수집을 받을 스토어프론트 오리진(최대 20개). 비우면 모든 오리진에서 받는다. 넣으면 목록에 없는 오리진의 수집 요청은 403 `ORIGIN_NOT_ALLOWED`이고, 페이지 URL이 목록 밖인 이벤트는 버린다"),
4160
4224
  storefrontOrigins: z.array(analyticsOriginSchema).max(20).optional().describe("스토어프론트 도메인(최대 20개) — 소셜 로그인 뒤 돌아갈 주소와 방문 분석 수집을 함께 제한한다. `analyticsAllowedOrigins`와 같은 목록이다(둘 다 주면 이 값이 이긴다)"),
4161
4225
  guestCheckoutEnabled: z.boolean().optional().describe("비회원 주문 허용. false(회원만)면 로그인하지 않은 구매자의 주문서 생성·결제 요청이 403 `GUEST_CHECKOUT_DISABLED`다. 장바구니 담기와 이미 받은 비회원 주문의 조회·취소는 막지 않는다"),
@@ -4179,8 +4243,9 @@ const storeSchema = z.object({
4179
4243
  "CLOSED"
4180
4244
  ]),
4181
4245
  logoUrl: z.url().nullable(),
4182
- businessNumber: z.string().nullable(),
4246
+ businessNumber: z.string().nullable().describe("사업자등록번호(숫자 10자리). 없으면 null"),
4183
4247
  customerCenterPhone: z.string().nullable(),
4248
+ ...businessInfoResponseShape,
4184
4249
  analyticsAllowedOrigins: z.array(z.string()).describe("방문 분석 수집을 받는 스토어프론트 오리진. 비어 있으면 모든 오리진에서 받는다"),
4185
4250
  storefrontOrigins: z.array(z.string()).describe("스토어프론트 도메인 — 소셜 로그인 리디렉트와 방문 분석 수집이 함께 쓴다(`analyticsAllowedOrigins`와 같은 값)"),
4186
4251
  guestCheckoutEnabled: z.boolean().describe("비회원 주문 허용. false면 회원만 주문할 수 있다"),
@@ -6577,4 +6642,4 @@ function createStoreSession(options) {
6577
6642
  };
6578
6643
  }
6579
6644
  //#endregion
6580
- export { APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, ApiError, ApprovalPendingError, CASH_RECEIPT_STATUS_VALUES, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, CUSTOM_INPUT_FORBIDDEN_WORDS, FULFILLMENT_RULES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_CUSTOM_INPUTS, MAX_CUSTOM_INPUT_LENGTH, MAX_OPTION_GROUPS, MAX_PRODUCT_IMAGES, MAX_SAVED_OPTION_SETS, MAX_SAVED_OPTION_SET_NAME, MAX_VALUES_PER_GROUP, MAX_VARIANTS, MCP_TELEMETRY_MAX_RESULTS, MIN_PAYMENT_AMOUNT, NO_COUPON_SETTLEMENT, NO_SHIPPING_BUNDLE_KEY, PAYMENT_ROUTING_EXCLUSION_CODES, PORTONE_CHANNEL_NAME_MAX_LENGTH, PORTONE_MAX_CHANNELS, PORTONE_MIN_CHANNELS, REFUND_POLICY_DEFAULTS, REFUND_POLICY_DELIVERY_FEE_KEYS, REMOTE_AREA_ZIP_RANGES, RESERVED_STOREFRONT_SLUGS, RESERVED_STORE_CODES, SHIPPING_POLICY_DEFAULTS, STOREFRONT_BLOCKED_PATH_SEGMENTS, STOREFRONT_BUILD_STAGES, STOREFRONT_BUILD_TERMINAL_STATUSES, STOREFRONT_CHECK_TERMINAL_STATUSES, STOREFRONT_CUSTOM_DOMAIN_LIMIT_DEFAULT, STOREFRONT_DOMAIN_DNS_GRACE_DAYS, STOREFRONT_DOMAIN_DNS_WAIT_DAYS, STOREFRONT_DOMAIN_TXT_LABEL, STOREFRONT_EDIT_ACTIVITY_TIMEOUT_MINUTES, STOREFRONT_EDIT_CAPACITY, STOREFRONT_EDIT_IDLE_MINUTES, STOREFRONT_EDIT_PREVIEW_SUFFIX, STOREFRONT_EDIT_START_STAGES, STOREFRONT_FILE_BATCH_MAX, STOREFRONT_FILE_MAX_BYTES, STOREFRONT_PATH_SEGMENT_PATTERN, STOREFRONT_PLATFORM_DOMAINS, STOREFRONT_PUBLIC_SUFFIXES, STOREFRONT_SEARCH_REGEX_MAX_LENGTH, STOREFRONT_SHOWCASE_SLUG_PREFIX, STOREFRONT_SITE_CREATE_LIMIT, STOREFRONT_SLUG_CHANGE_LIMIT, STOREFRONT_SLUG_CHANGE_WINDOW_DAYS, STOREFRONT_SLUG_HOLD_DAYS, STOREFRONT_SLUG_PATTERN, STOREFRONT_SOURCE_BLOB_BATCH_MAX, STOREFRONT_SOURCE_PART_BYTES, STOREFRONT_WORKSPACE_MAX_BYTES, STOREFRONT_WORKSPACE_MAX_FILES, STORE_CODE_PATTERN, STORE_ROLE_SCOPES, STORE_SCOPE_RESOURCES, STORE_SESSION_KEYS, TOSS_WIDGET_CLIENT_KEY_PATTERN, TOSS_WIDGET_KEY_MESSAGE, TOSS_WIDGET_SECRET_KEY_PATTERN, UPLOAD_PURPOSE_LIMITS, VARIANT_COUNT_WARNING, VARIANT_STOCK_EXCLUSIVE_MESSAGE, WEBHOOK_DEFAULT_TOLERANCE_SEC, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_FAILURE_REASONS, WEBHOOK_HEADERS, WEBHOOK_PAYLOAD_EXCERPT_MAX_BYTES, WEBHOOK_RESOURCE_TYPES, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_USER_AGENT, addStorefrontDomainRequestSchema, addonGroupRequestSchema, addonGroupSchema, addonValueRequestSchema, addonValueSchema, addressChangeRequestListSchema, addressTypeSchema, agentPolicyDecisionSchema, allocateByWeight, analyticsChannelSchema, analyticsCheckoutOutcomeSchema, analyticsCheckoutSchema, analyticsDeviceRowSchema, analyticsDevicesSchema, analyticsFunnelStepSchema, analyticsOriginSchema, analyticsOverviewSchema, analyticsPagesQuerySchema, analyticsPagesSchema, analyticsProductRowSchema, analyticsProductSortSchema, analyticsProductsQuerySchema, analyticsProductsSchema, analyticsRangeQuerySchema, analyticsRealtimeSchema, analyticsSearchQuerySchema, analyticsSearchSchema, analyticsSourceGroupBySchema, analyticsSourceRowSchema, analyticsSourcesQuerySchema, analyticsSourcesSchema, analyticsTotalsSchema, apiLogErrorSchema, apiLogListQuerySchema, apiLogPageSchema, apiLogPrincipalSchema, apiLogPrincipalTypeSchema, apiLogSchema, apiLogStatusFilterSchema, apiLogSummarySchema, approvalDecisionRequestSchema, approvalListQuerySchema, approvalPageSchema, approvalRequestSchema, approvalStatusSchema, approveClaimResultSchema, auditActorSchema, auditActorTypeSchema, auditLogListQuerySchema, auditLogOutcomeSchema, auditLogPageSchema, auditLogSchema, auditLogSourceSchema, buildAuthorizeUrl, buildQuery, bulkResultSchema, cancelBySellerRequestSchema, cancelBySellerResultSchema, carrierSchema, cashReceiptSchema, categoryAttributeSchema, categoryCreateRequestSchema, categoryDeleteQuerySchema, categoryDeleteStrategySchema, categoryListQuerySchema, categoryPatchRequestSchema, categoryProductSortSchema, categorySchema, categorySearchResultSchema, categoryTreeNodeSchema, categoryWithPathSchema, changeStorefrontSlugRequestSchema, changeStorefrontTemplateRequestSchema, changeTypeSchema, claimDetailSchema, claimHoldResultSchema, claimListQuerySchema, claimReasonSchema, claimReturnAddressSchema, claimSchema, claimStatusSchema, claimTypeSchema, claimWebhookEventDataSchema, claimWebhookEventSchema, consentActionSchema, consentKindSchema, consentSourceSchema, couponBenefitSchema, couponConditionsInputSchema, couponConditionsSchema, couponDiscountOf, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponListQuerySchema, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRuleSchema, couponSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetSchema, createCouponRequestSchema, createPkcePair, createStoreClient, createStoreSession, createStorefrontEditPreviewLinkRequestSchema, createStorefrontPreviewLinkRequestSchema, createStorefrontSiteRequestSchema, createStorefrontVersionRequestSchema, customInputLabelForbiddenWord, customInputRequestSchema, customInputSchema, customInputValueSchema, customerAddressSchema, customerConsentListQuerySchema, customerConsentSchema, customerConsentStateSchema, customerConsentsSchema, customerCouponSchema, customerDelegationRequestSchema, customerDelegationSchema, customerDetailSchema, customerInquiryCategorySchema, customerInquiryListQuerySchema, customerListQuerySchema, customerOrderSchema, customerSortSchema, customerStatsSchema, customerSummarySchema, customerWithdrawalBlockedDetailsSchema, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, eventTypeSchema, exchangeAuthorizationCode, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, invitationDeliveryStatusSchema, invitationListQuerySchema, invitationSchema, inviteMemberRequestSchema, isCouponTargetLine, isEditableStorefrontPath, isReservedStoreCode, isReservedStorefrontSlug, isShowcaseStorefrontSlug, isStoreScope, isWebOrigin, issueCouponRequestSchema, issueCouponResultSchema, liveGateConditionCodeSchema, liveGateConditionSchema, liveGateErrorDetailsSchema, liveGateSchema, loginProviderSchema, loginProviderStatusSchema, loginProviderTestSchema, loginSettingsSchema, maskedSecretSchema, mcpRuleResultSchema, mcpToolEventSchema, moveStorefrontFileRequestSchema, myAccountSchema, myStoreSchema, normalizeCouponCode, normalizeStorefrontHostname, normalizeStorefrontPath, oauthTokenResponseSchema, openFulfillmentUnion, optionGroupKindSchema, optionGroupRequestSchema, optionGroupSchema, optionModelRequestSchema, optionModelSchema, optionSelectionSchema, optionSortSchema, optionValueRequestSchema, optionValueSchema, orderCanceledWebhookEventDataSchema, orderCanceledWebhookEventSchema, orderDiscountSchema, orderFulfilledWebhookEventDataSchema, orderFulfilledWebhookEventSchema, orderItemFulfillmentSchema, orderItemFulfillmentSnapshotResponseSchema, orderItemFulfillmentSnapshotSchema, orderItemListQuerySchema, orderItemMemoResultSchema, orderItemPageSchema, orderItemSchema, orderItemStatusSchema, orderListQuerySchema, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderSchema, pgVerificationResultSchema, planCodeSchema, planEntitlementsSchema, planErrorDetailsSchema, policyDocumentUrlSchema, policyVersionSchema, portOneChannelSchema, portOneCredentialsInputSchema, productCreateRequestSchema, productFulfillmentCreateSchema, productFulfillmentResponseSchema, productFulfillmentSchema, productFulfillmentUpdateSchema, productImageRejection, productImageUrlSchema, productListQuerySchema, productOutOfStockWebhookEventDataSchema, productOutOfStockWebhookEventSchema, productPatchRequestSchema, productRefundPolicyOverride, productRefundPolicyPatchSchema, productReplaceRequestSchema, productSchema, productSortSchema, productStatusSchema, productSummarySchema, productVariantRequestSchema, productVariantSchema, proratedPaidRefundBase, proratedRefundBase, publicPlanSchema, publicPlansSchema, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, quoteDelivery, quotePricing, refreshUserToken, refundPolicyPatchSchema, refundPolicySchema, rejectClaimRequestSchema, remoteAreaLabelOf, remoteAreaOf, remoteAreaSchema, remoteSurchargeOf, replaceStorefrontSourceRequestSchema, requiresCollection, requiresShipping, resolveRefundPolicy, resolveShippingPolicy, responsePlanCodeSchema, reviewListQuerySchema, reviewReportResultSchema, reviewSchema, reviewSortSchema, reviewWebhookEventDataSchema, reviewWebhookEventSchema, rollbackStorefrontRequestSchema, runStorefrontCheckRequestSchema, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCustomerInquirySchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingPolicyPatchSchema, shippingPolicySchema, storeCodeSchema, storeMemberRoleUpdatedSchema, storeMemberSchema, storeRoleSchema, storeSchema, storeScopeResourceSchema, storeSubscriptionSchema, storefrontBuildDependenciesSchema, storefrontBuildListQuerySchema, storefrontBuildSchema, storefrontBuildStatusSchema, storefrontCheckSchema, storefrontCheckStatusSchema, storefrontCustomDomainStatusSchema, storefrontCustomHostnameProblem, storefrontDependencyFindingSchema, storefrontDeploymentLogSchema, storefrontDeploymentSchema, storefrontDeploymentStepSchema, storefrontDnsRecordSchema, storefrontDomainSchema, storefrontDomainTxtNameOf, storefrontEditPreviewLabelOf, storefrontEditPreviewSchema, storefrontEditSessionSchema, storefrontEditSessionStatusSchema, storefrontEditingSchema, storefrontFileConflictDetailsSchema, storefrontFileContentQuerySchema, storefrontFileContentSchema, storefrontFileDeleteResultSchema, storefrontFileEncodingSchema, storefrontFileEntrySchema, storefrontFileHashSchema, storefrontFileListQuerySchema, storefrontFileListSchema, storefrontFileMoveResultSchema, storefrontFilePathSchema, storefrontFileSearchResultSchema, storefrontFileWriteResultSchema, storefrontHostingSchema, storefrontPreviewLinkSchema, storefrontProvisioningSchema, storefrontRuleResultSchema, storefrontRuleSeveritySchema, storefrontSiteDomainSchema, storefrontSiteDomainsSchema, storefrontSiteSchema, storefrontSiteStatusSchema, storefrontSlugAvailabilityQuerySchema, storefrontSlugAvailabilitySchema, storefrontSlugSchema, storefrontSourceArchivePartSchema, storefrontSourceArchiveQuerySchema, storefrontSourceBlobsResultSchema, storefrontSourceModeSchema, storefrontSourceRefSchema, storefrontSourceReplacedSchema, storefrontSourceSchema, storefrontSuspensionSchema, storefrontTemplateSchema, storefrontVerifyReportSchema, storefrontVersionCreatedSchema, storefrontVersionSchema, storefrontVersionStatusSchema, storefrontVisibilitySchema, subscriptionLimitsSchema, subscriptionStatusSchema, subscriptionUsageSchema, tossPaymentsCredentialsInputSchema, trackingStageResponseSchema, trackingUpdateResultSchema, updateCouponRequestSchema, updateLoginProviderRequestSchema, updateLoginSettingsRequestSchema, updateMemberRoleRequestSchema, updatePaymentProviderRequestSchema, updatePaymentSettingsRequestSchema, updateStoreRequestSchema, uploadExtensionOf, uploadPurposeSchema, uploadRejection, uploadRequestSchema, uploadStorefrontSourceBlobsRequestSchema, uploadTicketSchema, upsertPortOneProviderRequestSchema, upsertTossPaymentsProviderRequestSchema, variantStockRequestSchema, variantStockSchema, verifyPaymentProviderRequestSchema, webhookCreatedSchema, webhookDeliveryDetailSchema, webhookDeliveryErrorCodeSchema, webhookDeliveryListQuerySchema, webhookDeliveryResourceSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEventSchema, webhookFailureReasonSchema, webhookRedeliverFailedResultSchema, webhookRequestHeaderSchema, webhookRequestSchema, webhookResourceTypeSchema, webhookSchema, webhookSecretRotatedSchema, webhookStatusSchema, webhookTestRequestSchema, webhookTestResultSchema, withdrawCustomerRequestSchema, writeDryRunResultSchema, writePreviewSchema, writeStorefrontFilesRequestSchema };
6645
+ export { APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, ApiError, ApprovalPendingError, BUSINESS_INFO_MAX_LENGTH, BUSINESS_NUMBER_PATTERN, CASH_RECEIPT_STATUS_VALUES, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, CUSTOM_INPUT_FORBIDDEN_WORDS, FULFILLMENT_RULES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_CUSTOM_INPUTS, MAX_CUSTOM_INPUT_LENGTH, MAX_OPTION_GROUPS, MAX_PRODUCT_IMAGES, MAX_SAVED_OPTION_SETS, MAX_SAVED_OPTION_SET_NAME, MAX_VALUES_PER_GROUP, MAX_VARIANTS, MCP_TELEMETRY_MAX_RESULTS, MIN_PAYMENT_AMOUNT, NO_COUPON_SETTLEMENT, NO_SHIPPING_BUNDLE_KEY, PAYMENT_ROUTING_EXCLUSION_CODES, PORTONE_CHANNEL_NAME_MAX_LENGTH, PORTONE_MAX_CHANNELS, PORTONE_MIN_CHANNELS, REFUND_POLICY_DEFAULTS, REFUND_POLICY_DELIVERY_FEE_KEYS, REMOTE_AREA_ZIP_RANGES, RESERVED_STOREFRONT_SLUGS, RESERVED_STORE_CODES, SHIPPING_POLICY_DEFAULTS, STOREFRONT_BLOCKED_PATH_SEGMENTS, STOREFRONT_BUILD_STAGES, STOREFRONT_BUILD_TERMINAL_STATUSES, STOREFRONT_CHECK_TERMINAL_STATUSES, STOREFRONT_CUSTOM_DOMAIN_LIMIT_DEFAULT, STOREFRONT_DOMAIN_DNS_GRACE_DAYS, STOREFRONT_DOMAIN_DNS_WAIT_DAYS, STOREFRONT_DOMAIN_TXT_LABEL, STOREFRONT_EDIT_ACTIVITY_TIMEOUT_MINUTES, STOREFRONT_EDIT_CAPACITY, STOREFRONT_EDIT_IDLE_MINUTES, STOREFRONT_EDIT_PREVIEW_SUFFIX, STOREFRONT_EDIT_START_STAGES, STOREFRONT_FILE_BATCH_MAX, STOREFRONT_FILE_MAX_BYTES, STOREFRONT_PATH_SEGMENT_PATTERN, STOREFRONT_PLATFORM_DOMAINS, STOREFRONT_PUBLIC_SUFFIXES, STOREFRONT_SEARCH_REGEX_MAX_LENGTH, STOREFRONT_SHOWCASE_SLUG_PREFIX, STOREFRONT_SITE_CREATE_LIMIT, STOREFRONT_SLUG_CHANGE_LIMIT, STOREFRONT_SLUG_CHANGE_WINDOW_DAYS, STOREFRONT_SLUG_HOLD_DAYS, STOREFRONT_SLUG_PATTERN, STOREFRONT_SOURCE_BLOB_BATCH_MAX, STOREFRONT_SOURCE_PART_BYTES, STOREFRONT_WORKSPACE_MAX_BYTES, STOREFRONT_WORKSPACE_MAX_FILES, STORE_CODE_PATTERN, STORE_ROLE_SCOPES, STORE_SCOPE_RESOURCES, STORE_SESSION_KEYS, TOSS_WIDGET_CLIENT_KEY_PATTERN, TOSS_WIDGET_KEY_MESSAGE, TOSS_WIDGET_SECRET_KEY_PATTERN, UPLOAD_PURPOSE_LIMITS, VARIANT_COUNT_WARNING, VARIANT_STOCK_EXCLUSIVE_MESSAGE, WEBHOOK_DEFAULT_TOLERANCE_SEC, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_FAILURE_REASONS, WEBHOOK_HEADERS, WEBHOOK_PAYLOAD_EXCERPT_MAX_BYTES, WEBHOOK_RESOURCE_TYPES, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_USER_AGENT, addStorefrontDomainRequestSchema, addonGroupRequestSchema, addonGroupSchema, addonValueRequestSchema, addonValueSchema, addressChangeRequestListSchema, addressTypeSchema, agentPolicyDecisionSchema, allocateByWeight, analyticsChannelSchema, analyticsCheckoutOutcomeSchema, analyticsCheckoutSchema, analyticsDeviceRowSchema, analyticsDevicesSchema, analyticsFunnelStepSchema, analyticsOriginSchema, analyticsOverviewSchema, analyticsPagesQuerySchema, analyticsPagesSchema, analyticsProductRowSchema, analyticsProductSortSchema, analyticsProductsQuerySchema, analyticsProductsSchema, analyticsRangeQuerySchema, analyticsRealtimeSchema, analyticsSearchQuerySchema, analyticsSearchSchema, analyticsSourceGroupBySchema, analyticsSourceRowSchema, analyticsSourcesQuerySchema, analyticsSourcesSchema, analyticsTotalsSchema, apiLogErrorSchema, apiLogListQuerySchema, apiLogPageSchema, apiLogPrincipalSchema, apiLogPrincipalTypeSchema, apiLogSchema, apiLogStatusFilterSchema, apiLogSummarySchema, approvalDecisionRequestSchema, approvalListQuerySchema, approvalPageSchema, approvalRequestSchema, approvalStatusSchema, approveClaimResultSchema, auditActorSchema, auditActorTypeSchema, auditLogListQuerySchema, auditLogOutcomeSchema, auditLogPageSchema, auditLogSchema, auditLogSourceSchema, buildAuthorizeUrl, buildQuery, bulkResultSchema, businessInfoPatchShape, businessInfoResponseShape, businessNumberSchema, cancelBySellerRequestSchema, cancelBySellerResultSchema, carrierSchema, cashReceiptSchema, categoryAttributeSchema, categoryCreateRequestSchema, categoryDeleteQuerySchema, categoryDeleteStrategySchema, categoryListQuerySchema, categoryPatchRequestSchema, categoryProductSortSchema, categorySchema, categorySearchResultSchema, categoryTreeNodeSchema, categoryWithPathSchema, changeStorefrontSlugRequestSchema, changeStorefrontTemplateRequestSchema, changeTypeSchema, claimDetailSchema, claimHoldResultSchema, claimListQuerySchema, claimReasonSchema, claimReturnAddressSchema, claimSchema, claimStatusSchema, claimTypeSchema, claimWebhookEventDataSchema, claimWebhookEventSchema, consentActionSchema, consentKindSchema, consentSourceSchema, couponBenefitSchema, couponConditionsInputSchema, couponConditionsSchema, couponDiscountOf, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponListQuerySchema, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRuleSchema, couponSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetSchema, createCouponRequestSchema, createPkcePair, createStoreClient, createStoreSession, createStorefrontEditPreviewLinkRequestSchema, createStorefrontPreviewLinkRequestSchema, createStorefrontSiteRequestSchema, createStorefrontVersionRequestSchema, customInputLabelForbiddenWord, customInputRequestSchema, customInputSchema, customInputValueSchema, customerAddressSchema, customerConsentListQuerySchema, customerConsentSchema, customerConsentStateSchema, customerConsentsSchema, customerCouponSchema, customerDelegationRequestSchema, customerDelegationSchema, customerDetailSchema, customerInquiryCategorySchema, customerInquiryListQuerySchema, customerListQuerySchema, customerOrderSchema, customerSortSchema, customerStatsSchema, customerSummarySchema, customerWithdrawalBlockedDetailsSchema, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, eventTypeSchema, exchangeAuthorizationCode, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, invitationDeliveryStatusSchema, invitationListQuerySchema, invitationSchema, inviteMemberRequestSchema, isCouponTargetLine, isEditableStorefrontPath, isReservedStoreCode, isReservedStorefrontSlug, isShowcaseStorefrontSlug, isStoreScope, isWebOrigin, issueCouponRequestSchema, issueCouponResultSchema, liveGateConditionCodeSchema, liveGateConditionSchema, liveGateErrorDetailsSchema, liveGateSchema, loginProviderSchema, loginProviderStatusSchema, loginProviderTestSchema, loginSettingsSchema, maskedSecretSchema, mcpRuleResultSchema, mcpToolEventSchema, moveStorefrontFileRequestSchema, myAccountSchema, myStoreSchema, normalizeBusinessNumber, normalizeCouponCode, normalizeStorefrontHostname, normalizeStorefrontPath, oauthTokenResponseSchema, openFulfillmentUnion, optionGroupKindSchema, optionGroupRequestSchema, optionGroupSchema, optionModelRequestSchema, optionModelSchema, optionSelectionSchema, optionSortSchema, optionValueRequestSchema, optionValueSchema, orderCanceledWebhookEventDataSchema, orderCanceledWebhookEventSchema, orderDiscountSchema, orderFulfilledWebhookEventDataSchema, orderFulfilledWebhookEventSchema, orderItemFulfillmentSchema, orderItemFulfillmentSnapshotResponseSchema, orderItemFulfillmentSnapshotSchema, orderItemListQuerySchema, orderItemMemoResultSchema, orderItemPageSchema, orderItemSchema, orderItemStatusSchema, orderListQuerySchema, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentFailureWarningSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderSchema, pgVerificationResultSchema, planCodeSchema, planEntitlementsSchema, planErrorDetailsSchema, policyDocumentUrlSchema, policyVersionSchema, portOneChannelSchema, portOneCredentialsInputSchema, productCreateRequestSchema, productFulfillmentCreateSchema, productFulfillmentResponseSchema, productFulfillmentSchema, productFulfillmentUpdateSchema, productImageRejection, productImageUrlSchema, productListQuerySchema, productOutOfStockWebhookEventDataSchema, productOutOfStockWebhookEventSchema, productPatchRequestSchema, productRefundPolicyOverride, productRefundPolicyPatchSchema, productReplaceRequestSchema, productSchema, productSortSchema, productStatusSchema, productSummarySchema, productVariantRequestSchema, productVariantSchema, proratedPaidRefundBase, proratedRefundBase, publicPlanSchema, publicPlansSchema, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, quoteDelivery, quotePricing, refreshUserToken, refundPolicyPatchSchema, refundPolicySchema, rejectClaimRequestSchema, remoteAreaLabelOf, remoteAreaOf, remoteAreaSchema, remoteSurchargeOf, replaceStorefrontSourceRequestSchema, requiresCollection, requiresShipping, resolveRefundPolicy, resolveShippingPolicy, responsePlanCodeSchema, reviewListQuerySchema, reviewReportResultSchema, reviewSchema, reviewSortSchema, reviewWebhookEventDataSchema, reviewWebhookEventSchema, rollbackStorefrontRequestSchema, runStorefrontCheckRequestSchema, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCustomerInquirySchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingPolicyPatchSchema, shippingPolicySchema, storeCodeSchema, storeMemberRoleUpdatedSchema, storeMemberSchema, storeRoleSchema, storeSchema, storeScopeResourceSchema, storeSubscriptionSchema, storefrontBuildDependenciesSchema, storefrontBuildListQuerySchema, storefrontBuildSchema, storefrontBuildStatusSchema, storefrontCheckSchema, storefrontCheckStatusSchema, storefrontCustomDomainStatusSchema, storefrontCustomHostnameProblem, storefrontDependencyFindingSchema, storefrontDeploymentLogSchema, storefrontDeploymentSchema, storefrontDeploymentStepSchema, storefrontDnsRecordSchema, storefrontDomainSchema, storefrontDomainTxtNameOf, storefrontEditPreviewLabelOf, storefrontEditPreviewSchema, storefrontEditSessionSchema, storefrontEditSessionStatusSchema, storefrontEditingSchema, storefrontFileConflictDetailsSchema, storefrontFileContentQuerySchema, storefrontFileContentSchema, storefrontFileDeleteResultSchema, storefrontFileEncodingSchema, storefrontFileEntrySchema, storefrontFileHashSchema, storefrontFileListQuerySchema, storefrontFileListSchema, storefrontFileMoveResultSchema, storefrontFilePathSchema, storefrontFileSearchResultSchema, storefrontFileWriteResultSchema, storefrontHostingSchema, storefrontPreviewLinkSchema, storefrontProvisioningSchema, storefrontRuleResultSchema, storefrontRuleSeveritySchema, storefrontSiteDomainSchema, storefrontSiteDomainsSchema, storefrontSiteSchema, storefrontSiteStatusSchema, storefrontSlugAvailabilityQuerySchema, storefrontSlugAvailabilitySchema, storefrontSlugSchema, storefrontSourceArchivePartSchema, storefrontSourceArchiveQuerySchema, storefrontSourceBlobsResultSchema, storefrontSourceModeSchema, storefrontSourceRefSchema, storefrontSourceReplacedSchema, storefrontSourceSchema, storefrontSuspensionSchema, storefrontTemplateSchema, storefrontVerifyReportSchema, storefrontVersionCreatedSchema, storefrontVersionSchema, storefrontVersionStatusSchema, storefrontVisibilitySchema, subscriptionLimitsSchema, subscriptionStatusSchema, subscriptionUsageSchema, tossPaymentsCredentialsInputSchema, trackingStageResponseSchema, trackingUpdateResultSchema, updateCouponRequestSchema, updateLoginProviderRequestSchema, updateLoginSettingsRequestSchema, updateMemberRoleRequestSchema, updatePaymentProviderRequestSchema, updatePaymentSettingsRequestSchema, updateStoreRequestSchema, uploadExtensionOf, uploadPurposeSchema, uploadRejection, uploadRequestSchema, uploadStorefrontSourceBlobsRequestSchema, uploadTicketSchema, upsertPortOneProviderRequestSchema, upsertTossPaymentsProviderRequestSchema, variantStockRequestSchema, variantStockSchema, verifyPaymentProviderRequestSchema, webhookCreatedSchema, webhookDeliveryDetailSchema, webhookDeliveryErrorCodeSchema, webhookDeliveryListQuerySchema, webhookDeliveryResourceSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEventSchema, webhookFailureReasonSchema, webhookRedeliverFailedResultSchema, webhookRequestHeaderSchema, webhookRequestSchema, webhookResourceTypeSchema, webhookSchema, webhookSecretRotatedSchema, webhookStatusSchema, webhookTestRequestSchema, webhookTestResultSchema, withdrawCustomerRequestSchema, writeDryRunResultSchema, writePreviewSchema, writeStorefrontFilesRequestSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sayren/store-sdk",
3
- "version": "0.28.1",
3
+ "version": "0.28.3",
4
4
  "main": "./dist/index.mjs",
5
5
  "types": "./dist/index.d.mts",
6
6
  "exports": {
@@ -385,6 +385,33 @@ export const PAYMENT_ROUTING_EXCLUSION_CODES = [
385
385
  ] as const;
386
386
  export type KnownPaymentRoutingExclusion = (typeof PAYMENT_ROUTING_EXCLUSION_CODES)[number];
387
387
 
388
+ /**
389
+ * 결제수단 반복 실패 경고(#86 후속) — 같은 PG·결제수단(·간편결제사)이 가맹점 설정 문제(구매자가 고칠 수 없는 실패, 예: KG이니시스
390
+ * `V105 [NO MPI SET] 전용화면 미설정`)로 기간 안에 여러 번 실패했다. 구매자에게는 「이 결제수단은 지금 사용할 수 없습니다」가 보이고,
391
+ * PG 관리자에서 그 결제수단의 전용 화면·채널을 설정해야 다시 쓸 수 있다
392
+ */
393
+ export const paymentFailureWarningSchema = z.object({
394
+ provider: z
395
+ .string()
396
+ .describe("PG(`tosspayments`·`portone`). 값이 추가될 수 있어 문자열로 받는다"),
397
+ method: z
398
+ .string()
399
+ .describe("결제수단(`CARD`·`BANK_TRANSFER`·`VIRTUAL_ACCOUNT`·`MOBILE`·`EASY_PAY`)"),
400
+ easyPayProvider: easyPayProviderResponseSchema
401
+ .nullable()
402
+ .describe("간편결제사. 간편결제가 아니면 null"),
403
+ code: z
404
+ .string()
405
+ .nullable()
406
+ .describe(
407
+ "PG 실패 코드(예: `V105`, `AllChannelsNotSatisfied`). PG 원문 문구로만 판정했으면 null",
408
+ ),
409
+ count: z.number().int().describe("기간 안의 실패 횟수"),
410
+ lastAt: z.string().describe("마지막 실패 시각"),
411
+ message: z.string().nullable().describe("마지막 실패의 PG 원문 사유. 구매자에게는 보이지 않는다"),
412
+ });
413
+ export type PaymentFailureWarning = z.infer<typeof paymentFailureWarningSchema>;
414
+
388
415
  export const paymentSettingsSchema = z.object({
389
416
  checkoutOrigins: z
390
417
  .array(z.string())
@@ -410,6 +437,14 @@ export const paymentSettingsSchema = z.object({
410
437
  "빠진 PG의 사유는 `providers[].routingExclusion` — 후보가 아닌 PG에는 항상 사유 코드를 붙인다." +
411
438
  " 서버는 항상 싣는다. 이 필드가 없는 이전 서버 응답은 기본값(빈 배열)으로 읽는다",
412
439
  ),
440
+ warnings: z
441
+ .array(paymentFailureWarningSchema)
442
+ .optional()
443
+ .default(() => [])
444
+ .describe(
445
+ "최근 24시간 안에 같은 PG·결제수단·간편결제사가 가맹점 설정 문제로 3번 이상 실패한 조합, 마지막 실패가 최근인 순. " +
446
+ "판정 규칙은 서버가 정하고 바뀔 수 있다. 서버는 항상 싣는다. 이 필드가 없는 이전 서버 응답은 기본값(빈 배열)으로 읽는다",
447
+ ),
413
448
  });
414
449
  export type PaymentSettings = z.infer<typeof paymentSettingsSchema>;
415
450
 
@@ -283,7 +283,15 @@ export const productSchema = productSummarySchema.extend({
283
283
  * 표시는 `description`(HTML)이 맡는다 — 소비자는 이 필드를 몰라도 된다.
284
284
  */
285
285
  descriptionJson: z.string().nullable().optional(),
286
- originalPrice: z.number().int().nullable().optional(),
286
+ originalPrice: z
287
+ .number()
288
+ .int()
289
+ .nullable()
290
+ .optional()
291
+ .describe(
292
+ "정가(할인 전 표시 가격). 원 단위. 비교용 표시 값이고 결제 금액 계산에 쓰지 않는다 — 구매자가 내는 가격은 " +
293
+ "즉시할인이 있으면 `discountedPrice`, 없으면 `salePrice`다. 스토어프론트 상품 응답에도 같은 값이 실린다. 정하지 않았으면 null",
294
+ ),
287
295
  images: z.array(z.url()).optional(),
288
296
  attributes: z.array(z.object({ attributeId: z.string(), value: z.string() })).optional(),
289
297
  optionGroups: z.array(optionGroupSchema),
@@ -513,6 +521,9 @@ export const variantStockSchema = z.object({
513
521
 
514
522
  export type VariantStock = z.infer<typeof variantStockSchema>;
515
523
 
524
+ /** 상품 쓰기 요청의 이미지 목록 — 등록·전체 수정·부분 수정이 같은 항목 형식을 쓴다. 첫 장이 대표(썸네일)다 */
525
+ const productImagesRequestSchema = z.array(productImageUrlSchema).min(1).max(MAX_PRODUCT_IMAGES);
526
+
516
527
  /**
517
528
  * 상품 쓰기 요청의 공통 필드 — 등록(POST)과 전체 수정(PUT)이 같다. 이행(`fulfillment`)만 두 요청의 스키마가 다르다.
518
529
  *
@@ -528,17 +539,21 @@ const productWriteShape = {
528
539
  .min(10)
529
540
  .multipleOf(10, "판매가는 10원 단위여야 합니다 (INVALID_PRICE_UNIT)")
530
541
  .describe("판매가. 원(KRW) 단위 정수, 최소 10원, 10원 단위"),
531
- originalPrice: z.number().int().optional().describe("정가(할인 전 표시 가격). 원 단위"),
542
+ originalPrice: z
543
+ .number()
544
+ .int()
545
+ .optional()
546
+ .describe(
547
+ "정가(할인 전 표시 가격). 원 단위. 비교용 표시 값이고 결제 금액은 판매가(즉시할인이 있으면 할인 적용가)다. " +
548
+ "스토어프론트가 판매가보다 클 때 취소선·할인율로 보인다. 즉시할인은 `PUT /v1/products/{productId}/discount`로 따로 정한다",
549
+ ),
532
550
  description: z.string().optional(),
533
551
  /**
534
552
  * 상세설명 에디터(@avarlabs/editor)의 직렬화 상태. 재편집 때 이 값으로 문서를 복원한다.
535
553
  * 표시는 `description`(HTML)이 맡는다 — 소비자는 이 필드를 몰라도 된다.
536
554
  */
537
555
  descriptionJson: z.string().nullable().optional(),
538
- images: z
539
- .array(productImageUrlSchema)
540
- .min(1)
541
- .max(MAX_PRODUCT_IMAGES)
556
+ images: productImagesRequestSchema
542
557
  .optional()
543
558
  .describe("상품 이미지 주소 목록. 첫 장이 대표 이미지(썸네일)다"),
544
559
  attributes: z.array(z.object({ attributeId: z.string(), value: z.string() })).optional(),
@@ -589,6 +604,11 @@ export const productPatchRequestSchema = z
589
604
  name: z.string().max(100).optional(),
590
605
  salePrice: z.number().int().multipleOf(10).optional(),
591
606
  status: productStatusSchema.optional(),
607
+ images: productImagesRequestSchema
608
+ .optional()
609
+ .describe(
610
+ "상품 이미지 주소 목록. 주면 통째로 바꾼다(현재 목록과 병합하지 않는다). 첫 장이 대표 이미지(썸네일)다. 생략하면 바꾸지 않는다",
611
+ ),
592
612
  fulfillment: productFulfillmentUpdateSchema.optional().describe(fulfillmentUpdateDescription),
593
613
  refundPolicy: productRefundPolicyPatchSchema
594
614
  .nullable()
@@ -128,6 +128,95 @@ export const policyDocumentUrlSchema = z
128
128
  .refine((value) => value.startsWith("https://"), "https 주소만 쓸 수 있습니다")
129
129
  .nullable();
130
130
 
131
+ /**
132
+ * 사업자등록번호 — 숫자 10자리. 하이픈(`123-45-67890`)과 공백은 받고 서버가 숫자만 남겨 저장한다.
133
+ * 국세청 검증번호(체크섬)는 보지 않는다.
134
+ */
135
+ export const BUSINESS_NUMBER_PATTERN = /^\d{3}[-\s]?\d{2}[-\s]?\d{5}$/;
136
+
137
+ /** 사업자등록번호에서 숫자만 남긴다 — 저장·비교는 이 값으로 한다 */
138
+ export function normalizeBusinessNumber(value: string): string {
139
+ return value.replace(/\D/g, "");
140
+ }
141
+
142
+ export const businessNumberSchema = z
143
+ .string()
144
+ .trim()
145
+ .regex(BUSINESS_NUMBER_PATTERN, "사업자등록번호는 숫자 10자리여야 합니다")
146
+ .nullable();
147
+
148
+ /** 사업자 정보 글자 필드 — 앞뒤 공백을 지우고 빈 값은 받지 않는다(지우려면 `null`) */
149
+ const businessText = (max: number) => z.string().trim().min(1).max(max).nullable();
150
+
151
+ /** 사업자 정보 필드의 길이 상한 — 상점 플랫폼 입력 칸과 같다 */
152
+ export const BUSINESS_INFO_MAX_LENGTH = {
153
+ businessName: 100,
154
+ representativeName: 50,
155
+ mailOrderSalesNumber: 50,
156
+ businessAddress: 200,
157
+ privacyOfficerName: 50,
158
+ } as const;
159
+
160
+ /**
161
+ * `PATCH /v1/store`의 사업자 정보 필드(이슈 #81) — 전자상거래법 표기(스토어프론트 푸터)용이다.
162
+ * 바꿀 필드만 보내고 `null`을 주면 지운다. 스토어프론트 `GET /store`가 같은 값을 싣는다.
163
+ */
164
+ export const businessInfoPatchShape = {
165
+ businessName: businessText(BUSINESS_INFO_MAX_LENGTH.businessName)
166
+ .optional()
167
+ .describe("상호(사업자등록증의 상호). 상점명(`name`)과 다를 수 있다. `null`을 주면 지운다"),
168
+ representativeName: businessText(BUSINESS_INFO_MAX_LENGTH.representativeName)
169
+ .optional()
170
+ .describe("대표자명. `null`을 주면 지운다"),
171
+ businessNumber: businessNumberSchema
172
+ .optional()
173
+ .describe(
174
+ "사업자등록번호. 숫자 10자리이고 하이픈(`123-45-67890`)을 넣어도 된다. 숫자만 저장한다. `null`을 주면 지운다",
175
+ ),
176
+ mailOrderSalesNumber: businessText(BUSINESS_INFO_MAX_LENGTH.mailOrderSalesNumber)
177
+ .optional()
178
+ .describe(
179
+ "통신판매업 신고번호(예: `2026-서울강남-01234`). 적은 그대로 저장한다. `null`을 주면 지운다",
180
+ ),
181
+ businessAddress: businessText(BUSINESS_INFO_MAX_LENGTH.businessAddress)
182
+ .optional()
183
+ .describe("사업장 주소. `null`을 주면 지운다"),
184
+ customerCenterEmail: z
185
+ .email()
186
+ .max(254)
187
+ .nullable()
188
+ .optional()
189
+ .describe("고객센터 이메일. `null`을 주면 지운다"),
190
+ privacyOfficerName: businessText(BUSINESS_INFO_MAX_LENGTH.privacyOfficerName)
191
+ .optional()
192
+ .describe("개인정보 보호책임자 성명. `null`을 주면 지운다"),
193
+ privacyOfficerEmail: z
194
+ .email()
195
+ .max(254)
196
+ .nullable()
197
+ .optional()
198
+ .describe("개인정보 보호책임자 이메일. `null`을 주면 지운다"),
199
+ };
200
+
201
+ /** 응답의 사업자 정보 필드 — 옛 api 응답에 없으면 null로 읽는다(상점 플랫폼이 api보다 먼저 배포된다) */
202
+ const nullableText = (description: string) =>
203
+ z
204
+ .string()
205
+ .nullable()
206
+ .optional()
207
+ .default(null)
208
+ .describe(`${description}. 없으면 null. 서버는 항상 싣는다`);
209
+
210
+ export const businessInfoResponseShape = {
211
+ businessName: nullableText("상호. 상점명과 다를 수 있다"),
212
+ representativeName: nullableText("대표자명"),
213
+ mailOrderSalesNumber: nullableText("통신판매업 신고번호"),
214
+ businessAddress: nullableText("사업장 주소"),
215
+ customerCenterEmail: nullableText("고객센터 이메일"),
216
+ privacyOfficerName: nullableText("개인정보 보호책임자 성명"),
217
+ privacyOfficerEmail: nullableText("개인정보 보호책임자 이메일"),
218
+ };
219
+
131
220
  const autoDeliverDaysDescription =
132
221
  "발송 후 자동 배송완료까지의 일수(0~30, 기본 7). 발송(`DISPATCHED`)·배송중(`DELIVERING`) 주문상품을 " +
133
222
  "이 기간이 지나면 배송완료(`DELIVERED`)로 바꾼다. `0`이면 자동 배송완료를 하지 않는다";
@@ -141,8 +230,13 @@ export const updateStoreRequestSchema = z
141
230
  .object({
142
231
  name: z.string().min(2).max(50).optional(),
143
232
  logoUrl: z.url().optional(),
144
- customerCenterPhone: z.string().optional(),
233
+ customerCenterPhone: z
234
+ .string()
235
+ .nullable()
236
+ .optional()
237
+ .describe("고객센터 전화번호. `null`을 주면 지운다"),
145
238
  businessHours: z.string().max(100).optional(),
239
+ ...businessInfoPatchShape,
146
240
  analyticsAllowedOrigins: z
147
241
  .array(analyticsOriginSchema)
148
242
  .max(MAX_ANALYTICS_ALLOWED_ORIGINS)
@@ -220,8 +314,9 @@ export const storeSchema = z.object({
220
314
  storefrontUrl: z.url(),
221
315
  status: z.enum(["ACTIVE", "SUSPENDED", "CLOSED"]),
222
316
  logoUrl: z.url().nullable(),
223
- businessNumber: z.string().nullable(),
317
+ businessNumber: z.string().nullable().describe("사업자등록번호(숫자 10자리). 없으면 null"),
224
318
  customerCenterPhone: z.string().nullable(),
319
+ ...businessInfoResponseShape,
225
320
  analyticsAllowedOrigins: z
226
321
  .array(z.string())
227
322
  .describe("방문 분석 수집을 받는 스토어프론트 오리진. 비어 있으면 모든 오리진에서 받는다"),