UNPKG

@bitzonegaming/roleplay-engine-framework

Version:
28 lines (27 loc) 939 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.METADATA_KEYS = exports.ApiController = exports.EndpointScope = void 0; /** Scope levels for endpoint authorization */ var EndpointScope; (function (EndpointScope) { /** No account/character link required */ EndpointScope["SERVER"] = "SERVER"; /** Session must be linked to an account */ EndpointScope["ACCOUNT"] = "ACCOUNT"; /** Session must be linked to a character */ EndpointScope["CHARACTER"] = "CHARACTER"; })(EndpointScope || (exports.EndpointScope = EndpointScope = {})); /** Base class for API controllers */ class ApiController { constructor(context) { this.context = context; } } exports.ApiController = ApiController; /** Metadata storage keys */ exports.METADATA_KEYS = { CONTROLLER: 'api:controller', ROUTES: 'api:routes', PARAMS: 'api:params', AUTHORIZATION: 'api:authorization', };