From e1b1db6fb94789d82886ed5310b6731912e5633d Mon Sep 17 00:00:00 2001 From: Cleiton Carvalho Date: Mon, 28 Aug 2023 23:40:32 -0300 Subject: [PATCH] feat: Exported processRawAudioVideo function --- src/whatsapp/functions/index.ts | 2 + .../functions/processRawAudioVideo.ts | 47 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 src/whatsapp/functions/processRawAudioVideo.ts diff --git a/src/whatsapp/functions/index.ts b/src/whatsapp/functions/index.ts index fef22973fd..7a81f92b91 100644 --- a/src/whatsapp/functions/index.ts +++ b/src/whatsapp/functions/index.ts @@ -67,6 +67,8 @@ export * from './markSeen'; export * from './mediaTypeFromProtobuf'; export * from './membershipApprovalRequestAction'; export * from './msgFindQuery'; +export * from './processRawAudioVideo'; +export * from './processRawMedia'; export * from './processRawSticker'; export * from './products'; export * from './productVisibilitySet'; diff --git a/src/whatsapp/functions/processRawAudioVideo.ts b/src/whatsapp/functions/processRawAudioVideo.ts new file mode 100644 index 0000000000..0734e4a77f --- /dev/null +++ b/src/whatsapp/functions/processRawAudioVideo.ts @@ -0,0 +1,47 @@ +/*! + * Copyright 2023 WPPConnect Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { exportModule } from '../exportModule'; +import { OpaqueData } from '../misc'; + +/** + * @whatsapp 232294 >= 2.2242.6 + */ +export declare function processRawAudioVideo( + mediaBlob: OpaqueData, + isPtt: boolean, + precomputedFields: any, + asGif: boolean, + m: any, + type: string, + isPtv?: boolean +): Promise<{ + mediaBlob: OpaqueData; + isPtt: boolean; + precomputedFields: any; + asGif: boolean; + m: any; + type: string; + isPtv?: boolean; +}>; + +exportModule( + exports, + { + processRawAudioVideo: 'processRawAudioVideo', + }, + (m) => m.processRawAudioVideo +);