@opra/common 1.0.0-alpha.29 → 1.0.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser.js +170 -161
- package/cjs/document/api-document.js +2 -0
- package/cjs/document/common/api-base.js +1 -0
- package/cjs/document/data-type/api-field.js +8 -7
- package/cjs/document/data-type/complex-type-base.js +3 -1
- package/cjs/document/data-type/simple-type.js +1 -6
- package/cjs/document/decorators/api-field-decorator.js +3 -4
- package/cjs/document/decorators/http-operation-entity.decorator.js +58 -59
- package/cjs/exception/opra-exception.js +1 -0
- package/cjs/helpers/object-utils.js +2 -2
- package/esm/document/api-document.js +2 -0
- package/esm/document/common/api-base.js +1 -0
- package/esm/document/data-type/api-field.js +8 -7
- package/esm/document/data-type/complex-type-base.js +3 -1
- package/esm/document/data-type/simple-type.js +1 -6
- package/esm/document/decorators/api-field-decorator.js +1 -2
- package/esm/document/decorators/http-operation-entity.decorator.js +14 -15
- package/esm/exception/opra-exception.js +1 -0
- package/esm/helpers/object-utils.js +2 -2
- package/package.json +3 -2
- package/types/document/data-type/api-field.d.ts +10 -0
- package/types/document/data-type/data-type.d.ts +1 -0
- package/types/document/http/http-parameter.d.ts +1 -1
package/browser.js
CHANGED
|
@@ -161,9 +161,10 @@ var kTypeNSMap = Symbol.for("kTypeNSMap");
|
|
|
161
161
|
function cloneObject(obj, jsonOnly) {
|
|
162
162
|
return merge({}, obj, {
|
|
163
163
|
deep: /* @__PURE__ */ __name((v) => isPlainObject(v) && !v[DATATYPE_METADATA], "deep"),
|
|
164
|
+
descriptor: true,
|
|
164
165
|
filter: /* @__PURE__ */ __name((source, key) => {
|
|
165
166
|
const v = source[key];
|
|
166
|
-
return
|
|
167
|
+
return !jsonOnly || typeof v !== "function" && (typeof v !== "object" || isPlainObject(v) || Array.isArray(v));
|
|
167
168
|
}, "filter")
|
|
168
169
|
});
|
|
169
170
|
}
|
|
@@ -659,6 +660,7 @@ var OpraException = class extends Error {
|
|
|
659
660
|
}
|
|
660
661
|
constructor(issue, cause) {
|
|
661
662
|
super("Unknown error");
|
|
663
|
+
this.severity = "error";
|
|
662
664
|
cause = cause || (issue instanceof Error ? issue : void 0);
|
|
663
665
|
if (issue instanceof Error)
|
|
664
666
|
cause = issue;
|
|
@@ -991,7 +993,7 @@ function ApiFieldDecorator(options) {
|
|
|
991
993
|
elemMeta.isArray = true;
|
|
992
994
|
} else
|
|
993
995
|
elemMeta.type = elemMeta.type || designType;
|
|
994
|
-
Reflect.defineMetadata(DATATYPE_METADATA,
|
|
996
|
+
Reflect.defineMetadata(DATATYPE_METADATA, metadata, target.constructor);
|
|
995
997
|
};
|
|
996
998
|
}
|
|
997
999
|
__name(ApiFieldDecorator, "ApiFieldDecorator");
|
|
@@ -1179,7 +1181,7 @@ var ComplexTypeBaseClass = class extends DataType {
|
|
|
1179
1181
|
const pickList = !!(projection && Object.values(projection).find((p) => !p.sign));
|
|
1180
1182
|
let fieldName;
|
|
1181
1183
|
for (const field of this.fields.values()) {
|
|
1182
|
-
if (context.ignoreReadonlyFields && field.readonly || context.ignoreWriteonlyFields && field.writeonly) {
|
|
1184
|
+
if (context.ignoreReadonlyFields && field.readonly || context.ignoreWriteonlyFields && field.writeonly || context.ignoreHiddenFields && field.hidden) {
|
|
1183
1185
|
schema[field.name] = vg.isUndefined({ coerce: true });
|
|
1184
1186
|
continue;
|
|
1185
1187
|
}
|
|
@@ -1245,6 +1247,7 @@ var ApiField = /* @__PURE__ */ __name(function(...args) {
|
|
|
1245
1247
|
_this.readonly = initArgs.readonly;
|
|
1246
1248
|
_this.writeonly = initArgs.writeonly;
|
|
1247
1249
|
_this.examples = initArgs.examples;
|
|
1250
|
+
_this.hidden = initArgs.hidden;
|
|
1248
1251
|
}, "ApiField");
|
|
1249
1252
|
var ApiFieldClass = class extends DocumentElement {
|
|
1250
1253
|
static {
|
|
@@ -1255,15 +1258,15 @@ var ApiFieldClass = class extends DocumentElement {
|
|
|
1255
1258
|
return omitUndefined({
|
|
1256
1259
|
type: typeName ? typeName : this.type?.toJSON(),
|
|
1257
1260
|
description: this.description,
|
|
1258
|
-
isArray: this.isArray,
|
|
1261
|
+
isArray: this.isArray || void 0,
|
|
1259
1262
|
default: this.default,
|
|
1260
1263
|
fixed: this.fixed,
|
|
1261
|
-
required: this.required,
|
|
1262
|
-
exclusive: this.exclusive,
|
|
1263
|
-
translatable: this.translatable,
|
|
1264
|
-
deprecated: this.deprecated,
|
|
1265
|
-
readonly: this.readonly,
|
|
1266
|
-
writeonly: this.writeonly,
|
|
1264
|
+
required: this.required || void 0,
|
|
1265
|
+
exclusive: this.exclusive || void 0,
|
|
1266
|
+
translatable: this.translatable || void 0,
|
|
1267
|
+
deprecated: this.deprecated || void 0,
|
|
1268
|
+
readonly: this.readonly || void 0,
|
|
1269
|
+
writeonly: this.writeonly || void 0,
|
|
1267
1270
|
examples: this.examples
|
|
1268
1271
|
});
|
|
1269
1272
|
}
|
|
@@ -1770,12 +1773,7 @@ var SimpleTypeClass = class extends DataType {
|
|
|
1770
1773
|
if (this.properties && typeof this.properties.toJSON === "function") {
|
|
1771
1774
|
properties = this.properties.toJSON(this.properties, this.owner);
|
|
1772
1775
|
} else
|
|
1773
|
-
properties = this.properties
|
|
1774
|
-
properties = Object.keys(this.attributes).reduce((o, k) => {
|
|
1775
|
-
if (properties[k] !== void 0)
|
|
1776
|
-
o[k] = properties[k];
|
|
1777
|
-
return o;
|
|
1778
|
-
}, {});
|
|
1776
|
+
properties = this.properties ? cloneObject(this.properties) : {};
|
|
1779
1777
|
const baseName = this.base ? this.node.getDataTypeNameWithNs(this.base) : void 0;
|
|
1780
1778
|
const out = omitUndefined({
|
|
1781
1779
|
...DataType.prototype.toJSON.apply(this),
|
|
@@ -2300,6 +2298,7 @@ var ApiBase = class extends DocumentElement {
|
|
|
2300
2298
|
constructor(owner) {
|
|
2301
2299
|
super(owner);
|
|
2302
2300
|
this.owner = owner;
|
|
2301
|
+
this.name = "OpraApi";
|
|
2303
2302
|
}
|
|
2304
2303
|
toJSON() {
|
|
2305
2304
|
return omitUndefined({
|
|
@@ -3753,6 +3752,8 @@ var ApiDocument = class extends DocumentElement {
|
|
|
3753
3752
|
constructor() {
|
|
3754
3753
|
super(null);
|
|
3755
3754
|
this[_a2] = /* @__PURE__ */ new WeakMap();
|
|
3755
|
+
this.id = "";
|
|
3756
|
+
this.info = {};
|
|
3756
3757
|
this.references = new ResponsiveMap();
|
|
3757
3758
|
this.types = new DataTypeMap();
|
|
3758
3759
|
this.node[kDataTypeMap] = this.types;
|
|
@@ -3867,20 +3868,8 @@ var ApiDocument = class extends DocumentElement {
|
|
|
3867
3868
|
};
|
|
3868
3869
|
_a2 = kTypeNSMap;
|
|
3869
3870
|
|
|
3870
|
-
// ../../node_modules/tslib/tslib.es6.mjs
|
|
3871
|
-
function __decorate(decorators, target, key, desc) {
|
|
3872
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3873
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3874
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3875
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3876
|
-
}
|
|
3877
|
-
__name(__decorate, "__decorate");
|
|
3878
|
-
function __metadata(metadataKey, metadataValue) {
|
|
3879
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
3880
|
-
}
|
|
3881
|
-
__name(__metadata, "__metadata");
|
|
3882
|
-
|
|
3883
3871
|
// ../../build/common/esm/document/data-type/extended-types/base64.type.js
|
|
3872
|
+
import { __decorate, __metadata } from "tslib";
|
|
3884
3873
|
import { vg as vg4 } from "valgen";
|
|
3885
3874
|
var Base64Type = class Base64Type2 {
|
|
3886
3875
|
static {
|
|
@@ -3909,6 +3898,7 @@ Base64Type = __decorate([
|
|
|
3909
3898
|
], Base64Type);
|
|
3910
3899
|
|
|
3911
3900
|
// ../../build/common/esm/document/data-type/extended-types/date.type.js
|
|
3901
|
+
import { __decorate as __decorate2, __metadata as __metadata2 } from "tslib";
|
|
3912
3902
|
import { isDateString, toString, vg as vg5 } from "valgen";
|
|
3913
3903
|
var DateType = class DateType2 {
|
|
3914
3904
|
static {
|
|
@@ -3945,19 +3935,19 @@ var DateType = class DateType2 {
|
|
|
3945
3935
|
return x.length > 0 ? vg5.pipe([fn, ...x], { returnIndex: 0 }) : fn;
|
|
3946
3936
|
}
|
|
3947
3937
|
};
|
|
3948
|
-
|
|
3938
|
+
__decorate2([
|
|
3949
3939
|
SimpleType2.Attribute({
|
|
3950
3940
|
description: "Minimum value"
|
|
3951
3941
|
}),
|
|
3952
|
-
|
|
3942
|
+
__metadata2("design:type", String)
|
|
3953
3943
|
], DateType.prototype, "minValue", void 0);
|
|
3954
|
-
|
|
3944
|
+
__decorate2([
|
|
3955
3945
|
SimpleType2.Attribute({
|
|
3956
3946
|
description: "Maximum value"
|
|
3957
3947
|
}),
|
|
3958
|
-
|
|
3948
|
+
__metadata2("design:type", String)
|
|
3959
3949
|
], DateType.prototype, "maxValue", void 0);
|
|
3960
|
-
DateType =
|
|
3950
|
+
DateType = __decorate2([
|
|
3961
3951
|
SimpleType2({
|
|
3962
3952
|
description: "A date without time",
|
|
3963
3953
|
nameMappings: {
|
|
@@ -3965,10 +3955,11 @@ DateType = __decorate([
|
|
|
3965
3955
|
json: "string"
|
|
3966
3956
|
}
|
|
3967
3957
|
}).Example("2021-04-18", "Full date value"),
|
|
3968
|
-
|
|
3958
|
+
__metadata2("design:paramtypes", [Object])
|
|
3969
3959
|
], DateType);
|
|
3970
3960
|
|
|
3971
3961
|
// ../../build/common/esm/document/data-type/extended-types/date-string.type.js
|
|
3962
|
+
import { __decorate as __decorate3, __metadata as __metadata3 } from "tslib";
|
|
3972
3963
|
import { vg as vg6 } from "valgen";
|
|
3973
3964
|
var DateStringType = class DateStringType2 {
|
|
3974
3965
|
static {
|
|
@@ -3991,19 +3982,19 @@ var DateStringType = class DateStringType2 {
|
|
|
3991
3982
|
return this[DECODER](properties);
|
|
3992
3983
|
}
|
|
3993
3984
|
};
|
|
3994
|
-
|
|
3985
|
+
__decorate3([
|
|
3995
3986
|
SimpleType2.Attribute({
|
|
3996
3987
|
description: "Minimum value"
|
|
3997
3988
|
}),
|
|
3998
|
-
|
|
3989
|
+
__metadata3("design:type", String)
|
|
3999
3990
|
], DateStringType.prototype, "minValue", void 0);
|
|
4000
|
-
|
|
3991
|
+
__decorate3([
|
|
4001
3992
|
SimpleType2.Attribute({
|
|
4002
3993
|
description: "Maximum value"
|
|
4003
3994
|
}),
|
|
4004
|
-
|
|
3995
|
+
__metadata3("design:type", String)
|
|
4005
3996
|
], DateStringType.prototype, "maxValue", void 0);
|
|
4006
|
-
DateStringType =
|
|
3997
|
+
DateStringType = __decorate3([
|
|
4007
3998
|
SimpleType2({
|
|
4008
3999
|
description: "Date string value",
|
|
4009
4000
|
nameMappings: {
|
|
@@ -4011,10 +4002,11 @@ DateStringType = __decorate([
|
|
|
4011
4002
|
json: "string"
|
|
4012
4003
|
}
|
|
4013
4004
|
}).Example("2021-04-18", "Full date value").Example("2021-04", "Date value without day").Example("2021", "Year only value"),
|
|
4014
|
-
|
|
4005
|
+
__metadata3("design:paramtypes", [Object])
|
|
4015
4006
|
], DateStringType);
|
|
4016
4007
|
|
|
4017
4008
|
// ../../build/common/esm/document/data-type/extended-types/date-time.type.js
|
|
4009
|
+
import { __decorate as __decorate4, __metadata as __metadata4 } from "tslib";
|
|
4018
4010
|
import { isDateString as isDateString2, toString as toString2, vg as vg7 } from "valgen";
|
|
4019
4011
|
var DateTimeType = class DateTimeType2 {
|
|
4020
4012
|
static {
|
|
@@ -4051,19 +4043,19 @@ var DateTimeType = class DateTimeType2 {
|
|
|
4051
4043
|
return x.length > 0 ? vg7.pipe([fn, ...x], { returnIndex: 0 }) : fn;
|
|
4052
4044
|
}
|
|
4053
4045
|
};
|
|
4054
|
-
|
|
4046
|
+
__decorate4([
|
|
4055
4047
|
SimpleType2.Attribute({
|
|
4056
4048
|
description: "Minimum value"
|
|
4057
4049
|
}),
|
|
4058
|
-
|
|
4050
|
+
__metadata4("design:type", String)
|
|
4059
4051
|
], DateTimeType.prototype, "minValue", void 0);
|
|
4060
|
-
|
|
4052
|
+
__decorate4([
|
|
4061
4053
|
SimpleType2.Attribute({
|
|
4062
4054
|
description: "Maximum value"
|
|
4063
4055
|
}),
|
|
4064
|
-
|
|
4056
|
+
__metadata4("design:type", String)
|
|
4065
4057
|
], DateTimeType.prototype, "maxValue", void 0);
|
|
4066
|
-
DateTimeType =
|
|
4058
|
+
DateTimeType = __decorate4([
|
|
4067
4059
|
SimpleType2({
|
|
4068
4060
|
description: "A full datetime value",
|
|
4069
4061
|
nameMappings: {
|
|
@@ -4071,10 +4063,11 @@ DateTimeType = __decorate([
|
|
|
4071
4063
|
json: "string"
|
|
4072
4064
|
}
|
|
4073
4065
|
}).Example("2021-04-18T22:30:15").Example("2021-04-18 22:30:15").Example("2021-04-18 22:30"),
|
|
4074
|
-
|
|
4066
|
+
__metadata4("design:paramtypes", [Object])
|
|
4075
4067
|
], DateTimeType);
|
|
4076
4068
|
|
|
4077
4069
|
// ../../build/common/esm/document/data-type/extended-types/date-time-string.type.js
|
|
4070
|
+
import { __decorate as __decorate5, __metadata as __metadata5 } from "tslib";
|
|
4078
4071
|
import { vg as vg8 } from "valgen";
|
|
4079
4072
|
var DateTimeStringType = class DateTimeStringType2 {
|
|
4080
4073
|
static {
|
|
@@ -4097,19 +4090,19 @@ var DateTimeStringType = class DateTimeStringType2 {
|
|
|
4097
4090
|
return this[DECODER](properties);
|
|
4098
4091
|
}
|
|
4099
4092
|
};
|
|
4100
|
-
|
|
4093
|
+
__decorate5([
|
|
4101
4094
|
SimpleType2.Attribute({
|
|
4102
4095
|
description: "Minimum value"
|
|
4103
4096
|
}),
|
|
4104
|
-
|
|
4097
|
+
__metadata5("design:type", String)
|
|
4105
4098
|
], DateTimeStringType.prototype, "minValue", void 0);
|
|
4106
|
-
|
|
4099
|
+
__decorate5([
|
|
4107
4100
|
SimpleType2.Attribute({
|
|
4108
4101
|
description: "Maximum value"
|
|
4109
4102
|
}),
|
|
4110
|
-
|
|
4103
|
+
__metadata5("design:type", String)
|
|
4111
4104
|
], DateTimeStringType.prototype, "maxValue", void 0);
|
|
4112
|
-
DateTimeStringType =
|
|
4105
|
+
DateTimeStringType = __decorate5([
|
|
4113
4106
|
SimpleType2({
|
|
4114
4107
|
description: "DateTime string value",
|
|
4115
4108
|
nameMappings: {
|
|
@@ -4117,10 +4110,11 @@ DateTimeStringType = __decorate([
|
|
|
4117
4110
|
json: "string"
|
|
4118
4111
|
}
|
|
4119
4112
|
}).Example("2021-04-18T22:30:15+01:00", "Full date-time value with timezone").Example("2021-04-18T22:30:15", "Full date-time value without timezone").Example("2021-04-18 22:30", "Date-time value").Example("2021-04-18", "Date value").Example("2021-04", "Date value without day").Example("2021", "Year only value"),
|
|
4120
|
-
|
|
4113
|
+
__metadata5("design:paramtypes", [Object])
|
|
4121
4114
|
], DateTimeStringType);
|
|
4122
4115
|
|
|
4123
4116
|
// ../../build/common/esm/document/data-type/extended-types/email.type.js
|
|
4117
|
+
import { __decorate as __decorate6, __metadata as __metadata6 } from "tslib";
|
|
4124
4118
|
import { vg as vg9 } from "valgen";
|
|
4125
4119
|
var EmailType = class EmailType2 {
|
|
4126
4120
|
static {
|
|
@@ -4137,67 +4131,67 @@ var EmailType = class EmailType2 {
|
|
|
4137
4131
|
return vg9.isEmail({ ...properties, coerce: true });
|
|
4138
4132
|
}
|
|
4139
4133
|
};
|
|
4140
|
-
|
|
4134
|
+
__decorate6([
|
|
4141
4135
|
SimpleType2.Attribute({
|
|
4142
4136
|
description: "If set to `true`, the validator will also match `Display Name <email-address>",
|
|
4143
4137
|
default: false
|
|
4144
4138
|
}),
|
|
4145
|
-
|
|
4139
|
+
__metadata6("design:type", Boolean)
|
|
4146
4140
|
], EmailType.prototype, "allowDisplayName", void 0);
|
|
4147
|
-
|
|
4141
|
+
__decorate6([
|
|
4148
4142
|
SimpleType2.Attribute({
|
|
4149
4143
|
description: "If set to `true`, the validator will reject strings without the format `Display Name <email-address>",
|
|
4150
4144
|
default: false
|
|
4151
4145
|
}),
|
|
4152
|
-
|
|
4146
|
+
__metadata6("design:type", Boolean)
|
|
4153
4147
|
], EmailType.prototype, "requireDisplayName", void 0);
|
|
4154
|
-
|
|
4148
|
+
__decorate6([
|
|
4155
4149
|
SimpleType2.Attribute({
|
|
4156
4150
|
description: "If set to `false`, the validator will not allow any non-English UTF8 character in email address's local part",
|
|
4157
4151
|
default: true
|
|
4158
4152
|
}),
|
|
4159
|
-
|
|
4153
|
+
__metadata6("design:type", Boolean)
|
|
4160
4154
|
], EmailType.prototype, "utf8LocalPart", void 0);
|
|
4161
|
-
|
|
4155
|
+
__decorate6([
|
|
4162
4156
|
SimpleType2.Attribute({
|
|
4163
4157
|
description: "If set to `true`, the validator will not check for the standard max length of an email",
|
|
4164
4158
|
default: false
|
|
4165
4159
|
}),
|
|
4166
|
-
|
|
4160
|
+
__metadata6("design:type", Boolean)
|
|
4167
4161
|
], EmailType.prototype, "ignoreMaxLength", void 0);
|
|
4168
|
-
|
|
4162
|
+
__decorate6([
|
|
4169
4163
|
SimpleType2.Attribute({
|
|
4170
4164
|
description: "If set to `true`, the validator will allow IP addresses in the host part",
|
|
4171
4165
|
default: false
|
|
4172
4166
|
}),
|
|
4173
|
-
|
|
4167
|
+
__metadata6("design:type", Boolean)
|
|
4174
4168
|
], EmailType.prototype, "allowIpDomain", void 0);
|
|
4175
|
-
|
|
4169
|
+
__decorate6([
|
|
4176
4170
|
SimpleType2.Attribute({
|
|
4177
4171
|
description: "If set to `true`, some additional validation will be enabled, e.g. disallowing certain syntactically valid email addresses that are rejected by GMail.",
|
|
4178
4172
|
default: false
|
|
4179
4173
|
}),
|
|
4180
|
-
|
|
4174
|
+
__metadata6("design:type", Boolean)
|
|
4181
4175
|
], EmailType.prototype, "domainSpecificValidation", void 0);
|
|
4182
|
-
|
|
4176
|
+
__decorate6([
|
|
4183
4177
|
SimpleType2.Attribute({
|
|
4184
4178
|
description: "If set to an array of strings and the part of the email after the @ symbol one of the strings defined in it, the validation fails."
|
|
4185
4179
|
}),
|
|
4186
|
-
|
|
4180
|
+
__metadata6("design:type", Array)
|
|
4187
4181
|
], EmailType.prototype, "hostBlacklist", void 0);
|
|
4188
|
-
|
|
4182
|
+
__decorate6([
|
|
4189
4183
|
SimpleType2.Attribute({
|
|
4190
4184
|
description: "If set to an array of strings and the part of the email after the @ symbol matches none of the strings defined in it, the validation fails."
|
|
4191
4185
|
}),
|
|
4192
|
-
|
|
4186
|
+
__metadata6("design:type", Array)
|
|
4193
4187
|
], EmailType.prototype, "hostWhitelist", void 0);
|
|
4194
|
-
|
|
4188
|
+
__decorate6([
|
|
4195
4189
|
SimpleType2.Attribute({
|
|
4196
4190
|
description: "If set to a string, then the validator will reject emails that include any of the characters in the string, in the name part."
|
|
4197
4191
|
}),
|
|
4198
|
-
|
|
4192
|
+
__metadata6("design:type", String)
|
|
4199
4193
|
], EmailType.prototype, "blacklistedChars", void 0);
|
|
4200
|
-
EmailType =
|
|
4194
|
+
EmailType = __decorate6([
|
|
4201
4195
|
SimpleType2({
|
|
4202
4196
|
description: "An email value",
|
|
4203
4197
|
nameMappings: {
|
|
@@ -4205,10 +4199,11 @@ EmailType = __decorate([
|
|
|
4205
4199
|
json: "string"
|
|
4206
4200
|
}
|
|
4207
4201
|
}).Example("some.body@example.com"),
|
|
4208
|
-
|
|
4202
|
+
__metadata6("design:paramtypes", [Object])
|
|
4209
4203
|
], EmailType);
|
|
4210
4204
|
|
|
4211
4205
|
// ../../build/common/esm/document/data-type/extended-types/field-path.type.js
|
|
4206
|
+
import { __decorate as __decorate7, __metadata as __metadata7 } from "tslib";
|
|
4212
4207
|
import { toString as toString3, validator as validator2, vg as vg10 } from "valgen";
|
|
4213
4208
|
var FieldPathType = class FieldPathType2 {
|
|
4214
4209
|
static {
|
|
@@ -4236,19 +4231,19 @@ var FieldPathType = class FieldPathType2 {
|
|
|
4236
4231
|
};
|
|
4237
4232
|
}
|
|
4238
4233
|
};
|
|
4239
|
-
|
|
4234
|
+
__decorate7([
|
|
4240
4235
|
SimpleType2.Attribute({
|
|
4241
4236
|
description: "Data type which field belong to"
|
|
4242
4237
|
}),
|
|
4243
|
-
|
|
4238
|
+
__metadata7("design:type", Object)
|
|
4244
4239
|
], FieldPathType.prototype, "dataType", void 0);
|
|
4245
|
-
|
|
4240
|
+
__decorate7([
|
|
4246
4241
|
SimpleType2.Attribute({
|
|
4247
4242
|
description: 'Determines if signs (+,-) are allowed. If set "first" signs are allowed only beginning of the field pathIf set "each" signs are allowed at each field in the path'
|
|
4248
4243
|
}),
|
|
4249
|
-
|
|
4244
|
+
__metadata7("design:type", String)
|
|
4250
4245
|
], FieldPathType.prototype, "allowSigns", void 0);
|
|
4251
|
-
FieldPathType =
|
|
4246
|
+
FieldPathType = __decorate7([
|
|
4252
4247
|
SimpleType2({
|
|
4253
4248
|
description: "Field path",
|
|
4254
4249
|
nameMappings: {
|
|
@@ -4256,10 +4251,11 @@ FieldPathType = __decorate([
|
|
|
4256
4251
|
json: "string"
|
|
4257
4252
|
}
|
|
4258
4253
|
}),
|
|
4259
|
-
|
|
4254
|
+
__metadata7("design:paramtypes", [Object])
|
|
4260
4255
|
], FieldPathType);
|
|
4261
4256
|
|
|
4262
4257
|
// ../../build/common/esm/document/data-type/extended-types/filter.type.js
|
|
4258
|
+
import { __decorate as __decorate8, __metadata as __metadata8 } from "tslib";
|
|
4263
4259
|
import { validator as validator3 } from "valgen";
|
|
4264
4260
|
|
|
4265
4261
|
// ../../build/common/esm/exception/opra-http-error.js
|
|
@@ -12131,20 +12127,20 @@ var FilterType = class FilterType2 {
|
|
|
12131
12127
|
};
|
|
12132
12128
|
}
|
|
12133
12129
|
};
|
|
12134
|
-
|
|
12130
|
+
__decorate8([
|
|
12135
12131
|
SimpleType2.Attribute({
|
|
12136
12132
|
description: "Data type which filtering fields belong to"
|
|
12137
12133
|
}),
|
|
12138
|
-
|
|
12134
|
+
__metadata8("design:type", Object)
|
|
12139
12135
|
], FilterType.prototype, "dataType", void 0);
|
|
12140
|
-
|
|
12136
|
+
__decorate8([
|
|
12141
12137
|
SimpleType2.Attribute({
|
|
12142
12138
|
description: "Stringified JSON object defines filtering rules",
|
|
12143
12139
|
format: "string"
|
|
12144
12140
|
}),
|
|
12145
|
-
|
|
12141
|
+
__metadata8("design:type", Object)
|
|
12146
12142
|
], FilterType.prototype, "rules", void 0);
|
|
12147
|
-
FilterType =
|
|
12143
|
+
FilterType = __decorate8([
|
|
12148
12144
|
SimpleType2({
|
|
12149
12145
|
description: "A query filter",
|
|
12150
12146
|
nameMappings: {
|
|
@@ -12152,7 +12148,7 @@ FilterType = __decorate([
|
|
|
12152
12148
|
json: "string"
|
|
12153
12149
|
}
|
|
12154
12150
|
}),
|
|
12155
|
-
|
|
12151
|
+
__metadata8("design:paramtypes", [Object])
|
|
12156
12152
|
], FilterType);
|
|
12157
12153
|
var decodeFilter = /* @__PURE__ */ __name((dataType, rules) => validator3("decodeFilter", (input, context, _this) => {
|
|
12158
12154
|
if (typeof input === "string") {
|
|
@@ -12176,6 +12172,7 @@ var encodeFilter = validator3("encodeFilter", (input, context, _this) => {
|
|
|
12176
12172
|
});
|
|
12177
12173
|
|
|
12178
12174
|
// ../../build/common/esm/document/data-type/extended-types/object-id.type.js
|
|
12175
|
+
import { __decorate as __decorate9, __metadata as __metadata9 } from "tslib";
|
|
12179
12176
|
import { vg as vg11 } from "valgen";
|
|
12180
12177
|
var ObjectIdType = class ObjectIdType2 {
|
|
12181
12178
|
static {
|
|
@@ -12192,7 +12189,7 @@ var ObjectIdType = class ObjectIdType2 {
|
|
|
12192
12189
|
return vg11.isObjectId({ coerce: true });
|
|
12193
12190
|
}
|
|
12194
12191
|
};
|
|
12195
|
-
ObjectIdType =
|
|
12192
|
+
ObjectIdType = __decorate9([
|
|
12196
12193
|
SimpleType2({
|
|
12197
12194
|
description: "A MongoDB ObjectID value",
|
|
12198
12195
|
nameMappings: {
|
|
@@ -12200,10 +12197,11 @@ ObjectIdType = __decorate([
|
|
|
12200
12197
|
json: "string"
|
|
12201
12198
|
}
|
|
12202
12199
|
}),
|
|
12203
|
-
|
|
12200
|
+
__metadata9("design:paramtypes", [Object])
|
|
12204
12201
|
], ObjectIdType);
|
|
12205
12202
|
|
|
12206
12203
|
// ../../build/common/esm/document/data-type/extended-types/operation-result.type.js
|
|
12204
|
+
import { __decorate as __decorate10, __metadata as __metadata10 } from "tslib";
|
|
12207
12205
|
var OperationResult = class OperationResult2 {
|
|
12208
12206
|
static {
|
|
12209
12207
|
__name(this, "OperationResult");
|
|
@@ -12213,39 +12211,39 @@ var OperationResult = class OperationResult2 {
|
|
|
12213
12211
|
Object.assign(this, init);
|
|
12214
12212
|
}
|
|
12215
12213
|
};
|
|
12216
|
-
|
|
12214
|
+
__decorate10([
|
|
12217
12215
|
ApiField(),
|
|
12218
|
-
|
|
12216
|
+
__metadata10("design:type", Number)
|
|
12219
12217
|
], OperationResult.prototype, "affected", void 0);
|
|
12220
|
-
|
|
12218
|
+
__decorate10([
|
|
12221
12219
|
ApiField(),
|
|
12222
|
-
|
|
12220
|
+
__metadata10("design:type", Number)
|
|
12223
12221
|
], OperationResult.prototype, "totalMatches", void 0);
|
|
12224
|
-
|
|
12222
|
+
__decorate10([
|
|
12225
12223
|
ApiField(),
|
|
12226
|
-
|
|
12224
|
+
__metadata10("design:type", String)
|
|
12227
12225
|
], OperationResult.prototype, "context", void 0);
|
|
12228
|
-
|
|
12226
|
+
__decorate10([
|
|
12229
12227
|
ApiField(),
|
|
12230
|
-
|
|
12228
|
+
__metadata10("design:type", String)
|
|
12231
12229
|
], OperationResult.prototype, "type", void 0);
|
|
12232
|
-
|
|
12230
|
+
__decorate10([
|
|
12233
12231
|
ApiField(),
|
|
12234
|
-
|
|
12232
|
+
__metadata10("design:type", String)
|
|
12235
12233
|
], OperationResult.prototype, "message", void 0);
|
|
12236
|
-
|
|
12234
|
+
__decorate10([
|
|
12237
12235
|
ApiField({ type: "any" }),
|
|
12238
|
-
|
|
12236
|
+
__metadata10("design:type", Object)
|
|
12239
12237
|
], OperationResult.prototype, "payload", void 0);
|
|
12240
|
-
|
|
12238
|
+
__decorate10([
|
|
12241
12239
|
ApiField({ type: "object" }),
|
|
12242
|
-
|
|
12240
|
+
__metadata10("design:type", Array)
|
|
12243
12241
|
], OperationResult.prototype, "errors", void 0);
|
|
12244
|
-
OperationResult =
|
|
12242
|
+
OperationResult = __decorate10([
|
|
12245
12243
|
ComplexType2({
|
|
12246
12244
|
description: "Operation result"
|
|
12247
12245
|
}),
|
|
12248
|
-
|
|
12246
|
+
__metadata10("design:paramtypes", [Object])
|
|
12249
12247
|
], OperationResult);
|
|
12250
12248
|
(function(OperationResult3) {
|
|
12251
12249
|
function forPayload(type) {
|
|
@@ -12257,13 +12255,13 @@ OperationResult = __decorate([
|
|
|
12257
12255
|
super(...args);
|
|
12258
12256
|
}
|
|
12259
12257
|
};
|
|
12260
|
-
|
|
12258
|
+
__decorate10([
|
|
12261
12259
|
ApiField({ type, required: true }),
|
|
12262
|
-
|
|
12260
|
+
__metadata10("design:type", Object)
|
|
12263
12261
|
], OperationResult_.prototype, "payload", void 0);
|
|
12264
|
-
OperationResult_ =
|
|
12262
|
+
OperationResult_ = __decorate10([
|
|
12265
12263
|
ComplexType2({ embedded: true }),
|
|
12266
|
-
|
|
12264
|
+
__metadata10("design:paramtypes", [Object])
|
|
12267
12265
|
], OperationResult_);
|
|
12268
12266
|
return OperationResult_;
|
|
12269
12267
|
}
|
|
@@ -12272,6 +12270,7 @@ OperationResult = __decorate([
|
|
|
12272
12270
|
})(OperationResult || (OperationResult = {}));
|
|
12273
12271
|
|
|
12274
12272
|
// ../../build/common/esm/document/data-type/extended-types/time.type.js
|
|
12273
|
+
import { __decorate as __decorate11, __metadata as __metadata11 } from "tslib";
|
|
12275
12274
|
import { vg as vg12 } from "valgen";
|
|
12276
12275
|
var TIME_PATTERN2 = /^([0-1][0-9]|2[0-4]):([0-5][0-9])(?::([0-5][0-9]))?$/;
|
|
12277
12276
|
var TimeType = class TimeType2 {
|
|
@@ -12298,19 +12297,19 @@ var TimeType = class TimeType2 {
|
|
|
12298
12297
|
return this[DECODER](properties);
|
|
12299
12298
|
}
|
|
12300
12299
|
};
|
|
12301
|
-
|
|
12300
|
+
__decorate11([
|
|
12302
12301
|
SimpleType2.Attribute({
|
|
12303
12302
|
description: "Minimum value"
|
|
12304
12303
|
}),
|
|
12305
|
-
|
|
12304
|
+
__metadata11("design:type", String)
|
|
12306
12305
|
], TimeType.prototype, "minValue", void 0);
|
|
12307
|
-
|
|
12306
|
+
__decorate11([
|
|
12308
12307
|
SimpleType2.Attribute({
|
|
12309
12308
|
description: "Maximum value"
|
|
12310
12309
|
}),
|
|
12311
|
-
|
|
12310
|
+
__metadata11("design:type", String)
|
|
12312
12311
|
], TimeType.prototype, "maxValue", void 0);
|
|
12313
|
-
TimeType =
|
|
12312
|
+
TimeType = __decorate11([
|
|
12314
12313
|
SimpleType2({
|
|
12315
12314
|
description: "Time string in 24h format",
|
|
12316
12315
|
nameMappings: {
|
|
@@ -12318,10 +12317,11 @@ TimeType = __decorate([
|
|
|
12318
12317
|
json: "string"
|
|
12319
12318
|
}
|
|
12320
12319
|
}).Example("18:23:00", "Full time value").Example("18:23:00", "Time value without seconds"),
|
|
12321
|
-
|
|
12320
|
+
__metadata11("design:paramtypes", [Object])
|
|
12322
12321
|
], TimeType);
|
|
12323
12322
|
|
|
12324
12323
|
// ../../build/common/esm/document/data-type/extended-types/url.type.js
|
|
12324
|
+
import { __decorate as __decorate12, __metadata as __metadata12 } from "tslib";
|
|
12325
12325
|
import { vg as vg13 } from "valgen";
|
|
12326
12326
|
var UrlType = class UrlType2 {
|
|
12327
12327
|
static {
|
|
@@ -12338,7 +12338,7 @@ var UrlType = class UrlType2 {
|
|
|
12338
12338
|
return vg13.isURL({ coerce: true });
|
|
12339
12339
|
}
|
|
12340
12340
|
};
|
|
12341
|
-
UrlType =
|
|
12341
|
+
UrlType = __decorate12([
|
|
12342
12342
|
SimpleType2({
|
|
12343
12343
|
description: "A Uniform Resource Identifier Reference (RFC 3986 icon) value",
|
|
12344
12344
|
nameMappings: {
|
|
@@ -12346,10 +12346,11 @@ UrlType = __decorate([
|
|
|
12346
12346
|
json: "string"
|
|
12347
12347
|
}
|
|
12348
12348
|
}).Example("http://tempuri.org"),
|
|
12349
|
-
|
|
12349
|
+
__metadata12("design:paramtypes", [Object])
|
|
12350
12350
|
], UrlType);
|
|
12351
12351
|
|
|
12352
12352
|
// ../../build/common/esm/document/data-type/extended-types/uuid.type.js
|
|
12353
|
+
import { __decorate as __decorate13, __metadata as __metadata13 } from "tslib";
|
|
12353
12354
|
import { vg as vg14 } from "valgen";
|
|
12354
12355
|
var UuidType = class UuidType2 {
|
|
12355
12356
|
static {
|
|
@@ -12366,13 +12367,13 @@ var UuidType = class UuidType2 {
|
|
|
12366
12367
|
return vg14.isUUID(properties?.version, { coerce: true });
|
|
12367
12368
|
}
|
|
12368
12369
|
};
|
|
12369
|
-
|
|
12370
|
+
__decorate13([
|
|
12370
12371
|
SimpleType2.Attribute({
|
|
12371
12372
|
description: "Version of the UUID"
|
|
12372
12373
|
}),
|
|
12373
|
-
|
|
12374
|
+
__metadata13("design:type", Number)
|
|
12374
12375
|
], UuidType.prototype, "version", void 0);
|
|
12375
|
-
UuidType =
|
|
12376
|
+
UuidType = __decorate13([
|
|
12376
12377
|
SimpleType2({
|
|
12377
12378
|
description: "A Universal Unique Identifier (UUID) value",
|
|
12378
12379
|
nameMappings: {
|
|
@@ -12380,7 +12381,7 @@ UuidType = __decorate([
|
|
|
12380
12381
|
json: "string"
|
|
12381
12382
|
}
|
|
12382
12383
|
}),
|
|
12383
|
-
|
|
12384
|
+
__metadata13("design:paramtypes", [Object])
|
|
12384
12385
|
], UuidType);
|
|
12385
12386
|
|
|
12386
12387
|
// ../../build/common/esm/document/data-type/utils/create-mapped-class.js
|
|
@@ -12451,6 +12452,7 @@ function PickType(baseType, keys, options) {
|
|
|
12451
12452
|
__name(PickType, "PickType");
|
|
12452
12453
|
|
|
12453
12454
|
// ../../build/common/esm/document/data-type/primitive-types/any.type.js
|
|
12455
|
+
import { __decorate as __decorate14, __metadata as __metadata14 } from "tslib";
|
|
12454
12456
|
import { isAny as isAny3 } from "valgen";
|
|
12455
12457
|
var AnyType = class AnyType2 {
|
|
12456
12458
|
static {
|
|
@@ -12467,17 +12469,19 @@ var AnyType = class AnyType2 {
|
|
|
12467
12469
|
return isAny3;
|
|
12468
12470
|
}
|
|
12469
12471
|
};
|
|
12470
|
-
AnyType =
|
|
12472
|
+
AnyType = __decorate14([
|
|
12471
12473
|
SimpleType2({
|
|
12472
12474
|
description: "Represents any value"
|
|
12473
12475
|
}),
|
|
12474
|
-
|
|
12476
|
+
__metadata14("design:paramtypes", [Object])
|
|
12475
12477
|
], AnyType);
|
|
12476
12478
|
|
|
12477
12479
|
// ../../build/common/esm/document/data-type/primitive-types/bigint.type.js
|
|
12480
|
+
import { __decorate as __decorate16, __metadata as __metadata16 } from "tslib";
|
|
12478
12481
|
import { toBigint, vg as vg16 } from "valgen";
|
|
12479
12482
|
|
|
12480
12483
|
// ../../build/common/esm/document/data-type/primitive-types/number.type.js
|
|
12484
|
+
import { __decorate as __decorate15, __metadata as __metadata15 } from "tslib";
|
|
12481
12485
|
import { toNumber, vg as vg15 } from "valgen";
|
|
12482
12486
|
var NumberType = class NumberType2 {
|
|
12483
12487
|
static {
|
|
@@ -12499,19 +12503,19 @@ var NumberType = class NumberType2 {
|
|
|
12499
12503
|
return this[DECODER](properties);
|
|
12500
12504
|
}
|
|
12501
12505
|
};
|
|
12502
|
-
|
|
12506
|
+
__decorate15([
|
|
12503
12507
|
SimpleType2.Attribute({
|
|
12504
12508
|
description: "Determines the minimum value"
|
|
12505
12509
|
}),
|
|
12506
|
-
|
|
12510
|
+
__metadata15("design:type", Number)
|
|
12507
12511
|
], NumberType.prototype, "minValue", void 0);
|
|
12508
|
-
|
|
12512
|
+
__decorate15([
|
|
12509
12513
|
SimpleType2.Attribute({
|
|
12510
12514
|
description: "Determines the maximum value"
|
|
12511
12515
|
}),
|
|
12512
|
-
|
|
12516
|
+
__metadata15("design:type", Number)
|
|
12513
12517
|
], NumberType.prototype, "maxValue", void 0);
|
|
12514
|
-
NumberType =
|
|
12518
|
+
NumberType = __decorate15([
|
|
12515
12519
|
SimpleType2({
|
|
12516
12520
|
description: "Both Integer as well as Floating-Point numbers",
|
|
12517
12521
|
nameMappings: {
|
|
@@ -12519,7 +12523,7 @@ NumberType = __decorate([
|
|
|
12519
12523
|
json: "number"
|
|
12520
12524
|
}
|
|
12521
12525
|
}),
|
|
12522
|
-
|
|
12526
|
+
__metadata15("design:paramtypes", [Object])
|
|
12523
12527
|
], NumberType);
|
|
12524
12528
|
|
|
12525
12529
|
// ../../build/common/esm/document/data-type/primitive-types/bigint.type.js
|
|
@@ -12542,7 +12546,7 @@ var BigintType = class BigintType2 extends NumberType {
|
|
|
12542
12546
|
return this[DECODER](properties);
|
|
12543
12547
|
}
|
|
12544
12548
|
};
|
|
12545
|
-
BigintType =
|
|
12549
|
+
BigintType = __decorate16([
|
|
12546
12550
|
SimpleType2({
|
|
12547
12551
|
description: "BigInt number",
|
|
12548
12552
|
nameMappings: {
|
|
@@ -12550,10 +12554,11 @@ BigintType = __decorate([
|
|
|
12550
12554
|
json: "string"
|
|
12551
12555
|
}
|
|
12552
12556
|
}),
|
|
12553
|
-
|
|
12557
|
+
__metadata16("design:paramtypes", [Object])
|
|
12554
12558
|
], BigintType);
|
|
12555
12559
|
|
|
12556
12560
|
// ../../build/common/esm/document/data-type/primitive-types/boolean.type.js
|
|
12561
|
+
import { __decorate as __decorate17, __metadata as __metadata17 } from "tslib";
|
|
12557
12562
|
import { toBoolean } from "valgen";
|
|
12558
12563
|
var BooleanType = class BooleanType2 {
|
|
12559
12564
|
static {
|
|
@@ -12570,7 +12575,7 @@ var BooleanType = class BooleanType2 {
|
|
|
12570
12575
|
return toBoolean;
|
|
12571
12576
|
}
|
|
12572
12577
|
};
|
|
12573
|
-
BooleanType =
|
|
12578
|
+
BooleanType = __decorate17([
|
|
12574
12579
|
SimpleType2({
|
|
12575
12580
|
description: "Simple true/false value",
|
|
12576
12581
|
nameMappings: {
|
|
@@ -12578,10 +12583,11 @@ BooleanType = __decorate([
|
|
|
12578
12583
|
json: "boolean"
|
|
12579
12584
|
}
|
|
12580
12585
|
}),
|
|
12581
|
-
|
|
12586
|
+
__metadata17("design:paramtypes", [Object])
|
|
12582
12587
|
], BooleanType);
|
|
12583
12588
|
|
|
12584
12589
|
// ../../build/common/esm/document/data-type/primitive-types/integer.type.js
|
|
12590
|
+
import { __decorate as __decorate18, __metadata as __metadata18 } from "tslib";
|
|
12585
12591
|
import { toInteger, vg as vg17 } from "valgen";
|
|
12586
12592
|
var IntegerType = class IntegerType2 extends NumberType {
|
|
12587
12593
|
static {
|
|
@@ -12602,7 +12608,7 @@ var IntegerType = class IntegerType2 extends NumberType {
|
|
|
12602
12608
|
return this[DECODER](properties);
|
|
12603
12609
|
}
|
|
12604
12610
|
};
|
|
12605
|
-
IntegerType =
|
|
12611
|
+
IntegerType = __decorate18([
|
|
12606
12612
|
SimpleType2({
|
|
12607
12613
|
description: "An integer number",
|
|
12608
12614
|
nameMappings: {
|
|
@@ -12610,10 +12616,11 @@ IntegerType = __decorate([
|
|
|
12610
12616
|
json: "number"
|
|
12611
12617
|
}
|
|
12612
12618
|
}),
|
|
12613
|
-
|
|
12619
|
+
__metadata18("design:paramtypes", [Object])
|
|
12614
12620
|
], IntegerType);
|
|
12615
12621
|
|
|
12616
12622
|
// ../../build/common/esm/document/data-type/primitive-types/null.type.js
|
|
12623
|
+
import { __decorate as __decorate19, __metadata as __metadata19 } from "tslib";
|
|
12617
12624
|
import { isNull } from "valgen";
|
|
12618
12625
|
var NullType = class NullType2 {
|
|
12619
12626
|
static {
|
|
@@ -12630,7 +12637,7 @@ var NullType = class NullType2 {
|
|
|
12630
12637
|
return isNull;
|
|
12631
12638
|
}
|
|
12632
12639
|
};
|
|
12633
|
-
NullType =
|
|
12640
|
+
NullType = __decorate19([
|
|
12634
12641
|
SimpleType2({
|
|
12635
12642
|
description: "A Null value",
|
|
12636
12643
|
nameMappings: {
|
|
@@ -12638,10 +12645,11 @@ NullType = __decorate([
|
|
|
12638
12645
|
json: "null"
|
|
12639
12646
|
}
|
|
12640
12647
|
}),
|
|
12641
|
-
|
|
12648
|
+
__metadata19("design:paramtypes", [Object])
|
|
12642
12649
|
], NullType);
|
|
12643
12650
|
|
|
12644
12651
|
// ../../build/common/esm/document/data-type/primitive-types/object.type.js
|
|
12652
|
+
import { __decorate as __decorate20, __metadata as __metadata20 } from "tslib";
|
|
12645
12653
|
var ObjectType = class ObjectType2 {
|
|
12646
12654
|
static {
|
|
12647
12655
|
__name(this, "ObjectType");
|
|
@@ -12651,16 +12659,17 @@ var ObjectType = class ObjectType2 {
|
|
|
12651
12659
|
Object.assign(this, properties);
|
|
12652
12660
|
}
|
|
12653
12661
|
};
|
|
12654
|
-
ObjectType =
|
|
12662
|
+
ObjectType = __decorate20([
|
|
12655
12663
|
ComplexType2({
|
|
12656
12664
|
name: "object",
|
|
12657
12665
|
description: "A non modelled object",
|
|
12658
12666
|
additionalFields: true
|
|
12659
12667
|
}),
|
|
12660
|
-
|
|
12668
|
+
__metadata20("design:paramtypes", [Object])
|
|
12661
12669
|
], ObjectType);
|
|
12662
12670
|
|
|
12663
12671
|
// ../../build/common/esm/document/data-type/primitive-types/string.type.js
|
|
12672
|
+
import { __decorate as __decorate21, __metadata as __metadata21 } from "tslib";
|
|
12664
12673
|
import { toString as toString4, vg as vg18 } from "valgen";
|
|
12665
12674
|
var StringType = class StringType2 {
|
|
12666
12675
|
static {
|
|
@@ -12690,31 +12699,31 @@ var StringType = class StringType2 {
|
|
|
12690
12699
|
return this[DECODER](properties);
|
|
12691
12700
|
}
|
|
12692
12701
|
};
|
|
12693
|
-
|
|
12702
|
+
__decorate21([
|
|
12694
12703
|
SimpleType2.Attribute({
|
|
12695
12704
|
description: "Regex pattern to be used for validation"
|
|
12696
12705
|
}),
|
|
12697
|
-
|
|
12706
|
+
__metadata21("design:type", Object)
|
|
12698
12707
|
], StringType.prototype, "pattern", void 0);
|
|
12699
|
-
|
|
12708
|
+
__decorate21([
|
|
12700
12709
|
SimpleType2.Attribute({
|
|
12701
12710
|
description: "Name of the pattern"
|
|
12702
12711
|
}),
|
|
12703
|
-
|
|
12712
|
+
__metadata21("design:type", String)
|
|
12704
12713
|
], StringType.prototype, "patternName", void 0);
|
|
12705
|
-
|
|
12714
|
+
__decorate21([
|
|
12706
12715
|
SimpleType2.Attribute({
|
|
12707
12716
|
description: "Minimum number of characters"
|
|
12708
12717
|
}),
|
|
12709
|
-
|
|
12718
|
+
__metadata21("design:type", Number)
|
|
12710
12719
|
], StringType.prototype, "minLength", void 0);
|
|
12711
|
-
|
|
12720
|
+
__decorate21([
|
|
12712
12721
|
SimpleType2.Attribute({
|
|
12713
12722
|
description: "Minimum number of characters"
|
|
12714
12723
|
}),
|
|
12715
|
-
|
|
12724
|
+
__metadata21("design:type", Number)
|
|
12716
12725
|
], StringType.prototype, "maxLength", void 0);
|
|
12717
|
-
StringType =
|
|
12726
|
+
StringType = __decorate21([
|
|
12718
12727
|
SimpleType2({
|
|
12719
12728
|
description: "A sequence of characters",
|
|
12720
12729
|
nameMappings: {
|
|
@@ -12722,7 +12731,7 @@ StringType = __decorate([
|
|
|
12722
12731
|
json: "string"
|
|
12723
12732
|
}
|
|
12724
12733
|
}),
|
|
12725
|
-
|
|
12734
|
+
__metadata21("design:paramtypes", [Object])
|
|
12726
12735
|
], StringType);
|
|
12727
12736
|
|
|
12728
12737
|
// ../../build/common/esm/document/data-type/required-type.js
|
|
@@ -12742,7 +12751,7 @@ HttpOperation2.Entity.Create = function(arg0, arg1) {
|
|
|
12742
12751
|
} else
|
|
12743
12752
|
args = { ...arg1, type: arg0 };
|
|
12744
12753
|
const decoratorChain = [];
|
|
12745
|
-
const decorator = HttpOperationDecoratorFactory(decoratorChain,
|
|
12754
|
+
const decorator = HttpOperationDecoratorFactory(decoratorChain, {
|
|
12746
12755
|
method: "POST",
|
|
12747
12756
|
...args,
|
|
12748
12757
|
composition: "Entity.Create",
|
|
@@ -12751,7 +12760,7 @@ HttpOperation2.Entity.Create = function(arg0, arg1) {
|
|
|
12751
12760
|
...args.requestBody,
|
|
12752
12761
|
required: true
|
|
12753
12762
|
}
|
|
12754
|
-
})
|
|
12763
|
+
});
|
|
12755
12764
|
decorator.QueryParam("projection", {
|
|
12756
12765
|
description: "Determines fields projection",
|
|
12757
12766
|
type: new FieldPathType({
|
|
@@ -12782,11 +12791,11 @@ HttpOperation2.Entity.Delete = function(arg0, arg1) {
|
|
|
12782
12791
|
} else
|
|
12783
12792
|
args = { ...arg1, type: arg0 };
|
|
12784
12793
|
const decoratorChain = [];
|
|
12785
|
-
const decorator = HttpOperationDecoratorFactory(decoratorChain,
|
|
12794
|
+
const decorator = HttpOperationDecoratorFactory(decoratorChain, {
|
|
12786
12795
|
method: "DELETE",
|
|
12787
12796
|
...args,
|
|
12788
12797
|
composition: "Entity.Delete"
|
|
12789
|
-
})
|
|
12798
|
+
});
|
|
12790
12799
|
decorator.Response(HttpStatusCode.OK, {
|
|
12791
12800
|
description: 'Operation is successful. Returns OperationResult with "affected" field.',
|
|
12792
12801
|
contentType: MimeTypes.opra_response_json
|
|
@@ -12830,11 +12839,11 @@ HttpOperation2.Entity.DeleteMany = function(arg0, arg1) {
|
|
|
12830
12839
|
const filterRules = new FilterRules();
|
|
12831
12840
|
const filterType = new FilterType({ dataType: args.type });
|
|
12832
12841
|
filterType.rules = {};
|
|
12833
|
-
const decorator = HttpOperationDecoratorFactory(decoratorChain,
|
|
12842
|
+
const decorator = HttpOperationDecoratorFactory(decoratorChain, {
|
|
12834
12843
|
method: "DELETE",
|
|
12835
12844
|
...args,
|
|
12836
12845
|
composition: "Entity.DeleteMany"
|
|
12837
|
-
})
|
|
12846
|
+
});
|
|
12838
12847
|
decorator.Response(HttpStatusCode.OK, {
|
|
12839
12848
|
description: 'Operation is successful. Returns OperationResult with "affected" field.',
|
|
12840
12849
|
contentType: MimeTypes.opra_response_json
|
|
@@ -12868,11 +12877,11 @@ HttpOperation2.Entity.FindMany = function(arg0, arg1) {
|
|
|
12868
12877
|
const filterRules = new FilterRules();
|
|
12869
12878
|
const filterType = new FilterType({ dataType: args.type });
|
|
12870
12879
|
filterType.rules = {};
|
|
12871
|
-
const decorator = HttpOperationDecoratorFactory(decoratorChain,
|
|
12880
|
+
const decorator = HttpOperationDecoratorFactory(decoratorChain, {
|
|
12872
12881
|
method: "GET",
|
|
12873
12882
|
...args,
|
|
12874
12883
|
composition: "Entity.FindMany"
|
|
12875
|
-
})
|
|
12884
|
+
});
|
|
12876
12885
|
decorator.Response(HttpStatusCode.OK, {
|
|
12877
12886
|
description: 'Operation is successful. Returns OperationResult with "payload" field that contains list of resources.',
|
|
12878
12887
|
contentType: MimeTypes.opra_response_json,
|
|
@@ -12951,11 +12960,11 @@ HttpOperation2.Entity.Get = function(arg0, arg1) {
|
|
|
12951
12960
|
} else
|
|
12952
12961
|
args = { ...arg1, type: arg0 };
|
|
12953
12962
|
const decoratorChain = [];
|
|
12954
|
-
const decorator = HttpOperationDecoratorFactory(decoratorChain,
|
|
12963
|
+
const decorator = HttpOperationDecoratorFactory(decoratorChain, {
|
|
12955
12964
|
method: "GET",
|
|
12956
12965
|
...args,
|
|
12957
12966
|
composition: "Entity.Get"
|
|
12958
|
-
})
|
|
12967
|
+
});
|
|
12959
12968
|
decorator.QueryParam("projection", {
|
|
12960
12969
|
description: "Determines fields projection",
|
|
12961
12970
|
type: new FieldPathType({
|
|
@@ -13011,7 +13020,7 @@ HttpOperation2.Entity.UpdateMany = function(arg0, arg1) {
|
|
|
13011
13020
|
const filterType = new FilterType({ dataType: args.type });
|
|
13012
13021
|
filterType.rules = {};
|
|
13013
13022
|
const filterRules = new FilterRules();
|
|
13014
|
-
const decorator = HttpOperationDecoratorFactory(decoratorChain,
|
|
13023
|
+
const decorator = HttpOperationDecoratorFactory(decoratorChain, {
|
|
13015
13024
|
method: "PATCH",
|
|
13016
13025
|
...args,
|
|
13017
13026
|
composition: "Entity.UpdateMany",
|
|
@@ -13021,7 +13030,7 @@ HttpOperation2.Entity.UpdateMany = function(arg0, arg1) {
|
|
|
13021
13030
|
...args.requestBody,
|
|
13022
13031
|
required: true
|
|
13023
13032
|
}
|
|
13024
|
-
})
|
|
13033
|
+
});
|
|
13025
13034
|
decorator.RequestContent(args.requestBody?.type || args.type).Response(HttpStatusCode.OK, {
|
|
13026
13035
|
description: 'Operation is successful. Returns OperationResult with "affected" field.',
|
|
13027
13036
|
contentType: MimeTypes.opra_response_json
|
|
@@ -13055,7 +13064,7 @@ HttpOperation2.Entity.Update = function(arg0, arg1) {
|
|
|
13055
13064
|
const filterRules = new FilterRules();
|
|
13056
13065
|
const filterType = new FilterType({ dataType: args.type });
|
|
13057
13066
|
filterType.rules = {};
|
|
13058
|
-
const decorator = HttpOperationDecoratorFactory(decoratorChain,
|
|
13067
|
+
const decorator = HttpOperationDecoratorFactory(decoratorChain, {
|
|
13059
13068
|
method: "PATCH",
|
|
13060
13069
|
...args,
|
|
13061
13070
|
composition: "Entity.Update",
|
|
@@ -13065,7 +13074,7 @@ HttpOperation2.Entity.Update = function(arg0, arg1) {
|
|
|
13065
13074
|
...args.requestBody,
|
|
13066
13075
|
required: true
|
|
13067
13076
|
}
|
|
13068
|
-
})
|
|
13077
|
+
});
|
|
13069
13078
|
decorator.QueryParam("projection", {
|
|
13070
13079
|
description: "Determines fields projection",
|
|
13071
13080
|
type: new FieldPathType({
|