@inceptionbg/main 2.0.67 → 2.0.68

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.
@@ -1,575 +1,575 @@
1
1
  import { NavigateFunction, Location, LinkProps } from 'react-router-dom';
2
2
 
3
- declare const ModuleIds = [
4
- 'ADMIN',
5
- 'EARCHIVE',
6
- 'ERDS',
7
- 'EINVOICE',
8
- 'EFORMS',
9
- 'EDMS',
10
- 'ESIGN',
11
- 'EVALIDATION',
12
- 'EPROCUREMENT',
13
- 'EREGISTER',
3
+ declare const ModuleIds = [
4
+ 'ADMIN',
5
+ 'EARCHIVE',
6
+ 'ERDS',
7
+ 'EINVOICE',
8
+ 'EFORMS',
9
+ 'EDMS',
10
+ 'ESIGN',
11
+ 'EVALIDATION',
12
+ 'EPROCUREMENT',
13
+ 'EREGISTER',
14
14
  ] as const;
15
15
 
16
16
  type IModuleId = (typeof ModuleIds)[number];
17
17
 
18
- type IEnv = 'DEV' | 'TEST' | 'PROD' | 'LOCAL' | 'UAT';
18
+ type IEnv = 'DEV' | 'TEST' | 'PROD' | 'LOCAL' | 'UAT';
19
19
  type IServiceApi = 'idm' | 'codebook' | 'auditLog' | 'notifications' | 'indexData';
20
20
 
21
- // TypeScript Version: 4.7
22
- type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null;
23
-
24
- type CustomHeader = {
25
- public?: boolean;
26
- baseUrl?: string;
27
- service?: IServiceApi;
28
- token?: string;
29
- noToast?: boolean;
30
- noErrors?: boolean;
31
- };
32
-
33
- interface RawAxiosHeaders {
34
- [key: string]: AxiosHeaderValue;
35
- }
36
-
37
- type MethodsHeaders = Partial<
38
- {
39
- [Key in Method as Lowercase<Key>]: AxiosHeaders;
40
- } & { common: AxiosHeaders }
41
- >;
42
-
43
- type AxiosHeaderMatcher =
44
- | string
45
- | RegExp
46
- | ((this: AxiosHeaders, value: string, name: string) => boolean);
47
-
48
- type AxiosHeaderParser = (
49
- this: AxiosHeaders,
50
- value: AxiosHeaderValue,
51
- header: string
52
- ) => any;
53
-
54
- declare class AxiosHeaders {
55
- constructor(headers?: RawAxiosHeaders | AxiosHeaders | string);
56
-
57
- [key: string]: any;
58
-
59
- set(
60
- headerName?: string,
61
- value?: AxiosHeaderValue,
62
- rewrite?: boolean | AxiosHeaderMatcher
63
- ): AxiosHeaders;
64
- set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders;
65
-
66
- get(headerName: string, parser: RegExp): RegExpExecArray | null;
67
- get(headerName: string, matcher?: true | AxiosHeaderParser): AxiosHeaderValue;
68
-
69
- has(header: string, matcher?: AxiosHeaderMatcher): boolean;
70
-
71
- delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
72
-
73
- clear(matcher?: AxiosHeaderMatcher): boolean;
74
-
75
- normalize(format: boolean): AxiosHeaders;
76
-
77
- concat(
78
- ...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
79
- ): AxiosHeaders;
80
-
81
- toJSON(asStrings?: boolean): RawAxiosHeaders;
82
-
83
- static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
84
-
85
- static accessor(header: string | string[]): AxiosHeaders;
86
-
87
- static concat(
88
- ...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
89
- ): AxiosHeaders;
90
-
91
- setContentType(
92
- value: ContentType,
93
- rewrite?: boolean | AxiosHeaderMatcher
94
- ): AxiosHeaders;
95
- getContentType(parser?: RegExp): RegExpExecArray | null;
96
- getContentType(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
97
- hasContentType(matcher?: AxiosHeaderMatcher): boolean;
98
-
99
- setContentLength(
100
- value: AxiosHeaderValue,
101
- rewrite?: boolean | AxiosHeaderMatcher
102
- ): AxiosHeaders;
103
- getContentLength(parser?: RegExp): RegExpExecArray | null;
104
- getContentLength(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
105
- hasContentLength(matcher?: AxiosHeaderMatcher): boolean;
106
-
107
- setAccept(
108
- value: AxiosHeaderValue,
109
- rewrite?: boolean | AxiosHeaderMatcher
110
- ): AxiosHeaders;
111
- getAccept(parser?: RegExp): RegExpExecArray | null;
112
- getAccept(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
113
- hasAccept(matcher?: AxiosHeaderMatcher): boolean;
114
-
115
- setUserAgent(
116
- value: AxiosHeaderValue,
117
- rewrite?: boolean | AxiosHeaderMatcher
118
- ): AxiosHeaders;
119
- getUserAgent(parser?: RegExp): RegExpExecArray | null;
120
- getUserAgent(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
121
- hasUserAgent(matcher?: AxiosHeaderMatcher): boolean;
122
-
123
- setContentEncoding(
124
- value: AxiosHeaderValue,
125
- rewrite?: boolean | AxiosHeaderMatcher
126
- ): AxiosHeaders;
127
- getContentEncoding(parser?: RegExp): RegExpExecArray | null;
128
- getContentEncoding(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
129
- hasContentEncoding(matcher?: AxiosHeaderMatcher): boolean;
130
-
131
- setAuthorization(
132
- value: AxiosHeaderValue,
133
- rewrite?: boolean | AxiosHeaderMatcher
134
- ): AxiosHeaders;
135
- getAuthorization(parser?: RegExp): RegExpExecArray | null;
136
- getAuthorization(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
137
- hasAuthorization(matcher?: AxiosHeaderMatcher): boolean;
138
-
139
- [Symbol.iterator](): IterableIterator<[string, AxiosHeaderValue]>;
140
- }
141
-
142
- type CommonRequestHeadersList =
143
- | 'Accept'
144
- | 'Content-Length'
145
- | 'User-Agent'
146
- | 'Content-Encoding'
147
- | 'Authorization';
148
-
149
- type ContentType =
150
- | AxiosHeaderValue
151
- | 'text/html'
152
- | 'text/plain'
153
- | 'multipart/form-data'
154
- | 'application/json'
155
- | 'application/x-www-form-urlencoded'
156
- | 'application/octet-stream';
157
-
158
- type RawAxiosRequestHeaders = Partial<
159
- RawAxiosHeaders & {
160
- [Key in CommonRequestHeadersList]: AxiosHeaderValue;
161
- } & {
162
- 'Content-Type': ContentType;
163
- }
164
- >;
165
-
166
- type AxiosRequestHeaders = RawAxiosRequestHeaders & AxiosHeaders;
167
-
168
- type CommonResponseHeadersList =
169
- | 'Server'
170
- | 'Content-Type'
171
- | 'Content-Length'
172
- | 'Cache-Control'
173
- | 'Content-Encoding';
174
-
175
- type RawCommonResponseHeaders = {
176
- [Key in CommonResponseHeadersList]: AxiosHeaderValue;
177
- } & {
178
- 'set-cookie': string[];
179
- };
180
-
181
- type RawAxiosResponseHeaders = Partial<RawAxiosHeaders & RawCommonResponseHeaders>;
182
-
183
- type AxiosResponseHeaders = RawAxiosResponseHeaders & AxiosHeaders;
184
-
185
- interface AxiosRequestTransformer {
186
- (this: InternalAxiosRequestConfig, data: any, headers: AxiosRequestHeaders): any;
187
- }
188
-
189
- interface AxiosResponseTransformer {
190
- (
191
- this: InternalAxiosRequestConfig,
192
- data: any,
193
- headers: AxiosResponseHeaders,
194
- status?: number
195
- ): any;
196
- }
197
-
198
- interface AxiosAdapter {
199
- (config: InternalAxiosRequestConfig): AxiosPromise;
200
- }
201
-
202
- interface AxiosBasicCredentials {
203
- username: string;
204
- password: string;
205
- }
206
-
207
- interface AxiosProxyConfig {
208
- host: string;
209
- port: number;
210
- auth?: AxiosBasicCredentials;
211
- protocol?: string;
212
- }
213
-
214
- type Method =
215
- | 'get'
216
- | 'GET'
217
- | 'delete'
218
- | 'DELETE'
219
- | 'head'
220
- | 'HEAD'
221
- | 'options'
222
- | 'OPTIONS'
223
- | 'post'
224
- | 'POST'
225
- | 'put'
226
- | 'PUT'
227
- | 'patch'
228
- | 'PATCH'
229
- | 'purge'
230
- | 'PURGE'
231
- | 'link'
232
- | 'LINK'
233
- | 'unlink'
234
- | 'UNLINK';
235
-
236
- type ResponseType =
237
- | 'arraybuffer'
238
- | 'blob'
239
- | 'document'
240
- | 'json'
241
- | 'text'
242
- | 'stream';
243
-
244
- type responseEncoding =
245
- | 'ascii'
246
- | 'ASCII'
247
- | 'ansi'
248
- | 'ANSI'
249
- | 'binary'
250
- | 'BINARY'
251
- | 'base64'
252
- | 'BASE64'
253
- | 'base64url'
254
- | 'BASE64URL'
255
- | 'hex'
256
- | 'HEX'
257
- | 'latin1'
258
- | 'LATIN1'
259
- | 'ucs-2'
260
- | 'UCS-2'
261
- | 'ucs2'
262
- | 'UCS2'
263
- | 'utf-8'
264
- | 'UTF-8'
265
- | 'utf8'
266
- | 'UTF8'
267
- | 'utf16le'
268
- | 'UTF16LE';
269
-
270
- interface TransitionalOptions {
271
- silentJSONParsing?: boolean;
272
- forcedJSONParsing?: boolean;
273
- clarifyTimeoutError?: boolean;
274
- }
275
-
276
- interface GenericAbortSignal {
277
- readonly aborted: boolean;
278
- onabort?: ((...args: any) => any) | null;
279
- addEventListener?: (...args: any) => any;
280
- removeEventListener?: (...args: any) => any;
281
- }
282
-
283
- interface FormDataVisitorHelpers {
284
- defaultVisitor: SerializerVisitor;
285
- convertValue: (value: any) => any;
286
- isVisitable: (value: any) => boolean;
287
- }
288
-
289
- interface SerializerVisitor {
290
- (
291
- this: GenericFormData,
292
- value: any,
293
- key: string | number,
294
- path: null | Array<string | number>,
295
- helpers: FormDataVisitorHelpers
296
- ): boolean;
297
- }
298
-
299
- interface SerializerOptions {
300
- visitor?: SerializerVisitor;
301
- dots?: boolean;
302
- metaTokens?: boolean;
303
- indexes?: boolean | null;
304
- }
305
-
306
- // tslint:disable-next-line
307
- interface FormSerializerOptions extends SerializerOptions {}
308
-
309
- interface ParamEncoder {
310
- (value: any, defaultEncoder: (value: any) => any): any;
311
- }
312
-
313
- interface CustomParamsSerializer {
314
- (params: Record<string, any>, options?: ParamsSerializerOptions): string;
315
- }
316
-
317
- interface ParamsSerializerOptions extends SerializerOptions {
318
- encode?: ParamEncoder;
319
- serialize?: CustomParamsSerializer;
320
- }
321
-
322
- type MaxUploadRate = number;
323
-
324
- type MaxDownloadRate = number;
325
-
326
- type BrowserProgressEvent = any;
327
-
328
- interface AxiosProgressEvent {
329
- loaded: number;
330
- total?: number;
331
- progress?: number;
332
- bytes: number;
333
- rate?: number;
334
- estimated?: number;
335
- upload?: boolean;
336
- download?: boolean;
337
- event?: BrowserProgressEvent;
338
- }
339
-
340
- type Milliseconds = number;
341
-
342
- type AxiosAdapterName = 'xhr' | 'http' | string;
343
-
344
- type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName;
345
-
346
- type AddressFamily = 4 | 6 | undefined;
347
-
348
- interface LookupAddressEntry {
349
- address: string;
350
- family?: AddressFamily;
351
- }
352
-
353
- type LookupAddress = string | LookupAddressEntry;
354
-
355
- interface AxiosRequestConfig<D = any> {
356
- url?: string;
357
- method?: Method | string;
358
- baseURL?: string;
359
- transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
360
- transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
361
- headers?: ((RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders) & CustomHeader;
362
- params?: any;
363
- paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer;
364
- data?: D;
365
- timeout?: Milliseconds;
366
- timeoutErrorMessage?: string;
367
- withCredentials?: boolean;
368
- adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
369
- auth?: AxiosBasicCredentials;
370
- responseType?: ResponseType;
371
- responseEncoding?: responseEncoding | string;
372
- xsrfCookieName?: string;
373
- xsrfHeaderName?: string;
374
- onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
375
- onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void;
376
- maxContentLength?: number;
377
- validateStatus?: ((status: number) => boolean) | null;
378
- maxBodyLength?: number;
379
- maxRedirects?: number;
380
- maxRate?: number | [MaxUploadRate, MaxDownloadRate];
381
- beforeRedirect?: (
382
- options: Record<string, any>,
383
- responseDetails: { headers: Record<string, string> }
384
- ) => void;
385
- socketPath?: string | null;
386
- transport?: any;
387
- httpAgent?: any;
388
- httpsAgent?: any;
389
- proxy?: AxiosProxyConfig | false;
390
- cancelToken?: CancelToken;
391
- decompress?: boolean;
392
- transitional?: TransitionalOptions;
393
- signal?: GenericAbortSignal;
394
- insecureHTTPParser?: boolean;
395
- env?: {
396
- FormData?: new (...args: any[]) => object;
397
- };
398
- formSerializer?: FormSerializerOptions;
399
- family?: AddressFamily;
400
- lookup?:
401
- | ((
402
- hostname: string,
403
- options: object,
404
- cb: (
405
- err: Error | null,
406
- address: LookupAddress | LookupAddress[],
407
- family?: AddressFamily
408
- ) => void
409
- ) => void)
410
- | ((
411
- hostname: string,
412
- options: object
413
- ) => Promise<
414
- | [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily]
415
- | LookupAddress
416
- >);
417
- }
418
-
419
- interface InternalAxiosRequestConfig<D = any> extends AxiosRequestConfig<D> {
420
- headers: AxiosRequestHeaders;
421
- }
422
-
423
- interface HeadersDefaults {
424
- common: RawAxiosRequestHeaders;
425
- delete: RawAxiosRequestHeaders;
426
- get: RawAxiosRequestHeaders;
427
- head: RawAxiosRequestHeaders;
428
- post: RawAxiosRequestHeaders;
429
- put: RawAxiosRequestHeaders;
430
- patch: RawAxiosRequestHeaders;
431
- options?: RawAxiosRequestHeaders;
432
- purge?: RawAxiosRequestHeaders;
433
- link?: RawAxiosRequestHeaders;
434
- unlink?: RawAxiosRequestHeaders;
435
- }
436
-
437
- interface AxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> {
438
- headers: HeadersDefaults;
439
- }
440
-
441
- interface AxiosResponse<T = any, D = any> {
442
- data: T;
443
- status: number;
444
- statusText: string;
445
- headers: RawAxiosResponseHeaders | AxiosResponseHeaders;
446
- config: InternalAxiosRequestConfig<D>;
447
- request?: any;
448
- }
449
-
450
- type AxiosPromise<T = any> = Promise<AxiosResponse<T>>;
451
-
452
- interface Cancel {
453
- message: string | undefined;
454
- }
455
-
456
- interface CancelToken {
457
- promise: Promise<Cancel>;
458
- reason?: Cancel;
459
- throwIfRequested(): void;
460
- }
461
-
462
- interface AxiosInterceptorOptions {
463
- synchronous?: boolean;
464
- runWhen?: (config: InternalAxiosRequestConfig) => boolean;
465
- }
466
-
467
- interface AxiosInterceptorManager<V> {
468
- use(
469
- onFulfilled?: ((value: V) => V | Promise<V>) | null,
470
- onRejected?: ((error: any) => any) | null,
471
- options?: AxiosInterceptorOptions
472
- ): number;
473
- eject(id: number): void;
474
- clear(): void;
475
- }
476
-
477
- declare class Axios {
478
- constructor(config?: AxiosRequestConfig);
479
- defaults: AxiosDefaults;
480
- interceptors: {
481
- request: AxiosInterceptorManager<InternalAxiosRequestConfig>;
482
- response: AxiosInterceptorManager<AxiosResponse>;
483
- };
484
- getUri(config?: AxiosRequestConfig): string;
485
- request<T = any, R = AxiosResponse<T>, D = any>(
486
- config: AxiosRequestConfig<D>
487
- ): Promise<R>;
488
- get<T = any, R = AxiosResponse<T>, D = any>(
489
- url: string,
490
- config?: AxiosRequestConfig<D>
491
- ): Promise<R>;
492
- delete<T = any, R = AxiosResponse<T>, D = any>(
493
- url: string,
494
- config?: AxiosRequestConfig<D>
495
- ): Promise<R>;
496
- head<T = any, R = AxiosResponse<T>, D = any>(
497
- url: string,
498
- config?: AxiosRequestConfig<D>
499
- ): Promise<R>;
500
- options<T = any, R = AxiosResponse<T>, D = any>(
501
- url: string,
502
- config?: AxiosRequestConfig<D>
503
- ): Promise<R>;
504
- post<T = any, R = AxiosResponse<T>, D = any>(
505
- url: string,
506
- data?: D,
507
- config?: AxiosRequestConfig<D>
508
- ): Promise<R>;
509
- put<T = any, R = AxiosResponse<T>, D = any>(
510
- url: string,
511
- data?: D,
512
- config?: AxiosRequestConfig<D>
513
- ): Promise<R>;
514
- patch<T = any, R = AxiosResponse<T>, D = any>(
515
- url: string,
516
- data?: D,
517
- config?: AxiosRequestConfig<D>
518
- ): Promise<R>;
519
- postForm<T = any, R = AxiosResponse<T>, D = any>(
520
- url: string,
521
- data?: D,
522
- config?: AxiosRequestConfig<D>
523
- ): Promise<R>;
524
- putForm<T = any, R = AxiosResponse<T>, D = any>(
525
- url: string,
526
- data?: D,
527
- config?: AxiosRequestConfig<D>
528
- ): Promise<R>;
529
- patchForm<T = any, R = AxiosResponse<T>, D = any>(
530
- url: string,
531
- data?: D,
532
- config?: AxiosRequestConfig<D>
533
- ): Promise<R>;
534
- }
535
-
536
- interface AxiosInstance extends Axios {
537
- <T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
538
- <T = any, R = AxiosResponse<T>, D = any>(
539
- url: string,
540
- config?: AxiosRequestConfig<D>
541
- ): Promise<R>;
542
-
543
- defaults: Omit<AxiosDefaults, 'headers'> & {
544
- headers: HeadersDefaults & {
545
- [key: string]: AxiosHeaderValue;
546
- };
547
- };
548
- }
549
-
550
- interface GenericFormData {
551
- append(name: string, value: any, options?: any): any;
21
+ // TypeScript Version: 4.7
22
+ type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null;
23
+
24
+ type CustomHeader = {
25
+ public?: boolean;
26
+ baseUrl?: string;
27
+ service?: IServiceApi;
28
+ token?: string;
29
+ noToast?: boolean;
30
+ noErrors?: boolean;
31
+ };
32
+
33
+ interface RawAxiosHeaders {
34
+ [key: string]: AxiosHeaderValue;
35
+ }
36
+
37
+ type MethodsHeaders = Partial<
38
+ {
39
+ [Key in Method as Lowercase<Key>]: AxiosHeaders;
40
+ } & { common: AxiosHeaders }
41
+ >;
42
+
43
+ type AxiosHeaderMatcher =
44
+ | string
45
+ | RegExp
46
+ | ((this: AxiosHeaders, value: string, name: string) => boolean);
47
+
48
+ type AxiosHeaderParser = (
49
+ this: AxiosHeaders,
50
+ value: AxiosHeaderValue,
51
+ header: string
52
+ ) => any;
53
+
54
+ declare class AxiosHeaders {
55
+ constructor(headers?: RawAxiosHeaders | AxiosHeaders | string);
56
+
57
+ [key: string]: any;
58
+
59
+ set(
60
+ headerName?: string,
61
+ value?: AxiosHeaderValue,
62
+ rewrite?: boolean | AxiosHeaderMatcher
63
+ ): AxiosHeaders;
64
+ set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders;
65
+
66
+ get(headerName: string, parser: RegExp): RegExpExecArray | null;
67
+ get(headerName: string, matcher?: true | AxiosHeaderParser): AxiosHeaderValue;
68
+
69
+ has(header: string, matcher?: AxiosHeaderMatcher): boolean;
70
+
71
+ delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
72
+
73
+ clear(matcher?: AxiosHeaderMatcher): boolean;
74
+
75
+ normalize(format: boolean): AxiosHeaders;
76
+
77
+ concat(
78
+ ...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
79
+ ): AxiosHeaders;
80
+
81
+ toJSON(asStrings?: boolean): RawAxiosHeaders;
82
+
83
+ static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
84
+
85
+ static accessor(header: string | string[]): AxiosHeaders;
86
+
87
+ static concat(
88
+ ...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
89
+ ): AxiosHeaders;
90
+
91
+ setContentType(
92
+ value: ContentType,
93
+ rewrite?: boolean | AxiosHeaderMatcher
94
+ ): AxiosHeaders;
95
+ getContentType(parser?: RegExp): RegExpExecArray | null;
96
+ getContentType(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
97
+ hasContentType(matcher?: AxiosHeaderMatcher): boolean;
98
+
99
+ setContentLength(
100
+ value: AxiosHeaderValue,
101
+ rewrite?: boolean | AxiosHeaderMatcher
102
+ ): AxiosHeaders;
103
+ getContentLength(parser?: RegExp): RegExpExecArray | null;
104
+ getContentLength(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
105
+ hasContentLength(matcher?: AxiosHeaderMatcher): boolean;
106
+
107
+ setAccept(
108
+ value: AxiosHeaderValue,
109
+ rewrite?: boolean | AxiosHeaderMatcher
110
+ ): AxiosHeaders;
111
+ getAccept(parser?: RegExp): RegExpExecArray | null;
112
+ getAccept(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
113
+ hasAccept(matcher?: AxiosHeaderMatcher): boolean;
114
+
115
+ setUserAgent(
116
+ value: AxiosHeaderValue,
117
+ rewrite?: boolean | AxiosHeaderMatcher
118
+ ): AxiosHeaders;
119
+ getUserAgent(parser?: RegExp): RegExpExecArray | null;
120
+ getUserAgent(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
121
+ hasUserAgent(matcher?: AxiosHeaderMatcher): boolean;
122
+
123
+ setContentEncoding(
124
+ value: AxiosHeaderValue,
125
+ rewrite?: boolean | AxiosHeaderMatcher
126
+ ): AxiosHeaders;
127
+ getContentEncoding(parser?: RegExp): RegExpExecArray | null;
128
+ getContentEncoding(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
129
+ hasContentEncoding(matcher?: AxiosHeaderMatcher): boolean;
130
+
131
+ setAuthorization(
132
+ value: AxiosHeaderValue,
133
+ rewrite?: boolean | AxiosHeaderMatcher
134
+ ): AxiosHeaders;
135
+ getAuthorization(parser?: RegExp): RegExpExecArray | null;
136
+ getAuthorization(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
137
+ hasAuthorization(matcher?: AxiosHeaderMatcher): boolean;
138
+
139
+ [Symbol.iterator](): IterableIterator<[string, AxiosHeaderValue]>;
140
+ }
141
+
142
+ type CommonRequestHeadersList =
143
+ | 'Accept'
144
+ | 'Content-Length'
145
+ | 'User-Agent'
146
+ | 'Content-Encoding'
147
+ | 'Authorization';
148
+
149
+ type ContentType =
150
+ | AxiosHeaderValue
151
+ | 'text/html'
152
+ | 'text/plain'
153
+ | 'multipart/form-data'
154
+ | 'application/json'
155
+ | 'application/x-www-form-urlencoded'
156
+ | 'application/octet-stream';
157
+
158
+ type RawAxiosRequestHeaders = Partial<
159
+ RawAxiosHeaders & {
160
+ [Key in CommonRequestHeadersList]: AxiosHeaderValue;
161
+ } & {
162
+ 'Content-Type': ContentType;
163
+ }
164
+ >;
165
+
166
+ type AxiosRequestHeaders = RawAxiosRequestHeaders & AxiosHeaders;
167
+
168
+ type CommonResponseHeadersList =
169
+ | 'Server'
170
+ | 'Content-Type'
171
+ | 'Content-Length'
172
+ | 'Cache-Control'
173
+ | 'Content-Encoding';
174
+
175
+ type RawCommonResponseHeaders = {
176
+ [Key in CommonResponseHeadersList]: AxiosHeaderValue;
177
+ } & {
178
+ 'set-cookie': string[];
179
+ };
180
+
181
+ type RawAxiosResponseHeaders = Partial<RawAxiosHeaders & RawCommonResponseHeaders>;
182
+
183
+ type AxiosResponseHeaders = RawAxiosResponseHeaders & AxiosHeaders;
184
+
185
+ interface AxiosRequestTransformer {
186
+ (this: InternalAxiosRequestConfig, data: any, headers: AxiosRequestHeaders): any;
187
+ }
188
+
189
+ interface AxiosResponseTransformer {
190
+ (
191
+ this: InternalAxiosRequestConfig,
192
+ data: any,
193
+ headers: AxiosResponseHeaders,
194
+ status?: number
195
+ ): any;
196
+ }
197
+
198
+ interface AxiosAdapter {
199
+ (config: InternalAxiosRequestConfig): AxiosPromise;
200
+ }
201
+
202
+ interface AxiosBasicCredentials {
203
+ username: string;
204
+ password: string;
205
+ }
206
+
207
+ interface AxiosProxyConfig {
208
+ host: string;
209
+ port: number;
210
+ auth?: AxiosBasicCredentials;
211
+ protocol?: string;
212
+ }
213
+
214
+ type Method =
215
+ | 'get'
216
+ | 'GET'
217
+ | 'delete'
218
+ | 'DELETE'
219
+ | 'head'
220
+ | 'HEAD'
221
+ | 'options'
222
+ | 'OPTIONS'
223
+ | 'post'
224
+ | 'POST'
225
+ | 'put'
226
+ | 'PUT'
227
+ | 'patch'
228
+ | 'PATCH'
229
+ | 'purge'
230
+ | 'PURGE'
231
+ | 'link'
232
+ | 'LINK'
233
+ | 'unlink'
234
+ | 'UNLINK';
235
+
236
+ type ResponseType =
237
+ | 'arraybuffer'
238
+ | 'blob'
239
+ | 'document'
240
+ | 'json'
241
+ | 'text'
242
+ | 'stream';
243
+
244
+ type responseEncoding =
245
+ | 'ascii'
246
+ | 'ASCII'
247
+ | 'ansi'
248
+ | 'ANSI'
249
+ | 'binary'
250
+ | 'BINARY'
251
+ | 'base64'
252
+ | 'BASE64'
253
+ | 'base64url'
254
+ | 'BASE64URL'
255
+ | 'hex'
256
+ | 'HEX'
257
+ | 'latin1'
258
+ | 'LATIN1'
259
+ | 'ucs-2'
260
+ | 'UCS-2'
261
+ | 'ucs2'
262
+ | 'UCS2'
263
+ | 'utf-8'
264
+ | 'UTF-8'
265
+ | 'utf8'
266
+ | 'UTF8'
267
+ | 'utf16le'
268
+ | 'UTF16LE';
269
+
270
+ interface TransitionalOptions {
271
+ silentJSONParsing?: boolean;
272
+ forcedJSONParsing?: boolean;
273
+ clarifyTimeoutError?: boolean;
274
+ }
275
+
276
+ interface GenericAbortSignal {
277
+ readonly aborted: boolean;
278
+ onabort?: ((...args: any) => any) | null;
279
+ addEventListener?: (...args: any) => any;
280
+ removeEventListener?: (...args: any) => any;
281
+ }
282
+
283
+ interface FormDataVisitorHelpers {
284
+ defaultVisitor: SerializerVisitor;
285
+ convertValue: (value: any) => any;
286
+ isVisitable: (value: any) => boolean;
287
+ }
288
+
289
+ interface SerializerVisitor {
290
+ (
291
+ this: GenericFormData,
292
+ value: any,
293
+ key: string | number,
294
+ path: null | Array<string | number>,
295
+ helpers: FormDataVisitorHelpers
296
+ ): boolean;
297
+ }
298
+
299
+ interface SerializerOptions {
300
+ visitor?: SerializerVisitor;
301
+ dots?: boolean;
302
+ metaTokens?: boolean;
303
+ indexes?: boolean | null;
304
+ }
305
+
306
+ // tslint:disable-next-line
307
+ interface FormSerializerOptions extends SerializerOptions {}
308
+
309
+ interface ParamEncoder {
310
+ (value: any, defaultEncoder: (value: any) => any): any;
311
+ }
312
+
313
+ interface CustomParamsSerializer {
314
+ (params: Record<string, any>, options?: ParamsSerializerOptions): string;
315
+ }
316
+
317
+ interface ParamsSerializerOptions extends SerializerOptions {
318
+ encode?: ParamEncoder;
319
+ serialize?: CustomParamsSerializer;
320
+ }
321
+
322
+ type MaxUploadRate = number;
323
+
324
+ type MaxDownloadRate = number;
325
+
326
+ type BrowserProgressEvent = any;
327
+
328
+ interface AxiosProgressEvent {
329
+ loaded: number;
330
+ total?: number;
331
+ progress?: number;
332
+ bytes: number;
333
+ rate?: number;
334
+ estimated?: number;
335
+ upload?: boolean;
336
+ download?: boolean;
337
+ event?: BrowserProgressEvent;
338
+ }
339
+
340
+ type Milliseconds = number;
341
+
342
+ type AxiosAdapterName = 'xhr' | 'http' | string;
343
+
344
+ type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName;
345
+
346
+ type AddressFamily = 4 | 6 | undefined;
347
+
348
+ interface LookupAddressEntry {
349
+ address: string;
350
+ family?: AddressFamily;
351
+ }
352
+
353
+ type LookupAddress = string | LookupAddressEntry;
354
+
355
+ interface AxiosRequestConfig<D = any> {
356
+ url?: string;
357
+ method?: Method | string;
358
+ baseURL?: string;
359
+ transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
360
+ transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
361
+ headers?: ((RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders) & CustomHeader;
362
+ params?: any;
363
+ paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer;
364
+ data?: D;
365
+ timeout?: Milliseconds;
366
+ timeoutErrorMessage?: string;
367
+ withCredentials?: boolean;
368
+ adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
369
+ auth?: AxiosBasicCredentials;
370
+ responseType?: ResponseType;
371
+ responseEncoding?: responseEncoding | string;
372
+ xsrfCookieName?: string;
373
+ xsrfHeaderName?: string;
374
+ onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
375
+ onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void;
376
+ maxContentLength?: number;
377
+ validateStatus?: ((status: number) => boolean) | null;
378
+ maxBodyLength?: number;
379
+ maxRedirects?: number;
380
+ maxRate?: number | [MaxUploadRate, MaxDownloadRate];
381
+ beforeRedirect?: (
382
+ options: Record<string, any>,
383
+ responseDetails: { headers: Record<string, string> }
384
+ ) => void;
385
+ socketPath?: string | null;
386
+ transport?: any;
387
+ httpAgent?: any;
388
+ httpsAgent?: any;
389
+ proxy?: AxiosProxyConfig | false;
390
+ cancelToken?: CancelToken;
391
+ decompress?: boolean;
392
+ transitional?: TransitionalOptions;
393
+ signal?: GenericAbortSignal;
394
+ insecureHTTPParser?: boolean;
395
+ env?: {
396
+ FormData?: new (...args: any[]) => object;
397
+ };
398
+ formSerializer?: FormSerializerOptions;
399
+ family?: AddressFamily;
400
+ lookup?:
401
+ | ((
402
+ hostname: string,
403
+ options: object,
404
+ cb: (
405
+ err: Error | null,
406
+ address: LookupAddress | LookupAddress[],
407
+ family?: AddressFamily
408
+ ) => void
409
+ ) => void)
410
+ | ((
411
+ hostname: string,
412
+ options: object
413
+ ) => Promise<
414
+ | [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily]
415
+ | LookupAddress
416
+ >);
417
+ }
418
+
419
+ interface InternalAxiosRequestConfig<D = any> extends AxiosRequestConfig<D> {
420
+ headers: AxiosRequestHeaders;
421
+ }
422
+
423
+ interface HeadersDefaults {
424
+ common: RawAxiosRequestHeaders;
425
+ delete: RawAxiosRequestHeaders;
426
+ get: RawAxiosRequestHeaders;
427
+ head: RawAxiosRequestHeaders;
428
+ post: RawAxiosRequestHeaders;
429
+ put: RawAxiosRequestHeaders;
430
+ patch: RawAxiosRequestHeaders;
431
+ options?: RawAxiosRequestHeaders;
432
+ purge?: RawAxiosRequestHeaders;
433
+ link?: RawAxiosRequestHeaders;
434
+ unlink?: RawAxiosRequestHeaders;
435
+ }
436
+
437
+ interface AxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> {
438
+ headers: HeadersDefaults;
439
+ }
440
+
441
+ interface AxiosResponse<T = any, D = any> {
442
+ data: T;
443
+ status: number;
444
+ statusText: string;
445
+ headers: RawAxiosResponseHeaders | AxiosResponseHeaders;
446
+ config: InternalAxiosRequestConfig<D>;
447
+ request?: any;
448
+ }
449
+
450
+ type AxiosPromise<T = any> = Promise<AxiosResponse<T>>;
451
+
452
+ interface Cancel {
453
+ message: string | undefined;
454
+ }
455
+
456
+ interface CancelToken {
457
+ promise: Promise<Cancel>;
458
+ reason?: Cancel;
459
+ throwIfRequested(): void;
460
+ }
461
+
462
+ interface AxiosInterceptorOptions {
463
+ synchronous?: boolean;
464
+ runWhen?: (config: InternalAxiosRequestConfig) => boolean;
465
+ }
466
+
467
+ interface AxiosInterceptorManager<V> {
468
+ use(
469
+ onFulfilled?: ((value: V) => V | Promise<V>) | null,
470
+ onRejected?: ((error: any) => any) | null,
471
+ options?: AxiosInterceptorOptions
472
+ ): number;
473
+ eject(id: number): void;
474
+ clear(): void;
475
+ }
476
+
477
+ declare class Axios {
478
+ constructor(config?: AxiosRequestConfig);
479
+ defaults: AxiosDefaults;
480
+ interceptors: {
481
+ request: AxiosInterceptorManager<InternalAxiosRequestConfig>;
482
+ response: AxiosInterceptorManager<AxiosResponse>;
483
+ };
484
+ getUri(config?: AxiosRequestConfig): string;
485
+ request<T = any, R = AxiosResponse<T>, D = any>(
486
+ config: AxiosRequestConfig<D>
487
+ ): Promise<R>;
488
+ get<T = any, R = AxiosResponse<T>, D = any>(
489
+ url: string,
490
+ config?: AxiosRequestConfig<D>
491
+ ): Promise<R>;
492
+ delete<T = any, R = AxiosResponse<T>, D = any>(
493
+ url: string,
494
+ config?: AxiosRequestConfig<D>
495
+ ): Promise<R>;
496
+ head<T = any, R = AxiosResponse<T>, D = any>(
497
+ url: string,
498
+ config?: AxiosRequestConfig<D>
499
+ ): Promise<R>;
500
+ options<T = any, R = AxiosResponse<T>, D = any>(
501
+ url: string,
502
+ config?: AxiosRequestConfig<D>
503
+ ): Promise<R>;
504
+ post<T = any, R = AxiosResponse<T>, D = any>(
505
+ url: string,
506
+ data?: D,
507
+ config?: AxiosRequestConfig<D>
508
+ ): Promise<R>;
509
+ put<T = any, R = AxiosResponse<T>, D = any>(
510
+ url: string,
511
+ data?: D,
512
+ config?: AxiosRequestConfig<D>
513
+ ): Promise<R>;
514
+ patch<T = any, R = AxiosResponse<T>, D = any>(
515
+ url: string,
516
+ data?: D,
517
+ config?: AxiosRequestConfig<D>
518
+ ): Promise<R>;
519
+ postForm<T = any, R = AxiosResponse<T>, D = any>(
520
+ url: string,
521
+ data?: D,
522
+ config?: AxiosRequestConfig<D>
523
+ ): Promise<R>;
524
+ putForm<T = any, R = AxiosResponse<T>, D = any>(
525
+ url: string,
526
+ data?: D,
527
+ config?: AxiosRequestConfig<D>
528
+ ): Promise<R>;
529
+ patchForm<T = any, R = AxiosResponse<T>, D = any>(
530
+ url: string,
531
+ data?: D,
532
+ config?: AxiosRequestConfig<D>
533
+ ): Promise<R>;
534
+ }
535
+
536
+ interface AxiosInstance extends Axios {
537
+ <T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
538
+ <T = any, R = AxiosResponse<T>, D = any>(
539
+ url: string,
540
+ config?: AxiosRequestConfig<D>
541
+ ): Promise<R>;
542
+
543
+ defaults: Omit<AxiosDefaults, 'headers'> & {
544
+ headers: HeadersDefaults & {
545
+ [key: string]: AxiosHeaderValue;
546
+ };
547
+ };
548
+ }
549
+
550
+ interface GenericFormData {
551
+ append(name: string, value: any, options?: any): any;
552
552
  }
553
553
 
554
- declare global {
555
- var environment: IEnv;
556
- var moduleId: IModuleId | null;
557
- var moduleUrls: {
558
- [id in IModuleId]?: string;
559
- };
560
- var axiosInstance: AxiosInstance;
561
- var useNavigate: () => NavigateFunction;
562
- var useLocation: () => Location;
563
- var Link: React.ForwardRefExoticComponent<
564
- LinkProps & React.RefAttributes<HTMLAnchorElement>
565
- >;
566
- var appVersion: string | undefined;
567
- var api: {
568
- apiUrl: string;
569
- clientId: string;
570
- authApiUrl?: string;
571
- authScope?: string;
572
- additionalScopes?: string[];
573
- redirectUrl?: string;
574
- };
554
+ declare global {
555
+ var environment: IEnv;
556
+ var moduleId: IModuleId | null;
557
+ var moduleUrls: {
558
+ [id in IModuleId]?: string;
559
+ };
560
+ var axiosInstance: AxiosInstance;
561
+ var useNavigate: () => NavigateFunction;
562
+ var useLocation: () => Location;
563
+ var Link: React.ForwardRefExoticComponent<
564
+ LinkProps & React.RefAttributes<HTMLAnchorElement>
565
+ >;
566
+ var appVersion: string | undefined;
567
+ var api: {
568
+ apiUrl: string;
569
+ clientId: string;
570
+ authApiUrl?: string;
571
+ authScope?: string;
572
+ additionalScopes?: string[];
573
+ redirectUrl?: string;
574
+ };
575
575
  }