@inceptionbg/main 2.0.133 → 2.0.135

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