docs: document EvolutionGroup type with API response format

main
borja (aider) 3 months ago
parent 98fbd3df6a
commit e762a7c840

@ -5,11 +5,31 @@ const env = process.env;
// In-memory cache for active groups
const activeGroupsCache = new Map<string, string>(); // groupId -> groupName
/**
* Represents a group from the Evolution API response
*
* API returns an array of groups in this format:
* [
* {
* id: string, // Group ID in @g.us format (primary key)
* subject: string, // Group name (displayed to users)
* linkedParent?: string, // Parent community ID if group belongs to one
* size?: number, // Current member count (unused in our system)
* creation?: number, // Unix timestamp of group creation (unused)
* desc?: string, // Group description text (unused)
* // ...other fields exist but are ignored by our implementation
* }
* ]
*
* Required fields for our implementation:
* - id (used as database primary key)
* - subject (used as group display name)
* - linkedParent (used for community filtering)
*/
type EvolutionGroup = {
id: string;
subject: string;
linkedParent?: string;
// Other fields from API response
};
export class GroupSyncService {

Loading…
Cancel
Save