> For the complete documentation index, see [llms.txt](/llms.txt)

# GS2-Version 스크립트 트리거 레퍼런스

확장 스크립트를 호출하는 이벤트 트리거의 레퍼런스



## 트리거

### acceptVersion



**관련 메서드:**
accept - 현재 버전을 승인
acceptByUserId - 사용자 ID를 지정하여 현재 버전을 승인
reject - 현재 버전을 거부
rejectByUserId - 사용자 ID를 지정하여 현재 버전을 거부


#### 동기 실행 스크립트

 처리 전에, 스크립트가 동기 실행됩니다.

##### Request

| | 타입 | 설명 |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | 네임스페이스 |
| versionModel | [VersionModel](../sdk/#versionmodel) | 버전 모델 |
| acceptVersion | [AcceptVersion](../sdk/#acceptversion) | 승인한 버전 |
| currentAcceptVersion | [AcceptVersion](../sdk/#acceptversion) | 현재 승인한 버전 |

##### Result

|  | 타입 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- |
| permit | bool | ✓ |  |  | 버전 승인을 허용할지 여부 |

##### 구현 예제


**Lua**
```lua

-- Request
local namespace = args.namespace
local versionModel = args.versionModel
local acceptVersion = args.acceptVersion
local currentAcceptVersion = args.currentAcceptVersion

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}
```


#### 비동기 실행 스크립트

 처리 후에, 스크립트가 비동기 실행됩니다.

##### Request

| | 타입 | 설명 |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | 네임스페이스 |
| versionModel | [VersionModel](../sdk/#versionmodel) | 버전 모델 |
| acceptVersion | [AcceptVersion](../sdk/#acceptversion) | 승인한 버전 |


##### 구현 예제


**Lua**
```lua

-- Request
local namespace = args.namespace
local versionModel = args.versionModel
local acceptVersion = args.acceptVersion

-- 비동기 스크립트는 일반적으로 API 응답에 영향을 주지 않습니다.
-- 로그 출력이나 분석, 외부 알림 등에 사용됩니다.

result = {
}
```


---
  
### checkVersion



**관련 메서드:**
checkVersion - 버전 체크


#### 동기 실행 스크립트

 처리 전에, 스크립트가 동기 실행됩니다.

##### Request

| | 타입 | 설명 |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | 네임스페이스 |
| versionModel | [VersionModel](../sdk/#versionmodel) | 버전 모델 |
| currentVersion | [Version](../sdk/#version) | 현재 버전 |
| userId | string | 사용자ID |
| warning | [Status](../sdk/#status) | 일반 버전 체크 결과가 경고인 경우 |
| error | [Status](../sdk/#status) | 일반 버전 체크 결과가 오류인 경우 |

##### Result

|  | 타입 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- |
| overrideWarning | [Status](../sdk/#status) |  |  |  | 덮어쓸 버전 체크 결과 - 경고 |
| overrideError | [Status](../sdk/#status) |  |  |  | 덮어쓸 버전 체크 결과 - 오류 |

##### 구현 예제


**Lua**
```lua

-- Request
local namespace = args.namespace
local versionModel = args.versionModel
local currentVersion = args.currentVersion
local userId = args.userId
local warning = args.warning
local error = args.error

-- Business logic:
local overrideWarning = nil
local overrideError = nil

-- Result
result = {
  overrideWarning=overrideWarning,
  overrideError=overrideError
}
```


---
  



