exportPresentationPptxWithHttpInfo method

Future<Response> exportPresentationPptxWithHttpInfo(
  1. String id, {
  2. String? accountId,
  3. String? xWorkspaceID,
  4. String? storage,
  5. String? filename,
  6. ExportPDFRequest? exportPDFRequest,
})

Render the presentation as a PowerPoint (.pptx) file.

Proxies to the Spatio export sidecar (Playwright + pptxgenjs). Each slide is screenshotted at 2× device-pixel ratio and wrapped into a PowerPoint .pptx as a full-bleed image. Visual fidelity is preserved exactly — what renders in Spatio renders identically in PowerPoint, Keynote, Google Slides — at the cost of in-PowerPoint editability of slide content. Users edit slide content back in Spatio (the source of truth), not inside PowerPoint. Two response modes selected via ?storage=: - stream (default) — response body is the PPTX binary (application/vnd.openxmlformats-officedocument.presentationml.presentation). - r2 — uploads the rendered PPTX to R2 storage and returns a JSON envelope with a 24-hour signed URL. Returns 503 Service Unavailable when the export sidecar is not configured.

Note: This method returns the HTTP Response.

Parameters:

  • String id (required): Presentation id.

  • String accountId: Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.

  • 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.

  • String storage:

  • String filename: Sanitized base name for the downloaded PPTX.

  • ExportPDFRequest exportPDFRequest:

Implementation

Future<Response> exportPresentationPptxWithHttpInfo(String id, { String? accountId, String? xWorkspaceID, String? storage, String? filename, ExportPDFRequest? exportPDFRequest, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/slides/{id}/export/pptx'
    .replaceAll('{id}', id);

  // ignore: prefer_final_locals
  Object? postBody = exportPDFRequest;

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

  if (accountId != null) {
    queryParams.addAll(_queryParams('', 'accountId', accountId));
  }
  if (storage != null) {
    queryParams.addAll(_queryParams('', 'storage', storage));
  }
  if (filename != null) {
    queryParams.addAll(_queryParams('', 'filename', filename));
  }

  if (xWorkspaceID != null) {
    headerParams[r'X-Workspace-ID'] = parameterToString(xWorkspaceID);
  }

  const contentTypes = <String>['application/json'];


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