updateWorkflowPreferences method

Future<PreferencesResponse> updateWorkflowPreferences(
  1. String workflowId,
  2. Map<String, bool> preferences
)

Update global preferences

preferences is a map of preferences to update, key of the preference (in_app, sms, push, email, chat) and value of the preference workflowId is the id of the workflow to update

Implementation

Future<Dot.PreferencesResponse> updateWorkflowPreferences(String workflowId, Map<String, bool> preferences) async {
  var response = (await _client.patch<Map<String, dynamic>>(
    'preferences/$workflowId',
    data: preferences,
  )).data!;
  return Dot.PreferencesResponse.fromJson(response['data']);
}