@@ -76,11 +76,25 @@ export interface EncryptInput {
7676
7777/** Options for sealed.upload() */
7878export interface UploadOptions {
79- /** If provided, Cryptify sends email notifications to recipients */
79+ /** Cryptify notification settings. Both recipient and sender mails
80+ * are opt-in: omit `notify` (or omit the `recipients` / `sender`
81+ * fields) and the upload is silent. Use this when the encrypted
82+ * payload is being delivered through another channel (e.g. an email
83+ * client) — pass an explicit toggle when Cryptify itself should
84+ * email anyone. */
8085 notify ?: {
86+ /** Send a notification email to each recipient with a download
87+ * link. Default false. */
88+ recipients ?: boolean ;
89+ /** Send a confirmation email back to the sender. Default false.
90+ * Independent of `recipients`. */
91+ sender ?: boolean ;
92+ /** Optional unencrypted message body included in any notification
93+ * email(s) sent — both the per-recipient mail and the sender
94+ * confirmation, when those are enabled. */
8195 message ?: string ;
96+ /** Notification email template language. Default 'EN'. */
8297 language ?: 'EN' | 'NL' ;
83- confirmToSender ?: boolean ;
8498 } ;
8599}
86100
@@ -208,6 +222,12 @@ export interface CreateEnvelopeOptions {
208222 * Tier 2; Tier 3 (over `PG_MAX_ATTACHMENT_SIZE`) always uploads because
209223 * there is no attachment fallback. */
210224 uploadToCryptify ?: boolean ;
225+ /** Notification settings for the underlying Cryptify upload. Same
226+ * shape as `Sealed.upload`'s `notify`. Silent by default — set
227+ * `notify.recipients = true` to opt into per-recipient mails, etc.
228+ * Has no effect on Tier 1 (no upload happens) or when
229+ * `uploadToCryptify: false` already skipped the upload. */
230+ notify ?: UploadOptions [ 'notify' ] ;
211231}
212232
213233/** Which tier the envelope falls into based on encrypted payload size.
0 commit comments