@inceptionbg/main 2.0.126 → 2.0.128

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