@inceptionbg/main 2.0.51 → 2.0.54
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/axios.d.ts +693 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/axios.d.ts
ADDED
|
@@ -0,0 +1,693 @@
|
|
|
1
|
+
type IServiceApi = 'idm' | 'codebook' | 'auditLog' | 'notifications';
|
|
2
|
+
|
|
3
|
+
// TypeScript Version: 4.7
|
|
4
|
+
type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null;
|
|
5
|
+
|
|
6
|
+
type CustomHeader = {
|
|
7
|
+
public?: boolean;
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
service?: IServiceApi;
|
|
10
|
+
token?: string;
|
|
11
|
+
noToast?: boolean;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
interface RawAxiosHeaders {
|
|
15
|
+
[key: string]: AxiosHeaderValue;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type MethodsHeaders = Partial<
|
|
19
|
+
{
|
|
20
|
+
[Key in Method as Lowercase<Key>]: AxiosHeaders;
|
|
21
|
+
} & { common: AxiosHeaders }
|
|
22
|
+
>;
|
|
23
|
+
|
|
24
|
+
type AxiosHeaderMatcher = (
|
|
25
|
+
this: AxiosHeaders,
|
|
26
|
+
value: string,
|
|
27
|
+
name: string,
|
|
28
|
+
headers: RawAxiosHeaders
|
|
29
|
+
) => boolean;
|
|
30
|
+
|
|
31
|
+
declare class AxiosHeaders {
|
|
32
|
+
constructor(headers?: RawAxiosHeaders | AxiosHeaders);
|
|
33
|
+
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
|
|
36
|
+
set(
|
|
37
|
+
headerName?: string,
|
|
38
|
+
value?: AxiosHeaderValue,
|
|
39
|
+
rewrite?: boolean | AxiosHeaderMatcher
|
|
40
|
+
): AxiosHeaders;
|
|
41
|
+
set(headers?: RawAxiosHeaders | AxiosHeaders, rewrite?: boolean): AxiosHeaders;
|
|
42
|
+
|
|
43
|
+
get(headerName: string, parser: RegExp): RegExpExecArray | null;
|
|
44
|
+
get(headerName: string, matcher?: true | AxiosHeaderMatcher): AxiosHeaderValue;
|
|
45
|
+
|
|
46
|
+
has(header: string, matcher?: true | AxiosHeaderMatcher): boolean;
|
|
47
|
+
|
|
48
|
+
delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
|
|
49
|
+
|
|
50
|
+
clear(matcher?: AxiosHeaderMatcher): boolean;
|
|
51
|
+
|
|
52
|
+
normalize(format: boolean): AxiosHeaders;
|
|
53
|
+
|
|
54
|
+
concat(
|
|
55
|
+
...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
|
|
56
|
+
): AxiosHeaders;
|
|
57
|
+
|
|
58
|
+
toJSON(asStrings?: boolean): RawAxiosHeaders;
|
|
59
|
+
|
|
60
|
+
static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
|
|
61
|
+
|
|
62
|
+
static accessor(header: string | string[]): AxiosHeaders;
|
|
63
|
+
|
|
64
|
+
static concat(
|
|
65
|
+
...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
|
|
66
|
+
): AxiosHeaders;
|
|
67
|
+
|
|
68
|
+
setContentType(
|
|
69
|
+
value: ContentType,
|
|
70
|
+
rewrite?: boolean | AxiosHeaderMatcher
|
|
71
|
+
): AxiosHeaders;
|
|
72
|
+
getContentType(parser?: RegExp): RegExpExecArray | null;
|
|
73
|
+
getContentType(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
74
|
+
hasContentType(matcher?: AxiosHeaderMatcher): boolean;
|
|
75
|
+
|
|
76
|
+
setContentLength(
|
|
77
|
+
value: AxiosHeaderValue,
|
|
78
|
+
rewrite?: boolean | AxiosHeaderMatcher
|
|
79
|
+
): AxiosHeaders;
|
|
80
|
+
getContentLength(parser?: RegExp): RegExpExecArray | null;
|
|
81
|
+
getContentLength(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
82
|
+
hasContentLength(matcher?: AxiosHeaderMatcher): boolean;
|
|
83
|
+
|
|
84
|
+
setAccept(
|
|
85
|
+
value: AxiosHeaderValue,
|
|
86
|
+
rewrite?: boolean | AxiosHeaderMatcher
|
|
87
|
+
): AxiosHeaders;
|
|
88
|
+
getAccept(parser?: RegExp): RegExpExecArray | null;
|
|
89
|
+
getAccept(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
90
|
+
hasAccept(matcher?: AxiosHeaderMatcher): boolean;
|
|
91
|
+
|
|
92
|
+
setUserAgent(
|
|
93
|
+
value: AxiosHeaderValue,
|
|
94
|
+
rewrite?: boolean | AxiosHeaderMatcher
|
|
95
|
+
): AxiosHeaders;
|
|
96
|
+
getUserAgent(parser?: RegExp): RegExpExecArray | null;
|
|
97
|
+
getUserAgent(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
98
|
+
hasUserAgent(matcher?: AxiosHeaderMatcher): boolean;
|
|
99
|
+
|
|
100
|
+
setContentEncoding(
|
|
101
|
+
value: AxiosHeaderValue,
|
|
102
|
+
rewrite?: boolean | AxiosHeaderMatcher
|
|
103
|
+
): AxiosHeaders;
|
|
104
|
+
getContentEncoding(parser?: RegExp): RegExpExecArray | null;
|
|
105
|
+
getContentEncoding(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
106
|
+
hasContentEncoding(matcher?: AxiosHeaderMatcher): boolean;
|
|
107
|
+
|
|
108
|
+
setAuthorization(
|
|
109
|
+
value: AxiosHeaderValue,
|
|
110
|
+
rewrite?: boolean | AxiosHeaderMatcher
|
|
111
|
+
): AxiosHeaders;
|
|
112
|
+
getAuthorization(parser?: RegExp): RegExpExecArray | null;
|
|
113
|
+
getAuthorization(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
114
|
+
hasAuthorization(matcher?: AxiosHeaderMatcher): boolean;
|
|
115
|
+
|
|
116
|
+
[Symbol.iterator](): IterableIterator<[string, AxiosHeaderValue]>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
type CommonRequestHeadersList =
|
|
120
|
+
| 'Accept'
|
|
121
|
+
| 'Content-Length'
|
|
122
|
+
| 'User-Agent'
|
|
123
|
+
| 'Content-Encoding'
|
|
124
|
+
| 'Authorization';
|
|
125
|
+
|
|
126
|
+
type ContentType =
|
|
127
|
+
| AxiosHeaderValue
|
|
128
|
+
| 'text/html'
|
|
129
|
+
| 'text/plain'
|
|
130
|
+
| 'multipart/form-data'
|
|
131
|
+
| 'application/json'
|
|
132
|
+
| 'application/x-www-form-urlencoded'
|
|
133
|
+
| 'application/octet-stream';
|
|
134
|
+
|
|
135
|
+
type RawAxiosRequestHeaders = Partial<
|
|
136
|
+
RawAxiosHeaders & {
|
|
137
|
+
[Key in CommonRequestHeadersList]: AxiosHeaderValue;
|
|
138
|
+
} & {
|
|
139
|
+
'Content-Type': ContentType;
|
|
140
|
+
}
|
|
141
|
+
>;
|
|
142
|
+
|
|
143
|
+
type AxiosRequestHeaders = RawAxiosRequestHeaders & AxiosHeaders;
|
|
144
|
+
|
|
145
|
+
type CommonResponseHeadersList =
|
|
146
|
+
| 'Server'
|
|
147
|
+
| 'Content-Type'
|
|
148
|
+
| 'Content-Length'
|
|
149
|
+
| 'Cache-Control'
|
|
150
|
+
| 'Content-Encoding';
|
|
151
|
+
|
|
152
|
+
type RawCommonResponseHeaders = {
|
|
153
|
+
[Key in CommonResponseHeadersList]: AxiosHeaderValue;
|
|
154
|
+
} & {
|
|
155
|
+
'set-cookie': string[];
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
type RawAxiosResponseHeaders = Partial<RawAxiosHeaders & RawCommonResponseHeaders>;
|
|
159
|
+
|
|
160
|
+
type AxiosResponseHeaders = RawAxiosResponseHeaders & AxiosHeaders;
|
|
161
|
+
|
|
162
|
+
interface AxiosRequestTransformer {
|
|
163
|
+
(this: InternalAxiosRequestConfig, data: any, headers: AxiosRequestHeaders): any;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
interface AxiosResponseTransformer {
|
|
167
|
+
(
|
|
168
|
+
this: InternalAxiosRequestConfig,
|
|
169
|
+
data: any,
|
|
170
|
+
headers: AxiosResponseHeaders,
|
|
171
|
+
status?: number
|
|
172
|
+
): any;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
interface AxiosAdapter {
|
|
176
|
+
(config: InternalAxiosRequestConfig): AxiosPromise;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
interface AxiosBasicCredentials {
|
|
180
|
+
username: string;
|
|
181
|
+
password: string;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
interface AxiosProxyConfig {
|
|
185
|
+
host: string;
|
|
186
|
+
port: number;
|
|
187
|
+
auth?: {
|
|
188
|
+
username: string;
|
|
189
|
+
password: string;
|
|
190
|
+
};
|
|
191
|
+
protocol?: string;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
declare enum HttpStatusCode {
|
|
195
|
+
Continue = 100,
|
|
196
|
+
SwitchingProtocols = 101,
|
|
197
|
+
Processing = 102,
|
|
198
|
+
EarlyHints = 103,
|
|
199
|
+
Ok = 200,
|
|
200
|
+
Created = 201,
|
|
201
|
+
Accepted = 202,
|
|
202
|
+
NonAuthoritativeInformation = 203,
|
|
203
|
+
NoContent = 204,
|
|
204
|
+
ResetContent = 205,
|
|
205
|
+
PartialContent = 206,
|
|
206
|
+
MultiStatus = 207,
|
|
207
|
+
AlreadyReported = 208,
|
|
208
|
+
ImUsed = 226,
|
|
209
|
+
MultipleChoices = 300,
|
|
210
|
+
MovedPermanently = 301,
|
|
211
|
+
Found = 302,
|
|
212
|
+
SeeOther = 303,
|
|
213
|
+
NotModified = 304,
|
|
214
|
+
UseProxy = 305,
|
|
215
|
+
Unused = 306,
|
|
216
|
+
TemporaryRedirect = 307,
|
|
217
|
+
PermanentRedirect = 308,
|
|
218
|
+
BadRequest = 400,
|
|
219
|
+
Unauthorized = 401,
|
|
220
|
+
PaymentRequired = 402,
|
|
221
|
+
Forbidden = 403,
|
|
222
|
+
NotFound = 404,
|
|
223
|
+
MethodNotAllowed = 405,
|
|
224
|
+
NotAcceptable = 406,
|
|
225
|
+
ProxyAuthenticationRequired = 407,
|
|
226
|
+
RequestTimeout = 408,
|
|
227
|
+
Conflict = 409,
|
|
228
|
+
Gone = 410,
|
|
229
|
+
LengthRequired = 411,
|
|
230
|
+
PreconditionFailed = 412,
|
|
231
|
+
PayloadTooLarge = 413,
|
|
232
|
+
UriTooLong = 414,
|
|
233
|
+
UnsupportedMediaType = 415,
|
|
234
|
+
RangeNotSatisfiable = 416,
|
|
235
|
+
ExpectationFailed = 417,
|
|
236
|
+
ImATeapot = 418,
|
|
237
|
+
MisdirectedRequest = 421,
|
|
238
|
+
UnprocessableEntity = 422,
|
|
239
|
+
Locked = 423,
|
|
240
|
+
FailedDependency = 424,
|
|
241
|
+
TooEarly = 425,
|
|
242
|
+
UpgradeRequired = 426,
|
|
243
|
+
PreconditionRequired = 428,
|
|
244
|
+
TooManyRequests = 429,
|
|
245
|
+
RequestHeaderFieldsTooLarge = 431,
|
|
246
|
+
UnavailableForLegalReasons = 451,
|
|
247
|
+
InternalServerError = 500,
|
|
248
|
+
NotImplemented = 501,
|
|
249
|
+
BadGateway = 502,
|
|
250
|
+
ServiceUnavailable = 503,
|
|
251
|
+
GatewayTimeout = 504,
|
|
252
|
+
HttpVersionNotSupported = 505,
|
|
253
|
+
VariantAlsoNegotiates = 506,
|
|
254
|
+
InsufficientStorage = 507,
|
|
255
|
+
LoopDetected = 508,
|
|
256
|
+
NotExtended = 510,
|
|
257
|
+
NetworkAuthenticationRequired = 511,
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
type Method =
|
|
261
|
+
| 'get'
|
|
262
|
+
| 'GET'
|
|
263
|
+
| 'delete'
|
|
264
|
+
| 'DELETE'
|
|
265
|
+
| 'head'
|
|
266
|
+
| 'HEAD'
|
|
267
|
+
| 'options'
|
|
268
|
+
| 'OPTIONS'
|
|
269
|
+
| 'post'
|
|
270
|
+
| 'POST'
|
|
271
|
+
| 'put'
|
|
272
|
+
| 'PUT'
|
|
273
|
+
| 'patch'
|
|
274
|
+
| 'PATCH'
|
|
275
|
+
| 'purge'
|
|
276
|
+
| 'PURGE'
|
|
277
|
+
| 'link'
|
|
278
|
+
| 'LINK'
|
|
279
|
+
| 'unlink'
|
|
280
|
+
| 'UNLINK';
|
|
281
|
+
|
|
282
|
+
type ResponseType =
|
|
283
|
+
| 'arraybuffer'
|
|
284
|
+
| 'blob'
|
|
285
|
+
| 'document'
|
|
286
|
+
| 'json'
|
|
287
|
+
| 'text'
|
|
288
|
+
| 'stream';
|
|
289
|
+
|
|
290
|
+
type responseEncoding =
|
|
291
|
+
| 'ascii'
|
|
292
|
+
| 'ASCII'
|
|
293
|
+
| 'ansi'
|
|
294
|
+
| 'ANSI'
|
|
295
|
+
| 'binary'
|
|
296
|
+
| 'BINARY'
|
|
297
|
+
| 'base64'
|
|
298
|
+
| 'BASE64'
|
|
299
|
+
| 'base64url'
|
|
300
|
+
| 'BASE64URL'
|
|
301
|
+
| 'hex'
|
|
302
|
+
| 'HEX'
|
|
303
|
+
| 'latin1'
|
|
304
|
+
| 'LATIN1'
|
|
305
|
+
| 'ucs-2'
|
|
306
|
+
| 'UCS-2'
|
|
307
|
+
| 'ucs2'
|
|
308
|
+
| 'UCS2'
|
|
309
|
+
| 'utf-8'
|
|
310
|
+
| 'UTF-8'
|
|
311
|
+
| 'utf8'
|
|
312
|
+
| 'UTF8'
|
|
313
|
+
| 'utf16le'
|
|
314
|
+
| 'UTF16LE';
|
|
315
|
+
|
|
316
|
+
interface TransitionalOptions {
|
|
317
|
+
silentJSONParsing?: boolean;
|
|
318
|
+
forcedJSONParsing?: boolean;
|
|
319
|
+
clarifyTimeoutError?: boolean;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
interface GenericAbortSignal {
|
|
323
|
+
readonly aborted: boolean;
|
|
324
|
+
onabort?: ((...args: any) => any) | null;
|
|
325
|
+
addEventListener?: (...args: any) => any;
|
|
326
|
+
removeEventListener?: (...args: any) => any;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
interface FormDataVisitorHelpers {
|
|
330
|
+
defaultVisitor: SerializerVisitor;
|
|
331
|
+
convertValue: (value: any) => any;
|
|
332
|
+
isVisitable: (value: any) => boolean;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
interface SerializerVisitor {
|
|
336
|
+
(
|
|
337
|
+
this: GenericFormData,
|
|
338
|
+
value: any,
|
|
339
|
+
key: string | number,
|
|
340
|
+
path: null | Array<string | number>,
|
|
341
|
+
helpers: FormDataVisitorHelpers
|
|
342
|
+
): boolean;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
interface SerializerOptions {
|
|
346
|
+
visitor?: SerializerVisitor;
|
|
347
|
+
dots?: boolean;
|
|
348
|
+
metaTokens?: boolean;
|
|
349
|
+
indexes?: boolean | null;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// tslint:disable-next-line
|
|
353
|
+
interface FormSerializerOptions extends SerializerOptions {}
|
|
354
|
+
|
|
355
|
+
interface ParamEncoder {
|
|
356
|
+
(value: any, defaultEncoder: (value: any) => any): any;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
interface CustomParamsSerializer {
|
|
360
|
+
(params: Record<string, any>, options?: ParamsSerializerOptions): string;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
interface ParamsSerializerOptions extends SerializerOptions {
|
|
364
|
+
encode?: ParamEncoder;
|
|
365
|
+
serialize?: CustomParamsSerializer;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
type MaxUploadRate = number;
|
|
369
|
+
|
|
370
|
+
type MaxDownloadRate = number;
|
|
371
|
+
|
|
372
|
+
type BrowserProgressEvent = any;
|
|
373
|
+
|
|
374
|
+
interface AxiosProgressEvent {
|
|
375
|
+
loaded: number;
|
|
376
|
+
total?: number;
|
|
377
|
+
progress?: number;
|
|
378
|
+
bytes: number;
|
|
379
|
+
rate?: number;
|
|
380
|
+
estimated?: number;
|
|
381
|
+
upload?: boolean;
|
|
382
|
+
download?: boolean;
|
|
383
|
+
event?: BrowserProgressEvent;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
type Milliseconds = number;
|
|
387
|
+
|
|
388
|
+
type AxiosAdapterName = 'xhr' | 'http' | string;
|
|
389
|
+
|
|
390
|
+
type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName;
|
|
391
|
+
|
|
392
|
+
interface AxiosRequestConfig<D = any> {
|
|
393
|
+
url?: string;
|
|
394
|
+
method?: Method | string;
|
|
395
|
+
baseURL?: string;
|
|
396
|
+
transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
|
|
397
|
+
transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
|
|
398
|
+
headers?: ((RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders) & CustomHeader;
|
|
399
|
+
params?: any;
|
|
400
|
+
paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer;
|
|
401
|
+
data?: D;
|
|
402
|
+
timeout?: Milliseconds;
|
|
403
|
+
timeoutErrorMessage?: string;
|
|
404
|
+
withCredentials?: boolean;
|
|
405
|
+
adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
|
|
406
|
+
auth?: AxiosBasicCredentials;
|
|
407
|
+
responseType?: ResponseType;
|
|
408
|
+
responseEncoding?: responseEncoding | string;
|
|
409
|
+
xsrfCookieName?: string;
|
|
410
|
+
xsrfHeaderName?: string;
|
|
411
|
+
onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
|
|
412
|
+
onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void;
|
|
413
|
+
maxContentLength?: number;
|
|
414
|
+
validateStatus?: ((status: number) => boolean) | null;
|
|
415
|
+
maxBodyLength?: number;
|
|
416
|
+
maxRedirects?: number;
|
|
417
|
+
maxRate?: number | [MaxUploadRate, MaxDownloadRate];
|
|
418
|
+
beforeRedirect?: (
|
|
419
|
+
options: Record<string, any>,
|
|
420
|
+
responseDetails: { headers: Record<string, string> }
|
|
421
|
+
) => void;
|
|
422
|
+
socketPath?: string | null;
|
|
423
|
+
transport?: any;
|
|
424
|
+
httpAgent?: any;
|
|
425
|
+
httpsAgent?: any;
|
|
426
|
+
proxy?: AxiosProxyConfig | false;
|
|
427
|
+
cancelToken?: CancelToken;
|
|
428
|
+
decompress?: boolean;
|
|
429
|
+
transitional?: TransitionalOptions;
|
|
430
|
+
signal?: GenericAbortSignal;
|
|
431
|
+
insecureHTTPParser?: boolean;
|
|
432
|
+
env?: {
|
|
433
|
+
FormData?: new (...args: any[]) => object;
|
|
434
|
+
};
|
|
435
|
+
formSerializer?: FormSerializerOptions;
|
|
436
|
+
family?: 4 | 6 | undefined;
|
|
437
|
+
lookup?:
|
|
438
|
+
| ((
|
|
439
|
+
hostname: string,
|
|
440
|
+
options: object,
|
|
441
|
+
cb: (err: Error | null, address: string, family: number) => void
|
|
442
|
+
) => void)
|
|
443
|
+
| ((
|
|
444
|
+
hostname: string,
|
|
445
|
+
options: object
|
|
446
|
+
) => Promise<[address: string, family: number] | string>);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
// Alias
|
|
450
|
+
type RawAxiosRequestConfig<D = any> = AxiosRequestConfig<D>;
|
|
451
|
+
|
|
452
|
+
interface InternalAxiosRequestConfig<D = any> extends AxiosRequestConfig<D> {
|
|
453
|
+
headers: AxiosRequestHeaders;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
interface HeadersDefaults {
|
|
457
|
+
common: RawAxiosRequestHeaders;
|
|
458
|
+
delete: RawAxiosRequestHeaders;
|
|
459
|
+
get: RawAxiosRequestHeaders;
|
|
460
|
+
head: RawAxiosRequestHeaders;
|
|
461
|
+
post: RawAxiosRequestHeaders;
|
|
462
|
+
put: RawAxiosRequestHeaders;
|
|
463
|
+
patch: RawAxiosRequestHeaders;
|
|
464
|
+
options?: RawAxiosRequestHeaders;
|
|
465
|
+
purge?: RawAxiosRequestHeaders;
|
|
466
|
+
link?: RawAxiosRequestHeaders;
|
|
467
|
+
unlink?: RawAxiosRequestHeaders;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
interface AxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> {
|
|
471
|
+
headers: HeadersDefaults;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
interface CreateAxiosDefaults<D = any>
|
|
475
|
+
extends Omit<AxiosRequestConfig<D>, 'headers'> {
|
|
476
|
+
headers?: RawAxiosRequestHeaders | AxiosHeaders | Partial<HeadersDefaults>;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
interface AxiosResponse<T = any, D = any> {
|
|
480
|
+
data: T;
|
|
481
|
+
status: number;
|
|
482
|
+
statusText: string;
|
|
483
|
+
headers: RawAxiosResponseHeaders | AxiosResponseHeaders;
|
|
484
|
+
config: InternalAxiosRequestConfig<D>;
|
|
485
|
+
request?: any;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
declare class AxiosError<T = unknown, D = any> extends Error {
|
|
489
|
+
constructor(
|
|
490
|
+
message?: string,
|
|
491
|
+
code?: string,
|
|
492
|
+
config?: InternalAxiosRequestConfig<D>,
|
|
493
|
+
request?: any,
|
|
494
|
+
response?: AxiosResponse<T, D>
|
|
495
|
+
);
|
|
496
|
+
|
|
497
|
+
config?: InternalAxiosRequestConfig<D>;
|
|
498
|
+
code?: string;
|
|
499
|
+
request?: any;
|
|
500
|
+
response?: AxiosResponse<T, D>;
|
|
501
|
+
isAxiosError: boolean;
|
|
502
|
+
status?: number;
|
|
503
|
+
toJSON: () => object;
|
|
504
|
+
cause?: Error;
|
|
505
|
+
static from<T = unknown, D = any>(
|
|
506
|
+
error: Error | unknown,
|
|
507
|
+
code?: string,
|
|
508
|
+
config?: InternalAxiosRequestConfig<D>,
|
|
509
|
+
request?: any,
|
|
510
|
+
response?: AxiosResponse<T, D>,
|
|
511
|
+
customProps?: object
|
|
512
|
+
): AxiosError<T, D>;
|
|
513
|
+
static readonly ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
514
|
+
static readonly ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
|
|
515
|
+
static readonly ERR_BAD_OPTION = 'ERR_BAD_OPTION';
|
|
516
|
+
static readonly ERR_NETWORK = 'ERR_NETWORK';
|
|
517
|
+
static readonly ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
518
|
+
static readonly ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
|
|
519
|
+
static readonly ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
520
|
+
static readonly ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
521
|
+
static readonly ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
522
|
+
static readonly ERR_CANCELED = 'ERR_CANCELED';
|
|
523
|
+
static readonly ECONNABORTED = 'ECONNABORTED';
|
|
524
|
+
static readonly ETIMEDOUT = 'ETIMEDOUT';
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
declare class CanceledError<T> extends AxiosError<T> {}
|
|
528
|
+
|
|
529
|
+
type AxiosPromise<T = any> = Promise<AxiosResponse<T>>;
|
|
530
|
+
|
|
531
|
+
interface CancelStatic {
|
|
532
|
+
new (message?: string): Cancel;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
interface Cancel {
|
|
536
|
+
message: string | undefined;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
interface Canceler {
|
|
540
|
+
(message?: string, config?: AxiosRequestConfig, request?: any): void;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
interface CancelTokenStatic {
|
|
544
|
+
new (executor: (cancel: Canceler) => void): CancelToken;
|
|
545
|
+
source(): CancelTokenSource;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
interface CancelToken {
|
|
549
|
+
promise: Promise<Cancel>;
|
|
550
|
+
reason?: Cancel;
|
|
551
|
+
throwIfRequested(): void;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
interface CancelTokenSource {
|
|
555
|
+
token: CancelToken;
|
|
556
|
+
cancel: Canceler;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
interface AxiosInterceptorOptions {
|
|
560
|
+
synchronous?: boolean;
|
|
561
|
+
runWhen?: (config: InternalAxiosRequestConfig) => boolean;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
interface AxiosInterceptorManager<V> {
|
|
565
|
+
use(
|
|
566
|
+
onFulfilled?: ((value: V) => V | Promise<V>) | null,
|
|
567
|
+
onRejected?: ((error: any) => any) | null,
|
|
568
|
+
options?: AxiosInterceptorOptions
|
|
569
|
+
): number;
|
|
570
|
+
eject(id: number): void;
|
|
571
|
+
clear(): void;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
declare class Axios {
|
|
575
|
+
constructor(config?: AxiosRequestConfig);
|
|
576
|
+
defaults: AxiosDefaults;
|
|
577
|
+
interceptors: {
|
|
578
|
+
request: AxiosInterceptorManager<InternalAxiosRequestConfig>;
|
|
579
|
+
response: AxiosInterceptorManager<AxiosResponse>;
|
|
580
|
+
};
|
|
581
|
+
getUri(config?: AxiosRequestConfig): string;
|
|
582
|
+
request<T = any, R = AxiosResponse<T>, D = any>(
|
|
583
|
+
config: AxiosRequestConfig<D>
|
|
584
|
+
): Promise<R>;
|
|
585
|
+
get<T = any, R = AxiosResponse<T>, D = any>(
|
|
586
|
+
url: string,
|
|
587
|
+
config?: AxiosRequestConfig<D>
|
|
588
|
+
): Promise<R>;
|
|
589
|
+
delete<T = any, R = AxiosResponse<T>, D = any>(
|
|
590
|
+
url: string,
|
|
591
|
+
config?: AxiosRequestConfig<D>
|
|
592
|
+
): Promise<R>;
|
|
593
|
+
head<T = any, R = AxiosResponse<T>, D = any>(
|
|
594
|
+
url: string,
|
|
595
|
+
config?: AxiosRequestConfig<D>
|
|
596
|
+
): Promise<R>;
|
|
597
|
+
options<T = any, R = AxiosResponse<T>, D = any>(
|
|
598
|
+
url: string,
|
|
599
|
+
config?: AxiosRequestConfig<D>
|
|
600
|
+
): Promise<R>;
|
|
601
|
+
post<T = any, R = AxiosResponse<T>, D = any>(
|
|
602
|
+
url: string,
|
|
603
|
+
data?: D,
|
|
604
|
+
config?: AxiosRequestConfig<D>
|
|
605
|
+
): Promise<R>;
|
|
606
|
+
put<T = any, R = AxiosResponse<T>, D = any>(
|
|
607
|
+
url: string,
|
|
608
|
+
data?: D,
|
|
609
|
+
config?: AxiosRequestConfig<D>
|
|
610
|
+
): Promise<R>;
|
|
611
|
+
patch<T = any, R = AxiosResponse<T>, D = any>(
|
|
612
|
+
url: string,
|
|
613
|
+
data?: D,
|
|
614
|
+
config?: AxiosRequestConfig<D>
|
|
615
|
+
): Promise<R>;
|
|
616
|
+
postForm<T = any, R = AxiosResponse<T>, D = any>(
|
|
617
|
+
url: string,
|
|
618
|
+
data?: D,
|
|
619
|
+
config?: AxiosRequestConfig<D>
|
|
620
|
+
): Promise<R>;
|
|
621
|
+
putForm<T = any, R = AxiosResponse<T>, D = any>(
|
|
622
|
+
url: string,
|
|
623
|
+
data?: D,
|
|
624
|
+
config?: AxiosRequestConfig<D>
|
|
625
|
+
): Promise<R>;
|
|
626
|
+
patchForm<T = any, R = AxiosResponse<T>, D = any>(
|
|
627
|
+
url: string,
|
|
628
|
+
data?: D,
|
|
629
|
+
config?: AxiosRequestConfig<D>
|
|
630
|
+
): Promise<R>;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
interface AxiosInstance extends Axios {
|
|
634
|
+
<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
|
|
635
|
+
<T = any, R = AxiosResponse<T>, D = any>(
|
|
636
|
+
url: string,
|
|
637
|
+
config?: AxiosRequestConfig<D>
|
|
638
|
+
): Promise<R>;
|
|
639
|
+
|
|
640
|
+
defaults: Omit<AxiosDefaults, 'headers'> & {
|
|
641
|
+
headers: HeadersDefaults & {
|
|
642
|
+
[key: string]: AxiosHeaderValue;
|
|
643
|
+
};
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
interface GenericFormData {
|
|
648
|
+
append(name: string, value: any, options?: any): any;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
interface GenericHTMLFormElement {
|
|
652
|
+
name: string;
|
|
653
|
+
method: string;
|
|
654
|
+
submit(): void;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
declare function toFormData(
|
|
658
|
+
sourceObj: object,
|
|
659
|
+
targetFormData?: GenericFormData,
|
|
660
|
+
options?: FormSerializerOptions
|
|
661
|
+
): GenericFormData;
|
|
662
|
+
|
|
663
|
+
declare function formToJSON(form: GenericFormData | GenericHTMLFormElement): object;
|
|
664
|
+
|
|
665
|
+
declare function isAxiosError<T = any, D = any>(payload: any): payload is AxiosError<T, D>;
|
|
666
|
+
|
|
667
|
+
declare function spread<T, R>(callback: (...args: T[]) => R): (array: T[]) => R;
|
|
668
|
+
|
|
669
|
+
declare function isCancel(value: any): value is Cancel;
|
|
670
|
+
|
|
671
|
+
declare function all<T>(values: Array<T | Promise<T>>): Promise<T[]>;
|
|
672
|
+
|
|
673
|
+
interface AxiosStatic extends AxiosInstance {
|
|
674
|
+
create(config?: CreateAxiosDefaults): AxiosInstance;
|
|
675
|
+
Cancel: CancelStatic;
|
|
676
|
+
CancelToken: CancelTokenStatic;
|
|
677
|
+
Axios: typeof Axios;
|
|
678
|
+
AxiosError: typeof AxiosError;
|
|
679
|
+
HttpStatusCode: typeof HttpStatusCode;
|
|
680
|
+
readonly VERSION: string;
|
|
681
|
+
isCancel: typeof isCancel;
|
|
682
|
+
all: typeof all;
|
|
683
|
+
spread: typeof spread;
|
|
684
|
+
isAxiosError: typeof isAxiosError;
|
|
685
|
+
toFormData: typeof toFormData;
|
|
686
|
+
formToJSON: typeof formToJSON;
|
|
687
|
+
CanceledError: typeof CanceledError;
|
|
688
|
+
AxiosHeaders: typeof AxiosHeaders;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
declare const axios: AxiosStatic;
|
|
692
|
+
|
|
693
|
+
export { Axios, AxiosAdapter, AxiosBasicCredentials, AxiosDefaults, AxiosError, AxiosHeaderValue, AxiosHeaders, AxiosInstance, AxiosInterceptorManager, AxiosInterceptorOptions, AxiosProgressEvent, AxiosPromise, AxiosProxyConfig, AxiosRequestConfig, AxiosRequestHeaders, AxiosRequestTransformer, AxiosResponse, AxiosResponseHeaders, AxiosResponseTransformer, AxiosStatic, Cancel, CancelStatic, CancelToken, CancelTokenSource, CancelTokenStatic, CanceledError, Canceler, CreateAxiosDefaults, CustomHeader, CustomParamsSerializer, FormDataVisitorHelpers, FormSerializerOptions, GenericAbortSignal, GenericFormData, GenericHTMLFormElement, HeadersDefaults, HttpStatusCode, InternalAxiosRequestConfig, Method, ParamEncoder, ParamsSerializerOptions, RawAxiosRequestConfig, RawAxiosRequestHeaders, RawAxiosResponseHeaders, ResponseType, SerializerOptions, SerializerVisitor, TransitionalOptions, all, axios as default, formToJSON, isAxiosError, isCancel, responseEncoding, spread, toFormData };
|
package/dist/index.d.ts
CHANGED
|
@@ -1259,7 +1259,7 @@ interface IConditionIndexData {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
|
|
1261
1261
|
type IEnv = 'DEV' | 'TEST' | 'PROD' | 'LOCAL' | 'UAT';
|
|
1262
|
-
type IServiceApi = 'idm' | 'codebook' | 'auditLog';
|
|
1262
|
+
type IServiceApi = 'idm' | 'codebook' | 'auditLog' | 'notifications';
|
|
1263
1263
|
type IEnvVar = {
|
|
1264
1264
|
[env in IEnv]: {
|
|
1265
1265
|
authApiUrl: string;
|