스토어프론트 호스팅
스토어프론트 버전 만들기
지금 작업 트리를 고정해 빌드를 시작한다. 버전은 `BUILDING`이고 규칙 검증·타입 검사·빌드를 통과하면 `READY`(발행 가능), 아니면 `FAILED`다. 사이트당 끝나지 않은 빌드는 하나다(409 `STOREFRONT_BUILD_IN_PROGRESS`)
POST
지금 작업 트리를 고정해 빌드를 시작한다. 버전은 BUILDING이고 규칙 검증·타입 검사·빌드를 통과하면 READY(발행 가능), 아니면 FAILED다. 사이트당 끝나지 않은 빌드는 하나다(409 STOREFRONT_BUILD_IN_PROGRESS)
accessTokenheader
AuthorizationBearer <JWT>Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)
X-Store-Id*string대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다
user-agent*stringapplication/json- body
message?string버전 메모 (에이전트는 바꾼 내용 요약)
Length
length <= 200expectedSourceRef?string고정할 작업 트리 (PUT /v1/storefront/site/source의 sourceRef). 주면 지금 작업 트리가 이 값일 때만 버전을 만든다(다르면 409 SOURCE_CHANGED)
Length
length <= 200성공
application/json- response
meta*data*error*|nullcurl -X POST 'https://api.sayren.io/v1/storefront/site/versions' \
-H 'X-Store-Id: string' \
-H 'user-agent: string' \
-H 'Content-Type: application/json' \
-d '{}'Example Response
{
"meta": {
"status": 201,
"code": "OK",
"message": "OK",
"isSuccess": true
},
"data": {
"version": {
"versionId": "string",
"number": 1,
"status": "BUILDING",
"published": true,
"publishedAt": "string",
"message": "string",
"source": "TEMPLATE",
"buildId": "string",
"createdByType": "string",
"createdVia": "string",
"gitRef": "string",
"commitSha": "string",
"excludedPaths": [
"string"
],
"mainChanged": true,
"buildCanceled": true,
"createdAt": "string",
"previewable": true
},
"build": {
"buildId": "string",
"versionId": "string",
"versionNumber": 1,
"status": "QUEUED",
"failureStage": "string",
"errorCode": "string",
"logTail": "string",
"stages": [
{
"stage": "string",
"ok": true,
"durationMs": 0
}
],
"verify": {
"ok": true,
"checkedFiles": 0,
"summary": {
"rules": 0,
"passed": 0,
"violated": 0,
"findings": 0
},
"results": [
{
"ruleId": "string",
"status": "pass",
"count": 0,
"severity": "error"
}
],
"findings": [
{
"ruleId": "string",
"rule": "string",
"file": "string",
"line": 0,
"detail": "string",
"cause": "string",
"fix": "string",
"example": "string",
"doc": "string",
"docUrl": "string",
"templateFile": "string",
"severity": "error"
}
],
"message": "string",
"nextSteps": [
"string"
]
},
"dependencies": {
"checkedPackages": 0,
"rejected": [
{
"name": "string",
"version": "string",
"reason": "string",
"detail": "string",
"advisory": {
"id": "string",
"url": "string",
"severity": "string",
"title": "string"
}
}
],
"warnings": [
{
"name": "string",
"version": "string",
"reason": "string",
"detail": "string",
"advisory": {
"id": "string",
"url": "string",
"severity": "string",
"title": "string"
}
}
]
},
"queuedAt": "string",
"startedAt": "string",
"finishedAt": "string",
"durationMs": 0
}
},
"error": null
}