@sayren/store-sdk 0.28.1 → 0.28.2
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.d.mts +338 -269
- package/dist/index.mjs +56 -6
- package/package.json +1 -1
- package/src/schemas/product.ts +26 -6
- package/src/schemas/store.ts +97 -2
package/dist/index.mjs
CHANGED
|
@@ -3045,7 +3045,7 @@ const productSchema = productSummarySchema.extend({
|
|
|
3045
3045
|
* 표시는 `description`(HTML)이 맡는다 — 소비자는 이 필드를 몰라도 된다.
|
|
3046
3046
|
*/
|
|
3047
3047
|
descriptionJson: z.string().nullable().optional(),
|
|
3048
|
-
originalPrice: z.number().int().nullable().optional(),
|
|
3048
|
+
originalPrice: z.number().int().nullable().optional().describe("정가(할인 전 표시 가격). 원 단위. 비교용 표시 값이고 결제 금액 계산에 쓰지 않는다 — 구매자가 내는 가격은 즉시할인이 있으면 `discountedPrice`, 없으면 `salePrice`다. 스토어프론트 상품 응답에도 같은 값이 실린다. 정하지 않았으면 null"),
|
|
3049
3049
|
images: z.array(z.url()).optional(),
|
|
3050
3050
|
attributes: z.array(z.object({
|
|
3051
3051
|
attributeId: z.string(),
|
|
@@ -3185,6 +3185,8 @@ const variantStockSchema = z.object({
|
|
|
3185
3185
|
variantId: z.string(),
|
|
3186
3186
|
stockQuantity: z.number().int()
|
|
3187
3187
|
});
|
|
3188
|
+
/** 상품 쓰기 요청의 이미지 목록 — 등록·전체 수정·부분 수정이 같은 항목 형식을 쓴다. 첫 장이 대표(썸네일)다 */
|
|
3189
|
+
const productImagesRequestSchema = z.array(productImageUrlSchema).min(1).max(10);
|
|
3188
3190
|
/**
|
|
3189
3191
|
* 상품 쓰기 요청의 공통 필드 — 등록(POST)과 전체 수정(PUT)이 같다. 이행(`fulfillment`)만 두 요청의 스키마가 다르다.
|
|
3190
3192
|
*
|
|
@@ -3195,14 +3197,14 @@ const productWriteShape = {
|
|
|
3195
3197
|
name: z.string().min(1).max(100),
|
|
3196
3198
|
categoryId: z.string().min(1, "카테고리를 선택해주십시오"),
|
|
3197
3199
|
salePrice: z.number().int().min(10).multipleOf(10, "판매가는 10원 단위여야 합니다 (INVALID_PRICE_UNIT)").describe("판매가. 원(KRW) 단위 정수, 최소 10원, 10원 단위"),
|
|
3198
|
-
originalPrice: z.number().int().optional().describe("정가(할인 전 표시 가격). 원
|
|
3200
|
+
originalPrice: z.number().int().optional().describe("정가(할인 전 표시 가격). 원 단위. 비교용 표시 값이고 결제 금액은 판매가(즉시할인이 있으면 할인 적용가)다. 스토어프론트가 판매가보다 클 때 취소선·할인율로 보인다. 즉시할인은 `PUT /v1/products/{productId}/discount`로 따로 정한다"),
|
|
3199
3201
|
description: z.string().optional(),
|
|
3200
3202
|
/**
|
|
3201
3203
|
* 상세설명 에디터(@avarlabs/editor)의 직렬화 상태. 재편집 때 이 값으로 문서를 복원한다.
|
|
3202
3204
|
* 표시는 `description`(HTML)이 맡는다 — 소비자는 이 필드를 몰라도 된다.
|
|
3203
3205
|
*/
|
|
3204
3206
|
descriptionJson: z.string().nullable().optional(),
|
|
3205
|
-
images:
|
|
3207
|
+
images: productImagesRequestSchema.optional().describe("상품 이미지 주소 목록. 첫 장이 대표 이미지(썸네일)다"),
|
|
3206
3208
|
attributes: z.array(z.object({
|
|
3207
3209
|
attributeId: z.string(),
|
|
3208
3210
|
value: z.string()
|
|
@@ -3225,6 +3227,7 @@ const productPatchRequestSchema = z.strictObject({
|
|
|
3225
3227
|
name: z.string().max(100).optional(),
|
|
3226
3228
|
salePrice: z.number().int().multipleOf(10).optional(),
|
|
3227
3229
|
status: productStatusSchema.optional(),
|
|
3230
|
+
images: productImagesRequestSchema.optional().describe("상품 이미지 주소 목록. 주면 통째로 바꾼다(현재 목록과 병합하지 않는다). 첫 장이 대표 이미지(썸네일)다. 생략하면 바꾸지 않는다"),
|
|
3228
3231
|
fulfillment: productFulfillmentUpdateSchema.optional().describe(fulfillmentUpdateDescription),
|
|
3229
3232
|
refundPolicy: productRefundPolicyPatchSchema.nullable().optional().describe("상품별 환불 정책. 주면 통째로 바꾼다(준 항목만 상점 기본을 덮어쓴다). `null`은 덮어쓰기를 지워 상점 기본을 따른다. 생략하면 바꾸지 않는다")
|
|
3230
3233
|
}).refine((value) => Object.values(value).some((v) => v !== void 0), { message: "최소 1개 필드가 필요합니다" });
|
|
@@ -4148,14 +4151,60 @@ const policyVersionSchema = z.string().trim().min(1).max(20).describe("약관
|
|
|
4148
4151
|
* 나중에 주소를 바꿔도 "무엇에 동의했는지"가 남는다. `null`로 지울 수 있다.
|
|
4149
4152
|
*/
|
|
4150
4153
|
const policyDocumentUrlSchema = z.url().max(500).refine((value) => value.startsWith("https://"), "https 주소만 쓸 수 있습니다").nullable();
|
|
4154
|
+
/**
|
|
4155
|
+
* 사업자등록번호 — 숫자 10자리. 하이픈(`123-45-67890`)과 공백은 받고 서버가 숫자만 남겨 저장한다.
|
|
4156
|
+
* 국세청 검증번호(체크섬)는 보지 않는다.
|
|
4157
|
+
*/
|
|
4158
|
+
const BUSINESS_NUMBER_PATTERN = /^\d{3}[-\s]?\d{2}[-\s]?\d{5}$/;
|
|
4159
|
+
/** 사업자등록번호에서 숫자만 남긴다 — 저장·비교는 이 값으로 한다 */
|
|
4160
|
+
function normalizeBusinessNumber(value) {
|
|
4161
|
+
return value.replace(/\D/g, "");
|
|
4162
|
+
}
|
|
4163
|
+
const businessNumberSchema = z.string().trim().regex(BUSINESS_NUMBER_PATTERN, "사업자등록번호는 숫자 10자리여야 합니다").nullable();
|
|
4164
|
+
/** 사업자 정보 글자 필드 — 앞뒤 공백을 지우고 빈 값은 받지 않는다(지우려면 `null`) */
|
|
4165
|
+
const businessText = (max) => z.string().trim().min(1).max(max).nullable();
|
|
4166
|
+
/** 사업자 정보 필드의 길이 상한 — 상점 플랫폼 입력 칸과 같다 */
|
|
4167
|
+
const BUSINESS_INFO_MAX_LENGTH = {
|
|
4168
|
+
businessName: 100,
|
|
4169
|
+
representativeName: 50,
|
|
4170
|
+
mailOrderSalesNumber: 50,
|
|
4171
|
+
businessAddress: 200,
|
|
4172
|
+
privacyOfficerName: 50
|
|
4173
|
+
};
|
|
4174
|
+
/**
|
|
4175
|
+
* `PATCH /v1/store`의 사업자 정보 필드(이슈 #81) — 전자상거래법 표기(스토어프론트 푸터)용이다.
|
|
4176
|
+
* 바꿀 필드만 보내고 `null`을 주면 지운다. 스토어프론트 `GET /store`가 같은 값을 싣는다.
|
|
4177
|
+
*/
|
|
4178
|
+
const businessInfoPatchShape = {
|
|
4179
|
+
businessName: businessText(BUSINESS_INFO_MAX_LENGTH.businessName).optional().describe("상호(사업자등록증의 상호). 상점명(`name`)과 다를 수 있다. `null`을 주면 지운다"),
|
|
4180
|
+
representativeName: businessText(BUSINESS_INFO_MAX_LENGTH.representativeName).optional().describe("대표자명. `null`을 주면 지운다"),
|
|
4181
|
+
businessNumber: businessNumberSchema.optional().describe("사업자등록번호. 숫자 10자리이고 하이픈(`123-45-67890`)을 넣어도 된다. 숫자만 저장한다. `null`을 주면 지운다"),
|
|
4182
|
+
mailOrderSalesNumber: businessText(BUSINESS_INFO_MAX_LENGTH.mailOrderSalesNumber).optional().describe("통신판매업 신고번호(예: `2026-서울강남-01234`). 적은 그대로 저장한다. `null`을 주면 지운다"),
|
|
4183
|
+
businessAddress: businessText(BUSINESS_INFO_MAX_LENGTH.businessAddress).optional().describe("사업장 주소. `null`을 주면 지운다"),
|
|
4184
|
+
customerCenterEmail: z.email().max(254).nullable().optional().describe("고객센터 이메일. `null`을 주면 지운다"),
|
|
4185
|
+
privacyOfficerName: businessText(BUSINESS_INFO_MAX_LENGTH.privacyOfficerName).optional().describe("개인정보 보호책임자 성명. `null`을 주면 지운다"),
|
|
4186
|
+
privacyOfficerEmail: z.email().max(254).nullable().optional().describe("개인정보 보호책임자 이메일. `null`을 주면 지운다")
|
|
4187
|
+
};
|
|
4188
|
+
/** 응답의 사업자 정보 필드 — 옛 api 응답에 없으면 null로 읽는다(상점 플랫폼이 api보다 먼저 배포된다) */
|
|
4189
|
+
const nullableText = (description) => z.string().nullable().optional().default(null).describe(`${description}. 없으면 null. 서버는 항상 싣는다`);
|
|
4190
|
+
const businessInfoResponseShape = {
|
|
4191
|
+
businessName: nullableText("상호. 상점명과 다를 수 있다"),
|
|
4192
|
+
representativeName: nullableText("대표자명"),
|
|
4193
|
+
mailOrderSalesNumber: nullableText("통신판매업 신고번호"),
|
|
4194
|
+
businessAddress: nullableText("사업장 주소"),
|
|
4195
|
+
customerCenterEmail: nullableText("고객센터 이메일"),
|
|
4196
|
+
privacyOfficerName: nullableText("개인정보 보호책임자 성명"),
|
|
4197
|
+
privacyOfficerEmail: nullableText("개인정보 보호책임자 이메일")
|
|
4198
|
+
};
|
|
4151
4199
|
const autoDeliverDaysDescription = "발송 후 자동 배송완료까지의 일수(0~30, 기본 7). 발송(`DISPATCHED`)·배송중(`DELIVERING`) 주문상품을 이 기간이 지나면 배송완료(`DELIVERED`)로 바꾼다. `0`이면 자동 배송완료를 하지 않는다";
|
|
4152
4200
|
const autoConfirmDaysDescription = "배송완료 후 자동 구매확정까지의 일수(0~30, 기본 7). 배송완료 시점에 구매확정 예정일(`autoDecisionDate`)을 이 값으로 잡고, 그 날짜가 지나면 구매확정(`PURCHASE_DECIDED`)으로 바꾼다. 진행 중인 클레임이 있으면 건너뛴다. `0`이면 자동 구매확정을 하지 않는다";
|
|
4153
4201
|
/** `PATCH /v1/store` 본문 — 바꿀 필드만 보낸다 */
|
|
4154
4202
|
const updateStoreRequestSchema = z.object({
|
|
4155
4203
|
name: z.string().min(2).max(50).optional(),
|
|
4156
4204
|
logoUrl: z.url().optional(),
|
|
4157
|
-
customerCenterPhone: z.string().optional(),
|
|
4205
|
+
customerCenterPhone: z.string().nullable().optional().describe("고객센터 전화번호. `null`을 주면 지운다"),
|
|
4158
4206
|
businessHours: z.string().max(100).optional(),
|
|
4207
|
+
...businessInfoPatchShape,
|
|
4159
4208
|
analyticsAllowedOrigins: z.array(analyticsOriginSchema).max(20).optional().describe("@deprecated `storefrontOrigins`를 쓴다(같은 목록). 방문 분석 수집을 받을 스토어프론트 오리진(최대 20개). 비우면 모든 오리진에서 받는다. 넣으면 목록에 없는 오리진의 수집 요청은 403 `ORIGIN_NOT_ALLOWED`이고, 페이지 URL이 목록 밖인 이벤트는 버린다"),
|
|
4160
4209
|
storefrontOrigins: z.array(analyticsOriginSchema).max(20).optional().describe("스토어프론트 도메인(최대 20개) — 소셜 로그인 뒤 돌아갈 주소와 방문 분석 수집을 함께 제한한다. `analyticsAllowedOrigins`와 같은 목록이다(둘 다 주면 이 값이 이긴다)"),
|
|
4161
4210
|
guestCheckoutEnabled: z.boolean().optional().describe("비회원 주문 허용. false(회원만)면 로그인하지 않은 구매자의 주문서 생성·결제 요청이 403 `GUEST_CHECKOUT_DISABLED`다. 장바구니 담기와 이미 받은 비회원 주문의 조회·취소는 막지 않는다"),
|
|
@@ -4179,8 +4228,9 @@ const storeSchema = z.object({
|
|
|
4179
4228
|
"CLOSED"
|
|
4180
4229
|
]),
|
|
4181
4230
|
logoUrl: z.url().nullable(),
|
|
4182
|
-
businessNumber: z.string().nullable(),
|
|
4231
|
+
businessNumber: z.string().nullable().describe("사업자등록번호(숫자 10자리). 없으면 null"),
|
|
4183
4232
|
customerCenterPhone: z.string().nullable(),
|
|
4233
|
+
...businessInfoResponseShape,
|
|
4184
4234
|
analyticsAllowedOrigins: z.array(z.string()).describe("방문 분석 수집을 받는 스토어프론트 오리진. 비어 있으면 모든 오리진에서 받는다"),
|
|
4185
4235
|
storefrontOrigins: z.array(z.string()).describe("스토어프론트 도메인 — 소셜 로그인 리디렉트와 방문 분석 수집이 함께 쓴다(`analyticsAllowedOrigins`와 같은 값)"),
|
|
4186
4236
|
guestCheckoutEnabled: z.boolean().describe("비회원 주문 허용. false면 회원만 주문할 수 있다"),
|
|
@@ -6577,4 +6627,4 @@ function createStoreSession(options) {
|
|
|
6577
6627
|
};
|
|
6578
6628
|
}
|
|
6579
6629
|
//#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 };
|
|
6630
|
+
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, 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
package/src/schemas/product.ts
CHANGED
|
@@ -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
|
|
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
|
|
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:
|
|
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()
|
package/src/schemas/store.ts
CHANGED
|
@@ -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
|
|
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("방문 분석 수집을 받는 스토어프론트 오리진. 비어 있으면 모든 오리진에서 받는다"),
|