Skip to content

Commit

Permalink
feat: Added WPP.catalog.updateCartEnabled function
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Aug 13, 2022
1 parent 0aefe4c commit b70af87
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/catalog/functions/index.ts
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

export { addProductImage } from './addProductImage';
export { createProduct } from './createProduct';
export { changeProductImage } from './changeProductImage';
export { createCollection } from './createCollection';
Expand All @@ -27,4 +28,4 @@ export { getProductById } from './getProductById';
export { getProducts } from './getProducts';
export { removeProductImage } from './removeProductImage';
export { setProductVisibility } from './setProductVisibility';
export { addProductImage } from './addProductImage';
export { updateCartEnabled } from './updateCartEnabled';
35 changes: 35 additions & 0 deletions src/catalog/functions/updateCartEnabled.ts
@@ -0,0 +1,35 @@
/*!
* Copyright 2022 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 { updateCartEnabled as UpdateCartEnabled } from '../../whatsapp/functions';

/**
* Get your current catalog
*
* @example
* ```javascript
* // Set product visibility hidden
* const myCatalog = await WPP.catalog.setProductVisibility(54985569989897, true);
* ```
* // Set product visible
* const myCatalog = await WPP.catalog.setProductVisibility(54985569989897, false);
* ```
*
* @return Return sucess of product visibility set
*/
export async function updateCartEnabled(enabled: boolean): Promise<any> {
return await UpdateCartEnabled(enabled);
}
1 change: 1 addition & 0 deletions src/whatsapp/functions/index.ts
Expand Up @@ -60,6 +60,7 @@ export * from './setGroup';
export * from './setPin';
export * from './status';
export * from './typeAttributeFromProtobuf';
export * from './updateCartEnabled';
export * from './updateDBForGroupAction';
export * from './updateParticipants';
export * from './uploadProductImage';
Expand Down
30 changes: 30 additions & 0 deletions src/whatsapp/functions/updateCartEnabled.ts
@@ -0,0 +1,30 @@
/*!
* Copyright 2022 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 990553
*/
export declare function updateCartEnabled(enabled: boolean): Promise<void>;

exportModule(
exports,
{
updateCartEnabled: 'updateCartEnabled',
},
(m) => m.updateCartEnabled
);

0 comments on commit b70af87

Please sign in to comment.