@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 +83 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +83 -4
- package/dist/index.mjs.map +1 -1
- package/dist/products/identity/views/icons.d.ts +4 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4397,7 +4397,10 @@ class LoadingView {
|
|
|
4397
4397
|
*
|
|
4398
4398
|
* Bare outline glyphs per the SparkVault design system: stroke `currentColor`
|
|
4399
4399
|
* so the stylesheet drives color, no tinted container backgrounds, round
|
|
4400
|
-
* caps/joins.
|
|
4400
|
+
* caps/joins. The sign-in providers' marks are the one exception: each is its
|
|
4401
|
+
* owner's filled logo, in the owner's colors, or in `currentColor` where the
|
|
4402
|
+
* owner's mark is one-color (Apple, GitHub). Uses proper DOM element creation
|
|
4403
|
+
* for security.
|
|
4401
4404
|
*/
|
|
4402
4405
|
function createSvgElement(viewBox, width = 16, height = 16) {
|
|
4403
4406
|
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
@@ -4667,9 +4670,10 @@ function createGithubIcon() {
|
|
|
4667
4670
|
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'));
|
|
4668
4671
|
return svg;
|
|
4669
4672
|
}
|
|
4673
|
+
/** Facebook's mark and blue as Simple Icons (CC0-1.0) draws them, in its own 24-unit box. */
|
|
4670
4674
|
function createFacebookIcon() {
|
|
4671
|
-
const svg = createSvgElement('0 0
|
|
4672
|
-
svg.appendChild(createPath('
|
|
4675
|
+
const svg = createSvgElement('0 0 24 24', 20, 20);
|
|
4676
|
+
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' }));
|
|
4673
4677
|
return svg;
|
|
4674
4678
|
}
|
|
4675
4679
|
function createLinkedinIcon() {
|
|
@@ -14416,6 +14420,81 @@ const CUSTOMER_UPLOAD_REFUSALS = Object.freeze({
|
|
|
14416
14420
|
UPLOADS_OFF: 'customer_uploads_off'
|
|
14417
14421
|
});
|
|
14418
14422
|
|
|
14423
|
+
/**
|
|
14424
|
+
* The roles a member holds on one desk, each granted per desk to a member who
|
|
14425
|
+
* holds Help Desk product access (@sparkvault/app-sdk/product-access): a
|
|
14426
|
+
* Manager runs the desk, an Agent works its tickets, a Trainee works them
|
|
14427
|
+
* with every customer reply approved by a Manager first. No role is no row:
|
|
14428
|
+
* the member does not work the desk.
|
|
14429
|
+
*/
|
|
14430
|
+
const HELP_DESK_ROLES = Object.freeze(['manager', 'agent', 'trainee']);
|
|
14431
|
+
|
|
14432
|
+
/**
|
|
14433
|
+
* What each role may do on its desk: the one authorization matrix Core's gates
|
|
14434
|
+
* enforce and the console reads to show what a member may do. Each capability
|
|
14435
|
+
* names the roles that hold it; `admin` true when a company admin holds it with
|
|
14436
|
+
* no role on the desk (an admin who holds a role holds the union); and
|
|
14437
|
+
* `requires_admin` true when holding it takes a company admin as well as one
|
|
14438
|
+
* of its roles. A role is a desk's only while its holder holds Help Desk
|
|
14439
|
+
* product access and is an active member; a Full License is separate and
|
|
14440
|
+
* still licenses every content write (working tickets, approving a reply,
|
|
14441
|
+
* editing the knowledge base).
|
|
14442
|
+
*
|
|
14443
|
+
* see_desk list the desk, read its settings and queues
|
|
14444
|
+
* view_tickets read every ticket of the desk, every queue and untriaged included
|
|
14445
|
+
* work_tickets notes, status, priority, tags, assignment changes, attachments, merges
|
|
14446
|
+
* reply send a customer reply directly (a Trainee's reply becomes a review instead)
|
|
14447
|
+
* submit_reply_for_approval a customer reply is held for a Manager's approval
|
|
14448
|
+
* open_request open a request for a customer with a first message
|
|
14449
|
+
* approve_replies approve or return a held reply (never one's own)
|
|
14450
|
+
* discard_replies end a held reply without sending it
|
|
14451
|
+
* delete_attachments delete a customer's or an operator's file from a ticket
|
|
14452
|
+
* hold_tickets be assigned, mentioned, alerted and balanced-assigned
|
|
14453
|
+
* configure_desk edit the desk's settings, queues, routing, alerts and knowledge base
|
|
14454
|
+
* configure_chat the desk's chat intake and new-ticket chat notifications
|
|
14455
|
+
* assign_roles choose who holds which role on the desk
|
|
14456
|
+
* view_analytics the desk's analytics, its CSV and the operator breakdown
|
|
14457
|
+
* manage_requesters block or unblock a requester
|
|
14458
|
+
* requester_duties export or erase a requester's data
|
|
14459
|
+
* legal_holds place, clear and list legal holds
|
|
14460
|
+
* keep_desk_saved_replies create, change and delete the desk's shared saved replies
|
|
14461
|
+
* keep_queue_saved_replies create a queue's saved replies, and change or delete one's own
|
|
14462
|
+
* keep_others_saved_replies change or delete a saved reply another member wrote
|
|
14463
|
+
* manage_desks create, archive and restore desks; desk capacity
|
|
14464
|
+
* grant_product_access give or remove a member's Help Desk product access
|
|
14465
|
+
*
|
|
14466
|
+
* A Trainee keeps no saved replies: they use every one, and their reply is
|
|
14467
|
+
* reviewed before it reaches a customer, so no text of theirs reaches one
|
|
14468
|
+
* through another operator's reply unreviewed.
|
|
14469
|
+
*/
|
|
14470
|
+
const EVERY_ROLE = HELP_DESK_ROLES;
|
|
14471
|
+
const capability = (roles, { admin = false, requiresAdmin = false } = {}) =>
|
|
14472
|
+
Object.freeze({ roles: Object.freeze([...roles]), admin, requires_admin: requiresAdmin });
|
|
14473
|
+
Object.freeze({
|
|
14474
|
+
see_desk: capability(EVERY_ROLE, { admin: true }),
|
|
14475
|
+
view_tickets: capability(EVERY_ROLE),
|
|
14476
|
+
work_tickets: capability(EVERY_ROLE),
|
|
14477
|
+
reply: capability(['manager', 'agent']),
|
|
14478
|
+
submit_reply_for_approval: capability(['trainee']),
|
|
14479
|
+
open_request: capability(['manager', 'agent']),
|
|
14480
|
+
approve_replies: capability(['manager']),
|
|
14481
|
+
discard_replies: capability(['manager']),
|
|
14482
|
+
delete_attachments: capability(['manager']),
|
|
14483
|
+
hold_tickets: capability(EVERY_ROLE),
|
|
14484
|
+
configure_desk: capability(['manager'], { admin: true }),
|
|
14485
|
+
configure_chat: capability([], { admin: true }),
|
|
14486
|
+
assign_roles: capability(['manager'], { admin: true }),
|
|
14487
|
+
view_analytics: capability(['manager']),
|
|
14488
|
+
manage_requesters: capability(['manager']),
|
|
14489
|
+
requester_duties: capability(['manager'], { requiresAdmin: true }),
|
|
14490
|
+
legal_holds: capability(EVERY_ROLE, { requiresAdmin: true }),
|
|
14491
|
+
keep_desk_saved_replies: capability(['manager']),
|
|
14492
|
+
keep_queue_saved_replies: capability(['manager', 'agent']),
|
|
14493
|
+
keep_others_saved_replies: capability(['manager']),
|
|
14494
|
+
manage_desks: capability([], { admin: true }),
|
|
14495
|
+
grant_product_access: capability([], { admin: true })
|
|
14496
|
+
});
|
|
14497
|
+
|
|
14419
14498
|
/** The longest subject, in characters. */
|
|
14420
14499
|
const MAX_SUBJECT_LEN = 200;
|
|
14421
14500
|
|
|
@@ -29450,7 +29529,7 @@ class SparkVault {
|
|
|
29450
29529
|
}
|
|
29451
29530
|
/** Get the SDK version */
|
|
29452
29531
|
static get version() {
|
|
29453
|
-
return '16.
|
|
29532
|
+
return '16.2.0';
|
|
29454
29533
|
}
|
|
29455
29534
|
}
|
|
29456
29535
|
if (typeof window !== 'undefined') {
|