zibri 1.1.0 → 1.2.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/dist/index.d.mts +194 -84
- package/dist/index.d.ts +194 -84
- package/dist/index.js +702 -708
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +700 -709
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Request, Response, Express, NextFunction } from 'express';
|
|
2
|
-
import {
|
|
2
|
+
import { EntitySchemaRelationOptions, DataSourceOptions as DataSourceOptions$1, ColumnType as ColumnType$1, QueryRunner, FindOneOptions as FindOneOptions$1, FindManyOptions, Repository as Repository$1, FindOptionsWhere, DataSource as DataSource$1, EntitySchema, EntitySchemaColumnOptions } from 'typeorm';
|
|
3
|
+
import { IsolationLevel } from 'typeorm/driver/types/IsolationLevel';
|
|
3
4
|
import { oas31 } from 'openapi3-ts';
|
|
4
5
|
|
|
5
6
|
interface DataSourceServiceInterface {
|
|
@@ -10,23 +11,15 @@ declare class DataSourceService implements DataSourceServiceInterface {
|
|
|
10
11
|
private readonly logger;
|
|
11
12
|
constructor();
|
|
12
13
|
init(): Promise<void>;
|
|
14
|
+
private checkForOrphanedEntities;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
declare function DataSource(): ClassDecorator;
|
|
16
18
|
|
|
17
|
-
type
|
|
19
|
+
type BasePropertyMetadata = {
|
|
18
20
|
required: boolean;
|
|
19
|
-
|
|
20
|
-
primary: boolean;
|
|
21
|
+
description: string | undefined;
|
|
21
22
|
};
|
|
22
|
-
type StringPropertyMetadataInput = Partial<StringPropertyMetadata> & Pick<StringPropertyMetadata, 'type'>;
|
|
23
|
-
|
|
24
|
-
type NumberPropertyMetadata = {
|
|
25
|
-
required: boolean;
|
|
26
|
-
type: 'number';
|
|
27
|
-
primary: boolean;
|
|
28
|
-
};
|
|
29
|
-
type NumberPropertyMetadataInput = Partial<NumberPropertyMetadata> & Pick<NumberPropertyMetadata, 'type'>;
|
|
30
23
|
|
|
31
24
|
type Newable<T> = new (...args: any[]) => T;
|
|
32
25
|
|
|
@@ -36,29 +29,110 @@ type DeepPartial<T> = T | (T extends (infer U)[] ? DeepPartial<U>[] : T extends
|
|
|
36
29
|
|
|
37
30
|
type OmitStrict<T extends object, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
38
31
|
|
|
39
|
-
type
|
|
40
|
-
|
|
32
|
+
type StringFormat = 'uuid' | 'email';
|
|
33
|
+
type StringPropertyMetadata = BasePropertyMetadata & {
|
|
34
|
+
type: 'string';
|
|
35
|
+
primary: boolean;
|
|
36
|
+
format: StringFormat | undefined;
|
|
37
|
+
unique: boolean;
|
|
38
|
+
};
|
|
39
|
+
type StringPropertyMetadataInput = Partial<OmitStrict<StringPropertyMetadata, 'type'>>;
|
|
40
|
+
|
|
41
|
+
type NumberPropertyMetadata = BasePropertyMetadata & {
|
|
42
|
+
type: 'number';
|
|
43
|
+
primary: boolean;
|
|
44
|
+
unique: boolean;
|
|
45
|
+
};
|
|
46
|
+
type NumberPropertyMetadataInput = Partial<OmitStrict<NumberPropertyMetadata, 'type'>>;
|
|
47
|
+
|
|
48
|
+
type ObjectPropertyMetadata = BasePropertyMetadata & {
|
|
41
49
|
type: 'object';
|
|
42
50
|
cls: Newable<unknown>;
|
|
43
51
|
};
|
|
44
|
-
type ObjectPropertyMetadataInput = Partial<ObjectPropertyMetadata
|
|
52
|
+
type ObjectPropertyMetadataInput = Partial<OmitStrict<ObjectPropertyMetadata, 'type'>> & Pick<ObjectPropertyMetadata, 'cls'>;
|
|
45
53
|
|
|
46
|
-
type
|
|
47
|
-
|
|
54
|
+
type BaseEntity = {
|
|
55
|
+
id: string | number;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
type ArrayPropertyMetadata = BasePropertyMetadata & {
|
|
48
59
|
type: 'array';
|
|
49
|
-
|
|
60
|
+
items: PropertyMetadata;
|
|
61
|
+
};
|
|
62
|
+
type ArrayItemPropertyType = Exclude<PropertyMetadata['type'], RelationMetadata<BaseEntity>['type']>;
|
|
63
|
+
type ArrayPropertyItemMetadata = PropertyMetadataInput & {
|
|
64
|
+
type: ArrayItemPropertyType;
|
|
65
|
+
};
|
|
66
|
+
type ArrayPropertyMetadataInput = Partial<OmitStrict<ArrayPropertyMetadata, 'type' | 'items'>> & {
|
|
67
|
+
items: ArrayPropertyItemMetadata;
|
|
50
68
|
};
|
|
51
|
-
type ArrayPropertyMetadataInput = Partial<ArrayPropertyMetadata> & Pick<ArrayPropertyMetadata, 'type' | 'itemType'>;
|
|
52
69
|
|
|
53
|
-
type DatePropertyMetadata = {
|
|
54
|
-
required: boolean;
|
|
70
|
+
type DatePropertyMetadata = BasePropertyMetadata & {
|
|
55
71
|
type: 'date';
|
|
56
72
|
};
|
|
57
|
-
type DatePropertyMetadataInput = Partial<
|
|
73
|
+
type DatePropertyMetadataInput = Partial<OmitStrict<DatePropertyMetadata, 'type'>>;
|
|
58
74
|
|
|
59
|
-
type
|
|
60
|
-
type
|
|
61
|
-
|
|
75
|
+
type BooleanPropertyMetadata = BasePropertyMetadata & {
|
|
76
|
+
type: 'boolean';
|
|
77
|
+
};
|
|
78
|
+
type BooleanPropertyMetadataInput = Partial<OmitStrict<BooleanPropertyMetadata, 'type'>>;
|
|
79
|
+
|
|
80
|
+
type BaseRelationMetadata<T extends BaseEntity> = BasePropertyMetadata & Required<Pick<EntitySchemaRelationOptions, 'cascade' | 'persistence'>> & {
|
|
81
|
+
/**
|
|
82
|
+
* A function returning the target class,
|
|
83
|
+
* used to avoid circular import issues.
|
|
84
|
+
*/
|
|
85
|
+
target: () => Newable<T>;
|
|
86
|
+
/**
|
|
87
|
+
* The name of the inverse property on the target,
|
|
88
|
+
* e.g. 'user' if Posts has `@ManyToOne(() => User, 'post')`.
|
|
89
|
+
*/
|
|
90
|
+
inverseSide: keyof T | undefined;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
type ManyToOnePropertyMetadata<T extends BaseEntity> = BaseRelationMetadata<T> & {
|
|
94
|
+
type: Relation.MANY_TO_ONE;
|
|
95
|
+
};
|
|
96
|
+
type ManyToOnePropertyMetadataInput<T extends BaseEntity> = Partial<OmitStrict<ManyToOnePropertyMetadata<T>, 'type'>> & Pick<ManyToOnePropertyMetadata<T>, 'target'>;
|
|
97
|
+
|
|
98
|
+
type OneToManyPropertyMetadata<T extends BaseEntity> = BaseRelationMetadata<T> & {
|
|
99
|
+
type: Relation.ONE_TO_MANY;
|
|
100
|
+
};
|
|
101
|
+
type OneToManyPropertyMetadataInput<T extends BaseEntity> = Partial<OmitStrict<OneToManyPropertyMetadata<T>, 'type'>> & Pick<OneToManyPropertyMetadata<T>, 'target'>;
|
|
102
|
+
|
|
103
|
+
type OneToOnePropertyMetadata<T extends BaseEntity> = BaseRelationMetadata<T> & {
|
|
104
|
+
type: Relation.ONE_TO_ONE;
|
|
105
|
+
};
|
|
106
|
+
type OneToOnePropertyMetadataInput<T extends BaseEntity> = Partial<OmitStrict<OneToOnePropertyMetadata<T>, 'type'>> & Pick<OneToOnePropertyMetadata<T>, 'target'>;
|
|
107
|
+
|
|
108
|
+
type ManyToManyPropertyMetadata<T extends BaseEntity> = BaseRelationMetadata<T> & {
|
|
109
|
+
type: Relation.MANY_TO_MANY;
|
|
110
|
+
};
|
|
111
|
+
type ManyToManyPropertyMetadataInput<T extends BaseEntity> = Partial<OmitStrict<ManyToManyPropertyMetadata<T>, 'type'>> & Pick<ManyToManyPropertyMetadata<T>, 'target'>;
|
|
112
|
+
|
|
113
|
+
declare enum Relation {
|
|
114
|
+
ONE_TO_ONE = "one-to-one",
|
|
115
|
+
ONE_TO_MANY = "one-to-many",
|
|
116
|
+
MANY_TO_ONE = "many-to-one",
|
|
117
|
+
MANY_TO_MANY = "many-to-many"
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
type PropertyMetadata = StringPropertyMetadata | NumberPropertyMetadata | ObjectPropertyMetadata | ArrayPropertyMetadata | DatePropertyMetadata | BooleanPropertyMetadata | RelationMetadata<BaseEntity>;
|
|
121
|
+
type RelationMetadata<T extends BaseEntity> = ManyToOnePropertyMetadata<T> | OneToManyPropertyMetadata<T> | OneToOnePropertyMetadata<T> | ManyToManyPropertyMetadata<T>;
|
|
122
|
+
type PropertyMetadataInput = StringPropertyMetadataInput | NumberPropertyMetadataInput | ObjectPropertyMetadataInput | ArrayPropertyMetadataInput | DatePropertyMetadataInput | BooleanPropertyMetadataInput;
|
|
123
|
+
type RelationMetadataInput<T extends BaseEntity> = ManyToOnePropertyMetadataInput<T> | OneToManyPropertyMetadataInput<T> | OneToOnePropertyMetadataInput<T> | ManyToManyPropertyMetadataInput<T>;
|
|
124
|
+
declare namespace Property {
|
|
125
|
+
function string(data?: StringPropertyMetadataInput): PropertyDecorator;
|
|
126
|
+
function number(data?: NumberPropertyMetadataInput): PropertyDecorator;
|
|
127
|
+
function boolean(data?: BooleanPropertyMetadataInput): PropertyDecorator;
|
|
128
|
+
function date(data?: DatePropertyMetadataInput): PropertyDecorator;
|
|
129
|
+
function object(data: ObjectPropertyMetadataInput): PropertyDecorator;
|
|
130
|
+
function array(data: ArrayPropertyMetadataInput): PropertyDecorator;
|
|
131
|
+
function manyToOne<T extends BaseEntity>(metadata: ManyToOnePropertyMetadataInput<T>): PropertyDecorator;
|
|
132
|
+
function oneToMany<T extends BaseEntity>(metadata: OneToManyPropertyMetadataInput<T>): PropertyDecorator;
|
|
133
|
+
function oneToOne<T extends BaseEntity>(metadata: OneToOnePropertyMetadataInput<T>): PropertyDecorator;
|
|
134
|
+
function manyToMany<T extends BaseEntity>(metadata: ManyToManyPropertyMetadataInput<T>): PropertyDecorator;
|
|
135
|
+
}
|
|
62
136
|
|
|
63
137
|
type EntityMetadata = {
|
|
64
138
|
tableName: string;
|
|
@@ -75,23 +149,55 @@ declare function PickType<T, K extends keyof T>(Base: Newable<T>, keys: readonly
|
|
|
75
149
|
|
|
76
150
|
declare function OmitType<T, K extends keyof T>(Base: Newable<T>, keys: readonly K[]): Newable<Omit<T, K>>;
|
|
77
151
|
|
|
78
|
-
type
|
|
79
|
-
|
|
152
|
+
type DataSourceOptions = DataSourceOptions$1;
|
|
153
|
+
|
|
154
|
+
type ColumnType = ColumnType$1;
|
|
155
|
+
|
|
156
|
+
type Transaction = {
|
|
157
|
+
queryRunner: QueryRunner;
|
|
158
|
+
commit: () => Promise<void>;
|
|
159
|
+
rollback: () => Promise<void>;
|
|
80
160
|
};
|
|
161
|
+
|
|
162
|
+
type BaseRepositoryOptions = {
|
|
163
|
+
transaction?: Transaction;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
type CreateOptions = BaseRepositoryOptions;
|
|
167
|
+
|
|
168
|
+
type CreateAllOptions = BaseRepositoryOptions;
|
|
169
|
+
|
|
170
|
+
type FindByIdOptions = BaseRepositoryOptions;
|
|
171
|
+
|
|
172
|
+
type FindOneOptions<T extends BaseEntity> = BaseRepositoryOptions & FindOneOptions$1<T>;
|
|
173
|
+
|
|
174
|
+
type FindAllOptions<T extends BaseEntity> = OmitStrict<FindManyOptions<T>, 'transaction'> & BaseRepositoryOptions;
|
|
175
|
+
|
|
176
|
+
type UpdateByIdOptions = BaseRepositoryOptions;
|
|
177
|
+
|
|
178
|
+
type UpdateAllOptions = BaseRepositoryOptions;
|
|
179
|
+
|
|
180
|
+
type DeleteByIdOptions = BaseRepositoryOptions;
|
|
181
|
+
|
|
182
|
+
type DeleteAllOptions<T extends BaseEntity> = FindAllOptions<T>;
|
|
183
|
+
|
|
81
184
|
declare class Repository<T extends BaseEntity> {
|
|
82
|
-
private readonly
|
|
185
|
+
private readonly entityClass;
|
|
83
186
|
private readonly typeOrmRepository;
|
|
84
187
|
private readonly logger;
|
|
85
|
-
constructor(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
188
|
+
constructor(entityClass: Newable<T>, typeOrmRepository: Repository$1<T>);
|
|
189
|
+
private getManager;
|
|
190
|
+
create(data: DeepPartial<T>, options?: CreateOptions): Promise<T>;
|
|
191
|
+
createAll(data: DeepPartial<T>[], options?: CreateAllOptions): Promise<T[]>;
|
|
192
|
+
findById(id: T['id'], options?: FindByIdOptions): Promise<T>;
|
|
89
193
|
findOne(options: FindOneOptions<T>): Promise<T>;
|
|
90
|
-
|
|
91
|
-
|
|
194
|
+
findAll(options?: FindAllOptions<T>): Promise<T[]>;
|
|
195
|
+
updateById(id: T['id'], data: DeepPartial<T>, options?: UpdateByIdOptions): Promise<T>;
|
|
196
|
+
updateAll(where: FindOptionsWhere<T> | FindOptionsWhere<T>[], data: DeepPartial<T>, options?: UpdateAllOptions): Promise<T[]>;
|
|
197
|
+
deleteById(id: T['id'], options?: DeleteByIdOptions): Promise<void>;
|
|
198
|
+
deleteAll(where: FindOptionsWhere<T> | FindOptionsWhere<T>[], options?: DeleteAllOptions<T>): Promise<T[]>;
|
|
92
199
|
}
|
|
93
200
|
|
|
94
|
-
type DataSourceOptions = DataSourceOptions$1;
|
|
95
201
|
declare abstract class BaseDataSource {
|
|
96
202
|
protected readonly columnTypeMappingOverride: Partial<Record<PropertyMetadata['type'], ColumnType>>;
|
|
97
203
|
private get columnTypeMapping();
|
|
@@ -100,9 +206,10 @@ declare abstract class BaseDataSource {
|
|
|
100
206
|
protected ds?: DataSource$1;
|
|
101
207
|
init(): Promise<void>;
|
|
102
208
|
protected getEntitySchemas(): EntitySchema[];
|
|
103
|
-
protected
|
|
209
|
+
protected propertyToRelationOptions<T extends BaseEntity>(metadata: RelationMetadata<T>): EntitySchemaRelationOptions;
|
|
210
|
+
protected propertyToColumnOptions(metadata: Exclude<PropertyMetadata, RelationMetadata<BaseEntity>>): EntitySchemaColumnOptions;
|
|
104
211
|
getRepository<T extends BaseEntity>(cls: Newable<T>): Repository<T>;
|
|
105
|
-
startTransaction(): Transaction
|
|
212
|
+
startTransaction(isolationLevel?: IsolationLevel): Promise<Transaction>;
|
|
106
213
|
}
|
|
107
214
|
|
|
108
215
|
type DiToken<T> = Newable<T> | string;
|
|
@@ -156,6 +263,8 @@ declare function isMimeType(value: string): value is MimeType;
|
|
|
156
263
|
|
|
157
264
|
type KnownHeader = 'Accept' | 'Accept-Encoding' | 'Authorization' | 'Cache-Control' | 'Content-Length' | 'Content-Type' | 'Cookie' | 'Host' | 'Origin' | 'Referer' | 'User-Agent' | 'X-Requested-With' | 'X-Forwarded-For' | 'X-Forwarded-Host' | 'X-Forwarded-Proto' | 'X-Real-IP' | 'X-Correlation-ID' | 'If-None-Match' | 'If-Modified-Since' | 'Connection' | 'DNT' | 'Sec-Fetch-Mode' | 'Sec-Fetch-Site' | 'TE';
|
|
158
265
|
|
|
266
|
+
type Header = KnownHeader | (string & {});
|
|
267
|
+
|
|
159
268
|
interface BodyParserInterface {
|
|
160
269
|
readonly contentType: MimeType;
|
|
161
270
|
parse: (req: Request) => Promise<unknown>;
|
|
@@ -206,51 +315,48 @@ declare function Delete(path?: Route): MethodDecorator;
|
|
|
206
315
|
|
|
207
316
|
declare function Patch(path?: Route): MethodDecorator;
|
|
208
317
|
|
|
209
|
-
type
|
|
318
|
+
type BaseParamMetadata = {
|
|
210
319
|
name: string;
|
|
211
|
-
description?: string;
|
|
212
|
-
required: boolean;
|
|
213
|
-
type: 'string' | 'number';
|
|
214
|
-
};
|
|
215
|
-
type BaseQueryParamMetadata = {
|
|
216
|
-
name: string;
|
|
217
|
-
description?: string;
|
|
218
|
-
required: boolean;
|
|
219
320
|
};
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
type
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
type
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
321
|
+
|
|
322
|
+
type StringParamMetadata = BaseParamMetadata & OmitStrict<StringPropertyMetadata, 'primary'>;
|
|
323
|
+
type StringParamMetadataInput = Partial<OmitStrict<StringParamMetadata, 'name'>>;
|
|
324
|
+
|
|
325
|
+
type NumberParamMetadata = BaseParamMetadata & OmitStrict<NumberPropertyMetadata, 'primary'>;
|
|
326
|
+
type NumberParamMetadataInput = Partial<OmitStrict<NumberParamMetadata, 'name'>>;
|
|
327
|
+
|
|
328
|
+
type BooleanParamMetadata = BaseParamMetadata & BooleanPropertyMetadata;
|
|
329
|
+
type BooleanParamMetadataInput = Partial<OmitStrict<BooleanParamMetadata, 'name'>>;
|
|
330
|
+
|
|
331
|
+
type DateParamMetadata = BaseParamMetadata & DatePropertyMetadata;
|
|
332
|
+
type DateParamMetadataInput = Partial<OmitStrict<DateParamMetadata, 'name'>>;
|
|
333
|
+
|
|
334
|
+
type ObjectParamMetadata = BaseParamMetadata & ObjectPropertyMetadata;
|
|
335
|
+
type ObjectParamMetadataInput = Partial<OmitStrict<ObjectParamMetadata, 'name'>> & Pick<ObjectParamMetadata, 'cls'>;
|
|
336
|
+
|
|
337
|
+
type ArrayParamMetadata = BaseParamMetadata & ArrayPropertyMetadata;
|
|
338
|
+
type ArrayParamMetadataInput = Partial<OmitStrict<ArrayParamMetadata, 'type' | 'items'>> & {
|
|
339
|
+
items: QueryParamMetadataInput & Pick<QueryParamMetadata, 'type'>;
|
|
232
340
|
};
|
|
233
|
-
|
|
234
|
-
type
|
|
235
|
-
type
|
|
236
|
-
type
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
type: 'string' | 'number' | 'boolean' | 'date';
|
|
341
|
+
|
|
342
|
+
type PathParamMetadata = StringParamMetadata | NumberParamMetadata | BooleanParamMetadata | DateParamMetadata;
|
|
343
|
+
type PathParamMetadataInput = StringParamMetadataInput | NumberParamMetadataInput | BooleanParamMetadataInput | DateParamMetadataInput;
|
|
344
|
+
type QueryParamMetadata = StringParamMetadata | NumberParamMetadata | BooleanParamMetadata | DateParamMetadata | ObjectParamMetadata | ArrayParamMetadata;
|
|
345
|
+
type QueryParamMetadataInput = StringParamMetadataInput | NumberParamMetadataInput | BooleanParamMetadataInput | DateParamMetadataInput | ObjectParamMetadataInput | ArrayParamMetadataInput;
|
|
346
|
+
type HeaderParamMetadata = (StringParamMetadata | NumberParamMetadata | BooleanParamMetadata | DateParamMetadata | ObjectParamMetadata | ArrayParamMetadata) & {
|
|
347
|
+
name: Header;
|
|
241
348
|
};
|
|
349
|
+
type HeaderParamMetadataInput = StringParamMetadataInput | NumberParamMetadataInput | BooleanParamMetadataInput | DateParamMetadataInput | ObjectParamMetadataInput | ArrayParamMetadataInput;
|
|
242
350
|
declare namespace Param {
|
|
243
|
-
function path(name: string, options?:
|
|
351
|
+
function path(name: string, options?: PathParamMetadataInput): ParameterDecorator;
|
|
244
352
|
function query(name: string, options?: QueryParamMetadataInput): ParameterDecorator;
|
|
245
|
-
function header(name:
|
|
353
|
+
function header(name: Header, options?: HeaderParamMetadataInput): ParameterDecorator;
|
|
246
354
|
}
|
|
247
355
|
|
|
248
|
-
type BodyMetadata = {
|
|
356
|
+
type BodyMetadata = BasePropertyMetadata & {
|
|
249
357
|
modelClass: Newable<unknown>;
|
|
250
358
|
index: number;
|
|
251
359
|
name: string;
|
|
252
|
-
description?: string;
|
|
253
|
-
required: boolean;
|
|
254
360
|
};
|
|
255
361
|
type BodyMetadataInput = Partial<OmitStrict<BodyMetadata, 'modelClass' | 'index' | 'name'>>;
|
|
256
362
|
declare function Body(modelClass: Newable<unknown>, options?: BodyMetadataInput): ParameterDecorator;
|
|
@@ -350,6 +456,19 @@ declare class IsRequiredValidationProblem implements ValidationProblem {
|
|
|
350
456
|
readonly message: string;
|
|
351
457
|
constructor(key: string);
|
|
352
458
|
}
|
|
459
|
+
declare class TypeMismatchValidationProblem implements ValidationProblem {
|
|
460
|
+
readonly key: string;
|
|
461
|
+
readonly message: string;
|
|
462
|
+
constructor(key: string, type: string);
|
|
463
|
+
}
|
|
464
|
+
declare class RelationsNotAllowedValidationProblem implements ValidationProblem {
|
|
465
|
+
readonly key: string;
|
|
466
|
+
readonly message: string;
|
|
467
|
+
constructor(key: string, metadata: RelationMetadata<BaseEntity>, relationKey: string);
|
|
468
|
+
private getExample;
|
|
469
|
+
private getArrayExample;
|
|
470
|
+
private getObjectExample;
|
|
471
|
+
}
|
|
353
472
|
|
|
354
473
|
interface ValidationServiceInterface {
|
|
355
474
|
validateRequestBody: (model: unknown, cls: Newable<unknown>) => void;
|
|
@@ -363,8 +482,6 @@ declare class ValidationService implements ValidationServiceInterface {
|
|
|
363
482
|
private readonly queryParamValidationFunctions;
|
|
364
483
|
private readonly headerParamValidationFunctions;
|
|
365
484
|
private readonly propertyValidationFunctions;
|
|
366
|
-
private validateObjectQueryParam;
|
|
367
|
-
private validateArrayQueryParam;
|
|
368
485
|
validateHeaderParam(param: unknown, meta: HeaderParamMetadata): void;
|
|
369
486
|
validatePathParam(param: unknown, meta: PathParamMetadata): void;
|
|
370
487
|
validateQueryParam(param: unknown, meta: QueryParamMetadata): void;
|
|
@@ -372,8 +489,6 @@ declare class ValidationService implements ValidationServiceInterface {
|
|
|
372
489
|
private validateModel;
|
|
373
490
|
private validateProperty;
|
|
374
491
|
private validateArrayProperty;
|
|
375
|
-
private getPropertyArrayItemMetadata;
|
|
376
|
-
private getQueryArrayItemMetadata;
|
|
377
492
|
private validateObjectProperty;
|
|
378
493
|
}
|
|
379
494
|
|
|
@@ -477,14 +592,9 @@ declare class OpenApiService implements OpenApiServiceInterface {
|
|
|
477
592
|
createOpenApiDefinition(): OpenApiDefinition;
|
|
478
593
|
private resolveOpenApiPaths;
|
|
479
594
|
private buildOpenApiBody;
|
|
480
|
-
private
|
|
481
|
-
private
|
|
482
|
-
private
|
|
483
|
-
private buildQueryParameters;
|
|
484
|
-
private queryParamToSchema;
|
|
485
|
-
private getQueryArrayItemMetadata;
|
|
486
|
-
private buildHeaderParameters;
|
|
487
|
-
private headerParamToSchema;
|
|
595
|
+
private buildOpenApiSchemaForProperties;
|
|
596
|
+
private buildParameters;
|
|
597
|
+
private paramToSchema;
|
|
488
598
|
}
|
|
489
599
|
|
|
490
|
-
export { type AppData, AppState, type
|
|
600
|
+
export { type AppData, AppState, type ArrayParamMetadata, type ArrayParamMetadataInput, type ArrayPropertyItemMetadata, type ArrayPropertyMetadata, type ArrayPropertyMetadataInput, AssetService, type AssetServiceInterface, BadRequestError, BaseDataSource, type BaseEntity, Body, type BodyMetadata, type BodyMetadataInput, BodyParser, type BodyParserInterface, type BooleanParamMetadata, type BooleanParamMetadataInput, type BooleanPropertyMetadata, type BooleanPropertyMetadataInput, type ColumnType, Controller, type ControllerRouteConfiguration, type CreateAllOptions, type CreateOptions, DataSource, type DataSourceOptions, DataSourceService, type DataSourceServiceInterface, type DateParamMetadata, type DateParamMetadataInput, type DatePropertyMetadata, type DatePropertyMetadataInput, Delete, type DeleteAllOptions, type DeleteByIdOptions, type DiProvider, type DiToken, Entity, type EntityMetadata, type FindAllOptions, type FindByIdOptions, type FindOneOptions, Get, type GlobalErrorHandler, GlobalRegistry, type Header, type HeaderParamMetadata, type HeaderParamMetadataInput, HttpError, HttpMethod, HttpStatus, Inject, InjectRepository, Injectable, InternalServerError, IntersectionType, IsRequiredValidationProblem, JsonBodyParser, type KnownHeader, type LogLevel, type LogLevels, Logger, type LoggerInterface, type ManyToManyPropertyMetadata, type ManyToManyPropertyMetadataInput, type ManyToOnePropertyMetadata, type ManyToOnePropertyMetadataInput, MimeType, type Newable, NotFoundError, type NumberParamMetadata, type NumberParamMetadataInput, type NumberPropertyMetadata, type NumberPropertyMetadataInput, type ObjectParamMetadata, type ObjectParamMetadataInput, type ObjectPropertyMetadata, type ObjectPropertyMetadataInput, OmitType, type OneToManyPropertyMetadata, type OneToManyPropertyMetadataInput, type OneToOnePropertyMetadata, type OneToOnePropertyMetadataInput, type OpenApiDefinition, type OpenApiOperation, type OpenApiParameter, type OpenApiPaths, type OpenApiRequestBodyObject, type OpenApiSchemaObject, OpenApiService, type OpenApiServiceInterface, Param, Parser, type ParserInterface, PartialType, Patch, type PathParamMetadata, type PathParamMetadataInput, PickType, Post, Property, type PropertyMetadata, type PropertyMetadataInput, type QueryParamMetadata, type QueryParamMetadataInput, Relation, type RelationMetadata, type RelationMetadataInput, RelationsNotAllowedValidationProblem, Repository, type Route, type RouteConfiguration, Router, type RouterInterface, type StringFormat, type StringParamMetadata, type StringParamMetadataInput, type StringPropertyMetadata, type StringPropertyMetadataInput, type Transaction, TypeMismatchValidationProblem, UnmatchedRouteError, type UpdateAllOptions, type UpdateByIdOptions, ValidationError, type ValidationProblem, ValidationService, type ValidationServiceInterface, ZIBRI_DI_TOKENS, ZibriApplication, type ZibriApplicationOptions, errorHandler, inject, isHttpError, isMimeType, repositoryTokenFor };
|