@sparkvault/sdk-js 16.1.0 → 16.2.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
@@ -4401,7 +4401,10 @@ class LoadingView {
4401
4401
  *
4402
4402
  * Bare outline glyphs per the SparkVault design system: stroke `currentColor`
4403
4403
  * so the stylesheet drives color, no tinted container backgrounds, round
4404
- * caps/joins. Uses proper DOM element creation for security.
4404
+ * caps/joins. The sign-in providers' marks are the one exception: each is its
4405
+ * owner's filled logo, in the owner's colors, or in `currentColor` where the
4406
+ * owner's mark is one-color (Apple, GitHub). Uses proper DOM element creation
4407
+ * for security.
4405
4408
  */
4406
4409
  function createSvgElement(viewBox, width = 16, height = 16) {
4407
4410
  const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
@@ -4671,9 +4674,10 @@ function createGithubIcon() {
4671
4674
  svg.appendChild(createPath('M10 0C4.48 0 0 4.48 0 10c0 4.42 2.86 8.17 6.84 9.49.5.09.68-.22.68-.48 0-.24-.01-1.02-.01-1.86-2.51.46-3.16-.61-3.36-1.18-.11-.29-.6-1.18-1.02-1.41-.35-.19-.85-.65-.01-.66.79-.01 1.35.72 1.54 1.02.9 1.51 2.34 1.09 2.91.83.09-.65.35-1.09.64-1.34-2.22-.25-4.55-1.11-4.55-4.94 0-1.09.39-1.99 1.02-2.69-.1-.25-.45-1.27.1-2.65 0 0 .84-.27 2.75 1.02.8-.22 1.65-.33 2.5-.33s1.7.11 2.5.33c1.91-1.3 2.75-1.02 2.75-1.02.55 1.38.2 2.4.1 2.65.64.7 1.02 1.59 1.02 2.69 0 3.84-2.34 4.69-4.57 4.94.36.31.67.91.67 1.85 0 1.34-.01 2.41-.01 2.75 0 .27.18.58.69.48C17.14 18.16 20 14.42 20 10c0-5.52-4.48-10-10-10z'));
4672
4675
  return svg;
4673
4676
  }
4677
+ /** Facebook's mark and blue as Simple Icons (CC0-1.0) draws them, in its own 24-unit box. */
4674
4678
  function createFacebookIcon() {
4675
- const svg = createSvgElement('0 0 20 20', 20, 20);
4676
- svg.appendChild(createPath('M20 10.06c0-5.52-4.48-10-10-10S0 4.53 0 10.06c0 4.99 3.66 9.13 8.44 9.88v-6.99H5.9v-2.89h2.54V7.85c0-2.51 1.49-3.89 3.78-3.89 1.09 0 2.24.2 2.24.2v2.46h-1.26c-1.24 0-1.63.77-1.63 1.56v1.88h2.77l-.44 2.89h-2.33v6.99c4.78-.75 8.44-4.89 8.44-9.88z', { fill: '#1877F2' }));
4679
+ const svg = createSvgElement('0 0 24 24', 20, 20);
4680
+ svg.appendChild(createPath('M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z', { fill: '#0866FF' }));
4677
4681
  return svg;
4678
4682
  }
4679
4683
  function createLinkedinIcon() {
@@ -14420,6 +14424,81 @@ const CUSTOMER_UPLOAD_REFUSALS = Object.freeze({
14420
14424
  UPLOADS_OFF: 'customer_uploads_off'
14421
14425
  });
14422
14426
 
14427
+ /**
14428
+ * The roles a member holds on one desk, each granted per desk to a member who
14429
+ * holds Help Desk product access (@sparkvault/app-sdk/product-access): a
14430
+ * Manager runs the desk, an Agent works its tickets, a Trainee works them
14431
+ * with every customer reply approved by a Manager first. No role is no row:
14432
+ * the member does not work the desk.
14433
+ */
14434
+ const HELP_DESK_ROLES = Object.freeze(['manager', 'agent', 'trainee']);
14435
+
14436
+ /**
14437
+ * What each role may do on its desk: the one authorization matrix Core's gates
14438
+ * enforce and the console reads to show what a member may do. Each capability
14439
+ * names the roles that hold it; `admin` true when a company admin holds it with
14440
+ * no role on the desk (an admin who holds a role holds the union); and
14441
+ * `requires_admin` true when holding it takes a company admin as well as one
14442
+ * of its roles. A role is a desk's only while its holder holds Help Desk
14443
+ * product access and is an active member; a Full License is separate and
14444
+ * still licenses every content write (working tickets, approving a reply,
14445
+ * editing the knowledge base).
14446
+ *
14447
+ * see_desk list the desk, read its settings and queues
14448
+ * view_tickets read every ticket of the desk, every queue and untriaged included
14449
+ * work_tickets notes, status, priority, tags, assignment changes, attachments, merges
14450
+ * reply send a customer reply directly (a Trainee's reply becomes a review instead)
14451
+ * submit_reply_for_approval a customer reply is held for a Manager's approval
14452
+ * open_request open a request for a customer with a first message
14453
+ * approve_replies approve or return a held reply (never one's own)
14454
+ * discard_replies end a held reply without sending it
14455
+ * delete_attachments delete a customer's or an operator's file from a ticket
14456
+ * hold_tickets be assigned, mentioned, alerted and balanced-assigned
14457
+ * configure_desk edit the desk's settings, queues, routing, alerts and knowledge base
14458
+ * configure_chat the desk's chat intake and new-ticket chat notifications
14459
+ * assign_roles choose who holds which role on the desk
14460
+ * view_analytics the desk's analytics, its CSV and the operator breakdown
14461
+ * manage_requesters block or unblock a requester
14462
+ * requester_duties export or erase a requester's data
14463
+ * legal_holds place, clear and list legal holds
14464
+ * keep_desk_saved_replies create, change and delete the desk's shared saved replies
14465
+ * keep_queue_saved_replies create a queue's saved replies, and change or delete one's own
14466
+ * keep_others_saved_replies change or delete a saved reply another member wrote
14467
+ * manage_desks create, archive and restore desks; desk capacity
14468
+ * grant_product_access give or remove a member's Help Desk product access
14469
+ *
14470
+ * A Trainee keeps no saved replies: they use every one, and their reply is
14471
+ * reviewed before it reaches a customer, so no text of theirs reaches one
14472
+ * through another operator's reply unreviewed.
14473
+ */
14474
+ const EVERY_ROLE = HELP_DESK_ROLES;
14475
+ const capability = (roles, { admin = false, requiresAdmin = false } = {}) =>
14476
+ Object.freeze({ roles: Object.freeze([...roles]), admin, requires_admin: requiresAdmin });
14477
+ Object.freeze({
14478
+ see_desk: capability(EVERY_ROLE, { admin: true }),
14479
+ view_tickets: capability(EVERY_ROLE),
14480
+ work_tickets: capability(EVERY_ROLE),
14481
+ reply: capability(['manager', 'agent']),
14482
+ submit_reply_for_approval: capability(['trainee']),
14483
+ open_request: capability(['manager', 'agent']),
14484
+ approve_replies: capability(['manager']),
14485
+ discard_replies: capability(['manager']),
14486
+ delete_attachments: capability(['manager']),
14487
+ hold_tickets: capability(EVERY_ROLE),
14488
+ configure_desk: capability(['manager'], { admin: true }),
14489
+ configure_chat: capability([], { admin: true }),
14490
+ assign_roles: capability(['manager'], { admin: true }),
14491
+ view_analytics: capability(['manager']),
14492
+ manage_requesters: capability(['manager']),
14493
+ requester_duties: capability(['manager'], { requiresAdmin: true }),
14494
+ legal_holds: capability(EVERY_ROLE, { requiresAdmin: true }),
14495
+ keep_desk_saved_replies: capability(['manager']),
14496
+ keep_queue_saved_replies: capability(['manager', 'agent']),
14497
+ keep_others_saved_replies: capability(['manager']),
14498
+ manage_desks: capability([], { admin: true }),
14499
+ grant_product_access: capability([], { admin: true })
14500
+ });
14501
+
14423
14502
  /** The longest subject, in characters. */
14424
14503
  const MAX_SUBJECT_LEN = 200;
14425
14504
 
@@ -29454,7 +29533,7 @@ class SparkVault {
29454
29533
  }
29455
29534
  /** Get the SDK version */
29456
29535
  static get version() {
29457
- return '16.1.0';
29536
+ return '16.2.0';
29458
29537
  }
29459
29538
  }
29460
29539
  if (typeof window !== 'undefined') {