@sparkvault/sdk-js 16.9.0 → 16.10.1
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 +11 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.mjs +11 -8
- package/dist/index.mjs.map +1 -1
- package/dist/products/help-desk/types.d.ts +4 -0
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3731,6 +3731,10 @@ interface HelpDeskTicket {
|
|
|
3731
3731
|
awaiting_first_response: boolean;
|
|
3732
3732
|
created_at: number;
|
|
3733
3733
|
last_public_activity_at: number | null;
|
|
3734
|
+
/** Epoch seconds of the customer's newest message on the request; null when they have sent none. */
|
|
3735
|
+
last_customer_message_at: number | null;
|
|
3736
|
+
/** Epoch seconds of the desk's newest reply to the customer on the request; null until the desk replies. */
|
|
3737
|
+
last_operator_reply_at: number | null;
|
|
3734
3738
|
muted: boolean;
|
|
3735
3739
|
can_resolve?: boolean;
|
|
3736
3740
|
feedback?: Record<string, unknown>;
|
package/dist/index.mjs
CHANGED
|
@@ -18938,8 +18938,9 @@ function refusalCopy(refusal, maxBytes) {
|
|
|
18938
18938
|
/**
|
|
18939
18939
|
* A tenant's brand color and the WCAG contrast rules that decide how it may be
|
|
18940
18940
|
* used: the one hex rule the server stores, the console checks and the portal
|
|
18941
|
-
* paints, the one contrast reading the console's readouts
|
|
18942
|
-
* accent
|
|
18941
|
+
* paints, the one contrast reading the console's readouts, the portal's
|
|
18942
|
+
* accent and the portal's reading of a help center's ground share, and the
|
|
18943
|
+
* one way a readout writes that reading.
|
|
18943
18944
|
*
|
|
18944
18945
|
* A brand color is tenant-controlled, so it is used only when it is a
|
|
18945
18946
|
* six-digit hex color, read case-insensitively and held in lowercase; anything
|
|
@@ -18981,13 +18982,15 @@ const CANVAS_COLOR = '#f7fafb';
|
|
|
18981
18982
|
*/
|
|
18982
18983
|
const INK_COLOR = '#0d1a20';
|
|
18983
18984
|
|
|
18985
|
+
/** Relative luminance (WCAG 2) of an sRGB color's red, green and blue channels, each from 0 to 1. */
|
|
18986
|
+
function channelLuminance(channels) {
|
|
18987
|
+
const [red, green, blue] = channels.map((channel) => (channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4));
|
|
18988
|
+
return 0.2126 * red + 0.7152 * green + 0.0722 * blue;
|
|
18989
|
+
}
|
|
18990
|
+
|
|
18984
18991
|
/** Relative luminance (WCAG 2) of a validated `#rrggbb` color. */
|
|
18985
18992
|
function relativeLuminance(color) {
|
|
18986
|
-
|
|
18987
|
-
const channel = Number.parseInt(color.slice(offset, offset + 2), 16) / 255;
|
|
18988
|
-
return channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4;
|
|
18989
|
-
});
|
|
18990
|
-
return 0.2126 * red + 0.7152 * green + 0.0722 * blue;
|
|
18993
|
+
return channelLuminance([1, 3, 5].map((offset) => Number.parseInt(color.slice(offset, offset + 2), 16) / 255));
|
|
18991
18994
|
}
|
|
18992
18995
|
|
|
18993
18996
|
/** The contrast ratio of two relative luminances. */
|
|
@@ -30998,7 +31001,7 @@ class SparkVault {
|
|
|
30998
31001
|
}
|
|
30999
31002
|
/** Get the SDK version */
|
|
31000
31003
|
static get version() {
|
|
31001
|
-
return '16.
|
|
31004
|
+
return '16.10.1';
|
|
31002
31005
|
}
|
|
31003
31006
|
}
|
|
31004
31007
|
if (typeof window !== 'undefined') {
|