@rsdoctor/core 1.5.7 → 1.5.8

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,811 +0,0 @@
1
- // TypeScript Version: 4.7
2
- type StringLiteralsOrString<Literals extends string> = Literals | (string & {});
3
-
4
- type AxiosHeaderValue =
5
- | AxiosHeaders
6
- | string
7
- | string[]
8
- | number
9
- | boolean
10
- | null;
11
-
12
- interface RawAxiosHeaders {
13
- [key: string]: AxiosHeaderValue;
14
- }
15
-
16
- type MethodsHeaders = Partial<
17
- {
18
- [Key in Method as Lowercase<Key>]: AxiosHeaders;
19
- } & { common: AxiosHeaders }
20
- >;
21
-
22
- type AxiosHeaderMatcher =
23
- | string
24
- | RegExp
25
- | ((this: AxiosHeaders, value: string, name: string) => boolean);
26
-
27
- type AxiosHeaderParser = (
28
- this: AxiosHeaders,
29
- value: AxiosHeaderValue,
30
- header: string,
31
- ) => any;
32
-
33
- declare class AxiosHeaders {
34
- constructor(headers?: RawAxiosHeaders | AxiosHeaders | string);
35
-
36
- [key: string]: any;
37
-
38
- set(
39
- headerName?: string,
40
- value?: AxiosHeaderValue,
41
- rewrite?: boolean | AxiosHeaderMatcher,
42
- ): AxiosHeaders;
43
- set(
44
- headers?: RawAxiosHeaders | AxiosHeaders | string,
45
- rewrite?: boolean,
46
- ): AxiosHeaders;
47
-
48
- get(headerName: string, parser: RegExp): RegExpExecArray | null;
49
- get(headerName: string, matcher?: true | AxiosHeaderParser): AxiosHeaderValue;
50
-
51
- has(header: string, matcher?: AxiosHeaderMatcher): boolean;
52
-
53
- delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
54
-
55
- clear(matcher?: AxiosHeaderMatcher): boolean;
56
-
57
- normalize(format: boolean): AxiosHeaders;
58
-
59
- concat(
60
- ...targets: Array<
61
- AxiosHeaders | RawAxiosHeaders | string | undefined | null
62
- >
63
- ): AxiosHeaders;
64
-
65
- toJSON(asStrings?: boolean): RawAxiosHeaders;
66
-
67
- static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
68
-
69
- static accessor(header: string | string[]): AxiosHeaders;
70
-
71
- static concat(
72
- ...targets: Array<
73
- AxiosHeaders | RawAxiosHeaders | string | undefined | null
74
- >
75
- ): AxiosHeaders;
76
-
77
- setContentType(
78
- value: ContentType,
79
- rewrite?: boolean | AxiosHeaderMatcher,
80
- ): AxiosHeaders;
81
- getContentType(parser?: RegExp): RegExpExecArray | null;
82
- getContentType(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
83
- hasContentType(matcher?: AxiosHeaderMatcher): boolean;
84
-
85
- setContentLength(
86
- value: AxiosHeaderValue,
87
- rewrite?: boolean | AxiosHeaderMatcher,
88
- ): AxiosHeaders;
89
- getContentLength(parser?: RegExp): RegExpExecArray | null;
90
- getContentLength(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
91
- hasContentLength(matcher?: AxiosHeaderMatcher): boolean;
92
-
93
- setAccept(
94
- value: AxiosHeaderValue,
95
- rewrite?: boolean | AxiosHeaderMatcher,
96
- ): AxiosHeaders;
97
- getAccept(parser?: RegExp): RegExpExecArray | null;
98
- getAccept(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
99
- hasAccept(matcher?: AxiosHeaderMatcher): boolean;
100
-
101
- setUserAgent(
102
- value: AxiosHeaderValue,
103
- rewrite?: boolean | AxiosHeaderMatcher,
104
- ): AxiosHeaders;
105
- getUserAgent(parser?: RegExp): RegExpExecArray | null;
106
- getUserAgent(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
107
- hasUserAgent(matcher?: AxiosHeaderMatcher): boolean;
108
-
109
- setContentEncoding(
110
- value: AxiosHeaderValue,
111
- rewrite?: boolean | AxiosHeaderMatcher,
112
- ): AxiosHeaders;
113
- getContentEncoding(parser?: RegExp): RegExpExecArray | null;
114
- getContentEncoding(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
115
- hasContentEncoding(matcher?: AxiosHeaderMatcher): boolean;
116
-
117
- setAuthorization(
118
- value: AxiosHeaderValue,
119
- rewrite?: boolean | AxiosHeaderMatcher,
120
- ): AxiosHeaders;
121
- getAuthorization(parser?: RegExp): RegExpExecArray | null;
122
- getAuthorization(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
123
- hasAuthorization(matcher?: AxiosHeaderMatcher): boolean;
124
-
125
- getSetCookie(): string[];
126
-
127
- [Symbol.iterator](): IterableIterator<[string, AxiosHeaderValue]>;
128
- }
129
-
130
- type CommonRequestHeadersList =
131
- | "Accept"
132
- | "Content-Length"
133
- | "User-Agent"
134
- | "Content-Encoding"
135
- | "Authorization";
136
-
137
- type ContentType =
138
- | AxiosHeaderValue
139
- | "text/html"
140
- | "text/plain"
141
- | "multipart/form-data"
142
- | "application/json"
143
- | "application/x-www-form-urlencoded"
144
- | "application/octet-stream";
145
-
146
- type RawAxiosRequestHeaders = Partial<
147
- RawAxiosHeaders & {
148
- [Key in CommonRequestHeadersList]: AxiosHeaderValue;
149
- } & {
150
- "Content-Type": ContentType;
151
- }
152
- >;
153
-
154
- type AxiosRequestHeaders = RawAxiosRequestHeaders & AxiosHeaders;
155
-
156
- type CommonResponseHeadersList =
157
- | "Server"
158
- | "Content-Type"
159
- | "Content-Length"
160
- | "Cache-Control"
161
- | "Content-Encoding";
162
-
163
- type RawCommonResponseHeaders = {
164
- [Key in CommonResponseHeadersList]: AxiosHeaderValue;
165
- } & {
166
- "set-cookie": string[];
167
- };
168
-
169
- type RawAxiosResponseHeaders = Partial<
170
- RawAxiosHeaders & RawCommonResponseHeaders
171
- >;
172
-
173
- type AxiosResponseHeaders = RawAxiosResponseHeaders & AxiosHeaders;
174
-
175
- interface AxiosRequestTransformer {
176
- (
177
- this: InternalAxiosRequestConfig,
178
- data: any,
179
- headers: AxiosRequestHeaders,
180
- ): any;
181
- }
182
-
183
- interface AxiosResponseTransformer {
184
- (
185
- this: InternalAxiosRequestConfig,
186
- data: any,
187
- headers: AxiosResponseHeaders,
188
- status?: number,
189
- ): any;
190
- }
191
-
192
- interface AxiosAdapter {
193
- (config: InternalAxiosRequestConfig): AxiosPromise;
194
- }
195
-
196
- interface AxiosBasicCredentials {
197
- username: string;
198
- password: string;
199
- }
200
-
201
- interface AxiosProxyConfig {
202
- host: string;
203
- port: number;
204
- auth?: AxiosBasicCredentials;
205
- protocol?: string;
206
- }
207
-
208
- declare enum HttpStatusCode {
209
- Continue = 100,
210
- SwitchingProtocols = 101,
211
- Processing = 102,
212
- EarlyHints = 103,
213
- Ok = 200,
214
- Created = 201,
215
- Accepted = 202,
216
- NonAuthoritativeInformation = 203,
217
- NoContent = 204,
218
- ResetContent = 205,
219
- PartialContent = 206,
220
- MultiStatus = 207,
221
- AlreadyReported = 208,
222
- ImUsed = 226,
223
- MultipleChoices = 300,
224
- MovedPermanently = 301,
225
- Found = 302,
226
- SeeOther = 303,
227
- NotModified = 304,
228
- UseProxy = 305,
229
- Unused = 306,
230
- TemporaryRedirect = 307,
231
- PermanentRedirect = 308,
232
- BadRequest = 400,
233
- Unauthorized = 401,
234
- PaymentRequired = 402,
235
- Forbidden = 403,
236
- NotFound = 404,
237
- MethodNotAllowed = 405,
238
- NotAcceptable = 406,
239
- ProxyAuthenticationRequired = 407,
240
- RequestTimeout = 408,
241
- Conflict = 409,
242
- Gone = 410,
243
- LengthRequired = 411,
244
- PreconditionFailed = 412,
245
- PayloadTooLarge = 413,
246
- UriTooLong = 414,
247
- UnsupportedMediaType = 415,
248
- RangeNotSatisfiable = 416,
249
- ExpectationFailed = 417,
250
- ImATeapot = 418,
251
- MisdirectedRequest = 421,
252
- UnprocessableEntity = 422,
253
- Locked = 423,
254
- FailedDependency = 424,
255
- TooEarly = 425,
256
- UpgradeRequired = 426,
257
- PreconditionRequired = 428,
258
- TooManyRequests = 429,
259
- RequestHeaderFieldsTooLarge = 431,
260
- UnavailableForLegalReasons = 451,
261
- InternalServerError = 500,
262
- NotImplemented = 501,
263
- BadGateway = 502,
264
- ServiceUnavailable = 503,
265
- GatewayTimeout = 504,
266
- HttpVersionNotSupported = 505,
267
- VariantAlsoNegotiates = 506,
268
- InsufficientStorage = 507,
269
- LoopDetected = 508,
270
- NotExtended = 510,
271
- NetworkAuthenticationRequired = 511,
272
- }
273
-
274
- type Method =
275
- | "get"
276
- | "GET"
277
- | "delete"
278
- | "DELETE"
279
- | "head"
280
- | "HEAD"
281
- | "options"
282
- | "OPTIONS"
283
- | "post"
284
- | "POST"
285
- | "put"
286
- | "PUT"
287
- | "patch"
288
- | "PATCH"
289
- | "purge"
290
- | "PURGE"
291
- | "link"
292
- | "LINK"
293
- | "unlink"
294
- | "UNLINK";
295
-
296
- type ResponseType =
297
- | "arraybuffer"
298
- | "blob"
299
- | "document"
300
- | "json"
301
- | "text"
302
- | "stream"
303
- | "formdata";
304
-
305
- type responseEncoding =
306
- | "ascii"
307
- | "ASCII"
308
- | "ansi"
309
- | "ANSI"
310
- | "binary"
311
- | "BINARY"
312
- | "base64"
313
- | "BASE64"
314
- | "base64url"
315
- | "BASE64URL"
316
- | "hex"
317
- | "HEX"
318
- | "latin1"
319
- | "LATIN1"
320
- | "ucs-2"
321
- | "UCS-2"
322
- | "ucs2"
323
- | "UCS2"
324
- | "utf-8"
325
- | "UTF-8"
326
- | "utf8"
327
- | "UTF8"
328
- | "utf16le"
329
- | "UTF16LE";
330
-
331
- interface TransitionalOptions {
332
- silentJSONParsing?: boolean;
333
- forcedJSONParsing?: boolean;
334
- clarifyTimeoutError?: boolean;
335
- legacyInterceptorReqResOrdering?: boolean;
336
- }
337
-
338
- interface GenericAbortSignal {
339
- readonly aborted: boolean;
340
- onabort?: ((...args: any) => any) | null;
341
- addEventListener?: (...args: any) => any;
342
- removeEventListener?: (...args: any) => any;
343
- }
344
-
345
- interface FormDataVisitorHelpers {
346
- defaultVisitor: SerializerVisitor;
347
- convertValue: (value: any) => any;
348
- isVisitable: (value: any) => boolean;
349
- }
350
-
351
- interface SerializerVisitor {
352
- (
353
- this: GenericFormData,
354
- value: any,
355
- key: string | number,
356
- path: null | Array<string | number>,
357
- helpers: FormDataVisitorHelpers,
358
- ): boolean;
359
- }
360
-
361
- interface SerializerOptions {
362
- visitor?: SerializerVisitor;
363
- dots?: boolean;
364
- metaTokens?: boolean;
365
- indexes?: boolean | null;
366
- }
367
-
368
- // tslint:disable-next-line
369
- interface FormSerializerOptions extends SerializerOptions {}
370
-
371
- interface ParamEncoder {
372
- (value: any, defaultEncoder: (value: any) => any): any;
373
- }
374
-
375
- interface CustomParamsSerializer {
376
- (params: Record<string, any>, options?: ParamsSerializerOptions): string;
377
- }
378
-
379
- interface ParamsSerializerOptions extends SerializerOptions {
380
- encode?: ParamEncoder;
381
- serialize?: CustomParamsSerializer;
382
- }
383
-
384
- type MaxUploadRate = number;
385
-
386
- type MaxDownloadRate = number;
387
-
388
- type BrowserProgressEvent = any;
389
-
390
- interface AxiosProgressEvent {
391
- loaded: number;
392
- total?: number;
393
- progress?: number;
394
- bytes: number;
395
- rate?: number;
396
- estimated?: number;
397
- upload?: boolean;
398
- download?: boolean;
399
- event?: BrowserProgressEvent;
400
- lengthComputable: boolean;
401
- }
402
-
403
- type Milliseconds = number;
404
-
405
- type AxiosAdapterName = StringLiteralsOrString<"xhr" | "http" | "fetch">;
406
-
407
- type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName;
408
-
409
- type AddressFamily = 4 | 6 | undefined;
410
-
411
- interface LookupAddressEntry {
412
- address: string;
413
- family?: AddressFamily;
414
- }
415
-
416
- type LookupAddress = string | LookupAddressEntry;
417
-
418
- interface AxiosRequestConfig<D = any> {
419
- url?: string;
420
- method?: StringLiteralsOrString<Method>;
421
- baseURL?: string;
422
- allowAbsoluteUrls?: boolean;
423
- transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
424
- transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
425
- headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders;
426
- params?: any;
427
- paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer;
428
- data?: D;
429
- timeout?: Milliseconds;
430
- timeoutErrorMessage?: string;
431
- withCredentials?: boolean;
432
- adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
433
- auth?: AxiosBasicCredentials;
434
- responseType?: ResponseType;
435
- responseEncoding?: StringLiteralsOrString<responseEncoding>;
436
- xsrfCookieName?: string;
437
- xsrfHeaderName?: string;
438
- onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
439
- onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void;
440
- maxContentLength?: number;
441
- validateStatus?: ((status: number) => boolean) | null;
442
- maxBodyLength?: number;
443
- maxRedirects?: number;
444
- maxRate?: number | [MaxUploadRate, MaxDownloadRate];
445
- beforeRedirect?: (
446
- options: Record<string, any>,
447
- responseDetails: {
448
- headers: Record<string, string>;
449
- statusCode: HttpStatusCode;
450
- },
451
- ) => void;
452
- socketPath?: string | null;
453
- transport?: any;
454
- httpAgent?: any;
455
- httpsAgent?: any;
456
- proxy?: AxiosProxyConfig | false;
457
- cancelToken?: CancelToken | undefined;
458
- decompress?: boolean;
459
- transitional?: TransitionalOptions;
460
- signal?: GenericAbortSignal;
461
- insecureHTTPParser?: boolean;
462
- env?: {
463
- FormData?: new (...args: any[]) => object;
464
- fetch?: (
465
- input: URL | Request | string,
466
- init?: RequestInit,
467
- ) => Promise<Response>;
468
- Request?: new (
469
- input: URL | Request | string,
470
- init?: RequestInit,
471
- ) => Request;
472
- Response?: new (
473
- body?:
474
- | ArrayBuffer
475
- | ArrayBufferView
476
- | Blob
477
- | FormData
478
- | URLSearchParams
479
- | string
480
- | null,
481
- init?: ResponseInit,
482
- ) => Response;
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
- | [
501
- address: LookupAddressEntry | LookupAddressEntry[],
502
- family?: AddressFamily,
503
- ]
504
- | LookupAddress
505
- >);
506
- withXSRFToken?:
507
- | boolean
508
- | ((config: InternalAxiosRequestConfig) => boolean | undefined);
509
- parseReviver?: (this: any, key: string, value: any) => any;
510
- fetchOptions?:
511
- | Omit<RequestInit, "body" | "headers" | "method" | "signal">
512
- | Record<string, any>;
513
- httpVersion?: 1 | 2;
514
- http2Options?: Record<string, any> & {
515
- sessionTimeout?: number;
516
- };
517
- }
518
-
519
- // Alias
520
- type RawAxiosRequestConfig<D = any> = AxiosRequestConfig<D>;
521
-
522
- interface InternalAxiosRequestConfig<
523
- D = any,
524
- > extends AxiosRequestConfig<D> {
525
- headers: AxiosRequestHeaders;
526
- }
527
-
528
- interface HeadersDefaults {
529
- common: RawAxiosRequestHeaders;
530
- delete: RawAxiosRequestHeaders;
531
- get: RawAxiosRequestHeaders;
532
- head: RawAxiosRequestHeaders;
533
- post: RawAxiosRequestHeaders;
534
- put: RawAxiosRequestHeaders;
535
- patch: RawAxiosRequestHeaders;
536
- options?: RawAxiosRequestHeaders;
537
- purge?: RawAxiosRequestHeaders;
538
- link?: RawAxiosRequestHeaders;
539
- unlink?: RawAxiosRequestHeaders;
540
- }
541
-
542
- interface AxiosDefaults<D = any> extends Omit<
543
- AxiosRequestConfig<D>,
544
- "headers"
545
- > {
546
- headers: HeadersDefaults;
547
- }
548
-
549
- interface CreateAxiosDefaults<D = any> extends Omit<
550
- AxiosRequestConfig<D>,
551
- "headers"
552
- > {
553
- headers?: RawAxiosRequestHeaders | AxiosHeaders | Partial<HeadersDefaults>;
554
- }
555
-
556
- interface AxiosResponse<T = any, D = any, H = {}> {
557
- data: T;
558
- status: number;
559
- statusText: string;
560
- headers: (H & RawAxiosResponseHeaders) | AxiosResponseHeaders;
561
- config: InternalAxiosRequestConfig<D>;
562
- request?: any;
563
- }
564
-
565
- declare class AxiosError<T = unknown, D = any> extends Error {
566
- constructor(
567
- message?: string,
568
- code?: string,
569
- config?: InternalAxiosRequestConfig<D>,
570
- request?: any,
571
- response?: AxiosResponse<T, D>,
572
- );
573
-
574
- config?: InternalAxiosRequestConfig<D>;
575
- code?: string;
576
- request?: any;
577
- response?: AxiosResponse<T, D>;
578
- isAxiosError: boolean;
579
- status?: number;
580
- toJSON: () => object;
581
- cause?: Error;
582
- event?: BrowserProgressEvent;
583
- static from<T = unknown, D = any>(
584
- error: Error | unknown,
585
- code?: string,
586
- config?: InternalAxiosRequestConfig<D>,
587
- request?: any,
588
- response?: AxiosResponse<T, D>,
589
- customProps?: object,
590
- ): AxiosError<T, D>;
591
- static readonly ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
592
- static readonly ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
593
- static readonly ERR_BAD_OPTION = "ERR_BAD_OPTION";
594
- static readonly ERR_NETWORK = "ERR_NETWORK";
595
- static readonly ERR_DEPRECATED = "ERR_DEPRECATED";
596
- static readonly ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
597
- static readonly ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
598
- static readonly ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
599
- static readonly ERR_INVALID_URL = "ERR_INVALID_URL";
600
- static readonly ERR_CANCELED = "ERR_CANCELED";
601
- static readonly ECONNABORTED = "ECONNABORTED";
602
- static readonly ETIMEDOUT = "ETIMEDOUT";
603
- }
604
-
605
- declare class CanceledError<T> extends AxiosError<T> {
606
- readonly name: "CanceledError";
607
- }
608
-
609
- type AxiosPromise<T = any> = Promise<AxiosResponse<T>>;
610
-
611
- interface CancelStatic {
612
- new (message?: string): Cancel;
613
- }
614
-
615
- interface Cancel {
616
- message: string | undefined;
617
- }
618
-
619
- interface Canceler {
620
- (message?: string, config?: AxiosRequestConfig, request?: any): void;
621
- }
622
-
623
- interface CancelTokenStatic {
624
- new (executor: (cancel: Canceler) => void): CancelToken;
625
- source(): CancelTokenSource;
626
- }
627
-
628
- interface CancelToken {
629
- promise: Promise<Cancel>;
630
- reason?: Cancel;
631
- throwIfRequested(): void;
632
- }
633
-
634
- interface CancelTokenSource {
635
- token: CancelToken;
636
- cancel: Canceler;
637
- }
638
-
639
- interface AxiosInterceptorOptions {
640
- synchronous?: boolean;
641
- runWhen?: (config: InternalAxiosRequestConfig) => boolean;
642
- }
643
-
644
- type AxiosInterceptorFulfilled<T> = (value: T) => T | Promise<T>;
645
- type AxiosInterceptorRejected = (error: any) => any;
646
-
647
- type AxiosRequestInterceptorUse<T> = (
648
- onFulfilled?: AxiosInterceptorFulfilled<T> | null,
649
- onRejected?: AxiosInterceptorRejected | null,
650
- options?: AxiosInterceptorOptions,
651
- ) => number;
652
-
653
- type AxiosResponseInterceptorUse<T> = (
654
- onFulfilled?: AxiosInterceptorFulfilled<T> | null,
655
- onRejected?: AxiosInterceptorRejected | null,
656
- ) => number;
657
-
658
- interface AxiosInterceptorHandler<T> {
659
- fulfilled: AxiosInterceptorFulfilled<T>;
660
- rejected?: AxiosInterceptorRejected;
661
- synchronous: boolean;
662
- runWhen: (config: AxiosRequestConfig) => boolean | null;
663
- }
664
-
665
- interface AxiosInterceptorManager<V> {
666
- use: V extends AxiosResponse
667
- ? AxiosResponseInterceptorUse<V>
668
- : AxiosRequestInterceptorUse<V>;
669
- eject(id: number): void;
670
- clear(): void;
671
- handlers?: Array<AxiosInterceptorHandler<V>>;
672
- }
673
-
674
- declare class Axios {
675
- constructor(config?: AxiosRequestConfig);
676
- defaults: AxiosDefaults;
677
- interceptors: {
678
- request: AxiosInterceptorManager<InternalAxiosRequestConfig>;
679
- response: AxiosInterceptorManager<AxiosResponse>;
680
- };
681
- getUri(config?: AxiosRequestConfig): string;
682
- request<T = any, R = AxiosResponse<T>, D = any>(
683
- config: AxiosRequestConfig<D>,
684
- ): Promise<R>;
685
- get<T = any, R = AxiosResponse<T>, D = any>(
686
- url: string,
687
- config?: AxiosRequestConfig<D>,
688
- ): Promise<R>;
689
- delete<T = any, R = AxiosResponse<T>, D = any>(
690
- url: string,
691
- config?: AxiosRequestConfig<D>,
692
- ): Promise<R>;
693
- head<T = any, R = AxiosResponse<T>, D = any>(
694
- url: string,
695
- config?: AxiosRequestConfig<D>,
696
- ): Promise<R>;
697
- options<T = any, R = AxiosResponse<T>, D = any>(
698
- url: string,
699
- config?: AxiosRequestConfig<D>,
700
- ): Promise<R>;
701
- post<T = any, R = AxiosResponse<T>, D = any>(
702
- url: string,
703
- data?: D,
704
- config?: AxiosRequestConfig<D>,
705
- ): Promise<R>;
706
- put<T = any, R = AxiosResponse<T>, D = any>(
707
- url: string,
708
- data?: D,
709
- config?: AxiosRequestConfig<D>,
710
- ): Promise<R>;
711
- patch<T = any, R = AxiosResponse<T>, D = any>(
712
- url: string,
713
- data?: D,
714
- config?: AxiosRequestConfig<D>,
715
- ): Promise<R>;
716
- postForm<T = any, R = AxiosResponse<T>, D = any>(
717
- url: string,
718
- data?: D,
719
- config?: AxiosRequestConfig<D>,
720
- ): Promise<R>;
721
- putForm<T = any, R = AxiosResponse<T>, D = any>(
722
- url: string,
723
- data?: D,
724
- config?: AxiosRequestConfig<D>,
725
- ): Promise<R>;
726
- patchForm<T = any, R = AxiosResponse<T>, D = any>(
727
- url: string,
728
- data?: D,
729
- config?: AxiosRequestConfig<D>,
730
- ): Promise<R>;
731
- }
732
-
733
- interface AxiosInstance extends Axios {
734
- <T = any, R = AxiosResponse<T>, D = any>(
735
- config: AxiosRequestConfig<D>,
736
- ): Promise<R>;
737
- <T = any, R = AxiosResponse<T>, D = any>(
738
- url: string,
739
- config?: AxiosRequestConfig<D>,
740
- ): Promise<R>;
741
-
742
- create(config?: CreateAxiosDefaults): AxiosInstance;
743
- defaults: Omit<AxiosDefaults, "headers"> & {
744
- headers: HeadersDefaults & {
745
- [key: string]: AxiosHeaderValue;
746
- };
747
- };
748
- }
749
-
750
- interface GenericFormData {
751
- append(name: string, value: any, options?: any): any;
752
- }
753
-
754
- interface GenericHTMLFormElement {
755
- name: string;
756
- method: string;
757
- submit(): void;
758
- }
759
-
760
- declare function getAdapter(
761
- adapters: AxiosAdapterConfig | AxiosAdapterConfig[] | undefined,
762
- ): AxiosAdapter;
763
-
764
- declare function toFormData(
765
- sourceObj: object,
766
- targetFormData?: GenericFormData,
767
- options?: FormSerializerOptions,
768
- ): GenericFormData;
769
-
770
- declare function formToJSON(
771
- form: GenericFormData | GenericHTMLFormElement,
772
- ): object;
773
-
774
- declare function isAxiosError<T = any, D = any>(
775
- payload: any,
776
- ): payload is AxiosError<T, D>;
777
-
778
- declare function spread<T, R>(callback: (...args: T[]) => R): (array: T[]) => R;
779
-
780
- declare function isCancel<T = any>(value: any): value is CanceledError<T>;
781
-
782
- declare function all<T>(values: Array<T | Promise<T>>): Promise<T[]>;
783
-
784
- declare function mergeConfig<D = any>(
785
- config1: AxiosRequestConfig<D>,
786
- config2: AxiosRequestConfig<D>,
787
- ): AxiosRequestConfig<D>;
788
-
789
- interface AxiosStatic extends AxiosInstance {
790
- Cancel: CancelStatic;
791
- CancelToken: CancelTokenStatic;
792
- Axios: typeof Axios;
793
- AxiosError: typeof AxiosError;
794
- HttpStatusCode: typeof HttpStatusCode;
795
- readonly VERSION: string;
796
- isCancel: typeof isCancel;
797
- all: typeof all;
798
- spread: typeof spread;
799
- isAxiosError: typeof isAxiosError;
800
- toFormData: typeof toFormData;
801
- formToJSON: typeof formToJSON;
802
- getAdapter: typeof getAdapter;
803
- CanceledError: typeof CanceledError;
804
- AxiosHeaders: typeof AxiosHeaders;
805
- mergeConfig: typeof mergeConfig;
806
- }
807
-
808
- declare const axios: AxiosStatic;
809
-
810
- export { Axios, AxiosError, AxiosHeaders, CanceledError, HttpStatusCode, all, axios as default, formToJSON, getAdapter, isAxiosError, isCancel, mergeConfig, spread, toFormData };
811
- export type { AddressFamily, AxiosAdapter, AxiosBasicCredentials, AxiosDefaults, AxiosHeaderValue, AxiosInstance, AxiosInterceptorManager, AxiosInterceptorOptions, AxiosProgressEvent, AxiosPromise, AxiosProxyConfig, AxiosRequestConfig, AxiosRequestHeaders, AxiosRequestTransformer, AxiosResponse, AxiosResponseHeaders, AxiosResponseTransformer, AxiosStatic, Cancel, CancelStatic, CancelToken, CancelTokenSource, CancelTokenStatic, Canceler, CreateAxiosDefaults, CustomParamsSerializer, FormDataVisitorHelpers, FormSerializerOptions, GenericAbortSignal, GenericFormData, GenericHTMLFormElement, HeadersDefaults, InternalAxiosRequestConfig, LookupAddress, LookupAddressEntry, Method, ParamEncoder, ParamsSerializerOptions, RawAxiosRequestConfig, RawAxiosRequestHeaders, RawAxiosResponseHeaders, ResponseType, SerializerOptions, SerializerVisitor, TransitionalOptions, responseEncoding };