deleteTeamFilesByWorkspaceByFilenameWithHttpInfo method

Future<Response> deleteTeamFilesByWorkspaceByFilenameWithHttpInfo(
  1. String workspace,
  2. String filename, {
  3. String? file,
})

Removes one blob from a workspace's file store.

Removes one blob from a workspace's file store. The caller must hold a verified session AND be a member of the workspace; anything else — an unknown workspace, another tenant's workspace, a workspace the caller is not in — answers the same 404, so a probe learns nothing about what exists. It is IDEMPOTENT: deleting a present or an absent blob both answer 204, so a delete never confirms a blob's existence and a foreign blob id (a physical key the caller can never name into another tenant's box) is a harmless no-op. A storage backend that is unavailable fails closed with 502 rather than lying about success.

Note: This method returns the HTTP Response.

Parameters:

  • String workspace (required): Workspace is the workspace uuid the blob belongs to, from the path.

  • String filename (required): Filename is the last path segment, which the front sets to the blob id when it sends no explicit file.

  • String file: File is the blob id, and wins over the path segment when both are present.

Implementation

Future<Response> deleteTeamFilesByWorkspaceByFilenameWithHttpInfo(String workspace, String filename, { String? file, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/team/files/{workspace}/{filename}'
    .replaceAll('{workspace}', workspace)
    .replaceAll('{filename}', filename);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (file != null) {
    queryParams.addAll(_queryParams('', 'file', file));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'DELETE',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}