@sayren/store-sdk 0.29.8 → 0.30.1
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 +593 -74
- package/dist/index.mjs +216 -32
- package/package.json +1 -1
- package/src/client.ts +98 -23
- package/src/schemas/category.ts +14 -0
- package/src/schemas/commerce-flow.ts +236 -32
- package/src/schemas/misc.ts +2 -0
- package/src/schemas/order.ts +10 -0
- package/src/schemas/product.ts +21 -0
- package/src/schemas/webhook-event.ts +26 -0
package/dist/index.mjs
CHANGED
|
@@ -665,6 +665,7 @@ const categorySchema = z.object({
|
|
|
665
665
|
metaTitle: z.string().nullable(),
|
|
666
666
|
metaDescription: z.string().nullable(),
|
|
667
667
|
metaKeywords: z.string().nullable(),
|
|
668
|
+
flowId: z.string().nullable().optional().describe("주문 흐름(이슈 #115) — 맨 아래 카테고리에만 있다. 흐름을 지정하지 않은 상품이 쓴다. null이면 기본 흐름"),
|
|
668
669
|
createdAt: z.string(),
|
|
669
670
|
updatedAt: z.string()
|
|
670
671
|
});
|
|
@@ -713,7 +714,8 @@ const categoryPatchRequestSchema = z.object({
|
|
|
713
714
|
productSort: categoryProductSortSchema.optional(),
|
|
714
715
|
metaTitle: z.string().max(100).nullable().optional(),
|
|
715
716
|
metaDescription: z.string().max(300).nullable().optional(),
|
|
716
|
-
metaKeywords: z.string().max(200).nullable().optional()
|
|
717
|
+
metaKeywords: z.string().max(200).nullable().optional(),
|
|
718
|
+
flowId: z.string().nullable().optional().describe("주문 흐름(이슈 #115) — 게시한 흐름 id, null이면 기본 흐름. 맨 아래 카테고리에만 지정한다(400 `CATEGORY_NOT_LEAF`). 게시하지 않은 흐름은 409 `FLOW_NOT_PUBLISHED`")
|
|
717
719
|
});
|
|
718
720
|
const categoryDeleteStrategySchema = z.enum(["reparent", "cascade"]);
|
|
719
721
|
/**
|
|
@@ -2000,6 +2002,7 @@ const productSchema = productSummarySchema.extend({
|
|
|
2000
2002
|
optionSort: optionSortSchema.optional().default("REGISTERED").describe("옵션 값 정렬 순서(이슈 #59). 서버는 항상 싣는다"),
|
|
2001
2003
|
fulfillment: productFulfillmentResponseSchema,
|
|
2002
2004
|
inventoryMode: z.string().optional().describe("재고 방식(이슈 #118). 날짜별 재고 상품만 `DATED`를 싣는다. 없으면 `STANDARD`"),
|
|
2005
|
+
flowId: z.string().nullable().optional().describe("주문 흐름(이슈 #115) — 상품에 지정한 흐름. null이면 카테고리의 흐름, 그것도 없으면 기본 흐름"),
|
|
2003
2006
|
fulfillmentTypeLocked: z.boolean().describe("판매 이력(주문상품)이 있어 상품 유형(`fulfillment.type`)을 바꿀 수 없는가. true면 다른 유형으로 수정하는 요청이 409 `FULFILLMENT_TYPE_LOCKED`다. 같은 유형 안의 속성은 바꿀 수 있다"),
|
|
2004
2007
|
refundPolicy: productRefundPolicyPatchSchema.nullable().describe("상품별 환불 정책 덮어쓰기(상품이 정한 항목만). null이면 상점 기본 환불 정책을 쓴다. 반품·교환 배송비(`returnDeliveryFee`·`exchangeDeliveryFee`)는 배송 상품에만 있다"),
|
|
2005
2008
|
/**
|
|
@@ -2156,7 +2159,8 @@ const productWriteShape = {
|
|
|
2156
2159
|
refundPolicy: productRefundPolicyPatchSchema.nullish().describe("상품별 환불 정책 — 준 항목만 상점 기본을 덮어쓴다. `null`이나 생략은 상점 기본을 그대로 쓴다는 뜻이다. 반품·교환 배송비(`returnDeliveryFee`·`exchangeDeliveryFee`)는 배송 상품에만 줄 수 있다(다른 유형은 400)"),
|
|
2157
2160
|
...optionModelRequestSchema.shape,
|
|
2158
2161
|
sourceOptionSetIds: z.array(z.string()).max(10).optional().describe("쓰기 전용(이슈 #59) — 이 저장으로 옵션을 불러온 저장 옵션 id. 상품 저장과 같은 트랜잭션에서 불러오기 기록을 남겨 저장 옵션의 `importedProductCount`를 센다. 없는 id는 무시한다"),
|
|
2159
|
-
inventoryMode: inventoryModeSchema.optional().describe("재고 방식(이슈 #118). `DATED`면 날짜별 달력(`PUT /products/{id}/calendar`)이 재고·가격이고 주문서 줄은 숙박 기간(`stay`)을 받는다. 생략하면 등록은 `STANDARD`, 수정은 지금 값. 판매 이력이 있으면 바꿀 수 없다(409 `INVENTORY_MODE_LOCKED`)")
|
|
2162
|
+
inventoryMode: inventoryModeSchema.optional().describe("재고 방식(이슈 #118). `DATED`면 날짜별 달력(`PUT /products/{id}/calendar`)이 재고·가격이고 주문서 줄은 숙박 기간(`stay`)을 받는다. 생략하면 등록은 `STANDARD`, 수정은 지금 값. 판매 이력이 있으면 바꿀 수 없다(409 `INVENTORY_MODE_LOCKED`)"),
|
|
2163
|
+
flowId: z.string().nullable().optional().describe("주문 흐름(이슈 #115) — 게시한 흐름 id. null이면 카테고리의 흐름(없으면 기본 흐름)을 쓴다. 생략하면 등록은 null, 수정은 지금 값. 게시하지 않은 흐름은 409 `FLOW_NOT_PUBLISHED`. 이미 결제된 주문은 결제 때 붙은 흐름을 그대로 따른다")
|
|
2160
2164
|
};
|
|
2161
2165
|
const productCreateRequestSchema = z.strictObject({
|
|
2162
2166
|
...productWriteShape,
|
|
@@ -2172,6 +2176,7 @@ const productPatchRequestSchema = z.strictObject({
|
|
|
2172
2176
|
name: z.string().max(100).optional(),
|
|
2173
2177
|
salePrice: z.number().int().multipleOf(10).optional(),
|
|
2174
2178
|
status: productStatusSchema.optional(),
|
|
2179
|
+
flowId: z.string().nullable().optional().describe("주문 흐름(이슈 #115) — 게시한 흐름 id, null이면 카테고리의 흐름(없으면 기본 흐름). 생략하면 바꾸지 않는다"),
|
|
2175
2180
|
images: productImagesRequestSchema.optional().describe("상품 이미지 주소 목록. 주면 통째로 바꾼다(현재 목록과 병합하지 않는다). 첫 장이 대표 이미지(썸네일)다. 생략하면 바꾸지 않는다"),
|
|
2176
2181
|
fulfillment: productFulfillmentUpdateSchema.optional().describe(fulfillmentUpdateDescription),
|
|
2177
2182
|
refundPolicy: productRefundPolicyPatchSchema.nullable().optional().describe("상품별 환불 정책. 주면 통째로 바꾼다(준 항목만 상점 기본을 덮어쓴다). `null`은 덮어쓰기를 지워 상점 기본을 따른다. 생략하면 바꾸지 않는다"),
|
|
@@ -2645,7 +2650,42 @@ const orderItemFlowSchema = z.object({
|
|
|
2645
2650
|
dueAt: z.string(),
|
|
2646
2651
|
paused: z.boolean()
|
|
2647
2652
|
})).describe("걸린 타이머(셀러 보기)"),
|
|
2648
|
-
ended: z.boolean()
|
|
2653
|
+
ended: z.boolean(),
|
|
2654
|
+
moveTargets: z.array(z.object({
|
|
2655
|
+
key: z.string(),
|
|
2656
|
+
label: z.string().describe("셀러용 상태 이름"),
|
|
2657
|
+
coreStatus: orderItemStatusSchema.nullable()
|
|
2658
|
+
})).optional().describe("상태 직접 이동으로 옮길 수 있는 상태(셀러 보기). 흐름이 끝났으면 빈 배열"),
|
|
2659
|
+
branches: z.array(flowStateSchema).optional().describe("활성 위치가 둘 이상(병렬 가지·하위 흐름)이면 각 위치의 상태. `flowState`는 그 가운데 가장 앞 단계다")
|
|
2660
|
+
});
|
|
2661
|
+
/** 상태 직접 이동(#115) — 연결선을 지나지 않고 다른 상태로 옮긴다. 블록(재고·환불·송장)은 실행하지 않는다 */
|
|
2662
|
+
const moveFlowStateRequestSchema = z.object({
|
|
2663
|
+
to: z.string().min(1).describe("옮길 상태 키(`moveTargets[].key`)"),
|
|
2664
|
+
reason: z.string().trim().max(200).optional().describe("옮긴 사유(실행 기록에 남는다)")
|
|
2665
|
+
});
|
|
2666
|
+
const flowRunStepSchema = z.object({
|
|
2667
|
+
step: z.number().int(),
|
|
2668
|
+
block: z.string().describe("실행한 블록 종류"),
|
|
2669
|
+
edgeId: z.string(),
|
|
2670
|
+
status: z.string(),
|
|
2671
|
+
output: z.record(z.string(), z.unknown()).nullable(),
|
|
2672
|
+
at: z.string()
|
|
2673
|
+
});
|
|
2674
|
+
/** 흐름 실행 기록 — 사건 하나가 일으킨 전이(시작·행동·사건·시간·이동·취소) */
|
|
2675
|
+
const flowRunSchema = z.object({
|
|
2676
|
+
runId: z.string(),
|
|
2677
|
+
orderItemId: z.string().optional().describe("조회한 주문상품(묶음 진행이면 그 묶음의 하나)"),
|
|
2678
|
+
trigger: z.record(z.string(), z.unknown()).describe("일으킨 사건 — `type`: start · seller.action · buyer.action · event · timer · move (늘어날 수 있다)"),
|
|
2679
|
+
status: z.string(),
|
|
2680
|
+
fromState: z.string().nullable(),
|
|
2681
|
+
fromLabel: z.string().nullable().describe("이전 상태의 셀러용 이름"),
|
|
2682
|
+
toState: z.string(),
|
|
2683
|
+
toLabel: z.string().describe("새 상태의 셀러용 이름"),
|
|
2684
|
+
path: z.array(z.string()).describe("지나간 연결선"),
|
|
2685
|
+
error: z.unknown().nullable(),
|
|
2686
|
+
startedAt: z.string(),
|
|
2687
|
+
finishedAt: z.string().nullable(),
|
|
2688
|
+
steps: z.array(flowRunStepSchema).describe("실행한 블록(차례대로)")
|
|
2649
2689
|
});
|
|
2650
2690
|
const flowActionRequestSchema = z.object({ input: z.record(z.string(), z.unknown()).optional().describe("행동 입력 — 행동의 `input` 폼 키") });
|
|
2651
2691
|
/**
|
|
@@ -2707,9 +2747,23 @@ const commerceFlowSchema = commerceFlowSummarySchema.extend({
|
|
|
2707
2747
|
"ACTIVE",
|
|
2708
2748
|
"LEGACY"
|
|
2709
2749
|
]),
|
|
2710
|
-
publishedAt: z.string().nullable()
|
|
2750
|
+
publishedAt: z.string().nullable(),
|
|
2751
|
+
inProgress: z.number().int().optional().describe("이 버전을 따르는 진행 중 주문상품 흐름 수(묶음 진행은 묶음 하나가 1). 서버는 항상 싣는다")
|
|
2711
2752
|
}))
|
|
2712
2753
|
});
|
|
2754
|
+
/** 진행 중 주문을 활성 버전으로 옮기기(#115) — 한 번에 `limit`개까지. 남으면 다시 부른다 */
|
|
2755
|
+
const migrateFlowVersionRequestSchema = z.object({ limit: z.number().int().min(1).max(500).optional().describe("한 번에 옮길 흐름 수(기본 100)") });
|
|
2756
|
+
const migrateFlowVersionResultSchema = z.object({
|
|
2757
|
+
fromVersion: z.number().int(),
|
|
2758
|
+
toVersion: z.number().int(),
|
|
2759
|
+
migrated: z.number().int().describe("옮긴 흐름 수"),
|
|
2760
|
+
skipped: z.array(z.object({
|
|
2761
|
+
orderItemIds: z.array(z.string()),
|
|
2762
|
+
state: z.string(),
|
|
2763
|
+
reason: z.string().describe("STATE_MISSING 새 버전에 같은 상태가 없음 · CHILD_ACTIVE 진행 중 클레임 · EXTERNAL_PENDING 외부 API 응답 대기 (늘어날 수 있다)")
|
|
2764
|
+
})).describe("이번에 옮기지 못한 흐름(그 버전에 남는다)"),
|
|
2765
|
+
remaining: z.number().int().describe("아직 이 버전에 남은 진행 중 흐름 수(건너뛴 것 포함)")
|
|
2766
|
+
});
|
|
2713
2767
|
const createCommerceFlowRequestSchema = z.object({
|
|
2714
2768
|
key: z.string().regex(/^[a-z][a-z0-9-]{1,48}$/).describe("상점 안 유일한 키(소문자·숫자·하이픈)"),
|
|
2715
2769
|
name: z.string().min(1).max(60).optional(),
|
|
@@ -2732,27 +2786,14 @@ const commerceFlowCheckSchema = z.object({
|
|
|
2732
2786
|
blocking: z.array(flowIssueSchema),
|
|
2733
2787
|
warnings: z.array(flowIssueSchema).describe("업무 논리 경고 — 게시를 막지 않는다")
|
|
2734
2788
|
});
|
|
2735
|
-
const flowAssignmentRuleSchema = z.object({
|
|
2736
|
-
ruleId: z.string(),
|
|
2737
|
-
priority: z.number().int().describe("작을수록 먼저 본다"),
|
|
2738
|
-
condition: z.string().describe("CEL 조건식. 읽는 값: product(id·category·categoryPath·tags), order(amount·paymentMethod), buyer(member). 예: `\"cat_1\" in product.categoryPath`"),
|
|
2739
|
-
flowId: z.string()
|
|
2740
|
-
});
|
|
2741
|
-
const saveFlowAssignmentRulesRequestSchema = z.object({ rules: z.array(z.object({
|
|
2742
|
-
condition: z.string().min(1).max(500),
|
|
2743
|
-
flowId: z.string()
|
|
2744
|
-
})).max(50).describe("위에서부터 처음 맞는 규칙의 게시된 플로우를 쓴다. 목록 전체를 바꾼다") });
|
|
2745
2789
|
const resolvedFlowSchema = z.object({
|
|
2746
2790
|
flowId: z.string(),
|
|
2747
2791
|
version: z.number().int(),
|
|
2748
|
-
source: z.enum([
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
orderAmount: z.number().int().nonnegative().optional(),
|
|
2754
|
-
paymentMethod: z.string().optional(),
|
|
2755
|
-
member: z.boolean().optional()
|
|
2792
|
+
source: z.enum([
|
|
2793
|
+
"PRODUCT",
|
|
2794
|
+
"CATEGORY",
|
|
2795
|
+
"PLATFORM"
|
|
2796
|
+
]).describe("PRODUCT 상품에 지정한 흐름 · CATEGORY 카테고리의 흐름 · PLATFORM 기본 흐름")
|
|
2756
2797
|
});
|
|
2757
2798
|
/** 시크릿 이름 — 플로우 변수 `secretRef`의 값이다 */
|
|
2758
2799
|
const flowSecretNameSchema = z.string().regex(/^[a-z][a-z0-9-]{1,39}$/).describe("시크릿 이름(소문자·숫자·하이픈 2~40자). 플로우 변수(시크릿)의 값으로 쓴다");
|
|
@@ -2767,6 +2808,96 @@ const saveFlowSecretRequestSchema = z.object({
|
|
|
2767
2808
|
url: z.url().refine((value) => value.startsWith("https://"), { message: "https 주소만 받습니다" }).describe("요청 주소. https만, 사설·루프백 주소는 400 `FLOW_SECRET_URL_INVALID`"),
|
|
2768
2809
|
headers: z.record(z.string().regex(/^[A-Za-z0-9-]{1,64}$/), z.string().max(2e3)).refine((value) => Object.keys(value).length <= 10, { message: "헤더는 10개까지입니다" }).default({}).describe("함께 보낼 헤더(인증 등). 값은 암호화해 두고 다시 보여 주지 않는다")
|
|
2769
2810
|
});
|
|
2811
|
+
/**
|
|
2812
|
+
* 주문 전체 행동 결과(#115) — 같은 행동을 주문의 주문상품마다 실행한다. 한 주문상품의 실패가 다른 주문상품을 되돌리지 않는다(부분 실행).
|
|
2813
|
+
* 묶음 진행이면 한 번 실행이 묶음의 주문상품을 함께 움직인다(COMPLETED로 함께 나온다). 그 행동이 없는 주문상품은 SKIPPED다
|
|
2814
|
+
*/
|
|
2815
|
+
const orderFlowActionResultSchema = z.object({
|
|
2816
|
+
orderId: z.string(),
|
|
2817
|
+
key: z.string(),
|
|
2818
|
+
results: z.array(z.object({
|
|
2819
|
+
orderItemId: z.string(),
|
|
2820
|
+
status: z.enum([
|
|
2821
|
+
"COMPLETED",
|
|
2822
|
+
"SKIPPED",
|
|
2823
|
+
"FAILED"
|
|
2824
|
+
]).describe("COMPLETED 실행 · SKIPPED 이 주문상품에는 그 행동이 없다 · FAILED 실행하다 거절됐다"),
|
|
2825
|
+
reason: z.string().optional().describe("SKIPPED·FAILED의 이유 — 꺼진 이유(EXPIRED·CONDITION·NOT_IN_STATE) 또는 오류 코드"),
|
|
2826
|
+
message: z.string().optional()
|
|
2827
|
+
}))
|
|
2828
|
+
});
|
|
2829
|
+
const simulationEventSchema = z.object({
|
|
2830
|
+
type: z.enum([
|
|
2831
|
+
"start",
|
|
2832
|
+
"seller.action",
|
|
2833
|
+
"buyer.action",
|
|
2834
|
+
"event",
|
|
2835
|
+
"timer"
|
|
2836
|
+
]).describe("start 결제 승인 · seller.action 셀러 버튼 · buyer.action 구매자 버튼 · event 사건 · timer 타이머 키"),
|
|
2837
|
+
key: z.string().optional().describe("행동·사건·타이머 키(start는 없음)")
|
|
2838
|
+
});
|
|
2839
|
+
const simulateFlowRequestSchema = z.object({
|
|
2840
|
+
startAt: z.iso.datetime({ offset: true }).optional().describe("가상 시계 시작(기본: 지금)"),
|
|
2841
|
+
context: z.record(z.string(), z.unknown()).optional().describe("식이 읽을 값(item·order·buyer·product). 비우면 견본 주문 값"),
|
|
2842
|
+
steps: z.array(z.union([z.object({ event: simulationEventSchema }), z.object({ advance: z.string().regex(/^P/).describe("시간 경과(ISO 8601 기간)") })])).min(1).max(100)
|
|
2843
|
+
});
|
|
2844
|
+
const simulationStepSchema = z.object({
|
|
2845
|
+
step: z.number().int(),
|
|
2846
|
+
input: z.record(z.string(), z.unknown()).describe("넣은 사건(`event`) 또는 시간 경과(`advance`)"),
|
|
2847
|
+
at: z.string().describe("이 단계 뒤 가상 시각"),
|
|
2848
|
+
node: z.string().nullable(),
|
|
2849
|
+
label: z.string().nullable().describe("도착 상태의 셀러용 이름"),
|
|
2850
|
+
coreStatus: z.string().optional(),
|
|
2851
|
+
ended: z.boolean(),
|
|
2852
|
+
path: z.array(z.string()).describe("지나간 연결선"),
|
|
2853
|
+
blocks: z.array(z.string()).describe("실행했을 블록 종류"),
|
|
2854
|
+
timers: z.array(z.object({
|
|
2855
|
+
key: z.string(),
|
|
2856
|
+
dueAt: z.string()
|
|
2857
|
+
})),
|
|
2858
|
+
leaves: z.array(z.object({
|
|
2859
|
+
node: z.string().nullable(),
|
|
2860
|
+
kind: z.string()
|
|
2861
|
+
})).optional().describe("활성 위치가 둘 이상(병렬 가지·하위 흐름)이면 각 위치"),
|
|
2862
|
+
error: z.string().optional().describe("사건이 거절된 이유(NO_TRANSITION 등). 위치는 그대로다")
|
|
2863
|
+
});
|
|
2864
|
+
const simulateFlowResultSchema = z.object({
|
|
2865
|
+
compiled: z.boolean().describe("초안이 컴파일됐는가. false면 trace가 비고 errors를 고친다"),
|
|
2866
|
+
errors: z.array(flowIssueSchema),
|
|
2867
|
+
trace: z.array(simulationStepSchema)
|
|
2868
|
+
});
|
|
2869
|
+
const replayFlowRequestSchema = z.object({ orderItemId: z.string().describe("재생할 주문상품 — 그 흐름의 실행 기록을 초안으로 다시 돌린다") });
|
|
2870
|
+
const replayFlowResultSchema = z.object({
|
|
2871
|
+
orderItemId: z.string(),
|
|
2872
|
+
compiled: z.boolean(),
|
|
2873
|
+
errors: z.array(flowIssueSchema),
|
|
2874
|
+
steps: z.array(z.object({
|
|
2875
|
+
runId: z.string(),
|
|
2876
|
+
trigger: z.record(z.string(), z.unknown()),
|
|
2877
|
+
recordedState: z.string().describe("실제로 간 상태"),
|
|
2878
|
+
simulatedState: z.string().nullable().describe("초안으로 돌렸을 때 간 상태"),
|
|
2879
|
+
match: z.boolean(),
|
|
2880
|
+
error: z.string().optional()
|
|
2881
|
+
})),
|
|
2882
|
+
divergedAt: z.number().int().nullable().describe("처음 갈라진 단계(steps 인덱스). 끝까지 같으면 null"),
|
|
2883
|
+
unsupported: z.number().int().describe("재생할 수 없는 기록(상태 직접 이동·버전 옮기기·엔진 밖 취소) 수 — 그 앞까지만 돌린다")
|
|
2884
|
+
});
|
|
2885
|
+
/** 노드·블록 종류 목록(#115) — 흐름을 API·AI로 짤 때 쓸 수 있는 종류와 설정 형식(JSON Schema) */
|
|
2886
|
+
const flowNodeTypesSchema = z.object({
|
|
2887
|
+
nodes: z.array(z.object({
|
|
2888
|
+
type: z.string(),
|
|
2889
|
+
version: z.number().int(),
|
|
2890
|
+
kind: z.string().describe("state 머묾 · wait 결과를 기다림 · end 종료 · transient 즉시 갈라짐"),
|
|
2891
|
+
outputs: z.array(z.string()).nullable().describe("고정 결과 이름. 설정에서 나오면(셀러 확인의 버튼) null"),
|
|
2892
|
+
configSchema: z.record(z.string(), z.unknown()).describe("설정 형식(JSON Schema)")
|
|
2893
|
+
})),
|
|
2894
|
+
blocks: z.array(z.object({
|
|
2895
|
+
type: z.string(),
|
|
2896
|
+
version: z.number().int(),
|
|
2897
|
+
effect: z.string().describe("local 같은 트랜잭션 · afterCommit 커밋 뒤 · external 트랜잭션 밖"),
|
|
2898
|
+
configSchema: z.record(z.string(), z.unknown())
|
|
2899
|
+
}))
|
|
2900
|
+
});
|
|
2770
2901
|
//#endregion
|
|
2771
2902
|
//#region src/schemas/promotion.ts
|
|
2772
2903
|
/**
|
|
@@ -3944,7 +4075,8 @@ const eventTypeSchema = z.enum([
|
|
|
3944
4075
|
"INQUIRY.CREATED",
|
|
3945
4076
|
"REVIEW.CREATED",
|
|
3946
4077
|
"PRODUCT.OUT_OF_STOCK",
|
|
3947
|
-
"ORDER.FLOW_NOTIFICATION"
|
|
4078
|
+
"ORDER.FLOW_NOTIFICATION",
|
|
4079
|
+
"ORDER.FLOW_STATE_CHANGED"
|
|
3948
4080
|
]).describe("웹훅 이벤트 타입. `ORDER.ADDRESS_CHANGE_REQUESTED`는 현재 발송하지 않음(호환을 위해 값만 남았고, 구독해도 이벤트가 오지 않는다)");
|
|
3949
4081
|
const webhookStatusSchema = z.enum(["ACTIVE", "SUSPENDED"]).describe("구독 상태. `ACTIVE`=발송 대상, `SUSPENDED`=24시간 이상 연속 전송 실패로 발송이 정지된 상태. 정지 중 발생한 이벤트는 적재하지 않는다. 재개(`POST /webhooks/{id}/resume`)하거나 구독을 수정하면 ACTIVE로 돌아간다");
|
|
3950
4082
|
const webhookSchema = z.object({
|
|
@@ -4487,6 +4619,7 @@ const orderSummarySchema = z.object({
|
|
|
4487
4619
|
itemCount: z.number().int(),
|
|
4488
4620
|
totalAmount: z.number().int(),
|
|
4489
4621
|
representativeStatus: orderItemStatusSchema,
|
|
4622
|
+
progressStatus: orderItemStatusSchema.optional().describe("진행 중 주문상품 가운데 가장 앞 단계(취소 제외, 모두 취소면 CANCELED, #115). 섞인 주문에서 아직 기다리는 단계다. 서버는 항상 싣는다"),
|
|
4490
4623
|
orderedAt: z.string(),
|
|
4491
4624
|
testPayment: z.boolean().describe("테스트 결제(샌드박스 결제) 주문인가. true면 실제로 돈이 오가지 않았습니다. 상품을 발송하지 않도록 주의하십시오")
|
|
4492
4625
|
});
|
|
@@ -4555,6 +4688,7 @@ const orderDiscountSchema = z.object({
|
|
|
4555
4688
|
});
|
|
4556
4689
|
const orderSchema = z.object({
|
|
4557
4690
|
orderId: z.string(),
|
|
4691
|
+
progressStatus: orderItemStatusSchema.optional().describe("진행 중 주문상품 가운데 가장 앞 단계(취소 제외, 모두 취소면 CANCELED, #115). 섞인 주문에서 아직 기다리는 단계다. 서버는 항상 싣는다"),
|
|
4558
4692
|
orderNo: commerceNumberField("주문번호(이슈 #107) — 숫자 14자리(YYMMDD KST + 난수 8자리), 전역 유일, 생성 후 바뀌지 않습니다. 전화 CS·ARS용 번호이고 API 경로의 식별자는 여전히 `orderId`입니다. 화면 표기는 `formatOrderNo`(4자리 하이픈)를 쓰십시오"),
|
|
4559
4693
|
orderedAt: z.string(),
|
|
4560
4694
|
orderer: z.object({
|
|
@@ -6835,7 +6969,15 @@ function createStoreClient(options) {
|
|
|
6835
6969
|
* `POST /v1/orders/{orderId}/cash-receipt/reissue` — 실패했거나 재시도 대기 중인 현금영수증을 지금 다시 발급·취소한다.
|
|
6836
6970
|
* 상점 플랫폼 OWNER·ADMIN 전용(PAT·M2M 403 `INSUFFICIENT_ROLE`). 404 `CASH_RECEIPT_NOT_FOUND`, 409 `CASH_RECEIPT_NOT_REISSUABLE`
|
|
6837
6971
|
*/
|
|
6838
|
-
reissueCashReceipt: (orderId) => storeHttp.request("POST", path`/orders/${orderId}/cash-receipt/reissue`, cashReceiptSchema)
|
|
6972
|
+
reissueCashReceipt: (orderId) => storeHttp.request("POST", path`/orders/${orderId}/cash-receipt/reissue`, cashReceiptSchema),
|
|
6973
|
+
/**
|
|
6974
|
+
* `POST /orders/{id}/actions/{key}` — 주문 전체 행동(#115). 그 행동이 켜진 주문상품마다 실행하고 결과를 주문상품별로 준다(부분 실행).
|
|
6975
|
+
* 켜진 주문상품이 하나도 없으면 409 `ACTION_NOT_AVAILABLE`
|
|
6976
|
+
*/
|
|
6977
|
+
act: (orderId, key, input = {}, idempotencyKey) => storeHttp.request("POST", path`/orders/${orderId}/actions/${key}`, orderFlowActionResultSchema, {
|
|
6978
|
+
body: flowActionRequestSchema.parse({ input }),
|
|
6979
|
+
headers: idempotency(idempotencyKey)
|
|
6980
|
+
})
|
|
6839
6981
|
},
|
|
6840
6982
|
orderItems: {
|
|
6841
6983
|
/** `GET /v1/order-items`. `testPayment` 필터는 `orders.list`와 같다 */
|
|
@@ -6910,8 +7052,20 @@ function createStoreClient(options) {
|
|
|
6910
7052
|
emitEvent: (orderItemId, key, input = {}, idempotencyKey) => storeHttp.request("POST", path`/order-items/${orderItemId}/events/${key}`, flowActionResultSchema, {
|
|
6911
7053
|
body: flowActionRequestSchema.parse({ input }),
|
|
6912
7054
|
headers: idempotency(idempotencyKey)
|
|
6913
|
-
})
|
|
7055
|
+
}),
|
|
7056
|
+
/**
|
|
7057
|
+
* `POST /order-items/{id}/flow/move` — 상태 직접 이동(#115). 연결선을 지나지 않으므로 블록(재고·환불·송장)은 실행하지 않는다.
|
|
7058
|
+
* 옮길 수 있는 상태는 `getFlow().moveTargets`. 에러: 409 `FLOW_MOVE_NOT_ALLOWED`
|
|
7059
|
+
*/
|
|
7060
|
+
moveFlow: (orderItemId, body, idempotencyKey) => storeHttp.request("POST", path`/order-items/${orderItemId}/flow/move`, flowActionResultSchema, {
|
|
7061
|
+
body: moveFlowStateRequestSchema.parse(body),
|
|
7062
|
+
headers: idempotency(idempotencyKey)
|
|
7063
|
+
}),
|
|
7064
|
+
/** `GET /order-items/{id}/flow/runs` — 흐름 실행 기록(최근 것부터 50개, #115). 스코프 `order:r` */
|
|
7065
|
+
flowRuns: (orderItemId) => storeHttp.request("GET", path`/order-items/${orderItemId}/flow/runs`, z.array(flowRunSchema))
|
|
6914
7066
|
},
|
|
7067
|
+
/** `GET /flow-runs/{runId}` — 흐름 실행 기록 하나와 실행한 블록(#115). 스코프 `order:r` */
|
|
7068
|
+
flowRuns: { get: (runId) => storeHttp.request("GET", path`/flow-runs/${runId}`, flowRunSchema) },
|
|
6915
7069
|
/**
|
|
6916
7070
|
* 커머스 플로우 (이슈 #115) — 프리셋 설치·초안 저장·검사·게시와 상품 할당 규칙. 조회 `flow:r`, 쓰기 `flow:rw`.
|
|
6917
7071
|
* 게시한 버전은 불변이고, 진행 중 주문은 결제 때 붙은 버전으로 끝까지 간다.
|
|
@@ -6930,17 +7084,26 @@ function createStoreClient(options) {
|
|
|
6930
7084
|
check: (flowId) => storeHttp.request("POST", path`/commerce-flows/${flowId}/draft/check`, commerceFlowCheckSchema),
|
|
6931
7085
|
/** 게시. 차단 오류가 있으면 409 `PUBLISH_BLOCKED`(`details.blocking`) */
|
|
6932
7086
|
publish: (flowId) => storeHttp.request("POST", path`/commerce-flows/${flowId}/draft/publish`, commerceFlowSchema),
|
|
6933
|
-
rules: () => storeHttp.request("GET", "/commerce-flows/assignment-rules", z.array(flowAssignmentRuleSchema)),
|
|
6934
|
-
/** 할당 규칙 전체 교체(우선순위는 배열 순서). 에러: 400 `FLOW_ASSIGNMENT_CONDITION_INVALID`, 409 `FLOW_NOT_PUBLISHED` */
|
|
6935
|
-
saveRules: (body) => storeHttp.request("PUT", "/commerce-flows/assignment-rules", z.array(flowAssignmentRuleSchema), { body: saveFlowAssignmentRulesRequestSchema.parse(body) }),
|
|
6936
|
-
testRules: (body) => storeHttp.request("POST", "/commerce-flows/assignment-rules/test", resolvedFlowSchema, { body: testFlowAssignmentRequestSchema.parse(body) }),
|
|
6937
7087
|
/** 이 상품에 지금 붙을 플로우 */
|
|
6938
7088
|
forProduct: (productId) => storeHttp.request("GET", path`/products/${productId}/flow`, resolvedFlowSchema),
|
|
6939
7089
|
/** HTTP 노드 시크릿 목록(헤더 값 제외) */
|
|
6940
7090
|
secrets: () => storeHttp.request("GET", "/commerce-flows/secrets", z.array(flowSecretSchema)),
|
|
6941
7091
|
/** 시크릿 저장(같은 이름이면 덮어쓴다). 상점 플랫폼 OWNER·ADMIN만. 에러: 400 `FLOW_SECRET_URL_INVALID` */
|
|
6942
7092
|
saveSecret: (name, body) => storeHttp.request("PUT", path`/commerce-flows/secrets/${name}`, flowSecretSchema, { body: saveFlowSecretRequestSchema.parse(body) }),
|
|
6943
|
-
removeSecret: (name) => storeHttp.requestVoid("DELETE", path`/commerce-flows/secrets/${name}`)
|
|
7093
|
+
removeSecret: (name) => storeHttp.requestVoid("DELETE", path`/commerce-flows/secrets/${name}`),
|
|
7094
|
+
/** `GET /commerce-flows/{id}/versions/{n}` — 게시했던 버전 하나(그래프·정의). 옛 버전 보기용 */
|
|
7095
|
+
getVersion: (flowId, version) => storeHttp.request("GET", path`/commerce-flows/${flowId}/versions/${String(version)}`, commerceFlowVersionViewSchema),
|
|
7096
|
+
/**
|
|
7097
|
+
* `POST /commerce-flows/{id}/versions/{n}/migrate` — 버전 n을 따르는 진행 중 주문을 지금 게시 버전으로 옮긴다. 같은 상태가 새 버전에
|
|
7098
|
+
* 있어야 하고, 진행 중 클레임·외부 API 대기는 건너뛴다(`skipped`). `remaining`이 0이 될 때까지 다시 부른다
|
|
7099
|
+
*/
|
|
7100
|
+
migrateVersion: (flowId, version, body = {}) => storeHttp.request("POST", path`/commerce-flows/${flowId}/versions/${String(version)}/migrate`, migrateFlowVersionResultSchema, { body: migrateFlowVersionRequestSchema.parse(body) }),
|
|
7101
|
+
/** `POST /commerce-flows/{id}/draft/simulate` — 초안을 가상 시계로 돌려 단계별 결과를 본다(주문·돈·재고는 건드리지 않는다) */
|
|
7102
|
+
simulate: (flowId, body) => storeHttp.request("POST", path`/commerce-flows/${flowId}/draft/simulate`, simulateFlowResultSchema, { body: simulateFlowRequestSchema.parse(body) }),
|
|
7103
|
+
/** `POST /commerce-flows/{id}/draft/replay` — 실제 주문상품의 실행 기록을 초안으로 다시 돌려 갈라지는 곳을 찾는다 */
|
|
7104
|
+
replay: (flowId, body) => storeHttp.request("POST", path`/commerce-flows/${flowId}/draft/replay`, replayFlowResultSchema, { body: replayFlowRequestSchema.parse(body) }),
|
|
7105
|
+
/** `GET /flow-node-types` — 쓸 수 있는 노드·블록 종류와 설정 형식(JSON Schema) */
|
|
7106
|
+
nodeTypes: () => storeHttp.request("GET", "/flow-node-types", flowNodeTypesSchema)
|
|
6944
7107
|
},
|
|
6945
7108
|
carriers: { list: () => storeHttp.request("GET", "/carriers", z.array(carrierSchema)) },
|
|
6946
7109
|
claims: {
|
|
@@ -7811,6 +7974,26 @@ const flowNotificationWebhookEventSchema = z.object({
|
|
|
7811
7974
|
type: z.literal("ORDER.FLOW_NOTIFICATION"),
|
|
7812
7975
|
data: flowNotificationWebhookEventDataSchema
|
|
7813
7976
|
});
|
|
7977
|
+
/**
|
|
7978
|
+
* 흐름 상태 변경(이슈 #115) — 주문상품의 흐름 상태(노드)가 바뀔 때마다 온다. 공개 상태(`ORDER.*`)가 같아도 상점 흐름의 단계가 바뀌면 온다
|
|
7979
|
+
* (시안 확인 → 제작중). 묶음 진행이면 `orderItemIds`가 여럿이다. 개인정보는 싣지 않는다
|
|
7980
|
+
*/
|
|
7981
|
+
const flowStateChangedWebhookEventDataSchema = z.object({
|
|
7982
|
+
orderId: z.string().describe("주문 ID"),
|
|
7983
|
+
orderItemIds: z.array(z.string()).describe("상태가 바뀐 주문상품(묶음 진행이면 여럿)"),
|
|
7984
|
+
flowId: z.string(),
|
|
7985
|
+
flowVersion: z.number().int(),
|
|
7986
|
+
from: z.string().nullable().describe("이전 상태 키. 흐름이 막 시작했으면 null"),
|
|
7987
|
+
to: z.string().describe("새 상태 키"),
|
|
7988
|
+
label: z.string().describe("새 상태의 셀러용 이름"),
|
|
7989
|
+
coreStatus: z.string().nullable().describe("새 상태의 공개 상태. 공개 상태를 바꾸지 않는 단계면 null"),
|
|
7990
|
+
changedAt: z.string().describe("바뀐 시각")
|
|
7991
|
+
});
|
|
7992
|
+
const flowStateChangedWebhookEventSchema = z.object({
|
|
7993
|
+
...envelopeFields,
|
|
7994
|
+
type: z.literal("ORDER.FLOW_STATE_CHANGED"),
|
|
7995
|
+
data: flowStateChangedWebhookEventDataSchema
|
|
7996
|
+
});
|
|
7814
7997
|
/** 웹훅 요청 본문. `type`으로 판별하며 `data` 형태가 타입별로 다르다 */
|
|
7815
7998
|
const webhookEventSchema = z.discriminatedUnion("type", [
|
|
7816
7999
|
orderWebhookEventSchema,
|
|
@@ -7820,7 +8003,8 @@ const webhookEventSchema = z.discriminatedUnion("type", [
|
|
|
7820
8003
|
inquiryWebhookEventSchema,
|
|
7821
8004
|
reviewWebhookEventSchema,
|
|
7822
8005
|
productOutOfStockWebhookEventSchema,
|
|
7823
|
-
flowNotificationWebhookEventSchema
|
|
8006
|
+
flowNotificationWebhookEventSchema,
|
|
8007
|
+
flowStateChangedWebhookEventSchema
|
|
7824
8008
|
]).describe("웹훅 요청 본문 (얇은 이벤트). 개인정보를 싣지 않으며 `data`의 id로 관리 API를 조회한다");
|
|
7825
8009
|
/**
|
|
7826
8010
|
* 알려진 웹훅 이벤트 타입 — `webhookEventSchema`의 판별 값 목록(이 SDK 버전이 아는 것).
|
|
@@ -8032,4 +8216,4 @@ function createStoreSession(options) {
|
|
|
8032
8216
|
};
|
|
8033
8217
|
}
|
|
8034
8218
|
//#endregion
|
|
8035
|
-
export { APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, ApiError, ApprovalPendingError, BUSINESS_INFO_MAX_LENGTH, BUSINESS_NUMBER_PATTERN, CASH_RECEIPT_STATUS_VALUES, COLLECTION_BEST_SELLING_DAYS, COLLECTION_PREVIEW_SIZE, COLLECTION_PRODUCT_SORTS, COLLECTION_SALES_SORT_DEFAULT_DAYS, COLLECTION_SLUG_PATTERN, COLLECTION_TYPES, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, CUSTOM_INPUT_FORBIDDEN_WORDS, CUSTOM_INPUT_TYPES, FULFILLMENT_METHODS, FULFILLMENT_METHODS_BY_TYPE, FULFILLMENT_METHOD_RULES, FULFILLMENT_RULES, KNOWN_WEBHOOK_EVENT_TYPES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_CALENDAR_DAYS, 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_OPTION_GROUPS, MAX_PICKUP_LOCATIONS, MAX_PRODUCT_IMAGES, 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, 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, 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, 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, bestSellingRuleOf, buildAuthorizeUrl, buildQuery, bulkResultSchema, businessInfoPatchShape, businessInfoResponseShape, businessNumberSchema, calendarDateSchema, calendarDaySchema, calendarQuerySchema, 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, commerceFlowCheckSchema, commerceFlowSchema, commerceFlowSummarySchema, commerceFlowVersionViewSchema, commerceNumberField, compareBySales, consentActionSchema, consentKindSchema, consentSourceSchema, couponBenefitSchema, couponConditionsInputSchema, couponConditionsSchema, couponDiscountOf, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponListQuerySchema, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRuleSchema, couponSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetSchema, createCommerceFlowRequestSchema, 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, defaultFulfillmentMethodOf, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, descendantCategoryIdsOf, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, eventTypeSchema, exchangeAuthorizationCode, flowActionRequestSchema, flowActionResultSchema, flowActionSchema, flowAssignmentRuleSchema, flowFieldValueSchema, flowInputFieldSchema, flowNotificationWebhookEventDataSchema, flowNotificationWebhookEventSchema, flowPresetSummarySchema, flowSecretNameSchema, flowSecretSchema, flowStateSchema, formatOrderNo, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentMethodOf, fulfillmentMethodSchema, fulfillmentMethodsOf, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, inventoryModeSchema, 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, nightsOf, normalizeBusinessNumber, normalizeCouponCode, normalizeStorefrontHostname, normalizeStorefrontPath, oauthTokenResponseSchema, openFulfillmentUnion, optionGroupKindSchema, optionGroupRequestSchema, optionGroupSchema, optionModelRequestSchema, optionModelSchema, optionSelectionSchema, optionSortSchema, optionValueRequestSchema, optionValueSchema, orderCanceledWebhookEventDataSchema, orderCanceledWebhookEventSchema, orderDiscountSchema, orderFulfilledWebhookEventDataSchema, orderFulfilledWebhookEventSchema, orderItemFlowSchema, orderItemFulfillmentSchema, orderItemFulfillmentSnapshotResponseSchema, orderItemFulfillmentSnapshotSchema, orderItemListQuerySchema, orderItemMemoResultSchema, orderItemPageSchema, orderItemSchema, orderItemStatusSchema, orderListQuerySchema, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, parseOrderNo, parseWebhookEvent, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentFailureWarningSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderSchema, pgVerificationResultSchema, pickupLocationRequestSchema, pickupLocationSchema, pickupLocationSnapshotSchema, planCodeSchema, planEntitlementsSchema, planErrorDetailsSchema, pointAdjustmentRequestSchema, pointAdjustmentResultSchema, pointEarnOf, pointEarnRateBpSchema, pointEarningEnabled, pointEntrySchema, pointExpiresAtOf, pointHistoryQuerySchema, pointLotSchema, pointPolicyNoticeSchema, pointPolicySchema, pointRestoreExpiresAtOf, pointUseOf, pointUsePolicySchema, 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, proratedPointRefund, proratedRefundBase, publicPlanSchema, publicPlansSchema, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, purchaseEarnPolicySchema, purchaseEarnRateOf, quoteDelivery, quotePricing, rankBestSelling, refreshUserToken, refundPolicyPatchSchema, refundPolicySchema, rejectClaimRequestSchema, remoteAreaLabelOf, remoteAreaOf, remoteAreaSchema, remoteSurchargeOf, replaceStorefrontSourceRequestSchema, requiresCollection, requiresShipping, resolvePointPolicy, resolveRefundPolicy, resolveShippingPolicy, resolvedFlowSchema, responsePlanCodeSchema, responsePointEntryTypeSchema, reviewListQuerySchema, reviewReportResultSchema, reviewRewardPointOf, reviewRewardPolicySchema, reviewSchema, reviewSortSchema, reviewWebhookEventDataSchema, reviewWebhookEventSchema, rollbackStorefrontRequestSchema, runStorefrontCheckRequestSchema, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveFlowAssignmentRulesRequestSchema, saveFlowDraftRequestSchema, saveFlowSecretRequestSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCustomerInquirySchema, setCalendarRequestSchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingPolicyPatchSchema, shippingPolicySchema, splitRefund, stayRangeSchema, staySnapshotSchema, 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, testFlowAssignmentRequestSchema, tossPaymentsCredentialsInputSchema, trackingStageResponseSchema, trackingUpdateResultSchema, unknownWebhookEventSchema, 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 };
|
|
8219
|
+
export { APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, ApiError, ApprovalPendingError, BUSINESS_INFO_MAX_LENGTH, BUSINESS_NUMBER_PATTERN, CASH_RECEIPT_STATUS_VALUES, COLLECTION_BEST_SELLING_DAYS, COLLECTION_PREVIEW_SIZE, COLLECTION_PRODUCT_SORTS, COLLECTION_SALES_SORT_DEFAULT_DAYS, COLLECTION_SLUG_PATTERN, COLLECTION_TYPES, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, CUSTOM_INPUT_FORBIDDEN_WORDS, CUSTOM_INPUT_TYPES, FULFILLMENT_METHODS, FULFILLMENT_METHODS_BY_TYPE, FULFILLMENT_METHOD_RULES, FULFILLMENT_RULES, KNOWN_WEBHOOK_EVENT_TYPES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_CALENDAR_DAYS, 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_OPTION_GROUPS, MAX_PICKUP_LOCATIONS, MAX_PRODUCT_IMAGES, 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, 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, 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, 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, bestSellingRuleOf, buildAuthorizeUrl, buildQuery, bulkResultSchema, businessInfoPatchShape, businessInfoResponseShape, businessNumberSchema, calendarDateSchema, calendarDaySchema, calendarQuerySchema, 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, commerceFlowCheckSchema, commerceFlowSchema, commerceFlowSummarySchema, commerceFlowVersionViewSchema, commerceNumberField, compareBySales, consentActionSchema, consentKindSchema, consentSourceSchema, couponBenefitSchema, couponConditionsInputSchema, couponConditionsSchema, couponDiscountOf, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponListQuerySchema, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRuleSchema, couponSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetSchema, createCommerceFlowRequestSchema, 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, defaultFulfillmentMethodOf, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, descendantCategoryIdsOf, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, eventTypeSchema, exchangeAuthorizationCode, flowActionRequestSchema, flowActionResultSchema, flowActionSchema, flowFieldValueSchema, flowInputFieldSchema, flowNodeTypesSchema, flowNotificationWebhookEventDataSchema, flowNotificationWebhookEventSchema, flowPresetSummarySchema, flowRunSchema, flowRunStepSchema, flowSecretNameSchema, flowSecretSchema, flowStateChangedWebhookEventDataSchema, flowStateChangedWebhookEventSchema, flowStateSchema, formatOrderNo, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentMethodOf, fulfillmentMethodSchema, fulfillmentMethodsOf, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, inventoryModeSchema, 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, migrateFlowVersionRequestSchema, migrateFlowVersionResultSchema, moveFlowStateRequestSchema, moveStorefrontFileRequestSchema, myAccountSchema, myStoreSchema, nightsOf, normalizeBusinessNumber, normalizeCouponCode, 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, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, parseOrderNo, parseWebhookEvent, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentFailureWarningSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderSchema, pgVerificationResultSchema, pickupLocationRequestSchema, pickupLocationSchema, pickupLocationSnapshotSchema, planCodeSchema, planEntitlementsSchema, planErrorDetailsSchema, pointAdjustmentRequestSchema, pointAdjustmentResultSchema, pointEarnOf, pointEarnRateBpSchema, pointEarningEnabled, pointEntrySchema, pointExpiresAtOf, pointHistoryQuerySchema, pointLotSchema, pointPolicyNoticeSchema, pointPolicySchema, pointRestoreExpiresAtOf, pointUseOf, pointUsePolicySchema, 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, proratedPointRefund, proratedRefundBase, publicPlanSchema, publicPlansSchema, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, purchaseEarnPolicySchema, purchaseEarnRateOf, 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, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveFlowDraftRequestSchema, saveFlowSecretRequestSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCustomerInquirySchema, setCalendarRequestSchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingPolicyPatchSchema, shippingPolicySchema, simulateFlowRequestSchema, simulateFlowResultSchema, simulationStepSchema, splitRefund, stayRangeSchema, staySnapshotSchema, 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, unknownWebhookEventSchema, 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
|
@@ -74,22 +74,32 @@ import {
|
|
|
74
74
|
commerceFlowCheckSchema,
|
|
75
75
|
commerceFlowSchema,
|
|
76
76
|
commerceFlowSummarySchema,
|
|
77
|
+
commerceFlowVersionViewSchema,
|
|
77
78
|
createCommerceFlowRequestSchema,
|
|
78
79
|
flowActionRequestSchema,
|
|
79
80
|
flowActionResultSchema,
|
|
80
|
-
|
|
81
|
+
flowNodeTypesSchema,
|
|
81
82
|
flowPresetSummarySchema,
|
|
83
|
+
flowRunSchema,
|
|
82
84
|
flowSecretSchema,
|
|
85
|
+
type MigrateFlowVersionRequest,
|
|
86
|
+
type MoveFlowStateRequest,
|
|
87
|
+
migrateFlowVersionRequestSchema,
|
|
88
|
+
migrateFlowVersionResultSchema,
|
|
89
|
+
moveFlowStateRequestSchema,
|
|
90
|
+
orderFlowActionResultSchema,
|
|
83
91
|
orderItemFlowSchema,
|
|
92
|
+
type ReplayFlowRequest,
|
|
93
|
+
replayFlowRequestSchema,
|
|
94
|
+
replayFlowResultSchema,
|
|
84
95
|
resolvedFlowSchema,
|
|
85
|
-
type SaveFlowAssignmentRulesRequest,
|
|
86
96
|
type SaveFlowDraftRequest,
|
|
87
97
|
type SaveFlowSecretRequest,
|
|
88
|
-
|
|
98
|
+
type SimulateFlowRequest,
|
|
89
99
|
saveFlowDraftRequestSchema,
|
|
90
100
|
saveFlowSecretRequestSchema,
|
|
91
|
-
|
|
92
|
-
|
|
101
|
+
simulateFlowRequestSchema,
|
|
102
|
+
simulateFlowResultSchema,
|
|
93
103
|
} from "./schemas/commerce-flow";
|
|
94
104
|
import { bulkResultSchema, type PageParams, pageSchema } from "./schemas/common";
|
|
95
105
|
import {
|
|
@@ -693,6 +703,25 @@ export function createStoreClient(options: StoreClientOptions) {
|
|
|
693
703
|
*/
|
|
694
704
|
reissueCashReceipt: (orderId: string) =>
|
|
695
705
|
storeHttp.request("POST", path`/orders/${orderId}/cash-receipt/reissue`, cashReceiptSchema),
|
|
706
|
+
/**
|
|
707
|
+
* `POST /orders/{id}/actions/{key}` — 주문 전체 행동(#115). 그 행동이 켜진 주문상품마다 실행하고 결과를 주문상품별로 준다(부분 실행).
|
|
708
|
+
* 켜진 주문상품이 하나도 없으면 409 `ACTION_NOT_AVAILABLE`
|
|
709
|
+
*/
|
|
710
|
+
act: (
|
|
711
|
+
orderId: string,
|
|
712
|
+
key: string,
|
|
713
|
+
input: Record<string, unknown> = {},
|
|
714
|
+
idempotencyKey?: string,
|
|
715
|
+
) =>
|
|
716
|
+
storeHttp.request(
|
|
717
|
+
"POST",
|
|
718
|
+
path`/orders/${orderId}/actions/${key}`,
|
|
719
|
+
orderFlowActionResultSchema,
|
|
720
|
+
{
|
|
721
|
+
body: flowActionRequestSchema.parse({ input }),
|
|
722
|
+
headers: idempotency(idempotencyKey),
|
|
723
|
+
},
|
|
724
|
+
),
|
|
696
725
|
},
|
|
697
726
|
|
|
698
727
|
orderItems: {
|
|
@@ -816,6 +845,32 @@ export function createStoreClient(options: StoreClientOptions) {
|
|
|
816
845
|
flowActionResultSchema,
|
|
817
846
|
{ body: flowActionRequestSchema.parse({ input }), headers: idempotency(idempotencyKey) },
|
|
818
847
|
),
|
|
848
|
+
/**
|
|
849
|
+
* `POST /order-items/{id}/flow/move` — 상태 직접 이동(#115). 연결선을 지나지 않으므로 블록(재고·환불·송장)은 실행하지 않는다.
|
|
850
|
+
* 옮길 수 있는 상태는 `getFlow().moveTargets`. 에러: 409 `FLOW_MOVE_NOT_ALLOWED`
|
|
851
|
+
*/
|
|
852
|
+
moveFlow: (orderItemId: string, body: MoveFlowStateRequest, idempotencyKey?: string) =>
|
|
853
|
+
storeHttp.request(
|
|
854
|
+
"POST",
|
|
855
|
+
path`/order-items/${orderItemId}/flow/move`,
|
|
856
|
+
flowActionResultSchema,
|
|
857
|
+
{
|
|
858
|
+
body: moveFlowStateRequestSchema.parse(body),
|
|
859
|
+
headers: idempotency(idempotencyKey),
|
|
860
|
+
},
|
|
861
|
+
),
|
|
862
|
+
/** `GET /order-items/{id}/flow/runs` — 흐름 실행 기록(최근 것부터 50개, #115). 스코프 `order:r` */
|
|
863
|
+
flowRuns: (orderItemId: string) =>
|
|
864
|
+
storeHttp.request(
|
|
865
|
+
"GET",
|
|
866
|
+
path`/order-items/${orderItemId}/flow/runs`,
|
|
867
|
+
z.array(flowRunSchema),
|
|
868
|
+
),
|
|
869
|
+
},
|
|
870
|
+
|
|
871
|
+
/** `GET /flow-runs/{runId}` — 흐름 실행 기록 하나와 실행한 블록(#115). 스코프 `order:r` */
|
|
872
|
+
flowRuns: {
|
|
873
|
+
get: (runId: string) => storeHttp.request("GET", path`/flow-runs/${runId}`, flowRunSchema),
|
|
819
874
|
},
|
|
820
875
|
|
|
821
876
|
/**
|
|
@@ -851,24 +906,6 @@ export function createStoreClient(options: StoreClientOptions) {
|
|
|
851
906
|
path`/commerce-flows/${flowId}/draft/publish`,
|
|
852
907
|
commerceFlowSchema,
|
|
853
908
|
),
|
|
854
|
-
rules: () =>
|
|
855
|
-
storeHttp.request(
|
|
856
|
-
"GET",
|
|
857
|
-
"/commerce-flows/assignment-rules",
|
|
858
|
-
z.array(flowAssignmentRuleSchema),
|
|
859
|
-
),
|
|
860
|
-
/** 할당 규칙 전체 교체(우선순위는 배열 순서). 에러: 400 `FLOW_ASSIGNMENT_CONDITION_INVALID`, 409 `FLOW_NOT_PUBLISHED` */
|
|
861
|
-
saveRules: (body: SaveFlowAssignmentRulesRequest) =>
|
|
862
|
-
storeHttp.request(
|
|
863
|
-
"PUT",
|
|
864
|
-
"/commerce-flows/assignment-rules",
|
|
865
|
-
z.array(flowAssignmentRuleSchema),
|
|
866
|
-
{ body: saveFlowAssignmentRulesRequestSchema.parse(body) },
|
|
867
|
-
),
|
|
868
|
-
testRules: (body: TestFlowAssignmentRequest) =>
|
|
869
|
-
storeHttp.request("POST", "/commerce-flows/assignment-rules/test", resolvedFlowSchema, {
|
|
870
|
-
body: testFlowAssignmentRequestSchema.parse(body),
|
|
871
|
-
}),
|
|
872
909
|
/** 이 상품에 지금 붙을 플로우 */
|
|
873
910
|
forProduct: (productId: string) =>
|
|
874
911
|
storeHttp.request("GET", path`/products/${productId}/flow`, resolvedFlowSchema),
|
|
@@ -881,6 +918,44 @@ export function createStoreClient(options: StoreClientOptions) {
|
|
|
881
918
|
}),
|
|
882
919
|
removeSecret: (name: string) =>
|
|
883
920
|
storeHttp.requestVoid("DELETE", path`/commerce-flows/secrets/${name}`),
|
|
921
|
+
/** `GET /commerce-flows/{id}/versions/{n}` — 게시했던 버전 하나(그래프·정의). 옛 버전 보기용 */
|
|
922
|
+
getVersion: (flowId: string, version: number) =>
|
|
923
|
+
storeHttp.request(
|
|
924
|
+
"GET",
|
|
925
|
+
path`/commerce-flows/${flowId}/versions/${String(version)}`,
|
|
926
|
+
commerceFlowVersionViewSchema,
|
|
927
|
+
),
|
|
928
|
+
/**
|
|
929
|
+
* `POST /commerce-flows/{id}/versions/{n}/migrate` — 버전 n을 따르는 진행 중 주문을 지금 게시 버전으로 옮긴다. 같은 상태가 새 버전에
|
|
930
|
+
* 있어야 하고, 진행 중 클레임·외부 API 대기는 건너뛴다(`skipped`). `remaining`이 0이 될 때까지 다시 부른다
|
|
931
|
+
*/
|
|
932
|
+
migrateVersion: (flowId: string, version: number, body: MigrateFlowVersionRequest = {}) =>
|
|
933
|
+
storeHttp.request(
|
|
934
|
+
"POST",
|
|
935
|
+
path`/commerce-flows/${flowId}/versions/${String(version)}/migrate`,
|
|
936
|
+
migrateFlowVersionResultSchema,
|
|
937
|
+
{ body: migrateFlowVersionRequestSchema.parse(body) },
|
|
938
|
+
),
|
|
939
|
+
/** `POST /commerce-flows/{id}/draft/simulate` — 초안을 가상 시계로 돌려 단계별 결과를 본다(주문·돈·재고는 건드리지 않는다) */
|
|
940
|
+
simulate: (flowId: string, body: SimulateFlowRequest) =>
|
|
941
|
+
storeHttp.request(
|
|
942
|
+
"POST",
|
|
943
|
+
path`/commerce-flows/${flowId}/draft/simulate`,
|
|
944
|
+
simulateFlowResultSchema,
|
|
945
|
+
{ body: simulateFlowRequestSchema.parse(body) },
|
|
946
|
+
),
|
|
947
|
+
/** `POST /commerce-flows/{id}/draft/replay` — 실제 주문상품의 실행 기록을 초안으로 다시 돌려 갈라지는 곳을 찾는다 */
|
|
948
|
+
replay: (flowId: string, body: ReplayFlowRequest) =>
|
|
949
|
+
storeHttp.request(
|
|
950
|
+
"POST",
|
|
951
|
+
path`/commerce-flows/${flowId}/draft/replay`,
|
|
952
|
+
replayFlowResultSchema,
|
|
953
|
+
{
|
|
954
|
+
body: replayFlowRequestSchema.parse(body),
|
|
955
|
+
},
|
|
956
|
+
),
|
|
957
|
+
/** `GET /flow-node-types` — 쓸 수 있는 노드·블록 종류와 설정 형식(JSON Schema) */
|
|
958
|
+
nodeTypes: () => storeHttp.request("GET", "/flow-node-types", flowNodeTypesSchema),
|
|
884
959
|
},
|
|
885
960
|
|
|
886
961
|
carriers: {
|