GS2-Dictionary Script Trigger Reference

Reference of event triggers that call extended scripts

Trigger

entry

entry registration

Synchronous Execution Script

The script is executed synchronously before the entry registration process.

Request
TypeDescription
namespaceNamespaceNamespace
entryModelsEntryModel[]List of Entry Models
userIdstringUser ID
Result
TypeRequiredDefaultValue LimitsDescription
permitbool
Whether to allow entry registration
Implementation Example
-- Request
local namespace = args.namespace
local entryModels = args.entryModels
local userId = args.userId

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}

Asynchronous Execution Script

The script is executed asynchronously after the entry registration process.

Request
TypeDescription
namespaceNamespaceNamespace
entryModelsEntryModel[]List of Entry Models
userIdstringUser ID
Implementation Example
-- Request
local namespace = args.namespace
local entryModels = args.entryModels
local userId = args.userId

-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.

result = {
}

duplicateEntry

re-registration for entries already registered

Synchronous Execution Script

The script is executed synchronously before the re-registration for entries already registered process.

Request
TypeDescription
namespaceNamespaceNamespace
entryModelEntryModelEntry Model
userIdstringUser ID
Implementation Example
-- Request
local namespace = args.namespace
local entryModel = args.entryModel
local userId = args.userId

-- Business logic:

-- Result
result = {
}