@goatlab/fluent 0.6.4 → 0.6.7
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/dist/TypeOrmConnector/TypeOrmConnector.d.ts +2 -2
- package/dist/TypeOrmConnector/TypeOrmConnector.js +7 -5
- package/dist/index.d.ts +2 -1
- package/package.json +2 -2
- package/dist/BaseConnector.d.ts +0 -79
- package/dist/BaseConnector.js +0 -361
- package/dist/Fluent.d.ts +0 -26
- package/dist/Fluent.js +0 -52
- package/dist/TypeOrmConnector/TypeOrmMongoConnector._bypass.js +0 -52
- package/dist/TypeOrmConnector/TypeOrmMysqlConnector._bypass.js +0 -55
- package/dist/TypeOrmConnector/test/advanced/advancedTestSuite.d.ts +0 -1
- package/dist/TypeOrmConnector/test/advanced/advancedTestSuite.js +0 -114
- package/dist/TypeOrmConnector/test/advanced/typeOrm.entity.d.ts +0 -16
- package/dist/TypeOrmConnector/test/advanced/typeOrm.entity.js +0 -57
- package/dist/TypeOrmConnector/test/advanced/typeOrm.repository.js +0 -11
- package/dist/TypeOrmConnector/test/basic/basicTestSuite.d.ts +0 -1
- package/dist/TypeOrmConnector/test/basic/basicTestSuite.js +0 -45
- package/dist/TypeOrmConnector/test/basic/goat.dto.d.ts +0 -8
- package/dist/TypeOrmConnector/test/basic/goat.dto.js +0 -18
- package/dist/TypeOrmConnector/test/basic/goat.entity.d.ts +0 -10
- package/dist/TypeOrmConnector/test/basic/goat.entity.js +0 -42
- package/dist/TypeOrmConnector/test/basic/goat.repository.js +0 -11
- package/dist/TypeOrmConnector/test/flock.d.ts +0 -4
- package/dist/TypeOrmConnector/test/flock.js +0 -25
- package/dist/TypeOrmConnector/test/relations/car/car.dto.d.ts +0 -5
- package/dist/TypeOrmConnector/test/relations/car/car.dto.js +0 -12
- package/dist/TypeOrmConnector/test/relations/car/car.entity.d.ts +0 -7
- package/dist/TypeOrmConnector/test/relations/car/car.entity.js +0 -32
- package/dist/TypeOrmConnector/test/relations/car/car.repositoryTypeOrm.js +0 -13
- package/dist/TypeOrmConnector/test/relations/relationsTestsSuite.d.ts +0 -1
- package/dist/TypeOrmConnector/test/relations/relationsTestsSuite.js +0 -93
- package/dist/TypeOrmConnector/test/relations/roles/role.dto.d.ts +0 -5
- package/dist/TypeOrmConnector/test/relations/roles/role.dto.js +0 -12
- package/dist/TypeOrmConnector/test/relations/roles/roles.entity.d.ts +0 -6
- package/dist/TypeOrmConnector/test/relations/roles/roles.entity.js +0 -29
- package/dist/TypeOrmConnector/test/relations/roles/roles.repositoryTypeOrm.js +0 -14
- package/dist/TypeOrmConnector/test/relations/roles/roles_user.dto.d.ts +0 -5
- package/dist/TypeOrmConnector/test/relations/roles/roles_user.dto.js +0 -12
- package/dist/TypeOrmConnector/test/relations/roles/roles_user.entity.d.ts +0 -5
- package/dist/TypeOrmConnector/test/relations/roles/roles_user.entity.js +0 -23
- package/dist/TypeOrmConnector/test/relations/roles/roles_users.repositoryTypeOrm.js +0 -11
- package/dist/TypeOrmConnector/test/relations/user/user.dto.d.ts +0 -5
- package/dist/TypeOrmConnector/test/relations/user/user.dto.js +0 -12
- package/dist/TypeOrmConnector/test/relations/user/user.entity.d.ts +0 -14
- package/dist/TypeOrmConnector/test/relations/user/user.entity.js +0 -56
- package/dist/TypeOrmConnector/test/relations/user/user.repositoryTypeOrm.js +0 -16
- package/dist/core/Loopback/build-schema.d.ts +0 -31
- package/dist/core/Loopback/build-schema.js +0 -335
- package/dist/core/Loopback/common-types.d.ts +0 -36
- package/dist/core/Loopback/common-types.js +0 -13
- package/dist/core/Loopback/json-to-schema.d.ts +0 -6
- package/dist/core/Loopback/json-to-schema.js +0 -96
- package/dist/core/Loopback/metadata.d.ts +0 -9
- package/dist/core/Loopback/metadata.js +0 -28
- package/dist/core/Loopback/model.d.ts +0 -87
- package/dist/core/Loopback/model.js +0 -244
- package/dist/core/Loopback/query.d.ts +0 -97
- package/dist/core/Loopback/query.js +0 -290
- package/dist/core/Loopback/relation.types.d.ts +0 -45
- package/dist/core/Loopback/relation.types.js +0 -13
- package/dist/core/Loopback/type-resolver.d.ts +0 -7
- package/dist/core/Loopback/type-resolver.js +0 -34
- package/dist/core/Loopback/type.d.ts +0 -9
- package/dist/core/Loopback/type.js +0 -2
- package/dist/core/Nestjs/applyDecorators.d.ts +0 -1
- package/dist/core/Nestjs/applyDecorators.js +0 -17
- package/dist/core/Nestjs/types/common.d.ts +0 -16
- package/dist/core/Nestjs/types/common.js +0 -35
- package/dist/core/Nestjs/types/decorators/api-hide-property.decorator.d.ts +0 -1
- package/dist/core/Nestjs/types/decorators/api-hide-property.decorator.js +0 -7
- package/dist/core/Nestjs/types/decorators/api-property.decorator.d.ts +0 -27
- package/dist/core/Nestjs/types/decorators/api-property.decorator.js +0 -65
- package/dist/core/Nestjs/types/decorators/apply-is-optional.decorator.d.ts +0 -5
- package/dist/core/Nestjs/types/decorators/apply-is-optional.decorator.js +0 -131
- package/dist/core/Nestjs/types/decorators/args-type.decorator.d.ts +0 -1
- package/dist/core/Nestjs/types/decorators/args-type.decorator.js +0 -19
- package/dist/core/Nestjs/types/decorators/create-property.decorator.d.ts +0 -2
- package/dist/core/Nestjs/types/decorators/create-property.decorator.js +0 -50
- package/dist/core/Nestjs/types/decorators/directive.decorator.d.ts +0 -1
- package/dist/core/Nestjs/types/decorators/directive.decorator.js +0 -36
- package/dist/core/Nestjs/types/decorators/extensions.decorator.d.ts +0 -1
- package/dist/core/Nestjs/types/decorators/extensions.decorator.js +0 -25
- package/dist/core/Nestjs/types/decorators/field.decorator.d.ts +0 -15
- package/dist/core/Nestjs/types/decorators/field.decorator.js +0 -56
- package/dist/core/Nestjs/types/decorators/input-type.decorator.d.ts +0 -7
- package/dist/core/Nestjs/types/decorators/input-type.decorator.js +0 -23
- package/dist/core/Nestjs/types/decorators/interface-type.decorator.d.ts +0 -9
- package/dist/core/Nestjs/types/decorators/interface-type.decorator.js +0 -27
- package/dist/core/Nestjs/types/decorators/partial-type.helper.d.ts +0 -3
- package/dist/core/Nestjs/types/decorators/partial-type.helper.js +0 -42
- package/dist/core/Nestjs/types/errors/cannot-determine-host-type.error.d.ts +0 -3
- package/dist/core/Nestjs/types/errors/cannot-determine-host-type.error.js +0 -9
- package/dist/core/Nestjs/types/errors/directive-parsing.error.d.ts +0 -3
- package/dist/core/Nestjs/types/errors/directive-parsing.error.js +0 -9
- package/dist/core/Nestjs/types/errors/unable-to-find-fields.error.d.ts +0 -3
- package/dist/core/Nestjs/types/errors/unable-to-find-fields.error.js +0 -9
- package/dist/core/Nestjs/types/errors/undefined-type.error.d.ts +0 -3
- package/dist/core/Nestjs/types/errors/undefined-type.error.js +0 -10
- package/dist/core/Nestjs/types/interfaces/add-class-type-metadata.util.d.ts +0 -3
- package/dist/core/Nestjs/types/interfaces/add-class-type-metadata.util.js +0 -10
- package/dist/core/Nestjs/types/interfaces/base-type-options.interface.d.ts +0 -5
- package/dist/core/Nestjs/types/interfaces/base-type-options.interface.js +0 -2
- package/dist/core/Nestjs/types/interfaces/class-decorator-factory.interface.d.ts +0 -5
- package/dist/core/Nestjs/types/interfaces/class-decorator-factory.interface.js +0 -2
- package/dist/core/Nestjs/types/interfaces/complexity.interface.d.ts +0 -11
- package/dist/core/Nestjs/types/interfaces/complexity.interface.js +0 -2
- package/dist/core/Nestjs/types/interfaces/field-middleware.interface.d.ts +0 -15
- package/dist/core/Nestjs/types/interfaces/field-middleware.interface.js +0 -2
- package/dist/core/Nestjs/types/interfaces/open-api-spec.interface.d.ts +0 -235
- package/dist/core/Nestjs/types/interfaces/open-api-spec.interface.js +0 -2
- package/dist/core/Nestjs/types/interfaces/resolve-type-fn.interface.d.ts +0 -2
- package/dist/core/Nestjs/types/interfaces/resolve-type-fn.interface.js +0 -2
- package/dist/core/Nestjs/types/interfaces/return-type-func.interface.d.ts +0 -5
- package/dist/core/Nestjs/types/interfaces/return-type-func.interface.js +0 -2
- package/dist/core/Nestjs/types/interfaces/schema-object-metadata.interface.d.ts +0 -9
- package/dist/core/Nestjs/types/interfaces/schema-object-metadata.interface.js +0 -2
- package/dist/core/Nestjs/types/interfaces/type-options.interface.d.ts +0 -5
- package/dist/core/Nestjs/types/interfaces/type-options.interface.js +0 -2
- package/dist/core/Nestjs/types/lazy-metadata.storage.d.ts +0 -15
- package/dist/core/Nestjs/types/lazy-metadata.storage.js +0 -67
- package/dist/core/Nestjs/types/metadata/class.metadata.d.ts +0 -11
- package/dist/core/Nestjs/types/metadata/class.metadata.js +0 -2
- package/dist/core/Nestjs/types/metadata/directive.metadata.d.ts +0 -8
- package/dist/core/Nestjs/types/metadata/directive.metadata.js +0 -2
- package/dist/core/Nestjs/types/metadata/enum.metadata.d.ts +0 -11
- package/dist/core/Nestjs/types/metadata/enum.metadata.js +0 -2
- package/dist/core/Nestjs/types/metadata/extensions.metadata.d.ts +0 -8
- package/dist/core/Nestjs/types/metadata/extensions.metadata.js +0 -2
- package/dist/core/Nestjs/types/metadata/index.d.ts +0 -8
- package/dist/core/Nestjs/types/metadata/index.js +0 -11
- package/dist/core/Nestjs/types/metadata/interface.metadata.d.ts +0 -6
- package/dist/core/Nestjs/types/metadata/interface.metadata.js +0 -2
- package/dist/core/Nestjs/types/metadata/object-type.metadata.d.ts +0 -4
- package/dist/core/Nestjs/types/metadata/object-type.metadata.js +0 -2
- package/dist/core/Nestjs/types/metadata/param.metadata.d.ts +0 -18
- package/dist/core/Nestjs/types/metadata/param.metadata.js +0 -2
- package/dist/core/Nestjs/types/metadata/property.metadata.d.ts +0 -20
- package/dist/core/Nestjs/types/metadata/property.metadata.js +0 -2
- package/dist/core/Nestjs/types/metadata/resolver.metadata.d.ts +0 -34
- package/dist/core/Nestjs/types/metadata/resolver.metadata.js +0 -2
- package/dist/core/Nestjs/types/metadata/union.metadata.d.ts +0 -9
- package/dist/core/Nestjs/types/metadata/union.metadata.js +0 -2
- package/dist/core/Nestjs/types/object-type.decorator.d.ts +0 -8
- package/dist/core/Nestjs/types/object-type.decorator.js +0 -25
- package/dist/core/Nestjs/types/omit-type.d.ts +0 -2
- package/dist/core/Nestjs/types/omit-type.js +0 -30
- package/dist/core/Nestjs/types/reflection.utils.d.ts +0 -15
- package/dist/core/Nestjs/types/reflection.utils.js +0 -58
- package/dist/core/Nestjs/types/set-metadata.decorator.d.ts +0 -4
- package/dist/core/Nestjs/types/set-metadata.decorator.js +0 -16
- package/dist/core/Nestjs/types/type-metadata.storage.d.ts +0 -69
- package/dist/core/Nestjs/types/type-metadata.storage.js +0 -342
- package/dist/core/Nestjs/types/utils/enum.utils.d.ts +0 -3
- package/dist/core/Nestjs/types/utils/enum.utils.js +0 -29
- package/dist/core/Nestjs/types/utils/get-fields-and-decorator.util.d.ts +0 -13
- package/dist/core/Nestjs/types/utils/get-fields-and-decorator.util.js +0 -72
- package/dist/core/Nestjs/types/utils/mapped-types.utils.d.ts +0 -2
- package/dist/core/Nestjs/types/utils/mapped-types.utils.js +0 -38
- package/dist/core/Nestjs/types/utils/model-properties-accessor.d.ts +0 -6
- package/dist/core/Nestjs/types/utils/model-properties-accessor.js +0 -36
- package/dist/core/Nestjs/types/utils/type-helpers.utils.d.ts +0 -2
- package/dist/core/Nestjs/types/utils/type-helpers.utils.js +0 -16
- package/dist/core/database/createConnection.d.ts +0 -30
- package/dist/core/database/createConnection.js +0 -43
- package/dist/core/database/decorators.d.ts +0 -43
- package/dist/core/database/decorators.js +0 -98
- package/dist/core/dtos/access.dto.d.ts +0 -4
- package/dist/core/dtos/access.dto.js +0 -21
- package/dist/core/dtos/pagination.dto.d.ts +0 -13
- package/dist/core/dtos/pagination.dto.js +0 -62
- package/dist/core/types.d.ts +0 -23
- package/dist/core/types.js +0 -29
- package/dist/generatorDatasource.d.ts +0 -2
- package/dist/generatorDatasource.js +0 -12
- package/dist/index.js +0 -31
- package/dist/loadRelations.js +0 -92
- package/dist/outputKeys.d.ts +0 -2
- package/dist/outputKeys.js +0 -17
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types.d.ts +0 -85
- package/dist/types.js +0 -2
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
export interface OpenAPIObject {
|
|
2
|
-
openapi: string;
|
|
3
|
-
info: InfoObject;
|
|
4
|
-
servers?: ServerObject[];
|
|
5
|
-
paths: PathsObject;
|
|
6
|
-
components?: ComponentsObject;
|
|
7
|
-
security?: SecurityRequirementObject[];
|
|
8
|
-
tags?: TagObject[];
|
|
9
|
-
externalDocs?: ExternalDocumentationObject;
|
|
10
|
-
}
|
|
11
|
-
export interface InfoObject {
|
|
12
|
-
title: string;
|
|
13
|
-
description?: string;
|
|
14
|
-
termsOfService?: string;
|
|
15
|
-
contact?: ContactObject;
|
|
16
|
-
license?: LicenseObject;
|
|
17
|
-
version: string;
|
|
18
|
-
}
|
|
19
|
-
export interface ContactObject {
|
|
20
|
-
name?: string;
|
|
21
|
-
url?: string;
|
|
22
|
-
email?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface LicenseObject {
|
|
25
|
-
name: string;
|
|
26
|
-
url?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface ServerObject {
|
|
29
|
-
url: string;
|
|
30
|
-
description?: string;
|
|
31
|
-
variables?: Record<string, ServerVariableObject>;
|
|
32
|
-
}
|
|
33
|
-
export interface ServerVariableObject {
|
|
34
|
-
enum?: string[] | boolean[] | number[];
|
|
35
|
-
default: string | boolean | number;
|
|
36
|
-
description?: string;
|
|
37
|
-
}
|
|
38
|
-
export interface ComponentsObject {
|
|
39
|
-
schemas?: Record<string, SchemaObject | ReferenceObject>;
|
|
40
|
-
responses?: Record<string, ResponseObject | ReferenceObject>;
|
|
41
|
-
parameters?: Record<string, ParameterObject | ReferenceObject>;
|
|
42
|
-
examples?: Record<string, ExampleObject | ReferenceObject>;
|
|
43
|
-
requestBodies?: Record<string, RequestBodyObject | ReferenceObject>;
|
|
44
|
-
headers?: Record<string, HeaderObject | ReferenceObject>;
|
|
45
|
-
securitySchemes?: Record<string, SecuritySchemeObject | ReferenceObject>;
|
|
46
|
-
links?: Record<string, LinkObject | ReferenceObject>;
|
|
47
|
-
callbacks?: Record<string, CallbackObject | ReferenceObject>;
|
|
48
|
-
}
|
|
49
|
-
export declare type PathsObject = Record<string, PathItemObject>;
|
|
50
|
-
export interface PathItemObject {
|
|
51
|
-
$ref?: string;
|
|
52
|
-
summary?: string;
|
|
53
|
-
description?: string;
|
|
54
|
-
get?: OperationObject;
|
|
55
|
-
put?: OperationObject;
|
|
56
|
-
post?: OperationObject;
|
|
57
|
-
delete?: OperationObject;
|
|
58
|
-
options?: OperationObject;
|
|
59
|
-
head?: OperationObject;
|
|
60
|
-
patch?: OperationObject;
|
|
61
|
-
trace?: OperationObject;
|
|
62
|
-
servers?: ServerObject[];
|
|
63
|
-
parameters?: (ParameterObject | ReferenceObject)[];
|
|
64
|
-
}
|
|
65
|
-
export interface OperationObject {
|
|
66
|
-
tags?: string[];
|
|
67
|
-
summary?: string;
|
|
68
|
-
description?: string;
|
|
69
|
-
externalDocs?: ExternalDocumentationObject;
|
|
70
|
-
operationId?: string;
|
|
71
|
-
parameters?: (ParameterObject | ReferenceObject)[];
|
|
72
|
-
requestBody?: RequestBodyObject | ReferenceObject;
|
|
73
|
-
responses: ResponsesObject;
|
|
74
|
-
callbacks?: CallbacksObject;
|
|
75
|
-
deprecated?: boolean;
|
|
76
|
-
security?: SecurityRequirementObject[];
|
|
77
|
-
servers?: ServerObject[];
|
|
78
|
-
}
|
|
79
|
-
export interface ExternalDocumentationObject {
|
|
80
|
-
description?: string;
|
|
81
|
-
url: string;
|
|
82
|
-
}
|
|
83
|
-
export declare type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';
|
|
84
|
-
export declare type ParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
|
|
85
|
-
export interface BaseParameterObject {
|
|
86
|
-
description?: string;
|
|
87
|
-
required?: boolean;
|
|
88
|
-
deprecated?: boolean;
|
|
89
|
-
allowEmptyValue?: boolean;
|
|
90
|
-
style?: ParameterStyle;
|
|
91
|
-
explode?: boolean;
|
|
92
|
-
allowReserved?: boolean;
|
|
93
|
-
schema?: SchemaObject | ReferenceObject;
|
|
94
|
-
examples?: Record<string, ExampleObject | ReferenceObject>;
|
|
95
|
-
example?: any;
|
|
96
|
-
content?: ContentObject;
|
|
97
|
-
}
|
|
98
|
-
export interface ParameterObject extends BaseParameterObject {
|
|
99
|
-
name: string;
|
|
100
|
-
in: ParameterLocation;
|
|
101
|
-
}
|
|
102
|
-
export interface RequestBodyObject {
|
|
103
|
-
description?: string;
|
|
104
|
-
content: ContentObject;
|
|
105
|
-
required?: boolean;
|
|
106
|
-
}
|
|
107
|
-
export declare type ContentObject = Record<string, MediaTypeObject>;
|
|
108
|
-
export interface MediaTypeObject {
|
|
109
|
-
schema?: SchemaObject | ReferenceObject;
|
|
110
|
-
examples?: ExamplesObject;
|
|
111
|
-
example?: any;
|
|
112
|
-
encoding?: EncodingObject;
|
|
113
|
-
}
|
|
114
|
-
export declare type EncodingObject = Record<string, EncodingPropertyObject>;
|
|
115
|
-
export interface EncodingPropertyObject {
|
|
116
|
-
contentType?: string;
|
|
117
|
-
headers?: Record<string, HeaderObject | ReferenceObject>;
|
|
118
|
-
style?: string;
|
|
119
|
-
explode?: boolean;
|
|
120
|
-
allowReserved?: boolean;
|
|
121
|
-
}
|
|
122
|
-
export interface ResponsesObject extends Record<string, ResponseObject | ReferenceObject | undefined> {
|
|
123
|
-
default?: ResponseObject | ReferenceObject;
|
|
124
|
-
}
|
|
125
|
-
export interface ResponseObject {
|
|
126
|
-
description: string;
|
|
127
|
-
headers?: HeadersObject;
|
|
128
|
-
content?: ContentObject;
|
|
129
|
-
links?: LinksObject;
|
|
130
|
-
}
|
|
131
|
-
export declare type CallbacksObject = Record<string, CallbackObject | ReferenceObject>;
|
|
132
|
-
export declare type CallbackObject = Record<string, PathItemObject>;
|
|
133
|
-
export declare type HeadersObject = Record<string, HeaderObject | ReferenceObject>;
|
|
134
|
-
export interface ExampleObject {
|
|
135
|
-
summary?: string;
|
|
136
|
-
description?: string;
|
|
137
|
-
value?: any;
|
|
138
|
-
externalValue?: string;
|
|
139
|
-
}
|
|
140
|
-
export declare type LinksObject = Record<string, LinkObject | ReferenceObject>;
|
|
141
|
-
export interface LinkObject {
|
|
142
|
-
operationRef?: string;
|
|
143
|
-
operationId?: string;
|
|
144
|
-
parameters?: LinkParametersObject;
|
|
145
|
-
requestBody?: any | string;
|
|
146
|
-
description?: string;
|
|
147
|
-
server?: ServerObject;
|
|
148
|
-
}
|
|
149
|
-
export declare type LinkParametersObject = Record<string, any>;
|
|
150
|
-
export declare type HeaderObject = BaseParameterObject;
|
|
151
|
-
export interface TagObject {
|
|
152
|
-
name: string;
|
|
153
|
-
description?: string;
|
|
154
|
-
externalDocs?: ExternalDocumentationObject;
|
|
155
|
-
}
|
|
156
|
-
export declare type ExamplesObject = Record<string, ExampleObject | ReferenceObject>;
|
|
157
|
-
export interface ReferenceObject {
|
|
158
|
-
$ref: string;
|
|
159
|
-
}
|
|
160
|
-
export interface SchemaObject {
|
|
161
|
-
nullable?: boolean;
|
|
162
|
-
discriminator?: DiscriminatorObject;
|
|
163
|
-
readOnly?: boolean;
|
|
164
|
-
writeOnly?: boolean;
|
|
165
|
-
xml?: XmlObject;
|
|
166
|
-
externalDocs?: ExternalDocumentationObject;
|
|
167
|
-
example?: any;
|
|
168
|
-
examples?: any[] | Record<string, any>;
|
|
169
|
-
deprecated?: boolean;
|
|
170
|
-
type?: string;
|
|
171
|
-
allOf?: (SchemaObject | ReferenceObject)[];
|
|
172
|
-
oneOf?: (SchemaObject | ReferenceObject)[];
|
|
173
|
-
anyOf?: (SchemaObject | ReferenceObject)[];
|
|
174
|
-
not?: SchemaObject | ReferenceObject;
|
|
175
|
-
items?: SchemaObject | ReferenceObject;
|
|
176
|
-
properties?: Record<string, SchemaObject | ReferenceObject>;
|
|
177
|
-
additionalProperties?: SchemaObject | ReferenceObject | boolean;
|
|
178
|
-
patternProperties?: SchemaObject | ReferenceObject | any;
|
|
179
|
-
description?: string;
|
|
180
|
-
format?: string;
|
|
181
|
-
default?: any;
|
|
182
|
-
title?: string;
|
|
183
|
-
multipleOf?: number;
|
|
184
|
-
maximum?: number;
|
|
185
|
-
exclusiveMaximum?: boolean;
|
|
186
|
-
minimum?: number;
|
|
187
|
-
exclusiveMinimum?: boolean;
|
|
188
|
-
maxLength?: number;
|
|
189
|
-
minLength?: number;
|
|
190
|
-
pattern?: string;
|
|
191
|
-
maxItems?: number;
|
|
192
|
-
minItems?: number;
|
|
193
|
-
uniqueItems?: boolean;
|
|
194
|
-
maxProperties?: number;
|
|
195
|
-
minProperties?: number;
|
|
196
|
-
required?: string[];
|
|
197
|
-
enum?: any[];
|
|
198
|
-
}
|
|
199
|
-
export declare type SchemasObject = Record<string, SchemaObject>;
|
|
200
|
-
export interface DiscriminatorObject {
|
|
201
|
-
propertyName: string;
|
|
202
|
-
mapping?: Record<string, string>;
|
|
203
|
-
}
|
|
204
|
-
export interface XmlObject {
|
|
205
|
-
name?: string;
|
|
206
|
-
namespace?: string;
|
|
207
|
-
prefix?: string;
|
|
208
|
-
attribute?: boolean;
|
|
209
|
-
wrapped?: boolean;
|
|
210
|
-
}
|
|
211
|
-
export declare type SecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
|
|
212
|
-
export interface SecuritySchemeObject {
|
|
213
|
-
type: SecuritySchemeType;
|
|
214
|
-
description?: string;
|
|
215
|
-
name?: string;
|
|
216
|
-
in?: string;
|
|
217
|
-
scheme?: string;
|
|
218
|
-
bearerFormat?: string;
|
|
219
|
-
flows?: OAuthFlowsObject;
|
|
220
|
-
openIdConnectUrl?: string;
|
|
221
|
-
}
|
|
222
|
-
export interface OAuthFlowsObject {
|
|
223
|
-
implicit?: OAuthFlowObject;
|
|
224
|
-
password?: OAuthFlowObject;
|
|
225
|
-
clientCredentials?: OAuthFlowObject;
|
|
226
|
-
authorizationCode?: OAuthFlowObject;
|
|
227
|
-
}
|
|
228
|
-
export interface OAuthFlowObject {
|
|
229
|
-
authorizationUrl?: string;
|
|
230
|
-
tokenUrl?: string;
|
|
231
|
-
refreshUrl?: string;
|
|
232
|
-
scopes: ScopesObject;
|
|
233
|
-
}
|
|
234
|
-
export declare type ScopesObject = Record<string, any>;
|
|
235
|
-
export declare type SecurityRequirementObject = Record<string, string[]>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { GraphQLScalarType } from 'graphql';
|
|
2
|
-
import { Type } from '../common';
|
|
3
|
-
export declare type GqlTypeReference = Type<any> | GraphQLScalarType | Function | object | symbol;
|
|
4
|
-
export declare type ReturnTypeFuncValue = GqlTypeReference | [GqlTypeReference];
|
|
5
|
-
export declare type ReturnTypeFunc = (returns?: void) => ReturnTypeFuncValue;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SchemaObject } from './open-api-spec.interface';
|
|
2
|
-
import { Type } from '../common';
|
|
3
|
-
export interface SchemaObjectMetadata extends Omit<SchemaObject, 'type' | 'required'> {
|
|
4
|
-
type?: Type<unknown> | Function | [Function] | string | Record<string, any>;
|
|
5
|
-
isArray?: boolean;
|
|
6
|
-
required?: boolean;
|
|
7
|
-
name?: string;
|
|
8
|
-
enumName?: string;
|
|
9
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Type } from './common';
|
|
2
|
-
export declare class LazyMetadataStorageHost {
|
|
3
|
-
private readonly lazyMetadataByTarget;
|
|
4
|
-
store(func: Function): void;
|
|
5
|
-
store(target: Type<unknown>, func: Function): void;
|
|
6
|
-
store(target: Type<unknown>, func: Function, options?: {
|
|
7
|
-
isField: boolean;
|
|
8
|
-
}): void;
|
|
9
|
-
load(types?: Function[], options?: {
|
|
10
|
-
skipFieldLazyMetadata?: boolean;
|
|
11
|
-
}): void;
|
|
12
|
-
private concatPrototypes;
|
|
13
|
-
private updateStorage;
|
|
14
|
-
}
|
|
15
|
-
export declare const LazyMetadataStorage: LazyMetadataStorageHost;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LazyMetadataStorage = exports.LazyMetadataStorageHost = void 0;
|
|
4
|
-
const common_1 = require("./common");
|
|
5
|
-
const NO_TARGET_METADATA = Symbol('NO_TARGET_METADATA');
|
|
6
|
-
const FIELD_LAZY_METADATA = Symbol('FIELD_LAZY_METADATA');
|
|
7
|
-
class LazyMetadataStorageHost {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.lazyMetadataByTarget = new Map();
|
|
10
|
-
}
|
|
11
|
-
store(targetOrFn, func, options) {
|
|
12
|
-
if (func && options?.isField) {
|
|
13
|
-
this.updateStorage(FIELD_LAZY_METADATA, func);
|
|
14
|
-
this.updateStorage(targetOrFn, func);
|
|
15
|
-
}
|
|
16
|
-
else if (func) {
|
|
17
|
-
this.updateStorage(targetOrFn, func);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
this.updateStorage(NO_TARGET_METADATA, targetOrFn);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
load(types = [], options = {
|
|
24
|
-
skipFieldLazyMetadata: false
|
|
25
|
-
}) {
|
|
26
|
-
types = this.concatPrototypes(types);
|
|
27
|
-
let loadersToExecute = (0, common_1.flatten)(types
|
|
28
|
-
.map(target => this.lazyMetadataByTarget.get(target))
|
|
29
|
-
.filter(metadata => metadata));
|
|
30
|
-
loadersToExecute = loadersToExecute.concat(...(this.lazyMetadataByTarget.get(NO_TARGET_METADATA) || []));
|
|
31
|
-
if (!options.skipFieldLazyMetadata) {
|
|
32
|
-
loadersToExecute = loadersToExecute.concat(...(this.lazyMetadataByTarget.get(FIELD_LAZY_METADATA) || []));
|
|
33
|
-
}
|
|
34
|
-
loadersToExecute.forEach(func => func());
|
|
35
|
-
}
|
|
36
|
-
concatPrototypes(types) {
|
|
37
|
-
const typesWithPrototypes = types
|
|
38
|
-
.filter(type => type && type.prototype)
|
|
39
|
-
.map(type => {
|
|
40
|
-
const parentTypes = [];
|
|
41
|
-
let parent = type;
|
|
42
|
-
while (!(0, common_1.isUndefined)(parent.prototype)) {
|
|
43
|
-
parent = Object.getPrototypeOf(parent);
|
|
44
|
-
if (parent === Function.prototype) {
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
|
-
parentTypes.push(parent);
|
|
48
|
-
}
|
|
49
|
-
parentTypes.push(type);
|
|
50
|
-
return parentTypes;
|
|
51
|
-
});
|
|
52
|
-
return (0, common_1.flatten)(typesWithPrototypes);
|
|
53
|
-
}
|
|
54
|
-
updateStorage(key, func) {
|
|
55
|
-
const existingArray = this.lazyMetadataByTarget.get(key);
|
|
56
|
-
if (existingArray) {
|
|
57
|
-
existingArray.push(func);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
this.lazyMetadataByTarget.set(key, [func]);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.LazyMetadataStorageHost = LazyMetadataStorageHost;
|
|
65
|
-
const globalRef = global;
|
|
66
|
-
exports.LazyMetadataStorage = globalRef.GqlLazyMetadataStorageHost ||
|
|
67
|
-
(globalRef.GqlLazyMetadataStorageHost = new LazyMetadataStorageHost());
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DirectiveMetadata } from './directive.metadata';
|
|
2
|
-
import { PropertyMetadata } from './property.metadata';
|
|
3
|
-
export interface ClassMetadata {
|
|
4
|
-
target: Function;
|
|
5
|
-
name: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
isAbstract?: boolean;
|
|
8
|
-
directives?: DirectiveMetadata[];
|
|
9
|
-
extensions?: Record<string, unknown>;
|
|
10
|
-
properties?: PropertyMetadata[];
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface EnumMetadataValuesMapOptions {
|
|
2
|
-
deprecationReason?: string;
|
|
3
|
-
description?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare type EnumMetadataValuesMap<T extends object> = Partial<Record<keyof T, EnumMetadataValuesMapOptions>>;
|
|
6
|
-
export interface EnumMetadata<T extends object = any> {
|
|
7
|
-
ref: T;
|
|
8
|
-
name: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
valuesMap?: EnumMetadataValuesMap<T>;
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './class.metadata';
|
|
2
|
-
export * from './directive.metadata';
|
|
3
|
-
export * from './enum.metadata';
|
|
4
|
-
export * from './extensions.metadata';
|
|
5
|
-
export * from './param.metadata';
|
|
6
|
-
export * from './property.metadata';
|
|
7
|
-
export * from './resolver.metadata';
|
|
8
|
-
export * from './union.metadata';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./class.metadata"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./directive.metadata"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./enum.metadata"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./extensions.metadata"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./param.metadata"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./property.metadata"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./resolver.metadata"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./union.metadata"), exports);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ResolveTypeFn } from '../interfaces/resolve-type-fn.interface';
|
|
2
|
-
import { ClassMetadata } from './class.metadata';
|
|
3
|
-
export interface InterfaceMetadata extends ClassMetadata {
|
|
4
|
-
resolveType?: ResolveTypeFn;
|
|
5
|
-
interfaces?: Function | Function[] | (() => Function | Function[]);
|
|
6
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { GqlTypeReference } from '../interfaces/return-type-func.interface';
|
|
2
|
-
import { TypeOptions } from '../interfaces/type-options.interface';
|
|
3
|
-
export interface BaseArgMetadata {
|
|
4
|
-
target: Function;
|
|
5
|
-
methodName: string;
|
|
6
|
-
typeFn: (type?: any) => GqlTypeReference;
|
|
7
|
-
options: TypeOptions;
|
|
8
|
-
index: number;
|
|
9
|
-
}
|
|
10
|
-
export interface ArgParamMetadata extends BaseArgMetadata {
|
|
11
|
-
kind: 'arg';
|
|
12
|
-
name: string;
|
|
13
|
-
description?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface ArgsParamMetadata extends BaseArgMetadata {
|
|
16
|
-
kind: 'args';
|
|
17
|
-
}
|
|
18
|
-
export declare type MethodArgsMetadata = ArgParamMetadata | ArgsParamMetadata;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { GqlTypeReference } from '../interfaces/return-type-func.interface';
|
|
2
|
-
import { FieldMiddleware } from '../interfaces/field-middleware.interface';
|
|
3
|
-
import { TypeOptions } from '../interfaces/type-options.interface';
|
|
4
|
-
import { DirectiveMetadata } from './directive.metadata';
|
|
5
|
-
import { MethodArgsMetadata } from './param.metadata';
|
|
6
|
-
import { Complexity } from '../interfaces/complexity.interface';
|
|
7
|
-
export interface PropertyMetadata {
|
|
8
|
-
schemaName: string;
|
|
9
|
-
name: string;
|
|
10
|
-
typeFn: () => GqlTypeReference;
|
|
11
|
-
target: Function;
|
|
12
|
-
options: TypeOptions;
|
|
13
|
-
description?: string;
|
|
14
|
-
deprecationReason?: string;
|
|
15
|
-
methodArgs?: MethodArgsMetadata[];
|
|
16
|
-
directives?: DirectiveMetadata[];
|
|
17
|
-
extensions?: Record<string, unknown>;
|
|
18
|
-
complexity?: Complexity;
|
|
19
|
-
middleware?: FieldMiddleware[];
|
|
20
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { GqlTypeReference } from '../interfaces/return-type-func.interface';
|
|
2
|
-
import { TypeOptions } from '../interfaces/type-options.interface';
|
|
3
|
-
import { Type } from '../common';
|
|
4
|
-
import { DirectiveMetadata } from './directive.metadata';
|
|
5
|
-
import { MethodArgsMetadata } from './param.metadata';
|
|
6
|
-
import { Complexity } from '../interfaces/complexity.interface';
|
|
7
|
-
export interface ResolverClassMetadata {
|
|
8
|
-
target: Function;
|
|
9
|
-
typeFn: (of?: void) => Type<unknown> | Function;
|
|
10
|
-
isAbstract?: boolean;
|
|
11
|
-
parent?: ResolverClassMetadata;
|
|
12
|
-
}
|
|
13
|
-
export interface BaseResolverMetadata {
|
|
14
|
-
target: Function;
|
|
15
|
-
methodName: string;
|
|
16
|
-
schemaName: string;
|
|
17
|
-
description?: string;
|
|
18
|
-
deprecationReason?: string;
|
|
19
|
-
methodArgs?: MethodArgsMetadata[];
|
|
20
|
-
classMetadata?: ResolverClassMetadata;
|
|
21
|
-
directives?: DirectiveMetadata[];
|
|
22
|
-
extensions?: Record<string, unknown>;
|
|
23
|
-
complexity?: Complexity;
|
|
24
|
-
}
|
|
25
|
-
export interface ResolverTypeMetadata extends BaseResolverMetadata {
|
|
26
|
-
typeFn: (type?: void) => GqlTypeReference;
|
|
27
|
-
returnTypeOptions: TypeOptions;
|
|
28
|
-
}
|
|
29
|
-
export interface FieldResolverMetadata extends BaseResolverMetadata {
|
|
30
|
-
kind: 'internal' | 'external';
|
|
31
|
-
typeOptions?: TypeOptions;
|
|
32
|
-
typeFn?: (type?: void) => GqlTypeReference;
|
|
33
|
-
objectTypeFn?: (of?: void) => Type<unknown> | Function;
|
|
34
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Type } from '../common';
|
|
2
|
-
import { ResolveTypeFn } from '../interfaces/resolve-type-fn.interface';
|
|
3
|
-
export interface UnionMetadata<T extends Type<unknown>[] = Type<unknown>[]> {
|
|
4
|
-
name: string;
|
|
5
|
-
typesFn: () => T;
|
|
6
|
-
id?: symbol;
|
|
7
|
-
description?: string;
|
|
8
|
-
resolveType?: ResolveTypeFn;
|
|
9
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface ObjectTypeOptions {
|
|
2
|
-
description?: string;
|
|
3
|
-
isAbstract?: boolean;
|
|
4
|
-
implements?: Function | Function[] | (() => Function | Function[]);
|
|
5
|
-
}
|
|
6
|
-
export declare function ObjectType(): ClassDecorator;
|
|
7
|
-
export declare function ObjectType(options: ObjectTypeOptions): ClassDecorator;
|
|
8
|
-
export declare function ObjectType(name: string, options?: ObjectTypeOptions): ClassDecorator;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObjectType = void 0;
|
|
4
|
-
const lazy_metadata_storage_1 = require("./lazy-metadata.storage");
|
|
5
|
-
const type_metadata_storage_1 = require("./type-metadata.storage");
|
|
6
|
-
const add_class_type_metadata_util_1 = require("./interfaces/add-class-type-metadata.util");
|
|
7
|
-
const common_1 = require("./common");
|
|
8
|
-
function ObjectType(nameOrOptions, objectTypeOptions) {
|
|
9
|
-
const [name, options = {}] = (0, common_1.isString)(nameOrOptions)
|
|
10
|
-
? [nameOrOptions, objectTypeOptions]
|
|
11
|
-
: [undefined, nameOrOptions];
|
|
12
|
-
return target => {
|
|
13
|
-
const addObjectTypeMetadata = () => type_metadata_storage_1.TypeMetadataStorage.addObjectTypeMetadata({
|
|
14
|
-
name: name || target.name,
|
|
15
|
-
target,
|
|
16
|
-
description: options.description,
|
|
17
|
-
interfaces: options.implements,
|
|
18
|
-
isAbstract: options.isAbstract
|
|
19
|
-
});
|
|
20
|
-
addObjectTypeMetadata();
|
|
21
|
-
lazy_metadata_storage_1.LazyMetadataStorage.store(addObjectTypeMetadata);
|
|
22
|
-
(0, add_class_type_metadata_util_1.addClassTypeMetadata)(target, common_1.ClassType.OBJECT);
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
exports.ObjectType = ObjectType;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OmitType = void 0;
|
|
4
|
-
const lodash_1 = require("lodash");
|
|
5
|
-
const api_property_decorator_1 = require("./decorators/api-property.decorator");
|
|
6
|
-
const mapped_types_utils_1 = require("./utils/mapped-types.utils");
|
|
7
|
-
const model_properties_accessor_1 = require("./utils/model-properties-accessor");
|
|
8
|
-
const apply_is_optional_decorator_1 = require("./decorators/apply-is-optional.decorator");
|
|
9
|
-
const modelPropertiesAccessor = new model_properties_accessor_1.ModelPropertiesAccessor();
|
|
10
|
-
function OmitType(classRef, keys) {
|
|
11
|
-
const fields = modelPropertiesAccessor
|
|
12
|
-
.getModelProperties(classRef.prototype)
|
|
13
|
-
.filter(item => !keys.includes(item));
|
|
14
|
-
const isInheritedPredicate = (propertyKey) => !keys.includes(propertyKey);
|
|
15
|
-
class OmitTypeClass {
|
|
16
|
-
constructor() {
|
|
17
|
-
(0, apply_is_optional_decorator_1.inheritPropertyInitializers)(this, classRef, isInheritedPredicate);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
(0, apply_is_optional_decorator_1.inheritValidationMetadata)(classRef, OmitTypeClass, isInheritedPredicate);
|
|
21
|
-
(0, apply_is_optional_decorator_1.inheritTransformationMetadata)(classRef, OmitTypeClass, isInheritedPredicate);
|
|
22
|
-
(0, mapped_types_utils_1.clonePluginMetadataFactory)(OmitTypeClass, classRef.prototype, (metadata) => (0, lodash_1.omit)(metadata, keys));
|
|
23
|
-
fields.forEach(propertyKey => {
|
|
24
|
-
const metadata = Reflect.getMetadata(api_property_decorator_1.DECORATORS.API_MODEL_PROPERTIES, classRef.prototype, propertyKey);
|
|
25
|
-
const decoratorFactory = (0, api_property_decorator_1.ApiProperty)(metadata);
|
|
26
|
-
decoratorFactory(OmitTypeClass.prototype, propertyKey);
|
|
27
|
-
});
|
|
28
|
-
return OmitTypeClass;
|
|
29
|
-
}
|
|
30
|
-
exports.OmitType = OmitType;
|