@sayren/store-sdk 0.50.0 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1303 -666
- package/dist/index.mjs +584 -62
- package/dist/server.d.mts +3 -1
- package/dist/server.mjs +2 -1
- package/dist/userinfo-n1JYxWAz.d.mts +90 -0
- package/package.json +1 -1
- package/src/client.ts +29 -0
- package/src/index.ts +1 -0
- package/src/member-delegation.ts +4 -0
- package/src/schemas/condition-tree.ts +103 -3
- package/src/schemas/coupon-rules.ts +178 -0
- package/src/schemas/coupon-selection.ts +8 -3
- package/src/schemas/coupon.ts +112 -6
- package/src/schemas/customer-delegation.ts +6 -0
- package/src/schemas/customer.ts +4 -0
- package/src/schemas/points.ts +4 -2
- package/src/schemas/promotion.ts +286 -49
- package/src/schemas/userinfo.ts +118 -0
- package/dist/webhook-headers-D6QmPdEJ.d.mts +0 -22
package/dist/index.mjs
CHANGED
|
@@ -4007,7 +4007,8 @@ const POINT_LOT_SOURCES = [
|
|
|
4007
4007
|
"PURCHASE",
|
|
4008
4008
|
"ADJUST",
|
|
4009
4009
|
"REFUND_RESTORE",
|
|
4010
|
-
"OPENING"
|
|
4010
|
+
"OPENING",
|
|
4011
|
+
"COUPON"
|
|
4011
4012
|
];
|
|
4012
4013
|
/** 원장 항목 유형 */
|
|
4013
4014
|
const POINT_ENTRY_TYPES = [
|
|
@@ -4019,7 +4020,8 @@ const POINT_ENTRY_TYPES = [
|
|
|
4019
4020
|
"REFUND_RESTORE",
|
|
4020
4021
|
"EXPIRE",
|
|
4021
4022
|
"ADJUST",
|
|
4022
|
-
"OPENING"
|
|
4023
|
+
"OPENING",
|
|
4024
|
+
"EARN_COUPON"
|
|
4023
4025
|
];
|
|
4024
4026
|
/** 상점 플랫폼 알림 — `REVIEW_REWARD_PAUSED` 리뷰 자동 적립이 멈춤 · `POINTS_AVAILABLE` 적립금 설정을 쓸 수 있음 */
|
|
4025
4027
|
const pointPolicyNoticeSchema = z$1.enum(["REVIEW_REWARD_PAUSED", "POINTS_AVAILABLE"]).nullable().describe("상점에 보일 안내. `REVIEW_REWARD_PAUSED`: 지난 90일에 리뷰 적립이 있었는데 적립금 기본값이 끔으로 바뀌어 리뷰 자동 적립(500원 + 사진 500원)이 멈췄다. `POINTS_AVAILABLE`: 적립금 설정을 열었으니 다시 켤 수 있다. 안내할 것이 없으면 null");
|
|
@@ -4045,7 +4047,7 @@ const updatePointPolicyRequestSchema = strictRequest(z$1.object({
|
|
|
4045
4047
|
expiryDays: expiryDays.optional()
|
|
4046
4048
|
}));
|
|
4047
4049
|
/** 응답의 원장 유형 — 값이 추가될 수 있어 문자열로 받는다 */
|
|
4048
|
-
const responsePointEntryTypeSchema = z$1.union([z$1.enum(POINT_ENTRY_TYPES), z$1.string()]).describe("유형. `EARN_REVIEW` 리뷰 적립 · `REVOKE_REVIEW` 리뷰 삭제 회수 · `EARN_PURCHASE` 구매 적립 · `EXPIRE` 소멸 · `ADJUST` 셀러 지급·차감 · `OPENING` 기존 잔액 이전 · `USE_RESERVE` 결제 사용(결제 시작 때 빠짐) · `USE_RELEASE` 결제가 실패·만료되어 되돌림 · `REFUND_RESTORE` 취소·반품 환불로
|
|
4050
|
+
const responsePointEntryTypeSchema = z$1.union([z$1.enum(POINT_ENTRY_TYPES), z$1.string()]).describe("유형. `EARN_REVIEW` 리뷰 적립 · `REVOKE_REVIEW` 리뷰 삭제 회수 · `EARN_PURCHASE` 구매 적립 · `EXPIRE` 소멸 · `ADJUST` 셀러 지급·차감 · `OPENING` 기존 잔액 이전 · `USE_RESERVE` 결제 사용(결제 시작 때 빠짐) · `USE_RELEASE` 결제가 실패·만료되어 되돌림 · `REFUND_RESTORE` 취소·반품 환불로 반환 · `EARN_COUPON` 적립금 지급 쿠폰. 값이 추가될 수 있어 문자열로 받는다");
|
|
4049
4051
|
/** 원장 항목 — 셀러 조회용(사유·행위자 포함) */
|
|
4050
4052
|
const pointEntrySchema = z$1.object({
|
|
4051
4053
|
entryId: z$1.string(),
|
|
@@ -4062,7 +4064,7 @@ const pointEntrySchema = z$1.object({
|
|
|
4062
4064
|
/** 적립 묶음 요약 — 남은 금액이 있는 묶음 */
|
|
4063
4065
|
const pointLotSchema = z$1.object({
|
|
4064
4066
|
lotId: z$1.string(),
|
|
4065
|
-
source: z$1.union([z$1.enum(POINT_LOT_SOURCES), z$1.string()]).describe("출처. `REVIEW`·`PURCHASE`·`ADJUST`·`REFUND_RESTORE`·`OPENING` 등"),
|
|
4067
|
+
source: z$1.union([z$1.enum(POINT_LOT_SOURCES), z$1.string()]).describe("출처. `REVIEW`·`PURCHASE`·`ADJUST`·`REFUND_RESTORE`·`OPENING`·`COUPON` 등"),
|
|
4066
4068
|
amount: z$1.number().int().describe("적립한 금액"),
|
|
4067
4069
|
remaining: z$1.number().int().describe("남은 금액"),
|
|
4068
4070
|
expiresAt: z$1.string().nullable().describe("소멸 시각. null이면 소멸 없음"),
|
|
@@ -7650,6 +7652,30 @@ const claimFlowEditSessionRequestSchema = strictRequest(z$1.object({ takeover: z
|
|
|
7650
7652
|
function isConditionGroup(node) {
|
|
7651
7653
|
return typeof node === "object" && node !== null && "combinator" in node;
|
|
7652
7654
|
}
|
|
7655
|
+
const BIRTHDATE_TEXT = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
7656
|
+
/**
|
|
7657
|
+
* 생일(`YYYY-MM-DD`, 연도를 모르면 `0000-MM-DD`)과 판정 날짜(쓰는 쪽 달력의 연·월·일)로 사실 값을 만든다. 읽지 못하면 undefined
|
|
7658
|
+
*/
|
|
7659
|
+
function birthdateFactOf(birthdate, today) {
|
|
7660
|
+
const match = birthdate ? BIRTHDATE_TEXT.exec(birthdate) : null;
|
|
7661
|
+
if (!match) return void 0;
|
|
7662
|
+
const [year, month, day] = [
|
|
7663
|
+
Number(match[1]),
|
|
7664
|
+
Number(match[2]),
|
|
7665
|
+
Number(match[3])
|
|
7666
|
+
];
|
|
7667
|
+
if (month < 1 || month > 12 || day < 1 || day > 31) return void 0;
|
|
7668
|
+
const fact = {
|
|
7669
|
+
month,
|
|
7670
|
+
isCurrentMonth: month === today.month
|
|
7671
|
+
};
|
|
7672
|
+
if (year > 0) {
|
|
7673
|
+
const beforeBirthday = today.month < month || today.month === month && today.day < day;
|
|
7674
|
+
const age = today.year - year - (beforeBirthday ? 1 : 0);
|
|
7675
|
+
if (age >= 0) fact.age = age;
|
|
7676
|
+
}
|
|
7677
|
+
return fact;
|
|
7678
|
+
}
|
|
7653
7679
|
const CONDITION_OPERATORS_BY_TYPE = {
|
|
7654
7680
|
integer: [
|
|
7655
7681
|
"=",
|
|
@@ -7660,8 +7686,17 @@ const CONDITION_OPERATORS_BY_TYPE = {
|
|
|
7660
7686
|
boolean: ["="],
|
|
7661
7687
|
idSet: ["in"],
|
|
7662
7688
|
enumSet: ["in"],
|
|
7663
|
-
timeRange: ["between"]
|
|
7689
|
+
timeRange: ["between"],
|
|
7690
|
+
birthdate: [
|
|
7691
|
+
"ageBetween",
|
|
7692
|
+
"age>=",
|
|
7693
|
+
"age<=",
|
|
7694
|
+
"birthMonthIn",
|
|
7695
|
+
"birthMonthIsCurrent"
|
|
7696
|
+
]
|
|
7664
7697
|
};
|
|
7698
|
+
/** 나이 값 범위 */
|
|
7699
|
+
const AGE_MAX = 150;
|
|
7665
7700
|
function conditionCatalog(fields) {
|
|
7666
7701
|
return new Map(fields.map((field) => [field.name, field]));
|
|
7667
7702
|
}
|
|
@@ -7712,6 +7747,19 @@ function valueValid(def, operator, value, limits) {
|
|
|
7712
7747
|
case "idSet":
|
|
7713
7748
|
case "enumSet": return Array.isArray(value) && value.length > 0 && value.length <= limits.maxSetSize && value.every((v) => typeof v === "string" && v.length > 0 && v.length <= 200) && (def.type === "idSet" || value.every((v) => def.options?.includes(v)));
|
|
7714
7749
|
case "timeRange": return Array.isArray(value) && value.length === 2 && value.every((v) => typeof v === "string" && TIME_PATTERN.test(v)) && value[0] !== value[1];
|
|
7750
|
+
case "birthdate": {
|
|
7751
|
+
const age = {
|
|
7752
|
+
min: 0,
|
|
7753
|
+
max: AGE_MAX
|
|
7754
|
+
};
|
|
7755
|
+
if (operator === "ageBetween") return Array.isArray(value) && value.length === 2 && isInteger(value[0], age) && isInteger(value[1], age) && value[0] <= value[1];
|
|
7756
|
+
if (operator === "age>=" || operator === "age<=") return isInteger(value, age);
|
|
7757
|
+
if (operator === "birthMonthIn") return Array.isArray(value) && value.length > 0 && value.length <= 12 && value.every((v) => isInteger(v, {
|
|
7758
|
+
min: 1,
|
|
7759
|
+
max: 12
|
|
7760
|
+
}));
|
|
7761
|
+
return operator === "birthMonthIsCurrent" && value === true;
|
|
7762
|
+
}
|
|
7715
7763
|
}
|
|
7716
7764
|
}
|
|
7717
7765
|
/**
|
|
@@ -7788,7 +7836,7 @@ function canonicalizeConditionGroup(group) {
|
|
|
7788
7836
|
};
|
|
7789
7837
|
}
|
|
7790
7838
|
function canonicalizeConditionRule(rule) {
|
|
7791
|
-
const value = rule.operator === "in" && Array.isArray(rule.value) ? [...new Set(rule.value)].sort() : rule.value;
|
|
7839
|
+
const value = rule.operator === "in" && Array.isArray(rule.value) ? [...new Set(rule.value)].sort() : rule.operator === "birthMonthIn" && Array.isArray(rule.value) ? [...new Set(rule.value)].sort((a, b) => a - b) : rule.value;
|
|
7792
7840
|
return {
|
|
7793
7841
|
field: rule.field,
|
|
7794
7842
|
operator: rule.operator,
|
|
@@ -7842,6 +7890,20 @@ function ruleHolds(rule, catalog, ctx) {
|
|
|
7842
7890
|
if (at === null || from === null || to === null) return false;
|
|
7843
7891
|
return from < to ? at >= from && at < to : at >= from || at < to;
|
|
7844
7892
|
}
|
|
7893
|
+
case "birthdate": {
|
|
7894
|
+
if (typeof fact !== "object") return false;
|
|
7895
|
+
const birth = fact;
|
|
7896
|
+
const age = birth.age;
|
|
7897
|
+
if (operator === "ageBetween" && Array.isArray(value)) {
|
|
7898
|
+
const [from, to] = value;
|
|
7899
|
+
return typeof age === "number" && typeof from === "number" && typeof to === "number" && age >= from && age <= to;
|
|
7900
|
+
}
|
|
7901
|
+
if (operator === "age>=") return typeof age === "number" && typeof value === "number" && age >= value;
|
|
7902
|
+
if (operator === "age<=") return typeof age === "number" && typeof value === "number" && age <= value;
|
|
7903
|
+
if (operator === "birthMonthIn") return Array.isArray(value) && value.includes(birth.month);
|
|
7904
|
+
if (operator === "birthMonthIsCurrent") return value === true && birth.isCurrentMonth === true;
|
|
7905
|
+
return false;
|
|
7906
|
+
}
|
|
7845
7907
|
}
|
|
7846
7908
|
}
|
|
7847
7909
|
/** 노드 하나를 평가한다. 빈 그룹은 참(조건 없음)이다 */
|
|
@@ -7892,6 +7954,31 @@ const COUPON_WEEKDAYS = [
|
|
|
7892
7954
|
];
|
|
7893
7955
|
/** 쿠폰 조건의 시각 기준 — 상점 시간대 칸이 없어 flow-spec 달력과 같은 Asia/Seoul로 고정한다 */
|
|
7894
7956
|
const COUPON_TIME_ZONE = "Asia/Seoul";
|
|
7957
|
+
/** BCP 47 정규형(`ko-kr` → `ko-KR`) — 사실 값과 규칙 값이 같은 표기여야 목록 비교가 맞는다. 읽지 못하면 undefined */
|
|
7958
|
+
function canonicalLocale(tag) {
|
|
7959
|
+
if (!tag) return void 0;
|
|
7960
|
+
try {
|
|
7961
|
+
return Intl.getCanonicalLocales(tag)[0];
|
|
7962
|
+
} catch {
|
|
7963
|
+
return;
|
|
7964
|
+
}
|
|
7965
|
+
}
|
|
7966
|
+
/** 클레임 원본 → 사실 값. `now`는 판정 시각(생일 달·만 나이는 한국 날짜) */
|
|
7967
|
+
function couponClaimFactsOf(claims, now) {
|
|
7968
|
+
const facts = {};
|
|
7969
|
+
if (claims.gender) facts.gender = claims.gender;
|
|
7970
|
+
const birth = birthdateFactOf(claims.birthdate, couponTodayAt(now));
|
|
7971
|
+
if (birth) facts.birthdate = birth;
|
|
7972
|
+
if (typeof claims.email_verified === "boolean") facts.email_verified = claims.email_verified;
|
|
7973
|
+
if (typeof claims.phone_number_verified === "boolean") facts.phone_number_verified = claims.phone_number_verified;
|
|
7974
|
+
const locale = canonicalLocale(claims.locale);
|
|
7975
|
+
if (locale) {
|
|
7976
|
+
const primary = locale.split("-")[0] ?? locale;
|
|
7977
|
+
facts.locale = [.../* @__PURE__ */ new Set([locale, primary])];
|
|
7978
|
+
}
|
|
7979
|
+
if (claims.addressCountry) facts.addressCountry = claims.addressCountry.toUpperCase();
|
|
7980
|
+
return facts;
|
|
7981
|
+
}
|
|
7895
7982
|
const couponFactsSchema = z$1.object({
|
|
7896
7983
|
customer: z$1.object({
|
|
7897
7984
|
daysSinceJoined: z$1.number().int().optional(),
|
|
@@ -7920,6 +8007,21 @@ const WEEKDAY_OF = {
|
|
|
7920
8007
|
Sat: "SAT",
|
|
7921
8008
|
Sun: "SUN"
|
|
7922
8009
|
};
|
|
8010
|
+
const SEOUL_DATE = new Intl.DateTimeFormat("en-CA", {
|
|
8011
|
+
timeZone: COUPON_TIME_ZONE,
|
|
8012
|
+
year: "numeric",
|
|
8013
|
+
month: "2-digit",
|
|
8014
|
+
day: "2-digit"
|
|
8015
|
+
});
|
|
8016
|
+
/** 판정 시각의 한국 날짜 */
|
|
8017
|
+
function couponTodayAt(now) {
|
|
8018
|
+
const parts = Object.fromEntries(SEOUL_DATE.formatToParts(now).map((p) => [p.type, p.value]));
|
|
8019
|
+
return {
|
|
8020
|
+
year: Number(parts.year),
|
|
8021
|
+
month: Number(parts.month),
|
|
8022
|
+
day: Number(parts.day)
|
|
8023
|
+
};
|
|
8024
|
+
}
|
|
7923
8025
|
/** 판정 시각의 요일·시각(Asia/Seoul) */
|
|
7924
8026
|
function couponTimeFactsAt(now) {
|
|
7925
8027
|
const parts = Object.fromEntries(SEOUL.formatToParts(now).map((p) => [p.type, p.value]));
|
|
@@ -7981,6 +8083,43 @@ const ORDER_FIELDS = [
|
|
|
7981
8083
|
max: DAY_MAX,
|
|
7982
8084
|
resolve: (ctx) => ctx.facts.customer?.daysSinceLastOrder
|
|
7983
8085
|
},
|
|
8086
|
+
{
|
|
8087
|
+
name: "claims.gender",
|
|
8088
|
+
type: "enumSet",
|
|
8089
|
+
slots: ["audience", "eligibility"],
|
|
8090
|
+
options: ["female", "male"],
|
|
8091
|
+
resolve: (ctx) => ctx.facts.customer?.claims?.gender
|
|
8092
|
+
},
|
|
8093
|
+
{
|
|
8094
|
+
name: "claims.birthdate",
|
|
8095
|
+
type: "birthdate",
|
|
8096
|
+
slots: ["audience", "eligibility"],
|
|
8097
|
+
resolve: (ctx) => ctx.facts.customer?.claims?.birthdate
|
|
8098
|
+
},
|
|
8099
|
+
{
|
|
8100
|
+
name: "claims.email_verified",
|
|
8101
|
+
type: "boolean",
|
|
8102
|
+
slots: ["audience", "eligibility"],
|
|
8103
|
+
resolve: (ctx) => ctx.facts.customer?.claims?.email_verified
|
|
8104
|
+
},
|
|
8105
|
+
{
|
|
8106
|
+
name: "claims.phone_number_verified",
|
|
8107
|
+
type: "boolean",
|
|
8108
|
+
slots: ["audience", "eligibility"],
|
|
8109
|
+
resolve: (ctx) => ctx.facts.customer?.claims?.phone_number_verified
|
|
8110
|
+
},
|
|
8111
|
+
{
|
|
8112
|
+
name: "claims.locale",
|
|
8113
|
+
type: "idSet",
|
|
8114
|
+
slots: ["audience", "eligibility"],
|
|
8115
|
+
resolve: (ctx) => ctx.facts.customer?.claims?.locale
|
|
8116
|
+
},
|
|
8117
|
+
{
|
|
8118
|
+
name: "claims.address.country",
|
|
8119
|
+
type: "idSet",
|
|
8120
|
+
slots: ["audience", "eligibility"],
|
|
8121
|
+
resolve: (ctx) => ctx.facts.customer?.claims?.addressCountry
|
|
8122
|
+
},
|
|
7984
8123
|
{
|
|
7985
8124
|
name: "cart.subtotal",
|
|
7986
8125
|
type: "integer",
|
|
@@ -8232,6 +8371,7 @@ function evaluateCouponEligibility(eligibility, ctx, phase) {
|
|
|
8232
8371
|
function assumeCouponFactRules(group, facts) {
|
|
8233
8372
|
const known = (field) => {
|
|
8234
8373
|
if (field.startsWith("customer.")) return facts.customer?.[field.slice(9)] !== void 0;
|
|
8374
|
+
if (field.startsWith("claims.")) return facts.customer?.claims !== void 0;
|
|
8235
8375
|
if (field.startsWith("time.")) return facts.time !== void 0;
|
|
8236
8376
|
return true;
|
|
8237
8377
|
};
|
|
@@ -8255,7 +8395,10 @@ function couponAudienceMatches(audience, facts) {
|
|
|
8255
8395
|
/** 트리들에 나온 구매자 사실 값 이름(`daysSinceJoined` 등) — 서버가 필요한 값만 읽는다 */
|
|
8256
8396
|
function couponCustomerFactNames(...groups) {
|
|
8257
8397
|
const names = /* @__PURE__ */ new Set();
|
|
8258
|
-
for (const group of groups) for (const field of conditionFields(group))
|
|
8398
|
+
for (const group of groups) for (const field of conditionFields(group)) {
|
|
8399
|
+
if (field.startsWith("customer.")) names.add(field.slice(9));
|
|
8400
|
+
if (field.startsWith("claims.")) names.add("claims");
|
|
8401
|
+
}
|
|
8259
8402
|
return names;
|
|
8260
8403
|
}
|
|
8261
8404
|
/** 사실 값 중 트리가 쓰는 것만 남긴다 — 스냅샷에 굳히는 값 */
|
|
@@ -8263,6 +8406,7 @@ function pickCouponFacts(facts, eligibility) {
|
|
|
8263
8406
|
const fields = conditionFields(eligibility);
|
|
8264
8407
|
const customer = {};
|
|
8265
8408
|
for (const name of couponCustomerFactNames(eligibility)) {
|
|
8409
|
+
if (name === "claims") continue;
|
|
8266
8410
|
const value = facts.customer?.[name];
|
|
8267
8411
|
if (value !== void 0) customer[name] = value;
|
|
8268
8412
|
}
|
|
@@ -8320,6 +8464,33 @@ function couponRuleIssues(input) {
|
|
|
8320
8464
|
path: ["perMemberUseLimit"],
|
|
8321
8465
|
message: "결제 완료 주문 수 조건이 있는 코드 입력형 쿠폰은 1인 사용 한도가 필요합니다"
|
|
8322
8466
|
});
|
|
8467
|
+
for (const slot of ["eligibility", "audience"]) {
|
|
8468
|
+
const walk = (group, path) => {
|
|
8469
|
+
for (const [index, node] of group.rules.entries()) {
|
|
8470
|
+
const at = [
|
|
8471
|
+
...path,
|
|
8472
|
+
"rules",
|
|
8473
|
+
index
|
|
8474
|
+
];
|
|
8475
|
+
if (isConditionGroup(node)) {
|
|
8476
|
+
walk(node, at);
|
|
8477
|
+
continue;
|
|
8478
|
+
}
|
|
8479
|
+
if (!Array.isArray(node.value)) continue;
|
|
8480
|
+
const values = node.value;
|
|
8481
|
+
if (node.field === "claims.address.country" && !values.every((v) => typeof v === "string" && /^[A-Z]{2}$/.test(v))) issues.push({
|
|
8482
|
+
path: [...at, "value"],
|
|
8483
|
+
message: "국가는 대문자 두 자 코드(예: KR)입니다"
|
|
8484
|
+
});
|
|
8485
|
+
if (node.field === "claims.locale" && !values.every((v) => typeof v === "string" && canonicalLocale(v) === v)) issues.push({
|
|
8486
|
+
path: [...at, "value"],
|
|
8487
|
+
message: "언어 태그는 정규 표기(예: ko, ko-KR)입니다"
|
|
8488
|
+
});
|
|
8489
|
+
}
|
|
8490
|
+
};
|
|
8491
|
+
const group = input[slot];
|
|
8492
|
+
if (group) walk(group, [slot]);
|
|
8493
|
+
}
|
|
8323
8494
|
if (input.issueMethod === "SIGNUP" && couponCustomerFactNames(input.audience ?? EMPTY_CONDITION_GROUP).has("daysSinceJoined")) issues.push({
|
|
8324
8495
|
path: ["audience"],
|
|
8325
8496
|
message: "회원가입 쿠폰의 발급 대상에는 가입 경과 일수를 둘 수 없습니다"
|
|
@@ -8351,6 +8522,10 @@ const FIELD_LABELS = {
|
|
|
8351
8522
|
"cart.targetQuantity": "대상 상품",
|
|
8352
8523
|
"line.unitPrice": "판매가"
|
|
8353
8524
|
};
|
|
8525
|
+
const GENDER_LABELS = {
|
|
8526
|
+
female: "여성",
|
|
8527
|
+
male: "남성"
|
|
8528
|
+
};
|
|
8354
8529
|
const number = new Intl.NumberFormat("ko-KR");
|
|
8355
8530
|
function amountText(field, value, formatMoney) {
|
|
8356
8531
|
const n = typeof value === "number" ? value : Number(value);
|
|
@@ -8375,6 +8550,12 @@ function describeCouponRule(rule, formatMoney = (n) => `${number.format(n)}원`)
|
|
|
8375
8550
|
const [from, to] = rule.value;
|
|
8376
8551
|
return `${from}~${to}`;
|
|
8377
8552
|
}
|
|
8553
|
+
case "claims.gender": return rule.value.map((g) => GENDER_LABELS[g] ?? g).join("·");
|
|
8554
|
+
case "claims.email_verified": return rule.value ? "이메일 확인 회원" : "이메일 미확인 회원";
|
|
8555
|
+
case "claims.phone_number_verified": return rule.value ? "휴대폰 확인 회원" : "휴대폰 미확인 회원";
|
|
8556
|
+
case "claims.locale": return `언어 ${rule.value.join("·")}`;
|
|
8557
|
+
case "claims.address.country": return `국가 ${rule.value.join("·")}`;
|
|
8558
|
+
case "claims.birthdate": return describeBirthdateRule(rule);
|
|
8378
8559
|
}
|
|
8379
8560
|
const text = (v) => amountText(rule.field, v, formatMoney);
|
|
8380
8561
|
if (rule.operator === "between") {
|
|
@@ -8385,6 +8566,19 @@ function describeCouponRule(rule, formatMoney = (n) => `${number.format(n)}원`)
|
|
|
8385
8566
|
if (rule.field === "customer.paidOrderCount" && rule.operator === "=") return `${label} ${text(rule.value)}`;
|
|
8386
8567
|
return `${label} ${text(rule.value)}${suffix}`;
|
|
8387
8568
|
}
|
|
8569
|
+
function describeBirthdateRule(rule) {
|
|
8570
|
+
switch (rule.operator) {
|
|
8571
|
+
case "ageBetween": {
|
|
8572
|
+
const [from, to] = rule.value;
|
|
8573
|
+
return `만 ${from}~${to}세`;
|
|
8574
|
+
}
|
|
8575
|
+
case "age>=": return `만 ${rule.value}세 이상`;
|
|
8576
|
+
case "age<=": return `만 ${rule.value}세 이하`;
|
|
8577
|
+
case "birthMonthIn": return `생일 ${rule.value.join("·")}월`;
|
|
8578
|
+
case "birthMonthIsCurrent": return "생일 달";
|
|
8579
|
+
default: return "생일";
|
|
8580
|
+
}
|
|
8581
|
+
}
|
|
8388
8582
|
function describeCouponGroup(group, formatMoney) {
|
|
8389
8583
|
const joint = group.combinator === "and" ? " 그리고 " : " 또는 ";
|
|
8390
8584
|
return group.rules.map((node) => isConditionGroup(node) ? `(${describeCouponGroup(node, formatMoney)})` : describeCouponRule(node, formatMoney)).join(joint);
|
|
@@ -8477,6 +8671,117 @@ const couponBenefitSchema = z$1.object({
|
|
|
8477
8671
|
message: "정액 할인에는 최대 할인액을 두지 않습니다"
|
|
8478
8672
|
});
|
|
8479
8673
|
});
|
|
8674
|
+
/** 구간 할인의 구간 수 상한 */
|
|
8675
|
+
const COUPON_REWARD_TIER_MAX = 5;
|
|
8676
|
+
const rewardShortfallChargeSchema = z$1.boolean().describe("부분 취소로 할인액이 줄면 그 차액을 환불에서 뺀다. 상점 환불 정책 `couponShortfallCharge`가 꺼져 있거나 판매자 귀책이면 빼지 않는다");
|
|
8677
|
+
/**
|
|
8678
|
+
* 확장 혜택(이슈 #222 혜택 확장) — 있으면 계산의 원천이고 `benefit`은 가장 가까운 값이다.
|
|
8679
|
+
* - `TIERED`: 기준 금액(주문 쿠폰은 상품 쿠폰 차감 뒤 대상 합계, 상품 쿠폰은 그 줄 금액)이 넘은 가장 높은 구간의 할인. 첫 구간 미만이면 `MIN_ORDER_AMOUNT`
|
|
8680
|
+
* - `BUY_X_GET_Y`: 상품 쿠폰만. 걸린 줄 수량을 `buy + get`개 묶음으로 세어 묶음마다 `get`개를 `rate`% 할인
|
|
8681
|
+
* - `POINT`: 주문 쿠폰만. 할인 대신 대상 줄 실결제(쿠폰·적립금 뒤)에 `benefit`을 적용한 적립금을 구매확정 때 준다
|
|
8682
|
+
*/
|
|
8683
|
+
const couponRewardSchema = z$1.discriminatedUnion("type", [
|
|
8684
|
+
z$1.object({
|
|
8685
|
+
type: z$1.literal("TIERED"),
|
|
8686
|
+
tiers: z$1.array(z$1.object({
|
|
8687
|
+
minAmount: z$1.number().int().min(0).describe("이 구간의 기준 금액 하한(원)"),
|
|
8688
|
+
benefit: couponBenefitSchema
|
|
8689
|
+
})).min(2).max(5).describe("구간. 기준 금액 하한 오름차순"),
|
|
8690
|
+
shortfallCharge: rewardShortfallChargeSchema
|
|
8691
|
+
}),
|
|
8692
|
+
z$1.object({
|
|
8693
|
+
type: z$1.literal("BUY_X_GET_Y"),
|
|
8694
|
+
buy: z$1.number().int().min(1).max(99).describe("구매 수량(N+1의 N)"),
|
|
8695
|
+
get: z$1.number().int().min(1).max(99).describe("할인 수량(N+1의 1)"),
|
|
8696
|
+
rate: z$1.number().int().min(1).max(100).describe("할인 수량의 할인율(%). 100이면 무료"),
|
|
8697
|
+
shortfallCharge: rewardShortfallChargeSchema
|
|
8698
|
+
}),
|
|
8699
|
+
z$1.object({
|
|
8700
|
+
type: z$1.literal("POINT"),
|
|
8701
|
+
benefit: couponBenefitSchema.describe("적립 방식. `RATE`=대상 실결제의 %(최대 `maxDiscountAmount`), `AMOUNT`=고정 적립금")
|
|
8702
|
+
})
|
|
8703
|
+
]).superRefine((reward, ctx) => {
|
|
8704
|
+
if (reward.type !== "TIERED") return;
|
|
8705
|
+
reward.tiers.forEach((tier, index) => {
|
|
8706
|
+
const prev = reward.tiers[index - 1];
|
|
8707
|
+
if (prev && tier.minAmount <= prev.minAmount) ctx.addIssue({
|
|
8708
|
+
code: "custom",
|
|
8709
|
+
path: [
|
|
8710
|
+
"tiers",
|
|
8711
|
+
index,
|
|
8712
|
+
"minAmount"
|
|
8713
|
+
],
|
|
8714
|
+
message: "구간 하한은 앞 구간보다 커야 합니다"
|
|
8715
|
+
});
|
|
8716
|
+
});
|
|
8717
|
+
}).describe("확장 혜택(구간 할인·N+1·적립금 지급). 없으면 `benefit`이 혜택이다");
|
|
8718
|
+
/** 확장 혜택을 쓸 수 있는 쿠폰 종류 */
|
|
8719
|
+
const COUPON_REWARD_KINDS = {
|
|
8720
|
+
TIERED: ["ORDER", "PRODUCT"],
|
|
8721
|
+
BUY_X_GET_Y: ["PRODUCT"],
|
|
8722
|
+
POINT: ["ORDER"]
|
|
8723
|
+
};
|
|
8724
|
+
/** 응답·옛 칸의 `benefit` — 확장 혜택에서 가장 가까운 값(구간은 첫 구간, N+1은 묶음 평균 할인율, 적립금은 할인 0원에 가까운 1원) */
|
|
8725
|
+
function couponBenefitOfReward(reward) {
|
|
8726
|
+
if (reward.type === "TIERED") return reward.tiers[0].benefit;
|
|
8727
|
+
if (reward.type === "BUY_X_GET_Y") return {
|
|
8728
|
+
type: "RATE",
|
|
8729
|
+
value: Math.max(1, Math.floor(reward.rate * reward.get / (reward.buy + reward.get))),
|
|
8730
|
+
maxDiscountAmount: null
|
|
8731
|
+
};
|
|
8732
|
+
return {
|
|
8733
|
+
type: "AMOUNT",
|
|
8734
|
+
value: 1,
|
|
8735
|
+
maxDiscountAmount: null
|
|
8736
|
+
};
|
|
8737
|
+
}
|
|
8738
|
+
/** 구간 할인의 적용 구간 — 기준 금액이 넘은 가장 높은 구간. 없으면 null */
|
|
8739
|
+
function couponTierOf(reward, base) {
|
|
8740
|
+
for (let index = reward.tiers.length - 1; index >= 0; index--) {
|
|
8741
|
+
const tier = reward.tiers[index];
|
|
8742
|
+
if (tier && base >= tier.minAmount) return {
|
|
8743
|
+
index,
|
|
8744
|
+
benefit: tier.benefit
|
|
8745
|
+
};
|
|
8746
|
+
}
|
|
8747
|
+
return null;
|
|
8748
|
+
}
|
|
8749
|
+
/**
|
|
8750
|
+
* 쿠폰 한 장의 할인액 — 확장 혜택까지 보는 원천이다(`quotePricing`·최대 조합이 같이 쓴다).
|
|
8751
|
+
* `line`은 상품 쿠폰이 걸린 줄의 금액·수량이고 N+1만 수량을 읽는다. 적립금 지급은 할인이 0이다.
|
|
8752
|
+
*/
|
|
8753
|
+
function couponRuleDiscountOf(rule, base, line, rules = KRW_MONEY_RULES) {
|
|
8754
|
+
const reward = rule.reward;
|
|
8755
|
+
if (!reward) return couponDiscountOf(rule.benefit, base, rules);
|
|
8756
|
+
if (reward.type === "POINT") return 0;
|
|
8757
|
+
if (reward.type === "TIERED") {
|
|
8758
|
+
const tier = couponTierOf(reward, base);
|
|
8759
|
+
return tier ? couponDiscountOf(tier.benefit, base, rules) : 0;
|
|
8760
|
+
}
|
|
8761
|
+
const quantity = line?.quantity ?? 0;
|
|
8762
|
+
if (base <= 0 || quantity <= 0) return 0;
|
|
8763
|
+
const units = Math.floor(quantity / (reward.buy + reward.get)) * reward.get;
|
|
8764
|
+
const unitsAmount = Math.floor(base * units / quantity);
|
|
8765
|
+
if (reward.rate === 100) return unitsAmount;
|
|
8766
|
+
return couponDiscountOf({
|
|
8767
|
+
type: "RATE",
|
|
8768
|
+
value: reward.rate,
|
|
8769
|
+
maxDiscountAmount: null
|
|
8770
|
+
}, unitsAmount, rules);
|
|
8771
|
+
}
|
|
8772
|
+
/**
|
|
8773
|
+
* 적립금 지급 쿠폰의 적립금 — 대상 줄 실결제(쿠폰·적립금 뒤)에 혜택을 적용하고 줄에 실결제 비율로 나눈다.
|
|
8774
|
+
* 결제 시작(`quotePricing`)과 구매확정 지급이 같은 함수다(구매확정은 주문상품의 실결제를 넣는다).
|
|
8775
|
+
*/
|
|
8776
|
+
function couponPointRewardOf(reward, paidByLine, rules = KRW_MONEY_RULES) {
|
|
8777
|
+
const weights = paidByLine.map((paid) => Math.max(0, paid));
|
|
8778
|
+
const base = weights.reduce((sum, w) => sum + w, 0);
|
|
8779
|
+
const total = couponDiscountOf(reward.benefit, base, rules);
|
|
8780
|
+
return {
|
|
8781
|
+
total,
|
|
8782
|
+
shares: total > 0 ? allocateByWeight(total, weights) : weights.map(() => 0)
|
|
8783
|
+
};
|
|
8784
|
+
}
|
|
8480
8785
|
/** 쿠폰 사용 조건 */
|
|
8481
8786
|
const couponConditionsSchema = z$1.object({
|
|
8482
8787
|
minOrderAmount: z$1.number().int().min(0).describe(descriptions$1.minOrderAmount),
|
|
@@ -8521,7 +8826,8 @@ const couponRuleSchema = z$1.object({
|
|
|
8521
8826
|
endsAt: z$1.iso.datetime({ offset: true }).nullable().describe("사용 종료 시각(ISO 8601, 시간대 포함, 이 시각부터 못 쓴다). null이면 제한이 없다"),
|
|
8522
8827
|
eligibility: conditionGroupSchema.optional().describe("사용 조건 트리(이슈 #222). 없으면 `conditions`에서 만든다. 있으면 이것이 원천이고 `conditions`는 가장 가까운 옛 값이다"),
|
|
8523
8828
|
targetRules: couponTargetRulesSchema.optional().describe("할인 대상 규칙(이슈 #222). 없으면 `target`·`conditions.stackWithInstantDiscount`에서 만든다"),
|
|
8524
|
-
stacking: couponStackingSchema.optional().describe("중복 사용 정책(이슈 #222). 없으면 종류별 한 장·서로 결합·적립금과 함께")
|
|
8829
|
+
stacking: couponStackingSchema.optional().describe("중복 사용 정책(이슈 #222). 없으면 종류별 한 장·서로 결합·적립금과 함께"),
|
|
8830
|
+
reward: couponRewardSchema.optional()
|
|
8525
8831
|
});
|
|
8526
8832
|
/** 규칙의 트리 — 트리 칸이 없으면 옛 칸에서 만든다(계산은 늘 이 한 경로) */
|
|
8527
8833
|
function couponTreesOf(rule) {
|
|
@@ -8658,7 +8964,9 @@ function quotePricing(input) {
|
|
|
8658
8964
|
rejectReason: null,
|
|
8659
8965
|
lineId: null,
|
|
8660
8966
|
eligibleLineIds: [],
|
|
8661
|
-
facts: {}
|
|
8967
|
+
facts: {},
|
|
8968
|
+
rewardPoint: 0,
|
|
8969
|
+
tierIndex: null
|
|
8662
8970
|
}));
|
|
8663
8971
|
const subtotal = lines.reduce((sum, entry) => sum + entry.line.amount, 0);
|
|
8664
8972
|
const inputTime = input.facts?.time ?? couponTimeFactsAt(input.now);
|
|
@@ -8713,9 +9021,11 @@ function quotePricing(input) {
|
|
|
8713
9021
|
/** 적용된 쿠폰 — 같은 쿠폰 정의의 장수(`perOrderLimit`)와 결합 판정에 쓴다 */
|
|
8714
9022
|
const appliedCount = /* @__PURE__ */ new Map();
|
|
8715
9023
|
const applied = [];
|
|
8716
|
-
const apply = (index, discount, lineId) => {
|
|
9024
|
+
const apply = (index, discount, lineId, base = 0) => {
|
|
8717
9025
|
const result = results[index];
|
|
8718
9026
|
const coupon = input.coupons[index];
|
|
9027
|
+
const reward = coupon.rule.reward;
|
|
9028
|
+
if (reward?.type === "TIERED") result.tierIndex = couponTierOf(reward, base)?.index ?? null;
|
|
8719
9029
|
result.applied = true;
|
|
8720
9030
|
result.discount = discount;
|
|
8721
9031
|
result.lineId = lineId;
|
|
@@ -8738,6 +9048,13 @@ function quotePricing(input) {
|
|
|
8738
9048
|
if (blocked) results[index].rejectReason = "NOT_COMBINABLE";
|
|
8739
9049
|
return blocked;
|
|
8740
9050
|
};
|
|
9051
|
+
/** 상품 쿠폰을 줄 하나에 걸었을 때의 할인 — N+1은 그 줄 수량을 센다 */
|
|
9052
|
+
const productDiscountOn = (coupon, lineId) => {
|
|
9053
|
+
const line = lineOf(lineId)?.line;
|
|
9054
|
+
return couponRuleDiscountOf(coupon.rule, line?.amount ?? 0, line ?? null, rules);
|
|
9055
|
+
};
|
|
9056
|
+
/** 할인이 0일 때의 사유 — 구간 할인이 첫 구간에 못 미치면 최소 금액 미달이다 */
|
|
9057
|
+
const zeroReasonOf = (coupon, base) => coupon.rule.reward?.type === "TIERED" && couponTierOf(coupon.rule.reward, base) === null ? "MIN_ORDER_AMOUNT" : "NO_DISCOUNT";
|
|
8741
9058
|
const productIndexes = passed.filter((index) => input.coupons[index]?.rule.kind === "PRODUCT");
|
|
8742
9059
|
const productOrder = [...productIndexes.filter((index) => input.coupons[index]?.lineId), ...productIndexes.filter((index) => !input.coupons[index]?.lineId).map((index) => ({
|
|
8743
9060
|
index,
|
|
@@ -8758,14 +9075,14 @@ function quotePricing(input) {
|
|
|
8758
9075
|
continue;
|
|
8759
9076
|
}
|
|
8760
9077
|
chosen = coupon.lineId;
|
|
8761
|
-
best =
|
|
9078
|
+
best = productDiscountOn(coupon, chosen);
|
|
8762
9079
|
} else {
|
|
8763
9080
|
if (candidates.length === 0) {
|
|
8764
9081
|
result.rejectReason = "STACK_LIMIT";
|
|
8765
9082
|
continue;
|
|
8766
9083
|
}
|
|
8767
9084
|
for (const id of candidates) {
|
|
8768
|
-
const discount =
|
|
9085
|
+
const discount = productDiscountOn(coupon, id);
|
|
8769
9086
|
if (chosen === null || discount > best) {
|
|
8770
9087
|
chosen = id;
|
|
8771
9088
|
best = discount;
|
|
@@ -8774,7 +9091,7 @@ function quotePricing(input) {
|
|
|
8774
9091
|
}
|
|
8775
9092
|
const entry = chosen === null ? void 0 : lineOf(chosen);
|
|
8776
9093
|
if (!entry || chosen === null || best <= 0) {
|
|
8777
|
-
result.rejectReason =
|
|
9094
|
+
result.rejectReason = zeroReasonOf(coupon, entry?.line.amount ?? 0);
|
|
8778
9095
|
continue;
|
|
8779
9096
|
}
|
|
8780
9097
|
takenLines.add(chosen);
|
|
@@ -8783,7 +9100,7 @@ function quotePricing(input) {
|
|
|
8783
9100
|
couponKey: result.couponKey,
|
|
8784
9101
|
amount: best
|
|
8785
9102
|
});
|
|
8786
|
-
apply(index, best, chosen);
|
|
9103
|
+
apply(index, best, chosen, entry.line.amount);
|
|
8787
9104
|
}
|
|
8788
9105
|
let orderSlot = false;
|
|
8789
9106
|
for (const index of passed) {
|
|
@@ -8799,9 +9116,18 @@ function quotePricing(input) {
|
|
|
8799
9116
|
const targets = result.eligibleLineIds.map((id) => lineOf(id)).filter((entry) => entry !== void 0);
|
|
8800
9117
|
const weights = targets.map((entry) => Math.max(0, entry.line.amount - entry.productDiscount));
|
|
8801
9118
|
const base = weights.reduce((sum, w) => sum + w, 0);
|
|
8802
|
-
|
|
9119
|
+
if (coupon.rule.reward?.type === "POINT") {
|
|
9120
|
+
if (base <= 0) {
|
|
9121
|
+
result.rejectReason = "NO_DISCOUNT";
|
|
9122
|
+
continue;
|
|
9123
|
+
}
|
|
9124
|
+
orderSlot = true;
|
|
9125
|
+
apply(index, 0, null);
|
|
9126
|
+
continue;
|
|
9127
|
+
}
|
|
9128
|
+
const discount = couponRuleDiscountOf(coupon.rule, base, null, rules);
|
|
8803
9129
|
if (discount <= 0) {
|
|
8804
|
-
result.rejectReason =
|
|
9130
|
+
result.rejectReason = zeroReasonOf(coupon, base);
|
|
8805
9131
|
continue;
|
|
8806
9132
|
}
|
|
8807
9133
|
const shares = allocateByWeight(discount, weights);
|
|
@@ -8813,7 +9139,7 @@ function quotePricing(input) {
|
|
|
8813
9139
|
});
|
|
8814
9140
|
});
|
|
8815
9141
|
orderSlot = true;
|
|
8816
|
-
apply(index, discount, null);
|
|
9142
|
+
apply(index, discount, null, base);
|
|
8817
9143
|
}
|
|
8818
9144
|
const deliveryBundles = input.delivery?.bundles ?? [];
|
|
8819
9145
|
const bundles = deliveryBundles.map((bundle) => ({
|
|
@@ -8835,7 +9161,7 @@ function quotePricing(input) {
|
|
|
8835
9161
|
if (notCombinable(index)) continue;
|
|
8836
9162
|
const weights = deliveryBundles.map((bundle) => Math.max(0, bundle.fee));
|
|
8837
9163
|
const base = weights.reduce((sum, w) => sum + w, 0);
|
|
8838
|
-
const discount =
|
|
9164
|
+
const discount = couponRuleDiscountOf(coupon.rule, base, null, rules);
|
|
8839
9165
|
if (discount <= 0) {
|
|
8840
9166
|
result.rejectReason = "NO_DISCOUNT";
|
|
8841
9167
|
continue;
|
|
@@ -8884,10 +9210,22 @@ function quotePricing(input) {
|
|
|
8884
9210
|
if (bundle) bundle.pointAllocation = share;
|
|
8885
9211
|
});
|
|
8886
9212
|
}
|
|
9213
|
+
let rewardPointAmount = 0;
|
|
9214
|
+
input.coupons.forEach((coupon, index) => {
|
|
9215
|
+
const result = results[index];
|
|
9216
|
+
const reward = coupon.rule.reward;
|
|
9217
|
+
if (!result.applied || reward?.type !== "POINT") return;
|
|
9218
|
+
result.rewardPoint = couponPointRewardOf(reward, result.eligibleLineIds.map((id) => {
|
|
9219
|
+
const line = lineResults[lineIndex.get(id) ?? -1];
|
|
9220
|
+
return line ? line.amount - line.couponDiscount - line.pointAllocation : 0;
|
|
9221
|
+
}), rules).total;
|
|
9222
|
+
rewardPointAmount += result.rewardPoint;
|
|
9223
|
+
});
|
|
8887
9224
|
return {
|
|
8888
9225
|
lines: lineResults,
|
|
8889
9226
|
coupons: results,
|
|
8890
9227
|
bundles,
|
|
9228
|
+
rewardPointAmount,
|
|
8891
9229
|
productAmount,
|
|
8892
9230
|
couponDiscountAmount,
|
|
8893
9231
|
deliveryFee,
|
|
@@ -8977,36 +9315,21 @@ const NO_COUPON_SETTLEMENT = {
|
|
|
8977
9315
|
entries: []
|
|
8978
9316
|
};
|
|
8979
9317
|
/**
|
|
8980
|
-
*
|
|
8981
|
-
*
|
|
8982
|
-
*
|
|
8983
|
-
* 쿠폰마다
|
|
8984
|
-
* - `allocatedRemaining` = 남은 수량에 배분된 할인(`proratedRefundBase`로 수량 비율)
|
|
8985
|
-
* - `recomputed` = 주문 시점 규칙 스냅샷과 주문 시점 대상 줄로, 남은 금액만 넣어 `quotePricing`을 다시 돌린 할인
|
|
8986
|
-
* - 쿠폰이 **여전히 적용되면 목표 0**, 조건을 잃었으면 목표 = `allocatedRemaining`이다. 적용되는 쿠폰의
|
|
8987
|
-
* 정률 10원 내림 차이까지 차감하면 조건을 지킨 구매자가 몇 원씩 잃는다 — 조건을 잃은 경우만 본다.
|
|
8988
|
-
* 재계산 할인이 더 커지는 경우(정률 최대 할인액)도 차감하지 않고 더 돌려주지도 않는다.
|
|
8989
|
-
* - `delta` = 목표 − (이미 차감 + 이미 면제). 양수면 청구하고(판매자 귀책·정책 꺼짐이면 면제로 기록),
|
|
8990
|
-
* 음수면 앞서 뺀 차감부터 돌려준다. 마지막 활성 수량까지 취소되면 목표가 0이라 누적 차감이 모두 되돌아가고,
|
|
8991
|
-
* 전량 취소의 환불 합계가 결제액과 같아진다.
|
|
8992
|
-
* - 청구는 이번 환불에서 실제로 뺄 수 있는 금액(`chargeableAmount` + 이번에 되돌린 금액)을 넘지 않고,
|
|
8993
|
-
* **실제로 뺀 금액만** 기록한다. 못 뺀 나머지는 기록하지 않아 다음 환불이 다시 본다.
|
|
8994
|
-
*
|
|
8995
|
-
* 배송비 쿠폰은 여기서 다루지 않는다. 배송비 쿠폰을 발급하게 되면(3단계) 묶음 배송비 환불
|
|
8996
|
-
* (`computeDeliveryFeeSettlement`)이 그 묶음의 `couponDiscount`를 빼야 한다 — 빼지 않으면 받지 않은 배송비를 돌려준다.
|
|
9318
|
+
* 주문이 받은 쿠폰을 수량 `quantityOf(줄)`로 다시 계산한다 — 환불 정산(`settleCouponShortfall`)과 적립금 지급 쿠폰의 구매확정 적립이 같이 쓴다.
|
|
9319
|
+
* 기간·회원 전용은 결제 시작에서 이미 통과했다. 사용 조건 트리는 주문 시점 사실 값 + 남은 금액으로 다시 보고,
|
|
9320
|
+
* 스냅샷에 없는 구매자·시각 값(옛 주문)은 통과한 것으로 둔다 — 주문서 집계(`cart.*`)만 남은 금액으로 다시 판정한다
|
|
8997
9321
|
*/
|
|
8998
|
-
function
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
const remaining = proratedRefundBase(line.totalPrice, line.quantity, 0, line.activeQuantity);
|
|
9322
|
+
function recomputeOrderCoupons(coupons, lines, quantityOf = (line) => line.activeQuantity) {
|
|
9323
|
+
return quotePricing({
|
|
9324
|
+
lines: lines.map((line) => {
|
|
9325
|
+
const quantity = quantityOf(line);
|
|
9326
|
+
const amount = proratedRefundBase(line.totalPrice, line.quantity, 0, quantity);
|
|
9004
9327
|
return {
|
|
9005
9328
|
lineId: line.lineId,
|
|
9006
9329
|
productId: line.productId,
|
|
9007
|
-
quantity
|
|
9008
|
-
baseAmount:
|
|
9009
|
-
amount
|
|
9330
|
+
quantity,
|
|
9331
|
+
baseAmount: amount,
|
|
9332
|
+
amount
|
|
9010
9333
|
};
|
|
9011
9334
|
}),
|
|
9012
9335
|
coupons: coupons.map((coupon) => {
|
|
@@ -9028,19 +9351,53 @@ function settleCouponShortfall(input) {
|
|
|
9028
9351
|
now: /* @__PURE__ */ new Date(0),
|
|
9029
9352
|
ignoreEligibility: true
|
|
9030
9353
|
});
|
|
9354
|
+
}
|
|
9355
|
+
/**
|
|
9356
|
+
* 쿠폰 조건 미달 차감 — **순수 함수다.** 부분 취소·반품으로 남은 주문상품이 쿠폰 조건을 잃으면,
|
|
9357
|
+
* 남은 주문상품이 받던 할인만큼을 이번 환불에서 뺀다.
|
|
9358
|
+
*
|
|
9359
|
+
* 쿠폰마다
|
|
9360
|
+
* - `allocatedRemaining` = 남은 수량에 배분된 할인(`proratedRefundBase`로 수량 비율)
|
|
9361
|
+
* - `recomputed` = 주문 시점 규칙 스냅샷과 주문 시점 대상 줄로, 남은 금액만 넣어 `quotePricing`을 다시 돌린 할인
|
|
9362
|
+
* - 쿠폰이 **여전히 적용되면 목표 0**, 조건을 잃었으면 목표 = `allocatedRemaining`이다. 적용되는 쿠폰의
|
|
9363
|
+
* 정률 10원 내림 차이까지 차감하면 조건을 지킨 구매자가 몇 원씩 잃는다 — 조건을 잃은 경우만 본다.
|
|
9364
|
+
* 재계산 할인이 더 커지는 경우(정률 최대 할인액)도 차감하지 않고 더 돌려주지도 않는다.
|
|
9365
|
+
* - 확장 혜택(구간 할인·N+1)에서 셀러가 차액 정산(`reward.shortfallCharge`)을 켰으면 적용이 유지돼도 목표가
|
|
9366
|
+
* `allocatedRemaining − recomputed`다. 구간 할인은 구간이 내려갔을 때만 보고 0 아래로 내리지 않는다. N+1만 음수 목표를 허용한다
|
|
9367
|
+
* (남은 수량의 할인 개수가 배분보다 많으면 그만큼 더 돌려주고 누적 차감이 음수로 남는다). 뒤의 환불이 그 몫을 되찾을 때는 판매자 귀책·정책 꺼짐이어도 면제하지 않는다.
|
|
9368
|
+
* - `delta` = 목표 − (이미 차감 + 이미 면제). 양수면 청구하고(판매자 귀책·정책 꺼짐이면 면제로 기록),
|
|
9369
|
+
* 음수면 앞서 뺀 차감부터 돌려준다. 마지막 활성 수량까지 취소되면 목표가 0이라 누적 차감이 모두 되돌아가고,
|
|
9370
|
+
* 전량 취소의 환불 합계가 결제액과 같아진다.
|
|
9371
|
+
* - 청구는 이번 환불에서 실제로 뺄 수 있는 금액(`chargeableAmount` + 이번에 되돌린 금액)을 넘지 않고,
|
|
9372
|
+
* **실제로 뺀 금액만** 기록한다. 못 뺀 나머지는 기록하지 않아 다음 환불이 다시 본다.
|
|
9373
|
+
*
|
|
9374
|
+
* 배송비 쿠폰은 여기서 다루지 않는다. 배송비 쿠폰을 발급하게 되면(3단계) 묶음 배송비 환불
|
|
9375
|
+
* (`computeDeliveryFeeSettlement`)이 그 묶음의 `couponDiscount`를 빼야 한다 — 빼지 않으면 받지 않은 배송비를 돌려준다.
|
|
9376
|
+
*/
|
|
9377
|
+
function settleCouponShortfall(input) {
|
|
9378
|
+
const coupons = input.coupons.filter((coupon) => coupon.rule.kind !== "DELIVERY");
|
|
9379
|
+
if (coupons.length === 0) return NO_COUPON_SETTLEMENT;
|
|
9380
|
+
const recompute = (quantityOf) => recomputeOrderCoupons(coupons, input.lines, quantityOf);
|
|
9381
|
+
const recomputed = recompute((line) => line.activeQuantity);
|
|
9382
|
+
const original = coupons.some((coupon) => coupon.rule.reward?.type === "TIERED") ? recompute((line) => line.quantity) : null;
|
|
9031
9383
|
const base = coupons.map((coupon, index) => {
|
|
9032
9384
|
const allocatedRemaining = input.lines.reduce((sum, line) => {
|
|
9033
9385
|
return sum + proratedRefundBase(line.allocations.filter((a) => a.couponKey === coupon.couponKey).reduce((acc, a) => acc + a.amount, 0), line.quantity, 0, line.activeQuantity);
|
|
9034
9386
|
}, 0);
|
|
9035
9387
|
const result = recomputed.coupons[index];
|
|
9036
9388
|
const stillApplied = result?.applied === true;
|
|
9389
|
+
const recomputedDiscount = stillApplied ? result?.discount ?? 0 : 0;
|
|
9037
9390
|
const state = input.settlements[coupon.couponKey] ?? {};
|
|
9391
|
+
const reward = coupon.rule.reward;
|
|
9392
|
+
const tiered = reward?.type === "TIERED" && reward.shortfallCharge && (result?.tierIndex ?? -1) < (original?.coupons[index]?.tierIndex ?? -1);
|
|
9393
|
+
const signed = reward?.type === "BUY_X_GET_Y" && reward.shortfallCharge;
|
|
9038
9394
|
return {
|
|
9039
9395
|
couponKey: coupon.couponKey,
|
|
9040
9396
|
allocatedRemaining,
|
|
9041
|
-
recomputed:
|
|
9042
|
-
target: stillApplied ?
|
|
9043
|
-
|
|
9397
|
+
recomputed: recomputedDiscount,
|
|
9398
|
+
target: !stillApplied ? allocatedRemaining : signed ? allocatedRemaining - recomputedDiscount : tiered ? Math.max(0, allocatedRemaining - recomputedDiscount) : 0,
|
|
9399
|
+
signed,
|
|
9400
|
+
charged: signed ? state.charged ?? 0 : Math.max(0, state.charged ?? 0),
|
|
9044
9401
|
waived: Math.max(0, state.waived ?? 0)
|
|
9045
9402
|
};
|
|
9046
9403
|
});
|
|
@@ -9051,8 +9408,11 @@ function settleCouponShortfall(input) {
|
|
|
9051
9408
|
let refund = 0;
|
|
9052
9409
|
let waived = item.waived;
|
|
9053
9410
|
if (delta < 0) {
|
|
9054
|
-
refund = Math.min(item.charged, -delta);
|
|
9055
|
-
|
|
9411
|
+
refund = Math.min(Math.max(0, item.charged), -delta);
|
|
9412
|
+
const rest = -delta - refund;
|
|
9413
|
+
const unwaived = Math.min(waived, rest);
|
|
9414
|
+
waived -= unwaived;
|
|
9415
|
+
if (item.signed) refund += rest - unwaived;
|
|
9056
9416
|
}
|
|
9057
9417
|
refundAmount += refund;
|
|
9058
9418
|
entries.push({
|
|
@@ -9073,8 +9433,23 @@ function settleCouponShortfall(input) {
|
|
|
9073
9433
|
let chargeAmount = 0;
|
|
9074
9434
|
const chargeAllowed = input.shortfallCharge && !input.sellerFault;
|
|
9075
9435
|
for (const entry of entries) {
|
|
9076
|
-
|
|
9436
|
+
let delta = entry.target - (entry.next.charged + entry.next.waived);
|
|
9077
9437
|
if (delta <= 0) continue;
|
|
9438
|
+
const owed = Math.max(0, -entry.next.charged);
|
|
9439
|
+
if (owed > 0) {
|
|
9440
|
+
const reclaim = Math.min(delta, owed, capacity);
|
|
9441
|
+
if (reclaim > 0) {
|
|
9442
|
+
capacity -= reclaim;
|
|
9443
|
+
chargeAmount += reclaim;
|
|
9444
|
+
entry.charge += reclaim;
|
|
9445
|
+
entry.next = {
|
|
9446
|
+
...entry.next,
|
|
9447
|
+
charged: entry.next.charged + reclaim
|
|
9448
|
+
};
|
|
9449
|
+
}
|
|
9450
|
+
delta -= Math.min(delta, owed);
|
|
9451
|
+
if (delta <= 0) continue;
|
|
9452
|
+
}
|
|
9078
9453
|
if (!chargeAllowed) {
|
|
9079
9454
|
entry.waive = delta;
|
|
9080
9455
|
entry.next = {
|
|
@@ -9087,7 +9462,7 @@ function settleCouponShortfall(input) {
|
|
|
9087
9462
|
if (charge <= 0) continue;
|
|
9088
9463
|
capacity -= charge;
|
|
9089
9464
|
chargeAmount += charge;
|
|
9090
|
-
entry.charge
|
|
9465
|
+
entry.charge += charge;
|
|
9091
9466
|
entry.next = {
|
|
9092
9467
|
...entry.next,
|
|
9093
9468
|
charged: entry.next.charged + charge
|
|
@@ -9133,15 +9508,26 @@ const couponStatusSchema = z$1.enum([
|
|
|
9133
9508
|
"ENDED"
|
|
9134
9509
|
]).describe("쿠폰 상태. `ACTIVE`=사용 중, `PAUSED`=중지(재개 가능), `ENDED`=종료(되돌릴 수 없음)");
|
|
9135
9510
|
/**
|
|
9136
|
-
* 발급 방식 — 코드 입력·셀러 지급·다운로드(구매자가 받기)·회원가입 자동 지급(이슈 #110).
|
|
9511
|
+
* 발급 방식 — 코드 입력·셀러 지급·다운로드(구매자가 받기)·회원가입 자동 지급(이슈 #110)·흐름 지급(이슈 #264).
|
|
9137
9512
|
* 응답(`couponSchema.issueMethod`)은 값이 늘 수 있어 문자열로 받는다. 이 enum은 요청 검증용이다.
|
|
9138
9513
|
*/
|
|
9139
9514
|
const couponIssueMethodSchema = z$1.enum([
|
|
9140
9515
|
"CODE",
|
|
9141
9516
|
"MANUAL",
|
|
9142
9517
|
"DOWNLOAD",
|
|
9143
|
-
"SIGNUP"
|
|
9144
|
-
|
|
9518
|
+
"SIGNUP",
|
|
9519
|
+
"FLOW",
|
|
9520
|
+
"VOUCHER"
|
|
9521
|
+
]).describe("발급 방식. `CODE`=구매자가 주문서에 코드를 입력한다, `MANUAL`=셀러가 회원을 골라 지급한다, `DOWNLOAD`=구매자가 스토어프론트에서 받는다, `SIGNUP`=회원가입 때 자동으로 지급한다, `FLOW`=주문 흐름의 쿠폰 지급 단계가 그 주문의 구매자에게 지급한다, `VOUCHER`=셀러가 1회용 쿠폰 번호를 만들어 나눠 주고 구매자가 번호를 등록하면 지급한다");
|
|
9522
|
+
/** 쿠폰 번호 접두어 — 영문·숫자 2~10자, 대문자로 저장한다. 상점 안에서 유일하다 */
|
|
9523
|
+
const VOUCHER_PREFIX_PATTERN = /^[A-Za-z0-9]{2,10}$/;
|
|
9524
|
+
/** 쿠폰 번호 한 쿠폰의 최대 개수 */
|
|
9525
|
+
const VOUCHER_COUNT_MAX = 1e5;
|
|
9526
|
+
/** 쿠폰 번호 설정(`VOUCHER`, 이슈 #264) — 만든 뒤에는 바꿀 수 없다 */
|
|
9527
|
+
const couponVoucherInputSchema = z$1.strictObject({
|
|
9528
|
+
prefix: z$1.string().regex(VOUCHER_PREFIX_PATTERN).describe("번호 앞부분(영문·숫자 2~10자)"),
|
|
9529
|
+
count: z$1.number().int().min(1).max(VOUCHER_COUNT_MAX).describe("만들 번호 수(1~100,000)")
|
|
9530
|
+
}).describe("쿠폰 번호 설정 — 1회용 번호 `count`개를 만든다. 번호는 `GET /v1/coupons/{couponId}/voucher-codes`로 받는다");
|
|
9145
9531
|
/** 코드 형식 — 영문·숫자·`-`·`_` 6~30자. 대소문자를 구분하지 않고 서버가 대문자로 저장한다 */
|
|
9146
9532
|
const COUPON_CODE_PATTERN = /^[A-Za-z0-9_-]{6,30}$/;
|
|
9147
9533
|
/** 코드 정규화 — 대문자, 앞뒤 공백 제거. 입력·저장·조회가 같은 함수를 쓴다 */
|
|
@@ -9165,6 +9551,7 @@ const descriptions = {
|
|
|
9165
9551
|
targetRules: "할인 대상 규칙(이슈 #222) — `include`(하나라도 맞으면 대상, 비면 전 상품)·`exclude`(하나라도 맞으면 제외, 포함보다 우선). 주면 `target`과 `conditions.stackWithInstantDiscount`를 쓰지 않는다(즉시할인 제외는 `line.hasInstantDiscount` 규칙)",
|
|
9166
9552
|
audience: "발급 대상 트리(이슈 #222) — 셀러 지급·받기·회원가입 지급에서 누가 받을 수 있는가. 구매자 조건만. 코드 입력형에는 두지 않는다",
|
|
9167
9553
|
stacking: "중복 사용 정책(이슈 #222). 생략하면 종류별 한 장·서로 결합·적립금과 함께. 결합은 양쪽 쿠폰이 모두 허용해야 성립한다",
|
|
9554
|
+
reward: "확장 혜택(구간 할인 `TIERED`·N+1 `BUY_X_GET_Y`·적립금 지급 `POINT`). 주면 `benefit`을 생략하고, 응답의 `benefit`은 가장 가까운 값이다. N+1은 상품 쿠폰만, 적립금 지급은 회원 전용 주문 쿠폰만이다. 수정에서 null이면 확장 혜택을 지운다(`benefit`이 필요하다)",
|
|
9168
9555
|
issueStartsAt: "받기 시작 시각(받기 쿠폰만, 이슈 #222). 생략하면 사용 시작 시각을 따른다",
|
|
9169
9556
|
issueEndsAt: "받기 종료 시각(받기 쿠폰만, 이 시각부터 못 받는다). 생략하면 사용 종료 시각을 따른다",
|
|
9170
9557
|
visibleFrom: "쿠폰 목록 노출 시작(받기 쿠폰만). 이 시각부터 받기 시작 전까지 목록에 보이고 받기는 「시작 전」이다. 생략하면 받기 시작부터 보인다"
|
|
@@ -9174,7 +9561,8 @@ const ruleFields = {
|
|
|
9174
9561
|
eligibility: couponConditionTreeSchema.optional().describe(descriptions.eligibility),
|
|
9175
9562
|
targetRules: couponTargetRulesSchema.optional().describe(descriptions.targetRules),
|
|
9176
9563
|
audience: couponConditionTreeSchema.optional().describe(descriptions.audience),
|
|
9177
|
-
stacking: couponStackingSchema.optional().describe(descriptions.stacking)
|
|
9564
|
+
stacking: couponStackingSchema.optional().describe(descriptions.stacking),
|
|
9565
|
+
reward: couponRewardSchema.nullable().optional().describe(descriptions.reward)
|
|
9178
9566
|
};
|
|
9179
9567
|
/**
|
|
9180
9568
|
* 트리와 옛 칸을 한 번에 검사한다 — 트리를 주면 그 트리, 아니면 옛 칸에서 만든 트리로 같은 규칙을 본다(검증 원천 `couponRuleIssues`).
|
|
@@ -9208,6 +9596,18 @@ function couponRequestRuleIssues(body) {
|
|
|
9208
9596
|
targetRules: body.targetRules ?? legacy.targetRules,
|
|
9209
9597
|
...body.audience ? { audience: body.audience } : {}
|
|
9210
9598
|
}));
|
|
9599
|
+
if (!body.reward && body.benefit === void 0) issues.push({
|
|
9600
|
+
path: ["benefit"],
|
|
9601
|
+
message: "혜택(benefit 또는 reward)이 필요합니다"
|
|
9602
|
+
});
|
|
9603
|
+
if (body.reward && body.kind !== void 0 && !COUPON_REWARD_KINDS[body.reward.type].includes(body.kind)) issues.push({
|
|
9604
|
+
path: ["reward", "type"],
|
|
9605
|
+
message: body.reward.type === "POINT" ? "적립금 지급은 주문 쿠폰만 쓸 수 있습니다" : body.reward.type === "BUY_X_GET_Y" ? "N+1은 상품 쿠폰만 쓸 수 있습니다" : "구간 할인은 배송비 쿠폰에 쓸 수 없습니다"
|
|
9606
|
+
});
|
|
9607
|
+
if (body.reward?.type === "POINT" && !conditions.memberOnly) issues.push({
|
|
9608
|
+
path: ["reward", "type"],
|
|
9609
|
+
message: "적립금 지급은 회원 전용 쿠폰만 쓸 수 있습니다"
|
|
9610
|
+
});
|
|
9211
9611
|
if (body.stacking && body.stacking.perOrderLimit > 1 && body.kind !== "PRODUCT") issues.push({
|
|
9212
9612
|
path: ["stacking", "perOrderLimit"],
|
|
9213
9613
|
message: "한 주문에 두 장 이상은 상품 쿠폰만 쓸 수 있습니다"
|
|
@@ -9254,11 +9654,12 @@ const createCouponRequestSchema = strictRequest(z$1.strictObject({
|
|
|
9254
9654
|
name: z$1.string().trim().min(1).max(60).describe(descriptions.name),
|
|
9255
9655
|
description: z$1.string().max(300).nullable().optional().describe(descriptions.description),
|
|
9256
9656
|
kind: couponKindSchema,
|
|
9257
|
-
benefit: couponBenefitSchema,
|
|
9657
|
+
benefit: couponBenefitSchema.optional().describe("혜택. `reward`를 주면 생략한다"),
|
|
9258
9658
|
conditions: couponConditionsInputSchema.optional().describe("사용 조건. 생략한 항목은 기본값(최소 금액 0, 회원 전용, 즉시할인과 중복 가능)"),
|
|
9259
9659
|
target: couponTargetInputSchema.optional().describe("대상 상품·카테고리. 생략하면 전 상품"),
|
|
9260
9660
|
issueMethod: couponIssueMethodSchema,
|
|
9261
9661
|
code: z$1.string().regex(COUPON_CODE_PATTERN).optional().describe(descriptions.code),
|
|
9662
|
+
voucher: couponVoucherInputSchema.optional(),
|
|
9262
9663
|
startsAt: couponTimeField(descriptions.startsAt),
|
|
9263
9664
|
endsAt: couponTimeField(descriptions.endsAt),
|
|
9264
9665
|
validDaysAfterIssue: z$1.number().int().min(1).max(3650).nullable().optional().describe(descriptions.validDaysAfterIssue),
|
|
@@ -9279,6 +9680,9 @@ const createCouponRequestSchema = strictRequest(z$1.strictObject({
|
|
|
9279
9680
|
message
|
|
9280
9681
|
});
|
|
9281
9682
|
if (body.issueMethod === "CODE" && !body.code) issue("code", "코드 입력형 쿠폰은 코드가 필요합니다");
|
|
9683
|
+
if (body.reward && body.benefit) issue("benefit", "확장 혜택(reward)을 주면 benefit을 생략합니다");
|
|
9684
|
+
if (body.issueMethod === "VOUCHER" && !body.voucher) issue("voucher", "쿠폰 번호 쿠폰은 번호 설정이 필요합니다");
|
|
9685
|
+
if (body.issueMethod !== "VOUCHER" && body.voucher) issue("voucher", "번호 설정은 쿠폰 번호 쿠폰에만 둡니다");
|
|
9282
9686
|
if (body.issueMethod !== "CODE" && body.code) issue("code", "코드는 코드 입력형 쿠폰에만 둡니다");
|
|
9283
9687
|
if (body.issueMethod === "CODE" && body.validDaysAfterIssue != null) issue("validDaysAfterIssue", "발급 후 유효 일수는 셀러 지급 쿠폰에만 둡니다");
|
|
9284
9688
|
if (body.issueMethod === "CODE" && body.perMemberIssueLimit != null) issue("perMemberIssueLimit", "1인 발급 수 한도는 발급형 쿠폰에만 둡니다");
|
|
@@ -9325,7 +9729,7 @@ const couponSchema = z$1.object({
|
|
|
9325
9729
|
benefit: couponBenefitSchema,
|
|
9326
9730
|
conditions: couponConditionsSchema,
|
|
9327
9731
|
target: couponTargetSchema,
|
|
9328
|
-
issueMethod: z$1.string().describe("발급 방식. 현재 값은 `CODE`·`MANUAL`·`DOWNLOAD`(구매자가 받기)·`SIGNUP`(회원가입 자동 지급)이고 값이 추가될 수 있어 문자열로 받는다"),
|
|
9732
|
+
issueMethod: z$1.string().describe("발급 방식. 현재 값은 `CODE`·`MANUAL`·`DOWNLOAD`(구매자가 받기)·`SIGNUP`(회원가입 자동 지급)·`FLOW`(주문 흐름 지급)·`VOUCHER`(쿠폰 번호)이고 값이 추가될 수 있어 문자열로 받는다"),
|
|
9329
9733
|
code: z$1.string().nullable().describe("쿠폰 코드(대문자). 코드 입력형이 아니면 null"),
|
|
9330
9734
|
startsAt: z$1.string().nullable(),
|
|
9331
9735
|
endsAt: z$1.string().nullable(),
|
|
@@ -9335,6 +9739,10 @@ const couponSchema = z$1.object({
|
|
|
9335
9739
|
totalUseLimit: z$1.number().int().nullable(),
|
|
9336
9740
|
perMemberIssueLimit: z$1.number().int().nullable(),
|
|
9337
9741
|
perMemberUseLimit: z$1.number().int().nullable(),
|
|
9742
|
+
voucher: z$1.object({
|
|
9743
|
+
prefix: z$1.string(),
|
|
9744
|
+
count: z$1.number().int()
|
|
9745
|
+
}).nullable().optional().default(null).describe("쿠폰 번호 설정(`VOUCHER`만, 이슈 #264). 다른 발급 방식은 null. 서버는 항상 싣는다"),
|
|
9338
9746
|
issuedCount: z$1.number().int().describe("발급 수 — 회수한 발급도 센다. 총 발급 한도(`totalIssueLimit`)가 이 값과 비교된다"),
|
|
9339
9747
|
reservedCount: z$1.number().int().describe("결제 중인 예약 수 — 결제가 끝나거나 만료되면 풀린다"),
|
|
9340
9748
|
usedCount: z$1.number().int().describe("사용 수 — 전량 취소로 복원되면 줄어든다"),
|
|
@@ -9343,6 +9751,7 @@ const couponSchema = z$1.object({
|
|
|
9343
9751
|
targetRules: couponTargetRulesSchema.optional().describe("할인 대상 규칙(이슈 #222). 옛 쿠폰은 `target`에서 만든 규칙이다. 서버는 항상 싣는다"),
|
|
9344
9752
|
audience: couponConditionTreeSchema.optional().describe("발급 대상 트리(이슈 #222). 없으면 빈 트리(모두 대상). 서버는 항상 싣는다"),
|
|
9345
9753
|
stacking: couponStackingSchema.optional().default(COUPON_STACKING_DEFAULTS).describe("중복 사용 정책(이슈 #222). 서버는 항상 싣는다"),
|
|
9754
|
+
reward: couponRewardSchema.nullable().optional().default(null).describe("확장 혜택. 없으면 null이고 `benefit`이 혜택이다. 서버는 항상 싣는다"),
|
|
9346
9755
|
rulesOnly: z$1.boolean().optional().default(false).describe("트리로만 표현되는 규칙이 있는가(이슈 #222). true면 `conditions`·`target`은 가장 가까운 옛 값이고 원천은 트리다"),
|
|
9347
9756
|
issueStartsAt: z$1.string().nullable().optional().default(null).describe(descriptions.issueStartsAt),
|
|
9348
9757
|
issueEndsAt: z$1.string().nullable().optional().default(null).describe(descriptions.issueEndsAt),
|
|
@@ -9368,7 +9777,7 @@ const couponIssueSchema = z$1.object({
|
|
|
9368
9777
|
couponId: z$1.string(),
|
|
9369
9778
|
customerId: z$1.string(),
|
|
9370
9779
|
customerName: z$1.string().nullable().describe("구매자 이름. 탈퇴한 구매자는 null"),
|
|
9371
|
-
source: z$1.string().optional().describe("발급 경로(이슈 #110). 현재 값은 `MANUAL`(셀러 지급)·`DOWNLOAD`(구매자가 받음)·`SIGNUP`(회원가입 자동 지급)이고 값이 추가될 수 있다. 서버는 항상 싣는다"),
|
|
9780
|
+
source: z$1.string().optional().describe("발급 경로(이슈 #110). 현재 값은 `MANUAL`(셀러 지급)·`DOWNLOAD`(구매자가 받음)·`SIGNUP`(회원가입 자동 지급)·`FLOW`(주문 흐름 지급)·`VOUCHER`(쿠폰 번호 등록)이고 값이 추가될 수 있다. 서버는 항상 싣는다"),
|
|
9372
9781
|
status: couponIssueStatusSchema,
|
|
9373
9782
|
validFrom: z$1.string(),
|
|
9374
9783
|
validUntil: z$1.string().nullable(),
|
|
@@ -9385,6 +9794,28 @@ const couponIssueListQuerySchema = z$1.object({
|
|
|
9385
9794
|
]).optional(),
|
|
9386
9795
|
...pageQueryShape()
|
|
9387
9796
|
});
|
|
9797
|
+
/** `GET /v1/coupons/{couponId}/voucher-codes` — 쿠폰 번호 전체(순번 순). 상점 플랫폼이 CSV로 내려받는다 */
|
|
9798
|
+
const couponVoucherCodesSchema = z$1.object({
|
|
9799
|
+
prefix: z$1.string(),
|
|
9800
|
+
count: z$1.number().int(),
|
|
9801
|
+
codes: z$1.array(z$1.string()).describe("번호 — 순번 1부터. 등록에 쓴 번호도 싣는다")
|
|
9802
|
+
}).describe("쿠폰 번호 목록");
|
|
9803
|
+
/**
|
|
9804
|
+
* 발급 대상 전원 지급(이슈 #264) — `POST /v1/coupons/{couponId}/distributions`(202)가 만들고 서버가 뒤에서 처리한다. 셀러 지급(`MANUAL`) 쿠폰을
|
|
9805
|
+
* 발급 대상 조건에 맞는 회원 모두에게 준다(셀러 지급과 같은 한도 판정). 쿠폰마다 진행 중 작업은 하나다
|
|
9806
|
+
*/
|
|
9807
|
+
const couponDistributionSchema = z$1.object({
|
|
9808
|
+
distributionId: z$1.string(),
|
|
9809
|
+
couponId: z$1.string(),
|
|
9810
|
+
status: z$1.string().describe("작업 상태. 현재 값은 `QUEUED`(대기)·`RUNNING`(지급 중)·`COMPLETED`(끝남)·`FAILED`(실패)이고 값이 추가될 수 있다"),
|
|
9811
|
+
processedCount: z$1.number().int().describe("지금까지 살펴본 회원 수"),
|
|
9812
|
+
issuedCount: z$1.number().int().describe("이 작업이 지급한 장수"),
|
|
9813
|
+
skippedCount: z$1.number().int().describe("건너뛴 회원 수 — 발급 대상이 아니거나 1인 발급 한도에 닿은 회원"),
|
|
9814
|
+
stopCode: z$1.string().nullable().describe("일찍 끝난 사유. `COUPON_EXHAUSTED`(총 발급 한도)·`COUPON_DAILY_EXHAUSTED`(하루 발급 한도)·`COUPON_NOT_ACTIVE`(중지·종료)·`COUPON_EXPIRED`(사용 기간 끝) 등. 끝까지 돌았으면 null"),
|
|
9815
|
+
createdAt: z$1.string(),
|
|
9816
|
+
startedAt: z$1.string().nullable(),
|
|
9817
|
+
finishedAt: z$1.string().nullable()
|
|
9818
|
+
}).describe("발급 대상 전원 지급 작업");
|
|
9388
9819
|
/** `POST /v1/coupons/{couponId}/issues` — 셀러 지급. 한 번에 1,000명까지 */
|
|
9389
9820
|
const issueCouponRequestSchema = z$1.strictObject({ customerIds: z$1.array(z$1.string().min(1)).min(1).max(1e3).refine((ids) => new Set(ids).size === ids.length, "같은 구매자를 두 번 넣었습니다").describe("지급할 구매자 id(1~1,000명, 중복 불가)") });
|
|
9390
9821
|
const issueCouponResultSchema = z$1.object({
|
|
@@ -9439,6 +9870,88 @@ const customerCouponSchema = couponIssueSchema.extend({
|
|
|
9439
9870
|
benefit: couponBenefitSchema
|
|
9440
9871
|
});
|
|
9441
9872
|
//#endregion
|
|
9873
|
+
//#region src/schemas/userinfo.ts
|
|
9874
|
+
/**
|
|
9875
|
+
* 구매자 정보의 OIDC userinfo 표준 클레임(OpenID Connect Core 1.0 5.1, 이슈 #264). 이름은 표준 그대로 snake_case다.
|
|
9876
|
+
* 값이 없는 클레임은 응답에서 빠진다. 같은 형식이 스토어프론트 API(storefront-sdk `userinfoSchema`)에도 있다.
|
|
9877
|
+
*/
|
|
9878
|
+
/** 생일 — `YYYY-MM-DD`, 연도를 모르면 `0000-MM-DD`(표준 형식) */
|
|
9879
|
+
const CUSTOMER_BIRTHDATE_PATTERN = /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;
|
|
9880
|
+
const customerUserinfoAddressSchema = z$1.object({
|
|
9881
|
+
formatted: z$1.string().optional(),
|
|
9882
|
+
street_address: z$1.string().optional(),
|
|
9883
|
+
locality: z$1.string().optional(),
|
|
9884
|
+
region: z$1.string().optional(),
|
|
9885
|
+
postal_code: z$1.string().optional(),
|
|
9886
|
+
country: z$1.string().optional().describe("ISO 3166-1 alpha-2")
|
|
9887
|
+
});
|
|
9888
|
+
const customerUserinfoSchema = z$1.object({
|
|
9889
|
+
sub: z$1.string().describe("구매자 id(상점 안에서 유일)"),
|
|
9890
|
+
name: z$1.string().optional(),
|
|
9891
|
+
given_name: z$1.string().optional(),
|
|
9892
|
+
family_name: z$1.string().optional(),
|
|
9893
|
+
middle_name: z$1.string().optional(),
|
|
9894
|
+
nickname: z$1.string().optional(),
|
|
9895
|
+
preferred_username: z$1.string().optional(),
|
|
9896
|
+
profile: z$1.string().optional(),
|
|
9897
|
+
picture: z$1.string().optional(),
|
|
9898
|
+
website: z$1.string().optional(),
|
|
9899
|
+
email: z$1.string().optional(),
|
|
9900
|
+
email_verified: z$1.boolean().optional().describe("이메일 확인 여부 — 인증된 소셜 가입·셀러 위임만 true다. 비밀번호 가입은 false"),
|
|
9901
|
+
gender: z$1.string().optional().describe("표준 값은 `female`·`male`이고 다른 값도 온다"),
|
|
9902
|
+
birthdate: z$1.string().optional().describe("`YYYY-MM-DD`, 연도를 모르면 `0000-MM-DD`"),
|
|
9903
|
+
zoneinfo: z$1.string().optional().describe("IANA 시간대(예: `Asia/Seoul`)"),
|
|
9904
|
+
locale: z$1.string().optional().describe("BCP 47 언어 태그(예: `ko-KR`)"),
|
|
9905
|
+
phone_number: z$1.string().optional().describe("E.164(예: `+821012345678`)"),
|
|
9906
|
+
phone_number_verified: z$1.boolean().optional(),
|
|
9907
|
+
address: customerUserinfoAddressSchema.optional().describe("기본 배송지에서 만든다"),
|
|
9908
|
+
updated_at: z$1.number().int().optional().describe("프로필을 바꾼 시각(epoch 초)")
|
|
9909
|
+
}).describe("OIDC userinfo 표준 클레임(이슈 #264)");
|
|
9910
|
+
const text = (max) => z$1.string().trim().min(1).max(max).nullable().optional();
|
|
9911
|
+
const httpsUrl = z$1.url({ protocol: /^https$/ }).max(2048).nullable().optional().describe("https 주소");
|
|
9912
|
+
/** 시간대·언어 태그 검사 — 런타임(Intl)이 아는 값만 받는다 */
|
|
9913
|
+
const zoneinfo = z$1.string().max(64).refine((value) => {
|
|
9914
|
+
try {
|
|
9915
|
+
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
9916
|
+
return true;
|
|
9917
|
+
} catch {
|
|
9918
|
+
return false;
|
|
9919
|
+
}
|
|
9920
|
+
}, "IANA 시간대가 아닙니다").nullable().optional();
|
|
9921
|
+
const locale = z$1.string().max(35).refine((value) => {
|
|
9922
|
+
try {
|
|
9923
|
+
return Intl.getCanonicalLocales(value).length === 1;
|
|
9924
|
+
} catch {
|
|
9925
|
+
return false;
|
|
9926
|
+
}
|
|
9927
|
+
}, "BCP 47 언어 태그가 아닙니다").nullable().optional();
|
|
9928
|
+
const birthdate = z$1.string().regex(CUSTOMER_BIRTHDATE_PATTERN, "생일은 YYYY-MM-DD(연도를 모르면 0000-MM-DD)입니다").refine((value) => {
|
|
9929
|
+
const [y, m, d] = value.split("-").map(Number);
|
|
9930
|
+
const day = new Date(Date.UTC(y === 0 ? 2e3 : y, m - 1, d));
|
|
9931
|
+
return day.getUTCMonth() === m - 1 && day.getUTCDate() === d;
|
|
9932
|
+
}, "없는 날짜입니다").nullable().optional();
|
|
9933
|
+
/**
|
|
9934
|
+
* 셀러가 위임으로 바꿀 수 있는 클레임 — 준 클레임만 바뀌고 null은 지운다. `sub`·`email`·`phone_number`·`updated_at`·`address`는 받지 않는다. 확인 여부(`*_verified`)는 셀러가 확인한 값을 받는다
|
|
9935
|
+
* (이메일·휴대폰은 각자의 칸, 주소는 배송지가 원천이다)
|
|
9936
|
+
*/
|
|
9937
|
+
const customerUserinfoInputSchema = z$1.strictObject({
|
|
9938
|
+
/** 셀러가 확인한 값 그대로 받는다 — 셀러 서비스가 인증한 회원이다 */
|
|
9939
|
+
email_verified: z$1.boolean().optional(),
|
|
9940
|
+
phone_number_verified: z$1.boolean().optional(),
|
|
9941
|
+
given_name: text(50),
|
|
9942
|
+
family_name: text(50),
|
|
9943
|
+
middle_name: text(50),
|
|
9944
|
+
nickname: text(50),
|
|
9945
|
+
preferred_username: text(50),
|
|
9946
|
+
profile: httpsUrl,
|
|
9947
|
+
picture: httpsUrl,
|
|
9948
|
+
website: httpsUrl,
|
|
9949
|
+
gender: text(30),
|
|
9950
|
+
birthdate,
|
|
9951
|
+
zoneinfo,
|
|
9952
|
+
locale
|
|
9953
|
+
}).describe("바꿀 OIDC 클레임 — 준 것만 바뀌고 null은 지운다");
|
|
9954
|
+
//#endregion
|
|
9442
9955
|
//#region src/schemas/customer.ts
|
|
9443
9956
|
/** 구매자 목록 정렬 */
|
|
9444
9957
|
const customerSortSchema = z$1.enum([
|
|
@@ -9566,6 +10079,7 @@ const customerDetailSchema = z$1.object({
|
|
|
9566
10079
|
})).describe("로그인 방법 — 이메일·비밀번호(`password`)와 연결된 소셜 계정"),
|
|
9567
10080
|
consents: customerConsentsSchema.describe("약관·개인정보·마케팅 동의의 현재 상태. 이력은 `GET /v1/customers/{customerId}/consents`"),
|
|
9568
10081
|
addresses: z$1.array(customerAddressSchema),
|
|
10082
|
+
userinfo: customerUserinfoSchema.optional().describe("OIDC userinfo 표준 클레임(이슈 #264, 주소는 기본 배송지). 서버는 항상 싣는다"),
|
|
9569
10083
|
stats: customerStatsSchema.extend({
|
|
9570
10084
|
canceledOrReturnedCount: z$1.number().int().describe("취소된 주문 상품 + 완료된 반품 수"),
|
|
9571
10085
|
reviewCount: z$1.number().int(),
|
|
@@ -11782,6 +12296,13 @@ listHistory: (params) => storeHttp.request("GET", "/points/history", pageSchema(
|
|
|
11782
12296
|
body: issueCouponRequestSchema.parse(body),
|
|
11783
12297
|
headers: idempotency(idempotencyKey)
|
|
11784
12298
|
}),
|
|
12299
|
+
/** 쿠폰 번호 전체(`VOUCHER`, #264) — 순번 순 */
|
|
12300
|
+
voucherCodes: (couponId) => storeHttp.request("GET", path`/coupons/${couponId}/voucher-codes`, couponVoucherCodesSchema),
|
|
12301
|
+
/** 발급 대상 전원 지급(#264) — 202로 작업을 만든다. 진행은 `distributions`·`distribution`으로 본다 */
|
|
12302
|
+
distribute: (couponId) => storeHttp.request("POST", path`/coupons/${couponId}/distributions`, couponDistributionSchema),
|
|
12303
|
+
/** 전원 지급 작업 목록(최근 20건, 최신순) */
|
|
12304
|
+
distributions: (couponId) => storeHttp.request("GET", path`/coupons/${couponId}/distributions`, z$1.array(couponDistributionSchema)),
|
|
12305
|
+
distribution: (couponId, distributionId) => storeHttp.request("GET", path`/coupons/${couponId}/distributions/${distributionId}`, couponDistributionSchema),
|
|
11785
12306
|
issues: (couponId, params) => storeHttp.request("GET", path`/coupons/${couponId}/issues`, pageSchema(couponIssueSchema), { query: params }),
|
|
11786
12307
|
redemptions: (couponId, params) => storeHttp.request("GET", path`/coupons/${couponId}/redemptions`, pageSchema(couponRedemptionSchema), { query: params }),
|
|
11787
12308
|
stats: (couponId) => storeHttp.request("GET", path`/coupons/${couponId}/stats`, couponStatsSchema),
|
|
@@ -12515,11 +13036,11 @@ function bestCouponSelection(input) {
|
|
|
12515
13036
|
const orders = solo.filter((e) => e.candidate.coupon.rule.kind === "ORDER");
|
|
12516
13037
|
const deliveries = solo.filter((e) => e.candidate.coupon.rule.kind === "DELIVERY");
|
|
12517
13038
|
const lineIds = input.lines.map((line) => line.lineId);
|
|
12518
|
-
const
|
|
13039
|
+
const lineById = new Map(input.lines.map((line) => [line.lineId, line]));
|
|
12519
13040
|
/** 상품 쿠폰 한 장의 줄별 할인 — 대상 줄만, 줄 금액 기준 */
|
|
12520
13041
|
const weightsOf = (entry) => {
|
|
12521
13042
|
const eligible = new Set(entry.result?.eligibleLineIds ?? []);
|
|
12522
|
-
return lineIds.map((id) => eligible.has(id) ?
|
|
13043
|
+
return lineIds.map((id) => eligible.has(id) ? couponRuleDiscountOf(entry.candidate.coupon.rule, lineById.get(id)?.amount ?? 0, lineById.get(id) ?? null, rules) : 0);
|
|
12523
13044
|
};
|
|
12524
13045
|
/** 같은 쿠폰 정의는 `perOrderLimit` 장까지만 후보로 둔다(사본끼리는 규칙이 같아 앞 장이면 된다) */
|
|
12525
13046
|
const withinLimit = (entries) => {
|
|
@@ -12621,7 +13142,8 @@ const customerDelegationRequestSchema = strictRequest(z$1.object({
|
|
|
12621
13142
|
uid: z$1.string().regex(/^[A-Za-z0-9._:@|-]{1,128}$/).optional().describe("셀러 자체 인증의 사용자 id(1~128자, 영문·숫자·`._:@|-`). 처음 보는 id면 구매자를 만든다"),
|
|
12622
13143
|
email: z$1.email().max(254).optional().describe("uid가 없으면 이메일로 지목한다. uid와 함께 주면 처음 만들 때의 이메일이다"),
|
|
12623
13144
|
name: z$1.string().max(50).optional().describe("처음 만들 때의 이름"),
|
|
12624
|
-
authenticatedAt: z$1.iso.datetime({ offset: true }).optional().describe("사용자가 셀러 서비스에서 실제로 로그인한 시각(uid 위임만). 주면 구매자 토큰의 인증 시각이 된다")
|
|
13145
|
+
authenticatedAt: z$1.iso.datetime({ offset: true }).optional().describe("사용자가 셀러 서비스에서 실제로 로그인한 시각(uid 위임만). 주면 구매자 토큰의 인증 시각이 된다"),
|
|
13146
|
+
userinfo: customerUserinfoInputSchema.optional().describe("OIDC 클레임(이슈 #264) — 위임할 때마다 준 클레임만 바뀌고 null은 지운다. `email_verified`를 생략하면 위임으로 만든 구매자의 이메일은 확인된 것으로 본다")
|
|
12625
13147
|
}).refine((value) => Boolean(value.uid || value.email), {
|
|
12626
13148
|
message: "uid 또는 email이 필요합니다",
|
|
12627
13149
|
path: ["uid"]
|
|
@@ -12851,4 +13373,4 @@ function createStoreSession(options) {
|
|
|
12851
13373
|
};
|
|
12852
13374
|
}
|
|
12853
13375
|
//#endregion
|
|
12854
|
-
export { AI_AGENT_NOTES_DIR, AI_AGENT_PHASES, AI_DESIGN_BOARDS_MAX, AI_DESIGN_BOARD_FILE_PATTERN, AI_DESIGN_BOARD_KINDS, AI_DESIGN_CANVAS_PATH, AI_DESIGN_CONFIRM_APPROVE, AI_DESIGN_DIR, AI_DESIGN_GUIDE_PATH, AI_DESIGN_VIEWPORTS, AI_MESSAGE_MAX_ATTACHMENTS, AI_MESSAGE_MAX_CHARS, AI_RUN_ACTIVE_STATUSES, AI_RUN_FILE_CHANGES_RETENTION_DAYS, AI_RUN_RESUME_CHOICE, AI_SETUP_CONFIRM_APPROVE, AI_SITEMAP_PATH, AI_TODOS_MAX, AI_TODO_STATUSES, AI_TOOL_CHANGE_LINE_MAX, AI_TOOL_CHANGE_RANGES_MAX, APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, APP_CAPABILITIES, APP_DEPLOY_KEY_PATTERN, APP_DEPLOY_KEY_PREFIX, APP_EVENTS_MAX, APP_EVENT_SCOPES, APP_EVENT_TYPES, APP_FLOW_EVENT_PATTERN, APP_FLOW_ITEMS_MAX, APP_FLOW_NOTIFICATION_PATTERN, APP_HANDLE_PATTERN, APP_HTTP_KEY_PATTERN, APP_ICON_CONTENT_TYPES, APP_ICON_MAX_BYTES, APP_ICON_MIN_PX, APP_LIFECYCLE_EVENT_TYPES, APP_NETWORK_DENIED_SUFFIXES, APP_NETWORK_HOSTS_MAX, APP_PUBLIC_HTTP_MAX, APP_README_MAX_BYTES, APP_RESERVED_HANDLES, APP_SCHEDULES_MAX, APP_SCHEDULE_INTERVALS, APP_SCHEDULE_NAME_PATTERN, APP_SECRETS_MAX, APP_SECRET_NAME_PATTERN, APP_SECRET_PATTERNS, APP_SERVER_BUNDLE_MAX_GZIP_BYTES, APP_SETTINGS_MAX_FIELDS, APP_SETTING_FIELD_TYPES, APP_SETTING_KEY_PATTERN, APP_STORAGE_KEY_PATTERN, APP_STORAGE_MAX_BYTES, APP_STORAGE_MAX_KEYS, APP_TOOL_NAME_PATTERN, APP_UI_MAX_BYTES, APP_UI_MAX_FILES, ApiError, ApprovalPendingError, BASE_CURRENCY, BRAND_BRIEF_MAX_REFERENCES, BUSINESS_INFO_MAX_LENGTH, BUSINESS_NUMBER_PATTERN, CASH_RECEIPT_STATUS_VALUES, CERTIFICATION_STATUSES, COLLECTION_BEST_SELLING_DAYS, COLLECTION_PREVIEW_SIZE, COLLECTION_PRODUCT_SORTS, COLLECTION_SALES_SORT_DEFAULT_DAYS, COLLECTION_SLUG_PATTERN, COLLECTION_TYPES, CONDITION_OPERATORS_BY_TYPE, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_CONDITION_FIELDS, COUPON_LINE_CONDITIONS, COUPON_ORDER_CONDITIONS, COUPON_STACKING_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, COUPON_TARGET_RULES_ALL, COUPON_TIME_ZONE, COUPON_WEEKDAYS, CURRENCIES, CURRENCY_CODES, CUSTOM_INPUT_FORBIDDEN_WORDS, CUSTOM_INPUT_TYPES, DEDICATED_EASY_PAY_PROVIDER, DEFAULT_CONDITION_LIMITS, DEFAULT_STORE_LOCALE, EMPTY_CONDITION_GROUP, FULFILLMENT_METHODS, FULFILLMENT_METHODS_BY_TYPE, FULFILLMENT_METHOD_RULES, FULFILLMENT_RULES, INSTALLABLE_SCOPES, InvalidPriceUnitError, KAKAOPAY_TEST_CID, KNOWN_WEBHOOK_EVENT_TYPES, KRW_MONEY_RULES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_CALENDAR_DAYS, MAX_CERTIFICATION_ITEMS, MAX_COLLECTIONS, MAX_COLLECTION_BEST_SELLING_TOP, MAX_COLLECTION_CREATED_WITHIN_DAYS, MAX_COLLECTION_DESCRIPTION, MAX_COLLECTION_PRODUCTS, MAX_COLLECTION_PRODUCTS_PER_ADD, MAX_COLLECTION_RULES, MAX_COLLECTION_RULE_CATEGORIES, MAX_COLLECTION_TITLE, MAX_CUSTOM_INPUTS, MAX_CUSTOM_INPUT_LENGTH, MAX_INFO_SECTION_TITLE, MAX_INVENTORY_OPERATION_LINES, MAX_NOTICE_VALUE_LENGTH, MAX_OPTION_GROUPS, MAX_PICKUP_LOCATIONS, MAX_PRODUCT_IMAGES, MAX_PRODUCT_IMPORT_ITEMS, MAX_PRODUCT_IMPORT_ITEMS_PER_REQUEST, MAX_PRODUCT_INFO_SECTIONS, MAX_PRODUCT_LOOKUP, MAX_SAVED_OPTION_SETS, MAX_SAVED_OPTION_SET_NAME, MAX_STAY_NIGHTS, MAX_VALUES_PER_GROUP, MAX_VARIANTS, MCP_TELEMETRY_MAX_RESULTS, MIN_PAYMENT_AMOUNT, NON_INSTALLABLE_SCOPES, NO_COUPON_SETTLEMENT, NO_SHIPPING_BUNDLE_KEY, PAYMENT_ROUTING_EXCLUSION_CODES, PAYPAL_CURRENCIES, PLATFORM_CODE_SETS, POINT_ADJUSTMENT_MAX, POINT_EARN_RATE_BP_MAX, POINT_ENTRY_TYPES, POINT_EXPIRY_DAYS_MAX, POINT_EXPIRY_DAYS_MIN, POINT_LOT_SOURCES, POINT_POLICY_DEFAULTS, POINT_REVIEW_REWARD_MAX, POINT_USE_UNITS, 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, SAYREN_API_BASE_URL, SAYREN_API_ORIGIN, SCOPE_DESCRIPTIONS, SHIPPING_POLICY_DEFAULTS, STARTER_SELLER_TASKS, STARTER_STAGES, STOREFRONT_BLOCKED_PATH_SEGMENTS, STOREFRONT_BUILD_STAGES, STOREFRONT_BUILD_TERMINAL_STATUSES, STOREFRONT_CHECK_TERMINAL_STATUSES, STOREFRONT_CLOSED_SITE_HOLD_DAYS, 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_DRAFT_ATTACHMENT_MAX_BYTES, STORE_DRAFT_MAX_ATTACHMENTS, STORE_DRAFT_RETENTION_DAYS, STORE_ROLE_SCOPES, STORE_SCOPE_RESOURCES, STORE_SESSION_KEYS, STORE_SHOP_TYPES, TEMPLATE_STORE_LOCKED_BUSINESS_FIELDS, 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, additionalCurrencyPriceSchema, additionalCurrencyPricesSchema, addonGroupRequestSchema, addonGroupSchema, addonValueRequestSchema, addonValueSchema, addressChangeRequestListSchema, addressTypeSchema, agentPolicyDecisionSchema, aiActivitySchema, aiAgentPhaseSchema, aiAttachmentSchema, aiChoiceOptionSchema, aiConversationFileChangesSchema, aiConversationSchema, aiConversationSummarySchema, aiDesignBoardSchema, aiDesignCanvasSchema, aiDesignConfirmBoardSchema, aiDesignSelectionSchema, aiFileChangeKindSchema, aiFocusAreaSchema, aiFocusSchema, aiMessagePartSchema, aiMessageSchema, aiPreviewSelectionSchema, aiRunChangesSchema, aiRunChangesStatusSchema, aiRunFileDiffSchema, aiRunRevertConflictDetailsSchema, aiRunRevertResultSchema, aiRunSchema, aiRunStatusSchema, aiSetupConfirmItemSchema, aiStreamAccessSchema, aiStreamEventSchema, aiStreamRecordSchema, aiTodoSchema, aiToolChangeSchema, allocateByWeight, analyticsChannelSchema, analyticsCheckoutOutcomeSchema, analyticsCheckoutSchema, analyticsDeviceRowSchema, analyticsDevicesSchema, analyticsFunnelStepSchema, analyticsOriginSchema, analyticsOverviewSchema, analyticsPagesQuerySchema, analyticsPagesSchema, analyticsProductRowSchema, analyticsProductSortSchema, analyticsProductsQuerySchema, analyticsProductsSchema, analyticsRangeQuerySchema, analyticsRealtimeSchema, analyticsSearchQuerySchema, analyticsSearchSchema, analyticsSourceGroupBySchema, analyticsSourceRowSchema, analyticsSourcesQuerySchema, analyticsSourcesSchema, analyticsTotalsSchema, anyConditionHolds, apiLogErrorSchema, apiLogListQuerySchema, apiLogPageSchema, apiLogPrincipalSchema, apiLogPrincipalTypeSchema, apiLogSchema, apiLogStatusFilterSchema, apiLogSummarySchema, appArtifactUploadSchema, appBuildSchema, appBuildStageSchema, appCapabilitiesOf, appDeployKeyCreateSchema, appDeployKeyCreatedSchema, appDeployKeySchema, appDevTokenSchema, appDistributionSchema, appEventTypeSchema, appFlowEventSchema, appFlowEventSummarySchema, appFlowNotificationSchema, appFlowNotificationSummarySchema, appFlowParamSchema, appFlowSummaryOf, appHandleSchema, appHttpKeyMatches, appIconProblem, appInstallRequestSchema, appInstallationActivitySchema, appInstallationAppSchema, appInstallationRunSchema, appInstallationSchema, appInstallationSelfSchema, appInstallationSettingsSchema, appInstallationSettingsUpdateSchema, appInstallationStatusSchema, appInvocationSchema, appListingReviewSchema, appListingReviewStatusSchema, appListingSchema, appManifestProblems, appManifestSchema, appManifestWidens, appNetworkHostProblem, appNetworkHostSchema, appReleaseResultSchema, appRuntimeSchema, appScheduleIntervalLabel, appScheduleListOf, appScheduleSummarySchema, appScopeSchema, appSecretSummarySchema, appSessionSchema, appSettingFieldSchema, appStatusSchema, appStorageEntrySchema, appStorageKeysSchema, appStorageListQuerySchema, appStoragePutSchema, appToolCallSchema, appToolInputSchema, appToolListOf, appToolResultSchema, appToolSchema, appToolSummarySchema, appVersionSchema, appVersionStatusSchema, appVisibilitySchema, applyFlowOperationsRequestSchema, approvalDecisionRequestSchema, approvalListQuerySchema, approvalPageSchema, approvalRequestSchema, approvalStatusSchema, approveClaimResultSchema, assertSaleUnit, assumeCouponFactRules, auditActorSchema, auditActorTypeSchema, auditLogListQuerySchema, auditLogOutcomeSchema, auditLogPageSchema, auditLogSchema, auditLogSourceSchema, bestCouponSelection, bestSellingRuleOf, brandBriefProductSourceSchema, brandBriefReferenceSchema, brandBriefSchema, brandBriefViewSchema, buildAuthorizeUrl, buildQuery, bulkResultSchema, businessInfoPatchShape, businessInfoResponseShape, businessNumberSchema, calendarDateSchema, calendarDaySchema, calendarQuerySchema, cancelBySellerRequestSchema, cancelBySellerResultSchema, canonicalizeConditionGroup, canonicalizeConditionRule, canonicalizeCouponStacking, canonicalizeCouponTargetRules, canonicalizeCouponTrees, carrierSchema, cashReceiptSchema, categoryAttributeSchema, categoryCreateRequestSchema, categoryDeleteQuerySchema, categoryDeleteStrategySchema, categoryListQuerySchema, categoryLocalizationRequestSchema, categoryLocalizationSchema, categoryPatchRequestSchema, categoryProductSortSchema, categorySchema, categorySearchResultSchema, categoryTreeNodeSchema, categoryWithPathSchema, changeStorefrontSlugRequestSchema, changeStorefrontTemplateRequestSchema, changeTypeSchema, claimCollectCompleteRequestSchema, claimDetailSchema, claimFlowEditSessionRequestSchema, claimHoldResultSchema, claimListQuerySchema, claimReasonSchema, claimRedeliveryRequestSchema, claimReturnAddressSchema, claimSchema, claimStatusSchema, claimTypeSchema, claimWebhookEventDataSchema, claimWebhookEventSchema, collectionCreateRequestSchema, collectionListQuerySchema, collectionLocalizationRequestSchema, collectionLocalizationSchema, collectionPageSchema, collectionPatchRequestSchema, collectionPreviewRequestSchema, collectionPreviewSchema, collectionProductListQuerySchema, collectionProductSchema, collectionProductSortRequestSchema, collectionProductsAddRequestSchema, collectionProductsReplaceRequestSchema, collectionRuleCategoryIds, collectionRuleSchema, collectionRuleViewSchema, collectionRulesPredicate, collectionRulesSchema, collectionSchema, collectionStateCountsSchema, collectionStateOf, collectionStateSchema, commerceFlowCheckSchema, commerceFlowSchema, commerceFlowSummarySchema, commerceFlowVersionViewSchema, commerceNumberField, compareBySales, conditionCatalog, conditionFields, conditionGroupSchema, conditionIssues, conditionRuleSchema, conditionValueSchema, connectStorefrontGitRequestSchema, consentActionSchema, consentKindSchema, consentSourceSchema, couponAudienceMatches, couponBenefitSchema, couponConditionTreeSchema, couponConditionsInputSchema, couponConditionsSchema, couponCustomerFactNames, couponDiscountOf, couponFactsSchema, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponLineContextOf, couponLineMatches, couponListQuerySchema, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRequestRuleIssues, couponRequirementsOf, couponRuleIssues, couponRuleSchema, couponRulesFromLegacy, couponSchema, couponStackingOf, couponStackingSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetRulesSchema, couponTargetSchema, couponTimeFactsAt, couponTreesOf, couponsCombinable, createAiConversationRequestSchema, createAiConversationResponseSchema, createCommerceFlowRequestSchema, createCouponRequestSchema, createMarketRequestSchema, createOrderRequestSchema, createPkcePair, createSellerCheckoutRequestSchema, createStoreClient, createStoreDraftRequestSchema, createStoreDraftResponseSchema, createStoreSession, createStorefrontEditPreviewLinkRequestSchema, createStorefrontPreviewLinkRequestSchema, createStorefrontSiteRequestSchema, createStorefrontVersionRequestSchema, createdOrderSchema, currencyCodeSchema, currencyRefundFeesSchema, currencyShippingPolicySchema, currencySpecOf, customInputLabelForbiddenWord, customInputRequestSchema, customInputSchema, customInputValueSchema, customerAddressSchema, customerConsentListQuerySchema, customerConsentSchema, customerConsentStateSchema, customerConsentsSchema, customerCouponSchema, customerDelegationRequestSchema, customerDelegationSchema, customerDetailSchema, customerInquiryCategorySchema, customerInquiryListQuerySchema, customerListQuerySchema, customerOrderSchema, customerPointsSchema, customerSortSchema, customerStatsSchema, customerSummarySchema, customerWithdrawalBlockedDetailsSchema, daysBetween, defaultFulfillmentMethodOf, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, descendantCategoryIdsOf, describeCouponGroup, describeCouponRule, describeCouponTargetRules, describeScope, devStoreSchema, developerAppCreateSchema, developerAppSchema, developerInstallationSchema, developerOrgSchema, developerStoreSchema, directOrderShippingAddressSchema, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, evaluateCondition, evaluateConditionNode, evaluateCouponEligibility, eventTypeSchema, exchangeAuthorizationCode, floorToSaleUnit, flowActionRequestSchema, flowActionResultSchema, flowActionSchema, flowAuthoringGuideSchema, flowDraftEdgesSchema, flowDraftNodeSchema, flowDraftNodesSchema, flowDraftOperationSchema, flowEditSessionViewSchema, flowFieldValueSchema, flowInputFieldSchema, flowIssueSchema, flowNodeIdSchema, flowNodeTypeDetailSchema, flowNodeTypesSchema, flowNotificationWebhookEventDataSchema, flowNotificationWebhookEventSchema, flowOperationsResultSchema, flowPresetDetailSchema, flowPresetSummarySchema, flowRunSchema, flowRunStepSchema, flowSecretNameSchema, flowSecretSchema, flowStateChangedWebhookEventDataSchema, flowStateChangedWebhookEventSchema, flowStateSchema, formatOrderNo, fromDecimalString, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentMethodOf, fulfillmentMethodSchema, fulfillmentMethodsOf, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, infoFieldSourceSchema, infoSchemaFieldSchema, infoSchemaSchema, infoSectionLocalizationRequestSchema, infoSectionLocalizationSchema, infoSectionRequestSchema, infoSectionSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, inventoryAdjustmentLineSchema, inventoryAdjustmentReasonSchema, inventoryAdjustmentRequestSchema, inventoryChangedWebhookEventDataSchema, inventoryChangedWebhookEventSchema, inventoryLevelListQuerySchema, inventoryLevelPageSchema, inventoryLevelSchema, inventoryLocationRequestSchema, inventoryLocationSchema, inventoryModeSchema, inventoryMovementKindSchema, inventoryMovementListQuerySchema, inventoryMovementPageSchema, inventoryMovementSchema, inventoryOperationResultSchema, inventoryTransferRequestSchema, invitationDeliveryStatusSchema, invitationListQuerySchema, invitationSchema, inviteMemberRequestSchema, isAiAgentNotesPath, isAiChoiceAnswer, isAiDesignPath, isAiWorkspaceDocPath, isConditionGroup, isCouponTargetLine, isCurrencyCode, isEditableStorefrontPath, isInstallableScope, isReservedStoreCode, isReservedStorefrontSlug, isSaleUnitPrice, isShowcaseStorefrontSlug, isStoreScope, isWebOrigin, issueCouponRequestSchema, issueCouponResultSchema, kakaoPayCredentialsInputSchema, legacyFromCouponRules, linkStorefrontGitInstallationRequestSchema, liveGateConditionCodeSchema, liveGateConditionSchema, liveGateErrorDetailsSchema, liveGateSchema, localeCodeSchema, loginProviderSchema, loginProviderStatusSchema, loginProviderTestSchema, loginSettingsSchema, marketSchema, maskedSecretSchema, matchesCollectionRules, maxWeightAssignment, mcpRuleResultSchema, mcpToolEventSchema, migrateFlowVersionRequestSchema, migrateFlowVersionResultSchema, minPaymentOf, minorToMajor, moneyRulesOf, moveFlowStateRequestSchema, moveStorefrontFileRequestSchema, myAccountSchema, myStoreSchema, naverPayCredentialsInputSchema, nightsOf, normalizeBusinessNumber, normalizeCouponCode, normalizeLocale, normalizeStorefrontHostname, normalizeStorefrontPath, oauthTokenResponseSchema, openFulfillmentUnion, optionGroupKindSchema, optionGroupRequestSchema, optionGroupSchema, optionModelRequestSchema, optionModelSchema, optionSelectionSchema, optionSortSchema, optionValueRequestSchema, optionValueSchema, orderCanceledWebhookEventDataSchema, orderCanceledWebhookEventSchema, orderDiscountSchema, orderFlowActionResultSchema, orderFulfilledWebhookEventDataSchema, orderFulfilledWebhookEventSchema, orderItemFlowSchema, orderItemFulfillmentSchema, orderItemFulfillmentSnapshotResponseSchema, orderItemFulfillmentSnapshotSchema, orderItemListQuerySchema, orderItemMemoResultSchema, orderItemPageSchema, orderItemSchema, orderItemStatusSchema, orderListQuerySchema, orderPaymentAddedWebhookEventDataSchema, orderPaymentAddedWebhookEventSchema, orderPaymentRequestedWebhookEventDataSchema, orderPaymentRequestedWebhookEventSchema, orderPaymentSchema, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, parseOrderNo, parseWebhookEvent, payPalCredentialsInputSchema, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentFailureWarningSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, paymentStatusProviderSchema, paymentStatusSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderResponseSchema, pgProviderSchema, pgVerificationResultSchema, pickCouponFacts, pickupLocationRequestSchema, pickupLocationSchema, pickupLocationSnapshotSchema, planCodeSchema, planEntitlementsSchema, planErrorDetailsSchema, platformCodeSchema, pointAdjustmentRequestSchema, pointAdjustmentResultSchema, pointEarnOf, pointEarnRateBpSchema, pointEarningEnabled, pointEntrySchema, pointExpiresAtOf, pointHistoryQuerySchema, pointLotSchema, pointPolicyNoticeSchema, pointPolicySchema, pointRestoreExpiresAtOf, pointUseOf, pointUsePolicySchema, policyDocumentUrlSchema, policyVersionSchema, portOneChannelSchema, portOneCredentialsInputSchema, productCertificationsRequestSchema, productCertificationsSchema, productCreateRequestSchema, productCurrencyPriceSchema, productCurrencyPricesSchema, productFulfillmentCreateSchema, productFulfillmentResponseSchema, productFulfillmentSchema, productFulfillmentUpdateSchema, productImageRejection, productImageUrlSchema, productImportErrorSchema, productImportItemSchema, productImportItemsRequestSchema, productImportSchema, productImportStatusSchema, productListQuerySchema, productLocalizationNeedsTranslation, productLocalizationRequestSchema, productLocalizationSchema, productLookupRequestSchema, productNoticeRequestSchema, productNoticeSchema, productOutOfStockWebhookEventDataSchema, productOutOfStockWebhookEventSchema, productPatchRequestSchema, productRefundPolicyOverride, productRefundPolicyPatchSchema, productReplaceRequestSchema, productSchema, productSortSchema, productStatusSchema, productSummarySchema, productVariantRequestSchema, productVariantSchema, proratedPaidRefundBase, proratedPointRefund, proratedRefundBase, publicPlanSchema, publicPlansSchema, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, purchaseEarnPolicySchema, purchaseEarnRateOf, putBrandBriefRequestSchema, quoteDelivery, quotePricing, rankBestSelling, refreshUserToken, refundPolicyPatchSchema, refundPolicySchema, rejectClaimRequestSchema, remoteAreaLabelOf, remoteAreaOf, remoteAreaSchema, remoteSurchargeOf, replaceStorefrontSourceRequestSchema, replayFlowRequestSchema, replayFlowResultSchema, requiresCollection, requiresShipping, resolvePointPolicy, resolveRefundPolicy, resolveShippingPolicy, resolvedFlowSchema, responsePlanCodeSchema, responsePointEntryTypeSchema, reviewListQuerySchema, reviewReportResultSchema, reviewRewardPointOf, reviewRewardPolicySchema, reviewSchema, reviewSortSchema, reviewWebhookEventDataSchema, reviewWebhookEventSchema, rollbackStorefrontRequestSchema, runStorefrontCheckRequestSchema, salesReportCurrencySchema, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveFlowDraftRequestSchema, saveFlowSecretRequestSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetLocalizationRequestSchema, savedOptionSetLocalizationSchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, scopesCoverEvent, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCancelPreviewSchema, sellerCheckoutLineSchema, sellerCheckoutPageSchema, sellerCheckoutSchema, sellerCustomerInquirySchema, sendAiMessageRequestSchema, sendAiMessageResponseSchema, setCalendarRequestSchema, setPlatformTestKeysRequestSchema, setStorefrontDeployApprovalRequestSchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingCurrencyPriceSchema, shippingCurrencyPricesSchema, shippingOrderItemListQuerySchema, shippingOrderItemPageSchema, shippingOrderItemSchema, shippingPolicyPatchSchema, shippingPolicySchema, simulateFlowRequestSchema, simulateFlowResultSchema, simulationStepSchema, splitRefund, starterSellerTaskSchema, starterStageSchema, starterStatusSchema, starterStoreInfoFieldSchema, stayRangeSchema, staySnapshotSchema, storeAppDetailSchema, storeAppSchema, storeCodeSchema, storeDraftPreviewSchema, storeDraftSchema, storeIndustrySchema, storeMemberRoleUpdatedSchema, storeMemberSchema, storePointPolicySchema, storeRoleSchema, storeSchema, storeScopeResourceSchema, storeSetupBriefSchema, storeShopTypeSchema, storeSubscriptionSchema, storeTemplateSchema, storedAdditionalCurrencyPriceSchema, storedProductCurrencyPriceSchema, storedShippingCurrencyPriceSchema, storefrontBuildDependenciesSchema, storefrontBuildListQuerySchema, storefrontBuildSchema, storefrontBuildStatusSchema, storefrontCheckSchema, storefrontCheckStatusSchema, storefrontCustomDomainStatusSchema, storefrontCustomHostnameProblem, storefrontDependencyFindingSchema, storefrontDeploymentLogSchema, storefrontDeploymentSchema, storefrontDeploymentStepSchema, storefrontDevLogsSchema, storefrontDnsRecordSchema, storefrontDomainSchema, storefrontDomainTxtNameOf, storefrontEditFailureSchema, storefrontEditPreviewLabelOf, storefrontEditPreviewSchema, storefrontEditSessionSchema, storefrontEditSessionStatusSchema, storefrontEditingSchema, storefrontFileConflictDetailsSchema, storefrontFileContentQuerySchema, storefrontFileContentSchema, storefrontFileDeleteResultSchema, storefrontFileEncodingSchema, storefrontFileEntrySchema, storefrontFileHashSchema, storefrontFileListQuerySchema, storefrontFileListSchema, storefrontFileMoveResultSchema, storefrontFilePathSchema, storefrontFileSearchResultSchema, storefrontFileWriteResultSchema, storefrontGitConnectStateSchema, storefrontGitMergeRequestSchema, storefrontGitMergeSchema, storefrontGitRepositorySchema, storefrontGitStatusSchema, storefrontHostingSchema, storefrontPreviewLinkSchema, storefrontProvisioningSchema, storefrontRuleResultSchema, storefrontRuleSeveritySchema, storefrontSiteDomainSchema, storefrontSiteDomainsSchema, storefrontSiteSchema, storefrontSiteSnapshotSchema, storefrontSiteStatusSchema, storefrontSlugAvailabilityQuerySchema, storefrontSlugAvailabilitySchema, storefrontSlugSchema, storefrontSourceArchivePartSchema, storefrontSourceArchiveQuerySchema, storefrontSourceBlobsResultSchema, storefrontSourceModeSchema, storefrontSourceRefSchema, storefrontSourceReplacedSchema, storefrontSourceSchema, storefrontSuspensionSchema, storefrontTemplateSchema, storefrontVerifyReportSchema, storefrontVersionCreatedSchema, storefrontVersionPreviewLabelOf, storefrontVersionSchema, storefrontVersionStatusSchema, storefrontVisibilitySchema, subscriptionLimitsSchema, subscriptionStatusSchema, subscriptionUsageSchema, toDecimalString, toMinor, tossPaymentsCredentialsInputSchema, trackingStageResponseSchema, trackingUpdateResultSchema, unknownWebhookEventSchema, updateCouponRequestSchema, updateLoginProviderRequestSchema, updateLoginSettingsRequestSchema, updateMarketRequestSchema, updateMemberRoleRequestSchema, updatePaymentProviderRequestSchema, updatePaymentSettingsRequestSchema, updatePointPolicyRequestSchema, updateStoreRequestSchema, updateStoreTemplateRequestSchema, uploadExtensionOf, uploadPurposeSchema, uploadRejection, uploadRequestSchema, uploadStorefrontSourceBlobsRequestSchema, uploadTicketSchema, upsertKakaoPayProviderRequestSchema, upsertNaverPayProviderRequestSchema, upsertPayPalProviderRequestSchema, 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 };
|
|
13376
|
+
export { AI_AGENT_NOTES_DIR, AI_AGENT_PHASES, AI_DESIGN_BOARDS_MAX, AI_DESIGN_BOARD_FILE_PATTERN, AI_DESIGN_BOARD_KINDS, AI_DESIGN_CANVAS_PATH, AI_DESIGN_CONFIRM_APPROVE, AI_DESIGN_DIR, AI_DESIGN_GUIDE_PATH, AI_DESIGN_VIEWPORTS, AI_MESSAGE_MAX_ATTACHMENTS, AI_MESSAGE_MAX_CHARS, AI_RUN_ACTIVE_STATUSES, AI_RUN_FILE_CHANGES_RETENTION_DAYS, AI_RUN_RESUME_CHOICE, AI_SETUP_CONFIRM_APPROVE, AI_SITEMAP_PATH, AI_TODOS_MAX, AI_TODO_STATUSES, AI_TOOL_CHANGE_LINE_MAX, AI_TOOL_CHANGE_RANGES_MAX, APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, APP_CAPABILITIES, APP_DEPLOY_KEY_PATTERN, APP_DEPLOY_KEY_PREFIX, APP_EVENTS_MAX, APP_EVENT_SCOPES, APP_EVENT_TYPES, APP_FLOW_EVENT_PATTERN, APP_FLOW_ITEMS_MAX, APP_FLOW_NOTIFICATION_PATTERN, APP_HANDLE_PATTERN, APP_HTTP_KEY_PATTERN, APP_ICON_CONTENT_TYPES, APP_ICON_MAX_BYTES, APP_ICON_MIN_PX, APP_LIFECYCLE_EVENT_TYPES, APP_NETWORK_DENIED_SUFFIXES, APP_NETWORK_HOSTS_MAX, APP_PUBLIC_HTTP_MAX, APP_README_MAX_BYTES, APP_RESERVED_HANDLES, APP_SCHEDULES_MAX, APP_SCHEDULE_INTERVALS, APP_SCHEDULE_NAME_PATTERN, APP_SECRETS_MAX, APP_SECRET_NAME_PATTERN, APP_SECRET_PATTERNS, APP_SERVER_BUNDLE_MAX_GZIP_BYTES, APP_SETTINGS_MAX_FIELDS, APP_SETTING_FIELD_TYPES, APP_SETTING_KEY_PATTERN, APP_STORAGE_KEY_PATTERN, APP_STORAGE_MAX_BYTES, APP_STORAGE_MAX_KEYS, APP_TOOL_NAME_PATTERN, APP_UI_MAX_BYTES, APP_UI_MAX_FILES, ApiError, ApprovalPendingError, BASE_CURRENCY, BRAND_BRIEF_MAX_REFERENCES, BUSINESS_INFO_MAX_LENGTH, BUSINESS_NUMBER_PATTERN, CASH_RECEIPT_STATUS_VALUES, CERTIFICATION_STATUSES, COLLECTION_BEST_SELLING_DAYS, COLLECTION_PREVIEW_SIZE, COLLECTION_PRODUCT_SORTS, COLLECTION_SALES_SORT_DEFAULT_DAYS, COLLECTION_SLUG_PATTERN, COLLECTION_TYPES, CONDITION_OPERATORS_BY_TYPE, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_CONDITION_FIELDS, COUPON_LINE_CONDITIONS, COUPON_ORDER_CONDITIONS, COUPON_REWARD_KINDS, COUPON_REWARD_TIER_MAX, COUPON_STACKING_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, COUPON_TARGET_RULES_ALL, COUPON_TIME_ZONE, COUPON_WEEKDAYS, CURRENCIES, CURRENCY_CODES, CUSTOMER_BIRTHDATE_PATTERN, CUSTOM_INPUT_FORBIDDEN_WORDS, CUSTOM_INPUT_TYPES, DEDICATED_EASY_PAY_PROVIDER, DEFAULT_CONDITION_LIMITS, DEFAULT_STORE_LOCALE, EMPTY_CONDITION_GROUP, FULFILLMENT_METHODS, FULFILLMENT_METHODS_BY_TYPE, FULFILLMENT_METHOD_RULES, FULFILLMENT_RULES, INSTALLABLE_SCOPES, InvalidPriceUnitError, KAKAOPAY_TEST_CID, KNOWN_WEBHOOK_EVENT_TYPES, KRW_MONEY_RULES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_CALENDAR_DAYS, MAX_CERTIFICATION_ITEMS, MAX_COLLECTIONS, MAX_COLLECTION_BEST_SELLING_TOP, MAX_COLLECTION_CREATED_WITHIN_DAYS, MAX_COLLECTION_DESCRIPTION, MAX_COLLECTION_PRODUCTS, MAX_COLLECTION_PRODUCTS_PER_ADD, MAX_COLLECTION_RULES, MAX_COLLECTION_RULE_CATEGORIES, MAX_COLLECTION_TITLE, MAX_CUSTOM_INPUTS, MAX_CUSTOM_INPUT_LENGTH, MAX_INFO_SECTION_TITLE, MAX_INVENTORY_OPERATION_LINES, MAX_NOTICE_VALUE_LENGTH, MAX_OPTION_GROUPS, MAX_PICKUP_LOCATIONS, MAX_PRODUCT_IMAGES, MAX_PRODUCT_IMPORT_ITEMS, MAX_PRODUCT_IMPORT_ITEMS_PER_REQUEST, MAX_PRODUCT_INFO_SECTIONS, MAX_PRODUCT_LOOKUP, MAX_SAVED_OPTION_SETS, MAX_SAVED_OPTION_SET_NAME, MAX_STAY_NIGHTS, MAX_VALUES_PER_GROUP, MAX_VARIANTS, MCP_TELEMETRY_MAX_RESULTS, MIN_PAYMENT_AMOUNT, NON_INSTALLABLE_SCOPES, NO_COUPON_SETTLEMENT, NO_SHIPPING_BUNDLE_KEY, PAYMENT_ROUTING_EXCLUSION_CODES, PAYPAL_CURRENCIES, PLATFORM_CODE_SETS, POINT_ADJUSTMENT_MAX, POINT_EARN_RATE_BP_MAX, POINT_ENTRY_TYPES, POINT_EXPIRY_DAYS_MAX, POINT_EXPIRY_DAYS_MIN, POINT_LOT_SOURCES, POINT_POLICY_DEFAULTS, POINT_REVIEW_REWARD_MAX, POINT_USE_UNITS, 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, SAYREN_API_BASE_URL, SAYREN_API_ORIGIN, SCOPE_DESCRIPTIONS, SHIPPING_POLICY_DEFAULTS, STARTER_SELLER_TASKS, STARTER_STAGES, STOREFRONT_BLOCKED_PATH_SEGMENTS, STOREFRONT_BUILD_STAGES, STOREFRONT_BUILD_TERMINAL_STATUSES, STOREFRONT_CHECK_TERMINAL_STATUSES, STOREFRONT_CLOSED_SITE_HOLD_DAYS, 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_DRAFT_ATTACHMENT_MAX_BYTES, STORE_DRAFT_MAX_ATTACHMENTS, STORE_DRAFT_RETENTION_DAYS, STORE_ROLE_SCOPES, STORE_SCOPE_RESOURCES, STORE_SESSION_KEYS, STORE_SHOP_TYPES, TEMPLATE_STORE_LOCKED_BUSINESS_FIELDS, TOSS_WIDGET_CLIENT_KEY_PATTERN, TOSS_WIDGET_KEY_MESSAGE, TOSS_WIDGET_SECRET_KEY_PATTERN, UPLOAD_PURPOSE_LIMITS, VARIANT_COUNT_WARNING, VARIANT_STOCK_EXCLUSIVE_MESSAGE, VOUCHER_COUNT_MAX, VOUCHER_PREFIX_PATTERN, 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, additionalCurrencyPriceSchema, additionalCurrencyPricesSchema, addonGroupRequestSchema, addonGroupSchema, addonValueRequestSchema, addonValueSchema, addressChangeRequestListSchema, addressTypeSchema, agentPolicyDecisionSchema, aiActivitySchema, aiAgentPhaseSchema, aiAttachmentSchema, aiChoiceOptionSchema, aiConversationFileChangesSchema, aiConversationSchema, aiConversationSummarySchema, aiDesignBoardSchema, aiDesignCanvasSchema, aiDesignConfirmBoardSchema, aiDesignSelectionSchema, aiFileChangeKindSchema, aiFocusAreaSchema, aiFocusSchema, aiMessagePartSchema, aiMessageSchema, aiPreviewSelectionSchema, aiRunChangesSchema, aiRunChangesStatusSchema, aiRunFileDiffSchema, aiRunRevertConflictDetailsSchema, aiRunRevertResultSchema, aiRunSchema, aiRunStatusSchema, aiSetupConfirmItemSchema, aiStreamAccessSchema, aiStreamEventSchema, aiStreamRecordSchema, aiTodoSchema, aiToolChangeSchema, allocateByWeight, analyticsChannelSchema, analyticsCheckoutOutcomeSchema, analyticsCheckoutSchema, analyticsDeviceRowSchema, analyticsDevicesSchema, analyticsFunnelStepSchema, analyticsOriginSchema, analyticsOverviewSchema, analyticsPagesQuerySchema, analyticsPagesSchema, analyticsProductRowSchema, analyticsProductSortSchema, analyticsProductsQuerySchema, analyticsProductsSchema, analyticsRangeQuerySchema, analyticsRealtimeSchema, analyticsSearchQuerySchema, analyticsSearchSchema, analyticsSourceGroupBySchema, analyticsSourceRowSchema, analyticsSourcesQuerySchema, analyticsSourcesSchema, analyticsTotalsSchema, anyConditionHolds, apiLogErrorSchema, apiLogListQuerySchema, apiLogPageSchema, apiLogPrincipalSchema, apiLogPrincipalTypeSchema, apiLogSchema, apiLogStatusFilterSchema, apiLogSummarySchema, appArtifactUploadSchema, appBuildSchema, appBuildStageSchema, appCapabilitiesOf, appDeployKeyCreateSchema, appDeployKeyCreatedSchema, appDeployKeySchema, appDevTokenSchema, appDistributionSchema, appEventTypeSchema, appFlowEventSchema, appFlowEventSummarySchema, appFlowNotificationSchema, appFlowNotificationSummarySchema, appFlowParamSchema, appFlowSummaryOf, appHandleSchema, appHttpKeyMatches, appIconProblem, appInstallRequestSchema, appInstallationActivitySchema, appInstallationAppSchema, appInstallationRunSchema, appInstallationSchema, appInstallationSelfSchema, appInstallationSettingsSchema, appInstallationSettingsUpdateSchema, appInstallationStatusSchema, appInvocationSchema, appListingReviewSchema, appListingReviewStatusSchema, appListingSchema, appManifestProblems, appManifestSchema, appManifestWidens, appNetworkHostProblem, appNetworkHostSchema, appReleaseResultSchema, appRuntimeSchema, appScheduleIntervalLabel, appScheduleListOf, appScheduleSummarySchema, appScopeSchema, appSecretSummarySchema, appSessionSchema, appSettingFieldSchema, appStatusSchema, appStorageEntrySchema, appStorageKeysSchema, appStorageListQuerySchema, appStoragePutSchema, appToolCallSchema, appToolInputSchema, appToolListOf, appToolResultSchema, appToolSchema, appToolSummarySchema, appVersionSchema, appVersionStatusSchema, appVisibilitySchema, applyFlowOperationsRequestSchema, approvalDecisionRequestSchema, approvalListQuerySchema, approvalPageSchema, approvalRequestSchema, approvalStatusSchema, approveClaimResultSchema, assertSaleUnit, assumeCouponFactRules, auditActorSchema, auditActorTypeSchema, auditLogListQuerySchema, auditLogOutcomeSchema, auditLogPageSchema, auditLogSchema, auditLogSourceSchema, bestCouponSelection, bestSellingRuleOf, birthdateFactOf, brandBriefProductSourceSchema, brandBriefReferenceSchema, brandBriefSchema, brandBriefViewSchema, buildAuthorizeUrl, buildQuery, bulkResultSchema, businessInfoPatchShape, businessInfoResponseShape, businessNumberSchema, calendarDateSchema, calendarDaySchema, calendarQuerySchema, cancelBySellerRequestSchema, cancelBySellerResultSchema, canonicalLocale, canonicalizeConditionGroup, canonicalizeConditionRule, canonicalizeCouponStacking, canonicalizeCouponTargetRules, canonicalizeCouponTrees, carrierSchema, cashReceiptSchema, categoryAttributeSchema, categoryCreateRequestSchema, categoryDeleteQuerySchema, categoryDeleteStrategySchema, categoryListQuerySchema, categoryLocalizationRequestSchema, categoryLocalizationSchema, categoryPatchRequestSchema, categoryProductSortSchema, categorySchema, categorySearchResultSchema, categoryTreeNodeSchema, categoryWithPathSchema, changeStorefrontSlugRequestSchema, changeStorefrontTemplateRequestSchema, changeTypeSchema, claimCollectCompleteRequestSchema, claimDetailSchema, claimFlowEditSessionRequestSchema, claimHoldResultSchema, claimListQuerySchema, claimReasonSchema, claimRedeliveryRequestSchema, claimReturnAddressSchema, claimSchema, claimStatusSchema, claimTypeSchema, claimWebhookEventDataSchema, claimWebhookEventSchema, collectionCreateRequestSchema, collectionListQuerySchema, collectionLocalizationRequestSchema, collectionLocalizationSchema, collectionPageSchema, collectionPatchRequestSchema, collectionPreviewRequestSchema, collectionPreviewSchema, collectionProductListQuerySchema, collectionProductSchema, collectionProductSortRequestSchema, collectionProductsAddRequestSchema, collectionProductsReplaceRequestSchema, collectionRuleCategoryIds, collectionRuleSchema, collectionRuleViewSchema, collectionRulesPredicate, collectionRulesSchema, collectionSchema, collectionStateCountsSchema, collectionStateOf, collectionStateSchema, commerceFlowCheckSchema, commerceFlowSchema, commerceFlowSummarySchema, commerceFlowVersionViewSchema, commerceNumberField, compareBySales, conditionCatalog, conditionFields, conditionGroupSchema, conditionIssues, conditionRuleSchema, conditionValueSchema, connectStorefrontGitRequestSchema, consentActionSchema, consentKindSchema, consentSourceSchema, couponAudienceMatches, couponBenefitOfReward, couponBenefitSchema, couponClaimFactsOf, couponConditionTreeSchema, couponConditionsInputSchema, couponConditionsSchema, couponCustomerFactNames, couponDiscountOf, couponDistributionSchema, couponFactsSchema, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponLineContextOf, couponLineMatches, couponListQuerySchema, couponPointRewardOf, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRequestRuleIssues, couponRequirementsOf, couponRewardSchema, couponRuleDiscountOf, couponRuleIssues, couponRuleSchema, couponRulesFromLegacy, couponSchema, couponStackingOf, couponStackingSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetRulesSchema, couponTargetSchema, couponTierOf, couponTimeFactsAt, couponTodayAt, couponTreesOf, couponVoucherCodesSchema, couponVoucherInputSchema, couponsCombinable, createAiConversationRequestSchema, createAiConversationResponseSchema, createCommerceFlowRequestSchema, createCouponRequestSchema, createMarketRequestSchema, createOrderRequestSchema, createPkcePair, createSellerCheckoutRequestSchema, createStoreClient, createStoreDraftRequestSchema, createStoreDraftResponseSchema, createStoreSession, createStorefrontEditPreviewLinkRequestSchema, createStorefrontPreviewLinkRequestSchema, createStorefrontSiteRequestSchema, createStorefrontVersionRequestSchema, createdOrderSchema, currencyCodeSchema, currencyRefundFeesSchema, currencyShippingPolicySchema, currencySpecOf, customInputLabelForbiddenWord, customInputRequestSchema, customInputSchema, customInputValueSchema, customerAddressSchema, customerConsentListQuerySchema, customerConsentSchema, customerConsentStateSchema, customerConsentsSchema, customerCouponSchema, customerDelegationRequestSchema, customerDelegationSchema, customerDetailSchema, customerInquiryCategorySchema, customerInquiryListQuerySchema, customerListQuerySchema, customerOrderSchema, customerPointsSchema, customerSortSchema, customerStatsSchema, customerSummarySchema, customerUserinfoAddressSchema, customerUserinfoInputSchema, customerUserinfoSchema, customerWithdrawalBlockedDetailsSchema, daysBetween, defaultFulfillmentMethodOf, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, descendantCategoryIdsOf, describeCouponGroup, describeCouponRule, describeCouponTargetRules, describeScope, devStoreSchema, developerAppCreateSchema, developerAppSchema, developerInstallationSchema, developerOrgSchema, developerStoreSchema, directOrderShippingAddressSchema, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, evaluateCondition, evaluateConditionNode, evaluateCouponEligibility, eventTypeSchema, exchangeAuthorizationCode, floorToSaleUnit, flowActionRequestSchema, flowActionResultSchema, flowActionSchema, flowAuthoringGuideSchema, flowDraftEdgesSchema, flowDraftNodeSchema, flowDraftNodesSchema, flowDraftOperationSchema, flowEditSessionViewSchema, flowFieldValueSchema, flowInputFieldSchema, flowIssueSchema, flowNodeIdSchema, flowNodeTypeDetailSchema, flowNodeTypesSchema, flowNotificationWebhookEventDataSchema, flowNotificationWebhookEventSchema, flowOperationsResultSchema, flowPresetDetailSchema, flowPresetSummarySchema, flowRunSchema, flowRunStepSchema, flowSecretNameSchema, flowSecretSchema, flowStateChangedWebhookEventDataSchema, flowStateChangedWebhookEventSchema, flowStateSchema, formatOrderNo, fromDecimalString, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentMethodOf, fulfillmentMethodSchema, fulfillmentMethodsOf, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, infoFieldSourceSchema, infoSchemaFieldSchema, infoSchemaSchema, infoSectionLocalizationRequestSchema, infoSectionLocalizationSchema, infoSectionRequestSchema, infoSectionSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, inventoryAdjustmentLineSchema, inventoryAdjustmentReasonSchema, inventoryAdjustmentRequestSchema, inventoryChangedWebhookEventDataSchema, inventoryChangedWebhookEventSchema, inventoryLevelListQuerySchema, inventoryLevelPageSchema, inventoryLevelSchema, inventoryLocationRequestSchema, inventoryLocationSchema, inventoryModeSchema, inventoryMovementKindSchema, inventoryMovementListQuerySchema, inventoryMovementPageSchema, inventoryMovementSchema, inventoryOperationResultSchema, inventoryTransferRequestSchema, invitationDeliveryStatusSchema, invitationListQuerySchema, invitationSchema, inviteMemberRequestSchema, isAiAgentNotesPath, isAiChoiceAnswer, isAiDesignPath, isAiWorkspaceDocPath, isConditionGroup, isCouponTargetLine, isCurrencyCode, isEditableStorefrontPath, isInstallableScope, isReservedStoreCode, isReservedStorefrontSlug, isSaleUnitPrice, isShowcaseStorefrontSlug, isStoreScope, isWebOrigin, issueCouponRequestSchema, issueCouponResultSchema, kakaoPayCredentialsInputSchema, legacyFromCouponRules, linkStorefrontGitInstallationRequestSchema, liveGateConditionCodeSchema, liveGateConditionSchema, liveGateErrorDetailsSchema, liveGateSchema, localeCodeSchema, loginProviderSchema, loginProviderStatusSchema, loginProviderTestSchema, loginSettingsSchema, marketSchema, maskedSecretSchema, matchesCollectionRules, maxWeightAssignment, mcpRuleResultSchema, mcpToolEventSchema, migrateFlowVersionRequestSchema, migrateFlowVersionResultSchema, minPaymentOf, minorToMajor, moneyRulesOf, moveFlowStateRequestSchema, moveStorefrontFileRequestSchema, myAccountSchema, myStoreSchema, naverPayCredentialsInputSchema, nightsOf, normalizeBusinessNumber, normalizeCouponCode, normalizeLocale, normalizeStorefrontHostname, normalizeStorefrontPath, oauthTokenResponseSchema, openFulfillmentUnion, optionGroupKindSchema, optionGroupRequestSchema, optionGroupSchema, optionModelRequestSchema, optionModelSchema, optionSelectionSchema, optionSortSchema, optionValueRequestSchema, optionValueSchema, orderCanceledWebhookEventDataSchema, orderCanceledWebhookEventSchema, orderDiscountSchema, orderFlowActionResultSchema, orderFulfilledWebhookEventDataSchema, orderFulfilledWebhookEventSchema, orderItemFlowSchema, orderItemFulfillmentSchema, orderItemFulfillmentSnapshotResponseSchema, orderItemFulfillmentSnapshotSchema, orderItemListQuerySchema, orderItemMemoResultSchema, orderItemPageSchema, orderItemSchema, orderItemStatusSchema, orderListQuerySchema, orderPaymentAddedWebhookEventDataSchema, orderPaymentAddedWebhookEventSchema, orderPaymentRequestedWebhookEventDataSchema, orderPaymentRequestedWebhookEventSchema, orderPaymentSchema, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, parseOrderNo, parseWebhookEvent, payPalCredentialsInputSchema, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentFailureWarningSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, paymentStatusProviderSchema, paymentStatusSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderResponseSchema, pgProviderSchema, pgVerificationResultSchema, pickCouponFacts, pickupLocationRequestSchema, pickupLocationSchema, pickupLocationSnapshotSchema, planCodeSchema, planEntitlementsSchema, planErrorDetailsSchema, platformCodeSchema, pointAdjustmentRequestSchema, pointAdjustmentResultSchema, pointEarnOf, pointEarnRateBpSchema, pointEarningEnabled, pointEntrySchema, pointExpiresAtOf, pointHistoryQuerySchema, pointLotSchema, pointPolicyNoticeSchema, pointPolicySchema, pointRestoreExpiresAtOf, pointUseOf, pointUsePolicySchema, policyDocumentUrlSchema, policyVersionSchema, portOneChannelSchema, portOneCredentialsInputSchema, productCertificationsRequestSchema, productCertificationsSchema, productCreateRequestSchema, productCurrencyPriceSchema, productCurrencyPricesSchema, productFulfillmentCreateSchema, productFulfillmentResponseSchema, productFulfillmentSchema, productFulfillmentUpdateSchema, productImageRejection, productImageUrlSchema, productImportErrorSchema, productImportItemSchema, productImportItemsRequestSchema, productImportSchema, productImportStatusSchema, productListQuerySchema, productLocalizationNeedsTranslation, productLocalizationRequestSchema, productLocalizationSchema, productLookupRequestSchema, productNoticeRequestSchema, productNoticeSchema, productOutOfStockWebhookEventDataSchema, productOutOfStockWebhookEventSchema, productPatchRequestSchema, productRefundPolicyOverride, productRefundPolicyPatchSchema, productReplaceRequestSchema, productSchema, productSortSchema, productStatusSchema, productSummarySchema, productVariantRequestSchema, productVariantSchema, proratedPaidRefundBase, proratedPointRefund, proratedRefundBase, publicPlanSchema, publicPlansSchema, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, purchaseEarnPolicySchema, purchaseEarnRateOf, putBrandBriefRequestSchema, quoteDelivery, quotePricing, rankBestSelling, recomputeOrderCoupons, refreshUserToken, refundPolicyPatchSchema, refundPolicySchema, rejectClaimRequestSchema, remoteAreaLabelOf, remoteAreaOf, remoteAreaSchema, remoteSurchargeOf, replaceStorefrontSourceRequestSchema, replayFlowRequestSchema, replayFlowResultSchema, requiresCollection, requiresShipping, resolvePointPolicy, resolveRefundPolicy, resolveShippingPolicy, resolvedFlowSchema, responsePlanCodeSchema, responsePointEntryTypeSchema, reviewListQuerySchema, reviewReportResultSchema, reviewRewardPointOf, reviewRewardPolicySchema, reviewSchema, reviewSortSchema, reviewWebhookEventDataSchema, reviewWebhookEventSchema, rollbackStorefrontRequestSchema, runStorefrontCheckRequestSchema, salesReportCurrencySchema, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveFlowDraftRequestSchema, saveFlowSecretRequestSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetLocalizationRequestSchema, savedOptionSetLocalizationSchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, scopesCoverEvent, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCancelPreviewSchema, sellerCheckoutLineSchema, sellerCheckoutPageSchema, sellerCheckoutSchema, sellerCustomerInquirySchema, sendAiMessageRequestSchema, sendAiMessageResponseSchema, setCalendarRequestSchema, setPlatformTestKeysRequestSchema, setStorefrontDeployApprovalRequestSchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingCurrencyPriceSchema, shippingCurrencyPricesSchema, shippingOrderItemListQuerySchema, shippingOrderItemPageSchema, shippingOrderItemSchema, shippingPolicyPatchSchema, shippingPolicySchema, simulateFlowRequestSchema, simulateFlowResultSchema, simulationStepSchema, splitRefund, starterSellerTaskSchema, starterStageSchema, starterStatusSchema, starterStoreInfoFieldSchema, stayRangeSchema, staySnapshotSchema, storeAppDetailSchema, storeAppSchema, storeCodeSchema, storeDraftPreviewSchema, storeDraftSchema, storeIndustrySchema, storeMemberRoleUpdatedSchema, storeMemberSchema, storePointPolicySchema, storeRoleSchema, storeSchema, storeScopeResourceSchema, storeSetupBriefSchema, storeShopTypeSchema, storeSubscriptionSchema, storeTemplateSchema, storedAdditionalCurrencyPriceSchema, storedProductCurrencyPriceSchema, storedShippingCurrencyPriceSchema, storefrontBuildDependenciesSchema, storefrontBuildListQuerySchema, storefrontBuildSchema, storefrontBuildStatusSchema, storefrontCheckSchema, storefrontCheckStatusSchema, storefrontCustomDomainStatusSchema, storefrontCustomHostnameProblem, storefrontDependencyFindingSchema, storefrontDeploymentLogSchema, storefrontDeploymentSchema, storefrontDeploymentStepSchema, storefrontDevLogsSchema, storefrontDnsRecordSchema, storefrontDomainSchema, storefrontDomainTxtNameOf, storefrontEditFailureSchema, storefrontEditPreviewLabelOf, storefrontEditPreviewSchema, storefrontEditSessionSchema, storefrontEditSessionStatusSchema, storefrontEditingSchema, storefrontFileConflictDetailsSchema, storefrontFileContentQuerySchema, storefrontFileContentSchema, storefrontFileDeleteResultSchema, storefrontFileEncodingSchema, storefrontFileEntrySchema, storefrontFileHashSchema, storefrontFileListQuerySchema, storefrontFileListSchema, storefrontFileMoveResultSchema, storefrontFilePathSchema, storefrontFileSearchResultSchema, storefrontFileWriteResultSchema, storefrontGitConnectStateSchema, storefrontGitMergeRequestSchema, storefrontGitMergeSchema, storefrontGitRepositorySchema, storefrontGitStatusSchema, storefrontHostingSchema, storefrontPreviewLinkSchema, storefrontProvisioningSchema, storefrontRuleResultSchema, storefrontRuleSeveritySchema, storefrontSiteDomainSchema, storefrontSiteDomainsSchema, storefrontSiteSchema, storefrontSiteSnapshotSchema, storefrontSiteStatusSchema, storefrontSlugAvailabilityQuerySchema, storefrontSlugAvailabilitySchema, storefrontSlugSchema, storefrontSourceArchivePartSchema, storefrontSourceArchiveQuerySchema, storefrontSourceBlobsResultSchema, storefrontSourceModeSchema, storefrontSourceRefSchema, storefrontSourceReplacedSchema, storefrontSourceSchema, storefrontSuspensionSchema, storefrontTemplateSchema, storefrontVerifyReportSchema, storefrontVersionCreatedSchema, storefrontVersionPreviewLabelOf, storefrontVersionSchema, storefrontVersionStatusSchema, storefrontVisibilitySchema, subscriptionLimitsSchema, subscriptionStatusSchema, subscriptionUsageSchema, toDecimalString, toMinor, tossPaymentsCredentialsInputSchema, trackingStageResponseSchema, trackingUpdateResultSchema, unknownWebhookEventSchema, updateCouponRequestSchema, updateLoginProviderRequestSchema, updateLoginSettingsRequestSchema, updateMarketRequestSchema, updateMemberRoleRequestSchema, updatePaymentProviderRequestSchema, updatePaymentSettingsRequestSchema, updatePointPolicyRequestSchema, updateStoreRequestSchema, updateStoreTemplateRequestSchema, uploadExtensionOf, uploadPurposeSchema, uploadRejection, uploadRequestSchema, uploadStorefrontSourceBlobsRequestSchema, uploadTicketSchema, upsertKakaoPayProviderRequestSchema, upsertNaverPayProviderRequestSchema, upsertPayPalProviderRequestSchema, 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 };
|