Skip to content

Commit 128c312

Browse files
author
aditya
committed
chore: lock axion version
1 parent be9e842 commit 128c312

File tree

3 files changed

+3461
-3280
lines changed

3 files changed

+3461
-3280
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
"@babel/runtime": "^7.23.2",
113113
"@types/jsonwebtoken": "^9.0.5",
114114
"@types/qs": "^6.9.10",
115-
"axios": "0.x",
115+
"axios": "^0.29.0",
116116
"faye": "^1.4.0",
117117
"follow-redirects": "1.15.6",
118118
"form-data": "^4.0.0",

src/client.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as https from 'https';
55
import * as axios from 'axios';
66
import * as Faye from 'faye';
77
import { jwtDecode } from 'jwt-decode';
8-
import AxiosProgressEvent from 'axios';
8+
import AxiosProgressEvent, { AxiosRequestConfig, AxiosResponse } from "axios";
99

1010
import { Personalization } from './personalization';
1111
import { Collections } from './collections';
@@ -658,8 +658,8 @@ export class StreamClient<StreamFeedGenerics extends DefaultGenerics = DefaultGe
658658
this.send('request', method, options);
659659

660660
try {
661-
const response = await this.request(this.enrichKwargs({ method, ...options }));
662-
return this.handleResponse(response);
661+
const response = await this.request<AxiosResponse<T>, T>(this.enrichKwargs({ method, ...options }));
662+
return this.handleResponse<T>(response);
663663
} catch (error) {
664664
const err = error as StreamApiError<T>;
665665
if (err.response) return this.handleResponse(err.response);
@@ -684,6 +684,7 @@ export class StreamClient<StreamFeedGenerics extends DefaultGenerics = DefaultGe
684684
timeout: 0,
685685
maxContentLength: Infinity,
686686
maxBodyLength: Infinity,
687+
// @ts-ignore
687688
onUploadProgress,
688689
},
689690
});

0 commit comments

Comments
 (0)