@klerick/json-api-nestjs-sdk 10.0.0-beta.5 → 10.0.0-beta.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/CHANGELOG.md +20 -0
- package/cjs/src/index.js +13 -4
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/lib/constants/index.js +4 -1
- package/cjs/src/lib/constants/index.js.map +1 -1
- package/cjs/src/lib/json-api-angular.js +26 -19
- package/cjs/src/lib/json-api-angular.js.map +1 -1
- package/cjs/src/lib/json-api-js.js +16 -13
- package/cjs/src/lib/json-api-js.js.map +1 -1
- package/cjs/src/lib/service/atomic-operations.service.js +12 -8
- package/cjs/src/lib/service/atomic-operations.service.js.map +1 -1
- package/cjs/src/lib/service/fetch-inner-client.js +10 -6
- package/cjs/src/lib/service/fetch-inner-client.js.map +1 -1
- package/cjs/src/lib/service/index.js +6 -3
- package/cjs/src/lib/service/index.js.map +1 -1
- package/cjs/src/lib/service/json-api-sdk.service.js +33 -29
- package/cjs/src/lib/service/json-api-sdk.service.js.map +1 -1
- package/cjs/src/lib/service/json-api-utils.service.js +31 -27
- package/cjs/src/lib/service/json-api-utils.service.js.map +1 -1
- package/cjs/src/lib/token/index.js +6 -3
- package/cjs/src/lib/token/index.js.map +1 -1
- package/cjs/src/lib/types/atomic-operation.js +2 -0
- package/cjs/src/lib/types/atomic-type.js +3 -1
- package/cjs/src/lib/types/atomic-type.js.map +1 -1
- package/cjs/src/lib/types/config.js +2 -0
- package/cjs/src/lib/types/filter-operand.js +3 -1
- package/cjs/src/lib/types/filter-operand.js.map +1 -1
- package/cjs/src/lib/types/http-inner-client.js +2 -0
- package/cjs/src/lib/types/http-request-params.js +2 -0
- package/cjs/src/lib/types/index.js +12 -9
- package/cjs/src/lib/types/index.js.map +1 -1
- package/cjs/src/lib/types/promise-json-api-sdk.js +2 -0
- package/cjs/src/lib/types/query-params.js +3 -1
- package/cjs/src/lib/types/query-params.js.map +1 -1
- package/cjs/src/lib/types/utils.js +2 -0
- package/cjs/src/lib/utils/adapter-for-axios.js +8 -5
- package/cjs/src/lib/utils/adapter-for-axios.js.map +1 -1
- package/cjs/src/lib/utils/entity-array.js +5 -1
- package/cjs/src/lib/utils/entity-array.js.map +1 -1
- package/cjs/src/lib/utils/generate-atomic-body.js +15 -11
- package/cjs/src/lib/utils/generate-atomic-body.js.map +1 -1
- package/cjs/src/lib/utils/http-params.js +7 -2
- package/cjs/src/lib/utils/http-params.js.map +1 -1
- package/cjs/src/lib/utils/index.js +8 -5
- package/cjs/src/lib/utils/index.js.map +1 -1
- package/cjs/src/lib/utils/utils.js +13 -8
- package/cjs/src/lib/utils/utils.js.map +1 -1
- package/cjs/src/ngModule.js +13 -3
- package/cjs/src/ngModule.js.map +1 -1
- package/mjs/src/lib/utils/adapter-for-axios.d.ts +2 -2
- package/mjs/src/lib/utils/adapter-for-axios.js.map +1 -1
- package/package.json +2 -1
- package/cjs/src/index.d.ts +0 -5
- package/cjs/src/lib/constants/index.d.ts +0 -1
- package/cjs/src/lib/json-api-angular.d.ts +0 -21
- package/cjs/src/lib/json-api-js.d.ts +0 -15
- package/cjs/src/lib/service/atomic-operations.service.d.ts +0 -22
- package/cjs/src/lib/service/fetch-inner-client.d.ts +0 -20
- package/cjs/src/lib/service/index.d.ts +0 -3
- package/cjs/src/lib/service/json-api-sdk.service.d.ts +0 -21
- package/cjs/src/lib/service/json-api-utils.service.d.ts +0 -28
- package/cjs/src/lib/token/index.d.ts +0 -4
- package/cjs/src/lib/types/atomic-operation.d.ts +0 -33
- package/cjs/src/lib/types/atomic-type.d.ts +0 -23
- package/cjs/src/lib/types/config.d.ts +0 -14
- package/cjs/src/lib/types/filter-operand.d.ts +0 -10
- package/cjs/src/lib/types/http-inner-client.d.ts +0 -19
- package/cjs/src/lib/types/http-request-params.d.ts +0 -20
- package/cjs/src/lib/types/index.d.ts +0 -9
- package/cjs/src/lib/types/promise-json-api-sdk.d.ts +0 -16
- package/cjs/src/lib/types/query-params.d.ts +0 -47
- package/cjs/src/lib/types/utils.d.ts +0 -6
- package/cjs/src/lib/utils/adapter-for-axios.d.ts +0 -3
- package/cjs/src/lib/utils/entity-array.d.ts +0 -9
- package/cjs/src/lib/utils/generate-atomic-body.d.ts +0 -22
- package/cjs/src/lib/utils/http-params.d.ts +0 -154
- package/cjs/src/lib/utils/index.d.ts +0 -5
- package/cjs/src/lib/utils/utils.d.ts +0 -4
- package/cjs/src/ngModule.d.ts +0 -4
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* A codec for encoding and decoding parameters in URLs.
|
|
10
|
-
*
|
|
11
|
-
* Used by `HttpParams`.
|
|
12
|
-
*
|
|
13
|
-
* @publicApi
|
|
14
|
-
**/
|
|
15
|
-
export interface HttpParameterCodec {
|
|
16
|
-
encodeKey(key: string): string;
|
|
17
|
-
encodeValue(value: string): string;
|
|
18
|
-
decodeKey(key: string): string;
|
|
19
|
-
decodeValue(value: string): string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Provides encoding and decoding of URL parameter and query-string values.
|
|
23
|
-
*
|
|
24
|
-
* Serializes and parses URL parameter keys and values to encode and decode them.
|
|
25
|
-
* If you pass URL query parameters without encoding,
|
|
26
|
-
* the query parameters can be misinterpreted at the receiving end.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* @publicApi
|
|
30
|
-
*/
|
|
31
|
-
export declare class HttpUrlEncodingCodec implements HttpParameterCodec {
|
|
32
|
-
/**
|
|
33
|
-
* Encodes a key name for a URL parameter or query-string.
|
|
34
|
-
* @param key The key name.
|
|
35
|
-
* @returns The encoded key name.
|
|
36
|
-
*/
|
|
37
|
-
encodeKey(key: string): string;
|
|
38
|
-
/**
|
|
39
|
-
* Encodes the value of a URL parameter or query-string.
|
|
40
|
-
* @param value The value.
|
|
41
|
-
* @returns The encoded value.
|
|
42
|
-
*/
|
|
43
|
-
encodeValue(value: string): string;
|
|
44
|
-
/**
|
|
45
|
-
* Decodes an encoded URL parameter or query-string key.
|
|
46
|
-
* @param key The encoded key name.
|
|
47
|
-
* @returns The decoded key name.
|
|
48
|
-
*/
|
|
49
|
-
decodeKey(key: string): string;
|
|
50
|
-
/**
|
|
51
|
-
* Decodes an encoded URL parameter or query-string value.
|
|
52
|
-
* @param value The encoded value.
|
|
53
|
-
* @returns The decoded value.
|
|
54
|
-
*/
|
|
55
|
-
decodeValue(value: string): string;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Options used to construct an `HttpParams` instance.
|
|
59
|
-
*
|
|
60
|
-
* @publicApi
|
|
61
|
-
*/
|
|
62
|
-
export interface HttpParamsOptions {
|
|
63
|
-
/**
|
|
64
|
-
* String representation of the HTTP parameters in URL-query-string format.
|
|
65
|
-
* Mutually exclusive with `fromObject`.
|
|
66
|
-
*/
|
|
67
|
-
fromString?: string;
|
|
68
|
-
/** Object map of the HTTP parameters. Mutually exclusive with `fromString`. */
|
|
69
|
-
fromObject?: ParamObject;
|
|
70
|
-
/** Encoding codec used to parse and serialize the parameters. */
|
|
71
|
-
encoder?: HttpParameterCodec;
|
|
72
|
-
}
|
|
73
|
-
export type ParamObject = {
|
|
74
|
-
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* An HTTP request/response body that represents serialized parameters,
|
|
78
|
-
* per the MIME type `application/x-www-form-urlencoded`.
|
|
79
|
-
*
|
|
80
|
-
* This class is immutable; all mutation operations return a new instance.
|
|
81
|
-
*
|
|
82
|
-
* @publicApi
|
|
83
|
-
*/
|
|
84
|
-
export declare class HttpParams {
|
|
85
|
-
private map;
|
|
86
|
-
private encoder;
|
|
87
|
-
private updates;
|
|
88
|
-
private cloneFrom;
|
|
89
|
-
constructor(options?: HttpParamsOptions);
|
|
90
|
-
/**
|
|
91
|
-
* Reports whether the body includes one or more values for a given parameter.
|
|
92
|
-
* @param param The parameter name.
|
|
93
|
-
* @returns True if the parameter has one or more values,
|
|
94
|
-
* false if it has no value or is not present.
|
|
95
|
-
*/
|
|
96
|
-
has(param: string): boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Retrieves the first value for a parameter.
|
|
99
|
-
* @param param The parameter name.
|
|
100
|
-
* @returns The first value of the given parameter,
|
|
101
|
-
* or `null` if the parameter is not present.
|
|
102
|
-
*/
|
|
103
|
-
get(param: string): string | null;
|
|
104
|
-
/**
|
|
105
|
-
* Retrieves all values for a parameter.
|
|
106
|
-
* @param param The parameter name.
|
|
107
|
-
* @returns All values in a string array,
|
|
108
|
-
* or `null` if the parameter not present.
|
|
109
|
-
*/
|
|
110
|
-
getAll(param: string): string[] | null;
|
|
111
|
-
/**
|
|
112
|
-
* Retrieves all the parameters for this body.
|
|
113
|
-
* @returns The parameter names in a string array.
|
|
114
|
-
*/
|
|
115
|
-
keys(): string[];
|
|
116
|
-
/**
|
|
117
|
-
* Appends a new value to existing values for a parameter.
|
|
118
|
-
* @param param The parameter name.
|
|
119
|
-
* @param value The new value to add.
|
|
120
|
-
* @return A new body with the appended value.
|
|
121
|
-
*/
|
|
122
|
-
append(param: string, value: string | number | boolean): HttpParams;
|
|
123
|
-
/**
|
|
124
|
-
* Constructs a new body with appended values for the given parameter name.
|
|
125
|
-
* @param params parameters and values
|
|
126
|
-
* @return A new body with the new value.
|
|
127
|
-
*/
|
|
128
|
-
appendAll(params: {
|
|
129
|
-
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
130
|
-
}): HttpParams;
|
|
131
|
-
/**
|
|
132
|
-
* Replaces the value for a parameter.
|
|
133
|
-
* @param param The parameter name.
|
|
134
|
-
* @param value The new value.
|
|
135
|
-
* @return A new body with the new value.
|
|
136
|
-
*/
|
|
137
|
-
set(param: string, value: string | number | boolean): HttpParams;
|
|
138
|
-
/**
|
|
139
|
-
* Removes a given value or all values from a parameter.
|
|
140
|
-
* @param param The parameter name.
|
|
141
|
-
* @param value The value to remove, if provided.
|
|
142
|
-
* @return A new body with the given value removed, or with all values
|
|
143
|
-
* removed if no value is specified.
|
|
144
|
-
*/
|
|
145
|
-
delete(param: string, value?: string | number | boolean): HttpParams;
|
|
146
|
-
/**
|
|
147
|
-
* Serializes the body to an encoded string, where key-value pairs (separated by `=`) are
|
|
148
|
-
* separated by `&`s.
|
|
149
|
-
*/
|
|
150
|
-
toString(): string;
|
|
151
|
-
toObject(): ParamObject;
|
|
152
|
-
private clone;
|
|
153
|
-
private init;
|
|
154
|
-
}
|
package/cjs/src/ngModule.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { FilterOperand, ResourceObject } from '@klerick/json-api-nestjs-shared';
|
|
2
|
-
export { AtomicFactory, provideJsonApi, JSON_API_SDK_CONFIG, getProviders, } from './lib/json-api-angular';
|
|
3
|
-
export { JsonApiUtilsService, JsonApiSdkService } from './lib/service';
|
|
4
|
-
export { AtomicOperations, JsonSdkConfig } from './lib/types';
|