import { GroupContactsApi } from "../api";

const contactGroupApi = new GroupContactsApi();
contactGroupApi.setApiKey("API_KEY");

var page = 1;
var pageSize = 10;
async function listContactGroups() {
    try {
        var contactGroups = await contactGroupApi.groupContactList(page, pageSize);
        console.log("Contact Groups:", contactGroups);
    } catch (error: any) {
        console.error("Error occurred while calling the API:", error.message);
    }
}
listContactGroups();