UNPKG

@jokoor/sdk

Version:
66 lines 2.07 kB
/** * Contact Groups resource - User-friendly wrapper for SMS contact groups API */ import { BaseResource, PaginatedResponse } from './base'; import type { ContactGroupResponse, ContactGroupCreateParams, ContactGroupUpdateParams } from '../types/responses'; import { Result } from '../types/result'; export declare class ContactGroups extends BaseResource { private api; constructor(configuration: any); /** * Create a new contact group * @param params Group creation parameters * @returns Created group */ create(params: ContactGroupCreateParams): Promise<Result<ContactGroupResponse>>; /** * Get a contact group by ID * @param id Group ID * @returns Group details */ get(id: string): Promise<Result<ContactGroupResponse>>; /** * Update a contact group * @param id Group ID * @param params Update parameters * @returns Updated group */ update(id: string, params: ContactGroupUpdateParams): Promise<Result<ContactGroupResponse>>; /** * Delete a contact group * @param id Group ID * @returns Deletion confirmation */ delete(id: string): Promise<Result<{ message: string; }>>; /** * List contact groups * @param options List options * @returns Paginated list of groups */ list(options?: { limit?: number; offset?: number; search?: string; }): Promise<Result<PaginatedResponse<ContactGroupResponse>>>; /** * Add contacts to a group * @param id Group ID * @param contactIds Contact IDs to add * @returns Success message from API */ addContacts(id: string, contactIds: string[]): Promise<Result<{ message: string; }>>; /** * Remove contacts from a group * @param id Group ID * @param contactIds Contact IDs to remove * @returns Success message from API */ removeContacts(id: string, contactIds: string[]): Promise<Result<{ message: string; }>>; } //# sourceMappingURL=contact-groups.d.ts.map