@opra/client 0.17.1 → 0.17.2
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/cjs/client-error.js +17 -0
- package/cjs/constants.js +7 -0
- package/cjs/http/batch-request.js +90 -0
- package/cjs/http/http-client.js +232 -0
- package/cjs/http/http-collection-node.js +110 -0
- package/cjs/http/http-request-observable.js +36 -0
- package/cjs/http/http-request.js +88 -0
- package/cjs/http/http-response.js +24 -0
- package/cjs/http/http-service-base.js +9 -0
- package/cjs/http/http-singleton-node.js +63 -0
- package/cjs/http/http-types.js +2 -0
- package/cjs/index.js +12 -0
- package/cjs/package.json +3 -0
- package/esm/client-error.js +13 -0
- package/esm/constants.js +4 -0
- package/esm/http/batch-request.js +90 -0
- package/esm/http/http-client.js +228 -0
- package/esm/http/http-collection-node.js +106 -0
- package/esm/http/http-request-observable.js +32 -0
- package/esm/http/http-request.js +84 -0
- package/esm/http/http-response.js +20 -0
- package/esm/http/http-service-base.js +5 -0
- package/esm/http/http-singleton-node.js +59 -0
- package/esm/http/http-types.js +1 -0
- package/esm/index.js +9 -0
- package/package.json +32 -12
- package/types/client-error.d.ts +1 -1
- package/types/http/http-client.d.ts +1 -1
- package/types/http/http-collection-node.d.ts +5 -5
- package/types/http/http-request-observable.d.ts +1 -1
- package/types/http/http-request.d.ts +1 -1
- package/types/http/http-response.d.ts +3 -1
- package/types/http/http-singleton-node.d.ts +1 -1
- package/types/http/http-types.d.ts +1 -1
- package/types/index.d.ts +0 -6
- package/cjs/content-disposition-d575fee5.js +0 -473
- package/cjs/cookie-signature-3e974173.js +0 -64
- package/cjs/index.min.mjs +0 -9295
- package/cjs/mime-db-49f150d0.js +0 -10719
- package/cjs/mime-types-6e2bdb57.js +0 -201
- package/cjs/safe-buffer-8acd60c7.js +0 -78
- package/esm/content-disposition-65f281a9.js +0 -470
- package/esm/cookie-signature-bf274b6b.js +0 -62
- package/esm/index.min.mjs +0 -9174
- package/esm/mime-db-d0f15d8f.js +0 -10717
- package/esm/mime-types-79c091fd.js +0 -199
- package/esm/safe-buffer-63383356.js +0 -76
- package/types/common/document/api-document.d.ts +0 -102
- package/types/common/document/constants.d.ts +0 -3
- package/types/common/document/data-type/api-field.d.ts +0 -41
- package/types/common/document/data-type/builtin/any.type.d.ts +0 -2
- package/types/common/document/data-type/builtin/base64.type.d.ts +0 -6
- package/types/common/document/data-type/builtin/bigint.type.d.ts +0 -6
- package/types/common/document/data-type/builtin/boolean.type.d.ts +0 -5
- package/types/common/document/data-type/builtin/date.type.d.ts +0 -4
- package/types/common/document/data-type/builtin/guid.type.d.ts +0 -7
- package/types/common/document/data-type/builtin/index.d.ts +0 -10
- package/types/common/document/data-type/builtin/integer.type.d.ts +0 -6
- package/types/common/document/data-type/builtin/number.type.d.ts +0 -6
- package/types/common/document/data-type/builtin/object.type.d.ts +0 -3
- package/types/common/document/data-type/builtin/string.type.d.ts +0 -5
- package/types/common/document/data-type/builtin/time.type.d.ts +0 -7
- package/types/common/document/data-type/builtin/timestamp.type.d.ts +0 -5
- package/types/common/document/data-type/complex-type.d.ts +0 -56
- package/types/common/document/data-type/data-type.d.ts +0 -33
- package/types/common/document/data-type/enum-type.d.ts +0 -32
- package/types/common/document/data-type/mapped-type.d.ts +0 -53
- package/types/common/document/data-type/simple-type.d.ts +0 -33
- package/types/common/document/data-type/union-type.d.ts +0 -42
- package/types/common/document/factory/add-references.d.ts +0 -4
- package/types/common/document/factory/create-document.d.ts +0 -12
- package/types/common/document/factory/factory.d.ts +0 -61
- package/types/common/document/factory/import-resource-class.d.ts +0 -10
- package/types/common/document/factory/import-type-class.d.ts +0 -17
- package/types/common/document/factory/index.d.ts +0 -1
- package/types/common/document/factory/process-resources.d.ts +0 -7
- package/types/common/document/factory/process-types.d.ts +0 -6
- package/types/common/document/index.d.ts +0 -14
- package/types/common/document/resource/collection.d.ts +0 -69
- package/types/common/document/resource/resource.d.ts +0 -29
- package/types/common/document/resource/singleton.d.ts +0 -51
- package/types/common/document/utils/inspect.util.d.ts +0 -4
- package/types/common/document/utils/string-compare.util.d.ts +0 -1
- package/types/common/exception/enums/issue-severity.enum.d.ts +0 -13
- package/types/common/exception/error-issue.d.ts +0 -9
- package/types/common/exception/http-errors/bad-request.error.d.ts +0 -10
- package/types/common/exception/http-errors/failed-dependency.error.d.ts +0 -9
- package/types/common/exception/http-errors/forbidden.error.d.ts +0 -11
- package/types/common/exception/http-errors/internal-server.error.d.ts +0 -9
- package/types/common/exception/http-errors/method-not-allowed.error.d.ts +0 -10
- package/types/common/exception/http-errors/not-acceptable.error.d.ts +0 -10
- package/types/common/exception/http-errors/not-found.error.d.ts +0 -13
- package/types/common/exception/http-errors/unauthorized.error.d.ts +0 -10
- package/types/common/exception/http-errors/unprocessable-entity.error.d.ts +0 -9
- package/types/common/exception/index.d.ts +0 -15
- package/types/common/exception/opra-exception.d.ts +0 -15
- package/types/common/exception/resource-errors/resource-conflict.error.d.ts +0 -5
- package/types/common/exception/resource-errors/resource-not-found.error.d.ts +0 -8
- package/types/common/exception/wrap-exception.d.ts +0 -2
- package/types/common/filter/antlr/OpraFilterLexer.d.ts +0 -77
- package/types/common/filter/antlr/OpraFilterListener.d.ts +0 -430
- package/types/common/filter/antlr/OpraFilterParser.d.ts +0 -437
- package/types/common/filter/antlr/OpraFilterVisitor.d.ts +0 -260
- package/types/common/filter/ast/abstract/ast.d.ts +0 -5
- package/types/common/filter/ast/abstract/expression.d.ts +0 -3
- package/types/common/filter/ast/abstract/literal.d.ts +0 -6
- package/types/common/filter/ast/abstract/term.d.ts +0 -3
- package/types/common/filter/ast/expressions/arithmetic-expression.d.ts +0 -13
- package/types/common/filter/ast/expressions/array-expression.d.ts +0 -7
- package/types/common/filter/ast/expressions/comparison-expression.d.ts +0 -10
- package/types/common/filter/ast/expressions/logical-expression.d.ts +0 -8
- package/types/common/filter/ast/expressions/parentheses-expression.d.ts +0 -6
- package/types/common/filter/ast/index.d.ts +0 -16
- package/types/common/filter/ast/terms/boolean-literal.d.ts +0 -5
- package/types/common/filter/ast/terms/date-literal.d.ts +0 -6
- package/types/common/filter/ast/terms/external-constant.d.ts +0 -5
- package/types/common/filter/ast/terms/null-literal.d.ts +0 -5
- package/types/common/filter/ast/terms/number-literal.d.ts +0 -6
- package/types/common/filter/ast/terms/qualified-identifier.d.ts +0 -8
- package/types/common/filter/ast/terms/string-literal.d.ts +0 -5
- package/types/common/filter/ast/terms/time-literal.d.ts +0 -6
- package/types/common/filter/build.d.ts +0 -31
- package/types/common/filter/errors.d.ts +0 -20
- package/types/common/filter/filter-tree-visitor.d.ts +0 -33
- package/types/common/filter/index.d.ts +0 -5
- package/types/common/filter/opra-error-listener.d.ts +0 -8
- package/types/common/filter/parse.d.ts +0 -2
- package/types/common/filter/utils.d.ts +0 -2
- package/types/common/helpers/function-utils.d.ts +0 -4
- package/types/common/helpers/get-stack-filename.d.ts +0 -1
- package/types/common/helpers/index.d.ts +0 -8
- package/types/common/helpers/is-url.d.ts +0 -1
- package/types/common/helpers/mixin-utils.d.ts +0 -3
- package/types/common/helpers/object-utils.d.ts +0 -2
- package/types/common/helpers/path-to-object-tree.d.ts +0 -4
- package/types/common/helpers/responsive-map.d.ts +0 -34
- package/types/common/helpers/type-guards.d.ts +0 -11
- package/types/common/http/codecs/boolean-codec.d.ts +0 -5
- package/types/common/http/codecs/date-codec.d.ts +0 -16
- package/types/common/http/codecs/filter-codec.d.ts +0 -6
- package/types/common/http/codecs/integer-codec.d.ts +0 -11
- package/types/common/http/codecs/number-codec.d.ts +0 -14
- package/types/common/http/codecs/string-codec.d.ts +0 -16
- package/types/common/http/enums/http-headers-codes.enum.d.ts +0 -388
- package/types/common/http/enums/http-status-codes.enum.d.ts +0 -290
- package/types/common/http/enums/http-status-messages.d.ts +0 -65
- package/types/common/http/http-headers.d.ts +0 -86
- package/types/common/http/http-message.host.d.ts +0 -122
- package/types/common/http/http-params.d.ts +0 -114
- package/types/common/http/http-request-message.d.ts +0 -213
- package/types/common/http/http-response-message.d.ts +0 -318
- package/types/common/http/index.d.ts +0 -14
- package/types/common/http/interfaces/client-http-headers.interface.d.ts +0 -65
- package/types/common/http/interfaces/cookie-options.interface.d.ts +0 -4
- package/types/common/http/interfaces/server-http-headers.interface.d.ts +0 -1
- package/types/common/http/multipart/batch-multipart.d.ts +0 -0
- package/types/common/http/multipart/http-request-content.d.ts +0 -0
- package/types/common/http/multipart/http-response-content.d.ts +0 -0
- package/types/common/http/multipart/index.d.ts +0 -0
- package/types/common/i18n/i18n.d.ts +0 -28
- package/types/common/i18n/index.d.ts +0 -5
- package/types/common/i18n/string-utils.d.ts +0 -2
- package/types/common/i18n/translate.d.ts +0 -4
- package/types/common/index.d.ts +0 -11
- package/types/common/schema/constants.d.ts +0 -2
- package/types/common/schema/data-type/complex-type.interface.d.ts +0 -16
- package/types/common/schema/data-type/data-type.interface.d.ts +0 -14
- package/types/common/schema/data-type/enum-type.interface.d.ts +0 -15
- package/types/common/schema/data-type/field.interface.d.ts +0 -21
- package/types/common/schema/data-type/mapped-type.interface.d.ts +0 -11
- package/types/common/schema/data-type/simple-type.interface.d.ts +0 -18
- package/types/common/schema/data-type/union-type.interface.d.ts +0 -10
- package/types/common/schema/document.interface.d.ts +0 -34
- package/types/common/schema/index.d.ts +0 -51
- package/types/common/schema/resource/collection.interface.d.ts +0 -33
- package/types/common/schema/resource/container.interface.d.ts +0 -9
- package/types/common/schema/resource/endpoint.interface.d.ts +0 -29
- package/types/common/schema/resource/resource.interface.d.ts +0 -12
- package/types/common/schema/resource/singleton.interface.d.ts +0 -22
- package/types/common/schema/type-guards.d.ts +0 -20
- package/types/common/types.d.ts +0 -11
- package/types/common/url/index.d.ts +0 -5
- package/types/common/url/opra-url-path-component.d.ts +0 -15
- package/types/common/url/opra-url-path.d.ts +0 -36
- package/types/common/url/opra-url.d.ts +0 -70
- package/types/common/url/utils/decode-path-component.d.ts +0 -5
- package/types/common/url/utils/encode-path-component.d.ts +0 -1
- package/types/common/utils/path-utils.d.ts +0 -2
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Class, StrictOmit, Type } from 'ts-gems';
|
|
2
|
-
import { OpraSchema } from '../../schema/index.js';
|
|
3
|
-
import type { ApiDocument } from '../api-document.js';
|
|
4
|
-
import { ComplexType } from './complex-type.js';
|
|
5
|
-
import { DataType } from './data-type.js';
|
|
6
|
-
/**
|
|
7
|
-
* @namespace MappedType
|
|
8
|
-
*/
|
|
9
|
-
export declare namespace MappedType {
|
|
10
|
-
interface InitArguments extends DataType.InitArguments, Pick<OpraSchema.MappedType, 'pick' | 'omit'> {
|
|
11
|
-
type: ComplexType;
|
|
12
|
-
}
|
|
13
|
-
interface OwnProperties extends DataType.OwnProperties, Pick<OpraSchema.MappedType, 'pick' | 'omit'> {
|
|
14
|
-
type: ComplexType;
|
|
15
|
-
}
|
|
16
|
-
interface Options<T, K = keyof T> {
|
|
17
|
-
pick?: readonly K[];
|
|
18
|
-
omit?: readonly K[];
|
|
19
|
-
}
|
|
20
|
-
interface Metadata extends StrictOmit<OpraSchema.MappedType, 'type'> {
|
|
21
|
-
type: Type;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Type definition of MappedType prototype
|
|
26
|
-
* @type MappedType
|
|
27
|
-
*/
|
|
28
|
-
export interface MappedType extends StrictOmit<DataType, 'own' | 'exportSchema'>, Pick<ComplexType, 'additionalFields' | 'fields'>, MappedType.OwnProperties {
|
|
29
|
-
readonly own: MappedType.OwnProperties;
|
|
30
|
-
readonly type: ComplexType;
|
|
31
|
-
exportSchema(): OpraSchema.MappedType;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Type definition of MappedType constructor type
|
|
35
|
-
* @type MappedTypeConstructor
|
|
36
|
-
*/
|
|
37
|
-
export interface MappedTypeConstructor {
|
|
38
|
-
prototype: MappedType;
|
|
39
|
-
new (document: ApiDocument, init: MappedType.InitArguments): MappedType;
|
|
40
|
-
<T extends any[], I1, S1, PickKey extends keyof I1, OmitKey extends keyof I1>(source: Class<T, I1, S1>, options: {
|
|
41
|
-
pickKeys?: readonly PickKey[];
|
|
42
|
-
omitKeys?: readonly OmitKey[];
|
|
43
|
-
}): Class<T, Omit<Pick<I1, PickKey>, OmitKey>>;
|
|
44
|
-
_applyMixin(target: Type, source: Type, options: MappedType.Options<any> & {
|
|
45
|
-
isInheritedPredicate: (fieldName: string) => boolean;
|
|
46
|
-
}): void;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* @class MappedType
|
|
50
|
-
*/
|
|
51
|
-
export declare const MappedType: MappedTypeConstructor;
|
|
52
|
-
export declare function PickType<T extends any[], I1, S1, K extends keyof I1>(classRef: Class<T, I1, S1>, keys: readonly K[]): Class<T, Pick<I1, K>> & Omit<Pick<S1, keyof typeof classRef>, 'prototype' | 'constructor'>;
|
|
53
|
-
export declare function OmitType<T extends any[], I1, S1, K extends keyof I1>(classRef: Class<T, I1, S1>, keys: readonly K[]): Class<T, Omit<I1, K>> & Omit<Pick<S1, keyof typeof classRef>, 'prototype' | 'constructor'>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { StrictOmit, Type } from 'ts-gems';
|
|
2
|
-
import { OpraSchema } from '../../schema/index.js';
|
|
3
|
-
import type { ApiDocument } from '../api-document.js';
|
|
4
|
-
import { DataType } from './data-type.js';
|
|
5
|
-
export declare namespace SimpleType {
|
|
6
|
-
interface InitArguments extends DataType.InitArguments, Pick<OpraSchema.SimpleType, 'ctor' | 'pattern' | 'codec'> {
|
|
7
|
-
base?: SimpleType;
|
|
8
|
-
}
|
|
9
|
-
interface OwnProperties extends DataType.OwnProperties, Readonly<Pick<OpraSchema.SimpleType, 'ctor' | 'pattern' | 'codec'>> {
|
|
10
|
-
}
|
|
11
|
-
interface DecoratorOptions extends DataType.DecoratorOptions, Pick<InitArguments, 'ctor' | 'pattern'> {
|
|
12
|
-
}
|
|
13
|
-
interface Metadata extends OpraSchema.SimpleType {
|
|
14
|
-
name: string;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export interface SimpleType extends StrictOmit<DataType, 'own' | 'exportSchema'>, SimpleType.OwnProperties {
|
|
18
|
-
readonly ctor: Type;
|
|
19
|
-
readonly base?: SimpleType;
|
|
20
|
-
readonly own: SimpleType.OwnProperties;
|
|
21
|
-
exportSchema(): OpraSchema.SimpleType;
|
|
22
|
-
decode(value: any): any;
|
|
23
|
-
encode(value: any): any;
|
|
24
|
-
}
|
|
25
|
-
export interface SimpleTypeConstructor {
|
|
26
|
-
new (document: ApiDocument, init?: SimpleType.InitArguments): SimpleType;
|
|
27
|
-
(init?: SimpleType.DecoratorOptions): ClassDecorator;
|
|
28
|
-
prototype: SimpleType;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @class SimpleType
|
|
32
|
-
*/
|
|
33
|
-
export declare const SimpleType: SimpleTypeConstructor;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Class, StrictOmit, Type } from 'ts-gems';
|
|
2
|
-
import { OpraSchema } from '../../schema/index.js';
|
|
3
|
-
import type { ApiDocument } from '../api-document.js';
|
|
4
|
-
import { ComplexType } from './complex-type.js';
|
|
5
|
-
import { DataType } from './data-type.js';
|
|
6
|
-
import { MappedType } from './mapped-type.js';
|
|
7
|
-
/**
|
|
8
|
-
* @namespace UnionType
|
|
9
|
-
*/
|
|
10
|
-
export declare namespace UnionType {
|
|
11
|
-
interface InitArguments extends DataType.InitArguments {
|
|
12
|
-
types: (ComplexType | UnionType | MappedType)[];
|
|
13
|
-
}
|
|
14
|
-
interface OwnProperties extends DataType.OwnProperties {
|
|
15
|
-
types: (ComplexType | UnionType | MappedType)[];
|
|
16
|
-
}
|
|
17
|
-
interface Metadata extends StrictOmit<OpraSchema.UnionType, 'types'> {
|
|
18
|
-
types: Type[];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Type definition of UnionType prototype
|
|
23
|
-
* @type UnionType
|
|
24
|
-
*/
|
|
25
|
-
export interface UnionType extends StrictOmit<DataType, 'own' | 'exportSchema'>, Pick<ComplexType, 'additionalFields' | 'fields'>, UnionType.OwnProperties {
|
|
26
|
-
readonly own: UnionType.OwnProperties;
|
|
27
|
-
exportSchema(): OpraSchema.UnionType;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Type definition of UnionType constructor type
|
|
31
|
-
* @type UnionTypeConstructor
|
|
32
|
-
*/
|
|
33
|
-
export interface UnionTypeConstructor {
|
|
34
|
-
prototype: UnionType;
|
|
35
|
-
new (document: ApiDocument, init: UnionType.InitArguments): UnionType;
|
|
36
|
-
<A1 extends any[], I1, S1, A2 extends any[], I2, S2, A3 extends any[], I3, S3, A4 extends any[], I4, S4>(c1: Class<A1, I1, S1>, c2: Class<A2, I2, S2>, c3?: Class<A3, I3, S3>, c4?: Class<A4, I4, S4>): Class<any[], I1 & I2 & I3 & I4, S1 & S2 & S3 & S4>;
|
|
37
|
-
_applyMixin(target: Type, ...sources: [Type]): void;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* @class UnionType
|
|
41
|
-
*/
|
|
42
|
-
export declare const UnionType: UnionTypeConstructor;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { OpraSchema } from '../../schema/index.js';
|
|
2
|
-
import { ApiDocument } from '../api-document.js';
|
|
3
|
-
import type { DocumentFactory } from './factory.js';
|
|
4
|
-
export declare function addReferences(this: DocumentFactory, references: Record<string, string | OpraSchema.ApiDocument | ApiDocument>): Promise<void>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ApiDocument } from '../api-document.js';
|
|
2
|
-
import type { DocumentFactory } from './factory.js';
|
|
3
|
-
export declare function createDocument(this: DocumentFactory, init: DocumentFactory.InitArguments, options?: {
|
|
4
|
-
noBuiltinTypes?: boolean;
|
|
5
|
-
}): Promise<ApiDocument>;
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param url
|
|
9
|
-
* @protected
|
|
10
|
-
*/
|
|
11
|
-
export declare function createDocumentFromUrl(this: DocumentFactory, url: string): Promise<ApiDocument>;
|
|
12
|
-
export declare function createBuiltinTypeDocument(this: DocumentFactory): Promise<ApiDocument>;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { StrictOmit, Type } from 'ts-gems';
|
|
2
|
-
import { ResponsiveMap } from '../../helpers/index.js';
|
|
3
|
-
import { OpraSchema } from '../../schema/index.js';
|
|
4
|
-
import { ThunkAsync } from '../../types.js';
|
|
5
|
-
import { ApiDocument } from '../api-document.js';
|
|
6
|
-
import { addReferences } from './add-references.js';
|
|
7
|
-
import { createBuiltinTypeDocument, createDocument, createDocumentFromUrl } from './create-document.js';
|
|
8
|
-
import { extractCollectionSchema, extractSingletonSchema, importResourceClass } from './import-resource-class.js';
|
|
9
|
-
import { extractComplexTypeSchema, extractEnumTypeSchema, extractFieldSchema, extractMappedTypeSchema, extractSimpleTypeSchema, extractUnionTypeSchema, importTypeClass } from './import-type-class.js';
|
|
10
|
-
import { createCollection, createSingleton, processResourceQueue } from './process-resources.js';
|
|
11
|
-
import { addDataType, createDataTypeInstance, processTypes } from './process-types.js';
|
|
12
|
-
/**
|
|
13
|
-
* @namespace DocumentFactory
|
|
14
|
-
*/
|
|
15
|
-
export declare namespace DocumentFactory {
|
|
16
|
-
type InitArguments = StrictOmit<OpraSchema.ApiDocument, 'references' | 'types' | 'resources'> & {
|
|
17
|
-
references?: Record<string, string | OpraSchema.ApiDocument | ApiDocument>;
|
|
18
|
-
resources?: ThunkAsync<Type | object>[] | Record<OpraSchema.Resource.Name, OpraSchema.Resource>;
|
|
19
|
-
types?: ThunkAsync<Type | OpraSchema.EnumThunk>[] | Record<string, OpraSchema.DataType>;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @class DocumentFactory
|
|
24
|
-
*/
|
|
25
|
-
export declare class DocumentFactory {
|
|
26
|
-
protected document: ApiDocument;
|
|
27
|
-
protected typeQueue: ResponsiveMap<OpraSchema.DataType>;
|
|
28
|
-
protected resourceQueue: ResponsiveMap<OpraSchema.Resource>;
|
|
29
|
-
protected circularRefs: ResponsiveMap<any>;
|
|
30
|
-
protected curPath: string[];
|
|
31
|
-
protected cache: Map<any, any>;
|
|
32
|
-
protected createDocument: typeof createDocument;
|
|
33
|
-
protected createDocumentFromUrl: typeof createDocumentFromUrl;
|
|
34
|
-
protected createBuiltinTypeDocument: typeof createBuiltinTypeDocument;
|
|
35
|
-
protected addReferences: typeof addReferences;
|
|
36
|
-
protected importTypeClass: typeof importTypeClass;
|
|
37
|
-
protected extractSimpleTypeSchema: typeof extractSimpleTypeSchema;
|
|
38
|
-
protected extractComplexTypeSchema: typeof extractComplexTypeSchema;
|
|
39
|
-
protected extractMappedTypeSchema: typeof extractMappedTypeSchema;
|
|
40
|
-
protected extractUnionTypeSchema: typeof extractUnionTypeSchema;
|
|
41
|
-
protected extractEnumTypeSchema: typeof extractEnumTypeSchema;
|
|
42
|
-
protected extractFieldSchema: typeof extractFieldSchema;
|
|
43
|
-
protected processTypes: typeof processTypes;
|
|
44
|
-
protected createDataTypeInstance: typeof createDataTypeInstance;
|
|
45
|
-
protected addDataType: typeof addDataType;
|
|
46
|
-
protected importResourceClass: typeof importResourceClass;
|
|
47
|
-
protected extractSingletonSchema: typeof extractSingletonSchema;
|
|
48
|
-
protected extractCollectionSchema: typeof extractCollectionSchema;
|
|
49
|
-
protected processResourceQueue: typeof processResourceQueue;
|
|
50
|
-
protected createCollection: typeof createCollection;
|
|
51
|
-
protected createSingleton: typeof createSingleton;
|
|
52
|
-
/**
|
|
53
|
-
* Creates ApiDocument instance from given schema object
|
|
54
|
-
* @param init
|
|
55
|
-
*/
|
|
56
|
-
static createDocument(init: DocumentFactory.InitArguments): Promise<ApiDocument>;
|
|
57
|
-
/**
|
|
58
|
-
* Downloads schema from the given URL and creates the document instance * @param url
|
|
59
|
-
*/
|
|
60
|
-
static createDocumentFromUrl(url: string): Promise<ApiDocument>;
|
|
61
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
import { Type } from 'ts-gems';
|
|
3
|
-
import { OpraSchema } from '../../schema/index.js';
|
|
4
|
-
import type { ThunkAsync } from '../../types.js';
|
|
5
|
-
import type { Collection } from '../resource/collection.js';
|
|
6
|
-
import type { Singleton } from '../resource/singleton.js';
|
|
7
|
-
import type { DocumentFactory } from './factory.js';
|
|
8
|
-
export declare function importResourceClass(this: DocumentFactory, thunk: ThunkAsync<Type | object>): Promise<void>;
|
|
9
|
-
export declare function extractSingletonSchema(this: DocumentFactory, target: OpraSchema.Singleton, ctor: Type, metadata: Singleton.Metadata, controller: object | Type): Promise<void>;
|
|
10
|
-
export declare function extractCollectionSchema(this: DocumentFactory, target: OpraSchema.Collection, ctor: Type, metadata: Collection.Metadata, controller: object | Type): Promise<void>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Type } from 'ts-gems';
|
|
2
|
-
import { OpraSchema } from '../../schema/index.js';
|
|
3
|
-
import type { ThunkAsync } from '../../types.js';
|
|
4
|
-
import type { ApiField } from '../data-type/api-field.js';
|
|
5
|
-
import type { ComplexType } from '../data-type/complex-type.js';
|
|
6
|
-
import type { EnumType } from '../data-type/enum-type.js';
|
|
7
|
-
import type { MappedType } from '../data-type/mapped-type.js';
|
|
8
|
-
import type { SimpleType } from '../data-type/simple-type.js';
|
|
9
|
-
import type { UnionType } from '../data-type/union-type.js';
|
|
10
|
-
import type { DocumentFactory } from './factory.js';
|
|
11
|
-
export declare function importTypeClass(this: DocumentFactory, typeThunk: ThunkAsync<Type | OpraSchema.EnumThunk>): Promise<string | OpraSchema.DataType>;
|
|
12
|
-
export declare function extractSimpleTypeSchema(this: DocumentFactory, target: OpraSchema.SimpleType, ctor: Type, metadata: SimpleType.Metadata): Promise<void>;
|
|
13
|
-
export declare function extractComplexTypeSchema(this: DocumentFactory, target: OpraSchema.ComplexType, ctor: Type, metadata: ComplexType.Metadata): Promise<void>;
|
|
14
|
-
export declare function extractMappedTypeSchema(this: DocumentFactory, target: OpraSchema.MappedType, ctor: Type, metadata: MappedType.Metadata): Promise<void>;
|
|
15
|
-
export declare function extractUnionTypeSchema(this: DocumentFactory, target: OpraSchema.UnionType, ctor: Type, metadata: UnionType.Metadata): Promise<void>;
|
|
16
|
-
export declare function extractEnumTypeSchema(this: DocumentFactory, target: OpraSchema.EnumType, enumObject: any, metadata: EnumType.Metadata): Promise<void>;
|
|
17
|
-
export declare function extractFieldSchema(this: DocumentFactory, target: OpraSchema.Field, ctor: Type, metadata: ApiField.Metadata, name: string): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './factory.js';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OpraSchema } from '../../schema/index.js';
|
|
2
|
-
import { Collection } from '../resource/collection.js';
|
|
3
|
-
import { Singleton } from '../resource/singleton.js';
|
|
4
|
-
import type { DocumentFactory } from './factory.js';
|
|
5
|
-
export declare function processResourceQueue(this: DocumentFactory): Promise<void>;
|
|
6
|
-
export declare function createCollection(this: DocumentFactory, name: string, schema: OpraSchema.Collection): Promise<Collection>;
|
|
7
|
-
export declare function createSingleton(this: DocumentFactory, name: string, schema: OpraSchema.Singleton): Promise<Singleton>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { OpraSchema } from '../../schema/index.js';
|
|
2
|
-
import { DataType } from '../data-type/data-type.js';
|
|
3
|
-
import type { DocumentFactory } from './factory.js';
|
|
4
|
-
export declare function processTypes(this: DocumentFactory): Promise<void>;
|
|
5
|
-
export declare function createDataTypeInstance(this: DocumentFactory, kind: OpraSchema.DataType.Kind, name?: string): DataType;
|
|
6
|
-
export declare function addDataType(this: DocumentFactory, schemaOrName: OpraSchema.DataType | string): DataType;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata';
|
|
2
|
-
export * from './constants.js';
|
|
3
|
-
export * from './api-document.js';
|
|
4
|
-
export * from './factory/index.js';
|
|
5
|
-
export * from './data-type/data-type.js';
|
|
6
|
-
export * from './data-type/complex-type.js';
|
|
7
|
-
export * from './data-type/api-field.js';
|
|
8
|
-
export * from './data-type/enum-type.js';
|
|
9
|
-
export * from './data-type/mapped-type.js';
|
|
10
|
-
export * from './data-type/simple-type.js';
|
|
11
|
-
export * from './data-type/union-type.js';
|
|
12
|
-
export * from './resource/resource.js';
|
|
13
|
-
export * from './resource/collection.js';
|
|
14
|
-
export * from './resource/singleton.js';
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { StrictOmit } from 'ts-gems';
|
|
2
|
-
import { Expression } from '../../filter/index.js';
|
|
3
|
-
import { OpraSchema } from '../../schema/index.js';
|
|
4
|
-
import type { TypeThunkAsync } from '../../types.js';
|
|
5
|
-
import type { ApiDocument } from '../api-document.js';
|
|
6
|
-
import type { ComplexType } from '../data-type/complex-type.js';
|
|
7
|
-
import { Resource } from './resource.js';
|
|
8
|
-
export declare namespace Collection {
|
|
9
|
-
export interface InitArguments extends Resource.InitArguments, Pick<OpraSchema.Collection, 'primaryKey'> {
|
|
10
|
-
type: ComplexType;
|
|
11
|
-
operations: Operations;
|
|
12
|
-
}
|
|
13
|
-
export interface DecoratorOptions extends Resource.DecoratorOptions, Partial<Pick<OpraSchema.Collection, 'primaryKey'>> {
|
|
14
|
-
}
|
|
15
|
-
export interface Metadata extends StrictOmit<OpraSchema.Collection, 'type'> {
|
|
16
|
-
name: string;
|
|
17
|
-
type: TypeThunkAsync | string;
|
|
18
|
-
}
|
|
19
|
-
interface Operation {
|
|
20
|
-
handlerName?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface Operations {
|
|
23
|
-
create?: OpraSchema.Collection.CreateOperation & Operation;
|
|
24
|
-
delete?: OpraSchema.Collection.DeleteOperation & Operation;
|
|
25
|
-
get?: OpraSchema.Collection.GetOperation & Operation;
|
|
26
|
-
update?: OpraSchema.Collection.UpdateOperation & Operation;
|
|
27
|
-
deleteMany?: OpraSchema.Collection.DeleteManyOperation & Operation;
|
|
28
|
-
findMany?: OpraSchema.Collection.FindManyOperation & Operation;
|
|
29
|
-
updateMany?: OpraSchema.Collection.UpdateManyOperation & Operation;
|
|
30
|
-
}
|
|
31
|
-
export type CreateOperationOptions = StrictOmit<OpraSchema.Collection.CreateOperation, 'handler'>;
|
|
32
|
-
export type DeleteOperationOptions = StrictOmit<OpraSchema.Collection.DeleteOperation, 'handler'>;
|
|
33
|
-
export type DeleteManyOperationOptions = StrictOmit<OpraSchema.Collection.DeleteManyOperation, 'handler'>;
|
|
34
|
-
export type FindManyOperationOptions = StrictOmit<OpraSchema.Collection.FindManyOperation, 'handler'>;
|
|
35
|
-
export type GetOperationOptions = StrictOmit<OpraSchema.Collection.GetOperation, 'handler'>;
|
|
36
|
-
export type UpdateOperationOptions = StrictOmit<OpraSchema.Collection.UpdateOperation, 'handler'>;
|
|
37
|
-
export type UpdateManyOperationOptions = StrictOmit<OpraSchema.Collection.UpdateManyOperation, 'handler'>;
|
|
38
|
-
export {};
|
|
39
|
-
}
|
|
40
|
-
export interface Collection extends StrictOmit<Resource, 'exportSchema' | '_construct'> {
|
|
41
|
-
readonly type: ComplexType;
|
|
42
|
-
readonly operations: Collection.Operations;
|
|
43
|
-
readonly controller?: object;
|
|
44
|
-
readonly primaryKey: string[];
|
|
45
|
-
exportSchema(): OpraSchema.Collection;
|
|
46
|
-
parseKeyValue(value: any): any;
|
|
47
|
-
normalizeFieldPath(fields: string): string;
|
|
48
|
-
normalizeFieldPath(fields: string[]): string[];
|
|
49
|
-
normalizeFieldPath(fields: string | string[]): string | string[];
|
|
50
|
-
normalizeSortFields(fields: string | string[]): string[];
|
|
51
|
-
normalizeFilter(ast: Expression): Expression;
|
|
52
|
-
_construct(init: Collection.InitArguments): void;
|
|
53
|
-
}
|
|
54
|
-
export interface CollectionConstructor {
|
|
55
|
-
prototype: Collection;
|
|
56
|
-
new (document: ApiDocument, init: Collection.InitArguments): Collection;
|
|
57
|
-
(type: TypeThunkAsync | string, options?: Collection.DecoratorOptions): ClassDecorator;
|
|
58
|
-
Create: (options?: Collection.CreateOperationOptions) => PropertyDecorator;
|
|
59
|
-
Delete: (options?: Collection.DeleteOperationOptions) => PropertyDecorator;
|
|
60
|
-
Get: (options?: Collection.GetOperationOptions) => PropertyDecorator;
|
|
61
|
-
Update: (options?: Collection.UpdateOperationOptions) => PropertyDecorator;
|
|
62
|
-
FindMany: (options?: Collection.FindManyOperationOptions) => PropertyDecorator;
|
|
63
|
-
DeleteMany: (options?: Collection.DeleteManyOperationOptions) => PropertyDecorator;
|
|
64
|
-
UpdateMany: (options?: Collection.UpdateManyOperationOptions) => PropertyDecorator;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
*
|
|
68
|
-
*/
|
|
69
|
-
export declare const Collection: CollectionConstructor;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { StrictOmit, Type } from 'ts-gems';
|
|
2
|
-
import { OpraSchema } from '../../schema/index.js';
|
|
3
|
-
import type { ApiDocument } from '../api-document.js';
|
|
4
|
-
import { nodeInspectCustom } from '../utils/inspect.util.js';
|
|
5
|
-
export declare namespace Resource {
|
|
6
|
-
interface InitArguments extends StrictOmit<OpraSchema.ResourceBase, 'kind'> {
|
|
7
|
-
name: string;
|
|
8
|
-
controller?: object | Type;
|
|
9
|
-
}
|
|
10
|
-
interface DecoratorOptions extends Partial<Pick<InitArguments, 'name' | 'description'>> {
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export interface Resource {
|
|
14
|
-
readonly document: ApiDocument;
|
|
15
|
-
readonly kind: OpraSchema.Resource.Kind;
|
|
16
|
-
readonly name: string;
|
|
17
|
-
readonly description?: string;
|
|
18
|
-
readonly controller?: object | Type;
|
|
19
|
-
exportSchema(): OpraSchema.ResourceBase;
|
|
20
|
-
toString(): string;
|
|
21
|
-
[nodeInspectCustom](): string;
|
|
22
|
-
_construct(init: Resource.InitArguments): void;
|
|
23
|
-
}
|
|
24
|
-
export interface ResourceConstructor {
|
|
25
|
-
readonly prototype: Resource;
|
|
26
|
-
new (document: ApiDocument, init: Resource.InitArguments): Resource;
|
|
27
|
-
(...args: any[]): void;
|
|
28
|
-
}
|
|
29
|
-
export declare const Resource: ResourceConstructor;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { StrictOmit, Type } from 'ts-gems';
|
|
2
|
-
import { OpraSchema } from '../../schema/index.js';
|
|
3
|
-
import type { TypeThunkAsync } from '../../types.js';
|
|
4
|
-
import type { ApiDocument } from '../api-document.js';
|
|
5
|
-
import { ComplexType } from '../data-type/complex-type.js';
|
|
6
|
-
import { Resource } from './resource.js';
|
|
7
|
-
export declare namespace Singleton {
|
|
8
|
-
export interface InitArguments extends Resource.InitArguments, Pick<OpraSchema.Singleton, 'operations'> {
|
|
9
|
-
type: ComplexType;
|
|
10
|
-
}
|
|
11
|
-
export interface DecoratorOptions extends Resource.DecoratorOptions {
|
|
12
|
-
}
|
|
13
|
-
export interface Metadata extends StrictOmit<OpraSchema.Singleton, 'type'> {
|
|
14
|
-
name: string;
|
|
15
|
-
type: TypeThunkAsync | string;
|
|
16
|
-
}
|
|
17
|
-
interface Operation {
|
|
18
|
-
handlerName?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface Operations {
|
|
21
|
-
create?: OpraSchema.Singleton.CreateOperation & Operation;
|
|
22
|
-
delete?: OpraSchema.Singleton.DeleteOperation & Operation;
|
|
23
|
-
get?: OpraSchema.Singleton.GetOperation & Operation;
|
|
24
|
-
update?: OpraSchema.Singleton.UpdateOperation & Operation;
|
|
25
|
-
}
|
|
26
|
-
export type CreateOperationOptions = StrictOmit<OpraSchema.Singleton.CreateOperation, 'handler'>;
|
|
27
|
-
export type DeleteOperationOptions = StrictOmit<OpraSchema.Singleton.DeleteOperation, 'handler'>;
|
|
28
|
-
export type GetOperationOptions = StrictOmit<OpraSchema.Singleton.GetOperation, 'handler'>;
|
|
29
|
-
export type UpdateOperationOptions = StrictOmit<OpraSchema.Singleton.UpdateOperation, 'handler'>;
|
|
30
|
-
export {};
|
|
31
|
-
}
|
|
32
|
-
export interface Singleton extends StrictOmit<Resource, 'exportSchema' | '_construct'> {
|
|
33
|
-
readonly type: ComplexType;
|
|
34
|
-
readonly operations: Singleton.Operations;
|
|
35
|
-
readonly controller?: object | Type;
|
|
36
|
-
exportSchema(): OpraSchema.Singleton;
|
|
37
|
-
normalizeFieldPath(fields: string): string;
|
|
38
|
-
normalizeFieldPath(fields: string[]): string[];
|
|
39
|
-
normalizeFieldPath(fields: string | string[]): string | string[];
|
|
40
|
-
_construct(init: Singleton.InitArguments): void;
|
|
41
|
-
}
|
|
42
|
-
export interface SingletonConstructor {
|
|
43
|
-
prototype: Singleton;
|
|
44
|
-
new (document: ApiDocument, init: Singleton.InitArguments): Singleton;
|
|
45
|
-
(type: TypeThunkAsync | string, options?: Singleton.DecoratorOptions): ClassDecorator;
|
|
46
|
-
Create: (options?: Singleton.CreateOperationOptions) => PropertyDecorator;
|
|
47
|
-
Delete: (options?: Singleton.DeleteOperationOptions) => PropertyDecorator;
|
|
48
|
-
Get: (options?: Singleton.GetOperationOptions) => PropertyDecorator;
|
|
49
|
-
Update: (options?: Singleton.UpdateOperationOptions) => PropertyDecorator;
|
|
50
|
-
}
|
|
51
|
-
export declare const Singleton: SingletonConstructor;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function stringCompare(a: string, b: string): number;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare namespace IssueSeverity {
|
|
2
|
-
enum Enum {
|
|
3
|
-
'fatal' = "fatal",
|
|
4
|
-
'error' = "error",
|
|
5
|
-
'warning' = "warning",
|
|
6
|
-
'info' = "info"
|
|
7
|
-
}
|
|
8
|
-
const name = "IssueSeverity";
|
|
9
|
-
const description = "Severity of the issue";
|
|
10
|
-
const Keys: string[];
|
|
11
|
-
type Type = keyof typeof Enum;
|
|
12
|
-
const descriptions: Record<Enum, string>;
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { OpraException } from '../opra-exception.js';
|
|
2
|
-
/**
|
|
3
|
-
* 400 Bad Request
|
|
4
|
-
* The server cannot or will not process the request due to something that is perceived to be a client error
|
|
5
|
-
* (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
|
|
6
|
-
*/
|
|
7
|
-
export declare class BadRequestError extends OpraException {
|
|
8
|
-
status: number;
|
|
9
|
-
setIssue(issue: any): void;
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OpraException } from '../opra-exception.js';
|
|
2
|
-
/**
|
|
3
|
-
* 424 Failed Dependency
|
|
4
|
-
* The request failed due to failure of a previous request.
|
|
5
|
-
*/
|
|
6
|
-
export declare class FailedDependencyError extends OpraException {
|
|
7
|
-
status: number;
|
|
8
|
-
setIssue(issue: any): void;
|
|
9
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { OpraException } from '../opra-exception.js';
|
|
2
|
-
/**
|
|
3
|
-
* 403 Forbidden
|
|
4
|
-
* The client does not have access rights to the content; that is, it is unauthorized,
|
|
5
|
-
* so the server is refusing to give the requested resource. Unlike 401 Unauthorized,
|
|
6
|
-
* the client's identity is known to the server.
|
|
7
|
-
*/
|
|
8
|
-
export declare class ForbiddenError extends OpraException {
|
|
9
|
-
status: number;
|
|
10
|
-
setIssue(issue: any): void;
|
|
11
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OpraException } from '../opra-exception.js';
|
|
2
|
-
/**
|
|
3
|
-
* 500 Internal Server Error
|
|
4
|
-
* The server has encountered a situation it does not know how to handle.
|
|
5
|
-
*/
|
|
6
|
-
export declare class InternalServerError extends OpraException {
|
|
7
|
-
status: number;
|
|
8
|
-
setIssue(issue: any): void;
|
|
9
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { OpraException } from '../opra-exception.js';
|
|
2
|
-
/**
|
|
3
|
-
* 405 Method Not Allowed
|
|
4
|
-
* The request method is known by the server but is not supported by the target resource.
|
|
5
|
-
* For example, an API may not allow calling DELETE to remove a resource.
|
|
6
|
-
*/
|
|
7
|
-
export declare class MethodNotAllowedError extends OpraException {
|
|
8
|
-
status: number;
|
|
9
|
-
setIssue(issue: any): void;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { OpraException } from '../opra-exception.js';
|
|
2
|
-
/**
|
|
3
|
-
* 406 Not Acceptable
|
|
4
|
-
* This response is sent when the web server, after performing server-driven content negotiation,
|
|
5
|
-
* doesn't find any content that conforms to the criteria given by the user agent.
|
|
6
|
-
*/
|
|
7
|
-
export declare class NotAcceptableError extends OpraException {
|
|
8
|
-
status: number;
|
|
9
|
-
setIssue(issue: any): void;
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { OpraException } from '../opra-exception.js';
|
|
2
|
-
/**
|
|
3
|
-
* 404 Not Found
|
|
4
|
-
* The server can not find the requested resource. In the browser, this means the URL is not recognized.
|
|
5
|
-
* In an API, this can also mean that the endpoint is valid but the resource itself does not exist.
|
|
6
|
-
* Servers may also send this response instead of 403 Forbidden to hide the existence of a resource
|
|
7
|
-
* from an unauthorized client. This response code is probably the most well known due to its
|
|
8
|
-
* frequent occurrence on the web.
|
|
9
|
-
*/
|
|
10
|
-
export declare class NotFoundError extends OpraException {
|
|
11
|
-
status: number;
|
|
12
|
-
setIssue(issue: any): void;
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { OpraException } from '../opra-exception.js';
|
|
2
|
-
/**
|
|
3
|
-
* 401 Unauthorized
|
|
4
|
-
* Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated".
|
|
5
|
-
* That is, the client must authenticate itself to get the requested response.
|
|
6
|
-
*/
|
|
7
|
-
export declare class UnauthorizedError extends OpraException {
|
|
8
|
-
status: number;
|
|
9
|
-
setIssue(issue: any): void;
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OpraException } from '../opra-exception.js';
|
|
2
|
-
/**
|
|
3
|
-
* 422 Unprocessable Entity
|
|
4
|
-
* The request was well-formed but was unable to be followed due to semantic errors.
|
|
5
|
-
*/
|
|
6
|
-
export declare class UnprocessableEntityError extends OpraException {
|
|
7
|
-
status: number;
|
|
8
|
-
setIssue(issue: any): void;
|
|
9
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from './opra-exception.js';
|
|
2
|
-
export * from './error-issue.js';
|
|
3
|
-
export * from './wrap-exception.js';
|
|
4
|
-
export * from './enums/issue-severity.enum.js';
|
|
5
|
-
export * from './http-errors/bad-request.error.js';
|
|
6
|
-
export * from './http-errors/failed-dependency.error.js';
|
|
7
|
-
export * from './http-errors/forbidden.error.js';
|
|
8
|
-
export * from './http-errors/internal-server.error.js';
|
|
9
|
-
export * from './http-errors/method-not-allowed.error.js';
|
|
10
|
-
export * from './http-errors/not-acceptable.error.js';
|
|
11
|
-
export * from './http-errors/not-found.error.js';
|
|
12
|
-
export * from './http-errors/unauthorized.error.js';
|
|
13
|
-
export * from './http-errors/unprocessable-entity.error.js';
|
|
14
|
-
export * from './resource-errors/resource-conflict.error.js';
|
|
15
|
-
export * from './resource-errors/resource-not-found.error.js';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ErrorIssue } from './error-issue.js';
|
|
2
|
-
/**
|
|
3
|
-
* Defines the base Opra exception, which is handled by the default Exceptions Handler.
|
|
4
|
-
*/
|
|
5
|
-
export declare class OpraException extends Error {
|
|
6
|
-
protected _issue: ErrorIssue;
|
|
7
|
-
status: number;
|
|
8
|
-
cause?: Error;
|
|
9
|
-
constructor(issue?: string | Partial<ErrorIssue>, cause?: Error);
|
|
10
|
-
get issue(): ErrorIssue;
|
|
11
|
-
setIssue(issue: Partial<ErrorIssue>): void;
|
|
12
|
-
setStatus(status: number): this;
|
|
13
|
-
protected _initName(): void;
|
|
14
|
-
protected _init(issue: Error | Partial<ErrorIssue> | string): void;
|
|
15
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { OpraException } from '../opra-exception.js';
|
|
2
|
-
/**
|
|
3
|
-
* The server cannot find the requested resource.
|
|
4
|
-
* This can also mean that the endpoint is valid but the resource itself does not exist.
|
|
5
|
-
*/
|
|
6
|
-
export declare class ResourceNotFoundError extends OpraException {
|
|
7
|
-
constructor(resource: string, keyValue?: any, cause?: Error);
|
|
8
|
-
}
|