@sayren/store-sdk 0.29.7 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -166,8 +166,8 @@ export declare const auditLogPageSchema: z.ZodObject<{
166
166
  export type AuditLogPage = z.infer<typeof auditLogPageSchema>;
167
167
  export declare const agentPolicyDecisionSchema: z.ZodEnum<{
168
168
  DENIED: "DENIED";
169
- ALLOW: "ALLOW";
170
169
  APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
170
+ ALLOW: "ALLOW";
171
171
  }>;
172
172
  export type AgentPolicyDecision = z.infer<typeof agentPolicyDecisionSchema>;
173
173
  export declare const writePreviewSchema: z.ZodObject<{
@@ -191,8 +191,8 @@ export declare const writeDryRunResultSchema: z.ZodObject<{
191
191
  dryRun: z.ZodLiteral<true>;
192
192
  decision: z.ZodEnum<{
193
193
  DENIED: "DENIED";
194
- ALLOW: "ALLOW";
195
194
  APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
195
+ ALLOW: "ALLOW";
196
196
  }>;
197
197
  reason: z.ZodNullable<z.ZodString>;
198
198
  preview: z.ZodObject<{
@@ -995,6 +995,7 @@ export declare const categorySchema: z.ZodObject<{
995
995
  metaTitle: z.ZodNullable<z.ZodString>;
996
996
  metaDescription: z.ZodNullable<z.ZodString>;
997
997
  metaKeywords: z.ZodNullable<z.ZodString>;
998
+ flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
998
999
  createdAt: z.ZodString;
999
1000
  updatedAt: z.ZodString;
1000
1001
  }, z.core.$strip>;
@@ -1025,6 +1026,7 @@ export declare const categoryWithPathSchema: z.ZodObject<{
1025
1026
  metaTitle: z.ZodNullable<z.ZodString>;
1026
1027
  metaDescription: z.ZodNullable<z.ZodString>;
1027
1028
  metaKeywords: z.ZodNullable<z.ZodString>;
1029
+ flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1028
1030
  createdAt: z.ZodString;
1029
1031
  updatedAt: z.ZodString;
1030
1032
  fullPath: z.ZodString;
@@ -1050,6 +1052,7 @@ export declare const categoryWithPathSchema: z.ZodObject<{
1050
1052
  metaTitle: z.ZodNullable<z.ZodString>;
1051
1053
  metaDescription: z.ZodNullable<z.ZodString>;
1052
1054
  metaKeywords: z.ZodNullable<z.ZodString>;
1055
+ flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1053
1056
  createdAt: z.ZodString;
1054
1057
  updatedAt: z.ZodString;
1055
1058
  }, z.core.$strip>>;
@@ -1078,6 +1081,7 @@ export declare const categorySearchResultSchema: z.ZodObject<{
1078
1081
  metaTitle: z.ZodNullable<z.ZodString>;
1079
1082
  metaDescription: z.ZodNullable<z.ZodString>;
1080
1083
  metaKeywords: z.ZodNullable<z.ZodString>;
1084
+ flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1081
1085
  createdAt: z.ZodString;
1082
1086
  updatedAt: z.ZodString;
1083
1087
  fullPath: z.ZodString;
@@ -1103,6 +1107,7 @@ export declare const categorySearchResultSchema: z.ZodObject<{
1103
1107
  metaTitle: z.ZodNullable<z.ZodString>;
1104
1108
  metaDescription: z.ZodNullable<z.ZodString>;
1105
1109
  metaKeywords: z.ZodNullable<z.ZodString>;
1110
+ flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1106
1111
  createdAt: z.ZodString;
1107
1112
  updatedAt: z.ZodString;
1108
1113
  }, z.core.$strip>>;
@@ -1158,6 +1163,7 @@ export declare const categoryPatchRequestSchema: z.ZodObject<{
1158
1163
  metaTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1159
1164
  metaDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1160
1165
  metaKeywords: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1166
+ flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1161
1167
  }, z.core.$strip>;
1162
1168
  export type CategoryPatchRequest = z.infer<typeof categoryPatchRequestSchema>;
1163
1169
  export declare const categoryDeleteStrategySchema: z.ZodEnum<{
@@ -2007,6 +2013,376 @@ export declare const collectionPreviewSchema: z.ZodObject<{
2007
2013
  }, z.core.$strip>;
2008
2014
  export type CollectionPreview = z.infer<typeof collectionPreviewSchema>;
2009
2015
  //#endregion
2016
+ //#region src/schemas/commerce-flow.d.ts
2017
+ /**
2018
+ * 커머스 플로우(이슈 #115) — 주문상품이 따르는 플로우의 지금 상태와 할 수 있는 행동. 공개 계약은 필드 추가로만 자란다.
2019
+ * 행동 키·필드 키·꺼진 이유는 상점·앱이 늘리는 **열린 문자열**이다(모르는 값도 파싱한다). 공개 상태(`coreStatus`)만 닫힌 8개 값이다.
2020
+ * 화면은 이 값만 그리고 상태 이름으로 분기하지 않는다 — 판정은 서버가 한다.
2021
+ */
2022
+ export declare const flowInputFieldSchema: z.ZodObject<{
2023
+ key: z.ZodString;
2024
+ type: z.ZodString;
2025
+ required: z.ZodBoolean;
2026
+ label: z.ZodString;
2027
+ maxLength: z.ZodOptional<z.ZodNumber>;
2028
+ maxFiles: z.ZodOptional<z.ZodNumber>;
2029
+ options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
2030
+ }, z.core.$strip>;
2031
+ export type FlowInputField = z.infer<typeof flowInputFieldSchema>;
2032
+ export declare const flowActionSchema: z.ZodObject<{
2033
+ key: z.ZodString;
2034
+ label: z.ZodString;
2035
+ mode: z.ZodEnum<{
2036
+ REQUEST: "REQUEST";
2037
+ INSTANT: "INSTANT";
2038
+ VIEW: "VIEW";
2039
+ }>;
2040
+ enabled: z.ZodBoolean;
2041
+ disabled: z.ZodOptional<z.ZodObject<{
2042
+ reason: z.ZodString;
2043
+ message: z.ZodOptional<z.ZodString>;
2044
+ }, z.core.$strip>>;
2045
+ availableUntil: z.ZodOptional<z.ZodString>;
2046
+ subflow: z.ZodOptional<z.ZodString>;
2047
+ input: z.ZodOptional<z.ZodArray<z.ZodObject<{
2048
+ key: z.ZodString;
2049
+ type: z.ZodString;
2050
+ required: z.ZodBoolean;
2051
+ label: z.ZodString;
2052
+ maxLength: z.ZodOptional<z.ZodNumber>;
2053
+ maxFiles: z.ZodOptional<z.ZodNumber>;
2054
+ options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
2055
+ }, z.core.$strip>>>;
2056
+ partialQuantity: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"UNIT">]>>;
2057
+ }, z.core.$strip>;
2058
+ export type FlowAction = z.infer<typeof flowActionSchema>;
2059
+ /** 커스텀 필드 값 — 문자열(날짜·일시는 ISO 8601)·숫자·참거짓·null, 수량 단위 필드는 문자열 배열 */
2060
+ export declare const flowFieldValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>;
2061
+ export type FlowFieldValue = z.infer<typeof flowFieldValueSchema>;
2062
+ export declare const flowStateSchema: z.ZodObject<{
2063
+ key: z.ZodString;
2064
+ label: z.ZodString;
2065
+ coreStatus: z.ZodOptional<z.ZodEnum<{
2066
+ PAID: "PAID";
2067
+ CANCELED: "CANCELED";
2068
+ PAYMENT_WAITING: "PAYMENT_WAITING";
2069
+ CONFIRMED: "CONFIRMED";
2070
+ DISPATCHED: "DISPATCHED";
2071
+ DELIVERING: "DELIVERING";
2072
+ DELIVERED: "DELIVERED";
2073
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
2074
+ }>>;
2075
+ claimStatus: z.ZodOptional<z.ZodEnum<{
2076
+ REJECTED: "REJECTED";
2077
+ REQUESTED: "REQUESTED";
2078
+ HELD: "HELD";
2079
+ COLLECTING: "COLLECTING";
2080
+ COLLECTED: "COLLECTED";
2081
+ REDELIVERING: "REDELIVERING";
2082
+ APPROVED: "APPROVED";
2083
+ COMPLETED: "COMPLETED";
2084
+ WITHDRAWN: "WITHDRAWN";
2085
+ }>>;
2086
+ message: z.ZodOptional<z.ZodString>;
2087
+ enteredAt: z.ZodString;
2088
+ deadlineAt: z.ZodOptional<z.ZodString>;
2089
+ attachments: z.ZodOptional<z.ZodArray<z.ZodString>>;
2090
+ progress: z.ZodOptional<z.ZodBoolean>;
2091
+ fields: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
2092
+ }, z.core.$strip>;
2093
+ export type FlowState = z.infer<typeof flowStateSchema>;
2094
+ export declare const orderItemFlowSchema: z.ZodObject<{
2095
+ orderItemId: z.ZodString;
2096
+ flow: z.ZodObject<{
2097
+ flowId: z.ZodString;
2098
+ version: z.ZodNumber;
2099
+ }, z.core.$strip>;
2100
+ flowState: z.ZodObject<{
2101
+ key: z.ZodString;
2102
+ label: z.ZodString;
2103
+ coreStatus: z.ZodOptional<z.ZodEnum<{
2104
+ PAID: "PAID";
2105
+ CANCELED: "CANCELED";
2106
+ PAYMENT_WAITING: "PAYMENT_WAITING";
2107
+ CONFIRMED: "CONFIRMED";
2108
+ DISPATCHED: "DISPATCHED";
2109
+ DELIVERING: "DELIVERING";
2110
+ DELIVERED: "DELIVERED";
2111
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
2112
+ }>>;
2113
+ claimStatus: z.ZodOptional<z.ZodEnum<{
2114
+ REJECTED: "REJECTED";
2115
+ REQUESTED: "REQUESTED";
2116
+ HELD: "HELD";
2117
+ COLLECTING: "COLLECTING";
2118
+ COLLECTED: "COLLECTED";
2119
+ REDELIVERING: "REDELIVERING";
2120
+ APPROVED: "APPROVED";
2121
+ COMPLETED: "COMPLETED";
2122
+ WITHDRAWN: "WITHDRAWN";
2123
+ }>>;
2124
+ message: z.ZodOptional<z.ZodString>;
2125
+ enteredAt: z.ZodString;
2126
+ deadlineAt: z.ZodOptional<z.ZodString>;
2127
+ attachments: z.ZodOptional<z.ZodArray<z.ZodString>>;
2128
+ progress: z.ZodOptional<z.ZodBoolean>;
2129
+ fields: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
2130
+ }, z.core.$strip>;
2131
+ actions: z.ZodArray<z.ZodObject<{
2132
+ key: z.ZodString;
2133
+ label: z.ZodString;
2134
+ mode: z.ZodEnum<{
2135
+ REQUEST: "REQUEST";
2136
+ INSTANT: "INSTANT";
2137
+ VIEW: "VIEW";
2138
+ }>;
2139
+ enabled: z.ZodBoolean;
2140
+ disabled: z.ZodOptional<z.ZodObject<{
2141
+ reason: z.ZodString;
2142
+ message: z.ZodOptional<z.ZodString>;
2143
+ }, z.core.$strip>>;
2144
+ availableUntil: z.ZodOptional<z.ZodString>;
2145
+ subflow: z.ZodOptional<z.ZodString>;
2146
+ input: z.ZodOptional<z.ZodArray<z.ZodObject<{
2147
+ key: z.ZodString;
2148
+ type: z.ZodString;
2149
+ required: z.ZodBoolean;
2150
+ label: z.ZodString;
2151
+ maxLength: z.ZodOptional<z.ZodNumber>;
2152
+ maxFiles: z.ZodOptional<z.ZodNumber>;
2153
+ options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
2154
+ }, z.core.$strip>>>;
2155
+ partialQuantity: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"UNIT">]>>;
2156
+ }, z.core.$strip>>;
2157
+ timers: z.ZodArray<z.ZodObject<{
2158
+ key: z.ZodString;
2159
+ dueAt: z.ZodString;
2160
+ paused: z.ZodBoolean;
2161
+ }, z.core.$strip>>;
2162
+ ended: z.ZodBoolean;
2163
+ }, z.core.$strip>;
2164
+ export type OrderItemFlow = z.infer<typeof orderItemFlowSchema>;
2165
+ export declare const flowActionRequestSchema: z.ZodObject<{
2166
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2167
+ }, z.core.$strip>;
2168
+ export type FlowActionRequest = z.infer<typeof flowActionRequestSchema>;
2169
+ /**
2170
+ * 행동 실행 결과. 지금은 동기 완료(COMPLETED)뿐이다. 외부 호출이 든 전이는 202와 함께 ACCEPTED(runId)가 온다(HTTP·앱 노드 단계에서 더한다).
2171
+ * 동기 거절은 409(ACTION_NOT_AVAILABLE)다.
2172
+ */
2173
+ export declare const flowActionResultSchema: z.ZodObject<{
2174
+ status: z.ZodLiteral<"COMPLETED">;
2175
+ flowState: z.ZodObject<{
2176
+ key: z.ZodString;
2177
+ label: z.ZodString;
2178
+ coreStatus: z.ZodOptional<z.ZodEnum<{
2179
+ PAID: "PAID";
2180
+ CANCELED: "CANCELED";
2181
+ PAYMENT_WAITING: "PAYMENT_WAITING";
2182
+ CONFIRMED: "CONFIRMED";
2183
+ DISPATCHED: "DISPATCHED";
2184
+ DELIVERING: "DELIVERING";
2185
+ DELIVERED: "DELIVERED";
2186
+ PURCHASE_DECIDED: "PURCHASE_DECIDED";
2187
+ }>>;
2188
+ claimStatus: z.ZodOptional<z.ZodEnum<{
2189
+ REJECTED: "REJECTED";
2190
+ REQUESTED: "REQUESTED";
2191
+ HELD: "HELD";
2192
+ COLLECTING: "COLLECTING";
2193
+ COLLECTED: "COLLECTED";
2194
+ REDELIVERING: "REDELIVERING";
2195
+ APPROVED: "APPROVED";
2196
+ COMPLETED: "COMPLETED";
2197
+ WITHDRAWN: "WITHDRAWN";
2198
+ }>>;
2199
+ message: z.ZodOptional<z.ZodString>;
2200
+ enteredAt: z.ZodString;
2201
+ deadlineAt: z.ZodOptional<z.ZodString>;
2202
+ attachments: z.ZodOptional<z.ZodArray<z.ZodString>>;
2203
+ progress: z.ZodOptional<z.ZodBoolean>;
2204
+ fields: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
2205
+ }, z.core.$strip>;
2206
+ actions: z.ZodArray<z.ZodObject<{
2207
+ key: z.ZodString;
2208
+ label: z.ZodString;
2209
+ mode: z.ZodEnum<{
2210
+ REQUEST: "REQUEST";
2211
+ INSTANT: "INSTANT";
2212
+ VIEW: "VIEW";
2213
+ }>;
2214
+ enabled: z.ZodBoolean;
2215
+ disabled: z.ZodOptional<z.ZodObject<{
2216
+ reason: z.ZodString;
2217
+ message: z.ZodOptional<z.ZodString>;
2218
+ }, z.core.$strip>>;
2219
+ availableUntil: z.ZodOptional<z.ZodString>;
2220
+ subflow: z.ZodOptional<z.ZodString>;
2221
+ input: z.ZodOptional<z.ZodArray<z.ZodObject<{
2222
+ key: z.ZodString;
2223
+ type: z.ZodString;
2224
+ required: z.ZodBoolean;
2225
+ label: z.ZodString;
2226
+ maxLength: z.ZodOptional<z.ZodNumber>;
2227
+ maxFiles: z.ZodOptional<z.ZodNumber>;
2228
+ options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
2229
+ }, z.core.$strip>>>;
2230
+ partialQuantity: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"UNIT">]>>;
2231
+ }, z.core.$strip>>;
2232
+ affectedOrderItemIds: z.ZodArray<z.ZodString>;
2233
+ }, z.core.$strip>;
2234
+ export type FlowActionResult = z.infer<typeof flowActionResultSchema>;
2235
+ export declare const flowPresetSummarySchema: z.ZodObject<{
2236
+ key: z.ZodString;
2237
+ presetVersion: z.ZodNumber;
2238
+ name: z.ZodString;
2239
+ description: z.ZodString;
2240
+ availability: z.ZodEnum<{
2241
+ AVAILABLE: "AVAILABLE";
2242
+ BLOCKED: "BLOCKED";
2243
+ }>;
2244
+ dependsOn: z.ZodArray<z.ZodString>;
2245
+ requires: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2246
+ variables: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2247
+ }, z.core.$strip>;
2248
+ export type FlowPresetSummary = z.infer<typeof flowPresetSummarySchema>;
2249
+ export declare const commerceFlowSummarySchema: z.ZodObject<{
2250
+ flowId: z.ZodString;
2251
+ key: z.ZodString;
2252
+ name: z.ZodString;
2253
+ progression: z.ZodEnum<{
2254
+ ITEM: "ITEM";
2255
+ ORDER_GROUP: "ORDER_GROUP";
2256
+ }>;
2257
+ fulfillmentMethods: z.ZodArray<z.ZodString>;
2258
+ presetKey: z.ZodNullable<z.ZodString>;
2259
+ presetVersion: z.ZodNullable<z.ZodNumber>;
2260
+ activeVersion: z.ZodNullable<z.ZodNumber>;
2261
+ archivedAt: z.ZodNullable<z.ZodString>;
2262
+ createdAt: z.ZodString;
2263
+ updatedAt: z.ZodString;
2264
+ }, z.core.$strip>;
2265
+ export type CommerceFlowSummary = z.infer<typeof commerceFlowSummarySchema>;
2266
+ export declare const commerceFlowVersionViewSchema: z.ZodObject<{
2267
+ version: z.ZodNumber;
2268
+ status: z.ZodEnum<{
2269
+ ACTIVE: "ACTIVE";
2270
+ DRAFT: "DRAFT";
2271
+ LEGACY: "LEGACY";
2272
+ }>;
2273
+ revision: z.ZodNumber;
2274
+ graph: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2275
+ definition: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2276
+ variables: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2277
+ publishedAt: z.ZodNullable<z.ZodString>;
2278
+ }, z.core.$strip>;
2279
+ export declare const commerceFlowSchema: z.ZodObject<{
2280
+ flowId: z.ZodString;
2281
+ key: z.ZodString;
2282
+ name: z.ZodString;
2283
+ progression: z.ZodEnum<{
2284
+ ITEM: "ITEM";
2285
+ ORDER_GROUP: "ORDER_GROUP";
2286
+ }>;
2287
+ fulfillmentMethods: z.ZodArray<z.ZodString>;
2288
+ presetKey: z.ZodNullable<z.ZodString>;
2289
+ presetVersion: z.ZodNullable<z.ZodNumber>;
2290
+ activeVersion: z.ZodNullable<z.ZodNumber>;
2291
+ archivedAt: z.ZodNullable<z.ZodString>;
2292
+ createdAt: z.ZodString;
2293
+ updatedAt: z.ZodString;
2294
+ draft: z.ZodNullable<z.ZodObject<{
2295
+ version: z.ZodNumber;
2296
+ status: z.ZodEnum<{
2297
+ ACTIVE: "ACTIVE";
2298
+ DRAFT: "DRAFT";
2299
+ LEGACY: "LEGACY";
2300
+ }>;
2301
+ revision: z.ZodNumber;
2302
+ graph: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2303
+ definition: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2304
+ variables: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2305
+ publishedAt: z.ZodNullable<z.ZodString>;
2306
+ }, z.core.$strip>>;
2307
+ active: z.ZodNullable<z.ZodObject<{
2308
+ version: z.ZodNumber;
2309
+ status: z.ZodEnum<{
2310
+ ACTIVE: "ACTIVE";
2311
+ DRAFT: "DRAFT";
2312
+ LEGACY: "LEGACY";
2313
+ }>;
2314
+ revision: z.ZodNumber;
2315
+ graph: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2316
+ definition: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2317
+ variables: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2318
+ publishedAt: z.ZodNullable<z.ZodString>;
2319
+ }, z.core.$strip>>;
2320
+ versions: z.ZodArray<z.ZodObject<{
2321
+ version: z.ZodNumber;
2322
+ status: z.ZodEnum<{
2323
+ ACTIVE: "ACTIVE";
2324
+ DRAFT: "DRAFT";
2325
+ LEGACY: "LEGACY";
2326
+ }>;
2327
+ publishedAt: z.ZodNullable<z.ZodString>;
2328
+ }, z.core.$strip>>;
2329
+ }, z.core.$strip>;
2330
+ export type CommerceFlow = z.infer<typeof commerceFlowSchema>;
2331
+ export declare const createCommerceFlowRequestSchema: z.ZodObject<{
2332
+ key: z.ZodString;
2333
+ name: z.ZodOptional<z.ZodString>;
2334
+ presetKey: z.ZodOptional<z.ZodString>;
2335
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2336
+ }, z.core.$strip>;
2337
+ export type CreateCommerceFlowRequest = z.infer<typeof createCommerceFlowRequestSchema>;
2338
+ export declare const saveFlowDraftRequestSchema: z.ZodObject<{
2339
+ graph: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2340
+ definition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2341
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2342
+ }, z.core.$strip>;
2343
+ export type SaveFlowDraftRequest = z.infer<typeof saveFlowDraftRequestSchema>;
2344
+ export declare const commerceFlowCheckSchema: z.ZodObject<{
2345
+ publishable: z.ZodBoolean;
2346
+ blocking: z.ZodArray<z.ZodObject<{
2347
+ code: z.ZodString;
2348
+ message: z.ZodString;
2349
+ nodeId: z.ZodOptional<z.ZodString>;
2350
+ edgeId: z.ZodOptional<z.ZodString>;
2351
+ }, z.core.$strip>>;
2352
+ warnings: z.ZodArray<z.ZodObject<{
2353
+ code: z.ZodString;
2354
+ message: z.ZodString;
2355
+ nodeId: z.ZodOptional<z.ZodString>;
2356
+ edgeId: z.ZodOptional<z.ZodString>;
2357
+ }, z.core.$strip>>;
2358
+ }, z.core.$strip>;
2359
+ export type CommerceFlowCheck = z.infer<typeof commerceFlowCheckSchema>;
2360
+ export declare const resolvedFlowSchema: z.ZodObject<{
2361
+ flowId: z.ZodString;
2362
+ version: z.ZodNumber;
2363
+ source: z.ZodEnum<{
2364
+ PRODUCT: "PRODUCT";
2365
+ CATEGORY: "CATEGORY";
2366
+ PLATFORM: "PLATFORM";
2367
+ }>;
2368
+ }, z.core.$strip>;
2369
+ export type ResolvedFlow = z.infer<typeof resolvedFlowSchema>;
2370
+ /** 시크릿 이름 — 플로우 변수 `secretRef`의 값이다 */
2371
+ export declare const flowSecretNameSchema: z.ZodString;
2372
+ /** HTTP 노드가 부를 셀러 API — 헤더 값은 응답에 싣지 않는다 */
2373
+ export declare const flowSecretSchema: z.ZodObject<{
2374
+ name: z.ZodString;
2375
+ url: z.ZodString;
2376
+ headerNames: z.ZodArray<z.ZodString>;
2377
+ updatedAt: z.ZodString;
2378
+ }, z.core.$strip>;
2379
+ export type FlowSecret = z.infer<typeof flowSecretSchema>;
2380
+ export declare const saveFlowSecretRequestSchema: z.ZodObject<{
2381
+ url: z.ZodURL;
2382
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2383
+ }, z.core.$strip>;
2384
+ export type SaveFlowSecretRequest = z.input<typeof saveFlowSecretRequestSchema>;
2385
+ //#endregion
2010
2386
  //#region src/schemas/coupon.d.ts
2011
2387
  /**
2012
2388
  * 쿠폰 관리 API 계약 (이슈 #47) — `/v1/coupons/**`, 스코프 `promotion:r|rw`.
@@ -2624,65 +3000,399 @@ export declare const customerWithdrawalBlockedDetailsSchema: z.ZodObject<{
2624
3000
  }, z.core.$strip>;
2625
3001
  export type CustomerWithdrawalBlockedDetails = z.infer<typeof customerWithdrawalBlockedDetailsSchema>;
2626
3002
  //#endregion
2627
- //#region src/schemas/login.d.ts
2628
- /** 소셜 로그인 공급자 */
2629
- export declare const loginProviderSchema: z.ZodEnum<{
2630
- kakao: "kakao";
2631
- naver: "naver";
2632
- google: "google";
3003
+ //#region src/schemas/fulfillment.d.ts
3004
+ /**
3005
+ * 상품 유형 (이슈 #48·#57) — 배송이 필요한 상품과 필요 없는 상품을 가르는 축이다.
3006
+ *
3007
+ * **상품 유형은 이행 방식 하나로 표현한다.** `fulfillment.type`이 배송 필요 여부, 이행 흐름, 클레임 규칙을 정한다.
3008
+ * 코드 곳곳에서 유형 이름으로 분기하지 않고 이 파일의 판정 함수(`requiresShipping`·`fulfillmentRuleOf`)를 지난다.
3009
+ *
3010
+ * 주문상품 상태 enum은 바꾸지 않는다. 비실물의 **제공 완료는 `DELIVERED`를 재사용한다** — 새 상태를 더하면 기존 소비자의
3011
+ * 상태 분기(배송완료 뒤 구매확정 대기, 반품 가능 판정)가 새 값을 모른다. 표시는 유형으로 가른다.
3012
+ */
3013
+ /**
3014
+ * 상품 유형.
3015
+ * - `SHIPPING` 배송 상품. 택배로 발송하고 송장·배송 추적으로 배송완료가 된다
3016
+ * - `MANUAL` 배송 없는 상품(비실물). 셀러가 제공 처리(`POST /v1/order-items/{orderItemId}/fulfill`)로 제공 완료를 기록한다
3017
+ *
3018
+ * 비실물의 세부 구분(파일 다운로드·코드 발급·이용권·방문 수령)은 2026-09-28에 제품에서 뺐다(이슈 #48 범위 축소).
3019
+ * 이름은 이행 방식이다 — `SHIPPING`이 택배 발송이듯 `MANUAL`은 셀러가 직접 제공한다는 뜻이다.
3020
+ */
3021
+ export declare const fulfillmentTypeSchema: z.ZodEnum<{
3022
+ SHIPPING: "SHIPPING";
3023
+ MANUAL: "MANUAL";
2633
3024
  }>;
2634
- export type LoginProvider = z.infer<typeof loginProviderSchema>;
2635
- /** 공급자 연결 상태 — 비밀 값은 앞 4자리만 */
2636
- export declare const loginProviderStatusSchema: z.ZodObject<{
2637
- provider: z.ZodEnum<{
2638
- kakao: "kakao";
2639
- naver: "naver";
2640
- google: "google";
2641
- }>;
2642
- connected: z.ZodBoolean;
2643
- enabled: z.ZodBoolean;
2644
- clientIdPrefix: z.ZodNullable<z.ZodString>;
2645
- secretPrefix: z.ZodNullable<z.ZodString>;
2646
- lastTestedAt: z.ZodNullable<z.ZodString>;
2647
- lastTestOk: z.ZodNullable<z.ZodBoolean>;
2648
- linkedMemberCount: z.ZodNumber;
2649
- onlyMethodMemberCount: z.ZodNumber;
2650
- callbackUrl: z.ZodURL;
2651
- }, z.core.$strip>;
2652
- export type LoginProviderStatus = z.infer<typeof loginProviderStatusSchema>;
2653
- /** `GET /v1/store/login-settings` */
2654
- export declare const loginSettingsSchema: z.ZodObject<{
2655
- passwordLoginEnabled: z.ZodBoolean;
2656
- passwordOnlyMemberCount: z.ZodNumber;
2657
- storefrontOrigins: z.ZodArray<z.ZodString>;
2658
- providers: z.ZodArray<z.ZodObject<{
2659
- provider: z.ZodEnum<{
2660
- kakao: "kakao";
2661
- naver: "naver";
2662
- google: "google";
2663
- }>;
2664
- connected: z.ZodBoolean;
2665
- enabled: z.ZodBoolean;
2666
- clientIdPrefix: z.ZodNullable<z.ZodString>;
2667
- secretPrefix: z.ZodNullable<z.ZodString>;
2668
- lastTestedAt: z.ZodNullable<z.ZodString>;
2669
- lastTestOk: z.ZodNullable<z.ZodBoolean>;
2670
- linkedMemberCount: z.ZodNumber;
2671
- onlyMethodMemberCount: z.ZodNumber;
2672
- callbackUrl: z.ZodURL;
2673
- }, z.core.$strip>>;
2674
- }, z.core.$strip>;
2675
- export type LoginSettings = z.infer<typeof loginSettingsSchema>;
2676
- /** `PATCH /v1/store/login-settings` */
2677
- export declare const updateLoginSettingsRequestSchema: z.ZodObject<{
2678
- passwordLoginEnabled: z.ZodBoolean;
2679
- }, z.core.$strip>;
2680
- export type UpdateLoginSettingsRequest = z.infer<typeof updateLoginSettingsRequestSchema>;
2681
- /** `PUT /v1/store/auth-providers/{provider}` — 저장 전에 연결 테스트를 한다 */
2682
- export declare const saveLoginProviderRequestSchema: z.ZodObject<{
2683
- clientId: z.ZodString;
2684
- clientSecret: z.ZodString;
2685
- }, z.core.$strip>;
3025
+ export type FulfillmentType = z.infer<typeof fulfillmentTypeSchema>;
3026
+ /**
3027
+ * 응답 스키마용 유형 — 서버가 나중에 유형을 더해도 옛 SDK가 응답 파싱에서 깨지지 않게 문자열로 받는다.
3028
+ * 요청은 `fulfillmentTypeSchema`(닫힌 enum)로 검증한다.
3029
+ */
3030
+ export declare const fulfillmentTypeResponseSchema: z.ZodString;
3031
+ /** 유형 하나의 규칙 — 배송·클레임이 이 표를 읽는다 */
3032
+ export interface FulfillmentRule {
3033
+ /** 택배 배송이 필요한가 — 배송비·배송지·발송 흐름의 대상인가 */
3034
+ requiresShipping: boolean;
3035
+ /** 반품에 수거가 필요한가 — 실물만 수거한다 */
3036
+ requiresCollection: boolean;
3037
+ /** 교환을 받는가 — 실물만 받는다 */
3038
+ exchangeSupported: boolean;
3039
+ }
3040
+ /** 유형별 규칙표 — **유일한 원천이다.** */
3041
+ export declare const FULFILLMENT_RULES: Readonly<Record<FulfillmentType, FulfillmentRule>>;
3042
+ /**
3043
+ * 저장된 값 → 유형. null·모르는 값은 `SHIPPING`이다 — 이 필드 이전의 상품·주문상품은 모두 배송 상품이었다.
3044
+ */
3045
+ export declare function fulfillmentTypeOf(value: string | null | undefined): FulfillmentType;
3046
+ /** 유형의 규칙 — 모르는 값은 배송 상품 규칙이다 */
3047
+ export declare function fulfillmentRuleOf(type: string | null | undefined): FulfillmentRule;
3048
+ /**
3049
+ * 이행 방식.
3050
+ * - `CARRIER` 택배(송장·배송 추적)
3051
+ * - `DIRECT` 직접 배달(배송지 있음, 송장 없음)
3052
+ * - `PICKUP` 방문 수령(배송지·배송비 없음)
3053
+ * - `PROVIDED` 제공 처리(배송 없는 상품)
3054
+ */
3055
+ export declare const FULFILLMENT_METHODS: readonly ["CARRIER", "DIRECT", "PICKUP", "PROVIDED"];
3056
+ export declare const fulfillmentMethodSchema: z.ZodEnum<{
3057
+ CARRIER: "CARRIER";
3058
+ DIRECT: "DIRECT";
3059
+ PICKUP: "PICKUP";
3060
+ PROVIDED: "PROVIDED";
3061
+ }>;
3062
+ export type FulfillmentMethod = z.infer<typeof fulfillmentMethodSchema>;
3063
+ /** 방식 하나의 규칙 */
3064
+ export interface FulfillmentMethodRule {
3065
+ /** 배송지를 받는가 — 배송비 묶음·배송지 필수 판정의 대상인가 */
3066
+ requiresAddress: boolean;
3067
+ /** 송장 등록·배송 추적으로 배송완료가 되는가 */
3068
+ carrierTracking: boolean;
3069
+ /** 구매자가 픽업 장소를 고르는가 */
3070
+ pickupLocation: boolean;
3071
+ }
3072
+ /** 방식별 규칙표 — **유일한 원천이다.** */
3073
+ export declare const FULFILLMENT_METHOD_RULES: Readonly<Record<FulfillmentMethod, FulfillmentMethodRule>>;
3074
+ /** 유형별 허용 방식 — 첫 값이 유형 기본이다 */
3075
+ export declare const FULFILLMENT_METHODS_BY_TYPE: Readonly<Record<FulfillmentType, readonly FulfillmentMethod[]>>;
3076
+ /** 유형의 기본 방식 — 허용 방식을 두지 않은 상품·이 필드 이전 주문상품 */
3077
+ export declare function defaultFulfillmentMethodOf(type: string | null | undefined): FulfillmentMethod;
3078
+ /** 상품의 허용 방식 — 두지 않았으면 유형 기본 하나다 */
3079
+ export declare function fulfillmentMethodsOf(fulfillment: {
3080
+ type: string;
3081
+ methods?: readonly string[] | null;
3082
+ }): FulfillmentMethod[];
3083
+ /** 저장된 방식 → 방식. null·모르는 값은 유형 기본이다 */
3084
+ export declare function fulfillmentMethodOf(type: string | null | undefined, method: string | null | undefined): FulfillmentMethod;
3085
+ /**
3086
+ * 택배 배송이 필요한가 — 배송비 묶음·배송지·발송 흐름의 판정은 이 함수 하나를 지난다.
3087
+ * 방식을 주면 방식 규칙도 본다(배송 상품의 방문 수령은 배송이 없다). 방식을 모르면 유형 규칙만 본다.
3088
+ */
3089
+ export declare function requiresShipping(type: string | null | undefined, method?: string | null): boolean;
3090
+ /** 반품에 수거가 필요한가 — 비실물 반품은 수거 등록·수거 완료 없이 승인한다 */
3091
+ export declare function requiresCollection(type: string | null | undefined): boolean;
3092
+ /**
3093
+ * 배송이 없는 주문상품의 배송 묶음 키 (`order_items.delivery_bundle_key`).
3094
+ *
3095
+ * null로 두면 환불 정산이 #29 이전 주문의 레거시 폴백(「묶음 = 같은 상품」, 상품의 **현재** 배송비)을 탄다.
3096
+ * 이 키를 만나면 배송비 환불·차감이 0이고 `orders.delivery_fee_settlements`에 항목을 만들지 않는다.
3097
+ * 정책 지문 키(`b:…`)와 겹치지 않는다.
3098
+ */
3099
+ export declare const NO_SHIPPING_BUNDLE_KEY = "none";
3100
+ /** 배송비 유형 — 무료·유료·조건부 무료 */
3101
+ export declare const deliveryTypeSchema: z.ZodEnum<{
3102
+ FREE: "FREE";
3103
+ PAID: "PAID";
3104
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
3105
+ }>;
3106
+ export type DeliveryType = z.infer<typeof deliveryTypeSchema>;
3107
+ /**
3108
+ * 상품 이행 — 등록(POST). 배송 상품의 `shipping`을 생략하면 기본값(유료 배송·상점 기본 배송비·기본 출고지·반품지)이다.
3109
+ */
3110
+ export declare const productFulfillmentCreateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3111
+ type: z.ZodLiteral<"SHIPPING">;
3112
+ shipping: z.ZodOptional<z.ZodObject<{
3113
+ deliveryType: z.ZodDefault<z.ZodEnum<{
3114
+ FREE: "FREE";
3115
+ PAID: "PAID";
3116
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
3117
+ }>>;
3118
+ deliveryFee: z.ZodOptional<z.ZodNumber>;
3119
+ conditionalFreeAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3120
+ shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3121
+ returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3122
+ }, z.core.$strict>>;
3123
+ methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3124
+ CARRIER: "CARRIER";
3125
+ DIRECT: "DIRECT";
3126
+ PICKUP: "PICKUP";
3127
+ PROVIDED: "PROVIDED";
3128
+ }>>>;
3129
+ }, z.core.$strict>, z.ZodObject<{
3130
+ type: z.ZodLiteral<"MANUAL">;
3131
+ methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3132
+ CARRIER: "CARRIER";
3133
+ DIRECT: "DIRECT";
3134
+ PICKUP: "PICKUP";
3135
+ PROVIDED: "PROVIDED";
3136
+ }>>>;
3137
+ }, z.core.$strict>], "type">;
3138
+ export type ProductFulfillmentCreate = z.infer<typeof productFulfillmentCreateSchema>;
3139
+ /** 등록 요청의 입력 모양 — 기본값이 채워지기 전(생략 가능한 필드가 optional) */
3140
+ export type ProductFulfillmentCreateInput = z.input<typeof productFulfillmentCreateSchema>;
3141
+ /**
3142
+ * 상품 이행 — 수정(PUT·PATCH). 통째 교체이고 유형 키와 그 안의 필드가 **모두 필수**다. 서버는 현재 값과 병합하지 않는다.
3143
+ * `fulfillment` 자체를 생략하면 이행을 바꾸지 않는다.
3144
+ */
3145
+ export declare const productFulfillmentUpdateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3146
+ type: z.ZodLiteral<"SHIPPING">;
3147
+ shipping: z.ZodObject<{
3148
+ deliveryType: z.ZodEnum<{
3149
+ FREE: "FREE";
3150
+ PAID: "PAID";
3151
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
3152
+ }>;
3153
+ deliveryFee: z.ZodNumber;
3154
+ conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
3155
+ shippingAddressId: z.ZodNullable<z.ZodString>;
3156
+ returnAddressId: z.ZodNullable<z.ZodString>;
3157
+ }, z.core.$strict>;
3158
+ methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3159
+ CARRIER: "CARRIER";
3160
+ DIRECT: "DIRECT";
3161
+ PICKUP: "PICKUP";
3162
+ PROVIDED: "PROVIDED";
3163
+ }>>>;
3164
+ }, z.core.$strict>, z.ZodObject<{
3165
+ type: z.ZodLiteral<"MANUAL">;
3166
+ methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3167
+ CARRIER: "CARRIER";
3168
+ DIRECT: "DIRECT";
3169
+ PICKUP: "PICKUP";
3170
+ PROVIDED: "PROVIDED";
3171
+ }>>>;
3172
+ }, z.core.$strict>], "type">;
3173
+ export type ProductFulfillmentUpdate = z.infer<typeof productFulfillmentUpdateSchema>;
3174
+ /**
3175
+ * 저장된 상품 이행 — 알려진 유형의 닫힌 유니온. 서버의 상품 엔티티와 응답이 이 모양을 쓴다.
3176
+ * 응답 파싱은 `productFulfillmentResponseSchema`(열린 유니온)를 쓴다.
3177
+ */
3178
+ export declare const productFulfillmentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3179
+ type: z.ZodLiteral<"SHIPPING">;
3180
+ shipping: z.ZodObject<{
3181
+ deliveryType: z.ZodEnum<{
3182
+ FREE: "FREE";
3183
+ PAID: "PAID";
3184
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
3185
+ }>;
3186
+ deliveryFee: z.ZodNumber;
3187
+ conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
3188
+ shippingAddressId: z.ZodNullable<z.ZodString>;
3189
+ returnAddressId: z.ZodNullable<z.ZodString>;
3190
+ }, z.core.$strip>;
3191
+ methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
3192
+ }, z.core.$strip>, z.ZodObject<{
3193
+ type: z.ZodLiteral<"MANUAL">;
3194
+ methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
3195
+ }, z.core.$strip>], "type">;
3196
+ export type ProductFulfillment = z.infer<typeof productFulfillmentSchema>;
3197
+ /** 유형 이름 → 그 유형의 저장된 이행 */
3198
+ export type ProductFulfillmentOf<T extends FulfillmentType> = Extract<ProductFulfillment, {
3199
+ type: T;
3200
+ }>;
3201
+ /** 응답이 알려 주는 모르는 유형 — SDK가 아직 모르는 유형(서버가 나중에 더한 유형) */
3202
+ export interface UnknownFulfillment {
3203
+ type: "OTHER";
3204
+ /** 서버가 보낸 유형 이름 */
3205
+ rawType: string;
3206
+ }
3207
+ /**
3208
+ * 열린 응답 유니온 — 알려진 유형은 판별 유니온으로 검사하고, **모르는 유형만** `{ type: "OTHER", rawType }`로 읽는다.
3209
+ *
3210
+ * `type: z.string()` 가지를 그대로 두면 TS가 `type === "SHIPPING"`으로 좁혀도 문자열 가지가 남는다. `OTHER` 리터럴로 바꿔 좁히기를
3211
+ * 지킨다. 알려진 유형의 모양이 틀린 응답은 폴백으로 숨기지 않고 파싱 오류로 둔다.
3212
+ */
3213
+ export declare function openFulfillmentUnion<T extends z.ZodType>(known: T): z.ZodUnion<readonly [T, z.ZodPipe<z.ZodObject<{
3214
+ type: z.ZodString;
3215
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
3216
+ [x: string]: unknown;
3217
+ type: string;
3218
+ }>>]>;
3219
+ export declare const productFulfillmentResponseSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
3220
+ type: z.ZodLiteral<"SHIPPING">;
3221
+ shipping: z.ZodObject<{
3222
+ deliveryType: z.ZodEnum<{
3223
+ FREE: "FREE";
3224
+ PAID: "PAID";
3225
+ CONDITIONAL_FREE: "CONDITIONAL_FREE";
3226
+ }>;
3227
+ deliveryFee: z.ZodNumber;
3228
+ conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
3229
+ shippingAddressId: z.ZodNullable<z.ZodString>;
3230
+ returnAddressId: z.ZodNullable<z.ZodString>;
3231
+ }, z.core.$strip>;
3232
+ methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
3233
+ }, z.core.$strip>, z.ZodObject<{
3234
+ type: z.ZodLiteral<"MANUAL">;
3235
+ methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
3236
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3237
+ type: z.ZodString;
3238
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
3239
+ [x: string]: unknown;
3240
+ type: string;
3241
+ }>>]>;
3242
+ export type ProductFulfillmentView = z.infer<typeof productFulfillmentResponseSchema>;
3243
+ /** 주문상품의 주문 시점 픽업 장소 — 장소를 고치거나 지워도 이 주문의 안내는 바뀌지 않는다 */
3244
+ export declare const pickupLocationSnapshotSchema: z.ZodObject<{
3245
+ locationId: z.ZodString;
3246
+ name: z.ZodString;
3247
+ address: z.ZodString;
3248
+ phone: z.ZodNullable<z.ZodString>;
3249
+ hours: z.ZodNullable<z.ZodString>;
3250
+ }, z.core.$strip>;
3251
+ export type PickupLocationSnapshot = z.infer<typeof pickupLocationSnapshotSchema>;
3252
+ /**
3253
+ * 주문상품의 주문 시점 이행 — 결제 확정이 주문서 줄에서 굳힌다. 상품의 현재 값이 아니다. 서버는 주문상품 컬럼
3254
+ * (`fulfillment_type`·`delivery_bundle_key`)과 jsonb(`fulfillment_snapshot`)를 합쳐 이 모양을 만든다.
3255
+ */
3256
+ export declare const orderItemFulfillmentSnapshotSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3257
+ type: z.ZodLiteral<"SHIPPING">;
3258
+ shipping: z.ZodObject<{
3259
+ bundleKey: z.ZodNullable<z.ZodString>;
3260
+ returnAddressId: z.ZodNullable<z.ZodString>;
3261
+ }, z.core.$strip>;
3262
+ method: z.ZodOptional<z.ZodString>;
3263
+ pickupLocation: z.ZodOptional<z.ZodObject<{
3264
+ locationId: z.ZodString;
3265
+ name: z.ZodString;
3266
+ address: z.ZodString;
3267
+ phone: z.ZodNullable<z.ZodString>;
3268
+ hours: z.ZodNullable<z.ZodString>;
3269
+ }, z.core.$strip>>;
3270
+ }, z.core.$strip>, z.ZodObject<{
3271
+ type: z.ZodLiteral<"MANUAL">;
3272
+ method: z.ZodOptional<z.ZodString>;
3273
+ pickupLocation: z.ZodOptional<z.ZodObject<{
3274
+ locationId: z.ZodString;
3275
+ name: z.ZodString;
3276
+ address: z.ZodString;
3277
+ phone: z.ZodNullable<z.ZodString>;
3278
+ hours: z.ZodNullable<z.ZodString>;
3279
+ }, z.core.$strip>>;
3280
+ }, z.core.$strip>], "type">;
3281
+ export type OrderItemFulfillmentSnapshot = z.infer<typeof orderItemFulfillmentSnapshotSchema>;
3282
+ export declare const orderItemFulfillmentSnapshotResponseSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
3283
+ type: z.ZodLiteral<"SHIPPING">;
3284
+ shipping: z.ZodObject<{
3285
+ bundleKey: z.ZodNullable<z.ZodString>;
3286
+ returnAddressId: z.ZodNullable<z.ZodString>;
3287
+ }, z.core.$strip>;
3288
+ method: z.ZodOptional<z.ZodString>;
3289
+ pickupLocation: z.ZodOptional<z.ZodObject<{
3290
+ locationId: z.ZodString;
3291
+ name: z.ZodString;
3292
+ address: z.ZodString;
3293
+ phone: z.ZodNullable<z.ZodString>;
3294
+ hours: z.ZodNullable<z.ZodString>;
3295
+ }, z.core.$strip>>;
3296
+ }, z.core.$strip>, z.ZodObject<{
3297
+ type: z.ZodLiteral<"MANUAL">;
3298
+ method: z.ZodOptional<z.ZodString>;
3299
+ pickupLocation: z.ZodOptional<z.ZodObject<{
3300
+ locationId: z.ZodString;
3301
+ name: z.ZodString;
3302
+ address: z.ZodString;
3303
+ phone: z.ZodNullable<z.ZodString>;
3304
+ hours: z.ZodNullable<z.ZodString>;
3305
+ }, z.core.$strip>>;
3306
+ }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3307
+ type: z.ZodString;
3308
+ }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
3309
+ [x: string]: unknown;
3310
+ type: string;
3311
+ }>>]>;
3312
+ export type OrderItemFulfillmentSnapshotView = z.infer<typeof orderItemFulfillmentSnapshotResponseSchema>;
3313
+ /** 상점당 픽업 장소 상한 */
3314
+ export declare const MAX_PICKUP_LOCATIONS = 20;
3315
+ /** 방문 수령(`PICKUP`) 장소 — 상점 설정이다. 구매자가 주문서에서 고르고 주문상품에 주문 시점 값이 남는다 */
3316
+ export declare const pickupLocationSchema: z.ZodObject<{
3317
+ locationId: z.ZodString;
3318
+ name: z.ZodString;
3319
+ address: z.ZodString;
3320
+ phone: z.ZodNullable<z.ZodString>;
3321
+ hours: z.ZodNullable<z.ZodString>;
3322
+ usable: z.ZodBoolean;
3323
+ sortOrder: z.ZodNumber;
3324
+ createdAt: z.ZodString;
3325
+ }, z.core.$strip>;
3326
+ export type PickupLocation = z.infer<typeof pickupLocationSchema>;
3327
+ export declare const pickupLocationRequestSchema: z.ZodObject<{
3328
+ name: z.ZodString;
3329
+ address: z.ZodString;
3330
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3331
+ hours: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3332
+ usable: z.ZodDefault<z.ZodBoolean>;
3333
+ }, z.core.$strict>;
3334
+ export type PickupLocationRequest = z.infer<typeof pickupLocationRequestSchema>;
3335
+ export type PickupLocationRequestInput = z.input<typeof pickupLocationRequestSchema>;
3336
+ //#endregion
3337
+ //#region src/schemas/login.d.ts
3338
+ /** 소셜 로그인 공급자 */
3339
+ export declare const loginProviderSchema: z.ZodEnum<{
3340
+ kakao: "kakao";
3341
+ naver: "naver";
3342
+ google: "google";
3343
+ }>;
3344
+ export type LoginProvider = z.infer<typeof loginProviderSchema>;
3345
+ /** 공급자 연결 상태 — 비밀 값은 앞 4자리만 */
3346
+ export declare const loginProviderStatusSchema: z.ZodObject<{
3347
+ provider: z.ZodEnum<{
3348
+ kakao: "kakao";
3349
+ naver: "naver";
3350
+ google: "google";
3351
+ }>;
3352
+ connected: z.ZodBoolean;
3353
+ enabled: z.ZodBoolean;
3354
+ clientIdPrefix: z.ZodNullable<z.ZodString>;
3355
+ secretPrefix: z.ZodNullable<z.ZodString>;
3356
+ lastTestedAt: z.ZodNullable<z.ZodString>;
3357
+ lastTestOk: z.ZodNullable<z.ZodBoolean>;
3358
+ linkedMemberCount: z.ZodNumber;
3359
+ onlyMethodMemberCount: z.ZodNumber;
3360
+ callbackUrl: z.ZodURL;
3361
+ }, z.core.$strip>;
3362
+ export type LoginProviderStatus = z.infer<typeof loginProviderStatusSchema>;
3363
+ /** `GET /v1/store/login-settings` */
3364
+ export declare const loginSettingsSchema: z.ZodObject<{
3365
+ passwordLoginEnabled: z.ZodBoolean;
3366
+ passwordOnlyMemberCount: z.ZodNumber;
3367
+ storefrontOrigins: z.ZodArray<z.ZodString>;
3368
+ providers: z.ZodArray<z.ZodObject<{
3369
+ provider: z.ZodEnum<{
3370
+ kakao: "kakao";
3371
+ naver: "naver";
3372
+ google: "google";
3373
+ }>;
3374
+ connected: z.ZodBoolean;
3375
+ enabled: z.ZodBoolean;
3376
+ clientIdPrefix: z.ZodNullable<z.ZodString>;
3377
+ secretPrefix: z.ZodNullable<z.ZodString>;
3378
+ lastTestedAt: z.ZodNullable<z.ZodString>;
3379
+ lastTestOk: z.ZodNullable<z.ZodBoolean>;
3380
+ linkedMemberCount: z.ZodNumber;
3381
+ onlyMethodMemberCount: z.ZodNumber;
3382
+ callbackUrl: z.ZodURL;
3383
+ }, z.core.$strip>>;
3384
+ }, z.core.$strip>;
3385
+ export type LoginSettings = z.infer<typeof loginSettingsSchema>;
3386
+ /** `PATCH /v1/store/login-settings` */
3387
+ export declare const updateLoginSettingsRequestSchema: z.ZodObject<{
3388
+ passwordLoginEnabled: z.ZodBoolean;
3389
+ }, z.core.$strip>;
3390
+ export type UpdateLoginSettingsRequest = z.infer<typeof updateLoginSettingsRequestSchema>;
3391
+ /** `PUT /v1/store/auth-providers/{provider}` — 저장 전에 연결 테스트를 한다 */
3392
+ export declare const saveLoginProviderRequestSchema: z.ZodObject<{
3393
+ clientId: z.ZodString;
3394
+ clientSecret: z.ZodString;
3395
+ }, z.core.$strip>;
2686
3396
  export type SaveLoginProviderRequest = z.infer<typeof saveLoginProviderRequestSchema>;
2687
3397
  /** `PATCH /v1/store/auth-providers/{provider}` */
2688
3398
  export declare const updateLoginProviderRequestSchema: z.ZodObject<{
@@ -2895,6 +3605,7 @@ export declare const eventTypeSchema: z.ZodEnum<{
2895
3605
  "INQUIRY.CREATED": "INQUIRY.CREATED";
2896
3606
  "REVIEW.CREATED": "REVIEW.CREATED";
2897
3607
  "PRODUCT.OUT_OF_STOCK": "PRODUCT.OUT_OF_STOCK";
3608
+ "ORDER.FLOW_NOTIFICATION": "ORDER.FLOW_NOTIFICATION";
2898
3609
  }>;
2899
3610
  export type EventType = z.infer<typeof eventTypeSchema>;
2900
3611
  export declare const webhookStatusSchema: z.ZodEnum<{
@@ -2921,6 +3632,7 @@ export declare const webhookSchema: z.ZodObject<{
2921
3632
  "INQUIRY.CREATED": "INQUIRY.CREATED";
2922
3633
  "REVIEW.CREATED": "REVIEW.CREATED";
2923
3634
  "PRODUCT.OUT_OF_STOCK": "PRODUCT.OUT_OF_STOCK";
3635
+ "ORDER.FLOW_NOTIFICATION": "ORDER.FLOW_NOTIFICATION";
2924
3636
  }>>;
2925
3637
  status: z.ZodEnum<{
2926
3638
  SUSPENDED: "SUSPENDED";
@@ -2951,6 +3663,7 @@ export declare const webhookCreatedSchema: z.ZodObject<{
2951
3663
  "INQUIRY.CREATED": "INQUIRY.CREATED";
2952
3664
  "REVIEW.CREATED": "REVIEW.CREATED";
2953
3665
  "PRODUCT.OUT_OF_STOCK": "PRODUCT.OUT_OF_STOCK";
3666
+ "ORDER.FLOW_NOTIFICATION": "ORDER.FLOW_NOTIFICATION";
2954
3667
  }>>;
2955
3668
  status: z.ZodEnum<{
2956
3669
  SUSPENDED: "SUSPENDED";
@@ -3031,6 +3744,7 @@ export declare const webhookDeliverySchema: z.ZodObject<{
3031
3744
  "INQUIRY.CREATED": "INQUIRY.CREATED";
3032
3745
  "REVIEW.CREATED": "REVIEW.CREATED";
3033
3746
  "PRODUCT.OUT_OF_STOCK": "PRODUCT.OUT_OF_STOCK";
3747
+ "ORDER.FLOW_NOTIFICATION": "ORDER.FLOW_NOTIFICATION";
3034
3748
  }>;
3035
3749
  url: z.ZodString;
3036
3750
  status: z.ZodEnum<{
@@ -3084,6 +3798,7 @@ export declare const webhookDeliveryDetailSchema: z.ZodObject<{
3084
3798
  "INQUIRY.CREATED": "INQUIRY.CREATED";
3085
3799
  "REVIEW.CREATED": "REVIEW.CREATED";
3086
3800
  "PRODUCT.OUT_OF_STOCK": "PRODUCT.OUT_OF_STOCK";
3801
+ "ORDER.FLOW_NOTIFICATION": "ORDER.FLOW_NOTIFICATION";
3087
3802
  }>;
3088
3803
  url: z.ZodString;
3089
3804
  status: z.ZodEnum<{
@@ -3146,6 +3861,7 @@ export declare const webhookDeliveryListQuerySchema: z.ZodObject<{
3146
3861
  "INQUIRY.CREATED": "INQUIRY.CREATED";
3147
3862
  "REVIEW.CREATED": "REVIEW.CREATED";
3148
3863
  "PRODUCT.OUT_OF_STOCK": "PRODUCT.OUT_OF_STOCK";
3864
+ "ORDER.FLOW_NOTIFICATION": "ORDER.FLOW_NOTIFICATION";
3149
3865
  }>>;
3150
3866
  resourceId: z.ZodOptional<z.ZodString>;
3151
3867
  limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -3173,6 +3889,7 @@ export declare const webhookTestRequestSchema: z.ZodObject<{
3173
3889
  "INQUIRY.CREATED": "INQUIRY.CREATED";
3174
3890
  "REVIEW.CREATED": "REVIEW.CREATED";
3175
3891
  "PRODUCT.OUT_OF_STOCK": "PRODUCT.OUT_OF_STOCK";
3892
+ "ORDER.FLOW_NOTIFICATION": "ORDER.FLOW_NOTIFICATION";
3176
3893
  }>;
3177
3894
  }, z.core.$strip>;
3178
3895
  export type WebhookTestRequest = z.infer<typeof webhookTestRequestSchema>;
@@ -3214,6 +3931,7 @@ export declare const webhookRequestSchema: z.ZodObject<{
3214
3931
  "INQUIRY.CREATED": "INQUIRY.CREATED";
3215
3932
  "REVIEW.CREATED": "REVIEW.CREATED";
3216
3933
  "PRODUCT.OUT_OF_STOCK": "PRODUCT.OUT_OF_STOCK";
3934
+ "ORDER.FLOW_NOTIFICATION": "ORDER.FLOW_NOTIFICATION";
3217
3935
  }>>;
3218
3936
  }, z.core.$strip>;
3219
3937
  export type WebhookRequest = z.infer<typeof webhookRequestSchema>;
@@ -3286,208 +4004,6 @@ export declare const reviewReportResultSchema: z.ZodObject<{
3286
4004
  }, z.core.$strip>;
3287
4005
  export type ReviewReportResult = z.infer<typeof reviewReportResultSchema>;
3288
4006
  //#endregion
3289
- //#region src/schemas/fulfillment.d.ts
3290
- /**
3291
- * 상품 유형 (이슈 #48·#57) — 배송이 필요한 상품과 필요 없는 상품을 가르는 축이다.
3292
- *
3293
- * **상품 유형은 이행 방식 하나로 표현한다.** `fulfillment.type`이 배송 필요 여부, 이행 흐름, 클레임 규칙을 정한다.
3294
- * 코드 곳곳에서 유형 이름으로 분기하지 않고 이 파일의 판정 함수(`requiresShipping`·`fulfillmentRuleOf`)를 지난다.
3295
- *
3296
- * 주문상품 상태 enum은 바꾸지 않는다. 비실물의 **제공 완료는 `DELIVERED`를 재사용한다** — 새 상태를 더하면 기존 소비자의
3297
- * 상태 분기(배송완료 뒤 구매확정 대기, 반품 가능 판정)가 새 값을 모른다. 표시는 유형으로 가른다.
3298
- */
3299
- /**
3300
- * 상품 유형.
3301
- * - `SHIPPING` 배송 상품. 택배로 발송하고 송장·배송 추적으로 배송완료가 된다
3302
- * - `MANUAL` 배송 없는 상품(비실물). 셀러가 제공 처리(`POST /v1/order-items/{orderItemId}/fulfill`)로 제공 완료를 기록한다
3303
- *
3304
- * 비실물의 세부 구분(파일 다운로드·코드 발급·이용권·방문 수령)은 2026-09-28에 제품에서 뺐다(이슈 #48 범위 축소).
3305
- * 이름은 이행 방식이다 — `SHIPPING`이 택배 발송이듯 `MANUAL`은 셀러가 직접 제공한다는 뜻이다.
3306
- */
3307
- export declare const fulfillmentTypeSchema: z.ZodEnum<{
3308
- SHIPPING: "SHIPPING";
3309
- MANUAL: "MANUAL";
3310
- }>;
3311
- export type FulfillmentType = z.infer<typeof fulfillmentTypeSchema>;
3312
- /**
3313
- * 응답 스키마용 유형 — 서버가 나중에 유형을 더해도 옛 SDK가 응답 파싱에서 깨지지 않게 문자열로 받는다.
3314
- * 요청은 `fulfillmentTypeSchema`(닫힌 enum)로 검증한다.
3315
- */
3316
- export declare const fulfillmentTypeResponseSchema: z.ZodString;
3317
- /** 유형 하나의 규칙 — 배송·클레임이 이 표를 읽는다 */
3318
- export interface FulfillmentRule {
3319
- /** 택배 배송이 필요한가 — 배송비·배송지·발송 흐름의 대상인가 */
3320
- requiresShipping: boolean;
3321
- /** 반품에 수거가 필요한가 — 실물만 수거한다 */
3322
- requiresCollection: boolean;
3323
- /** 교환을 받는가 — 실물만 받는다 */
3324
- exchangeSupported: boolean;
3325
- }
3326
- /** 유형별 규칙표 — **유일한 원천이다.** */
3327
- export declare const FULFILLMENT_RULES: Readonly<Record<FulfillmentType, FulfillmentRule>>;
3328
- /**
3329
- * 저장된 값 → 유형. null·모르는 값은 `SHIPPING`이다 — 이 필드 이전의 상품·주문상품은 모두 배송 상품이었다.
3330
- */
3331
- export declare function fulfillmentTypeOf(value: string | null | undefined): FulfillmentType;
3332
- /** 유형의 규칙 — 모르는 값은 배송 상품 규칙이다 */
3333
- export declare function fulfillmentRuleOf(type: string | null | undefined): FulfillmentRule;
3334
- /** 택배 배송이 필요한가 — 배송비 묶음·배송지·발송 흐름의 판정은 이 함수 하나를 지난다 */
3335
- export declare function requiresShipping(type: string | null | undefined): boolean;
3336
- /** 반품에 수거가 필요한가 — 비실물 반품은 수거 등록·수거 완료 없이 승인한다 */
3337
- export declare function requiresCollection(type: string | null | undefined): boolean;
3338
- /**
3339
- * 배송이 없는 주문상품의 배송 묶음 키 (`order_items.delivery_bundle_key`).
3340
- *
3341
- * null로 두면 환불 정산이 #29 이전 주문의 레거시 폴백(「묶음 = 같은 상품」, 상품의 **현재** 배송비)을 탄다.
3342
- * 이 키를 만나면 배송비 환불·차감이 0이고 `orders.delivery_fee_settlements`에 항목을 만들지 않는다.
3343
- * 정책 지문 키(`b:…`)와 겹치지 않는다.
3344
- */
3345
- export declare const NO_SHIPPING_BUNDLE_KEY = "none";
3346
- /** 배송비 유형 — 무료·유료·조건부 무료 */
3347
- export declare const deliveryTypeSchema: z.ZodEnum<{
3348
- FREE: "FREE";
3349
- PAID: "PAID";
3350
- CONDITIONAL_FREE: "CONDITIONAL_FREE";
3351
- }>;
3352
- export type DeliveryType = z.infer<typeof deliveryTypeSchema>;
3353
- /**
3354
- * 상품 이행 — 등록(POST). 배송 상품의 `shipping`을 생략하면 기본값(유료 배송·상점 기본 배송비·기본 출고지·반품지)이다.
3355
- */
3356
- export declare const productFulfillmentCreateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3357
- type: z.ZodLiteral<"SHIPPING">;
3358
- shipping: z.ZodOptional<z.ZodObject<{
3359
- deliveryType: z.ZodDefault<z.ZodEnum<{
3360
- FREE: "FREE";
3361
- PAID: "PAID";
3362
- CONDITIONAL_FREE: "CONDITIONAL_FREE";
3363
- }>>;
3364
- deliveryFee: z.ZodOptional<z.ZodNumber>;
3365
- conditionalFreeAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3366
- shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3367
- returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3368
- }, z.core.$strict>>;
3369
- }, z.core.$strict>, z.ZodObject<{
3370
- type: z.ZodLiteral<"MANUAL">;
3371
- }, z.core.$strict>], "type">;
3372
- export type ProductFulfillmentCreate = z.infer<typeof productFulfillmentCreateSchema>;
3373
- /** 등록 요청의 입력 모양 — 기본값이 채워지기 전(생략 가능한 필드가 optional) */
3374
- export type ProductFulfillmentCreateInput = z.input<typeof productFulfillmentCreateSchema>;
3375
- /**
3376
- * 상품 이행 — 수정(PUT·PATCH). 통째 교체이고 유형 키와 그 안의 필드가 **모두 필수**다. 서버는 현재 값과 병합하지 않는다.
3377
- * `fulfillment` 자체를 생략하면 이행을 바꾸지 않는다.
3378
- */
3379
- export declare const productFulfillmentUpdateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3380
- type: z.ZodLiteral<"SHIPPING">;
3381
- shipping: z.ZodObject<{
3382
- deliveryType: z.ZodEnum<{
3383
- FREE: "FREE";
3384
- PAID: "PAID";
3385
- CONDITIONAL_FREE: "CONDITIONAL_FREE";
3386
- }>;
3387
- deliveryFee: z.ZodNumber;
3388
- conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
3389
- shippingAddressId: z.ZodNullable<z.ZodString>;
3390
- returnAddressId: z.ZodNullable<z.ZodString>;
3391
- }, z.core.$strict>;
3392
- }, z.core.$strict>, z.ZodObject<{
3393
- type: z.ZodLiteral<"MANUAL">;
3394
- }, z.core.$strict>], "type">;
3395
- export type ProductFulfillmentUpdate = z.infer<typeof productFulfillmentUpdateSchema>;
3396
- /**
3397
- * 저장된 상품 이행 — 알려진 유형의 닫힌 유니온. 서버의 상품 엔티티와 응답이 이 모양을 쓴다.
3398
- * 응답 파싱은 `productFulfillmentResponseSchema`(열린 유니온)를 쓴다.
3399
- */
3400
- export declare const productFulfillmentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3401
- type: z.ZodLiteral<"SHIPPING">;
3402
- shipping: z.ZodObject<{
3403
- deliveryType: z.ZodEnum<{
3404
- FREE: "FREE";
3405
- PAID: "PAID";
3406
- CONDITIONAL_FREE: "CONDITIONAL_FREE";
3407
- }>;
3408
- deliveryFee: z.ZodNumber;
3409
- conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
3410
- shippingAddressId: z.ZodNullable<z.ZodString>;
3411
- returnAddressId: z.ZodNullable<z.ZodString>;
3412
- }, z.core.$strip>;
3413
- }, z.core.$strip>, z.ZodObject<{
3414
- type: z.ZodLiteral<"MANUAL">;
3415
- }, z.core.$strip>], "type">;
3416
- export type ProductFulfillment = z.infer<typeof productFulfillmentSchema>;
3417
- /** 유형 이름 → 그 유형의 저장된 이행 */
3418
- export type ProductFulfillmentOf<T extends FulfillmentType> = Extract<ProductFulfillment, {
3419
- type: T;
3420
- }>;
3421
- /** 응답이 알려 주는 모르는 유형 — SDK가 아직 모르는 유형(서버가 나중에 더한 유형) */
3422
- export interface UnknownFulfillment {
3423
- type: "OTHER";
3424
- /** 서버가 보낸 유형 이름 */
3425
- rawType: string;
3426
- }
3427
- /**
3428
- * 열린 응답 유니온 — 알려진 유형은 판별 유니온으로 검사하고, **모르는 유형만** `{ type: "OTHER", rawType }`로 읽는다.
3429
- *
3430
- * `type: z.string()` 가지를 그대로 두면 TS가 `type === "SHIPPING"`으로 좁혀도 문자열 가지가 남는다. `OTHER` 리터럴로 바꿔 좁히기를
3431
- * 지킨다. 알려진 유형의 모양이 틀린 응답은 폴백으로 숨기지 않고 파싱 오류로 둔다.
3432
- */
3433
- export declare function openFulfillmentUnion<T extends z.ZodType>(known: T): z.ZodUnion<readonly [T, z.ZodPipe<z.ZodObject<{
3434
- type: z.ZodString;
3435
- }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
3436
- [x: string]: unknown;
3437
- type: string;
3438
- }>>]>;
3439
- export declare const productFulfillmentResponseSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
3440
- type: z.ZodLiteral<"SHIPPING">;
3441
- shipping: z.ZodObject<{
3442
- deliveryType: z.ZodEnum<{
3443
- FREE: "FREE";
3444
- PAID: "PAID";
3445
- CONDITIONAL_FREE: "CONDITIONAL_FREE";
3446
- }>;
3447
- deliveryFee: z.ZodNumber;
3448
- conditionalFreeAmount: z.ZodNullable<z.ZodNumber>;
3449
- shippingAddressId: z.ZodNullable<z.ZodString>;
3450
- returnAddressId: z.ZodNullable<z.ZodString>;
3451
- }, z.core.$strip>;
3452
- }, z.core.$strip>, z.ZodObject<{
3453
- type: z.ZodLiteral<"MANUAL">;
3454
- }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3455
- type: z.ZodString;
3456
- }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
3457
- [x: string]: unknown;
3458
- type: string;
3459
- }>>]>;
3460
- export type ProductFulfillmentView = z.infer<typeof productFulfillmentResponseSchema>;
3461
- /**
3462
- * 주문상품의 주문 시점 이행 — 결제 확정이 주문서 줄에서 굳힌다. 상품의 현재 값이 아니다. 서버는 주문상품 컬럼
3463
- * (`fulfillment_type`·`delivery_bundle_key`)과 jsonb(`fulfillment_snapshot`)를 합쳐 이 모양을 만든다.
3464
- */
3465
- export declare const orderItemFulfillmentSnapshotSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3466
- type: z.ZodLiteral<"SHIPPING">;
3467
- shipping: z.ZodObject<{
3468
- bundleKey: z.ZodNullable<z.ZodString>;
3469
- returnAddressId: z.ZodNullable<z.ZodString>;
3470
- }, z.core.$strip>;
3471
- }, z.core.$strip>, z.ZodObject<{
3472
- type: z.ZodLiteral<"MANUAL">;
3473
- }, z.core.$strip>], "type">;
3474
- export type OrderItemFulfillmentSnapshot = z.infer<typeof orderItemFulfillmentSnapshotSchema>;
3475
- export declare const orderItemFulfillmentSnapshotResponseSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
3476
- type: z.ZodLiteral<"SHIPPING">;
3477
- shipping: z.ZodObject<{
3478
- bundleKey: z.ZodNullable<z.ZodString>;
3479
- returnAddressId: z.ZodNullable<z.ZodString>;
3480
- }, z.core.$strip>;
3481
- }, z.core.$strip>, z.ZodObject<{
3482
- type: z.ZodLiteral<"MANUAL">;
3483
- }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3484
- type: z.ZodString;
3485
- }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
3486
- [x: string]: unknown;
3487
- type: string;
3488
- }>>]>;
3489
- export type OrderItemFulfillmentSnapshotView = z.infer<typeof orderItemFulfillmentSnapshotResponseSchema>;
3490
- //#endregion
3491
4007
  //#region src/schemas/order.d.ts
3492
4008
  export declare const orderSummarySchema: z.ZodObject<{
3493
4009
  orderId: z.ZodString;
@@ -3559,7 +4075,17 @@ export declare const orderItemSchema: z.ZodObject<{
3559
4075
  customInputs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3560
4076
  label: z.ZodString;
3561
4077
  value: z.ZodString;
4078
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4079
+ type: z.ZodOptional<z.ZodString>;
3562
4080
  }, z.core.$strip>>>>;
4081
+ stay: z.ZodOptional<z.ZodObject<{
4082
+ checkIn: z.ZodString;
4083
+ checkOut: z.ZodString;
4084
+ nights: z.ZodArray<z.ZodObject<{
4085
+ date: z.ZodString;
4086
+ price: z.ZodNumber;
4087
+ }, z.core.$strip>>;
4088
+ }, z.core.$strip>>;
3563
4089
  sellerCode: z.ZodNullable<z.ZodString>;
3564
4090
  fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
3565
4091
  type: z.ZodLiteral<"SHIPPING">;
@@ -3567,8 +4093,24 @@ export declare const orderItemSchema: z.ZodObject<{
3567
4093
  bundleKey: z.ZodNullable<z.ZodString>;
3568
4094
  returnAddressId: z.ZodNullable<z.ZodString>;
3569
4095
  }, z.core.$strip>;
4096
+ method: z.ZodOptional<z.ZodString>;
4097
+ pickupLocation: z.ZodOptional<z.ZodObject<{
4098
+ locationId: z.ZodString;
4099
+ name: z.ZodString;
4100
+ address: z.ZodString;
4101
+ phone: z.ZodNullable<z.ZodString>;
4102
+ hours: z.ZodNullable<z.ZodString>;
4103
+ }, z.core.$strip>>;
3570
4104
  }, z.core.$strip>, z.ZodObject<{
3571
4105
  type: z.ZodLiteral<"MANUAL">;
4106
+ method: z.ZodOptional<z.ZodString>;
4107
+ pickupLocation: z.ZodOptional<z.ZodObject<{
4108
+ locationId: z.ZodString;
4109
+ name: z.ZodString;
4110
+ address: z.ZodString;
4111
+ phone: z.ZodNullable<z.ZodString>;
4112
+ hours: z.ZodNullable<z.ZodString>;
4113
+ }, z.core.$strip>>;
3572
4114
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3573
4115
  type: z.ZodString;
3574
4116
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -3722,7 +4264,17 @@ export declare const orderSchema: z.ZodObject<{
3722
4264
  customInputs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3723
4265
  label: z.ZodString;
3724
4266
  value: z.ZodString;
4267
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4268
+ type: z.ZodOptional<z.ZodString>;
3725
4269
  }, z.core.$strip>>>>;
4270
+ stay: z.ZodOptional<z.ZodObject<{
4271
+ checkIn: z.ZodString;
4272
+ checkOut: z.ZodString;
4273
+ nights: z.ZodArray<z.ZodObject<{
4274
+ date: z.ZodString;
4275
+ price: z.ZodNumber;
4276
+ }, z.core.$strip>>;
4277
+ }, z.core.$strip>>;
3726
4278
  sellerCode: z.ZodNullable<z.ZodString>;
3727
4279
  fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
3728
4280
  type: z.ZodLiteral<"SHIPPING">;
@@ -3730,8 +4282,24 @@ export declare const orderSchema: z.ZodObject<{
3730
4282
  bundleKey: z.ZodNullable<z.ZodString>;
3731
4283
  returnAddressId: z.ZodNullable<z.ZodString>;
3732
4284
  }, z.core.$strip>;
4285
+ method: z.ZodOptional<z.ZodString>;
4286
+ pickupLocation: z.ZodOptional<z.ZodObject<{
4287
+ locationId: z.ZodString;
4288
+ name: z.ZodString;
4289
+ address: z.ZodString;
4290
+ phone: z.ZodNullable<z.ZodString>;
4291
+ hours: z.ZodNullable<z.ZodString>;
4292
+ }, z.core.$strip>>;
3733
4293
  }, z.core.$strip>, z.ZodObject<{
3734
4294
  type: z.ZodLiteral<"MANUAL">;
4295
+ method: z.ZodOptional<z.ZodString>;
4296
+ pickupLocation: z.ZodOptional<z.ZodObject<{
4297
+ locationId: z.ZodString;
4298
+ name: z.ZodString;
4299
+ address: z.ZodString;
4300
+ phone: z.ZodNullable<z.ZodString>;
4301
+ hours: z.ZodNullable<z.ZodString>;
4302
+ }, z.core.$strip>>;
3735
4303
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3736
4304
  type: z.ZodString;
3737
4305
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -3841,7 +4409,17 @@ export declare const orderItemPageSchema: z.ZodObject<{
3841
4409
  customInputs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3842
4410
  label: z.ZodString;
3843
4411
  value: z.ZodString;
4412
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4413
+ type: z.ZodOptional<z.ZodString>;
3844
4414
  }, z.core.$strip>>>>;
4415
+ stay: z.ZodOptional<z.ZodObject<{
4416
+ checkIn: z.ZodString;
4417
+ checkOut: z.ZodString;
4418
+ nights: z.ZodArray<z.ZodObject<{
4419
+ date: z.ZodString;
4420
+ price: z.ZodNumber;
4421
+ }, z.core.$strip>>;
4422
+ }, z.core.$strip>>;
3845
4423
  sellerCode: z.ZodNullable<z.ZodString>;
3846
4424
  fulfillmentSnapshot: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
3847
4425
  type: z.ZodLiteral<"SHIPPING">;
@@ -3849,8 +4427,24 @@ export declare const orderItemPageSchema: z.ZodObject<{
3849
4427
  bundleKey: z.ZodNullable<z.ZodString>;
3850
4428
  returnAddressId: z.ZodNullable<z.ZodString>;
3851
4429
  }, z.core.$strip>;
4430
+ method: z.ZodOptional<z.ZodString>;
4431
+ pickupLocation: z.ZodOptional<z.ZodObject<{
4432
+ locationId: z.ZodString;
4433
+ name: z.ZodString;
4434
+ address: z.ZodString;
4435
+ phone: z.ZodNullable<z.ZodString>;
4436
+ hours: z.ZodNullable<z.ZodString>;
4437
+ }, z.core.$strip>>;
3852
4438
  }, z.core.$strip>, z.ZodObject<{
3853
4439
  type: z.ZodLiteral<"MANUAL">;
4440
+ method: z.ZodOptional<z.ZodString>;
4441
+ pickupLocation: z.ZodOptional<z.ZodObject<{
4442
+ locationId: z.ZodString;
4443
+ name: z.ZodString;
4444
+ address: z.ZodString;
4445
+ phone: z.ZodNullable<z.ZodString>;
4446
+ hours: z.ZodNullable<z.ZodString>;
4447
+ }, z.core.$strip>>;
3854
4448
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3855
4449
  type: z.ZodString;
3856
4450
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -3970,16 +4564,16 @@ export interface OrderItemListParams extends PageParams {
3970
4564
  testPayment?: "true" | "false";
3971
4565
  }
3972
4566
  export declare const deliveryMethodSchema: z.ZodEnum<{
3973
- COURIER: "COURIER";
3974
4567
  DIRECT: "DIRECT";
4568
+ COURIER: "COURIER";
3975
4569
  QUICK: "QUICK";
3976
4570
  NOTHING: "NOTHING";
3977
4571
  }>;
3978
4572
  export type DeliveryMethod = z.infer<typeof deliveryMethodSchema>;
3979
4573
  export declare const dispatchRequestSchema: z.ZodObject<{
3980
4574
  deliveryMethod: z.ZodEnum<{
3981
- COURIER: "COURIER";
3982
4575
  DIRECT: "DIRECT";
4576
+ COURIER: "COURIER";
3983
4577
  QUICK: "QUICK";
3984
4578
  NOTHING: "NOTHING";
3985
4579
  }>;
@@ -3991,8 +4585,8 @@ export type DispatchRequest = z.infer<typeof dispatchRequestSchema>;
3991
4585
  export declare const deliveryInfoSchema: z.ZodObject<{
3992
4586
  orderItemId: z.ZodString;
3993
4587
  deliveryMethod: z.ZodEnum<{
3994
- COURIER: "COURIER";
3995
4588
  DIRECT: "DIRECT";
4589
+ COURIER: "COURIER";
3996
4590
  QUICK: "QUICK";
3997
4591
  NOTHING: "NOTHING";
3998
4592
  }>;
@@ -4018,8 +4612,8 @@ export declare const trackingStageResponseSchema: z.ZodString;
4018
4612
  export declare const deliveryStatusSchema: z.ZodObject<{
4019
4613
  orderItemId: z.ZodString;
4020
4614
  deliveryMethod: z.ZodEnum<{
4021
- COURIER: "COURIER";
4022
4615
  DIRECT: "DIRECT";
4616
+ COURIER: "COURIER";
4023
4617
  QUICK: "QUICK";
4024
4618
  NOTHING: "NOTHING";
4025
4619
  }>;
@@ -5543,6 +6137,7 @@ export declare const productVariantSchema: z.ZodObject<{
5543
6137
  weightGram: z.ZodNullable<z.ZodNumber>;
5544
6138
  sellerCode: z.ZodNullable<z.ZodString>;
5545
6139
  usable: z.ZodBoolean;
6140
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5546
6141
  hasOrders: z.ZodOptional<z.ZodBoolean>;
5547
6142
  }, z.core.$strip>;
5548
6143
  export type ProductVariant = z.infer<typeof productVariantSchema>;
@@ -5595,6 +6190,12 @@ export declare const addonGroupSchema: z.ZodObject<{
5595
6190
  }, z.core.$strip>>;
5596
6191
  }, z.core.$strip>;
5597
6192
  export type AddonGroup = z.infer<typeof addonGroupSchema>;
6193
+ /**
6194
+ * 직접 입력 타입(이슈 #115 결정 24) — 값은 늘 문자열로 오가고 서버가 타입대로 검사·정규화한다.
6195
+ * `number`는 정수, `select`는 `options` 중 하나, `date`는 `YYYY-MM-DD`, `datetime`은 오프셋 있는 ISO 8601이다.
6196
+ * `image`는 구매자 업로드(`POST /storefront/v1/uploads/order-inputs`) 주소 목록이고 `maxLength`가 최대 장수(1~5)다
6197
+ */
6198
+ export declare const CUSTOM_INPUT_TYPES: readonly ["text", "number", "select", "date", "datetime", "image"];
5598
6199
  /** 직접 입력 항목 — 예: 각인 문구 */
5599
6200
  export declare const customInputSchema: z.ZodObject<{
5600
6201
  inputId: z.ZodString;
@@ -5604,6 +6205,9 @@ export declare const customInputSchema: z.ZodObject<{
5604
6205
  required: z.ZodBoolean;
5605
6206
  usable: z.ZodBoolean;
5606
6207
  sortOrder: z.ZodNumber;
6208
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6209
+ type: z.ZodOptional<z.ZodString>;
6210
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
5607
6211
  }, z.core.$strip>;
5608
6212
  export type CustomInput = z.infer<typeof customInputSchema>;
5609
6213
  /**
@@ -5642,6 +6246,16 @@ export declare const customInputRequestSchema: z.ZodObject<{
5642
6246
  maxLength: z.ZodNumber;
5643
6247
  required: z.ZodDefault<z.ZodBoolean>;
5644
6248
  usable: z.ZodDefault<z.ZodBoolean>;
6249
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6250
+ type: z.ZodOptional<z.ZodEnum<{
6251
+ number: "number";
6252
+ date: "date";
6253
+ text: "text";
6254
+ select: "select";
6255
+ datetime: "datetime";
6256
+ image: "image";
6257
+ }>>;
6258
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
5645
6259
  }, z.core.$strip>;
5646
6260
  export type CustomInputRequest = z.infer<typeof customInputRequestSchema>;
5647
6261
  /**
@@ -5659,6 +6273,8 @@ export type OptionSelection = z.infer<typeof optionSelectionSchema>;
5659
6273
  export declare const customInputValueSchema: z.ZodObject<{
5660
6274
  label: z.ZodString;
5661
6275
  value: z.ZodString;
6276
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6277
+ type: z.ZodOptional<z.ZodString>;
5662
6278
  }, z.core.$strip>;
5663
6279
  export type CustomInputValue = z.infer<typeof customInputValueSchema>;
5664
6280
  export declare const discountSchema: z.ZodObject<{
@@ -5723,6 +6339,7 @@ export declare const productSchema: z.ZodObject<{
5723
6339
  weightGram: z.ZodNullable<z.ZodNumber>;
5724
6340
  sellerCode: z.ZodNullable<z.ZodString>;
5725
6341
  usable: z.ZodBoolean;
6342
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5726
6343
  hasOrders: z.ZodOptional<z.ZodBoolean>;
5727
6344
  }, z.core.$strip>>;
5728
6345
  addonGroups: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -5746,6 +6363,9 @@ export declare const productSchema: z.ZodObject<{
5746
6363
  required: z.ZodBoolean;
5747
6364
  usable: z.ZodBoolean;
5748
6365
  sortOrder: z.ZodNumber;
6366
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6367
+ type: z.ZodOptional<z.ZodString>;
6368
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
5749
6369
  }, z.core.$strip>>>>;
5750
6370
  optionSort: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
5751
6371
  REGISTERED: "REGISTERED";
@@ -5766,14 +6386,18 @@ export declare const productSchema: z.ZodObject<{
5766
6386
  shippingAddressId: z.ZodNullable<z.ZodString>;
5767
6387
  returnAddressId: z.ZodNullable<z.ZodString>;
5768
6388
  }, z.core.$strip>;
6389
+ methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
5769
6390
  }, z.core.$strip>, z.ZodObject<{
5770
6391
  type: z.ZodLiteral<"MANUAL">;
6392
+ methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
5771
6393
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
5772
6394
  type: z.ZodString;
5773
6395
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
5774
6396
  [x: string]: unknown;
5775
6397
  type: string;
5776
6398
  }>>]>;
6399
+ inventoryMode: z.ZodOptional<z.ZodString>;
6400
+ flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5777
6401
  fulfillmentTypeLocked: z.ZodBoolean;
5778
6402
  refundPolicy: z.ZodNullable<z.ZodObject<{
5779
6403
  preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
@@ -5848,6 +6472,7 @@ export declare const productVariantRequestSchema: z.ZodObject<{
5848
6472
  weightGram: z.ZodOptional<z.ZodNumber>;
5849
6473
  sellerCode: z.ZodOptional<z.ZodString>;
5850
6474
  usable: z.ZodDefault<z.ZodBoolean>;
6475
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5851
6476
  }, z.core.$strip>;
5852
6477
  export type ProductVariantRequest = z.infer<typeof productVariantRequestSchema>;
5853
6478
  /** 축 × 값 → variant 전체 교체 요청 (PUT /products/{productId}/options) */
@@ -5871,6 +6496,7 @@ export declare const optionModelRequestSchema: z.ZodObject<{
5871
6496
  weightGram: z.ZodOptional<z.ZodNumber>;
5872
6497
  sellerCode: z.ZodOptional<z.ZodString>;
5873
6498
  usable: z.ZodDefault<z.ZodBoolean>;
6499
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5874
6500
  }, z.core.$strip>>;
5875
6501
  addonGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
5876
6502
  groupId: z.ZodOptional<z.ZodString>;
@@ -5890,6 +6516,16 @@ export declare const optionModelRequestSchema: z.ZodObject<{
5890
6516
  maxLength: z.ZodNumber;
5891
6517
  required: z.ZodDefault<z.ZodBoolean>;
5892
6518
  usable: z.ZodDefault<z.ZodBoolean>;
6519
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6520
+ type: z.ZodOptional<z.ZodEnum<{
6521
+ number: "number";
6522
+ date: "date";
6523
+ text: "text";
6524
+ select: "select";
6525
+ datetime: "datetime";
6526
+ image: "image";
6527
+ }>>;
6528
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
5893
6529
  }, z.core.$strip>>>;
5894
6530
  optionSort: z.ZodOptional<z.ZodEnum<{
5895
6531
  REGISTERED: "REGISTERED";
@@ -5924,6 +6560,7 @@ export declare const optionModelSchema: z.ZodObject<{
5924
6560
  weightGram: z.ZodNullable<z.ZodNumber>;
5925
6561
  sellerCode: z.ZodNullable<z.ZodString>;
5926
6562
  usable: z.ZodBoolean;
6563
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5927
6564
  hasOrders: z.ZodOptional<z.ZodBoolean>;
5928
6565
  }, z.core.$strip>>;
5929
6566
  addonGroups: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -5947,6 +6584,9 @@ export declare const optionModelSchema: z.ZodObject<{
5947
6584
  required: z.ZodBoolean;
5948
6585
  usable: z.ZodBoolean;
5949
6586
  sortOrder: z.ZodNumber;
6587
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6588
+ type: z.ZodOptional<z.ZodString>;
6589
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
5950
6590
  }, z.core.$strip>>>>;
5951
6591
  optionSort: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
5952
6592
  REGISTERED: "REGISTERED";
@@ -5990,10 +6630,27 @@ export declare const productCreateRequestSchema: z.ZodObject<{
5990
6630
  shippingAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5991
6631
  returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5992
6632
  }, z.core.$strict>>;
6633
+ methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6634
+ CARRIER: "CARRIER";
6635
+ DIRECT: "DIRECT";
6636
+ PICKUP: "PICKUP";
6637
+ PROVIDED: "PROVIDED";
6638
+ }>>>;
5993
6639
  }, z.core.$strict>, z.ZodObject<{
5994
6640
  type: z.ZodLiteral<"MANUAL">;
6641
+ methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6642
+ CARRIER: "CARRIER";
6643
+ DIRECT: "DIRECT";
6644
+ PICKUP: "PICKUP";
6645
+ PROVIDED: "PROVIDED";
6646
+ }>>>;
5995
6647
  }, z.core.$strict>], "type">>;
5996
6648
  sourceOptionSetIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
6649
+ inventoryMode: z.ZodOptional<z.ZodEnum<{
6650
+ STANDARD: "STANDARD";
6651
+ DATED: "DATED";
6652
+ }>>;
6653
+ flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5997
6654
  optionGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
5998
6655
  groupId: z.ZodOptional<z.ZodString>;
5999
6656
  name: z.ZodString;
@@ -6013,6 +6670,7 @@ export declare const productCreateRequestSchema: z.ZodObject<{
6013
6670
  weightGram: z.ZodOptional<z.ZodNumber>;
6014
6671
  sellerCode: z.ZodOptional<z.ZodString>;
6015
6672
  usable: z.ZodDefault<z.ZodBoolean>;
6673
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6016
6674
  }, z.core.$strip>>;
6017
6675
  addonGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
6018
6676
  groupId: z.ZodOptional<z.ZodString>;
@@ -6032,6 +6690,16 @@ export declare const productCreateRequestSchema: z.ZodObject<{
6032
6690
  maxLength: z.ZodNumber;
6033
6691
  required: z.ZodDefault<z.ZodBoolean>;
6034
6692
  usable: z.ZodDefault<z.ZodBoolean>;
6693
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6694
+ type: z.ZodOptional<z.ZodEnum<{
6695
+ number: "number";
6696
+ date: "date";
6697
+ text: "text";
6698
+ select: "select";
6699
+ datetime: "datetime";
6700
+ image: "image";
6701
+ }>>;
6702
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
6035
6703
  }, z.core.$strip>>>;
6036
6704
  optionSort: z.ZodOptional<z.ZodEnum<{
6037
6705
  REGISTERED: "REGISTERED";
@@ -6076,10 +6744,27 @@ export declare const productReplaceRequestSchema: z.ZodObject<{
6076
6744
  shippingAddressId: z.ZodNullable<z.ZodString>;
6077
6745
  returnAddressId: z.ZodNullable<z.ZodString>;
6078
6746
  }, z.core.$strict>;
6747
+ methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6748
+ CARRIER: "CARRIER";
6749
+ DIRECT: "DIRECT";
6750
+ PICKUP: "PICKUP";
6751
+ PROVIDED: "PROVIDED";
6752
+ }>>>;
6079
6753
  }, z.core.$strict>, z.ZodObject<{
6080
6754
  type: z.ZodLiteral<"MANUAL">;
6755
+ methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6756
+ CARRIER: "CARRIER";
6757
+ DIRECT: "DIRECT";
6758
+ PICKUP: "PICKUP";
6759
+ PROVIDED: "PROVIDED";
6760
+ }>>>;
6081
6761
  }, z.core.$strict>], "type">>;
6082
6762
  sourceOptionSetIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
6763
+ inventoryMode: z.ZodOptional<z.ZodEnum<{
6764
+ STANDARD: "STANDARD";
6765
+ DATED: "DATED";
6766
+ }>>;
6767
+ flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6083
6768
  optionGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
6084
6769
  groupId: z.ZodOptional<z.ZodString>;
6085
6770
  name: z.ZodString;
@@ -6099,6 +6784,7 @@ export declare const productReplaceRequestSchema: z.ZodObject<{
6099
6784
  weightGram: z.ZodOptional<z.ZodNumber>;
6100
6785
  sellerCode: z.ZodOptional<z.ZodString>;
6101
6786
  usable: z.ZodDefault<z.ZodBoolean>;
6787
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6102
6788
  }, z.core.$strip>>;
6103
6789
  addonGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
6104
6790
  groupId: z.ZodOptional<z.ZodString>;
@@ -6118,6 +6804,16 @@ export declare const productReplaceRequestSchema: z.ZodObject<{
6118
6804
  maxLength: z.ZodNumber;
6119
6805
  required: z.ZodDefault<z.ZodBoolean>;
6120
6806
  usable: z.ZodDefault<z.ZodBoolean>;
6807
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6808
+ type: z.ZodOptional<z.ZodEnum<{
6809
+ number: "number";
6810
+ date: "date";
6811
+ text: "text";
6812
+ select: "select";
6813
+ datetime: "datetime";
6814
+ image: "image";
6815
+ }>>;
6816
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
6121
6817
  }, z.core.$strip>>>;
6122
6818
  optionSort: z.ZodOptional<z.ZodEnum<{
6123
6819
  REGISTERED: "REGISTERED";
@@ -6156,6 +6852,7 @@ export declare const productPatchRequestSchema: z.ZodObject<{
6156
6852
  OUT_OF_STOCK: "OUT_OF_STOCK";
6157
6853
  CLOSED: "CLOSED";
6158
6854
  }>>;
6855
+ flowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6159
6856
  images: z.ZodOptional<z.ZodArray<z.ZodURL>>;
6160
6857
  fulfillment: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
6161
6858
  type: z.ZodLiteral<"SHIPPING">;
@@ -6170,8 +6867,20 @@ export declare const productPatchRequestSchema: z.ZodObject<{
6170
6867
  shippingAddressId: z.ZodNullable<z.ZodString>;
6171
6868
  returnAddressId: z.ZodNullable<z.ZodString>;
6172
6869
  }, z.core.$strict>;
6870
+ methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6871
+ CARRIER: "CARRIER";
6872
+ DIRECT: "DIRECT";
6873
+ PICKUP: "PICKUP";
6874
+ PROVIDED: "PROVIDED";
6875
+ }>>>;
6173
6876
  }, z.core.$strict>, z.ZodObject<{
6174
6877
  type: z.ZodLiteral<"MANUAL">;
6878
+ methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6879
+ CARRIER: "CARRIER";
6880
+ DIRECT: "DIRECT";
6881
+ PICKUP: "PICKUP";
6882
+ PROVIDED: "PROVIDED";
6883
+ }>>>;
6175
6884
  }, z.core.$strict>], "type">>;
6176
6885
  refundPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6177
6886
  preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
@@ -6269,6 +6978,9 @@ export declare const savedCustomInputSchema: z.ZodObject<{
6269
6978
  placeholder: z.ZodNullable<z.ZodString>;
6270
6979
  maxLength: z.ZodNumber;
6271
6980
  required: z.ZodBoolean;
6981
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6982
+ type: z.ZodOptional<z.ZodString>;
6983
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
6272
6984
  }, z.core.$strip>;
6273
6985
  export type SavedCustomInput = z.infer<typeof savedCustomInputSchema>;
6274
6986
  export declare const savedOptionSetSchema: z.ZodObject<{
@@ -6294,6 +7006,9 @@ export declare const savedOptionSetSchema: z.ZodObject<{
6294
7006
  placeholder: z.ZodNullable<z.ZodString>;
6295
7007
  maxLength: z.ZodNumber;
6296
7008
  required: z.ZodBoolean;
7009
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7010
+ type: z.ZodOptional<z.ZodString>;
7011
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
6297
7012
  }, z.core.$strip>>;
6298
7013
  importedProductCount: z.ZodNumber;
6299
7014
  createdAt: z.ZodString;
@@ -6322,6 +7037,16 @@ export declare const savedCustomInputRequestSchema: z.ZodObject<{
6322
7037
  placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6323
7038
  maxLength: z.ZodNumber;
6324
7039
  required: z.ZodDefault<z.ZodBoolean>;
7040
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7041
+ type: z.ZodOptional<z.ZodEnum<{
7042
+ number: "number";
7043
+ date: "date";
7044
+ text: "text";
7045
+ select: "select";
7046
+ datetime: "datetime";
7047
+ image: "image";
7048
+ }>>;
7049
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
6325
7050
  }, z.core.$strip>;
6326
7051
  /**
6327
7052
  * 저장 옵션 만들기·수정 본문. 조합 옵션명은 최대 `MAX_OPTION_GROUPS`개, 추가 선택은 최대 `MAX_ADDON_GROUPS`개이고
@@ -6352,6 +7077,16 @@ export declare const savedOptionSetRequestSchema: z.ZodObject<{
6352
7077
  placeholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6353
7078
  maxLength: z.ZodNumber;
6354
7079
  required: z.ZodDefault<z.ZodBoolean>;
7080
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7081
+ type: z.ZodOptional<z.ZodEnum<{
7082
+ number: "number";
7083
+ date: "date";
7084
+ text: "text";
7085
+ select: "select";
7086
+ datetime: "datetime";
7087
+ image: "image";
7088
+ }>>;
7089
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
6355
7090
  }, z.core.$strip>>>;
6356
7091
  }, z.core.$strip>;
6357
7092
  export type SavedOptionSetRequest = z.infer<typeof savedOptionSetRequestSchema>;
@@ -6395,6 +7130,9 @@ export declare const savedOptionSetFromProductResultSchema: z.ZodObject<{
6395
7130
  placeholder: z.ZodNullable<z.ZodString>;
6396
7131
  maxLength: z.ZodNumber;
6397
7132
  required: z.ZodBoolean;
7133
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7134
+ type: z.ZodOptional<z.ZodString>;
7135
+ options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
6398
7136
  }, z.core.$strip>>;
6399
7137
  importedProductCount: z.ZodNumber;
6400
7138
  createdAt: z.ZodString;
@@ -6437,6 +7175,67 @@ export declare const savedOptionSetListQuerySchema: z.ZodObject<{
6437
7175
  }>>;
6438
7176
  }, z.core.$strip>;
6439
7177
  //#endregion
7178
+ //#region src/schemas/stay.d.ts
7179
+ /**
7180
+ * 날짜별 재고·가격(이슈 #118) — 숙박·회차처럼 날짜마다 재고와 가격이 다른 상품. 상품 `inventoryMode: "DATED"`이면 조합(객실) × 날짜
7181
+ * 달력이 재고·가격의 원천이고, 주문서 줄은 기간(`stay`)을 받는다. 날짜는 한국 날짜 `YYYY-MM-DD`다.
7182
+ */
7183
+ /** 한국 날짜 */
7184
+ export declare const calendarDateSchema: z.ZodString;
7185
+ /** 한 번에 받는 최대 박수 */
7186
+ export declare const MAX_STAY_NIGHTS = 30;
7187
+ /** 달력 한 번 조회·설정 최대 일수 */
7188
+ export declare const MAX_CALENDAR_DAYS = 400;
7189
+ export declare const inventoryModeSchema: z.ZodEnum<{
7190
+ STANDARD: "STANDARD";
7191
+ DATED: "DATED";
7192
+ }>;
7193
+ export type InventoryMode = z.infer<typeof inventoryModeSchema>;
7194
+ /** 숙박 기간 — 체크인 날부터 체크아웃 전날까지가 박이다 */
7195
+ export declare const stayRangeSchema: z.ZodObject<{
7196
+ checkIn: z.ZodString;
7197
+ checkOut: z.ZodString;
7198
+ }, z.core.$strip>;
7199
+ export type StayRange = z.infer<typeof stayRangeSchema>;
7200
+ /** 주문 시점 숙박 — 박마다 그때 가격 */
7201
+ export declare const staySnapshotSchema: z.ZodObject<{
7202
+ checkIn: z.ZodString;
7203
+ checkOut: z.ZodString;
7204
+ nights: z.ZodArray<z.ZodObject<{
7205
+ date: z.ZodString;
7206
+ price: z.ZodNumber;
7207
+ }, z.core.$strip>>;
7208
+ }, z.core.$strip>;
7209
+ export type StaySnapshot = z.infer<typeof staySnapshotSchema>;
7210
+ /** 체크인~체크아웃 전날 날짜 목록. 형식이 틀리거나 체크아웃이 체크인 이하면 빈 목록 */
7211
+ export declare function nightsOf(range: StayRange): string[];
7212
+ /** 관리 달력 한 칸 */
7213
+ export declare const calendarDaySchema: z.ZodObject<{
7214
+ variantId: z.ZodString;
7215
+ date: z.ZodString;
7216
+ stock: z.ZodNumber;
7217
+ price: z.ZodNullable<z.ZodNumber>;
7218
+ }, z.core.$strip>;
7219
+ export type CalendarDay = z.infer<typeof calendarDaySchema>;
7220
+ export declare const calendarQuerySchema: z.ZodObject<{
7221
+ variantId: z.ZodOptional<z.ZodString>;
7222
+ from: z.ZodString;
7223
+ to: z.ZodString;
7224
+ }, z.core.$strip>;
7225
+ /**
7226
+ * 달력 설정 — 기간의 날짜마다 재고·가격을 덮어쓴다(없는 날은 만든다). `stock`·`price`는 준 것만 바꾸고, `price: null`은 조합 가격으로
7227
+ * 되돌린다. `daysOfWeek`(0=일~6=토)를 주면 그 요일만 바꾼다
7228
+ */
7229
+ export declare const setCalendarRequestSchema: z.ZodObject<{
7230
+ variantIds: z.ZodArray<z.ZodString>;
7231
+ from: z.ZodString;
7232
+ to: z.ZodString;
7233
+ stock: z.ZodOptional<z.ZodNumber>;
7234
+ price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7235
+ daysOfWeek: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
7236
+ }, z.core.$strip>;
7237
+ export type SetCalendarRequest = z.input<typeof setCalendarRequestSchema>;
7238
+ //#endregion
6440
7239
  //#region src/schemas/store.d.ts
6441
7240
  /**
6442
7241
  * 상점 코드 규칙 — 스토어프론트 API가 테넌트를 가르는 값이다(`X-Store-Code` 헤더).
@@ -8080,10 +8879,12 @@ export type StorefrontSourceReplaced = z.infer<typeof storefrontSourceReplacedSc
8080
8879
  *
8081
8880
  * - `product-image`: 상품 목록·상세의 상품 이미지. 목록 썸네일로 쓰이므로 정지 이미지만 받는다.
8082
8881
  * - `description`: 상세설명 본문에 삽입하는 미디어. 동영상과 svg도 받는다.
8882
+ * - `flow-attachment`: 주문 흐름 행동의 첨부(시안 등, 이슈 #115). 구매자에게 보이므로 정지 이미지와 PDF만 받는다.
8083
8883
  */
8084
8884
  export declare const uploadPurposeSchema: z.ZodEnum<{
8085
8885
  "product-image": "product-image";
8086
8886
  description: "description";
8887
+ "flow-attachment": "flow-attachment";
8087
8888
  }>;
8088
8889
  export type UploadPurpose = z.infer<typeof uploadPurposeSchema>;
8089
8890
  export interface UploadPurposeLimit {
@@ -8123,6 +8924,7 @@ export declare const uploadRequestSchema: z.ZodObject<{
8123
8924
  purpose: z.ZodDefault<z.ZodEnum<{
8124
8925
  "product-image": "product-image";
8125
8926
  description: "description";
8927
+ "flow-attachment": "flow-attachment";
8126
8928
  }>>;
8127
8929
  size: z.ZodOptional<z.ZodNumber>;
8128
8930
  }, z.core.$strip>;
@@ -8397,6 +9199,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
8397
9199
  weightGram: number | null;
8398
9200
  sellerCode: string | null;
8399
9201
  usable: boolean;
9202
+ attributes?: Record<string, string> | undefined;
8400
9203
  hasOrders?: boolean | undefined;
8401
9204
  }[];
8402
9205
  addonGroups: {
@@ -8420,6 +9223,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
8420
9223
  required: boolean;
8421
9224
  usable: boolean;
8422
9225
  sortOrder: number;
9226
+ key?: string | null | undefined;
9227
+ type?: string | undefined;
9228
+ options?: string[] | null | undefined;
8423
9229
  }[];
8424
9230
  optionSort: "REGISTERED" | "NAME" | "PRICE_ASC" | "PRICE_DESC";
8425
9231
  fulfillment: UnknownFulfillment | {
@@ -8431,8 +9237,10 @@ export declare function createStoreClient(options: StoreClientOptions): {
8431
9237
  shippingAddressId: string | null;
8432
9238
  returnAddressId: string | null;
8433
9239
  };
9240
+ methods?: string[] | undefined;
8434
9241
  } | {
8435
9242
  type: "MANUAL";
9243
+ methods?: string[] | undefined;
8436
9244
  };
8437
9245
  fulfillmentTypeLocked: boolean;
8438
9246
  refundPolicy: {
@@ -8452,6 +9260,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
8452
9260
  attributeId: string;
8453
9261
  value: string;
8454
9262
  }[] | undefined;
9263
+ inventoryMode?: string | undefined;
9264
+ flowId?: string | null | undefined;
8455
9265
  discount?: {
8456
9266
  productId: string;
8457
9267
  discountType: "RATE" | "AMOUNT";
@@ -8497,6 +9307,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
8497
9307
  weightGram: number | null;
8498
9308
  sellerCode: string | null;
8499
9309
  usable: boolean;
9310
+ attributes?: Record<string, string> | undefined;
8500
9311
  hasOrders?: boolean | undefined;
8501
9312
  }[];
8502
9313
  addonGroups: {
@@ -8520,6 +9331,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
8520
9331
  required: boolean;
8521
9332
  usable: boolean;
8522
9333
  sortOrder: number;
9334
+ key?: string | null | undefined;
9335
+ type?: string | undefined;
9336
+ options?: string[] | null | undefined;
8523
9337
  }[];
8524
9338
  optionSort: "REGISTERED" | "NAME" | "PRICE_ASC" | "PRICE_DESC";
8525
9339
  fulfillment: UnknownFulfillment | {
@@ -8531,8 +9345,10 @@ export declare function createStoreClient(options: StoreClientOptions): {
8531
9345
  shippingAddressId: string | null;
8532
9346
  returnAddressId: string | null;
8533
9347
  };
9348
+ methods?: string[] | undefined;
8534
9349
  } | {
8535
9350
  type: "MANUAL";
9351
+ methods?: string[] | undefined;
8536
9352
  };
8537
9353
  fulfillmentTypeLocked: boolean;
8538
9354
  refundPolicy: {
@@ -8552,6 +9368,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
8552
9368
  attributeId: string;
8553
9369
  value: string;
8554
9370
  }[] | undefined;
9371
+ inventoryMode?: string | undefined;
9372
+ flowId?: string | null | undefined;
8555
9373
  discount?: {
8556
9374
  productId: string;
8557
9375
  discountType: "RATE" | "AMOUNT";
@@ -8597,6 +9415,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
8597
9415
  weightGram: number | null;
8598
9416
  sellerCode: string | null;
8599
9417
  usable: boolean;
9418
+ attributes?: Record<string, string> | undefined;
8600
9419
  hasOrders?: boolean | undefined;
8601
9420
  }[];
8602
9421
  addonGroups: {
@@ -8620,6 +9439,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
8620
9439
  required: boolean;
8621
9440
  usable: boolean;
8622
9441
  sortOrder: number;
9442
+ key?: string | null | undefined;
9443
+ type?: string | undefined;
9444
+ options?: string[] | null | undefined;
8623
9445
  }[];
8624
9446
  optionSort: "REGISTERED" | "NAME" | "PRICE_ASC" | "PRICE_DESC";
8625
9447
  fulfillment: UnknownFulfillment | {
@@ -8631,8 +9453,10 @@ export declare function createStoreClient(options: StoreClientOptions): {
8631
9453
  shippingAddressId: string | null;
8632
9454
  returnAddressId: string | null;
8633
9455
  };
9456
+ methods?: string[] | undefined;
8634
9457
  } | {
8635
9458
  type: "MANUAL";
9459
+ methods?: string[] | undefined;
8636
9460
  };
8637
9461
  fulfillmentTypeLocked: boolean;
8638
9462
  refundPolicy: {
@@ -8652,6 +9476,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
8652
9476
  attributeId: string;
8653
9477
  value: string;
8654
9478
  }[] | undefined;
9479
+ inventoryMode?: string | undefined;
9480
+ flowId?: string | null | undefined;
8655
9481
  discount?: {
8656
9482
  productId: string;
8657
9483
  discountType: "RATE" | "AMOUNT";
@@ -8699,6 +9525,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
8699
9525
  weightGram: number | null;
8700
9526
  sellerCode: string | null;
8701
9527
  usable: boolean;
9528
+ attributes?: Record<string, string> | undefined;
8702
9529
  hasOrders?: boolean | undefined;
8703
9530
  }[];
8704
9531
  addonGroups: {
@@ -8722,6 +9549,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
8722
9549
  required: boolean;
8723
9550
  usable: boolean;
8724
9551
  sortOrder: number;
9552
+ key?: string | null | undefined;
9553
+ type?: string | undefined;
9554
+ options?: string[] | null | undefined;
8725
9555
  }[];
8726
9556
  optionSort: "REGISTERED" | "NAME" | "PRICE_ASC" | "PRICE_DESC";
8727
9557
  }>;
@@ -8753,6 +9583,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
8753
9583
  weightGram: number | null;
8754
9584
  sellerCode: string | null;
8755
9585
  usable: boolean;
9586
+ attributes?: Record<string, string> | undefined;
8756
9587
  hasOrders?: boolean | undefined;
8757
9588
  }[];
8758
9589
  addonGroups: {
@@ -8776,6 +9607,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
8776
9607
  required: boolean;
8777
9608
  usable: boolean;
8778
9609
  sortOrder: number;
9610
+ key?: string | null | undefined;
9611
+ type?: string | undefined;
9612
+ options?: string[] | null | undefined;
8779
9613
  }[];
8780
9614
  optionSort: "REGISTERED" | "NAME" | "PRICE_ASC" | "PRICE_DESC";
8781
9615
  }>;
@@ -8801,6 +9635,17 @@ export declare function createStoreClient(options: StoreClientOptions): {
8801
9635
  endAt: string | null;
8802
9636
  }>;
8803
9637
  removeDiscount: (productId: string) => Promise<void>;
9638
+ /** 날짜별 재고 상품(`inventoryMode: "DATED"`, 이슈 #118)의 기간(포함) 달력. 없는 날은 싣지 않는다 */
9639
+ getCalendar: (productId: string, query: z.input<typeof calendarQuerySchema>) => Promise<{
9640
+ variantId: string;
9641
+ date: string;
9642
+ stock: number;
9643
+ price: number | null;
9644
+ }[]>;
9645
+ /** 기간의 날짜마다 조합별 재고·가격을 덮어쓴다. `price: null`은 조합 가격으로 되돌린다 */
9646
+ setCalendar: (productId: string, body: SetCalendarRequest) => Promise<{
9647
+ updated: number;
9648
+ }>;
8804
9649
  };
8805
9650
  /**
8806
9651
  * 저장 옵션 (이슈 #59) — 자주 쓰는 옵션 구성. 불러오기는 복사라 저장 옵션을 고쳐도 불러온 상품은 바뀌지 않는다.
@@ -8830,6 +9675,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
8830
9675
  placeholder: string | null;
8831
9676
  maxLength: number;
8832
9677
  required: boolean;
9678
+ key?: string | null | undefined;
9679
+ type?: string | undefined;
9680
+ options?: string[] | null | undefined;
8833
9681
  }[];
8834
9682
  importedProductCount: number;
8835
9683
  createdAt: string;
@@ -8854,6 +9702,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
8854
9702
  placeholder: string | null;
8855
9703
  maxLength: number;
8856
9704
  required: boolean;
9705
+ key?: string | null | undefined;
9706
+ type?: string | undefined;
9707
+ options?: string[] | null | undefined;
8857
9708
  }[];
8858
9709
  importedProductCount: number;
8859
9710
  createdAt: string;
@@ -8878,6 +9729,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
8878
9729
  placeholder: string | null;
8879
9730
  maxLength: number;
8880
9731
  required: boolean;
9732
+ key?: string | null | undefined;
9733
+ type?: string | undefined;
9734
+ options?: string[] | null | undefined;
8881
9735
  }[];
8882
9736
  importedProductCount: number;
8883
9737
  createdAt: string;
@@ -8902,6 +9756,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
8902
9756
  placeholder: string | null;
8903
9757
  maxLength: number;
8904
9758
  required: boolean;
9759
+ key?: string | null | undefined;
9760
+ type?: string | undefined;
9761
+ options?: string[] | null | undefined;
8905
9762
  }[];
8906
9763
  importedProductCount: number;
8907
9764
  createdAt: string;
@@ -8928,6 +9785,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
8928
9785
  placeholder: string | null;
8929
9786
  maxLength: number;
8930
9787
  required: boolean;
9788
+ key?: string | null | undefined;
9789
+ type?: string | undefined;
9790
+ options?: string[] | null | undefined;
8931
9791
  }[];
8932
9792
  importedProductCount: number;
8933
9793
  createdAt: string;
@@ -9267,6 +10127,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
9267
10127
  metaKeywords: string | null;
9268
10128
  createdAt: string;
9269
10129
  updatedAt: string;
10130
+ flowId?: string | null | undefined;
9270
10131
  }[]>;
9271
10132
  tree: () => Promise<CategoryTreeNode[]>;
9272
10133
  search: (q: string) => Promise<{
@@ -9306,7 +10167,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
9306
10167
  metaKeywords: string | null;
9307
10168
  createdAt: string;
9308
10169
  updatedAt: string;
10170
+ flowId?: string | null | undefined;
9309
10171
  }[];
10172
+ flowId?: string | null | undefined;
9310
10173
  }[]>;
9311
10174
  get: (categoryId: string) => Promise<{
9312
10175
  categoryId: string;
@@ -9345,8 +10208,10 @@ export declare function createStoreClient(options: StoreClientOptions): {
9345
10208
  metaKeywords: string | null;
9346
10209
  createdAt: string;
9347
10210
  updatedAt: string;
10211
+ flowId?: string | null | undefined;
9348
10212
  }[];
9349
10213
  childCount: number;
10214
+ flowId?: string | null | undefined;
9350
10215
  }>;
9351
10216
  listAttributes: (categoryId: string) => Promise<{
9352
10217
  attributeId: string;
@@ -9374,6 +10239,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
9374
10239
  metaKeywords: string | null;
9375
10240
  createdAt: string;
9376
10241
  updatedAt: string;
10242
+ flowId?: string | null | undefined;
9377
10243
  }>;
9378
10244
  update: (categoryId: string, body: CategoryPatchRequest) => Promise<{
9379
10245
  categoryId: string;
@@ -9393,6 +10259,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
9393
10259
  metaKeywords: string | null;
9394
10260
  createdAt: string;
9395
10261
  updatedAt: string;
10262
+ flowId?: string | null | undefined;
9396
10263
  }>;
9397
10264
  remove: (categoryId: string, opts?: {
9398
10265
  strategy?: CategoryDeleteStrategy;
@@ -9497,6 +10364,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
9497
10364
  customInputs: {
9498
10365
  label: string;
9499
10366
  value: string;
10367
+ key?: string | null | undefined;
10368
+ type?: string | undefined;
9500
10369
  }[];
9501
10370
  sellerCode: string | null;
9502
10371
  fulfillmentSnapshot: UnknownFulfillment | {
@@ -9505,8 +10374,24 @@ export declare function createStoreClient(options: StoreClientOptions): {
9505
10374
  bundleKey: string | null;
9506
10375
  returnAddressId: string | null;
9507
10376
  };
10377
+ method?: string | undefined;
10378
+ pickupLocation?: {
10379
+ locationId: string;
10380
+ name: string;
10381
+ address: string;
10382
+ phone: string | null;
10383
+ hours: string | null;
10384
+ } | undefined;
9508
10385
  } | {
9509
10386
  type: "MANUAL";
10387
+ method?: string | undefined;
10388
+ pickupLocation?: {
10389
+ locationId: string;
10390
+ name: string;
10391
+ address: string;
10392
+ phone: string | null;
10393
+ hours: string | null;
10394
+ } | undefined;
9510
10395
  };
9511
10396
  quantity: number;
9512
10397
  canceledQuantity: number;
@@ -9532,6 +10417,14 @@ export declare function createStoreClient(options: StoreClientOptions): {
9532
10417
  lastChangedAt: string;
9533
10418
  lastChangedType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED";
9534
10419
  testPayment: boolean;
10420
+ stay?: {
10421
+ checkIn: string;
10422
+ checkOut: string;
10423
+ nights: {
10424
+ date: string;
10425
+ price: number;
10426
+ }[];
10427
+ } | undefined;
9535
10428
  }[];
9536
10429
  }>;
9537
10430
  /**
@@ -9584,6 +10477,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
9584
10477
  customInputs: {
9585
10478
  label: string;
9586
10479
  value: string;
10480
+ key?: string | null | undefined;
10481
+ type?: string | undefined;
9587
10482
  }[];
9588
10483
  sellerCode: string | null;
9589
10484
  fulfillmentSnapshot: UnknownFulfillment | {
@@ -9592,8 +10487,24 @@ export declare function createStoreClient(options: StoreClientOptions): {
9592
10487
  bundleKey: string | null;
9593
10488
  returnAddressId: string | null;
9594
10489
  };
10490
+ method?: string | undefined;
10491
+ pickupLocation?: {
10492
+ locationId: string;
10493
+ name: string;
10494
+ address: string;
10495
+ phone: string | null;
10496
+ hours: string | null;
10497
+ } | undefined;
9595
10498
  } | {
9596
10499
  type: "MANUAL";
10500
+ method?: string | undefined;
10501
+ pickupLocation?: {
10502
+ locationId: string;
10503
+ name: string;
10504
+ address: string;
10505
+ phone: string | null;
10506
+ hours: string | null;
10507
+ } | undefined;
9597
10508
  };
9598
10509
  quantity: number;
9599
10510
  canceledQuantity: number;
@@ -9619,6 +10530,14 @@ export declare function createStoreClient(options: StoreClientOptions): {
9619
10530
  lastChangedAt: string;
9620
10531
  lastChangedType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED";
9621
10532
  testPayment: boolean;
10533
+ stay?: {
10534
+ checkIn: string;
10535
+ checkOut: string;
10536
+ nights: {
10537
+ date: string;
10538
+ price: number;
10539
+ }[];
10540
+ } | undefined;
9622
10541
  }[];
9623
10542
  }>;
9624
10543
  confirm: (orderItemId: string, idempotencyKey?: string) => Promise<void>;
@@ -9655,7 +10574,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
9655
10574
  }>;
9656
10575
  dispatch: (orderItemId: string, body: DispatchRequest, idempotencyKey?: string) => Promise<{
9657
10576
  orderItemId: string;
9658
- deliveryMethod: "COURIER" | "DIRECT" | "QUICK" | "NOTHING";
10577
+ deliveryMethod: "DIRECT" | "COURIER" | "QUICK" | "NOTHING";
9659
10578
  carrierCode: string | null;
9660
10579
  carrierName: string | null;
9661
10580
  trackingNumber: string | null;
@@ -9700,6 +10619,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
9700
10619
  customInputs: {
9701
10620
  label: string;
9702
10621
  value: string;
10622
+ key?: string | null | undefined;
10623
+ type?: string | undefined;
9703
10624
  }[];
9704
10625
  sellerCode: string | null;
9705
10626
  fulfillmentSnapshot: UnknownFulfillment | {
@@ -9708,8 +10629,24 @@ export declare function createStoreClient(options: StoreClientOptions): {
9708
10629
  bundleKey: string | null;
9709
10630
  returnAddressId: string | null;
9710
10631
  };
10632
+ method?: string | undefined;
10633
+ pickupLocation?: {
10634
+ locationId: string;
10635
+ name: string;
10636
+ address: string;
10637
+ phone: string | null;
10638
+ hours: string | null;
10639
+ } | undefined;
9711
10640
  } | {
9712
10641
  type: "MANUAL";
10642
+ method?: string | undefined;
10643
+ pickupLocation?: {
10644
+ locationId: string;
10645
+ name: string;
10646
+ address: string;
10647
+ phone: string | null;
10648
+ hours: string | null;
10649
+ } | undefined;
9713
10650
  };
9714
10651
  quantity: number;
9715
10652
  canceledQuantity: number;
@@ -9735,6 +10672,14 @@ export declare function createStoreClient(options: StoreClientOptions): {
9735
10672
  lastChangedAt: string;
9736
10673
  lastChangedType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED";
9737
10674
  testPayment: boolean;
10675
+ stay?: {
10676
+ checkIn: string;
10677
+ checkOut: string;
10678
+ nights: {
10679
+ date: string;
10680
+ price: number;
10681
+ }[];
10682
+ } | undefined;
9738
10683
  }>;
9739
10684
  /** 배송완료 일괄 처리 — 항목별 부분 성공이다 */
9740
10685
  markDeliveredBulk: (orderItemIds: string[], idempotencyKey?: string) => Promise<{
@@ -9770,6 +10715,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
9770
10715
  customInputs: {
9771
10716
  label: string;
9772
10717
  value: string;
10718
+ key?: string | null | undefined;
10719
+ type?: string | undefined;
9773
10720
  }[];
9774
10721
  sellerCode: string | null;
9775
10722
  fulfillmentSnapshot: UnknownFulfillment | {
@@ -9778,8 +10725,24 @@ export declare function createStoreClient(options: StoreClientOptions): {
9778
10725
  bundleKey: string | null;
9779
10726
  returnAddressId: string | null;
9780
10727
  };
10728
+ method?: string | undefined;
10729
+ pickupLocation?: {
10730
+ locationId: string;
10731
+ name: string;
10732
+ address: string;
10733
+ phone: string | null;
10734
+ hours: string | null;
10735
+ } | undefined;
9781
10736
  } | {
9782
10737
  type: "MANUAL";
10738
+ method?: string | undefined;
10739
+ pickupLocation?: {
10740
+ locationId: string;
10741
+ name: string;
10742
+ address: string;
10743
+ phone: string | null;
10744
+ hours: string | null;
10745
+ } | undefined;
9783
10746
  };
9784
10747
  quantity: number;
9785
10748
  canceledQuantity: number;
@@ -9805,6 +10768,14 @@ export declare function createStoreClient(options: StoreClientOptions): {
9805
10768
  lastChangedAt: string;
9806
10769
  lastChangedType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED";
9807
10770
  testPayment: boolean;
10771
+ stay?: {
10772
+ checkIn: string;
10773
+ checkOut: string;
10774
+ nights: {
10775
+ date: string;
10776
+ price: number;
10777
+ }[];
10778
+ } | undefined;
9808
10779
  }>;
9809
10780
  /** 제공 처리 일괄 — 항목별 부분 성공이다 */
9810
10781
  fulfillBulk: (orderItemIds: string[], body?: FulfillRequest, idempotencyKey?: string) => Promise<{
@@ -9819,7 +10790,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
9819
10790
  }>;
9820
10791
  getDelivery: (orderItemId: string) => Promise<{
9821
10792
  orderItemId: string;
9822
- deliveryMethod: "COURIER" | "DIRECT" | "QUICK" | "NOTHING";
10793
+ deliveryMethod: "DIRECT" | "COURIER" | "QUICK" | "NOTHING";
9823
10794
  carrierCode: string | null;
9824
10795
  carrierName: string | null;
9825
10796
  trackingNumber: string | null;
@@ -9840,6 +10811,350 @@ export declare function createStoreClient(options: StoreClientOptions): {
9840
10811
  stage: string | null;
9841
10812
  }[] | undefined;
9842
10813
  }>;
10814
+ /** `GET /order-items/{id}/flow` — 커머스 플로우의 지금 상태·할 수 있는 행동·타이머(#115). 스코프 `order:r` */
10815
+ getFlow: (orderItemId: string) => Promise<{
10816
+ orderItemId: string;
10817
+ flow: {
10818
+ flowId: string;
10819
+ version: number;
10820
+ };
10821
+ flowState: {
10822
+ key: string;
10823
+ label: string;
10824
+ enteredAt: string;
10825
+ fields: Record<string, string | number | boolean | string[] | null>;
10826
+ coreStatus?: "PAID" | "CANCELED" | "PAYMENT_WAITING" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED" | undefined;
10827
+ claimStatus?: "REJECTED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "COMPLETED" | "WITHDRAWN" | undefined;
10828
+ message?: string | undefined;
10829
+ deadlineAt?: string | undefined;
10830
+ attachments?: string[] | undefined;
10831
+ progress?: boolean | undefined;
10832
+ };
10833
+ actions: {
10834
+ key: string;
10835
+ label: string;
10836
+ mode: "REQUEST" | "INSTANT" | "VIEW";
10837
+ enabled: boolean;
10838
+ disabled?: {
10839
+ reason: string;
10840
+ message?: string | undefined;
10841
+ } | undefined;
10842
+ availableUntil?: string | undefined;
10843
+ subflow?: string | undefined;
10844
+ input?: {
10845
+ key: string;
10846
+ type: string;
10847
+ required: boolean;
10848
+ label: string;
10849
+ maxLength?: number | undefined;
10850
+ maxFiles?: number | undefined;
10851
+ options?: (string | number)[] | undefined;
10852
+ }[] | undefined;
10853
+ partialQuantity?: boolean | "UNIT" | undefined;
10854
+ }[];
10855
+ timers: {
10856
+ key: string;
10857
+ dueAt: string;
10858
+ paused: boolean;
10859
+ }[];
10860
+ ended: boolean;
10861
+ }>;
10862
+ /**
10863
+ * `POST /order-items/{id}/actions/{key}` — `getFlow().actions`에 켜진 행동을 실행한다(#115). 묶음 진행이면
10864
+ * `affectedOrderItemIds`에 함께 움직인 주문상품이 온다. 에러: 409 `ACTION_NOT_AVAILABLE`
10865
+ */
10866
+ act: (orderItemId: string, key: string, input?: Record<string, unknown>, idempotencyKey?: string) => Promise<{
10867
+ status: "COMPLETED";
10868
+ flowState: {
10869
+ key: string;
10870
+ label: string;
10871
+ enteredAt: string;
10872
+ fields: Record<string, string | number | boolean | string[] | null>;
10873
+ coreStatus?: "PAID" | "CANCELED" | "PAYMENT_WAITING" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED" | undefined;
10874
+ claimStatus?: "REJECTED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "COMPLETED" | "WITHDRAWN" | undefined;
10875
+ message?: string | undefined;
10876
+ deadlineAt?: string | undefined;
10877
+ attachments?: string[] | undefined;
10878
+ progress?: boolean | undefined;
10879
+ };
10880
+ actions: {
10881
+ key: string;
10882
+ label: string;
10883
+ mode: "REQUEST" | "INSTANT" | "VIEW";
10884
+ enabled: boolean;
10885
+ disabled?: {
10886
+ reason: string;
10887
+ message?: string | undefined;
10888
+ } | undefined;
10889
+ availableUntil?: string | undefined;
10890
+ subflow?: string | undefined;
10891
+ input?: {
10892
+ key: string;
10893
+ type: string;
10894
+ required: boolean;
10895
+ label: string;
10896
+ maxLength?: number | undefined;
10897
+ maxFiles?: number | undefined;
10898
+ options?: (string | number)[] | undefined;
10899
+ }[] | undefined;
10900
+ partialQuantity?: boolean | "UNIT" | undefined;
10901
+ }[];
10902
+ affectedOrderItemIds: string[];
10903
+ }>;
10904
+ /**
10905
+ * `POST /order-items/{id}/events/{key}` — 현장 단말·연동의 상점 사건(`custom.<이름>`)을 플로우에 넣는다(#115).
10906
+ * 에러: 400 `FLOW_EVENT_KEY_INVALID`, 409 `FLOW_EVENT_NOT_ACCEPTED`
10907
+ */
10908
+ emitEvent: (orderItemId: string, key: `custom.${string}`, input?: Record<string, unknown>, idempotencyKey?: string) => Promise<{
10909
+ status: "COMPLETED";
10910
+ flowState: {
10911
+ key: string;
10912
+ label: string;
10913
+ enteredAt: string;
10914
+ fields: Record<string, string | number | boolean | string[] | null>;
10915
+ coreStatus?: "PAID" | "CANCELED" | "PAYMENT_WAITING" | "CONFIRMED" | "DISPATCHED" | "DELIVERING" | "DELIVERED" | "PURCHASE_DECIDED" | undefined;
10916
+ claimStatus?: "REJECTED" | "REQUESTED" | "HELD" | "COLLECTING" | "COLLECTED" | "REDELIVERING" | "APPROVED" | "COMPLETED" | "WITHDRAWN" | undefined;
10917
+ message?: string | undefined;
10918
+ deadlineAt?: string | undefined;
10919
+ attachments?: string[] | undefined;
10920
+ progress?: boolean | undefined;
10921
+ };
10922
+ actions: {
10923
+ key: string;
10924
+ label: string;
10925
+ mode: "REQUEST" | "INSTANT" | "VIEW";
10926
+ enabled: boolean;
10927
+ disabled?: {
10928
+ reason: string;
10929
+ message?: string | undefined;
10930
+ } | undefined;
10931
+ availableUntil?: string | undefined;
10932
+ subflow?: string | undefined;
10933
+ input?: {
10934
+ key: string;
10935
+ type: string;
10936
+ required: boolean;
10937
+ label: string;
10938
+ maxLength?: number | undefined;
10939
+ maxFiles?: number | undefined;
10940
+ options?: (string | number)[] | undefined;
10941
+ }[] | undefined;
10942
+ partialQuantity?: boolean | "UNIT" | undefined;
10943
+ }[];
10944
+ affectedOrderItemIds: string[];
10945
+ }>;
10946
+ };
10947
+ /**
10948
+ * 커머스 플로우 (이슈 #115) — 프리셋 설치·초안 저장·검사·게시와 상품 할당 규칙. 조회 `flow:r`, 쓰기 `flow:rw`.
10949
+ * 게시한 버전은 불변이고, 진행 중 주문은 결제 때 붙은 버전으로 끝까지 간다.
10950
+ */
10951
+ commerceFlows: {
10952
+ presets: () => Promise<{
10953
+ key: string;
10954
+ presetVersion: number;
10955
+ name: string;
10956
+ description: string;
10957
+ availability: "AVAILABLE" | "BLOCKED";
10958
+ dependsOn: string[];
10959
+ requires: Record<string, unknown>;
10960
+ variables: Record<string, unknown>[];
10961
+ }[]>;
10962
+ list: () => Promise<{
10963
+ flowId: string;
10964
+ key: string;
10965
+ name: string;
10966
+ progression: "ITEM" | "ORDER_GROUP";
10967
+ fulfillmentMethods: string[];
10968
+ presetKey: string | null;
10969
+ presetVersion: number | null;
10970
+ activeVersion: number | null;
10971
+ archivedAt: string | null;
10972
+ createdAt: string;
10973
+ updatedAt: string;
10974
+ }[]>;
10975
+ get: (flowId: string) => Promise<{
10976
+ flowId: string;
10977
+ key: string;
10978
+ name: string;
10979
+ progression: "ITEM" | "ORDER_GROUP";
10980
+ fulfillmentMethods: string[];
10981
+ presetKey: string | null;
10982
+ presetVersion: number | null;
10983
+ activeVersion: number | null;
10984
+ archivedAt: string | null;
10985
+ createdAt: string;
10986
+ updatedAt: string;
10987
+ draft: {
10988
+ version: number;
10989
+ status: "ACTIVE" | "DRAFT" | "LEGACY";
10990
+ revision: number;
10991
+ graph: Record<string, unknown>;
10992
+ definition: Record<string, unknown>;
10993
+ variables: Record<string, unknown>;
10994
+ publishedAt: string | null;
10995
+ } | null;
10996
+ active: {
10997
+ version: number;
10998
+ status: "ACTIVE" | "DRAFT" | "LEGACY";
10999
+ revision: number;
11000
+ graph: Record<string, unknown>;
11001
+ definition: Record<string, unknown>;
11002
+ variables: Record<string, unknown>;
11003
+ publishedAt: string | null;
11004
+ } | null;
11005
+ versions: {
11006
+ version: number;
11007
+ status: "ACTIVE" | "DRAFT" | "LEGACY";
11008
+ publishedAt: string | null;
11009
+ }[];
11010
+ }>;
11011
+ /** 프리셋 설치 또는 빈 플로우. 에러: 409 `FLOW_KEY_TAKEN`·`FLOW_PRESET_UNAVAILABLE` */
11012
+ create: (body: CreateCommerceFlowRequest) => Promise<{
11013
+ flowId: string;
11014
+ key: string;
11015
+ name: string;
11016
+ progression: "ITEM" | "ORDER_GROUP";
11017
+ fulfillmentMethods: string[];
11018
+ presetKey: string | null;
11019
+ presetVersion: number | null;
11020
+ activeVersion: number | null;
11021
+ archivedAt: string | null;
11022
+ createdAt: string;
11023
+ updatedAt: string;
11024
+ draft: {
11025
+ version: number;
11026
+ status: "ACTIVE" | "DRAFT" | "LEGACY";
11027
+ revision: number;
11028
+ graph: Record<string, unknown>;
11029
+ definition: Record<string, unknown>;
11030
+ variables: Record<string, unknown>;
11031
+ publishedAt: string | null;
11032
+ } | null;
11033
+ active: {
11034
+ version: number;
11035
+ status: "ACTIVE" | "DRAFT" | "LEGACY";
11036
+ revision: number;
11037
+ graph: Record<string, unknown>;
11038
+ definition: Record<string, unknown>;
11039
+ variables: Record<string, unknown>;
11040
+ publishedAt: string | null;
11041
+ } | null;
11042
+ versions: {
11043
+ version: number;
11044
+ status: "ACTIVE" | "DRAFT" | "LEGACY";
11045
+ publishedAt: string | null;
11046
+ }[];
11047
+ }>;
11048
+ /** 초안 저장. `revision`을 주면 그 초안일 때만 저장한다(409 `FLOW_REVISION_CONFLICT`) */
11049
+ saveDraft: (flowId: string, body: SaveFlowDraftRequest, revision?: number) => Promise<{
11050
+ flowId: string;
11051
+ key: string;
11052
+ name: string;
11053
+ progression: "ITEM" | "ORDER_GROUP";
11054
+ fulfillmentMethods: string[];
11055
+ presetKey: string | null;
11056
+ presetVersion: number | null;
11057
+ activeVersion: number | null;
11058
+ archivedAt: string | null;
11059
+ createdAt: string;
11060
+ updatedAt: string;
11061
+ draft: {
11062
+ version: number;
11063
+ status: "ACTIVE" | "DRAFT" | "LEGACY";
11064
+ revision: number;
11065
+ graph: Record<string, unknown>;
11066
+ definition: Record<string, unknown>;
11067
+ variables: Record<string, unknown>;
11068
+ publishedAt: string | null;
11069
+ } | null;
11070
+ active: {
11071
+ version: number;
11072
+ status: "ACTIVE" | "DRAFT" | "LEGACY";
11073
+ revision: number;
11074
+ graph: Record<string, unknown>;
11075
+ definition: Record<string, unknown>;
11076
+ variables: Record<string, unknown>;
11077
+ publishedAt: string | null;
11078
+ } | null;
11079
+ versions: {
11080
+ version: number;
11081
+ status: "ACTIVE" | "DRAFT" | "LEGACY";
11082
+ publishedAt: string | null;
11083
+ }[];
11084
+ }>;
11085
+ check: (flowId: string) => Promise<{
11086
+ publishable: boolean;
11087
+ blocking: {
11088
+ code: string;
11089
+ message: string;
11090
+ nodeId?: string | undefined;
11091
+ edgeId?: string | undefined;
11092
+ }[];
11093
+ warnings: {
11094
+ code: string;
11095
+ message: string;
11096
+ nodeId?: string | undefined;
11097
+ edgeId?: string | undefined;
11098
+ }[];
11099
+ }>;
11100
+ /** 게시. 차단 오류가 있으면 409 `PUBLISH_BLOCKED`(`details.blocking`) */
11101
+ publish: (flowId: string) => Promise<{
11102
+ flowId: string;
11103
+ key: string;
11104
+ name: string;
11105
+ progression: "ITEM" | "ORDER_GROUP";
11106
+ fulfillmentMethods: string[];
11107
+ presetKey: string | null;
11108
+ presetVersion: number | null;
11109
+ activeVersion: number | null;
11110
+ archivedAt: string | null;
11111
+ createdAt: string;
11112
+ updatedAt: string;
11113
+ draft: {
11114
+ version: number;
11115
+ status: "ACTIVE" | "DRAFT" | "LEGACY";
11116
+ revision: number;
11117
+ graph: Record<string, unknown>;
11118
+ definition: Record<string, unknown>;
11119
+ variables: Record<string, unknown>;
11120
+ publishedAt: string | null;
11121
+ } | null;
11122
+ active: {
11123
+ version: number;
11124
+ status: "ACTIVE" | "DRAFT" | "LEGACY";
11125
+ revision: number;
11126
+ graph: Record<string, unknown>;
11127
+ definition: Record<string, unknown>;
11128
+ variables: Record<string, unknown>;
11129
+ publishedAt: string | null;
11130
+ } | null;
11131
+ versions: {
11132
+ version: number;
11133
+ status: "ACTIVE" | "DRAFT" | "LEGACY";
11134
+ publishedAt: string | null;
11135
+ }[];
11136
+ }>;
11137
+ /** 이 상품에 지금 붙을 플로우 */
11138
+ forProduct: (productId: string) => Promise<{
11139
+ flowId: string;
11140
+ version: number;
11141
+ source: "PRODUCT" | "CATEGORY" | "PLATFORM";
11142
+ }>;
11143
+ /** HTTP 노드 시크릿 목록(헤더 값 제외) */
11144
+ secrets: () => Promise<{
11145
+ name: string;
11146
+ url: string;
11147
+ headerNames: string[];
11148
+ updatedAt: string;
11149
+ }[]>;
11150
+ /** 시크릿 저장(같은 이름이면 덮어쓴다). 상점 플랫폼 OWNER·ADMIN만. 에러: 400 `FLOW_SECRET_URL_INVALID` */
11151
+ saveSecret: (name: string, body: SaveFlowSecretRequest) => Promise<{
11152
+ name: string;
11153
+ url: string;
11154
+ headerNames: string[];
11155
+ updatedAt: string;
11156
+ }>;
11157
+ removeSecret: (name: string) => Promise<void>;
9843
11158
  };
9844
11159
  carriers: {
9845
11160
  list: () => Promise<{
@@ -11923,7 +13238,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11923
13238
  list: () => Promise<{
11924
13239
  webhookId: string;
11925
13240
  url: string;
11926
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
13241
+ eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK" | "ORDER.FLOW_NOTIFICATION")[];
11927
13242
  status: "SUSPENDED" | "ACTIVE";
11928
13243
  secretPrefix: string;
11929
13244
  suspendedAt: string | null;
@@ -11933,7 +13248,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11933
13248
  create: (body: WebhookRequest) => Promise<{
11934
13249
  webhookId: string;
11935
13250
  url: string;
11936
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
13251
+ eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK" | "ORDER.FLOW_NOTIFICATION")[];
11937
13252
  status: "SUSPENDED" | "ACTIVE";
11938
13253
  secretPrefix: string;
11939
13254
  suspendedAt: string | null;
@@ -11943,7 +13258,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11943
13258
  get: (webhookId: string) => Promise<{
11944
13259
  webhookId: string;
11945
13260
  url: string;
11946
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
13261
+ eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK" | "ORDER.FLOW_NOTIFICATION")[];
11947
13262
  status: "SUSPENDED" | "ACTIVE";
11948
13263
  secretPrefix: string;
11949
13264
  suspendedAt: string | null;
@@ -11953,7 +13268,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11953
13268
  update: (webhookId: string, body: WebhookRequest) => Promise<{
11954
13269
  webhookId: string;
11955
13270
  url: string;
11956
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
13271
+ eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK" | "ORDER.FLOW_NOTIFICATION")[];
11957
13272
  status: "SUSPENDED" | "ACTIVE";
11958
13273
  secretPrefix: string;
11959
13274
  suspendedAt: string | null;
@@ -11968,7 +13283,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11968
13283
  resume: (webhookId: string) => Promise<{
11969
13284
  webhookId: string;
11970
13285
  url: string;
11971
- eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK")[];
13286
+ eventTypes: ("ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK" | "ORDER.FLOW_NOTIFICATION")[];
11972
13287
  status: "SUSPENDED" | "ACTIVE";
11973
13288
  secretPrefix: string;
11974
13289
  suspendedAt: string | null;
@@ -11978,7 +13293,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11978
13293
  listDeliveries: (webhookId: string, params?: WebhookDeliveryListParams) => Promise<{
11979
13294
  deliveryId: string;
11980
13295
  eventId: string;
11981
- eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
13296
+ eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK" | "ORDER.FLOW_NOTIFICATION";
11982
13297
  url: string;
11983
13298
  status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
11984
13299
  responseStatusCode: number | null;
@@ -12005,7 +13320,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12005
13320
  getDelivery: (webhookId: string, deliveryId: string) => Promise<{
12006
13321
  deliveryId: string;
12007
13322
  eventId: string;
12008
- eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
13323
+ eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK" | "ORDER.FLOW_NOTIFICATION";
12009
13324
  url: string;
12010
13325
  status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
12011
13326
  responseStatusCode: number | null;
@@ -12040,7 +13355,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
12040
13355
  redeliver: (webhookId: string, deliveryId: string) => Promise<{
12041
13356
  deliveryId: string;
12042
13357
  eventId: string;
12043
- eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK";
13358
+ eventType: "ORDER.PAID" | "ORDER.CONFIRMED" | "ORDER.DISPATCHED" | "ORDER.DELIVERED" | "ORDER.PURCHASE_DECIDED" | "ORDER.ADDRESS_CHANGE_REQUESTED" | "ORDER.CANCELED" | "ORDER.FULFILLED" | "CLAIM.CANCEL_REQUESTED" | "CLAIM.RETURN_REQUESTED" | "CLAIM.EXCHANGE_REQUESTED" | "CLAIM.COMPLETED" | "INQUIRY.CREATED" | "REVIEW.CREATED" | "PRODUCT.OUT_OF_STOCK" | "ORDER.FLOW_NOTIFICATION";
12044
13359
  url: string;
12045
13360
  status: "PENDING" | "PENDING_RETRY" | "SUCCESS" | "FAILED";
12046
13361
  responseStatusCode: number | null;
@@ -12418,6 +13733,40 @@ export declare function createStoreClient(options: StoreClientOptions): {
12418
13733
  remove: (addressId: string) => Promise<void>;
12419
13734
  setDefault: (addressId: string) => Promise<void>;
12420
13735
  };
13736
+ /** 픽업 장소 (이슈 #115) — 방문 수령 주문의 수령 장소. 조회 `store:r`, 쓰기 `store:rw`(상점 플랫폼 OWNER·ADMIN) */
13737
+ pickupLocations: {
13738
+ list: () => Promise<{
13739
+ locationId: string;
13740
+ name: string;
13741
+ address: string;
13742
+ phone: string | null;
13743
+ hours: string | null;
13744
+ usable: boolean;
13745
+ sortOrder: number;
13746
+ createdAt: string;
13747
+ }[]>;
13748
+ create: (body: PickupLocationRequestInput) => Promise<{
13749
+ locationId: string;
13750
+ name: string;
13751
+ address: string;
13752
+ phone: string | null;
13753
+ hours: string | null;
13754
+ usable: boolean;
13755
+ sortOrder: number;
13756
+ createdAt: string;
13757
+ }>;
13758
+ update: (locationId: string, body: PickupLocationRequestInput) => Promise<{
13759
+ locationId: string;
13760
+ name: string;
13761
+ address: string;
13762
+ phone: string | null;
13763
+ hours: string | null;
13764
+ usable: boolean;
13765
+ sortOrder: number;
13766
+ createdAt: string;
13767
+ }>;
13768
+ remove: (locationId: string) => Promise<void>;
13769
+ };
12421
13770
  /**
12422
13771
  * 스토어프론트 호스팅 (이슈 #53) — 조회 `storefront:r`, 쓰기 `storefront:rw`(OWNER·ADMIN).
12423
13772
  * 쓰기 응답은 바뀐 사이트다. Cloudflare 반영은 커밋 뒤라 `provisioning.status`가 잠시 `PENDING`일 수 있다.
@@ -14440,10 +15789,12 @@ export declare const STORE_SCOPE_RESOURCES: {
14440
15789
  readonly audit: readonly ["r"];
14441
15790
  readonly promotion: readonly ["r", "rw"];
14442
15791
  readonly storefront: readonly ["r", "rw"];
15792
+ readonly flow: readonly ["r", "rw"];
14443
15793
  };
14444
15794
  export type StoreScopeResource = keyof typeof STORE_SCOPE_RESOURCES;
14445
15795
  export declare const storeScopeResourceSchema: z.ZodEnum<{
14446
15796
  category: "category";
15797
+ flow: "flow";
14447
15798
  analytics: "analytics";
14448
15799
  product: "product";
14449
15800
  order: "order";
@@ -14466,9 +15817,9 @@ export declare function isStoreScope(scope: string): boolean;
14466
15817
  * 계정 토큰으로 상점을 호출할 때의 스코프는 그 상점에서의 역할로 이 표에서 결정된다.
14467
15818
  */
14468
15819
  export declare const STORE_ROLE_SCOPES: {
14469
- readonly OWNER: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "settlement:r", "analytics:r", "webhook:rw", "store:rw", "member:rw", "customer:rw", "audit:r", "promotion:rw", "storefront:rw"];
14470
- readonly ADMIN: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "analytics:r", "webhook:rw", "store:rw", "member:rw", "customer:rw", "audit:r", "promotion:rw", "storefront:rw"];
14471
- readonly STAFF: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "customer:r", "promotion:r"];
15820
+ readonly OWNER: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "settlement:r", "analytics:r", "webhook:rw", "store:rw", "member:rw", "customer:rw", "audit:r", "promotion:rw", "storefront:rw", "flow:rw"];
15821
+ readonly ADMIN: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "analytics:r", "webhook:rw", "store:rw", "member:rw", "customer:rw", "audit:r", "promotion:rw", "storefront:rw", "flow:rw"];
15822
+ readonly STAFF: readonly ["product:rw", "category:rw", "order:rw", "claim:rw", "inquiry:rw", "review:rw", "customer:r", "promotion:r", "flow:r"];
14472
15823
  };
14473
15824
  //#endregion
14474
15825
  //#region src/schemas/shipping-policy.d.ts
@@ -14606,6 +15957,8 @@ export interface DeliveryFeeLine {
14606
15957
  * 유형을 바꿔도 결제 시작의 견적과 주문상품 스냅샷이 같은 유형을 보게 한다. 생략하면 상품 값을 쓴다.
14607
15958
  */
14608
15959
  fulfillmentType?: FulfillmentType | null;
15960
+ /** 이 줄의 이행 방식(이슈 #115) — 배송지가 없는 방식(방문 수령)은 묶음을 만들지 않는다. 생략하면 유형 규칙만 본다 */
15961
+ fulfillmentMethod?: string | null;
14609
15962
  }
14610
15963
  /**
14611
15964
  * 기본 배송비를 면제한 근거 — 면제하지 않았으면 null이다.
@@ -15056,8 +16409,24 @@ export declare const orderWebhookEventDataSchema: z.ZodObject<{
15056
16409
  bundleKey: z.ZodNullable<z.ZodString>;
15057
16410
  returnAddressId: z.ZodNullable<z.ZodString>;
15058
16411
  }, z.core.$strip>;
16412
+ method: z.ZodOptional<z.ZodString>;
16413
+ pickupLocation: z.ZodOptional<z.ZodObject<{
16414
+ locationId: z.ZodString;
16415
+ name: z.ZodString;
16416
+ address: z.ZodString;
16417
+ phone: z.ZodNullable<z.ZodString>;
16418
+ hours: z.ZodNullable<z.ZodString>;
16419
+ }, z.core.$strip>>;
15059
16420
  }, z.core.$strip>, z.ZodObject<{
15060
16421
  type: z.ZodLiteral<"MANUAL">;
16422
+ method: z.ZodOptional<z.ZodString>;
16423
+ pickupLocation: z.ZodOptional<z.ZodObject<{
16424
+ locationId: z.ZodString;
16425
+ name: z.ZodString;
16426
+ address: z.ZodString;
16427
+ phone: z.ZodNullable<z.ZodString>;
16428
+ hours: z.ZodNullable<z.ZodString>;
16429
+ }, z.core.$strip>>;
15061
16430
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
15062
16431
  type: z.ZodString;
15063
16432
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -15075,6 +16444,8 @@ export declare const orderWebhookEventDataSchema: z.ZodObject<{
15075
16444
  customInputs: z.ZodArray<z.ZodObject<{
15076
16445
  label: z.ZodString;
15077
16446
  value: z.ZodString;
16447
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16448
+ type: z.ZodOptional<z.ZodString>;
15078
16449
  }, z.core.$strip>>;
15079
16450
  }, z.core.$strip>>>;
15080
16451
  }, z.core.$strip>;
@@ -15103,8 +16474,24 @@ export declare const orderFulfilledWebhookEventDataSchema: z.ZodObject<{
15103
16474
  bundleKey: z.ZodNullable<z.ZodString>;
15104
16475
  returnAddressId: z.ZodNullable<z.ZodString>;
15105
16476
  }, z.core.$strip>;
16477
+ method: z.ZodOptional<z.ZodString>;
16478
+ pickupLocation: z.ZodOptional<z.ZodObject<{
16479
+ locationId: z.ZodString;
16480
+ name: z.ZodString;
16481
+ address: z.ZodString;
16482
+ phone: z.ZodNullable<z.ZodString>;
16483
+ hours: z.ZodNullable<z.ZodString>;
16484
+ }, z.core.$strip>>;
15106
16485
  }, z.core.$strip>, z.ZodObject<{
15107
16486
  type: z.ZodLiteral<"MANUAL">;
16487
+ method: z.ZodOptional<z.ZodString>;
16488
+ pickupLocation: z.ZodOptional<z.ZodObject<{
16489
+ locationId: z.ZodString;
16490
+ name: z.ZodString;
16491
+ address: z.ZodString;
16492
+ phone: z.ZodNullable<z.ZodString>;
16493
+ hours: z.ZodNullable<z.ZodString>;
16494
+ }, z.core.$strip>>;
15108
16495
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
15109
16496
  type: z.ZodString;
15110
16497
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -15239,8 +16626,24 @@ export declare const orderWebhookEventSchema: z.ZodObject<{
15239
16626
  bundleKey: z.ZodNullable<z.ZodString>;
15240
16627
  returnAddressId: z.ZodNullable<z.ZodString>;
15241
16628
  }, z.core.$strip>;
16629
+ method: z.ZodOptional<z.ZodString>;
16630
+ pickupLocation: z.ZodOptional<z.ZodObject<{
16631
+ locationId: z.ZodString;
16632
+ name: z.ZodString;
16633
+ address: z.ZodString;
16634
+ phone: z.ZodNullable<z.ZodString>;
16635
+ hours: z.ZodNullable<z.ZodString>;
16636
+ }, z.core.$strip>>;
15242
16637
  }, z.core.$strip>, z.ZodObject<{
15243
16638
  type: z.ZodLiteral<"MANUAL">;
16639
+ method: z.ZodOptional<z.ZodString>;
16640
+ pickupLocation: z.ZodOptional<z.ZodObject<{
16641
+ locationId: z.ZodString;
16642
+ name: z.ZodString;
16643
+ address: z.ZodString;
16644
+ phone: z.ZodNullable<z.ZodString>;
16645
+ hours: z.ZodNullable<z.ZodString>;
16646
+ }, z.core.$strip>>;
15244
16647
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
15245
16648
  type: z.ZodString;
15246
16649
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -15258,6 +16661,8 @@ export declare const orderWebhookEventSchema: z.ZodObject<{
15258
16661
  customInputs: z.ZodArray<z.ZodObject<{
15259
16662
  label: z.ZodString;
15260
16663
  value: z.ZodString;
16664
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16665
+ type: z.ZodOptional<z.ZodString>;
15261
16666
  }, z.core.$strip>>;
15262
16667
  }, z.core.$strip>>>;
15263
16668
  }, z.core.$strip>;
@@ -15288,8 +16693,24 @@ export declare const orderFulfilledWebhookEventSchema: z.ZodObject<{
15288
16693
  bundleKey: z.ZodNullable<z.ZodString>;
15289
16694
  returnAddressId: z.ZodNullable<z.ZodString>;
15290
16695
  }, z.core.$strip>;
16696
+ method: z.ZodOptional<z.ZodString>;
16697
+ pickupLocation: z.ZodOptional<z.ZodObject<{
16698
+ locationId: z.ZodString;
16699
+ name: z.ZodString;
16700
+ address: z.ZodString;
16701
+ phone: z.ZodNullable<z.ZodString>;
16702
+ hours: z.ZodNullable<z.ZodString>;
16703
+ }, z.core.$strip>>;
15291
16704
  }, z.core.$strip>, z.ZodObject<{
15292
16705
  type: z.ZodLiteral<"MANUAL">;
16706
+ method: z.ZodOptional<z.ZodString>;
16707
+ pickupLocation: z.ZodOptional<z.ZodObject<{
16708
+ locationId: z.ZodString;
16709
+ name: z.ZodString;
16710
+ address: z.ZodString;
16711
+ phone: z.ZodNullable<z.ZodString>;
16712
+ hours: z.ZodNullable<z.ZodString>;
16713
+ }, z.core.$strip>>;
15293
16714
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
15294
16715
  type: z.ZodString;
15295
16716
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -15426,6 +16847,33 @@ export declare const productOutOfStockWebhookEventSchema: z.ZodObject<{
15426
16847
  storeId: z.ZodString;
15427
16848
  sequence: z.ZodOptional<z.ZodNumber>;
15428
16849
  }, z.core.$strip>;
16850
+ /**
16851
+ * 플로우 알림(이슈 #115) — 상점이 플로우에 둔 알림 블록(`core.notify`, 채널 `webhook`)이 보낸다. 구매자 알림(알림톡·메일)은 이 이벤트를 받아
16852
+ * 상점이 보낸다(플랫폼은 구매자에게 직접 보내지 않는다). 개인정보는 싣지 않는다
16853
+ */
16854
+ export declare const flowNotificationWebhookEventDataSchema: z.ZodObject<{
16855
+ orderId: z.ZodString;
16856
+ orderItemIds: z.ZodArray<z.ZodString>;
16857
+ event: z.ZodString;
16858
+ flowId: z.ZodString;
16859
+ flowVersion: z.ZodNumber;
16860
+ state: z.ZodString;
16861
+ }, z.core.$strip>;
16862
+ export declare const flowNotificationWebhookEventSchema: z.ZodObject<{
16863
+ type: z.ZodLiteral<"ORDER.FLOW_NOTIFICATION">;
16864
+ data: z.ZodObject<{
16865
+ orderId: z.ZodString;
16866
+ orderItemIds: z.ZodArray<z.ZodString>;
16867
+ event: z.ZodString;
16868
+ flowId: z.ZodString;
16869
+ flowVersion: z.ZodNumber;
16870
+ state: z.ZodString;
16871
+ }, z.core.$strip>;
16872
+ id: z.ZodString;
16873
+ createdAt: z.ZodString;
16874
+ storeId: z.ZodString;
16875
+ sequence: z.ZodOptional<z.ZodNumber>;
16876
+ }, z.core.$strip>;
15429
16877
  /** 웹훅 요청 본문. `type`으로 판별하며 `data` 형태가 타입별로 다르다 */
15430
16878
  export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
15431
16879
  type: z.ZodEnum<{
@@ -15459,8 +16907,24 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
15459
16907
  bundleKey: z.ZodNullable<z.ZodString>;
15460
16908
  returnAddressId: z.ZodNullable<z.ZodString>;
15461
16909
  }, z.core.$strip>;
16910
+ method: z.ZodOptional<z.ZodString>;
16911
+ pickupLocation: z.ZodOptional<z.ZodObject<{
16912
+ locationId: z.ZodString;
16913
+ name: z.ZodString;
16914
+ address: z.ZodString;
16915
+ phone: z.ZodNullable<z.ZodString>;
16916
+ hours: z.ZodNullable<z.ZodString>;
16917
+ }, z.core.$strip>>;
15462
16918
  }, z.core.$strip>, z.ZodObject<{
15463
16919
  type: z.ZodLiteral<"MANUAL">;
16920
+ method: z.ZodOptional<z.ZodString>;
16921
+ pickupLocation: z.ZodOptional<z.ZodObject<{
16922
+ locationId: z.ZodString;
16923
+ name: z.ZodString;
16924
+ address: z.ZodString;
16925
+ phone: z.ZodNullable<z.ZodString>;
16926
+ hours: z.ZodNullable<z.ZodString>;
16927
+ }, z.core.$strip>>;
15464
16928
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
15465
16929
  type: z.ZodString;
15466
16930
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -15478,6 +16942,8 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
15478
16942
  customInputs: z.ZodArray<z.ZodObject<{
15479
16943
  label: z.ZodString;
15480
16944
  value: z.ZodString;
16945
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16946
+ type: z.ZodOptional<z.ZodString>;
15481
16947
  }, z.core.$strip>>;
15482
16948
  }, z.core.$strip>>>;
15483
16949
  }, z.core.$strip>;
@@ -15507,8 +16973,24 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
15507
16973
  bundleKey: z.ZodNullable<z.ZodString>;
15508
16974
  returnAddressId: z.ZodNullable<z.ZodString>;
15509
16975
  }, z.core.$strip>;
16976
+ method: z.ZodOptional<z.ZodString>;
16977
+ pickupLocation: z.ZodOptional<z.ZodObject<{
16978
+ locationId: z.ZodString;
16979
+ name: z.ZodString;
16980
+ address: z.ZodString;
16981
+ phone: z.ZodNullable<z.ZodString>;
16982
+ hours: z.ZodNullable<z.ZodString>;
16983
+ }, z.core.$strip>>;
15510
16984
  }, z.core.$strip>, z.ZodObject<{
15511
16985
  type: z.ZodLiteral<"MANUAL">;
16986
+ method: z.ZodOptional<z.ZodString>;
16987
+ pickupLocation: z.ZodOptional<z.ZodObject<{
16988
+ locationId: z.ZodString;
16989
+ name: z.ZodString;
16990
+ address: z.ZodString;
16991
+ phone: z.ZodNullable<z.ZodString>;
16992
+ hours: z.ZodNullable<z.ZodString>;
16993
+ }, z.core.$strip>>;
15512
16994
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
15513
16995
  type: z.ZodString;
15514
16996
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -15639,6 +17121,20 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
15639
17121
  createdAt: z.ZodString;
15640
17122
  storeId: z.ZodString;
15641
17123
  sequence: z.ZodOptional<z.ZodNumber>;
17124
+ }, z.core.$strip>, z.ZodObject<{
17125
+ type: z.ZodLiteral<"ORDER.FLOW_NOTIFICATION">;
17126
+ data: z.ZodObject<{
17127
+ orderId: z.ZodString;
17128
+ orderItemIds: z.ZodArray<z.ZodString>;
17129
+ event: z.ZodString;
17130
+ flowId: z.ZodString;
17131
+ flowVersion: z.ZodNumber;
17132
+ state: z.ZodString;
17133
+ }, z.core.$strip>;
17134
+ id: z.ZodString;
17135
+ createdAt: z.ZodString;
17136
+ storeId: z.ZodString;
17137
+ sequence: z.ZodOptional<z.ZodNumber>;
15642
17138
  }, z.core.$strip>], "type">;
15643
17139
  export type WebhookEvent = z.infer<typeof webhookEventSchema>;
15644
17140
  export type WebhookEventType = WebhookEvent["type"];
@@ -15648,5 +17144,33 @@ export type WebhookEventOf<T extends WebhookEventType> = WebhookEvent extends (i
15648
17144
  } ? T extends U ? Omit<E, "type"> & {
15649
17145
  type: T;
15650
17146
  } : never : never : never;
17147
+ /**
17148
+ * 알려진 웹훅 이벤트 타입 — `webhookEventSchema`의 판별 값 목록(이 SDK 버전이 아는 것).
17149
+ * 서버는 새 타입을 구독한 엔드포인트에만 보내지만, 구독을 더 넓힌 수신자를 위해 `parseWebhookEvent`가 모르는 타입을 따로 받는다.
17150
+ */
17151
+ export declare const KNOWN_WEBHOOK_EVENT_TYPES: readonly WebhookEventType[];
17152
+ /** 이 SDK 버전이 모르는 이벤트 — 봉투만 검증하고 `data`는 그대로 둔다 */
17153
+ export declare const unknownWebhookEventSchema: z.ZodObject<{
17154
+ type: z.ZodString;
17155
+ data: z.ZodUnknown;
17156
+ id: z.ZodString;
17157
+ createdAt: z.ZodString;
17158
+ storeId: z.ZodString;
17159
+ sequence: z.ZodOptional<z.ZodNumber>;
17160
+ }, z.core.$strip>;
17161
+ export type UnknownWebhookEvent = z.infer<typeof unknownWebhookEventSchema>;
17162
+ export type ParsedWebhookEvent = {
17163
+ known: true;
17164
+ event: WebhookEvent;
17165
+ } | {
17166
+ known: false;
17167
+ event: UnknownWebhookEvent;
17168
+ };
17169
+ /**
17170
+ * 웹훅 본문을 `type`으로 먼저 판별해 읽는다(이슈 #115 결정 25). 알려진 타입은 그 타입의 스키마로 엄격하게 읽고 틀리면 던진다 —
17171
+ * `z.union([known, unknown])`처럼 읽으면 알려진 타입의 파싱 실패가 `known: false`로 조용히 새어 수신자가 처리할 이벤트를 버린다.
17172
+ * 모르는 타입은 봉투만 검증해 `known: false`로 돌려준다(새 이벤트에 옛 SDK가 깨지지 않는다).
17173
+ */
17174
+ export declare function parseWebhookEvent(body: unknown): ParsedWebhookEvent;
15651
17175
  //#endregion
15652
17176
  export { type AuthorizeOptions, type OAuthTokenResponse, type Query, type SessionStorage, type StoreAuthServer, type StoreClient, type StoreClientOptions, type StoreSession, type StoreSessionOptions, type TokenSource, WEBHOOK_DEFAULT_TOLERANCE_SEC, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_HEADERS, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_USER_AGENT };