Spatio.Api.Slides (spatio_sdk v0.0.2)
API calls for all endpoints tagged Slides.
Summary
Functions
Create a presentation.
Creates a new deck under the target account. Target resolution mirrors POST /v1/notes and /v1/sheets: body accountId → ?accountId= → body provider → ?provider= → caller's single connected account (errors with ambiguous_account otherwise). The new deck is auto-seeded with one blank slide so the renderer has something to display immediately.
Insert a slide.
Add a canvas element (text/shape/image) to a slide.
Delete a presentation.
Delete a slide.
Delete a slide element.
Disable public sharing. Owner-only. Subsequent public viewer requests 404.
Enable (or update password on) public sharing.
Owner-only. With setPassword: false (or empty body), flips the deck public without changing the password. With setPassword: true, applies password (empty clears).
Render the presentation as a PDF.
Proxies to the Spatio export sidecar (Playwright). Two response modes selected via ?storage=: - stream (default) — response body is the PDF binary (application/pdf). - r2 — uploads the rendered PDF 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 (dev fallback to the client-side exporter).
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.
Fetch one presentation.
Fetch share settings for a presentation.
Owner-only. Mirror of GET /v1/notes/{id}/share — same shape, same fields. Returns the current public-share configuration, including the share token and computed public viewer URL when the deck is currently public.
Fetch a publicly shared presentation.
Unauthenticated. Mirror of GET /public/notes/{token}. The share token is the credential. For password-protected decks the password is supplied via ?password=; the response distinguishes "no password supplied" from "wrong password" so the viewer can render the right prompt. Unknown tokens and disabled-share decks both return 404 to prevent enumeration.
Fetch one slide.
Fetch one slide element.
List presentations across connected accounts.
Fan-out list. Returns every presentation visible to the caller across every connected slides provider. Pass ?accountId= or ?provider= to scope to a single source.
List the canvas elements on a slide.
List slides in a presentation.
Single-account list. Returns slides in the order set by their position field.
Rotate the share token, invalidating outstanding URLs.
Update presentation metadata (partial).
Update a slide (partial).
Update a slide element (partial).
Functions
@spec create_presentation( Tesla.Env.client(), Spatio.Model.CreatePresentationRequest.t(), keyword() ) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.CreateNote400Response.t()} | {:ok, Spatio.Model.Presentation.t()} | {:error, Tesla.Env.t()}
Create a presentation.
Creates a new deck under the target account. Target resolution mirrors POST /v1/notes and /v1/sheets: body accountId → ?accountId= → body provider → ?provider= → caller's single connected account (errors with ambiguous_account otherwise). The new deck is auto-seeded with one blank slide so the renderer has something to display immediately.
Parameters
connection(Spatio.Connection): Connection to servercreate_presentation_request(CreatePresentationRequest):opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:provider(String.t): Provider id (e.g.native-notes,notion). Selects every connected account for the provider. Mutually exclusive withaccountId.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.Presentation.t}on success{:error, Tesla.Env.t}on failure
@spec create_slide( Tesla.Env.client(), String.t(), Spatio.Model.CreateSlideRequest.t(), keyword() ) :: {:ok, Spatio.Model.Slide.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Insert a slide.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.create_slide_request(CreateSlideRequest):opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.Slide.t}on success{:error, Tesla.Env.t}on failure
@spec create_slide_element( Tesla.Env.client(), String.t(), String.t(), Spatio.Model.CreateSlideElementRequest.t(), keyword() ) :: {:ok, Spatio.Model.SlideElement.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Add a canvas element (text/shape/image) to a slide.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.slide_id(String.t): Slide id within the presentation.create_slide_element_request(CreateSlideElementRequest):opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.SlideElement.t}on success{:error, Tesla.Env.t}on failure
@spec delete_presentation(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.SuccessFlag.t()} | {:error, Tesla.Env.t()}
Delete a presentation.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.SuccessFlag.t}on success{:error, Tesla.Env.t}on failure
@spec delete_slide(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.SuccessFlag.t()} | {:error, Tesla.Env.t()}
Delete a slide.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.slide_id(String.t): Slide id within the presentation.opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.SuccessFlag.t}on success{:error, Tesla.Env.t}on failure
@spec delete_slide_element( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.SuccessFlag.t()} | {:error, Tesla.Env.t()}
Delete a slide element.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.slide_id(String.t): Slide id within the presentation.element_id(String.t): Slide-element id.opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.SuccessFlag.t}on success{:error, Tesla.Env.t}on failure
@spec export_presentation_pdf(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, String.t()} | {:error, Tesla.Env.t()}
Render the presentation as a PDF.
Proxies to the Spatio export sidecar (Playwright). Two response modes selected via ?storage=: - stream (default) — response body is the PDF binary (application/pdf). - r2 — uploads the rendered PDF 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 (dev fallback to the client-side exporter).
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.:storage(String.t)::filename(String.t): Sanitized base name for the downloaded PDF.:body(ExportPdfRequest):
Returns
{:ok, String.t}on success{:error, Tesla.Env.t}on failure
@spec export_presentation_pptx(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, String.t()} | {:error, Tesla.Env.t()}
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.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.:storage(String.t)::filename(String.t): Sanitized base name for the downloaded PPTX.:body(ExportPdfRequest):
Returns
{:ok, String.t}on success{:error, Tesla.Env.t}on failure
@spec get_presentation(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.CreateNote400Response.t()} | {:ok, Spatio.Model.Presentation.t()} | {:error, Tesla.Env.t()}
Fetch one presentation.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.Presentation.t}on success{:error, Tesla.Env.t}on failure
@spec get_public_presentation(Tesla.Env.client(), String.t(), keyword()) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.PasswordRequiredError.t()} | {:error, Tesla.Env.t()}
Fetch a publicly shared presentation.
Unauthenticated. Mirror of GET /public/notes/{token}. The share token is the credential. For password-protected decks the password is supplied via ?password=; the response distinguishes "no password supplied" from "wrong password" so the viewer can render the right prompt. Unknown tokens and disabled-share decks both return 404 to prevent enumeration.
Parameters
connection(Spatio.Connection): Connection to servertoken(String.t): Opaque public-share token.opts(keyword): Optional parameters:password(String.t): Optional viewer password.
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec get_slide(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, Spatio.Model.Slide.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Fetch one slide.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.slide_id(String.t): Slide id within the presentation.opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.Slide.t}on success{:error, Tesla.Env.t}on failure
@spec get_slide_element( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, Spatio.Model.SlideElement.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Fetch one slide element.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.slide_id(String.t): Slide id within the presentation.element_id(String.t): Slide-element id.opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.SlideElement.t}on success{:error, Tesla.Env.t}on failure
@spec list_presentations( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.PresentationListEnvelope.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List presentations across connected accounts.
Fan-out list. Returns every presentation visible to the caller across every connected slides provider. Pass ?accountId= or ?provider= to scope to a single source.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:provider(String.t): Provider id (e.g.native-notes,notion). Selects every connected account for the provider. Mutually exclusive withaccountId.:"X-Workspace-ID"(String.t): 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.:limit(integer())::offset(integer()):
Returns
{:ok, Spatio.Model.PresentationListEnvelope.t}on success{:error, Tesla.Env.t}on failure
@spec list_slide_elements(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, Spatio.Model.SlideElementList.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List the canvas elements on a slide.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.slide_id(String.t): Slide id within the presentation.opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.SlideElementList.t}on success{:error, Tesla.Env.t}on failure
@spec list_slides_in_presentation(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.SlideList.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List slides in a presentation.
Single-account list. Returns slides in the order set by their position field.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.SlideList.t}on success{:error, Tesla.Env.t}on failure
@spec update_presentation( Tesla.Env.client(), String.t(), Spatio.Model.UpdatePresentationRequest.t(), keyword() ) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.Presentation.t()} | {:error, Tesla.Env.t()}
Update presentation metadata (partial).
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.update_presentation_request(UpdatePresentationRequest):opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.Presentation.t}on success{:error, Tesla.Env.t}on failure
@spec update_slide( Tesla.Env.client(), String.t(), String.t(), Spatio.Model.UpdateSlideRequest.t(), keyword() ) :: {:ok, Spatio.Model.Slide.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Update a slide (partial).
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.slide_id(String.t): Slide id within the presentation.update_slide_request(UpdateSlideRequest):opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.Slide.t}on success{:error, Tesla.Env.t}on failure
update_slide_element(connection, id, slide_id, element_id, update_slide_element_request, opts \\ [])
@spec update_slide_element( Tesla.Env.client(), String.t(), String.t(), String.t(), Spatio.Model.UpdateSlideElementRequest.t(), keyword() ) :: {:ok, Spatio.Model.SlideElement.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Update a slide element (partial).
Parameters
connection(Spatio.Connection): Connection to serverid(String.t): Presentation id.slide_id(String.t): Slide id within the presentation.element_id(String.t): Slide-element id.update_slide_element_request(UpdateSlideElementRequest):opts(keyword): Optional parameters:accountId(String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive withprovider. If omitted on a list endpoint the call fans out across every connected account.:"X-Workspace-ID"(String.t): 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.
Returns
{:ok, Spatio.Model.SlideElement.t}on success{:error, Tesla.Env.t}on failure