@inceptionbg/main 2.0.116 → 2.0.117

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