refactor: replace axios with fetch API and update related types (#1666)
This commit is contained in:
committed by
GitHub
parent
cfe7a2b2b3
commit
fb12f6d9d3
@@ -1,4 +1,3 @@
|
||||
import type { AxiosRequestConfig } from 'axios'
|
||||
import type { Readable } from 'stream'
|
||||
import type { URL } from 'url'
|
||||
import { proto } from '../../WAProto/index.js'
|
||||
@@ -335,7 +334,7 @@ export type MediaGenerationOptions = {
|
||||
|
||||
mediaUploadTimeoutMs?: number
|
||||
|
||||
options?: AxiosRequestConfig
|
||||
options?: RequestInit
|
||||
|
||||
backgroundColor?: string
|
||||
|
||||
|
||||
+2
-3
@@ -1,4 +1,3 @@
|
||||
import type { AxiosRequestConfig } from 'axios'
|
||||
import type { Agent } from 'https'
|
||||
import type { URL } from 'url'
|
||||
import { proto } from '../../WAProto/index.js'
|
||||
@@ -131,8 +130,8 @@ export type SocketConfig = {
|
||||
snapshot: boolean
|
||||
}
|
||||
|
||||
/** options for axios */
|
||||
options: AxiosRequestConfig<{}>
|
||||
/** options for HTTP fetch requests */
|
||||
options: RequestInit
|
||||
/**
|
||||
* fetch a message from your store
|
||||
* implement this so that messages failed to send
|
||||
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
declare global {
|
||||
interface RequestInit {
|
||||
dispatcher?: any
|
||||
}
|
||||
}
|
||||
|
||||
export {}
|
||||
Reference in New Issue
Block a user