@inceptionbg/main 2.0.187 → 3.0.2

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