@sparkvault/sdk-js 16.1.1 → 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
@@ -14424,6 +14424,81 @@ const CUSTOMER_UPLOAD_REFUSALS = Object.freeze({
14424
14424
  UPLOADS_OFF: 'customer_uploads_off'
14425
14425
  });
14426
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
+
14427
14502
  /** The longest subject, in characters. */
14428
14503
  const MAX_SUBJECT_LEN = 200;
14429
14504
 
@@ -29458,7 +29533,7 @@ class SparkVault {
29458
29533
  }
29459
29534
  /** Get the SDK version */
29460
29535
  static get version() {
29461
- return '16.1.1';
29536
+ return '16.2.0';
29462
29537
  }
29463
29538
  }
29464
29539
  if (typeof window !== 'undefined') {