UNPKG

@opra/common

Version:
65 lines (64 loc) 2.06 kB
import { __decorate, __metadata } from "tslib"; import { ApiField } from '../api-field.js'; import { ComplexType } from '../complex-type.js'; let OperationResult = class OperationResult { constructor(init) { if (init) Object.assign(this, init); } }; __decorate([ ApiField(), __metadata("design:type", Number) ], OperationResult.prototype, "affected", void 0); __decorate([ ApiField(), __metadata("design:type", Number) ], OperationResult.prototype, "totalMatches", void 0); __decorate([ ApiField(), __metadata("design:type", String) ], OperationResult.prototype, "context", void 0); __decorate([ ApiField(), __metadata("design:type", String) ], OperationResult.prototype, "type", void 0); __decorate([ ApiField(), __metadata("design:type", String) ], OperationResult.prototype, "message", void 0); __decorate([ ApiField({ type: 'any' }), __metadata("design:type", Object) ], OperationResult.prototype, "payload", void 0); __decorate([ ApiField({ type: 'object' }), __metadata("design:type", Array) ], OperationResult.prototype, "errors", void 0); OperationResult = __decorate([ ComplexType({ name: 'OperationResult', description: 'Operation result', }), __metadata("design:paramtypes", [Object]) ], OperationResult); export { OperationResult }; (function (OperationResult) { function forPayload(type) { let OperationResult_ = class OperationResult_ extends OperationResult { constructor(...args) { super(...args); } }; __decorate([ ApiField({ type, required: true }), __metadata("design:type", Object) ], OperationResult_.prototype, "payload", void 0); OperationResult_ = __decorate([ ComplexType({ embedded: true }), __metadata("design:paramtypes", [Object]) ], OperationResult_); return OperationResult_; } OperationResult.forPayload = forPayload; })(OperationResult || (OperationResult = {}));