@sayren/store-sdk 0.30.0 → 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.mjs CHANGED
@@ -2650,7 +2650,42 @@ const orderItemFlowSchema = z.object({
2650
2650
  dueAt: z.string(),
2651
2651
  paused: z.boolean()
2652
2652
  })).describe("걸린 타이머(셀러 보기)"),
2653
- 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("실행한 블록(차례대로)")
2654
2689
  });
2655
2690
  const flowActionRequestSchema = z.object({ input: z.record(z.string(), z.unknown()).optional().describe("행동 입력 — 행동의 `input` 폼 키") });
2656
2691
  /**
@@ -2712,9 +2747,23 @@ const commerceFlowSchema = commerceFlowSummarySchema.extend({
2712
2747
  "ACTIVE",
2713
2748
  "LEGACY"
2714
2749
  ]),
2715
- publishedAt: z.string().nullable()
2750
+ publishedAt: z.string().nullable(),
2751
+ inProgress: z.number().int().optional().describe("이 버전을 따르는 진행 중 주문상품 흐름 수(묶음 진행은 묶음 하나가 1). 서버는 항상 싣는다")
2716
2752
  }))
2717
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
+ });
2718
2767
  const createCommerceFlowRequestSchema = z.object({
2719
2768
  key: z.string().regex(/^[a-z][a-z0-9-]{1,48}$/).describe("상점 안 유일한 키(소문자·숫자·하이픈)"),
2720
2769
  name: z.string().min(1).max(60).optional(),
@@ -2759,6 +2808,96 @@ const saveFlowSecretRequestSchema = z.object({
2759
2808
  url: z.url().refine((value) => value.startsWith("https://"), { message: "https 주소만 받습니다" }).describe("요청 주소. https만, 사설·루프백 주소는 400 `FLOW_SECRET_URL_INVALID`"),
2760
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("함께 보낼 헤더(인증 등). 값은 암호화해 두고 다시 보여 주지 않는다")
2761
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
+ });
2762
2901
  //#endregion
2763
2902
  //#region src/schemas/promotion.ts
2764
2903
  /**
@@ -3936,7 +4075,8 @@ const eventTypeSchema = z.enum([
3936
4075
  "INQUIRY.CREATED",
3937
4076
  "REVIEW.CREATED",
3938
4077
  "PRODUCT.OUT_OF_STOCK",
3939
- "ORDER.FLOW_NOTIFICATION"
4078
+ "ORDER.FLOW_NOTIFICATION",
4079
+ "ORDER.FLOW_STATE_CHANGED"
3940
4080
  ]).describe("웹훅 이벤트 타입. `ORDER.ADDRESS_CHANGE_REQUESTED`는 현재 발송하지 않음(호환을 위해 값만 남았고, 구독해도 이벤트가 오지 않는다)");
3941
4081
  const webhookStatusSchema = z.enum(["ACTIVE", "SUSPENDED"]).describe("구독 상태. `ACTIVE`=발송 대상, `SUSPENDED`=24시간 이상 연속 전송 실패로 발송이 정지된 상태. 정지 중 발생한 이벤트는 적재하지 않는다. 재개(`POST /webhooks/{id}/resume`)하거나 구독을 수정하면 ACTIVE로 돌아간다");
3942
4082
  const webhookSchema = z.object({
@@ -4479,6 +4619,7 @@ const orderSummarySchema = z.object({
4479
4619
  itemCount: z.number().int(),
4480
4620
  totalAmount: z.number().int(),
4481
4621
  representativeStatus: orderItemStatusSchema,
4622
+ progressStatus: orderItemStatusSchema.optional().describe("진행 중 주문상품 가운데 가장 앞 단계(취소 제외, 모두 취소면 CANCELED, #115). 섞인 주문에서 아직 기다리는 단계다. 서버는 항상 싣는다"),
4482
4623
  orderedAt: z.string(),
4483
4624
  testPayment: z.boolean().describe("테스트 결제(샌드박스 결제) 주문인가. true면 실제로 돈이 오가지 않았습니다. 상품을 발송하지 않도록 주의하십시오")
4484
4625
  });
@@ -4547,6 +4688,7 @@ const orderDiscountSchema = z.object({
4547
4688
  });
4548
4689
  const orderSchema = z.object({
4549
4690
  orderId: z.string(),
4691
+ progressStatus: orderItemStatusSchema.optional().describe("진행 중 주문상품 가운데 가장 앞 단계(취소 제외, 모두 취소면 CANCELED, #115). 섞인 주문에서 아직 기다리는 단계다. 서버는 항상 싣는다"),
4550
4692
  orderNo: commerceNumberField("주문번호(이슈 #107) — 숫자 14자리(YYMMDD KST + 난수 8자리), 전역 유일, 생성 후 바뀌지 않습니다. 전화 CS·ARS용 번호이고 API 경로의 식별자는 여전히 `orderId`입니다. 화면 표기는 `formatOrderNo`(4자리 하이픈)를 쓰십시오"),
4551
4693
  orderedAt: z.string(),
4552
4694
  orderer: z.object({
@@ -6827,7 +6969,15 @@ function createStoreClient(options) {
6827
6969
  * `POST /v1/orders/{orderId}/cash-receipt/reissue` — 실패했거나 재시도 대기 중인 현금영수증을 지금 다시 발급·취소한다.
6828
6970
  * 상점 플랫폼 OWNER·ADMIN 전용(PAT·M2M 403 `INSUFFICIENT_ROLE`). 404 `CASH_RECEIPT_NOT_FOUND`, 409 `CASH_RECEIPT_NOT_REISSUABLE`
6829
6971
  */
6830
- 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
+ })
6831
6981
  },
6832
6982
  orderItems: {
6833
6983
  /** `GET /v1/order-items`. `testPayment` 필터는 `orders.list`와 같다 */
@@ -6902,8 +7052,20 @@ function createStoreClient(options) {
6902
7052
  emitEvent: (orderItemId, key, input = {}, idempotencyKey) => storeHttp.request("POST", path`/order-items/${orderItemId}/events/${key}`, flowActionResultSchema, {
6903
7053
  body: flowActionRequestSchema.parse({ input }),
6904
7054
  headers: idempotency(idempotencyKey)
6905
- })
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))
6906
7066
  },
7067
+ /** `GET /flow-runs/{runId}` — 흐름 실행 기록 하나와 실행한 블록(#115). 스코프 `order:r` */
7068
+ flowRuns: { get: (runId) => storeHttp.request("GET", path`/flow-runs/${runId}`, flowRunSchema) },
6907
7069
  /**
6908
7070
  * 커머스 플로우 (이슈 #115) — 프리셋 설치·초안 저장·검사·게시와 상품 할당 규칙. 조회 `flow:r`, 쓰기 `flow:rw`.
6909
7071
  * 게시한 버전은 불변이고, 진행 중 주문은 결제 때 붙은 버전으로 끝까지 간다.
@@ -6928,7 +7090,20 @@ function createStoreClient(options) {
6928
7090
  secrets: () => storeHttp.request("GET", "/commerce-flows/secrets", z.array(flowSecretSchema)),
6929
7091
  /** 시크릿 저장(같은 이름이면 덮어쓴다). 상점 플랫폼 OWNER·ADMIN만. 에러: 400 `FLOW_SECRET_URL_INVALID` */
6930
7092
  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}`)
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)
6932
7107
  },
6933
7108
  carriers: { list: () => storeHttp.request("GET", "/carriers", z.array(carrierSchema)) },
6934
7109
  claims: {
@@ -7799,6 +7974,26 @@ const flowNotificationWebhookEventSchema = z.object({
7799
7974
  type: z.literal("ORDER.FLOW_NOTIFICATION"),
7800
7975
  data: flowNotificationWebhookEventDataSchema
7801
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
+ });
7802
7997
  /** 웹훅 요청 본문. `type`으로 판별하며 `data` 형태가 타입별로 다르다 */
7803
7998
  const webhookEventSchema = z.discriminatedUnion("type", [
7804
7999
  orderWebhookEventSchema,
@@ -7808,7 +8003,8 @@ const webhookEventSchema = z.discriminatedUnion("type", [
7808
8003
  inquiryWebhookEventSchema,
7809
8004
  reviewWebhookEventSchema,
7810
8005
  productOutOfStockWebhookEventSchema,
7811
- flowNotificationWebhookEventSchema
8006
+ flowNotificationWebhookEventSchema,
8007
+ flowStateChangedWebhookEventSchema
7812
8008
  ]).describe("웹훅 요청 본문 (얇은 이벤트). 개인정보를 싣지 않으며 `data`의 id로 관리 API를 조회한다");
7813
8009
  /**
7814
8010
  * 알려진 웹훅 이벤트 타입 — `webhookEventSchema`의 판별 값 목록(이 SDK 버전이 아는 것).
@@ -8020,4 +8216,4 @@ function createStoreSession(options) {
8020
8216
  };
8021
8217
  }
8022
8218
  //#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 };
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sayren/store-sdk",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
4
4
  "main": "./dist/index.mjs",
5
5
  "types": "./dist/index.d.mts",
6
6
  "exports": {
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: {