@sparkvault/sdk-js 13.0.9 → 13.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -836,6 +836,22 @@ interface VaultLifecycle {
836
836
  /** Pass this exact schedule to cancelDeletion. */
837
837
  deletionScheduleId?: string;
838
838
  }
839
+ /**
840
+ * A company administrator a vault deletion's notice could not reach: the mail
841
+ * service declined their address, and the deletion does not wait for that
842
+ * notice. Until the deadline the notice is tried again at the address they
843
+ * hold then; one it reaches is named no longer.
844
+ */
845
+ interface UnreachedAdmin {
846
+ userId: string;
847
+ /** The name the roster shows them by; null when they have none */
848
+ name: string | null;
849
+ /** The address the mail service declined their notice for, which their roster entry still holds */
850
+ email: string;
851
+ /** Why: `deliverability` (the address bounced or was reported as spam) or `consent` (email to it is blocked) */
852
+ reason: string;
853
+ }
854
+ /** A vault's deletion schedule: a company admin can cancel it until `deletionScheduledFor`. */
839
855
  interface ScheduledVaultDeletion {
840
856
  id: string;
841
857
  status: 'deletion_scheduled';
@@ -843,6 +859,19 @@ interface ScheduledVaultDeletion {
843
859
  deletionScheduledFor: number;
844
860
  deletionRequestedBy: string;
845
861
  deletionScheduleId: string;
862
+ /**
863
+ * Each administrator the schedule's notice could not reach, empty when it
864
+ * reached every one; null while its notices are still being sent, when
865
+ * get names them once they are.
866
+ */
867
+ deletionNoticeUnreached: UnreachedAdmin[] | null;
868
+ }
869
+ /** A vault's irreversible cleanup, started: no schedule is left to cancel. */
870
+ interface StartedVaultDeletion {
871
+ id: string;
872
+ status: 'deleting';
873
+ /** Unix seconds when the cleanup started */
874
+ startedAt: number;
846
875
  }
847
876
  interface VaultSummary extends VaultLifecycle {
848
877
  /** Vault ID */
@@ -888,6 +917,13 @@ interface VaultDetail extends VaultLifecycle {
888
917
  lastUnsealedAt: number | null;
889
918
  /** Lifetime unseal count */
890
919
  unsealCount: number;
920
+ /**
921
+ * With `deletion_scheduled`, read in a company admin's signed-in session:
922
+ * each administrator the schedule's notice could not reach, empty when it
923
+ * reached every one; null while its notices are still being sent. Absent
924
+ * otherwise.
925
+ */
926
+ deletionNoticeUnreached?: UnreachedAdmin[] | null;
891
927
  }
892
928
  /** The result of renaming a vault. */
893
929
  interface UpdatedVault {
@@ -2570,6 +2606,8 @@ declare class VaultsModule {
2570
2606
  /**
2571
2607
  * Schedule permanent deletion in seven days and immediately lock all vault access.
2572
2608
  * Company admins only; cancelDeletion can abort this schedule before its deadline.
2609
+ * A vault whose irreversible cleanup has already started answers that cleanup
2610
+ * (`status: 'deleting'`) instead, which nothing can cancel.
2573
2611
  *
2574
2612
  * Requires the vault's exact name as confirmation, matched case-sensitively.
2575
2613
  * The name is sent base64(UTF-8) as the `X-Confirm-Name-B64` header so a vault
@@ -2579,7 +2617,7 @@ declare class VaultsModule {
2579
2617
  * @example
2580
2618
  * await sv.vaults.delete('vlt_abc', 'My Vault');
2581
2619
  */
2582
- delete(vaultId: string, name: string): Promise<ScheduledVaultDeletion>;
2620
+ delete(vaultId: string, name: string): Promise<ScheduledVaultDeletion | StartedVaultDeletion>;
2583
2621
  /** Cancel this exact deletion schedule before its deadline; company admins only. */
2584
2622
  cancelDeletion(vaultId: string, deletionScheduleId: string): Promise<VaultDetail>;
2585
2623
  /**
@@ -4380,4 +4418,4 @@ declare global {
4380
4418
  }
4381
4419
 
4382
4420
  export { AuthenticationError, AuthorizationError, EntropyModule, FoldersModule, IdentityModule, IdentityProviderError, IngotsModule, NAME_CONFLICT_POLICIES, NOTIFY_PRESETS, NetworkError, NotifyModule, NotifyProductModule, NotifySubscriptionRequiredError, PlanRequiredError, PopupBlockedError, ProductsModule, QuotaExceededError, SparkVault, SparkVaultError, SparksModule, TimeoutError, UnauthorizedError, UserCancelledError, ValidationError, VaultsModule, buildNotifyPresetSend, SparkVault as default, fetchDownload, isReceivedUploadFailure, logger, setDebugMode };
4383
- export type { AccessLogRetention, AccessLogsOptions, CreateFolderOptions, CreateNotifySendOptions, CreateSparkOptions, CreateUploadOptions, CreateVaultOptions, CreatedIngot, CreatedSpark, EntropyFormat, EntropyResult, FetchDownloadOptions, FetchedDownload, Folder, FolderBreadcrumbItem, FolderContents, FolderPage, GenerateEntropyOptions, HealthCheckOptions, HealthCheckResult, AttachOptions as IdentityAttachOptions, Ingot, IngotAccessLog, IngotAccessLogPage, IngotDownloadLink, IngotInvitation, IngotInvite, IngotPage, IngotSharingConfig, IngotUpload, ListContentsOptions, ListFoldersOptions, ListIngotsOptions, ListNotificationsOptions, ListNotificationsResponse, ListNotifyInboxOptions, ListNotifyInboxResponse, ListNotifyReceiptsOptions, ListNotifyReceiptsResponse, ListNotifySendsOptions, ListNotifySendsResponse, ListSparksOptions, MarkAllNotificationsStateOptions, MarkAllNotificationsStateResponse, MarkAllReadResult, MarkNotificationStateOptions, MarkNotificationStateResponse, MarkNotifyInboxAllOptions, MarkNotifyInboxAllResponse, MarkNotifyInboxStateOptions, MarkNotifyInboxStateResponse, NameConflictPolicy, NotificationBulkMarkState, NotificationInboxState, NotificationMarkState, NotificationRow, NotifyCategory, NotifyChannel, NotifyConfig, NotifyConfigCategory, NotifyConfigDelivery, NotifyConfigDeliveryPatch, NotifyConfigEvents, NotifyConfigEventsRead, NotifyConfigHistory, NotifyConfigOverrides, NotifyConfigPatch, NotifyConfigRealtimeFallbackDelay, NotifyConfigReliability, NotifyConfigResponse, NotifyConfigSecurity, NotifyDeliveryMode, NotifyEscalation, NotifyInboxBulkMarkState, NotifyInboxMarkState, NotifyInboxRow, NotifyInboxView, NotifyIngotRef, NotifyInteraction, NotifyPreset, NotifyPresetCategory, NotifyPresetName, NotifyPresetSendOptions, NotifyRecallMode, NotifyReceipt, NotifyReceiptEventType, NotifyRecipient, NotifyRecipientRef, NotifyRecipientState, NotifyReportableVerificationLevel, NotifySendContent, NotifySendPolicy, NotifySendReceipt, NotifySendReceiptsResponse, NotifySendResult, NotifySendState, NotifySendStatus, NotifySendStatusCounts, NotifySendStatusRecipient, NotifySendSummary, NotifySuppressionReason, NotifyVerificationLevel, QuotaResource, RecallNotifySendOptions, RecallNotifySendResponse, RegisterWebPushResponse, ReplaceIngotOptions, ResumeUploadOptions, ScheduledVaultDeletion, SearchIngotsOptions, SendUploadOptions, ShareSparkOptions, SignInOptions, SignInResult, Spark, SparkInviteResend, SparkPage, SparkShare, SparkSummary, SparkVaultConfig, SparkVisibility, SubscribeWebPushOptions, SubscribeWebPushResult, SubscribeWebPushStatus, TokenClaims, UnreadCountResponse, UnsealedVault, UnsubscribeWebPushResponse, UpdateFolderOptions, UpdateIngotSharingOptions, UpdateVaultUploadOptions, UpdatedVault, UploadAttachOptions, UploadBranding, UploadEnd, UploadIngotOptions, UploadOptions, UploadProgress, UploadResult, UploadSession, Vault, VaultDetail, VaultLifecycle, VaultSharingConfig, VaultSharingOptions, VaultSummary, VaultUploadConfig, VaultUploadSettings, VerifyOptions, VerifyResult, WebPushKeyResponse, WebPushStatus, WebPushStatusOptions, WebPushStatusResult, WebPushSubscriptionInput };
4421
+ export type { AccessLogRetention, AccessLogsOptions, CreateFolderOptions, CreateNotifySendOptions, CreateSparkOptions, CreateUploadOptions, CreateVaultOptions, CreatedIngot, CreatedSpark, EntropyFormat, EntropyResult, FetchDownloadOptions, FetchedDownload, Folder, FolderBreadcrumbItem, FolderContents, FolderPage, GenerateEntropyOptions, HealthCheckOptions, HealthCheckResult, AttachOptions as IdentityAttachOptions, Ingot, IngotAccessLog, IngotAccessLogPage, IngotDownloadLink, IngotInvitation, IngotInvite, IngotPage, IngotSharingConfig, IngotUpload, ListContentsOptions, ListFoldersOptions, ListIngotsOptions, ListNotificationsOptions, ListNotificationsResponse, ListNotifyInboxOptions, ListNotifyInboxResponse, ListNotifyReceiptsOptions, ListNotifyReceiptsResponse, ListNotifySendsOptions, ListNotifySendsResponse, ListSparksOptions, MarkAllNotificationsStateOptions, MarkAllNotificationsStateResponse, MarkAllReadResult, MarkNotificationStateOptions, MarkNotificationStateResponse, MarkNotifyInboxAllOptions, MarkNotifyInboxAllResponse, MarkNotifyInboxStateOptions, MarkNotifyInboxStateResponse, NameConflictPolicy, NotificationBulkMarkState, NotificationInboxState, NotificationMarkState, NotificationRow, NotifyCategory, NotifyChannel, NotifyConfig, NotifyConfigCategory, NotifyConfigDelivery, NotifyConfigDeliveryPatch, NotifyConfigEvents, NotifyConfigEventsRead, NotifyConfigHistory, NotifyConfigOverrides, NotifyConfigPatch, NotifyConfigRealtimeFallbackDelay, NotifyConfigReliability, NotifyConfigResponse, NotifyConfigSecurity, NotifyDeliveryMode, NotifyEscalation, NotifyInboxBulkMarkState, NotifyInboxMarkState, NotifyInboxRow, NotifyInboxView, NotifyIngotRef, NotifyInteraction, NotifyPreset, NotifyPresetCategory, NotifyPresetName, NotifyPresetSendOptions, NotifyRecallMode, NotifyReceipt, NotifyReceiptEventType, NotifyRecipient, NotifyRecipientRef, NotifyRecipientState, NotifyReportableVerificationLevel, NotifySendContent, NotifySendPolicy, NotifySendReceipt, NotifySendReceiptsResponse, NotifySendResult, NotifySendState, NotifySendStatus, NotifySendStatusCounts, NotifySendStatusRecipient, NotifySendSummary, NotifySuppressionReason, NotifyVerificationLevel, QuotaResource, RecallNotifySendOptions, RecallNotifySendResponse, RegisterWebPushResponse, ReplaceIngotOptions, ResumeUploadOptions, ScheduledVaultDeletion, SearchIngotsOptions, SendUploadOptions, ShareSparkOptions, SignInOptions, SignInResult, Spark, SparkInviteResend, SparkPage, SparkShare, SparkSummary, SparkVaultConfig, SparkVisibility, StartedVaultDeletion, SubscribeWebPushOptions, SubscribeWebPushResult, SubscribeWebPushStatus, TokenClaims, UnreachedAdmin, UnreadCountResponse, UnsealedVault, UnsubscribeWebPushResponse, UpdateFolderOptions, UpdateIngotSharingOptions, UpdateVaultUploadOptions, UpdatedVault, UploadAttachOptions, UploadBranding, UploadEnd, UploadIngotOptions, UploadOptions, UploadProgress, UploadResult, UploadSession, Vault, VaultDetail, VaultLifecycle, VaultSharingConfig, VaultSharingOptions, VaultSummary, VaultUploadConfig, VaultUploadSettings, VerifyOptions, VerifyResult, WebPushKeyResponse, WebPushStatus, WebPushStatusOptions, WebPushStatusResult, WebPushSubscriptionInput };
package/dist/index.mjs CHANGED
@@ -15936,6 +15936,8 @@ class VaultsModule {
15936
15936
  /**
15937
15937
  * Schedule permanent deletion in seven days and immediately lock all vault access.
15938
15938
  * Company admins only; cancelDeletion can abort this schedule before its deadline.
15939
+ * A vault whose irreversible cleanup has already started answers that cleanup
15940
+ * (`status: 'deleting'`) instead, which nothing can cancel.
15939
15941
  *
15940
15942
  * Requires the vault's exact name as confirmation, matched case-sensitively.
15941
15943
  * The name is sent base64(UTF-8) as the `X-Confirm-Name-B64` header so a vault
@@ -15956,14 +15958,18 @@ class VaultsModule {
15956
15958
  'X-Vault-Deletion-Mode': 'schedule',
15957
15959
  },
15958
15960
  });
15959
- const scheduled = response.data;
15961
+ const answer = response.data;
15962
+ if (answer.status === 'deleting') {
15963
+ return { id: answer.vault_id, status: answer.status, startedAt: answer.started_at };
15964
+ }
15960
15965
  return {
15961
- id: scheduled.vault_id,
15962
- status: scheduled.status,
15963
- deletionRequestedAt: scheduled.deletion_requested_at,
15964
- deletionScheduledFor: scheduled.deletion_scheduled_for,
15965
- deletionRequestedBy: scheduled.deletion_requested_by,
15966
- deletionScheduleId: scheduled.deletion_schedule_id,
15966
+ id: answer.vault_id,
15967
+ status: answer.status,
15968
+ deletionRequestedAt: answer.deletion_requested_at,
15969
+ deletionScheduledFor: answer.deletion_scheduled_for,
15970
+ deletionRequestedBy: answer.deletion_requested_by,
15971
+ deletionScheduleId: answer.deletion_schedule_id,
15972
+ deletionNoticeUnreached: answer.deletion_notice_unreached && answer.deletion_notice_unreached.map(mapUnreachedAdmin),
15967
15973
  };
15968
15974
  }
15969
15975
  /** Cancel this exact deletion schedule before its deadline; company admins only. */
@@ -16169,8 +16175,12 @@ function mapVaultDetail(v) {
16169
16175
  createdAt: v.created_at,
16170
16176
  lastUnsealedAt: v.last_unsealed_at ?? null,
16171
16177
  unsealCount: v.unseal_count ?? 0,
16178
+ deletionNoticeUnreached: v.deletion_notice_unreached && v.deletion_notice_unreached.map(mapUnreachedAdmin),
16172
16179
  };
16173
16180
  }
16181
+ function mapUnreachedAdmin(wire) {
16182
+ return { userId: wire.user_id, name: wire.name, email: wire.email, reason: wire.reason };
16183
+ }
16174
16184
  function mapSharingConfig$1(wire) {
16175
16185
  return {
16176
16186
  vaultId: wire.vault_id,
@@ -18434,7 +18444,7 @@ class SparkVault {
18434
18444
  }
18435
18445
  /** Get the SDK version */
18436
18446
  static get version() {
18437
- return '13.0.9';
18447
+ return '13.0.10';
18438
18448
  }
18439
18449
  }
18440
18450
  if (typeof window !== 'undefined') {