@inceptionbg/main 2.0.185 → 2.0.187

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