
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
comet-backend
Advanced tools
🔰 I am working on this library, not all the methods are available right now as WIP.
Feel free to create an issue, i will add a method on the same day if its urgent.
Thanks. 🔰
A TypeScript SDK for interacting with Comet Chat's backend APIs.
npm install comet-backend
import { CometBackend } from 'comet-backend';
const comet = new CometBackend({
appId: 'YOUR_APP_ID',
region: 'YOUR_REGION',
apiKey: 'YOUR_API_KEY'
});
// Create a user
const response = await comet.users.createUser({
uid: 'user123',
name: 'John Doe'
});
// Response structure
{
data: T[]; // Array of data items
meta?: { // Optional metadata
[key: string]: unknown;
};
error?: { // Optional error information
message: string;
devMessage: string;
source: string;
code: string;
};
status: number; // HTTP status code
}
User Management
Message Management
Group Management
// Create a user
comet.users.createUser({
uid: string;
name: string;
avatar?: string;
role?: string;
statusMessage?: string;
metadata?: Record<string, unknown>;
tags?: string[];
withAuthToken?: boolean;
});
// Get user details
comet.users.getUser(userId: string);
// Update user
comet.users.updateUser(userId: string, userData: Partial<User>);
// Delete user
comet.users.deleteUser(userId: string);
// List users
comet.users.getUsers(params?: {
limit?: number;
page?: number;
});
// Send a message
comet.messages.sendMessage({
receiver: string;
receiverType: 'user' | 'group';
category: 'message'| 'custom';
type: 'text' | 'image' | 'file' | 'audio' | 'video';
data: {
text?: string;
url?: string;
file?: string;
metadata?: Record<string, any>;
[key: string]: any;
};
muid?: string;
quotedMessageId?: string;
tags?: string[];
multipleReceivers?: {
uids?: string[];
guids?: string[];
};
});
// Get message history
comet.messages.getMessages(params?: {
limit?: number;
page?: number;
});
// Create a group
comet.groups.createGroup({
name: string;
type: 'public' | 'private' | 'password';
members: string[];
});
// Get group details
comet.groups.getGroup(groupId: string);
// Update group
comet.groups.updateGroup(groupId: string, groupData: Partial<Group>);
// Delete group
comet.groups.deleteGroup(groupId: string);
// List groups
comet.groups.getGroups(params?: {
limit?: number;
page?: number;
});
MIT
FAQs
TypeScript SDK for Comet Chat Backend APIs
We found that comet-backend demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.