UNPKG

@opra/common

Version:
68 lines (67 loc) 2.61 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OperationResult = void 0; const tslib_1 = require("tslib"); const api_field_js_1 = require("../api-field.js"); const complex_type_js_1 = require("../complex-type.js"); let OperationResult = class OperationResult { constructor(init) { if (init) Object.assign(this, init); } }; exports.OperationResult = OperationResult; tslib_1.__decorate([ (0, api_field_js_1.ApiField)(), tslib_1.__metadata("design:type", Number) ], OperationResult.prototype, "affected", void 0); tslib_1.__decorate([ (0, api_field_js_1.ApiField)(), tslib_1.__metadata("design:type", Number) ], OperationResult.prototype, "totalMatches", void 0); tslib_1.__decorate([ (0, api_field_js_1.ApiField)(), tslib_1.__metadata("design:type", String) ], OperationResult.prototype, "context", void 0); tslib_1.__decorate([ (0, api_field_js_1.ApiField)(), tslib_1.__metadata("design:type", String) ], OperationResult.prototype, "type", void 0); tslib_1.__decorate([ (0, api_field_js_1.ApiField)(), tslib_1.__metadata("design:type", String) ], OperationResult.prototype, "message", void 0); tslib_1.__decorate([ (0, api_field_js_1.ApiField)({ type: 'any' }), tslib_1.__metadata("design:type", Object) ], OperationResult.prototype, "payload", void 0); tslib_1.__decorate([ (0, api_field_js_1.ApiField)({ type: 'object' }), tslib_1.__metadata("design:type", Array) ], OperationResult.prototype, "errors", void 0); exports.OperationResult = OperationResult = tslib_1.__decorate([ (0, complex_type_js_1.ComplexType)({ name: 'OperationResult', description: 'Operation result', }), tslib_1.__metadata("design:paramtypes", [Object]) ], OperationResult); (function (OperationResult) { function forPayload(type) { let OperationResult_ = class OperationResult_ extends OperationResult { constructor(...args) { super(...args); } }; tslib_1.__decorate([ (0, api_field_js_1.ApiField)({ type, required: true }), tslib_1.__metadata("design:type", Object) ], OperationResult_.prototype, "payload", void 0); OperationResult_ = tslib_1.__decorate([ (0, complex_type_js_1.ComplexType)({ embedded: true }), tslib_1.__metadata("design:paramtypes", [Object]) ], OperationResult_); return OperationResult_; } OperationResult.forPayload = forPayload; })(OperationResult || (exports.OperationResult = OperationResult = {}));