@inceptionbg/main 2.0.110 → 2.0.112

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