@rxap/open-api 21.0.1 → 22.0.0-dev.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/CHANGELOG.md +9 -0
- package/compodoc/changelog.html +8 -0
- package/compodoc/dependencies.html +7 -7
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +139 -139
- package/docs/html/classes/OpenApiConfigService.html +3 -3
- package/docs/html/classes/OpenApiHttpResponseError.html +10 -10
- package/docs/html/classes/RxapOpenApiError.html +5 -5
- package/docs/html/classes/SchemaValidationMixin.html +5 -5
- package/docs/html/functions/AssertOpenApiV3.html +1 -1
- package/docs/html/functions/IsOpenApiV3.html +1 -1
- package/docs/html/functions/IsReferenceObject.html +1 -1
- package/docs/html/functions/NotContainsReferenceObjects.html +1 -1
- package/docs/html/functions/OpenApiInit.html +1 -1
- package/docs/html/functions/getJsonContentSchema.html +1 -1
- package/docs/html/functions/getJsonSchema.html +1 -1
- package/docs/html/functions/hasJsonContentSchema.html +1 -1
- package/docs/html/functions/hasJsonSchema.html +1 -1
- package/docs/html/functions/injectOpenApiBaseUrlHttpInterceptorFn.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/OpenApiInitOptions.html +3 -3
- package/docs/html/interfaces/OpenApiMetaData.html +5 -5
- package/docs/html/interfaces/OperationObjectWithMetadata.html +2 -2
- package/docs/html/interfaces/SchemaValidationResponse.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/types/OperationMap.html +1 -1
- package/docs/html/variables/DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.html +1 -1
- package/docs/html/variables/DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.html +1 -1
- package/docs/html/variables/DISABLE_SCHEMA_VALIDATION.html +1 -1
- package/docs/html/variables/DISABLE_VALIDATION.html +1 -1
- package/docs/html/variables/OPEN_API_OPERATION.html +1 -1
- package/docs/html/variables/OPEN_API_OPERATION_ID.html +1 -1
- package/docs/html/variables/OPEN_API_SERVER_ID.html +1 -1
- package/docs/html/variables/OPEN_API_SERVER_INDEX.html +1 -1
- package/docs/html/variables/RXAP_OPEN_API_CONFIG.html +1 -1
- package/docs/html/variables/RXAP_OPEN_API_STRICT_VALIDATOR.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/OpenApiConfigService.md +14 -14
- package/docs/markdown/classes/OpenApiHttpResponseError.md +18 -18
- package/docs/markdown/classes/RxapOpenApiError.md +16 -16
- package/docs/markdown/classes/SchemaValidationMixin.md +13 -13
- package/docs/markdown/functions/AssertOpenApiV3.md +2 -2
- package/docs/markdown/functions/IsOpenApiV3.md +2 -2
- package/docs/markdown/functions/IsReferenceObject.md +2 -2
- package/docs/markdown/functions/NotContainsReferenceObjects.md +2 -2
- package/docs/markdown/functions/OpenApiInit.md +2 -2
- package/docs/markdown/functions/getJsonContentSchema.md +2 -2
- package/docs/markdown/functions/getJsonSchema.md +2 -2
- package/docs/markdown/functions/hasJsonContentSchema.md +2 -2
- package/docs/markdown/functions/hasJsonSchema.md +2 -2
- package/docs/markdown/functions/injectOpenApiBaseUrlHttpInterceptorFn.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/OpenApiInitOptions.md +4 -4
- package/docs/markdown/interfaces/OpenApiMetaData.md +7 -7
- package/docs/markdown/interfaces/OperationObjectWithMetadata.md +4 -4
- package/docs/markdown/interfaces/SchemaValidationResponse.md +6 -6
- package/docs/markdown/type-aliases/OperationMap.md +2 -2
- package/docs/markdown/variables/DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.md +2 -2
- package/docs/markdown/variables/DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.md +2 -2
- package/docs/markdown/variables/DISABLE_SCHEMA_VALIDATION.md +2 -2
- package/docs/markdown/variables/DISABLE_VALIDATION.md +2 -2
- package/docs/markdown/variables/OPEN_API_OPERATION.md +2 -2
- package/docs/markdown/variables/OPEN_API_OPERATION_ID.md +2 -2
- package/docs/markdown/variables/OPEN_API_SERVER_ID.md +2 -2
- package/docs/markdown/variables/OPEN_API_SERVER_INDEX.md +2 -2
- package/docs/markdown/variables/RXAP_OPEN_API_CONFIG.md +2 -2
- package/docs/markdown/variables/RXAP_OPEN_API_STRICT_VALIDATOR.md +2 -2
- package/docs/wiki/Class.OpenApiConfigService.md +13 -13
- package/docs/wiki/Class.OpenApiHttpResponseError.md +17 -17
- package/docs/wiki/Class.RxapOpenApiError.md +15 -15
- package/docs/wiki/Class.SchemaValidationMixin.md +12 -12
- package/docs/wiki/Function.AssertOpenApiV3.md +1 -1
- package/docs/wiki/Function.IsOpenApiV3.md +1 -1
- package/docs/wiki/Function.IsReferenceObject.md +1 -1
- package/docs/wiki/Function.NotContainsReferenceObjects.md +1 -1
- package/docs/wiki/Function.OpenApiInit.md +1 -1
- package/docs/wiki/Function.getJsonContentSchema.md +1 -1
- package/docs/wiki/Function.getJsonSchema.md +1 -1
- package/docs/wiki/Function.hasJsonContentSchema.md +1 -1
- package/docs/wiki/Function.hasJsonSchema.md +1 -1
- package/docs/wiki/Function.injectOpenApiBaseUrlHttpInterceptorFn.md +1 -1
- package/docs/wiki/Interface.OpenApiInitOptions.md +3 -3
- package/docs/wiki/Interface.OpenApiMetaData.md +6 -6
- package/docs/wiki/Interface.OperationObjectWithMetadata.md +3 -3
- package/docs/wiki/Interface.SchemaValidationResponse.md +5 -5
- package/docs/wiki/TypeAlias.OperationMap.md +1 -1
- package/docs/wiki/Variable.DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.md +1 -1
- package/docs/wiki/Variable.DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.md +1 -1
- package/docs/wiki/Variable.DISABLE_SCHEMA_VALIDATION.md +1 -1
- package/docs/wiki/Variable.DISABLE_VALIDATION.md +1 -1
- package/docs/wiki/Variable.OPEN_API_OPERATION.md +1 -1
- package/docs/wiki/Variable.OPEN_API_OPERATION_ID.md +1 -1
- package/docs/wiki/Variable.OPEN_API_SERVER_ID.md +1 -1
- package/docs/wiki/Variable.OPEN_API_SERVER_INDEX.md +1 -1
- package/docs/wiki/Variable.RXAP_OPEN_API_CONFIG.md +1 -1
- package/docs/wiki/Variable.RXAP_OPEN_API_STRICT_VALIDATOR.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-open-api-data-source-table.mjs +212 -162
- package/fesm2022/rxap-open-api-data-source-table.mjs.map +1 -1
- package/fesm2022/rxap-open-api-data-source.mjs +243 -188
- package/fesm2022/rxap-open-api-data-source.mjs.map +1 -1
- package/fesm2022/rxap-open-api-http-resource.mjs +13 -38
- package/fesm2022/rxap-open-api-http-resource.mjs.map +1 -1
- package/fesm2022/rxap-open-api-remote-method.mjs +295 -263
- package/fesm2022/rxap-open-api-remote-method.mjs.map +1 -1
- package/fesm2022/rxap-open-api-testing.mjs +55 -82
- package/fesm2022/rxap-open-api-testing.mjs.map +1 -1
- package/fesm2022/rxap-open-api.mjs +439 -633
- package/fesm2022/rxap-open-api.mjs.map +1 -1
- package/package.json +19 -19
- package/types/rxap-open-api-data-source-table.d.ts +47 -40
- package/types/rxap-open-api-data-source.d.ts +58 -52
- package/types/rxap-open-api-http-resource.d.ts +13 -17
- package/types/rxap-open-api-remote-method.d.ts +89 -86
- package/types/rxap-open-api-testing.d.ts +25 -28
- package/types/rxap-open-api.d.ts +153 -162
|
@@ -1,95 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
import { OpenApiConfigService, OpenApiMetaData, OperationObjectWithMetadata, RxapOpenApiError, SchemaValidationMixin } from "@rxap/open-api";
|
|
5
|
+
import { BaseRemoteMethod } from "@rxap/remote-method";
|
|
6
|
+
import { TableEvent } from "@rxap/data-source/table";
|
|
7
|
+
import { HttpClient, HttpResponse } from "@angular/common/http";
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import { Injector } from "@angular/core";
|
|
10
|
+
import { BaseHttpRemoteMethod } from "@rxap/remote-method/http";
|
|
11
|
+
import { PaginatorLike } from "@rxap/data-source/pagination";
|
|
12
|
+
export declare class RxapOpenApiRemoteMethodError extends RxapOpenApiError {
|
|
13
|
+
constructor(message: string, code?: string, scope?: string);
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
fallbackId?: string;
|
|
15
|
+
export interface OperationForMetadata {
|
|
16
|
+
operation: OperationObjectWithMetadata;
|
|
17
|
+
/**
|
|
18
|
+
* used to specify the target server for the reset api operation
|
|
19
|
+
*/
|
|
20
|
+
serverId?: string;
|
|
21
|
+
/**
|
|
22
|
+
* the fallback id used if the operation does not have a operationId
|
|
23
|
+
*/
|
|
24
|
+
fallbackId?: string;
|
|
24
25
|
}
|
|
25
|
-
interface OperationFromMetadataInline {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
export interface OperationFromMetadataInline {
|
|
27
|
+
operationId: string;
|
|
28
|
+
operation: string;
|
|
29
|
+
/**
|
|
30
|
+
* used to specify the target server for the reset api operation
|
|
31
|
+
*/
|
|
32
|
+
serverId?: string;
|
|
32
33
|
}
|
|
33
|
-
declare function IsOperationFromMetadataInline(metadata: OperationForMetadata | OperationFromMetadataInline): metadata is OperationFromMetadataInline;
|
|
34
|
-
declare function RxapOpenApiRemoteMethod(operationOrId: string | OperationForMetadata | OperationFromMetadataInline, serverIndex?: number): (target: any) => void;
|
|
35
|
-
type OpenApiRemoteMethodMetadata = OpenApiMetaData;
|
|
36
|
-
interface OpenApiRemoteMethodParameter<Parameters extends Record<string, any> | void = any, RequestBody = any> {
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
export declare function IsOperationFromMetadataInline(metadata: OperationForMetadata | OperationFromMetadataInline): metadata is OperationFromMetadataInline;
|
|
35
|
+
export declare function RxapOpenApiRemoteMethod(operationOrId: string | OperationForMetadata | OperationFromMetadataInline, serverIndex?: number): (target: any) => void;
|
|
36
|
+
export type OpenApiRemoteMethodMetadata = OpenApiMetaData;
|
|
37
|
+
export interface OpenApiRemoteMethodParameter<Parameters extends Record<string, any> | void = any, RequestBody = any> {
|
|
38
|
+
parameters?: Parameters;
|
|
39
|
+
requestBody?: RequestBody;
|
|
39
40
|
}
|
|
40
|
-
interface OpenApiRemoteMethod<Response = any, Parameters extends Record<string, any> | void = any, RequestBody = any> extends SchemaValidationMixin<Response, Parameters, RequestBody> {
|
|
41
|
+
export interface OpenApiRemoteMethod<Response = any, Parameters extends Record<string, any> | void = any, RequestBody = any> extends SchemaValidationMixin<Response, Parameters, RequestBody> {}
|
|
42
|
+
export declare class OpenApiRemoteMethod<Response = any, Parameters extends Record<string, any> | void = any, RequestBody = any> extends BaseHttpRemoteMethod<Response, any, OpenApiRemoteMethodParameter<Parameters, RequestBody>> {
|
|
43
|
+
protected readonly disableSchemaValidation: boolean;
|
|
44
|
+
protected readonly disableValidation: boolean;
|
|
45
|
+
private readonly strict;
|
|
46
|
+
constructor(http: HttpClient, injector: Injector, openApiConfigService: OpenApiConfigService, metadata?: OpenApiRemoteMethodMetadata | null, strict?: boolean | null, disableSchemaValidation?: boolean | null, disableValidation?: boolean | null);
|
|
47
|
+
get operation(): OperationObjectWithMetadata;
|
|
48
|
+
/**
|
|
49
|
+
* Instead of returning the response body the full response object is returned
|
|
50
|
+
*/
|
|
51
|
+
callWithResponse(args?: OpenApiRemoteMethodParameter<Parameters, RequestBody>): Promise<HttpResponse<Response>>;
|
|
52
|
+
_callWithResponse(args?: OpenApiRemoteMethodParameter<Parameters, RequestBody>): Promise<HttpResponse<Response>>;
|
|
53
|
+
protected _call(args?: OpenApiRemoteMethodParameter<Parameters, RequestBody>): Promise<Response>;
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OpenApiRemoteMethod<any, any, any>, [null, null, null, {
|
|
55
|
+
optional: true;
|
|
56
|
+
}, {
|
|
57
|
+
optional: true;
|
|
58
|
+
}, {
|
|
59
|
+
optional: true;
|
|
60
|
+
}, {
|
|
61
|
+
optional: true;
|
|
62
|
+
}]>;
|
|
63
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
41
64
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Instead of returning the response body the full response object is returned
|
|
50
|
-
*/
|
|
51
|
-
callWithResponse(args?: OpenApiRemoteMethodParameter<Parameters, RequestBody>): Promise<HttpResponse<Response>>;
|
|
52
|
-
_callWithResponse(args?: OpenApiRemoteMethodParameter<Parameters, RequestBody>): Promise<HttpResponse<Response>>;
|
|
53
|
-
protected _call(args?: OpenApiRemoteMethodParameter<Parameters, RequestBody>): Promise<Response>;
|
|
54
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OpenApiRemoteMethod<any, any, any>, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
55
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OpenApiRemoteMethod<any, any, any>>;
|
|
65
|
+
export interface GetPageRemoteMethodParameters {
|
|
66
|
+
pageIndex: number;
|
|
67
|
+
pageSize: number;
|
|
68
|
+
sortBy?: string;
|
|
69
|
+
sortDirection?: 'desc' | 'asc' | undefined | '' | string;
|
|
70
|
+
filter: string[];
|
|
56
71
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
sortBy?: string;
|
|
62
|
-
sortDirection?: 'desc' | 'asc' | undefined | '' | string;
|
|
63
|
-
filter: string[];
|
|
72
|
+
export interface GetPageResponse<Data extends Record<string, any>> {
|
|
73
|
+
total: number;
|
|
74
|
+
rows: Data[];
|
|
75
|
+
[key: string]: any;
|
|
64
76
|
}
|
|
65
|
-
interface
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
[key: string]: any;
|
|
77
|
+
export interface GetPageAdapterDefaultOptions {
|
|
78
|
+
sortBy?: string;
|
|
79
|
+
sortDirection?: 'asc' | 'desc' | string;
|
|
69
80
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
81
|
+
export declare class GetPageAdapterRemoteMethod<Data extends Record<string, any>> extends BaseRemoteMethod<Data[], TableEvent> {
|
|
82
|
+
private readonly remoteMethod;
|
|
83
|
+
private readonly paginator?;
|
|
84
|
+
private readonly options?;
|
|
85
|
+
constructor(remoteMethod: OpenApiRemoteMethod<GetPageResponse<Data>, GetPageRemoteMethodParameters>, paginator?: PaginatorLike | undefined, options?: GetPageAdapterDefaultOptions | undefined);
|
|
86
|
+
static BuildFilter(filterEvent?: string | Record<string, any> | null): string[];
|
|
87
|
+
protected _call(event: TableEvent): Promise<Data[]>;
|
|
73
88
|
}
|
|
74
|
-
declare
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
declare class OpenApiRemoteMethodLoader {
|
|
86
|
-
readonly openApiConfig: OpenApiConfigService;
|
|
87
|
-
readonly http: HttpClient;
|
|
88
|
-
readonly injector: Injector;
|
|
89
|
-
load(definitionId: string): OpenApiRemoteMethod | null;
|
|
90
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OpenApiRemoteMethodLoader, never>;
|
|
91
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OpenApiRemoteMethodLoader>;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export { GetPageAdapterFactory, GetPageAdapterFactoryWithOptions, GetPageAdapterRemoteMethod, IsOperationFromMetadataInline, OpenApiRemoteMethod, OpenApiRemoteMethodLoader, RxapOpenApiRemoteMethod, RxapOpenApiRemoteMethodError };
|
|
95
|
-
export type { GetPageAdapterDefaultOptions, GetPageRemoteMethodParameters, GetPageResponse, OpenApiRemoteMethodMetadata, OpenApiRemoteMethodParameter, OperationForMetadata, OperationFromMetadataInline };
|
|
89
|
+
export declare function GetPageAdapterFactory(remoteMethod: OpenApiRemoteMethod, paginator?: PaginatorLike): GetPageAdapterRemoteMethod<Record<string, any>>;
|
|
90
|
+
export declare function GetPageAdapterFactoryWithOptions(options?: GetPageAdapterDefaultOptions): (remoteMethod: OpenApiRemoteMethod, paginator?: PaginatorLike) => GetPageAdapterRemoteMethod<Record<string, any>>;
|
|
91
|
+
export declare class OpenApiRemoteMethodLoader {
|
|
92
|
+
readonly openApiConfig: OpenApiConfigService;
|
|
93
|
+
readonly http: HttpClient;
|
|
94
|
+
readonly injector: Injector;
|
|
95
|
+
load(definitionId: string): OpenApiRemoteMethod | null;
|
|
96
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OpenApiRemoteMethodLoader, never>;
|
|
97
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
98
|
+
}
|
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare function
|
|
9
|
-
declare function
|
|
10
|
-
|
|
11
|
-
interface GetPageParameter {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
import { InjectionToken, Provider } from "@angular/core";
|
|
5
|
+
import { OpenApiRemoteMethodParameter } from "@rxap/open-api/remote-method";
|
|
6
|
+
import { Method, MethodWithParameters } from "@rxap/pattern";
|
|
7
|
+
import { Constructor } from "@rxap/utilities";
|
|
8
|
+
export declare function ProvideMethodMock<ReturnValue, Parameters>(method: InjectionToken<Method<ReturnValue, Parameters>> | Constructor<Method<ReturnValue, Parameters>>, implementation?: (parameters?: Parameters, ...args: any[]) => ReturnValue | Promise<ReturnValue>, delay?: number): Provider;
|
|
9
|
+
export declare function ProvideMethodWithParametersMock<ReturnValue, Parameters>(method: InjectionToken<MethodWithParameters<ReturnValue, Parameters>> | Constructor<MethodWithParameters<ReturnValue, Parameters>>, implementation: (parameters: Parameters, ...args: any[]) => ReturnValue | Promise<ReturnValue>, delay?: number, defaultParameters?: Parameters): Provider;
|
|
10
|
+
export declare function ProvideRemoteMethodMock<ReturnValue, Parameters extends Record<string, any> | void, RequestBody>(method: InjectionToken<MethodWithParameters<ReturnValue, OpenApiRemoteMethodParameter<Parameters, RequestBody>>> | Constructor<MethodWithParameters<ReturnValue, OpenApiRemoteMethodParameter<Parameters, RequestBody>>>, implementation: (parameters: OpenApiRemoteMethodParameter<Parameters, RequestBody>, ...args: any[]) => ReturnValue | Promise<ReturnValue>, delay?: number): Provider;
|
|
11
|
+
export interface GetPageParameter {
|
|
12
|
+
filter?: Array<string>;
|
|
13
|
+
pageIndex: number;
|
|
14
|
+
pageSize: number;
|
|
15
|
+
sortBy?: string;
|
|
16
|
+
sortDirection?: string;
|
|
17
17
|
}
|
|
18
|
-
interface PageDto<T> {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
export interface PageDto<T> {
|
|
19
|
+
rows: Array<T>;
|
|
20
|
+
pageSize: number;
|
|
21
|
+
pageIndex: number;
|
|
22
|
+
total: number;
|
|
23
|
+
sortDirection?: string;
|
|
24
|
+
sortBy?: string;
|
|
25
|
+
filter?: Array<any>;
|
|
26
26
|
}
|
|
27
|
-
declare function ProvideRxapNestjsGetPageMethod<T, AddinalParameters>(method: Constructor<MethodWithParameters<PageDto<T>, OpenApiRemoteMethodParameter<GetPageParameter & AddinalParameters>>>, data: T[]):
|
|
28
|
-
|
|
29
|
-
export { ProvideMethodMock, ProvideMethodWithParametersMock, ProvideRemoteMethodMock, ProvideRxapNestjsGetPageMethod };
|
|
30
|
-
export type { GetPageParameter, PageDto };
|
|
27
|
+
export declare function ProvideRxapNestjsGetPageMethod<T, AddinalParameters>(method: Constructor<MethodWithParameters<PageDto<T>, OpenApiRemoteMethodParameter<GetPageParameter & AddinalParameters>>>, data: T[]): import("@angular/core").Provider;
|
package/types/rxap-open-api.d.ts
CHANGED
|
@@ -1,171 +1,162 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
import { RxapError } from "@rxap/utilities";
|
|
5
|
+
import { HttpContextToken, HttpErrorResponse, HttpHeaders, HttpInterceptorFn, HttpParams } from "@angular/common/http";
|
|
6
|
+
import { OpenAPIV3 } from "openapi-types";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import { InjectionToken } from "@angular/core";
|
|
9
|
+
import { BaseRemoteMethodMetadata } from "@rxap/remote-method";
|
|
10
|
+
import { Environment } from "@rxap/environment";
|
|
11
|
+
import { HttpRemoteMethodParameter } from "@rxap/remote-method/http";
|
|
12
|
+
export declare class RxapOpenApiError extends RxapError {
|
|
13
|
+
constructor(message: string, code?: string, scope?: string);
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
declare const
|
|
15
|
-
declare const
|
|
16
|
-
declare const
|
|
17
|
-
declare const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
interface OperationObjectWithMetadata extends OpenAPIV3.OperationObject {
|
|
22
|
-
path: string;
|
|
23
|
-
method: string;
|
|
15
|
+
export declare const OPEN_API_OPERATION_ID: HttpContextToken<string>;
|
|
16
|
+
export declare const OPEN_API_SERVER_ID: HttpContextToken<string | null>;
|
|
17
|
+
export declare const OPEN_API_SERVER_INDEX: HttpContextToken<number>;
|
|
18
|
+
export declare const OPEN_API_OPERATION: HttpContextToken<string>;
|
|
19
|
+
export declare const injectOpenApiBaseUrlHttpInterceptorFn: HttpInterceptorFn;
|
|
20
|
+
export interface OperationObjectWithMetadata extends OpenAPIV3.OperationObject {
|
|
21
|
+
path: string;
|
|
22
|
+
method: string;
|
|
24
23
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
24
|
+
export type OperationMap = Map<string, OperationObjectWithMetadata>;
|
|
25
|
+
export declare class OpenApiConfigService {
|
|
26
|
+
static Config: OpenAPIV3.Document | null;
|
|
27
|
+
static DefaultServerIndex: number;
|
|
28
|
+
private static _operations;
|
|
29
|
+
defaultServerIndex: number;
|
|
30
|
+
private _operations;
|
|
31
|
+
private static serverConfigMap;
|
|
32
|
+
private get serverConfigMap();
|
|
33
|
+
get serverIds(): string[];
|
|
34
|
+
constructor(config?: OpenAPIV3.Document | null);
|
|
35
|
+
private _config;
|
|
36
|
+
get config(): OpenAPIV3.Document;
|
|
37
|
+
/**
|
|
38
|
+
* Used to load the app open api config from a remote resource.
|
|
39
|
+
*
|
|
40
|
+
* Promise.all([ OpenApiDataSourceLoader.Load() ])
|
|
41
|
+
* .then(() => platformBrowserDynamic().bootstrapModule(AppModule))
|
|
42
|
+
* .catch(err => console.error(err))
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
static Load(openApiUrl?: string): Promise<void>;
|
|
46
|
+
static GetOperation(operationId: string): OperationObjectWithMetadata;
|
|
47
|
+
private static LoadOperations;
|
|
48
|
+
private static GetBaseUrl;
|
|
49
|
+
/**
|
|
50
|
+
* Replaces all $ref with the concrete definition
|
|
51
|
+
*
|
|
52
|
+
* @param config
|
|
53
|
+
* @private
|
|
54
|
+
*/
|
|
55
|
+
private static ExpandOpenApi;
|
|
56
|
+
getOperation(operationId: string): OperationObjectWithMetadata;
|
|
57
|
+
getBaseUrl(serverIndex?: number, serverId?: string): string;
|
|
58
|
+
static InsertServer(serverConfig: OpenAPIV3.ServerObject, index: number, serverId?: string, config?: OpenAPIV3.Document): void;
|
|
59
|
+
insertServer(serverConfig: OpenAPIV3.ServerObject, index?: number, serverId?: string): void;
|
|
60
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OpenApiConfigService, [{
|
|
61
|
+
optional: true;
|
|
62
|
+
}]>;
|
|
63
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
id: string;
|
|
65
|
+
export interface OpenApiMetaData extends BaseRemoteMethodMetadata {
|
|
66
|
+
/**
|
|
67
|
+
* The operation object with path and method
|
|
68
|
+
*/
|
|
69
|
+
operation?: OperationObjectWithMetadata | string;
|
|
70
|
+
/**
|
|
71
|
+
* The index of the server object in the servers array in the open api config
|
|
72
|
+
*/
|
|
73
|
+
serverIndex?: number;
|
|
74
|
+
/**
|
|
75
|
+
* used to specify the target server for the reset api operation
|
|
76
|
+
*/
|
|
77
|
+
serverId?: string;
|
|
78
|
+
id: string;
|
|
80
79
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
get serverId(): string | undefined;
|
|
80
|
+
export declare class OpenApiHttpResponseError extends HttpErrorResponse {
|
|
81
|
+
readonly httpErrorResponse: HttpErrorResponse;
|
|
82
|
+
readonly metadata: OpenApiMetaData;
|
|
83
|
+
constructor(httpErrorResponse: HttpErrorResponse, metadata: OpenApiMetaData);
|
|
84
|
+
get operationId(): string;
|
|
85
|
+
get serverId(): string | undefined;
|
|
88
86
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
origin?: string;
|
|
87
|
+
export interface OpenApiInitOptions {
|
|
88
|
+
/**
|
|
89
|
+
* true - load the open api config file from the default url
|
|
90
|
+
* default url: openapi.json
|
|
91
|
+
*/
|
|
92
|
+
load?: {
|
|
93
|
+
openApiUrl?: string;
|
|
94
|
+
} | boolean;
|
|
95
|
+
/**
|
|
96
|
+
* The location origin prefix for the open api base urls if the base url is not absolute. defaults to location.origin
|
|
97
|
+
*/
|
|
98
|
+
origin?: string;
|
|
102
99
|
}
|
|
103
|
-
declare function OpenApiInit(environment: Environment, options?: OpenApiInitOptions): Promise<void> | undefined;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
data?: Data;
|
|
100
|
+
export declare function OpenApiInit(environment: Environment, options?: OpenApiInitOptions): Promise<void> | undefined;
|
|
101
|
+
export interface SchemaValidationResponse<Data> {
|
|
102
|
+
headers: HttpHeaders;
|
|
103
|
+
status: number;
|
|
104
|
+
body?: Data | null;
|
|
105
|
+
data?: Data;
|
|
110
106
|
}
|
|
111
|
-
declare class SchemaValidationMixin<Response = any, Parameters extends Record<string, any> | void = any, RequestBody = any> {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
107
|
+
export declare class SchemaValidationMixin<Response = any, Parameters extends Record<string, any> | void = any, RequestBody = any> {
|
|
108
|
+
static STRICT: boolean;
|
|
109
|
+
protected disableSchemaValidation?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Validates the parameters against the schema specified in the operation object
|
|
112
|
+
*
|
|
113
|
+
* @param operation
|
|
114
|
+
* @param parameters
|
|
115
|
+
* @param strict
|
|
116
|
+
* @protected
|
|
117
|
+
*/
|
|
118
|
+
validateParameters(operation: OperationObjectWithMetadata, parameters?: Parameters, strict?: boolean): void;
|
|
119
|
+
/**
|
|
120
|
+
* Validates the http response against the schema specified in the operation object
|
|
121
|
+
*
|
|
122
|
+
* @param operation
|
|
123
|
+
* @param response
|
|
124
|
+
* @param strict
|
|
125
|
+
* @protected
|
|
126
|
+
*/
|
|
127
|
+
validateResponse(operation: OperationObjectWithMetadata, response: SchemaValidationResponse<Response>, strict?: boolean): void;
|
|
128
|
+
validateRequestBody(operation: OperationObjectWithMetadata, body?: RequestBody, strict?: boolean): void;
|
|
129
|
+
validationError(message: string, strict: boolean, schema?: OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject, value?: any): void;
|
|
130
|
+
buildHttpParams(operationParameters: OpenAPIV3.ParameterObject[], parameters?: Parameters, ignoreUndefined?: boolean): HttpParams;
|
|
131
|
+
buildHttpHeaders(operationParameters: OpenAPIV3.ParameterObject[], parameters?: Parameters): HttpHeaders;
|
|
132
|
+
buildHttpPathParams(operationParameters: OpenAPIV3.ParameterObject[], parameters?: Parameters): Record<string, string>;
|
|
133
|
+
protected normalizePathParamValue(value: any, paramName: string): string;
|
|
134
|
+
/**
|
|
135
|
+
* Converts open api parameters into the corresponding http options to
|
|
136
|
+
* create a http request. The transformation is guided by the openapi definition
|
|
137
|
+
*
|
|
138
|
+
* @param operation
|
|
139
|
+
* @param parameters
|
|
140
|
+
* @param requestBody
|
|
141
|
+
* @param ignoreUndefined
|
|
142
|
+
*/
|
|
143
|
+
buildHttpOptions(operation: OperationObjectWithMetadata, parameters?: Parameters, requestBody?: RequestBody, ignoreUndefined?: boolean): HttpRemoteMethodParameter;
|
|
144
|
+
private buildBody;
|
|
145
|
+
private validate;
|
|
150
146
|
}
|
|
151
|
-
|
|
152
|
-
declare const
|
|
153
|
-
declare const
|
|
154
|
-
declare const
|
|
155
|
-
declare const
|
|
156
|
-
declare const
|
|
157
|
-
declare
|
|
158
|
-
|
|
159
|
-
declare function
|
|
160
|
-
declare function
|
|
161
|
-
declare function
|
|
162
|
-
|
|
163
|
-
declare function hasJsonContentSchema<T extends OpenAPIV3.RequestBodyObject | OpenAPIV3.ResponseObject>(data: T | undefined | OpenAPIV3.ReferenceObject): data is T & {
|
|
164
|
-
content: Record<string, OpenAPIV3.MediaTypeObject>;
|
|
147
|
+
export declare const RXAP_OPEN_API_CONFIG: InjectionToken<unknown>;
|
|
148
|
+
export declare const RXAP_OPEN_API_STRICT_VALIDATOR: InjectionToken<unknown>;
|
|
149
|
+
export declare const DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA: InjectionToken<unknown>;
|
|
150
|
+
export declare const DEFAULT_OPEN_API_DATA_SOURCE_META_DATA: InjectionToken<unknown>;
|
|
151
|
+
export declare const DISABLE_SCHEMA_VALIDATION: InjectionToken<boolean>;
|
|
152
|
+
export declare const DISABLE_VALIDATION: InjectionToken<boolean>;
|
|
153
|
+
export declare function IsReferenceObject(obj?: any): obj is OpenAPIV3.ReferenceObject;
|
|
154
|
+
export declare function NotContainsReferenceObjects<T>(array?: Array<OpenAPIV3.ReferenceObject | T | undefined>): array is T[];
|
|
155
|
+
export declare function IsOpenApiV3(obj?: any): obj is OpenAPIV3.Document;
|
|
156
|
+
export declare function AssertOpenApiV3(obj?: any): asserts obj is OpenAPIV3.Document;
|
|
157
|
+
export declare function hasJsonContentSchema<T extends OpenAPIV3.RequestBodyObject | OpenAPIV3.ResponseObject>(data: T | undefined | OpenAPIV3.ReferenceObject): data is T & {
|
|
158
|
+
content: Record<string, OpenAPIV3.MediaTypeObject>;
|
|
165
159
|
};
|
|
166
|
-
declare function getJsonContentSchema(data: OpenAPIV3.RequestBodyObject | OpenAPIV3.ResponseObject): OpenAPIV3.SchemaObject | null;
|
|
167
|
-
declare function hasJsonSchema(map: Record<string, OpenAPIV3.MediaTypeObject> | undefined): boolean;
|
|
168
|
-
declare function getJsonSchema(map: Record<string, OpenAPIV3.MediaTypeObject>): OpenAPIV3.SchemaObject | null;
|
|
169
|
-
|
|
170
|
-
export { AssertOpenApiV3, DEFAULT_OPEN_API_DATA_SOURCE_META_DATA, DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA, DISABLE_SCHEMA_VALIDATION, DISABLE_VALIDATION, IsOpenApiV3, IsReferenceObject, NotContainsReferenceObjects, OPEN_API_OPERATION, OPEN_API_OPERATION_ID, OPEN_API_SERVER_ID, OPEN_API_SERVER_INDEX, OpenApiConfigService, OpenApiHttpResponseError, OpenApiInit, RXAP_OPEN_API_CONFIG, RXAP_OPEN_API_STRICT_VALIDATOR, RxapOpenApiError, SchemaValidationMixin, getJsonContentSchema, getJsonSchema, hasJsonContentSchema, hasJsonSchema, injectOpenApiBaseUrlHttpInterceptorFn };
|
|
171
|
-
export type { OpenApiInitOptions, OpenApiMetaData, OperationMap, OperationObjectWithMetadata, SchemaValidationResponse };
|
|
160
|
+
export declare function getJsonContentSchema(data: OpenAPIV3.RequestBodyObject | OpenAPIV3.ResponseObject): OpenAPIV3.SchemaObject | null;
|
|
161
|
+
export declare function hasJsonSchema(map: Record<string, OpenAPIV3.MediaTypeObject> | undefined): boolean;
|
|
162
|
+
export declare function getJsonSchema(map: Record<string, OpenAPIV3.MediaTypeObject>): OpenAPIV3.SchemaObject | null;
|