listDirectConversationsEnrichedWithHttpInfo method

Future<Response> listDirectConversationsEnrichedWithHttpInfo({
  1. String? accountId,
  2. String? xWorkspaceID,
})

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:

  • String accountId:

  • String xWorkspaceID: Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

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,
  );
}