@sayren/store-sdk 0.21.0 → 0.23.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
@@ -5515,9 +5515,9 @@ export type ProductPatchRequest = z.infer<typeof productPatchRequestSchema>;
5515
5515
  export declare const productSortSchema: z.ZodEnum<{
5516
5516
  "createdAt.desc": "createdAt.desc";
5517
5517
  "createdAt.asc": "createdAt.asc";
5518
+ "updatedAt.desc": "updatedAt.desc";
5518
5519
  "salePrice.asc": "salePrice.asc";
5519
5520
  "salePrice.desc": "salePrice.desc";
5520
- "updatedAt.desc": "updatedAt.desc";
5521
5521
  }>;
5522
5522
  export type ProductSort = z.infer<typeof productSortSchema>;
5523
5523
  export interface ProductListParams extends PageParams {
@@ -5543,9 +5543,9 @@ export declare const productListQuerySchema: z.ZodObject<{
5543
5543
  sort: z.ZodOptional<z.ZodEnum<{
5544
5544
  "createdAt.desc": "createdAt.desc";
5545
5545
  "createdAt.asc": "createdAt.asc";
5546
+ "updatedAt.desc": "updatedAt.desc";
5546
5547
  "salePrice.asc": "salePrice.asc";
5547
5548
  "salePrice.desc": "salePrice.desc";
5548
- "updatedAt.desc": "updatedAt.desc";
5549
5549
  }>>;
5550
5550
  }, z.core.$strip>;
5551
5551
  export declare const discountRequestSchema: z.ZodObject<{
@@ -6003,11 +6003,12 @@ export type SellerAddressRequest = z.infer<typeof sellerAddressRequestSchema>;
6003
6003
  /**
6004
6004
  * 스토어프론트 호스팅 (이슈 #53, M1: 템플릿 발행) — 관리 API `/v1/storefront/**`의 계약이다.
6005
6005
  *
6006
- * 셀러는 템플릿을 골라 사이트를 만들고 `{slug}.{호스팅 도메인}` 주소를 받는다. 발행은 버전 단위이고,
6006
+ * 셀러는 템플릿을 골라 사이트를 만들고 `{slug}.{호스팅 도메인}` 주소를 받는다. 스토어를 만들어도 사이트는 생기지 않고
6007
+ * `POST /v1/storefront/site`가 유일한 생성 경로다. 템플릿은 만들 때만 고르고 바꾸지 않는다. 발행은 버전 단위이고,
6007
6008
  * 되돌리기는 이전 버전을 다시 발행하는 것이다(재빌드 없음). 상태의 원천은 api DB이고 Cloudflare 쪽 반영
6008
6009
  * (라우팅 표·사이트 Worker)은 커밋 뒤 비동기다 — 반영 상태는 `provisioning`으로 본다.
6009
6010
  *
6010
- * 스코프는 조회 `storefront:r`, 쓰기 `storefront:rw`(역할 OWNER·ADMIN)다. 에이전트(MCP)의 발행·되돌리기·템플릿 변경·
6011
+ * 스코프는 조회 `storefront:r`, 쓰기 `storefront:rw`(역할 OWNER·ADMIN)다. 에이전트(MCP)의 발행·되돌리기·
6011
6012
  * 공개 전환·슬러그 변경·호스팅 끄기는 승인(`APPROVAL_REQUIRED`)이다 — 구매자가 보는 화면을 바꾸는 쓰기다.
6012
6013
  *
6013
6014
  * 오류 코드:
@@ -6022,6 +6023,7 @@ export type SellerAddressRequest = z.infer<typeof sellerAddressRequestSchema>;
6022
6023
  * - 409 `STORE_SUSPENDED` — 정지된 스토어에는 사이트를 만들 수 없다
6023
6024
  * - 409 `STOREFRONT_VERSION_NOT_READY` — 빌드가 끝나지 않았거나 실패한 버전은 발행할 수 없다
6024
6025
  * - 409 `STOREFRONT_NO_ROLLBACK_TARGET` — 되돌릴 이전 발행 버전이 없다
6026
+ * - 409 `TEMPLATE_CHANGE_NOT_SUPPORTED` — 템플릿 변경(`POST /v1/storefront/site/template`, 폐기)은 항상 이 오류다
6025
6027
  * - 400 `STOREFRONT_SLUG_CONFIRM_MISMATCH` — 호스팅 끄기 확인 입력이 현재 슬러그와 다르다
6026
6028
  * - 503 `STOREFRONT_PREVIEW_NOT_CONFIGURED` — 미리보기 서명 키가 설정되지 않았다
6027
6029
  *
@@ -6041,6 +6043,16 @@ export type SellerAddressRequest = z.infer<typeof sellerAddressRequestSchema>;
6041
6043
  * - 409 `STOREFRONT_BUILD_IN_PROGRESS` — 이 사이트에 끝나지 않은 빌드가 있다(사이트당 하나)
6042
6044
  * - 404 `STOREFRONT_BUILD_NOT_FOUND`
6043
6045
  * - 502 `STOREFRONT_SANDBOX_UNAVAILABLE` — 편집 Sandbox 호출이 실패했다. 잠시 뒤 다시 한다
6046
+ *
6047
+ * 소스 내려받기·올리기(#60, `/v1/storefront/site/source/**`, `sayren` CLI):
6048
+ * - 409 `SOURCE_CHANGED` — 작업 트리가 내려받은 뒤(`expectedBaseRef`) 바뀌었다(콘솔·AI 편집). `error.details.currentRef`
6049
+ * - 409 `EDIT_SESSION_OPEN` — 편집 환경이 열려 있다. `endEditSession: true`로 끄고 진행할 수 있다
6050
+ * - 409 `SOURCE_BLOBS_MISSING` — 올리지 않은 파일 내용이 있다(`error.details.hashes`). `POST source/blobs`로 올리고 다시 한다
6051
+ * - 409 `DEPENDENCY_REJECTED` — 쓸 수 없는 npm 의존성이다(`error.details.rejected: [{ name, version, reason, detail }]`)
6052
+ * - 413 `SOURCE_TOO_MANY_NEW_FILES` — 한 번에 새 내용이 800개를 넘는다(`error.details.max`). 나눠서 바꾼다
6053
+ * - 400 `DEPENDENCY_FILES_MISMATCH` — `packageJson`·`lockfile` 내용이 목록의 해시와 다르거나 빠졌다
6054
+ * - 400 `INVALID_SOURCE_REF` · `BLOB_HASH_MISMATCH` · `INVALID_FILE_PATH`(`.env*`·작업 트리 밖 경로)
6055
+ * - 404 `STOREFRONT_SOURCE_NOT_FOUND` — 그 스냅샷이 없다
6044
6056
  */
6045
6057
  /**
6046
6058
  * 슬러그 형식 — 스토어 코드와 같은 DNS 라벨 규칙(소문자·숫자·하이픈 3~30자, 하이픈으로 시작·끝 불가)에
@@ -6111,6 +6123,7 @@ export declare const storefrontVersionSchema: z.ZodObject<{
6111
6123
  }>;
6112
6124
  buildId: z.ZodNullable<z.ZodString>;
6113
6125
  createdByType: z.ZodString;
6126
+ createdVia: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6114
6127
  createdAt: z.ZodString;
6115
6128
  }, z.core.$strip>;
6116
6129
  export type StorefrontVersion = z.infer<typeof storefrontVersionSchema>;
@@ -6166,7 +6179,7 @@ export declare const storefrontEditPreviewSchema: z.ZodObject<{
6166
6179
  }, z.core.$strip>;
6167
6180
  export type StorefrontEditPreview = z.infer<typeof storefrontEditPreviewSchema>;
6168
6181
  /**
6169
- * 사이트 정지 — 운영 정책에 따라 플랫폼 운영자가 사이트를 정지한다. 정지 중에는 방문자에게 정지 안내가 보이고 발행·되돌리기·템플릿 변경·
6182
+ * 사이트 정지 — 운영 정책에 따라 플랫폼 운영자가 사이트를 정지한다. 정지 중에는 방문자에게 정지 안내가 보이고 발행·되돌리기·
6170
6183
  * 공개 전환·슬러그 변경·끄기·편집이 409 `STOREFRONT_SITE_NOT_ACTIVE`다. 셀러가 풀 수 없다(고객센터로 문의한다).
6171
6184
  */
6172
6185
  export declare const storefrontSuspensionSchema: z.ZodObject<{
@@ -6225,6 +6238,7 @@ export declare const storefrontSiteSchema: z.ZodObject<{
6225
6238
  }>;
6226
6239
  buildId: z.ZodNullable<z.ZodString>;
6227
6240
  createdByType: z.ZodString;
6241
+ createdVia: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6228
6242
  createdAt: z.ZodString;
6229
6243
  }, z.core.$strip>>;
6230
6244
  provisioning: z.ZodObject<{
@@ -6304,6 +6318,7 @@ export declare const storefrontHostingSchema: z.ZodObject<{
6304
6318
  }>;
6305
6319
  buildId: z.ZodNullable<z.ZodString>;
6306
6320
  createdByType: z.ZodString;
6321
+ createdVia: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6307
6322
  createdAt: z.ZodString;
6308
6323
  }, z.core.$strip>>;
6309
6324
  provisioning: z.ZodObject<{
@@ -6339,16 +6354,88 @@ export declare const storefrontSlugAvailabilitySchema: z.ZodObject<{
6339
6354
  }>>;
6340
6355
  }, z.core.$strip>;
6341
6356
  export type StorefrontSlugAvailability = z.infer<typeof storefrontSlugAvailabilitySchema>;
6357
+ /**
6358
+ * 배포 진행 — 사이트의 지금 발행 상태가 공개 주소에 반영되기까지의 단계와 기록이다(콘솔의 스토어프론트 만들기 3단계가 폴링한다).
6359
+ * 만들기(`POST /v1/storefront/site`)는 곧바로 201로 답하고 반영은 그 뒤에 비동기로 하므로, 끝났는지는 이 조회로 본다.
6360
+ * 템플릿 사이트는 미리 빌드한 템플릿 산출물을 올리므로 빌드 단계가 없다. 기록은 사이트 상태에서 만든 요약이다.
6361
+ */
6362
+ export declare const storefrontDeploymentStepSchema: z.ZodObject<{
6363
+ key: z.ZodEnum<{
6364
+ SITE: "SITE";
6365
+ UPLOAD: "UPLOAD";
6366
+ PUBLISH: "PUBLISH";
6367
+ }>;
6368
+ status: z.ZodEnum<{
6369
+ PENDING: "PENDING";
6370
+ FAILED: "FAILED";
6371
+ RUNNING: "RUNNING";
6372
+ DONE: "DONE";
6373
+ }>;
6374
+ finishedAt: z.ZodNullable<z.ZodString>;
6375
+ }, z.core.$strip>;
6376
+ export type StorefrontDeploymentStep = z.infer<typeof storefrontDeploymentStepSchema>;
6377
+ export declare const storefrontDeploymentLogSchema: z.ZodObject<{
6378
+ at: z.ZodNullable<z.ZodString>;
6379
+ level: z.ZodEnum<{
6380
+ INFO: "INFO";
6381
+ WARN: "WARN";
6382
+ ERROR: "ERROR";
6383
+ }>;
6384
+ code: z.ZodString;
6385
+ message: z.ZodString;
6386
+ }, z.core.$strip>;
6387
+ export type StorefrontDeploymentLog = z.infer<typeof storefrontDeploymentLogSchema>;
6388
+ export declare const storefrontDeploymentSchema: z.ZodObject<{
6389
+ siteId: z.ZodString;
6390
+ status: z.ZodEnum<{
6391
+ FAILED: "FAILED";
6392
+ SUCCEEDED: "SUCCEEDED";
6393
+ IN_PROGRESS: "IN_PROGRESS";
6394
+ }>;
6395
+ url: z.ZodString;
6396
+ startedAt: z.ZodString;
6397
+ finishedAt: z.ZodNullable<z.ZodString>;
6398
+ steps: z.ZodArray<z.ZodObject<{
6399
+ key: z.ZodEnum<{
6400
+ SITE: "SITE";
6401
+ UPLOAD: "UPLOAD";
6402
+ PUBLISH: "PUBLISH";
6403
+ }>;
6404
+ status: z.ZodEnum<{
6405
+ PENDING: "PENDING";
6406
+ FAILED: "FAILED";
6407
+ RUNNING: "RUNNING";
6408
+ DONE: "DONE";
6409
+ }>;
6410
+ finishedAt: z.ZodNullable<z.ZodString>;
6411
+ }, z.core.$strip>>;
6412
+ log: z.ZodArray<z.ZodObject<{
6413
+ at: z.ZodNullable<z.ZodString>;
6414
+ level: z.ZodEnum<{
6415
+ INFO: "INFO";
6416
+ WARN: "WARN";
6417
+ ERROR: "ERROR";
6418
+ }>;
6419
+ code: z.ZodString;
6420
+ message: z.ZodString;
6421
+ }, z.core.$strip>>;
6422
+ errorCode: z.ZodNullable<z.ZodString>;
6423
+ attempts: z.ZodNumber;
6424
+ nextAttemptAt: z.ZodNullable<z.ZodString>;
6425
+ }, z.core.$strip>;
6426
+ export type StorefrontDeployment = z.infer<typeof storefrontDeploymentSchema>;
6342
6427
  export declare const createStorefrontSiteRequestSchema: z.ZodObject<{
6343
6428
  templateId: z.ZodString;
6344
6429
  slug: z.ZodOptional<z.ZodString>;
6345
6430
  }, z.core.$strip>;
6346
6431
  export type CreateStorefrontSiteRequest = z.infer<typeof createStorefrontSiteRequestSchema>;
6432
+ /** @deprecated 템플릿 변경은 지원하지 않는다(항상 409 `TEMPLATE_CHANGE_NOT_SUPPORTED`). 호환을 위해 스키마만 남겼다 */
6347
6433
  export declare const changeStorefrontTemplateRequestSchema: z.ZodObject<{
6348
6434
  templateId: z.ZodString;
6349
6435
  publish: z.ZodOptional<z.ZodBoolean>;
6350
6436
  message: z.ZodOptional<z.ZodString>;
6351
6437
  }, z.core.$strip>;
6438
+ /** @deprecated 템플릿 변경은 지원하지 않는다 */
6352
6439
  export type ChangeStorefrontTemplateRequest = z.infer<typeof changeStorefrontTemplateRequestSchema>;
6353
6440
  /**
6354
6441
  * 발행·되돌리기 — 발행은 사이트의 발행 포인터를 바꾸는 조건부 쓰기다. `expectedPublishedVersionId`를 주면
@@ -6401,6 +6488,146 @@ export declare const storefrontPreviewLinkSchema: z.ZodObject<{
6401
6488
  expiresAt: z.ZodString;
6402
6489
  }, z.core.$strip>;
6403
6490
  export type StorefrontPreviewLink = z.infer<typeof storefrontPreviewLinkSchema>;
6491
+ /**
6492
+ * 연결할 수 없는 도메인 — 플랫폼이 쓰는 도메인과 그 하위(기본 주소는 슬러그로 바꾼다). 호스팅 도메인은 서버 설정이라
6493
+ * `storefrontCustomHostnameProblem`의 인자로 따로 받는다.
6494
+ */
6495
+ export declare const STOREFRONT_PLATFORM_DOMAINS: readonly string[];
6496
+ /**
6497
+ * 공용 접미사 — 누구나 그 아래 이름을 받는 도메인이라 접미사 자체는 연결할 수 없다. Public Suffix List 전체가 아니라 자주 틀리는
6498
+ * 것만 둔다(여기 없는 접미사도 TXT 소유 확인을 통과할 수 없어 연결되지 않는다 — 이 목록은 추가 단계에서 빨리 알려 주는 안내다).
6499
+ */
6500
+ export declare const STOREFRONT_PUBLIC_SUFFIXES: readonly string[];
6501
+ /** 스토어당 연결할 수 있는 도메인 수 기본값 — 요금제(#44) 전의 상한이다. 실제 값은 `GET …/domains`의 `limit` */
6502
+ export declare const STOREFRONT_CUSTOM_DOMAIN_LIMIT_DEFAULT = 2;
6503
+ /** DNS를 넣을 때까지 기다리는 기간(일) — 지나면 `FAILED`(`DNS_NOT_CONFIGURED`) */
6504
+ export declare const STOREFRONT_DOMAIN_DNS_WAIT_DAYS = 7;
6505
+ /** 연결된 도메인의 DNS가 이 서비스를 가리키지 않아도 연결을 유지하는 기간(일) — 지나면 서버가 해제한다 */
6506
+ export declare const STOREFRONT_DOMAIN_DNS_GRACE_DAYS = 7;
6507
+ /** 소유 확인 TXT 레코드의 이름 앞부분 — `_sayren-verify.{도메인}` */
6508
+ export declare const STOREFRONT_DOMAIN_TXT_LABEL = "_sayren-verify";
6509
+ /**
6510
+ * 도메인 정규화 — 앞뒤 공백·끝 점을 떼고 소문자로 바꾸며 국제화 도메인은 punycode(`xn--`)로 바꾼다. 스킴·경로·포트가 붙은 입력
6511
+ * (`https://www.a.com/`)은 호스트만 남기지 않고 그대로 두어 형식 검사에서 떨어진다(서버는 사용자가 적은 도메인만 받는다).
6512
+ * 변환할 수 없으면 입력을 소문자로만 바꿔 돌려준다(형식 검사가 거부한다).
6513
+ */
6514
+ export declare function normalizeStorefrontHostname(input: string): string;
6515
+ export type StorefrontHostnameProblem = "FORMAT" | "IP_ADDRESS" | "SINGLE_LABEL" | "NON_PUBLIC_TLD" | "PLATFORM_DOMAIN" | "PUBLIC_SUFFIX" | "WILDCARD";
6516
+ /**
6517
+ * 연결할 수 있는 도메인인가(정규화한 값 기준). 문제가 없으면 null이다. 규칙: 253자 이하, 라벨 2개 이상, 라벨은 소문자·숫자·하이픈
6518
+ * 63자 이하(하이픈으로 시작·끝 불가), 최상위 도메인은 영문자이거나 punycode, IP 주소·와일드카드·공개 인터넷 밖 최상위 도메인·
6519
+ * 플랫폼 도메인과 그 하위·공용 접미사 자체는 안 된다. 제어·디스패치 Worker가 형식 규칙의 복제본을 들고 있다(api
6520
+ * `test/storefront-hosting-parity.spec.ts`가 대조한다).
6521
+ */
6522
+ export declare function storefrontCustomHostnameProblem(hostname: string, hostingDomain?: string): StorefrontHostnameProblem | null;
6523
+ /** 소유 확인 TXT 레코드의 전체 이름 */
6524
+ export declare function storefrontDomainTxtNameOf(hostname: string): string;
6525
+ export declare const storefrontCustomDomainStatusSchema: z.ZodEnum<{
6526
+ ACTIVE: "ACTIVE";
6527
+ FAILED: "FAILED";
6528
+ PENDING_DNS: "PENDING_DNS";
6529
+ PENDING_VALIDATION: "PENDING_VALIDATION";
6530
+ }>;
6531
+ export type StorefrontCustomDomainStatus = z.infer<typeof storefrontCustomDomainStatusSchema>;
6532
+ export declare const storefrontDnsRecordSchema: z.ZodObject<{
6533
+ type: z.ZodEnum<{
6534
+ CNAME: "CNAME";
6535
+ TXT: "TXT";
6536
+ }>;
6537
+ name: z.ZodString;
6538
+ value: z.ZodString;
6539
+ purpose: z.ZodEnum<{
6540
+ ROUTING: "ROUTING";
6541
+ OWNERSHIP: "OWNERSHIP";
6542
+ }>;
6543
+ }, z.core.$strip>;
6544
+ export type StorefrontDnsRecord = z.infer<typeof storefrontDnsRecordSchema>;
6545
+ export declare const storefrontSiteDomainSchema: z.ZodObject<{
6546
+ domainId: z.ZodString;
6547
+ hostname: z.ZodString;
6548
+ kind: z.ZodEnum<{
6549
+ PLATFORM: "PLATFORM";
6550
+ CUSTOM: "CUSTOM";
6551
+ }>;
6552
+ status: z.ZodEnum<{
6553
+ ACTIVE: "ACTIVE";
6554
+ FAILED: "FAILED";
6555
+ PENDING_DNS: "PENDING_DNS";
6556
+ PENDING_VALIDATION: "PENDING_VALIDATION";
6557
+ }>;
6558
+ isPrimary: z.ZodBoolean;
6559
+ dnsRecords: z.ZodArray<z.ZodObject<{
6560
+ type: z.ZodEnum<{
6561
+ CNAME: "CNAME";
6562
+ TXT: "TXT";
6563
+ }>;
6564
+ name: z.ZodString;
6565
+ value: z.ZodString;
6566
+ purpose: z.ZodEnum<{
6567
+ ROUTING: "ROUTING";
6568
+ OWNERSHIP: "OWNERSHIP";
6569
+ }>;
6570
+ }, z.core.$strip>>;
6571
+ certificateStatus: z.ZodNullable<z.ZodEnum<{
6572
+ ACTIVE: "ACTIVE";
6573
+ PENDING: "PENDING";
6574
+ FAILED: "FAILED";
6575
+ }>>;
6576
+ failureCode: z.ZodNullable<z.ZodString>;
6577
+ verifiedAt: z.ZodNullable<z.ZodString>;
6578
+ activatedAt: z.ZodNullable<z.ZodString>;
6579
+ checkedAt: z.ZodNullable<z.ZodString>;
6580
+ createdAt: z.ZodString;
6581
+ }, z.core.$strip>;
6582
+ export type StorefrontSiteDomain = z.infer<typeof storefrontSiteDomainSchema>;
6583
+ /** `GET /v1/storefront/site/domains` — 사이트의 주소 목록(기본 주소 + 내 도메인)과 연결 설정 */
6584
+ export declare const storefrontSiteDomainsSchema: z.ZodObject<{
6585
+ enabled: z.ZodBoolean;
6586
+ limit: z.ZodNumber;
6587
+ target: z.ZodString;
6588
+ domains: z.ZodArray<z.ZodObject<{
6589
+ domainId: z.ZodString;
6590
+ hostname: z.ZodString;
6591
+ kind: z.ZodEnum<{
6592
+ PLATFORM: "PLATFORM";
6593
+ CUSTOM: "CUSTOM";
6594
+ }>;
6595
+ status: z.ZodEnum<{
6596
+ ACTIVE: "ACTIVE";
6597
+ FAILED: "FAILED";
6598
+ PENDING_DNS: "PENDING_DNS";
6599
+ PENDING_VALIDATION: "PENDING_VALIDATION";
6600
+ }>;
6601
+ isPrimary: z.ZodBoolean;
6602
+ dnsRecords: z.ZodArray<z.ZodObject<{
6603
+ type: z.ZodEnum<{
6604
+ CNAME: "CNAME";
6605
+ TXT: "TXT";
6606
+ }>;
6607
+ name: z.ZodString;
6608
+ value: z.ZodString;
6609
+ purpose: z.ZodEnum<{
6610
+ ROUTING: "ROUTING";
6611
+ OWNERSHIP: "OWNERSHIP";
6612
+ }>;
6613
+ }, z.core.$strip>>;
6614
+ certificateStatus: z.ZodNullable<z.ZodEnum<{
6615
+ ACTIVE: "ACTIVE";
6616
+ PENDING: "PENDING";
6617
+ FAILED: "FAILED";
6618
+ }>>;
6619
+ failureCode: z.ZodNullable<z.ZodString>;
6620
+ verifiedAt: z.ZodNullable<z.ZodString>;
6621
+ activatedAt: z.ZodNullable<z.ZodString>;
6622
+ checkedAt: z.ZodNullable<z.ZodString>;
6623
+ createdAt: z.ZodString;
6624
+ }, z.core.$strip>>;
6625
+ }, z.core.$strip>;
6626
+ export type StorefrontSiteDomains = z.infer<typeof storefrontSiteDomainsSchema>;
6627
+ export declare const addStorefrontDomainRequestSchema: z.ZodObject<{
6628
+ hostname: z.ZodString;
6629
+ }, z.core.$strip>;
6630
+ export type AddStorefrontDomainRequest = z.infer<typeof addStorefrontDomainRequestSchema>;
6404
6631
  /** 플랫폼 전체 동시 편집 환경 상한 */
6405
6632
  export declare const STOREFRONT_EDIT_CAPACITY = 20;
6406
6633
  /** 활동이 없으면 편집 환경이 잠드는 시간(분). 작업 트리는 보존된다 */
@@ -6443,16 +6670,16 @@ export declare const storefrontFileEncodingSchema: z.ZodEnum<{
6443
6670
  * 90초). `RUNNING`이면 미리보기와 파일 쓰기가 바로 반영된다(HMR).
6444
6671
  */
6445
6672
  export declare const storefrontEditSessionStatusSchema: z.ZodEnum<{
6446
- STARTING: "STARTING";
6447
6673
  RUNNING: "RUNNING";
6674
+ STARTING: "STARTING";
6448
6675
  }>;
6449
6676
  /** 편집 환경을 띄우는 단계 — 콘솔 진행 표시용이다. 값은 늘어날 수 있다 */
6450
6677
  export declare const STOREFRONT_EDIT_START_STAGES: readonly ["CONTAINER", "RESTORE", "DEV_SERVER"];
6451
6678
  export declare const storefrontEditSessionSchema: z.ZodObject<{
6452
6679
  sessionId: z.ZodString;
6453
6680
  status: z.ZodEnum<{
6454
- STARTING: "STARTING";
6455
6681
  RUNNING: "RUNNING";
6682
+ STARTING: "STARTING";
6456
6683
  }>;
6457
6684
  startStage: z.ZodNullable<z.ZodString>;
6458
6685
  startedAt: z.ZodString;
@@ -6468,8 +6695,8 @@ export declare const storefrontEditingSchema: z.ZodObject<{
6468
6695
  session: z.ZodNullable<z.ZodObject<{
6469
6696
  sessionId: z.ZodString;
6470
6697
  status: z.ZodEnum<{
6471
- STARTING: "STARTING";
6472
6698
  RUNNING: "RUNNING";
6699
+ STARTING: "STARTING";
6473
6700
  }>;
6474
6701
  startStage: z.ZodNullable<z.ZodString>;
6475
6702
  startedAt: z.ZodString;
@@ -6673,7 +6900,7 @@ export declare const storefrontRuleResultSchema: z.ZodObject<{
6673
6900
  }, z.core.$strip>;
6674
6901
  export type StorefrontRuleResult = z.infer<typeof storefrontRuleResultSchema>;
6675
6902
  /**
6676
- * 규칙 검증 보고서 — `@sayren/mcp`의 `verify_storefront`와 같은 모양이다(원천 `apps/mcp/src/verify.ts`). 위반마다
6903
+ * 규칙 검증 보고서 — `@sayren/mcp`의 `verify_storefront`와 같은 모양이다(원천 `packages/mcp/src/verify.ts`). 위반마다
6677
6904
  * 고칠 자리(`file`·`line`)와 방법(`fix`·`example`)을 싣는다. `POST /v1/storefront/site/verify`(편집 환경이 잠들어 있어도
6678
6905
  * 된다)와 빌드의 `verify`가 이 모양이다.
6679
6906
  */
@@ -6731,9 +6958,58 @@ export type StorefrontBuildStatus = z.infer<typeof storefrontBuildStatusSchema>;
6731
6958
  export declare const STOREFRONT_BUILD_TERMINAL_STATUSES: readonly StorefrontBuildStatus[];
6732
6959
  /**
6733
6960
  * 빌드 단계 — 이 순서로 돈다. 첫 실패에서 멈추지만 규칙 검증(`VERIFY`)은 실패해도 타입 검사까지 이어서 해 한 번에 알려 준다.
6734
- * `UPLOAD`는 사이트 버전 Worker 업로드다(성공하면 발행할 수 있다). 값은 늘어날 수 있다.
6961
+ * `UPLOAD`는 사이트 버전 Worker 업로드다(성공하면 발행할 수 있다). `DEPENDENCIES`는 빌드 시작 전 의존성 검사(거절 목록·보안 권고)다.
6962
+ * 값은 늘어날 수 있다.
6963
+ */
6964
+ export declare const STOREFRONT_BUILD_STAGES: readonly ["DEPENDENCIES", "VERIFY", "RESTORE", "INSTALL", "TYPECHECK", "BUILD", "BUNDLE", "PACK", "UPLOAD"];
6965
+ /**
6966
+ * 의존성 검사 결과 한 줄(#61) — 거절(`DEPENDENCY_REJECTED`의 `details.rejected`)·경고(빌드 `dependencies`, 소스 교체 `dependencyWarnings`)가
6967
+ * 같은 모양이다. 대상 패키지와 사유. 셀러가 고칠 수 있게 버전·권고 id·거절 사유를 싣는다.
6968
+ * `reason`: `DENYLISTED`(거절 목록) · `ADVISORY`(보안 권고) · `MALWARE`(악성 코드 권고, 패키지 전체) · `INSTALL_SCRIPT`(루트
6969
+ * package.json의 설치 훅·의존성의 설치 스크립트, 경고) · `INSTALL_CONFIG`(설치 방식 필드, 경고) · `UNSUPPORTED_SOURCE`(레지스트리 밖 설치 경로) · `BUNDLED_DEPENDENCIES`(묶여
6970
+ * 오는 의존성, 경고) · `INVALID_MANIFEST`(package.json·잠금 파일 형식), 늘어날 수 있다.
6735
6971
  */
6736
- export declare const STOREFRONT_BUILD_STAGES: readonly ["VERIFY", "RESTORE", "INSTALL", "TYPECHECK", "BUILD", "BUNDLE", "PACK", "UPLOAD"];
6972
+ export declare const storefrontDependencyFindingSchema: z.ZodObject<{
6973
+ name: z.ZodString;
6974
+ version: z.ZodNullable<z.ZodString>;
6975
+ reason: z.ZodString;
6976
+ detail: z.ZodString;
6977
+ advisory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6978
+ id: z.ZodString;
6979
+ url: z.ZodNullable<z.ZodString>;
6980
+ severity: z.ZodString;
6981
+ title: z.ZodString;
6982
+ }, z.core.$strip>>>;
6983
+ }, z.core.$strip>;
6984
+ export type StorefrontDependencyFinding = z.infer<typeof storefrontDependencyFindingSchema>;
6985
+ export declare const storefrontBuildDependenciesSchema: z.ZodObject<{
6986
+ checkedPackages: z.ZodNumber;
6987
+ rejected: z.ZodArray<z.ZodObject<{
6988
+ name: z.ZodString;
6989
+ version: z.ZodNullable<z.ZodString>;
6990
+ reason: z.ZodString;
6991
+ detail: z.ZodString;
6992
+ advisory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6993
+ id: z.ZodString;
6994
+ url: z.ZodNullable<z.ZodString>;
6995
+ severity: z.ZodString;
6996
+ title: z.ZodString;
6997
+ }, z.core.$strip>>>;
6998
+ }, z.core.$strip>>;
6999
+ warnings: z.ZodArray<z.ZodObject<{
7000
+ name: z.ZodString;
7001
+ version: z.ZodNullable<z.ZodString>;
7002
+ reason: z.ZodString;
7003
+ detail: z.ZodString;
7004
+ advisory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
7005
+ id: z.ZodString;
7006
+ url: z.ZodNullable<z.ZodString>;
7007
+ severity: z.ZodString;
7008
+ title: z.ZodString;
7009
+ }, z.core.$strip>>>;
7010
+ }, z.core.$strip>>;
7011
+ }, z.core.$strip>;
7012
+ export type StorefrontBuildDependencies = z.infer<typeof storefrontBuildDependenciesSchema>;
6737
7013
  export declare const storefrontBuildSchema: z.ZodObject<{
6738
7014
  buildId: z.ZodString;
6739
7015
  versionId: z.ZodString;
@@ -6794,6 +7070,33 @@ export declare const storefrontBuildSchema: z.ZodObject<{
6794
7070
  message: z.ZodString;
6795
7071
  nextSteps: z.ZodArray<z.ZodString>;
6796
7072
  }, z.core.$strip>>;
7073
+ dependencies: z.ZodOptional<z.ZodNullable<z.ZodObject<{
7074
+ checkedPackages: z.ZodNumber;
7075
+ rejected: z.ZodArray<z.ZodObject<{
7076
+ name: z.ZodString;
7077
+ version: z.ZodNullable<z.ZodString>;
7078
+ reason: z.ZodString;
7079
+ detail: z.ZodString;
7080
+ advisory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
7081
+ id: z.ZodString;
7082
+ url: z.ZodNullable<z.ZodString>;
7083
+ severity: z.ZodString;
7084
+ title: z.ZodString;
7085
+ }, z.core.$strip>>>;
7086
+ }, z.core.$strip>>;
7087
+ warnings: z.ZodArray<z.ZodObject<{
7088
+ name: z.ZodString;
7089
+ version: z.ZodNullable<z.ZodString>;
7090
+ reason: z.ZodString;
7091
+ detail: z.ZodString;
7092
+ advisory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
7093
+ id: z.ZodString;
7094
+ url: z.ZodNullable<z.ZodString>;
7095
+ severity: z.ZodString;
7096
+ title: z.ZodString;
7097
+ }, z.core.$strip>>>;
7098
+ }, z.core.$strip>>;
7099
+ }, z.core.$strip>>>;
6797
7100
  queuedAt: z.ZodString;
6798
7101
  startedAt: z.ZodNullable<z.ZodString>;
6799
7102
  finishedAt: z.ZodNullable<z.ZodString>;
@@ -6809,6 +7112,7 @@ export declare const storefrontBuildListQuerySchema: z.ZodObject<{
6809
7112
  */
6810
7113
  export declare const createStorefrontVersionRequestSchema: z.ZodObject<{
6811
7114
  message: z.ZodOptional<z.ZodString>;
7115
+ expectedSourceRef: z.ZodOptional<z.ZodString>;
6812
7116
  }, z.core.$strip>;
6813
7117
  export type CreateStorefrontVersionRequest = z.infer<typeof createStorefrontVersionRequestSchema>;
6814
7118
  /** 버전 만들기 응답 (201) — 버전은 `BUILDING`, 빌드는 `QUEUED`로 시작한다. 결과는 `GET builds/{buildId}`로 본다 */
@@ -6832,6 +7136,7 @@ export declare const storefrontVersionCreatedSchema: z.ZodObject<{
6832
7136
  }>;
6833
7137
  buildId: z.ZodNullable<z.ZodString>;
6834
7138
  createdByType: z.ZodString;
7139
+ createdVia: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6835
7140
  createdAt: z.ZodString;
6836
7141
  }, z.core.$strip>;
6837
7142
  build: z.ZodObject<{
@@ -6894,6 +7199,33 @@ export declare const storefrontVersionCreatedSchema: z.ZodObject<{
6894
7199
  message: z.ZodString;
6895
7200
  nextSteps: z.ZodArray<z.ZodString>;
6896
7201
  }, z.core.$strip>>;
7202
+ dependencies: z.ZodOptional<z.ZodNullable<z.ZodObject<{
7203
+ checkedPackages: z.ZodNumber;
7204
+ rejected: z.ZodArray<z.ZodObject<{
7205
+ name: z.ZodString;
7206
+ version: z.ZodNullable<z.ZodString>;
7207
+ reason: z.ZodString;
7208
+ detail: z.ZodString;
7209
+ advisory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
7210
+ id: z.ZodString;
7211
+ url: z.ZodNullable<z.ZodString>;
7212
+ severity: z.ZodString;
7213
+ title: z.ZodString;
7214
+ }, z.core.$strip>>>;
7215
+ }, z.core.$strip>>;
7216
+ warnings: z.ZodArray<z.ZodObject<{
7217
+ name: z.ZodString;
7218
+ version: z.ZodNullable<z.ZodString>;
7219
+ reason: z.ZodString;
7220
+ detail: z.ZodString;
7221
+ advisory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
7222
+ id: z.ZodString;
7223
+ url: z.ZodNullable<z.ZodString>;
7224
+ severity: z.ZodString;
7225
+ title: z.ZodString;
7226
+ }, z.core.$strip>>>;
7227
+ }, z.core.$strip>>;
7228
+ }, z.core.$strip>>>;
6897
7229
  queuedAt: z.ZodString;
6898
7230
  startedAt: z.ZodNullable<z.ZodString>;
6899
7231
  finishedAt: z.ZodNullable<z.ZodString>;
@@ -6910,6 +7242,99 @@ export declare const createStorefrontEditPreviewLinkRequestSchema: z.ZodObject<{
6910
7242
  path: z.ZodOptional<z.ZodString>;
6911
7243
  }, z.core.$strip>;
6912
7244
  export type CreateStorefrontEditPreviewLinkRequest = CreateStorefrontPreviewLinkRequest;
7245
+ /** 압축 파일 조각 하나의 최대 크기(바이트) */
7246
+ export declare const STOREFRONT_SOURCE_PART_BYTES: number;
7247
+ /** 내용 올리기 한 번의 최대 파일 수 */
7248
+ export declare const STOREFRONT_SOURCE_BLOB_BATCH_MAX = 200;
7249
+ /** 작업 트리 파일 수 상한 */
7250
+ export declare const STOREFRONT_WORKSPACE_MAX_FILES = 2000;
7251
+ /** 작업 트리 스냅샷 키 — `sources/{siteId}/{sha256}.tgz` */
7252
+ export declare const storefrontSourceRefSchema: z.ZodString;
7253
+ /** `GET /v1/storefront/site/source` — 지금 작업 트리(편집 환경이 떠 있으면 지금 내용을 고정한다) */
7254
+ export declare const storefrontSourceSchema: z.ZodObject<{
7255
+ siteId: z.ZodString;
7256
+ storeId: z.ZodString;
7257
+ storeCode: z.ZodString;
7258
+ sourceRef: z.ZodString;
7259
+ treeSha256: z.ZodString;
7260
+ files: z.ZodNumber;
7261
+ bytes: z.ZodNumber;
7262
+ archive: z.ZodObject<{
7263
+ format: z.ZodLiteral<"tar+gzip">;
7264
+ bytes: z.ZodNumber;
7265
+ sha256: z.ZodString;
7266
+ parts: z.ZodNumber;
7267
+ partBytes: z.ZodNumber;
7268
+ }, z.core.$strip>;
7269
+ editSessionOpen: z.ZodBoolean;
7270
+ }, z.core.$strip>;
7271
+ export type StorefrontSource = z.infer<typeof storefrontSourceSchema>;
7272
+ export declare const storefrontSourceArchiveQuerySchema: z.ZodObject<{
7273
+ sourceRef: z.ZodString;
7274
+ part: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
7275
+ }, z.core.$strip>;
7276
+ /** `GET /v1/storefront/site/source/archive` — 압축 파일 조각 */
7277
+ export declare const storefrontSourceArchivePartSchema: z.ZodObject<{
7278
+ sourceRef: z.ZodString;
7279
+ part: z.ZodNumber;
7280
+ parts: z.ZodNumber;
7281
+ offset: z.ZodNumber;
7282
+ bytes: z.ZodNumber;
7283
+ totalBytes: z.ZodNumber;
7284
+ content: z.ZodString;
7285
+ }, z.core.$strip>;
7286
+ export type StorefrontSourceArchivePart = z.infer<typeof storefrontSourceArchivePartSchema>;
7287
+ /** `POST /v1/storefront/site/source/blobs` — 파일 내용 올리기(해시 키, 다시 올려도 안전하다). 작업 트리는 바뀌지 않는다 */
7288
+ export declare const uploadStorefrontSourceBlobsRequestSchema: z.ZodObject<{
7289
+ blobs: z.ZodArray<z.ZodObject<{
7290
+ hash: z.ZodString;
7291
+ content: z.ZodString;
7292
+ }, z.core.$strip>>;
7293
+ }, z.core.$strip>;
7294
+ export type UploadStorefrontSourceBlobsRequest = z.infer<typeof uploadStorefrontSourceBlobsRequestSchema>;
7295
+ export declare const storefrontSourceBlobsResultSchema: z.ZodObject<{
7296
+ stored: z.ZodNumber;
7297
+ existing: z.ZodNumber;
7298
+ }, z.core.$strip>;
7299
+ export type StorefrontSourceBlobsResult = z.infer<typeof storefrontSourceBlobsResultSchema>;
7300
+ /**
7301
+ * `PUT /v1/storefront/site/source` — 작업 트리 전체를 이 목록으로 바꾼다(없는 경로는 지운다). 전부 아니면 전무다.
7302
+ * `package.json`·`pnpm-lock.yaml`도 바꿀 수 있고 의존성은 허용 목록 안이어야 한다. `.env*`·작업 트리 밖 경로는 받지 않는다.
7303
+ */
7304
+ export declare const replaceStorefrontSourceRequestSchema: z.ZodObject<{
7305
+ expectedBaseRef: z.ZodOptional<z.ZodString>;
7306
+ files: z.ZodArray<z.ZodObject<{
7307
+ path: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
7308
+ hash: z.ZodString;
7309
+ size: z.ZodNumber;
7310
+ }, z.core.$strip>>;
7311
+ endEditSession: z.ZodOptional<z.ZodBoolean>;
7312
+ packageJson: z.ZodOptional<z.ZodString>;
7313
+ lockfile: z.ZodOptional<z.ZodString>;
7314
+ }, z.core.$strip>;
7315
+ export type ReplaceStorefrontSourceRequest = z.infer<typeof replaceStorefrontSourceRequestSchema>;
7316
+ export declare const storefrontSourceReplacedSchema: z.ZodObject<{
7317
+ sourceRef: z.ZodString;
7318
+ previousRef: z.ZodString;
7319
+ treeSha256: z.ZodString;
7320
+ files: z.ZodNumber;
7321
+ bytes: z.ZodNumber;
7322
+ changed: z.ZodBoolean;
7323
+ endedEditSession: z.ZodBoolean;
7324
+ dependencyWarnings: z.ZodArray<z.ZodObject<{
7325
+ name: z.ZodString;
7326
+ version: z.ZodNullable<z.ZodString>;
7327
+ reason: z.ZodString;
7328
+ detail: z.ZodString;
7329
+ advisory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
7330
+ id: z.ZodString;
7331
+ url: z.ZodNullable<z.ZodString>;
7332
+ severity: z.ZodString;
7333
+ title: z.ZodString;
7334
+ }, z.core.$strip>>>;
7335
+ }, z.core.$strip>>;
7336
+ }, z.core.$strip>;
7337
+ export type StorefrontSourceReplaced = z.infer<typeof storefrontSourceReplacedSchema>;
6913
7338
  //#endregion
6914
7339
  //#region src/schemas/upload.d.ts
6915
7340
  /**
@@ -7027,8 +7452,14 @@ interface StoreSession {
7027
7452
  * 회전이 실패(만료·재사용 폐기)하면 세션을 clear하고 false. (401 경로는 onUnauthorized→clear가 별도 처리.)
7028
7453
  */
7029
7454
  refresh(): Promise<boolean>;
7030
- /** 세션/리프레시 키를 지우고 구독자에게 통지한다 */
7455
+ /** 세션/리프레시 키를 지우고 구독자에게 통지한다(서버의 토큰은 그대로다 — 로그아웃은 `logout()`) */
7031
7456
  clear(): void;
7457
+ /**
7458
+ * 로그아웃 — 서버에서 **refresh 토큰(패밀리째)과 access 토큰을 폐기**(`POST /oauth2/revoke`, RFC 7009)한 뒤 세션을 지운다.
7459
+ * refresh를 폐기하지 않으면 쿠키만 지워도 서버의 refresh 패밀리가 절대 만료까지 살아 있어, 새어 나간 refresh 토큰으로
7460
+ * 계속 새 userToken을 받을 수 있다. 폐기 요청 실패(네트워크·이미 무효)는 무시하고 세션은 항상 지운다.
7461
+ */
7462
+ logout(): Promise<void>;
7032
7463
  /** 변경 구독(useSyncExternalStore 소비용) — getToken을 스냅샷으로 쓴다. 해지 함수 반환 */
7033
7464
  subscribe(cb: () => void): () => void;
7034
7465
  /** 현재 userToken (getToken()과 동일 — 게터 형태 소비용) */
@@ -10948,6 +11379,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
10948
11379
  buildId: string | null;
10949
11380
  createdByType: string;
10950
11381
  createdAt: string;
11382
+ createdVia?: string | null | undefined;
10951
11383
  } | null;
10952
11384
  provisioning: {
10953
11385
  status: "PENDING" | "FAILED" | "SYNCED";
@@ -10972,7 +11404,10 @@ export declare function createStoreClient(options: StoreClientOptions): {
10972
11404
  available: boolean;
10973
11405
  reason: "RESERVED" | "INVALID" | "TAKEN" | "CURRENT" | null;
10974
11406
  }>;
10975
- /** `POST /v1/storefront/site` (201) — 템플릿으로 사이트를 만들고 v1을 발행한다. 공개 상태는 오픈 준비 중이다 */
11407
+ /**
11408
+ * `POST /v1/storefront/site` (201) — 템플릿으로 사이트를 만들고 v1을 발행한다. 공개 상태는 오픈 준비 중이다.
11409
+ * 사이트를 만드는 유일한 경로다(스토어를 만들어도 사이트는 생기지 않는다). 템플릿은 여기서만 고른다
11410
+ */
10976
11411
  create: (body: CreateStorefrontSiteRequest) => Promise<{
10977
11412
  siteId: string;
10978
11413
  slug: string;
@@ -11002,6 +11437,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11002
11437
  buildId: string | null;
11003
11438
  createdByType: string;
11004
11439
  createdAt: string;
11440
+ createdVia?: string | null | undefined;
11005
11441
  } | null;
11006
11442
  provisioning: {
11007
11443
  status: "PENDING" | "FAILED" | "SYNCED";
@@ -11019,7 +11455,55 @@ export declare function createStoreClient(options: StoreClientOptions): {
11019
11455
  suspendedAt: string | null;
11020
11456
  } | null | undefined;
11021
11457
  }>;
11022
- /** `POST /v1/storefront/site/template` — 템플릿을 바꾼다. 새 버전을 만들고 기본으로 곧바로 발행한다 */
11458
+ /** `GET /v1/storefront/site/deployment` — 배포 진행(단계·기록). 만든 뒤 반영이 끝날 때까지 폴링한다 */
11459
+ getDeployment: () => Promise<{
11460
+ siteId: string;
11461
+ status: "FAILED" | "SUCCEEDED" | "IN_PROGRESS";
11462
+ url: string;
11463
+ startedAt: string;
11464
+ finishedAt: string | null;
11465
+ steps: {
11466
+ key: "SITE" | "UPLOAD" | "PUBLISH";
11467
+ status: "PENDING" | "FAILED" | "RUNNING" | "DONE";
11468
+ finishedAt: string | null;
11469
+ }[];
11470
+ log: {
11471
+ at: string | null;
11472
+ level: "INFO" | "WARN" | "ERROR";
11473
+ code: string;
11474
+ message: string;
11475
+ }[];
11476
+ errorCode: string | null;
11477
+ attempts: number;
11478
+ nextAttemptAt: string | null;
11479
+ }>;
11480
+ /** `POST /v1/storefront/site/deployment/retry` (202) — 밀린 반영을 곧바로 다시 시도한다. 이미 반영됐으면 그대로다 */
11481
+ retryDeployment: () => Promise<{
11482
+ siteId: string;
11483
+ status: "FAILED" | "SUCCEEDED" | "IN_PROGRESS";
11484
+ url: string;
11485
+ startedAt: string;
11486
+ finishedAt: string | null;
11487
+ steps: {
11488
+ key: "SITE" | "UPLOAD" | "PUBLISH";
11489
+ status: "PENDING" | "FAILED" | "RUNNING" | "DONE";
11490
+ finishedAt: string | null;
11491
+ }[];
11492
+ log: {
11493
+ at: string | null;
11494
+ level: "INFO" | "WARN" | "ERROR";
11495
+ code: string;
11496
+ message: string;
11497
+ }[];
11498
+ errorCode: string | null;
11499
+ attempts: number;
11500
+ nextAttemptAt: string | null;
11501
+ }>;
11502
+ /**
11503
+ * `POST /v1/storefront/site/template`
11504
+ * @deprecated 템플릿 변경은 지원하지 않는다. 서버가 항상 409 `TEMPLATE_CHANGE_NOT_SUPPORTED`로 답한다 — 템플릿은
11505
+ * 사이트를 만들 때(`create`)만 고른다. 호환을 위해 메서드만 남겼다
11506
+ */
11023
11507
  changeTemplate: (body: ChangeStorefrontTemplateRequest) => Promise<{
11024
11508
  siteId: string;
11025
11509
  slug: string;
@@ -11049,6 +11533,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11049
11533
  buildId: string | null;
11050
11534
  createdByType: string;
11051
11535
  createdAt: string;
11536
+ createdVia?: string | null | undefined;
11052
11537
  } | null;
11053
11538
  provisioning: {
11054
11539
  status: "PENDING" | "FAILED" | "SYNCED";
@@ -11080,6 +11565,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11080
11565
  buildId: string | null;
11081
11566
  createdByType: string;
11082
11567
  createdAt: string;
11568
+ createdVia?: string | null | undefined;
11083
11569
  }[]>;
11084
11570
  /** `POST /v1/storefront/site/versions/{versionId}/publish` — 그 버전을 발행한다(이미 발행돼 있으면 그대로 200) */
11085
11571
  publish: (versionId: string, body?: PublishStorefrontVersionRequest) => Promise<{
@@ -11111,6 +11597,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11111
11597
  buildId: string | null;
11112
11598
  createdByType: string;
11113
11599
  createdAt: string;
11600
+ createdVia?: string | null | undefined;
11114
11601
  } | null;
11115
11602
  provisioning: {
11116
11603
  status: "PENDING" | "FAILED" | "SYNCED";
@@ -11158,6 +11645,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11158
11645
  buildId: string | null;
11159
11646
  createdByType: string;
11160
11647
  createdAt: string;
11648
+ createdVia?: string | null | undefined;
11161
11649
  } | null;
11162
11650
  provisioning: {
11163
11651
  status: "PENDING" | "FAILED" | "SYNCED";
@@ -11205,6 +11693,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11205
11693
  buildId: string | null;
11206
11694
  createdByType: string;
11207
11695
  createdAt: string;
11696
+ createdVia?: string | null | undefined;
11208
11697
  } | null;
11209
11698
  provisioning: {
11210
11699
  status: "PENDING" | "FAILED" | "SYNCED";
@@ -11252,6 +11741,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11252
11741
  buildId: string | null;
11253
11742
  createdByType: string;
11254
11743
  createdAt: string;
11744
+ createdVia?: string | null | undefined;
11255
11745
  } | null;
11256
11746
  provisioning: {
11257
11747
  status: "PENDING" | "FAILED" | "SYNCED";
@@ -11277,6 +11767,101 @@ export declare function createStoreClient(options: StoreClientOptions): {
11277
11767
  url: string;
11278
11768
  expiresAt: string;
11279
11769
  }>;
11770
+ /** `GET /v1/storefront/site/domains` — 주소 목록(기본 주소 + 내 도메인)과 DNS 안내 */
11771
+ listDomains: () => Promise<{
11772
+ enabled: boolean;
11773
+ limit: number;
11774
+ target: string;
11775
+ domains: {
11776
+ domainId: string;
11777
+ hostname: string;
11778
+ kind: "PLATFORM" | "CUSTOM";
11779
+ status: "ACTIVE" | "FAILED" | "PENDING_DNS" | "PENDING_VALIDATION";
11780
+ isPrimary: boolean;
11781
+ dnsRecords: {
11782
+ type: "CNAME" | "TXT";
11783
+ name: string;
11784
+ value: string;
11785
+ purpose: "ROUTING" | "OWNERSHIP";
11786
+ }[];
11787
+ certificateStatus: "ACTIVE" | "PENDING" | "FAILED" | null;
11788
+ failureCode: string | null;
11789
+ verifiedAt: string | null;
11790
+ activatedAt: string | null;
11791
+ checkedAt: string | null;
11792
+ createdAt: string;
11793
+ }[];
11794
+ }>;
11795
+ /**
11796
+ * `POST /v1/storefront/site/domains` (201) — 내 도메인을 추가한다. 응답의 `dnsRecords`를 DNS에 넣으면 서버가 소유를 확인하고
11797
+ * 인증서를 발급한다
11798
+ */
11799
+ addDomain: (body: AddStorefrontDomainRequest) => Promise<{
11800
+ domainId: string;
11801
+ hostname: string;
11802
+ kind: "PLATFORM" | "CUSTOM";
11803
+ status: "ACTIVE" | "FAILED" | "PENDING_DNS" | "PENDING_VALIDATION";
11804
+ isPrimary: boolean;
11805
+ dnsRecords: {
11806
+ type: "CNAME" | "TXT";
11807
+ name: string;
11808
+ value: string;
11809
+ purpose: "ROUTING" | "OWNERSHIP";
11810
+ }[];
11811
+ certificateStatus: "ACTIVE" | "PENDING" | "FAILED" | null;
11812
+ failureCode: string | null;
11813
+ verifiedAt: string | null;
11814
+ activatedAt: string | null;
11815
+ checkedAt: string | null;
11816
+ createdAt: string;
11817
+ }>;
11818
+ /** `POST /v1/storefront/site/domains/{domainId}/verify` — DNS를 곧바로 다시 확인한다(실패한 도메인은 처음부터 다시) */
11819
+ verifyDomain: (domainId: string) => Promise<{
11820
+ domainId: string;
11821
+ hostname: string;
11822
+ kind: "PLATFORM" | "CUSTOM";
11823
+ status: "ACTIVE" | "FAILED" | "PENDING_DNS" | "PENDING_VALIDATION";
11824
+ isPrimary: boolean;
11825
+ dnsRecords: {
11826
+ type: "CNAME" | "TXT";
11827
+ name: string;
11828
+ value: string;
11829
+ purpose: "ROUTING" | "OWNERSHIP";
11830
+ }[];
11831
+ certificateStatus: "ACTIVE" | "PENDING" | "FAILED" | null;
11832
+ failureCode: string | null;
11833
+ verifiedAt: string | null;
11834
+ activatedAt: string | null;
11835
+ checkedAt: string | null;
11836
+ createdAt: string;
11837
+ }>;
11838
+ /** `POST /v1/storefront/site/domains/{domainId}/primary` — 대표 주소로 지정한다. 다른 주소는 대표 주소로 301한다 */
11839
+ setPrimaryDomain: (domainId: string) => Promise<{
11840
+ enabled: boolean;
11841
+ limit: number;
11842
+ target: string;
11843
+ domains: {
11844
+ domainId: string;
11845
+ hostname: string;
11846
+ kind: "PLATFORM" | "CUSTOM";
11847
+ status: "ACTIVE" | "FAILED" | "PENDING_DNS" | "PENDING_VALIDATION";
11848
+ isPrimary: boolean;
11849
+ dnsRecords: {
11850
+ type: "CNAME" | "TXT";
11851
+ name: string;
11852
+ value: string;
11853
+ purpose: "ROUTING" | "OWNERSHIP";
11854
+ }[];
11855
+ certificateStatus: "ACTIVE" | "PENDING" | "FAILED" | null;
11856
+ failureCode: string | null;
11857
+ verifiedAt: string | null;
11858
+ activatedAt: string | null;
11859
+ checkedAt: string | null;
11860
+ createdAt: string;
11861
+ }[];
11862
+ }>;
11863
+ /** `DELETE /v1/storefront/site/domains/{domainId}` — 내 도메인 연결을 해제한다(곧바로 끊긴다) */
11864
+ removeDomain: (domainId: string) => Promise<void>;
11280
11865
  /** `POST /v1/storefront/site/disable` — 호스팅을 끈다(사이트 `CLOSED`, 슬러그 90일 보류). 다시 만들 수 있다 */
11281
11866
  disable: (body: DisableStorefrontHostingRequest) => Promise<{
11282
11867
  siteId: string;
@@ -11307,6 +11892,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11307
11892
  buildId: string | null;
11308
11893
  createdByType: string;
11309
11894
  createdAt: string;
11895
+ createdVia?: string | null | undefined;
11310
11896
  } | null;
11311
11897
  provisioning: {
11312
11898
  status: "PENDING" | "FAILED" | "SYNCED";
@@ -11329,7 +11915,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11329
11915
  enabled: boolean;
11330
11916
  session: {
11331
11917
  sessionId: string;
11332
- status: "STARTING" | "RUNNING";
11918
+ status: "RUNNING" | "STARTING";
11333
11919
  startStage: string | null;
11334
11920
  startedAt: string;
11335
11921
  lastEditedAt: string | null;
@@ -11357,7 +11943,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11357
11943
  enabled: boolean;
11358
11944
  session: {
11359
11945
  sessionId: string;
11360
- status: "STARTING" | "RUNNING";
11946
+ status: "RUNNING" | "STARTING";
11361
11947
  startStage: string | null;
11362
11948
  startedAt: string;
11363
11949
  lastEditedAt: string | null;
@@ -11382,7 +11968,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11382
11968
  enabled: boolean;
11383
11969
  session: {
11384
11970
  sessionId: string;
11385
- status: "STARTING" | "RUNNING";
11971
+ status: "RUNNING" | "STARTING";
11386
11972
  startStage: string | null;
11387
11973
  startedAt: string;
11388
11974
  lastEditedAt: string | null;
@@ -11544,6 +12130,7 @@ export declare function createStoreClient(options: StoreClientOptions): {
11544
12130
  buildId: string | null;
11545
12131
  createdByType: string;
11546
12132
  createdAt: string;
12133
+ createdVia?: string | null | undefined;
11547
12134
  };
11548
12135
  build: {
11549
12136
  buildId: string;
@@ -11594,6 +12181,33 @@ export declare function createStoreClient(options: StoreClientOptions): {
11594
12181
  startedAt: string | null;
11595
12182
  finishedAt: string | null;
11596
12183
  durationMs: number | null;
12184
+ dependencies?: {
12185
+ checkedPackages: number;
12186
+ rejected: {
12187
+ name: string;
12188
+ version: string | null;
12189
+ reason: string;
12190
+ detail: string;
12191
+ advisory?: {
12192
+ id: string;
12193
+ url: string | null;
12194
+ severity: string;
12195
+ title: string;
12196
+ } | null | undefined;
12197
+ }[];
12198
+ warnings: {
12199
+ name: string;
12200
+ version: string | null;
12201
+ reason: string;
12202
+ detail: string;
12203
+ advisory?: {
12204
+ id: string;
12205
+ url: string | null;
12206
+ severity: string;
12207
+ title: string;
12208
+ } | null | undefined;
12209
+ }[];
12210
+ } | null | undefined;
11597
12211
  };
11598
12212
  }>;
11599
12213
  /** `GET /v1/storefront/site/builds?limit=` — 빌드 목록(최신 먼저) */
@@ -11648,6 +12262,33 @@ export declare function createStoreClient(options: StoreClientOptions): {
11648
12262
  startedAt: string | null;
11649
12263
  finishedAt: string | null;
11650
12264
  durationMs: number | null;
12265
+ dependencies?: {
12266
+ checkedPackages: number;
12267
+ rejected: {
12268
+ name: string;
12269
+ version: string | null;
12270
+ reason: string;
12271
+ detail: string;
12272
+ advisory?: {
12273
+ id: string;
12274
+ url: string | null;
12275
+ severity: string;
12276
+ title: string;
12277
+ } | null | undefined;
12278
+ }[];
12279
+ warnings: {
12280
+ name: string;
12281
+ version: string | null;
12282
+ reason: string;
12283
+ detail: string;
12284
+ advisory?: {
12285
+ id: string;
12286
+ url: string | null;
12287
+ severity: string;
12288
+ title: string;
12289
+ } | null | undefined;
12290
+ }[];
12291
+ } | null | undefined;
11651
12292
  }[]>;
11652
12293
  /** `GET /v1/storefront/site/builds/{buildId}` — 빌드 상태·실패 단계·로그 꼬리·규칙 결과 */
11653
12294
  getBuild: (buildId: string) => Promise<{
@@ -11699,6 +12340,94 @@ export declare function createStoreClient(options: StoreClientOptions): {
11699
12340
  startedAt: string | null;
11700
12341
  finishedAt: string | null;
11701
12342
  durationMs: number | null;
12343
+ dependencies?: {
12344
+ checkedPackages: number;
12345
+ rejected: {
12346
+ name: string;
12347
+ version: string | null;
12348
+ reason: string;
12349
+ detail: string;
12350
+ advisory?: {
12351
+ id: string;
12352
+ url: string | null;
12353
+ severity: string;
12354
+ title: string;
12355
+ } | null | undefined;
12356
+ }[];
12357
+ warnings: {
12358
+ name: string;
12359
+ version: string | null;
12360
+ reason: string;
12361
+ detail: string;
12362
+ advisory?: {
12363
+ id: string;
12364
+ url: string | null;
12365
+ severity: string;
12366
+ title: string;
12367
+ } | null | undefined;
12368
+ }[];
12369
+ } | null | undefined;
12370
+ }>;
12371
+ /** `GET /v1/storefront/site/source` — 지금 작업 트리를 고정하고 압축 파일(tar.gz) 크기·조각 수를 알린다 */
12372
+ getSource: () => Promise<{
12373
+ siteId: string;
12374
+ storeId: string;
12375
+ storeCode: string;
12376
+ sourceRef: string;
12377
+ treeSha256: string;
12378
+ files: number;
12379
+ bytes: number;
12380
+ archive: {
12381
+ format: "tar+gzip";
12382
+ bytes: number;
12383
+ sha256: string;
12384
+ parts: number;
12385
+ partBytes: number;
12386
+ };
12387
+ editSessionOpen: boolean;
12388
+ }>;
12389
+ /** `GET /v1/storefront/site/source/archive?sourceRef=&part=` — 압축 파일 조각(base64, 4MiB까지) */
12390
+ getSourceArchive: (params: {
12391
+ sourceRef: string;
12392
+ part?: number;
12393
+ }) => Promise<{
12394
+ sourceRef: string;
12395
+ part: number;
12396
+ parts: number;
12397
+ offset: number;
12398
+ bytes: number;
12399
+ totalBytes: number;
12400
+ content: string;
12401
+ }>;
12402
+ /** `POST /v1/storefront/site/source/blobs` — 파일 내용 올리기(해시 키). 작업 트리는 바뀌지 않는다 */
12403
+ uploadSourceBlobs: (body: UploadStorefrontSourceBlobsRequest) => Promise<{
12404
+ stored: number;
12405
+ existing: number;
12406
+ }>;
12407
+ /**
12408
+ * `PUT /v1/storefront/site/source` — 작업 트리 전체를 바꾼다. 409 `SOURCE_CHANGED`(내려받은 뒤 바뀜)·`EDIT_SESSION_OPEN`·
12409
+ * `SOURCE_BLOBS_MISSING`(`details.hashes`를 올리고 다시)
12410
+ */
12411
+ replaceSource: (body: ReplaceStorefrontSourceRequest) => Promise<{
12412
+ sourceRef: string;
12413
+ previousRef: string;
12414
+ treeSha256: string;
12415
+ files: number;
12416
+ bytes: number;
12417
+ changed: boolean;
12418
+ endedEditSession: boolean;
12419
+ dependencyWarnings: {
12420
+ name: string;
12421
+ version: string | null;
12422
+ reason: string;
12423
+ detail: string;
12424
+ advisory?: {
12425
+ id: string;
12426
+ url: string | null;
12427
+ severity: string;
12428
+ title: string;
12429
+ } | null | undefined;
12430
+ }[];
11702
12431
  }>;
11703
12432
  };
11704
12433
  store: {