@sparkvault/sdk-js 13.0.8 → 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.cjs +156 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +46 -4
- package/dist/index.mjs +156 -28
- package/dist/index.mjs.map +1 -1
- package/dist/products/identity/types.d.ts +6 -2
- package/dist/products/identity/views/backup-verify.d.ts +4 -3
- package/dist/products/identity/views/identity-input.d.ts +2 -1
- package/dist/products/identity/views/method-select.d.ts +5 -1
- package/dist/products/identity/views/sms-consent.d.ts +15 -0
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/vaults/index.d.ts +5 -3
- package/dist/vaults/types.d.ts +51 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -187,7 +187,11 @@ interface AuthContext {
|
|
|
187
187
|
interface VerifyOptions {
|
|
188
188
|
/** Pre-fill email address (mutually exclusive with phone) */
|
|
189
189
|
email?: string;
|
|
190
|
-
/**
|
|
190
|
+
/**
|
|
191
|
+
* Pre-fill phone number in E.164 format, e.g. "+14155551234" (mutually
|
|
192
|
+
* exclusive with email). The sign-in texts or calls it only once the person
|
|
193
|
+
* picks a text or call method, under the SMS and voice consent.
|
|
194
|
+
*/
|
|
191
195
|
phone?: string;
|
|
192
196
|
/**
|
|
193
197
|
* Target element for inline rendering. Can be:
|
|
@@ -239,7 +243,7 @@ interface VerifyOptions {
|
|
|
239
243
|
interface AttachOptions {
|
|
240
244
|
/** Pre-fill email address */
|
|
241
245
|
email?: string;
|
|
242
|
-
/** Pre-fill phone number in E.164 format */
|
|
246
|
+
/** Pre-fill phone number in E.164 format (see `VerifyOptions.phone`) */
|
|
243
247
|
phone?: string;
|
|
244
248
|
/** Auth context for OIDC/simple mode flows */
|
|
245
249
|
authContext?: AuthContext;
|
|
@@ -832,6 +836,22 @@ interface VaultLifecycle {
|
|
|
832
836
|
/** Pass this exact schedule to cancelDeletion. */
|
|
833
837
|
deletionScheduleId?: string;
|
|
834
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`. */
|
|
835
855
|
interface ScheduledVaultDeletion {
|
|
836
856
|
id: string;
|
|
837
857
|
status: 'deletion_scheduled';
|
|
@@ -839,6 +859,19 @@ interface ScheduledVaultDeletion {
|
|
|
839
859
|
deletionScheduledFor: number;
|
|
840
860
|
deletionRequestedBy: string;
|
|
841
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;
|
|
842
875
|
}
|
|
843
876
|
interface VaultSummary extends VaultLifecycle {
|
|
844
877
|
/** Vault ID */
|
|
@@ -884,6 +917,13 @@ interface VaultDetail extends VaultLifecycle {
|
|
|
884
917
|
lastUnsealedAt: number | null;
|
|
885
918
|
/** Lifetime unseal count */
|
|
886
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;
|
|
887
927
|
}
|
|
888
928
|
/** The result of renaming a vault. */
|
|
889
929
|
interface UpdatedVault {
|
|
@@ -2566,6 +2606,8 @@ declare class VaultsModule {
|
|
|
2566
2606
|
/**
|
|
2567
2607
|
* Schedule permanent deletion in seven days and immediately lock all vault access.
|
|
2568
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.
|
|
2569
2611
|
*
|
|
2570
2612
|
* Requires the vault's exact name as confirmation, matched case-sensitively.
|
|
2571
2613
|
* The name is sent base64(UTF-8) as the `X-Confirm-Name-B64` header so a vault
|
|
@@ -2575,7 +2617,7 @@ declare class VaultsModule {
|
|
|
2575
2617
|
* @example
|
|
2576
2618
|
* await sv.vaults.delete('vlt_abc', 'My Vault');
|
|
2577
2619
|
*/
|
|
2578
|
-
delete(vaultId: string, name: string): Promise<ScheduledVaultDeletion>;
|
|
2620
|
+
delete(vaultId: string, name: string): Promise<ScheduledVaultDeletion | StartedVaultDeletion>;
|
|
2579
2621
|
/** Cancel this exact deletion schedule before its deadline; company admins only. */
|
|
2580
2622
|
cancelDeletion(vaultId: string, deletionScheduleId: string): Promise<VaultDetail>;
|
|
2581
2623
|
/**
|
|
@@ -4376,4 +4418,4 @@ declare global {
|
|
|
4376
4418
|
}
|
|
4377
4419
|
|
|
4378
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 };
|
|
4379
|
-
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
|
@@ -3925,13 +3925,74 @@ class LoadingView {
|
|
|
3925
3925
|
}
|
|
3926
3926
|
}
|
|
3927
3927
|
|
|
3928
|
+
/**
|
|
3929
|
+
* Two consent lines, each in one wording for every surface that shows it: the
|
|
3930
|
+
* SMS and voice consent beside a phone number, and the terms a signup
|
|
3931
|
+
* accepts. Each line is split around the documents it links, and each document
|
|
3932
|
+
* has its one address here: a surface draws the words between the links and
|
|
3933
|
+
* links each document at TERMS_URL or PRIVACY_URL.
|
|
3934
|
+
*
|
|
3935
|
+
* BROWSER-SAFE: data only, no imports. sdk-mobile mirrors it.
|
|
3936
|
+
*/
|
|
3937
|
+
|
|
3938
|
+
/** The terms of service, published once, on the marketing site. */
|
|
3939
|
+
const TERMS_URL = 'https://sparkvault.com/terms/';
|
|
3940
|
+
|
|
3941
|
+
/**
|
|
3942
|
+
* Beside every field where a person enters a phone number SparkVault texts or
|
|
3943
|
+
* calls (the sign-in field and the backup phone of Identity's sign-in, in
|
|
3944
|
+
* sdk-js and sdk-mobile, the mobile app's backup phone, and auth.sv's new
|
|
3945
|
+
* phone number), and under the sign-in's method picker wherever it offers a
|
|
3946
|
+
* text or a call: a phone number the sign-in was handed reaches the picker
|
|
3947
|
+
* without passing the field. The terms take the consent from whoever provides
|
|
3948
|
+
* the number, so the words fit a number typed and a number handed over alike.
|
|
3949
|
+
* It agrees with the terms' SMS and voice disclosures (apps/www/terms.md 15.2,
|
|
3950
|
+
* held to them by apps/www/tests/consent-lines.test.mjs): STOP opts the number
|
|
3951
|
+
* out, HELP answers, rates may apply, and where texts and calls go is the
|
|
3952
|
+
* terms' to say. It offers no way to opt back in, since the terms promise none.
|
|
3953
|
+
*/
|
|
3954
|
+
const SMS_CONSENT = Object.freeze({
|
|
3955
|
+
beforeTerms: 'By providing a phone number, you agree to receive verification codes and account messages from SparkVault by text or automated call, as its ',
|
|
3956
|
+
terms: 'Terms',
|
|
3957
|
+
afterTerms: ' describe. Message and data rates may apply. Reply STOP to opt out or HELP for help.'
|
|
3958
|
+
});
|
|
3959
|
+
|
|
3960
|
+
/**
|
|
3961
|
+
* SMS and Voice Consent
|
|
3962
|
+
*
|
|
3963
|
+
* The line the sign-in shows wherever a person gives SparkVault a phone number
|
|
3964
|
+
* to text or call, in the platform's one wording
|
|
3965
|
+
* (`@sparkvault/app-sdk/consent-lines`): under every field that takes one, and
|
|
3966
|
+
* under the method picker wherever it offers a text or a call. It describes
|
|
3967
|
+
* the field or the methods above it, so a screen reader reads it with them.
|
|
3968
|
+
*/
|
|
3969
|
+
/**
|
|
3970
|
+
* The consent line, its "Terms" opening the terms in a new tab.
|
|
3971
|
+
*
|
|
3972
|
+
* @param id - The line's id, which the field or each method names in its `aria-describedby`
|
|
3973
|
+
*/
|
|
3974
|
+
function smsConsent(id) {
|
|
3975
|
+
const line = document.createElement('p');
|
|
3976
|
+
line.className = 'sv-sms-consent';
|
|
3977
|
+
line.id = id;
|
|
3978
|
+
const terms = document.createElement('a');
|
|
3979
|
+
terms.className = 'sv-sms-consent-link';
|
|
3980
|
+
terms.href = TERMS_URL;
|
|
3981
|
+
terms.target = '_blank';
|
|
3982
|
+
terms.rel = 'noopener noreferrer';
|
|
3983
|
+
terms.textContent = SMS_CONSENT.terms;
|
|
3984
|
+
line.append(SMS_CONSENT.beforeTerms, terms, SMS_CONSENT.afterTerms);
|
|
3985
|
+
return line;
|
|
3986
|
+
}
|
|
3987
|
+
|
|
3928
3988
|
/**
|
|
3929
3989
|
* Identity Input View
|
|
3930
3990
|
*
|
|
3931
3991
|
* Collects and validates the user's email or phone number: reads the input as
|
|
3932
3992
|
* one or the other by the platform's rules (`@sparkvault/app-sdk/phone` and
|
|
3933
3993
|
* `@sparkvault/app-sdk/email-address`), and formats a phone-only field as the
|
|
3934
|
-
* number is typed.
|
|
3994
|
+
* number is typed. A field that takes a phone number carries the SMS and voice
|
|
3995
|
+
* consent beneath it.
|
|
3935
3996
|
*/
|
|
3936
3997
|
class IdentityInputView {
|
|
3937
3998
|
constructor(props) {
|
|
@@ -4000,6 +4061,11 @@ class IdentityInputView {
|
|
|
4000
4061
|
this.inputElement.addEventListener('keydown', this.boundHandleKeyDown);
|
|
4001
4062
|
inputWrapper.appendChild(this.labelElement);
|
|
4002
4063
|
inputWrapper.appendChild(this.inputElement);
|
|
4064
|
+
if (this.allowsPhone) {
|
|
4065
|
+
const consent = smsConsent('sv-identity-sms-consent');
|
|
4066
|
+
this.inputElement.setAttribute('aria-describedby', consent.id);
|
|
4067
|
+
inputWrapper.appendChild(consent);
|
|
4068
|
+
}
|
|
4003
4069
|
formSection.appendChild(inputWrapper);
|
|
4004
4070
|
this.submitButton = document.createElement('button');
|
|
4005
4071
|
this.submitButton.className = 'sv-btn sv-btn-email-primary';
|
|
@@ -4465,8 +4531,14 @@ function createUsersIcon() {
|
|
|
4465
4531
|
/**
|
|
4466
4532
|
* Method Select View
|
|
4467
4533
|
*
|
|
4468
|
-
* Displays available authentication methods for the user to choose from.
|
|
4469
|
-
|
|
4534
|
+
* Displays available authentication methods for the user to choose from. A
|
|
4535
|
+
* list that offers a text or a call carries the SMS and voice consent beneath
|
|
4536
|
+
* it: a phone number the sign-in was handed reaches this list without passing
|
|
4537
|
+
* the identifier field that carries it, so the tap on a text or call method is
|
|
4538
|
+
* what gives it.
|
|
4539
|
+
*/
|
|
4540
|
+
/** A method that sends its code to the phone number: a text or a call. */
|
|
4541
|
+
const textsOrCalls = (method) => method.identityType === 'phone';
|
|
4470
4542
|
class MethodSelectView {
|
|
4471
4543
|
constructor(props) {
|
|
4472
4544
|
this.backLink = null;
|
|
@@ -4488,9 +4560,13 @@ class MethodSelectView {
|
|
|
4488
4560
|
subtitle.className = 'sv-subtitle';
|
|
4489
4561
|
subtitle.textContent = email;
|
|
4490
4562
|
}
|
|
4563
|
+
const consent = this.props.methods.some(textsOrCalls) ? smsConsent('sv-method-sms-consent') : null;
|
|
4491
4564
|
const methodsContainer = div();
|
|
4492
4565
|
for (const method of this.props.methods) {
|
|
4493
4566
|
const methodButton = this.createMethodButton(method);
|
|
4567
|
+
if (consent && textsOrCalls(method)) {
|
|
4568
|
+
methodButton.setAttribute('aria-describedby', consent.id);
|
|
4569
|
+
}
|
|
4494
4570
|
this.methodButtons.push(methodButton);
|
|
4495
4571
|
methodsContainer.appendChild(methodButton);
|
|
4496
4572
|
}
|
|
@@ -4502,6 +4578,9 @@ class MethodSelectView {
|
|
|
4502
4578
|
container.appendChild(subtitle);
|
|
4503
4579
|
}
|
|
4504
4580
|
container.appendChild(methodsContainer);
|
|
4581
|
+
if (consent) {
|
|
4582
|
+
container.appendChild(consent);
|
|
4583
|
+
}
|
|
4505
4584
|
return container;
|
|
4506
4585
|
}
|
|
4507
4586
|
createBackLink() {
|
|
@@ -5297,9 +5376,10 @@ class PasskeyPromptView {
|
|
|
5297
5376
|
* Backup Verification Input View
|
|
5298
5377
|
*
|
|
5299
5378
|
* Post-login nudge to add the inverse identifier as a recovery backup:
|
|
5300
|
-
* collects a new phone (for an email login)
|
|
5301
|
-
* then hands it off to send a one-time code.
|
|
5302
|
-
* suppresses this method's prompt for 30 days
|
|
5379
|
+
* collects a new phone (for an email login), under the SMS and voice consent,
|
|
5380
|
+
* or email (for a phone login), then hands it off to send a one-time code.
|
|
5381
|
+
* Includes a "Not now" skip that suppresses this method's prompt for 30 days
|
|
5382
|
+
* (handled by the renderer).
|
|
5303
5383
|
*
|
|
5304
5384
|
* Sibling of PasskeyPromptView — same low-friction, skippable shape.
|
|
5305
5385
|
*/
|
|
@@ -5361,6 +5441,11 @@ class BackupVerifyView {
|
|
|
5361
5441
|
this.inputElement.addEventListener('keydown', this.boundHandleKeyDown);
|
|
5362
5442
|
inputWrapper.appendChild(label);
|
|
5363
5443
|
inputWrapper.appendChild(this.inputElement);
|
|
5444
|
+
if (this.isPhone) {
|
|
5445
|
+
const consent = smsConsent('sv-backup-sms-consent');
|
|
5446
|
+
this.inputElement.setAttribute('aria-describedby', consent.id);
|
|
5447
|
+
inputWrapper.appendChild(consent);
|
|
5448
|
+
}
|
|
5364
5449
|
formSection.appendChild(inputWrapper);
|
|
5365
5450
|
this.submitButton = document.createElement('button');
|
|
5366
5451
|
this.submitButton.className = 'sv-btn sv-btn-primary';
|
|
@@ -6267,11 +6352,12 @@ const SPARKLINK_CSP_BLOCKED_ERROR = {
|
|
|
6267
6352
|
};
|
|
6268
6353
|
class IdentityRenderer {
|
|
6269
6354
|
constructor(container, api, options, callbacks) {
|
|
6270
|
-
// True
|
|
6271
|
-
//
|
|
6272
|
-
//
|
|
6273
|
-
//
|
|
6274
|
-
// auto-proceed
|
|
6355
|
+
// True while the identifier is the one the render options supplied (a host's
|
|
6356
|
+
// prefill, a login hint, an invite's identity), false once the person types
|
|
6357
|
+
// their own. Gates the "identity is fixed" behavior, so a no-hint
|
|
6358
|
+
// simple-mode session where the person types their own identifier still
|
|
6359
|
+
// gets a change-identity back link and single-method auto-proceed, and holds
|
|
6360
|
+
// a text or call to a supplied phone number for the person's tap.
|
|
6275
6361
|
this.identityPrefilled = false;
|
|
6276
6362
|
// View management
|
|
6277
6363
|
this.currentView = null;
|
|
@@ -6330,7 +6416,7 @@ class IdentityRenderer {
|
|
|
6330
6416
|
else {
|
|
6331
6417
|
this.verificationState.setIdentity(validateEmail(raw) ?? raw, 'email');
|
|
6332
6418
|
}
|
|
6333
|
-
// The flow supplied the identifier
|
|
6419
|
+
// The flow supplied the identifier, not the person.
|
|
6334
6420
|
this.identityPrefilled = true;
|
|
6335
6421
|
}
|
|
6336
6422
|
/**
|
|
@@ -6914,14 +7000,19 @@ class IdentityRenderer {
|
|
|
6914
7000
|
void this.launchPasskeyVerify(true);
|
|
6915
7001
|
return;
|
|
6916
7002
|
}
|
|
6917
|
-
// A single enabled method normally auto-fires so the
|
|
6918
|
-
// redundant one-item picker.
|
|
6919
|
-
//
|
|
6920
|
-
//
|
|
6921
|
-
//
|
|
6922
|
-
//
|
|
6923
|
-
//
|
|
6924
|
-
|
|
7003
|
+
// A single enabled method normally auto-fires so the person skips a
|
|
7004
|
+
// redundant one-item picker. The picker stays up instead, as a one-tap
|
|
7005
|
+
// consent gate, for:
|
|
7006
|
+
// - any code to an identity an invite fixes: auto-firing would silently
|
|
7007
|
+
// send a code (another SMS/email) the instant the recipient opens the
|
|
7008
|
+
// link, with no consent, and again on every reload;
|
|
7009
|
+
// - a text or call to a phone number the flow supplied: the person never
|
|
7010
|
+
// typed it under the SMS and voice consent the identifier field carries,
|
|
7011
|
+
// so the picker carries that consent and the tap gives it.
|
|
7012
|
+
// (Passkey auto-route above still applies — a biometric prompt costs
|
|
7013
|
+
// nothing and can be dismissed.)
|
|
7014
|
+
const sendsToSuppliedPhone = this.identityPrefilled && methods[0].identityType === 'phone';
|
|
7015
|
+
if (methods.length === 1 && !this.isIdentityFixed() && !sendsToSuppliedPhone) {
|
|
6925
7016
|
this.handleMethodSelect(methods[0]);
|
|
6926
7017
|
return;
|
|
6927
7018
|
}
|
|
@@ -8706,6 +8797,33 @@ function getStyles(options) {
|
|
|
8706
8797
|
box-shadow: 0 0 0 3px ${tokens.errorLight};
|
|
8707
8798
|
}
|
|
8708
8799
|
|
|
8800
|
+
/* The SMS and voice consent under a phone number field: fine print in the
|
|
8801
|
+
secondary ink, its link underlined in the same ink so it reads as a link
|
|
8802
|
+
without a second color. */
|
|
8803
|
+
.sv-sms-consent {
|
|
8804
|
+
margin: 8px 0 0;
|
|
8805
|
+
font-size: 12px;
|
|
8806
|
+
line-height: 1.5;
|
|
8807
|
+
color: ${tokens.textSecondary};
|
|
8808
|
+
}
|
|
8809
|
+
|
|
8810
|
+
.sv-sms-consent-link {
|
|
8811
|
+
color: inherit;
|
|
8812
|
+
text-decoration: underline;
|
|
8813
|
+
text-underline-offset: 2px;
|
|
8814
|
+
border-radius: 2px;
|
|
8815
|
+
transition: color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
8816
|
+
}
|
|
8817
|
+
|
|
8818
|
+
.sv-sms-consent-link:hover {
|
|
8819
|
+
color: ${tokens.textPrimary};
|
|
8820
|
+
}
|
|
8821
|
+
|
|
8822
|
+
.sv-sms-consent-link:focus-visible {
|
|
8823
|
+
outline: none;
|
|
8824
|
+
box-shadow: ${tokens.focusRing};
|
|
8825
|
+
}
|
|
8826
|
+
|
|
8709
8827
|
/* ========================================
|
|
8710
8828
|
ERROR VIEW
|
|
8711
8829
|
======================================== */
|
|
@@ -15818,6 +15936,8 @@ class VaultsModule {
|
|
|
15818
15936
|
/**
|
|
15819
15937
|
* Schedule permanent deletion in seven days and immediately lock all vault access.
|
|
15820
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.
|
|
15821
15941
|
*
|
|
15822
15942
|
* Requires the vault's exact name as confirmation, matched case-sensitively.
|
|
15823
15943
|
* The name is sent base64(UTF-8) as the `X-Confirm-Name-B64` header so a vault
|
|
@@ -15838,14 +15958,18 @@ class VaultsModule {
|
|
|
15838
15958
|
'X-Vault-Deletion-Mode': 'schedule',
|
|
15839
15959
|
},
|
|
15840
15960
|
});
|
|
15841
|
-
const
|
|
15961
|
+
const answer = response.data;
|
|
15962
|
+
if (answer.status === 'deleting') {
|
|
15963
|
+
return { id: answer.vault_id, status: answer.status, startedAt: answer.started_at };
|
|
15964
|
+
}
|
|
15842
15965
|
return {
|
|
15843
|
-
id:
|
|
15844
|
-
status:
|
|
15845
|
-
deletionRequestedAt:
|
|
15846
|
-
deletionScheduledFor:
|
|
15847
|
-
deletionRequestedBy:
|
|
15848
|
-
deletionScheduleId:
|
|
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),
|
|
15849
15973
|
};
|
|
15850
15974
|
}
|
|
15851
15975
|
/** Cancel this exact deletion schedule before its deadline; company admins only. */
|
|
@@ -16051,8 +16175,12 @@ function mapVaultDetail(v) {
|
|
|
16051
16175
|
createdAt: v.created_at,
|
|
16052
16176
|
lastUnsealedAt: v.last_unsealed_at ?? null,
|
|
16053
16177
|
unsealCount: v.unseal_count ?? 0,
|
|
16178
|
+
deletionNoticeUnreached: v.deletion_notice_unreached && v.deletion_notice_unreached.map(mapUnreachedAdmin),
|
|
16054
16179
|
};
|
|
16055
16180
|
}
|
|
16181
|
+
function mapUnreachedAdmin(wire) {
|
|
16182
|
+
return { userId: wire.user_id, name: wire.name, email: wire.email, reason: wire.reason };
|
|
16183
|
+
}
|
|
16056
16184
|
function mapSharingConfig$1(wire) {
|
|
16057
16185
|
return {
|
|
16058
16186
|
vaultId: wire.vault_id,
|
|
@@ -18316,7 +18444,7 @@ class SparkVault {
|
|
|
18316
18444
|
}
|
|
18317
18445
|
/** Get the SDK version */
|
|
18318
18446
|
static get version() {
|
|
18319
|
-
return '13.0.
|
|
18447
|
+
return '13.0.10';
|
|
18320
18448
|
}
|
|
18321
18449
|
}
|
|
18322
18450
|
if (typeof window !== 'undefined') {
|