ng2-rest 21.0.2 → 21.0.6
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/browser/fesm2022/{ng2-rest.mjs → ng2-rest-browser.mjs} +1 -1
- package/browser/fesm2022/ng2-rest-browser.mjs.map +1 -0
- package/browser/package.json +1 -1
- package/browser/types/ng2-rest-browser.d.ts +429 -0
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/package.json +1 -1
- package/tmp-environment.json +4 -8
- package/websql/fesm2022/{ng2-rest.mjs → ng2-rest-websql.mjs} +1 -1
- package/websql/fesm2022/ng2-rest-websql.mjs.map +1 -0
- package/websql/package.json +1 -1
- package/websql/types/ng2-rest-websql.d.ts +429 -0
- package/browser/fesm2022/ng2-rest.mjs.map +0 -1
- package/browser/index.d.ts +0 -6
- package/browser/lib/axios-interceptors.d.ts +0 -23
- package/browser/lib/content-type.d.ts +0 -6
- package/browser/lib/cookie.d.ts +0 -9
- package/browser/lib/helpers.d.ts +0 -12
- package/browser/lib/index.d.ts +0 -11
- package/browser/lib/mapping.d.ts +0 -14
- package/browser/lib/models.d.ts +0 -186
- package/browser/lib/other/simple-resource.d.ts +0 -31
- package/browser/lib/params.d.ts +0 -25
- package/browser/lib/resource-service.d.ts +0 -45
- package/browser/lib/rest-headers.d.ts +0 -59
- package/browser/lib/rest-request.d.ts +0 -31
- package/browser/lib/rest.class.d.ts +0 -37
- package/browser/public-api.d.ts +0 -2
- package/websql/fesm2022/ng2-rest.mjs.map +0 -1
- package/websql/index.d.ts +0 -6
- package/websql/lib/axios-interceptors.d.ts +0 -23
- package/websql/lib/content-type.d.ts +0 -6
- package/websql/lib/cookie.d.ts +0 -9
- package/websql/lib/helpers.d.ts +0 -12
- package/websql/lib/index.d.ts +0 -11
- package/websql/lib/mapping.d.ts +0 -14
- package/websql/lib/models.d.ts +0 -186
- package/websql/lib/other/simple-resource.d.ts +0 -31
- package/websql/lib/params.d.ts +0 -25
- package/websql/lib/resource-service.d.ts +0 -45
- package/websql/lib/rest-headers.d.ts +0 -59
- package/websql/lib/rest-request.d.ts +0 -31
- package/websql/lib/rest.class.d.ts +0 -37
- package/websql/public-api.d.ts +0 -2
package/websql/lib/cookie.d.ts
DELETED
package/websql/lib/helpers.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { CoreHelpers } from 'tnp-core/websql';
|
|
3
|
-
import { Mapping } from './mapping';
|
|
4
|
-
import { JSON10 } from 'json10/websql';
|
|
5
|
-
export declare class Helpers extends CoreHelpers {
|
|
6
|
-
static JSON: typeof JSON10;
|
|
7
|
-
static get Mapping(): {
|
|
8
|
-
encode<T = Function>(json: Object, mapping: Mapping.Mapping): T;
|
|
9
|
-
decode(json: Object, autodetect?: boolean): Mapping.Mapping;
|
|
10
|
-
};
|
|
11
|
-
static checkValidUrl(url: string): boolean;
|
|
12
|
-
}
|
package/websql/lib/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
export * from './resource-service';
|
|
3
|
-
export * from './models';
|
|
4
|
-
export * from './mapping';
|
|
5
|
-
export * from './rest.class';
|
|
6
|
-
export * from './rest-headers';
|
|
7
|
-
export * from './helpers';
|
|
8
|
-
export * from './content-type';
|
|
9
|
-
export * from './axios-interceptors';
|
|
10
|
-
export { SimpleResource } from './other/simple-resource';
|
|
11
|
-
export { interpolateParamsToUrl } from './params';
|
package/websql/lib/mapping.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { Circ } from 'json10/websql';
|
|
3
|
-
export declare namespace Mapping {
|
|
4
|
-
function decode(json: Object, autodetect?: boolean): Mapping;
|
|
5
|
-
function encode<T = Function>(json: Object, mapping: Mapping, circular?: Circ[]): T;
|
|
6
|
-
function getModelsMapping(entity: Function): {};
|
|
7
|
-
type Mapping<T = {}> = {
|
|
8
|
-
[P in keyof T]?: string | string[];
|
|
9
|
-
};
|
|
10
|
-
type ModelValue<T> = {
|
|
11
|
-
[propName in keyof T]?: T[propName];
|
|
12
|
-
};
|
|
13
|
-
function DefaultModelWithMapping<T = Object>(defaultModelValues?: ModelValue<T>, mapping?: Mapping<T>): (target: Function) => void;
|
|
14
|
-
}
|
package/websql/lib/models.d.ts
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { AxiosRequestConfig } from 'axios';
|
|
3
|
-
import { Circ } from 'json10/websql';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { Subject } from 'rxjs';
|
|
6
|
-
import { CoreModels } from 'tnp-core/websql';
|
|
7
|
-
import { Models as HelpersModels } from 'typescript-class-helpers/websql';
|
|
8
|
-
import { Cookie } from './cookie';
|
|
9
|
-
import { Mapping } from './mapping';
|
|
10
|
-
import { RestHeaders } from './rest-headers';
|
|
11
|
-
import { Rest } from './rest.class';
|
|
12
|
-
declare class RestCommonHttpResponseWrapper {
|
|
13
|
-
success?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare class RestResponseWrapper extends RestCommonHttpResponseWrapper {
|
|
16
|
-
data?: any;
|
|
17
|
-
}
|
|
18
|
-
export declare class RestErrorResponseWrapper extends RestCommonHttpResponseWrapper {
|
|
19
|
-
message: string;
|
|
20
|
-
/**
|
|
21
|
-
* stack trace / more details about error
|
|
22
|
-
*/
|
|
23
|
-
details?: string;
|
|
24
|
-
/**
|
|
25
|
-
* http status code
|
|
26
|
-
*/
|
|
27
|
-
status?: number;
|
|
28
|
-
/**
|
|
29
|
-
* custom error code from backend
|
|
30
|
-
*/
|
|
31
|
-
code?: string;
|
|
32
|
-
}
|
|
33
|
-
export declare namespace Models {
|
|
34
|
-
export import HttpMethod = CoreModels.HttpMethod;
|
|
35
|
-
export import ParamType = CoreModels.ParamType;
|
|
36
|
-
export import MethodConfig = HelpersModels.MethodConfig;
|
|
37
|
-
export import ClassConfig = HelpersModels.ClassConfig;
|
|
38
|
-
export import ParamConfig = HelpersModels.ParamConfig;
|
|
39
|
-
interface HandleResultOptions {
|
|
40
|
-
res: Models.MockResponse;
|
|
41
|
-
method: Models.HttpMethod;
|
|
42
|
-
jobid?: number;
|
|
43
|
-
isArray?: boolean;
|
|
44
|
-
}
|
|
45
|
-
interface HandleResultSourceRequestOptions {
|
|
46
|
-
url: string;
|
|
47
|
-
method: Models.HttpMethod;
|
|
48
|
-
body: any;
|
|
49
|
-
isArray: boolean;
|
|
50
|
-
}
|
|
51
|
-
type BackendError = {
|
|
52
|
-
msg?: string;
|
|
53
|
-
stack?: string[];
|
|
54
|
-
data: any;
|
|
55
|
-
};
|
|
56
|
-
type MetaRequest = {
|
|
57
|
-
path: string;
|
|
58
|
-
endpoint: string;
|
|
59
|
-
entity: Mapping.Mapping;
|
|
60
|
-
circular: Circ[];
|
|
61
|
-
};
|
|
62
|
-
type HttpCode = 200 | 400 | 401 | 404 | 500;
|
|
63
|
-
type PromiseObservableMix<T> = Promise<T> & {
|
|
64
|
-
observable: Observable<T>;
|
|
65
|
-
};
|
|
66
|
-
type Ng2RestAxiosRequestConfig = {
|
|
67
|
-
doNotSerializeParams?: boolean;
|
|
68
|
-
} & AxiosRequestConfig<any>;
|
|
69
|
-
type MethodWithBody<E, T, R = PromiseObservableMix<E>> = (item?: T, params?: UrlParams[], axiosOptions?: Ng2RestAxiosRequestConfig) => R;
|
|
70
|
-
type ReplayData = {
|
|
71
|
-
subject: Subject<any>;
|
|
72
|
-
data: {
|
|
73
|
-
url: string;
|
|
74
|
-
body: string;
|
|
75
|
-
headers: RestHeaders;
|
|
76
|
-
isArray: boolean;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* jobid
|
|
80
|
-
*/
|
|
81
|
-
id: number;
|
|
82
|
-
};
|
|
83
|
-
type ReqParams = {
|
|
84
|
-
url: string;
|
|
85
|
-
method: CoreModels.HttpMethod;
|
|
86
|
-
headers?: RestHeaders;
|
|
87
|
-
body?: any;
|
|
88
|
-
jobid: number;
|
|
89
|
-
isArray: boolean;
|
|
90
|
-
};
|
|
91
|
-
interface ResourceModel<A, TA> {
|
|
92
|
-
model: (pathModels?: Object, responseObjectType?: Function) => Rest<A, TA>;
|
|
93
|
-
headers: RestHeaders;
|
|
94
|
-
}
|
|
95
|
-
interface Ng2RestMethods<E, T> {
|
|
96
|
-
get: MethodWithBody<E, T>;
|
|
97
|
-
post: MethodWithBody<E, T>;
|
|
98
|
-
put: MethodWithBody<E, T>;
|
|
99
|
-
patch: MethodWithBody<E, T>;
|
|
100
|
-
head: MethodWithBody<E, T>;
|
|
101
|
-
delete: MethodWithBody<E, T>;
|
|
102
|
-
jsonp: MethodWithBody<E, T>;
|
|
103
|
-
}
|
|
104
|
-
type MockController = (url: string, method: CoreModels.HttpMethod, headers?: RestHeaders, body?: any) => MockResponse;
|
|
105
|
-
type MockHttp = MockResponse | MockController;
|
|
106
|
-
interface FnMethodsHttp<T, TA> extends Ng2RestMethods<HttpResponse<T>, T> {
|
|
107
|
-
array: Ng2RestMethods<HttpResponse<TA>, TA>;
|
|
108
|
-
}
|
|
109
|
-
interface FnMethodsHttpWithMock<T, TA> extends Ng2RestMethods<HttpResponse<T>, T> {
|
|
110
|
-
array: Ng2RestMethods<HttpResponse<TA>, TA>;
|
|
111
|
-
}
|
|
112
|
-
interface NestedParams {
|
|
113
|
-
[params: string]: string;
|
|
114
|
-
}
|
|
115
|
-
interface UrlParams {
|
|
116
|
-
[urlModelName: string]: string | number | boolean | RegExp | Object;
|
|
117
|
-
regex?: RegExp;
|
|
118
|
-
}
|
|
119
|
-
abstract class BaseBody {
|
|
120
|
-
protected toJSON(data: any, opt: {
|
|
121
|
-
isJSONArray?: boolean;
|
|
122
|
-
parsingError?: boolean;
|
|
123
|
-
}): object | undefined;
|
|
124
|
-
}
|
|
125
|
-
class HttpBody<T> extends BaseBody {
|
|
126
|
-
private responseText;
|
|
127
|
-
private isArray;
|
|
128
|
-
private entity;
|
|
129
|
-
private circular;
|
|
130
|
-
constructor(responseText: string | Blob, isArray: boolean, entity: Mapping.Mapping, circular: Circ[]);
|
|
131
|
-
get blob(): Blob;
|
|
132
|
-
get booleanValue(): boolean | undefined;
|
|
133
|
-
get numericValue(): number | undefined;
|
|
134
|
-
get rawJson(): Partial<T>;
|
|
135
|
-
get json(): T;
|
|
136
|
-
/**
|
|
137
|
-
* undefined when blob
|
|
138
|
-
*/
|
|
139
|
-
get text(): string | undefined;
|
|
140
|
-
}
|
|
141
|
-
class ErrorBody<T = RestErrorResponseWrapper> extends BaseBody {
|
|
142
|
-
private data;
|
|
143
|
-
constructor(data: any);
|
|
144
|
-
get json(): T;
|
|
145
|
-
get text(): string;
|
|
146
|
-
}
|
|
147
|
-
abstract class BaseResponse<T> {
|
|
148
|
-
responseText?: string | Blob;
|
|
149
|
-
readonly headers?: RestHeaders;
|
|
150
|
-
readonly statusCode?: HttpCode | number;
|
|
151
|
-
isArray: boolean;
|
|
152
|
-
protected static readonly cookies: Cookie;
|
|
153
|
-
get cookies(): Cookie;
|
|
154
|
-
constructor(responseText?: string | Blob, headers?: RestHeaders, statusCode?: HttpCode | number, isArray?: boolean);
|
|
155
|
-
}
|
|
156
|
-
class HttpResponse<T> extends BaseResponse<T> {
|
|
157
|
-
sourceRequest: Models.HandleResultSourceRequestOptions;
|
|
158
|
-
responseText?: string | Blob;
|
|
159
|
-
headers?: RestHeaders;
|
|
160
|
-
statusCode?: HttpCode | number;
|
|
161
|
-
entity?: Mapping.Mapping | Function;
|
|
162
|
-
circular?: Circ[];
|
|
163
|
-
jobid?: number;
|
|
164
|
-
isArray: boolean;
|
|
165
|
-
body: HttpBody<T>;
|
|
166
|
-
constructor(sourceRequest: Models.HandleResultSourceRequestOptions, responseText?: string | Blob, headers?: RestHeaders, statusCode?: HttpCode | number, entity?: Mapping.Mapping | Function, circular?: Circ[], jobid?: number, isArray?: boolean);
|
|
167
|
-
init(): void;
|
|
168
|
-
}
|
|
169
|
-
interface MockResponse {
|
|
170
|
-
data?: any;
|
|
171
|
-
code?: HttpCode;
|
|
172
|
-
error?: string;
|
|
173
|
-
headers?: RestHeaders;
|
|
174
|
-
jobid?: number;
|
|
175
|
-
isArray: boolean;
|
|
176
|
-
}
|
|
177
|
-
type ResponseTypeAxios = 'blob' | 'text';
|
|
178
|
-
}
|
|
179
|
-
export declare class HttpResponseError<ERROR_BODY = object> extends Models.BaseResponse<any> {
|
|
180
|
-
message: string;
|
|
181
|
-
jobid?: number;
|
|
182
|
-
sourceRequest?: Models.HandleResultSourceRequestOptions;
|
|
183
|
-
readonly body: Models.ErrorBody<ERROR_BODY>;
|
|
184
|
-
constructor(message: string, responseText?: string, headers?: RestHeaders, statusCode?: Models.HttpCode | number, jobid?: number, sourceRequest?: Models.HandleResultSourceRequestOptions);
|
|
185
|
-
}
|
|
186
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { Models } from '../models';
|
|
4
|
-
export interface RestPromises<A, TA, QP extends Models.UrlParams> {
|
|
5
|
-
get: (tem?: A, queryParams?: QP) => Observable<Models.HttpResponse<A>>;
|
|
6
|
-
head: (tem?: A, queryParams?: QP) => Observable<Models.HttpResponse<A>>;
|
|
7
|
-
query: (tem?: A, queryParams?: QP) => Observable<Models.HttpResponse<TA>>;
|
|
8
|
-
put: (item?: A, queryParams?: QP) => Observable<Models.HttpResponse<A>>;
|
|
9
|
-
patch: (item?: A, queryParams?: QP) => Observable<Models.HttpResponse<A>>;
|
|
10
|
-
post: (item?: A, queryParams?: QP) => Observable<Models.HttpResponse<A>>;
|
|
11
|
-
delete: (item?: A, queryParams?: QP) => Observable<Models.HttpResponse<A> | any>;
|
|
12
|
-
}
|
|
13
|
-
export interface Model<A, TA, RP extends Object, QP extends Models.UrlParams> {
|
|
14
|
-
(restParams?: RP): RestPromises<A, TA, QP>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @class SimpleResource
|
|
20
|
-
* @template A single model type
|
|
21
|
-
* @template TA array model type
|
|
22
|
-
* @template RP rest parameters type
|
|
23
|
-
* @template QP query parameters type
|
|
24
|
-
*/
|
|
25
|
-
export declare class SimpleResource<A, TA> {
|
|
26
|
-
model: Model<A, TA, Object, Models.UrlParams>;
|
|
27
|
-
private static _isSetQueryParamsSerialization;
|
|
28
|
-
static set doNotSerializeQueryParams(value: any);
|
|
29
|
-
static __destroy(): void;
|
|
30
|
-
constructor(endpoint: string, model: string);
|
|
31
|
-
}
|
package/websql/lib/params.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { Models } from './models';
|
|
3
|
-
/** check if string is a valid pattern */
|
|
4
|
-
export declare function isValid(pattern: string): boolean;
|
|
5
|
-
export declare function check(url: string, pattern: string): boolean;
|
|
6
|
-
export declare function getModels(pattern: string): string[];
|
|
7
|
-
export declare function getRestPramsNames(pattern: string): string[];
|
|
8
|
-
export declare function containsModels(url: string, models: string[]): boolean;
|
|
9
|
-
export declare function stars(n: number): string;
|
|
10
|
-
export declare function getRestParams(url: string, pattern: string): Object;
|
|
11
|
-
export declare const regexisPath: RegExp;
|
|
12
|
-
export declare function interpolateParamsToUrl(params: Object, url: string): string;
|
|
13
|
-
/**
|
|
14
|
-
* Get query params from url, like 'ex' in /api/books?ex=value
|
|
15
|
-
*/
|
|
16
|
-
export declare function decodeUrl(url: string): Object;
|
|
17
|
-
/**
|
|
18
|
-
* Create query params string for url
|
|
19
|
-
*
|
|
20
|
-
* @export
|
|
21
|
-
* @param {UrlParams[]} params
|
|
22
|
-
* @returns {string}
|
|
23
|
-
*/
|
|
24
|
-
export declare function getParamsUrl(params: Models.UrlParams[], doNotSerialize?: boolean): string;
|
|
25
|
-
export declare function prepareUrlOldWay(params?: TemplateStringsArray): string;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { Circ } from 'json10/websql';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { Subject } from 'rxjs';
|
|
5
|
-
import { Cookie } from './cookie';
|
|
6
|
-
import { Mapping } from './mapping';
|
|
7
|
-
import { Models } from './models';
|
|
8
|
-
import { RestHeaders } from './rest-headers';
|
|
9
|
-
import { RestRequest } from './rest-request';
|
|
10
|
-
import { Rest } from './rest.class';
|
|
11
|
-
export declare class Resource<E, T, TA> {
|
|
12
|
-
protected static _listenErrors: Subject<Models.BackendError>;
|
|
13
|
-
protected static _listenSuccess: Subject<Models.HttpResponse<any>>;
|
|
14
|
-
static get listenErrors(): Observable<Models.BackendError>;
|
|
15
|
-
static get listenSuccessOperations(): Observable<Models.HttpResponse<any>>;
|
|
16
|
-
static enableWarnings: boolean;
|
|
17
|
-
static initAngularNgZone(zone: any): void;
|
|
18
|
-
private checkNestedModels;
|
|
19
|
-
private static instance;
|
|
20
|
-
private static endpoints;
|
|
21
|
-
static getModel(endpoint: string, model: string): Rest<any>;
|
|
22
|
-
static request: RestRequest;
|
|
23
|
-
static create<A, TA = A[]>(e: string, model?: string, entityMapping?: Mapping.Mapping, circular?: Circ[], customContentType?: RestHeaders): Models.ResourceModel<A, TA>;
|
|
24
|
-
static reset(): void;
|
|
25
|
-
private constructor();
|
|
26
|
-
static Cookies: Cookie;
|
|
27
|
-
private static map;
|
|
28
|
-
private static prepareModel;
|
|
29
|
-
/**
|
|
30
|
-
* And enipoint to application
|
|
31
|
-
*
|
|
32
|
-
* @param {E} endpoint
|
|
33
|
-
* @param {string} model
|
|
34
|
-
* @returns {boolean}
|
|
35
|
-
*/
|
|
36
|
-
private add;
|
|
37
|
-
/**
|
|
38
|
-
* Access api throught endpoint
|
|
39
|
-
*
|
|
40
|
-
* @param {E} endpoint
|
|
41
|
-
* @param {string} model
|
|
42
|
-
* @returns {Rest<T, TA>}
|
|
43
|
-
*/
|
|
44
|
-
private api;
|
|
45
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
/**
|
|
3
|
-
* Based on Headers from https://github.com/angular/angular/blob/master/packages/http/src/headers.ts
|
|
4
|
-
*/
|
|
5
|
-
export type RestHeadersOptions = RestHeaders | {
|
|
6
|
-
[name: string]: (string | string[]);
|
|
7
|
-
};
|
|
8
|
-
export declare class RestHeaders {
|
|
9
|
-
/** @internal header names are lower case */
|
|
10
|
-
_headers: Map<string, string[]>;
|
|
11
|
-
/** @internal map lower case names to actual names */
|
|
12
|
-
_normalizedNames: Map<string, string>;
|
|
13
|
-
static from(headers?: RestHeadersOptions): RestHeaders;
|
|
14
|
-
private constructor();
|
|
15
|
-
/**
|
|
16
|
-
* Returns a new RestHeaders instance from the given DOMString of Response RestHeaders
|
|
17
|
-
*/
|
|
18
|
-
static fromResponseHeaderString(headersString: string): RestHeaders;
|
|
19
|
-
/**
|
|
20
|
-
* Appends a header to existing list of header values for a given header name.
|
|
21
|
-
*/
|
|
22
|
-
append(name: string, value: string): void;
|
|
23
|
-
/**
|
|
24
|
-
* Deletes all header values for the given name.
|
|
25
|
-
*/
|
|
26
|
-
delete(name: string): void;
|
|
27
|
-
forEach(fn: (values: string[], name: string, headers: Map<string, string[]>) => void): void;
|
|
28
|
-
/**
|
|
29
|
-
* Returns first header that matches given name.
|
|
30
|
-
*/
|
|
31
|
-
get(name: string): string;
|
|
32
|
-
/**
|
|
33
|
-
* Checks for existence of header by given name.
|
|
34
|
-
*/
|
|
35
|
-
has(name: string): boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Returns the names of the headers
|
|
38
|
-
*/
|
|
39
|
-
keys(): string[];
|
|
40
|
-
/**
|
|
41
|
-
* Sets or overrides header value for given name.
|
|
42
|
-
*/
|
|
43
|
-
set(name: string, value: string | string[]): void;
|
|
44
|
-
/**
|
|
45
|
-
* Returns values of all headers.
|
|
46
|
-
*/
|
|
47
|
-
values(): string[][];
|
|
48
|
-
/**
|
|
49
|
-
* Returns string of all headers.
|
|
50
|
-
*/
|
|
51
|
-
toJSON(): {
|
|
52
|
-
[name: string]: any;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Returns list of header values for a given name.
|
|
56
|
-
*/
|
|
57
|
-
getAll(name: string): string[];
|
|
58
|
-
private mayBeSetNormalizedName;
|
|
59
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { TaonAxiosClientInterceptor } from './axios-interceptors';
|
|
3
|
-
import { Models } from './models';
|
|
4
|
-
import { RestHeaders } from './rest-headers';
|
|
5
|
-
export declare class RestRequest {
|
|
6
|
-
static zone: any;
|
|
7
|
-
private static jobId;
|
|
8
|
-
private subjectInuUse;
|
|
9
|
-
private meta;
|
|
10
|
-
/**
|
|
11
|
-
* key is interceptorName (just to identify who is intercepting)
|
|
12
|
-
*/
|
|
13
|
-
interceptors: Map<string, TaonAxiosClientInterceptor<any>>;
|
|
14
|
-
/**
|
|
15
|
-
* key is a joined string METHOD-expressPath.
|
|
16
|
-
* Example `GET-/api/users`
|
|
17
|
-
*/
|
|
18
|
-
methodsInterceptors: Map<string, TaonAxiosClientInterceptor<any>>;
|
|
19
|
-
private handlerResult;
|
|
20
|
-
private req;
|
|
21
|
-
private getReplay;
|
|
22
|
-
private generalReq;
|
|
23
|
-
get(url: string, body: string, headers: RestHeaders, meta: Models.MetaRequest, isArray: boolean, mockHttp: Models.MockHttp, axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<any>;
|
|
24
|
-
head(url: string, body: string, headers: RestHeaders, meta: Models.MetaRequest, isArray: boolean, mockHttp: Models.MockHttp, axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<any>;
|
|
25
|
-
delete(url: string, body: string, headers: RestHeaders, meta: Models.MetaRequest, isArray: boolean, mockHttp: Models.MockHttp, axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<any>;
|
|
26
|
-
post(url: string, body: string, headers: RestHeaders, meta: Models.MetaRequest, isArray: boolean, mockHttp: Models.MockHttp, axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<any>;
|
|
27
|
-
put(url: string, body: string, headers: RestHeaders, meta: Models.MetaRequest, isArray: boolean, mockHttp: Models.MockHttp, axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<any>;
|
|
28
|
-
patch(url: string, body: string, headers: RestHeaders, meta: Models.MetaRequest, isArray: boolean, mockHttp: Models.MockHttp, axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<any>;
|
|
29
|
-
jsonp(url: string, body: string, headers: RestHeaders, meta: Models.MetaRequest, isArray: boolean, mockHttp: Models.MockHttp, axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<any>;
|
|
30
|
-
private replaySubjects;
|
|
31
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { Models } from './models';
|
|
3
|
-
import { RestHeaders } from './rest-headers';
|
|
4
|
-
import { RestRequest } from './rest-request';
|
|
5
|
-
export declare class Rest<T, TA = T[]> implements Models.FnMethodsHttpWithMock<T, TA> {
|
|
6
|
-
private request;
|
|
7
|
-
private meta;
|
|
8
|
-
private customContentType;
|
|
9
|
-
private mockHttp;
|
|
10
|
-
mock(mock: Models.MockHttp): Models.FnMethodsHttp<T, TA>;
|
|
11
|
-
private __meta_endpoint;
|
|
12
|
-
private _endpointRest;
|
|
13
|
-
private get endpoint();
|
|
14
|
-
private restQueryParams;
|
|
15
|
-
set __rest_endpoint(endpoint: any);
|
|
16
|
-
private creatUrl;
|
|
17
|
-
private _headers;
|
|
18
|
-
get headers(): RestHeaders;
|
|
19
|
-
constructor(endpoint: string, request: RestRequest, meta: Models.MetaRequest, customContentType: RestHeaders);
|
|
20
|
-
private req;
|
|
21
|
-
array: {
|
|
22
|
-
get: (item: TA, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig) => Models.PromiseObservableMix<Models.HttpResponse<TA>>;
|
|
23
|
-
head: (item: TA, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig) => Models.PromiseObservableMix<Models.HttpResponse<TA>>;
|
|
24
|
-
post: (item: TA, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig) => Models.PromiseObservableMix<Models.HttpResponse<TA>>;
|
|
25
|
-
put: (item: TA, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig) => Models.PromiseObservableMix<Models.HttpResponse<TA>>;
|
|
26
|
-
patch: (item: TA, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig) => Models.PromiseObservableMix<Models.HttpResponse<TA>>;
|
|
27
|
-
delete: (item: TA, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig) => Models.PromiseObservableMix<Models.HttpResponse<TA>>;
|
|
28
|
-
jsonp: (item: TA, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig) => Models.PromiseObservableMix<Models.HttpResponse<TA>>;
|
|
29
|
-
};
|
|
30
|
-
get(item: T, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<Models.HttpResponse<T>>;
|
|
31
|
-
head(item: T, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<Models.HttpResponse<T>>;
|
|
32
|
-
post(item: T, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<Models.HttpResponse<T>>;
|
|
33
|
-
put(item: T, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<Models.HttpResponse<T>>;
|
|
34
|
-
patch(item: T, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<Models.HttpResponse<T>>;
|
|
35
|
-
delete(item: T, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<Models.HttpResponse<T>>;
|
|
36
|
-
jsonp(item: T, params?: Models.UrlParams[], axiosOptions?: Models.Ng2RestAxiosRequestConfig): Models.PromiseObservableMix<Models.HttpResponse<T>>;
|
|
37
|
-
}
|
package/websql/public-api.d.ts
DELETED