@sayren/store-sdk 0.29.1 → 0.29.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +453 -143
- package/dist/index.mjs +162 -16
- package/package.json +1 -1
- package/src/client.ts +9 -1
- package/src/schemas/collection.ts +258 -11
package/dist/index.mjs
CHANGED
|
@@ -1157,7 +1157,7 @@ function reviewRewardPointOf(policy, hasPhoto) {
|
|
|
1157
1157
|
if (!reviewReward.enabled) return 0;
|
|
1158
1158
|
return reviewReward.textPoint + (hasPhoto ? reviewReward.photoPoint : 0);
|
|
1159
1159
|
}
|
|
1160
|
-
const DAY_MS = 864e5;
|
|
1160
|
+
const DAY_MS$1 = 864e5;
|
|
1161
1161
|
const KST_OFFSET_MS = 324e5;
|
|
1162
1162
|
/**
|
|
1163
1163
|
* 적립 묶음의 만료 시각 — 적립 시각 + `days`일이 속한 한국 시간 날짜의 끝(23:59:59.999 KST). 구매자 안내가 날짜 단위라
|
|
@@ -1165,8 +1165,8 @@ const KST_OFFSET_MS = 324e5;
|
|
|
1165
1165
|
*/
|
|
1166
1166
|
function pointExpiresAtOf(earnedAt, days) {
|
|
1167
1167
|
if (days === null) return null;
|
|
1168
|
-
const shifted = earnedAt.getTime() + days * DAY_MS + KST_OFFSET_MS;
|
|
1169
|
-
const endOfDay = Math.floor(shifted / DAY_MS) * DAY_MS + DAY_MS - 1;
|
|
1168
|
+
const shifted = earnedAt.getTime() + days * DAY_MS$1 + KST_OFFSET_MS;
|
|
1169
|
+
const endOfDay = Math.floor(shifted / DAY_MS$1) * DAY_MS$1 + DAY_MS$1 - 1;
|
|
1170
1170
|
return /* @__PURE__ */ new Date(endOfDay - KST_OFFSET_MS);
|
|
1171
1171
|
}
|
|
1172
1172
|
/** 적립 묶음 출처 — 같은 출처 id에는 묶음이 하나뿐이다(DB 부분 유니크) */
|
|
@@ -1883,8 +1883,8 @@ const discountRequestSchema = z.object({
|
|
|
1883
1883
|
* 컬렉션 (이슈 #83) — 상품을 어디에 보여 줄지 정하는 묶음이다. 카테고리는 상품이 무엇인지를 정하고 상품당 하나지만, 컬렉션은
|
|
1884
1884
|
* 다대다다. 이벤트·기획전은 기간이 있는 직접 선택 컬렉션이다. 권한은 카테고리와 같다(`category:r`·`category:rw`).
|
|
1885
1885
|
*
|
|
1886
|
-
* 유형은 만들 때 정하고 바꿀 수 없다.
|
|
1887
|
-
* 응답의 `type`은 값이 늘 수 있어 문자열이다.
|
|
1886
|
+
* 유형은 만들 때 정하고 바꿀 수 없다. 직접 선택(`MANUAL`)은 셀러가 상품을 담고 순서를 정하고, 조건 자동(`AUTOMATIC`)은 조건(`rules`)을
|
|
1887
|
+
* 모두 만족하는 판매 중 상품을 조회할 때마다 계산한다(결과를 저장하지 않는다). 응답의 `type`은 값이 늘 수 있어 문자열이다.
|
|
1888
1888
|
*/
|
|
1889
1889
|
/** 상점당 컬렉션 최대 개수 — 넘으면 409 `COLLECTION_LIMIT_EXCEEDED` */
|
|
1890
1890
|
const MAX_COLLECTIONS = 200;
|
|
@@ -1898,7 +1898,7 @@ const MAX_COLLECTION_TITLE = 60;
|
|
|
1898
1898
|
const MAX_COLLECTION_DESCRIPTION = 500;
|
|
1899
1899
|
/** 주소(slug) 형식 — 영문 소문자·숫자·하이픈, 첫 글자는 영문 소문자나 숫자, 64자까지 */
|
|
1900
1900
|
const COLLECTION_SLUG_PATTERN = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
1901
|
-
/** 유형 — `MANUAL`(직접 선택)·`AUTOMATIC`(조건
|
|
1901
|
+
/** 유형 — `MANUAL`(직접 선택)·`AUTOMATIC`(조건 자동) */
|
|
1902
1902
|
const COLLECTION_TYPES = ["MANUAL", "AUTOMATIC"];
|
|
1903
1903
|
/**
|
|
1904
1904
|
* 상품 정렬 — `MANUAL`은 직접 정한 순서(직접 선택 컬렉션만)다. `BEST_SELLING`(판매량순)은 판매량 집계가 열릴 때 받는다.
|
|
@@ -1938,6 +1938,136 @@ function collectionStateOf(collection, now) {
|
|
|
1938
1938
|
if (collection.endsAt && Date.parse(collection.endsAt) <= at) return "ENDED";
|
|
1939
1939
|
return "ACTIVE";
|
|
1940
1940
|
}
|
|
1941
|
+
/** 조건 자동 컬렉션의 조건 최대 개수 */
|
|
1942
|
+
const MAX_COLLECTION_RULES = 10;
|
|
1943
|
+
/** 카테고리 조건 하나에 넣는 카테고리 최대 개수 */
|
|
1944
|
+
const MAX_COLLECTION_RULE_CATEGORIES = 20;
|
|
1945
|
+
/** 등록일 조건의 최대 일수 */
|
|
1946
|
+
const MAX_COLLECTION_CREATED_WITHIN_DAYS = 365;
|
|
1947
|
+
/** 미리보기(`POST /v1/collections/preview`)가 싣는 상품 최대 개수 */
|
|
1948
|
+
const COLLECTION_PREVIEW_SIZE = 20;
|
|
1949
|
+
const createdWithinDaysRuleSchema = z.object({
|
|
1950
|
+
field: z.literal("createdWithinDays"),
|
|
1951
|
+
value: z.number().int().min(1).max(365).describe("등록한 지 N일 안의 상품(1~365). 조회 시각에서 N일을 뺀 시각 이후에 등록한 상품이다")
|
|
1952
|
+
});
|
|
1953
|
+
const categoryRuleSchema = z.object({
|
|
1954
|
+
field: z.literal("category"),
|
|
1955
|
+
categoryIds: z.array(z.string().min(1)).min(1).max(20).describe("카테고리 id(1~20개). 하위 카테고리의 상품도 포함한다. 상점에 없는 id는 400 `COLLECTION_CATEGORY_NOT_FOUND`다")
|
|
1956
|
+
});
|
|
1957
|
+
const priceRuleSchema = z.object({
|
|
1958
|
+
field: z.literal("price"),
|
|
1959
|
+
min: z.number().int().min(0).optional().describe("최저가(포함, 원)"),
|
|
1960
|
+
max: z.number().int().min(0).optional().describe("최고가(포함, 원)")
|
|
1961
|
+
});
|
|
1962
|
+
const discountedRuleSchema = z.object({
|
|
1963
|
+
field: z.literal("discounted"),
|
|
1964
|
+
value: z.literal(true).describe("즉시할인이 지금 적용되는 상품")
|
|
1965
|
+
});
|
|
1966
|
+
/**
|
|
1967
|
+
* 조건 하나 — `field`로 가른다. 가격은 즉시할인을 반영한 판매가(`discountedPrice ?? salePrice`)다.
|
|
1968
|
+
* 판매량 상위(`bestSelling`)는 판매량 집계가 열릴 때 더한다.
|
|
1969
|
+
*/
|
|
1970
|
+
const collectionRuleSchema = z.discriminatedUnion("field", [
|
|
1971
|
+
createdWithinDaysRuleSchema,
|
|
1972
|
+
categoryRuleSchema,
|
|
1973
|
+
priceRuleSchema,
|
|
1974
|
+
discountedRuleSchema
|
|
1975
|
+
]).superRefine((rule, ctx) => {
|
|
1976
|
+
if (rule.field !== "price") return;
|
|
1977
|
+
if (rule.min === void 0 && rule.max === void 0) ctx.addIssue({
|
|
1978
|
+
code: "custom",
|
|
1979
|
+
path: ["min"],
|
|
1980
|
+
message: "최저가나 최고가 중 하나는 있어야 합니다"
|
|
1981
|
+
});
|
|
1982
|
+
else if (rule.min !== void 0 && rule.max !== void 0 && rule.min > rule.max) ctx.addIssue({
|
|
1983
|
+
code: "custom",
|
|
1984
|
+
path: ["max"],
|
|
1985
|
+
message: "최고가는 최저가 이상이어야 합니다"
|
|
1986
|
+
});
|
|
1987
|
+
});
|
|
1988
|
+
/** 조건 목록 — 모두 만족해야 한다(AND). 같은 `field`는 한 번만 쓴다 */
|
|
1989
|
+
const collectionRulesSchema = z.array(collectionRuleSchema).min(1).max(10).superRefine((rules, ctx) => {
|
|
1990
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1991
|
+
rules.forEach((rule, index) => {
|
|
1992
|
+
if (seen.has(rule.field)) ctx.addIssue({
|
|
1993
|
+
code: "custom",
|
|
1994
|
+
path: [index, "field"],
|
|
1995
|
+
message: "같은 조건을 두 번 쓸 수 없습니다"
|
|
1996
|
+
});
|
|
1997
|
+
seen.add(rule.field);
|
|
1998
|
+
});
|
|
1999
|
+
}).describe("조건 목록. 모두 만족하는 판매 중 상품이 컬렉션 상품이다(AND). 같은 조건(`field`)은 한 번만 쓴다");
|
|
2000
|
+
/**
|
|
2001
|
+
* 응답의 조건 — 이 SDK가 아는 조건이거나 뒤에 더해질 조건(`field`만 확인한다)이다. 새 조건이 생겨도 옛 SDK의 응답 검증이 깨지지 않는다.
|
|
2002
|
+
*/
|
|
2003
|
+
const collectionRuleViewSchema = z.union([
|
|
2004
|
+
createdWithinDaysRuleSchema,
|
|
2005
|
+
categoryRuleSchema,
|
|
2006
|
+
priceRuleSchema,
|
|
2007
|
+
discountedRuleSchema,
|
|
2008
|
+
z.looseObject({ field: z.string() })
|
|
2009
|
+
]);
|
|
2010
|
+
const DAY_MS = 864e5;
|
|
2011
|
+
/** 카테고리 자신 + 모든 하위 카테고리 id */
|
|
2012
|
+
function descendantCategoryIdsOf(roots, categories) {
|
|
2013
|
+
const ids = new Set(roots);
|
|
2014
|
+
const children = /* @__PURE__ */ new Map();
|
|
2015
|
+
for (const category of categories) {
|
|
2016
|
+
if (!category.parentId) continue;
|
|
2017
|
+
const list = children.get(category.parentId);
|
|
2018
|
+
if (list) list.push(category.categoryId);
|
|
2019
|
+
else children.set(category.parentId, [category.categoryId]);
|
|
2020
|
+
}
|
|
2021
|
+
const queue = [...roots];
|
|
2022
|
+
for (let next = queue.shift(); next !== void 0; next = queue.shift()) for (const child of children.get(next) ?? []) {
|
|
2023
|
+
if (ids.has(child)) continue;
|
|
2024
|
+
ids.add(child);
|
|
2025
|
+
queue.push(child);
|
|
2026
|
+
}
|
|
2027
|
+
return ids;
|
|
2028
|
+
}
|
|
2029
|
+
/**
|
|
2030
|
+
* 조건 판정 함수를 만든다 — 모든 조건을 만족해야 true다(AND). 카테고리 트리는 여기서 한 번만 푼다.
|
|
2031
|
+
* 알 수 없는 조건(`field`)은 만족하지 않는 것으로 본다. 모르는 조건을 건너뛰면 상품이 예고 없이 늘어난다.
|
|
2032
|
+
* 판매 상태는 보지 않는다. 판매 중만 거르는 것은 호출부다.
|
|
2033
|
+
*/
|
|
2034
|
+
function collectionRulesPredicate(rules, context) {
|
|
2035
|
+
const checks = rules.map((rule) => {
|
|
2036
|
+
const known = collectionRuleSchema.safeParse(rule);
|
|
2037
|
+
if (!known.success) return () => false;
|
|
2038
|
+
const parsed = known.data;
|
|
2039
|
+
switch (parsed.field) {
|
|
2040
|
+
case "createdWithinDays": {
|
|
2041
|
+
const since = context.now.getTime() - parsed.value * DAY_MS;
|
|
2042
|
+
return (product) => Date.parse(product.createdAt) >= since;
|
|
2043
|
+
}
|
|
2044
|
+
case "category": {
|
|
2045
|
+
const ids = descendantCategoryIdsOf(parsed.categoryIds, context.categories);
|
|
2046
|
+
return (product) => product.categoryId !== null && ids.has(product.categoryId);
|
|
2047
|
+
}
|
|
2048
|
+
case "price": return (product) => {
|
|
2049
|
+
const price = product.discountedPrice ?? product.salePrice;
|
|
2050
|
+
return (parsed.min === void 0 || price >= parsed.min) && (parsed.max === void 0 || price <= parsed.max);
|
|
2051
|
+
};
|
|
2052
|
+
case "discounted": return (product) => product.discountedPrice !== null && product.discountedPrice < product.salePrice;
|
|
2053
|
+
default: return () => false;
|
|
2054
|
+
}
|
|
2055
|
+
});
|
|
2056
|
+
return (product) => checks.length > 0 && checks.every((check) => check(product));
|
|
2057
|
+
}
|
|
2058
|
+
/** 상품 하나가 조건을 모두 만족하는가 — 여러 상품을 판정할 때는 `collectionRulesPredicate`를 한 번 만들어 쓴다 */
|
|
2059
|
+
function matchesCollectionRules(product, rules, context) {
|
|
2060
|
+
return collectionRulesPredicate(rules, context)(product);
|
|
2061
|
+
}
|
|
2062
|
+
/** 조건이 참조하는 카테고리 id — 카테고리 삭제의 참조 검사에 쓴다 */
|
|
2063
|
+
function collectionRuleCategoryIds(rules) {
|
|
2064
|
+
const ids = [];
|
|
2065
|
+
for (const rule of rules) {
|
|
2066
|
+
const parsed = categoryRuleSchema.safeParse(rule);
|
|
2067
|
+
if (parsed.success) ids.push(...parsed.data.categoryIds);
|
|
2068
|
+
}
|
|
2069
|
+
return ids;
|
|
2070
|
+
}
|
|
1941
2071
|
const collectionSchema = z.object({
|
|
1942
2072
|
collectionId: z.string(),
|
|
1943
2073
|
type: z.string().describe("유형. 현재 값은 `MANUAL`·`AUTOMATIC`이고 값이 늘 수 있어 문자열이다"),
|
|
@@ -1946,6 +2076,7 @@ const collectionSchema = z.object({
|
|
|
1946
2076
|
description: z.string(),
|
|
1947
2077
|
imageUrl: z.string().nullable().describe("대표 이미지 주소"),
|
|
1948
2078
|
productSort: z.string().describe("스토어프론트 상품 기본 정렬"),
|
|
2079
|
+
rules: z.array(collectionRuleViewSchema).nullable().describe("조건 자동 컬렉션의 조건(AND). 직접 선택 컬렉션은 null"),
|
|
1949
2080
|
visible: z.boolean().describe("노출 여부. false면 기간과 무관하게 스토어프론트에 보이지 않는다"),
|
|
1950
2081
|
startsAt: z.string().nullable().describe("노출 시작 시각. null이면 바로 노출한다"),
|
|
1951
2082
|
endsAt: z.string().nullable().describe("노출 종료 시각. null이면 끝나지 않는다"),
|
|
@@ -1953,7 +2084,7 @@ const collectionSchema = z.object({
|
|
|
1953
2084
|
metaTitle: z.string().nullable(),
|
|
1954
2085
|
metaDescription: z.string().nullable(),
|
|
1955
2086
|
state: collectionStateSchema.describe("지금 노출 상태"),
|
|
1956
|
-
productCount: z.number().int().describe("담긴 상품 수(판매 상태 무관)"),
|
|
2087
|
+
productCount: z.number().int().describe("상품 수. 직접 선택은 담긴 상품 수(판매 상태 무관), 조건 자동은 지금 조건을 만족하는 판매 중 상품 수"),
|
|
1957
2088
|
revision: z.number().int().describe("수정 번호. 쓰기마다 1씩 오른다. 수정 본문에 주면 그 사이 다른 수정이 있을 때 409다"),
|
|
1958
2089
|
createdAt: z.string(),
|
|
1959
2090
|
updatedAt: z.string()
|
|
@@ -1980,16 +2111,18 @@ const periodRefine = (body, ctx) => {
|
|
|
1980
2111
|
});
|
|
1981
2112
|
};
|
|
1982
2113
|
/**
|
|
1983
|
-
* `POST /v1/collections` —
|
|
1984
|
-
* `productIds
|
|
2114
|
+
* `POST /v1/collections` — 컬렉션을 만든다. `slug`를 생략하면 `c-{id 뒤 8자}`로 만든다.
|
|
2115
|
+
* 직접 선택(`MANUAL`)은 `productIds`가 처음 담을 상품과 순서다. 조건 자동(`AUTOMATIC`)은 `rules`가 있어야 하고 `productIds`를 받지 않는다.
|
|
2116
|
+
* `productSort`를 생략하면 직접 선택은 `MANUAL`, 조건 자동은 `LATEST`다. 조건 자동은 `MANUAL`을 쓸 수 없다.
|
|
1985
2117
|
*/
|
|
1986
2118
|
const collectionCreateRequestSchema = z.object({
|
|
1987
2119
|
title: z.string().trim().min(1).max(60).describe("제목"),
|
|
1988
2120
|
slug: slugField.optional(),
|
|
1989
|
-
type: z.enum(
|
|
2121
|
+
type: z.enum(COLLECTION_TYPES).default("MANUAL").describe("유형. `MANUAL`(직접 선택)·`AUTOMATIC`(조건 자동). 만든 뒤 바꿀 수 없다"),
|
|
2122
|
+
rules: collectionRulesSchema.optional().describe("조건 자동 컬렉션의 조건(AND). 조건 자동이면 필수, 직접 선택이면 줄 수 없다"),
|
|
1990
2123
|
description: commonFields.description.default(""),
|
|
1991
2124
|
imageUrl: commonFields.imageUrl.optional(),
|
|
1992
|
-
productSort: commonFields.productSort.
|
|
2125
|
+
productSort: commonFields.productSort.optional().describe("스토어프론트 상품 기본 정렬. 생략하면 직접 선택은 `MANUAL`, 조건 자동은 `LATEST`다. 조건 자동은 `MANUAL`을 쓸 수 없다"),
|
|
1993
2126
|
visible: commonFields.visible.default(true),
|
|
1994
2127
|
startsAt: commonFields.startsAt,
|
|
1995
2128
|
endsAt: commonFields.endsAt,
|
|
@@ -2006,6 +2139,7 @@ const collectionPatchRequestSchema = z.object({
|
|
|
2006
2139
|
title: z.string().trim().min(1).max(60).optional(),
|
|
2007
2140
|
slug: slugField.optional(),
|
|
2008
2141
|
type: z.string().optional().describe("바꿀 수 없다. 주면 400 `COLLECTION_TYPE_IMMUTABLE`"),
|
|
2142
|
+
rules: collectionRulesSchema.optional().describe("조건 자동 컬렉션의 조건을 통째로 바꾼다. 직접 선택 컬렉션에 주면 400 `COLLECTION_RULES_NOT_ALLOWED`"),
|
|
2009
2143
|
description: commonFields.description.optional(),
|
|
2010
2144
|
imageUrl: commonFields.imageUrl.optional(),
|
|
2011
2145
|
productSort: commonFields.productSort.optional(),
|
|
@@ -2031,8 +2165,8 @@ const collectionProductSchema = z.object({
|
|
|
2031
2165
|
thumbnailUrl: z.string().nullable(),
|
|
2032
2166
|
status: z.string().describe("판매 상태. 스토어프론트에는 `SALE`만 보인다"),
|
|
2033
2167
|
salePrice: z.number().int(),
|
|
2034
|
-
position: z.number().int().describe("
|
|
2035
|
-
addedAt: z.string()
|
|
2168
|
+
position: z.number().int().describe("순서(1부터). 직접 선택은 셀러가 정한 순서, 조건 자동은 컬렉션 기본 정렬의 순위"),
|
|
2169
|
+
addedAt: z.string().describe("담은 시각. 조건 자동은 상품 등록 시각")
|
|
2036
2170
|
});
|
|
2037
2171
|
const collectionStateCountsSchema = z.object({
|
|
2038
2172
|
ALL: z.number().int(),
|
|
@@ -2059,6 +2193,16 @@ const collectionProductListQuerySchema = z.object({ ...pageQueryShape({
|
|
|
2059
2193
|
defaultSize: 100,
|
|
2060
2194
|
maxSize: MAX_COLLECTION_PRODUCTS
|
|
2061
2195
|
}) });
|
|
2196
|
+
/** `POST /v1/collections/preview` — 저장하지 않고 조건으로 나오는 상품을 본다 */
|
|
2197
|
+
const collectionPreviewRequestSchema = z.object({
|
|
2198
|
+
rules: collectionRulesSchema,
|
|
2199
|
+
productSort: collectionProductSortRequestSchema.optional().describe("미리보기 순서. 생략하거나 `MANUAL`이면 `LATEST`다")
|
|
2200
|
+
});
|
|
2201
|
+
/** 미리보기 응답 — 조건을 만족하는 판매 중 상품 수와 앞 20개 */
|
|
2202
|
+
const collectionPreviewSchema = z.object({
|
|
2203
|
+
count: z.number().int().describe("조건을 만족하는 판매 중 상품 수(조회 시각 기준)"),
|
|
2204
|
+
products: z.array(collectionProductSchema).describe("앞 20개(정렬 순)")
|
|
2205
|
+
});
|
|
2062
2206
|
//#endregion
|
|
2063
2207
|
//#region src/schemas/promotion.ts
|
|
2064
2208
|
/**
|
|
@@ -5954,13 +6098,15 @@ function createStoreClient(options) {
|
|
|
5954
6098
|
create: (body) => storeHttp.request("POST", "/collections", collectionSchema, { body: collectionCreateRequestSchema.parse(body) }),
|
|
5955
6099
|
update: (collectionId, body) => storeHttp.request("PATCH", path`/collections/${collectionId}`, collectionSchema, { body: collectionPatchRequestSchema.parse(body) }),
|
|
5956
6100
|
remove: (collectionId) => storeHttp.requestVoid("DELETE", path`/collections/${collectionId}`),
|
|
5957
|
-
/** 담긴 상품 — 직접 정한
|
|
6101
|
+
/** 담긴 상품 — 직접 선택은 정한 순서, 조건 자동은 지금 조건을 만족하는 판매 중 상품(기본 정렬 순) */
|
|
5958
6102
|
listProducts: (collectionId, params) => storeHttp.request("GET", path`/collections/${collectionId}/products`, pageSchema(collectionProductSchema), { query: params }),
|
|
5959
6103
|
/** 담긴 상품을 통째로 바꾼다(순서 포함) */
|
|
5960
6104
|
replaceProducts: (collectionId, body) => storeHttp.request("PUT", path`/collections/${collectionId}/products`, collectionSchema, { body: collectionProductsReplaceRequestSchema.parse(body) }),
|
|
5961
6105
|
/** 뒤에 붙인다. 이미 담긴 상품은 그 자리에 둔다 */
|
|
5962
6106
|
addProducts: (collectionId, body) => storeHttp.request("POST", path`/collections/${collectionId}/products`, collectionSchema, { body: collectionProductsAddRequestSchema.parse(body) }),
|
|
5963
|
-
removeProduct: (collectionId, productId) => storeHttp.requestVoid("DELETE", path`/collections/${collectionId}/products/${productId}`)
|
|
6107
|
+
removeProduct: (collectionId, productId) => storeHttp.requestVoid("DELETE", path`/collections/${collectionId}/products/${productId}`),
|
|
6108
|
+
/** 조건 자동 미리보기 — 저장하지 않고 조건을 만족하는 판매 중 상품 수와 앞 20개를 본다 */
|
|
6109
|
+
preview: (body) => storeHttp.request("POST", "/collections/preview", collectionPreviewSchema, { body: collectionPreviewRequestSchema.parse(body) })
|
|
5964
6110
|
},
|
|
5965
6111
|
categories: {
|
|
5966
6112
|
list: (params) => storeHttp.request("GET", "/categories", z.array(categorySchema), { query: params }),
|
|
@@ -7069,4 +7215,4 @@ function createStoreSession(options) {
|
|
|
7069
7215
|
};
|
|
7070
7216
|
}
|
|
7071
7217
|
//#endregion
|
|
7072
|
-
export { APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, ApiError, ApprovalPendingError, BUSINESS_INFO_MAX_LENGTH, BUSINESS_NUMBER_PATTERN, CASH_RECEIPT_STATUS_VALUES, COLLECTION_PRODUCT_SORTS, COLLECTION_SLUG_PATTERN, COLLECTION_TYPES, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, CUSTOM_INPUT_FORBIDDEN_WORDS, FULFILLMENT_RULES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_COLLECTIONS, MAX_COLLECTION_DESCRIPTION, MAX_COLLECTION_PRODUCTS, MAX_COLLECTION_PRODUCTS_PER_ADD, MAX_COLLECTION_TITLE, MAX_CUSTOM_INPUTS, MAX_CUSTOM_INPUT_LENGTH, MAX_OPTION_GROUPS, MAX_PRODUCT_IMAGES, MAX_SAVED_OPTION_SETS, MAX_SAVED_OPTION_SET_NAME, MAX_VALUES_PER_GROUP, MAX_VARIANTS, MCP_TELEMETRY_MAX_RESULTS, MIN_PAYMENT_AMOUNT, NO_COUPON_SETTLEMENT, NO_SHIPPING_BUNDLE_KEY, PAYMENT_ROUTING_EXCLUSION_CODES, 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, PORTONE_CHANNEL_NAME_MAX_LENGTH, PORTONE_MAX_CHANNELS, PORTONE_MIN_CHANNELS, REFUND_POLICY_DEFAULTS, REFUND_POLICY_DELIVERY_FEE_KEYS, REMOTE_AREA_ZIP_RANGES, RESERVED_STOREFRONT_SLUGS, RESERVED_STORE_CODES, SHIPPING_POLICY_DEFAULTS, STOREFRONT_BLOCKED_PATH_SEGMENTS, STOREFRONT_BUILD_STAGES, STOREFRONT_BUILD_TERMINAL_STATUSES, STOREFRONT_CHECK_TERMINAL_STATUSES, STOREFRONT_CUSTOM_DOMAIN_LIMIT_DEFAULT, STOREFRONT_DOMAIN_DNS_GRACE_DAYS, STOREFRONT_DOMAIN_DNS_WAIT_DAYS, STOREFRONT_DOMAIN_TXT_LABEL, STOREFRONT_EDIT_ACTIVITY_TIMEOUT_MINUTES, STOREFRONT_EDIT_CAPACITY, STOREFRONT_EDIT_IDLE_MINUTES, STOREFRONT_EDIT_PREVIEW_SUFFIX, STOREFRONT_EDIT_START_STAGES, STOREFRONT_FILE_BATCH_MAX, STOREFRONT_FILE_MAX_BYTES, STOREFRONT_PATH_SEGMENT_PATTERN, STOREFRONT_PLATFORM_DOMAINS, STOREFRONT_PUBLIC_SUFFIXES, STOREFRONT_SEARCH_REGEX_MAX_LENGTH, STOREFRONT_SHOWCASE_SLUG_PREFIX, STOREFRONT_SITE_CREATE_LIMIT, STOREFRONT_SLUG_CHANGE_LIMIT, STOREFRONT_SLUG_CHANGE_WINDOW_DAYS, STOREFRONT_SLUG_HOLD_DAYS, STOREFRONT_SLUG_PATTERN, STOREFRONT_SOURCE_BLOB_BATCH_MAX, STOREFRONT_SOURCE_PART_BYTES, STOREFRONT_WORKSPACE_MAX_BYTES, STOREFRONT_WORKSPACE_MAX_FILES, STORE_CODE_PATTERN, STORE_ROLE_SCOPES, STORE_SCOPE_RESOURCES, STORE_SESSION_KEYS, TOSS_WIDGET_CLIENT_KEY_PATTERN, TOSS_WIDGET_KEY_MESSAGE, TOSS_WIDGET_SECRET_KEY_PATTERN, UPLOAD_PURPOSE_LIMITS, VARIANT_COUNT_WARNING, VARIANT_STOCK_EXCLUSIVE_MESSAGE, WEBHOOK_DEFAULT_TOLERANCE_SEC, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_FAILURE_REASONS, WEBHOOK_HEADERS, WEBHOOK_PAYLOAD_EXCERPT_MAX_BYTES, WEBHOOK_RESOURCE_TYPES, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_USER_AGENT, addStorefrontDomainRequestSchema, addonGroupRequestSchema, addonGroupSchema, addonValueRequestSchema, addonValueSchema, addressChangeRequestListSchema, addressTypeSchema, agentPolicyDecisionSchema, allocateByWeight, analyticsChannelSchema, analyticsCheckoutOutcomeSchema, analyticsCheckoutSchema, analyticsDeviceRowSchema, analyticsDevicesSchema, analyticsFunnelStepSchema, analyticsOriginSchema, analyticsOverviewSchema, analyticsPagesQuerySchema, analyticsPagesSchema, analyticsProductRowSchema, analyticsProductSortSchema, analyticsProductsQuerySchema, analyticsProductsSchema, analyticsRangeQuerySchema, analyticsRealtimeSchema, analyticsSearchQuerySchema, analyticsSearchSchema, analyticsSourceGroupBySchema, analyticsSourceRowSchema, analyticsSourcesQuerySchema, analyticsSourcesSchema, analyticsTotalsSchema, apiLogErrorSchema, apiLogListQuerySchema, apiLogPageSchema, apiLogPrincipalSchema, apiLogPrincipalTypeSchema, apiLogSchema, apiLogStatusFilterSchema, apiLogSummarySchema, approvalDecisionRequestSchema, approvalListQuerySchema, approvalPageSchema, approvalRequestSchema, approvalStatusSchema, approveClaimResultSchema, auditActorSchema, auditActorTypeSchema, auditLogListQuerySchema, auditLogOutcomeSchema, auditLogPageSchema, auditLogSchema, auditLogSourceSchema, buildAuthorizeUrl, buildQuery, bulkResultSchema, businessInfoPatchShape, businessInfoResponseShape, businessNumberSchema, cancelBySellerRequestSchema, cancelBySellerResultSchema, carrierSchema, cashReceiptSchema, categoryAttributeSchema, categoryCreateRequestSchema, categoryDeleteQuerySchema, categoryDeleteStrategySchema, categoryListQuerySchema, categoryPatchRequestSchema, categoryProductSortSchema, categorySchema, categorySearchResultSchema, categoryTreeNodeSchema, categoryWithPathSchema, changeStorefrontSlugRequestSchema, changeStorefrontTemplateRequestSchema, changeTypeSchema, claimDetailSchema, claimHoldResultSchema, claimListQuerySchema, claimReasonSchema, claimReturnAddressSchema, claimSchema, claimStatusSchema, claimTypeSchema, claimWebhookEventDataSchema, claimWebhookEventSchema, collectionCreateRequestSchema, collectionListQuerySchema, collectionPageSchema, collectionPatchRequestSchema, collectionProductListQuerySchema, collectionProductSchema, collectionProductSortRequestSchema, collectionProductsAddRequestSchema, collectionProductsReplaceRequestSchema, collectionSchema, collectionStateCountsSchema, collectionStateOf, collectionStateSchema, consentActionSchema, consentKindSchema, consentSourceSchema, couponBenefitSchema, couponConditionsInputSchema, couponConditionsSchema, couponDiscountOf, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponListQuerySchema, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRuleSchema, couponSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetSchema, createCouponRequestSchema, createPkcePair, createStoreClient, createStoreSession, createStorefrontEditPreviewLinkRequestSchema, createStorefrontPreviewLinkRequestSchema, createStorefrontSiteRequestSchema, createStorefrontVersionRequestSchema, customInputLabelForbiddenWord, customInputRequestSchema, customInputSchema, customInputValueSchema, customerAddressSchema, customerConsentListQuerySchema, customerConsentSchema, customerConsentStateSchema, customerConsentsSchema, customerCouponSchema, customerDelegationRequestSchema, customerDelegationSchema, customerDetailSchema, customerInquiryCategorySchema, customerInquiryListQuerySchema, customerListQuerySchema, customerOrderSchema, customerPointsSchema, customerSortSchema, customerStatsSchema, customerSummarySchema, customerWithdrawalBlockedDetailsSchema, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, eventTypeSchema, exchangeAuthorizationCode, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, invitationDeliveryStatusSchema, invitationListQuerySchema, invitationSchema, inviteMemberRequestSchema, isCouponTargetLine, isEditableStorefrontPath, isReservedStoreCode, isReservedStorefrontSlug, isShowcaseStorefrontSlug, isStoreScope, isWebOrigin, issueCouponRequestSchema, issueCouponResultSchema, liveGateConditionCodeSchema, liveGateConditionSchema, liveGateErrorDetailsSchema, liveGateSchema, loginProviderSchema, loginProviderStatusSchema, loginProviderTestSchema, loginSettingsSchema, maskedSecretSchema, mcpRuleResultSchema, mcpToolEventSchema, moveStorefrontFileRequestSchema, myAccountSchema, myStoreSchema, normalizeBusinessNumber, normalizeCouponCode, normalizeStorefrontHostname, normalizeStorefrontPath, oauthTokenResponseSchema, openFulfillmentUnion, optionGroupKindSchema, optionGroupRequestSchema, optionGroupSchema, optionModelRequestSchema, optionModelSchema, optionSelectionSchema, optionSortSchema, optionValueRequestSchema, optionValueSchema, orderCanceledWebhookEventDataSchema, orderCanceledWebhookEventSchema, orderDiscountSchema, orderFulfilledWebhookEventDataSchema, orderFulfilledWebhookEventSchema, orderItemFulfillmentSchema, orderItemFulfillmentSnapshotResponseSchema, orderItemFulfillmentSnapshotSchema, orderItemListQuerySchema, orderItemMemoResultSchema, orderItemPageSchema, orderItemSchema, orderItemStatusSchema, orderListQuerySchema, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentFailureWarningSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderSchema, pgVerificationResultSchema, planCodeSchema, planEntitlementsSchema, planErrorDetailsSchema, pointAdjustmentRequestSchema, pointAdjustmentResultSchema, pointEarnOf, pointEarnRateBpSchema, pointEarningEnabled, pointEntrySchema, pointExpiresAtOf, pointHistoryQuerySchema, pointLotSchema, pointPolicyNoticeSchema, pointPolicySchema, policyDocumentUrlSchema, policyVersionSchema, portOneChannelSchema, portOneCredentialsInputSchema, productCreateRequestSchema, productFulfillmentCreateSchema, productFulfillmentResponseSchema, productFulfillmentSchema, productFulfillmentUpdateSchema, productImageRejection, productImageUrlSchema, productListQuerySchema, productOutOfStockWebhookEventDataSchema, productOutOfStockWebhookEventSchema, productPatchRequestSchema, productRefundPolicyOverride, productRefundPolicyPatchSchema, productReplaceRequestSchema, productSchema, productSortSchema, productStatusSchema, productSummarySchema, productVariantRequestSchema, productVariantSchema, proratedPaidRefundBase, proratedRefundBase, publicPlanSchema, publicPlansSchema, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, purchaseEarnPolicySchema, purchaseEarnRateOf, quoteDelivery, quotePricing, refreshUserToken, refundPolicyPatchSchema, refundPolicySchema, rejectClaimRequestSchema, remoteAreaLabelOf, remoteAreaOf, remoteAreaSchema, remoteSurchargeOf, replaceStorefrontSourceRequestSchema, requiresCollection, requiresShipping, resolvePointPolicy, resolveRefundPolicy, resolveShippingPolicy, responsePlanCodeSchema, responsePointEntryTypeSchema, reviewListQuerySchema, reviewReportResultSchema, reviewRewardPointOf, reviewRewardPolicySchema, reviewSchema, reviewSortSchema, reviewWebhookEventDataSchema, reviewWebhookEventSchema, rollbackStorefrontRequestSchema, runStorefrontCheckRequestSchema, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCustomerInquirySchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingPolicyPatchSchema, shippingPolicySchema, storeCodeSchema, storeMemberRoleUpdatedSchema, storeMemberSchema, storePointPolicySchema, storeRoleSchema, storeSchema, storeScopeResourceSchema, storeSubscriptionSchema, storefrontBuildDependenciesSchema, storefrontBuildListQuerySchema, storefrontBuildSchema, storefrontBuildStatusSchema, storefrontCheckSchema, storefrontCheckStatusSchema, storefrontCustomDomainStatusSchema, storefrontCustomHostnameProblem, storefrontDependencyFindingSchema, storefrontDeploymentLogSchema, storefrontDeploymentSchema, storefrontDeploymentStepSchema, storefrontDnsRecordSchema, storefrontDomainSchema, storefrontDomainTxtNameOf, storefrontEditPreviewLabelOf, storefrontEditPreviewSchema, storefrontEditSessionSchema, storefrontEditSessionStatusSchema, storefrontEditingSchema, storefrontFileConflictDetailsSchema, storefrontFileContentQuerySchema, storefrontFileContentSchema, storefrontFileDeleteResultSchema, storefrontFileEncodingSchema, storefrontFileEntrySchema, storefrontFileHashSchema, storefrontFileListQuerySchema, storefrontFileListSchema, storefrontFileMoveResultSchema, storefrontFilePathSchema, storefrontFileSearchResultSchema, storefrontFileWriteResultSchema, storefrontHostingSchema, storefrontPreviewLinkSchema, storefrontProvisioningSchema, storefrontRuleResultSchema, storefrontRuleSeveritySchema, storefrontSiteDomainSchema, storefrontSiteDomainsSchema, storefrontSiteSchema, storefrontSiteStatusSchema, storefrontSlugAvailabilityQuerySchema, storefrontSlugAvailabilitySchema, storefrontSlugSchema, storefrontSourceArchivePartSchema, storefrontSourceArchiveQuerySchema, storefrontSourceBlobsResultSchema, storefrontSourceModeSchema, storefrontSourceRefSchema, storefrontSourceReplacedSchema, storefrontSourceSchema, storefrontSuspensionSchema, storefrontTemplateSchema, storefrontVerifyReportSchema, storefrontVersionCreatedSchema, storefrontVersionSchema, storefrontVersionStatusSchema, storefrontVisibilitySchema, subscriptionLimitsSchema, subscriptionStatusSchema, subscriptionUsageSchema, tossPaymentsCredentialsInputSchema, trackingStageResponseSchema, trackingUpdateResultSchema, updateCouponRequestSchema, updateLoginProviderRequestSchema, updateLoginSettingsRequestSchema, updateMemberRoleRequestSchema, updatePaymentProviderRequestSchema, updatePaymentSettingsRequestSchema, updatePointPolicyRequestSchema, updateStoreRequestSchema, uploadExtensionOf, uploadPurposeSchema, uploadRejection, uploadRequestSchema, uploadStorefrontSourceBlobsRequestSchema, uploadTicketSchema, upsertPortOneProviderRequestSchema, upsertTossPaymentsProviderRequestSchema, variantStockRequestSchema, variantStockSchema, verifyPaymentProviderRequestSchema, webhookCreatedSchema, webhookDeliveryDetailSchema, webhookDeliveryErrorCodeSchema, webhookDeliveryListQuerySchema, webhookDeliveryResourceSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEventSchema, webhookFailureReasonSchema, webhookRedeliverFailedResultSchema, webhookRequestHeaderSchema, webhookRequestSchema, webhookResourceTypeSchema, webhookSchema, webhookSecretRotatedSchema, webhookStatusSchema, webhookTestRequestSchema, webhookTestResultSchema, withdrawCustomerRequestSchema, writeDryRunResultSchema, writePreviewSchema, writeStorefrontFilesRequestSchema };
|
|
7218
|
+
export { APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, ApiError, ApprovalPendingError, BUSINESS_INFO_MAX_LENGTH, BUSINESS_NUMBER_PATTERN, CASH_RECEIPT_STATUS_VALUES, COLLECTION_PREVIEW_SIZE, COLLECTION_PRODUCT_SORTS, COLLECTION_SLUG_PATTERN, COLLECTION_TYPES, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, CUSTOM_INPUT_FORBIDDEN_WORDS, FULFILLMENT_RULES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_COLLECTIONS, 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_OPTION_GROUPS, MAX_PRODUCT_IMAGES, MAX_SAVED_OPTION_SETS, MAX_SAVED_OPTION_SET_NAME, MAX_VALUES_PER_GROUP, MAX_VARIANTS, MCP_TELEMETRY_MAX_RESULTS, MIN_PAYMENT_AMOUNT, NO_COUPON_SETTLEMENT, NO_SHIPPING_BUNDLE_KEY, PAYMENT_ROUTING_EXCLUSION_CODES, 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, PORTONE_CHANNEL_NAME_MAX_LENGTH, PORTONE_MAX_CHANNELS, PORTONE_MIN_CHANNELS, REFUND_POLICY_DEFAULTS, REFUND_POLICY_DELIVERY_FEE_KEYS, REMOTE_AREA_ZIP_RANGES, RESERVED_STOREFRONT_SLUGS, RESERVED_STORE_CODES, SHIPPING_POLICY_DEFAULTS, STOREFRONT_BLOCKED_PATH_SEGMENTS, STOREFRONT_BUILD_STAGES, STOREFRONT_BUILD_TERMINAL_STATUSES, STOREFRONT_CHECK_TERMINAL_STATUSES, STOREFRONT_CUSTOM_DOMAIN_LIMIT_DEFAULT, STOREFRONT_DOMAIN_DNS_GRACE_DAYS, STOREFRONT_DOMAIN_DNS_WAIT_DAYS, STOREFRONT_DOMAIN_TXT_LABEL, STOREFRONT_EDIT_ACTIVITY_TIMEOUT_MINUTES, STOREFRONT_EDIT_CAPACITY, STOREFRONT_EDIT_IDLE_MINUTES, STOREFRONT_EDIT_PREVIEW_SUFFIX, STOREFRONT_EDIT_START_STAGES, STOREFRONT_FILE_BATCH_MAX, STOREFRONT_FILE_MAX_BYTES, STOREFRONT_PATH_SEGMENT_PATTERN, STOREFRONT_PLATFORM_DOMAINS, STOREFRONT_PUBLIC_SUFFIXES, STOREFRONT_SEARCH_REGEX_MAX_LENGTH, STOREFRONT_SHOWCASE_SLUG_PREFIX, STOREFRONT_SITE_CREATE_LIMIT, STOREFRONT_SLUG_CHANGE_LIMIT, STOREFRONT_SLUG_CHANGE_WINDOW_DAYS, STOREFRONT_SLUG_HOLD_DAYS, STOREFRONT_SLUG_PATTERN, STOREFRONT_SOURCE_BLOB_BATCH_MAX, STOREFRONT_SOURCE_PART_BYTES, STOREFRONT_WORKSPACE_MAX_BYTES, STOREFRONT_WORKSPACE_MAX_FILES, STORE_CODE_PATTERN, STORE_ROLE_SCOPES, STORE_SCOPE_RESOURCES, STORE_SESSION_KEYS, TOSS_WIDGET_CLIENT_KEY_PATTERN, TOSS_WIDGET_KEY_MESSAGE, TOSS_WIDGET_SECRET_KEY_PATTERN, UPLOAD_PURPOSE_LIMITS, VARIANT_COUNT_WARNING, VARIANT_STOCK_EXCLUSIVE_MESSAGE, WEBHOOK_DEFAULT_TOLERANCE_SEC, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_FAILURE_REASONS, WEBHOOK_HEADERS, WEBHOOK_PAYLOAD_EXCERPT_MAX_BYTES, WEBHOOK_RESOURCE_TYPES, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_USER_AGENT, addStorefrontDomainRequestSchema, addonGroupRequestSchema, addonGroupSchema, addonValueRequestSchema, addonValueSchema, addressChangeRequestListSchema, addressTypeSchema, agentPolicyDecisionSchema, allocateByWeight, analyticsChannelSchema, analyticsCheckoutOutcomeSchema, analyticsCheckoutSchema, analyticsDeviceRowSchema, analyticsDevicesSchema, analyticsFunnelStepSchema, analyticsOriginSchema, analyticsOverviewSchema, analyticsPagesQuerySchema, analyticsPagesSchema, analyticsProductRowSchema, analyticsProductSortSchema, analyticsProductsQuerySchema, analyticsProductsSchema, analyticsRangeQuerySchema, analyticsRealtimeSchema, analyticsSearchQuerySchema, analyticsSearchSchema, analyticsSourceGroupBySchema, analyticsSourceRowSchema, analyticsSourcesQuerySchema, analyticsSourcesSchema, analyticsTotalsSchema, apiLogErrorSchema, apiLogListQuerySchema, apiLogPageSchema, apiLogPrincipalSchema, apiLogPrincipalTypeSchema, apiLogSchema, apiLogStatusFilterSchema, apiLogSummarySchema, approvalDecisionRequestSchema, approvalListQuerySchema, approvalPageSchema, approvalRequestSchema, approvalStatusSchema, approveClaimResultSchema, auditActorSchema, auditActorTypeSchema, auditLogListQuerySchema, auditLogOutcomeSchema, auditLogPageSchema, auditLogSchema, auditLogSourceSchema, buildAuthorizeUrl, buildQuery, bulkResultSchema, businessInfoPatchShape, businessInfoResponseShape, businessNumberSchema, cancelBySellerRequestSchema, cancelBySellerResultSchema, carrierSchema, cashReceiptSchema, categoryAttributeSchema, categoryCreateRequestSchema, categoryDeleteQuerySchema, categoryDeleteStrategySchema, categoryListQuerySchema, categoryPatchRequestSchema, categoryProductSortSchema, categorySchema, categorySearchResultSchema, categoryTreeNodeSchema, categoryWithPathSchema, changeStorefrontSlugRequestSchema, changeStorefrontTemplateRequestSchema, changeTypeSchema, claimDetailSchema, claimHoldResultSchema, claimListQuerySchema, claimReasonSchema, claimReturnAddressSchema, claimSchema, claimStatusSchema, claimTypeSchema, claimWebhookEventDataSchema, claimWebhookEventSchema, collectionCreateRequestSchema, collectionListQuerySchema, collectionPageSchema, collectionPatchRequestSchema, collectionPreviewRequestSchema, collectionPreviewSchema, collectionProductListQuerySchema, collectionProductSchema, collectionProductSortRequestSchema, collectionProductsAddRequestSchema, collectionProductsReplaceRequestSchema, collectionRuleCategoryIds, collectionRuleSchema, collectionRuleViewSchema, collectionRulesPredicate, collectionRulesSchema, collectionSchema, collectionStateCountsSchema, collectionStateOf, collectionStateSchema, consentActionSchema, consentKindSchema, consentSourceSchema, couponBenefitSchema, couponConditionsInputSchema, couponConditionsSchema, couponDiscountOf, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponListQuerySchema, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRuleSchema, couponSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetSchema, createCouponRequestSchema, createPkcePair, createStoreClient, createStoreSession, createStorefrontEditPreviewLinkRequestSchema, createStorefrontPreviewLinkRequestSchema, createStorefrontSiteRequestSchema, createStorefrontVersionRequestSchema, customInputLabelForbiddenWord, customInputRequestSchema, customInputSchema, customInputValueSchema, customerAddressSchema, customerConsentListQuerySchema, customerConsentSchema, customerConsentStateSchema, customerConsentsSchema, customerCouponSchema, customerDelegationRequestSchema, customerDelegationSchema, customerDetailSchema, customerInquiryCategorySchema, customerInquiryListQuerySchema, customerListQuerySchema, customerOrderSchema, customerPointsSchema, customerSortSchema, customerStatsSchema, customerSummarySchema, customerWithdrawalBlockedDetailsSchema, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, descendantCategoryIdsOf, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, eventTypeSchema, exchangeAuthorizationCode, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, invitationDeliveryStatusSchema, invitationListQuerySchema, invitationSchema, inviteMemberRequestSchema, isCouponTargetLine, isEditableStorefrontPath, isReservedStoreCode, isReservedStorefrontSlug, isShowcaseStorefrontSlug, isStoreScope, isWebOrigin, issueCouponRequestSchema, issueCouponResultSchema, liveGateConditionCodeSchema, liveGateConditionSchema, liveGateErrorDetailsSchema, liveGateSchema, loginProviderSchema, loginProviderStatusSchema, loginProviderTestSchema, loginSettingsSchema, maskedSecretSchema, matchesCollectionRules, mcpRuleResultSchema, mcpToolEventSchema, moveStorefrontFileRequestSchema, myAccountSchema, myStoreSchema, normalizeBusinessNumber, normalizeCouponCode, normalizeStorefrontHostname, normalizeStorefrontPath, oauthTokenResponseSchema, openFulfillmentUnion, optionGroupKindSchema, optionGroupRequestSchema, optionGroupSchema, optionModelRequestSchema, optionModelSchema, optionSelectionSchema, optionSortSchema, optionValueRequestSchema, optionValueSchema, orderCanceledWebhookEventDataSchema, orderCanceledWebhookEventSchema, orderDiscountSchema, orderFulfilledWebhookEventDataSchema, orderFulfilledWebhookEventSchema, orderItemFulfillmentSchema, orderItemFulfillmentSnapshotResponseSchema, orderItemFulfillmentSnapshotSchema, orderItemListQuerySchema, orderItemMemoResultSchema, orderItemPageSchema, orderItemSchema, orderItemStatusSchema, orderListQuerySchema, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentFailureWarningSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderSchema, pgVerificationResultSchema, planCodeSchema, planEntitlementsSchema, planErrorDetailsSchema, pointAdjustmentRequestSchema, pointAdjustmentResultSchema, pointEarnOf, pointEarnRateBpSchema, pointEarningEnabled, pointEntrySchema, pointExpiresAtOf, pointHistoryQuerySchema, pointLotSchema, pointPolicyNoticeSchema, pointPolicySchema, policyDocumentUrlSchema, policyVersionSchema, portOneChannelSchema, portOneCredentialsInputSchema, productCreateRequestSchema, productFulfillmentCreateSchema, productFulfillmentResponseSchema, productFulfillmentSchema, productFulfillmentUpdateSchema, productImageRejection, productImageUrlSchema, productListQuerySchema, productOutOfStockWebhookEventDataSchema, productOutOfStockWebhookEventSchema, productPatchRequestSchema, productRefundPolicyOverride, productRefundPolicyPatchSchema, productReplaceRequestSchema, productSchema, productSortSchema, productStatusSchema, productSummarySchema, productVariantRequestSchema, productVariantSchema, proratedPaidRefundBase, proratedRefundBase, publicPlanSchema, publicPlansSchema, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, purchaseEarnPolicySchema, purchaseEarnRateOf, quoteDelivery, quotePricing, refreshUserToken, refundPolicyPatchSchema, refundPolicySchema, rejectClaimRequestSchema, remoteAreaLabelOf, remoteAreaOf, remoteAreaSchema, remoteSurchargeOf, replaceStorefrontSourceRequestSchema, requiresCollection, requiresShipping, resolvePointPolicy, resolveRefundPolicy, resolveShippingPolicy, responsePlanCodeSchema, responsePointEntryTypeSchema, reviewListQuerySchema, reviewReportResultSchema, reviewRewardPointOf, reviewRewardPolicySchema, reviewSchema, reviewSortSchema, reviewWebhookEventDataSchema, reviewWebhookEventSchema, rollbackStorefrontRequestSchema, runStorefrontCheckRequestSchema, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCustomerInquirySchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingPolicyPatchSchema, shippingPolicySchema, storeCodeSchema, storeMemberRoleUpdatedSchema, storeMemberSchema, storePointPolicySchema, storeRoleSchema, storeSchema, storeScopeResourceSchema, storeSubscriptionSchema, storefrontBuildDependenciesSchema, storefrontBuildListQuerySchema, storefrontBuildSchema, storefrontBuildStatusSchema, storefrontCheckSchema, storefrontCheckStatusSchema, storefrontCustomDomainStatusSchema, storefrontCustomHostnameProblem, storefrontDependencyFindingSchema, storefrontDeploymentLogSchema, storefrontDeploymentSchema, storefrontDeploymentStepSchema, storefrontDnsRecordSchema, storefrontDomainSchema, storefrontDomainTxtNameOf, storefrontEditPreviewLabelOf, storefrontEditPreviewSchema, storefrontEditSessionSchema, storefrontEditSessionStatusSchema, storefrontEditingSchema, storefrontFileConflictDetailsSchema, storefrontFileContentQuerySchema, storefrontFileContentSchema, storefrontFileDeleteResultSchema, storefrontFileEncodingSchema, storefrontFileEntrySchema, storefrontFileHashSchema, storefrontFileListQuerySchema, storefrontFileListSchema, storefrontFileMoveResultSchema, storefrontFilePathSchema, storefrontFileSearchResultSchema, storefrontFileWriteResultSchema, storefrontHostingSchema, storefrontPreviewLinkSchema, storefrontProvisioningSchema, storefrontRuleResultSchema, storefrontRuleSeveritySchema, storefrontSiteDomainSchema, storefrontSiteDomainsSchema, storefrontSiteSchema, storefrontSiteStatusSchema, storefrontSlugAvailabilityQuerySchema, storefrontSlugAvailabilitySchema, storefrontSlugSchema, storefrontSourceArchivePartSchema, storefrontSourceArchiveQuerySchema, storefrontSourceBlobsResultSchema, storefrontSourceModeSchema, storefrontSourceRefSchema, storefrontSourceReplacedSchema, storefrontSourceSchema, storefrontSuspensionSchema, storefrontTemplateSchema, storefrontVerifyReportSchema, storefrontVersionCreatedSchema, storefrontVersionSchema, storefrontVersionStatusSchema, storefrontVisibilitySchema, subscriptionLimitsSchema, subscriptionStatusSchema, subscriptionUsageSchema, tossPaymentsCredentialsInputSchema, trackingStageResponseSchema, trackingUpdateResultSchema, updateCouponRequestSchema, updateLoginProviderRequestSchema, updateLoginSettingsRequestSchema, updateMemberRoleRequestSchema, updatePaymentProviderRequestSchema, updatePaymentSettingsRequestSchema, updatePointPolicyRequestSchema, updateStoreRequestSchema, uploadExtensionOf, uploadPurposeSchema, uploadRejection, uploadRequestSchema, uploadStorefrontSourceBlobsRequestSchema, uploadTicketSchema, upsertPortOneProviderRequestSchema, upsertTossPaymentsProviderRequestSchema, variantStockRequestSchema, variantStockSchema, verifyPaymentProviderRequestSchema, webhookCreatedSchema, webhookDeliveryDetailSchema, webhookDeliveryErrorCodeSchema, webhookDeliveryListQuerySchema, webhookDeliveryResourceSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEventSchema, webhookFailureReasonSchema, webhookRedeliverFailedResultSchema, webhookRequestHeaderSchema, webhookRequestSchema, webhookResourceTypeSchema, webhookSchema, webhookSecretRotatedSchema, webhookStatusSchema, webhookTestRequestSchema, webhookTestResultSchema, withdrawCustomerRequestSchema, writeDryRunResultSchema, writePreviewSchema, writeStorefrontFilesRequestSchema };
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -56,11 +56,14 @@ import {
|
|
|
56
56
|
type CollectionCreateRequestInput,
|
|
57
57
|
type CollectionListParams,
|
|
58
58
|
type CollectionPatchRequest,
|
|
59
|
+
type CollectionPreviewRequest,
|
|
59
60
|
type CollectionProductsAddRequest,
|
|
60
61
|
type CollectionProductsReplaceRequest,
|
|
61
62
|
collectionCreateRequestSchema,
|
|
62
63
|
collectionPageSchema,
|
|
63
64
|
collectionPatchRequestSchema,
|
|
65
|
+
collectionPreviewRequestSchema,
|
|
66
|
+
collectionPreviewSchema,
|
|
64
67
|
collectionProductSchema,
|
|
65
68
|
collectionProductsAddRequestSchema,
|
|
66
69
|
collectionProductsReplaceRequestSchema,
|
|
@@ -560,7 +563,7 @@ export function createStoreClient(options: StoreClientOptions) {
|
|
|
560
563
|
}),
|
|
561
564
|
remove: (collectionId: string) =>
|
|
562
565
|
storeHttp.requestVoid("DELETE", path`/collections/${collectionId}`),
|
|
563
|
-
/** 담긴 상품 — 직접 정한
|
|
566
|
+
/** 담긴 상품 — 직접 선택은 정한 순서, 조건 자동은 지금 조건을 만족하는 판매 중 상품(기본 정렬 순) */
|
|
564
567
|
listProducts: (collectionId: string, params?: { page?: number; size?: number }) =>
|
|
565
568
|
storeHttp.request(
|
|
566
569
|
"GET",
|
|
@@ -580,6 +583,11 @@ export function createStoreClient(options: StoreClientOptions) {
|
|
|
580
583
|
}),
|
|
581
584
|
removeProduct: (collectionId: string, productId: string) =>
|
|
582
585
|
storeHttp.requestVoid("DELETE", path`/collections/${collectionId}/products/${productId}`),
|
|
586
|
+
/** 조건 자동 미리보기 — 저장하지 않고 조건을 만족하는 판매 중 상품 수와 앞 20개를 본다 */
|
|
587
|
+
preview: (body: CollectionPreviewRequest) =>
|
|
588
|
+
storeHttp.request("POST", "/collections/preview", collectionPreviewSchema, {
|
|
589
|
+
body: collectionPreviewRequestSchema.parse(body),
|
|
590
|
+
}),
|
|
583
591
|
},
|
|
584
592
|
|
|
585
593
|
categories: {
|