@sayren/store-sdk 0.30.0 → 0.30.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 +690 -61
- package/dist/index.mjs +220 -9
- package/package.json +1 -1
- package/src/client.ts +98 -0
- package/src/schemas/commerce-flow.ts +253 -1
- package/src/schemas/misc.ts +2 -0
- package/src/schemas/order.ts +10 -0
- package/src/schemas/webhook-event.ts +26 -0
package/dist/index.mjs
CHANGED
|
@@ -2592,9 +2592,10 @@ const collectionPreviewSchema = z.object({
|
|
|
2592
2592
|
*/
|
|
2593
2593
|
const flowInputFieldSchema = z.object({
|
|
2594
2594
|
key: z.string(),
|
|
2595
|
-
type: z.string().describe("text · number · select · date · datetime · image (늘어날 수 있다)"),
|
|
2595
|
+
type: z.string().describe("text · textarea · number · select · radio · checkbox · boolean · date · datetime · image (늘어날 수 있다). 값: checkbox는 고른 선택지 배열, boolean은 참거짓(필수면 true), date는 `YYYY-MM-DD`, datetime은 오프셋 있는 ISO 8601, image는 https 주소 배열"),
|
|
2596
2596
|
required: z.boolean(),
|
|
2597
2597
|
label: z.string(),
|
|
2598
|
+
placeholder: z.string().optional().describe("입력 안내"),
|
|
2598
2599
|
maxLength: z.number().int().optional(),
|
|
2599
2600
|
maxFiles: z.number().int().optional(),
|
|
2600
2601
|
options: z.array(z.union([z.string(), z.number()])).optional()
|
|
@@ -2634,6 +2635,20 @@ const flowStateSchema = z.object({
|
|
|
2634
2635
|
enteredAt: z.string().describe("이 상태에 들어온 시각(ISO 8601)"),
|
|
2635
2636
|
deadlineAt: z.string().optional().describe("가장 가까운 기한(ISO 8601)"),
|
|
2636
2637
|
attachments: z.array(z.string()).optional().describe("가장 최근 행동이 붙인 첨부 주소(시안 등, #115). 없으면 생략"),
|
|
2638
|
+
inputs: z.object({
|
|
2639
|
+
by: z.string().describe("적은 사람 — seller · buyer"),
|
|
2640
|
+
values: z.array(z.object({
|
|
2641
|
+
key: z.string(),
|
|
2642
|
+
label: z.string(),
|
|
2643
|
+
type: z.string(),
|
|
2644
|
+
value: z.union([
|
|
2645
|
+
z.string(),
|
|
2646
|
+
z.number(),
|
|
2647
|
+
z.boolean(),
|
|
2648
|
+
z.array(z.string())
|
|
2649
|
+
])
|
|
2650
|
+
}))
|
|
2651
|
+
}).optional().describe("이 상태로 오게 한 행동의 입력값(수정 내용 등, #115). 없으면 생략"),
|
|
2637
2652
|
progress: z.boolean().optional().describe("진행 단계 표시에 넣는 상태인가"),
|
|
2638
2653
|
fields: z.record(z.string(), flowFieldValueSchema).describe("보는 사람 공개 범위의 커스텀 필드")
|
|
2639
2654
|
});
|
|
@@ -2650,7 +2665,42 @@ const orderItemFlowSchema = z.object({
|
|
|
2650
2665
|
dueAt: z.string(),
|
|
2651
2666
|
paused: z.boolean()
|
|
2652
2667
|
})).describe("걸린 타이머(셀러 보기)"),
|
|
2653
|
-
ended: z.boolean()
|
|
2668
|
+
ended: z.boolean(),
|
|
2669
|
+
moveTargets: z.array(z.object({
|
|
2670
|
+
key: z.string(),
|
|
2671
|
+
label: z.string().describe("셀러용 상태 이름"),
|
|
2672
|
+
coreStatus: orderItemStatusSchema.nullable()
|
|
2673
|
+
})).optional().describe("상태 직접 이동으로 옮길 수 있는 상태(셀러 보기). 흐름이 끝났으면 빈 배열"),
|
|
2674
|
+
branches: z.array(flowStateSchema).optional().describe("활성 위치가 둘 이상(병렬 가지·하위 흐름)이면 각 위치의 상태. `flowState`는 그 가운데 가장 앞 단계다")
|
|
2675
|
+
});
|
|
2676
|
+
/** 상태 직접 이동(#115) — 연결선을 지나지 않고 다른 상태로 옮긴다. 블록(재고·환불·송장)은 실행하지 않는다 */
|
|
2677
|
+
const moveFlowStateRequestSchema = z.object({
|
|
2678
|
+
to: z.string().min(1).describe("옮길 상태 키(`moveTargets[].key`)"),
|
|
2679
|
+
reason: z.string().trim().max(200).optional().describe("옮긴 사유(실행 기록에 남는다)")
|
|
2680
|
+
});
|
|
2681
|
+
const flowRunStepSchema = z.object({
|
|
2682
|
+
step: z.number().int(),
|
|
2683
|
+
block: z.string().describe("실행한 블록 종류"),
|
|
2684
|
+
edgeId: z.string(),
|
|
2685
|
+
status: z.string(),
|
|
2686
|
+
output: z.record(z.string(), z.unknown()).nullable(),
|
|
2687
|
+
at: z.string()
|
|
2688
|
+
});
|
|
2689
|
+
/** 흐름 실행 기록 — 사건 하나가 일으킨 전이(시작·행동·사건·시간·이동·취소) */
|
|
2690
|
+
const flowRunSchema = z.object({
|
|
2691
|
+
runId: z.string(),
|
|
2692
|
+
orderItemId: z.string().optional().describe("조회한 주문상품(묶음 진행이면 그 묶음의 하나)"),
|
|
2693
|
+
trigger: z.record(z.string(), z.unknown()).describe("일으킨 사건 — `type`: start · seller.action · buyer.action · event · timer · move (늘어날 수 있다)"),
|
|
2694
|
+
status: z.string(),
|
|
2695
|
+
fromState: z.string().nullable(),
|
|
2696
|
+
fromLabel: z.string().nullable().describe("이전 상태의 셀러용 이름"),
|
|
2697
|
+
toState: z.string(),
|
|
2698
|
+
toLabel: z.string().describe("새 상태의 셀러용 이름"),
|
|
2699
|
+
path: z.array(z.string()).describe("지나간 연결선"),
|
|
2700
|
+
error: z.unknown().nullable(),
|
|
2701
|
+
startedAt: z.string(),
|
|
2702
|
+
finishedAt: z.string().nullable(),
|
|
2703
|
+
steps: z.array(flowRunStepSchema).describe("실행한 블록(차례대로)")
|
|
2654
2704
|
});
|
|
2655
2705
|
const flowActionRequestSchema = z.object({ input: z.record(z.string(), z.unknown()).optional().describe("행동 입력 — 행동의 `input` 폼 키") });
|
|
2656
2706
|
/**
|
|
@@ -2712,9 +2762,23 @@ const commerceFlowSchema = commerceFlowSummarySchema.extend({
|
|
|
2712
2762
|
"ACTIVE",
|
|
2713
2763
|
"LEGACY"
|
|
2714
2764
|
]),
|
|
2715
|
-
publishedAt: z.string().nullable()
|
|
2765
|
+
publishedAt: z.string().nullable(),
|
|
2766
|
+
inProgress: z.number().int().optional().describe("이 버전을 따르는 진행 중 주문상품 흐름 수(묶음 진행은 묶음 하나가 1). 서버는 항상 싣는다")
|
|
2716
2767
|
}))
|
|
2717
2768
|
});
|
|
2769
|
+
/** 진행 중 주문을 활성 버전으로 옮기기(#115) — 한 번에 `limit`개까지. 남으면 다시 부른다 */
|
|
2770
|
+
const migrateFlowVersionRequestSchema = z.object({ limit: z.number().int().min(1).max(500).optional().describe("한 번에 옮길 흐름 수(기본 100)") });
|
|
2771
|
+
const migrateFlowVersionResultSchema = z.object({
|
|
2772
|
+
fromVersion: z.number().int(),
|
|
2773
|
+
toVersion: z.number().int(),
|
|
2774
|
+
migrated: z.number().int().describe("옮긴 흐름 수"),
|
|
2775
|
+
skipped: z.array(z.object({
|
|
2776
|
+
orderItemIds: z.array(z.string()),
|
|
2777
|
+
state: z.string(),
|
|
2778
|
+
reason: z.string().describe("STATE_MISSING 새 버전에 같은 상태가 없음 · CHILD_ACTIVE 진행 중 클레임 · EXTERNAL_PENDING 외부 API 응답 대기 (늘어날 수 있다)")
|
|
2779
|
+
})).describe("이번에 옮기지 못한 흐름(그 버전에 남는다)"),
|
|
2780
|
+
remaining: z.number().int().describe("아직 이 버전에 남은 진행 중 흐름 수(건너뛴 것 포함)")
|
|
2781
|
+
});
|
|
2718
2782
|
const createCommerceFlowRequestSchema = z.object({
|
|
2719
2783
|
key: z.string().regex(/^[a-z][a-z0-9-]{1,48}$/).describe("상점 안 유일한 키(소문자·숫자·하이픈)"),
|
|
2720
2784
|
name: z.string().min(1).max(60).optional(),
|
|
@@ -2759,6 +2823,96 @@ const saveFlowSecretRequestSchema = z.object({
|
|
|
2759
2823
|
url: z.url().refine((value) => value.startsWith("https://"), { message: "https 주소만 받습니다" }).describe("요청 주소. https만, 사설·루프백 주소는 400 `FLOW_SECRET_URL_INVALID`"),
|
|
2760
2824
|
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("함께 보낼 헤더(인증 등). 값은 암호화해 두고 다시 보여 주지 않는다")
|
|
2761
2825
|
});
|
|
2826
|
+
/**
|
|
2827
|
+
* 주문 전체 행동 결과(#115) — 같은 행동을 주문의 주문상품마다 실행한다. 한 주문상품의 실패가 다른 주문상품을 되돌리지 않는다(부분 실행).
|
|
2828
|
+
* 묶음 진행이면 한 번 실행이 묶음의 주문상품을 함께 움직인다(COMPLETED로 함께 나온다). 그 행동이 없는 주문상품은 SKIPPED다
|
|
2829
|
+
*/
|
|
2830
|
+
const orderFlowActionResultSchema = z.object({
|
|
2831
|
+
orderId: z.string(),
|
|
2832
|
+
key: z.string(),
|
|
2833
|
+
results: z.array(z.object({
|
|
2834
|
+
orderItemId: z.string(),
|
|
2835
|
+
status: z.enum([
|
|
2836
|
+
"COMPLETED",
|
|
2837
|
+
"SKIPPED",
|
|
2838
|
+
"FAILED"
|
|
2839
|
+
]).describe("COMPLETED 실행 · SKIPPED 이 주문상품에는 그 행동이 없다 · FAILED 실행하다 거절됐다"),
|
|
2840
|
+
reason: z.string().optional().describe("SKIPPED·FAILED의 이유 — 꺼진 이유(EXPIRED·CONDITION·NOT_IN_STATE) 또는 오류 코드"),
|
|
2841
|
+
message: z.string().optional()
|
|
2842
|
+
}))
|
|
2843
|
+
});
|
|
2844
|
+
const simulationEventSchema = z.object({
|
|
2845
|
+
type: z.enum([
|
|
2846
|
+
"start",
|
|
2847
|
+
"seller.action",
|
|
2848
|
+
"buyer.action",
|
|
2849
|
+
"event",
|
|
2850
|
+
"timer"
|
|
2851
|
+
]).describe("start 결제 승인 · seller.action 셀러 버튼 · buyer.action 구매자 버튼 · event 사건 · timer 타이머 키"),
|
|
2852
|
+
key: z.string().optional().describe("행동·사건·타이머 키(start는 없음)")
|
|
2853
|
+
});
|
|
2854
|
+
const simulateFlowRequestSchema = z.object({
|
|
2855
|
+
startAt: z.iso.datetime({ offset: true }).optional().describe("가상 시계 시작(기본: 지금)"),
|
|
2856
|
+
context: z.record(z.string(), z.unknown()).optional().describe("식이 읽을 값(item·order·buyer·product). 비우면 견본 주문 값"),
|
|
2857
|
+
steps: z.array(z.union([z.object({ event: simulationEventSchema }), z.object({ advance: z.string().regex(/^P/).describe("시간 경과(ISO 8601 기간)") })])).min(1).max(100)
|
|
2858
|
+
});
|
|
2859
|
+
const simulationStepSchema = z.object({
|
|
2860
|
+
step: z.number().int(),
|
|
2861
|
+
input: z.record(z.string(), z.unknown()).describe("넣은 사건(`event`) 또는 시간 경과(`advance`)"),
|
|
2862
|
+
at: z.string().describe("이 단계 뒤 가상 시각"),
|
|
2863
|
+
node: z.string().nullable(),
|
|
2864
|
+
label: z.string().nullable().describe("도착 상태의 셀러용 이름"),
|
|
2865
|
+
coreStatus: z.string().optional(),
|
|
2866
|
+
ended: z.boolean(),
|
|
2867
|
+
path: z.array(z.string()).describe("지나간 연결선"),
|
|
2868
|
+
blocks: z.array(z.string()).describe("실행했을 블록 종류"),
|
|
2869
|
+
timers: z.array(z.object({
|
|
2870
|
+
key: z.string(),
|
|
2871
|
+
dueAt: z.string()
|
|
2872
|
+
})),
|
|
2873
|
+
leaves: z.array(z.object({
|
|
2874
|
+
node: z.string().nullable(),
|
|
2875
|
+
kind: z.string()
|
|
2876
|
+
})).optional().describe("활성 위치가 둘 이상(병렬 가지·하위 흐름)이면 각 위치"),
|
|
2877
|
+
error: z.string().optional().describe("사건이 거절된 이유(NO_TRANSITION 등). 위치는 그대로다")
|
|
2878
|
+
});
|
|
2879
|
+
const simulateFlowResultSchema = z.object({
|
|
2880
|
+
compiled: z.boolean().describe("초안이 컴파일됐는가. false면 trace가 비고 errors를 고친다"),
|
|
2881
|
+
errors: z.array(flowIssueSchema),
|
|
2882
|
+
trace: z.array(simulationStepSchema)
|
|
2883
|
+
});
|
|
2884
|
+
const replayFlowRequestSchema = z.object({ orderItemId: z.string().describe("재생할 주문상품 — 그 흐름의 실행 기록을 초안으로 다시 돌린다") });
|
|
2885
|
+
const replayFlowResultSchema = z.object({
|
|
2886
|
+
orderItemId: z.string(),
|
|
2887
|
+
compiled: z.boolean(),
|
|
2888
|
+
errors: z.array(flowIssueSchema),
|
|
2889
|
+
steps: z.array(z.object({
|
|
2890
|
+
runId: z.string(),
|
|
2891
|
+
trigger: z.record(z.string(), z.unknown()),
|
|
2892
|
+
recordedState: z.string().describe("실제로 간 상태"),
|
|
2893
|
+
simulatedState: z.string().nullable().describe("초안으로 돌렸을 때 간 상태"),
|
|
2894
|
+
match: z.boolean(),
|
|
2895
|
+
error: z.string().optional()
|
|
2896
|
+
})),
|
|
2897
|
+
divergedAt: z.number().int().nullable().describe("처음 갈라진 단계(steps 인덱스). 끝까지 같으면 null"),
|
|
2898
|
+
unsupported: z.number().int().describe("재생할 수 없는 기록(상태 직접 이동·버전 옮기기·엔진 밖 취소) 수 — 그 앞까지만 돌린다")
|
|
2899
|
+
});
|
|
2900
|
+
/** 노드·블록 종류 목록(#115) — 흐름을 API·AI로 짤 때 쓸 수 있는 종류와 설정 형식(JSON Schema) */
|
|
2901
|
+
const flowNodeTypesSchema = z.object({
|
|
2902
|
+
nodes: z.array(z.object({
|
|
2903
|
+
type: z.string(),
|
|
2904
|
+
version: z.number().int(),
|
|
2905
|
+
kind: z.string().describe("state 머묾 · wait 결과를 기다림 · end 종료 · transient 즉시 갈라짐"),
|
|
2906
|
+
outputs: z.array(z.string()).nullable().describe("고정 결과 이름. 설정에서 나오면(셀러 확인의 버튼) null"),
|
|
2907
|
+
configSchema: z.record(z.string(), z.unknown()).describe("설정 형식(JSON Schema)")
|
|
2908
|
+
})),
|
|
2909
|
+
blocks: z.array(z.object({
|
|
2910
|
+
type: z.string(),
|
|
2911
|
+
version: z.number().int(),
|
|
2912
|
+
effect: z.string().describe("local 같은 트랜잭션 · afterCommit 커밋 뒤 · external 트랜잭션 밖"),
|
|
2913
|
+
configSchema: z.record(z.string(), z.unknown())
|
|
2914
|
+
}))
|
|
2915
|
+
});
|
|
2762
2916
|
//#endregion
|
|
2763
2917
|
//#region src/schemas/promotion.ts
|
|
2764
2918
|
/**
|
|
@@ -3936,7 +4090,8 @@ const eventTypeSchema = z.enum([
|
|
|
3936
4090
|
"INQUIRY.CREATED",
|
|
3937
4091
|
"REVIEW.CREATED",
|
|
3938
4092
|
"PRODUCT.OUT_OF_STOCK",
|
|
3939
|
-
"ORDER.FLOW_NOTIFICATION"
|
|
4093
|
+
"ORDER.FLOW_NOTIFICATION",
|
|
4094
|
+
"ORDER.FLOW_STATE_CHANGED"
|
|
3940
4095
|
]).describe("웹훅 이벤트 타입. `ORDER.ADDRESS_CHANGE_REQUESTED`는 현재 발송하지 않음(호환을 위해 값만 남았고, 구독해도 이벤트가 오지 않는다)");
|
|
3941
4096
|
const webhookStatusSchema = z.enum(["ACTIVE", "SUSPENDED"]).describe("구독 상태. `ACTIVE`=발송 대상, `SUSPENDED`=24시간 이상 연속 전송 실패로 발송이 정지된 상태. 정지 중 발생한 이벤트는 적재하지 않는다. 재개(`POST /webhooks/{id}/resume`)하거나 구독을 수정하면 ACTIVE로 돌아간다");
|
|
3942
4097
|
const webhookSchema = z.object({
|
|
@@ -4479,6 +4634,7 @@ const orderSummarySchema = z.object({
|
|
|
4479
4634
|
itemCount: z.number().int(),
|
|
4480
4635
|
totalAmount: z.number().int(),
|
|
4481
4636
|
representativeStatus: orderItemStatusSchema,
|
|
4637
|
+
progressStatus: orderItemStatusSchema.optional().describe("진행 중 주문상품 가운데 가장 앞 단계(취소 제외, 모두 취소면 CANCELED, #115). 섞인 주문에서 아직 기다리는 단계다. 서버는 항상 싣는다"),
|
|
4482
4638
|
orderedAt: z.string(),
|
|
4483
4639
|
testPayment: z.boolean().describe("테스트 결제(샌드박스 결제) 주문인가. true면 실제로 돈이 오가지 않았습니다. 상품을 발송하지 않도록 주의하십시오")
|
|
4484
4640
|
});
|
|
@@ -4547,6 +4703,7 @@ const orderDiscountSchema = z.object({
|
|
|
4547
4703
|
});
|
|
4548
4704
|
const orderSchema = z.object({
|
|
4549
4705
|
orderId: z.string(),
|
|
4706
|
+
progressStatus: orderItemStatusSchema.optional().describe("진행 중 주문상품 가운데 가장 앞 단계(취소 제외, 모두 취소면 CANCELED, #115). 섞인 주문에서 아직 기다리는 단계다. 서버는 항상 싣는다"),
|
|
4550
4707
|
orderNo: commerceNumberField("주문번호(이슈 #107) — 숫자 14자리(YYMMDD KST + 난수 8자리), 전역 유일, 생성 후 바뀌지 않습니다. 전화 CS·ARS용 번호이고 API 경로의 식별자는 여전히 `orderId`입니다. 화면 표기는 `formatOrderNo`(4자리 하이픈)를 쓰십시오"),
|
|
4551
4708
|
orderedAt: z.string(),
|
|
4552
4709
|
orderer: z.object({
|
|
@@ -6827,7 +6984,15 @@ function createStoreClient(options) {
|
|
|
6827
6984
|
* `POST /v1/orders/{orderId}/cash-receipt/reissue` — 실패했거나 재시도 대기 중인 현금영수증을 지금 다시 발급·취소한다.
|
|
6828
6985
|
* 상점 플랫폼 OWNER·ADMIN 전용(PAT·M2M 403 `INSUFFICIENT_ROLE`). 404 `CASH_RECEIPT_NOT_FOUND`, 409 `CASH_RECEIPT_NOT_REISSUABLE`
|
|
6829
6986
|
*/
|
|
6830
|
-
reissueCashReceipt: (orderId) => storeHttp.request("POST", path`/orders/${orderId}/cash-receipt/reissue`, cashReceiptSchema)
|
|
6987
|
+
reissueCashReceipt: (orderId) => storeHttp.request("POST", path`/orders/${orderId}/cash-receipt/reissue`, cashReceiptSchema),
|
|
6988
|
+
/**
|
|
6989
|
+
* `POST /orders/{id}/actions/{key}` — 주문 전체 행동(#115). 그 행동이 켜진 주문상품마다 실행하고 결과를 주문상품별로 준다(부분 실행).
|
|
6990
|
+
* 켜진 주문상품이 하나도 없으면 409 `ACTION_NOT_AVAILABLE`
|
|
6991
|
+
*/
|
|
6992
|
+
act: (orderId, key, input = {}, idempotencyKey) => storeHttp.request("POST", path`/orders/${orderId}/actions/${key}`, orderFlowActionResultSchema, {
|
|
6993
|
+
body: flowActionRequestSchema.parse({ input }),
|
|
6994
|
+
headers: idempotency(idempotencyKey)
|
|
6995
|
+
})
|
|
6831
6996
|
},
|
|
6832
6997
|
orderItems: {
|
|
6833
6998
|
/** `GET /v1/order-items`. `testPayment` 필터는 `orders.list`와 같다 */
|
|
@@ -6902,8 +7067,20 @@ function createStoreClient(options) {
|
|
|
6902
7067
|
emitEvent: (orderItemId, key, input = {}, idempotencyKey) => storeHttp.request("POST", path`/order-items/${orderItemId}/events/${key}`, flowActionResultSchema, {
|
|
6903
7068
|
body: flowActionRequestSchema.parse({ input }),
|
|
6904
7069
|
headers: idempotency(idempotencyKey)
|
|
6905
|
-
})
|
|
7070
|
+
}),
|
|
7071
|
+
/**
|
|
7072
|
+
* `POST /order-items/{id}/flow/move` — 상태 직접 이동(#115). 연결선을 지나지 않으므로 블록(재고·환불·송장)은 실행하지 않는다.
|
|
7073
|
+
* 옮길 수 있는 상태는 `getFlow().moveTargets`. 에러: 409 `FLOW_MOVE_NOT_ALLOWED`
|
|
7074
|
+
*/
|
|
7075
|
+
moveFlow: (orderItemId, body, idempotencyKey) => storeHttp.request("POST", path`/order-items/${orderItemId}/flow/move`, flowActionResultSchema, {
|
|
7076
|
+
body: moveFlowStateRequestSchema.parse(body),
|
|
7077
|
+
headers: idempotency(idempotencyKey)
|
|
7078
|
+
}),
|
|
7079
|
+
/** `GET /order-items/{id}/flow/runs` — 흐름 실행 기록(최근 것부터 50개, #115). 스코프 `order:r` */
|
|
7080
|
+
flowRuns: (orderItemId) => storeHttp.request("GET", path`/order-items/${orderItemId}/flow/runs`, z.array(flowRunSchema))
|
|
6906
7081
|
},
|
|
7082
|
+
/** `GET /flow-runs/{runId}` — 흐름 실행 기록 하나와 실행한 블록(#115). 스코프 `order:r` */
|
|
7083
|
+
flowRuns: { get: (runId) => storeHttp.request("GET", path`/flow-runs/${runId}`, flowRunSchema) },
|
|
6907
7084
|
/**
|
|
6908
7085
|
* 커머스 플로우 (이슈 #115) — 프리셋 설치·초안 저장·검사·게시와 상품 할당 규칙. 조회 `flow:r`, 쓰기 `flow:rw`.
|
|
6909
7086
|
* 게시한 버전은 불변이고, 진행 중 주문은 결제 때 붙은 버전으로 끝까지 간다.
|
|
@@ -6928,7 +7105,20 @@ function createStoreClient(options) {
|
|
|
6928
7105
|
secrets: () => storeHttp.request("GET", "/commerce-flows/secrets", z.array(flowSecretSchema)),
|
|
6929
7106
|
/** 시크릿 저장(같은 이름이면 덮어쓴다). 상점 플랫폼 OWNER·ADMIN만. 에러: 400 `FLOW_SECRET_URL_INVALID` */
|
|
6930
7107
|
saveSecret: (name, body) => storeHttp.request("PUT", path`/commerce-flows/secrets/${name}`, flowSecretSchema, { body: saveFlowSecretRequestSchema.parse(body) }),
|
|
6931
|
-
removeSecret: (name) => storeHttp.requestVoid("DELETE", path`/commerce-flows/secrets/${name}`)
|
|
7108
|
+
removeSecret: (name) => storeHttp.requestVoid("DELETE", path`/commerce-flows/secrets/${name}`),
|
|
7109
|
+
/** `GET /commerce-flows/{id}/versions/{n}` — 게시했던 버전 하나(그래프·정의). 옛 버전 보기용 */
|
|
7110
|
+
getVersion: (flowId, version) => storeHttp.request("GET", path`/commerce-flows/${flowId}/versions/${String(version)}`, commerceFlowVersionViewSchema),
|
|
7111
|
+
/**
|
|
7112
|
+
* `POST /commerce-flows/{id}/versions/{n}/migrate` — 버전 n을 따르는 진행 중 주문을 지금 게시 버전으로 옮긴다. 같은 상태가 새 버전에
|
|
7113
|
+
* 있어야 하고, 진행 중 클레임·외부 API 대기는 건너뛴다(`skipped`). `remaining`이 0이 될 때까지 다시 부른다
|
|
7114
|
+
*/
|
|
7115
|
+
migrateVersion: (flowId, version, body = {}) => storeHttp.request("POST", path`/commerce-flows/${flowId}/versions/${String(version)}/migrate`, migrateFlowVersionResultSchema, { body: migrateFlowVersionRequestSchema.parse(body) }),
|
|
7116
|
+
/** `POST /commerce-flows/{id}/draft/simulate` — 초안을 가상 시계로 돌려 단계별 결과를 본다(주문·돈·재고는 건드리지 않는다) */
|
|
7117
|
+
simulate: (flowId, body) => storeHttp.request("POST", path`/commerce-flows/${flowId}/draft/simulate`, simulateFlowResultSchema, { body: simulateFlowRequestSchema.parse(body) }),
|
|
7118
|
+
/** `POST /commerce-flows/{id}/draft/replay` — 실제 주문상품의 실행 기록을 초안으로 다시 돌려 갈라지는 곳을 찾는다 */
|
|
7119
|
+
replay: (flowId, body) => storeHttp.request("POST", path`/commerce-flows/${flowId}/draft/replay`, replayFlowResultSchema, { body: replayFlowRequestSchema.parse(body) }),
|
|
7120
|
+
/** `GET /flow-node-types` — 쓸 수 있는 노드·블록 종류와 설정 형식(JSON Schema) */
|
|
7121
|
+
nodeTypes: () => storeHttp.request("GET", "/flow-node-types", flowNodeTypesSchema)
|
|
6932
7122
|
},
|
|
6933
7123
|
carriers: { list: () => storeHttp.request("GET", "/carriers", z.array(carrierSchema)) },
|
|
6934
7124
|
claims: {
|
|
@@ -7799,6 +7989,26 @@ const flowNotificationWebhookEventSchema = z.object({
|
|
|
7799
7989
|
type: z.literal("ORDER.FLOW_NOTIFICATION"),
|
|
7800
7990
|
data: flowNotificationWebhookEventDataSchema
|
|
7801
7991
|
});
|
|
7992
|
+
/**
|
|
7993
|
+
* 흐름 상태 변경(이슈 #115) — 주문상품의 흐름 상태(노드)가 바뀔 때마다 온다. 공개 상태(`ORDER.*`)가 같아도 상점 흐름의 단계가 바뀌면 온다
|
|
7994
|
+
* (시안 확인 → 제작중). 묶음 진행이면 `orderItemIds`가 여럿이다. 개인정보는 싣지 않는다
|
|
7995
|
+
*/
|
|
7996
|
+
const flowStateChangedWebhookEventDataSchema = z.object({
|
|
7997
|
+
orderId: z.string().describe("주문 ID"),
|
|
7998
|
+
orderItemIds: z.array(z.string()).describe("상태가 바뀐 주문상품(묶음 진행이면 여럿)"),
|
|
7999
|
+
flowId: z.string(),
|
|
8000
|
+
flowVersion: z.number().int(),
|
|
8001
|
+
from: z.string().nullable().describe("이전 상태 키. 흐름이 막 시작했으면 null"),
|
|
8002
|
+
to: z.string().describe("새 상태 키"),
|
|
8003
|
+
label: z.string().describe("새 상태의 셀러용 이름"),
|
|
8004
|
+
coreStatus: z.string().nullable().describe("새 상태의 공개 상태. 공개 상태를 바꾸지 않는 단계면 null"),
|
|
8005
|
+
changedAt: z.string().describe("바뀐 시각")
|
|
8006
|
+
});
|
|
8007
|
+
const flowStateChangedWebhookEventSchema = z.object({
|
|
8008
|
+
...envelopeFields,
|
|
8009
|
+
type: z.literal("ORDER.FLOW_STATE_CHANGED"),
|
|
8010
|
+
data: flowStateChangedWebhookEventDataSchema
|
|
8011
|
+
});
|
|
7802
8012
|
/** 웹훅 요청 본문. `type`으로 판별하며 `data` 형태가 타입별로 다르다 */
|
|
7803
8013
|
const webhookEventSchema = z.discriminatedUnion("type", [
|
|
7804
8014
|
orderWebhookEventSchema,
|
|
@@ -7808,7 +8018,8 @@ const webhookEventSchema = z.discriminatedUnion("type", [
|
|
|
7808
8018
|
inquiryWebhookEventSchema,
|
|
7809
8019
|
reviewWebhookEventSchema,
|
|
7810
8020
|
productOutOfStockWebhookEventSchema,
|
|
7811
|
-
flowNotificationWebhookEventSchema
|
|
8021
|
+
flowNotificationWebhookEventSchema,
|
|
8022
|
+
flowStateChangedWebhookEventSchema
|
|
7812
8023
|
]).describe("웹훅 요청 본문 (얇은 이벤트). 개인정보를 싣지 않으며 `data`의 id로 관리 API를 조회한다");
|
|
7813
8024
|
/**
|
|
7814
8025
|
* 알려진 웹훅 이벤트 타입 — `webhookEventSchema`의 판별 값 목록(이 SDK 버전이 아는 것).
|
|
@@ -8020,4 +8231,4 @@ function createStoreSession(options) {
|
|
|
8020
8231
|
};
|
|
8021
8232
|
}
|
|
8022
8233
|
//#endregion
|
|
8023
|
-
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, 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, 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, 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 };
|
|
8234
|
+
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,17 +74,32 @@ import {
|
|
|
74
74
|
commerceFlowCheckSchema,
|
|
75
75
|
commerceFlowSchema,
|
|
76
76
|
commerceFlowSummarySchema,
|
|
77
|
+
commerceFlowVersionViewSchema,
|
|
77
78
|
createCommerceFlowRequestSchema,
|
|
78
79
|
flowActionRequestSchema,
|
|
79
80
|
flowActionResultSchema,
|
|
81
|
+
flowNodeTypesSchema,
|
|
80
82
|
flowPresetSummarySchema,
|
|
83
|
+
flowRunSchema,
|
|
81
84
|
flowSecretSchema,
|
|
85
|
+
type MigrateFlowVersionRequest,
|
|
86
|
+
type MoveFlowStateRequest,
|
|
87
|
+
migrateFlowVersionRequestSchema,
|
|
88
|
+
migrateFlowVersionResultSchema,
|
|
89
|
+
moveFlowStateRequestSchema,
|
|
90
|
+
orderFlowActionResultSchema,
|
|
82
91
|
orderItemFlowSchema,
|
|
92
|
+
type ReplayFlowRequest,
|
|
93
|
+
replayFlowRequestSchema,
|
|
94
|
+
replayFlowResultSchema,
|
|
83
95
|
resolvedFlowSchema,
|
|
84
96
|
type SaveFlowDraftRequest,
|
|
85
97
|
type SaveFlowSecretRequest,
|
|
98
|
+
type SimulateFlowRequest,
|
|
86
99
|
saveFlowDraftRequestSchema,
|
|
87
100
|
saveFlowSecretRequestSchema,
|
|
101
|
+
simulateFlowRequestSchema,
|
|
102
|
+
simulateFlowResultSchema,
|
|
88
103
|
} from "./schemas/commerce-flow";
|
|
89
104
|
import { bulkResultSchema, type PageParams, pageSchema } from "./schemas/common";
|
|
90
105
|
import {
|
|
@@ -688,6 +703,25 @@ export function createStoreClient(options: StoreClientOptions) {
|
|
|
688
703
|
*/
|
|
689
704
|
reissueCashReceipt: (orderId: string) =>
|
|
690
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
|
+
),
|
|
691
725
|
},
|
|
692
726
|
|
|
693
727
|
orderItems: {
|
|
@@ -811,6 +845,32 @@ export function createStoreClient(options: StoreClientOptions) {
|
|
|
811
845
|
flowActionResultSchema,
|
|
812
846
|
{ body: flowActionRequestSchema.parse({ input }), headers: idempotency(idempotencyKey) },
|
|
813
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),
|
|
814
874
|
},
|
|
815
875
|
|
|
816
876
|
/**
|
|
@@ -858,6 +918,44 @@ export function createStoreClient(options: StoreClientOptions) {
|
|
|
858
918
|
}),
|
|
859
919
|
removeSecret: (name: string) =>
|
|
860
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),
|
|
861
959
|
},
|
|
862
960
|
|
|
863
961
|
carriers: {
|