@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 CHANGED
@@ -11265,6 +11265,21 @@ class IdentityModule {
11265
11265
  const NOTIFY_SEND_ID_PATTERN = /^[A-Za-z0-9_.:-]+$/;
11266
11266
  const NOTIFY_SEND_ID_MAX_LENGTH = 128;
11267
11267
 
11268
+ /**
11269
+ * The Notify category a help desk's alerts to its own staff are classified
11270
+ * as: a new request in a team's queue, a customer's message, an assignment, a
11271
+ * mention, a reply to review, and the problems the desk tells its admins of.
11272
+ * Every account's categories carry it and every send may carry it
11273
+ * (NOTIFY_ALWAYS_SENDABLE_CATEGORIES), so an organization that removes it
11274
+ * from its own categories still alerts its staff. It is never required: the
11275
+ * Core API's config write refuses `required: true` on it, and the console
11276
+ * offers no Required for it. So a member's mute of it for the organization on
11277
+ * auth.sv, and their switching the organization off there, hold on whichever
11278
+ * route the alert takes: the organization's own Notify, or SparkVault's email
11279
+ * to an organization without it.
11280
+ */
11281
+ const NOTIFY_HELP_DESK_ALERT_CATEGORY = 'help_desk_alert';
11282
+
11268
11283
  /** Inbox states a recipient can set on one notification. */
11269
11284
  const NOTIFY_INBOX_MARK_STATES = Object.freeze(['seen', 'read', 'archived']);
11270
11285
 
@@ -11288,7 +11303,8 @@ const NOTIFY_INBOX_BULK_MARK_STATES = Object.freeze(['seen', 'read']);
11288
11303
  * The ladders the sealed presets name are the channels every sender's recipients
11289
11304
  * are reached on: the sender's Notify inbox (`in_app`, which the sender's own app
11290
11305
  * reads) and email. `secureMessage` goes to the person's mailbox alone. The
11291
- * device channels reach SparkVault's own devices only, so no preset names them.
11306
+ * device channels reach only a recipient addressed by a SparkVault member's
11307
+ * user id, so no preset names them.
11292
11308
  *
11293
11309
  * `approval` and `signatureRequest` verify at `identifier`, not `passkey`: a
11294
11310
  * passkey-level grant is satisfiable only by a recipient who ALREADY has a
@@ -11332,10 +11348,27 @@ const NOTIFY_PRESETS$1 = Object.freeze({
11332
11348
  * narrows what it derives (its place on the compliance floor, its toggle on the
11333
11349
  * recipient's settings), never what a preset send may be classified as.
11334
11350
  */
11335
- Object.freeze([
11351
+ const NOTIFY_PRESET_CATEGORIES = Object.freeze([
11336
11352
  ...new Set(Object.values(NOTIFY_PRESETS$1).map((preset) => preset.category))
11337
11353
  ]);
11338
11354
 
11355
+ /**
11356
+ * The categories a send may carry whatever the account's own categories hold:
11357
+ * every preset category (NOTIFY_PRESET_CATEGORIES) and the help desk's staff
11358
+ * alerts (NOTIFY_HELP_DESK_ALERT_CATEGORY), each of which a first-class
11359
+ * surface sends under on its own. Every account's config seeds them, so they
11360
+ * derive like any other category, and an account that deletes one narrows
11361
+ * what it derives (its place on the compliance floor, its toggle on the
11362
+ * recipient's settings), never what a send may be classified as. The Core
11363
+ * API's send and config checks accept them (notify/categories.js
11364
+ * sendableCategoryKeys), and the console says so before such a category is
11365
+ * deleted.
11366
+ */
11367
+ Object.freeze([
11368
+ ...NOTIFY_PRESET_CATEGORIES,
11369
+ NOTIFY_HELP_DESK_ALERT_CATEGORY
11370
+ ]);
11371
+
11339
11372
  /**
11340
11373
  * A preset's bundle with the caller's send arguments over it: the one merge the
11341
11374
  * Core API's presets (`buildPresetSend`) and the JS SDK's
@@ -11829,9 +11862,11 @@ class NotifyProductModule {
11829
11862
  *
11830
11863
  * Delete a category by storing an explicit `null` TOMBSTONE — that is what keeps
11831
11864
  * a seeded default from re-appearing on the next merge. The reserved `security`
11832
- * category can neither be removed nor made optional, and the promotional
11865
+ * category can neither be removed nor made optional, the promotional
11833
11866
  * categories `marketing` and `product` can never be made required: their email
11834
- * always carries an unsubscribe link.
11867
+ * always carries an unsubscribe link, and `help_desk_alert` can be neither
11868
+ * removed nor made required: each member decides on auth.sv, under it, whether
11869
+ * the help desk's alerts reach them.
11835
11870
  *
11836
11871
  * The `events` section configures the outbound event webhook: `webhook_url`
11837
11872
  * must be https on a public host, and `secret` (16-256 chars) signs every event
@@ -12009,9 +12044,9 @@ function unsealRequestBody(key, ttlSeconds) {
12009
12044
 
12010
12045
  /**
12011
12046
  * Forge transfer URLs: the one reading of the URL Core issues for an ingot
12012
- * transfer, `https://forge.sparkvault.com/{encrypt|decrypt}?istk=…`, and of the
12013
- * session URL a tus upload continues at, whether just created or kept (resumed,
12014
- * probed or terminated).
12047
+ * transfer, `https://forge.sparkvault.com/{encrypt|decrypt|thumbnail}?istk=…`,
12048
+ * and of the session URL a tus upload continues at, whether just created or
12049
+ * kept (resumed, probed or terminated).
12015
12050
  *
12016
12051
  * The URL carries the ISTK, a bearer credential for one transfer, and an upload
12017
12052
  * sends the plaintext after it, so every client reads the URL here before a
@@ -12082,7 +12117,7 @@ function isForgeHost(hostname) {
12082
12117
  *
12083
12118
  * @param {unknown} value
12084
12119
  * @param {Object} options
12085
- * @param {'encrypt'|'decrypt'} options.operation - The transfer the URL must name
12120
+ * @param {'encrypt'|'decrypt'|'thumbnail'} options.operation - The transfer the URL must name
12086
12121
  * @param {(hostname: string) => boolean} [options.isAllowedHost] - Forge's own
12087
12122
  * host by default; a published SDK passes its configured allowlist. It is
12088
12123
  * handed the lowercased host name.
@@ -17997,8 +18032,9 @@ function validateEntropyRequest(bytes, format) {
17997
18032
  *
17998
18033
  * SparkVault's first-party Notify surface: the metadata-only inbox of a user
17999
18034
  * signed in to SparkVault itself (a Core session JWT; an API key or an
18000
- * identity-only token is refused), holding the notifications SparkVault
18001
- * delivered to them `in_app`, plus this browser's Web Push registration. It is
18035
+ * identity-only token is refused), holding the notifications SparkVault and the
18036
+ * organization they signed in to delivered to them `in_app`, plus this browser's
18037
+ * Web Push registration. It is
18002
18038
  * not a tenant's inbox for its own end users: a tenant reads its recipients'
18003
18039
  * feeds with `sv.products.notify.getInbox`. The recipient is ALWAYS derived
18004
18040
  * from the session on the server — no method takes a `recipient_id`, and any
@@ -18456,7 +18492,7 @@ class SparkVault {
18456
18492
  }
18457
18493
  /** Get the SDK version */
18458
18494
  static get version() {
18459
- return '13.2.1';
18495
+ return '13.4.0';
18460
18496
  }
18461
18497
  }
18462
18498
  if (typeof window !== 'undefined') {