Class: Groups
Defined in: groups.ts:17
Contact group management operations.
Constructors
Constructor
ts
new Groups(client): Groups;Defined in: groups.ts:18
Parameters
| Parameter | Type |
|---|---|
client | HttpClient |
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
| Parameter | Type |
|---|---|
groupId | string |
contactId | string |
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
| Parameter | Type |
|---|---|
input | CreateGroupInput |
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
| Parameter | Type |
|---|---|
id | string |
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
| Parameter | Type |
|---|---|
id | string |
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
| Parameter | Type |
|---|---|
groupId | string |
contactId | string |
Returns
Promise<Result<{ message: string; status: string; }, MNotifyError>>