@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
|
@@ -7,6 +7,7 @@ const document_init_context_js_1 = require("../common/document-init-context.js")
|
|
|
7
7
|
const constants_js_1 = require("../constants.js");
|
|
8
8
|
const complex_type_js_1 = require("../data-type/complex-type.js");
|
|
9
9
|
const complex_type_base_js_1 = require("../data-type/complex-type-base.js");
|
|
10
|
+
const data_type_js_1 = require("../data-type/data-type.js");
|
|
10
11
|
const enum_type_js_1 = require("../data-type/enum-type.js");
|
|
11
12
|
const mapped_type_js_1 = require("../data-type/mapped-type.js");
|
|
12
13
|
const mixin_type_js_1 = require("../data-type/mixin-type.js");
|
|
@@ -94,10 +95,10 @@ class DataTypeFactory {
|
|
|
94
95
|
thunk = await (0, index_js_1.resolveThunk)(thunk);
|
|
95
96
|
const metadata = Reflect.getMetadata(constants_js_1.DATATYPE_METADATA, thunk) || thunk[constants_js_1.DATATYPE_METADATA];
|
|
96
97
|
if (!(metadata && metadata.name)) {
|
|
97
|
-
if (typeof thunk === 'function')
|
|
98
|
+
if (typeof thunk === 'function') {
|
|
98
99
|
return context.addError(`Class "${thunk.name}" doesn't have a valid data type metadata`);
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
}
|
|
101
|
+
return context.addError(`Object doesn't have a valid data type metadata`);
|
|
101
102
|
}
|
|
102
103
|
importQueue.set(metadata.name, thunk);
|
|
103
104
|
});
|
|
@@ -116,8 +117,9 @@ class DataTypeFactory {
|
|
|
116
117
|
continue;
|
|
117
118
|
const dt = await this._importDataTypeArgs(context, owner, name);
|
|
118
119
|
// istanbul ignore next
|
|
119
|
-
if (dt && typeof dt !== 'string')
|
|
120
|
+
if (dt && typeof dt !== 'string') {
|
|
120
121
|
context.addError(`Embedded data type can't be loaded into document node directly`);
|
|
122
|
+
}
|
|
121
123
|
}
|
|
122
124
|
return Array.from(initArgsMap.values());
|
|
123
125
|
}
|
|
@@ -133,7 +135,7 @@ class DataTypeFactory {
|
|
|
133
135
|
const { importQueue, initArgsMap } = context;
|
|
134
136
|
// Check if data type already exist (maybe a builtin type or already imported)
|
|
135
137
|
const dataType = owner.node.findDataType(thunk);
|
|
136
|
-
if (dataType)
|
|
138
|
+
if (dataType instanceof data_type_js_1.DataType)
|
|
137
139
|
return dataType.name;
|
|
138
140
|
let metadata;
|
|
139
141
|
let ctor;
|
|
@@ -181,8 +183,9 @@ class DataTypeFactory {
|
|
|
181
183
|
const baseArgs = await this._importDataTypeArgs(context, owner, metadata.name);
|
|
182
184
|
if (!baseArgs)
|
|
183
185
|
return;
|
|
184
|
-
if (typeof baseArgs === 'object' && baseArgs.kind !== index_js_2.OpraSchema.SimpleType.Kind)
|
|
186
|
+
if (typeof baseArgs === 'object' && baseArgs.kind !== index_js_2.OpraSchema.SimpleType.Kind) {
|
|
185
187
|
return context.addError('Kind of base data type is not same');
|
|
188
|
+
}
|
|
186
189
|
return {
|
|
187
190
|
kind: index_js_2.OpraSchema.SimpleType.Kind,
|
|
188
191
|
name: undefined,
|
|
@@ -212,11 +215,16 @@ class DataTypeFactory {
|
|
|
212
215
|
/** Mark "out" object as initializing. This will help us to detect circular dependencies */
|
|
213
216
|
out[initializingSymbol] = true;
|
|
214
217
|
try {
|
|
215
|
-
if (out.name
|
|
216
|
-
|
|
218
|
+
if (out.name) {
|
|
219
|
+
if (importQueue?.has(out.name)) {
|
|
220
|
+
initArgsMap?.set(metadata.name, out);
|
|
221
|
+
out._instance = { name: metadata.name };
|
|
222
|
+
out[constants_js_1.kDataTypeMap] = owner.node[constants_js_1.kDataTypeMap];
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
return context.addError(`Data Type (${out.name}) must be explicitly added to type list in the document scope`);
|
|
226
|
+
}
|
|
217
227
|
}
|
|
218
|
-
else if (out.name)
|
|
219
|
-
return context.addError(`Data Type (${out.name}) must be explicitly added to type list in the document scope`);
|
|
220
228
|
switch (out.kind) {
|
|
221
229
|
case index_js_2.OpraSchema.ComplexType.Kind:
|
|
222
230
|
out.ctor = ctor;
|
|
@@ -263,8 +271,9 @@ class DataTypeFactory {
|
|
|
263
271
|
}
|
|
264
272
|
else if (initArgs.ctor) {
|
|
265
273
|
const baseClass = Object.getPrototypeOf(initArgs.ctor.prototype).constructor;
|
|
266
|
-
if (Reflect.hasMetadata(constants_js_1.DATATYPE_METADATA, baseClass))
|
|
274
|
+
if (Reflect.hasMetadata(constants_js_1.DATATYPE_METADATA, baseClass)) {
|
|
267
275
|
baseArgs = await this._importDataTypeArgs(context, owner, baseClass);
|
|
276
|
+
}
|
|
268
277
|
}
|
|
269
278
|
if (!baseArgs)
|
|
270
279
|
return;
|
|
@@ -273,14 +282,16 @@ class DataTypeFactory {
|
|
|
273
282
|
});
|
|
274
283
|
// Initialize additionalFields
|
|
275
284
|
if (metadata.additionalFields != null) {
|
|
276
|
-
if (typeof metadata.additionalFields === 'boolean' || Array.isArray(metadata.additionalFields))
|
|
285
|
+
if (typeof metadata.additionalFields === 'boolean' || Array.isArray(metadata.additionalFields)) {
|
|
277
286
|
initArgs.additionalFields = metadata.additionalFields;
|
|
278
|
-
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
279
289
|
await context.enterAsync('.additionalFields', async () => {
|
|
280
290
|
const t = await this._importDataTypeArgs(context, owner, metadata.additionalFields);
|
|
281
291
|
if (t)
|
|
282
292
|
initArgs.additionalFields = preferName(t);
|
|
283
293
|
});
|
|
294
|
+
}
|
|
284
295
|
}
|
|
285
296
|
if (metadata.fields) {
|
|
286
297
|
initArgs.fields = {};
|
|
@@ -288,9 +299,10 @@ class DataTypeFactory {
|
|
|
288
299
|
for (const [k, v] of Object.entries(metadata.fields)) {
|
|
289
300
|
await context.enterAsync(`[${k}]`, async () => {
|
|
290
301
|
const fieldMeta = typeof v === 'string' ? { type: v } : v;
|
|
291
|
-
if (fieldMeta.isArray && !fieldMeta.type)
|
|
302
|
+
if (fieldMeta.isArray && !fieldMeta.type) {
|
|
292
303
|
return context.addError(`"type" must be defined explicitly for array fields`);
|
|
293
|
-
|
|
304
|
+
}
|
|
305
|
+
const t = await this._importDataTypeArgs(context, owner, fieldMeta.type || 'any');
|
|
294
306
|
if (!t)
|
|
295
307
|
return;
|
|
296
308
|
initArgs.fields[k] = {
|
|
@@ -323,8 +335,9 @@ class DataTypeFactory {
|
|
|
323
335
|
}
|
|
324
336
|
else if (initArgs.ctor) {
|
|
325
337
|
const baseClass = Object.getPrototypeOf(initArgs.ctor.prototype).constructor;
|
|
326
|
-
if (Reflect.hasMetadata(constants_js_1.DATATYPE_METADATA, baseClass))
|
|
338
|
+
if (Reflect.hasMetadata(constants_js_1.DATATYPE_METADATA, baseClass)) {
|
|
327
339
|
baseArgs = await this._importDataTypeArgs(context, owner, baseClass);
|
|
340
|
+
}
|
|
328
341
|
}
|
|
329
342
|
if (!baseArgs)
|
|
330
343
|
return;
|
|
@@ -332,14 +345,17 @@ class DataTypeFactory {
|
|
|
332
345
|
initArgs.ctor = initArgs.ctor || baseArgs.ctor;
|
|
333
346
|
});
|
|
334
347
|
initArgs.properties = metadata.properties;
|
|
348
|
+
initArgs.nameMappings = metadata.nameMappings;
|
|
335
349
|
if (!initArgs.properties && initArgs.ctor)
|
|
336
350
|
initArgs.properties = new initArgs.ctor();
|
|
337
351
|
if (metadata.attributes)
|
|
338
352
|
initArgs.attributes = (0, index_js_1.cloneObject)(metadata.attributes);
|
|
339
|
-
if (typeof initArgs.properties?.[constants_js_1.DECODER] === 'function')
|
|
353
|
+
if (typeof initArgs.properties?.[constants_js_1.DECODER] === 'function') {
|
|
340
354
|
initArgs.generateDecoder = initArgs.properties?.[constants_js_1.DECODER].bind(initArgs.properties);
|
|
341
|
-
|
|
355
|
+
}
|
|
356
|
+
if (typeof initArgs.properties?.[constants_js_1.ENCODER] === 'function') {
|
|
342
357
|
initArgs.generateEncoder = initArgs.properties?.[constants_js_1.ENCODER].bind(initArgs.properties);
|
|
358
|
+
}
|
|
343
359
|
}
|
|
344
360
|
static async _prepareMappedTypeArgs(context, owner, initArgs, metadata) {
|
|
345
361
|
await this._prepareDataTypeArgs(context, initArgs, metadata);
|
|
@@ -350,8 +366,9 @@ class DataTypeFactory {
|
|
|
350
366
|
}
|
|
351
367
|
else if (initArgs.ctor) {
|
|
352
368
|
const baseClass = Object.getPrototypeOf(initArgs.ctor.prototype).constructor;
|
|
353
|
-
if (Reflect.hasMetadata(constants_js_1.DATATYPE_METADATA, baseClass))
|
|
369
|
+
if (Reflect.hasMetadata(constants_js_1.DATATYPE_METADATA, baseClass)) {
|
|
354
370
|
baseArgs = await this._importDataTypeArgs(context, owner, baseClass);
|
|
371
|
+
}
|
|
355
372
|
}
|
|
356
373
|
if (!baseArgs)
|
|
357
374
|
return;
|
|
@@ -362,10 +379,12 @@ class DataTypeFactory {
|
|
|
362
379
|
initArgs.pick = [...metadata.pick];
|
|
363
380
|
else if (metadata.omit)
|
|
364
381
|
initArgs.omit = [...metadata.omit];
|
|
365
|
-
else if (metadata.partial)
|
|
382
|
+
else if (metadata.partial) {
|
|
366
383
|
initArgs.partial = Array.isArray(metadata.partial) ? [...metadata.partial] : metadata.partial;
|
|
367
|
-
|
|
384
|
+
}
|
|
385
|
+
else if (metadata.required) {
|
|
368
386
|
initArgs.required = Array.isArray(metadata.required) ? [...metadata.required] : metadata.required;
|
|
387
|
+
}
|
|
369
388
|
}
|
|
370
389
|
static async _prepareMixinTypeArgs(context, owner, initArgs, metadata) {
|
|
371
390
|
await this._prepareDataTypeArgs(context, initArgs, metadata);
|
|
@@ -384,43 +403,52 @@ class DataTypeFactory {
|
|
|
384
403
|
});
|
|
385
404
|
}
|
|
386
405
|
static _createDataType(context, owner, args) {
|
|
406
|
+
let dataType = owner.node.findDataType(typeof args === 'string' ? args : args.name || '');
|
|
407
|
+
if (dataType instanceof data_type_js_1.DataType)
|
|
408
|
+
return dataType;
|
|
387
409
|
const initArgs = typeof args === 'string' ? context.initArgsMap?.get(args) : args;
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
410
|
+
if (initArgs) {
|
|
411
|
+
const dataTypeMap = initArgs[constants_js_1.kDataTypeMap];
|
|
412
|
+
if (!dataTypeMap)
|
|
413
|
+
delete initArgs._instance;
|
|
414
|
+
dataType = initArgs._instance;
|
|
415
|
+
if (dataType?.name && dataTypeMap) {
|
|
416
|
+
dataTypeMap.set(dataType.name, dataType);
|
|
417
|
+
}
|
|
418
|
+
switch (initArgs?.kind) {
|
|
419
|
+
case index_js_2.OpraSchema.ComplexType.Kind:
|
|
420
|
+
return this._createComplexType(context, owner, initArgs);
|
|
421
|
+
case index_js_2.OpraSchema.EnumType.Kind:
|
|
422
|
+
return this._createEnumType(context, owner, initArgs);
|
|
423
|
+
case index_js_2.OpraSchema.MappedType.Kind:
|
|
424
|
+
return this._createMappedType(context, owner, initArgs);
|
|
425
|
+
case index_js_2.OpraSchema.MixinType.Kind:
|
|
426
|
+
return this._createMixinType(context, owner, initArgs);
|
|
427
|
+
case index_js_2.OpraSchema.SimpleType.Kind:
|
|
428
|
+
return this._createSimpleType(context, owner, initArgs);
|
|
429
|
+
default:
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
399
432
|
}
|
|
400
433
|
context.addError(`Unknown data type (${String(args)})`);
|
|
401
434
|
}
|
|
402
435
|
static _createComplexType(context, owner, args) {
|
|
436
|
+
const dataType = args._instance || {};
|
|
437
|
+
Object.setPrototypeOf(dataType, complex_type_js_1.ComplexType.prototype);
|
|
403
438
|
const initArgs = (0, index_js_1.cloneObject)(args);
|
|
404
439
|
if (args.base) {
|
|
405
440
|
context.enter('.base', () => {
|
|
406
|
-
initArgs.base = (owner
|
|
407
|
-
this._createDataType(context, owner, args.base));
|
|
441
|
+
initArgs.base = this._createDataType(context, owner, args.base);
|
|
408
442
|
});
|
|
409
443
|
}
|
|
410
444
|
/** Set additionalFields */
|
|
411
445
|
if (args.additionalFields) {
|
|
412
446
|
context.enter('.additionalFields', () => {
|
|
413
|
-
if (typeof args.additionalFields === 'boolean' || Array.isArray(args.additionalFields))
|
|
447
|
+
if (typeof args.additionalFields === 'boolean' || Array.isArray(args.additionalFields)) {
|
|
414
448
|
initArgs.additionalFields = args.additionalFields;
|
|
449
|
+
}
|
|
415
450
|
else {
|
|
416
|
-
|
|
417
|
-
initArgs.additionalFields =
|
|
418
|
-
owner.node.findDataType(args.additionalFields) ||
|
|
419
|
-
this._createDataType(context, owner, args.additionalFields);
|
|
420
|
-
}
|
|
421
|
-
else {
|
|
422
|
-
initArgs.additionalFields = this._createDataType(context, owner, args.additionalFields);
|
|
423
|
-
}
|
|
451
|
+
initArgs.additionalFields = this._createDataType(context, owner, args.additionalFields);
|
|
424
452
|
}
|
|
425
453
|
});
|
|
426
454
|
}
|
|
@@ -430,40 +458,49 @@ class DataTypeFactory {
|
|
|
430
458
|
context.enter('.fields', () => {
|
|
431
459
|
for (const [k, v] of Object.entries(args.fields)) {
|
|
432
460
|
context.enter(`[${k}]`, () => {
|
|
433
|
-
const type =
|
|
434
|
-
if (type)
|
|
461
|
+
const type = this._createDataType(context, owner, v.type);
|
|
462
|
+
if (type) {
|
|
435
463
|
initArgs.fields[k] = {
|
|
436
464
|
...v,
|
|
437
465
|
name: k,
|
|
438
466
|
type,
|
|
439
467
|
};
|
|
468
|
+
}
|
|
440
469
|
});
|
|
441
470
|
}
|
|
442
471
|
});
|
|
443
472
|
}
|
|
444
|
-
|
|
473
|
+
complex_type_js_1.ComplexType.apply(dataType, [owner, initArgs]);
|
|
474
|
+
return dataType;
|
|
445
475
|
}
|
|
446
476
|
static _createEnumType(context, owner, args) {
|
|
477
|
+
const dataType = args._instance || {};
|
|
478
|
+
Object.setPrototypeOf(dataType, enum_type_js_1.EnumType.prototype);
|
|
447
479
|
const initArgs = (0, index_js_1.cloneObject)(args);
|
|
448
480
|
if (args.base) {
|
|
449
481
|
context.enter('.base', () => {
|
|
450
|
-
initArgs.base = (owner
|
|
451
|
-
this._createDataType(context, owner, args.base));
|
|
482
|
+
initArgs.base = this._createDataType(context, owner, args.base);
|
|
452
483
|
});
|
|
453
484
|
}
|
|
454
485
|
initArgs.attributes = args.attributes;
|
|
455
|
-
|
|
486
|
+
enum_type_js_1.EnumType.apply(dataType, [owner, initArgs]);
|
|
487
|
+
return dataType;
|
|
456
488
|
}
|
|
457
489
|
static _createMappedType(context, owner, args) {
|
|
490
|
+
const dataType = args._instance || {};
|
|
491
|
+
Object.setPrototypeOf(dataType, mapped_type_js_1.MappedType.prototype);
|
|
458
492
|
const initArgs = (0, index_js_1.cloneObject)(args);
|
|
459
493
|
if (args.base) {
|
|
460
494
|
context.enter('.base', () => {
|
|
461
|
-
initArgs.base =
|
|
495
|
+
initArgs.base = this._createDataType(context, owner, args.base);
|
|
462
496
|
});
|
|
463
497
|
}
|
|
464
|
-
|
|
498
|
+
mapped_type_js_1.MappedType.apply(dataType, [owner, initArgs]);
|
|
499
|
+
return dataType;
|
|
465
500
|
}
|
|
466
501
|
static _createMixinType(context, owner, args) {
|
|
502
|
+
const dataType = args._instance || {};
|
|
503
|
+
Object.setPrototypeOf(dataType, mixin_type_js_1.MixinType.prototype);
|
|
467
504
|
const initArgs = (0, index_js_1.cloneObject)(args);
|
|
468
505
|
if (args.types) {
|
|
469
506
|
context.enter('.types', () => {
|
|
@@ -471,25 +508,29 @@ class DataTypeFactory {
|
|
|
471
508
|
let i = 0;
|
|
472
509
|
for (const t of args.types) {
|
|
473
510
|
context.enter(`[${i++}]`, () => {
|
|
474
|
-
const base =
|
|
475
|
-
if (!(base instanceof complex_type_base_js_1.ComplexTypeBase))
|
|
511
|
+
const base = this._createDataType(context, owner, t);
|
|
512
|
+
if (!(base instanceof complex_type_base_js_1.ComplexTypeBase)) {
|
|
476
513
|
throw new TypeError(`"${base?.kind}" can't be set as base for a "${initArgs.kind}"`);
|
|
514
|
+
}
|
|
477
515
|
initArgs.types.push(base);
|
|
478
516
|
});
|
|
479
517
|
}
|
|
480
518
|
});
|
|
481
519
|
}
|
|
482
|
-
|
|
520
|
+
mixin_type_js_1.MixinType.apply(dataType, [owner, initArgs]);
|
|
521
|
+
return dataType;
|
|
483
522
|
}
|
|
484
523
|
static _createSimpleType(context, owner, args) {
|
|
524
|
+
const dataType = args._instance || {};
|
|
525
|
+
Object.setPrototypeOf(dataType, simple_type_js_1.SimpleType.prototype);
|
|
485
526
|
const initArgs = (0, index_js_1.cloneObject)(args);
|
|
486
527
|
if (args.base) {
|
|
487
528
|
context.enter('.base', () => {
|
|
488
|
-
initArgs.base = (owner
|
|
489
|
-
this._createDataType(context, owner, args.base));
|
|
529
|
+
initArgs.base = this._createDataType(context, owner, args.base);
|
|
490
530
|
});
|
|
491
531
|
}
|
|
492
|
-
|
|
532
|
+
simple_type_js_1.SimpleType.apply(dataType, [owner, initArgs]);
|
|
533
|
+
return dataType;
|
|
493
534
|
}
|
|
494
535
|
}
|
|
495
536
|
exports.DataTypeFactory = DataTypeFactory;
|
|
@@ -24,6 +24,7 @@ class HttpApiFactory {
|
|
|
24
24
|
*/
|
|
25
25
|
static async createApi(context, document, init) {
|
|
26
26
|
const api = new http_api_js_1.HttpApi(document);
|
|
27
|
+
api.name = init.name;
|
|
27
28
|
api.description = init.description;
|
|
28
29
|
api.url = init.url;
|
|
29
30
|
if (init.controllers) {
|
|
@@ -47,8 +48,9 @@ class HttpApiFactory {
|
|
|
47
48
|
return api;
|
|
48
49
|
}
|
|
49
50
|
static async _createController(context, parent, thunk, name) {
|
|
50
|
-
if (typeof thunk === 'function' && !(0, index_js_1.isConstructor)(thunk))
|
|
51
|
+
if (typeof thunk === 'function' && !(0, index_js_1.isConstructor)(thunk)) {
|
|
51
52
|
thunk = parent instanceof http_controller_js_1.HttpController ? thunk(parent.instance) : thunk();
|
|
53
|
+
}
|
|
52
54
|
thunk = await (0, index_js_1.resolveThunk)(thunk);
|
|
53
55
|
let ctor;
|
|
54
56
|
let metadata;
|
|
@@ -208,7 +210,7 @@ class HttpApiFactory {
|
|
|
208
210
|
});
|
|
209
211
|
}
|
|
210
212
|
if (metadata.requestBody) {
|
|
211
|
-
await context.
|
|
213
|
+
await context.enterAsync('.requestBody', async () => {
|
|
212
214
|
const requestBody = new http_request_body_js_1.HttpRequestBody(operation);
|
|
213
215
|
await this._initHttpRequestBody(context, requestBody, metadata.requestBody);
|
|
214
216
|
operation.requestBody = requestBody;
|
|
@@ -31,8 +31,8 @@ class HttpApi extends api_base_js_1.ApiBase {
|
|
|
31
31
|
url: this.url,
|
|
32
32
|
controllers: {},
|
|
33
33
|
};
|
|
34
|
-
for (const
|
|
35
|
-
out.controllers[name] = v.toJSON();
|
|
34
|
+
for (const v of this.controllers.values()) {
|
|
35
|
+
out.controllers[v.name] = v.toJSON();
|
|
36
36
|
}
|
|
37
37
|
return out;
|
|
38
38
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HttpController = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const node_path_1 = tslib_1.__importDefault(require("node:path"));
|
|
4
6
|
const ts_gems_1 = require("ts-gems");
|
|
5
7
|
const index_js_1 = require("../../helpers/index.js");
|
|
6
8
|
const index_js_2 = require("../../schema/index.js");
|
|
@@ -61,7 +63,7 @@ class HttpControllerClass extends document_element_js_1.DocumentElement {
|
|
|
61
63
|
if (c.controllers.size) {
|
|
62
64
|
controller = c.findController(arg0);
|
|
63
65
|
if (controller) {
|
|
64
|
-
this._controllerReverseMap.set(arg0,
|
|
66
|
+
this._controllerReverseMap.set(arg0, controller);
|
|
65
67
|
return controller;
|
|
66
68
|
}
|
|
67
69
|
}
|
|
@@ -82,15 +84,25 @@ class HttpControllerClass extends document_element_js_1.DocumentElement {
|
|
|
82
84
|
return this.controllers.get(arg0);
|
|
83
85
|
}
|
|
84
86
|
findParameter(paramName, location) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
const paramNameLower = paramName.toLowerCase();
|
|
88
|
+
let prm;
|
|
89
|
+
for (prm of this.parameters) {
|
|
90
|
+
if (location && location !== prm.location)
|
|
91
|
+
continue;
|
|
92
|
+
if (typeof prm.name === 'string') {
|
|
93
|
+
prm._nameLower = prm._nameLower || prm.name.toLowerCase();
|
|
94
|
+
if (prm._nameLower === paramNameLower)
|
|
95
|
+
return prm;
|
|
96
|
+
}
|
|
97
|
+
if (prm.name instanceof RegExp && prm.name.test(paramName))
|
|
90
98
|
return prm;
|
|
91
99
|
}
|
|
92
|
-
if (this.node.parent && this.node.parent.element instanceof exports.HttpController)
|
|
100
|
+
if (this.node.parent && this.node.parent.element instanceof exports.HttpController) {
|
|
93
101
|
return this.node.parent.element.findParameter(paramName, location);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
getFullUrl() {
|
|
105
|
+
return node_path_1.default.posix.join(this.owner instanceof exports.HttpController ? this.owner.getFullUrl() : '/', this.path);
|
|
94
106
|
}
|
|
95
107
|
/**
|
|
96
108
|
*
|
|
@@ -109,20 +121,20 @@ class HttpControllerClass extends document_element_js_1.DocumentElement {
|
|
|
109
121
|
});
|
|
110
122
|
if (this.operations.size) {
|
|
111
123
|
out.operations = {};
|
|
112
|
-
for (const
|
|
113
|
-
out.operations[name] = v.toJSON();
|
|
124
|
+
for (const v of this.operations.values()) {
|
|
125
|
+
out.operations[v.name] = v.toJSON();
|
|
114
126
|
}
|
|
115
127
|
}
|
|
116
128
|
if (this.controllers.size) {
|
|
117
129
|
out.controllers = {};
|
|
118
|
-
for (const
|
|
119
|
-
out.controllers[name] = v.toJSON();
|
|
130
|
+
for (const v of this.controllers.values()) {
|
|
131
|
+
out.controllers[v.name] = v.toJSON();
|
|
120
132
|
}
|
|
121
133
|
}
|
|
122
134
|
if (this.types.size) {
|
|
123
135
|
out.types = {};
|
|
124
|
-
for (const
|
|
125
|
-
out.types[name] = v.toJSON();
|
|
136
|
+
for (const v of this.types.values()) {
|
|
137
|
+
out.types[v.name] = v.toJSON();
|
|
126
138
|
}
|
|
127
139
|
}
|
|
128
140
|
if (this.parameters.length) {
|
|
@@ -25,8 +25,9 @@ exports.HttpMediaType = function (owner, initArgs) {
|
|
|
25
25
|
_this.maxFileSize = initArgs.maxFileSize;
|
|
26
26
|
_this.maxTotalFileSize = initArgs.maxTotalFileSize;
|
|
27
27
|
_this.minFileSize = initArgs.minFileSize;
|
|
28
|
-
if (initArgs?.type)
|
|
28
|
+
if (initArgs?.type) {
|
|
29
29
|
_this.type = initArgs?.type instanceof data_type_js_1.DataType ? initArgs.type : _this.owner.node.getDataType(initArgs.type);
|
|
30
|
+
}
|
|
30
31
|
_this.isArray = initArgs.isArray;
|
|
31
32
|
};
|
|
32
33
|
/**
|
|
@@ -38,8 +39,9 @@ class HttpMediaTypeClass extends document_element_js_1.DocumentElement {
|
|
|
38
39
|
return;
|
|
39
40
|
for (const f of this.multipartFields) {
|
|
40
41
|
if ((!fieldType || fieldType === f.fieldType) &&
|
|
41
|
-
((f.fieldName instanceof RegExp && f.fieldName.test(fieldName)) || f.fieldName === fieldName))
|
|
42
|
+
((f.fieldName instanceof RegExp && f.fieldName.test(fieldName)) || f.fieldName === fieldName)) {
|
|
42
43
|
return f;
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
toJSON() {
|
|
@@ -19,8 +19,9 @@ class HttpOperationResponse extends http_media_type_js_1.HttpMediaType {
|
|
|
19
19
|
paramName = paramName.toLowerCase();
|
|
20
20
|
for (const prm of this.parameters) {
|
|
21
21
|
if ((!location || location === prm.location) &&
|
|
22
|
-
((prm.name instanceof RegExp && prm.name.test(paramName)) || prm.name === paramName))
|
|
22
|
+
((prm.name instanceof RegExp && prm.name.test(paramName)) || prm.name === paramName)) {
|
|
23
23
|
return prm;
|
|
24
|
+
}
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
toJSON() {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HttpOperation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const node_path_1 = tslib_1.__importDefault(require("node:path"));
|
|
4
6
|
const ts_gems_1 = require("ts-gems");
|
|
5
7
|
const index_js_1 = require("../../helpers/index.js");
|
|
6
8
|
const index_js_2 = require("../../schema/index.js");
|
|
@@ -39,13 +41,24 @@ exports.HttpOperation = function (...args) {
|
|
|
39
41
|
*/
|
|
40
42
|
class HttpOperationClass extends document_element_js_1.DocumentElement {
|
|
41
43
|
findParameter(paramName, location) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
const paramNameLower = paramName.toLowerCase();
|
|
45
|
+
let prm;
|
|
46
|
+
for (prm of this.parameters) {
|
|
47
|
+
if (location && location !== prm.location)
|
|
48
|
+
continue;
|
|
49
|
+
if (typeof prm.name === 'string') {
|
|
50
|
+
prm._nameLower = prm._nameLower || prm.name.toLowerCase();
|
|
51
|
+
if (prm._nameLower === paramNameLower)
|
|
52
|
+
return prm;
|
|
53
|
+
}
|
|
54
|
+
if (prm.name instanceof RegExp && prm.name.test(paramName))
|
|
46
55
|
return prm;
|
|
47
56
|
}
|
|
48
57
|
}
|
|
58
|
+
getFullUrl() {
|
|
59
|
+
const out = this.owner.getFullUrl();
|
|
60
|
+
return out ? (this.path ? node_path_1.default.posix.join(out, this.path) : out) : this.path || '/';
|
|
61
|
+
}
|
|
49
62
|
toJSON() {
|
|
50
63
|
const out = (0, index_js_1.omitUndefined)({
|
|
51
64
|
kind: index_js_2.OpraSchema.HttpOperation.Kind,
|
|
@@ -25,6 +25,7 @@ exports.HttpParameter = function (owner, initArgs) {
|
|
|
25
25
|
_this.deprecated = initArgs.deprecated;
|
|
26
26
|
_this.required = initArgs.required;
|
|
27
27
|
_this.arraySeparator = initArgs.arraySeparator;
|
|
28
|
+
_this.keyParam = initArgs.keyParam;
|
|
28
29
|
};
|
|
29
30
|
/**
|
|
30
31
|
* @class HttpParameter
|
|
@@ -36,6 +37,7 @@ class HttpParameterClass extends value_js_1.Value {
|
|
|
36
37
|
name: this.name,
|
|
37
38
|
location: this.location,
|
|
38
39
|
arraySeparator: this.arraySeparator,
|
|
40
|
+
keyParam: this.keyParam,
|
|
39
41
|
required: this.required,
|
|
40
42
|
deprecated: this.deprecated,
|
|
41
43
|
});
|
|
@@ -31,8 +31,7 @@ class HttpStatusRange {
|
|
|
31
31
|
toString() {
|
|
32
32
|
if (this.start === this.end)
|
|
33
33
|
return String(this.start);
|
|
34
|
-
|
|
35
|
-
return String(this.start) + '-' + String(this.end);
|
|
34
|
+
return String(this.start) + '-' + String(this.end);
|
|
36
35
|
}
|
|
37
36
|
toJSON() {
|
|
38
37
|
return !this.end || this.start === this.end ? this.start : { start: this.start, end: this.end };
|
package/cjs/document/index.js
CHANGED
|
@@ -6,36 +6,36 @@ require("reflect-metadata");
|
|
|
6
6
|
const DataTypeFactory_ = tslib_1.__importStar(require("./factory/data-type.factory.js"));
|
|
7
7
|
const HttpApiFactory_ = tslib_1.__importStar(require("./factory/http-api.factory.js"));
|
|
8
8
|
tslib_1.__exportStar(require("./api-document.js"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./constants.js"), exports);
|
|
10
9
|
tslib_1.__exportStar(require("./common/api-base.js"), exports);
|
|
11
10
|
tslib_1.__exportStar(require("./common/data-type-map.js"), exports);
|
|
12
11
|
tslib_1.__exportStar(require("./common/document-element.js"), exports);
|
|
13
12
|
tslib_1.__exportStar(require("./common/document-init-context.js"), exports);
|
|
14
13
|
tslib_1.__exportStar(require("./common/document-node.js"), exports);
|
|
15
14
|
tslib_1.__exportStar(require("./common/opra-document-error.js"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./constants.js"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./data-type/api-field.js"), exports);
|
|
16
17
|
tslib_1.__exportStar(require("./data-type/complex-type.js"), exports);
|
|
17
18
|
tslib_1.__exportStar(require("./data-type/data-type.js"), exports);
|
|
18
19
|
tslib_1.__exportStar(require("./data-type/enum-type.js"), exports);
|
|
19
|
-
tslib_1.__exportStar(require("./data-type/
|
|
20
|
+
tslib_1.__exportStar(require("./data-type/extended-types/index.js"), exports);
|
|
20
21
|
tslib_1.__exportStar(require("./data-type/mapped-type.js"), exports);
|
|
21
22
|
tslib_1.__exportStar(require("./data-type/mixin-type.js"), exports);
|
|
22
23
|
tslib_1.__exportStar(require("./data-type/omit-type.js"), exports);
|
|
23
24
|
tslib_1.__exportStar(require("./data-type/partial-type.js"), exports);
|
|
24
25
|
tslib_1.__exportStar(require("./data-type/pick-type.js"), exports);
|
|
26
|
+
tslib_1.__exportStar(require("./data-type/primitive-types/index.js"), exports);
|
|
25
27
|
tslib_1.__exportStar(require("./data-type/required-type.js"), exports);
|
|
26
28
|
tslib_1.__exportStar(require("./data-type/simple-type.js"), exports);
|
|
27
|
-
tslib_1.__exportStar(require("./data-type/primitive-types/index.js"), exports);
|
|
28
|
-
tslib_1.__exportStar(require("./data-type/extended-types/index.js"), exports);
|
|
29
29
|
tslib_1.__exportStar(require("./decorators/http-operation-entity.decorator.js"), exports);
|
|
30
30
|
tslib_1.__exportStar(require("./factory/api-document.factory.js"), exports);
|
|
31
31
|
tslib_1.__exportStar(require("./http/http-api.js"), exports);
|
|
32
|
+
tslib_1.__exportStar(require("./http/http-controller.js"), exports);
|
|
32
33
|
tslib_1.__exportStar(require("./http/http-media-type.js"), exports);
|
|
33
34
|
tslib_1.__exportStar(require("./http/http-multipart-field.js"), exports);
|
|
34
35
|
tslib_1.__exportStar(require("./http/http-operation.js"), exports);
|
|
35
36
|
tslib_1.__exportStar(require("./http/http-operation-response.js"), exports);
|
|
36
37
|
tslib_1.__exportStar(require("./http/http-parameter.js"), exports);
|
|
37
38
|
tslib_1.__exportStar(require("./http/http-request-body.js"), exports);
|
|
38
|
-
tslib_1.__exportStar(require("./http/http-controller.js"), exports);
|
|
39
39
|
tslib_1.__exportStar(require("./http/http-status-range.js"), exports);
|
|
40
40
|
var classes;
|
|
41
41
|
(function (classes) {
|
package/cjs/exception/index.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./opra-exception.js"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./opra-http-error.js"), exports);
|
|
6
4
|
tslib_1.__exportStar(require("./error-issue.js"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./issue-severity.enum.js"), exports);
|
|
8
5
|
tslib_1.__exportStar(require("./http-errors/bad-request.error.js"), exports);
|
|
9
6
|
tslib_1.__exportStar(require("./http-errors/conflict.error.js"), exports);
|
|
10
7
|
tslib_1.__exportStar(require("./http-errors/failed-dependency.error.js"), exports);
|
|
@@ -13,8 +10,11 @@ tslib_1.__exportStar(require("./http-errors/internal-server.error.js"), exports)
|
|
|
13
10
|
tslib_1.__exportStar(require("./http-errors/method-not-allowed.error.js"), exports);
|
|
14
11
|
tslib_1.__exportStar(require("./http-errors/not-acceptable.error.js"), exports);
|
|
15
12
|
tslib_1.__exportStar(require("./http-errors/not-found.error.js"), exports);
|
|
16
|
-
tslib_1.__exportStar(require("./http-errors/unauthorized.error.js"), exports);
|
|
17
|
-
tslib_1.__exportStar(require("./http-errors/unprocessable-entity.error.js"), exports);
|
|
18
13
|
tslib_1.__exportStar(require("./http-errors/permission.error.js"), exports);
|
|
19
14
|
tslib_1.__exportStar(require("./http-errors/resource-conflict.error.js"), exports);
|
|
20
15
|
tslib_1.__exportStar(require("./http-errors/resource-not.available.error.js"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./http-errors/unauthorized.error.js"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./http-errors/unprocessable-entity.error.js"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./issue-severity.enum.js"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./opra-exception.js"), exports);
|
|
20
|
+
tslib_1.__exportStar(require("./opra-http-error.js"), exports);
|