@opra/client 0.7.0 → 0.8.0
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/README.md +1 -1
- package/cjs/714.min.cjs +1 -0
- package/cjs/antlr4ts.min.cjs +2 -0
- package/cjs/antlr4ts.min.cjs.LICENSE.txt +4 -0
- package/cjs/main.min.cjs +1 -0
- package/cjs/opra-common.min.cjs +1 -0
- package/cjs/vendors.min.cjs +2 -0
- package/cjs/vendors.min.cjs.LICENSE.txt +52 -0
- package/esm/714.min.mjs +1 -0
- package/esm/antlr4ts.min.mjs +2 -0
- package/esm/antlr4ts.min.mjs.LICENSE.txt +4 -0
- package/esm/main.min.mjs +1 -0
- package/esm/opra-common.min.mjs +1 -0
- package/esm/vendors.min.mjs +2 -0
- package/esm/vendors.min.mjs.LICENSE.txt +52 -0
- package/package.json +22 -50
- package/{esm → typings}/client-error.d.ts +1 -1
- package/typings/common/constants.d.ts +0 -0
- package/typings/common/exception/enums/issue-severity.enum.d.ts +13 -0
- package/typings/common/exception/error-issue.d.ts +9 -0
- package/typings/common/exception/http-errors/bad-request.error.d.ts +10 -0
- package/typings/common/exception/http-errors/failed-dependency.error.d.ts +9 -0
- package/typings/common/exception/http-errors/forbidden.error.d.ts +11 -0
- package/typings/common/exception/http-errors/internal-server.error.d.ts +9 -0
- package/typings/common/exception/http-errors/method-not-allowed.error.d.ts +10 -0
- package/typings/common/exception/http-errors/not-acceptable.error.d.ts +10 -0
- package/typings/common/exception/http-errors/not-found.error.d.ts +13 -0
- package/typings/common/exception/http-errors/unauthorized.error.d.ts +10 -0
- package/typings/common/exception/http-errors/unprocessable-entity.error.d.ts +9 -0
- package/typings/common/exception/index.d.ts +15 -0
- package/typings/common/exception/opra-exception.d.ts +15 -0
- package/typings/common/exception/resource-errors/resource-conflict.error.d.ts +5 -0
- package/typings/common/exception/resource-errors/resource-not-found.error.d.ts +4 -0
- package/typings/common/exception/wrap-exception.d.ts +2 -0
- package/typings/common/filter/antlr/OpraFilterLexer.d.ts +78 -0
- package/typings/common/filter/antlr/OpraFilterParser.d.ts +365 -0
- package/typings/common/filter/antlr/OpraFilterVisitor.d.ts +290 -0
- package/typings/common/filter/ast/abstract/ast.d.ts +5 -0
- package/typings/common/filter/ast/abstract/expression.d.ts +3 -0
- package/typings/common/filter/ast/abstract/literal.d.ts +6 -0
- package/typings/common/filter/ast/abstract/term.d.ts +3 -0
- package/typings/common/filter/ast/expressions/arithmetic-expression.d.ts +13 -0
- package/typings/common/filter/ast/expressions/array-expression.d.ts +7 -0
- package/typings/common/filter/ast/expressions/comparison-expression.d.ts +10 -0
- package/typings/common/filter/ast/expressions/logical-expression.d.ts +8 -0
- package/typings/common/filter/ast/expressions/parentheses-expression.d.ts +6 -0
- package/typings/common/filter/ast/index.d.ts +16 -0
- package/typings/common/filter/ast/terms/boolean-literal.d.ts +5 -0
- package/typings/common/filter/ast/terms/date-literal.d.ts +6 -0
- package/typings/common/filter/ast/terms/external-constant.d.ts +5 -0
- package/typings/common/filter/ast/terms/null-literal.d.ts +5 -0
- package/typings/common/filter/ast/terms/number-literal.d.ts +6 -0
- package/typings/common/filter/ast/terms/qualified-identifier.d.ts +4 -0
- package/typings/common/filter/ast/terms/string-literal.d.ts +5 -0
- package/typings/common/filter/ast/terms/time-literal.d.ts +6 -0
- package/typings/common/filter/build.d.ts +31 -0
- package/typings/common/filter/error-listener.d.ts +8 -0
- package/typings/common/filter/errors.d.ts +20 -0
- package/typings/common/filter/filter-tree-visitor.d.ts +30 -0
- package/typings/common/filter/index.d.ts +5 -0
- package/typings/common/filter/parse.d.ts +2 -0
- package/typings/common/filter/utils.d.ts +2 -0
- package/typings/common/helpers/index.d.ts +1 -0
- package/typings/common/helpers/responsive-map.d.ts +18 -0
- package/typings/common/http/enums/http-headers.enum.d.ts +379 -0
- package/typings/common/http/enums/http-status.enum.d.ts +290 -0
- package/typings/common/http/http-request.d.ts +34 -0
- package/typings/common/http/index.d.ts +6 -0
- package/typings/common/http/interfaces/client-http-headers.interface.d.ts +65 -0
- package/typings/common/http/interfaces/server-http-headers.interface.d.ts +1 -0
- package/typings/common/http/multipart/batch-multipart.d.ts +31 -0
- package/typings/common/http/multipart/http-request-content.d.ts +8 -0
- package/typings/common/http/multipart/http-response-content.d.ts +7 -0
- package/typings/common/http/multipart/index.d.ts +1 -0
- package/typings/common/http/utils/normalize-headers.d.ts +1 -0
- package/typings/common/i18n/i18n.d.ts +28 -0
- package/typings/common/i18n/index.d.ts +5 -0
- package/typings/common/i18n/string-utils.d.ts +2 -0
- package/typings/common/i18n/translate.d.ts +4 -0
- package/typings/common/index.d.ts +10 -0
- package/typings/common/schema/constants.d.ts +8 -0
- package/typings/common/schema/decorators/opr-collection-resource.decorator.d.ts +8 -0
- package/typings/common/schema/decorators/opr-complex-type.decorator.d.ts +6 -0
- package/typings/common/schema/decorators/opr-field.decorator.d.ts +3 -0
- package/typings/common/schema/decorators/opr-resolver.decorator.d.ts +8 -0
- package/typings/common/schema/decorators/opr-simple-type.decorator.d.ts +6 -0
- package/typings/common/schema/decorators/opr-singleton-resource.decorator.d.ts +8 -0
- package/typings/common/schema/implementation/data-type/builtin/any.type.d.ts +2 -0
- package/typings/common/schema/implementation/data-type/builtin/base64-binary.type.d.ts +2 -0
- package/typings/common/schema/implementation/data-type/builtin/bigint.type.d.ts +2 -0
- package/typings/common/schema/implementation/data-type/builtin/boolean.type.d.ts +2 -0
- package/typings/common/schema/implementation/data-type/builtin/date-string.type.d.ts +2 -0
- package/typings/common/schema/implementation/data-type/builtin/date.type.d.ts +2 -0
- package/typings/common/schema/implementation/data-type/builtin/guid.type.d.ts +2 -0
- package/typings/common/schema/implementation/data-type/builtin/integer.type.d.ts +2 -0
- package/typings/common/schema/implementation/data-type/builtin/number.type.d.ts +2 -0
- package/typings/common/schema/implementation/data-type/builtin/object.type.d.ts +2 -0
- package/typings/common/schema/implementation/data-type/builtin/string.type.d.ts +2 -0
- package/typings/common/schema/implementation/data-type/builtin-data-types.d.ts +4 -0
- package/typings/common/schema/implementation/data-type/complex-type.d.ts +29 -0
- package/typings/common/schema/implementation/data-type/data-type.d.ts +16 -0
- package/typings/common/schema/implementation/data-type/simple-type.d.ts +12 -0
- package/typings/common/schema/implementation/data-type/union-type.d.ts +16 -0
- package/typings/common/schema/implementation/document-builder.d.ts +16 -0
- package/typings/common/schema/implementation/opra-document.d.ts +44 -0
- package/typings/common/schema/implementation/query/collection-count-query.d.ts +14 -0
- package/typings/common/schema/implementation/query/collection-create-query.d.ts +18 -0
- package/typings/common/schema/implementation/query/collection-delete-many-query.d.ts +14 -0
- package/typings/common/schema/implementation/query/collection-delete-query.d.ts +10 -0
- package/typings/common/schema/implementation/query/collection-get-query.d.ts +21 -0
- package/typings/common/schema/implementation/query/collection-search-query.d.ts +30 -0
- package/typings/common/schema/implementation/query/collection-update-many-query.d.ts +15 -0
- package/typings/common/schema/implementation/query/collection-update-query.d.ts +19 -0
- package/typings/common/schema/implementation/query/field-get-query.d.ts +30 -0
- package/typings/common/schema/implementation/query/index.d.ts +27 -0
- package/typings/common/schema/implementation/query/singleton-get-query.d.ts +20 -0
- package/typings/common/schema/implementation/resource/collection-resource-info.d.ts +19 -0
- package/typings/common/schema/implementation/resource/container-resource-info.d.ts +13 -0
- package/typings/common/schema/implementation/resource/resource-info.d.ts +17 -0
- package/typings/common/schema/implementation/resource/singleton-resource-info.d.ts +14 -0
- package/typings/common/schema/implementation/schema-builder/extract-resource-metadata.util.d.ts +3 -0
- package/typings/common/schema/implementation/schema-builder/extract-type-metadata.util.d.ts +4 -0
- package/typings/common/schema/index.d.ts +25 -0
- package/typings/common/schema/interfaces/child-field-query.interface.d.ts +4 -0
- package/typings/common/schema/interfaces/data-type.metadata.d.ts +18 -0
- package/typings/common/schema/interfaces/resource-container.interface.d.ts +8 -0
- package/typings/common/schema/interfaces/resource.metadata.d.ts +18 -0
- package/typings/common/schema/opra-schema.definition.d.ts +178 -0
- package/typings/common/schema/type-helpers/extend-type.helper.d.ts +3 -0
- package/typings/common/schema/type-helpers/mixin-type.helper.d.ts +2 -0
- package/typings/common/schema/type-helpers/mixin.utils.d.ts +3 -0
- package/typings/common/schema/types.d.ts +14 -0
- package/typings/common/schema/utils/class.utils.d.ts +2 -0
- package/typings/common/schema/utils/clone-object.util.d.ts +1 -0
- package/typings/common/schema/utils/inspect.util.d.ts +4 -0
- package/typings/common/schema/utils/normalize-field-array.util.d.ts +3 -0
- package/typings/common/schema/utils/path-to-tree.util.d.ts +4 -0
- package/typings/common/schema/utils/string-compare.util.d.ts +1 -0
- package/typings/common/url/formats/boolean-format.d.ts +5 -0
- package/typings/common/url/formats/date-format.d.ts +16 -0
- package/typings/common/url/formats/filter-format.d.ts +6 -0
- package/typings/common/url/formats/format.d.ts +4 -0
- package/typings/common/url/formats/integer-format.d.ts +9 -0
- package/typings/common/url/formats/number-format.d.ts +12 -0
- package/typings/common/url/formats/string-format.d.ts +14 -0
- package/typings/common/url/index.d.ts +5 -0
- package/typings/common/url/opra-url-path-component.d.ts +15 -0
- package/typings/common/url/opra-url-path.d.ts +30 -0
- package/typings/common/url/opra-url-search-params.d.ts +44 -0
- package/typings/common/url/opra-url.d.ts +79 -0
- package/typings/common/url/utils/path-utils.d.ts +8 -0
- package/typings/common/utils/index.d.ts +3 -0
- package/typings/common/utils/is-url.d.ts +1 -0
- package/typings/common/utils/path-to-tree.d.ts +4 -0
- package/typings/common/utils/type-guards.d.ts +9 -0
- package/{esm → typings}/constants.d.ts +0 -0
- package/{esm → typings}/http/http-client.d.ts +1 -1
- package/{esm → typings}/http/http-collection-service.d.ts +1 -1
- package/{esm → typings}/http/http-request.d.ts +1 -1
- package/{esm → typings}/http/http-response.d.ts +0 -0
- package/{esm → typings}/http/http-singleton-service.d.ts +1 -1
- package/{esm → typings}/http/http-types.d.ts +1 -1
- package/{esm → typings}/http/requests/batch-request.d.ts +1 -1
- package/{esm → typings}/http/requests/collection-create-request.d.ts +1 -1
- package/{esm → typings}/http/requests/collection-delete-many-request.d.ts +1 -1
- package/{esm → typings}/http/requests/collection-delete-request.d.ts +1 -1
- package/{esm → typings}/http/requests/collection-get-request.d.ts +1 -1
- package/{esm → typings}/http/requests/collection-search-request.d.ts +1 -1
- package/{esm → typings}/http/requests/collection-update-many-request.d.ts +1 -1
- package/{esm → typings}/http/requests/collection-update-request.d.ts +1 -1
- package/{esm → typings}/http/requests/http-singleton-get-request.d.ts +1 -1
- package/{esm → typings}/http/utils/merge-raw-http-requests.util.d.ts +0 -0
- package/{esm → typings}/index.d.ts +0 -1
- package/{esm → typings}/interfaces/http-options.interface.d.ts +1 -4
- package/{esm → typings}/interfaces/http-request-config.interface.d.ts +1 -1
- package/umd/714.min.cjs +1 -0
- package/umd/antlr4ts.min.cjs +2 -0
- package/umd/antlr4ts.min.cjs.LICENSE.txt +4 -0
- package/umd/main.min.cjs +1 -0
- package/umd/opra-common.min.cjs +1 -0
- package/umd/vendors.min.cjs +2 -0
- package/umd/vendors.min.cjs.LICENSE.txt +52 -0
- package/cjs/client-error.js +0 -20
- package/cjs/constants.js +0 -6
- package/cjs/http/http-client.js +0 -164
- package/cjs/http/http-collection-service.js +0 -40
- package/cjs/http/http-request.js +0 -66
- package/cjs/http/http-response.js +0 -2
- package/cjs/http/http-singleton-service.js +0 -16
- package/cjs/http/http-types.js +0 -2
- package/cjs/http/requests/batch-request.js +0 -80
- package/cjs/http/requests/collection-create-request.js +0 -35
- package/cjs/http/requests/collection-delete-many-request.js +0 -28
- package/cjs/http/requests/collection-delete-request.js +0 -29
- package/cjs/http/requests/collection-get-request.js +0 -37
- package/cjs/http/requests/collection-search-request.js +0 -44
- package/cjs/http/requests/collection-update-many-request.js +0 -31
- package/cjs/http/requests/collection-update-request.js +0 -40
- package/cjs/http/requests/http-singleton-get-request.js +0 -31
- package/cjs/http/utils/merge-raw-http-requests.util.js +0 -29
- package/cjs/index.js +0 -20
- package/cjs/interfaces/http-options.interface.js +0 -2
- package/cjs/interfaces/http-request-config.interface.js +0 -2
- package/cjs/package.json +0 -3
- package/cjs/types.js +0 -2
- package/esm/client-error.js +0 -16
- package/esm/constants.js +0 -3
- package/esm/http/http-client.js +0 -160
- package/esm/http/http-collection-service.js +0 -36
- package/esm/http/http-request.js +0 -62
- package/esm/http/http-response.js +0 -1
- package/esm/http/http-singleton-service.js +0 -12
- package/esm/http/http-types.js +0 -1
- package/esm/http/requests/batch-request.js +0 -76
- package/esm/http/requests/collection-create-request.js +0 -31
- package/esm/http/requests/collection-delete-many-request.js +0 -24
- package/esm/http/requests/collection-delete-request.js +0 -25
- package/esm/http/requests/collection-get-request.js +0 -33
- package/esm/http/requests/collection-search-request.js +0 -40
- package/esm/http/requests/collection-update-many-request.js +0 -27
- package/esm/http/requests/collection-update-request.js +0 -36
- package/esm/http/requests/http-singleton-get-request.js +0 -27
- package/esm/http/utils/merge-raw-http-requests.util.js +0 -25
- package/esm/index.js +0 -17
- package/esm/interfaces/http-options.interface.js +0 -1
- package/esm/interfaces/http-request-config.interface.js +0 -1
- package/esm/types.d.ts +0 -7
- package/esm/types.js +0 -1
- package/umd/opra-client.umd.min.js +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StrictOmit } from 'ts-gems';
|
|
2
|
+
import { ResponsiveMap } from '../../../helpers/responsive-map.js';
|
|
3
|
+
import { OpraSchema } from '../../opra-schema.definition.js';
|
|
4
|
+
import { nodeInspectCustom } from '../../utils/inspect.util.js';
|
|
5
|
+
import type { OpraDocument } from '../opra-document';
|
|
6
|
+
import { DataType } from './data-type.js';
|
|
7
|
+
export declare type ComplexTypeArgs = StrictOmit<OpraSchema.ComplexType, 'kind'>;
|
|
8
|
+
export declare class ComplexType extends DataType {
|
|
9
|
+
protected _initialized: boolean;
|
|
10
|
+
protected _metadata: OpraSchema.ComplexType;
|
|
11
|
+
private _mixinAdditionalFields;
|
|
12
|
+
readonly ownFields: ResponsiveMap<string, Field>;
|
|
13
|
+
readonly fields: ResponsiveMap<string, Field>;
|
|
14
|
+
constructor(owner: OpraDocument, name: any, args: ComplexTypeArgs);
|
|
15
|
+
get abstract(): boolean;
|
|
16
|
+
get additionalFields(): string | boolean | Pick<OpraSchema.Field, "type" | "format" | "isArray" | "enum">;
|
|
17
|
+
get extends(): OpraSchema.ComplexTypeExtendingInfo[] | undefined;
|
|
18
|
+
getField(fieldName: string): Field;
|
|
19
|
+
getFieldType(fieldName: string): DataType;
|
|
20
|
+
getOwnField(name: string): Field;
|
|
21
|
+
getSchema(): OpraSchema.ComplexType;
|
|
22
|
+
toString(): string;
|
|
23
|
+
[nodeInspectCustom](): string;
|
|
24
|
+
init(): void;
|
|
25
|
+
}
|
|
26
|
+
export interface Field extends OpraSchema.Field {
|
|
27
|
+
name: string;
|
|
28
|
+
parent: ComplexType;
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Type } from 'ts-gems';
|
|
2
|
+
import { OpraSchema } from '../../opra-schema.definition.js';
|
|
3
|
+
import type { OpraDocument } from '../opra-document';
|
|
4
|
+
export declare abstract class DataType {
|
|
5
|
+
protected _document: OpraDocument;
|
|
6
|
+
protected _metadata: OpraSchema.BaseDataType;
|
|
7
|
+
protected _name: string;
|
|
8
|
+
protected constructor(document: OpraDocument, name: any, metadata: OpraSchema.DataType);
|
|
9
|
+
get document(): OpraDocument;
|
|
10
|
+
get kind(): OpraSchema.DataTypeKind;
|
|
11
|
+
get name(): string;
|
|
12
|
+
get description(): string | undefined;
|
|
13
|
+
get ctor(): Type | undefined;
|
|
14
|
+
parse<T>(value: any): T;
|
|
15
|
+
getSchema(jsonOnly?: boolean): any;
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StrictOmit } from 'ts-gems';
|
|
2
|
+
import { OpraSchema } from '../../opra-schema.definition.js';
|
|
3
|
+
import { nodeInspectCustom } from '../../utils/inspect.util.js';
|
|
4
|
+
import type { OpraDocument } from '../opra-document';
|
|
5
|
+
import { DataType } from './data-type.js';
|
|
6
|
+
export declare class SimpleType extends DataType {
|
|
7
|
+
protected readonly _metadata: OpraSchema.SimpleType;
|
|
8
|
+
readonly base?: SimpleType;
|
|
9
|
+
constructor(owner: OpraDocument, name: string, args: StrictOmit<OpraSchema.SimpleType, 'kind'>);
|
|
10
|
+
toString(): string;
|
|
11
|
+
[nodeInspectCustom](): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StrictOmit } from 'ts-gems';
|
|
2
|
+
import { OpraSchema } from '../../opra-schema.definition.js';
|
|
3
|
+
import { nodeInspectCustom } from '../../utils/inspect.util.js';
|
|
4
|
+
import type { OpraDocument } from '../opra-document';
|
|
5
|
+
import { DataType } from './data-type.js';
|
|
6
|
+
export declare type UnionTypeArgs = StrictOmit<OpraSchema.UnionType, 'kind'> & {
|
|
7
|
+
types: DataType[];
|
|
8
|
+
};
|
|
9
|
+
export declare class UnionType extends DataType {
|
|
10
|
+
protected readonly _metadata: StrictOmit<OpraSchema.UnionType, 'types'>;
|
|
11
|
+
readonly types: DataType[];
|
|
12
|
+
readonly hasAdditionalFields: boolean;
|
|
13
|
+
constructor(owner: OpraDocument, name: string, args: UnionTypeArgs);
|
|
14
|
+
toString(): string;
|
|
15
|
+
[nodeInspectCustom](): string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Type } from 'ts-gems';
|
|
2
|
+
import { ResponsiveMap } from '../../helpers/responsive-map.js';
|
|
3
|
+
import { OpraSchema } from '../opra-schema.definition.js';
|
|
4
|
+
import { ThunkAsync } from '../types.js';
|
|
5
|
+
export declare type DocumentBuilderArgs = Pick<OpraSchema.Document, 'info' | 'servers'>;
|
|
6
|
+
export declare class DocumentBuilder {
|
|
7
|
+
protected _args: DocumentBuilderArgs;
|
|
8
|
+
protected _dataTypes: ResponsiveMap<string, OpraSchema.DataType>;
|
|
9
|
+
protected _resources: ResponsiveMap<string, OpraSchema.Resource>;
|
|
10
|
+
constructor(args: DocumentBuilderArgs);
|
|
11
|
+
buildSchema(): OpraSchema.Document;
|
|
12
|
+
addDataTypeSchema(name: string, schema: OpraSchema.DataType): Promise<void>;
|
|
13
|
+
addDataTypeClass(thunk: ThunkAsync<Type | Function>): Promise<string>;
|
|
14
|
+
addResourceSchema(name: string, schema: OpraSchema.Resource): Promise<void>;
|
|
15
|
+
addResourceInstance(thunk: ThunkAsync<any>): Promise<string>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Type } from 'ts-gems';
|
|
2
|
+
import { ResponsiveMap } from '../../helpers/responsive-map.js';
|
|
3
|
+
import { IResourceContainer } from '../interfaces/resource-container.interface.js';
|
|
4
|
+
import { OpraSchema } from '../opra-schema.definition.js';
|
|
5
|
+
import { ThunkAsync } from '../types.js';
|
|
6
|
+
import { ComplexType } from './data-type/complex-type.js';
|
|
7
|
+
import { DataType } from './data-type/data-type.js';
|
|
8
|
+
import { SimpleType } from './data-type/simple-type.js';
|
|
9
|
+
import { UnionType } from './data-type/union-type.js';
|
|
10
|
+
import { DocumentBuilderArgs } from './document-builder.js';
|
|
11
|
+
import { CollectionResourceInfo } from './resource/collection-resource-info.js';
|
|
12
|
+
import { ResourceInfo } from './resource/resource-info.js';
|
|
13
|
+
import { SingletonResourceInfo } from './resource/singleton-resource-info.js';
|
|
14
|
+
export declare type OpraDocumentArgs = DocumentBuilderArgs & {
|
|
15
|
+
types?: ThunkAsync<Type>[] | Record<string, OpraSchema.DataType>;
|
|
16
|
+
resources?: ThunkAsync<any>[] | Record<string, OpraSchema.Resource>;
|
|
17
|
+
};
|
|
18
|
+
declare type OpraDocumentMeta = Pick<OpraSchema.Document, 'info' | 'servers'>;
|
|
19
|
+
export declare namespace OpraDocument {
|
|
20
|
+
}
|
|
21
|
+
export declare class OpraDocument implements IResourceContainer {
|
|
22
|
+
protected readonly _meta: OpraDocumentMeta;
|
|
23
|
+
protected _ownTypes: ResponsiveMap<string, DataType>;
|
|
24
|
+
protected _types: ResponsiveMap<string, DataType>;
|
|
25
|
+
protected _resources: ResponsiveMap<string, ResourceInfo>;
|
|
26
|
+
constructor(schema: OpraSchema.Document);
|
|
27
|
+
get info(): OpraSchema.DocumentInfo;
|
|
28
|
+
get types(): Map<string, DataType>;
|
|
29
|
+
getDataType(name: string): DataType;
|
|
30
|
+
getComplexDataType(name: string): ComplexType;
|
|
31
|
+
getSimpleDataType(name: string): SimpleType;
|
|
32
|
+
getUnionDataType(name: string): UnionType;
|
|
33
|
+
get resources(): Map<string, ResourceInfo>;
|
|
34
|
+
get servers(): OpraSchema.ServerInfo[] | undefined;
|
|
35
|
+
getResource<T extends ResourceInfo>(name: string): T;
|
|
36
|
+
getCollectionResource(name: string): CollectionResourceInfo;
|
|
37
|
+
getSingletonResource(name: string): SingletonResourceInfo;
|
|
38
|
+
getMetadata(jsonOnly?: boolean): OpraSchema.Document;
|
|
39
|
+
protected _addDataType(name: string, schema: OpraSchema.DataType, isOwn: boolean): DataType;
|
|
40
|
+
protected _addResource(name: string, schema: OpraSchema.Resource): void;
|
|
41
|
+
protected _initTypes(): void;
|
|
42
|
+
static create(args: OpraDocumentArgs): Promise<OpraDocument>;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Expression } from '../../../filter/index.js';
|
|
2
|
+
import { CollectionResourceInfo } from '../resource/collection-resource-info.js';
|
|
3
|
+
export declare type CollectionCountQueryOptions = {
|
|
4
|
+
filter?: string | Expression;
|
|
5
|
+
};
|
|
6
|
+
export declare class CollectionCountQuery {
|
|
7
|
+
readonly resource: CollectionResourceInfo;
|
|
8
|
+
readonly kind = "CollectionCountQuery";
|
|
9
|
+
readonly method = "count";
|
|
10
|
+
readonly operation = "read";
|
|
11
|
+
filter?: Expression;
|
|
12
|
+
constructor(resource: CollectionResourceInfo, options?: CollectionCountQueryOptions);
|
|
13
|
+
get dataType(): import("../data-type/complex-type.js").ComplexType;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CollectionResourceInfo } from '../resource/collection-resource-info.js';
|
|
2
|
+
export declare type CollectionCreateQueryOptions = {
|
|
3
|
+
pick?: string[];
|
|
4
|
+
omit?: string[];
|
|
5
|
+
include?: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare class CollectionCreateQuery {
|
|
8
|
+
readonly resource: CollectionResourceInfo;
|
|
9
|
+
data: {};
|
|
10
|
+
readonly kind = "CollectionCreateQuery";
|
|
11
|
+
readonly method = "create";
|
|
12
|
+
readonly operation = "create";
|
|
13
|
+
pick?: string[];
|
|
14
|
+
omit?: string[];
|
|
15
|
+
include?: string[];
|
|
16
|
+
constructor(resource: CollectionResourceInfo, data: {}, options?: CollectionCreateQueryOptions);
|
|
17
|
+
get dataType(): import("../data-type/complex-type.js").ComplexType;
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Expression } from '../../../filter/index.js';
|
|
2
|
+
import { CollectionResourceInfo } from '../resource/collection-resource-info.js';
|
|
3
|
+
export declare type CollectionDeleteManyQueryOptions = {
|
|
4
|
+
filter?: string | Expression;
|
|
5
|
+
};
|
|
6
|
+
export declare class CollectionDeleteManyQuery {
|
|
7
|
+
readonly resource: CollectionResourceInfo;
|
|
8
|
+
readonly kind = "CollectionDeleteManyQuery";
|
|
9
|
+
readonly method = "deleteMany";
|
|
10
|
+
readonly operation = "delete";
|
|
11
|
+
filter?: Expression;
|
|
12
|
+
constructor(resource: CollectionResourceInfo, options?: CollectionDeleteManyQueryOptions);
|
|
13
|
+
get dataType(): import("../data-type/complex-type.js").ComplexType;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CollectionResourceInfo } from '../resource/collection-resource-info.js';
|
|
2
|
+
export declare class CollectionDeleteQuery {
|
|
3
|
+
readonly resource: CollectionResourceInfo;
|
|
4
|
+
readonly kind = "CollectionDeleteQuery";
|
|
5
|
+
readonly method = "delete";
|
|
6
|
+
readonly operation = "delete";
|
|
7
|
+
keyValue: any;
|
|
8
|
+
constructor(resource: CollectionResourceInfo, keyValue: any);
|
|
9
|
+
get dataType(): import("../data-type/complex-type.js").ComplexType;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IChildFieldQuery } from '../../interfaces/child-field-query.interface.js';
|
|
2
|
+
import type { CollectionResourceInfo } from '../resource/collection-resource-info.js';
|
|
3
|
+
import type { FieldGetQuery } from './field-get-query.js';
|
|
4
|
+
export declare type CollectionGetQueryOptions = {
|
|
5
|
+
pick?: string[];
|
|
6
|
+
omit?: string[];
|
|
7
|
+
include?: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare class CollectionGetQuery implements IChildFieldQuery {
|
|
10
|
+
readonly resource: CollectionResourceInfo;
|
|
11
|
+
readonly kind = "CollectionGetQuery";
|
|
12
|
+
readonly method = "get";
|
|
13
|
+
readonly operation = "read";
|
|
14
|
+
keyValue: any;
|
|
15
|
+
pick?: string[];
|
|
16
|
+
omit?: string[];
|
|
17
|
+
include?: string[];
|
|
18
|
+
child?: FieldGetQuery;
|
|
19
|
+
constructor(resource: CollectionResourceInfo, keyValue: any, options?: CollectionGetQueryOptions);
|
|
20
|
+
get dataType(): import("../data-type/complex-type.js").ComplexType;
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Expression } from '../../../filter/index.js';
|
|
2
|
+
import { CollectionResourceInfo } from '../resource/collection-resource-info.js';
|
|
3
|
+
export declare type CollectionSearchQueryOptions = {
|
|
4
|
+
pick?: string[];
|
|
5
|
+
omit?: string[];
|
|
6
|
+
include?: string[];
|
|
7
|
+
filter?: string | Expression;
|
|
8
|
+
limit?: number;
|
|
9
|
+
skip?: number;
|
|
10
|
+
distinct?: boolean;
|
|
11
|
+
count?: boolean;
|
|
12
|
+
sort?: string[];
|
|
13
|
+
};
|
|
14
|
+
export declare class CollectionSearchQuery {
|
|
15
|
+
readonly resource: CollectionResourceInfo;
|
|
16
|
+
readonly kind = "CollectionSearchQuery";
|
|
17
|
+
readonly method = "search";
|
|
18
|
+
readonly operation = "read";
|
|
19
|
+
pick?: string[];
|
|
20
|
+
omit?: string[];
|
|
21
|
+
include?: string[];
|
|
22
|
+
filter?: Expression;
|
|
23
|
+
limit?: number;
|
|
24
|
+
skip?: number;
|
|
25
|
+
distinct?: boolean;
|
|
26
|
+
count?: boolean;
|
|
27
|
+
sort?: string[];
|
|
28
|
+
constructor(resource: CollectionResourceInfo, options?: CollectionSearchQueryOptions);
|
|
29
|
+
get dataType(): import("../data-type/complex-type.js").ComplexType;
|
|
30
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Expression } from '../../../filter/index.js';
|
|
2
|
+
import { CollectionResourceInfo } from '../resource/collection-resource-info.js';
|
|
3
|
+
export declare type CollectionUpdateManyQueryOptions = {
|
|
4
|
+
filter?: string | Expression;
|
|
5
|
+
};
|
|
6
|
+
export declare class CollectionUpdateManyQuery {
|
|
7
|
+
readonly resource: CollectionResourceInfo;
|
|
8
|
+
data: {};
|
|
9
|
+
readonly kind = "CollectionUpdateManyQuery";
|
|
10
|
+
readonly method = "updateMany";
|
|
11
|
+
readonly operation = "update";
|
|
12
|
+
filter?: Expression;
|
|
13
|
+
constructor(resource: CollectionResourceInfo, data: {}, options?: CollectionUpdateManyQueryOptions);
|
|
14
|
+
get dataType(): import("../data-type/complex-type.js").ComplexType;
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CollectionResourceInfo } from '../resource/collection-resource-info.js';
|
|
2
|
+
export declare type CollectionUpdateQueryOptions = {
|
|
3
|
+
pick?: string[];
|
|
4
|
+
omit?: string[];
|
|
5
|
+
include?: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare class CollectionUpdateQuery {
|
|
8
|
+
readonly resource: CollectionResourceInfo;
|
|
9
|
+
data: any;
|
|
10
|
+
readonly kind = "CollectionUpdateQuery";
|
|
11
|
+
readonly method = "update";
|
|
12
|
+
readonly operation = "update";
|
|
13
|
+
keyValue: any;
|
|
14
|
+
pick?: string[];
|
|
15
|
+
omit?: string[];
|
|
16
|
+
include?: string[];
|
|
17
|
+
constructor(resource: CollectionResourceInfo, keyValue: any, data: any, options?: CollectionUpdateQueryOptions);
|
|
18
|
+
get dataType(): import("../data-type/complex-type.js").ComplexType;
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { IChildFieldQuery } from '../../interfaces/child-field-query.interface.js';
|
|
2
|
+
import { ComplexType, Field } from '../data-type/complex-type.js';
|
|
3
|
+
import type { DataType } from '../data-type/data-type.js';
|
|
4
|
+
import type { CollectionResourceInfo } from '../resource/collection-resource-info.js';
|
|
5
|
+
import type { SingletonResourceInfo } from '../resource/singleton-resource-info.js';
|
|
6
|
+
import type { CollectionGetQuery } from './collection-get-query.js';
|
|
7
|
+
import type { SingletonGetQuery } from './singleton-get-query.js';
|
|
8
|
+
export declare type FieldGetQueryOptions = {
|
|
9
|
+
pick?: string[];
|
|
10
|
+
omit?: string[];
|
|
11
|
+
include?: string[];
|
|
12
|
+
castingType?: ComplexType;
|
|
13
|
+
};
|
|
14
|
+
export declare class FieldGetQuery implements IChildFieldQuery {
|
|
15
|
+
readonly parent: CollectionGetQuery | SingletonGetQuery | FieldGetQuery;
|
|
16
|
+
readonly resource: CollectionResourceInfo | SingletonResourceInfo;
|
|
17
|
+
readonly kind = "FieldGetQuery";
|
|
18
|
+
readonly method = "get";
|
|
19
|
+
readonly operation = "read";
|
|
20
|
+
readonly fieldName: string;
|
|
21
|
+
readonly field?: Field;
|
|
22
|
+
readonly path: string;
|
|
23
|
+
readonly dataType: DataType;
|
|
24
|
+
readonly parentType: ComplexType;
|
|
25
|
+
pick?: string[];
|
|
26
|
+
omit?: string[];
|
|
27
|
+
include?: string[];
|
|
28
|
+
child?: FieldGetQuery;
|
|
29
|
+
constructor(parent: CollectionGetQuery | SingletonGetQuery | FieldGetQuery, fieldName: string, options?: FieldGetQueryOptions);
|
|
30
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IChildFieldQuery } from '../../interfaces/child-field-query.interface.js';
|
|
2
|
+
import { CollectionCountQuery } from './collection-count-query.js';
|
|
3
|
+
import { CollectionCreateQuery } from './collection-create-query.js';
|
|
4
|
+
import { CollectionDeleteManyQuery } from './collection-delete-many-query.js';
|
|
5
|
+
import { CollectionDeleteQuery } from './collection-delete-query.js';
|
|
6
|
+
import { CollectionGetQuery } from './collection-get-query.js';
|
|
7
|
+
import { CollectionSearchQuery } from './collection-search-query.js';
|
|
8
|
+
import { CollectionUpdateManyQuery } from './collection-update-many-query.js';
|
|
9
|
+
import { CollectionUpdateQuery } from './collection-update-query.js';
|
|
10
|
+
import { FieldGetQuery } from './field-get-query.js';
|
|
11
|
+
import { SingletonGetQuery } from './singleton-get-query.js';
|
|
12
|
+
export * from './collection-create-query.js';
|
|
13
|
+
export * from './collection-count-query.js';
|
|
14
|
+
export * from './collection-delete-many-query.js';
|
|
15
|
+
export * from './collection-delete-query.js';
|
|
16
|
+
export * from './collection-delete-many-query.js';
|
|
17
|
+
export * from './collection-get-query.js';
|
|
18
|
+
export * from './field-get-query.js';
|
|
19
|
+
export * from './singleton-get-query.js';
|
|
20
|
+
export * from './collection-search-query.js';
|
|
21
|
+
export * from './collection-update-many-query.js';
|
|
22
|
+
export * from './collection-update-query.js';
|
|
23
|
+
export declare type CollectionQuery = CollectionCountQuery | CollectionCreateQuery | CollectionDeleteManyQuery | CollectionDeleteQuery | CollectionGetQuery | CollectionSearchQuery | CollectionUpdateManyQuery | CollectionUpdateQuery;
|
|
24
|
+
export declare type FieldQuery = FieldGetQuery;
|
|
25
|
+
export declare type SingletonQuery = SingletonGetQuery;
|
|
26
|
+
export declare type OpraQuery = CollectionQuery | SingletonQuery | FieldQuery;
|
|
27
|
+
export declare function isChildFieldQuery(query: any): query is IChildFieldQuery;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IChildFieldQuery } from '../../interfaces/child-field-query.interface.js';
|
|
2
|
+
import type { SingletonResourceInfo } from '../resource/singleton-resource-info.js';
|
|
3
|
+
import type { FieldGetQuery } from './field-get-query.js';
|
|
4
|
+
export declare type SingletonGetQueryOptions = {
|
|
5
|
+
pick?: string[];
|
|
6
|
+
omit?: string[];
|
|
7
|
+
include?: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare class SingletonGetQuery implements IChildFieldQuery {
|
|
10
|
+
readonly resource: SingletonResourceInfo;
|
|
11
|
+
readonly kind = "SingletonGetQuery";
|
|
12
|
+
readonly method = "get";
|
|
13
|
+
readonly operation = "read";
|
|
14
|
+
pick?: string[];
|
|
15
|
+
omit?: string[];
|
|
16
|
+
include?: string[];
|
|
17
|
+
child?: FieldGetQuery;
|
|
18
|
+
constructor(resource: SingletonResourceInfo, options?: SingletonGetQueryOptions);
|
|
19
|
+
get dataType(): import("../data-type/complex-type.js").ComplexType;
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OpraSchema } from '../../opra-schema.definition.js';
|
|
2
|
+
import { ComplexType } from '../data-type/complex-type.js';
|
|
3
|
+
import type { OpraDocument } from '../opra-document';
|
|
4
|
+
import { ResourceInfo } from './resource-info.js';
|
|
5
|
+
export declare class CollectionResourceInfo extends ResourceInfo {
|
|
6
|
+
readonly metadata: OpraSchema.CollectionResource;
|
|
7
|
+
readonly dataType: ComplexType;
|
|
8
|
+
constructor(document: OpraDocument, name: string, dataType: ComplexType, metadata: OpraSchema.CollectionResource);
|
|
9
|
+
get keyFields(): string[];
|
|
10
|
+
get create(): OpraSchema.CreateMethodResolver | undefined;
|
|
11
|
+
get count(): OpraSchema.MethodResolver | undefined;
|
|
12
|
+
get delete(): OpraSchema.MethodResolver | undefined;
|
|
13
|
+
get deleteMany(): OpraSchema.DeleteManyMethodResolver | undefined;
|
|
14
|
+
get get(): OpraSchema.GetMethodResolver | undefined;
|
|
15
|
+
get update(): OpraSchema.UpdateMethodResolver | undefined;
|
|
16
|
+
get updateMany(): OpraSchema.UpdateManyMethodResolver | undefined;
|
|
17
|
+
get search(): OpraSchema.SearchMethodResolver | undefined;
|
|
18
|
+
getSchema(jsonOnly?: boolean): OpraSchema.CollectionResource;
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IResourceContainer } from '../../interfaces/resource-container.interface.js';
|
|
2
|
+
import { OpraSchema } from '../../opra-schema.definition.js';
|
|
3
|
+
import type { OpraDocument } from '../opra-document.js';
|
|
4
|
+
import { CollectionResourceInfo } from './collection-resource-info.js';
|
|
5
|
+
import { ResourceInfo } from './resource-info.js';
|
|
6
|
+
import { SingletonResourceInfo } from './singleton-resource-info.js';
|
|
7
|
+
export declare class ContainerResourceInfo extends ResourceInfo implements IResourceContainer {
|
|
8
|
+
readonly metadata: OpraSchema.ContainerResource;
|
|
9
|
+
constructor(service: OpraDocument, name: string, metadata: OpraSchema.ContainerResource);
|
|
10
|
+
getResource<T extends ResourceInfo>(name: string): T;
|
|
11
|
+
getCollectionResource(name: string): CollectionResourceInfo;
|
|
12
|
+
getSingletonResource(name: string): SingletonResourceInfo;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OpraSchema } from '../../opra-schema.definition.js';
|
|
2
|
+
import { nodeInspectCustom } from '../../utils/inspect.util.js';
|
|
3
|
+
import type { OpraDocument } from '../opra-document.js';
|
|
4
|
+
export declare abstract class ResourceInfo {
|
|
5
|
+
readonly metadata: OpraSchema.Resource;
|
|
6
|
+
readonly document: OpraDocument;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
protected path: string;
|
|
9
|
+
protected constructor(document: OpraDocument, name: string, metadata: OpraSchema.Resource);
|
|
10
|
+
get instance(): {} | undefined;
|
|
11
|
+
get kind(): OpraSchema.ResourceKind;
|
|
12
|
+
get description(): string | undefined;
|
|
13
|
+
toString(): string;
|
|
14
|
+
validateQueryOptions(): any;
|
|
15
|
+
getSchema(jsonOnly?: boolean): OpraSchema.Resource;
|
|
16
|
+
[nodeInspectCustom](): string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OpraSchema } from '../../opra-schema.definition.js';
|
|
2
|
+
import { ComplexType } from '../data-type/complex-type.js';
|
|
3
|
+
import type { OpraDocument } from '../opra-document.js';
|
|
4
|
+
import { ResourceInfo } from './resource-info.js';
|
|
5
|
+
export declare class SingletonResourceInfo extends ResourceInfo {
|
|
6
|
+
readonly metadata: OpraSchema.SingletonResource;
|
|
7
|
+
readonly dataType: ComplexType;
|
|
8
|
+
constructor(document: OpraDocument, name: string, dataType: ComplexType, metadata: OpraSchema.SingletonResource);
|
|
9
|
+
get create(): OpraSchema.CreateMethodResolver | undefined;
|
|
10
|
+
get delete(): OpraSchema.MethodResolver | undefined;
|
|
11
|
+
get get(): OpraSchema.GetMethodResolver | undefined;
|
|
12
|
+
get update(): OpraSchema.UpdateMethodResolver | undefined;
|
|
13
|
+
getSchema(jsonOnly?: boolean): OpraSchema.SingletonResource;
|
|
14
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
export * from './constants.js';
|
|
3
|
+
export * from './types.js';
|
|
4
|
+
export * from './opra-schema.definition.js';
|
|
5
|
+
export * from './decorators/opr-complex-type.decorator.js';
|
|
6
|
+
export * from './decorators/opr-field.decorator.js';
|
|
7
|
+
export * from './decorators/opr-collection-resource.decorator.js';
|
|
8
|
+
export * from './decorators/opr-singleton-resource.decorator.js';
|
|
9
|
+
export * from './decorators/opr-resolver.decorator.js';
|
|
10
|
+
export * from './interfaces/resource-container.interface.js';
|
|
11
|
+
export * from './implementation/document-builder.js';
|
|
12
|
+
export * from './implementation/opra-document.js';
|
|
13
|
+
export * from './implementation/data-type/data-type.js';
|
|
14
|
+
export * from './implementation/data-type/complex-type.js';
|
|
15
|
+
export * from './implementation/data-type/simple-type.js';
|
|
16
|
+
export * from './implementation/data-type/union-type.js';
|
|
17
|
+
export * from './implementation/resource/resource-info.js';
|
|
18
|
+
export * from './implementation/resource/container-resource-info.js';
|
|
19
|
+
export * from './implementation/resource/collection-resource-info.js';
|
|
20
|
+
export * from './implementation/resource/singleton-resource-info.js';
|
|
21
|
+
export * from './implementation/query/index.js';
|
|
22
|
+
export * from './type-helpers/mixin-type.helper.js';
|
|
23
|
+
export * from './type-helpers/extend-type.helper.js';
|
|
24
|
+
export * from './implementation/schema-builder/extract-type-metadata.util.js';
|
|
25
|
+
export * from './implementation/schema-builder/extract-resource-metadata.util.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StrictOmit, Type } from 'ts-gems';
|
|
2
|
+
import { OpraSchema } from '../opra-schema.definition.js';
|
|
3
|
+
import { TypeThunkAsync } from '../types.js';
|
|
4
|
+
export declare type SimpleTypeMetadata = OpraSchema.SimpleType & {
|
|
5
|
+
name: string;
|
|
6
|
+
};
|
|
7
|
+
export declare type ComplexTypeMetadata = StrictOmit<OpraSchema.ComplexType, 'fields' | 'extends'> & {
|
|
8
|
+
name: string;
|
|
9
|
+
extends?: ComplexTypeExtendingMetadata[];
|
|
10
|
+
fields?: Record<string, FieldMetadata>;
|
|
11
|
+
};
|
|
12
|
+
export declare type FieldMetadata = StrictOmit<OpraSchema.Field, 'type'> & {
|
|
13
|
+
type?: string | TypeThunkAsync | (string | TypeThunkAsync)[];
|
|
14
|
+
};
|
|
15
|
+
declare type ComplexTypeExtendingMetadata = StrictOmit<OpraSchema.ComplexTypeExtendingInfo, 'type'> & {
|
|
16
|
+
type: string | Type;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CollectionResourceInfo } from '../implementation/resource/collection-resource-info.js';
|
|
2
|
+
import { ResourceInfo } from '../implementation/resource/resource-info.js';
|
|
3
|
+
import { SingletonResourceInfo } from '../implementation/resource/singleton-resource-info.js';
|
|
4
|
+
export interface IResourceContainer {
|
|
5
|
+
getResource<T extends ResourceInfo>(name: string): T;
|
|
6
|
+
getCollectionResource(name: string): CollectionResourceInfo;
|
|
7
|
+
getSingletonResource(name: string): SingletonResourceInfo;
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PartialSome, StrictOmit } from 'ts-gems';
|
|
2
|
+
import { OpraSchema } from '../opra-schema.definition.js';
|
|
3
|
+
import { TypeThunkAsync } from '../types.js';
|
|
4
|
+
export declare type CollectionResourceMetadata = PartialSome<StrictOmit<OpraSchema.CollectionResource, 'type'>, 'keyFields'> & {
|
|
5
|
+
type: TypeThunkAsync | string;
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
export declare type SingletonResourceMetadata = StrictOmit<OpraSchema.SingletonResource, 'type'> & {
|
|
9
|
+
type: TypeThunkAsync | string;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
export declare type ICreateResolverMetadata = StrictOmit<OpraSchema.CreateMethodResolver, 'handler'>;
|
|
13
|
+
export declare type IDeleteResolverMetadata = StrictOmit<OpraSchema.DeleteMethodResolver, 'handler'>;
|
|
14
|
+
export declare type IDeleteManyResolverMetadata = StrictOmit<OpraSchema.DeleteManyMethodResolver, 'handler'>;
|
|
15
|
+
export declare type IGetResolverMetadata = StrictOmit<OpraSchema.GetMethodResolver, 'handler'>;
|
|
16
|
+
export declare type IUpdateResolverMetadata = StrictOmit<OpraSchema.UpdateMethodResolver, 'handler'>;
|
|
17
|
+
export declare type IUpdateManyResolverMetadata = StrictOmit<OpraSchema.UpdateManyMethodResolver, 'handler'>;
|
|
18
|
+
export declare type ISearchResolverMetadata = StrictOmit<OpraSchema.SearchMethodResolver, 'handler'>;
|