Skip to content

Class: Groups

Defined in: groups.ts:17

Contact group management operations.

Constructors

Constructor

ts
new Groups(client): Groups;

Defined in: groups.ts:18

Parameters

ParameterType
clientHttpClient

Returns

Groups

Methods

addContact()

ts
addContact(groupId, contactId): Promise<Result<{
  message: string;
  status: string;
}, MNotifyError>>;

Defined in: groups.ts:44

Adds an existing contact to a group.

Parameters

ParameterType
groupIdstring
contactIdstring

Returns

Promise<Result<{ message: string; status: string; }, MNotifyError>>


create()

ts
create(input): Promise<Result<Group, MNotifyError>>;

Defined in: groups.ts:21

Creates a new contact group.

Parameters

ParameterType
inputCreateGroupInput

Returns

Promise<Result<Group, MNotifyError>>


delete()

ts
delete(id): Promise<Result<{
  message: string;
  status: string;
}, MNotifyError>>;

Defined in: groups.ts:73

Deletes a group by its ID.

Parameters

ParameterType
idstring

Returns

Promise<Result<{ message: string; status: string; }, MNotifyError>>


get()

ts
get(id): Promise<Result<Group, MNotifyError>>;

Defined in: groups.ts:39

Fetches a single group by its ID.

Parameters

ParameterType
idstring

Returns

Promise<Result<Group, MNotifyError>>


list()

ts
list(): Promise<Result<Group[], MNotifyError>>;

Defined in: groups.ts:34

Lists all contact groups.

Returns

Promise<Result<Group[], MNotifyError>>


removeContact()

ts
removeContact(groupId, contactId): Promise<Result<{
  message: string;
  status: string;
}, MNotifyError>>;

Defined in: groups.ts:59

Removes a contact from a group.

Parameters

ParameterType
groupIdstring
contactIdstring

Returns

Promise<Result<{ message: string; status: string; }, MNotifyError>>