Merge branch 'master' into pr/2472

This commit is contained in:
Adhiraj Singh
2023-03-02 15:22:46 +05:30
20 changed files with 1020 additions and 871 deletions

View File

@@ -1,3 +1,4 @@
import { AxiosRequestConfig } from 'axios'
import type NodeCache from 'node-cache'
import type { Logger } from 'pino'
import type { Readable } from 'stream'
@@ -5,6 +6,7 @@ import type { URL } from 'url'
import { proto } from '../../WAProto'
import { MEDIA_HKDF_KEY_MAPPING } from '../Defaults'
import type { GroupMetadata } from './GroupMetadata'
import { CacheStore } from './Socket'
// export the WAMessage Prototypes
export { proto as WAProto }
@@ -210,9 +212,11 @@ export type MediaGenerationOptions = {
mediaTypeOverride?: MediaType
upload: WAMediaUploadFunction
/** cache media so it does not have to be uploaded again */
mediaCache?: NodeCache
mediaCache?: CacheStore
mediaUploadTimeoutMs?: number
options?: AxiosRequestConfig
}
export type MessageContentGenerationOptions = MediaGenerationOptions & {
getUrlInfo?: (text: string) => Promise<WAUrlInfo | undefined>