@inceptionbg/main 2.0.187 → 2.0.189

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