Class FileRequestsResource

java.lang.Object
dev.dosya.sdk.resource.FileRequestsResource

public final class FileRequestsResource extends Object
Provides operations for managing file requests in Dosya workspaces.

File requests allow users to collect file uploads from external recipients via a shareable link. This resource handles creating, retrieving, updating, deleting file requests, and managing their uploads and recipients.

Since:
0.1.0
  • Constructor Details

    • FileRequestsResource

      public FileRequestsResource(@NotNull @NotNull DosyaHttpClient http)
      Creates a new FileRequestsResource backed by the given HTTP client.
      Parameters:
      http - the HTTP client used to make API requests
  • Method Details

    • create

      @NotNull public @NotNull FileRequestCreateResponse create(@NotNull @NotNull CreateFileRequestParams params)
      Creates a new file request.
      Parameters:
      params - the creation parameters including workspace ID and optional settings
      Returns:
      the response containing the created file request summary
      Throws:
      DosyaApiException - if the API returns an error
    • get

      @NotNull public @NotNull FileRequestDetail get(@NotNull @NotNull String requestId)
      Retrieves detailed information about a file request.
      Parameters:
      requestId - the unique identifier of the file request
      Returns:
      the file request detail
      Throws:
      DosyaApiException - if the API returns an error
    • update

      public void update(@NotNull @NotNull String requestId, @Nullable @Nullable String title, @Nullable @Nullable String message)
      Updates a file request's title and/or message.
      Parameters:
      requestId - the unique identifier of the file request
      title - the new title, or null to leave unchanged
      message - the new message, or null to leave unchanged
      Throws:
      DosyaApiException - if the API returns an error
    • delete

      public void delete(@NotNull @NotNull String requestId)
      Deletes a file request.
      Parameters:
      requestId - the unique identifier of the file request to delete
      Throws:
      DosyaApiException - if the API returns an error
    • listUploads

      @NotNull public @NotNull List<FileRequestsResource.FileRequestUpload> listUploads(@NotNull @NotNull String requestId)
      Lists all uploads received through a file request.
      Parameters:
      requestId - the unique identifier of the file request
      Returns:
      the list of uploads received
      Throws:
      DosyaApiException - if the API returns an error
    • listRecipients

      @NotNull public @NotNull List<FileRequestsResource.FileRequestRecipient> listRecipients(@NotNull @NotNull String requestId)
      Lists all recipients of a file request.
      Parameters:
      requestId - the unique identifier of the file request
      Returns:
      the list of recipients
      Throws:
      DosyaApiException - if the API returns an error
    • resend

      public void resend(@NotNull @NotNull String requestId, @Nullable @Nullable List<String> recipientIds)
      Resends the file request notification to specific recipients or all recipients.
      Parameters:
      requestId - the unique identifier of the file request
      recipientIds - the list of recipient IDs to resend to, or null to resend to all
      Throws:
      DosyaApiException - if the API returns an error
    • resend

      public void resend(@NotNull @NotNull String requestId)
      Resends the file request notification to all recipients.
      Parameters:
      requestId - the unique identifier of the file request
      Throws:
      DosyaApiException - if the API returns an error