@sayren/store-sdk 0.19.0 → 0.20.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
@@ -213,25 +213,25 @@ export declare const writeDryRunResultSchema: z.ZodObject<{
213
213
  }, z.core.$strip>;
214
214
  export type WriteDryRunResult = z.infer<typeof writeDryRunResultSchema>;
215
215
  export declare const approvalStatusSchema: z.ZodEnum<{
216
- EXPIRED: "EXPIRED";
217
216
  PENDING: "PENDING";
218
217
  FAILED: "FAILED";
219
218
  SUCCEEDED: "SUCCEEDED";
220
219
  EXECUTING: "EXECUTING";
221
220
  UNKNOWN: "UNKNOWN";
222
221
  REJECTED: "REJECTED";
222
+ EXPIRED: "EXPIRED";
223
223
  }>;
224
224
  export type ApprovalStatus = z.infer<typeof approvalStatusSchema>;
225
225
  export declare const approvalRequestSchema: z.ZodObject<{
226
226
  approvalId: z.ZodString;
227
227
  status: z.ZodEnum<{
228
- EXPIRED: "EXPIRED";
229
228
  PENDING: "PENDING";
230
229
  FAILED: "FAILED";
231
230
  SUCCEEDED: "SUCCEEDED";
232
231
  EXECUTING: "EXECUTING";
233
232
  UNKNOWN: "UNKNOWN";
234
233
  REJECTED: "REJECTED";
234
+ EXPIRED: "EXPIRED";
235
235
  }>;
236
236
  operationId: z.ZodString;
237
237
  method: z.ZodString;
@@ -287,13 +287,13 @@ export declare const approvalRequestSchema: z.ZodObject<{
287
287
  export type ApprovalRequest = z.infer<typeof approvalRequestSchema>;
288
288
  export declare const approvalListQuerySchema: z.ZodObject<{
289
289
  status: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodEnum<{
290
- EXPIRED: "EXPIRED";
291
290
  PENDING: "PENDING";
292
291
  FAILED: "FAILED";
293
292
  SUCCEEDED: "SUCCEEDED";
294
293
  EXECUTING: "EXECUTING";
295
294
  UNKNOWN: "UNKNOWN";
296
295
  REJECTED: "REJECTED";
296
+ EXPIRED: "EXPIRED";
297
297
  }>>>>;
298
298
  cursor: z.ZodOptional<z.ZodString>;
299
299
  limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -306,13 +306,13 @@ export declare const approvalPageSchema: z.ZodObject<{
306
306
  items: z.ZodArray<z.ZodObject<{
307
307
  approvalId: z.ZodString;
308
308
  status: z.ZodEnum<{
309
- EXPIRED: "EXPIRED";
310
309
  PENDING: "PENDING";
311
310
  FAILED: "FAILED";
312
311
  SUCCEEDED: "SUCCEEDED";
313
312
  EXECUTING: "EXECUTING";
314
313
  UNKNOWN: "UNKNOWN";
315
314
  REJECTED: "REJECTED";
315
+ EXPIRED: "EXPIRED";
316
316
  }>;
317
317
  operationId: z.ZodString;
318
318
  method: z.ZodString;
@@ -921,8 +921,8 @@ export declare const oauthClientRegistrationRequestSchema: z.ZodObject<{
921
921
  }>>;
922
922
  redirect_uris: z.ZodOptional<z.ZodArray<z.ZodString>>;
923
923
  grant_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
924
- authorization_code: "authorization_code";
925
924
  refresh_token: "refresh_token";
925
+ authorization_code: "authorization_code";
926
926
  client_credentials: "client_credentials";
927
927
  "urn:ietf:params:oauth:grant-type:token-exchange": "urn:ietf:params:oauth:grant-type:token-exchange";
928
928
  }>>>;
@@ -1725,8 +1725,8 @@ export declare const couponStatusSchema: z.ZodEnum<{
1725
1725
  export type CouponStatus = z.infer<typeof couponStatusSchema>;
1726
1726
  /** 지금 만들 수 있는 발급 방식 — 다운로드·가입 자동 지급은 뒤 단계다 */
1727
1727
  export declare const couponIssueMethodSchema: z.ZodEnum<{
1728
- CODE: "CODE";
1729
1728
  MANUAL: "MANUAL";
1729
+ CODE: "CODE";
1730
1730
  }>;
1731
1731
  export type CouponIssueMethod = z.infer<typeof couponIssueMethodSchema>;
1732
1732
  /** 코드 형식 — 영문·숫자·`-`·`_` 6~30자. 대소문자를 구분하지 않고 서버가 대문자로 저장한다 */
@@ -1777,8 +1777,8 @@ export declare const createCouponRequestSchema: z.ZodObject<{
1777
1777
  excludeCategoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1778
1778
  }, z.core.$strict>>;
1779
1779
  issueMethod: z.ZodEnum<{
1780
- CODE: "CODE";
1781
1780
  MANUAL: "MANUAL";
1781
+ CODE: "CODE";
1782
1782
  }>;
1783
1783
  code: z.ZodOptional<z.ZodString>;
1784
1784
  startsAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -1895,8 +1895,8 @@ export declare const couponListQuerySchema: z.ZodObject<{
1895
1895
  DELIVERY: "DELIVERY";
1896
1896
  }>>;
1897
1897
  issueMethod: z.ZodOptional<z.ZodEnum<{
1898
- CODE: "CODE";
1899
1898
  MANUAL: "MANUAL";
1899
+ CODE: "CODE";
1900
1900
  }>>;
1901
1901
  q: z.ZodOptional<z.ZodString>;
1902
1902
  }, z.core.$strip>;
@@ -2314,180 +2314,6 @@ export declare const customerWithdrawalBlockedDetailsSchema: z.ZodObject<{
2314
2314
  }, z.core.$strip>;
2315
2315
  export type CustomerWithdrawalBlockedDetails = z.infer<typeof customerWithdrawalBlockedDetailsSchema>;
2316
2316
  //#endregion
2317
- //#region src/schemas/digital-asset.d.ts
2318
- /**
2319
- * 파일 다운로드 상품의 판매 파일 (이슈 #48 단계 3).
2320
- *
2321
- * 파일은 CDN **비공개 객체**다. `POST /v1/uploads`(`purpose: "digital-asset"`)로 자리를 받아 응답의 `headers`와 함께 PUT하고,
2322
- * 응답의 `key`로 상품에 연결한다. 객체 키와 파일 주소는 어떤 응답에도 싣지 않는다 — 구매자는 제공된 주문상품에서
2323
- * 수명 300초의 서명 주소로만 받는다. 주문은 주문 시점 파일을 스냅샷하므로 파일을 바꿔도 이미 산 구매자는 옛 파일을 받는다.
2324
- */
2325
- export declare const digitalAssetAttachRequestSchema: z.ZodObject<{
2326
- key: z.ZodString;
2327
- fileName: z.ZodString;
2328
- sizeBytes: z.ZodOptional<z.ZodNumber>;
2329
- contentType: z.ZodOptional<z.ZodString>;
2330
- variantId: z.ZodOptional<z.ZodString>;
2331
- }, z.core.$strip>;
2332
- export type DigitalAssetAttachRequest = z.infer<typeof digitalAssetAttachRequestSchema>;
2333
- /** 판매 파일 — 객체 키·주소는 싣지 않는다 */
2334
- export declare const digitalAssetSchema: z.ZodObject<{
2335
- assetId: z.ZodString;
2336
- productId: z.ZodString;
2337
- variantId: z.ZodNullable<z.ZodString>;
2338
- fileName: z.ZodString;
2339
- contentType: z.ZodNullable<z.ZodString>;
2340
- sizeBytes: z.ZodNullable<z.ZodNumber>;
2341
- status: z.ZodString;
2342
- createdAt: z.ZodString;
2343
- }, z.core.$strip>;
2344
- export type DigitalAsset = z.infer<typeof digitalAssetSchema>;
2345
- /** 셀러 확인용 서명 주소 — `POST /v1/products/{productId}/digital-assets/{assetId}/preview-url` */
2346
- export declare const digitalAssetPreviewSchema: z.ZodObject<{
2347
- url: z.ZodURL;
2348
- expiresAt: z.ZodString;
2349
- }, z.core.$strip>;
2350
- export type DigitalAssetPreview = z.infer<typeof digitalAssetPreviewSchema>;
2351
- /** 주문상품의 다운로드 제공 정보 — 주문 응답의 `fulfillment.download` */
2352
- export declare const orderItemDownloadSchema: z.ZodObject<{
2353
- count: z.ZodNumber;
2354
- limit: z.ZodNumber;
2355
- expiresAt: z.ZodNullable<z.ZodString>;
2356
- firstDownloadedAt: z.ZodNullable<z.ZodString>;
2357
- files: z.ZodArray<z.ZodObject<{
2358
- assetId: z.ZodString;
2359
- fileName: z.ZodString;
2360
- sizeBytes: z.ZodNullable<z.ZodNumber>;
2361
- }, z.core.$strip>>;
2362
- }, z.core.$strip>;
2363
- export type OrderItemDownload = z.infer<typeof orderItemDownloadSchema>;
2364
- //#endregion
2365
- //#region src/schemas/fulfillment-code.d.ts
2366
- /**
2367
- * 코드 발급 상품의 코드 풀 (이슈 #48 단계 2) — 라이선스 키·기프트 코드처럼 결제 확정과 함께 한 개씩 배정하는 코드다.
2368
- *
2369
- * **평문 코드는 두 경로로만 나간다** — 구매자 열람(`POST /storefront/v1/me/order-items/{id}/fulfillment/reveal`)과 셀러 콘솔
2370
- * 열람(`POST /v1/fulfillment-codes/{codeId}/reveal`, 콘솔 전용). 목록·주문·웹훅·API 로그에는 가린 값(`hint`)만 싣는다.
2371
- * 코드는 결제 자격 증명과 같은 키링·AES-256-GCM으로 암호화해 저장한다.
2372
- */
2373
- /**
2374
- * 코드 상태.
2375
- * - `AVAILABLE` 판매 가능 — 재고로 센다
2376
- * - `ASSIGNED` 주문상품에 배정됨
2377
- * - `REVOKED` 환불로 회수됨(구매자 화면에서 숨긴다. 코드 자체의 무효화는 셀러 시스템 몫이다)
2378
- * - `EXPIRED` 유효기간이 지나 배정하지 않음
2379
- * - `VOID` 셀러가 폐기함
2380
- */
2381
- export declare const fulfillmentCodeStatusSchema: z.ZodEnum<{
2382
- REVOKED: "REVOKED";
2383
- AVAILABLE: "AVAILABLE";
2384
- ASSIGNED: "ASSIGNED";
2385
- EXPIRED: "EXPIRED";
2386
- VOID: "VOID";
2387
- }>;
2388
- export type FulfillmentCodeStatus = z.infer<typeof fulfillmentCodeStatusSchema>;
2389
- /** 한 번에 올릴 수 있는 코드 수 */
2390
- export declare const MAX_CODES_PER_UPLOAD = 10000;
2391
- /** 코드 한 개의 최대 길이 */
2392
- export declare const MAX_CODE_LENGTH = 200;
2393
- /**
2394
- * 코드 일괄 업로드 요청 — `POST /v1/products/{productId}/codes`. `codes`(배열)와 `csv`(본문) 중 하나를 보낸다.
2395
- * 앞뒤 공백은 지우고 빈 줄은 건너뛴다. 같은 상품에 이미 있는 코드와 요청 안의 중복은 받지 않는다(`duplicates`).
2396
- */
2397
- export declare const fulfillmentCodeUploadRequestSchema: z.ZodObject<{
2398
- variantId: z.ZodOptional<z.ZodString>;
2399
- codes: z.ZodOptional<z.ZodArray<z.ZodString>>;
2400
- csv: z.ZodOptional<z.ZodString>;
2401
- expiresAt: z.ZodOptional<z.ZodISODateTime>;
2402
- }, z.core.$strip>;
2403
- export type FulfillmentCodeUploadRequest = z.infer<typeof fulfillmentCodeUploadRequestSchema>;
2404
- /** 받지 않은 줄 */
2405
- export declare const fulfillmentCodeRejectionSchema: z.ZodObject<{
2406
- line: z.ZodNumber;
2407
- reason: z.ZodString;
2408
- }, z.core.$strip>;
2409
- /** 업로드 결과 — 배치 요약 */
2410
- export declare const fulfillmentCodeBatchSchema: z.ZodObject<{
2411
- batchId: z.ZodString;
2412
- productId: z.ZodString;
2413
- variantId: z.ZodString;
2414
- total: z.ZodNumber;
2415
- accepted: z.ZodNumber;
2416
- duplicates: z.ZodNumber;
2417
- rejected: z.ZodArray<z.ZodObject<{
2418
- line: z.ZodNumber;
2419
- reason: z.ZodString;
2420
- }, z.core.$strip>>;
2421
- expiresAt: z.ZodNullable<z.ZodString>;
2422
- createdAt: z.ZodString;
2423
- }, z.core.$strip>;
2424
- export type FulfillmentCodeBatch = z.infer<typeof fulfillmentCodeBatchSchema>;
2425
- /** 코드 목록의 한 줄 — **가린 값만** 싣는다 */
2426
- export declare const fulfillmentCodeSchema: z.ZodObject<{
2427
- codeId: z.ZodString;
2428
- productId: z.ZodString;
2429
- variantId: z.ZodString;
2430
- batchId: z.ZodNullable<z.ZodString>;
2431
- hint: z.ZodString;
2432
- status: z.ZodString;
2433
- orderItemId: z.ZodNullable<z.ZodString>;
2434
- assignedAt: z.ZodNullable<z.ZodString>;
2435
- revealedAt: z.ZodNullable<z.ZodString>;
2436
- expiresAt: z.ZodNullable<z.ZodString>;
2437
- createdAt: z.ZodString;
2438
- }, z.core.$strip>;
2439
- export type FulfillmentCode = z.infer<typeof fulfillmentCodeSchema>;
2440
- export declare const fulfillmentCodePageSchema: z.ZodObject<{
2441
- page: z.ZodNumber;
2442
- size: z.ZodNumber;
2443
- totalElements: z.ZodNumber;
2444
- totalPages: z.ZodNumber;
2445
- contents: z.ZodArray<z.ZodObject<{
2446
- codeId: z.ZodString;
2447
- productId: z.ZodString;
2448
- variantId: z.ZodString;
2449
- batchId: z.ZodNullable<z.ZodString>;
2450
- hint: z.ZodString;
2451
- status: z.ZodString;
2452
- orderItemId: z.ZodNullable<z.ZodString>;
2453
- assignedAt: z.ZodNullable<z.ZodString>;
2454
- revealedAt: z.ZodNullable<z.ZodString>;
2455
- expiresAt: z.ZodNullable<z.ZodString>;
2456
- createdAt: z.ZodString;
2457
- }, z.core.$strip>>;
2458
- available: z.ZodNumber;
2459
- }, z.core.$strip>;
2460
- export type FulfillmentCodePage = z.infer<typeof fulfillmentCodePageSchema>;
2461
- /** `GET /v1/products/{productId}/codes` 쿼리 */
2462
- export declare const fulfillmentCodeListQuerySchema: z.ZodObject<{
2463
- page: z.ZodOptional<z.ZodString>;
2464
- size: z.ZodOptional<z.ZodString>;
2465
- status: z.ZodOptional<z.ZodEnum<{
2466
- REVOKED: "REVOKED";
2467
- AVAILABLE: "AVAILABLE";
2468
- ASSIGNED: "ASSIGNED";
2469
- EXPIRED: "EXPIRED";
2470
- VOID: "VOID";
2471
- }>>;
2472
- variantId: z.ZodOptional<z.ZodString>;
2473
- batchId: z.ZodOptional<z.ZodString>;
2474
- orderItemId: z.ZodOptional<z.ZodString>;
2475
- }, z.core.$strip>;
2476
- /** 셀러 콘솔 코드 열람 응답 — `POST /v1/fulfillment-codes/{codeId}/reveal` */
2477
- export declare const fulfillmentCodeRevealSchema: z.ZodObject<{
2478
- codeId: z.ZodString;
2479
- code: z.ZodString;
2480
- }, z.core.$strip>;
2481
- export type FulfillmentCodeReveal = z.infer<typeof fulfillmentCodeRevealSchema>;
2482
- /** 주문상품에 배정된 코드의 가린 값 — 주문 응답의 `fulfillment.codes` */
2483
- export declare const orderItemCodeSchema: z.ZodObject<{
2484
- codeId: z.ZodString;
2485
- hint: z.ZodString;
2486
- status: z.ZodString;
2487
- revealedAt: z.ZodNullable<z.ZodString>;
2488
- }, z.core.$strip>;
2489
- export type OrderItemCode = z.infer<typeof orderItemCodeSchema>;
2490
- //#endregion
2491
2317
  //#region src/schemas/login.d.ts
2492
2318
  /** 소셜 로그인 공급자 */
2493
2319
  export declare const loginProviderSchema: z.ZodEnum<{
@@ -3152,65 +2978,45 @@ export type ReviewReportResult = z.infer<typeof reviewReportResultSchema>;
3152
2978
  //#endregion
3153
2979
  //#region src/schemas/fulfillment.d.ts
3154
2980
  /**
3155
- * 상품 유형과 제공 방식 (이슈 #48) — 배송이 필요 없는 상품을 팔기 위한 축이다.
2981
+ * 상품 유형 (이슈 #48·#57) — 배송이 필요한 상품과 필요 없는 상품을 가르는 축이다.
3156
2982
  *
3157
- * **상품 유형은 제공 방식 하나로 표현한다.** `fulfillmentType` 한 필드가 배송 필요 여부, 이행 흐름, 재고 의미를 정한다.
2983
+ * **상품 유형은 이행 방식 하나로 표현한다.** `fulfillment.type`이 배송 필요 여부, 이행 흐름, 클레임 규칙을 정한다.
3158
2984
  * 코드 곳곳에서 유형 이름으로 분기하지 않고 이 파일의 판정 함수(`requiresShipping`·`fulfillmentRuleOf`)를 지난다.
3159
- * 유형이 늘어나도 판정표 한 곳만 고치면 배송비 계산·결제 시작·클레임·콘솔 버튼이 같이 따라온다.
3160
2985
  *
3161
2986
  * 주문상품 상태 enum은 바꾸지 않는다. 비실물의 **제공 완료는 `DELIVERED`를 재사용한다** — 새 상태를 더하면 기존 소비자의
3162
- * 상태 분기(배송완료 뒤 구매확정 대기, 반품 가능 판정)가 새 값을 모른다. 표시는 `fulfillmentType`으로 가른다.
2987
+ * 상태 분기(배송완료 뒤 구매확정 대기, 반품 가능 판정)가 새 값을 모른다. 표시는 유형으로 가른다.
3163
2988
  */
3164
2989
  /**
3165
2990
  * 상품 유형.
3166
- * - `SHIPPING` 배송 상품(기본, 이 필드 이전의 상품 전부)
3167
- * - `DOWNLOAD` 파일 다운로드
3168
- * - `CODE` 코드 발급(라이선스 키·기프트 코드)
3169
- * - `SERVICE` 이용권·상품권·서비스(예약 없음)
3170
- * - `PICKUP` 방문 수령 실물
2991
+ * - `SHIPPING` 배송 상품. 택배로 발송하고 송장·배송 추적으로 배송완료가 된다
2992
+ * - `MANUAL` 배송 없는 상품(비실물). 셀러가 제공 처리(`POST /v1/order-items/{orderItemId}/fulfill`)로 제공 완료를 기록한다
2993
+ *
2994
+ * 비실물의 세부 구분(파일 다운로드·코드 발급·이용권·방문 수령)은 2026-09-28에 제품에서 뺐다(이슈 #48 범위 축소).
2995
+ * 이름은 이행 방식이다 — `SHIPPING`이 택배 발송이듯 `MANUAL`은 셀러가 직접 제공한다는 뜻이다.
3171
2996
  */
3172
2997
  export declare const fulfillmentTypeSchema: z.ZodEnum<{
3173
2998
  SHIPPING: "SHIPPING";
3174
- DOWNLOAD: "DOWNLOAD";
3175
- CODE: "CODE";
3176
- SERVICE: "SERVICE";
3177
- PICKUP: "PICKUP";
3178
- }>;
3179
- export type FulfillmentType = z.infer<typeof fulfillmentTypeSchema>;
3180
- /** 제공 방식 — `AUTO`는 결제 확정과 함께 제공하고, `MANUAL`은 셀러가 제공 처리한다 */
3181
- export declare const fulfillmentModeSchema: z.ZodEnum<{
3182
- AUTO: "AUTO";
3183
2999
  MANUAL: "MANUAL";
3184
3000
  }>;
3185
- export type FulfillmentMode = z.infer<typeof fulfillmentModeSchema>;
3001
+ export type FulfillmentType = z.infer<typeof fulfillmentTypeSchema>;
3186
3002
  /**
3187
3003
  * 응답 스키마용 유형 — 서버가 나중에 유형을 더해도 옛 SDK가 응답 파싱에서 깨지지 않게 문자열로 받는다.
3188
3004
  * 요청은 `fulfillmentTypeSchema`(닫힌 enum)로 검증한다.
3189
3005
  */
3190
3006
  export declare const fulfillmentTypeResponseSchema: z.ZodString;
3191
- /** 유형 하나의 규칙 — 배송·제공·재고·클레임이 이 표를 읽는다 */
3007
+ /** 유형 하나의 규칙 — 배송·클레임이 이 표를 읽는다 */
3192
3008
  export interface FulfillmentRule {
3193
3009
  /** 택배 배송이 필요한가 — 배송비·배송지·발송 흐름의 대상인가 */
3194
3010
  requiresShipping: boolean;
3195
- /** 허용하는 제공 방식. 배송 상품은 제공 방식이 없다(빈 배열) */
3196
- modes: readonly FulfillmentMode[];
3197
- /** 제공 방식을 정하지 않았을 때의 기본값. 배송 상품은 null */
3198
- defaultMode: FulfillmentMode | null;
3199
- /** 반품에 수거가 필요한가 — 실물만 수거한다(방문 수령 포함) */
3011
+ /** 반품에 수거가 필요한가 — 실물만 수거한다 */
3200
3012
  requiresCollection: boolean;
3201
3013
  /** 교환을 받는가 — 실물만 받는다 */
3202
3014
  exchangeSupported: boolean;
3203
3015
  }
3204
- /**
3205
- * 유형별 규칙표 — **유일한 원천이다.**
3206
- *
3207
- * `PICKUP`은 실물이라 반품 수거와 교환을 받지만 택배 배송은 없다. `DOWNLOAD`는 결제 즉시 권한을 발급하므로 `AUTO`만,
3208
- * `PICKUP`은 셀러가 수령 완료를 누르므로 `MANUAL`만 둔다.
3209
- */
3016
+ /** 유형별 규칙표 — **유일한 원천이다.** */
3210
3017
  export declare const FULFILLMENT_RULES: Readonly<Record<FulfillmentType, FulfillmentRule>>;
3211
3018
  /**
3212
- * 저장된 값 → 유형. null·모르는 값은 `SHIPPING`이다 — 이 필드 이전의 주문상품(`order_items.fulfillment_type` null)과
3213
- * 상품은 모두 배송 상품이었다.
3019
+ * 저장된 값 → 유형. null·모르는 값은 `SHIPPING`이다 — 이 필드 이전의 상품·주문상품은 모두 배송 상품이었다.
3214
3020
  */
3215
3021
  export declare function fulfillmentTypeOf(value: string | null | undefined): FulfillmentType;
3216
3022
  /** 유형의 규칙 — 모르는 값은 배송 상품 규칙이다 */
@@ -3219,11 +3025,6 @@ export declare function fulfillmentRuleOf(type: string | null | undefined): Fulf
3219
3025
  export declare function requiresShipping(type: string | null | undefined): boolean;
3220
3026
  /** 반품에 수거가 필요한가 — 비실물 반품은 수거 등록·수거 완료 없이 승인한다 */
3221
3027
  export declare function requiresCollection(type: string | null | undefined): boolean;
3222
- /**
3223
- * 유효 제공 방식 — 요청 값이 유형에 허용되면 그 값, 생략이면 유형 기본값이다. 배송 상품은 null이다.
3224
- * 허용되지 않는 값은 `null`을 돌려주지 않고 호출부가 거부하도록 `undefined`를 돌려준다.
3225
- */
3226
- export declare function resolveFulfillmentMode(type: FulfillmentType, mode: FulfillmentMode | null | undefined): FulfillmentMode | null | undefined;
3227
3028
  /**
3228
3029
  * 배송이 없는 주문상품의 배송 묶음 키 (`order_items.delivery_bundle_key`).
3229
3030
  *
@@ -3239,13 +3040,8 @@ export declare const deliveryTypeSchema: z.ZodEnum<{
3239
3040
  CONDITIONAL_FREE: "CONDITIONAL_FREE";
3240
3041
  }>;
3241
3042
  export type DeliveryType = z.infer<typeof deliveryTypeSchema>;
3242
- /** 파일 다운로드 기본값 — 횟수 5회·기간 30일(#48 결정 8) */
3243
- export declare const DOWNLOAD_DEFAULTS: {
3244
- readonly limit: 5;
3245
- readonly days: 30;
3246
- };
3247
3043
  /**
3248
- * 상품 이행 — 등록(POST). 유형 키를 생략하면 그 유형의 기본값이다(`{ "type": "DOWNLOAD" }`만으로 등록할 수 있다).
3044
+ * 상품 이행 — 등록(POST). 배송 상품의 `shipping`을 생략하면 기본값(유료 배송·스토어 기본 배송비·기본 출고지·반품지)이다.
3249
3045
  */
3250
3046
  export declare const productFulfillmentCreateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3251
3047
  type: z.ZodLiteral<"SHIPPING">;
@@ -3261,35 +3057,7 @@ export declare const productFulfillmentCreateSchema: z.ZodDiscriminatedUnion<[z.
3261
3057
  returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3262
3058
  }, z.core.$strict>>;
3263
3059
  }, z.core.$strict>, z.ZodObject<{
3264
- type: z.ZodLiteral<"DOWNLOAD">;
3265
- download: z.ZodDefault<z.ZodObject<{
3266
- limit: z.ZodDefault<z.ZodNumber>;
3267
- days: z.ZodDefault<z.ZodNumber>;
3268
- stockTracking: z.ZodDefault<z.ZodBoolean>;
3269
- withdrawalRestricted: z.ZodDefault<z.ZodBoolean>;
3270
- }, z.core.$strict>>;
3271
- }, z.core.$strict>, z.ZodObject<{
3272
- type: z.ZodLiteral<"CODE">;
3273
- code: z.ZodDefault<z.ZodObject<{
3274
- mode: z.ZodDefault<z.ZodEnum<{
3275
- AUTO: "AUTO";
3276
- MANUAL: "MANUAL";
3277
- }>>;
3278
- withdrawalRestricted: z.ZodDefault<z.ZodBoolean>;
3279
- }, z.core.$strict>>;
3280
- }, z.core.$strict>, z.ZodObject<{
3281
- type: z.ZodLiteral<"SERVICE">;
3282
- service: z.ZodDefault<z.ZodObject<{
3283
- mode: z.ZodDefault<z.ZodEnum<{
3284
- AUTO: "AUTO";
3285
- MANUAL: "MANUAL";
3286
- }>>;
3287
- }, z.core.$strict>>;
3288
- }, z.core.$strict>, z.ZodObject<{
3289
- type: z.ZodLiteral<"PICKUP">;
3290
- pickup: z.ZodDefault<z.ZodObject<{
3291
- addressId: z.ZodOptional<z.ZodString>;
3292
- }, z.core.$strict>>;
3060
+ type: z.ZodLiteral<"MANUAL">;
3293
3061
  }, z.core.$strict>], "type">;
3294
3062
  export type ProductFulfillmentCreate = z.infer<typeof productFulfillmentCreateSchema>;
3295
3063
  /** 등록 요청의 입력 모양 — 기본값이 채워지기 전(생략 가능한 필드가 optional) */
@@ -3312,35 +3080,7 @@ export declare const productFulfillmentUpdateSchema: z.ZodDiscriminatedUnion<[z.
3312
3080
  returnAddressId: z.ZodNullable<z.ZodString>;
3313
3081
  }, z.core.$strict>;
3314
3082
  }, z.core.$strict>, z.ZodObject<{
3315
- type: z.ZodLiteral<"DOWNLOAD">;
3316
- download: z.ZodObject<{
3317
- limit: z.ZodNumber;
3318
- days: z.ZodNumber;
3319
- stockTracking: z.ZodBoolean;
3320
- withdrawalRestricted: z.ZodBoolean;
3321
- }, z.core.$strict>;
3322
- }, z.core.$strict>, z.ZodObject<{
3323
- type: z.ZodLiteral<"CODE">;
3324
- code: z.ZodObject<{
3325
- mode: z.ZodEnum<{
3326
- AUTO: "AUTO";
3327
- MANUAL: "MANUAL";
3328
- }>;
3329
- withdrawalRestricted: z.ZodBoolean;
3330
- }, z.core.$strict>;
3331
- }, z.core.$strict>, z.ZodObject<{
3332
- type: z.ZodLiteral<"SERVICE">;
3333
- service: z.ZodObject<{
3334
- mode: z.ZodEnum<{
3335
- AUTO: "AUTO";
3336
- MANUAL: "MANUAL";
3337
- }>;
3338
- }, z.core.$strict>;
3339
- }, z.core.$strict>, z.ZodObject<{
3340
- type: z.ZodLiteral<"PICKUP">;
3341
- pickup: z.ZodObject<{
3342
- addressId: z.ZodString;
3343
- }, z.core.$strict>;
3083
+ type: z.ZodLiteral<"MANUAL">;
3344
3084
  }, z.core.$strict>], "type">;
3345
3085
  export type ProductFulfillmentUpdate = z.infer<typeof productFulfillmentUpdateSchema>;
3346
3086
  /**
@@ -3361,35 +3101,7 @@ export declare const productFulfillmentSchema: z.ZodDiscriminatedUnion<[z.ZodObj
3361
3101
  returnAddressId: z.ZodNullable<z.ZodString>;
3362
3102
  }, z.core.$strip>;
3363
3103
  }, z.core.$strip>, z.ZodObject<{
3364
- type: z.ZodLiteral<"DOWNLOAD">;
3365
- download: z.ZodObject<{
3366
- limit: z.ZodNumber;
3367
- days: z.ZodNumber;
3368
- stockTracking: z.ZodBoolean;
3369
- withdrawalRestricted: z.ZodBoolean;
3370
- }, z.core.$strip>;
3371
- }, z.core.$strip>, z.ZodObject<{
3372
- type: z.ZodLiteral<"CODE">;
3373
- code: z.ZodObject<{
3374
- mode: z.ZodEnum<{
3375
- AUTO: "AUTO";
3376
- MANUAL: "MANUAL";
3377
- }>;
3378
- withdrawalRestricted: z.ZodBoolean;
3379
- }, z.core.$strip>;
3380
- }, z.core.$strip>, z.ZodObject<{
3381
- type: z.ZodLiteral<"SERVICE">;
3382
- service: z.ZodObject<{
3383
- mode: z.ZodEnum<{
3384
- AUTO: "AUTO";
3385
- MANUAL: "MANUAL";
3386
- }>;
3387
- }, z.core.$strip>;
3388
- }, z.core.$strip>, z.ZodObject<{
3389
- type: z.ZodLiteral<"PICKUP">;
3390
- pickup: z.ZodObject<{
3391
- addressId: z.ZodNullable<z.ZodString>;
3392
- }, z.core.$strip>;
3104
+ type: z.ZodLiteral<"MANUAL">;
3393
3105
  }, z.core.$strip>], "type">;
3394
3106
  export type ProductFulfillment = z.infer<typeof productFulfillmentSchema>;
3395
3107
  /** 유형 이름 → 그 유형의 저장된 이행 */
@@ -3428,35 +3140,7 @@ export declare const productFulfillmentResponseSchema: z.ZodUnion<readonly [z.Zo
3428
3140
  returnAddressId: z.ZodNullable<z.ZodString>;
3429
3141
  }, z.core.$strip>;
3430
3142
  }, z.core.$strip>, z.ZodObject<{
3431
- type: z.ZodLiteral<"DOWNLOAD">;
3432
- download: z.ZodObject<{
3433
- limit: z.ZodNumber;
3434
- days: z.ZodNumber;
3435
- stockTracking: z.ZodBoolean;
3436
- withdrawalRestricted: z.ZodBoolean;
3437
- }, z.core.$strip>;
3438
- }, z.core.$strip>, z.ZodObject<{
3439
- type: z.ZodLiteral<"CODE">;
3440
- code: z.ZodObject<{
3441
- mode: z.ZodEnum<{
3442
- AUTO: "AUTO";
3443
- MANUAL: "MANUAL";
3444
- }>;
3445
- withdrawalRestricted: z.ZodBoolean;
3446
- }, z.core.$strip>;
3447
- }, z.core.$strip>, z.ZodObject<{
3448
- type: z.ZodLiteral<"SERVICE">;
3449
- service: z.ZodObject<{
3450
- mode: z.ZodEnum<{
3451
- AUTO: "AUTO";
3452
- MANUAL: "MANUAL";
3453
- }>;
3454
- }, z.core.$strip>;
3455
- }, z.core.$strip>, z.ZodObject<{
3456
- type: z.ZodLiteral<"PICKUP">;
3457
- pickup: z.ZodObject<{
3458
- addressId: z.ZodNullable<z.ZodString>;
3459
- }, z.core.$strip>;
3143
+ type: z.ZodLiteral<"MANUAL">;
3460
3144
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3461
3145
  type: z.ZodString;
3462
3146
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -3464,21 +3148,9 @@ export declare const productFulfillmentResponseSchema: z.ZodUnion<readonly [z.Zo
3464
3148
  type: string;
3465
3149
  }>>]>;
3466
3150
  export type ProductFulfillmentView = z.infer<typeof productFulfillmentResponseSchema>;
3467
- /** 제공 방식 — CODE·SERVICE는 저장된 값, DOWNLOAD는 AUTO, PICKUP은 MANUAL, 배송 상품은 null */
3468
- export declare function fulfillmentModeOf(fulfillment: ProductFulfillment): FulfillmentMode | null;
3469
- /** 재고를 세는가 — 파일 다운로드만 끌 수 있다 */
3470
- export declare function stockTrackingOf(fulfillment: ProductFulfillment): boolean;
3471
- /** 청약철회 제한 대상인가 — 파일 다운로드·코드 발급만 켤 수 있다(전자상거래법 제17조 제2항 제5호, 디지털 콘텐츠) */
3472
- export declare function withdrawalRestrictedOf(fulfillment: ProductFulfillment): boolean;
3473
- /** 코드 풀을 쓰는가 — 코드 발급 + 자동 제공. 재고가 판매 가능 코드 수다 */
3474
- export declare function usesCodePool(fulfillment: ProductFulfillment): boolean;
3475
- /** 결제 확정과 함께 제공까지 끝내는가 — 비실물 + 자동 제공 */
3476
- export declare function autoFulfillableOf(fulfillment: ProductFulfillment): boolean;
3477
3151
  /**
3478
3152
  * 주문상품의 주문 시점 이행 — 결제 확정이 주문서 줄에서 굳힌다. 상품의 현재 값이 아니다. 서버는 주문상품 컬럼
3479
- * (`fulfillment_type`·`delivery_bundle_key`·`stock_tracked`·`withdrawal_restricted`)과 jsonb(`fulfillment_snapshot`)를 합쳐 이 모양을 만든다.
3480
- *
3481
- * `mode`는 **주문 시점 상품의 방식**이다. 실제 제공 방식은 제공 기록(`fulfillment.mode`)에 있고 다를 수 있다(자동 제공 상품의 수동 복구).
3153
+ * (`fulfillment_type`·`delivery_bundle_key`)과 jsonb(`fulfillment_snapshot`)를 합쳐 이 모양을 만든다.
3482
3154
  */
3483
3155
  export declare const orderItemFulfillmentSnapshotSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3484
3156
  type: z.ZodLiteral<"SHIPPING">;
@@ -3487,29 +3159,7 @@ export declare const orderItemFulfillmentSnapshotSchema: z.ZodDiscriminatedUnion
3487
3159
  returnAddressId: z.ZodNullable<z.ZodString>;
3488
3160
  }, z.core.$strip>;
3489
3161
  }, z.core.$strip>, z.ZodObject<{
3490
- type: z.ZodLiteral<"DOWNLOAD">;
3491
- download: z.ZodObject<{
3492
- limit: z.ZodNumber;
3493
- days: z.ZodNumber;
3494
- stockTracked: z.ZodBoolean;
3495
- withdrawalRestricted: z.ZodBoolean;
3496
- }, z.core.$strip>;
3497
- }, z.core.$strip>, z.ZodObject<{
3498
- type: z.ZodLiteral<"CODE">;
3499
- code: z.ZodObject<{
3500
- mode: z.ZodString;
3501
- withdrawalRestricted: z.ZodBoolean;
3502
- }, z.core.$strip>;
3503
- }, z.core.$strip>, z.ZodObject<{
3504
- type: z.ZodLiteral<"SERVICE">;
3505
- service: z.ZodObject<{
3506
- mode: z.ZodString;
3507
- }, z.core.$strip>;
3508
- }, z.core.$strip>, z.ZodObject<{
3509
- type: z.ZodLiteral<"PICKUP">;
3510
- pickup: z.ZodObject<{
3511
- addressId: z.ZodNullable<z.ZodString>;
3512
- }, z.core.$strip>;
3162
+ type: z.ZodLiteral<"MANUAL">;
3513
3163
  }, z.core.$strip>], "type">;
3514
3164
  export type OrderItemFulfillmentSnapshot = z.infer<typeof orderItemFulfillmentSnapshotSchema>;
3515
3165
  export declare const orderItemFulfillmentSnapshotResponseSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -3519,29 +3169,7 @@ export declare const orderItemFulfillmentSnapshotResponseSchema: z.ZodUnion<read
3519
3169
  returnAddressId: z.ZodNullable<z.ZodString>;
3520
3170
  }, z.core.$strip>;
3521
3171
  }, z.core.$strip>, z.ZodObject<{
3522
- type: z.ZodLiteral<"DOWNLOAD">;
3523
- download: z.ZodObject<{
3524
- limit: z.ZodNumber;
3525
- days: z.ZodNumber;
3526
- stockTracked: z.ZodBoolean;
3527
- withdrawalRestricted: z.ZodBoolean;
3528
- }, z.core.$strip>;
3529
- }, z.core.$strip>, z.ZodObject<{
3530
- type: z.ZodLiteral<"CODE">;
3531
- code: z.ZodObject<{
3532
- mode: z.ZodString;
3533
- withdrawalRestricted: z.ZodBoolean;
3534
- }, z.core.$strip>;
3535
- }, z.core.$strip>, z.ZodObject<{
3536
- type: z.ZodLiteral<"SERVICE">;
3537
- service: z.ZodObject<{
3538
- mode: z.ZodString;
3539
- }, z.core.$strip>;
3540
- }, z.core.$strip>, z.ZodObject<{
3541
- type: z.ZodLiteral<"PICKUP">;
3542
- pickup: z.ZodObject<{
3543
- addressId: z.ZodNullable<z.ZodString>;
3544
- }, z.core.$strip>;
3172
+ type: z.ZodLiteral<"MANUAL">;
3545
3173
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3546
3174
  type: z.ZodString;
3547
3175
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -3580,40 +3208,13 @@ export declare const shippingAddressSchema: z.ZodObject<{
3580
3208
  entranceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3581
3209
  }, z.core.$strip>;
3582
3210
  export type ShippingAddress = z.infer<typeof shippingAddressSchema>;
3583
- /** 비실물 주문상품의 제공 정보 (이슈 #48) */
3211
+ /** 배송 없는 주문상품(`MANUAL`)의 제공 기록 (이슈 #48) — 셀러의 제공 처리가 만든다 */
3584
3212
  export declare const orderItemFulfillmentSchema: z.ZodObject<{
3585
3213
  status: z.ZodString;
3586
- mode: z.ZodNullable<z.ZodString>;
3587
3214
  fulfilledAt: z.ZodString;
3588
3215
  note: z.ZodNullable<z.ZodString>;
3589
- codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3590
- codeId: z.ZodString;
3591
- hint: z.ZodString;
3592
- status: z.ZodString;
3593
- revealedAt: z.ZodNullable<z.ZodString>;
3594
- }, z.core.$strip>>>>;
3595
- download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3596
- count: z.ZodNumber;
3597
- limit: z.ZodNumber;
3598
- expiresAt: z.ZodNullable<z.ZodString>;
3599
- firstDownloadedAt: z.ZodNullable<z.ZodString>;
3600
- files: z.ZodArray<z.ZodObject<{
3601
- assetId: z.ZodString;
3602
- fileName: z.ZodString;
3603
- sizeBytes: z.ZodNullable<z.ZodNumber>;
3604
- }, z.core.$strip>>;
3605
- }, z.core.$strip>>>>;
3606
- mail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3607
- status: z.ZodString;
3608
- sentAt: z.ZodNullable<z.ZodString>;
3609
- errorCode: z.ZodNullable<z.ZodString>;
3610
- }, z.core.$strip>>>>;
3216
+ mode: z.ZodOptional<z.ZodString>;
3611
3217
  }, z.core.$strip>;
3612
- /** 제공 안내 메일 재발송 결과 */
3613
- export declare const fulfillmentMailResendSchema: z.ZodObject<{
3614
- mailStatus: z.ZodString;
3615
- }, z.core.$strip>;
3616
- export type FulfillmentMailResend = z.infer<typeof fulfillmentMailResendSchema>;
3617
3218
  export type OrderItemFulfillment = z.infer<typeof orderItemFulfillmentSchema>;
3618
3219
  export declare const orderItemSchema: z.ZodObject<{
3619
3220
  orderItemId: z.ZodString;
@@ -3645,29 +3246,7 @@ export declare const orderItemSchema: z.ZodObject<{
3645
3246
  returnAddressId: z.ZodNullable<z.ZodString>;
3646
3247
  }, z.core.$strip>;
3647
3248
  }, z.core.$strip>, z.ZodObject<{
3648
- type: z.ZodLiteral<"DOWNLOAD">;
3649
- download: z.ZodObject<{
3650
- limit: z.ZodNumber;
3651
- days: z.ZodNumber;
3652
- stockTracked: z.ZodBoolean;
3653
- withdrawalRestricted: z.ZodBoolean;
3654
- }, z.core.$strip>;
3655
- }, z.core.$strip>, z.ZodObject<{
3656
- type: z.ZodLiteral<"CODE">;
3657
- code: z.ZodObject<{
3658
- mode: z.ZodString;
3659
- withdrawalRestricted: z.ZodBoolean;
3660
- }, z.core.$strip>;
3661
- }, z.core.$strip>, z.ZodObject<{
3662
- type: z.ZodLiteral<"SERVICE">;
3663
- service: z.ZodObject<{
3664
- mode: z.ZodString;
3665
- }, z.core.$strip>;
3666
- }, z.core.$strip>, z.ZodObject<{
3667
- type: z.ZodLiteral<"PICKUP">;
3668
- pickup: z.ZodObject<{
3669
- addressId: z.ZodNullable<z.ZodString>;
3670
- }, z.core.$strip>;
3249
+ type: z.ZodLiteral<"MANUAL">;
3671
3250
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3672
3251
  type: z.ZodString;
3673
3252
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -3687,31 +3266,9 @@ export declare const orderItemSchema: z.ZodObject<{
3687
3266
  }, z.core.$strip>>;
3688
3267
  fulfillment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3689
3268
  status: z.ZodString;
3690
- mode: z.ZodNullable<z.ZodString>;
3691
3269
  fulfilledAt: z.ZodString;
3692
3270
  note: z.ZodNullable<z.ZodString>;
3693
- codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3694
- codeId: z.ZodString;
3695
- hint: z.ZodString;
3696
- status: z.ZodString;
3697
- revealedAt: z.ZodNullable<z.ZodString>;
3698
- }, z.core.$strip>>>>;
3699
- download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3700
- count: z.ZodNumber;
3701
- limit: z.ZodNumber;
3702
- expiresAt: z.ZodNullable<z.ZodString>;
3703
- firstDownloadedAt: z.ZodNullable<z.ZodString>;
3704
- files: z.ZodArray<z.ZodObject<{
3705
- assetId: z.ZodString;
3706
- fileName: z.ZodString;
3707
- sizeBytes: z.ZodNullable<z.ZodNumber>;
3708
- }, z.core.$strip>>;
3709
- }, z.core.$strip>>>>;
3710
- mail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3711
- status: z.ZodString;
3712
- sentAt: z.ZodNullable<z.ZodString>;
3713
- errorCode: z.ZodNullable<z.ZodString>;
3714
- }, z.core.$strip>>>>;
3271
+ mode: z.ZodOptional<z.ZodString>;
3715
3272
  }, z.core.$strip>>>>;
3716
3273
  autoDecisionDate: z.ZodNullable<z.ZodString>;
3717
3274
  sellerMemo: z.ZodNullable<z.ZodString>;
@@ -3807,7 +3364,6 @@ export declare const orderSchema: z.ZodObject<{
3807
3364
  updatedAt: z.ZodString;
3808
3365
  }, z.core.$strip>>>>;
3809
3366
  }, z.core.$strip>;
3810
- withdrawalAgreedAt: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
3811
3367
  testPayment: z.ZodBoolean;
3812
3368
  items: z.ZodArray<z.ZodObject<{
3813
3369
  orderItemId: z.ZodString;
@@ -3839,29 +3395,7 @@ export declare const orderSchema: z.ZodObject<{
3839
3395
  returnAddressId: z.ZodNullable<z.ZodString>;
3840
3396
  }, z.core.$strip>;
3841
3397
  }, z.core.$strip>, z.ZodObject<{
3842
- type: z.ZodLiteral<"DOWNLOAD">;
3843
- download: z.ZodObject<{
3844
- limit: z.ZodNumber;
3845
- days: z.ZodNumber;
3846
- stockTracked: z.ZodBoolean;
3847
- withdrawalRestricted: z.ZodBoolean;
3848
- }, z.core.$strip>;
3849
- }, z.core.$strip>, z.ZodObject<{
3850
- type: z.ZodLiteral<"CODE">;
3851
- code: z.ZodObject<{
3852
- mode: z.ZodString;
3853
- withdrawalRestricted: z.ZodBoolean;
3854
- }, z.core.$strip>;
3855
- }, z.core.$strip>, z.ZodObject<{
3856
- type: z.ZodLiteral<"SERVICE">;
3857
- service: z.ZodObject<{
3858
- mode: z.ZodString;
3859
- }, z.core.$strip>;
3860
- }, z.core.$strip>, z.ZodObject<{
3861
- type: z.ZodLiteral<"PICKUP">;
3862
- pickup: z.ZodObject<{
3863
- addressId: z.ZodNullable<z.ZodString>;
3864
- }, z.core.$strip>;
3398
+ type: z.ZodLiteral<"MANUAL">;
3865
3399
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
3866
3400
  type: z.ZodString;
3867
3401
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -3881,31 +3415,9 @@ export declare const orderSchema: z.ZodObject<{
3881
3415
  }, z.core.$strip>>;
3882
3416
  fulfillment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3883
3417
  status: z.ZodString;
3884
- mode: z.ZodNullable<z.ZodString>;
3885
3418
  fulfilledAt: z.ZodString;
3886
3419
  note: z.ZodNullable<z.ZodString>;
3887
- codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
3888
- codeId: z.ZodString;
3889
- hint: z.ZodString;
3890
- status: z.ZodString;
3891
- revealedAt: z.ZodNullable<z.ZodString>;
3892
- }, z.core.$strip>>>>;
3893
- download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3894
- count: z.ZodNumber;
3895
- limit: z.ZodNumber;
3896
- expiresAt: z.ZodNullable<z.ZodString>;
3897
- firstDownloadedAt: z.ZodNullable<z.ZodString>;
3898
- files: z.ZodArray<z.ZodObject<{
3899
- assetId: z.ZodString;
3900
- fileName: z.ZodString;
3901
- sizeBytes: z.ZodNullable<z.ZodNumber>;
3902
- }, z.core.$strip>>;
3903
- }, z.core.$strip>>>>;
3904
- mail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
3905
- status: z.ZodString;
3906
- sentAt: z.ZodNullable<z.ZodString>;
3907
- errorCode: z.ZodNullable<z.ZodString>;
3908
- }, z.core.$strip>>>>;
3420
+ mode: z.ZodOptional<z.ZodString>;
3909
3421
  }, z.core.$strip>>>>;
3910
3422
  autoDecisionDate: z.ZodNullable<z.ZodString>;
3911
3423
  sellerMemo: z.ZodNullable<z.ZodString>;
@@ -3989,29 +3501,7 @@ export declare const orderItemPageSchema: z.ZodObject<{
3989
3501
  returnAddressId: z.ZodNullable<z.ZodString>;
3990
3502
  }, z.core.$strip>;
3991
3503
  }, z.core.$strip>, z.ZodObject<{
3992
- type: z.ZodLiteral<"DOWNLOAD">;
3993
- download: z.ZodObject<{
3994
- limit: z.ZodNumber;
3995
- days: z.ZodNumber;
3996
- stockTracked: z.ZodBoolean;
3997
- withdrawalRestricted: z.ZodBoolean;
3998
- }, z.core.$strip>;
3999
- }, z.core.$strip>, z.ZodObject<{
4000
- type: z.ZodLiteral<"CODE">;
4001
- code: z.ZodObject<{
4002
- mode: z.ZodString;
4003
- withdrawalRestricted: z.ZodBoolean;
4004
- }, z.core.$strip>;
4005
- }, z.core.$strip>, z.ZodObject<{
4006
- type: z.ZodLiteral<"SERVICE">;
4007
- service: z.ZodObject<{
4008
- mode: z.ZodString;
4009
- }, z.core.$strip>;
4010
- }, z.core.$strip>, z.ZodObject<{
4011
- type: z.ZodLiteral<"PICKUP">;
4012
- pickup: z.ZodObject<{
4013
- addressId: z.ZodNullable<z.ZodString>;
4014
- }, z.core.$strip>;
3504
+ type: z.ZodLiteral<"MANUAL">;
4015
3505
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
4016
3506
  type: z.ZodString;
4017
3507
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -4031,31 +3521,9 @@ export declare const orderItemPageSchema: z.ZodObject<{
4031
3521
  }, z.core.$strip>>;
4032
3522
  fulfillment: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
4033
3523
  status: z.ZodString;
4034
- mode: z.ZodNullable<z.ZodString>;
4035
3524
  fulfilledAt: z.ZodString;
4036
3525
  note: z.ZodNullable<z.ZodString>;
4037
- codes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
4038
- codeId: z.ZodString;
4039
- hint: z.ZodString;
4040
- status: z.ZodString;
4041
- revealedAt: z.ZodNullable<z.ZodString>;
4042
- }, z.core.$strip>>>>;
4043
- download: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
4044
- count: z.ZodNumber;
4045
- limit: z.ZodNumber;
4046
- expiresAt: z.ZodNullable<z.ZodString>;
4047
- firstDownloadedAt: z.ZodNullable<z.ZodString>;
4048
- files: z.ZodArray<z.ZodObject<{
4049
- assetId: z.ZodString;
4050
- fileName: z.ZodString;
4051
- sizeBytes: z.ZodNullable<z.ZodNumber>;
4052
- }, z.core.$strip>>;
4053
- }, z.core.$strip>>>>;
4054
- mail: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
4055
- status: z.ZodString;
4056
- sentAt: z.ZodNullable<z.ZodString>;
4057
- errorCode: z.ZodNullable<z.ZodString>;
4058
- }, z.core.$strip>>>>;
3526
+ mode: z.ZodOptional<z.ZodString>;
4059
3527
  }, z.core.$strip>>>>;
4060
3528
  autoDecisionDate: z.ZodNullable<z.ZodString>;
4061
3529
  sellerMemo: z.ZodNullable<z.ZodString>;
@@ -4262,12 +3730,11 @@ export declare const cancelBySellerRequestSchema: z.ZodObject<{
4262
3730
  }, z.core.$strip>;
4263
3731
  export type CancelBySellerRequest = z.infer<typeof cancelBySellerRequestSchema>;
4264
3732
  /**
4265
- * 제공 처리 요청 (이슈 #48) — `POST /v1/order-items/{orderItemId}/fulfill`. 수동 제공 비실물 주문상품(이용권·방문 수령 등)을
3733
+ * 제공 처리 요청 (이슈 #48) — `POST /v1/order-items/{orderItemId}/fulfill`. 배송 없는 주문상품(`MANUAL`)을
4266
3734
  * 제공 완료(`DELIVERED`)로 바꾼다.
4267
3735
  */
4268
3736
  export declare const fulfillRequestSchema: z.ZodObject<{
4269
3737
  note: z.ZodOptional<z.ZodString>;
4270
- codes: z.ZodOptional<z.ZodArray<z.ZodString>>;
4271
3738
  }, z.core.$strip>;
4272
3739
  export type FulfillRequest = z.infer<typeof fulfillRequestSchema>;
4273
3740
  /** 제공 처리 일괄 요청 — `POST /v1/order-items/fulfill` */
@@ -5459,35 +4926,7 @@ export declare const productSchema: z.ZodObject<{
5459
4926
  returnAddressId: z.ZodNullable<z.ZodString>;
5460
4927
  }, z.core.$strip>;
5461
4928
  }, z.core.$strip>, z.ZodObject<{
5462
- type: z.ZodLiteral<"DOWNLOAD">;
5463
- download: z.ZodObject<{
5464
- limit: z.ZodNumber;
5465
- days: z.ZodNumber;
5466
- stockTracking: z.ZodBoolean;
5467
- withdrawalRestricted: z.ZodBoolean;
5468
- }, z.core.$strip>;
5469
- }, z.core.$strip>, z.ZodObject<{
5470
- type: z.ZodLiteral<"CODE">;
5471
- code: z.ZodObject<{
5472
- mode: z.ZodEnum<{
5473
- AUTO: "AUTO";
5474
- MANUAL: "MANUAL";
5475
- }>;
5476
- withdrawalRestricted: z.ZodBoolean;
5477
- }, z.core.$strip>;
5478
- }, z.core.$strip>, z.ZodObject<{
5479
- type: z.ZodLiteral<"SERVICE">;
5480
- service: z.ZodObject<{
5481
- mode: z.ZodEnum<{
5482
- AUTO: "AUTO";
5483
- MANUAL: "MANUAL";
5484
- }>;
5485
- }, z.core.$strip>;
5486
- }, z.core.$strip>, z.ZodObject<{
5487
- type: z.ZodLiteral<"PICKUP">;
5488
- pickup: z.ZodObject<{
5489
- addressId: z.ZodNullable<z.ZodString>;
5490
- }, z.core.$strip>;
4929
+ type: z.ZodLiteral<"MANUAL">;
5491
4930
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
5492
4931
  type: z.ZodString;
5493
4932
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -5662,35 +5101,7 @@ export declare const productCreateRequestSchema: z.ZodObject<{
5662
5101
  returnAddressId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5663
5102
  }, z.core.$strict>>;
5664
5103
  }, z.core.$strict>, z.ZodObject<{
5665
- type: z.ZodLiteral<"DOWNLOAD">;
5666
- download: z.ZodDefault<z.ZodObject<{
5667
- limit: z.ZodDefault<z.ZodNumber>;
5668
- days: z.ZodDefault<z.ZodNumber>;
5669
- stockTracking: z.ZodDefault<z.ZodBoolean>;
5670
- withdrawalRestricted: z.ZodDefault<z.ZodBoolean>;
5671
- }, z.core.$strict>>;
5672
- }, z.core.$strict>, z.ZodObject<{
5673
- type: z.ZodLiteral<"CODE">;
5674
- code: z.ZodDefault<z.ZodObject<{
5675
- mode: z.ZodDefault<z.ZodEnum<{
5676
- AUTO: "AUTO";
5677
- MANUAL: "MANUAL";
5678
- }>>;
5679
- withdrawalRestricted: z.ZodDefault<z.ZodBoolean>;
5680
- }, z.core.$strict>>;
5681
- }, z.core.$strict>, z.ZodObject<{
5682
- type: z.ZodLiteral<"SERVICE">;
5683
- service: z.ZodDefault<z.ZodObject<{
5684
- mode: z.ZodDefault<z.ZodEnum<{
5685
- AUTO: "AUTO";
5686
- MANUAL: "MANUAL";
5687
- }>>;
5688
- }, z.core.$strict>>;
5689
- }, z.core.$strict>, z.ZodObject<{
5690
- type: z.ZodLiteral<"PICKUP">;
5691
- pickup: z.ZodDefault<z.ZodObject<{
5692
- addressId: z.ZodOptional<z.ZodString>;
5693
- }, z.core.$strict>>;
5104
+ type: z.ZodLiteral<"MANUAL">;
5694
5105
  }, z.core.$strict>], "type">>;
5695
5106
  optionGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
5696
5107
  groupId: z.ZodOptional<z.ZodString>;
@@ -5749,35 +5160,7 @@ export declare const productReplaceRequestSchema: z.ZodObject<{
5749
5160
  returnAddressId: z.ZodNullable<z.ZodString>;
5750
5161
  }, z.core.$strict>;
5751
5162
  }, z.core.$strict>, z.ZodObject<{
5752
- type: z.ZodLiteral<"DOWNLOAD">;
5753
- download: z.ZodObject<{
5754
- limit: z.ZodNumber;
5755
- days: z.ZodNumber;
5756
- stockTracking: z.ZodBoolean;
5757
- withdrawalRestricted: z.ZodBoolean;
5758
- }, z.core.$strict>;
5759
- }, z.core.$strict>, z.ZodObject<{
5760
- type: z.ZodLiteral<"CODE">;
5761
- code: z.ZodObject<{
5762
- mode: z.ZodEnum<{
5763
- AUTO: "AUTO";
5764
- MANUAL: "MANUAL";
5765
- }>;
5766
- withdrawalRestricted: z.ZodBoolean;
5767
- }, z.core.$strict>;
5768
- }, z.core.$strict>, z.ZodObject<{
5769
- type: z.ZodLiteral<"SERVICE">;
5770
- service: z.ZodObject<{
5771
- mode: z.ZodEnum<{
5772
- AUTO: "AUTO";
5773
- MANUAL: "MANUAL";
5774
- }>;
5775
- }, z.core.$strict>;
5776
- }, z.core.$strict>, z.ZodObject<{
5777
- type: z.ZodLiteral<"PICKUP">;
5778
- pickup: z.ZodObject<{
5779
- addressId: z.ZodString;
5780
- }, z.core.$strict>;
5163
+ type: z.ZodLiteral<"MANUAL">;
5781
5164
  }, z.core.$strict>], "type">>;
5782
5165
  optionGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
5783
5166
  groupId: z.ZodOptional<z.ZodString>;
@@ -5843,35 +5226,7 @@ export declare const productPatchRequestSchema: z.ZodObject<{
5843
5226
  returnAddressId: z.ZodNullable<z.ZodString>;
5844
5227
  }, z.core.$strict>;
5845
5228
  }, z.core.$strict>, z.ZodObject<{
5846
- type: z.ZodLiteral<"DOWNLOAD">;
5847
- download: z.ZodObject<{
5848
- limit: z.ZodNumber;
5849
- days: z.ZodNumber;
5850
- stockTracking: z.ZodBoolean;
5851
- withdrawalRestricted: z.ZodBoolean;
5852
- }, z.core.$strict>;
5853
- }, z.core.$strict>, z.ZodObject<{
5854
- type: z.ZodLiteral<"CODE">;
5855
- code: z.ZodObject<{
5856
- mode: z.ZodEnum<{
5857
- AUTO: "AUTO";
5858
- MANUAL: "MANUAL";
5859
- }>;
5860
- withdrawalRestricted: z.ZodBoolean;
5861
- }, z.core.$strict>;
5862
- }, z.core.$strict>, z.ZodObject<{
5863
- type: z.ZodLiteral<"SERVICE">;
5864
- service: z.ZodObject<{
5865
- mode: z.ZodEnum<{
5866
- AUTO: "AUTO";
5867
- MANUAL: "MANUAL";
5868
- }>;
5869
- }, z.core.$strict>;
5870
- }, z.core.$strict>, z.ZodObject<{
5871
- type: z.ZodLiteral<"PICKUP">;
5872
- pickup: z.ZodObject<{
5873
- addressId: z.ZodString;
5874
- }, z.core.$strict>;
5229
+ type: z.ZodLiteral<"MANUAL">;
5875
5230
  }, z.core.$strict>], "type">>;
5876
5231
  refundPolicy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5877
5232
  preShipmentDeliveryFeeRefund: z.ZodOptional<z.ZodBoolean>;
@@ -5969,8 +5324,6 @@ export declare const updateStoreRequestSchema: z.ZodObject<{
5969
5324
  analyticsAllowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
5970
5325
  storefrontOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
5971
5326
  guestCheckoutEnabled: z.ZodOptional<z.ZodBoolean>;
5972
- fulfillmentMailEnabled: z.ZodOptional<z.ZodBoolean>;
5973
- withdrawalNotice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5974
5327
  autoDeliverDays: z.ZodOptional<z.ZodNumber>;
5975
5328
  autoConfirmDays: z.ZodOptional<z.ZodNumber>;
5976
5329
  refundPolicy: z.ZodOptional<z.ZodObject<{
@@ -6009,8 +5362,6 @@ export declare const storeSchema: z.ZodObject<{
6009
5362
  analyticsAllowedOrigins: z.ZodArray<z.ZodString>;
6010
5363
  storefrontOrigins: z.ZodArray<z.ZodString>;
6011
5364
  guestCheckoutEnabled: z.ZodBoolean;
6012
- fulfillmentMailEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
6013
- withdrawalNotice: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
6014
5365
  autoDeliverDays: z.ZodNumber;
6015
5366
  autoConfirmDays: z.ZodNumber;
6016
5367
  refundPolicy: z.ZodObject<{
@@ -6069,8 +5420,8 @@ export declare const invitationSchema: z.ZodObject<{
6069
5420
  STAFF: "STAFF";
6070
5421
  }>;
6071
5422
  status: z.ZodEnum<{
6072
- EXPIRED: "EXPIRED";
6073
5423
  PENDING: "PENDING";
5424
+ EXPIRED: "EXPIRED";
6074
5425
  ACCEPTED: "ACCEPTED";
6075
5426
  CANCELED: "CANCELED";
6076
5427
  }>;
@@ -6109,8 +5460,8 @@ export type UpdateMemberRoleRequest = z.infer<typeof updateMemberRoleRequestSche
6109
5460
  /** `GET /v1/store/invitations` 쿼리 — OpenAPI 문서용 형태 */
6110
5461
  export declare const invitationListQuerySchema: z.ZodObject<{
6111
5462
  status: z.ZodOptional<z.ZodEnum<{
6112
- EXPIRED: "EXPIRED";
6113
5463
  PENDING: "PENDING";
5464
+ EXPIRED: "EXPIRED";
6114
5465
  ACCEPTED: "ACCEPTED";
6115
5466
  CANCELED: "CANCELED";
6116
5467
  }>>;
@@ -6125,12 +5476,10 @@ export declare const storeMemberRoleUpdatedSchema: z.ZodObject<{
6125
5476
  }, z.core.$strip>;
6126
5477
  export type StoreMemberRoleUpdated = z.infer<typeof storeMemberRoleUpdatedSchema>;
6127
5478
  /**
6128
- * 주소 유형 — 출고지·반품지·방문 수령지(이슈 #48). 방문 수령지(`PICKUP`)는 목록에서 `type=PICKUP`으로 조회할 때만 나온다
6129
- * (이 값을 모르는 옛 SDK의 목록 파싱이 깨지지 않게).
5479
+ * 주소 유형 — 출고지·반품지.
6130
5480
  */
6131
5481
  export declare const addressTypeSchema: z.ZodEnum<{
6132
5482
  SHIPPING: "SHIPPING";
6133
- PICKUP: "PICKUP";
6134
5483
  RETURN: "RETURN";
6135
5484
  }>;
6136
5485
  export type AddressType = z.infer<typeof addressTypeSchema>;
@@ -6138,7 +5487,6 @@ export type AddressType = z.infer<typeof addressTypeSchema>;
6138
5487
  export declare const sellerAddressListQuerySchema: z.ZodObject<{
6139
5488
  type: z.ZodOptional<z.ZodEnum<{
6140
5489
  SHIPPING: "SHIPPING";
6141
- PICKUP: "PICKUP";
6142
5490
  RETURN: "RETURN";
6143
5491
  }>>;
6144
5492
  }, z.core.$strip>;
@@ -6146,7 +5494,6 @@ export declare const sellerAddressSchema: z.ZodObject<{
6146
5494
  addressId: z.ZodString;
6147
5495
  type: z.ZodEnum<{
6148
5496
  SHIPPING: "SHIPPING";
6149
- PICKUP: "PICKUP";
6150
5497
  RETURN: "RETURN";
6151
5498
  }>;
6152
5499
  name: z.ZodString;
@@ -6162,7 +5509,6 @@ export type SellerAddress = z.infer<typeof sellerAddressSchema>;
6162
5509
  export declare const sellerAddressRequestSchema: z.ZodObject<{
6163
5510
  type: z.ZodEnum<{
6164
5511
  SHIPPING: "SHIPPING";
6165
- PICKUP: "PICKUP";
6166
5512
  RETURN: "RETURN";
6167
5513
  }>;
6168
5514
  name: z.ZodString;
@@ -6198,6 +5544,23 @@ export type SellerAddressRequest = z.infer<typeof sellerAddressRequestSchema>;
6198
5544
  * - 409 `STOREFRONT_NO_ROLLBACK_TARGET` — 되돌릴 이전 발행 버전이 없다
6199
5545
  * - 400 `STOREFRONT_SLUG_CONFIRM_MISMATCH` — 호스팅 끄기 확인 입력이 현재 슬러그와 다르다
6200
5546
  * - 503 `STOREFRONT_PREVIEW_NOT_CONFIGURED` — 미리보기 서명 키가 설정되지 않았다
5547
+ *
5548
+ * 편집(M2b, `/v1/storefront/site/editing`·`files/**`·`checks/**`·`verify`·`builds/**`, 버전 만들기):
5549
+ * - 403 `STOREFRONT_EDITING_DISABLED` — 플랫폼 편집 스위치가 꺼져 있다
5550
+ * - 503 `STOREFRONT_EDITING_NOT_CONFIGURED` — 편집 Sandbox가 설정되지 않았다
5551
+ * - 409 `EDIT_CAPACITY_FULL` — 플랫폼 전체 동시 편집 상한에 걸렸다. `error.details.retryAfterSeconds` 뒤에 다시 한다
5552
+ * - 409 `EDIT_SESSION_REQUIRED` — 편집 미리보기 링크: 편집 환경이 없다
5553
+ * - 409 `CHECK_RUNNING` — 이 사이트에서 다른 종류의 검사가 돌고 있다(`error.details.checkId`)
5554
+ * - 404 `STOREFRONT_CHECK_NOT_FOUND`
5555
+ * - 409 `FILE_CHANGED` — 해시 조건이 어긋났다. 아무것도 쓰지 않았다(`error.details.conflicts: [{ path, currentHash }]`)
5556
+ * - 409 `FILE_EXISTS` — 옮길 자리에 파일이 있다(`overwrite: true`로 덮는다)
5557
+ * - 404 `FILE_NOT_FOUND` — 파일이 없다
5558
+ * - 400 `INVALID_FILE_PATH` — 경로 형식이 틀렸거나 편집할 수 없는 경로다(`node_modules`·`dist`·`.env*` 등). 쓸 수 있는 곳은
5559
+ * `src/**`·`public/**`와 루트 설정 파일 몇 개이고, `package.json`·`pnpm-lock.yaml`은 읽기만 된다
5560
+ * - 413 `FILE_TOO_LARGE`·`WORKSPACE_TOO_LARGE` — 파일 하나 1MiB, 작업 트리 전체 20MiB·2,000개를 넘는다
5561
+ * - 409 `STOREFRONT_BUILD_IN_PROGRESS` — 이 사이트에 끝나지 않은 빌드가 있다(사이트당 하나)
5562
+ * - 404 `STOREFRONT_BUILD_NOT_FOUND`
5563
+ * - 502 `STOREFRONT_SANDBOX_UNAVAILABLE` — 편집 Sandbox 호출이 실패했다. 잠시 뒤 다시 한다
6201
5564
  */
6202
5565
  /**
6203
5566
  * 슬러그 형식 — 스토어 코드와 같은 DNS 라벨 규칙(소문자·숫자·하이픈 3~30자, 하이픈으로 시작·끝 불가)에
@@ -6206,7 +5569,18 @@ export type SellerAddressRequest = z.infer<typeof sellerAddressRequestSchema>;
6206
5569
  export declare const STOREFRONT_SLUG_PATTERN: RegExp;
6207
5570
  /** 호스팅 도메인에서 플랫폼이 쓰거나 쓸 이름 — 스토어 코드 예약어에 호스팅 전용 이름을 더한다 */
6208
5571
  export declare const RESERVED_STOREFRONT_SLUGS: readonly string[];
5572
+ /**
5573
+ * 편집 미리보기 호스트 접미사 — 편집 미리보기 주소는 `{사이트 id 정규화}-preview.{호스팅 도메인}`이다(M2b). 사이트 주소와 같은
5574
+ * 1단계 이름이라 슬러그가 이 모양이면 남의 편집 미리보기 주소와 겹칠 수 있어 슬러그로 쓰지 못한다.
5575
+ */
5576
+ export declare const STOREFRONT_EDIT_PREVIEW_SUFFIX = "-preview";
6209
5577
  export declare function isReservedStorefrontSlug(slug: string): boolean;
5578
+ /**
5579
+ * 편집 미리보기 호스트 이름의 라벨 — 사이트 id의 `_`를 `-`로 바꾸고 `-preview`를 붙인다(`sfs_ab12cd34` → `sfs-ab12cd34-preview`).
5580
+ * 편집 Sandbox Worker(`apps/hosting-sandbox/src/preview-host.ts`)가 같은 규칙의 복제본을 들고 있고 api
5581
+ * `test/storefront-hosting-parity.spec.ts`가 둘을 대조한다. 규칙을 바꾸면 두 곳을 같이 고친다.
5582
+ */
5583
+ export declare function storefrontEditPreviewLabelOf(siteId: string): string;
6210
5584
  export declare const storefrontSlugSchema: z.ZodString;
6211
5585
  /** 바꾼 슬러그를 다른 사이트가 가져가지 못하게 막는 기간(일). 보류 동안 옛 주소는 새 주소로 301한다 */
6212
5586
  export declare const STOREFRONT_SLUG_HOLD_DAYS = 90;
@@ -6227,8 +5601,10 @@ export declare const storefrontTemplateSchema: z.ZodObject<{
6227
5601
  }, z.core.$strip>;
6228
5602
  export type StorefrontTemplate = z.infer<typeof storefrontTemplateSchema>;
6229
5603
  /**
6230
- * 버전 상태 — M1은 템플릿 빌드 산출물을 그대로 쓰므로 만들 때 곧바로 `READY`다. `BUILDING`·`FAILED`는
6231
- * 셀러 편집 빌드(M2)가 쓴다. 발행 여부는 상태가 아니라 사이트의 발행 포인터가 원천이다(`published`).
5604
+ * 버전 상태 — 템플릿 버전(`source: TEMPLATE`)은 템플릿 산출물을 그대로 쓰므로 만들 때 곧바로 `READY`다. 편집 버전
5605
+ * (`source: EDIT`, M2b)은 작업 트리 스냅샷을 빌드하는 동안 `BUILDING`이고, 빌드·규칙 검증을 통과하면 `READY`, 실패하면
5606
+ * `FAILED`다(실패 단계·로그 꼬리는 `buildId`의 빌드). 발행할 수 있는 것은 `READY`뿐이다. 발행 여부는 상태가 아니라 사이트의
5607
+ * 발행 포인터가 원천이다(`published`).
6232
5608
  */
6233
5609
  export declare const storefrontVersionStatusSchema: z.ZodEnum<{
6234
5610
  FAILED: "FAILED";
@@ -6249,6 +5625,11 @@ export declare const storefrontVersionSchema: z.ZodObject<{
6249
5625
  published: z.ZodBoolean;
6250
5626
  publishedAt: z.ZodNullable<z.ZodString>;
6251
5627
  message: z.ZodNullable<z.ZodString>;
5628
+ source: z.ZodEnum<{
5629
+ TEMPLATE: "TEMPLATE";
5630
+ EDIT: "EDIT";
5631
+ }>;
5632
+ buildId: z.ZodNullable<z.ZodString>;
6252
5633
  createdByType: z.ZodString;
6253
5634
  createdAt: z.ZodString;
6254
5635
  }, z.core.$strip>;
@@ -6296,6 +5677,14 @@ export declare const storefrontProvisioningSchema: z.ZodObject<{
6296
5677
  syncedAt: z.ZodNullable<z.ZodString>;
6297
5678
  }, z.core.$strip>;
6298
5679
  export type StorefrontProvisioning = z.infer<typeof storefrontProvisioningSchema>;
5680
+ /**
5681
+ * 편집 미리보기 주소(M2b) — 사이트마다 `{사이트 id 정규화}-preview.{호스팅 도메인}` 호스트 하나다. 호스팅 도메인의 와일드카드
5682
+ * 인증서가 덮으므로 따로 준비할 것이 없다. 이 주소는 편집 미리보기 링크(콘솔 전용)로 받은 쿠키가 있어야 열린다.
5683
+ */
5684
+ export declare const storefrontEditPreviewSchema: z.ZodObject<{
5685
+ hostname: z.ZodNullable<z.ZodString>;
5686
+ }, z.core.$strip>;
5687
+ export type StorefrontEditPreview = z.infer<typeof storefrontEditPreviewSchema>;
6299
5688
  export declare const storefrontSiteSchema: z.ZodObject<{
6300
5689
  siteId: z.ZodString;
6301
5690
  slug: z.ZodString;
@@ -6341,7 +5730,12 @@ export declare const storefrontSiteSchema: z.ZodObject<{
6341
5730
  published: z.ZodBoolean;
6342
5731
  publishedAt: z.ZodNullable<z.ZodString>;
6343
5732
  message: z.ZodNullable<z.ZodString>;
6344
- createdByType: z.ZodString;
5733
+ source: z.ZodEnum<{
5734
+ TEMPLATE: "TEMPLATE";
5735
+ EDIT: "EDIT";
5736
+ }>;
5737
+ buildId: z.ZodNullable<z.ZodString>;
5738
+ createdByType: z.ZodString;
6345
5739
  createdAt: z.ZodString;
6346
5740
  }, z.core.$strip>>;
6347
5741
  provisioning: z.ZodObject<{
@@ -6353,6 +5747,9 @@ export declare const storefrontSiteSchema: z.ZodObject<{
6353
5747
  lastErrorCode: z.ZodNullable<z.ZodString>;
6354
5748
  syncedAt: z.ZodNullable<z.ZodString>;
6355
5749
  }, z.core.$strip>;
5750
+ editPreview: z.ZodObject<{
5751
+ hostname: z.ZodNullable<z.ZodString>;
5752
+ }, z.core.$strip>;
6356
5753
  slugChangesRemaining: z.ZodNumber;
6357
5754
  createdAt: z.ZodString;
6358
5755
  updatedAt: z.ZodString;
@@ -6362,6 +5759,7 @@ export type StorefrontSite = z.infer<typeof storefrontSiteSchema>;
6362
5759
  export declare const storefrontHostingSchema: z.ZodObject<{
6363
5760
  enabled: z.ZodBoolean;
6364
5761
  domain: z.ZodString;
5762
+ editingEnabled: z.ZodBoolean;
6365
5763
  site: z.ZodNullable<z.ZodObject<{
6366
5764
  siteId: z.ZodString;
6367
5765
  slug: z.ZodString;
@@ -6407,6 +5805,11 @@ export declare const storefrontHostingSchema: z.ZodObject<{
6407
5805
  published: z.ZodBoolean;
6408
5806
  publishedAt: z.ZodNullable<z.ZodString>;
6409
5807
  message: z.ZodNullable<z.ZodString>;
5808
+ source: z.ZodEnum<{
5809
+ TEMPLATE: "TEMPLATE";
5810
+ EDIT: "EDIT";
5811
+ }>;
5812
+ buildId: z.ZodNullable<z.ZodString>;
6410
5813
  createdByType: z.ZodString;
6411
5814
  createdAt: z.ZodString;
6412
5815
  }, z.core.$strip>>;
@@ -6419,6 +5822,9 @@ export declare const storefrontHostingSchema: z.ZodObject<{
6419
5822
  lastErrorCode: z.ZodNullable<z.ZodString>;
6420
5823
  syncedAt: z.ZodNullable<z.ZodString>;
6421
5824
  }, z.core.$strip>;
5825
+ editPreview: z.ZodObject<{
5826
+ hostname: z.ZodNullable<z.ZodString>;
5827
+ }, z.core.$strip>;
6422
5828
  slugChangesRemaining: z.ZodNumber;
6423
5829
  createdAt: z.ZodString;
6424
5830
  updatedAt: z.ZodString;
@@ -6498,6 +5904,515 @@ export declare const storefrontPreviewLinkSchema: z.ZodObject<{
6498
5904
  expiresAt: z.ZodString;
6499
5905
  }, z.core.$strip>;
6500
5906
  export type StorefrontPreviewLink = z.infer<typeof storefrontPreviewLinkSchema>;
5907
+ /** 플랫폼 전체 동시 편집 환경 상한 */
5908
+ export declare const STOREFRONT_EDIT_CAPACITY = 20;
5909
+ /** 활동이 없으면 편집 환경이 잠드는 시간(분). 작업 트리는 보존된다 */
5910
+ export declare const STOREFRONT_EDIT_IDLE_MINUTES = 15;
5911
+ /**
5912
+ * 편집 작업(파일 쓰기·검사·버전 만들기·편집 미리보기 링크 발급)이 없으면 서버가 편집 환경을 닫는 시간(분). 미리보기 탭만 열어 두면
5913
+ * 유휴 잠들기(`STOREFRONT_EDIT_IDLE_MINUTES`)가 걸리지 않으므로 이 한도가 편집 환경을 끝낸다. 작업 트리는 보존된다
5914
+ */
5915
+ export declare const STOREFRONT_EDIT_ACTIVITY_TIMEOUT_MINUTES = 30;
5916
+ /** 파일 하나의 최대 크기(바이트) */
5917
+ export declare const STOREFRONT_FILE_MAX_BYTES: number;
5918
+ /** 작업 트리 전체 최대 크기(바이트) — 파일 수는 2,000개까지 */
5919
+ export declare const STOREFRONT_WORKSPACE_MAX_BYTES: number;
5920
+ /** 일괄 쓰기 한 번의 최대 파일 수 */
5921
+ export declare const STOREFRONT_FILE_BATCH_MAX = 50;
5922
+ /** 편집할 수 없는 경로 조각 — 설치물·산출물 폴더 */
5923
+ export declare const STOREFRONT_BLOCKED_PATH_SEGMENTS: readonly string[];
5924
+ /** 경로 조각에 쓸 수 있는 문자 — 편집 Sandbox Worker의 경로 규칙(sandbox-api.md §2.1)과 같다. TanStack Router 파일명(`$id.tsx`·`_layout`·`(group)`·`[.]`)이 들어간다 */
5925
+ export declare const STOREFRONT_PATH_SEGMENT_PATTERN: RegExp;
5926
+ /** 경로 정규화 — NFC. 비교·저장은 이 값으로 한다(같아 보이는 두 경로가 다른 파일이 되지 않게) */
5927
+ export declare function normalizeStorefrontPath(path: string): string;
5928
+ /**
5929
+ * 작업 트리 상대 경로인가(정규화한 값 기준) — `/`로 구분하고 `/`로 시작하지 않는다. `.`·`..`·빈 조각, 조각 문자 규칙
5930
+ * (`STOREFRONT_PATH_SEGMENT_PATTERN`, 공백·역슬래시·제어·제로폭·bidi 문자 불가) 밖, 설치물·산출물 폴더
5931
+ * (`STOREFRONT_BLOCKED_PATH_SEGMENTS`), `.env`로 시작하는 조각(파일·폴더)은 받지 않는다. 최대 256자·깊이 16.
5932
+ * 어디에 쓸 수 있는지(`src/**`·`public/**`·루트 설정 파일)는 편집 Sandbox가 판정한다(400 `INVALID_FILE_PATH`).
5933
+ * 편집 Sandbox Worker가 같은 규칙의 복제본을 들고 있다(api `test/storefront-hosting-parity.spec.ts`가 대조한다).
5934
+ */
5935
+ export declare function isEditableStorefrontPath(path: string): boolean;
5936
+ /** 경로 입력 — NFC로 정규화한 뒤 규칙을 본다 */
5937
+ export declare const storefrontFilePathSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
5938
+ /** 파일 해시 — 내용 바이트의 SHA-256 hex(소문자 64자) */
5939
+ export declare const storefrontFileHashSchema: z.ZodString;
5940
+ export declare const storefrontFileEncodingSchema: z.ZodEnum<{
5941
+ utf8: "utf8";
5942
+ base64: "base64";
5943
+ }>;
5944
+ /**
5945
+ * 편집 환경 상태 — `STARTING`은 컨테이너를 띄우고 작업 트리를 복원해 dev 서버를 올리는 중이다(보통 30초 안, 최대
5946
+ * 90초). `RUNNING`이면 미리보기와 파일 쓰기가 바로 반영된다(HMR).
5947
+ */
5948
+ export declare const storefrontEditSessionStatusSchema: z.ZodEnum<{
5949
+ STARTING: "STARTING";
5950
+ RUNNING: "RUNNING";
5951
+ }>;
5952
+ /** 편집 환경을 띄우는 단계 — 콘솔 진행 표시용이다. 값은 늘어날 수 있다 */
5953
+ export declare const STOREFRONT_EDIT_START_STAGES: readonly ["CONTAINER", "RESTORE", "DEV_SERVER"];
5954
+ export declare const storefrontEditSessionSchema: z.ZodObject<{
5955
+ sessionId: z.ZodString;
5956
+ status: z.ZodEnum<{
5957
+ STARTING: "STARTING";
5958
+ RUNNING: "RUNNING";
5959
+ }>;
5960
+ startStage: z.ZodNullable<z.ZodString>;
5961
+ startedAt: z.ZodString;
5962
+ lastEditedAt: z.ZodNullable<z.ZodString>;
5963
+ lastActiveAt: z.ZodString;
5964
+ idleExpiresAt: z.ZodString;
5965
+ closesAt: z.ZodString;
5966
+ }, z.core.$strip>;
5967
+ export type StorefrontEditSession = z.infer<typeof storefrontEditSessionSchema>;
5968
+ /** `GET·POST·DELETE /v1/storefront/site/editing` — 편집 환경 상태 */
5969
+ export declare const storefrontEditingSchema: z.ZodObject<{
5970
+ enabled: z.ZodBoolean;
5971
+ session: z.ZodNullable<z.ZodObject<{
5972
+ sessionId: z.ZodString;
5973
+ status: z.ZodEnum<{
5974
+ STARTING: "STARTING";
5975
+ RUNNING: "RUNNING";
5976
+ }>;
5977
+ startStage: z.ZodNullable<z.ZodString>;
5978
+ startedAt: z.ZodString;
5979
+ lastEditedAt: z.ZodNullable<z.ZodString>;
5980
+ lastActiveAt: z.ZodString;
5981
+ idleExpiresAt: z.ZodString;
5982
+ closesAt: z.ZodString;
5983
+ }, z.core.$strip>>;
5984
+ capacity: z.ZodObject<{
5985
+ limit: z.ZodNumber;
5986
+ inUse: z.ZodNumber;
5987
+ }, z.core.$strip>;
5988
+ preview: z.ZodObject<{
5989
+ hostname: z.ZodNullable<z.ZodString>;
5990
+ }, z.core.$strip>;
5991
+ workingTree: z.ZodObject<{
5992
+ modified: z.ZodBoolean;
5993
+ lastEditedAt: z.ZodNullable<z.ZodString>;
5994
+ }, z.core.$strip>;
5995
+ }, z.core.$strip>;
5996
+ export type StorefrontEditing = z.infer<typeof storefrontEditingSchema>;
5997
+ export declare const storefrontFileEntrySchema: z.ZodObject<{
5998
+ path: z.ZodString;
5999
+ size: z.ZodNumber;
6000
+ hash: z.ZodString;
6001
+ }, z.core.$strip>;
6002
+ export type StorefrontFileEntry = z.infer<typeof storefrontFileEntrySchema>;
6003
+ /** `GET /v1/storefront/site/files?prefix=` — 작업 트리 파일 목록(편집 환경이 없어도 된다. 편집 환경을 깨우지 않는다) */
6004
+ export declare const storefrontFileListSchema: z.ZodObject<{
6005
+ files: z.ZodArray<z.ZodObject<{
6006
+ path: z.ZodString;
6007
+ size: z.ZodNumber;
6008
+ hash: z.ZodString;
6009
+ }, z.core.$strip>>;
6010
+ totalBytes: z.ZodNumber;
6011
+ }, z.core.$strip>;
6012
+ export type StorefrontFileList = z.infer<typeof storefrontFileListSchema>;
6013
+ export declare const storefrontFileListQuerySchema: z.ZodObject<{
6014
+ prefix: z.ZodOptional<z.ZodString>;
6015
+ }, z.core.$strip>;
6016
+ export declare const storefrontFileContentQuerySchema: z.ZodObject<{
6017
+ path: z.ZodString;
6018
+ }, z.core.$strip>;
6019
+ /** `GET /v1/storefront/site/files/content?path=` — 편집 환경이 없어도 된다 */
6020
+ export declare const storefrontFileContentSchema: z.ZodObject<{
6021
+ path: z.ZodString;
6022
+ content: z.ZodString;
6023
+ encoding: z.ZodEnum<{
6024
+ utf8: "utf8";
6025
+ base64: "base64";
6026
+ }>;
6027
+ hash: z.ZodString;
6028
+ size: z.ZodNumber;
6029
+ }, z.core.$strip>;
6030
+ export type StorefrontFileContent = z.infer<typeof storefrontFileContentSchema>;
6031
+ /**
6032
+ * `POST /v1/storefront/site/files/batch` — 여러 파일을 한 번에 쓴다. 편집 환경이 없어도 된다(잠든 작업 트리에 바로 쓰고,
6033
+ * 편집 환경이 떠 있으면 미리보기에 곧바로 반영된다). `expectedHash`: 생략하면 조건 없이 쓴다 · `null`이면 파일이 없어야 한다(새 파일) · 값이면 지금
6034
+ * 해시가 같아야 한다. 조건을 **모두** 확인한 뒤 쓰고, 하나라도 어긋나면 아무것도 쓰지 않는다(409 `FILE_CHANGED`,
6035
+ * `error.details.conflicts`).
6036
+ */
6037
+ export declare const writeStorefrontFilesRequestSchema: z.ZodObject<{
6038
+ files: z.ZodArray<z.ZodObject<{
6039
+ path: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
6040
+ content: z.ZodString;
6041
+ encoding: z.ZodOptional<z.ZodEnum<{
6042
+ utf8: "utf8";
6043
+ base64: "base64";
6044
+ }>>;
6045
+ expectedHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6046
+ }, z.core.$strip>>;
6047
+ }, z.core.$strip>;
6048
+ export type WriteStorefrontFilesRequest = z.infer<typeof writeStorefrontFilesRequestSchema>;
6049
+ export declare const storefrontFileWriteResultSchema: z.ZodObject<{
6050
+ files: z.ZodArray<z.ZodObject<{
6051
+ path: z.ZodString;
6052
+ size: z.ZodNumber;
6053
+ hash: z.ZodString;
6054
+ }, z.core.$strip>>;
6055
+ }, z.core.$strip>;
6056
+ export type StorefrontFileWriteResult = z.infer<typeof storefrontFileWriteResultSchema>;
6057
+ /** 409 `FILE_CHANGED`의 `error.details` */
6058
+ export declare const storefrontFileConflictDetailsSchema: z.ZodObject<{
6059
+ conflicts: z.ZodArray<z.ZodObject<{
6060
+ path: z.ZodString;
6061
+ currentHash: z.ZodNullable<z.ZodString>;
6062
+ }, z.core.$strip>>;
6063
+ }, z.core.$strip>;
6064
+ export type StorefrontFileConflictDetails = z.infer<typeof storefrontFileConflictDetailsSchema>;
6065
+ /** `POST /v1/storefront/site/files/delete` — 없는 파일이면 `deleted: false`(조건을 주면 409 `FILE_CHANGED`) */
6066
+ export declare const deleteStorefrontFileRequestSchema: z.ZodObject<{
6067
+ path: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
6068
+ expectedHash: z.ZodOptional<z.ZodString>;
6069
+ }, z.core.$strip>;
6070
+ export type DeleteStorefrontFileRequest = z.infer<typeof deleteStorefrontFileRequestSchema>;
6071
+ export declare const storefrontFileDeleteResultSchema: z.ZodObject<{
6072
+ path: z.ZodString;
6073
+ deleted: z.ZodBoolean;
6074
+ }, z.core.$strip>;
6075
+ export type StorefrontFileDeleteResult = z.infer<typeof storefrontFileDeleteResultSchema>;
6076
+ /** `POST /v1/storefront/site/files/move` — 이름 바꾸기·옮기기 */
6077
+ export declare const moveStorefrontFileRequestSchema: z.ZodObject<{
6078
+ from: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
6079
+ to: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
6080
+ expectedHash: z.ZodOptional<z.ZodString>;
6081
+ overwrite: z.ZodOptional<z.ZodBoolean>;
6082
+ }, z.core.$strip>;
6083
+ export type MoveStorefrontFileRequest = z.infer<typeof moveStorefrontFileRequestSchema>;
6084
+ export declare const storefrontFileMoveResultSchema: z.ZodObject<{
6085
+ from: z.ZodString;
6086
+ to: z.ZodString;
6087
+ hash: z.ZodString;
6088
+ size: z.ZodNumber;
6089
+ }, z.core.$strip>;
6090
+ export type StorefrontFileMoveResult = z.infer<typeof storefrontFileMoveResultSchema>;
6091
+ /** `POST /v1/storefront/site/files/search` — 텍스트 파일 내용 검색(편집 환경이 없어도 된다) */
6092
+ /** 정규식 검색의 패턴 길이 상한 — 편집 Sandbox가 실행 비용을 막으려고 더 좁게 받는다(sandbox-api §4.6) */
6093
+ export declare const STOREFRONT_SEARCH_REGEX_MAX_LENGTH = 100;
6094
+ export declare const searchStorefrontFilesRequestSchema: z.ZodObject<{
6095
+ query: z.ZodString;
6096
+ regex: z.ZodOptional<z.ZodBoolean>;
6097
+ caseSensitive: z.ZodOptional<z.ZodBoolean>;
6098
+ pathPrefix: z.ZodOptional<z.ZodString>;
6099
+ maxResults: z.ZodOptional<z.ZodNumber>;
6100
+ }, z.core.$strip>;
6101
+ export type SearchStorefrontFilesRequest = z.infer<typeof searchStorefrontFilesRequestSchema>;
6102
+ export declare const storefrontFileSearchResultSchema: z.ZodObject<{
6103
+ matches: z.ZodArray<z.ZodObject<{
6104
+ path: z.ZodString;
6105
+ line: z.ZodNumber;
6106
+ column: z.ZodOptional<z.ZodNumber>;
6107
+ text: z.ZodString;
6108
+ }, z.core.$strip>>;
6109
+ truncated: z.ZodBoolean;
6110
+ }, z.core.$strip>;
6111
+ export type StorefrontFileSearchResult = z.infer<typeof storefrontFileSearchResultSchema>;
6112
+ /**
6113
+ * `POST /v1/storefront/site/checks` (202) — 작업 트리에 명령 하나를 돌린다(`typecheck` 타입 검사 · `lint` · `test`). 편집 환경이
6114
+ * 없어도 된다(일회용 검사 컨테이너에서 돈다). 검사는 30초를 넘길 수 있어 **항상 202로 검사 id만 주고** 결과는
6115
+ * `GET /v1/storefront/site/checks/{checkId}`로 조회한다(권장 2~3초 간격). 사이트당 끝나지 않은 검사는 하나다 — 같은 종류가 돌고
6116
+ * 있으면 그 검사를 다시 돌려주고, 다른 종류면 409 `CHECK_RUNNING`(`error.details.checkId`)이다. 출력은 꼬리만 준다.
6117
+ */
6118
+ export declare const runStorefrontCheckRequestSchema: z.ZodObject<{
6119
+ check: z.ZodEnum<{
6120
+ typecheck: "typecheck";
6121
+ lint: "lint";
6122
+ test: "test";
6123
+ }>;
6124
+ }, z.core.$strip>;
6125
+ export type RunStorefrontCheckRequest = z.infer<typeof runStorefrontCheckRequestSchema>;
6126
+ export declare const storefrontCheckStatusSchema: z.ZodEnum<{
6127
+ FAILED: "FAILED";
6128
+ UNKNOWN: "UNKNOWN";
6129
+ RUNNING: "RUNNING";
6130
+ QUEUED: "QUEUED";
6131
+ PASSED: "PASSED";
6132
+ TIMED_OUT: "TIMED_OUT";
6133
+ }>;
6134
+ export type StorefrontCheckStatus = z.infer<typeof storefrontCheckStatusSchema>;
6135
+ /** 끝난 검사 상태 */
6136
+ export declare const STOREFRONT_CHECK_TERMINAL_STATUSES: readonly StorefrontCheckStatus[];
6137
+ export declare const storefrontCheckSchema: z.ZodObject<{
6138
+ checkId: z.ZodString;
6139
+ check: z.ZodString;
6140
+ status: z.ZodEnum<{
6141
+ FAILED: "FAILED";
6142
+ UNKNOWN: "UNKNOWN";
6143
+ RUNNING: "RUNNING";
6144
+ QUEUED: "QUEUED";
6145
+ PASSED: "PASSED";
6146
+ TIMED_OUT: "TIMED_OUT";
6147
+ }>;
6148
+ exitCode: z.ZodNullable<z.ZodNumber>;
6149
+ durationMs: z.ZodNullable<z.ZodNumber>;
6150
+ outputTail: z.ZodNullable<z.ZodString>;
6151
+ errorCode: z.ZodNullable<z.ZodString>;
6152
+ message: z.ZodNullable<z.ZodString>;
6153
+ createdAt: z.ZodString;
6154
+ startedAt: z.ZodNullable<z.ZodString>;
6155
+ finishedAt: z.ZodNullable<z.ZodString>;
6156
+ }, z.core.$strip>;
6157
+ export type StorefrontCheck = z.infer<typeof storefrontCheckSchema>;
6158
+ /** 규칙 심각도 — `error`는 버전 발행을 막는다(빌드 `VERIFY` 실패), `warning`은 알리기만 한다. 없으면 `error`로 본다 */
6159
+ export declare const storefrontRuleSeveritySchema: z.ZodEnum<{
6160
+ error: "error";
6161
+ warning: "warning";
6162
+ }>;
6163
+ export type StorefrontRuleSeverity = z.infer<typeof storefrontRuleSeveritySchema>;
6164
+ /** 규칙 하나의 검사 결과 — MCP 계측(`mcpRuleResultSchema`)과 같은 모양에 심각도를 더한다 */
6165
+ export declare const storefrontRuleResultSchema: z.ZodObject<{
6166
+ ruleId: z.ZodString;
6167
+ status: z.ZodEnum<{
6168
+ pass: "pass";
6169
+ violation: "violation";
6170
+ }>;
6171
+ count: z.ZodNumber;
6172
+ severity: z.ZodOptional<z.ZodEnum<{
6173
+ error: "error";
6174
+ warning: "warning";
6175
+ }>>;
6176
+ }, z.core.$strip>;
6177
+ export type StorefrontRuleResult = z.infer<typeof storefrontRuleResultSchema>;
6178
+ /**
6179
+ * 규칙 검증 보고서 — `@sayren/mcp`의 `verify_storefront`와 같은 모양이다(원천 `apps/mcp/src/verify.ts`). 위반마다
6180
+ * 고칠 자리(`file`·`line`)와 방법(`fix`·`example`)을 싣는다. `POST /v1/storefront/site/verify`(편집 환경이 잠들어 있어도
6181
+ * 된다)와 빌드의 `verify`가 이 모양이다.
6182
+ */
6183
+ export declare const storefrontVerifyReportSchema: z.ZodObject<{
6184
+ ok: z.ZodBoolean;
6185
+ checkedFiles: z.ZodNumber;
6186
+ summary: z.ZodObject<{
6187
+ rules: z.ZodNumber;
6188
+ passed: z.ZodNumber;
6189
+ violated: z.ZodNumber;
6190
+ findings: z.ZodNumber;
6191
+ }, z.core.$strip>;
6192
+ results: z.ZodArray<z.ZodObject<{
6193
+ ruleId: z.ZodString;
6194
+ status: z.ZodEnum<{
6195
+ pass: "pass";
6196
+ violation: "violation";
6197
+ }>;
6198
+ count: z.ZodNumber;
6199
+ severity: z.ZodOptional<z.ZodEnum<{
6200
+ error: "error";
6201
+ warning: "warning";
6202
+ }>>;
6203
+ }, z.core.$strip>>;
6204
+ findings: z.ZodArray<z.ZodObject<{
6205
+ ruleId: z.ZodString;
6206
+ rule: z.ZodString;
6207
+ file: z.ZodString;
6208
+ line: z.ZodOptional<z.ZodNumber>;
6209
+ detail: z.ZodString;
6210
+ cause: z.ZodString;
6211
+ fix: z.ZodString;
6212
+ example: z.ZodString;
6213
+ doc: z.ZodString;
6214
+ docUrl: z.ZodString;
6215
+ templateFile: z.ZodOptional<z.ZodString>;
6216
+ severity: z.ZodOptional<z.ZodEnum<{
6217
+ error: "error";
6218
+ warning: "warning";
6219
+ }>>;
6220
+ }, z.core.$strip>>;
6221
+ message: z.ZodString;
6222
+ nextSteps: z.ZodArray<z.ZodString>;
6223
+ }, z.core.$strip>;
6224
+ export type StorefrontVerifyReport = z.infer<typeof storefrontVerifyReportSchema>;
6225
+ export declare const storefrontBuildStatusSchema: z.ZodEnum<{
6226
+ FAILED: "FAILED";
6227
+ SUCCEEDED: "SUCCEEDED";
6228
+ RUNNING: "RUNNING";
6229
+ QUEUED: "QUEUED";
6230
+ TIMED_OUT: "TIMED_OUT";
6231
+ }>;
6232
+ export type StorefrontBuildStatus = z.infer<typeof storefrontBuildStatusSchema>;
6233
+ /** 끝난 빌드 상태 */
6234
+ export declare const STOREFRONT_BUILD_TERMINAL_STATUSES: readonly StorefrontBuildStatus[];
6235
+ /**
6236
+ * 빌드 단계 — 이 순서로 돈다. 첫 실패에서 멈추지만 규칙 검증(`VERIFY`)은 실패해도 타입 검사까지 이어서 해 한 번에 알려 준다.
6237
+ * `UPLOAD`는 사이트 버전 Worker 업로드다(성공하면 발행할 수 있다). 값은 늘어날 수 있다.
6238
+ */
6239
+ export declare const STOREFRONT_BUILD_STAGES: readonly ["VERIFY", "RESTORE", "INSTALL", "TYPECHECK", "BUILD", "BUNDLE", "PACK", "UPLOAD"];
6240
+ export declare const storefrontBuildSchema: z.ZodObject<{
6241
+ buildId: z.ZodString;
6242
+ versionId: z.ZodString;
6243
+ versionNumber: z.ZodNumber;
6244
+ status: z.ZodEnum<{
6245
+ FAILED: "FAILED";
6246
+ SUCCEEDED: "SUCCEEDED";
6247
+ RUNNING: "RUNNING";
6248
+ QUEUED: "QUEUED";
6249
+ TIMED_OUT: "TIMED_OUT";
6250
+ }>;
6251
+ failureStage: z.ZodNullable<z.ZodString>;
6252
+ errorCode: z.ZodNullable<z.ZodString>;
6253
+ logTail: z.ZodNullable<z.ZodString>;
6254
+ stages: z.ZodArray<z.ZodObject<{
6255
+ stage: z.ZodString;
6256
+ ok: z.ZodBoolean;
6257
+ durationMs: z.ZodNumber;
6258
+ }, z.core.$strip>>;
6259
+ verify: z.ZodNullable<z.ZodObject<{
6260
+ ok: z.ZodBoolean;
6261
+ checkedFiles: z.ZodNumber;
6262
+ summary: z.ZodObject<{
6263
+ rules: z.ZodNumber;
6264
+ passed: z.ZodNumber;
6265
+ violated: z.ZodNumber;
6266
+ findings: z.ZodNumber;
6267
+ }, z.core.$strip>;
6268
+ results: z.ZodArray<z.ZodObject<{
6269
+ ruleId: z.ZodString;
6270
+ status: z.ZodEnum<{
6271
+ pass: "pass";
6272
+ violation: "violation";
6273
+ }>;
6274
+ count: z.ZodNumber;
6275
+ severity: z.ZodOptional<z.ZodEnum<{
6276
+ error: "error";
6277
+ warning: "warning";
6278
+ }>>;
6279
+ }, z.core.$strip>>;
6280
+ findings: z.ZodArray<z.ZodObject<{
6281
+ ruleId: z.ZodString;
6282
+ rule: z.ZodString;
6283
+ file: z.ZodString;
6284
+ line: z.ZodOptional<z.ZodNumber>;
6285
+ detail: z.ZodString;
6286
+ cause: z.ZodString;
6287
+ fix: z.ZodString;
6288
+ example: z.ZodString;
6289
+ doc: z.ZodString;
6290
+ docUrl: z.ZodString;
6291
+ templateFile: z.ZodOptional<z.ZodString>;
6292
+ severity: z.ZodOptional<z.ZodEnum<{
6293
+ error: "error";
6294
+ warning: "warning";
6295
+ }>>;
6296
+ }, z.core.$strip>>;
6297
+ message: z.ZodString;
6298
+ nextSteps: z.ZodArray<z.ZodString>;
6299
+ }, z.core.$strip>>;
6300
+ queuedAt: z.ZodString;
6301
+ startedAt: z.ZodNullable<z.ZodString>;
6302
+ finishedAt: z.ZodNullable<z.ZodString>;
6303
+ durationMs: z.ZodNullable<z.ZodNumber>;
6304
+ }, z.core.$strip>;
6305
+ export type StorefrontBuild = z.infer<typeof storefrontBuildSchema>;
6306
+ export declare const storefrontBuildListQuerySchema: z.ZodObject<{
6307
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
6308
+ }, z.core.$strip>;
6309
+ /**
6310
+ * `POST /v1/storefront/site/versions` — 지금 작업 트리를 고정해 버전을 만든다(빌드 시작). 사이트당 끝나지 않은 빌드는
6311
+ * 하나다(409 `STOREFRONT_BUILD_IN_PROGRESS`). 편집 환경이 없어도 된다.
6312
+ */
6313
+ export declare const createStorefrontVersionRequestSchema: z.ZodObject<{
6314
+ message: z.ZodOptional<z.ZodString>;
6315
+ }, z.core.$strip>;
6316
+ export type CreateStorefrontVersionRequest = z.infer<typeof createStorefrontVersionRequestSchema>;
6317
+ /** 버전 만들기 응답 (201) — 버전은 `BUILDING`, 빌드는 `QUEUED`로 시작한다. 결과는 `GET builds/{buildId}`로 본다 */
6318
+ export declare const storefrontVersionCreatedSchema: z.ZodObject<{
6319
+ version: z.ZodObject<{
6320
+ versionId: z.ZodString;
6321
+ number: z.ZodNumber;
6322
+ templateId: z.ZodString;
6323
+ templateVersion: z.ZodString;
6324
+ status: z.ZodEnum<{
6325
+ FAILED: "FAILED";
6326
+ BUILDING: "BUILDING";
6327
+ READY: "READY";
6328
+ }>;
6329
+ published: z.ZodBoolean;
6330
+ publishedAt: z.ZodNullable<z.ZodString>;
6331
+ message: z.ZodNullable<z.ZodString>;
6332
+ source: z.ZodEnum<{
6333
+ TEMPLATE: "TEMPLATE";
6334
+ EDIT: "EDIT";
6335
+ }>;
6336
+ buildId: z.ZodNullable<z.ZodString>;
6337
+ createdByType: z.ZodString;
6338
+ createdAt: z.ZodString;
6339
+ }, z.core.$strip>;
6340
+ build: z.ZodObject<{
6341
+ buildId: z.ZodString;
6342
+ versionId: z.ZodString;
6343
+ versionNumber: z.ZodNumber;
6344
+ status: z.ZodEnum<{
6345
+ FAILED: "FAILED";
6346
+ SUCCEEDED: "SUCCEEDED";
6347
+ RUNNING: "RUNNING";
6348
+ QUEUED: "QUEUED";
6349
+ TIMED_OUT: "TIMED_OUT";
6350
+ }>;
6351
+ failureStage: z.ZodNullable<z.ZodString>;
6352
+ errorCode: z.ZodNullable<z.ZodString>;
6353
+ logTail: z.ZodNullable<z.ZodString>;
6354
+ stages: z.ZodArray<z.ZodObject<{
6355
+ stage: z.ZodString;
6356
+ ok: z.ZodBoolean;
6357
+ durationMs: z.ZodNumber;
6358
+ }, z.core.$strip>>;
6359
+ verify: z.ZodNullable<z.ZodObject<{
6360
+ ok: z.ZodBoolean;
6361
+ checkedFiles: z.ZodNumber;
6362
+ summary: z.ZodObject<{
6363
+ rules: z.ZodNumber;
6364
+ passed: z.ZodNumber;
6365
+ violated: z.ZodNumber;
6366
+ findings: z.ZodNumber;
6367
+ }, z.core.$strip>;
6368
+ results: z.ZodArray<z.ZodObject<{
6369
+ ruleId: z.ZodString;
6370
+ status: z.ZodEnum<{
6371
+ pass: "pass";
6372
+ violation: "violation";
6373
+ }>;
6374
+ count: z.ZodNumber;
6375
+ severity: z.ZodOptional<z.ZodEnum<{
6376
+ error: "error";
6377
+ warning: "warning";
6378
+ }>>;
6379
+ }, z.core.$strip>>;
6380
+ findings: z.ZodArray<z.ZodObject<{
6381
+ ruleId: z.ZodString;
6382
+ rule: z.ZodString;
6383
+ file: z.ZodString;
6384
+ line: z.ZodOptional<z.ZodNumber>;
6385
+ detail: z.ZodString;
6386
+ cause: z.ZodString;
6387
+ fix: z.ZodString;
6388
+ example: z.ZodString;
6389
+ doc: z.ZodString;
6390
+ docUrl: z.ZodString;
6391
+ templateFile: z.ZodOptional<z.ZodString>;
6392
+ severity: z.ZodOptional<z.ZodEnum<{
6393
+ error: "error";
6394
+ warning: "warning";
6395
+ }>>;
6396
+ }, z.core.$strip>>;
6397
+ message: z.ZodString;
6398
+ nextSteps: z.ZodArray<z.ZodString>;
6399
+ }, z.core.$strip>>;
6400
+ queuedAt: z.ZodString;
6401
+ startedAt: z.ZodNullable<z.ZodString>;
6402
+ finishedAt: z.ZodNullable<z.ZodString>;
6403
+ durationMs: z.ZodNullable<z.ZodNumber>;
6404
+ }, z.core.$strip>;
6405
+ }, z.core.$strip>;
6406
+ export type StorefrontVersionCreated = z.infer<typeof storefrontVersionCreatedSchema>;
6407
+ /**
6408
+ * `POST /v1/storefront/site/editing/preview-link` — 편집 미리보기(dev 서버) 링크. 콘솔에서 로그인한 OWNER·ADMIN만
6409
+ * 받는다(PAT·에이전트 불가). 5분 안에 열면 그 브라우저에 미리보기 호스트 전용 쿠키(12시간)가 생긴다. 편집 환경이
6410
+ * 없으면 409 `EDIT_SESSION_REQUIRED`다(편집 환경이 `STARTING`이면 링크는 주고, 미리보기 화면이 기동 대기를 보여 준다).
6411
+ */
6412
+ export declare const createStorefrontEditPreviewLinkRequestSchema: z.ZodObject<{
6413
+ path: z.ZodOptional<z.ZodString>;
6414
+ }, z.core.$strip>;
6415
+ export type CreateStorefrontEditPreviewLinkRequest = CreateStorefrontPreviewLinkRequest;
6501
6416
  //#endregion
6502
6417
  //#region src/schemas/upload.d.ts
6503
6418
  /**
@@ -6505,13 +6420,10 @@ export type StorefrontPreviewLink = z.infer<typeof storefrontPreviewLinkSchema>;
6505
6420
  *
6506
6421
  * - `product-image`: 상품 목록·상세의 상품 이미지. 목록 썸네일로 쓰이므로 정지 이미지만 받는다.
6507
6422
  * - `description`: 상세설명 본문에 삽입하는 미디어. 동영상과 svg도 받는다.
6508
- * - `digital-asset`: 파일 다운로드 상품의 판매 파일(이슈 #48). **비공개 객체**로 올라가고 공개 주소가 없다 — 구매자는 제공된
6509
- * 주문상품에서 수명 300초의 서명 주소로만 받는다.
6510
6423
  */
6511
6424
  export declare const uploadPurposeSchema: z.ZodEnum<{
6512
6425
  "product-image": "product-image";
6513
6426
  description: "description";
6514
- "digital-asset": "digital-asset";
6515
6427
  }>;
6516
6428
  export type UploadPurpose = z.infer<typeof uploadPurposeSchema>;
6517
6429
  export interface UploadPurposeLimit {
@@ -6526,8 +6438,6 @@ export interface UploadPurposeLimit {
6526
6438
  * 직접 PUT되므로 이 검사는 셀러가 올리기 전에 알게 하는 장치이고, 실제 상한은 CDN이 강제한다.
6527
6439
  */
6528
6440
  export declare const UPLOAD_PURPOSE_LIMITS: Record<UploadPurpose, UploadPurposeLimit>;
6529
- /** 비공개 업로드(판매 파일)의 PUT 필수 헤더 — CDN이 이 값으로 공개 조회를 막는다 */
6530
- export declare const PRIVATE_UPLOAD_HEADERS: Readonly<Record<string, string>>;
6531
6441
  /** 파일명의 소문자 확장자. 확장자가 없으면 `""` */
6532
6442
  export declare function uploadExtensionOf(filename: string): string;
6533
6443
  export interface UploadRejection {
@@ -6553,7 +6463,6 @@ export declare const uploadRequestSchema: z.ZodObject<{
6553
6463
  purpose: z.ZodDefault<z.ZodEnum<{
6554
6464
  "product-image": "product-image";
6555
6465
  description: "description";
6556
- "digital-asset": "digital-asset";
6557
6466
  }>>;
6558
6467
  size: z.ZodOptional<z.ZodNumber>;
6559
6468
  }, z.core.$strip>;
@@ -6561,8 +6470,6 @@ export type UploadRequest = z.infer<typeof uploadRequestSchema>;
6561
6470
  export declare const uploadTicketSchema: z.ZodObject<{
6562
6471
  url: z.ZodURL;
6563
6472
  uploadUrl: z.ZodURL;
6564
- key: z.ZodOptional<z.ZodString>;
6565
- headers: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
6566
6473
  }, z.core.$strip>;
6567
6474
  export type UploadTicket = z.infer<typeof uploadTicketSchema>;
6568
6475
  //#endregion
@@ -6844,8 +6751,6 @@ export declare function createStoreClient(options: StoreClientOptions): {
6844
6751
  create: (body: UploadRequest) => Promise<{
6845
6752
  url: string;
6846
6753
  uploadUrl: string;
6847
- headers: Record<string, string>;
6848
- key?: string | undefined;
6849
6754
  }>;
6850
6755
  /**
6851
6756
  * 자리 발급 + 바이트 PUT을 한 번에 — 끝나면 `url`이 공개 주소다.
@@ -6923,29 +6828,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
6923
6828
  returnAddressId: string | null;
6924
6829
  };
6925
6830
  } | {
6926
- type: "DOWNLOAD";
6927
- download: {
6928
- limit: number;
6929
- days: number;
6930
- stockTracking: boolean;
6931
- withdrawalRestricted: boolean;
6932
- };
6933
- } | {
6934
- type: "CODE";
6935
- code: {
6936
- mode: "AUTO" | "MANUAL";
6937
- withdrawalRestricted: boolean;
6938
- };
6939
- } | {
6940
- type: "SERVICE";
6941
- service: {
6942
- mode: "AUTO" | "MANUAL";
6943
- };
6944
- } | {
6945
- type: "PICKUP";
6946
- pickup: {
6947
- addressId: string | null;
6948
- };
6831
+ type: "MANUAL";
6949
6832
  };
6950
6833
  fulfillmentTypeLocked: boolean;
6951
6834
  refundPolicy: {
@@ -7017,29 +6900,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7017
6900
  returnAddressId: string | null;
7018
6901
  };
7019
6902
  } | {
7020
- type: "DOWNLOAD";
7021
- download: {
7022
- limit: number;
7023
- days: number;
7024
- stockTracking: boolean;
7025
- withdrawalRestricted: boolean;
7026
- };
7027
- } | {
7028
- type: "CODE";
7029
- code: {
7030
- mode: "AUTO" | "MANUAL";
7031
- withdrawalRestricted: boolean;
7032
- };
7033
- } | {
7034
- type: "SERVICE";
7035
- service: {
7036
- mode: "AUTO" | "MANUAL";
7037
- };
7038
- } | {
7039
- type: "PICKUP";
7040
- pickup: {
7041
- addressId: string | null;
7042
- };
6903
+ type: "MANUAL";
7043
6904
  };
7044
6905
  fulfillmentTypeLocked: boolean;
7045
6906
  refundPolicy: {
@@ -7111,29 +6972,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7111
6972
  returnAddressId: string | null;
7112
6973
  };
7113
6974
  } | {
7114
- type: "DOWNLOAD";
7115
- download: {
7116
- limit: number;
7117
- days: number;
7118
- stockTracking: boolean;
7119
- withdrawalRestricted: boolean;
7120
- };
7121
- } | {
7122
- type: "CODE";
7123
- code: {
7124
- mode: "AUTO" | "MANUAL";
7125
- withdrawalRestricted: boolean;
7126
- };
7127
- } | {
7128
- type: "SERVICE";
7129
- service: {
7130
- mode: "AUTO" | "MANUAL";
7131
- };
7132
- } | {
7133
- type: "PICKUP";
7134
- pickup: {
7135
- addressId: string | null;
7136
- };
6975
+ type: "MANUAL";
7137
6976
  };
7138
6977
  fulfillmentTypeLocked: boolean;
7139
6978
  refundPolicy: {
@@ -7251,110 +7090,6 @@ export declare function createStoreClient(options: StoreClientOptions): {
7251
7090
  endAt: string | null;
7252
7091
  }>;
7253
7092
  removeDiscount: (productId: string) => Promise<void>;
7254
- /**
7255
- * 코드 일괄 업로드 (이슈 #48) — 코드 발급·자동 제공 상품의 코드 풀에 올린다. `codes`와 `csv` 중 하나만 보낸다.
7256
- * 받은 코드 수만큼 재고가 는다. 에러: 409 `NOT_CODE_PRODUCT`·`CODE_POOL_NOT_USED`·`CODE_UPLOAD_CONFLICT`, 400 `TOO_MANY_CODES`
7257
- */
7258
- uploadCodes: (productId: string, body: FulfillmentCodeUploadRequest, idempotencyKey?: string) => Promise<{
7259
- batchId: string;
7260
- productId: string;
7261
- variantId: string;
7262
- total: number;
7263
- accepted: number;
7264
- duplicates: number;
7265
- rejected: {
7266
- line: number;
7267
- reason: string;
7268
- }[];
7269
- expiresAt: string | null;
7270
- createdAt: string;
7271
- }>;
7272
- /** 코드 목록 — 가린 값(`hint`)만 싣는다. `available`은 필터와 무관한 판매 가능 코드 수다 */
7273
- listCodes: (productId: string, params?: PageParams & Omit<z.input<typeof fulfillmentCodeListQuerySchema>, "page" | "size">) => Promise<{
7274
- page: number;
7275
- size: number;
7276
- totalElements: number;
7277
- totalPages: number;
7278
- contents: {
7279
- codeId: string;
7280
- productId: string;
7281
- variantId: string;
7282
- batchId: string | null;
7283
- hint: string;
7284
- status: string;
7285
- orderItemId: string | null;
7286
- assignedAt: string | null;
7287
- revealedAt: string | null;
7288
- expiresAt: string | null;
7289
- createdAt: string;
7290
- }[];
7291
- available: number;
7292
- }>;
7293
- /** 판매 가능 코드 폐기 — 재고가 1 준다. 배정된 코드는 409 `CODE_NOT_AVAILABLE` */
7294
- voidCode: (productId: string, codeId: string) => Promise<{
7295
- codeId: string;
7296
- productId: string;
7297
- variantId: string;
7298
- batchId: string | null;
7299
- hint: string;
7300
- status: string;
7301
- orderItemId: string | null;
7302
- assignedAt: string | null;
7303
- revealedAt: string | null;
7304
- expiresAt: string | null;
7305
- createdAt: string;
7306
- }>;
7307
- /**
7308
- * 판매 파일 연결 (이슈 #48) — `uploads.create({ purpose: "digital-asset" })`로 받은 `key`에 파일을 올린 뒤 연결한다.
7309
- * 이후 주문부터 이 파일을 준다. 에러: 400 `INVALID_ASSET_KEY`, 409 `NOT_DOWNLOAD_PRODUCT`·`ASSET_ALREADY_ATTACHED`
7310
- */
7311
- attachDigitalAsset: (productId: string, body: DigitalAssetAttachRequest) => Promise<{
7312
- assetId: string;
7313
- productId: string;
7314
- variantId: string | null;
7315
- fileName: string;
7316
- contentType: string | null;
7317
- sizeBytes: number | null;
7318
- status: string;
7319
- createdAt: string;
7320
- }>;
7321
- /** 판매 파일 목록 — 해제한 파일도 싣는다. 객체 키·주소는 없다 */
7322
- listDigitalAssets: (productId: string) => Promise<{
7323
- assetId: string;
7324
- productId: string;
7325
- variantId: string | null;
7326
- fileName: string;
7327
- contentType: string | null;
7328
- sizeBytes: number | null;
7329
- status: string;
7330
- createdAt: string;
7331
- }[]>;
7332
- /** 판매 파일 해제 — 새 주문에 주지 않는다. 이미 산 구매자는 계속 받는다 */
7333
- removeDigitalAsset: (productId: string, assetId: string) => Promise<{
7334
- assetId: string;
7335
- productId: string;
7336
- variantId: string | null;
7337
- fileName: string;
7338
- contentType: string | null;
7339
- sizeBytes: number | null;
7340
- status: string;
7341
- createdAt: string;
7342
- }>;
7343
- /** 판매 파일 확인 주소 — 수명 300초의 서명 주소 */
7344
- previewDigitalAsset: (productId: string, assetId: string) => Promise<{
7345
- url: string;
7346
- expiresAt: string;
7347
- }>;
7348
- };
7349
- fulfillmentCodes: {
7350
- /**
7351
- * 코드 평문 열람 — 콘솔에서 로그인한 OWNER·ADMIN만 된다(403 `INSUFFICIENT_ROLE`). 열람 기록과 감사 로그가 남는다.
7352
- * 평문은 화면에 보인 뒤 저장하지 않는다
7353
- */
7354
- reveal: (codeId: string) => Promise<{
7355
- codeId: string;
7356
- code: string;
7357
- }>;
7358
7093
  };
7359
7094
  categories: {
7360
7095
  list: (params?: {
@@ -7585,7 +7320,6 @@ export declare function createStoreClient(options: StoreClientOptions): {
7585
7320
  updatedAt: string;
7586
7321
  } | null;
7587
7322
  };
7588
- withdrawalAgreedAt: string | null;
7589
7323
  testPayment: boolean;
7590
7324
  items: {
7591
7325
  orderItemId: string;
@@ -7604,29 +7338,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7604
7338
  returnAddressId: string | null;
7605
7339
  };
7606
7340
  } | {
7607
- type: "DOWNLOAD";
7608
- download: {
7609
- limit: number;
7610
- days: number;
7611
- stockTracked: boolean;
7612
- withdrawalRestricted: boolean;
7613
- };
7614
- } | {
7615
- type: "CODE";
7616
- code: {
7617
- mode: string;
7618
- withdrawalRestricted: boolean;
7619
- };
7620
- } | {
7621
- type: "SERVICE";
7622
- service: {
7623
- mode: string;
7624
- };
7625
- } | {
7626
- type: "PICKUP";
7627
- pickup: {
7628
- addressId: string | null;
7629
- };
7341
+ type: "MANUAL";
7630
7342
  };
7631
7343
  quantity: number;
7632
7344
  canceledQuantity: number;
@@ -7641,31 +7353,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
7641
7353
  } | null;
7642
7354
  fulfillment: {
7643
7355
  status: string;
7644
- mode: string | null;
7645
7356
  fulfilledAt: string;
7646
7357
  note: string | null;
7647
- codes: {
7648
- codeId: string;
7649
- hint: string;
7650
- status: string;
7651
- revealedAt: string | null;
7652
- }[];
7653
- download: {
7654
- count: number;
7655
- limit: number;
7656
- expiresAt: string | null;
7657
- firstDownloadedAt: string | null;
7658
- files: {
7659
- assetId: string;
7660
- fileName: string;
7661
- sizeBytes: number | null;
7662
- }[];
7663
- } | null;
7664
- mail: {
7665
- status: string;
7666
- sentAt: string | null;
7667
- errorCode: string | null;
7668
- } | null;
7358
+ mode?: string | undefined;
7669
7359
  } | null;
7670
7360
  autoDecisionDate: string | null;
7671
7361
  sellerMemo: string | null;
@@ -7723,29 +7413,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7723
7413
  returnAddressId: string | null;
7724
7414
  };
7725
7415
  } | {
7726
- type: "DOWNLOAD";
7727
- download: {
7728
- limit: number;
7729
- days: number;
7730
- stockTracked: boolean;
7731
- withdrawalRestricted: boolean;
7732
- };
7733
- } | {
7734
- type: "CODE";
7735
- code: {
7736
- mode: string;
7737
- withdrawalRestricted: boolean;
7738
- };
7739
- } | {
7740
- type: "SERVICE";
7741
- service: {
7742
- mode: string;
7743
- };
7744
- } | {
7745
- type: "PICKUP";
7746
- pickup: {
7747
- addressId: string | null;
7748
- };
7416
+ type: "MANUAL";
7749
7417
  };
7750
7418
  quantity: number;
7751
7419
  canceledQuantity: number;
@@ -7760,31 +7428,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
7760
7428
  } | null;
7761
7429
  fulfillment: {
7762
7430
  status: string;
7763
- mode: string | null;
7764
7431
  fulfilledAt: string;
7765
7432
  note: string | null;
7766
- codes: {
7767
- codeId: string;
7768
- hint: string;
7769
- status: string;
7770
- revealedAt: string | null;
7771
- }[];
7772
- download: {
7773
- count: number;
7774
- limit: number;
7775
- expiresAt: string | null;
7776
- firstDownloadedAt: string | null;
7777
- files: {
7778
- assetId: string;
7779
- fileName: string;
7780
- sizeBytes: number | null;
7781
- }[];
7782
- } | null;
7783
- mail: {
7784
- status: string;
7785
- sentAt: string | null;
7786
- errorCode: string | null;
7787
- } | null;
7433
+ mode?: string | undefined;
7788
7434
  } | null;
7789
7435
  autoDecisionDate: string | null;
7790
7436
  sellerMemo: string | null;
@@ -7870,29 +7516,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7870
7516
  returnAddressId: string | null;
7871
7517
  };
7872
7518
  } | {
7873
- type: "DOWNLOAD";
7874
- download: {
7875
- limit: number;
7876
- days: number;
7877
- stockTracked: boolean;
7878
- withdrawalRestricted: boolean;
7879
- };
7880
- } | {
7881
- type: "CODE";
7882
- code: {
7883
- mode: string;
7884
- withdrawalRestricted: boolean;
7885
- };
7886
- } | {
7887
- type: "SERVICE";
7888
- service: {
7889
- mode: string;
7890
- };
7891
- } | {
7892
- type: "PICKUP";
7893
- pickup: {
7894
- addressId: string | null;
7895
- };
7519
+ type: "MANUAL";
7896
7520
  };
7897
7521
  quantity: number;
7898
7522
  canceledQuantity: number;
@@ -7907,31 +7531,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
7907
7531
  } | null;
7908
7532
  fulfillment: {
7909
7533
  status: string;
7910
- mode: string | null;
7911
7534
  fulfilledAt: string;
7912
7535
  note: string | null;
7913
- codes: {
7914
- codeId: string;
7915
- hint: string;
7916
- status: string;
7917
- revealedAt: string | null;
7918
- }[];
7919
- download: {
7920
- count: number;
7921
- limit: number;
7922
- expiresAt: string | null;
7923
- firstDownloadedAt: string | null;
7924
- files: {
7925
- assetId: string;
7926
- fileName: string;
7927
- sizeBytes: number | null;
7928
- }[];
7929
- } | null;
7930
- mail: {
7931
- status: string;
7932
- sentAt: string | null;
7933
- errorCode: string | null;
7934
- } | null;
7536
+ mode?: string | undefined;
7935
7537
  } | null;
7936
7538
  autoDecisionDate: string | null;
7937
7539
  sellerMemo: string | null;
@@ -7952,14 +7554,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7952
7554
  }[];
7953
7555
  }>;
7954
7556
  /**
7955
- * 제공 안내 메일 재발송 (이슈 #48) — 제공된 주문상품의 안내 메일을 다시 보낸다. 주문상품당 하루 3회(429).
7956
- * 코드·파일 주소는 메일에 없다
7957
- */
7958
- resendFulfillmentMail: (orderItemId: string) => Promise<{
7959
- mailStatus: string;
7960
- }>;
7961
- /**
7962
- * 제공 처리 (이슈 #48) — 수동 제공 비실물 주문상품(이용권·방문 수령)을 `PAID`·`CONFIRMED`에서 제공 완료(`DELIVERED`)로
7557
+ * 제공 처리 (이슈 #48) — 배송 없는 주문상품(`MANUAL`)을 `PAID`·`CONFIRMED`에서 제공 완료(`DELIVERED`)로
7963
7558
  * 바꾼다. `note`는 구매자 주문 상세에 이용 안내로 실린다. 배송 상품은 409 `SHIPPING_REQUIRED`
7964
7559
  */
7965
7560
  fulfill: (orderItemId: string, body?: FulfillRequest, idempotencyKey?: string) => Promise<{
@@ -7979,29 +7574,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
7979
7574
  returnAddressId: string | null;
7980
7575
  };
7981
7576
  } | {
7982
- type: "DOWNLOAD";
7983
- download: {
7984
- limit: number;
7985
- days: number;
7986
- stockTracked: boolean;
7987
- withdrawalRestricted: boolean;
7988
- };
7989
- } | {
7990
- type: "CODE";
7991
- code: {
7992
- mode: string;
7993
- withdrawalRestricted: boolean;
7994
- };
7995
- } | {
7996
- type: "SERVICE";
7997
- service: {
7998
- mode: string;
7999
- };
8000
- } | {
8001
- type: "PICKUP";
8002
- pickup: {
8003
- addressId: string | null;
8004
- };
7577
+ type: "MANUAL";
8005
7578
  };
8006
7579
  quantity: number;
8007
7580
  canceledQuantity: number;
@@ -8016,31 +7589,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
8016
7589
  } | null;
8017
7590
  fulfillment: {
8018
7591
  status: string;
8019
- mode: string | null;
8020
7592
  fulfilledAt: string;
8021
7593
  note: string | null;
8022
- codes: {
8023
- codeId: string;
8024
- hint: string;
8025
- status: string;
8026
- revealedAt: string | null;
8027
- }[];
8028
- download: {
8029
- count: number;
8030
- limit: number;
8031
- expiresAt: string | null;
8032
- firstDownloadedAt: string | null;
8033
- files: {
8034
- assetId: string;
8035
- fileName: string;
8036
- sizeBytes: number | null;
8037
- }[];
8038
- } | null;
8039
- mail: {
8040
- status: string;
8041
- sentAt: string | null;
8042
- errorCode: string | null;
8043
- } | null;
7594
+ mode?: string | undefined;
8044
7595
  } | null;
8045
7596
  autoDecisionDate: string | null;
8046
7597
  sellerMemo: string | null;
@@ -10294,7 +9845,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10294
9845
  list: (params?: ApprovalListOptions) => Promise<{
10295
9846
  items: {
10296
9847
  approvalId: string;
10297
- status: "EXPIRED" | "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED";
9848
+ status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
10298
9849
  operationId: string;
10299
9850
  method: string;
10300
9851
  path: string;
@@ -10344,7 +9895,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10344
9895
  }>;
10345
9896
  get: (approvalId: string) => Promise<{
10346
9897
  approvalId: string;
10347
- status: "EXPIRED" | "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED";
9898
+ status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
10348
9899
  operationId: string;
10349
9900
  method: string;
10350
9901
  path: string;
@@ -10396,7 +9947,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10396
9947
  */
10397
9948
  approve: (approvalId: string, body?: ApprovalDecisionRequest) => Promise<{
10398
9949
  approvalId: string;
10399
- status: "EXPIRED" | "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED";
9950
+ status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
10400
9951
  operationId: string;
10401
9952
  method: string;
10402
9953
  path: string;
@@ -10444,7 +9995,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10444
9995
  }>;
10445
9996
  reject: (approvalId: string, body?: ApprovalDecisionRequest) => Promise<{
10446
9997
  approvalId: string;
10447
- status: "EXPIRED" | "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED";
9998
+ status: "PENDING" | "FAILED" | "SUCCEEDED" | "EXECUTING" | "UNKNOWN" | "REJECTED" | "EXPIRED";
10448
9999
  operationId: string;
10449
10000
  method: string;
10450
10001
  path: string;
@@ -10541,7 +10092,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10541
10092
  sellerAddresses: {
10542
10093
  list: (type?: AddressType) => Promise<{
10543
10094
  addressId: string;
10544
- type: "SHIPPING" | "PICKUP" | "RETURN";
10095
+ type: "SHIPPING" | "RETURN";
10545
10096
  name: string;
10546
10097
  isDefault: boolean;
10547
10098
  contactName: string;
@@ -10576,6 +10127,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10576
10127
  get: () => Promise<{
10577
10128
  enabled: boolean;
10578
10129
  domain: string;
10130
+ editingEnabled: boolean;
10579
10131
  site: {
10580
10132
  siteId: string;
10581
10133
  slug: string;
@@ -10601,6 +10153,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
10601
10153
  published: boolean;
10602
10154
  publishedAt: string | null;
10603
10155
  message: string | null;
10156
+ source: "TEMPLATE" | "EDIT";
10157
+ buildId: string | null;
10604
10158
  createdByType: string;
10605
10159
  createdAt: string;
10606
10160
  } | null;
@@ -10609,6 +10163,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
10609
10163
  lastErrorCode: string | null;
10610
10164
  syncedAt: string | null;
10611
10165
  };
10166
+ editPreview: {
10167
+ hostname: string | null;
10168
+ };
10612
10169
  slugChangesRemaining: number;
10613
10170
  createdAt: string;
10614
10171
  updatedAt: string;
@@ -10646,6 +10203,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
10646
10203
  published: boolean;
10647
10204
  publishedAt: string | null;
10648
10205
  message: string | null;
10206
+ source: "TEMPLATE" | "EDIT";
10207
+ buildId: string | null;
10649
10208
  createdByType: string;
10650
10209
  createdAt: string;
10651
10210
  } | null;
@@ -10654,6 +10213,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
10654
10213
  lastErrorCode: string | null;
10655
10214
  syncedAt: string | null;
10656
10215
  };
10216
+ editPreview: {
10217
+ hostname: string | null;
10218
+ };
10657
10219
  slugChangesRemaining: number;
10658
10220
  createdAt: string;
10659
10221
  updatedAt: string;
@@ -10684,6 +10246,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
10684
10246
  published: boolean;
10685
10247
  publishedAt: string | null;
10686
10248
  message: string | null;
10249
+ source: "TEMPLATE" | "EDIT";
10250
+ buildId: string | null;
10687
10251
  createdByType: string;
10688
10252
  createdAt: string;
10689
10253
  } | null;
@@ -10692,6 +10256,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
10692
10256
  lastErrorCode: string | null;
10693
10257
  syncedAt: string | null;
10694
10258
  };
10259
+ editPreview: {
10260
+ hostname: string | null;
10261
+ };
10695
10262
  slugChangesRemaining: number;
10696
10263
  createdAt: string;
10697
10264
  updatedAt: string;
@@ -10706,6 +10273,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
10706
10273
  published: boolean;
10707
10274
  publishedAt: string | null;
10708
10275
  message: string | null;
10276
+ source: "TEMPLATE" | "EDIT";
10277
+ buildId: string | null;
10709
10278
  createdByType: string;
10710
10279
  createdAt: string;
10711
10280
  }[]>;
@@ -10735,6 +10304,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
10735
10304
  published: boolean;
10736
10305
  publishedAt: string | null;
10737
10306
  message: string | null;
10307
+ source: "TEMPLATE" | "EDIT";
10308
+ buildId: string | null;
10738
10309
  createdByType: string;
10739
10310
  createdAt: string;
10740
10311
  } | null;
@@ -10743,6 +10314,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
10743
10314
  lastErrorCode: string | null;
10744
10315
  syncedAt: string | null;
10745
10316
  };
10317
+ editPreview: {
10318
+ hostname: string | null;
10319
+ };
10746
10320
  slugChangesRemaining: number;
10747
10321
  createdAt: string;
10748
10322
  updatedAt: string;
@@ -10773,6 +10347,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
10773
10347
  published: boolean;
10774
10348
  publishedAt: string | null;
10775
10349
  message: string | null;
10350
+ source: "TEMPLATE" | "EDIT";
10351
+ buildId: string | null;
10776
10352
  createdByType: string;
10777
10353
  createdAt: string;
10778
10354
  } | null;
@@ -10781,6 +10357,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
10781
10357
  lastErrorCode: string | null;
10782
10358
  syncedAt: string | null;
10783
10359
  };
10360
+ editPreview: {
10361
+ hostname: string | null;
10362
+ };
10784
10363
  slugChangesRemaining: number;
10785
10364
  createdAt: string;
10786
10365
  updatedAt: string;
@@ -10811,6 +10390,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
10811
10390
  published: boolean;
10812
10391
  publishedAt: string | null;
10813
10392
  message: string | null;
10393
+ source: "TEMPLATE" | "EDIT";
10394
+ buildId: string | null;
10814
10395
  createdByType: string;
10815
10396
  createdAt: string;
10816
10397
  } | null;
@@ -10819,6 +10400,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
10819
10400
  lastErrorCode: string | null;
10820
10401
  syncedAt: string | null;
10821
10402
  };
10403
+ editPreview: {
10404
+ hostname: string | null;
10405
+ };
10822
10406
  slugChangesRemaining: number;
10823
10407
  createdAt: string;
10824
10408
  updatedAt: string;
@@ -10849,6 +10433,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
10849
10433
  published: boolean;
10850
10434
  publishedAt: string | null;
10851
10435
  message: string | null;
10436
+ source: "TEMPLATE" | "EDIT";
10437
+ buildId: string | null;
10852
10438
  createdByType: string;
10853
10439
  createdAt: string;
10854
10440
  } | null;
@@ -10857,6 +10443,9 @@ export declare function createStoreClient(options: StoreClientOptions): {
10857
10443
  lastErrorCode: string | null;
10858
10444
  syncedAt: string | null;
10859
10445
  };
10446
+ editPreview: {
10447
+ hostname: string | null;
10448
+ };
10860
10449
  slugChangesRemaining: number;
10861
10450
  createdAt: string;
10862
10451
  updatedAt: string;
@@ -10895,6 +10484,8 @@ export declare function createStoreClient(options: StoreClientOptions): {
10895
10484
  published: boolean;
10896
10485
  publishedAt: string | null;
10897
10486
  message: string | null;
10487
+ source: "TEMPLATE" | "EDIT";
10488
+ buildId: string | null;
10898
10489
  createdByType: string;
10899
10490
  createdAt: string;
10900
10491
  } | null;
@@ -10903,10 +10494,389 @@ export declare function createStoreClient(options: StoreClientOptions): {
10903
10494
  lastErrorCode: string | null;
10904
10495
  syncedAt: string | null;
10905
10496
  };
10497
+ editPreview: {
10498
+ hostname: string | null;
10499
+ };
10906
10500
  slugChangesRemaining: number;
10907
10501
  createdAt: string;
10908
10502
  updatedAt: string;
10909
10503
  }>;
10504
+ /** `GET /v1/storefront/site/editing` — 편집 환경 상태(열린 환경·동시 상한·미리보기 인증서) */
10505
+ getEditing: () => Promise<{
10506
+ enabled: boolean;
10507
+ session: {
10508
+ sessionId: string;
10509
+ status: "STARTING" | "RUNNING";
10510
+ startStage: string | null;
10511
+ startedAt: string;
10512
+ lastEditedAt: string | null;
10513
+ lastActiveAt: string;
10514
+ idleExpiresAt: string;
10515
+ closesAt: string;
10516
+ } | null;
10517
+ capacity: {
10518
+ limit: number;
10519
+ inUse: number;
10520
+ };
10521
+ preview: {
10522
+ hostname: string | null;
10523
+ };
10524
+ workingTree: {
10525
+ modified: boolean;
10526
+ lastEditedAt: string | null;
10527
+ };
10528
+ }>;
10529
+ /**
10530
+ * `POST /v1/storefront/site/editing` — 편집 환경을 연다(이미 열려 있으면 그대로). 플랫폼 동시 상한에 걸리면 409
10531
+ * `EDIT_CAPACITY_FULL`(`details.retryAfterSeconds`). 띄우는 데 보통 30초가 걸린다(`session.status: STARTING`)
10532
+ */
10533
+ startEditing: () => Promise<{
10534
+ enabled: boolean;
10535
+ session: {
10536
+ sessionId: string;
10537
+ status: "STARTING" | "RUNNING";
10538
+ startStage: string | null;
10539
+ startedAt: string;
10540
+ lastEditedAt: string | null;
10541
+ lastActiveAt: string;
10542
+ idleExpiresAt: string;
10543
+ closesAt: string;
10544
+ } | null;
10545
+ capacity: {
10546
+ limit: number;
10547
+ inUse: number;
10548
+ };
10549
+ preview: {
10550
+ hostname: string | null;
10551
+ };
10552
+ workingTree: {
10553
+ modified: boolean;
10554
+ lastEditedAt: string | null;
10555
+ };
10556
+ }>;
10557
+ /** `DELETE /v1/storefront/site/editing` — 편집 환경을 닫는다(작업 트리는 보존된다) */
10558
+ stopEditing: () => Promise<{
10559
+ enabled: boolean;
10560
+ session: {
10561
+ sessionId: string;
10562
+ status: "STARTING" | "RUNNING";
10563
+ startStage: string | null;
10564
+ startedAt: string;
10565
+ lastEditedAt: string | null;
10566
+ lastActiveAt: string;
10567
+ idleExpiresAt: string;
10568
+ closesAt: string;
10569
+ } | null;
10570
+ capacity: {
10571
+ limit: number;
10572
+ inUse: number;
10573
+ };
10574
+ preview: {
10575
+ hostname: string | null;
10576
+ };
10577
+ workingTree: {
10578
+ modified: boolean;
10579
+ lastEditedAt: string | null;
10580
+ };
10581
+ }>;
10582
+ /**
10583
+ * `POST /v1/storefront/site/editing/preview-link` — 편집 미리보기(dev 서버) 5분짜리 링크.
10584
+ * 콘솔에서 로그인한 OWNER·ADMIN만 받는다(에이전트 불가)
10585
+ */
10586
+ createEditPreviewLink: (body?: CreateStorefrontEditPreviewLinkRequest) => Promise<{
10587
+ url: string;
10588
+ expiresAt: string;
10589
+ }>;
10590
+ /** `GET /v1/storefront/site/files?prefix=` — 작업 트리 파일 목록 */
10591
+ listFiles: (params?: {
10592
+ prefix?: string;
10593
+ }) => Promise<{
10594
+ files: {
10595
+ path: string;
10596
+ size: number;
10597
+ hash: string;
10598
+ }[];
10599
+ totalBytes: number;
10600
+ }>;
10601
+ /** `GET /v1/storefront/site/files/content?path=` — 파일 하나 읽기 */
10602
+ readFile: (filePath: string) => Promise<{
10603
+ path: string;
10604
+ content: string;
10605
+ encoding: "utf8" | "base64";
10606
+ hash: string;
10607
+ size: number;
10608
+ }>;
10609
+ /**
10610
+ * `POST /v1/storefront/site/files/batch` — 여러 파일 쓰기(해시 조건). 조건이 하나라도 어긋나면 아무것도 쓰지 않고 409
10611
+ * `FILE_CHANGED`(`details.conflicts`). 편집 환경이 없으면 연다
10612
+ */
10613
+ writeFiles: (body: WriteStorefrontFilesRequest) => Promise<{
10614
+ files: {
10615
+ path: string;
10616
+ size: number;
10617
+ hash: string;
10618
+ }[];
10619
+ }>;
10620
+ /** `POST /v1/storefront/site/files/delete` */
10621
+ deleteFile: (body: DeleteStorefrontFileRequest) => Promise<{
10622
+ path: string;
10623
+ deleted: boolean;
10624
+ }>;
10625
+ /** `POST /v1/storefront/site/files/move` */
10626
+ moveFile: (body: MoveStorefrontFileRequest) => Promise<{
10627
+ from: string;
10628
+ to: string;
10629
+ hash: string;
10630
+ size: number;
10631
+ }>;
10632
+ /** `POST /v1/storefront/site/files/search` — 내용 검색 */
10633
+ searchFiles: (body: SearchStorefrontFilesRequest) => Promise<{
10634
+ matches: {
10635
+ path: string;
10636
+ line: number;
10637
+ text: string;
10638
+ column?: number | undefined;
10639
+ }[];
10640
+ truncated: boolean;
10641
+ }>;
10642
+ /**
10643
+ * `POST /v1/storefront/site/checks` (202) — 타입 검사·lint·test 하나를 시작한다. 결과는 `getCheck`로 끝날 때까지 조회한다
10644
+ * (`STOREFRONT_CHECK_TERMINAL_STATUSES`)
10645
+ */
10646
+ runCheck: (body: RunStorefrontCheckRequest) => Promise<{
10647
+ checkId: string;
10648
+ check: string;
10649
+ status: "FAILED" | "UNKNOWN" | "RUNNING" | "QUEUED" | "PASSED" | "TIMED_OUT";
10650
+ exitCode: number | null;
10651
+ durationMs: number | null;
10652
+ outputTail: string | null;
10653
+ errorCode: string | null;
10654
+ message: string | null;
10655
+ createdAt: string;
10656
+ startedAt: string | null;
10657
+ finishedAt: string | null;
10658
+ }>;
10659
+ /** `GET /v1/storefront/site/checks/{checkId}` — 검사 상태·종료 코드·출력 꼬리 */
10660
+ getCheck: (checkId: string) => Promise<{
10661
+ checkId: string;
10662
+ check: string;
10663
+ status: "FAILED" | "UNKNOWN" | "RUNNING" | "QUEUED" | "PASSED" | "TIMED_OUT";
10664
+ exitCode: number | null;
10665
+ durationMs: number | null;
10666
+ outputTail: string | null;
10667
+ errorCode: string | null;
10668
+ message: string | null;
10669
+ createdAt: string;
10670
+ startedAt: string | null;
10671
+ finishedAt: string | null;
10672
+ }>;
10673
+ /** `POST /v1/storefront/site/verify` — 작업 트리 규칙 검증(`verify_storefront`와 같은 보고서) */
10674
+ verify: () => Promise<{
10675
+ ok: boolean;
10676
+ checkedFiles: number;
10677
+ summary: {
10678
+ rules: number;
10679
+ passed: number;
10680
+ violated: number;
10681
+ findings: number;
10682
+ };
10683
+ results: {
10684
+ ruleId: string;
10685
+ status: "pass" | "violation";
10686
+ count: number;
10687
+ severity?: "error" | "warning" | undefined;
10688
+ }[];
10689
+ findings: {
10690
+ ruleId: string;
10691
+ rule: string;
10692
+ file: string;
10693
+ detail: string;
10694
+ cause: string;
10695
+ fix: string;
10696
+ example: string;
10697
+ doc: string;
10698
+ docUrl: string;
10699
+ line?: number | undefined;
10700
+ templateFile?: string | undefined;
10701
+ severity?: "error" | "warning" | undefined;
10702
+ }[];
10703
+ message: string;
10704
+ nextSteps: string[];
10705
+ }>;
10706
+ /**
10707
+ * `POST /v1/storefront/site/versions` (201) — 지금 작업 트리로 버전을 만든다(빌드 시작). 버전은 `BUILDING`, 빌드가
10708
+ * 끝나면 `READY` 또는 `FAILED`다
10709
+ */
10710
+ createVersion: (body?: CreateStorefrontVersionRequest) => Promise<{
10711
+ version: {
10712
+ versionId: string;
10713
+ number: number;
10714
+ templateId: string;
10715
+ templateVersion: string;
10716
+ status: "FAILED" | "BUILDING" | "READY";
10717
+ published: boolean;
10718
+ publishedAt: string | null;
10719
+ message: string | null;
10720
+ source: "TEMPLATE" | "EDIT";
10721
+ buildId: string | null;
10722
+ createdByType: string;
10723
+ createdAt: string;
10724
+ };
10725
+ build: {
10726
+ buildId: string;
10727
+ versionId: string;
10728
+ versionNumber: number;
10729
+ status: "FAILED" | "SUCCEEDED" | "RUNNING" | "QUEUED" | "TIMED_OUT";
10730
+ failureStage: string | null;
10731
+ errorCode: string | null;
10732
+ logTail: string | null;
10733
+ stages: {
10734
+ stage: string;
10735
+ ok: boolean;
10736
+ durationMs: number;
10737
+ }[];
10738
+ verify: {
10739
+ ok: boolean;
10740
+ checkedFiles: number;
10741
+ summary: {
10742
+ rules: number;
10743
+ passed: number;
10744
+ violated: number;
10745
+ findings: number;
10746
+ };
10747
+ results: {
10748
+ ruleId: string;
10749
+ status: "pass" | "violation";
10750
+ count: number;
10751
+ severity?: "error" | "warning" | undefined;
10752
+ }[];
10753
+ findings: {
10754
+ ruleId: string;
10755
+ rule: string;
10756
+ file: string;
10757
+ detail: string;
10758
+ cause: string;
10759
+ fix: string;
10760
+ example: string;
10761
+ doc: string;
10762
+ docUrl: string;
10763
+ line?: number | undefined;
10764
+ templateFile?: string | undefined;
10765
+ severity?: "error" | "warning" | undefined;
10766
+ }[];
10767
+ message: string;
10768
+ nextSteps: string[];
10769
+ } | null;
10770
+ queuedAt: string;
10771
+ startedAt: string | null;
10772
+ finishedAt: string | null;
10773
+ durationMs: number | null;
10774
+ };
10775
+ }>;
10776
+ /** `GET /v1/storefront/site/builds?limit=` — 빌드 목록(최신 먼저) */
10777
+ listBuilds: (params?: {
10778
+ limit?: number;
10779
+ }) => Promise<{
10780
+ buildId: string;
10781
+ versionId: string;
10782
+ versionNumber: number;
10783
+ status: "FAILED" | "SUCCEEDED" | "RUNNING" | "QUEUED" | "TIMED_OUT";
10784
+ failureStage: string | null;
10785
+ errorCode: string | null;
10786
+ logTail: string | null;
10787
+ stages: {
10788
+ stage: string;
10789
+ ok: boolean;
10790
+ durationMs: number;
10791
+ }[];
10792
+ verify: {
10793
+ ok: boolean;
10794
+ checkedFiles: number;
10795
+ summary: {
10796
+ rules: number;
10797
+ passed: number;
10798
+ violated: number;
10799
+ findings: number;
10800
+ };
10801
+ results: {
10802
+ ruleId: string;
10803
+ status: "pass" | "violation";
10804
+ count: number;
10805
+ severity?: "error" | "warning" | undefined;
10806
+ }[];
10807
+ findings: {
10808
+ ruleId: string;
10809
+ rule: string;
10810
+ file: string;
10811
+ detail: string;
10812
+ cause: string;
10813
+ fix: string;
10814
+ example: string;
10815
+ doc: string;
10816
+ docUrl: string;
10817
+ line?: number | undefined;
10818
+ templateFile?: string | undefined;
10819
+ severity?: "error" | "warning" | undefined;
10820
+ }[];
10821
+ message: string;
10822
+ nextSteps: string[];
10823
+ } | null;
10824
+ queuedAt: string;
10825
+ startedAt: string | null;
10826
+ finishedAt: string | null;
10827
+ durationMs: number | null;
10828
+ }[]>;
10829
+ /** `GET /v1/storefront/site/builds/{buildId}` — 빌드 상태·실패 단계·로그 꼬리·규칙 결과 */
10830
+ getBuild: (buildId: string) => Promise<{
10831
+ buildId: string;
10832
+ versionId: string;
10833
+ versionNumber: number;
10834
+ status: "FAILED" | "SUCCEEDED" | "RUNNING" | "QUEUED" | "TIMED_OUT";
10835
+ failureStage: string | null;
10836
+ errorCode: string | null;
10837
+ logTail: string | null;
10838
+ stages: {
10839
+ stage: string;
10840
+ ok: boolean;
10841
+ durationMs: number;
10842
+ }[];
10843
+ verify: {
10844
+ ok: boolean;
10845
+ checkedFiles: number;
10846
+ summary: {
10847
+ rules: number;
10848
+ passed: number;
10849
+ violated: number;
10850
+ findings: number;
10851
+ };
10852
+ results: {
10853
+ ruleId: string;
10854
+ status: "pass" | "violation";
10855
+ count: number;
10856
+ severity?: "error" | "warning" | undefined;
10857
+ }[];
10858
+ findings: {
10859
+ ruleId: string;
10860
+ rule: string;
10861
+ file: string;
10862
+ detail: string;
10863
+ cause: string;
10864
+ fix: string;
10865
+ example: string;
10866
+ doc: string;
10867
+ docUrl: string;
10868
+ line?: number | undefined;
10869
+ templateFile?: string | undefined;
10870
+ severity?: "error" | "warning" | undefined;
10871
+ }[];
10872
+ message: string;
10873
+ nextSteps: string[];
10874
+ } | null;
10875
+ queuedAt: string;
10876
+ startedAt: string | null;
10877
+ finishedAt: string | null;
10878
+ durationMs: number | null;
10879
+ }>;
10910
10880
  };
10911
10881
  store: {
10912
10882
  get: () => Promise<{
@@ -10921,8 +10891,6 @@ export declare function createStoreClient(options: StoreClientOptions): {
10921
10891
  analyticsAllowedOrigins: string[];
10922
10892
  storefrontOrigins: string[];
10923
10893
  guestCheckoutEnabled: boolean;
10924
- fulfillmentMailEnabled: boolean;
10925
- withdrawalNotice: string | null;
10926
10894
  autoDeliverDays: number;
10927
10895
  autoConfirmDays: number;
10928
10896
  refundPolicy: {
@@ -10964,8 +10932,6 @@ export declare function createStoreClient(options: StoreClientOptions): {
10964
10932
  analyticsAllowedOrigins: string[];
10965
10933
  storefrontOrigins: string[];
10966
10934
  guestCheckoutEnabled: boolean;
10967
- fulfillmentMailEnabled: boolean;
10968
- withdrawalNotice: string | null;
10969
10935
  autoDeliverDays: number;
10970
10936
  autoConfirmDays: number;
10971
10937
  refundPolicy: {
@@ -11012,7 +10978,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11012
10978
  invitationId: string;
11013
10979
  email: string;
11014
10980
  role: "ADMIN" | "STAFF";
11015
- status: "EXPIRED" | "PENDING" | "ACCEPTED" | "CANCELED";
10981
+ status: "PENDING" | "EXPIRED" | "ACCEPTED" | "CANCELED";
11016
10982
  invitedBy: string;
11017
10983
  expiresAt: string;
11018
10984
  createdAt: string;
@@ -11030,7 +10996,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11030
10996
  invitationId: string;
11031
10997
  email: string;
11032
10998
  role: "ADMIN" | "STAFF";
11033
- status: "EXPIRED" | "PENDING" | "ACCEPTED" | "CANCELED";
10999
+ status: "PENDING" | "EXPIRED" | "ACCEPTED" | "CANCELED";
11034
11000
  invitedBy: string;
11035
11001
  expiresAt: string;
11036
11002
  createdAt: string;
@@ -11045,7 +11011,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11045
11011
  invitationId: string;
11046
11012
  email: string;
11047
11013
  role: "ADMIN" | "STAFF";
11048
- status: "EXPIRED" | "PENDING" | "ACCEPTED" | "CANCELED";
11014
+ status: "PENDING" | "EXPIRED" | "ACCEPTED" | "CANCELED";
11049
11015
  invitedBy: string;
11050
11016
  expiresAt: string;
11051
11017
  createdAt: string;
@@ -11868,29 +11834,7 @@ export declare const orderWebhookEventDataSchema: z.ZodObject<{
11868
11834
  returnAddressId: z.ZodNullable<z.ZodString>;
11869
11835
  }, z.core.$strip>;
11870
11836
  }, z.core.$strip>, z.ZodObject<{
11871
- type: z.ZodLiteral<"DOWNLOAD">;
11872
- download: z.ZodObject<{
11873
- limit: z.ZodNumber;
11874
- days: z.ZodNumber;
11875
- stockTracked: z.ZodBoolean;
11876
- withdrawalRestricted: z.ZodBoolean;
11877
- }, z.core.$strip>;
11878
- }, z.core.$strip>, z.ZodObject<{
11879
- type: z.ZodLiteral<"CODE">;
11880
- code: z.ZodObject<{
11881
- mode: z.ZodString;
11882
- withdrawalRestricted: z.ZodBoolean;
11883
- }, z.core.$strip>;
11884
- }, z.core.$strip>, z.ZodObject<{
11885
- type: z.ZodLiteral<"SERVICE">;
11886
- service: z.ZodObject<{
11887
- mode: z.ZodString;
11888
- }, z.core.$strip>;
11889
- }, z.core.$strip>, z.ZodObject<{
11890
- type: z.ZodLiteral<"PICKUP">;
11891
- pickup: z.ZodObject<{
11892
- addressId: z.ZodNullable<z.ZodString>;
11893
- }, z.core.$strip>;
11837
+ type: z.ZodLiteral<"MANUAL">;
11894
11838
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
11895
11839
  type: z.ZodString;
11896
11840
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -11900,9 +11844,8 @@ export declare const orderWebhookEventDataSchema: z.ZodObject<{
11900
11844
  }, z.core.$strip>;
11901
11845
  export type OrderWebhookEventData = z.infer<typeof orderWebhookEventDataSchema>;
11902
11846
  /**
11903
- * `ORDER.FULFILLED` — 비실물 주문상품(파일·코드·이용권·방문 수령)을 제공했다(이슈 #48). 자동 제공은 결제 확정과 함께,
11904
- * 수동 제공은 셀러의 제공 처리(`POST /v1/order-items/{orderItemId}/fulfill`)로 온다. 기존 구독자를 위해 같은 순간
11905
- * `ORDER.DELIVERED`도 함께 보낸다. **코드·파일 주소는 싣지 않는다** — 관리 API로 조회한다.
11847
+ * `ORDER.FULFILLED` — 배송 없는 주문상품(`MANUAL`)을 제공했다(이슈 #48). 셀러의 제공 처리
11848
+ * (`POST /v1/order-items/{orderItemId}/fulfill`)로 온다. 기존 구독자를 위해 같은 순간 `ORDER.DELIVERED`도 함께 보낸다.
11906
11849
  */
11907
11850
  export declare const orderFulfilledWebhookEventDataSchema: z.ZodObject<{
11908
11851
  orderId: z.ZodString;
@@ -11924,38 +11867,16 @@ export declare const orderFulfilledWebhookEventDataSchema: z.ZodObject<{
11924
11867
  returnAddressId: z.ZodNullable<z.ZodString>;
11925
11868
  }, z.core.$strip>;
11926
11869
  }, z.core.$strip>, z.ZodObject<{
11927
- type: z.ZodLiteral<"DOWNLOAD">;
11928
- download: z.ZodObject<{
11929
- limit: z.ZodNumber;
11930
- days: z.ZodNumber;
11931
- stockTracked: z.ZodBoolean;
11932
- withdrawalRestricted: z.ZodBoolean;
11933
- }, z.core.$strip>;
11934
- }, z.core.$strip>, z.ZodObject<{
11935
- type: z.ZodLiteral<"CODE">;
11936
- code: z.ZodObject<{
11937
- mode: z.ZodString;
11938
- withdrawalRestricted: z.ZodBoolean;
11939
- }, z.core.$strip>;
11940
- }, z.core.$strip>, z.ZodObject<{
11941
- type: z.ZodLiteral<"SERVICE">;
11942
- service: z.ZodObject<{
11943
- mode: z.ZodString;
11944
- }, z.core.$strip>;
11945
- }, z.core.$strip>, z.ZodObject<{
11946
- type: z.ZodLiteral<"PICKUP">;
11947
- pickup: z.ZodObject<{
11948
- addressId: z.ZodNullable<z.ZodString>;
11949
- }, z.core.$strip>;
11870
+ type: z.ZodLiteral<"MANUAL">;
11950
11871
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
11951
11872
  type: z.ZodString;
11952
11873
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
11953
11874
  [x: string]: unknown;
11954
11875
  type: string;
11955
11876
  }>>]>;
11956
- fulfillment: z.ZodObject<{
11877
+ fulfillment: z.ZodOptional<z.ZodObject<{
11957
11878
  mode: z.ZodString;
11958
- }, z.core.$strip>;
11879
+ }, z.core.$strip>>;
11959
11880
  fulfilledAt: z.ZodString;
11960
11881
  testPayment: z.ZodBoolean;
11961
11882
  }, z.core.$strip>;
@@ -12076,29 +11997,7 @@ export declare const orderWebhookEventSchema: z.ZodObject<{
12076
11997
  returnAddressId: z.ZodNullable<z.ZodString>;
12077
11998
  }, z.core.$strip>;
12078
11999
  }, z.core.$strip>, z.ZodObject<{
12079
- type: z.ZodLiteral<"DOWNLOAD">;
12080
- download: z.ZodObject<{
12081
- limit: z.ZodNumber;
12082
- days: z.ZodNumber;
12083
- stockTracked: z.ZodBoolean;
12084
- withdrawalRestricted: z.ZodBoolean;
12085
- }, z.core.$strip>;
12086
- }, z.core.$strip>, z.ZodObject<{
12087
- type: z.ZodLiteral<"CODE">;
12088
- code: z.ZodObject<{
12089
- mode: z.ZodString;
12090
- withdrawalRestricted: z.ZodBoolean;
12091
- }, z.core.$strip>;
12092
- }, z.core.$strip>, z.ZodObject<{
12093
- type: z.ZodLiteral<"SERVICE">;
12094
- service: z.ZodObject<{
12095
- mode: z.ZodString;
12096
- }, z.core.$strip>;
12097
- }, z.core.$strip>, z.ZodObject<{
12098
- type: z.ZodLiteral<"PICKUP">;
12099
- pickup: z.ZodObject<{
12100
- addressId: z.ZodNullable<z.ZodString>;
12101
- }, z.core.$strip>;
12000
+ type: z.ZodLiteral<"MANUAL">;
12102
12001
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
12103
12002
  type: z.ZodString;
12104
12003
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -12133,38 +12032,16 @@ export declare const orderFulfilledWebhookEventSchema: z.ZodObject<{
12133
12032
  returnAddressId: z.ZodNullable<z.ZodString>;
12134
12033
  }, z.core.$strip>;
12135
12034
  }, z.core.$strip>, z.ZodObject<{
12136
- type: z.ZodLiteral<"DOWNLOAD">;
12137
- download: z.ZodObject<{
12138
- limit: z.ZodNumber;
12139
- days: z.ZodNumber;
12140
- stockTracked: z.ZodBoolean;
12141
- withdrawalRestricted: z.ZodBoolean;
12142
- }, z.core.$strip>;
12143
- }, z.core.$strip>, z.ZodObject<{
12144
- type: z.ZodLiteral<"CODE">;
12145
- code: z.ZodObject<{
12146
- mode: z.ZodString;
12147
- withdrawalRestricted: z.ZodBoolean;
12148
- }, z.core.$strip>;
12149
- }, z.core.$strip>, z.ZodObject<{
12150
- type: z.ZodLiteral<"SERVICE">;
12151
- service: z.ZodObject<{
12152
- mode: z.ZodString;
12153
- }, z.core.$strip>;
12154
- }, z.core.$strip>, z.ZodObject<{
12155
- type: z.ZodLiteral<"PICKUP">;
12156
- pickup: z.ZodObject<{
12157
- addressId: z.ZodNullable<z.ZodString>;
12158
- }, z.core.$strip>;
12035
+ type: z.ZodLiteral<"MANUAL">;
12159
12036
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
12160
12037
  type: z.ZodString;
12161
12038
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
12162
12039
  [x: string]: unknown;
12163
12040
  type: string;
12164
12041
  }>>]>;
12165
- fulfillment: z.ZodObject<{
12042
+ fulfillment: z.ZodOptional<z.ZodObject<{
12166
12043
  mode: z.ZodString;
12167
- }, z.core.$strip>;
12044
+ }, z.core.$strip>>;
12168
12045
  fulfilledAt: z.ZodString;
12169
12046
  testPayment: z.ZodBoolean;
12170
12047
  }, z.core.$strip>;
@@ -12320,29 +12197,7 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
12320
12197
  returnAddressId: z.ZodNullable<z.ZodString>;
12321
12198
  }, z.core.$strip>;
12322
12199
  }, z.core.$strip>, z.ZodObject<{
12323
- type: z.ZodLiteral<"DOWNLOAD">;
12324
- download: z.ZodObject<{
12325
- limit: z.ZodNumber;
12326
- days: z.ZodNumber;
12327
- stockTracked: z.ZodBoolean;
12328
- withdrawalRestricted: z.ZodBoolean;
12329
- }, z.core.$strip>;
12330
- }, z.core.$strip>, z.ZodObject<{
12331
- type: z.ZodLiteral<"CODE">;
12332
- code: z.ZodObject<{
12333
- mode: z.ZodString;
12334
- withdrawalRestricted: z.ZodBoolean;
12335
- }, z.core.$strip>;
12336
- }, z.core.$strip>, z.ZodObject<{
12337
- type: z.ZodLiteral<"SERVICE">;
12338
- service: z.ZodObject<{
12339
- mode: z.ZodString;
12340
- }, z.core.$strip>;
12341
- }, z.core.$strip>, z.ZodObject<{
12342
- type: z.ZodLiteral<"PICKUP">;
12343
- pickup: z.ZodObject<{
12344
- addressId: z.ZodNullable<z.ZodString>;
12345
- }, z.core.$strip>;
12200
+ type: z.ZodLiteral<"MANUAL">;
12346
12201
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
12347
12202
  type: z.ZodString;
12348
12203
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
@@ -12376,38 +12231,16 @@ export declare const webhookEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
12376
12231
  returnAddressId: z.ZodNullable<z.ZodString>;
12377
12232
  }, z.core.$strip>;
12378
12233
  }, z.core.$strip>, z.ZodObject<{
12379
- type: z.ZodLiteral<"DOWNLOAD">;
12380
- download: z.ZodObject<{
12381
- limit: z.ZodNumber;
12382
- days: z.ZodNumber;
12383
- stockTracked: z.ZodBoolean;
12384
- withdrawalRestricted: z.ZodBoolean;
12385
- }, z.core.$strip>;
12386
- }, z.core.$strip>, z.ZodObject<{
12387
- type: z.ZodLiteral<"CODE">;
12388
- code: z.ZodObject<{
12389
- mode: z.ZodString;
12390
- withdrawalRestricted: z.ZodBoolean;
12391
- }, z.core.$strip>;
12392
- }, z.core.$strip>, z.ZodObject<{
12393
- type: z.ZodLiteral<"SERVICE">;
12394
- service: z.ZodObject<{
12395
- mode: z.ZodString;
12396
- }, z.core.$strip>;
12397
- }, z.core.$strip>, z.ZodObject<{
12398
- type: z.ZodLiteral<"PICKUP">;
12399
- pickup: z.ZodObject<{
12400
- addressId: z.ZodNullable<z.ZodString>;
12401
- }, z.core.$strip>;
12234
+ type: z.ZodLiteral<"MANUAL">;
12402
12235
  }, z.core.$strip>], "type">, z.ZodPipe<z.ZodObject<{
12403
12236
  type: z.ZodString;
12404
12237
  }, z.core.$loose>, z.ZodTransform<UnknownFulfillment, {
12405
12238
  [x: string]: unknown;
12406
12239
  type: string;
12407
12240
  }>>]>;
12408
- fulfillment: z.ZodObject<{
12241
+ fulfillment: z.ZodOptional<z.ZodObject<{
12409
12242
  mode: z.ZodString;
12410
- }, z.core.$strip>;
12243
+ }, z.core.$strip>>;
12411
12244
  fulfilledAt: z.ZodString;
12412
12245
  testPayment: z.ZodBoolean;
12413
12246
  }, z.core.$strip>;