createTemplate method
Administrative action to create a new, re-usable communication (email for now) template.
https://atprotodart.com/docs/lexicons/tools/ozone/communication/createTemplate
Implementation
Future<XRPCResponse<TemplateView>> createTemplate({
required String name,
required String contentMarkdown,
required String subject,
String? lang,
String? createdBy,
Map<String, String>? $unknown,
Map<String, String>? $headers,
PostClient? $client,
}) async =>
await _ctx.post<TemplateView>(
ns.toolsOzoneCommunicationCreateTemplate,
headers: $headers,
body: {
'name': name,
'contentMarkdown': contentMarkdown,
'subject': subject,
if (lang != null) 'lang': lang,
if (createdBy != null) 'createdBy': createdBy,
...?$unknown,
},
to: const TemplateViewConverter().fromJson,
client: $client,
);