@methodus/server
Version:
Server components for @methodus workflow
123 lines • 5.75 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.TestTarget = void 0;
const tslib_1 = require("tslib");
const framework_decorators_1 = tslib_1.__importDefault(require("@methodus/framework-decorators"));
const injection_1 = tslib_1.__importDefault(require("@methodus/framework-decorators/injection"));
const commons_1 = require("@methodus/framework-decorators/commons");
const verbs_1 = require("../models/verbs");
let TestTarget = class TestTarget {
testTypes(date) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return new commons_1.MethodResult({});
});
}
create(files, cookies, name) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return new commons_1.MethodResult({});
});
}
list(auth, orderBy) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return new commons_1.MethodResult({});
});
}
listdefaults(params, body, headers, files, cookies, query, res, req, securityContext) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return new commons_1.MethodResult({});
});
}
read(playerId) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return new commons_1.MethodResult({});
});
}
getByField(field, value) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return new commons_1.MethodResult({});
});
}
update() {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return new commons_1.MethodResult({});
});
}
delete() {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return new commons_1.MethodResult({});
});
}
};
tslib_1.__decorate([
framework_decorators_1.default.Method(verbs_1.Verbs.Get, '/api/testTypes'),
tslib_1.__param(0, commons_1.Mapping.Query('date')),
tslib_1.__metadata("design:type", Function),
tslib_1.__metadata("design:paramtypes", [Date]),
tslib_1.__metadata("design:returntype", Promise)
], TestTarget.prototype, "testTypes", null);
tslib_1.__decorate([
framework_decorators_1.default.MethodPipe(verbs_1.Verbs.Post, '/api/player'),
tslib_1.__param(0, commons_1.Mapping.Files('files')),
tslib_1.__param(1, commons_1.Mapping.Cookies('cookies')), tslib_1.__param(2, commons_1.Mapping.Body('name')),
tslib_1.__metadata("design:type", Function),
tslib_1.__metadata("design:paramtypes", [Object, Object, String]),
tslib_1.__metadata("design:returntype", Promise)
], TestTarget.prototype, "create", null);
tslib_1.__decorate([
framework_decorators_1.default.MethodMock({}),
framework_decorators_1.default.Method(verbs_1.Verbs.Get, '/api/player'),
tslib_1.__param(0, commons_1.Mapping.Headers('auth')),
tslib_1.__param(1, commons_1.Mapping.Query('order_by')),
tslib_1.__metadata("design:type", Function),
tslib_1.__metadata("design:paramtypes", [String, String]),
tslib_1.__metadata("design:returntype", Promise)
], TestTarget.prototype, "list", null);
tslib_1.__decorate([
framework_decorators_1.default.Method(verbs_1.Verbs.Get, '/api/player/desfaults'),
tslib_1.__param(0, commons_1.Mapping.Param()),
tslib_1.__param(1, commons_1.Mapping.Body()),
tslib_1.__param(2, commons_1.Mapping.Headers()),
tslib_1.__param(3, commons_1.Mapping.Files()),
tslib_1.__param(4, commons_1.Mapping.Cookies()),
tslib_1.__param(5, commons_1.Mapping.Query()),
tslib_1.__param(6, commons_1.Mapping.Response()),
tslib_1.__param(7, commons_1.Mapping.Request()),
tslib_1.__param(8, commons_1.Mapping.SecurityContext()),
tslib_1.__metadata("design:type", Function),
tslib_1.__metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object, Object, Object, Object]),
tslib_1.__metadata("design:returntype", Promise)
], TestTarget.prototype, "listdefaults", null);
tslib_1.__decorate([
framework_decorators_1.default.Method(verbs_1.Verbs.Get, '/api/player/:player_id'),
tslib_1.__param(0, commons_1.Mapping.Param('player_id')),
tslib_1.__metadata("design:type", Function),
tslib_1.__metadata("design:paramtypes", [Number]),
tslib_1.__metadata("design:returntype", Promise)
], TestTarget.prototype, "read", null);
tslib_1.__decorate([
framework_decorators_1.default.Method(verbs_1.Verbs.Get, '/api/player/:field/:value'),
tslib_1.__param(0, commons_1.Mapping.Param('field')),
tslib_1.__param(1, commons_1.Mapping.Param('value')),
tslib_1.__metadata("design:type", Function),
tslib_1.__metadata("design:paramtypes", [String, Number]),
tslib_1.__metadata("design:returntype", Promise)
], TestTarget.prototype, "getByField", null);
tslib_1.__decorate([
framework_decorators_1.default.Method(verbs_1.Verbs.Put, '/api/player'),
tslib_1.__metadata("design:type", Function),
tslib_1.__metadata("design:paramtypes", []),
tslib_1.__metadata("design:returntype", Promise)
], TestTarget.prototype, "update", null);
tslib_1.__decorate([
framework_decorators_1.default.Method(verbs_1.Verbs.Delete, '/api/player'),
tslib_1.__metadata("design:type", Function),
tslib_1.__metadata("design:paramtypes", []),
tslib_1.__metadata("design:returntype", Promise)
], TestTarget.prototype, "delete", null);
TestTarget = tslib_1.__decorate([
injection_1.default.Injectable(),
framework_decorators_1.default.Auth(commons_1.AuthType.Basic, { user: 'user', pass: 'pass' }),
framework_decorators_1.default.MethodConfig('TestTarget')
], TestTarget);
exports.TestTarget = TestTarget;
//# sourceMappingURL=target.test.js.map
;