updateTemplate method
Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.
https://atprotodart.com/docs/lexicons/tools/ozone/communication/updateTemplate
Implementation
Future<XRPCResponse<TemplateView>> updateTemplate({
required String id,
String? name,
String? lang,
String? contentMarkdown,
String? subject,
String? updatedBy,
bool? disabled,
Map<String, String>? $unknown,
Map<String, String>? $headers,
PostClient? $client,
}) async =>
await _ctx.post<TemplateView>(
ns.toolsOzoneCommunicationUpdateTemplate,
headers: $headers,
body: {
'id': id,
if (name != null) 'name': name,
if (lang != null) 'lang': lang,
if (contentMarkdown != null) 'contentMarkdown': contentMarkdown,
if (subject != null) 'subject': subject,
if (updatedBy != null) 'updatedBy': updatedBy,
if (disabled != null) 'disabled': disabled,
...?$unknown,
},
to: const TemplateViewConverter().fromJson,
client: $client,
);