Trigger Reference of GS2-Version Script

Reference for event triggers that call extended scripts, as defined in GS2-Version

acceptVersion

Event trigger to call GS2-Script before version approval.

Request

TypeDescription
namespaceNamespaceNamespace
versionModelVersionModelVersion Model
acceptVersionAcceptVersionAgreed Version
currentAcceptVersionAcceptVersionCurrent Agreed Version

Result

TypeRequireDefaultLimitationDescription
permitboolAllow version approval

Implementation Example

namespace = args.namespace
versionModel = args.versionModel
acceptVersion = args.acceptVersion
currentAcceptVersion = args.currentAcceptVersion

result = {
  permit=permit
}

acceptVersionDone

GS2-Script called after version approval.

Request

TypeDescription
namespaceNamespaceNamespace
versionModelVersionModelVersion Model
acceptVersionAcceptVersionAgreed Version

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
versionModel = args.versionModel
acceptVersion = args.acceptVersion

result = {
}

checkVersion

Event trigger to call GS2-Script when version check.

Request

TypeDescription
namespaceNamespaceNamespace
versionModelVersionModelVersion Model
currentVersionVersion_Current Version
userIdstringUser Id
warningStatusIf the normal version check results in a warning
errorStatusIf the normal version check results in an error

Result

TypeRequireDefaultLimitationDescription
overrideWarningStatusCheck Result Warning
overrideErrorStatusCheck Result Error

Implementation Example

namespace = args.namespace
versionModel = args.versionModel
currentVersion = args.currentVersion
userId = args.userId
warning = args.warning
error = args.error

result = {
  overrideWarning=overrideWarning,
  overrideError=overrideError
}