Skip to content

Commit

Permalink
feat: Added queryOrder function
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Jun 22, 2024
1 parent 9ad2dd2 commit 9bae53b
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/whatsapp/functions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export * from './profilePic';
export * from './queryAllGroups';
export * from './queryGroupInviteCode';
export * from './queryNewsletterMetadataByJid';
export * from './queryOrder';
export * from './randomHex';
export * from './randomId';
export * from './resetGroupInviteCode';
Expand Down
49 changes: 49 additions & 0 deletions src/whatsapp/functions/queryOrder.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*!
* Copyright 2024 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';

/** @whatsapp WAWebBizQueryOrderJob >= 2.30000.0 */
export declare function queryOrder(
productId: string,
imageWidth: number,
imageHeight: number,
token: string,
e?: any
): Promise<{
currency: string;
createdAt: number;
products: {
id: string;
price: number;
thumbnailId: string;
thumbnailUrl: string;
currency: string;
name: string;
quantity: number;
}[];
subtotal: number;
total: number;
tax: number | null;
}>;

exportModule(
exports,
{
queryOrder: 'queryOrder',
},
(m) => m.queryOrder && m.queryOrderResponse
);

0 comments on commit 9bae53b

Please sign in to comment.