@nocobase/plugin-ai-gigachat 2.2.19 → 2.2.21

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