Skip to content

Class: Templates

Defined in: templates.ts:17

SMS template management operations.

Constructors

Constructor

ts
new Templates(client): Templates;

Defined in: templates.ts:18

Parameters

ParameterType
clientHttpClient

Returns

Templates

Methods

create()

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

Defined in: templates.ts:21

Creates a new SMS template.

Parameters

ParameterType
inputCreateTemplateInput

Returns

Promise<Result<Template, MNotifyError>>


delete()

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

Defined in: templates.ts:41

Deletes a template by its ID.

Parameters

ParameterType
idstring

Returns

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


get()

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

Defined in: templates.ts:36

Fetches a single template by its ID.

Parameters

ParameterType
idstring

Returns

Promise<Result<Template, MNotifyError>>


list()

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

Defined in: templates.ts:31

Lists all SMS templates.

Returns

Promise<Result<Template[], MNotifyError>>