Expand description
bw send command implementation.
Dispatches the subcommands declared on SendArgs / SendCommands in
super to the underlying [bitwarden_send::SendClient] methods. The arg
parsing surface is intentionally defined in super so the legacy-CLI shape
(which is part of the user contract) stays close to the rest of the
tools family.
StructsΒ§
- Create
Inputs π - Create
Overrides π - CLI-flag overrides applied on top of a full-object JSON
create. - Edit
Overrides π - Send
Args - Send
Create Args - Send
Delete Args - Send
Edit Args - Send
File πTemplate - Send
File πTemplate Body - Send
GetArgs - Send
Json πInput - CLI-local shape for the full-object JSON accepted by
create/edit. - Send
List Args - Send
Receive Args bw send receive <url>. Must stay field-identical tosuper::ReceiveArgs(bw receive) β they are the same command under two names, and both delegate tosuper::receive::run_receive.- Send
Remove Password Args - Send
Template Args - Send
Text πTemplate - Send
Text πTemplate Body
EnumsΒ§
ConstantsΒ§
- DELETE_
IN_ πDAYS_ ALLOWED - Allowed values for
--deleteInDays, matching the legacy CLIβs enumerated set. Kept as strings soPossibleValuesParsercan surface them in--helpoutput.
FunctionsΒ§
- build_
access_ πurl - Build the shareable Send access URL from a decrypted [
bitwarden_send::SendView]. - build_
auth π - build_
auth_ πfor_ edit - Build the
authfield for a [SendEditRequest]. - build_
create_ πrequest - build_
create_ πrequest_ from_ view - Build a create request from a full-object [
SendView] (theencoded_jsonpath). - build_
edit_ πrequest - build_
edit_ πrequest_ from_ json - Build an edit request by merging a full-object [
SendView] (req) over the existing server row, replicating the legacy CLIβs precedence. - compute_
deletion_ πdate - create_
shortcut π - default_
auth_ πtype - delete_
in_ πdays_ parser - Clap value parser for
--deleteInDays. Restricts input to the legacy-CLI allowed set (also surfaced in--help) and maps it back to theu64field type. - dispatch_
create π - Run
bw send create, either from a full-objectSendView(json) or from the individual CLI flags. The JSON input, when present, has already been resolved and parsed inSendArgs::runso parse errors surface before the auth check. - dispatch_
edit π - Run
bw send edit, either merging a full-objectSendView(json) into the existing server row or applying the individual CLI-flag overrides. The JSON input, when present, has already been resolved and parsed inSendArgs::run. - finalize_
emails π - get_
send π - list_
sends π - parse_
emails π - Parse the
--emailsargument into a list of email addresses. - parse_
encoded_ πsend_ view - Decode and parse the full-object JSON input into a [
SendView]. - read_
encoded_ πjson_ input - Resolve the raw full-object JSON input for
create/edit. - render_
template π - require_
premium π - Enforce the premium-membership precondition for file Sends by inspecting the
premiumclaim on the current userβs access-token JWT (option a from PM-39238). Reads the persistedAUTHENTICATION_TOKENSstate β the same source the auth middleware attaches to requests β so no additional token accessor is needed on the client. - rewrite_
api_ πhost_ to_ vault - Rewrite a leading
api.host label tovault.in ascheme://host[/path]URL, e.g.https://api.bitwarden.com->https://vault.bitwarden.com. ReturnsNonewhen the URL has no scheme or the host does not start with theapi.label (soapiary.example.comis not rewritten). - run_
create π - run_
create_ πfile - Full file-send create pipeline:
- to_
url_ πb64 - Convert standard base64 to URL-safe base64 without padding.
- web_
vault_ πfrom_ api_ url - Derive the web-vault base from an API URL when no web-vault/server URL is configured (the
bw login --serverand cloud paths). Pure so it can be unit-tested without a live client. - web_
vault_ πurl - Resolve the web-vault base URL that
/#/send/<access_id>/<url_b64_key>is appended to.