@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 +746 -17
- package/dist/index.mjs +421 -15
- package/package.json +1 -1
- package/src/client.ts +88 -2
- package/src/schemas/storefront-hosting.ts +525 -9
- package/src/session.ts +42 -1
package/dist/index.mjs
CHANGED
|
@@ -4413,11 +4413,12 @@ const sellerAddressRequestSchema = z.object({
|
|
|
4413
4413
|
/**
|
|
4414
4414
|
* 스토어프론트 호스팅 (이슈 #53, M1: 템플릿 발행) — 관리 API `/v1/storefront/**`의 계약이다.
|
|
4415
4415
|
*
|
|
4416
|
-
* 셀러는 템플릿을 골라 사이트를 만들고 `{slug}.{호스팅 도메인}` 주소를 받는다.
|
|
4416
|
+
* 셀러는 템플릿을 골라 사이트를 만들고 `{slug}.{호스팅 도메인}` 주소를 받는다. 스토어를 만들어도 사이트는 생기지 않고
|
|
4417
|
+
* `POST /v1/storefront/site`가 유일한 생성 경로다. 템플릿은 만들 때만 고르고 바꾸지 않는다. 발행은 버전 단위이고,
|
|
4417
4418
|
* 되돌리기는 이전 버전을 다시 발행하는 것이다(재빌드 없음). 상태의 원천은 api DB이고 Cloudflare 쪽 반영
|
|
4418
4419
|
* (라우팅 표·사이트 Worker)은 커밋 뒤 비동기다 — 반영 상태는 `provisioning`으로 본다.
|
|
4419
4420
|
*
|
|
4420
|
-
* 스코프는 조회 `storefront:r`, 쓰기 `storefront:rw`(역할 OWNER·ADMIN)다. 에이전트(MCP)의
|
|
4421
|
+
* 스코프는 조회 `storefront:r`, 쓰기 `storefront:rw`(역할 OWNER·ADMIN)다. 에이전트(MCP)의 발행·되돌리기·
|
|
4421
4422
|
* 공개 전환·슬러그 변경·호스팅 끄기는 승인(`APPROVAL_REQUIRED`)이다 — 구매자가 보는 화면을 바꾸는 쓰기다.
|
|
4422
4423
|
*
|
|
4423
4424
|
* 오류 코드:
|
|
@@ -4432,6 +4433,7 @@ const sellerAddressRequestSchema = z.object({
|
|
|
4432
4433
|
* - 409 `STORE_SUSPENDED` — 정지된 스토어에는 사이트를 만들 수 없다
|
|
4433
4434
|
* - 409 `STOREFRONT_VERSION_NOT_READY` — 빌드가 끝나지 않았거나 실패한 버전은 발행할 수 없다
|
|
4434
4435
|
* - 409 `STOREFRONT_NO_ROLLBACK_TARGET` — 되돌릴 이전 발행 버전이 없다
|
|
4436
|
+
* - 409 `TEMPLATE_CHANGE_NOT_SUPPORTED` — 템플릿 변경(`POST /v1/storefront/site/template`, 폐기)은 항상 이 오류다
|
|
4435
4437
|
* - 400 `STOREFRONT_SLUG_CONFIRM_MISMATCH` — 호스팅 끄기 확인 입력이 현재 슬러그와 다르다
|
|
4436
4438
|
* - 503 `STOREFRONT_PREVIEW_NOT_CONFIGURED` — 미리보기 서명 키가 설정되지 않았다
|
|
4437
4439
|
*
|
|
@@ -4451,6 +4453,16 @@ const sellerAddressRequestSchema = z.object({
|
|
|
4451
4453
|
* - 409 `STOREFRONT_BUILD_IN_PROGRESS` — 이 사이트에 끝나지 않은 빌드가 있다(사이트당 하나)
|
|
4452
4454
|
* - 404 `STOREFRONT_BUILD_NOT_FOUND`
|
|
4453
4455
|
* - 502 `STOREFRONT_SANDBOX_UNAVAILABLE` — 편집 Sandbox 호출이 실패했다. 잠시 뒤 다시 한다
|
|
4456
|
+
*
|
|
4457
|
+
* 소스 내려받기·올리기(#60, `/v1/storefront/site/source/**`, `sayren` CLI):
|
|
4458
|
+
* - 409 `SOURCE_CHANGED` — 작업 트리가 내려받은 뒤(`expectedBaseRef`) 바뀌었다(콘솔·AI 편집). `error.details.currentRef`
|
|
4459
|
+
* - 409 `EDIT_SESSION_OPEN` — 편집 환경이 열려 있다. `endEditSession: true`로 끄고 진행할 수 있다
|
|
4460
|
+
* - 409 `SOURCE_BLOBS_MISSING` — 올리지 않은 파일 내용이 있다(`error.details.hashes`). `POST source/blobs`로 올리고 다시 한다
|
|
4461
|
+
* - 409 `DEPENDENCY_REJECTED` — 쓸 수 없는 npm 의존성이다(`error.details.rejected: [{ name, version, reason, detail }]`)
|
|
4462
|
+
* - 413 `SOURCE_TOO_MANY_NEW_FILES` — 한 번에 새 내용이 800개를 넘는다(`error.details.max`). 나눠서 바꾼다
|
|
4463
|
+
* - 400 `DEPENDENCY_FILES_MISMATCH` — `packageJson`·`lockfile` 내용이 목록의 해시와 다르거나 빠졌다
|
|
4464
|
+
* - 400 `INVALID_SOURCE_REF` · `BLOB_HASH_MISMATCH` · `INVALID_FILE_PATH`(`.env*`·작업 트리 밖 경로)
|
|
4465
|
+
* - 404 `STOREFRONT_SOURCE_NOT_FOUND` — 그 스냅샷이 없다
|
|
4454
4466
|
*/
|
|
4455
4467
|
/**
|
|
4456
4468
|
* 슬러그 형식 — 스토어 코드와 같은 DNS 라벨 규칙(소문자·숫자·하이픈 3~30자, 하이픈으로 시작·끝 불가)에
|
|
@@ -4473,7 +4485,8 @@ const RESERVED_STOREFRONT_SLUGS = [
|
|
|
4473
4485
|
"suspended",
|
|
4474
4486
|
"dispatch",
|
|
4475
4487
|
"control",
|
|
4476
|
-
"outbound"
|
|
4488
|
+
"outbound",
|
|
4489
|
+
"sites"
|
|
4477
4490
|
];
|
|
4478
4491
|
/**
|
|
4479
4492
|
* 편집 미리보기 호스트 접미사 — 편집 미리보기 주소는 `{사이트 id 정규화}-preview.{호스팅 도메인}`이다(M2b). 사이트 주소와 같은
|
|
@@ -4507,7 +4520,7 @@ const storefrontTemplateSchema = z.object({
|
|
|
4507
4520
|
industry: z.string().describe("업종 (예: `general`·`fashion`·`food`). 목록 필터에 쓴다"),
|
|
4508
4521
|
description: z.string().describe("템플릿 설명"),
|
|
4509
4522
|
thumbnailUrl: z.string().nullable().describe("썸네일 이미지 주소. 없으면 null"),
|
|
4510
|
-
version: z.string().describe("현재 템플릿 버전. 새
|
|
4523
|
+
version: z.string().describe("현재 템플릿 버전. 새 사이트는 이 버전으로 만든다"),
|
|
4511
4524
|
isDefault: z.boolean().describe("기본 템플릿인가 (스토어 생성 시 자동 생성에 쓴다)")
|
|
4512
4525
|
});
|
|
4513
4526
|
/**
|
|
@@ -4533,6 +4546,7 @@ const storefrontVersionSchema = z.object({
|
|
|
4533
4546
|
source: z.enum(["TEMPLATE", "EDIT"]).describe("`TEMPLATE` 템플릿 산출물 그대로 · `EDIT` 편집 작업 트리를 빌드함"),
|
|
4534
4547
|
buildId: z.string().nullable().describe("편집 버전의 빌드 (`GET /v1/storefront/site/builds/{buildId}`). 템플릿 버전은 null"),
|
|
4535
4548
|
createdByType: z.string().describe("만든 행위자 유형 (`USER`·`AGENT`·`APP`·`TOKEN`·`SYSTEM`). 늘어날 수 있다"),
|
|
4549
|
+
createdVia: z.string().nullable().optional().describe("만든 경로 (`CONSOLE` 콘솔 · `AI` AI 에이전트(MCP) · `CLI` `sayren` CLI · `API` 관리 API · `SYSTEM` 자동). 늘어날 수 있다"),
|
|
4536
4550
|
createdAt: z.string().describe("만든 시각 (ISO 8601)")
|
|
4537
4551
|
});
|
|
4538
4552
|
const storefrontSiteStatusSchema = z.enum([
|
|
@@ -4545,7 +4559,7 @@ const storefrontSourceModeSchema = z.enum(["MANAGED", "CUSTOM"]).describe("`MANA
|
|
|
4545
4559
|
const storefrontDomainSchema = z.object({
|
|
4546
4560
|
hostname: z.string().describe("호스트 이름 (예: `mystore.sayren.co`)"),
|
|
4547
4561
|
kind: z.enum(["PLATFORM", "CUSTOM"]).describe("`PLATFORM` 슬러그 주소 · `CUSTOM` 내 도메인"),
|
|
4548
|
-
status: z.enum(["ACTIVE", "HELD"]).describe("`ACTIVE` 사용 중 · `HELD` 슬러그를 바꿔 보류 중(새 주소로 301)"),
|
|
4562
|
+
status: z.enum(["ACTIVE", "HELD"]).describe("`ACTIVE` 사용 중 · `HELD` 슬러그를 바꿔 보류 중(새 주소로 301). 연결 중인 내 도메인은 싣지 않는다(`GET /v1/storefront/site/domains`)"),
|
|
4549
4563
|
isPrimary: z.boolean().describe("대표 주소인가 (`Store.storefrontUrl`)"),
|
|
4550
4564
|
holdUntil: z.string().nullable().describe("보류가 끝나는 시각 (ISO 8601). 보류가 아니면 null")
|
|
4551
4565
|
});
|
|
@@ -4568,7 +4582,7 @@ const storefrontProvisioningSchema = z.object({
|
|
|
4568
4582
|
*/
|
|
4569
4583
|
const storefrontEditPreviewSchema = z.object({ hostname: z.string().nullable().describe("편집 미리보기 호스트 (예: `sfs-ab12cd34-preview.sayren.co`). 편집을 쓸 수 없으면 null") });
|
|
4570
4584
|
/**
|
|
4571
|
-
* 사이트 정지 — 운영 정책에 따라 플랫폼 운영자가 사이트를 정지한다. 정지 중에는 방문자에게 정지 안내가 보이고
|
|
4585
|
+
* 사이트 정지 — 운영 정책에 따라 플랫폼 운영자가 사이트를 정지한다. 정지 중에는 방문자에게 정지 안내가 보이고 발행·되돌리기·
|
|
4572
4586
|
* 공개 전환·슬러그 변경·끄기·편집이 409 `STOREFRONT_SITE_NOT_ACTIVE`다. 셀러가 풀 수 없다(고객센터로 문의한다).
|
|
4573
4587
|
*/
|
|
4574
4588
|
const storefrontSuspensionSchema = z.object({
|
|
@@ -4610,10 +4624,56 @@ const storefrontSlugAvailabilitySchema = z.object({
|
|
|
4610
4624
|
"CURRENT"
|
|
4611
4625
|
]).nullable().describe("쓸 수 없는 이유. `INVALID` 형식 · `RESERVED` 예약어 · `TAKEN` 사용·보류 중 · `CURRENT` 지금 내 슬러그")
|
|
4612
4626
|
});
|
|
4627
|
+
/**
|
|
4628
|
+
* 배포 진행 — 사이트의 지금 발행 상태가 공개 주소에 반영되기까지의 단계와 기록이다(콘솔의 스토어프론트 만들기 3단계가 폴링한다).
|
|
4629
|
+
* 만들기(`POST /v1/storefront/site`)는 곧바로 201로 답하고 반영은 그 뒤에 비동기로 하므로, 끝났는지는 이 조회로 본다.
|
|
4630
|
+
* 템플릿 사이트는 미리 빌드한 템플릿 산출물을 올리므로 빌드 단계가 없다. 기록은 사이트 상태에서 만든 요약이다.
|
|
4631
|
+
*/
|
|
4632
|
+
const storefrontDeploymentStepSchema = z.object({
|
|
4633
|
+
key: z.enum([
|
|
4634
|
+
"SITE",
|
|
4635
|
+
"UPLOAD",
|
|
4636
|
+
"PUBLISH"
|
|
4637
|
+
]).describe("`SITE` 사이트·첫 버전 기록 · `UPLOAD` 버전 올리기 · `PUBLISH` 주소 연결·발행"),
|
|
4638
|
+
status: z.enum([
|
|
4639
|
+
"PENDING",
|
|
4640
|
+
"RUNNING",
|
|
4641
|
+
"DONE",
|
|
4642
|
+
"FAILED"
|
|
4643
|
+
]),
|
|
4644
|
+
finishedAt: z.string().nullable().describe("끝난 시각 (ISO 8601). 모르거나 끝나지 않았으면 null")
|
|
4645
|
+
});
|
|
4646
|
+
const storefrontDeploymentLogSchema = z.object({
|
|
4647
|
+
at: z.string().nullable().describe("기록 시각 (ISO 8601). 모르면 null"),
|
|
4648
|
+
level: z.enum([
|
|
4649
|
+
"INFO",
|
|
4650
|
+
"WARN",
|
|
4651
|
+
"ERROR"
|
|
4652
|
+
]),
|
|
4653
|
+
code: z.string().describe("기록 종류 (`SITE_CREATED`·`ADDRESS_RESERVED`·`WAITING`·`SYNCING`·`VERSION_UPLOADED`·`SYNC_FAILED`·`RETRY_SCHEDULED`·`PUBLISHED`)"),
|
|
4654
|
+
message: z.string().describe("사람이 읽는 문장")
|
|
4655
|
+
});
|
|
4656
|
+
const storefrontDeploymentSchema = z.object({
|
|
4657
|
+
siteId: z.string(),
|
|
4658
|
+
status: z.enum([
|
|
4659
|
+
"IN_PROGRESS",
|
|
4660
|
+
"SUCCEEDED",
|
|
4661
|
+
"FAILED"
|
|
4662
|
+
]).describe("`IN_PROGRESS` 반영 중 · `SUCCEEDED` 공개 주소에 반영됨 · `FAILED` 여러 번 실패했거나 다음 자동 시도가 멀다(`POST …/deployment/retry`로 곧바로 다시 시도한다)"),
|
|
4663
|
+
url: z.string().describe("사이트 기본 주소 (`https://{slug}.{호스팅 도메인}`)"),
|
|
4664
|
+
startedAt: z.string().describe("사이트를 만든 시각 (ISO 8601)"),
|
|
4665
|
+
finishedAt: z.string().nullable().describe("반영을 마친 시각 (ISO 8601)"),
|
|
4666
|
+
steps: z.array(storefrontDeploymentStepSchema),
|
|
4667
|
+
log: z.array(storefrontDeploymentLogSchema).describe("오래된 것부터"),
|
|
4668
|
+
errorCode: z.string().nullable().describe("마지막 반영 실패 코드"),
|
|
4669
|
+
attempts: z.number().int().describe("연속 실패 횟수"),
|
|
4670
|
+
nextAttemptAt: z.string().nullable().describe("다음 자동 시도 시각 (ISO 8601)")
|
|
4671
|
+
});
|
|
4613
4672
|
const createStorefrontSiteRequestSchema = z.object({
|
|
4614
4673
|
templateId: z.string().min(1).max(64).describe("템플릿 id"),
|
|
4615
4674
|
slug: storefrontSlugSchema.optional().describe("주소 슬러그. 생략하면 스토어 코드")
|
|
4616
4675
|
});
|
|
4676
|
+
/** @deprecated 템플릿 변경은 지원하지 않는다(항상 409 `TEMPLATE_CHANGE_NOT_SUPPORTED`). 호환을 위해 스키마만 남겼다 */
|
|
4617
4677
|
const changeStorefrontTemplateRequestSchema = z.object({
|
|
4618
4678
|
templateId: z.string().min(1).max(64).describe("바꿀 템플릿 id"),
|
|
4619
4679
|
publish: z.boolean().optional().describe("새 버전을 곧바로 발행하는가 (기본 true). false면 버전만 만든다"),
|
|
@@ -4647,6 +4707,186 @@ const storefrontPreviewLinkSchema = z.object({
|
|
|
4647
4707
|
url: z.string().describe("미리보기 링크 — 5분 안에 연다"),
|
|
4648
4708
|
expiresAt: z.string().describe("링크 만료 시각 (ISO 8601)")
|
|
4649
4709
|
});
|
|
4710
|
+
/**
|
|
4711
|
+
* 연결할 수 없는 도메인 — 플랫폼이 쓰는 도메인과 그 하위(기본 주소는 슬러그로 바꾼다). 호스팅 도메인은 서버 설정이라
|
|
4712
|
+
* `storefrontCustomHostnameProblem`의 인자로 따로 받는다.
|
|
4713
|
+
*/
|
|
4714
|
+
const STOREFRONT_PLATFORM_DOMAINS = [
|
|
4715
|
+
"sayren.co",
|
|
4716
|
+
"sayren.app",
|
|
4717
|
+
"sayren.shop",
|
|
4718
|
+
"avarlabs.com"
|
|
4719
|
+
];
|
|
4720
|
+
/** 공개 인터넷에서 쓸 수 없는 최상위 도메인(RFC 2606·6761·6762 등) */
|
|
4721
|
+
const NON_PUBLIC_TLDS = [
|
|
4722
|
+
"example",
|
|
4723
|
+
"localhost",
|
|
4724
|
+
"local",
|
|
4725
|
+
"test",
|
|
4726
|
+
"invalid",
|
|
4727
|
+
"onion",
|
|
4728
|
+
"internal",
|
|
4729
|
+
"arpa",
|
|
4730
|
+
"home",
|
|
4731
|
+
"lan",
|
|
4732
|
+
"corp",
|
|
4733
|
+
"intranet",
|
|
4734
|
+
"alt"
|
|
4735
|
+
];
|
|
4736
|
+
/**
|
|
4737
|
+
* 공용 접미사 — 누구나 그 아래 이름을 받는 도메인이라 접미사 자체는 연결할 수 없다. Public Suffix List 전체가 아니라 자주 틀리는
|
|
4738
|
+
* 것만 둔다(여기 없는 접미사도 TXT 소유 확인을 통과할 수 없어 연결되지 않는다 — 이 목록은 추가 단계에서 빨리 알려 주는 안내다).
|
|
4739
|
+
*/
|
|
4740
|
+
const STOREFRONT_PUBLIC_SUFFIXES = [
|
|
4741
|
+
"co.kr",
|
|
4742
|
+
"or.kr",
|
|
4743
|
+
"ne.kr",
|
|
4744
|
+
"go.kr",
|
|
4745
|
+
"ac.kr",
|
|
4746
|
+
"re.kr",
|
|
4747
|
+
"pe.kr",
|
|
4748
|
+
"mil.kr",
|
|
4749
|
+
"hs.kr",
|
|
4750
|
+
"ms.kr",
|
|
4751
|
+
"es.kr",
|
|
4752
|
+
"sc.kr",
|
|
4753
|
+
"kg.kr",
|
|
4754
|
+
"seoul.kr",
|
|
4755
|
+
"busan.kr",
|
|
4756
|
+
"incheon.kr",
|
|
4757
|
+
"daegu.kr",
|
|
4758
|
+
"gwangju.kr",
|
|
4759
|
+
"daejeon.kr",
|
|
4760
|
+
"ulsan.kr",
|
|
4761
|
+
"gyeonggi.kr",
|
|
4762
|
+
"gangwon.kr",
|
|
4763
|
+
"chungbuk.kr",
|
|
4764
|
+
"chungnam.kr",
|
|
4765
|
+
"jeonbuk.kr",
|
|
4766
|
+
"jeonnam.kr",
|
|
4767
|
+
"gyeongbuk.kr",
|
|
4768
|
+
"gyeongnam.kr",
|
|
4769
|
+
"jeju.kr",
|
|
4770
|
+
"co.jp",
|
|
4771
|
+
"ne.jp",
|
|
4772
|
+
"or.jp",
|
|
4773
|
+
"com.cn",
|
|
4774
|
+
"net.cn",
|
|
4775
|
+
"com.tw",
|
|
4776
|
+
"com.hk",
|
|
4777
|
+
"co.uk",
|
|
4778
|
+
"org.uk",
|
|
4779
|
+
"com.au",
|
|
4780
|
+
"net.au",
|
|
4781
|
+
"com.sg",
|
|
4782
|
+
"co.nz",
|
|
4783
|
+
"com.br",
|
|
4784
|
+
"github.io",
|
|
4785
|
+
"gitlab.io",
|
|
4786
|
+
"pages.dev",
|
|
4787
|
+
"workers.dev",
|
|
4788
|
+
"vercel.app",
|
|
4789
|
+
"netlify.app",
|
|
4790
|
+
"herokuapp.com",
|
|
4791
|
+
"web.app",
|
|
4792
|
+
"firebaseapp.com",
|
|
4793
|
+
"blogspot.com",
|
|
4794
|
+
"cloudfront.net",
|
|
4795
|
+
"azurewebsites.net",
|
|
4796
|
+
"myshopify.com",
|
|
4797
|
+
"wixsite.com",
|
|
4798
|
+
"cafe24.com",
|
|
4799
|
+
"imweb.me"
|
|
4800
|
+
];
|
|
4801
|
+
/** 스토어당 연결할 수 있는 도메인 수 기본값 — 요금제(#44) 전의 상한이다. 실제 값은 `GET …/domains`의 `limit` */
|
|
4802
|
+
const STOREFRONT_CUSTOM_DOMAIN_LIMIT_DEFAULT = 2;
|
|
4803
|
+
/** DNS를 넣을 때까지 기다리는 기간(일) — 지나면 `FAILED`(`DNS_NOT_CONFIGURED`) */
|
|
4804
|
+
const STOREFRONT_DOMAIN_DNS_WAIT_DAYS = 7;
|
|
4805
|
+
/** 연결된 도메인의 DNS가 이 서비스를 가리키지 않아도 연결을 유지하는 기간(일) — 지나면 서버가 해제한다 */
|
|
4806
|
+
const STOREFRONT_DOMAIN_DNS_GRACE_DAYS = 7;
|
|
4807
|
+
/** 소유 확인 TXT 레코드의 이름 앞부분 — `_sayren-verify.{도메인}` */
|
|
4808
|
+
const STOREFRONT_DOMAIN_TXT_LABEL = "_sayren-verify";
|
|
4809
|
+
const LABEL = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
4810
|
+
const PUNYCODE_TLD = /^xn--[a-z0-9-]{1,59}$/;
|
|
4811
|
+
const ALPHA_TLD = /^[a-z]{2,63}$/;
|
|
4812
|
+
/**
|
|
4813
|
+
* 도메인 정규화 — 앞뒤 공백·끝 점을 떼고 소문자로 바꾸며 국제화 도메인은 punycode(`xn--`)로 바꾼다. 스킴·경로·포트가 붙은 입력
|
|
4814
|
+
* (`https://www.a.com/`)은 호스트만 남기지 않고 그대로 두어 형식 검사에서 떨어진다(서버는 사용자가 적은 도메인만 받는다).
|
|
4815
|
+
* 변환할 수 없으면 입력을 소문자로만 바꿔 돌려준다(형식 검사가 거부한다).
|
|
4816
|
+
*/
|
|
4817
|
+
function normalizeStorefrontHostname(input) {
|
|
4818
|
+
const trimmed = input.trim().replace(/\.+$/, "");
|
|
4819
|
+
if (!trimmed || /[\s/:?#@\\[\]%]/.test(trimmed)) return trimmed.toLowerCase();
|
|
4820
|
+
if (/^[\x21-\x7e]+$/.test(trimmed)) return trimmed.toLowerCase();
|
|
4821
|
+
try {
|
|
4822
|
+
return new URL(`http://${trimmed}`).hostname.toLowerCase();
|
|
4823
|
+
} catch {
|
|
4824
|
+
return trimmed.toLowerCase();
|
|
4825
|
+
}
|
|
4826
|
+
}
|
|
4827
|
+
/**
|
|
4828
|
+
* 연결할 수 있는 도메인인가(정규화한 값 기준). 문제가 없으면 null이다. 규칙: 253자 이하, 라벨 2개 이상, 라벨은 소문자·숫자·하이픈
|
|
4829
|
+
* 63자 이하(하이픈으로 시작·끝 불가), 최상위 도메인은 영문자이거나 punycode, IP 주소·와일드카드·공개 인터넷 밖 최상위 도메인·
|
|
4830
|
+
* 플랫폼 도메인과 그 하위·공용 접미사 자체는 안 된다. 제어·디스패치 Worker가 형식 규칙의 복제본을 들고 있다(api
|
|
4831
|
+
* `test/storefront-hosting-parity.spec.ts`가 대조한다).
|
|
4832
|
+
*/
|
|
4833
|
+
function storefrontCustomHostnameProblem(hostname, hostingDomain = "sayren.co") {
|
|
4834
|
+
if (hostname.startsWith("*.")) return "WILDCARD";
|
|
4835
|
+
if (/^\d{1,3}(\.\d{1,3}){3}$/.test(hostname) || /^\[?[0-9a-f:.]*:[0-9a-f:.]*\]?$/.test(hostname)) return "IP_ADDRESS";
|
|
4836
|
+
if (hostname.length === 0 || hostname.length > 253) return "FORMAT";
|
|
4837
|
+
const labels = hostname.split(".");
|
|
4838
|
+
if (labels.length < 2) return "SINGLE_LABEL";
|
|
4839
|
+
if (!labels.every((label) => LABEL.test(label))) return "FORMAT";
|
|
4840
|
+
const tld = labels[labels.length - 1] ?? "";
|
|
4841
|
+
if (!ALPHA_TLD.test(tld) && !PUNYCODE_TLD.test(tld)) return "FORMAT";
|
|
4842
|
+
if (NON_PUBLIC_TLDS.includes(tld)) return "NON_PUBLIC_TLD";
|
|
4843
|
+
const platform = /* @__PURE__ */ new Set([...STOREFRONT_PLATFORM_DOMAINS, hostingDomain.toLowerCase()]);
|
|
4844
|
+
for (const domain of platform) if (hostname === domain || hostname.endsWith(`.${domain}`)) return "PLATFORM_DOMAIN";
|
|
4845
|
+
if (STOREFRONT_PUBLIC_SUFFIXES.includes(hostname)) return "PUBLIC_SUFFIX";
|
|
4846
|
+
return null;
|
|
4847
|
+
}
|
|
4848
|
+
/** 소유 확인 TXT 레코드의 전체 이름 */
|
|
4849
|
+
function storefrontDomainTxtNameOf(hostname) {
|
|
4850
|
+
return `${STOREFRONT_DOMAIN_TXT_LABEL}.${hostname}`;
|
|
4851
|
+
}
|
|
4852
|
+
const storefrontCustomDomainStatusSchema = z.enum([
|
|
4853
|
+
"PENDING_DNS",
|
|
4854
|
+
"PENDING_VALIDATION",
|
|
4855
|
+
"ACTIVE",
|
|
4856
|
+
"FAILED"
|
|
4857
|
+
]).describe("`PENDING_DNS` DNS 설정 대기(소유 확인 전) · `PENDING_VALIDATION` 소유 확인됨, 인증서 발급 중 · `ACTIVE` 연결됨 · `FAILED` 연결 실패(`failureCode`)");
|
|
4858
|
+
const storefrontDnsRecordSchema = z.object({
|
|
4859
|
+
type: z.enum(["CNAME", "TXT"]).describe("레코드 유형"),
|
|
4860
|
+
name: z.string().describe("레코드 이름 (전체 이름, 예: `_sayren-verify.shop.brand.com`)"),
|
|
4861
|
+
value: z.string().describe("레코드 값"),
|
|
4862
|
+
purpose: z.enum(["ROUTING", "OWNERSHIP"]).describe("`ROUTING` 연결 · `OWNERSHIP` 소유 확인")
|
|
4863
|
+
});
|
|
4864
|
+
const storefrontSiteDomainSchema = z.object({
|
|
4865
|
+
domainId: z.string(),
|
|
4866
|
+
hostname: z.string().describe("호스트 이름 (punycode, 소문자)"),
|
|
4867
|
+
kind: z.enum(["PLATFORM", "CUSTOM"]).describe("`PLATFORM` 기본 주소(슬러그) · `CUSTOM` 내 도메인"),
|
|
4868
|
+
status: storefrontCustomDomainStatusSchema.describe("기본 주소는 늘 `ACTIVE`다. 내 도메인은 연결 단계"),
|
|
4869
|
+
isPrimary: z.boolean().describe("대표 주소인가 (`Store.storefrontUrl`). 대표가 아닌 주소는 대표로 301한다"),
|
|
4870
|
+
dnsRecords: z.array(storefrontDnsRecordSchema).describe("DNS에 넣을 레코드. 기본 주소는 빈 배열"),
|
|
4871
|
+
certificateStatus: z.enum([
|
|
4872
|
+
"PENDING",
|
|
4873
|
+
"ACTIVE",
|
|
4874
|
+
"FAILED"
|
|
4875
|
+
]).nullable().describe("인증서 상태. 소유 확인 전·기본 주소는 null"),
|
|
4876
|
+
failureCode: z.string().nullable().describe("실패·경고 코드. `DNS_NOT_CONFIGURED` 기한 안에 TXT를 찾지 못함 · `VALIDATION_TIMEOUT` 인증서 발급 기한 지남 · `CERTIFICATE_FAILED` 인증서 발급 실패 · `DNS_NOT_POINTING` 연결된 뒤 DNS가 이 서비스를 가리키지 않음(기한이 지나면 해제) · `DOMAIN_TAKEN` 다른 스토어가 먼저 소유를 확인함 · `HOSTNAME_BLOCKED` 연결이 막힘 · `HOSTNAME_CONFLICT` 연결 준비 중 충돌(운영 확인). 늘어날 수 있다"),
|
|
4877
|
+
verifiedAt: z.string().nullable().describe("소유를 확인한 시각 (ISO 8601)"),
|
|
4878
|
+
activatedAt: z.string().nullable().describe("연결된 시각 (ISO 8601)"),
|
|
4879
|
+
checkedAt: z.string().nullable().describe("마지막으로 확인한 시각 (ISO 8601)"),
|
|
4880
|
+
createdAt: z.string()
|
|
4881
|
+
});
|
|
4882
|
+
/** `GET /v1/storefront/site/domains` — 사이트의 주소 목록(기본 주소 + 내 도메인)과 연결 설정 */
|
|
4883
|
+
const storefrontSiteDomainsSchema = z.object({
|
|
4884
|
+
enabled: z.boolean().describe("내 도메인을 추가할 수 있는가 (플랫폼 스위치)"),
|
|
4885
|
+
limit: z.number().int().min(0).describe("스토어당 내 도메인 수 상한 (해제한 도메인은 세지 않는다)"),
|
|
4886
|
+
target: z.string().describe("CNAME 대상 (예: `sites.sayren.co`)"),
|
|
4887
|
+
domains: z.array(storefrontSiteDomainSchema).describe("대표 주소 먼저, 그다음 추가한 순서")
|
|
4888
|
+
});
|
|
4889
|
+
const addStorefrontDomainRequestSchema = z.object({ hostname: z.string().min(1).max(300).describe("연결할 도메인 (예: `shop.brand.com`). 서버가 소문자·punycode로 정규화한다") });
|
|
4650
4890
|
/** 플랫폼 전체 동시 편집 환경 상한 */
|
|
4651
4891
|
const STOREFRONT_EDIT_CAPACITY = 20;
|
|
4652
4892
|
/** 활동이 없으면 편집 환경이 잠드는 시간(분). 작업 트리는 보존된다 */
|
|
@@ -4877,7 +5117,7 @@ const storefrontRuleResultSchema = z.object({
|
|
|
4877
5117
|
severity: storefrontRuleSeveritySchema.optional()
|
|
4878
5118
|
});
|
|
4879
5119
|
/**
|
|
4880
|
-
* 규칙 검증 보고서 — `@sayren/mcp`의 `verify_storefront`와 같은 모양이다(원천 `
|
|
5120
|
+
* 규칙 검증 보고서 — `@sayren/mcp`의 `verify_storefront`와 같은 모양이다(원천 `packages/mcp/src/verify.ts`). 위반마다
|
|
4881
5121
|
* 고칠 자리(`file`·`line`)와 방법(`fix`·`example`)을 싣는다. `POST /v1/storefront/site/verify`(편집 환경이 잠들어 있어도
|
|
4882
5122
|
* 된다)와 빌드의 `verify`가 이 모양이다.
|
|
4883
5123
|
*/
|
|
@@ -4923,9 +5163,11 @@ const STOREFRONT_BUILD_TERMINAL_STATUSES = [
|
|
|
4923
5163
|
];
|
|
4924
5164
|
/**
|
|
4925
5165
|
* 빌드 단계 — 이 순서로 돈다. 첫 실패에서 멈추지만 규칙 검증(`VERIFY`)은 실패해도 타입 검사까지 이어서 해 한 번에 알려 준다.
|
|
4926
|
-
* `UPLOAD`는 사이트 버전 Worker 업로드다(성공하면 발행할 수 있다).
|
|
5166
|
+
* `UPLOAD`는 사이트 버전 Worker 업로드다(성공하면 발행할 수 있다). `DEPENDENCIES`는 빌드 시작 전 의존성 검사(거절 목록·보안 권고)다.
|
|
5167
|
+
* 값은 늘어날 수 있다.
|
|
4927
5168
|
*/
|
|
4928
5169
|
const STOREFRONT_BUILD_STAGES = [
|
|
5170
|
+
"DEPENDENCIES",
|
|
4929
5171
|
"VERIFY",
|
|
4930
5172
|
"RESTORE",
|
|
4931
5173
|
"INSTALL",
|
|
@@ -4935,13 +5177,37 @@ const STOREFRONT_BUILD_STAGES = [
|
|
|
4935
5177
|
"PACK",
|
|
4936
5178
|
"UPLOAD"
|
|
4937
5179
|
];
|
|
5180
|
+
/**
|
|
5181
|
+
* 의존성 검사 결과 한 줄(#61) — 거절(`DEPENDENCY_REJECTED`의 `details.rejected`)·경고(빌드 `dependencies`, 소스 교체 `dependencyWarnings`)가
|
|
5182
|
+
* 같은 모양이다. 대상 패키지와 사유. 셀러가 고칠 수 있게 버전·권고 id·거절 사유를 싣는다.
|
|
5183
|
+
* `reason`: `DENYLISTED`(거절 목록) · `ADVISORY`(보안 권고) · `MALWARE`(악성 코드 권고, 패키지 전체) · `INSTALL_SCRIPT`(루트
|
|
5184
|
+
* package.json의 설치 훅·의존성의 설치 스크립트, 경고) · `INSTALL_CONFIG`(설치 방식 필드, 경고) · `UNSUPPORTED_SOURCE`(레지스트리 밖 설치 경로) · `BUNDLED_DEPENDENCIES`(묶여
|
|
5185
|
+
* 오는 의존성, 경고) · `INVALID_MANIFEST`(package.json·잠금 파일 형식), 늘어날 수 있다.
|
|
5186
|
+
*/
|
|
5187
|
+
const storefrontDependencyFindingSchema = z.object({
|
|
5188
|
+
name: z.string().describe("패키지 이름. 파일 전체의 문제면 `package.json`·`pnpm-lock.yaml`"),
|
|
5189
|
+
version: z.string().nullable().describe("해당 버전. 버전과 무관하면 null"),
|
|
5190
|
+
reason: z.string().describe("사유 코드"),
|
|
5191
|
+
detail: z.string().describe("셀러용 설명"),
|
|
5192
|
+
advisory: z.object({
|
|
5193
|
+
id: z.string(),
|
|
5194
|
+
url: z.string().nullable(),
|
|
5195
|
+
severity: z.string(),
|
|
5196
|
+
title: z.string()
|
|
5197
|
+
}).nullable().optional().describe("보안 권고(사유가 `ADVISORY`·`MALWARE`일 때)")
|
|
5198
|
+
});
|
|
5199
|
+
const storefrontBuildDependenciesSchema = z.object({
|
|
5200
|
+
checkedPackages: z.number().int().min(0).describe("검사한 설치 트리의 패키지(이름·버전) 수"),
|
|
5201
|
+
rejected: z.array(storefrontDependencyFindingSchema).describe("빌드를 막은 의존성"),
|
|
5202
|
+
warnings: z.array(storefrontDependencyFindingSchema).describe("빌드는 막지 않는 경고(중간 이하 심각도 권고)")
|
|
5203
|
+
});
|
|
4938
5204
|
const storefrontBuildSchema = z.object({
|
|
4939
5205
|
buildId: z.string(),
|
|
4940
5206
|
versionId: z.string(),
|
|
4941
5207
|
versionNumber: z.number().int().min(1),
|
|
4942
5208
|
status: storefrontBuildStatusSchema,
|
|
4943
|
-
failureStage: z.string().nullable().describe("실패한 단계 (`VERIFY`·`RESTORE`·`INSTALL`·`TYPECHECK`·`BUILD`·`BUNDLE`·`PACK`·`UPLOAD`, 늘어날 수 있다). 실패가 아니면 null"),
|
|
4944
|
-
errorCode: z.string().nullable().describe("실패 코드 (`RULES_VIOLATED`·`INSTALL_FAILED`·`TYPECHECK_FAILED`·`BUILD_FAILED`·`BUNDLE_FAILED`·`ARTIFACT_INVALID`·`UPLOAD_FAILED`·`SOURCE_NOT_FOUND`·`CAPACITY_EXHAUSTED`·`INTERNAL`, 늘어날 수 있다). 실패가 아니면 null"),
|
|
5209
|
+
failureStage: z.string().nullable().describe("실패한 단계 (`DEPENDENCIES`·`VERIFY`·`RESTORE`·`INSTALL`·`TYPECHECK`·`BUILD`·`BUNDLE`·`PACK`·`UPLOAD`, 늘어날 수 있다). 실패가 아니면 null"),
|
|
5210
|
+
errorCode: z.string().nullable().describe("실패 코드 (`DEPENDENCY_REJECTED`·`DEPENDENCY_CHECK_UNAVAILABLE`·`DEPENDENCIES_CHANGED`·`RULES_VIOLATED`·`INSTALL_FAILED`·`INSTALL_TOO_LARGE`·`TYPECHECK_FAILED`·`BUILD_FAILED`·`BUILD_TIMEOUT`·`BUNDLE_FAILED`·`ARTIFACT_TOO_LARGE`·`ARTIFACT_INVALID`·`UPLOAD_FAILED`·`SOURCE_NOT_FOUND`·`CAPACITY_EXHAUSTED`·`INTERNAL`, 늘어날 수 있다). 실패가 아니면 null"),
|
|
4945
5211
|
logTail: z.string().nullable().describe("실패 단계 출력 꼬리 (최대 8KB). 없으면 null"),
|
|
4946
5212
|
stages: z.array(z.object({
|
|
4947
5213
|
stage: z.string(),
|
|
@@ -4949,6 +5215,7 @@ const storefrontBuildSchema = z.object({
|
|
|
4949
5215
|
durationMs: z.number().int().min(0)
|
|
4950
5216
|
})).describe("끝난 단계 (도는 순서)"),
|
|
4951
5217
|
verify: storefrontVerifyReportSchema.nullable().describe("규칙 검증 보고서(위반 상세는 50건까지). 그 단계까지 가지 못했으면 null"),
|
|
5218
|
+
dependencies: storefrontBuildDependenciesSchema.nullable().optional().describe("의존성 검사 결과(거절 목록·보안 권고). 빌드 시작 전에 돈다. 거절이 있으면 `failureStage: DEPENDENCIES`, `errorCode: DEPENDENCY_REJECTED`다. 아직 검사 전이면 null(옛 서버는 싣지 않는다)"),
|
|
4952
5219
|
queuedAt: z.string(),
|
|
4953
5220
|
startedAt: z.string().nullable(),
|
|
4954
5221
|
finishedAt: z.string().nullable(),
|
|
@@ -4959,7 +5226,10 @@ const storefrontBuildListQuerySchema = z.object({ limit: z.coerce.number().int()
|
|
|
4959
5226
|
* `POST /v1/storefront/site/versions` — 지금 작업 트리를 고정해 버전을 만든다(빌드 시작). 사이트당 끝나지 않은 빌드는
|
|
4960
5227
|
* 하나다(409 `STOREFRONT_BUILD_IN_PROGRESS`). 편집 환경이 없어도 된다.
|
|
4961
5228
|
*/
|
|
4962
|
-
const createStorefrontVersionRequestSchema = z.object({
|
|
5229
|
+
const createStorefrontVersionRequestSchema = z.object({
|
|
5230
|
+
message: z.string().max(200).optional().describe("버전 메모 (에이전트는 바꾼 내용 요약)"),
|
|
5231
|
+
expectedSourceRef: z.string().max(200).optional().describe("고정할 작업 트리 (`PUT /v1/storefront/site/source`의 `sourceRef`). 주면 지금 작업 트리가 이 값일 때만 버전을 만든다(다르면 409 `SOURCE_CHANGED`)")
|
|
5232
|
+
});
|
|
4963
5233
|
/** 버전 만들기 응답 (201) — 버전은 `BUILDING`, 빌드는 `QUEUED`로 시작한다. 결과는 `GET builds/{buildId}`로 본다 */
|
|
4964
5234
|
const storefrontVersionCreatedSchema = z.object({
|
|
4965
5235
|
version: storefrontVersionSchema,
|
|
@@ -4971,6 +5241,80 @@ const storefrontVersionCreatedSchema = z.object({
|
|
|
4971
5241
|
* 없으면 409 `EDIT_SESSION_REQUIRED`다(편집 환경이 `STARTING`이면 링크는 주고, 미리보기 화면이 기동 대기를 보여 준다).
|
|
4972
5242
|
*/
|
|
4973
5243
|
const createStorefrontEditPreviewLinkRequestSchema = createStorefrontPreviewLinkRequestSchema;
|
|
5244
|
+
/** 압축 파일 조각 하나의 최대 크기(바이트) */
|
|
5245
|
+
const STOREFRONT_SOURCE_PART_BYTES = 4194304;
|
|
5246
|
+
/** 내용 올리기 한 번의 최대 파일 수 */
|
|
5247
|
+
const STOREFRONT_SOURCE_BLOB_BATCH_MAX = 200;
|
|
5248
|
+
/** 작업 트리 파일 수 상한 */
|
|
5249
|
+
const STOREFRONT_WORKSPACE_MAX_FILES = 2e3;
|
|
5250
|
+
/** 작업 트리 스냅샷 키 — `sources/{siteId}/{sha256}.tgz` */
|
|
5251
|
+
const storefrontSourceRefSchema = z.string().regex(/^sources\/sfs_[a-z0-9]{8,40}\/[0-9a-f]{64}\.tgz$/, "작업 트리 스냅샷 키 형식이 아닙니다").describe("작업 트리 스냅샷 (`sources/{siteId}/{sha256}.tgz`, 내용 주소)");
|
|
5252
|
+
/** `GET /v1/storefront/site/source` — 지금 작업 트리(편집 환경이 떠 있으면 지금 내용을 고정한다) */
|
|
5253
|
+
const storefrontSourceSchema = z.object({
|
|
5254
|
+
siteId: z.string(),
|
|
5255
|
+
storeId: z.string(),
|
|
5256
|
+
storeCode: z.string().describe("스토어 코드 — 로컬 개발 서버의 `SAYREN_STORE_CODE`"),
|
|
5257
|
+
sourceRef: storefrontSourceRefSchema,
|
|
5258
|
+
treeSha256: z.string().describe("트리 지문 (경로 오름차순 `{path}\\t{sha256}\\n`의 SHA-256)"),
|
|
5259
|
+
files: z.number().int().min(0).describe("파일 수"),
|
|
5260
|
+
bytes: z.number().int().min(0).describe("파일 크기 합"),
|
|
5261
|
+
archive: z.object({
|
|
5262
|
+
format: z.literal("tar+gzip"),
|
|
5263
|
+
bytes: z.number().int().min(0).describe("압축 파일 크기"),
|
|
5264
|
+
sha256: z.string().describe("압축 파일의 SHA-256 (`sourceRef`의 해시와 같다)"),
|
|
5265
|
+
parts: z.number().int().min(0).describe("`GET source/archive`로 받을 조각 수"),
|
|
5266
|
+
partBytes: z.number().int().describe("조각 하나의 최대 크기")
|
|
5267
|
+
}),
|
|
5268
|
+
editSessionOpen: z.boolean().describe("편집 환경이 열려 있는가 (올리기 전에 끄거나 `endEditSession`)")
|
|
5269
|
+
});
|
|
5270
|
+
const storefrontSourceArchiveQuerySchema = z.object({
|
|
5271
|
+
sourceRef: storefrontSourceRefSchema,
|
|
5272
|
+
part: z.coerce.number().int().min(0).max(100).optional().describe("조각 번호 (0부터, 기본 0)")
|
|
5273
|
+
});
|
|
5274
|
+
/** `GET /v1/storefront/site/source/archive` — 압축 파일 조각 */
|
|
5275
|
+
const storefrontSourceArchivePartSchema = z.object({
|
|
5276
|
+
sourceRef: storefrontSourceRefSchema,
|
|
5277
|
+
part: z.number().int().min(0),
|
|
5278
|
+
parts: z.number().int().min(0),
|
|
5279
|
+
offset: z.number().int().min(0),
|
|
5280
|
+
bytes: z.number().int().min(0).describe("이 조각의 크기"),
|
|
5281
|
+
totalBytes: z.number().int().min(0),
|
|
5282
|
+
content: z.string().describe("조각 내용 (base64)")
|
|
5283
|
+
});
|
|
5284
|
+
/** `POST /v1/storefront/site/source/blobs` — 파일 내용 올리기(해시 키, 다시 올려도 안전하다). 작업 트리는 바뀌지 않는다 */
|
|
5285
|
+
const uploadStorefrontSourceBlobsRequestSchema = z.object({ blobs: z.array(z.object({
|
|
5286
|
+
hash: storefrontFileHashSchema,
|
|
5287
|
+
content: z.string().describe("파일 내용 (base64, 1MiB까지)")
|
|
5288
|
+
})).min(1).max(200) });
|
|
5289
|
+
const storefrontSourceBlobsResultSchema = z.object({
|
|
5290
|
+
stored: z.number().int().min(0).describe("새로 올린 수"),
|
|
5291
|
+
existing: z.number().int().min(0).describe("이미 있던 수")
|
|
5292
|
+
});
|
|
5293
|
+
/**
|
|
5294
|
+
* `PUT /v1/storefront/site/source` — 작업 트리 전체를 이 목록으로 바꾼다(없는 경로는 지운다). 전부 아니면 전무다.
|
|
5295
|
+
* `package.json`·`pnpm-lock.yaml`도 바꿀 수 있고 의존성은 허용 목록 안이어야 한다. `.env*`·작업 트리 밖 경로는 받지 않는다.
|
|
5296
|
+
*/
|
|
5297
|
+
const replaceStorefrontSourceRequestSchema = z.object({
|
|
5298
|
+
expectedBaseRef: storefrontSourceRefSchema.optional().describe("내려받은 작업 트리. 지금 작업 트리가 이 값일 때만 바꾼다. 생략하면 조건 없이 덮어쓴다"),
|
|
5299
|
+
files: z.array(z.object({
|
|
5300
|
+
path: storefrontFilePathSchema,
|
|
5301
|
+
hash: storefrontFileHashSchema,
|
|
5302
|
+
size: z.number().int().min(0).max(STOREFRONT_FILE_MAX_BYTES)
|
|
5303
|
+
})).min(1).max(STOREFRONT_WORKSPACE_MAX_FILES).refine((files) => new Set(files.map((file) => file.path)).size === files.length, { message: "같은 경로를 두 번 실을 수 없습니다" }),
|
|
5304
|
+
endEditSession: z.boolean().optional().describe("열린 편집 환경을 끄고 진행한다 (기본 false — 열려 있으면 409 `EDIT_SESSION_OPEN`)"),
|
|
5305
|
+
packageJson: z.string().max(STOREFRONT_FILE_MAX_BYTES).optional().describe("`files`에 `package.json`이 있으면 그 내용(utf8). 서버가 의존성을 판정한다. 해시가 목록과 다르면 400 `DEPENDENCY_FILES_MISMATCH`"),
|
|
5306
|
+
lockfile: z.string().max(STOREFRONT_FILE_MAX_BYTES).optional().describe("`files`에 `pnpm-lock.yaml`이 있으면 그 내용(utf8)")
|
|
5307
|
+
});
|
|
5308
|
+
const storefrontSourceReplacedSchema = z.object({
|
|
5309
|
+
sourceRef: storefrontSourceRefSchema.describe("새 작업 트리 — 다음 올리기의 `expectedBaseRef`"),
|
|
5310
|
+
previousRef: z.string().describe("바꾸기 전 작업 트리"),
|
|
5311
|
+
treeSha256: z.string(),
|
|
5312
|
+
files: z.number().int().min(0),
|
|
5313
|
+
bytes: z.number().int().min(0),
|
|
5314
|
+
changed: z.boolean().describe("내용이 바뀌었는가 (같은 트리를 다시 올리면 false)"),
|
|
5315
|
+
endedEditSession: z.boolean().describe("열린 편집 환경을 끄고 진행했는가"),
|
|
5316
|
+
dependencyWarnings: z.array(storefrontDependencyFindingSchema).describe("배포를 막지 않는 의존성 경고 (보안 권고 등)")
|
|
5317
|
+
});
|
|
4974
5318
|
//#endregion
|
|
4975
5319
|
//#region src/client.ts
|
|
4976
5320
|
function formBody(fields) {
|
|
@@ -5564,9 +5908,20 @@ list: (params) => storeHttp.request("GET", "/audit-logs", auditLogPageSchema, {
|
|
|
5564
5908
|
get: () => storeHttp.request("GET", "/storefront/site", storefrontHostingSchema),
|
|
5565
5909
|
/** `GET /v1/storefront/slug-availability?slug=` — 슬러그를 쓸 수 있는가 */
|
|
5566
5910
|
checkSlug: (slug) => storeHttp.request("GET", "/storefront/slug-availability", storefrontSlugAvailabilitySchema, { query: { slug } }),
|
|
5567
|
-
/**
|
|
5911
|
+
/**
|
|
5912
|
+
* `POST /v1/storefront/site` (201) — 템플릿으로 사이트를 만들고 v1을 발행한다. 공개 상태는 오픈 준비 중이다.
|
|
5913
|
+
* 사이트를 만드는 유일한 경로다(스토어를 만들어도 사이트는 생기지 않는다). 템플릿은 여기서만 고른다
|
|
5914
|
+
*/
|
|
5568
5915
|
create: (body) => storeHttp.request("POST", "/storefront/site", storefrontSiteSchema, { body: createStorefrontSiteRequestSchema.parse(body) }),
|
|
5569
|
-
/** `
|
|
5916
|
+
/** `GET /v1/storefront/site/deployment` — 배포 진행(단계·기록). 만든 뒤 반영이 끝날 때까지 폴링한다 */
|
|
5917
|
+
getDeployment: () => storeHttp.request("GET", "/storefront/site/deployment", storefrontDeploymentSchema),
|
|
5918
|
+
/** `POST /v1/storefront/site/deployment/retry` (202) — 밀린 반영을 곧바로 다시 시도한다. 이미 반영됐으면 그대로다 */
|
|
5919
|
+
retryDeployment: () => storeHttp.request("POST", "/storefront/site/deployment/retry", storefrontDeploymentSchema, { body: {} }),
|
|
5920
|
+
/**
|
|
5921
|
+
* `POST /v1/storefront/site/template`
|
|
5922
|
+
* @deprecated 템플릿 변경은 지원하지 않는다. 서버가 항상 409 `TEMPLATE_CHANGE_NOT_SUPPORTED`로 답한다 — 템플릿은
|
|
5923
|
+
* 사이트를 만들 때(`create`)만 고른다. 호환을 위해 메서드만 남겼다
|
|
5924
|
+
*/
|
|
5570
5925
|
changeTemplate: (body) => storeHttp.request("POST", "/storefront/site/template", storefrontSiteSchema, { body: changeStorefrontTemplateRequestSchema.parse(body) }),
|
|
5571
5926
|
/** `GET /v1/storefront/site/versions` — 버전 목록(최신 먼저) */
|
|
5572
5927
|
listVersions: () => storeHttp.request("GET", "/storefront/site/versions", z.array(storefrontVersionSchema)),
|
|
@@ -5583,6 +5938,19 @@ list: (params) => storeHttp.request("GET", "/audit-logs", auditLogPageSchema, {
|
|
|
5583
5938
|
* 콘솔에서 로그인한 OWNER·ADMIN만 받는다
|
|
5584
5939
|
*/
|
|
5585
5940
|
createPreviewLink: (body = {}) => storeHttp.request("POST", "/storefront/site/preview-link", storefrontPreviewLinkSchema, { body: createStorefrontPreviewLinkRequestSchema.parse(body) }),
|
|
5941
|
+
/** `GET /v1/storefront/site/domains` — 주소 목록(기본 주소 + 내 도메인)과 DNS 안내 */
|
|
5942
|
+
listDomains: () => storeHttp.request("GET", "/storefront/site/domains", storefrontSiteDomainsSchema),
|
|
5943
|
+
/**
|
|
5944
|
+
* `POST /v1/storefront/site/domains` (201) — 내 도메인을 추가한다. 응답의 `dnsRecords`를 DNS에 넣으면 서버가 소유를 확인하고
|
|
5945
|
+
* 인증서를 발급한다
|
|
5946
|
+
*/
|
|
5947
|
+
addDomain: (body) => storeHttp.request("POST", "/storefront/site/domains", storefrontSiteDomainSchema, { body: addStorefrontDomainRequestSchema.parse(body) }),
|
|
5948
|
+
/** `POST /v1/storefront/site/domains/{domainId}/verify` — DNS를 곧바로 다시 확인한다(실패한 도메인은 처음부터 다시) */
|
|
5949
|
+
verifyDomain: (domainId) => storeHttp.request("POST", path`/storefront/site/domains/${domainId}/verify`, storefrontSiteDomainSchema),
|
|
5950
|
+
/** `POST /v1/storefront/site/domains/{domainId}/primary` — 대표 주소로 지정한다. 다른 주소는 대표 주소로 301한다 */
|
|
5951
|
+
setPrimaryDomain: (domainId) => storeHttp.request("POST", path`/storefront/site/domains/${domainId}/primary`, storefrontSiteDomainsSchema),
|
|
5952
|
+
/** `DELETE /v1/storefront/site/domains/{domainId}` — 내 도메인 연결을 해제한다(곧바로 끊긴다) */
|
|
5953
|
+
removeDomain: (domainId) => storeHttp.requestVoid("DELETE", path`/storefront/site/domains/${domainId}`),
|
|
5586
5954
|
/** `POST /v1/storefront/site/disable` — 호스팅을 끈다(사이트 `CLOSED`, 슬러그 90일 보류). 다시 만들 수 있다 */
|
|
5587
5955
|
disable: (body) => storeHttp.request("POST", "/storefront/site/disable", storefrontSiteSchema, { body: disableStorefrontHostingRequestSchema.parse(body) }),
|
|
5588
5956
|
/** `GET /v1/storefront/site/editing` — 편집 환경 상태(열린 환경·동시 상한·미리보기 인증서) */
|
|
@@ -5631,7 +5999,18 @@ list: (params) => storeHttp.request("GET", "/audit-logs", auditLogPageSchema, {
|
|
|
5631
5999
|
/** `GET /v1/storefront/site/builds?limit=` — 빌드 목록(최신 먼저) */
|
|
5632
6000
|
listBuilds: (params = {}) => storeHttp.request("GET", "/storefront/site/builds", z.array(storefrontBuildSchema), { query: params }),
|
|
5633
6001
|
/** `GET /v1/storefront/site/builds/{buildId}` — 빌드 상태·실패 단계·로그 꼬리·규칙 결과 */
|
|
5634
|
-
getBuild: (buildId) => storeHttp.request("GET", path`/storefront/site/builds/${buildId}`, storefrontBuildSchema)
|
|
6002
|
+
getBuild: (buildId) => storeHttp.request("GET", path`/storefront/site/builds/${buildId}`, storefrontBuildSchema),
|
|
6003
|
+
/** `GET /v1/storefront/site/source` — 지금 작업 트리를 고정하고 압축 파일(tar.gz) 크기·조각 수를 알린다 */
|
|
6004
|
+
getSource: () => storeHttp.request("GET", "/storefront/site/source", storefrontSourceSchema),
|
|
6005
|
+
/** `GET /v1/storefront/site/source/archive?sourceRef=&part=` — 압축 파일 조각(base64, 4MiB까지) */
|
|
6006
|
+
getSourceArchive: (params) => storeHttp.request("GET", "/storefront/site/source/archive", storefrontSourceArchivePartSchema, { query: storefrontSourceArchiveQuerySchema.parse(params) }),
|
|
6007
|
+
/** `POST /v1/storefront/site/source/blobs` — 파일 내용 올리기(해시 키). 작업 트리는 바뀌지 않는다 */
|
|
6008
|
+
uploadSourceBlobs: (body) => storeHttp.request("POST", "/storefront/site/source/blobs", storefrontSourceBlobsResultSchema, { body: uploadStorefrontSourceBlobsRequestSchema.parse(body) }),
|
|
6009
|
+
/**
|
|
6010
|
+
* `PUT /v1/storefront/site/source` — 작업 트리 전체를 바꾼다. 409 `SOURCE_CHANGED`(내려받은 뒤 바뀜)·`EDIT_SESSION_OPEN`·
|
|
6011
|
+
* `SOURCE_BLOBS_MISSING`(`details.hashes`를 올리고 다시)
|
|
6012
|
+
*/
|
|
6013
|
+
replaceSource: (body) => storeHttp.request("PUT", "/storefront/site/source", storefrontSourceReplacedSchema, { body: replaceStorefrontSourceRequestSchema.parse(body) })
|
|
5635
6014
|
},
|
|
5636
6015
|
store: {
|
|
5637
6016
|
get: () => storeHttp.request("GET", "/store", storeSchema),
|
|
@@ -6010,6 +6389,8 @@ const STORE_SESSION_KEYS = {
|
|
|
6010
6389
|
/** authorize() → handleCallback() 간 1회용 PKCE 블롭({ verifier, state, redirectUri }) 저장 키 */
|
|
6011
6390
|
pkce: "sayren.store.pkce"
|
|
6012
6391
|
};
|
|
6392
|
+
/** 로그아웃 폐기 요청 제한 시간 */
|
|
6393
|
+
const REVOKE_TIMEOUT_MS = 5e3;
|
|
6013
6394
|
/** Web Locks 이름 — 탭 간 refresh 회전 직렬화용 */
|
|
6014
6395
|
const REFRESH_LOCK = STORE_SESSION_KEYS.refresh;
|
|
6015
6396
|
function createStoreSession(options) {
|
|
@@ -6032,6 +6413,30 @@ function createStoreSession(options) {
|
|
|
6032
6413
|
storage.remove(STORE_SESSION_KEYS.refresh);
|
|
6033
6414
|
notify();
|
|
6034
6415
|
}
|
|
6416
|
+
/** RFC 7009 — 무효 토큰이어도 200이다. 실패는 호출부가 무시한다. 응답이 늦어도 로그아웃이 멈추지 않게 5초로 끊는다 */
|
|
6417
|
+
async function revokeToken(token) {
|
|
6418
|
+
await fetchFn(`${baseUrl}/oauth2/revoke`, {
|
|
6419
|
+
method: "POST",
|
|
6420
|
+
headers: { "content-type": "application/x-www-form-urlencoded" },
|
|
6421
|
+
body: new URLSearchParams({
|
|
6422
|
+
token,
|
|
6423
|
+
client_id: clientId
|
|
6424
|
+
}).toString(),
|
|
6425
|
+
signal: typeof AbortSignal !== "undefined" && typeof AbortSignal.timeout === "function" ? AbortSignal.timeout(REVOKE_TIMEOUT_MS) : void 0
|
|
6426
|
+
});
|
|
6427
|
+
}
|
|
6428
|
+
async function logout() {
|
|
6429
|
+
if (refreshInFlight) await refreshInFlight.catch(() => false);
|
|
6430
|
+
const refreshToken = storage.get(STORE_SESSION_KEYS.refresh);
|
|
6431
|
+
const accessToken = getToken();
|
|
6432
|
+
for (const token of [refreshToken, accessToken]) {
|
|
6433
|
+
if (!token) continue;
|
|
6434
|
+
try {
|
|
6435
|
+
await revokeToken(token);
|
|
6436
|
+
} catch {}
|
|
6437
|
+
}
|
|
6438
|
+
clear();
|
|
6439
|
+
}
|
|
6035
6440
|
let refreshInFlight = null;
|
|
6036
6441
|
function refresh() {
|
|
6037
6442
|
if (!refreshInFlight) refreshInFlight = doRefresh().finally(() => {
|
|
@@ -6135,6 +6540,7 @@ function createStoreSession(options) {
|
|
|
6135
6540
|
setTokens,
|
|
6136
6541
|
refresh,
|
|
6137
6542
|
clear,
|
|
6543
|
+
logout,
|
|
6138
6544
|
subscribe,
|
|
6139
6545
|
authorize,
|
|
6140
6546
|
handleCallback,
|
|
@@ -6148,4 +6554,4 @@ function createStoreSession(options) {
|
|
|
6148
6554
|
};
|
|
6149
6555
|
}
|
|
6150
6556
|
//#endregion
|
|
6151
|
-
export { APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, ApiError, ApprovalPendingError, CASH_RECEIPT_STATUS_VALUES, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, CUSTOM_INPUT_FORBIDDEN_WORDS, FULFILLMENT_RULES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_CUSTOM_INPUTS, MAX_CUSTOM_INPUT_LENGTH, MAX_OPTION_GROUPS, MAX_PRODUCT_IMAGES, MAX_SAVED_OPTION_SETS, MAX_SAVED_OPTION_SET_NAME, MAX_VALUES_PER_GROUP, MAX_VARIANTS, MCP_TELEMETRY_MAX_RESULTS, MIN_PAYMENT_AMOUNT, NO_COUPON_SETTLEMENT, NO_SHIPPING_BUNDLE_KEY, PAYMENT_ROUTING_EXCLUSION_CODES, PORTONE_CHANNEL_NAME_MAX_LENGTH, PORTONE_MAX_CHANNELS, PORTONE_MIN_CHANNELS, REFUND_POLICY_DEFAULTS, REFUND_POLICY_DELIVERY_FEE_KEYS, REMOTE_AREA_ZIP_RANGES, RESERVED_STOREFRONT_SLUGS, RESERVED_STORE_CODES, SHIPPING_POLICY_DEFAULTS, STOREFRONT_BLOCKED_PATH_SEGMENTS, STOREFRONT_BUILD_STAGES, STOREFRONT_BUILD_TERMINAL_STATUSES, STOREFRONT_CHECK_TERMINAL_STATUSES, STOREFRONT_EDIT_ACTIVITY_TIMEOUT_MINUTES, STOREFRONT_EDIT_CAPACITY, STOREFRONT_EDIT_IDLE_MINUTES, STOREFRONT_EDIT_PREVIEW_SUFFIX, STOREFRONT_EDIT_START_STAGES, STOREFRONT_FILE_BATCH_MAX, STOREFRONT_FILE_MAX_BYTES, STOREFRONT_PATH_SEGMENT_PATTERN, STOREFRONT_SEARCH_REGEX_MAX_LENGTH, STOREFRONT_SITE_CREATE_LIMIT, STOREFRONT_SLUG_CHANGE_LIMIT, STOREFRONT_SLUG_CHANGE_WINDOW_DAYS, STOREFRONT_SLUG_HOLD_DAYS, STOREFRONT_SLUG_PATTERN, STOREFRONT_WORKSPACE_MAX_BYTES, STORE_CODE_PATTERN, STORE_ROLE_SCOPES, STORE_SCOPE_RESOURCES, STORE_SESSION_KEYS, TOSS_WIDGET_CLIENT_KEY_PATTERN, TOSS_WIDGET_KEY_MESSAGE, TOSS_WIDGET_SECRET_KEY_PATTERN, UPLOAD_PURPOSE_LIMITS, VARIANT_COUNT_WARNING, VARIANT_STOCK_EXCLUSIVE_MESSAGE, WEBHOOK_DEFAULT_TOLERANCE_SEC, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_FAILURE_REASONS, WEBHOOK_HEADERS, WEBHOOK_PAYLOAD_EXCERPT_MAX_BYTES, WEBHOOK_RESOURCE_TYPES, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_USER_AGENT, addonGroupRequestSchema, addonGroupSchema, addonValueRequestSchema, addonValueSchema, addressChangeRequestListSchema, addressTypeSchema, agentPolicyDecisionSchema, allocateByWeight, analyticsChannelSchema, analyticsCheckoutOutcomeSchema, analyticsCheckoutSchema, analyticsDeviceRowSchema, analyticsDevicesSchema, analyticsFunnelStepSchema, analyticsOriginSchema, analyticsOverviewSchema, analyticsPagesQuerySchema, analyticsPagesSchema, analyticsProductRowSchema, analyticsProductSortSchema, analyticsProductsQuerySchema, analyticsProductsSchema, analyticsRangeQuerySchema, analyticsRealtimeSchema, analyticsSearchQuerySchema, analyticsSearchSchema, analyticsSourceGroupBySchema, analyticsSourceRowSchema, analyticsSourcesQuerySchema, analyticsSourcesSchema, analyticsTotalsSchema, apiClientListQuerySchema, apiClientSchema, apiClientSecretRotatedSchema, apiClientStatusSchema, apiClientTypeSchema, apiLogErrorSchema, apiLogListQuerySchema, apiLogPageSchema, apiLogPrincipalSchema, apiLogPrincipalTypeSchema, apiLogSchema, apiLogStatusFilterSchema, apiLogSummarySchema, apiTokenCreateRequestSchema, apiTokenCreatedSchema, apiTokenSchema, approvalDecisionRequestSchema, approvalListQuerySchema, approvalPageSchema, approvalRequestSchema, approvalStatusSchema, approveClaimResultSchema, auditActorSchema, auditActorTypeSchema, auditLogListQuerySchema, auditLogOutcomeSchema, auditLogPageSchema, auditLogSchema, auditLogSourceSchema, buildAuthorizeUrl, buildQuery, bulkResultSchema, cancelBySellerRequestSchema, cancelBySellerResultSchema, carrierSchema, cashReceiptSchema, categoryAttributeSchema, categoryCreateRequestSchema, categoryDeleteQuerySchema, categoryDeleteStrategySchema, categoryListQuerySchema, categoryPatchRequestSchema, categoryProductSortSchema, categorySchema, categorySearchResultSchema, categoryTreeNodeSchema, categoryWithPathSchema, changeStorefrontSlugRequestSchema, changeStorefrontTemplateRequestSchema, changeTypeSchema, claimDetailSchema, claimHoldResultSchema, claimListQuerySchema, claimReasonSchema, claimReturnAddressSchema, claimSchema, claimStatusSchema, claimTypeSchema, claimWebhookEventDataSchema, claimWebhookEventSchema, clientCredentialsTokenResponseSchema, consentActionSchema, consentKindSchema, consentSourceSchema, couponBenefitSchema, couponConditionsInputSchema, couponConditionsSchema, couponDiscountOf, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponListQuerySchema, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRuleSchema, couponSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetSchema, createCouponRequestSchema, createPkcePair, createStoreClient, createStoreSession, createStorefrontEditPreviewLinkRequestSchema, createStorefrontPreviewLinkRequestSchema, createStorefrontSiteRequestSchema, createStorefrontVersionRequestSchema, customInputLabelForbiddenWord, customInputRequestSchema, customInputSchema, customInputValueSchema, customerAddressSchema, customerConsentListQuerySchema, customerConsentSchema, customerConsentStateSchema, customerConsentsSchema, customerCouponSchema, customerDetailSchema, customerInquiryCategorySchema, customerInquiryListQuerySchema, customerListQuerySchema, customerOrderSchema, customerSortSchema, customerStatsSchema, customerSummarySchema, customerWithdrawalBlockedDetailsSchema, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, eventTypeSchema, exchangeAuthorizationCode, exchangeStoreTokenViaOAuth, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, invitationDeliveryStatusSchema, invitationListQuerySchema, invitationSchema, inviteMemberRequestSchema, isCouponTargetLine, isEditableStorefrontPath, isReservedStoreCode, isReservedStorefrontSlug, isStoreScope, isWebOrigin, issueCouponRequestSchema, issueCouponResultSchema, liveGateConditionCodeSchema, liveGateConditionSchema, liveGateErrorDetailsSchema, liveGateSchema, loginProviderSchema, loginProviderStatusSchema, loginProviderTestSchema, loginSettingsSchema, maskedSecretSchema, mcpRuleResultSchema, mcpToolEventSchema, moveStorefrontFileRequestSchema, myAccountSchema, myStoreSchema, normalizeCouponCode, normalizeStorefrontPath, oauthClientRegistrationRequestSchema, oauthClientRegistrationResponseSchema, oauthTokenResponseSchema, openFulfillmentUnion, optionGroupKindSchema, optionGroupRequestSchema, optionGroupSchema, optionModelRequestSchema, optionModelSchema, optionSelectionSchema, optionSortSchema, optionValueRequestSchema, optionValueSchema, orderCanceledWebhookEventDataSchema, orderCanceledWebhookEventSchema, orderDiscountSchema, orderFulfilledWebhookEventDataSchema, orderFulfilledWebhookEventSchema, orderItemFulfillmentSchema, orderItemFulfillmentSnapshotResponseSchema, orderItemFulfillmentSnapshotSchema, orderItemListQuerySchema, orderItemMemoResultSchema, orderItemPageSchema, orderItemSchema, orderItemStatusSchema, orderListQuerySchema, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderSchema, pgVerificationResultSchema, policyDocumentUrlSchema, policyVersionSchema, portOneChannelSchema, portOneCredentialsInputSchema, productCreateRequestSchema, productFulfillmentCreateSchema, productFulfillmentResponseSchema, productFulfillmentSchema, productFulfillmentUpdateSchema, productImageRejection, productImageUrlSchema, productListQuerySchema, productOutOfStockWebhookEventDataSchema, productOutOfStockWebhookEventSchema, productPatchRequestSchema, productRefundPolicyOverride, productRefundPolicyPatchSchema, productReplaceRequestSchema, productSchema, productSortSchema, productStatusSchema, productSummarySchema, productVariantRequestSchema, productVariantSchema, proratedPaidRefundBase, proratedRefundBase, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, quoteDelivery, quotePricing, refreshUserToken, refundPolicyPatchSchema, refundPolicySchema, rejectClaimRequestSchema, remoteAreaLabelOf, remoteAreaOf, remoteAreaSchema, remoteSurchargeOf, requiresCollection, requiresShipping, resolveRefundPolicy, resolveShippingPolicy, reviewListQuerySchema, reviewReportResultSchema, reviewSchema, reviewSortSchema, reviewWebhookEventDataSchema, reviewWebhookEventSchema, rollbackStorefrontRequestSchema, runStorefrontCheckRequestSchema, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCustomerInquirySchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingPolicyPatchSchema, shippingPolicySchema, storeCodeSchema, storeMemberRoleUpdatedSchema, storeMemberSchema, storeRoleSchema, storeSchema, storeScopeResourceSchema, storeTokenResponseSchema, storefrontBuildListQuerySchema, storefrontBuildSchema, storefrontBuildStatusSchema, storefrontCheckSchema, storefrontCheckStatusSchema, storefrontDomainSchema, storefrontEditPreviewLabelOf, storefrontEditPreviewSchema, storefrontEditSessionSchema, storefrontEditSessionStatusSchema, storefrontEditingSchema, storefrontFileConflictDetailsSchema, storefrontFileContentQuerySchema, storefrontFileContentSchema, storefrontFileDeleteResultSchema, storefrontFileEncodingSchema, storefrontFileEntrySchema, storefrontFileHashSchema, storefrontFileListQuerySchema, storefrontFileListSchema, storefrontFileMoveResultSchema, storefrontFilePathSchema, storefrontFileSearchResultSchema, storefrontFileWriteResultSchema, storefrontHostingSchema, storefrontPreviewLinkSchema, storefrontProvisioningSchema, storefrontRuleResultSchema, storefrontRuleSeveritySchema, storefrontSiteSchema, storefrontSiteStatusSchema, storefrontSlugAvailabilityQuerySchema, storefrontSlugAvailabilitySchema, storefrontSlugSchema, storefrontSourceModeSchema, storefrontSuspensionSchema, storefrontTemplateSchema, storefrontVerifyReportSchema, storefrontVersionCreatedSchema, storefrontVersionSchema, storefrontVersionStatusSchema, storefrontVisibilitySchema, tossPaymentsCredentialsInputSchema, trackingStageResponseSchema, trackingUpdateResultSchema, updateCouponRequestSchema, updateLoginProviderRequestSchema, updateLoginSettingsRequestSchema, updateMemberRoleRequestSchema, updatePaymentProviderRequestSchema, updatePaymentSettingsRequestSchema, updateStoreRequestSchema, uploadExtensionOf, uploadPurposeSchema, uploadRejection, uploadRequestSchema, uploadTicketSchema, upsertPortOneProviderRequestSchema, upsertTossPaymentsProviderRequestSchema, userTokenResponseSchema, variantStockRequestSchema, variantStockSchema, verifyPaymentProviderRequestSchema, webhookCreatedSchema, webhookDeliveryDetailSchema, webhookDeliveryErrorCodeSchema, webhookDeliveryListQuerySchema, webhookDeliveryResourceSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEventSchema, webhookFailureReasonSchema, webhookRedeliverFailedResultSchema, webhookRequestHeaderSchema, webhookRequestSchema, webhookResourceTypeSchema, webhookSchema, webhookSecretRotatedSchema, webhookStatusSchema, webhookTestRequestSchema, webhookTestResultSchema, withdrawCustomerRequestSchema, writeDryRunResultSchema, writePreviewSchema, writeStorefrontFilesRequestSchema };
|
|
6557
|
+
export { APPROVAL_ALREADY_DECIDED_CODE, APPROVAL_REQUIRED_CODE, ApiError, ApprovalPendingError, CASH_RECEIPT_STATUS_VALUES, COUPON_CODE_PATTERN, COUPON_CONDITIONS_DEFAULTS, COUPON_TARGET_ALL, COUPON_TARGET_LIST_MAX, CUSTOM_INPUT_FORBIDDEN_WORDS, FULFILLMENT_RULES, MAX_ADDON_GROUPS, MAX_ANALYTICS_ALLOWED_ORIGINS, MAX_AUTO_TRANSITION_DAYS, MAX_CUSTOM_INPUTS, MAX_CUSTOM_INPUT_LENGTH, MAX_OPTION_GROUPS, MAX_PRODUCT_IMAGES, MAX_SAVED_OPTION_SETS, MAX_SAVED_OPTION_SET_NAME, MAX_VALUES_PER_GROUP, MAX_VARIANTS, MCP_TELEMETRY_MAX_RESULTS, MIN_PAYMENT_AMOUNT, NO_COUPON_SETTLEMENT, NO_SHIPPING_BUNDLE_KEY, PAYMENT_ROUTING_EXCLUSION_CODES, PORTONE_CHANNEL_NAME_MAX_LENGTH, PORTONE_MAX_CHANNELS, PORTONE_MIN_CHANNELS, REFUND_POLICY_DEFAULTS, REFUND_POLICY_DELIVERY_FEE_KEYS, REMOTE_AREA_ZIP_RANGES, RESERVED_STOREFRONT_SLUGS, RESERVED_STORE_CODES, SHIPPING_POLICY_DEFAULTS, STOREFRONT_BLOCKED_PATH_SEGMENTS, STOREFRONT_BUILD_STAGES, STOREFRONT_BUILD_TERMINAL_STATUSES, STOREFRONT_CHECK_TERMINAL_STATUSES, STOREFRONT_CUSTOM_DOMAIN_LIMIT_DEFAULT, STOREFRONT_DOMAIN_DNS_GRACE_DAYS, STOREFRONT_DOMAIN_DNS_WAIT_DAYS, STOREFRONT_DOMAIN_TXT_LABEL, STOREFRONT_EDIT_ACTIVITY_TIMEOUT_MINUTES, STOREFRONT_EDIT_CAPACITY, STOREFRONT_EDIT_IDLE_MINUTES, STOREFRONT_EDIT_PREVIEW_SUFFIX, STOREFRONT_EDIT_START_STAGES, STOREFRONT_FILE_BATCH_MAX, STOREFRONT_FILE_MAX_BYTES, STOREFRONT_PATH_SEGMENT_PATTERN, STOREFRONT_PLATFORM_DOMAINS, STOREFRONT_PUBLIC_SUFFIXES, STOREFRONT_SEARCH_REGEX_MAX_LENGTH, STOREFRONT_SITE_CREATE_LIMIT, STOREFRONT_SLUG_CHANGE_LIMIT, STOREFRONT_SLUG_CHANGE_WINDOW_DAYS, STOREFRONT_SLUG_HOLD_DAYS, STOREFRONT_SLUG_PATTERN, STOREFRONT_SOURCE_BLOB_BATCH_MAX, STOREFRONT_SOURCE_PART_BYTES, STOREFRONT_WORKSPACE_MAX_BYTES, STOREFRONT_WORKSPACE_MAX_FILES, STORE_CODE_PATTERN, STORE_ROLE_SCOPES, STORE_SCOPE_RESOURCES, STORE_SESSION_KEYS, TOSS_WIDGET_CLIENT_KEY_PATTERN, TOSS_WIDGET_KEY_MESSAGE, TOSS_WIDGET_SECRET_KEY_PATTERN, UPLOAD_PURPOSE_LIMITS, VARIANT_COUNT_WARNING, VARIANT_STOCK_EXCLUSIVE_MESSAGE, WEBHOOK_DEFAULT_TOLERANCE_SEC, WEBHOOK_DELIVERY_ID_HEADER, WEBHOOK_EVENT_ID_HEADER, WEBHOOK_EVENT_TYPE_HEADER, WEBHOOK_FAILURE_REASONS, WEBHOOK_HEADERS, WEBHOOK_PAYLOAD_EXCERPT_MAX_BYTES, WEBHOOK_RESOURCE_TYPES, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_USER_AGENT, addStorefrontDomainRequestSchema, addonGroupRequestSchema, addonGroupSchema, addonValueRequestSchema, addonValueSchema, addressChangeRequestListSchema, addressTypeSchema, agentPolicyDecisionSchema, allocateByWeight, analyticsChannelSchema, analyticsCheckoutOutcomeSchema, analyticsCheckoutSchema, analyticsDeviceRowSchema, analyticsDevicesSchema, analyticsFunnelStepSchema, analyticsOriginSchema, analyticsOverviewSchema, analyticsPagesQuerySchema, analyticsPagesSchema, analyticsProductRowSchema, analyticsProductSortSchema, analyticsProductsQuerySchema, analyticsProductsSchema, analyticsRangeQuerySchema, analyticsRealtimeSchema, analyticsSearchQuerySchema, analyticsSearchSchema, analyticsSourceGroupBySchema, analyticsSourceRowSchema, analyticsSourcesQuerySchema, analyticsSourcesSchema, analyticsTotalsSchema, apiClientListQuerySchema, apiClientSchema, apiClientSecretRotatedSchema, apiClientStatusSchema, apiClientTypeSchema, apiLogErrorSchema, apiLogListQuerySchema, apiLogPageSchema, apiLogPrincipalSchema, apiLogPrincipalTypeSchema, apiLogSchema, apiLogStatusFilterSchema, apiLogSummarySchema, apiTokenCreateRequestSchema, apiTokenCreatedSchema, apiTokenSchema, approvalDecisionRequestSchema, approvalListQuerySchema, approvalPageSchema, approvalRequestSchema, approvalStatusSchema, approveClaimResultSchema, auditActorSchema, auditActorTypeSchema, auditLogListQuerySchema, auditLogOutcomeSchema, auditLogPageSchema, auditLogSchema, auditLogSourceSchema, buildAuthorizeUrl, buildQuery, bulkResultSchema, cancelBySellerRequestSchema, cancelBySellerResultSchema, carrierSchema, cashReceiptSchema, categoryAttributeSchema, categoryCreateRequestSchema, categoryDeleteQuerySchema, categoryDeleteStrategySchema, categoryListQuerySchema, categoryPatchRequestSchema, categoryProductSortSchema, categorySchema, categorySearchResultSchema, categoryTreeNodeSchema, categoryWithPathSchema, changeStorefrontSlugRequestSchema, changeStorefrontTemplateRequestSchema, changeTypeSchema, claimDetailSchema, claimHoldResultSchema, claimListQuerySchema, claimReasonSchema, claimReturnAddressSchema, claimSchema, claimStatusSchema, claimTypeSchema, claimWebhookEventDataSchema, claimWebhookEventSchema, clientCredentialsTokenResponseSchema, consentActionSchema, consentKindSchema, consentSourceSchema, couponBenefitSchema, couponConditionsInputSchema, couponConditionsSchema, couponDiscountOf, couponIssueListQuerySchema, couponIssueMethodSchema, couponIssueSchema, couponIssueStatusSchema, couponKindSchema, couponListQuerySchema, couponRedemptionListQuerySchema, couponRedemptionSchema, couponRejectReasonSchema, couponRuleSchema, couponSchema, couponStatsSchema, couponStatusSchema, couponTargetInputSchema, couponTargetSchema, createCouponRequestSchema, createPkcePair, createStoreClient, createStoreSession, createStorefrontEditPreviewLinkRequestSchema, createStorefrontPreviewLinkRequestSchema, createStorefrontSiteRequestSchema, createStorefrontVersionRequestSchema, customInputLabelForbiddenWord, customInputRequestSchema, customInputSchema, customInputValueSchema, customerAddressSchema, customerConsentListQuerySchema, customerConsentSchema, customerConsentStateSchema, customerConsentsSchema, customerCouponSchema, customerDetailSchema, customerInquiryCategorySchema, customerInquiryListQuerySchema, customerListQuerySchema, customerOrderSchema, customerSortSchema, customerStatsSchema, customerSummarySchema, customerWithdrawalBlockedDetailsSchema, deleteStorefrontFileRequestSchema, deliveryBundleKeyOf, deliveryFeeWaiverSchema, deliveryInfoSchema, deliveryMethodSchema, deliveryStatusSchema, deliveryTypeSchema, disableStorefrontHostingRequestSchema, discountRequestSchema, discountSchema, dispatchRequestSchema, easyPayProviderResponseSchema, easyPayProviderSchema, eventTypeSchema, exchangeAuthorizationCode, exchangeStoreTokenViaOAuth, fulfillBulkRequestSchema, fulfillRequestSchema, fulfillmentRuleOf, fulfillmentTypeOf, fulfillmentTypeResponseSchema, fulfillmentTypeSchema, holdOrderItemRequestSchema, inquiryListQuerySchema, inquirySchema, inquiryWebhookEventDataSchema, inquiryWebhookEventSchema, invitationDeliveryStatusSchema, invitationListQuerySchema, invitationSchema, inviteMemberRequestSchema, isCouponTargetLine, isEditableStorefrontPath, isReservedStoreCode, isReservedStorefrontSlug, isStoreScope, isWebOrigin, issueCouponRequestSchema, issueCouponResultSchema, liveGateConditionCodeSchema, liveGateConditionSchema, liveGateErrorDetailsSchema, liveGateSchema, loginProviderSchema, loginProviderStatusSchema, loginProviderTestSchema, loginSettingsSchema, maskedSecretSchema, mcpRuleResultSchema, mcpToolEventSchema, moveStorefrontFileRequestSchema, myAccountSchema, myStoreSchema, normalizeCouponCode, normalizeStorefrontHostname, normalizeStorefrontPath, oauthClientRegistrationRequestSchema, oauthClientRegistrationResponseSchema, oauthTokenResponseSchema, openFulfillmentUnion, optionGroupKindSchema, optionGroupRequestSchema, optionGroupSchema, optionModelRequestSchema, optionModelSchema, optionSelectionSchema, optionSortSchema, optionValueRequestSchema, optionValueSchema, orderCanceledWebhookEventDataSchema, orderCanceledWebhookEventSchema, orderDiscountSchema, orderFulfilledWebhookEventDataSchema, orderFulfilledWebhookEventSchema, orderItemFulfillmentSchema, orderItemFulfillmentSnapshotResponseSchema, orderItemFulfillmentSnapshotSchema, orderItemListQuerySchema, orderItemMemoResultSchema, orderItemPageSchema, orderItemSchema, orderItemStatusSchema, orderListQuerySchema, orderSchema, orderSummaryPageSchema, orderSummarySchema, orderWebhookEventDataSchema, orderWebhookEventSchema, pageInfoSchema, pageQueryShape, pageSchema, paymentAttemptRecordSchema, paymentAttemptStatusSchema, paymentCredentialSetSchema, paymentListQuerySchema, paymentProviderSchema, paymentProviderVerificationSchema, paymentRecordDetailSchema, paymentRecordPageSchema, paymentRecordSchema, paymentRecordStatusSchema, paymentRefundRecordSchema, paymentSettingsSchema, pgEnvironmentSchema, pgPaymentMethodSchema, pgProviderSchema, pgVerificationResultSchema, policyDocumentUrlSchema, policyVersionSchema, portOneChannelSchema, portOneCredentialsInputSchema, productCreateRequestSchema, productFulfillmentCreateSchema, productFulfillmentResponseSchema, productFulfillmentSchema, productFulfillmentUpdateSchema, productImageRejection, productImageUrlSchema, productListQuerySchema, productOutOfStockWebhookEventDataSchema, productOutOfStockWebhookEventSchema, productPatchRequestSchema, productRefundPolicyOverride, productRefundPolicyPatchSchema, productReplaceRequestSchema, productSchema, productSortSchema, productStatusSchema, productSummarySchema, productVariantRequestSchema, productVariantSchema, proratedPaidRefundBase, proratedRefundBase, publishStorefrontVersionRequestSchema, purchaseDecisionExtendResultSchema, purchaseDecisionRequestResultSchema, quoteDelivery, quotePricing, refreshUserToken, refundPolicyPatchSchema, refundPolicySchema, rejectClaimRequestSchema, remoteAreaLabelOf, remoteAreaOf, remoteAreaSchema, remoteSurchargeOf, replaceStorefrontSourceRequestSchema, requiresCollection, requiresShipping, resolveRefundPolicy, resolveShippingPolicy, reviewListQuerySchema, reviewReportResultSchema, reviewSchema, reviewSortSchema, reviewWebhookEventDataSchema, reviewWebhookEventSchema, rollbackStorefrontRequestSchema, runStorefrontCheckRequestSchema, salesReportGroupBySchema, salesReportQuerySchema, salesReportRowSchema, salesReportSchema, salesTotalsSchema, saveLoginProviderRequestSchema, savedCustomInputRequestSchema, savedCustomInputSchema, savedOptionGroupRequestSchema, savedOptionGroupSchema, savedOptionSetCompositionSchema, savedOptionSetFromProductRequestSchema, savedOptionSetFromProductResultSchema, savedOptionSetListQuerySchema, savedOptionSetRequestSchema, savedOptionSetSchema, savedOptionSetSortSchema, savedOptionValueRequestSchema, savedOptionValueSchema, scopeAccessSchema, searchStorefrontFilesRequestSchema, sellerAddressListQuerySchema, sellerAddressRequestSchema, sellerAddressSchema, sellerCustomerInquirySchema, setStorefrontVisibilityRequestSchema, settleCouponShortfall, settlementDetailQuerySchema, settlementDetailSchema, settlementListQuerySchema, settlementStatusSchema, settlementSummarySchema, settlementWithDetailsSchema, shippingAddressSchema, shippingPolicyPatchSchema, shippingPolicySchema, storeCodeSchema, storeMemberRoleUpdatedSchema, storeMemberSchema, storeRoleSchema, storeSchema, storeScopeResourceSchema, storeTokenResponseSchema, storefrontBuildDependenciesSchema, storefrontBuildListQuerySchema, storefrontBuildSchema, storefrontBuildStatusSchema, storefrontCheckSchema, storefrontCheckStatusSchema, storefrontCustomDomainStatusSchema, storefrontCustomHostnameProblem, storefrontDependencyFindingSchema, storefrontDeploymentLogSchema, storefrontDeploymentSchema, storefrontDeploymentStepSchema, storefrontDnsRecordSchema, storefrontDomainSchema, storefrontDomainTxtNameOf, storefrontEditPreviewLabelOf, storefrontEditPreviewSchema, storefrontEditSessionSchema, storefrontEditSessionStatusSchema, storefrontEditingSchema, storefrontFileConflictDetailsSchema, storefrontFileContentQuerySchema, storefrontFileContentSchema, storefrontFileDeleteResultSchema, storefrontFileEncodingSchema, storefrontFileEntrySchema, storefrontFileHashSchema, storefrontFileListQuerySchema, storefrontFileListSchema, storefrontFileMoveResultSchema, storefrontFilePathSchema, storefrontFileSearchResultSchema, storefrontFileWriteResultSchema, storefrontHostingSchema, storefrontPreviewLinkSchema, storefrontProvisioningSchema, storefrontRuleResultSchema, storefrontRuleSeveritySchema, storefrontSiteDomainSchema, storefrontSiteDomainsSchema, storefrontSiteSchema, storefrontSiteStatusSchema, storefrontSlugAvailabilityQuerySchema, storefrontSlugAvailabilitySchema, storefrontSlugSchema, storefrontSourceArchivePartSchema, storefrontSourceArchiveQuerySchema, storefrontSourceBlobsResultSchema, storefrontSourceModeSchema, storefrontSourceRefSchema, storefrontSourceReplacedSchema, storefrontSourceSchema, storefrontSuspensionSchema, storefrontTemplateSchema, storefrontVerifyReportSchema, storefrontVersionCreatedSchema, storefrontVersionSchema, storefrontVersionStatusSchema, storefrontVisibilitySchema, tossPaymentsCredentialsInputSchema, trackingStageResponseSchema, trackingUpdateResultSchema, updateCouponRequestSchema, updateLoginProviderRequestSchema, updateLoginSettingsRequestSchema, updateMemberRoleRequestSchema, updatePaymentProviderRequestSchema, updatePaymentSettingsRequestSchema, updateStoreRequestSchema, uploadExtensionOf, uploadPurposeSchema, uploadRejection, uploadRequestSchema, uploadStorefrontSourceBlobsRequestSchema, uploadTicketSchema, upsertPortOneProviderRequestSchema, upsertTossPaymentsProviderRequestSchema, userTokenResponseSchema, variantStockRequestSchema, variantStockSchema, verifyPaymentProviderRequestSchema, webhookCreatedSchema, webhookDeliveryDetailSchema, webhookDeliveryErrorCodeSchema, webhookDeliveryListQuerySchema, webhookDeliveryResourceSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEventSchema, webhookFailureReasonSchema, webhookRedeliverFailedResultSchema, webhookRequestHeaderSchema, webhookRequestSchema, webhookResourceTypeSchema, webhookSchema, webhookSecretRotatedSchema, webhookStatusSchema, webhookTestRequestSchema, webhookTestResultSchema, withdrawCustomerRequestSchema, writeDryRunResultSchema, writePreviewSchema, writeStorefrontFilesRequestSchema };
|