UNPKG

next-rest-framework

Version:

Next REST Framework - write type-safe, self-documenting REST APIs in Next.js

29 lines (28 loc) 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VERSION = exports.NEXT_REST_FRAMEWORK_USER_AGENT = exports.ValidMethod = exports.OPEN_API_VERSION = exports.DEFAULT_ERRORS = exports.DEFAULT_MESSAGES = void 0; exports.DEFAULT_MESSAGES = { created: 'Created', noContent: 'No content' }; exports.DEFAULT_ERRORS = { unexpectedError: 'An unknown error occurred, trying again might help.', methodNotAllowed: 'Method not allowed.', notFound: 'Not found.', invalidMediaType: 'Invalid media type.' }; exports.OPEN_API_VERSION = '3.0.1'; var ValidMethod; (function (ValidMethod) { ValidMethod["GET"] = "GET"; ValidMethod["PUT"] = "PUT"; ValidMethod["POST"] = "POST"; ValidMethod["DELETE"] = "DELETE"; ValidMethod["OPTIONS"] = "OPTIONS"; ValidMethod["HEAD"] = "HEAD"; ValidMethod["PATCH"] = "PATCH"; })(ValidMethod || (exports.ValidMethod = ValidMethod = {})); exports.NEXT_REST_FRAMEWORK_USER_AGENT = 'next-rest-framework'; // Ignore: We don't want to use promises here to avoid making this an async function. // eslint-disable-next-line @typescript-eslint/no-var-requires exports.VERSION = require('../package.json').version;