Skip to content

Tools/pm 31067/move sends api calls to sdk 2#756

Open
adudek-bw wants to merge 9 commits intomainfrom
tools/pm-31067/move-sends-api-calls-to-sdk-2
Open

Tools/pm 31067/move sends api calls to sdk 2#756
adudek-bw wants to merge 9 commits intomainfrom
tools/pm-31067/move-sends-api-calls-to-sdk-2

Conversation

@adudek-bw
Copy link
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-31067

📔 Objective

Add calls to the SendClient that adds/edits/gets/lists sends via API calls.

🚨 Breaking Changes

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Logo
Checkmarx One – Scan Summary & Details7e0dc0d6-62e2-447f-96bd-d42b5fa1d534

Great job! No new security vulnerabilities introduced in this pull request

@adudek-bw adudek-bw marked this pull request as ready for review February 12, 2026 14:10
@adudek-bw adudek-bw requested review from a team as code owners February 12, 2026 14:10
@adudek-bw adudek-bw requested a review from djsmith85 February 12, 2026 14:10
Copy link
Contributor

@harr1424 harr1424 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall! I've added some suggestions to update comments and also the return type you noticed on the call earlier.

Comment on lines 105 to 106
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Exporter related operations.
pub fn sends(&self) -> ExporterClient {
/// Send related operations.
pub fn sends(&self) -> SendClient {

@djsmith85 djsmith85 removed their request for review February 13, 2026 07:59
adudek-bw and others added 2 commits February 13, 2026 09:10
Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>
Co-authored-by: John Harrington <84741727+harr1424@users.noreply.github.com>
pub struct SendAddEditRequest {
pub name: String,
pub notes: Option<String>,
pub key: Option<String>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you can set a key when creating a send?

Copy link
Contributor Author

@adudek-bw adudek-bw Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case of a create this will be set to None, but for an edit it'll be set to Some(key)


pub r#type: SendType,
pub file: Option<SendFileView>,
pub text: Option<SendTextView>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We built the original Send and SendView models to be as compatible with existing TS data models. But similar to how Cipher is moving towards enums with associated data I think Sends can too since these are new APIs?

pub enum SendType {
    File(SendFileView),
    Text(SendTextView),
}

and

pub enum SendAuthType {
  None,
  Password(String),
  Emails(Vec<String>),
}

@adudek-bw adudek-bw requested a review from coroiu February 19, 2026 14:43
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments