@sparkvault/sdk-js 13.2.1 → 13.4.0
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 +47 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +82 -43
- package/dist/index.mjs +47 -11
- package/dist/index.mjs.map +1 -1
- package/dist/notify/index.d.ts +4 -3
- package/dist/notify/types.d.ts +32 -9
- package/dist/products/notify/index.d.ts +4 -2
- package/dist/products/notify/types.d.ts +43 -30
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -604,10 +604,12 @@ declare class IdentityModule {
|
|
|
604
604
|
/**
|
|
605
605
|
* Notify Module Types
|
|
606
606
|
*
|
|
607
|
-
* SparkVault's
|
|
608
|
-
* `in_app` to
|
|
607
|
+
* A signed-in SparkVault user's own feed: the notifications SparkVault itself
|
|
608
|
+
* delivered `in_app` to them and those their own organization's Notify did, as
|
|
609
|
+
* one feed, each row saying which (`from`). Unlike Entropy/Sparks, notification
|
|
609
610
|
* ROWS are NOT remapped to camelCase: their fields mirror the wire, and a tenant's
|
|
610
|
-
* sender-side feed (`sv.products.notify.getInbox`) returns the same row
|
|
611
|
+
* sender-side feed (`sv.products.notify.getInbox`) returns the same row without
|
|
612
|
+
* `from`, since it reads one sending account's inbox. A row carries
|
|
611
613
|
* its cleartext part (`title`, and for a cleartext send a short `body`) natively;
|
|
612
614
|
* a SECURE send's content is never carried here — it lives behind the SparkLink
|
|
613
615
|
* `sparklink_code`. Keeping the wire shape verbatim is the single source of truth
|
|
@@ -620,13 +622,27 @@ type NotificationInboxState = 'all' | 'unseen' | 'unread' | 'archived';
|
|
|
620
622
|
/** Terminal display states the recipient can apply to one of their rows. */
|
|
621
623
|
type NotificationMarkState = 'seen' | 'read' | 'archived';
|
|
622
624
|
/**
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
*
|
|
626
|
-
*
|
|
627
|
-
* SECONDS.
|
|
625
|
+
* Who a row of the person's own feed is from: SparkVault itself, or their own
|
|
626
|
+
* organization by its name. `name` is null when the organization has no name the
|
|
627
|
+
* feed can show (none, or one that reads as SparkVault's): label such a row
|
|
628
|
+
* generically, never as SparkVault's.
|
|
628
629
|
*/
|
|
629
|
-
|
|
630
|
+
type NotificationSender = {
|
|
631
|
+
type: 'sparkvault';
|
|
632
|
+
} | {
|
|
633
|
+
type: 'organization';
|
|
634
|
+
name: string | null;
|
|
635
|
+
};
|
|
636
|
+
/**
|
|
637
|
+
* An inbox row in the two-part notification model, as one sending account's
|
|
638
|
+
* inbox read (`sv.products.notify.getInbox`) returns it: no `from`, since the
|
|
639
|
+
* sender reading its own inbox is who sent every row in it. The `title` (and,
|
|
640
|
+
* for a cleartext send, the short `body`) is the NON-sensitive cleartext part,
|
|
641
|
+
* shown natively. A SECURE send's content lives behind the SparkLink
|
|
642
|
+
* (`sparklink_code`) and is never carried here — open the pointer to reveal it.
|
|
643
|
+
* Timestamps are epoch SECONDS.
|
|
644
|
+
*/
|
|
645
|
+
interface NotifyInboxRow {
|
|
630
646
|
notification_id: string;
|
|
631
647
|
send_id: string;
|
|
632
648
|
created_at: number;
|
|
@@ -673,6 +689,13 @@ interface NotificationRow {
|
|
|
673
689
|
*/
|
|
674
690
|
recalled: boolean;
|
|
675
691
|
}
|
|
692
|
+
/**
|
|
693
|
+
* A row of the person's own feed: an inbox row, and who sent it. Show `from` on
|
|
694
|
+
* every row: an organization's title alone could read as SparkVault's own.
|
|
695
|
+
*/
|
|
696
|
+
interface NotificationRow extends NotifyInboxRow {
|
|
697
|
+
from: NotificationSender;
|
|
698
|
+
}
|
|
676
699
|
interface ListNotificationsOptions {
|
|
677
700
|
state?: NotificationInboxState;
|
|
678
701
|
/** Page size, 1-100 (server default 50). */
|
|
@@ -1013,14 +1036,14 @@ interface UpdateVaultUploadOptions {
|
|
|
1013
1036
|
/**
|
|
1014
1037
|
* Every transport the dispatch seam can carry a notification on: what a send's
|
|
1015
1038
|
* status, a stored ladder and a config read can name. An organization's own
|
|
1016
|
-
* send, and its config's ladders, may name
|
|
1039
|
+
* send, and its config's ladders, may name four of them:
|
|
1017
1040
|
*
|
|
1018
1041
|
* | Channel | An organization's send |
|
|
1019
1042
|
* | --- | --- |
|
|
1020
1043
|
* | `in_app` | Delivered by the notification's row in your Notify inbox, which your app reads through `getInbox`: the inbox lists a recipient's row when their `in_app` step runs, at once when it leads the ladder and only when that step comes due when it follows `email` (a stop that ends the ladder first, such as an unsubscribe on a non-critical send or a recall, leaves it unlisted), so a send naming `email` alone lists nothing there, and neither does one to a recipient who switched In-app off for your site on auth.sv (any send but a `security` one, which crosses that switch) |
|
|
1021
1044
|
* | `email` | Goes out from your organization's own sender (`getEmailSender`) |
|
|
1045
|
+
* | `push`, `web_push` | Reach the devices an active member of your organization, addressed by their SparkVault user id (`usr_*`), registered with SparkVault (its phone app and browser push), titled with your organization's name first; dropped from the ladder of a recipient with none |
|
|
1022
1046
|
* | `sms`, `voice`, `whatsapp`, `rcs` | Refused 403 `NOTIFY_CHANNEL_NOT_AVAILABLE`: Notify delivers no text, call or chat message |
|
|
1023
|
-
* | `push`, `web_push` | Refused 403 `NOTIFY_CHANNEL_NOT_AVAILABLE`: SparkVault's own devices only |
|
|
1024
1047
|
* | `webhook`, `slack`, `teams` | Refused 403 `NOTIFY_CHANNEL_NOT_AVAILABLE`: SparkVault's own destinations only |
|
|
1025
1048
|
*/
|
|
1026
1049
|
type NotifyChannel = 'in_app' | 'email' | 'sms' | 'push' | 'web_push' | 'voice' | 'whatsapp' | 'rcs' | 'webhook' | 'slack' | 'teams';
|
|
@@ -1031,7 +1054,7 @@ type NotifyChannel = 'in_app' | 'email' | 'sms' | 'push' | 'web_push' | 'voice'
|
|
|
1031
1054
|
* - `plaintext`: a short non-confidential body rendered INLINE in the channel
|
|
1032
1055
|
* payload. Fail-closed — at most 50 recipients, never allowed on a
|
|
1033
1056
|
* confidential category, and on the inline-capable channels alone, which
|
|
1034
|
-
*
|
|
1057
|
+
* are all four of an organization's (`in_app`, `email`, `push`, `web_push`).
|
|
1035
1058
|
*/
|
|
1036
1059
|
type NotifyDeliveryMode = 'sealed' | 'plaintext';
|
|
1037
1060
|
/**
|
|
@@ -1072,11 +1095,13 @@ type NotifyCategory = NotifyPresetCategory | (string & Record<never, never>);
|
|
|
1072
1095
|
type NotifyPresetName = 'alert' | 'secureMessage' | 'conversation' | 'approval' | 'signatureRequest';
|
|
1073
1096
|
/**
|
|
1074
1097
|
* A recipient addressed by the handles the SENDER knows them by. `id` is your
|
|
1075
|
-
* own key for them,
|
|
1076
|
-
*
|
|
1077
|
-
*
|
|
1078
|
-
*
|
|
1079
|
-
*
|
|
1098
|
+
* own key for them, their Identity id (SVID, `ing_*`), or the SparkVault user
|
|
1099
|
+
* id (`usr_*`) of an active member of your organization, which also reaches the
|
|
1100
|
+
* devices they registered with SparkVault (`push`, `web_push`); `email` is
|
|
1101
|
+
* where the email channel delivers and the address a sealed send's recipient
|
|
1102
|
+
* proves to open it. A bare string is an email address or one of those
|
|
1103
|
+
* SparkVault ids: a bare address is also the address its recipient proves,
|
|
1104
|
+
* while a bare id keys the person's inbox row and carries no address to verify.
|
|
1080
1105
|
*
|
|
1081
1106
|
* The recipient's key is its `id`, else its `email`, trimmed, with an email
|
|
1082
1107
|
* address lowercased the way Identity stores it: it names their row in your
|
|
@@ -1088,13 +1113,15 @@ type NotifyPresetName = 'alert' | 'secureMessage' | 'conversation' | 'approval'
|
|
|
1088
1113
|
* resolved to the person who holds it through Identity's directory.
|
|
1089
1114
|
*
|
|
1090
1115
|
* Refused with one 400 (`serviceCode` `VALIDATION_ERROR`) naming each such entry
|
|
1091
|
-
* by index: a SparkVault user id (`usr_*`)
|
|
1092
|
-
*
|
|
1093
|
-
*
|
|
1094
|
-
*
|
|
1095
|
-
*
|
|
1096
|
-
*
|
|
1097
|
-
*
|
|
1116
|
+
* by index: a SparkVault user id (`usr_*`) that is not an active member of your
|
|
1117
|
+
* organization (another account's member, one still invited, or no member at
|
|
1118
|
+
* all), and any id that only starts as one (`usr_`, `usr_x-1`), which names no
|
|
1119
|
+
* member; a recipient with no email address that a phone number would key (a
|
|
1120
|
+
* bare number, `{ phone }`, or an `id` that is an E.164 number); on a sealed
|
|
1121
|
+
* send, one whose only handle is a phone (`{ id, phone }`); and, on a sealed
|
|
1122
|
+
* send at the default `identifier` level or at `passkey`, one with no address
|
|
1123
|
+
* to verify (a bare id, or an `id` alone): give it `{ id, email }`, or send at
|
|
1124
|
+
* `verificationLevel: 'none'`.
|
|
1098
1125
|
*/
|
|
1099
1126
|
interface NotifyRecipientRef {
|
|
1100
1127
|
/** At most 256 bytes of UTF-8 with no control characters: it keys the recipient's inbox. */
|
|
@@ -1208,11 +1235,11 @@ interface CreateNotifySendOptions {
|
|
|
1208
1235
|
policy?: NotifySendPolicy;
|
|
1209
1236
|
/**
|
|
1210
1237
|
* Channel ladder override, in escalation order; omit to resolve from the
|
|
1211
|
-
* account config per category. An organization's send names its own
|
|
1238
|
+
* account config per category. An organization's send names its own four
|
|
1212
1239
|
* channels (see `NotifyChannel`): any other is refused 403, `serviceCode`
|
|
1213
1240
|
* `NOTIFY_CHANNEL_NOT_AVAILABLE`, `details: { field: 'channels', channels }`.
|
|
1214
1241
|
*/
|
|
1215
|
-
channels?: Array<'in_app' | 'email'>;
|
|
1242
|
+
channels?: Array<'in_app' | 'email' | 'push' | 'web_push'>;
|
|
1216
1243
|
escalation?: NotifyEscalation;
|
|
1217
1244
|
/**
|
|
1218
1245
|
* Channel-agnostic display title (rides the email subject). Cut to 200
|
|
@@ -1302,6 +1329,10 @@ interface ListNotifyInboxOptions {
|
|
|
1302
1329
|
* under the key they were sent to: none is moved or aliased when the person
|
|
1303
1330
|
* later gets an SVID, so a tenant that switches from email to SVID addressing
|
|
1304
1331
|
* should also read the email-keyed inbox for its `history_ttl_days` window.
|
|
1332
|
+
* A SparkVault user id (`usr_*`), or any id that only starts as one, names a
|
|
1333
|
+
* member's own inbox, which only that member reads, signed in to SparkVault:
|
|
1334
|
+
* it is refused 400 `VALIDATION_ERROR` before anything is read, here and on
|
|
1335
|
+
* both marks.
|
|
1305
1336
|
*/
|
|
1306
1337
|
recipientId: string;
|
|
1307
1338
|
state?: NotifyInboxView;
|
|
@@ -1309,13 +1340,14 @@ interface ListNotifyInboxOptions {
|
|
|
1309
1340
|
limit?: number;
|
|
1310
1341
|
cursor?: string;
|
|
1311
1342
|
}
|
|
1343
|
+
|
|
1312
1344
|
/**
|
|
1313
|
-
* Both Notify inbox front doors run on one engine and
|
|
1314
|
-
*
|
|
1345
|
+
* Both Notify inbox front doors run on one engine and page alike, so the
|
|
1346
|
+
* sender-side page is typed as the recipient feed's, with the sender's rows.
|
|
1315
1347
|
*/
|
|
1316
|
-
type ListNotifyInboxResponse = ListNotificationsResponse
|
|
1317
|
-
|
|
1318
|
-
|
|
1348
|
+
type ListNotifyInboxResponse = Omit<ListNotificationsResponse, 'notifications'> & {
|
|
1349
|
+
notifications: NotifyInboxRow[];
|
|
1350
|
+
};
|
|
1319
1351
|
interface MarkNotifyInboxStateOptions {
|
|
1320
1352
|
recipientId: string;
|
|
1321
1353
|
/** The row's own `created_at` (epoch seconds), round-tripped from the feed row. */
|
|
@@ -1813,11 +1845,12 @@ interface NotifyConfigDelivery {
|
|
|
1813
1845
|
escalation_enabled?: boolean;
|
|
1814
1846
|
}
|
|
1815
1847
|
/**
|
|
1816
|
-
* `delivery` as a patch writes it. Its ladders name an organization's own
|
|
1817
|
-
* channels, `in_app` and `
|
|
1818
|
-
* 403, `serviceCode` `NOTIFY_CHANNEL_NOT_AVAILABLE`,
|
|
1819
|
-
* ladder's field (and `details.category` the
|
|
1820
|
-
* in `channel_priority`), and nothing is
|
|
1848
|
+
* `delivery` as a patch writes it. Its ladders name an organization's own four
|
|
1849
|
+
* channels, `in_app`, `email`, `push` and `web_push` (see `NotifyChannel`): any
|
|
1850
|
+
* other is refused 403, `serviceCode` `NOTIFY_CHANNEL_NOT_AVAILABLE`,
|
|
1851
|
+
* `details.field` naming the ladder's field (and `details.category` the
|
|
1852
|
+
* category, for a category's ladder in `channel_priority`), and nothing is
|
|
1853
|
+
* stored.
|
|
1821
1854
|
*/
|
|
1822
1855
|
interface NotifyConfigDeliveryPatch extends Omit<NotifyConfigDelivery, 'channel_priority'> {
|
|
1823
1856
|
/**
|
|
@@ -1913,9 +1946,12 @@ interface NotifyConfig {
|
|
|
1913
1946
|
* `marketing`) is stored as a tombstone, which keeps the default from
|
|
1914
1947
|
* re-appearing on the next merge; any other delete leaves no entry. Storing a
|
|
1915
1948
|
* normal object under the same key later re-creates it. The reserved `security`
|
|
1916
|
-
* category can neither be removed nor made optional,
|
|
1949
|
+
* category can neither be removed nor made optional, the promotional
|
|
1917
1950
|
* categories `marketing` and `product` can never be made required: their email
|
|
1918
|
-
* always carries an unsubscribe link
|
|
1951
|
+
* always carries an unsubscribe link, and `help_desk_alert` can be neither
|
|
1952
|
+
* removed nor made required: each member decides on auth.sv, under it, whether
|
|
1953
|
+
* the help desk's alerts reach them. Each refusal is a 400 `VALIDATION_ERROR`
|
|
1954
|
+
* naming the category in `details.category`.
|
|
1919
1955
|
*/
|
|
1920
1956
|
interface NotifyConfigPatch {
|
|
1921
1957
|
delivery?: NotifyConfigDeliveryPatch;
|
|
@@ -2264,9 +2300,11 @@ declare class NotifyProductModule {
|
|
|
2264
2300
|
*
|
|
2265
2301
|
* Delete a category by storing an explicit `null` TOMBSTONE — that is what keeps
|
|
2266
2302
|
* a seeded default from re-appearing on the next merge. The reserved `security`
|
|
2267
|
-
* category can neither be removed nor made optional,
|
|
2303
|
+
* category can neither be removed nor made optional, the promotional
|
|
2268
2304
|
* categories `marketing` and `product` can never be made required: their email
|
|
2269
|
-
* always carries an unsubscribe link
|
|
2305
|
+
* always carries an unsubscribe link, and `help_desk_alert` can be neither
|
|
2306
|
+
* removed nor made required: each member decides on auth.sv, under it, whether
|
|
2307
|
+
* the help desk's alerts reach them.
|
|
2270
2308
|
*
|
|
2271
2309
|
* The `events` section configures the outbound event webhook: `webhook_url`
|
|
2272
2310
|
* must be https on a public host, and `secret` (16-256 chars) signs every event
|
|
@@ -4164,8 +4202,9 @@ declare class EntropyModule {
|
|
|
4164
4202
|
*
|
|
4165
4203
|
* SparkVault's first-party Notify surface: the metadata-only inbox of a user
|
|
4166
4204
|
* signed in to SparkVault itself (a Core session JWT; an API key or an
|
|
4167
|
-
* identity-only token is refused), holding the notifications SparkVault
|
|
4168
|
-
* delivered to them `in_app`, plus this browser's
|
|
4205
|
+
* identity-only token is refused), holding the notifications SparkVault and the
|
|
4206
|
+
* organization they signed in to delivered to them `in_app`, plus this browser's
|
|
4207
|
+
* Web Push registration. It is
|
|
4169
4208
|
* not a tenant's inbox for its own end users: a tenant reads its recipients'
|
|
4170
4209
|
* feeds with `sv.products.notify.getInbox`. The recipient is ALWAYS derived
|
|
4171
4210
|
* from the session on the server — no method takes a `recipient_id`, and any
|
|
@@ -4427,4 +4466,4 @@ declare global {
|
|
|
4427
4466
|
}
|
|
4428
4467
|
|
|
4429
4468
|
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 };
|
|
4430
|
-
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 };
|
|
4469
|
+
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, NotificationSender, 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
|
@@ -11261,6 +11261,21 @@ class IdentityModule {
|
|
|
11261
11261
|
const NOTIFY_SEND_ID_PATTERN = /^[A-Za-z0-9_.:-]+$/;
|
|
11262
11262
|
const NOTIFY_SEND_ID_MAX_LENGTH = 128;
|
|
11263
11263
|
|
|
11264
|
+
/**
|
|
11265
|
+
* The Notify category a help desk's alerts to its own staff are classified
|
|
11266
|
+
* as: a new request in a team's queue, a customer's message, an assignment, a
|
|
11267
|
+
* mention, a reply to review, and the problems the desk tells its admins of.
|
|
11268
|
+
* Every account's categories carry it and every send may carry it
|
|
11269
|
+
* (NOTIFY_ALWAYS_SENDABLE_CATEGORIES), so an organization that removes it
|
|
11270
|
+
* from its own categories still alerts its staff. It is never required: the
|
|
11271
|
+
* Core API's config write refuses `required: true` on it, and the console
|
|
11272
|
+
* offers no Required for it. So a member's mute of it for the organization on
|
|
11273
|
+
* auth.sv, and their switching the organization off there, hold on whichever
|
|
11274
|
+
* route the alert takes: the organization's own Notify, or SparkVault's email
|
|
11275
|
+
* to an organization without it.
|
|
11276
|
+
*/
|
|
11277
|
+
const NOTIFY_HELP_DESK_ALERT_CATEGORY = 'help_desk_alert';
|
|
11278
|
+
|
|
11264
11279
|
/** Inbox states a recipient can set on one notification. */
|
|
11265
11280
|
const NOTIFY_INBOX_MARK_STATES = Object.freeze(['seen', 'read', 'archived']);
|
|
11266
11281
|
|
|
@@ -11284,7 +11299,8 @@ const NOTIFY_INBOX_BULK_MARK_STATES = Object.freeze(['seen', 'read']);
|
|
|
11284
11299
|
* The ladders the sealed presets name are the channels every sender's recipients
|
|
11285
11300
|
* are reached on: the sender's Notify inbox (`in_app`, which the sender's own app
|
|
11286
11301
|
* reads) and email. `secureMessage` goes to the person's mailbox alone. The
|
|
11287
|
-
* device channels reach
|
|
11302
|
+
* device channels reach only a recipient addressed by a SparkVault member's
|
|
11303
|
+
* user id, so no preset names them.
|
|
11288
11304
|
*
|
|
11289
11305
|
* `approval` and `signatureRequest` verify at `identifier`, not `passkey`: a
|
|
11290
11306
|
* passkey-level grant is satisfiable only by a recipient who ALREADY has a
|
|
@@ -11328,10 +11344,27 @@ const NOTIFY_PRESETS$1 = Object.freeze({
|
|
|
11328
11344
|
* narrows what it derives (its place on the compliance floor, its toggle on the
|
|
11329
11345
|
* recipient's settings), never what a preset send may be classified as.
|
|
11330
11346
|
*/
|
|
11331
|
-
Object.freeze([
|
|
11347
|
+
const NOTIFY_PRESET_CATEGORIES = Object.freeze([
|
|
11332
11348
|
...new Set(Object.values(NOTIFY_PRESETS$1).map((preset) => preset.category))
|
|
11333
11349
|
]);
|
|
11334
11350
|
|
|
11351
|
+
/**
|
|
11352
|
+
* The categories a send may carry whatever the account's own categories hold:
|
|
11353
|
+
* every preset category (NOTIFY_PRESET_CATEGORIES) and the help desk's staff
|
|
11354
|
+
* alerts (NOTIFY_HELP_DESK_ALERT_CATEGORY), each of which a first-class
|
|
11355
|
+
* surface sends under on its own. Every account's config seeds them, so they
|
|
11356
|
+
* derive like any other category, and an account that deletes one narrows
|
|
11357
|
+
* what it derives (its place on the compliance floor, its toggle on the
|
|
11358
|
+
* recipient's settings), never what a send may be classified as. The Core
|
|
11359
|
+
* API's send and config checks accept them (notify/categories.js
|
|
11360
|
+
* sendableCategoryKeys), and the console says so before such a category is
|
|
11361
|
+
* deleted.
|
|
11362
|
+
*/
|
|
11363
|
+
Object.freeze([
|
|
11364
|
+
...NOTIFY_PRESET_CATEGORIES,
|
|
11365
|
+
NOTIFY_HELP_DESK_ALERT_CATEGORY
|
|
11366
|
+
]);
|
|
11367
|
+
|
|
11335
11368
|
/**
|
|
11336
11369
|
* A preset's bundle with the caller's send arguments over it: the one merge the
|
|
11337
11370
|
* Core API's presets (`buildPresetSend`) and the JS SDK's
|
|
@@ -11825,9 +11858,11 @@ class NotifyProductModule {
|
|
|
11825
11858
|
*
|
|
11826
11859
|
* Delete a category by storing an explicit `null` TOMBSTONE — that is what keeps
|
|
11827
11860
|
* a seeded default from re-appearing on the next merge. The reserved `security`
|
|
11828
|
-
* category can neither be removed nor made optional,
|
|
11861
|
+
* category can neither be removed nor made optional, the promotional
|
|
11829
11862
|
* categories `marketing` and `product` can never be made required: their email
|
|
11830
|
-
* always carries an unsubscribe link
|
|
11863
|
+
* always carries an unsubscribe link, and `help_desk_alert` can be neither
|
|
11864
|
+
* removed nor made required: each member decides on auth.sv, under it, whether
|
|
11865
|
+
* the help desk's alerts reach them.
|
|
11831
11866
|
*
|
|
11832
11867
|
* The `events` section configures the outbound event webhook: `webhook_url`
|
|
11833
11868
|
* must be https on a public host, and `secret` (16-256 chars) signs every event
|
|
@@ -12005,9 +12040,9 @@ function unsealRequestBody(key, ttlSeconds) {
|
|
|
12005
12040
|
|
|
12006
12041
|
/**
|
|
12007
12042
|
* Forge transfer URLs: the one reading of the URL Core issues for an ingot
|
|
12008
|
-
* transfer, `https://forge.sparkvault.com/{encrypt|decrypt}?istk=…`,
|
|
12009
|
-
* session URL a tus upload continues at, whether just created or
|
|
12010
|
-
* probed or terminated).
|
|
12043
|
+
* transfer, `https://forge.sparkvault.com/{encrypt|decrypt|thumbnail}?istk=…`,
|
|
12044
|
+
* and of the session URL a tus upload continues at, whether just created or
|
|
12045
|
+
* kept (resumed, probed or terminated).
|
|
12011
12046
|
*
|
|
12012
12047
|
* The URL carries the ISTK, a bearer credential for one transfer, and an upload
|
|
12013
12048
|
* sends the plaintext after it, so every client reads the URL here before a
|
|
@@ -12078,7 +12113,7 @@ function isForgeHost(hostname) {
|
|
|
12078
12113
|
*
|
|
12079
12114
|
* @param {unknown} value
|
|
12080
12115
|
* @param {Object} options
|
|
12081
|
-
* @param {'encrypt'|'decrypt'} options.operation - The transfer the URL must name
|
|
12116
|
+
* @param {'encrypt'|'decrypt'|'thumbnail'} options.operation - The transfer the URL must name
|
|
12082
12117
|
* @param {(hostname: string) => boolean} [options.isAllowedHost] - Forge's own
|
|
12083
12118
|
* host by default; a published SDK passes its configured allowlist. It is
|
|
12084
12119
|
* handed the lowercased host name.
|
|
@@ -17993,8 +18028,9 @@ function validateEntropyRequest(bytes, format) {
|
|
|
17993
18028
|
*
|
|
17994
18029
|
* SparkVault's first-party Notify surface: the metadata-only inbox of a user
|
|
17995
18030
|
* signed in to SparkVault itself (a Core session JWT; an API key or an
|
|
17996
|
-
* identity-only token is refused), holding the notifications SparkVault
|
|
17997
|
-
* delivered to them `in_app`, plus this browser's
|
|
18031
|
+
* identity-only token is refused), holding the notifications SparkVault and the
|
|
18032
|
+
* organization they signed in to delivered to them `in_app`, plus this browser's
|
|
18033
|
+
* Web Push registration. It is
|
|
17998
18034
|
* not a tenant's inbox for its own end users: a tenant reads its recipients'
|
|
17999
18035
|
* feeds with `sv.products.notify.getInbox`. The recipient is ALWAYS derived
|
|
18000
18036
|
* from the session on the server — no method takes a `recipient_id`, and any
|
|
@@ -18452,7 +18488,7 @@ class SparkVault {
|
|
|
18452
18488
|
}
|
|
18453
18489
|
/** Get the SDK version */
|
|
18454
18490
|
static get version() {
|
|
18455
|
-
return '13.
|
|
18491
|
+
return '13.4.0';
|
|
18456
18492
|
}
|
|
18457
18493
|
}
|
|
18458
18494
|
if (typeof window !== 'undefined') {
|