listDirectConversationsEnrichedWithHttpInfo method
Enriched DM conversation list with unread + pin + draft state.
Native fast-path. Returns conversations augmented with the DM-feature state (unread counts, pinned/muted flags, saved drafts) the renderer's DM UI consumes. The shape is provider-specific and treated as opaque.
Note: This method returns the HTTP Response.
Parameters:
Implementation
Future<Response> listDirectConversationsEnrichedWithHttpInfo({ String? accountId, String? xWorkspaceID, }) async {
// ignore: prefer_const_declarations
final path = r'/v1/direct-messages/conversations';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (accountId != null) {
queryParams.addAll(_queryParams('', 'accountId', accountId));
}
if (xWorkspaceID != null) {
headerParams[r'X-Workspace-ID'] = parameterToString(xWorkspaceID);
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}