@nocobase/plugin-ai-gigachat 2.3.0-beta.13 → 2.3.0-beta.14

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