@opra/common 1.0.0-alpha.1 → 1.0.0-alpha.10
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 +5510 -5224
- package/cjs/document/api-document.js +18 -12
- package/cjs/document/common/data-type-map.js +1 -1
- package/cjs/document/common/document-element.js +2 -1
- package/cjs/document/constants.js +1 -1
- package/cjs/document/data-type/api-field.js +7 -2
- package/cjs/document/data-type/complex-type-base.js +6 -1
- package/cjs/document/data-type/complex-type.js +8 -5
- package/cjs/document/data-type/data-type.js +2 -1
- package/cjs/document/data-type/enum-type.js +5 -2
- package/cjs/document/data-type/extended-types/base64.type.js +6 -1
- package/cjs/document/data-type/extended-types/date-string.type.js +10 -3
- package/cjs/document/data-type/extended-types/date-time-string.type.js +10 -3
- package/cjs/document/data-type/extended-types/date-time.type.js +10 -3
- package/cjs/document/data-type/extended-types/date.type.js +10 -3
- package/cjs/document/data-type/extended-types/email.type.js +24 -10
- package/cjs/document/data-type/extended-types/field-path.type.js +13 -7
- package/cjs/document/data-type/extended-types/filter.type.js +25 -20
- package/cjs/document/data-type/extended-types/object-id.type.js +6 -1
- package/cjs/document/data-type/extended-types/operation-result.type.js +20 -10
- package/cjs/document/data-type/extended-types/time.type.js +10 -3
- package/cjs/document/data-type/extended-types/url.type.js +6 -1
- package/cjs/document/data-type/extended-types/uuid.type.js +8 -2
- package/cjs/document/data-type/mapped-type.js +12 -5
- package/cjs/document/data-type/mixin-type.js +5 -1
- package/cjs/document/data-type/primitive-types/any.type.js +2 -1
- package/cjs/document/data-type/primitive-types/bigint.type.js +6 -1
- package/cjs/document/data-type/primitive-types/boolean.type.js +6 -1
- package/cjs/document/data-type/primitive-types/integer.type.js +6 -1
- package/cjs/document/data-type/primitive-types/null.type.js +6 -1
- package/cjs/document/data-type/primitive-types/number.type.js +10 -3
- package/cjs/document/data-type/primitive-types/object.type.js +2 -1
- package/cjs/document/data-type/primitive-types/string.type.js +14 -5
- package/cjs/document/data-type/simple-type.js +16 -10
- package/cjs/document/data-type/utils/create-mapped-class.js +2 -1
- package/cjs/document/decorators/http-controller.decorator.js +25 -0
- package/cjs/document/decorators/http-operation-entity.decorator.js +55 -19
- package/cjs/document/decorators/http-operation.decorator.js +8 -4
- package/cjs/document/factory/api-document.factory.js +6 -3
- package/cjs/document/factory/data-type.factory.js +98 -57
- package/cjs/document/factory/http-api.factory.js +4 -2
- package/cjs/document/http/http-api.js +2 -2
- package/cjs/document/http/http-controller.js +25 -13
- package/cjs/document/http/http-media-type.js +4 -2
- package/cjs/document/http/http-operation-response.js +2 -1
- package/cjs/document/http/http-operation.js +17 -4
- package/cjs/document/http/http-parameter.js +2 -0
- package/cjs/document/http/http-status-range.js +1 -2
- package/cjs/document/index.js +5 -5
- package/cjs/exception/index.js +5 -5
- package/cjs/filter/antlr/OpraFilterParser.js +28 -82
- package/cjs/filter/ast/index.js +1 -1
- package/cjs/filter/build.js +1 -3
- package/cjs/filter/filter-rules.js +4 -2
- package/cjs/filter/opra-filter.ns.js +2 -2
- package/cjs/filter/parse.js +1 -3
- package/cjs/helpers/mixin-utils.js +2 -1
- package/cjs/helpers/monkey-patches.js +4 -2
- package/cjs/helpers/parse-fields-projection.js +1 -3
- package/cjs/helpers/responsive-map.js +5 -4
- package/cjs/i18n/i18n.js +4 -3
- package/cjs/i18n/index.js +1 -1
- package/cjs/index.js +1 -1
- package/esm/document/api-document.js +18 -12
- package/esm/document/common/data-type-map.js +1 -1
- package/esm/document/common/document-element.js +2 -1
- package/esm/document/constants.js +1 -1
- package/esm/document/data-type/api-field.js +7 -2
- package/esm/document/data-type/complex-type-base.js +6 -1
- package/esm/document/data-type/complex-type.js +8 -5
- package/esm/document/data-type/data-type.js +2 -1
- package/esm/document/data-type/enum-type.js +5 -2
- package/esm/document/data-type/extended-types/base64.type.js +7 -2
- package/esm/document/data-type/extended-types/date-string.type.js +11 -4
- package/esm/document/data-type/extended-types/date-time-string.type.js +11 -4
- package/esm/document/data-type/extended-types/date-time.type.js +11 -4
- package/esm/document/data-type/extended-types/date.type.js +11 -4
- package/esm/document/data-type/extended-types/email.type.js +25 -11
- package/esm/document/data-type/extended-types/field-path.type.js +14 -8
- package/esm/document/data-type/extended-types/filter.type.js +26 -21
- package/esm/document/data-type/extended-types/object-id.type.js +7 -2
- package/esm/document/data-type/extended-types/operation-result.type.js +21 -11
- package/esm/document/data-type/extended-types/time.type.js +11 -4
- package/esm/document/data-type/extended-types/url.type.js +7 -2
- package/esm/document/data-type/extended-types/uuid.type.js +9 -3
- package/esm/document/data-type/mapped-type.js +12 -5
- package/esm/document/data-type/mixin-type.js +5 -1
- package/esm/document/data-type/primitive-types/any.type.js +3 -2
- package/esm/document/data-type/primitive-types/bigint.type.js +7 -2
- package/esm/document/data-type/primitive-types/boolean.type.js +7 -2
- package/esm/document/data-type/primitive-types/integer.type.js +7 -2
- package/esm/document/data-type/primitive-types/null.type.js +7 -2
- package/esm/document/data-type/primitive-types/number.type.js +11 -4
- package/esm/document/data-type/primitive-types/object.type.js +3 -2
- package/esm/document/data-type/primitive-types/string.type.js +15 -6
- package/esm/document/data-type/simple-type.js +16 -10
- package/esm/document/data-type/utils/create-mapped-class.js +2 -1
- package/esm/document/decorators/http-controller.decorator.js +25 -0
- package/esm/document/decorators/http-operation-entity.decorator.js +55 -19
- package/esm/document/decorators/http-operation.decorator.js +8 -4
- package/esm/document/factory/api-document.factory.js +5 -3
- package/esm/document/factory/data-type.factory.js +98 -57
- package/esm/document/factory/http-api.factory.js +4 -2
- package/esm/document/http/http-api.js +2 -2
- package/esm/document/http/http-controller.js +24 -13
- package/esm/document/http/http-media-type.js +4 -2
- package/esm/document/http/http-operation-response.js +2 -1
- package/esm/document/http/http-operation.js +16 -4
- package/esm/document/http/http-parameter.js +2 -0
- package/esm/document/http/http-status-range.js +1 -2
- package/esm/document/index.js +5 -5
- package/esm/exception/index.js +5 -5
- package/esm/filter/antlr/OpraFilterParser.js +28 -82
- package/esm/filter/ast/index.js +1 -1
- package/esm/filter/build.js +1 -3
- package/esm/filter/filter-rules.js +4 -2
- package/esm/filter/opra-filter.ns.js +2 -2
- package/esm/filter/parse.js +1 -3
- package/esm/helpers/mixin-utils.js +2 -1
- package/esm/helpers/monkey-patches.js +4 -2
- package/esm/helpers/parse-fields-projection.js +1 -3
- package/esm/helpers/responsive-map.js +5 -4
- package/esm/i18n/i18n.js +4 -3
- package/esm/i18n/index.js +1 -1
- package/esm/index.js +1 -1
- package/package.json +8 -7
- package/types/document/api-document.d.ts +3 -6
- package/types/document/data-type/api-field.d.ts +2 -0
- package/types/document/data-type/complex-type.d.ts +1 -1
- package/types/document/data-type/data-type.d.ts +4 -2
- package/types/document/data-type/enum-type.d.ts +2 -2
- package/types/document/data-type/mapped-type.d.ts +2 -2
- package/types/document/data-type/mixin-type.d.ts +2 -2
- package/types/document/data-type/simple-type.d.ts +4 -2
- package/types/document/decorators/http-controller.decorator.d.ts +1 -0
- package/types/document/factory/api-document.factory.d.ts +1 -1
- package/types/document/factory/data-type.factory.d.ts +5 -0
- package/types/document/http/http-controller.d.ts +1 -0
- package/types/document/http/http-operation.d.ts +1 -0
- package/types/document/http/http-parameter.d.ts +3 -2
- package/types/document/index.d.ts +5 -5
- package/types/exception/index.d.ts +5 -5
- package/types/filter/ast/index.d.ts +1 -1
- package/types/filter/opra-filter.ns.d.ts +2 -2
- package/types/i18n/i18n.d.ts +21 -19
- package/types/index.d.ts +1 -1
- package/types/schema/data-type/simple-type.interface.d.ts +4 -0
- package/types/schema/document.interface.d.ts +13 -1
- package/types/schema/http/http-parameter.interface.d.ts +4 -0
- package/types/schema/index.d.ts +1 -0
- package/cjs/document/data-type/decorators/api-field-decorator.js +0 -26
- package/cjs/document/data-type/decorators/complex-type.decorator.js +0 -33
- package/cjs/document/data-type/decorators/simple-type.decorator.js +0 -67
- package/cjs/document/http/decorators/http-controller.decorator.js +0 -117
- package/cjs/document/http/decorators/http-operation-entity.decorator.js +0 -461
- package/cjs/document/http/decorators/http-operation.decorator.js +0 -183
- package/cjs/helpers/is-url-string.js +0 -12
- package/cjs/http/opra-url-path.js +0 -266
- package/cjs/http/opra-url.js +0 -253
- package/esm/document/data-type/decorators/api-field-decorator.js +0 -22
- package/esm/document/data-type/decorators/complex-type.decorator.js +0 -28
- package/esm/document/data-type/decorators/simple-type.decorator.js +0 -61
- package/esm/document/http/decorators/http-controller.decorator.js +0 -112
- package/esm/document/http/decorators/http-operation-entity.decorator.js +0 -459
- package/esm/document/http/decorators/http-operation.decorator.js +0 -178
- package/esm/helpers/is-url-string.js +0 -7
- package/esm/http/opra-url-path.js +0 -260
- package/esm/http/opra-url.js +0 -249
- package/types/document/data-type/decorators/api-field-decorator.d.ts +0 -5
- package/types/document/data-type/decorators/complex-type.decorator.d.ts +0 -2
- package/types/document/data-type/decorators/simple-type.decorator.d.ts +0 -20
- package/types/document/http/decorators/http-controller.decorator.d.ts +0 -14
- package/types/document/http/decorators/http-operation-entity.decorator.d.ts +0 -100
- package/types/document/http/decorators/http-operation.decorator.d.ts +0 -30
- package/types/helpers/is-url-string.d.ts +0 -2
- package/types/http/opra-url-path.d.ts +0 -55
- package/types/http/opra-url.d.ts +0 -66
|
@@ -30,18 +30,29 @@ class ApiDocument extends document_element_js_1.DocumentElement {
|
|
|
30
30
|
if (dt)
|
|
31
31
|
return this[constants_js_1.kTypeNSMap].get(dt);
|
|
32
32
|
}
|
|
33
|
+
findDocument(id) {
|
|
34
|
+
if (this.id === id)
|
|
35
|
+
return this;
|
|
36
|
+
for (const doc of this.references.values()) {
|
|
37
|
+
if (doc.id === id)
|
|
38
|
+
return doc;
|
|
39
|
+
const d = doc.findDocument(id);
|
|
40
|
+
if (d)
|
|
41
|
+
return d;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
33
44
|
toJSON() {
|
|
34
45
|
return this.export();
|
|
35
46
|
}
|
|
36
47
|
/**
|
|
37
48
|
* Export as Opra schema definition object
|
|
38
49
|
*/
|
|
39
|
-
export(
|
|
50
|
+
export() {
|
|
40
51
|
const out = (0, index_js_1.omitUndefined)({
|
|
41
52
|
spec: index_js_2.OpraSchema.SpecVersion,
|
|
53
|
+
id: this.id,
|
|
42
54
|
url: this.url,
|
|
43
55
|
info: (0, index_js_1.cloneObject)(this.info, true),
|
|
44
|
-
// api: this.api ? this.api.toJSON() : undefined,
|
|
45
56
|
});
|
|
46
57
|
if (this.references.size) {
|
|
47
58
|
let i = 0;
|
|
@@ -49,16 +60,11 @@ class ApiDocument extends document_element_js_1.DocumentElement {
|
|
|
49
60
|
for (const [ns, doc] of this.references.entries()) {
|
|
50
61
|
if (doc[constants_js_1.BUILTIN])
|
|
51
62
|
continue;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
else if (options?.references === 'relative-url')
|
|
59
|
-
references[ns] = `/$schema?ns=${ns}`;
|
|
60
|
-
else
|
|
61
|
-
references[ns] = doc.export(options);
|
|
63
|
+
references[ns] = {
|
|
64
|
+
id: doc.id,
|
|
65
|
+
url: doc.url,
|
|
66
|
+
info: (0, index_js_1.cloneObject)(doc.info, true),
|
|
67
|
+
};
|
|
62
68
|
i++;
|
|
63
69
|
}
|
|
64
70
|
if (i)
|
|
@@ -23,7 +23,7 @@ class DataTypeMap {
|
|
|
23
23
|
}
|
|
24
24
|
get(nameOrCtor) {
|
|
25
25
|
let name = typeof nameOrCtor === 'string' ? nameOrCtor : this[kCtorMap].get(nameOrCtor);
|
|
26
|
-
if (!name) {
|
|
26
|
+
if (!name && typeof nameOrCtor === 'function') {
|
|
27
27
|
const metadata = Reflect.getMetadata(constants_js_1.DATATYPE_METADATA, nameOrCtor);
|
|
28
28
|
name = metadata?.name;
|
|
29
29
|
}
|
|
@@ -16,12 +16,13 @@ exports.DocumentElement = function (owner) {
|
|
|
16
16
|
enumerable: false,
|
|
17
17
|
writable: true,
|
|
18
18
|
});
|
|
19
|
-
if (owner)
|
|
19
|
+
if (owner) {
|
|
20
20
|
Object.defineProperty(_this, 'owner', {
|
|
21
21
|
value: owner,
|
|
22
22
|
enumerable: false,
|
|
23
23
|
writable: true,
|
|
24
24
|
});
|
|
25
|
+
}
|
|
25
26
|
};
|
|
26
27
|
/**
|
|
27
28
|
* @class DocumentElement
|
|
@@ -7,7 +7,7 @@ exports.DECODER = Symbol.for('opra.type.decoder');
|
|
|
7
7
|
exports.ENCODER = Symbol('opra.type.encoder');
|
|
8
8
|
exports.DECORATOR = Symbol.for('DECORATOR');
|
|
9
9
|
exports.BUILTIN = Symbol.for('BUILTIN');
|
|
10
|
-
exports.NAMESPACE_PATTERN = /([a-z$_]\w+)(
|
|
10
|
+
exports.NAMESPACE_PATTERN = /([a-z$_]\w+):(.+)/i;
|
|
11
11
|
exports.CLASS_NAME_PATTERN = /^[a-z][\w_]*$/i;
|
|
12
12
|
exports.EXTRACT_TYPENAME_PATTERN = /^(.*)Type(\d*)$/;
|
|
13
13
|
exports.kDataTypeMap = Symbol.for('kDataTypeMap');
|
|
@@ -24,8 +24,9 @@ exports.ApiField = function (...args) {
|
|
|
24
24
|
_this.name = initArgs.name;
|
|
25
25
|
const origin = initArgs.origin || owner;
|
|
26
26
|
/* istanbul ignore next */
|
|
27
|
-
if (!(origin instanceof complex_type_base_js_1.ComplexTypeBase))
|
|
27
|
+
if (!(origin instanceof complex_type_base_js_1.ComplexTypeBase)) {
|
|
28
28
|
throw new Error('Field origin should be one of ComplexType, MappedType or MixinType');
|
|
29
|
+
}
|
|
29
30
|
_this.origin = origin;
|
|
30
31
|
_this.type = initArgs.type || owner.node.getDataType('any');
|
|
31
32
|
_this.description = initArgs.description;
|
|
@@ -36,6 +37,8 @@ exports.ApiField = function (...args) {
|
|
|
36
37
|
_this.exclusive = initArgs.exclusive;
|
|
37
38
|
_this.translatable = initArgs.translatable;
|
|
38
39
|
_this.deprecated = initArgs.deprecated;
|
|
40
|
+
_this.readonly = initArgs.readonly;
|
|
41
|
+
_this.writeonly = initArgs.writeonly;
|
|
39
42
|
_this.examples = initArgs.examples;
|
|
40
43
|
};
|
|
41
44
|
/**
|
|
@@ -46,7 +49,7 @@ class ApiFieldClass extends document_element_js_1.DocumentElement {
|
|
|
46
49
|
toJSON() {
|
|
47
50
|
const typeName = this.type ? this.node.getDataTypeNameWithNs(this.type) : undefined;
|
|
48
51
|
return (0, index_js_1.omitUndefined)({
|
|
49
|
-
type:
|
|
52
|
+
type: typeName ? typeName : this.type?.toJSON(),
|
|
50
53
|
description: this.description,
|
|
51
54
|
isArray: this.isArray,
|
|
52
55
|
default: this.default,
|
|
@@ -55,6 +58,8 @@ class ApiFieldClass extends document_element_js_1.DocumentElement {
|
|
|
55
58
|
exclusive: this.exclusive,
|
|
56
59
|
translatable: this.translatable,
|
|
57
60
|
deprecated: this.deprecated,
|
|
61
|
+
readonly: this.readonly,
|
|
62
|
+
writeonly: this.writeonly,
|
|
58
63
|
examples: this.examples,
|
|
59
64
|
});
|
|
60
65
|
}
|
|
@@ -118,8 +118,9 @@ class ComplexTypeBaseClass extends data_type_js_1.DataType {
|
|
|
118
118
|
: options?.projection;
|
|
119
119
|
const schema = this._generateSchema(codec, { ...options, projection, currentPath: '' });
|
|
120
120
|
let additionalFields;
|
|
121
|
-
if (this.additionalFields instanceof data_type_js_1.DataType)
|
|
121
|
+
if (this.additionalFields instanceof data_type_js_1.DataType) {
|
|
122
122
|
additionalFields = this.additionalFields.generateCodec(codec, options);
|
|
123
|
+
}
|
|
123
124
|
else if (typeof this.additionalFields === 'boolean')
|
|
124
125
|
additionalFields = this.additionalFields;
|
|
125
126
|
else if (Array.isArray(this.additionalFields)) {
|
|
@@ -146,6 +147,10 @@ class ComplexTypeBaseClass extends data_type_js_1.DataType {
|
|
|
146
147
|
// Process fields
|
|
147
148
|
let fieldName;
|
|
148
149
|
for (const field of this.fields.values()) {
|
|
150
|
+
if ((context.ignoreReadonlyFields && field.readonly) || (context.ignoreWriteonlyFields && field.writeonly)) {
|
|
151
|
+
schema[field.name] = valgen_1.vg.isUndefined({ coerce: true });
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
149
154
|
fieldName = field.name;
|
|
150
155
|
let p;
|
|
151
156
|
if (projection !== '*') {
|
|
@@ -29,11 +29,13 @@ exports.ComplexType = function (...args) {
|
|
|
29
29
|
if (initArgs.base) {
|
|
30
30
|
context.enter('.base', () => {
|
|
31
31
|
// noinspection SuspiciousTypeOfGuard
|
|
32
|
-
if (!(initArgs.base instanceof complex_type_base_js_1.ComplexTypeBase))
|
|
32
|
+
if (!(initArgs.base instanceof complex_type_base_js_1.ComplexTypeBase)) {
|
|
33
33
|
throw new TypeError(`"${initArgs.base.kind}" can't be set as base for a "${this.kind}"`);
|
|
34
|
+
}
|
|
34
35
|
_this.base = initArgs.base;
|
|
35
|
-
if (_this.additionalFields == null && _this.base.additionalFields)
|
|
36
|
+
if (_this.additionalFields == null && _this.base.additionalFields) {
|
|
36
37
|
_this.additionalFields = _this.base.additionalFields;
|
|
38
|
+
}
|
|
37
39
|
/** Copy fields from base */
|
|
38
40
|
for (const v of _this.base.fields.values()) {
|
|
39
41
|
this.fields.set(v.name, new api_field_js_1.ApiField(this, v));
|
|
@@ -60,6 +62,8 @@ exports.ComplexType = function (...args) {
|
|
|
60
62
|
*/
|
|
61
63
|
class ComplexTypeClass extends complex_type_base_js_1.ComplexTypeBase {
|
|
62
64
|
extendsFrom(baseType) {
|
|
65
|
+
if (!(baseType instanceof data_type_js_1.DataType))
|
|
66
|
+
baseType = this.node.getDataType(baseType);
|
|
63
67
|
if (!(baseType instanceof complex_type_base_js_1.ComplexTypeBase))
|
|
64
68
|
return false;
|
|
65
69
|
if (baseType === this)
|
|
@@ -75,9 +79,8 @@ class ComplexTypeClass extends complex_type_base_js_1.ComplexTypeBase {
|
|
|
75
79
|
});
|
|
76
80
|
if (this.additionalFields) {
|
|
77
81
|
if (this.additionalFields instanceof data_type_js_1.DataType) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
: this.additionalFields[1].toJSON();
|
|
82
|
+
const typeName = this.node.getDataTypeNameWithNs(this.additionalFields);
|
|
83
|
+
out.additionalFields = typeName ? typeName : this.additionalFields.toJSON();
|
|
81
84
|
}
|
|
82
85
|
else
|
|
83
86
|
out.additionalFields = this.additionalFields;
|
|
@@ -14,8 +14,9 @@ exports.DataType = function (owner, initArgs,
|
|
|
14
14
|
context) {
|
|
15
15
|
if (!this)
|
|
16
16
|
throw new TypeError('"this" should be passed to call class constructor');
|
|
17
|
-
if (initArgs?.name && !constants_js_1.CLASS_NAME_PATTERN.test(initArgs.name))
|
|
17
|
+
if (initArgs?.name && !constants_js_1.CLASS_NAME_PATTERN.test(initArgs.name)) {
|
|
18
18
|
throw new TypeError(`"${initArgs.name}" is not a valid DataType name`);
|
|
19
|
+
}
|
|
19
20
|
document_element_js_1.DocumentElement.call(this, owner);
|
|
20
21
|
const _this = (0, ts_gems_1.asMutable)(this);
|
|
21
22
|
_this.kind = initArgs.kind;
|
|
@@ -22,8 +22,9 @@ exports.EnumType = function (...args) {
|
|
|
22
22
|
_this.kind = index_js_2.OpraSchema.EnumType.Kind;
|
|
23
23
|
if (initArgs.base) {
|
|
24
24
|
// noinspection SuspiciousTypeOfGuard
|
|
25
|
-
if (!(initArgs.base instanceof exports.EnumType))
|
|
26
|
-
throw new TypeError(`"${initArgs.base.kind}" can't be set as base for a "${
|
|
25
|
+
if (!(initArgs.base instanceof exports.EnumType)) {
|
|
26
|
+
throw new TypeError(`"${initArgs.base.kind}" can't be set as base for a "${_this.kind}"`);
|
|
27
|
+
}
|
|
27
28
|
_this.base = initArgs.base;
|
|
28
29
|
}
|
|
29
30
|
_this.instance = initArgs.instance;
|
|
@@ -38,6 +39,8 @@ exports.EnumType = function (...args) {
|
|
|
38
39
|
*/
|
|
39
40
|
class EnumTypeClass extends data_type_js_1.DataType {
|
|
40
41
|
extendsFrom(baseType) {
|
|
42
|
+
if (!(baseType instanceof data_type_js_1.DataType))
|
|
43
|
+
baseType = this.node.getDataType(baseType);
|
|
41
44
|
if (!(baseType instanceof exports.EnumType))
|
|
42
45
|
return false;
|
|
43
46
|
if (baseType === this)
|
|
@@ -21,5 +21,10 @@ exports.Base64Type = Base64Type;
|
|
|
21
21
|
exports.Base64Type = Base64Type = tslib_1.__decorate([
|
|
22
22
|
(0, simple_type_js_1.SimpleType)({
|
|
23
23
|
description: 'A stream of bytes, base64 encoded',
|
|
24
|
-
|
|
24
|
+
nameMappings: {
|
|
25
|
+
js: 'string',
|
|
26
|
+
json: 'string',
|
|
27
|
+
},
|
|
28
|
+
}),
|
|
29
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
25
30
|
], Base64Type);
|
|
@@ -27,18 +27,25 @@ exports.DateStringType = DateStringType;
|
|
|
27
27
|
tslib_1.__decorate([
|
|
28
28
|
simple_type_js_1.SimpleType.Attribute({
|
|
29
29
|
description: 'Minimum value',
|
|
30
|
-
})
|
|
30
|
+
}),
|
|
31
|
+
tslib_1.__metadata("design:type", String)
|
|
31
32
|
], DateStringType.prototype, "minValue", void 0);
|
|
32
33
|
tslib_1.__decorate([
|
|
33
34
|
simple_type_js_1.SimpleType.Attribute({
|
|
34
35
|
description: 'Maximum value',
|
|
35
|
-
})
|
|
36
|
+
}),
|
|
37
|
+
tslib_1.__metadata("design:type", String)
|
|
36
38
|
], DateStringType.prototype, "maxValue", void 0);
|
|
37
39
|
exports.DateStringType = DateStringType = tslib_1.__decorate([
|
|
38
40
|
(0, simple_type_js_1.SimpleType)({
|
|
39
41
|
description: 'Date string value',
|
|
42
|
+
nameMappings: {
|
|
43
|
+
js: 'string',
|
|
44
|
+
json: 'string',
|
|
45
|
+
},
|
|
40
46
|
})
|
|
41
47
|
.Example('2021-04-18', 'Full date value')
|
|
42
48
|
.Example('2021-04', 'Date value without day')
|
|
43
|
-
.Example('2021', 'Year only value')
|
|
49
|
+
.Example('2021', 'Year only value'),
|
|
50
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
44
51
|
], DateStringType);
|
|
@@ -27,21 +27,28 @@ exports.DateTimeStringType = DateTimeStringType;
|
|
|
27
27
|
tslib_1.__decorate([
|
|
28
28
|
simple_type_js_1.SimpleType.Attribute({
|
|
29
29
|
description: 'Minimum value',
|
|
30
|
-
})
|
|
30
|
+
}),
|
|
31
|
+
tslib_1.__metadata("design:type", String)
|
|
31
32
|
], DateTimeStringType.prototype, "minValue", void 0);
|
|
32
33
|
tslib_1.__decorate([
|
|
33
34
|
simple_type_js_1.SimpleType.Attribute({
|
|
34
35
|
description: 'Maximum value',
|
|
35
|
-
})
|
|
36
|
+
}),
|
|
37
|
+
tslib_1.__metadata("design:type", String)
|
|
36
38
|
], DateTimeStringType.prototype, "maxValue", void 0);
|
|
37
39
|
exports.DateTimeStringType = DateTimeStringType = tslib_1.__decorate([
|
|
38
40
|
(0, simple_type_js_1.SimpleType)({
|
|
39
41
|
description: 'DateTime string value',
|
|
42
|
+
nameMappings: {
|
|
43
|
+
js: 'string',
|
|
44
|
+
json: 'string',
|
|
45
|
+
},
|
|
40
46
|
})
|
|
41
47
|
.Example('2021-04-18T22:30:15+01:00', 'Full date-time value with timezone')
|
|
42
48
|
.Example('2021-04-18T22:30:15', 'Full date-time value without timezone')
|
|
43
49
|
.Example('2021-04-18 22:30', 'Date-time value')
|
|
44
50
|
.Example('2021-04-18', 'Date value')
|
|
45
51
|
.Example('2021-04', 'Date value without day')
|
|
46
|
-
.Example('2021', 'Year only value')
|
|
52
|
+
.Example('2021', 'Year only value'),
|
|
53
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
47
54
|
], DateTimeStringType);
|
|
@@ -41,18 +41,25 @@ exports.DateTimeType = DateTimeType;
|
|
|
41
41
|
tslib_1.__decorate([
|
|
42
42
|
simple_type_js_1.SimpleType.Attribute({
|
|
43
43
|
description: 'Minimum value',
|
|
44
|
-
})
|
|
44
|
+
}),
|
|
45
|
+
tslib_1.__metadata("design:type", String)
|
|
45
46
|
], DateTimeType.prototype, "minValue", void 0);
|
|
46
47
|
tslib_1.__decorate([
|
|
47
48
|
simple_type_js_1.SimpleType.Attribute({
|
|
48
49
|
description: 'Maximum value',
|
|
49
|
-
})
|
|
50
|
+
}),
|
|
51
|
+
tslib_1.__metadata("design:type", String)
|
|
50
52
|
], DateTimeType.prototype, "maxValue", void 0);
|
|
51
53
|
exports.DateTimeType = DateTimeType = tslib_1.__decorate([
|
|
52
54
|
(0, simple_type_js_1.SimpleType)({
|
|
53
55
|
description: 'A full datetime value',
|
|
56
|
+
nameMappings: {
|
|
57
|
+
js: 'string',
|
|
58
|
+
json: 'string',
|
|
59
|
+
},
|
|
54
60
|
})
|
|
55
61
|
.Example('2021-04-18T22:30:15')
|
|
56
62
|
.Example('2021-04-18 22:30:15')
|
|
57
|
-
.Example('2021-04-18 22:30')
|
|
63
|
+
.Example('2021-04-18 22:30'),
|
|
64
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
58
65
|
], DateTimeType);
|
|
@@ -41,15 +41,22 @@ exports.DateType = DateType;
|
|
|
41
41
|
tslib_1.__decorate([
|
|
42
42
|
simple_type_js_1.SimpleType.Attribute({
|
|
43
43
|
description: 'Minimum value',
|
|
44
|
-
})
|
|
44
|
+
}),
|
|
45
|
+
tslib_1.__metadata("design:type", String)
|
|
45
46
|
], DateType.prototype, "minValue", void 0);
|
|
46
47
|
tslib_1.__decorate([
|
|
47
48
|
simple_type_js_1.SimpleType.Attribute({
|
|
48
49
|
description: 'Maximum value',
|
|
49
|
-
})
|
|
50
|
+
}),
|
|
51
|
+
tslib_1.__metadata("design:type", String)
|
|
50
52
|
], DateType.prototype, "maxValue", void 0);
|
|
51
53
|
exports.DateType = DateType = tslib_1.__decorate([
|
|
52
54
|
(0, simple_type_js_1.SimpleType)({
|
|
53
55
|
description: 'A date without time',
|
|
54
|
-
|
|
56
|
+
nameMappings: {
|
|
57
|
+
js: 'Date',
|
|
58
|
+
json: 'string',
|
|
59
|
+
},
|
|
60
|
+
}).Example('2021-04-18', 'Full date value'),
|
|
61
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
55
62
|
], DateType);
|
|
@@ -22,59 +22,73 @@ tslib_1.__decorate([
|
|
|
22
22
|
simple_type_js_1.SimpleType.Attribute({
|
|
23
23
|
description: 'If set to `true`, the validator will also match `Display Name <email-address>',
|
|
24
24
|
default: false,
|
|
25
|
-
})
|
|
25
|
+
}),
|
|
26
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
26
27
|
], EmailType.prototype, "allowDisplayName", void 0);
|
|
27
28
|
tslib_1.__decorate([
|
|
28
29
|
simple_type_js_1.SimpleType.Attribute({
|
|
29
30
|
description: 'If set to `true`, the validator will reject strings without the format `Display Name <email-address>',
|
|
30
31
|
default: false,
|
|
31
|
-
})
|
|
32
|
+
}),
|
|
33
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
32
34
|
], EmailType.prototype, "requireDisplayName", void 0);
|
|
33
35
|
tslib_1.__decorate([
|
|
34
36
|
simple_type_js_1.SimpleType.Attribute({
|
|
35
37
|
description: "If set to `false`, the validator will not allow any non-English UTF8 character in email address's local part",
|
|
36
38
|
default: true,
|
|
37
|
-
})
|
|
39
|
+
}),
|
|
40
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
38
41
|
], EmailType.prototype, "utf8LocalPart", void 0);
|
|
39
42
|
tslib_1.__decorate([
|
|
40
43
|
simple_type_js_1.SimpleType.Attribute({
|
|
41
44
|
description: 'If set to `true`, the validator will not check for the standard max length of an email',
|
|
42
45
|
default: false,
|
|
43
|
-
})
|
|
46
|
+
}),
|
|
47
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
44
48
|
], EmailType.prototype, "ignoreMaxLength", void 0);
|
|
45
49
|
tslib_1.__decorate([
|
|
46
50
|
simple_type_js_1.SimpleType.Attribute({
|
|
47
51
|
description: 'If set to `true`, the validator will allow IP addresses in the host part',
|
|
48
52
|
default: false,
|
|
49
|
-
})
|
|
53
|
+
}),
|
|
54
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
50
55
|
], EmailType.prototype, "allowIpDomain", void 0);
|
|
51
56
|
tslib_1.__decorate([
|
|
52
57
|
simple_type_js_1.SimpleType.Attribute({
|
|
53
58
|
description: 'If set to `true`, some additional validation will be enabled, ' +
|
|
54
59
|
'e.g. disallowing certain syntactically valid email addresses that are rejected by GMail.',
|
|
55
60
|
default: false,
|
|
56
|
-
})
|
|
61
|
+
}),
|
|
62
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
57
63
|
], EmailType.prototype, "domainSpecificValidation", void 0);
|
|
58
64
|
tslib_1.__decorate([
|
|
59
65
|
simple_type_js_1.SimpleType.Attribute({
|
|
60
66
|
description: 'If set to an array of strings and the part of the email after the @ symbol ' +
|
|
61
67
|
' one of the strings defined in it, the validation fails.',
|
|
62
|
-
})
|
|
68
|
+
}),
|
|
69
|
+
tslib_1.__metadata("design:type", Array)
|
|
63
70
|
], EmailType.prototype, "hostBlacklist", void 0);
|
|
64
71
|
tslib_1.__decorate([
|
|
65
72
|
simple_type_js_1.SimpleType.Attribute({
|
|
66
73
|
description: 'If set to an array of strings and the part of the email after the @ symbol ' +
|
|
67
74
|
' matches none of the strings defined in it, the validation fails.',
|
|
68
|
-
})
|
|
75
|
+
}),
|
|
76
|
+
tslib_1.__metadata("design:type", Array)
|
|
69
77
|
], EmailType.prototype, "hostWhitelist", void 0);
|
|
70
78
|
tslib_1.__decorate([
|
|
71
79
|
simple_type_js_1.SimpleType.Attribute({
|
|
72
80
|
description: 'If set to a string, then the validator will reject emails that include ' +
|
|
73
81
|
' any of the characters in the string, in the name part.',
|
|
74
|
-
})
|
|
82
|
+
}),
|
|
83
|
+
tslib_1.__metadata("design:type", String)
|
|
75
84
|
], EmailType.prototype, "blacklistedChars", void 0);
|
|
76
85
|
exports.EmailType = EmailType = tslib_1.__decorate([
|
|
77
86
|
(0, simple_type_js_1.SimpleType)({
|
|
78
87
|
description: 'An email value',
|
|
79
|
-
|
|
88
|
+
nameMappings: {
|
|
89
|
+
js: 'string',
|
|
90
|
+
json: 'string',
|
|
91
|
+
},
|
|
92
|
+
}).Example('some.body@example.com'),
|
|
93
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
80
94
|
], EmailType);
|
|
@@ -15,9 +15,7 @@ let FieldPathType = class FieldPathType {
|
|
|
15
15
|
? element.node.getComplexType(properties.dataType)
|
|
16
16
|
: element.node.getComplexType('object');
|
|
17
17
|
const allowSigns = properties.allowSigns;
|
|
18
|
-
const decodeFieldPath = (0, valgen_1.validator)('decodeFieldPath',
|
|
19
|
-
return dataType.normalizeFieldPath(input, { allowSigns });
|
|
20
|
-
});
|
|
18
|
+
const decodeFieldPath = (0, valgen_1.validator)('decodeFieldPath', (input) => dataType.normalizeFieldPath(input, { allowSigns }));
|
|
21
19
|
return valgen_1.vg.pipe([valgen_1.toString, decodeFieldPath]);
|
|
22
20
|
}
|
|
23
21
|
[constants_js_1.ENCODER](properties, element) {
|
|
@@ -27,8 +25,9 @@ let FieldPathType = class FieldPathType {
|
|
|
27
25
|
const dataType = properties.dataType
|
|
28
26
|
? element.node.getComplexType(properties.dataType)
|
|
29
27
|
: element.node.getComplexType('object');
|
|
28
|
+
const typeName = dataType ? element.node.getDataTypeNameWithNs(dataType) : undefined;
|
|
30
29
|
return {
|
|
31
|
-
dataType:
|
|
30
|
+
dataType: typeName ? typeName : dataType.toJSON(),
|
|
32
31
|
allowSigns: properties.allowSigns,
|
|
33
32
|
};
|
|
34
33
|
}
|
|
@@ -37,17 +36,24 @@ exports.FieldPathType = FieldPathType;
|
|
|
37
36
|
tslib_1.__decorate([
|
|
38
37
|
simple_type_js_1.SimpleType.Attribute({
|
|
39
38
|
description: 'Data type which field belong to',
|
|
40
|
-
})
|
|
39
|
+
}),
|
|
40
|
+
tslib_1.__metadata("design:type", Object)
|
|
41
41
|
], FieldPathType.prototype, "dataType", void 0);
|
|
42
42
|
tslib_1.__decorate([
|
|
43
43
|
simple_type_js_1.SimpleType.Attribute({
|
|
44
44
|
description: 'Determines if signs (+,-) are allowed. ' +
|
|
45
45
|
'If set "first" signs are allowed only beginning of the field path' +
|
|
46
46
|
'If set "each" signs are allowed at each field in the path',
|
|
47
|
-
})
|
|
47
|
+
}),
|
|
48
|
+
tslib_1.__metadata("design:type", String)
|
|
48
49
|
], FieldPathType.prototype, "allowSigns", void 0);
|
|
49
50
|
exports.FieldPathType = FieldPathType = tslib_1.__decorate([
|
|
50
51
|
(0, simple_type_js_1.SimpleType)({
|
|
51
52
|
description: 'Field path',
|
|
52
|
-
|
|
53
|
+
nameMappings: {
|
|
54
|
+
js: 'string',
|
|
55
|
+
json: 'string',
|
|
56
|
+
},
|
|
57
|
+
}),
|
|
58
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
53
59
|
], FieldPathType);
|
|
@@ -36,37 +36,42 @@ exports.FilterType = FilterType;
|
|
|
36
36
|
tslib_1.__decorate([
|
|
37
37
|
simple_type_js_1.SimpleType.Attribute({
|
|
38
38
|
description: 'Data type which filtering fields belong to',
|
|
39
|
-
})
|
|
39
|
+
}),
|
|
40
|
+
tslib_1.__metadata("design:type", Object)
|
|
40
41
|
], FilterType.prototype, "dataType", void 0);
|
|
41
42
|
tslib_1.__decorate([
|
|
42
43
|
simple_type_js_1.SimpleType.Attribute({
|
|
43
44
|
description: 'Stringified JSON object defines filtering rules',
|
|
44
45
|
format: 'string',
|
|
45
|
-
})
|
|
46
|
+
}),
|
|
47
|
+
tslib_1.__metadata("design:type", Object)
|
|
46
48
|
], FilterType.prototype, "rules", void 0);
|
|
47
49
|
exports.FilterType = FilterType = tslib_1.__decorate([
|
|
48
50
|
(0, simple_type_js_1.SimpleType)({
|
|
49
51
|
description: 'A query filter',
|
|
50
|
-
|
|
52
|
+
nameMappings: {
|
|
53
|
+
js: 'object',
|
|
54
|
+
json: 'string',
|
|
55
|
+
},
|
|
56
|
+
}),
|
|
57
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
51
58
|
], FilterType);
|
|
52
|
-
const decodeFilter = (dataType, rules) => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return filter;
|
|
60
|
-
}
|
|
61
|
-
catch (e) {
|
|
62
|
-
context.fail(_this, `Not a valid filter expression. ${e.message}`, input, e.errors);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
59
|
+
const decodeFilter = (dataType, rules) => (0, valgen_1.validator)('decodeFilter', (input, context, _this) => {
|
|
60
|
+
if (typeof input === 'string') {
|
|
61
|
+
try {
|
|
62
|
+
const filter = index_js_1.OpraFilter.parse(input);
|
|
63
|
+
if (rules)
|
|
64
|
+
return rules.normalizeFilter(filter, dataType);
|
|
65
|
+
return filter;
|
|
65
66
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
catch (e) {
|
|
68
|
+
context.fail(_this, `Not a valid filter expression. ${e.message}`, input, e.errors);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
context.fail(_this, `Nt a valid filter expression string`, input);
|
|
73
|
+
});
|
|
74
|
+
const encodeFilter = (0, valgen_1.validator)('encodeFilter', (input, context, _this) => {
|
|
70
75
|
if (input instanceof index_js_1.OpraFilter.Ast) {
|
|
71
76
|
return input.toString();
|
|
72
77
|
}
|
|
@@ -21,5 +21,10 @@ exports.ObjectIdType = ObjectIdType;
|
|
|
21
21
|
exports.ObjectIdType = ObjectIdType = tslib_1.__decorate([
|
|
22
22
|
(0, simple_type_js_1.SimpleType)({
|
|
23
23
|
description: 'A MongoDB ObjectID value',
|
|
24
|
-
|
|
24
|
+
nameMappings: {
|
|
25
|
+
js: 'object',
|
|
26
|
+
json: 'string',
|
|
27
|
+
},
|
|
28
|
+
}),
|
|
29
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
25
30
|
], ObjectIdType);
|
|
@@ -12,30 +12,38 @@ let OperationResult = class OperationResult {
|
|
|
12
12
|
};
|
|
13
13
|
exports.OperationResult = OperationResult;
|
|
14
14
|
tslib_1.__decorate([
|
|
15
|
-
(0, api_field_js_1.ApiField)()
|
|
15
|
+
(0, api_field_js_1.ApiField)(),
|
|
16
|
+
tslib_1.__metadata("design:type", Number)
|
|
16
17
|
], OperationResult.prototype, "affected", void 0);
|
|
17
18
|
tslib_1.__decorate([
|
|
18
|
-
(0, api_field_js_1.ApiField)()
|
|
19
|
+
(0, api_field_js_1.ApiField)(),
|
|
20
|
+
tslib_1.__metadata("design:type", Number)
|
|
19
21
|
], OperationResult.prototype, "totalMatches", void 0);
|
|
20
22
|
tslib_1.__decorate([
|
|
21
|
-
(0, api_field_js_1.ApiField)()
|
|
23
|
+
(0, api_field_js_1.ApiField)(),
|
|
24
|
+
tslib_1.__metadata("design:type", String)
|
|
22
25
|
], OperationResult.prototype, "context", void 0);
|
|
23
26
|
tslib_1.__decorate([
|
|
24
|
-
(0, api_field_js_1.ApiField)()
|
|
27
|
+
(0, api_field_js_1.ApiField)(),
|
|
28
|
+
tslib_1.__metadata("design:type", String)
|
|
25
29
|
], OperationResult.prototype, "type", void 0);
|
|
26
30
|
tslib_1.__decorate([
|
|
27
|
-
(0, api_field_js_1.ApiField)()
|
|
31
|
+
(0, api_field_js_1.ApiField)(),
|
|
32
|
+
tslib_1.__metadata("design:type", String)
|
|
28
33
|
], OperationResult.prototype, "message", void 0);
|
|
29
34
|
tslib_1.__decorate([
|
|
30
|
-
(0, api_field_js_1.ApiField)({ type: 'any' })
|
|
35
|
+
(0, api_field_js_1.ApiField)({ type: 'any' }),
|
|
36
|
+
tslib_1.__metadata("design:type", Object)
|
|
31
37
|
], OperationResult.prototype, "payload", void 0);
|
|
32
38
|
tslib_1.__decorate([
|
|
33
|
-
(0, api_field_js_1.ApiField)({ type: 'object' })
|
|
39
|
+
(0, api_field_js_1.ApiField)({ type: 'object' }),
|
|
40
|
+
tslib_1.__metadata("design:type", Array)
|
|
34
41
|
], OperationResult.prototype, "errors", void 0);
|
|
35
42
|
exports.OperationResult = OperationResult = tslib_1.__decorate([
|
|
36
43
|
(0, complex_type_js_1.ComplexType)({
|
|
37
44
|
description: 'Operation result',
|
|
38
|
-
})
|
|
45
|
+
}),
|
|
46
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
39
47
|
], OperationResult);
|
|
40
48
|
(function (OperationResult) {
|
|
41
49
|
function forPayload(type) {
|
|
@@ -45,10 +53,12 @@ exports.OperationResult = OperationResult = tslib_1.__decorate([
|
|
|
45
53
|
}
|
|
46
54
|
};
|
|
47
55
|
tslib_1.__decorate([
|
|
48
|
-
(0, api_field_js_1.ApiField)({ type, required: true })
|
|
56
|
+
(0, api_field_js_1.ApiField)({ type, required: true }),
|
|
57
|
+
tslib_1.__metadata("design:type", Object)
|
|
49
58
|
], OperationResult_.prototype, "payload", void 0);
|
|
50
59
|
OperationResult_ = tslib_1.__decorate([
|
|
51
|
-
(0, complex_type_js_1.ComplexType)({ embedded: true })
|
|
60
|
+
(0, complex_type_js_1.ComplexType)({ embedded: true }),
|
|
61
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
52
62
|
], OperationResult_);
|
|
53
63
|
return OperationResult_;
|
|
54
64
|
}
|
|
@@ -31,17 +31,24 @@ exports.TimeType = TimeType;
|
|
|
31
31
|
tslib_1.__decorate([
|
|
32
32
|
simple_type_js_1.SimpleType.Attribute({
|
|
33
33
|
description: 'Minimum value',
|
|
34
|
-
})
|
|
34
|
+
}),
|
|
35
|
+
tslib_1.__metadata("design:type", String)
|
|
35
36
|
], TimeType.prototype, "minValue", void 0);
|
|
36
37
|
tslib_1.__decorate([
|
|
37
38
|
simple_type_js_1.SimpleType.Attribute({
|
|
38
39
|
description: 'Maximum value',
|
|
39
|
-
})
|
|
40
|
+
}),
|
|
41
|
+
tslib_1.__metadata("design:type", String)
|
|
40
42
|
], TimeType.prototype, "maxValue", void 0);
|
|
41
43
|
exports.TimeType = TimeType = tslib_1.__decorate([
|
|
42
44
|
(0, simple_type_js_1.SimpleType)({
|
|
43
45
|
description: 'Time string in 24h format',
|
|
46
|
+
nameMappings: {
|
|
47
|
+
js: 'string',
|
|
48
|
+
json: 'string',
|
|
49
|
+
},
|
|
44
50
|
})
|
|
45
51
|
.Example('18:23:00', 'Full time value')
|
|
46
|
-
.Example('18:23:00', 'Time value without seconds')
|
|
52
|
+
.Example('18:23:00', 'Time value without seconds'),
|
|
53
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
47
54
|
], TimeType);
|