@sparkvault/sdk-js 15.14.3 → 15.15.1

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
@@ -1313,6 +1313,20 @@ type NotifyDestinationReason = NotifyDestinationSkipReason | NotifyDestinationFa
1313
1313
  * start it (`deadline_reached`).
1314
1314
  */
1315
1315
  type NotifyDestinationTransportReason = 'network' | 'timeout' | 'unsent' | 'deadline_reached';
1316
+ /**
1317
+ * Why `updateConfig` refused a patch that lacks a field: the `details.reason`
1318
+ * of its 400 `VALIDATION_ERROR`, beside `details.missing`.
1319
+ *
1320
+ * - `secret_required_on_new_host`: a webhook destination's `url`, or
1321
+ * `events.webhook_url`, moved to another host or port without a new
1322
+ * `secret` beside it (`details.missing: ['secret']`). Saving again with a
1323
+ * new secret lands.
1324
+ * - `destination_incomplete`: the patch names a destination the account does
1325
+ * not hold, which is created with every field of its kind, and it lacks the
1326
+ * ones `details.missing` names. A partial patch of a destination removed
1327
+ * since it was read meets this too: read the config again.
1328
+ */
1329
+ type NotifyConfigRefusalReason = 'secret_required_on_new_host' | 'destination_incomplete';
1316
1330
  /**
1317
1331
  * The `reason` beside a test post's `skipped` or `failed`
1318
1332
  * (`testDestination`): a skip reason a send status reports, or, beside
@@ -1967,6 +1981,13 @@ interface NotifySendStatusDestination {
1967
1981
  * Teams workflow's host. Null when no attempt recorded one.
1968
1982
  */
1969
1983
  target: string | null;
1984
+ /**
1985
+ * The Slack channel's name beside its id in `target`, as the Slack
1986
+ * destination's `channel_name` read when the post was decided. Null for a
1987
+ * webhook or Teams post, whose host names itself, and for a Slack post whose
1988
+ * destination held no name.
1989
+ */
1990
+ target_name: string | null;
1970
1991
  }
1971
1992
  /**
1972
1993
  * A send's delivery state, DERIVED from its counters — the send row itself is
@@ -2265,8 +2286,9 @@ interface NotifyConfigSecurity {
2265
2286
  * link-local, and CGNAT addresses are rejected server-side). A patch names only
2266
2287
  * what it changes, but a `webhook_url` on another host or port than the
2267
2288
  * stored one needs a new `secret` in the same patch (400 `VALIDATION_ERROR`
2268
- * naming `events.secret`, `details.missing: ['secret']`): a secret never
2269
- * follows its URL to a different host. A patch of `events: null` removes the
2289
+ * naming `events.secret`, `details.missing: ['secret']`, `details.reason:
2290
+ * 'secret_required_on_new_host'`): a secret never follows its URL to a
2291
+ * different host. A patch of `events: null` removes the
2270
2292
  * webhook, URL and secret together, and no event is sent from then on; a
2271
2293
  * `null` for either field alone is refused 400.
2272
2294
  *
@@ -2349,6 +2371,16 @@ interface NotifySlackDestination {
2349
2371
  /** As `NotifyWebhookDestination['categories']`. */
2350
2372
  categories: string[];
2351
2373
  }
2374
+ /** The Slack destination as a read returns it: its channel by id and by name. */
2375
+ interface NotifySlackDestinationRead extends NotifySlackDestination {
2376
+ /**
2377
+ * The channel's name, without its `#`, as Slack named it when the last save
2378
+ * naming `channel_id` prepared it, so every such save refreshes it. Set by
2379
+ * the save, never by a patch (one naming it is refused 400). Null until a
2380
+ * save naming `channel_id` captures it.
2381
+ */
2382
+ channel_name: string | null;
2383
+ }
2352
2384
  /** A Microsoft Teams workflow as a destination, posted to through its webhook URL. */
2353
2385
  interface NotifyTeamsDestination {
2354
2386
  /**
@@ -2371,17 +2403,20 @@ interface NotifyTeamsDestinationRead {
2371
2403
  /** The destinations a config read returns, each present only once configured. */
2372
2404
  interface NotifyConfigDestinations {
2373
2405
  webhook?: NotifyWebhookDestinationRead;
2374
- slack?: NotifySlackDestination;
2406
+ slack?: NotifySlackDestinationRead;
2375
2407
  teams?: NotifyTeamsDestinationRead;
2376
2408
  }
2377
2409
  /**
2378
2410
  * A patch of the destinations: null removes the destination of its kind; an
2379
2411
  * object creates it, naming every field, or patches the one stored, naming
2380
- * only what it changes (a credential it leaves out stays as stored). A webhook
2412
+ * only what it changes (a credential it leaves out stays as stored); one
2413
+ * created without every field is refused 400 `VALIDATION_ERROR` with
2414
+ * `details.missing` and `details.reason: 'destination_incomplete'`. A webhook
2381
2415
  * `url` on another host or port than the stored one needs a new `secret` in
2382
2416
  * the same patch (400 `VALIDATION_ERROR` naming
2383
- * `destinations.webhook.secret`, `details.missing: ['secret']`): a secret
2384
- * never follows its URL to a different host.
2417
+ * `destinations.webhook.secret`, `details.missing: ['secret']`,
2418
+ * `details.reason: 'secret_required_on_new_host'`): a secret never follows its
2419
+ * URL to a different host. (`NotifyConfigRefusalReason`)
2385
2420
  */
2386
2421
  interface NotifyConfigDestinationsPatch {
2387
2422
  webhook?: Partial<NotifyWebhookDestination> | null;
@@ -2464,6 +2499,13 @@ type NotifyConfigOverrides = Omit<NotifyConfigPatch, 'events' | 'destinations'>
2464
2499
  interface NotifyConfigResponse {
2465
2500
  effective: NotifyConfig;
2466
2501
  overrides: NotifyConfigOverrides;
2502
+ /**
2503
+ * The version of the stored configuration this answer shows: 0 before
2504
+ * anything is saved, one higher with each save that lands. Of two answers
2505
+ * to overlapping saves, which can arrive in either order, the one with the
2506
+ * higher version is the newer configuration.
2507
+ */
2508
+ version: number;
2467
2509
  }
2468
2510
 
2469
2511
  /**
@@ -2777,10 +2819,13 @@ declare class NotifyProductModule {
2777
2819
  /**
2778
2820
  * The account's effective Notify config (secure defaults deep-merged with its
2779
2821
  * overrides) plus the raw override delta, so an editor can show what is
2780
- * customized versus default.
2822
+ * customized versus default, and the `version` of the stored config they
2823
+ * show (0 before anything is saved, one higher with each save). Answers can
2824
+ * arrive out of order, as two overlapping `updateConfig` calls' can: the one
2825
+ * with the higher `version` is the newer config, so keep that one.
2781
2826
  *
2782
2827
  * @example
2783
- * const { effective, overrides } = await sv.products.notify.getConfig();
2828
+ * const { effective, overrides, version } = await sv.products.notify.getConfig();
2784
2829
  */
2785
2830
  getConfig(): Promise<NotifyConfigResponse>;
2786
2831
  /**
@@ -2811,7 +2856,8 @@ declare class NotifyProductModule {
2811
2856
  * (`details: { sections, required_role: 'admin' }`). A ladder naming a channel
2812
2857
  * other than `in_app` and `email` is refused 403 `NOTIFY_CHANNEL_NOT_AVAILABLE`
2813
2858
  * (`details: { field, channels }`); a save that overlapping saves kept
2814
- * outracing is refused 409 `CONFLICT`: reload and patch again.
2859
+ * outracing is refused 409 `CONFLICT`: reload and patch again. A save answers
2860
+ * as `getConfig` does, its `version` the one this save wrote.
2815
2861
  *
2816
2862
  * @example
2817
2863
  * await sv.products.notify.updateConfig({
@@ -6269,4 +6315,4 @@ declare global {
6269
6315
  }
6270
6316
 
6271
6317
  export { AuthenticationError, AuthorizationError, EntropyModule, FoldersModule, HelpDeskClient, HelpDeskModule, IdentityModule, IdentityProviderError, IngotsModule, MessagingModule, NAME_CONFLICT_POLICIES, NOTIFY_PRESETS, NetworkError, NotifyModule, NotifyProductModule, NotifyProjectsModule, NotifySubscriptionRequiredError, PlanRequiredError, PopupBlockedError, ProductsModule, QuotaExceededError, SparkVault, SparkVaultError, SparksModule, StructuredIngotTypesModule, StructuredIngotsModule, TimeoutError, UnauthorizedError, UsageCreditFundingReviewError, UsageCreditsExhaustedError, UserCancelledError, ValidationError, VaultsModule, buildNotifyPresetSend, SparkVault as default, fetchDownload, isReceivedUploadFailure, logger, setDebugMode };
6272
- export type { AccessLogRetention, AccessLogsOptions, BatchGetStructuredIngotsOptions, CreateFolderOptions, CreateMessagingConversationOptions, CreateNotifyProjectOptions, CreateNotifySendOptions, CreateSparkOptions, CreateStructuredIngotOptions, CreateStructuredTypeOptions, CreateUploadOptions, CreateVaultOptions, CreatedIngot, CreatedSpark, DeleteIngotOptions, DeleteStructuredIngotOptions, DownloadIngotOptions, EntropyFormat, EntropyResult, FetchDownloadOptions, FetchedDownload, Folder, FolderBreadcrumbItem, FolderContents, FolderPage, GenerateEntropyOptions, GetStructuredIngotOptions, HealthCheckOptions, HealthCheckResult, HelpDeskAttachmentDownload, HelpDeskAttachmentInput, HelpDeskAttachmentUpload, HelpDeskConnectOptions, HelpDeskCreateTicketOptions, HelpDeskCustomer, HelpDeskCustomerPatch, HelpDeskDesk, HelpDeskDraft, HelpDeskEvent, HelpDeskExternalChallenge, HelpDeskExternalIdentity, HelpDeskFormHandle, HelpDeskFormOptions, HelpDeskFormState, HelpDeskIdentityRequest, HelpDeskListTicketsOptions, HelpDeskMountFormOptions, HelpDeskOpenFormOptions, HelpDeskPinChallenge, HelpDeskReplyCreated, HelpDeskReplyOptions, HelpDeskRequestContext, HelpDeskSession, HelpDeskSessionChange, HelpDeskSupportHandle, HelpDeskSupportLauncherOptions, HelpDeskSupportOpenOptions, HelpDeskSupportOptions, HelpDeskSupportStage, HelpDeskSupportState, HelpDeskTicket, HelpDeskTicketCreated, HelpDeskTicketDetail, HelpDeskTicketList, HelpDeskTimeline, HelpDeskVerifyPinOptions, HelpDeskWidgetFormIdentity, HelpDeskWidgetIdentityChallenge, HelpDeskWidgetIdentityOptions, HelpDeskWidgetIdentitySession, AttachOptions as IdentityAttachOptions, ImportStructuredIngotsOptions, Ingot, IngotAccessLog, IngotAccessLogPage, IngotDownload, IngotDownloadLink, IngotHistory, IngotInvitation, IngotInvite, IngotPage, IngotSharingConfig, IngotUpload, IngotVersion, IngotVersionDownloadLink, InitiateMessagingAttachmentOptions, ListContentsOptions, ListFoldersOptions, ListIngotsOptions, ListMessagingInboxOptions, ListNotificationsOptions, ListNotificationsResponse, ListNotifyInboxOptions, ListNotifyInboxResponse, ListNotifyProjectsResponse, ListNotifyReceiptsOptions, ListNotifyReceiptsResponse, ListNotifySendsOptions, ListNotifySendsResponse, ListSparksOptions, MarkAllNotificationsStateOptions, MarkAllNotificationsStateResponse, MarkAllReadResult, MarkNotificationStateOptions, MarkNotificationStateResponse, MarkNotifyInboxAllOptions, MarkNotifyInboxAllResponse, MarkNotifyInboxStateOptions, MarkNotifyInboxStateResponse, MessagingAttachment, MessagingAttachmentDownload, MessagingAttachmentUpload, MessagingContentMessage, MessagingConversation, MessagingConversationCreated, MessagingConversationSettings, MessagingIdentity, MessagingInboxCursor, MessagingInboxEntry, MessagingInboxPage, MessagingInviteResult, MessagingMessage, MessagingMessageReceipt, MessagingParticipant, MessagingParticipantInput, MessagingReadResult, MessagingRecalledMessage, MessagingReceiptToken, MessagingRecipientIdentity, MessagingSendResult, MessagingUnavailableMessage, NameConflictPolicy, NotificationBulkMarkState, NotificationInboxState, NotificationMarkState, NotificationRow, NotificationSender, NotifyCategory, NotifyChannel, NotifyConfig, NotifyConfigCategory, NotifyConfigDelivery, NotifyConfigDeliveryPatch, NotifyConfigDestinations, NotifyConfigDestinationsPatch, NotifyConfigEvents, NotifyConfigEventsRead, NotifyConfigHistory, NotifyConfigOverrides, NotifyConfigPatch, NotifyConfigRealtimeFallbackDelay, NotifyConfigReliability, NotifyConfigResponse, NotifyConfigSecurity, NotifyDeliveryMode, NotifyDestinationFailureReason, NotifyDestinationKind, NotifyDestinationReason, NotifyDestinationSkipReason, NotifyDestinationState, NotifyDestinationTestReason, NotifyDestinationTestResult, NotifyDestinationTransportReason, NotifyEscalation, NotifyInboxBulkMarkState, NotifyInboxMarkState, NotifyInboxRow, NotifyInboxView, NotifyIngotRef, NotifyInteraction, NotifyPreset, NotifyPresetCategory, NotifyPresetName, NotifyPresetSendOptions, NotifyProject, NotifyProjectBilling, NotifyProjectStatus, NotifyProjectSubscriptionPreview, NotifyProjectSubscriptionResponse, NotifyProjectUsage, NotifyRecallMode, NotifyReceipt, NotifyReceiptEventType, NotifyRecipient, NotifyRecipientRef, NotifyRecipientState, NotifyReportableVerificationLevel, NotifySendContent, NotifySendPolicy, NotifySendReceipt, NotifySendReceiptsResponse, NotifySendResult, NotifySendState, NotifySendStatus, NotifySendStatusCounts, NotifySendStatusDestination, NotifySendStatusRecipient, NotifySendSummary, NotifySendSummaryDestination, NotifySlackDestination, NotifySuppressionReason, NotifyTeamsDestination, NotifyTeamsDestinationRead, NotifyVerificationLevel, NotifyWebhookDestination, NotifyWebhookDestinationRead, PatchStructuredIngotOptions, PortableStructuredIngot, PortableStructuredType, PreviewNotifyProjectSubscriptionOptions, PublishStructuredTypeOptions, QuotaResource, ReadMessagingConversationOptions, RecallNotifySendOptions, RecallNotifySendResponse, RegisterWebPushResponse, ReplaceIngotOptions, RestoreStructuredIngotOptions, ResumeUploadOptions, ScheduledVaultDeletion, SearchIngotsOptions, SendMessagingMessageOptions, SendUploadOptions, ShareSparkOptions, SignInOptions, SignInResult, Spark, SparkInviteResend, SparkLinkActionOptions, SparkPage, SparkShare, SparkSummary, SparkVaultConfig, SparkVisibility, StartedVaultDeletion, StructuredAccountActivity, StructuredActivity, StructuredActivityOptions, StructuredActivityPeriod, StructuredActivityTotals, StructuredActivityTotalsWire, StructuredActivityWire, StructuredBinaryPath, StructuredExportOutcome, StructuredImportOutcome, StructuredIngot, StructuredIngotHistory, StructuredIngotMutation, StructuredIngotPrecondition, StructuredIngotSummary, StructuredIngotSummaryWire, StructuredIngotVersion, StructuredIngotWire, StructuredIterateOptions, StructuredJsonValue, StructuredMutationWire, StructuredOutcome, StructuredPage, StructuredPageOptions, StructuredPageWire, StructuredReadOutcome, StructuredTypeCreation, StructuredTypeDefinition, StructuredTypeDefinitionWire, StructuredTypePin, StructuredTypePinWire, StructuredTypeSummary, StructuredTypeSummaryWire, StructuredTypeTransform, StructuredValues, StructuredVaultActivity, SubscribeNotifyProjectOptions, SubscribeWebPushOptions, SubscribeWebPushResult, SubscribeWebPushStatus, TokenClaims, UnreachedAdmin, UnreadCountResponse, UnsealVaultOptions, UnsealedVault, UnsubscribeWebPushResponse, UpdateFolderOptions, UpdateIngotSharingOptions, UpdateNotifyProjectOptions, UpdateVaultUploadOptions, UpdatedVault, UploadAttachOptions, UploadBranding, UploadEnd, UploadIngotOptions, UploadOptions, UploadProgress, UploadResult, UploadSession, Vault, VaultDetail, VaultLifecycle, VaultResealDefaults, VaultResealSettings, VaultResealSettingsResult, VaultSessionExtension, VaultSessionTiming, VaultSharingConfig, VaultSharingOptions, VaultSummary, VaultUploadConfig, VaultUploadSettings, VerifyOptions, VerifyResult, WebPushKeyResponse, WebPushStatus, WebPushStatusOptions, WebPushStatusResult, WebPushSubscriptionInput };
6318
+ export type { AccessLogRetention, AccessLogsOptions, BatchGetStructuredIngotsOptions, CreateFolderOptions, CreateMessagingConversationOptions, CreateNotifyProjectOptions, CreateNotifySendOptions, CreateSparkOptions, CreateStructuredIngotOptions, CreateStructuredTypeOptions, CreateUploadOptions, CreateVaultOptions, CreatedIngot, CreatedSpark, DeleteIngotOptions, DeleteStructuredIngotOptions, DownloadIngotOptions, EntropyFormat, EntropyResult, FetchDownloadOptions, FetchedDownload, Folder, FolderBreadcrumbItem, FolderContents, FolderPage, GenerateEntropyOptions, GetStructuredIngotOptions, HealthCheckOptions, HealthCheckResult, HelpDeskAttachmentDownload, HelpDeskAttachmentInput, HelpDeskAttachmentUpload, HelpDeskConnectOptions, HelpDeskCreateTicketOptions, HelpDeskCustomer, HelpDeskCustomerPatch, HelpDeskDesk, HelpDeskDraft, HelpDeskEvent, HelpDeskExternalChallenge, HelpDeskExternalIdentity, HelpDeskFormHandle, HelpDeskFormOptions, HelpDeskFormState, HelpDeskIdentityRequest, HelpDeskListTicketsOptions, HelpDeskMountFormOptions, HelpDeskOpenFormOptions, HelpDeskPinChallenge, HelpDeskReplyCreated, HelpDeskReplyOptions, HelpDeskRequestContext, HelpDeskSession, HelpDeskSessionChange, HelpDeskSupportHandle, HelpDeskSupportLauncherOptions, HelpDeskSupportOpenOptions, HelpDeskSupportOptions, HelpDeskSupportStage, HelpDeskSupportState, HelpDeskTicket, HelpDeskTicketCreated, HelpDeskTicketDetail, HelpDeskTicketList, HelpDeskTimeline, HelpDeskVerifyPinOptions, HelpDeskWidgetFormIdentity, HelpDeskWidgetIdentityChallenge, HelpDeskWidgetIdentityOptions, HelpDeskWidgetIdentitySession, AttachOptions as IdentityAttachOptions, ImportStructuredIngotsOptions, Ingot, IngotAccessLog, IngotAccessLogPage, IngotDownload, IngotDownloadLink, IngotHistory, IngotInvitation, IngotInvite, IngotPage, IngotSharingConfig, IngotUpload, IngotVersion, IngotVersionDownloadLink, InitiateMessagingAttachmentOptions, ListContentsOptions, ListFoldersOptions, ListIngotsOptions, ListMessagingInboxOptions, ListNotificationsOptions, ListNotificationsResponse, ListNotifyInboxOptions, ListNotifyInboxResponse, ListNotifyProjectsResponse, ListNotifyReceiptsOptions, ListNotifyReceiptsResponse, ListNotifySendsOptions, ListNotifySendsResponse, ListSparksOptions, MarkAllNotificationsStateOptions, MarkAllNotificationsStateResponse, MarkAllReadResult, MarkNotificationStateOptions, MarkNotificationStateResponse, MarkNotifyInboxAllOptions, MarkNotifyInboxAllResponse, MarkNotifyInboxStateOptions, MarkNotifyInboxStateResponse, MessagingAttachment, MessagingAttachmentDownload, MessagingAttachmentUpload, MessagingContentMessage, MessagingConversation, MessagingConversationCreated, MessagingConversationSettings, MessagingIdentity, MessagingInboxCursor, MessagingInboxEntry, MessagingInboxPage, MessagingInviteResult, MessagingMessage, MessagingMessageReceipt, MessagingParticipant, MessagingParticipantInput, MessagingReadResult, MessagingRecalledMessage, MessagingReceiptToken, MessagingRecipientIdentity, MessagingSendResult, MessagingUnavailableMessage, NameConflictPolicy, NotificationBulkMarkState, NotificationInboxState, NotificationMarkState, NotificationRow, NotificationSender, NotifyCategory, NotifyChannel, NotifyConfig, NotifyConfigCategory, NotifyConfigDelivery, NotifyConfigDeliveryPatch, NotifyConfigDestinations, NotifyConfigDestinationsPatch, NotifyConfigEvents, NotifyConfigEventsRead, NotifyConfigHistory, NotifyConfigOverrides, NotifyConfigPatch, NotifyConfigRealtimeFallbackDelay, NotifyConfigRefusalReason, NotifyConfigReliability, NotifyConfigResponse, NotifyConfigSecurity, NotifyDeliveryMode, NotifyDestinationFailureReason, NotifyDestinationKind, NotifyDestinationReason, NotifyDestinationSkipReason, NotifyDestinationState, NotifyDestinationTestReason, NotifyDestinationTestResult, NotifyDestinationTransportReason, NotifyEscalation, NotifyInboxBulkMarkState, NotifyInboxMarkState, NotifyInboxRow, NotifyInboxView, NotifyIngotRef, NotifyInteraction, NotifyPreset, NotifyPresetCategory, NotifyPresetName, NotifyPresetSendOptions, NotifyProject, NotifyProjectBilling, NotifyProjectStatus, NotifyProjectSubscriptionPreview, NotifyProjectSubscriptionResponse, NotifyProjectUsage, NotifyRecallMode, NotifyReceipt, NotifyReceiptEventType, NotifyRecipient, NotifyRecipientRef, NotifyRecipientState, NotifyReportableVerificationLevel, NotifySendContent, NotifySendPolicy, NotifySendReceipt, NotifySendReceiptsResponse, NotifySendResult, NotifySendState, NotifySendStatus, NotifySendStatusCounts, NotifySendStatusDestination, NotifySendStatusRecipient, NotifySendSummary, NotifySendSummaryDestination, NotifySlackDestination, NotifySlackDestinationRead, NotifySuppressionReason, NotifyTeamsDestination, NotifyTeamsDestinationRead, NotifyVerificationLevel, NotifyWebhookDestination, NotifyWebhookDestinationRead, PatchStructuredIngotOptions, PortableStructuredIngot, PortableStructuredType, PreviewNotifyProjectSubscriptionOptions, PublishStructuredTypeOptions, QuotaResource, ReadMessagingConversationOptions, RecallNotifySendOptions, RecallNotifySendResponse, RegisterWebPushResponse, ReplaceIngotOptions, RestoreStructuredIngotOptions, ResumeUploadOptions, ScheduledVaultDeletion, SearchIngotsOptions, SendMessagingMessageOptions, SendUploadOptions, ShareSparkOptions, SignInOptions, SignInResult, Spark, SparkInviteResend, SparkLinkActionOptions, SparkPage, SparkShare, SparkSummary, SparkVaultConfig, SparkVisibility, StartedVaultDeletion, StructuredAccountActivity, StructuredActivity, StructuredActivityOptions, StructuredActivityPeriod, StructuredActivityTotals, StructuredActivityTotalsWire, StructuredActivityWire, StructuredBinaryPath, StructuredExportOutcome, StructuredImportOutcome, StructuredIngot, StructuredIngotHistory, StructuredIngotMutation, StructuredIngotPrecondition, StructuredIngotSummary, StructuredIngotSummaryWire, StructuredIngotVersion, StructuredIngotWire, StructuredIterateOptions, StructuredJsonValue, StructuredMutationWire, StructuredOutcome, StructuredPage, StructuredPageOptions, StructuredPageWire, StructuredReadOutcome, StructuredTypeCreation, StructuredTypeDefinition, StructuredTypeDefinitionWire, StructuredTypePin, StructuredTypePinWire, StructuredTypeSummary, StructuredTypeSummaryWire, StructuredTypeTransform, StructuredValues, StructuredVaultActivity, SubscribeNotifyProjectOptions, SubscribeWebPushOptions, SubscribeWebPushResult, SubscribeWebPushStatus, TokenClaims, UnreachedAdmin, UnreadCountResponse, UnsealVaultOptions, UnsealedVault, UnsubscribeWebPushResponse, UpdateFolderOptions, UpdateIngotSharingOptions, UpdateNotifyProjectOptions, UpdateVaultUploadOptions, UpdatedVault, UploadAttachOptions, UploadBranding, UploadEnd, UploadIngotOptions, UploadOptions, UploadProgress, UploadResult, UploadSession, Vault, VaultDetail, VaultLifecycle, VaultResealDefaults, VaultResealSettings, VaultResealSettingsResult, VaultSessionExtension, VaultSessionTiming, VaultSharingConfig, VaultSharingOptions, VaultSummary, VaultUploadConfig, VaultUploadSettings, VerifyOptions, VerifyResult, WebPushKeyResponse, WebPushStatus, WebPushStatusOptions, WebPushStatusResult, WebPushSubscriptionInput };
package/dist/index.mjs CHANGED
@@ -4047,6 +4047,9 @@ class LoadingView {
4047
4047
  /** The terms of service, published once, on the marketing site. */
4048
4048
  const TERMS_URL = 'https://sparkvault.com/terms/';
4049
4049
 
4050
+ /** The privacy policy, published once, on the marketing site. */
4051
+ const PRIVACY_URL = 'https://sparkvault.com/privacy/';
4052
+
4050
4053
  /**
4051
4054
  * Beside every field where a person enters a phone number SparkVault texts or
4052
4055
  * calls (the sign-in field and the backup phone of Identity's sign-in, in
@@ -4055,17 +4058,26 @@ const TERMS_URL = 'https://sparkvault.com/terms/';
4055
4058
  * text or a call: a phone number the sign-in was handed reaches the picker
4056
4059
  * without passing the field. The terms take the consent from whoever provides
4057
4060
  * the number, so the words fit a number typed and a number handed over alike.
4058
- * It agrees with the terms' SMS and voice disclosures (apps/www/terms.md 15.2,
4059
- * held to them by apps/www/tests/consent-lines.test.mjs): STOP opts the number
4060
- * out, HELP answers, rates may apply, and where texts and calls go and how to
4061
- * opt back in (START or UNSTOP) are the terms' to say.
4061
+ * A carrier approves the number SparkVault texts from only when this line, its
4062
+ * call to action, names the service, the consent, how often messages come,
4063
+ * that rates may apply, how to opt out and get help, and links the terms and
4064
+ * the privacy policy, so it says each of them. It agrees with the terms' SMS
4065
+ * and voice disclosures and the privacy policy (apps/www/terms.md 15,
4066
+ * apps/www/privacy.md 1.1, held to them by
4067
+ * apps/www/tests/consent-lines.test.mjs): texts carry the codes, alerts and
4068
+ * notifications they name and calls only the codes, STOP opts the number out,
4069
+ * HELP answers, frequency varies, rates may apply, and where texts and calls
4070
+ * go and how to opt back in (START or UNSTOP) are the terms' to say.
4062
4071
  */
4063
4072
  const SMS_CONSENT = Object.freeze({
4064
- beforeTerms: 'By providing a phone number, you agree to receive verification codes and account messages from SparkVault by text or automated call, as its ',
4073
+ beforeTerms: 'By providing a phone number, you agree to receive texts from SparkVault with verification codes, security alerts and account notifications, and automated calls with verification codes, as its ',
4065
4074
  terms: 'Terms',
4066
- afterTerms: ' describe. Message and data rates may apply. Reply STOP to opt out or HELP for help.'
4075
+ beforePrivacy: ' and ',
4076
+ privacy: 'Privacy Policy',
4077
+ afterPrivacy: ' describe. Message frequency varies. Message and data rates may apply. Reply STOP to opt out or HELP for help.'
4067
4078
  });
4068
4079
 
4080
+ /* global HTMLAnchorElement */
4069
4081
  /**
4070
4082
  * SMS and Voice Consent
4071
4083
  *
@@ -4075,8 +4087,19 @@ const SMS_CONSENT = Object.freeze({
4075
4087
  * under the method picker wherever it offers a text or a call. It describes
4076
4088
  * the field or the methods above it, so a screen reader reads it with them.
4077
4089
  */
4090
+ /** A document the line names, linked in place and opening in a new tab. */
4091
+ function documentLink(name, href) {
4092
+ const link = document.createElement('a');
4093
+ link.className = 'sv-sms-consent-link';
4094
+ link.href = href;
4095
+ link.target = '_blank';
4096
+ link.rel = 'noopener noreferrer';
4097
+ link.textContent = name;
4098
+ return link;
4099
+ }
4078
4100
  /**
4079
- * The consent line, its "Terms" opening the terms in a new tab.
4101
+ * The consent line, its "Terms" and "Privacy Policy" opening those documents
4102
+ * in a new tab.
4080
4103
  *
4081
4104
  * @param id - The line's id, which the field or each method names in its `aria-describedby`
4082
4105
  */
@@ -4084,13 +4107,7 @@ function smsConsent(id) {
4084
4107
  const line = document.createElement('p');
4085
4108
  line.className = 'sv-sms-consent';
4086
4109
  line.id = id;
4087
- const terms = document.createElement('a');
4088
- terms.className = 'sv-sms-consent-link';
4089
- terms.href = TERMS_URL;
4090
- terms.target = '_blank';
4091
- terms.rel = 'noopener noreferrer';
4092
- terms.textContent = SMS_CONSENT.terms;
4093
- line.append(SMS_CONSENT.beforeTerms, terms, SMS_CONSENT.afterTerms);
4110
+ line.append(SMS_CONSENT.beforeTerms, documentLink(SMS_CONSENT.terms, TERMS_URL), SMS_CONSENT.beforePrivacy, documentLink(SMS_CONSENT.privacy, PRIVACY_URL), SMS_CONSENT.afterPrivacy);
4094
4111
  return line;
4095
4112
  }
4096
4113
 
@@ -8257,7 +8274,7 @@ function getStyles(options) {
8257
8274
  };
8258
8275
  return `
8259
8276
  /* ========================================
8260
- MOTION SYSTEM — shared duration/easing tokens so every transition in
8277
+ MOTION SYSTEM: shared duration/easing tokens so every transition in
8261
8278
  the flow is consistent. 120/180/280ms tiers; standard and decelerate
8262
8279
  curves only, never overshoot.
8263
8280
  ======================================== */
@@ -8546,7 +8563,7 @@ function getStyles(options) {
8546
8563
  background: ${tokens.primaryHover};
8547
8564
  }
8548
8565
 
8549
- /* Secondary Button — quiet: subtle fill, hairline border */
8566
+ /* Secondary Button, quiet: subtle fill, hairline border */
8550
8567
  .sv-btn-secondary {
8551
8568
  background: ${tokens.bgSubtle};
8552
8569
  color: ${tokens.textPrimary};
@@ -8558,7 +8575,7 @@ function getStyles(options) {
8558
8575
  border-color: ${tokens.borderHover};
8559
8576
  }
8560
8577
 
8561
- /* Method Button — a full-width row with a nudging chevron affordance
8578
+ /* Method Button: a full-width row with a nudging chevron affordance
8562
8579
  (added via ::after so no DOM change is needed). The card itself stays
8563
8580
  planted: hover is a quiet fill + border shift, no translate. */
8564
8581
  .sv-btn-method {
@@ -8638,7 +8655,7 @@ function getStyles(options) {
8638
8655
  width: 100%;
8639
8656
  }
8640
8657
 
8641
- /* Bare glyph slot — no container chrome. Quiet slate stroke that takes
8658
+ /* Bare glyph slot, no container chrome. Quiet slate stroke that takes
8642
8659
  the accent on row hover. */
8643
8660
  .sv-method-icon {
8644
8661
  width: 20px;
@@ -8907,8 +8924,8 @@ function getStyles(options) {
8907
8924
  }
8908
8925
 
8909
8926
  /* The SMS and voice consent under a phone number field: fine print in the
8910
- secondary ink, its link underlined in the same ink so it reads as a link
8911
- without a second color. */
8927
+ secondary ink, its links underlined in the same ink so each reads as a
8928
+ link without a second color. */
8912
8929
  .sv-sms-consent {
8913
8930
  margin: 8px 0 0;
8914
8931
  font-size: 12px;
@@ -9367,7 +9384,7 @@ function getStyles(options) {
9367
9384
  margin-bottom: 16px;
9368
9385
  }
9369
9386
 
9370
- /* Bare glyph — no tinted circle container. */
9387
+ /* Bare glyph, no tinted circle container. */
9371
9388
  .sv-sparklink-icon {
9372
9389
  width: 48px;
9373
9390
  height: 48px;
@@ -11158,7 +11175,7 @@ class IdentityModule {
11158
11175
  throw new ValidationError('Invalid OAuth state');
11159
11176
  }
11160
11177
  if (!codeVerifier) {
11161
- throw new ValidationError('Sign-in session was lost — please sign in again.');
11178
+ throw new ValidationError('Sign-in session was lost. Please sign in again.');
11162
11179
  }
11163
11180
  // WHICH account the code carries is settled where it is minted, never
11164
11181
  // here: the code is PKCE- and origin-bound to this tab, and a recovery
@@ -12150,10 +12167,13 @@ class NotifyProductModule {
12150
12167
  /**
12151
12168
  * The account's effective Notify config (secure defaults deep-merged with its
12152
12169
  * overrides) plus the raw override delta, so an editor can show what is
12153
- * customized versus default.
12170
+ * customized versus default, and the `version` of the stored config they
12171
+ * show (0 before anything is saved, one higher with each save). Answers can
12172
+ * arrive out of order, as two overlapping `updateConfig` calls' can: the one
12173
+ * with the higher `version` is the newer config, so keep that one.
12154
12174
  *
12155
12175
  * @example
12156
- * const { effective, overrides } = await sv.products.notify.getConfig();
12176
+ * const { effective, overrides, version } = await sv.products.notify.getConfig();
12157
12177
  */
12158
12178
  async getConfig() {
12159
12179
  const response = await this.http.get(this.path `/v1/products/notify/config`);
@@ -12187,7 +12207,8 @@ class NotifyProductModule {
12187
12207
  * (`details: { sections, required_role: 'admin' }`). A ladder naming a channel
12188
12208
  * other than `in_app` and `email` is refused 403 `NOTIFY_CHANNEL_NOT_AVAILABLE`
12189
12209
  * (`details: { field, channels }`); a save that overlapping saves kept
12190
- * outracing is refused 409 `CONFLICT`: reload and patch again.
12210
+ * outracing is refused 409 `CONFLICT`: reload and patch again. A save answers
12211
+ * as `getConfig` does, its `version` the one this save wrote.
12191
12212
  *
12192
12213
  * @example
12193
12214
  * await sv.products.notify.updateConfig({
@@ -27077,7 +27098,7 @@ class SparkVault {
27077
27098
  }
27078
27099
  /** Get the SDK version */
27079
27100
  static get version() {
27080
- return '15.14.3';
27101
+ return '15.15.1';
27081
27102
  }
27082
27103
  }
27083
27104
  if (typeof window !== 'undefined') {